Go to the source code of this file.
|
| llvm |
| This class represents lattice values for constants.
|
|
|
enum | IPOGrouping |
| To enable interprocedural analysis, we assign LLVM values to the following groups. More...
|
|
◆ DEBUG_TYPE
◆ IPOGrouping
To enable interprocedural analysis, we assign LLVM values to the following groups.
The register group represents SSA registers, the return group represents the return values of functions, and the memory group represents in-memory values. An LLVM Value can technically be in more than one group. It's necessary to distinguish these groups so we can, for example, track a global variable separately from the value stored at its location.
Definition at line 48 of file CalledValuePropagation.cpp.
◆ INITIALIZE_PASS()
◆ runCVP()
Definition at line 371 of file CalledValuePropagation.cpp.
References C, llvm::canTrackArgumentsInterprocedurally(), F(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getCalledValue(), llvm::SparseSolver< LatticeKey, LatticeVal, KeyInfo >::getExistingValueState(), llvm::SparseSolver< LatticeKey, LatticeVal, KeyInfo >::MarkBlockExecutable(), llvm::LLVMContext::MD_callees, Register, llvm::Instruction::setMetadata(), and llvm::SparseSolver< LatticeKey, LatticeVal, KeyInfo >::Solve().
Referenced by llvm::CalledValuePropagationPass::run().
◆ MaxFunctionsPerValue
The maximum number of functions to track per lattice value.
Once the number of functions a call site can possibly target exceeds this threshold, it's lattice value becomes overdefined. The number of possible lattice values is bounded by Ch(F, M), where F is the number of functions in the module and M is MaxFunctionsPerValue. As such, this value should be kept very small. We likely can't do anything useful for call sites with a large number of possible targets, anyway.