34 const std::string &Banner)
const {
51 errs() <<
"MachineFunctionProperties required by " << getPassName()
52 <<
" pass are not met by function " << F.
getName() <<
".\n" 53 <<
"Required properties: ";
54 RequiredProperties.print(
errs());
55 errs() <<
"\nCurrent properties: ";
62 unsigned CountBefore, CountAfter;
65 bool ShouldEmitSizeRemarks =
70 if (ShouldEmitSizeRemarks)
73 bool RV = runOnMachineFunction(MF);
75 if (ShouldEmitSizeRemarks) {
79 if (CountBefore != CountAfter) {
82 int64_t Delta =
static_cast<int64_t
>(CountAfter) -
83 static_cast<int64_t>(CountBefore);
87 R <<
NV(
"Pass", getPassName())
88 <<
": Function: " <<
NV(
"Function", F.
getName()) <<
": " 89 <<
"MI Instruction count changed from " 90 <<
NV(
"MIInstrsBefore", CountBefore) <<
" to " 91 <<
NV(
"MIInstrsAfter", CountAfter)
92 <<
"; Delta: " <<
NV(
"Delta", Delta);
98 MFProps.
set(SetProperties);
99 MFProps.
reset(ClearedProperties);
Legacy wrapper pass to provide the GlobalsAAResult object.
Pass interface - Implemented by all 'passes'.
unsigned getInstructionCount() const
Return the number of MachineInstrs in this MachineFunction.
AnalysisUsage & addPreserved()
Add the specified Pass class to the set of analyses preserved by this pass.
raw_ostream & errs()
This returns a reference to a raw_ostream for standard error.
DiagnosticInfoOptimizationBase::Argument NV
This class represents lattice values for constants.
MachineFunctionProperties & reset(Property P)
This is the interface for a simple mod/ref and alias analysis over globals.
const MachineFunctionProperties & getProperties() const
Get the function properties.
bool hasAvailableExternallyLinkage() const
AnalysisUsage & addRequired()
void print(raw_ostream &OS) const
Print the MachineFunctionProperties in human-readable form.
This is the interface for a SCEV-based alias analysis.
virtual void getAnalysisUsage(AnalysisUsage &) const
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
static bool runOnFunction(Function &F, bool PostInlining)
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
DISubprogram * getSubprogram() const
Get the attached subprogram.
bool shouldEmitInstrCountChangedRemark()
Return true if size-info optimization remark is enabled, false otherwise.
bool verifyRequiredProperties(const MachineFunctionProperties &V) const
Represent the analysis usage information of a pass.
const MachineBasicBlock & front() const
MachineFunction & getOrCreateMachineFunction(const Function &F)
Returns the MachineFunction constructed for the IR function F.
A wrapper analysis pass for the legacy pass manager that exposes a MemoryDepnedenceResults instance...
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Legacy wrapper pass to provide the SCEVAAResult object.
MachineFunctionPass * createMachineFunctionPrinterPass(raw_ostream &OS, const std::string &Banner="")
MachineFunctionPrinter pass - This pass prints out the machine function to the given stream as a debu...
const Function & getFunction() const
Return the LLVM function that this machine code represents.
MachineFunctionProperties & set(Property P)
StringRef getName() const
Return a constant reference to the value's name.
Module * getParent()
Get the module that this global value is contained inside of...
This class implements an extremely fast bulk output stream that can only output to a stream...
The legacy pass manager's analysis pass to compute loop information.
This is the interface for LLVM's primary stateless and local alias analysis.
Legacy analysis pass which computes a DominatorTree.
A wrapper pass to provide the legacy pass manager access to a suitably prepared AAResults object...
Properties which a MachineFunction may have at a given point in time.
This class contains meta information specific to a module.
Legacy wrapper pass to provide the BasicAAResult object.