Go to the documentation of this file.
34 const std::string &Banner)
const {
41 if (
F.hasAvailableExternallyLinkage())
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 =
66 F.getParent()->shouldEmitInstrCountChangedRemark();
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);
This is an optimization pass for GlobalISel generic memory operations.
void print(raw_ostream &OS) const
Print the MachineFunctionProperties in human-readable form.
DISubprogram * getSubprogram() const
Get the attached subprogram.
unsigned getInstructionCount() const
Return the number of MachineInstrs in this MachineFunction.
The legacy pass manager's analysis pass to compute loop information.
Properties which a MachineFunction may have at a given point in time.
DiagnosticInfoOptimizationBase::Argument NV
raw_fd_ostream & errs()
This returns a reference to a raw_ostream for standard error.
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
const MachineBasicBlock & front() const
bool verifyRequiredProperties(const MachineFunctionProperties &V) const
Represent the analysis usage information of a pass.
const MachineFunctionProperties & getProperties() const
Get the function properties.
MachineFunctionProperties & set(Property P)
This class contains meta information specific to a module.
Legacy analysis pass which computes a DominatorTree.
This class implements an extremely fast bulk output stream that can only output to a stream.
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...
Legacy wrapper pass to provide the SCEVAAResult object.
Legacy wrapper pass to provide the BasicAAResult object.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
AnalysisUsage & addPreserved()
Add the specified Pass class to the set of analyses preserved by this pass.
MachineFunction & getOrCreateMachineFunction(Function &F)
Returns the MachineFunction constructed for the IR function F.
MachineFunctionProperties & reset(Property P)
static bool runOnFunction(Function &F, bool PostInlining)
Function & getFunction()
Return the LLVM function that this machine code represents.
A wrapper analysis pass for the legacy pass manager that exposes a MemoryDepnedenceResults instance.
Pass interface - Implemented by all 'passes'.
A wrapper pass to provide the legacy pass manager access to a suitably prepared AAResults object.
Legacy wrapper pass to provide the GlobalsAAResult object.
virtual void getAnalysisUsage(AnalysisUsage &) const
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
AnalysisUsage & addRequired()