32 struct LowerWidenableConditionLegacyPass :
public FunctionPass {
48 if (!WCDecl || WCDecl->use_empty())
54 if (
match(&
I, m_Intrinsic<Intrinsic::experimental_widenable_condition>()))
60 for (
auto *CI : ToLower) {
62 CI->eraseFromParent();
73 "Lower the widenable condition to default true value",
false,
77 return new LowerWidenableConditionLegacyPass();
Pass interface - Implemented by all 'passes'.
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
This class represents lattice values for constants.
void push_back(const T &Elt)
bool match(Val *V, const Pattern &P)
StringRef getName(ID id)
Return the LLVM name for an intrinsic, such as "llvm.ppc.altivec.lvx".
static bool lowerWidenableCondition(Function &F)
void initializeLowerWidenableConditionLegacyPassPass(PassRegistry &)
static PreservedAnalyses none()
Convenience factory function for the empty preserved set.
static bool runOnFunction(Function &F, bool PostInlining)
A set of analyses that are preserved following a run of a transformation pass.
FunctionPass class - This class is used to implement most global optimizations.
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
Module.h This file contains the declarations for the Module class.
Pass * createLowerWidenableConditionPass()
static ConstantInt * getTrue(LLVMContext &Context)
Function * getFunction(StringRef Name) const
Look up the specified function in the module symbol table.
LLVM_NODISCARD bool empty() const
Module * getParent()
Get the module that this global value is contained inside of...
inst_range instructions(Function *F)
A container for analyses that lazily runs them and caches their results.
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
INITIALIZE_PASS(LowerWidenableConditionLegacyPass, "lower-widenable-condition", "Lower the widenable condition to default true value", false, false) Pass *llvm