|
LLVM 24.0.0git
|
This file implements a pass that will conditionally reset a machine function as if it was just created. More...
#include "llvm/CodeGen/ResetMachineFunctionPass.h"#include "llvm/ADT/ScopeExit.h"#include "llvm/ADT/Statistic.h"#include "llvm/CodeGen/MachineFunction.h"#include "llvm/CodeGen/MachineFunctionPass.h"#include "llvm/CodeGen/MachineRegisterInfo.h"#include "llvm/CodeGen/Passes.h"#include "llvm/CodeGen/StackProtector.h"#include "llvm/IR/DiagnosticInfo.h"#include "llvm/InitializePasses.h"#include "llvm/Support/Debug.h"#include "llvm/Target/TargetMachine.h"Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "reset-machine-function" |
Functions | |
| STATISTIC (NumFunctionsReset, "Number of functions reset") | |
| STATISTIC (NumFunctionsVisited, "Number of functions visited") | |
| static bool | runImpl (MachineFunction &MF, bool EmitFallbackDiag, bool AbortOnFailedISel) |
| INITIALIZE_PASS (ResetMachineFunctionLegacy, DEBUG_TYPE, "Reset machine function if ISel failed", false, false) MachineFunctionPass *llvm | |
This file implements a pass that will conditionally reset a machine function as if it was just created.
This is used to provide a fallback mechanism when GlobalISel fails, thus the condition for the reset to happen is that the MachineFunction has the FailedISel property.
Definition in file ResetMachineFunctionPass.cpp.
| #define DEBUG_TYPE "reset-machine-function" |
Definition at line 29 of file ResetMachineFunctionPass.cpp.
| INITIALIZE_PASS | ( | ResetMachineFunctionLegacy | , |
| DEBUG_TYPE | , | ||
| "Reset machine function if ISel failed" | , | ||
| false | , | ||
| false | ) |
Definition at line 104 of file ResetMachineFunctionPass.cpp.
References llvm::createResetMachineFunctionLegacyPass(), and DEBUG_TYPE.
|
static |
Definition at line 34 of file ResetMachineFunctionPass.cpp.
References llvm::MachineRegisterInfo::clearVirtRegTypes(), llvm::dbgs(), llvm::MachineFunction::empty(), F, llvm::MachineFunction::getFunction(), llvm::MachineFunction::getName(), llvm::MachineFunction::getProperties(), llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getSubtarget(), llvm::MachineFunction::getTarget(), llvm::MachineFunction::initTargetMachineFunctionInfo(), LLVM_DEBUG, llvm::TargetMachine::registerMachineRegisterInfoCallback(), llvm::report_fatal_error(), llvm::MachineFunction::reset(), and llvm::MachineFunctionProperties::resetToInitial().
| STATISTIC | ( | NumFunctionsReset | , |
| "Number of functions reset" | ) |
| STATISTIC | ( | NumFunctionsVisited | , |
| "Number of functions visited" | ) |