|
LLVM 24.0.0git
|
#include "llvm/CodeGen/PreISelIntrinsicLowering.h"#include "llvm/ADT/STLExtras.h"#include "llvm/Analysis/AssumptionCache.h"#include "llvm/Analysis/ObjCARCInstKind.h"#include "llvm/Analysis/ObjCARCUtil.h"#include "llvm/Analysis/TargetLibraryInfo.h"#include "llvm/Analysis/TargetTransformInfo.h"#include "llvm/Analysis/ValueTracking.h"#include "llvm/CodeGen/ExpandVectorPredication.h"#include "llvm/CodeGen/LibcallLoweringInfo.h"#include "llvm/CodeGen/Passes.h"#include "llvm/CodeGen/RuntimeLibcallUtil.h"#include "llvm/CodeGen/TargetLowering.h"#include "llvm/CodeGen/TargetPassConfig.h"#include "llvm/IR/ConstantRange.h"#include "llvm/IR/Function.h"#include "llvm/IR/GlobalValue.h"#include "llvm/IR/IRBuilder.h"#include "llvm/IR/Instructions.h"#include "llvm/IR/IntrinsicInst.h"#include "llvm/IR/Metadata.h"#include "llvm/IR/Module.h"#include "llvm/IR/ProfDataUtils.h"#include "llvm/IR/RuntimeLibcalls.h"#include "llvm/IR/Type.h"#include "llvm/IR/Use.h"#include "llvm/InitializePasses.h"#include "llvm/Pass.h"#include "llvm/Support/Casting.h"#include "llvm/Target/TargetMachine.h"#include "llvm/Transforms/Scalar/LowerConstantIntrinsics.h"#include "llvm/Transforms/Utils/BasicBlockUtils.h"#include "llvm/Transforms/Utils/LowerMemIntrinsics.h"#include "llvm/Transforms/Utils/LowerVectorIntrinsics.h"#include "llvm/IR/VPIntrinsics.def"Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "pre-isel-intrinsic-lowering" |
| #define | BEGIN_REGISTER_VP_INTRINSIC(VPID, MASKPOS, VLENPOS) |
Variables | |
| static cl::opt< int64_t > | MemIntrinsicExpandSizeThresholdOpt ("mem-intrinsic-expand-size", cl::desc("Set minimum mem intrinsic size to expand in IR"), cl::init(-1), cl::Hidden) |
| Threshold to leave statically sized memory intrinsic calls. | |
| static cl::opt< uint64_t > | BoundedMemSetInlineSizeOpt ("bounded-memset-inline-size", cl::desc("Set maximum bound of a variable-length memset to expand inline"), cl::Hidden) |
| Maximum bound of a memset with non-constant length for it to be expanded inline. | |
| pre isel intrinsic | lowering |
| pre isel intrinsic Pre ISel Intrinsic | Lowering |
| pre isel intrinsic Pre ISel Intrinsic | false |
| #define BEGIN_REGISTER_VP_INTRINSIC | ( | VPID, | |
| MASKPOS, | |||
| VLENPOS ) |
| #define DEBUG_TYPE "pre-isel-intrinsic-lowering" |
Definition at line 51 of file PreISelIntrinsicLowering.cpp.
|
static |
Definition at line 280 of file PreISelIntrinsicLowering.cpp.
References F, llvm::getLibcallLowering(), llvm::TargetMachine::getSubtargetImpl(), and Lowering.
|
static |
Definition at line 289 of file PreISelIntrinsicLowering.cpp.
References F, llvm::getLibcallLowering(), llvm::TargetMachine::getSubtargetImpl(), and Lowering.
Definition at line 678 of file PreISelIntrinsicLowering.cpp.
References Call, llvm::cast(), DEBUG_TYPE, llvm::getExplicitlyUnknownBranchWeightsIfProfiled(), llvm::make_early_inc_range(), llvm::SplitBlockAndInsertIfThen(), and llvm::Value::users().
Definition at line 692 of file PreISelIntrinsicLowering.cpp.
References B(), Call, llvm::cast(), Cond, llvm::dyn_cast(), llvm::ConstantInt::getFalse(), llvm::ConstantInt::getTrue(), I, llvm::make_early_inc_range(), llvm::predecessors(), and llvm::Value::users().
Definition at line 607 of file PreISelIntrinsicLowering.cpp.
References Call, llvm::cast(), llvm::GlobalAlias::create(), llvm::dyn_cast(), llvm::SmallPtrSetImplBase::empty(), llvm::GlobalValue::ExternalLinkage, llvm::PointerType::get(), getDeactivationSymbol(), llvm::Type::getInt64Ty(), llvm::Type::getInt8Ty(), llvm::ConstantExpr::getIntToPtr(), llvm::User::getOperand(), llvm::GlobalValue::getParent(), llvm::GlobalValue::HiddenVisibility, llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::make_early_inc_range(), llvm::reportFatalUsageError(), llvm::User::setOperand(), and llvm::Value::users().
Definition at line 567 of file PreISelIntrinsicLowering.cpp.
References assert(), B(), Call, llvm::cast(), llvm::StringRef::contains(), llvm::dyn_cast(), F, llvm::FunctionType::get(), getDeactivationSymbol(), llvm::Type::getInt64Ty(), llvm::Function::getIntrinsicID(), llvm::GlobalValue::getParent(), llvm::Attribute::getValueAsString(), llvm::InnerAnalysisManagerProxy< AnalysisManagerT, IRUnitT, ExtraArgTs... >::Key, llvm::Triple::isArm64e(), llvm::Attribute::isValid(), llvm::make_early_inc_range(), and llvm::Value::users().
Definition at line 105 of file PreISelIntrinsicLowering.cpp.
References Changed, llvm::dyn_cast(), T, llvm::Value::use_begin(), and llvm::Value::use_empty().
Referenced by lowerCanLoadSpeculatively().
|
static |
Definition at line 561 of file PreISelIntrinsicLowering.cpp.
References Call, llvm::cast(), and llvm::LLVMContext::OB_deactivation_symbol.
Referenced by expandProtectedFieldPtr(), expandPtrauthForEmuPAC(), and llvm::sandboxir::ConstantPtrAuth::getDeactivationSymbol().
|
static |
Definition at line 342 of file PreISelIntrinsicLowering.cpp.
References C(), DL, llvm::dyn_cast(), llvm::ArrayType::get(), llvm::ConstantArray::get(), llvm::Instruction::getDataLayout(), llvm::Type::getPointerAddressSpace(), llvm::MemIntrinsicBase< Derived >::getRawDest(), llvm::Value::getType(), llvm::MemSetBase< BaseCL >::getValue(), llvm::isa(), llvm::RTLIB::RuntimeLibcallsInfo::isAvailable(), llvm::isPowerOf2_64(), llvm::Size, uint64_t, and V.
|
static |
Definition at line 177 of file PreISelIntrinsicLowering.cpp.
References F, llvm::objcarc::GetFunctionClass(), llvm::objcarc::IsAlwaysTail(), llvm::objcarc::IsNeverTail(), llvm::CallInst::TCK_None, llvm::CallInst::TCK_NoTail, and llvm::CallInst::TCK_Tail.
Referenced by lowerObjCCall().
| INITIALIZE_PASS_BEGIN | ( | PreISelIntrinsicLoweringLegacyPass | , |
| "pre-isel-intrinsic-lowering" | , | ||
| "Pre-ISel Intrinsic Lowering" | , | ||
| false | , | ||
| false | ) |
References INITIALIZE_PASS_DEPENDENCY, and INITIALIZE_PASS_END.
|
static |
Lower @llvm.can.load.speculatively using target-specific expansion.
Targets may provide their own expansion via TargetLowering::emitCanLoadSpeculatively; the default expansion conservatively returns false.
Definition at line 157 of file PreISelIntrinsicLowering.cpp.
References llvm::Instruction::eraseFromParent(), F, forEachCall(), llvm::CallBase::getArgOperand(), llvm::Instruction::getFunction(), llvm::TargetMachine::getSubtargetImpl(), llvm::TargetSubtargetInfo::getTargetLowering(), llvm::Value::replaceAllUsesWith(), and TLI.
Definition at line 126 of file PreISelIntrinsicLowering.cpp.
References B(), Changed, llvm::dyn_cast(), F, llvm::Type::getInt32Ty(), and llvm::make_early_inc_range().
Definition at line 186 of file PreISelIntrinsicLowering.cpp.
References llvm::CallBase::addParamAttr(), assert(), llvm::cast(), llvm::dyn_cast(), F, llvm::objcarc::getAttachedARCFunction(), llvm::FunctionCallee::getCallee(), llvm::RTLIB::RuntimeLibcallsInfo::getLibcallImplName(), getOverridingTailCallKind(), llvm::make_early_inc_range(), llvm::IntrinsicInst::mayLowerToFunctionCall(), llvm::Value::setName(), setNonLazyBind(), and llvm::CallInst::setTailCallKind().
|
static |
Maximum bound of a memset with non-constant length for it to be expanded inline.
Overrides TargetTransformInfo::getMaxBoundedMemSetInlineSize.
| pre isel intrinsic Pre ISel Intrinsic false |
Definition at line 1001 of file PreISelIntrinsicLowering.cpp.
| pre isel intrinsic Pre ISel Intrinsic Lowering |
Definition at line 1001 of file PreISelIntrinsicLowering.cpp.
Referenced by canEmitLibcall(), canEmitMemcpy(), EnsureStackAlignment(), and llvm::PreISelIntrinsicLoweringPass::run().
| pre isel intrinsic lowering |
Definition at line 1000 of file PreISelIntrinsicLowering.cpp.
|
static |
Threshold to leave statically sized memory intrinsic calls.
Calls of known size larger than this will be expanded by the pass. Calls of unknown or lower size will be left for expansion in codegen.