LLVM: lib/Transforms/Utils/Evaluator.cpp File Reference (original) (raw)

Go to the source code of this file.

Functions
static bool isSimpleEnoughValueToCommit (Constant *C, SmallPtrSetImpl< Constant * > &SimpleConstants, const DataLayout &DL)
static bool isSimpleEnoughValueToCommitHelper (Constant *C, SmallPtrSetImpl< Constant * > &SimpleConstants, const DataLayout &DL)
Return true if the specified constant can be handled by the code generator.
static Function * getFunction (Constant *C)

DEBUG_TYPE

#define DEBUG_TYPE "evaluator"

getFunction()

Definition at line 235 of file Evaluator.cpp.

References llvm::CallingConv::C.

Referenced by llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildStepVector(), llvm::MachineIRBuilder::buildVScale(), llvm::CallGraphDOTInfo::CallGraphDOTInfo(), llvm::SampleProfileLoaderBaseImpl< FT >::emitCoverageRemarks(), llvm::SampleProfileLoaderBaseImpl< FT >::finalizeWeightPropagation(), llvm::Instruction::getFunction(), llvm::SampleProfileLoaderBaseImpl< FT >::getFunctionLoc(), llvm::SampleProfileLoaderBaseImpl< FT >::initWeightPropagation(), insertLifetimeMarkersSurroundingCall(), LLVMGetBlockAddressFunction(), LLVMGetNamedFunction(), LLVMGetNamedFunctionWithLength(), and llvm::TargetInstrInfo::mergeOutliningCandidateAttributes().

isSimpleEnoughValueToCommit()

isSimpleEnoughValueToCommitHelper()

Return true if the specified constant can be handled by the code generator.

We don't want to generate something like: void *X = &X/42; because the code generator doesn't have a relocation that can handle that.

This function should be called if C was not found (but just got inserted) in SimpleConstants to avoid having to rescan the same constants all the time.

Definition at line 57 of file Evaluator.cpp.

References llvm::CallingConv::C, DL, and isSimpleEnoughValueToCommit().

Referenced by isSimpleEnoughValueToCommit().