LLVM: lib/Target/WebAssembly/WebAssemblySortRegion.cpp Source File (original) (raw)
4
5using namespace llvm;
6using namespace WebAssembly;
7
8namespace llvm {
9namespace WebAssembly {
10template <>
12 return true;
13}
14}
15}
16
20 if ( && !WE)
21 return nullptr;
22
23
24
25
26
27
28
29 if ((ML && !WE) || (ML && WE && WE->contains(ML->getHeader()))) {
30
31 if (LoopMap.count(ML))
32 return LoopMap[ML].get();
33 LoopMap[ML] = std::make_unique<ConcreteSortRegion>(ML);
34 return LoopMap[ML].get();
35 } else {
36
37 if (ExceptionMap.count(WE))
38 return ExceptionMap[WE].get();
39 ExceptionMap[WE] =
40 std::make_unique<ConcreteSortRegion>(WE);
41 return ExceptionMap[WE].get();
42 }
43}
44
46 if (R->isLoop())
48 else
50}
51
56 Bottom = MBB;
57
58
59
60
61
62
66 Bottom = ExBottom;
67 }
68 }
69 return Bottom;
70}
71
76 Bottom = MBB;
77 return Bottom;
78}
This file implements WebAssemblyException information analysis.
This file implements regions used in CFGSort and CFGStackify.
LoopT * getLoopFor(const BlockT *BB) const
Return the inner most loop that BB lives in.
bool isEHPad() const
Returns true if the block is a landing pad.
int getNumber() const
MachineBasicBlocks are uniquely numbered at the function level, unless they're not in a MachineFuncti...
WebAssemblyException * getExceptionFor(const MachineBasicBlock *MBB) const
iterator_range< block_iterator > blocks() const
MachineBasicBlock * getHeader() const
bool isLoop() const override
const SortRegion * getRegionFor(const MachineBasicBlock *MBB)
MachineBasicBlock * getBottom(const SortRegion *R)
This is an optimization pass for GlobalISel generic memory operations.
decltype(auto) get(const PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info > &Pair)