[DAGCombiner] Expand combining of FP logical ops to sign-setting FP ops
[llvm-core.git] / include / llvm / Analysis / ValueLatticeUtils.h
blob02072672e56ed174b3e81376ed211f111a9bfebc
1 //===-- ValueLatticeUtils.h - Utils for solving lattices --------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
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
18 namespace llvm {
20 class Function;
21 class GlobalVariable;
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