21#define DEBUG_TYPE "funclet-layout"
29 if (FuncletMembership.
empty())
33 auto FuncletX = FuncletMembership.
find(&
X);
34 auto FuncletY = FuncletMembership.
find(&
Y);
35 assert(FuncletX != FuncletMembership.
end());
36 assert(FuncletY != FuncletMembership.
end());
37 return FuncletX->second < FuncletY->second;
48 FuncletLayoutLegacy() : MachineFunctionPass(ID) {}
53 MachineFunctionProperties getRequiredProperties()
const override {
54 return MachineFunctionProperties().setNoVRegs();
59char FuncletLayoutLegacy::ID = 0;
62 "Contiguously Lay Out Funclets",
false,
false)
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static bool runFuncletLayout(MachineFunction &F)
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
static TableGen::Emitter::Opt Y("gen-skeleton-entry", EmitSkeleton, "Generate example skeleton entry")
iterator find(const_arg_type_t< KeyT > Val)
An RAII based helper class to modify MachineFunctionProperties when running pass.
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
A set of analyses that are preserved following a run of a transformation pass.
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
This is an optimization pass for GlobalISel generic memory operations.
AnalysisManager< MachineFunction > MachineFunctionAnalysisManager
LLVM_ABI PreservedAnalyses getMachineFunctionPassPreservedAnalyses()
Returns the minimum set of Analyses that all machine function passes must preserve.
LLVM_ABI char & FuncletLayoutID
This pass lays out funclets contiguously.
LLVM_ABI DenseMap< const MachineBasicBlock *, int > getEHScopeMembership(const MachineFunction &MF)