1 //===-- ValueLatticeUtils.h - Utils for solving lattices --------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file declares common functions useful for performing data-flow analyses
11 // that propagate values across function boundaries.
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_ANALYSIS_VALUELATTICEUTILS_H
16 #define LLVM_ANALYSIS_VALUELATTICEUTILS_H
23 /// Determine if the values of the given function's arguments can be tracked
24 /// interprocedurally. The value of an argument can be tracked if the function
25 /// has local linkage and its address is not taken.
26 bool canTrackArgumentsInterprocedurally(Function
*F
);
28 /// Determine if the values of the given function's returns can be tracked
29 /// interprocedurally. Return values can be tracked if the function has an
30 /// exact definition and it doesn't have the "naked" attribute. Naked functions
31 /// may contain assembly code that returns untrackable values.
32 bool canTrackReturnsInterprocedurally(Function
*F
);
34 /// Determine if the value maintained in the given global variable can be
35 /// tracked interprocedurally. A value can be tracked if the global variable
36 /// has local linkage and is only used by non-volatile loads and stores.
37 bool canTrackGlobalVariableInterprocedurally(GlobalVariable
*GV
);
39 } // end namespace llvm
41 #endif // LLVM_ANALYSIS_VALUELATTICEUTILS_H