diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-02-28 00:43:03 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-02-28 00:43:03 +0000 |
commit | fb8075d03f5c87bd57dcc9c5f2304f6b13c55aad (patch) | |
tree | c0823b1738e1ce2f7c6c219547f9f116d53074bf /include/llvm/CodeGen/MachineBasicBlock.h | |
parent | 41ce5b82da30b27d00993a2882cc52f427f6309c (diff) | |
download | external_llvm-fb8075d03f5c87bd57dcc9c5f2304f6b13c55aad.zip external_llvm-fb8075d03f5c87bd57dcc9c5f2304f6b13c55aad.tar.gz external_llvm-fb8075d03f5c87bd57dcc9c5f2304f6b13c55aad.tar.bz2 |
Add a quick and dirty "loop aligner pass". x86 uses it to align its loops to 16-byte boundaries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47703 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineBasicBlock.h')
-rw-r--r-- | include/llvm/CodeGen/MachineBasicBlock.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/MachineBasicBlock.h b/include/llvm/CodeGen/MachineBasicBlock.h index d2b1d5f..66de06d 100644 --- a/include/llvm/CodeGen/MachineBasicBlock.h +++ b/include/llvm/CodeGen/MachineBasicBlock.h @@ -75,6 +75,10 @@ class MachineBasicBlock { /// LiveIns - Keep track of the physical registers that are livein of /// the basicblock. std::vector<unsigned> LiveIns; + + /// Alignment - Alignment of the basic block. Zero if the basic block does + /// not need to be aligned. + unsigned Alignment; /// IsLandingPad - Indicate that this basic block is entered via an /// exception handler. @@ -82,7 +86,8 @@ class MachineBasicBlock { public: explicit MachineBasicBlock(const BasicBlock *bb = 0) - : Prev(0), Next(0), BB(bb), Number(-1), xParent(0), IsLandingPad(false) { + : Prev(0), Next(0), BB(bb), Number(-1), xParent(0), + Alignment(0), IsLandingPad(false) { Insts.parent = this; } @@ -181,6 +186,14 @@ public: const_livein_iterator livein_end() const { return LiveIns.end(); } bool livein_empty() const { return LiveIns.empty(); } + /// getAlignment - Return alignment of the basic block. + /// + unsigned getAlignment() const { return Alignment; } + + /// setAlignment - Set alignment of the basic block. + /// + void setAlignment(unsigned Align) { Alignment = Align; } + /// isLandingPad - Returns true if the block is a landing pad. That is /// this basic block is entered via an exception handler. bool isLandingPad() const { return IsLandingPad; } |