LLVM
15.0.0git
|
#include "llvm/Transforms/Scalar/LowerConstantIntrinsics.h"
#include "llvm/ADT/PostOrderIterator.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/DomTreeUpdater.h"
#include "llvm/Analysis/GlobalsModRef.h"
#include "llvm/Analysis/InstructionSimplify.h"
#include "llvm/Analysis/MemoryBuiltins.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/PatternMatch.h"
#include "llvm/InitializePasses.h"
#include "llvm/Pass.h"
#include "llvm/Transforms/Scalar.h"
#include "llvm/Transforms/Utils/Local.h"
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "lower-is-constant-intrinsic" |
Functions | |
STATISTIC (IsConstantIntrinsicsHandled, "Number of 'is.constant' intrinsic calls handled") | |
STATISTIC (ObjectSizeIntrinsicsHandled, "Number of 'objectsize' intrinsic calls handled") | |
static Value * | lowerIsConstantIntrinsic (IntrinsicInst *II) |
static bool | replaceConditionalBranchesOnConstant (Instruction *II, Value *NewValue, DomTreeUpdater *DTU) |
static bool | lowerConstantIntrinsics (Function &F, const TargetLibraryInfo &TLI, DominatorTree *DT) |
INITIALIZE_PASS_BEGIN (LowerConstantIntrinsics, "lower-constant-intrinsics", "Lower constant intrinsics", false, false) INITIALIZE_PASS_END(LowerConstantIntrinsics | |
Variables | |
lower constant | intrinsics |
lower constant Lower constant | false |
Definition at line 38 of file LowerConstantIntrinsics.cpp.
INITIALIZE_PASS_BEGIN | ( | LowerConstantIntrinsics | , |
"lower-constant-intrinsics" | , | ||
"Lower constant intrinsics" | , | ||
false | , | ||
false | |||
) |
|
static |
Definition at line 97 of file LowerConstantIntrinsics.cpp.
References BB, DL, llvm::Optional< T >::emplace(), F, llvm::IntrinsicInst::getIntrinsicID(), llvm::Optional< T >::getPointer(), llvm::Optional< T >::hasValue(), I, llvm::DomTreeUpdater::Lazy, lowerIsConstantIntrinsic(), llvm::lowerObjectSizeCall(), llvm::removeUnreachableBlocks(), and replaceConditionalBranchesOnConstant().
Referenced by llvm::LowerConstantIntrinsicsPass::run().
|
static |
Definition at line 45 of file LowerConstantIntrinsics.cpp.
References llvm::ConstantInt::getFalse(), llvm::User::getOperand(), llvm::ConstantInt::getTrue(), and llvm::Value::getType().
Referenced by lowerConstantIntrinsics().
|
static |
Definition at line 52 of file LowerConstantIntrinsics.cpp.
References llvm::DomTreeUpdater::applyUpdates(), llvm::SetVector< T, SmallVector< T, N >, SmallDenseSet< T, N > >::begin(), llvm::BranchInst::Create(), llvm::DominatorTreeBase< BasicBlock, false >::Delete, llvm::SetVector< T, SmallVector< T, N >, SmallDenseSet< T, N > >::end(), llvm::Instruction::eraseFromParent(), llvm::User::getOperand(), llvm::Instruction::getParent(), llvm::BranchInst::getSuccessor(), llvm::BranchInst::isUnconditional(), llvm::PatternMatch::m_One(), llvm::PatternMatch::m_Zero(), llvm::PatternMatch::match(), Other, llvm::pred_empty(), llvm::replaceAndRecursivelySimplify(), and llvm::Sched::Source.
Referenced by lowerConstantIntrinsics().
STATISTIC | ( | IsConstantIntrinsicsHandled | , |
"Number of 'is.constant' intrinsic calls handled" | |||
) |
Definition at line 201 of file LowerConstantIntrinsics.cpp.
Definition at line 200 of file LowerConstantIntrinsics.cpp.