Go to the documentation of this file.
21 #ifndef LLVM_ANALYSIS_DEMANDEDBITS_H
22 #define LLVM_ANALYSIS_DEMANDEDBITS_H
33 class AssumptionCache;
43 F(
F), AC(AC), DT(DT) {}
82 void performAnalysis();
83 void determineLiveOperandBits(
const Instruction *UserI,
84 const Value *Val,
unsigned OperandNo,
92 bool Analyzed =
false;
152 #endif // LLVM_ANALYSIS_DEMANDEDBITS_H
A set of analyses that are preserved following a run of a transformation pass.
This is an optimization pass for GlobalISel generic memory operations.
A CRTP mix-in to automatically provide informational APIs needed for passes.
Printer pass for DemandedBits.
Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree.
An analysis that produces DemandedBits for a function.
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements.
bool runOnFunction(Function &F) override
runOnFunction - Virtual method overriden by subclasses to do the per-function processing of the pass.
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
Represent the analysis usage information of a pass.
void print(raw_ostream &OS, const Module *M) const override
print - Print out the internal state of the pass.
FunctionPass * createDemandedBitsWrapperPass()
Create a demanded bits analysis pass.
This class implements an extremely fast bulk output stream that can only output to a stream.
void print(raw_ostream &OS)
static APInt determineLiveOperandBitsSub(unsigned OperandNo, const APInt &AOut, const KnownBits &LHS, const KnownBits &RHS)
Compute alive bits of one subtraction operand from alive output and known operand bits.
A special type used by analysis passes to provide an address that identifies that particular analysis...
DemandedBits(Function &F, AssumptionCache &AC, DominatorTree &DT)
A Module instance is used to store all the information related to an LLVM module.
A CRTP mix-in that provides informational APIs needed for analysis passes.
Class for arbitrary precision integers.
A cache of @llvm.assume calls within a function.
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
bool isInstructionDead(Instruction *I)
Return true if, during analysis, I could not be reached.
static APInt determineLiveOperandBitsAdd(unsigned OperandNo, const APInt &AOut, const KnownBits &LHS, const KnownBits &RHS)
Compute alive bits of one addition operand from alive output and known operand bits.
DemandedBitsWrapperPass()
void releaseMemory() override
Clean up memory in between runs.
APInt getDemandedBits(Instruction *I)
Return the bits demanded from instruction I.
DemandedBits & getDemandedBits()
bool isUseDead(Use *U)
Return whether this use is dead by means of not having any demanded bits.
A container for analyses that lazily runs them and caches their results.
FunctionPass class - This class is used to implement most global optimizations.
DemandedBits run(Function &F, FunctionAnalysisManager &AM)
Run the analysis pass over a function and produce demanded bits information.
LLVM Value Representation.
DemandedBitsPrinterPass(raw_ostream &OS)
A Use represents the edge between a Value definition and its users.