summaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen/MachineBasicBlock.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/CodeGen/MachineBasicBlock.h')
-rw-r--r--include/llvm/CodeGen/MachineBasicBlock.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/include/llvm/CodeGen/MachineBasicBlock.h b/include/llvm/CodeGen/MachineBasicBlock.h
index 619894c..5e5f45c 100644
--- a/include/llvm/CodeGen/MachineBasicBlock.h
+++ b/include/llvm/CodeGen/MachineBasicBlock.h
@@ -461,16 +461,27 @@ public:
/// instruction of this basic block. If a terminator does not exist,
/// it returns end()
iterator getFirstTerminator();
- const_iterator getFirstTerminator() const;
+ const_iterator getFirstTerminator() const {
+ return const_cast<MachineBasicBlock *>(this)->getFirstTerminator();
+ }
/// getFirstInstrTerminator - Same getFirstTerminator but it ignores bundles
/// and return an instr_iterator instead.
instr_iterator getFirstInstrTerminator();
+ /// getFirstNonDebugInstr - returns an iterator to the first non-debug
+ /// instruction in the basic block, or end()
+ iterator getFirstNonDebugInstr();
+ const_iterator getFirstNonDebugInstr() const {
+ return const_cast<MachineBasicBlock *>(this)->getFirstNonDebugInstr();
+ }
+
/// getLastNonDebugInstr - returns an iterator to the last non-debug
/// instruction in the basic block, or end()
iterator getLastNonDebugInstr();
- const_iterator getLastNonDebugInstr() const;
+ const_iterator getLastNonDebugInstr() const {
+ return const_cast<MachineBasicBlock *>(this)->getLastNonDebugInstr();
+ }
/// SplitCriticalEdge - Split the critical edge from this block to the
/// given successor block, and return the newly created block, or null
@@ -649,6 +660,8 @@ public:
// Debugging methods.
void dump() const;
void print(raw_ostream &OS, SlotIndexes* = nullptr) const;
+ void print(raw_ostream &OS, ModuleSlotTracker &MST,
+ SlotIndexes * = nullptr) const;
// Printing method used by LoopInfo.
void printAsOperand(raw_ostream &OS, bool PrintType = true) const;
@@ -801,6 +814,6 @@ public:
MachineBasicBlock::iterator getInitial() { return I; }
};
-} // namespace llvm
+} // End llvm namespace
#endif
OpenPOWER on IntegriCloud