Go to the documentation of this file.
14 #ifndef LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYEXCEPTIONINFO_H
15 #define LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYEXCEPTIONINFO_H
23 class MachineDominatorTree;
24 class MachineDominanceFrontier;
46 std::vector<std::unique_ptr<WebAssemblyException>> SubExceptions;
47 std::vector<MachineBasicBlock *> Blocks;
75 Blocks.push_back(
MBB);
89 const std::vector<std::unique_ptr<WebAssemblyException>> &
112 CurException; CurException = CurException->ParentException)
121 raw_ostream &
operator<<(raw_ostream &OS,
const WebAssemblyException &WE);
126 std::vector<std::unique_ptr<WebAssemblyException>> TopLevelExceptions;
149 bool empty()
const {
return TopLevelExceptions.empty(); }
154 return BBMap.lookup(
MBB);
167 assert(!WE->getParentException() &&
"Not a top level exception!");
168 TopLevelExceptions.push_back(
std::move(WE));
unsigned getExceptionDepth() const
This is an optimization pass for GlobalISel generic memory operations.
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
bool erase(PtrType Ptr)
erase - If the set contains the specified pointer, remove it and return true, otherwise return false.
void recalculate(MachineFunction &MF, MachineDominatorTree &MDT, const MachineDominanceFrontier &MDF)
void print(raw_ostream &OS, unsigned Depth=0) const
void reverseBlock(unsigned From=0)
bool contains(const MachineBasicBlock *MBB) const
WebAssemblyExceptionInfo & operator=(const WebAssemblyExceptionInfo &)=delete
std::vector< std::unique_ptr< WebAssemblyException > > & getSubExceptions()
WebAssemblyException * getParentException() const
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
auto reverse(ContainerTy &&C, std::enable_if_t< has_rbegin< ContainerTy >::value > *=nullptr)
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements.
WebAssemblyExceptionInfo()
const_pointer const_iterator
void addToBlocksSet(MachineBasicBlock *MBB)
unsigned getNumBlocks() const
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
Represent the analysis usage information of a pass.
~WebAssemblyExceptionInfo() override
This class implements an extremely fast bulk output stream that can only output to a stream.
raw_ostream & operator<<(raw_ostream &OS, const APFixedPoint &FX)
void initializeWebAssemblyExceptionInfoPass(PassRegistry &)
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
bool contains(const WebAssemblyException *WE) const
MachineBasicBlock * getEHPad() const
const std::vector< std::unique_ptr< WebAssemblyException > > & getSubExceptions() const
void addBlock(MachineBasicBlock *MBB)
static GCRegistry::Add< StatepointGC > D("statepoint-example", "an example strategy for statepoint")
void removeFromBlocksSet(MachineBasicBlock *MBB)
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
block_iterator block_end() const
void changeExceptionFor(const MachineBasicBlock *MBB, WebAssemblyException *WE)
MachineBasicBlock * getHeader() const
WebAssemblyException(MachineBasicBlock *EHPad)
typename ArrayRef< MachineBasicBlock * >::const_iterator block_iterator
bool runOnMachineFunction(MachineFunction &) override
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformat...
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
const WebAssemblyException & operator=(const WebAssemblyException &)=delete
void releaseMemory() override
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memo...
A Module instance is used to store all the information related to an LLVM module.
void addTopLevelException(std::unique_ptr< WebAssemblyException > WE)
size_type count(ConstPtrType Ptr) const
count - Return 1 if the specified pointer is in the set, 0 otherwise.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
void setParentException(WebAssemblyException *WE)
iterator_range< block_iterator > blocks() const
WebAssemblyException * getExceptionFor(const MachineBasicBlock *MBB) const
std::vector< MachineBasicBlock * > & getBlocksVector()
void addSubException(std::unique_ptr< WebAssemblyException > E)
block_iterator block_begin() const
A range adaptor for a pair of iterators.
A templated base class for SmallPtrSet which provides the typesafe interface that is common across al...
void reserveBlocks(unsigned Size)
BlockVerifier::State From
void addToBlocksVector(MachineBasicBlock *MBB)
DominatorTree Class - Concrete subclass of DominatorTreeBase that is used to compute a normal dominat...
ArrayRef< MachineBasicBlock * > getBlocks() const
void print(raw_ostream &OS, const Module *M=nullptr) const override
print - Print out the internal state of the pass.
typename decltype(SubExceptions)::const_iterator iterator
SmallPtrSetImpl< MachineBasicBlock * > & getBlocksSet()
std::pair< iterator, bool > insert(PtrType Ptr)
Inserts Ptr if and only if there is no element in the container equal to Ptr.