24 #define DEBUG_TYPE "reset-machine-function"
26 STATISTIC(NumFunctionsReset,
"Number of functions reset");
32 bool EmitFallbackDiag;
34 bool AbortOnFailedISel;
38 ResetMachineFunction(
bool EmitFallbackDiag =
false,
39 bool AbortOnFailedISel =
false)
41 AbortOnFailedISel(AbortOnFailedISel) {}
43 StringRef getPassName()
const override {
return "ResetMachineFunction"; }
48 if (AbortOnFailedISel)
53 if (EmitFallbackDiag) {
68 "reset machine function if ISel failed",
false,
false)
72 bool AbortOnFailedISel = false) {
73 return new ResetMachineFunction(EmitFallbackDiag, AbortOnFailedISel);
Diagnostic information for ISel fallback path.
LLVMContext & getContext() const
getContext - Return a reference to the LLVMContext associated with this function. ...
STATISTIC(NumFunctions,"Total number of functions")
LLVM_ATTRIBUTE_NORETURN void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
bool hasProperty(Property P) const
INITIALIZE_PASS(ResetMachineFunction, DEBUG_TYPE,"reset machine function if ISel failed", false, false) MachineFunctionPass *llvm
const Function * getFunction() const
getFunction - Return the LLVM function that this machine code represents
MachineFunctionPass * createResetMachineFunctionPass(bool EmitFallbackDiag, bool AbortOnFailedISel)
This pass resets a MachineFunction when it has the FailedISel property as if it was just created...
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
const MachineFunctionProperties & getProperties() const
Get the function properties.
Function Alias Analysis false
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
void reset()
Reset the instance as if it was just created.
void diagnose(const DiagnosticInfo &DI)
Report a message to the currently installed diagnostic handler.
StringRef - Represent a constant reference to a string, i.e.
StringRef getName() const
getName - Return the name of the corresponding LLVM function.