|
LLVM 23.0.0git
|
#include "MCTargetDesc/X86BaseInfo.h"#include "X86.h"#include "llvm/ADT/Statistic.h"#include "llvm/CodeGen/MachineBasicBlock.h"#include "llvm/CodeGen/MachineFunctionPass.h"#include "llvm/CodeGen/MachineInstrBuilder.h"#include "llvm/CodeGen/TargetFrameLowering.h"#include "llvm/CodeGen/TargetInstrInfo.h"#include "llvm/CodeGen/TargetSubtargetInfo.h"#include "llvm/IR/DiagnosticInfo.h"#include "llvm/IR/Module.h"Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "x86-wineh-unwindv2" |
Functions | |
| STATISTIC (MeetsUnwindV2Criteria, "Number of functions that meet Unwind v2 criteria") | |
| STATISTIC (FailsUnwindV2Criteria, "Number of functions that fail Unwind v2 criteria") | |
| INITIALIZE_PASS (X86WinEHUnwindV2Legacy, "x86-wineh-unwindv2", "Analyze and emit instructions for Win64 Unwind v2", false, false) FunctionPass *llvm | |
| DebugLoc | findDebugLoc (const MachineBasicBlock &MBB) |
| std::optional< FrameInfo > | runAnalysisOnFuncOrFunclet (MachineFunction &MF, MachineFunction::iterator &Iter, WinX64EHUnwindV2Mode Mode) |
| bool | runX86WinEHUnwindV2 (MachineFunction &MF) |
Variables | |
| static cl::opt< unsigned > | UnwindCodeThreshold ("x86-wineh-unwindv2-unwind-codes-threshold", cl::Hidden, cl::desc("Maximum number of unwind codes before " "splitting into a new unwind info."), cl::init(UINT8_MAX)) |
| static cl::opt< unsigned > | ForceMode ("x86-wineh-unwindv2-force-mode", cl::Hidden, cl::desc("Overwrites the Unwind v2 mode for testing purposes.")) |
| static cl::opt< unsigned > | InstructionCountThreshold ("x86-wineh-unwindv2-instruction-count-threshold", cl::Hidden, cl::desc("Maximum number of (approximate) instructions before splitting " "into a new unwind info."), cl::init(600)) |
| #define DEBUG_TYPE "x86-wineh-unwindv2" |
Definition at line 29 of file X86WinEHUnwindV2.cpp.
| DebugLoc findDebugLoc | ( | const MachineBasicBlock & | MBB | ) |
Definition at line 112 of file X86WinEHUnwindV2.cpp.
References llvm::DebugLoc::getUnknown(), MBB, and MI.
Referenced by runX86WinEHUnwindV2().
| INITIALIZE_PASS | ( | X86WinEHUnwindV2Legacy | , |
| "x86-wineh-unwindv2" | , | ||
| "Analyze and emit instructions for Win64 Unwind v2" | , | ||
| false | , | ||
| false | ) |
Definition at line 104 of file X86WinEHUnwindV2.cpp.
References llvm::createX86WinEHUnwindV2LegacyPass().
| std::optional< FrameInfo > runAnalysisOnFuncOrFunclet | ( | MachineFunction & | MF, |
| MachineFunction::iterator & | Iter, | ||
| WinX64EHUnwindV2Mode | Mode ) |
Definition at line 122 of file X86WinEHUnwindV2.cpp.
References assert(), llvm::MachineFunction::end(), llvm::TargetSubtargetInfo::getFrameLowering(), llvm::MachineFunction::getSubtarget(), llvm::TargetFrameLowering::hasFP(), llvm::is_contained(), llvm_unreachable, MBB, MI, Mode, llvm::SmallVectorTemplateBase< T, bool >::push_back(), Reg, and llvm::SmallVectorTemplateCommon< T, typename >::size().
Referenced by runX86WinEHUnwindV2().
| bool runX86WinEHUnwindV2 | ( | MachineFunction & | MF | ) |
Definition at line 375 of file X86WinEHUnwindV2.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineFunction::begin(), llvm::BuildMI(), llvm::Disabled, DL, llvm::SmallVectorTemplateCommon< T, typename >::empty(), llvm::MachineFunction::end(), findDebugLoc(), ForceMode, llvm::MachineBasicBlock::front(), llvm::MachineFunction::front(), llvm::MachineFunction::getFunction(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::GlobalValue::getParent(), llvm::MachineFunction::getSubtarget(), llvm::Module::getWinX64EHUnwindV2Mode(), InstructionCountThreshold, MBB, Mode, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::reverse(), runAnalysisOnFuncOrFunclet(), TII, and UnwindCodeThreshold.
Referenced by llvm::X86WinEHUnwindV2Pass::run().
| STATISTIC | ( | MeetsUnwindV2Criteria | , |
| "Number of functions that meet Unwind v2 criteria" | ) |
|
static |
Referenced by runX86WinEHUnwindV2().
|
static |
Referenced by runX86WinEHUnwindV2().
|
static |
Referenced by runX86WinEHUnwindV2().