diff options
author | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2013-08-21 07:28:24 +0000 |
---|---|---|
committer | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2013-08-21 07:28:24 +0000 |
commit | aeb2bbcb6d4f13d0032d57fd1cb1a92da2acd01e (patch) | |
tree | 2a814f308ceb7554281744c88be3c4af2f47fee1 /include/llvm/MC/MCModule.h | |
parent | 46d353f8e8a2bbe02e8aa6a2292eae930dd3b7e6 (diff) | |
download | external_llvm-aeb2bbcb6d4f13d0032d57fd1cb1a92da2acd01e.tar.gz external_llvm-aeb2bbcb6d4f13d0032d57fd1cb1a92da2acd01e.tar.bz2 external_llvm-aeb2bbcb6d4f13d0032d57fd1cb1a92da2acd01e.zip |
MC CFG: Split MCBasicBlocks to mirror atom splitting.
When an MCTextAtom is split, all MCBasicBlocks backed by it are
automatically split, with a fallthrough between both blocks, and
the successors moved to the second block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188881 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC/MCModule.h')
-rw-r--r-- | include/llvm/MC/MCModule.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/llvm/MC/MCModule.h b/include/llvm/MC/MCModule.h index c0c242c21a..63635c7478 100644 --- a/include/llvm/MC/MCModule.h +++ b/include/llvm/MC/MCModule.h @@ -56,6 +56,21 @@ class MCModule { void map(MCAtom *NewAtom); /// @} + /// \name Basic block tracking + /// @{ + typedef std::vector<MCBasicBlock*> BBsByAtomTy; + BBsByAtomTy BBsByAtom; + + // For access to basic block > atom tracking. + friend class MCBasicBlock; + friend class MCTextAtom; + + /// \brief Keep track of \p BBBackedByAtom as being backed by \p Atom. + /// This is used to update succs/preds when \p Atom is split. + void trackBBForAtom(const MCTextAtom *Atom, MCBasicBlock *BBBackedByAtom); + void splitBasicBlocksForAtom(const MCTextAtom *TA, const MCTextAtom *NewTA); + /// @} + /// \name Function tracking /// @{ typedef std::vector<MCFunction*> FunctionListTy; |