|
|
|||
File indexing completed on 2026-05-10 08:43:19
0001 //===-- ValueLatticeUtils.h - Utils for solving lattices --------*- C++ -*-===// 0002 // 0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 0004 // See https://llvm.org/LICENSE.txt for license information. 0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 0006 // 0007 //===----------------------------------------------------------------------===// 0008 // 0009 // This file declares common functions useful for performing data-flow analyses 0010 // that propagate values across function boundaries. 0011 // 0012 //===----------------------------------------------------------------------===// 0013 0014 #ifndef LLVM_ANALYSIS_VALUELATTICEUTILS_H 0015 #define LLVM_ANALYSIS_VALUELATTICEUTILS_H 0016 0017 namespace llvm { 0018 0019 class Function; 0020 class GlobalVariable; 0021 0022 /// Determine if the values of the given function's arguments can be tracked 0023 /// interprocedurally. The value of an argument can be tracked if the function 0024 /// has local linkage and its address is not taken. 0025 bool canTrackArgumentsInterprocedurally(Function *F); 0026 0027 /// Determine if the values of the given function's returns can be tracked 0028 /// interprocedurally. Return values can be tracked if the function has an 0029 /// exact definition and it doesn't have the "naked" attribute. Naked functions 0030 /// may contain assembly code that returns untrackable values. 0031 bool canTrackReturnsInterprocedurally(Function *F); 0032 0033 /// Determine if the value maintained in the given global variable can be 0034 /// tracked interprocedurally. A value can be tracked if the global variable 0035 /// has local linkage and is only used by non-volatile loads and stores. 0036 bool canTrackGlobalVariableInterprocedurally(GlobalVariable *GV); 0037 0038 } // end namespace llvm 0039 0040 #endif // LLVM_ANALYSIS_VALUELATTICEUTILS_H
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|