LLVM 20.0.0git
|
#include "llvm/Transforms/Utils/Evaluator.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Analysis/ConstantFolding.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/Constant.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/GlobalAlias.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/InstrTypes.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Operator.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/User.h"
#include "llvm/IR/Value.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "evaluator" |
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) |
#define DEBUG_TYPE "evaluator" |
Definition at line 40 of file Evaluator.cpp.
Definition at line 236 of file Evaluator.cpp.
References llvm::CallingConv::C.
Referenced by llvm::MachineIRBuilder::buildConstant(), 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(), llvm::TargetInstrInfo::mergeOutliningCandidateAttributes(), and llvm::CoroIdInst::setCoroutineSelf().
|
inlinestatic |
Definition at line 113 of file Evaluator.cpp.
References llvm::CallingConv::C, DL, llvm::SmallPtrSetImpl< PtrType >::insert(), and isSimpleEnoughValueToCommitHelper().
Referenced by isSimpleEnoughValueToCommitHelper().
|
static |
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 58 of file Evaluator.cpp.
References llvm::CallingConv::C, DL, and isSimpleEnoughValueToCommit().
Referenced by isSimpleEnoughValueToCommit().