diff options
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp | 6 | ||||
-rw-r--r-- | llvm/lib/CodeGen/InstrSched/SchedGraph.h | 20 | ||||
-rw-r--r-- | llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp | 2 |
3 files changed, 13 insertions, 15 deletions
diff --git a/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp b/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp index 6e6d14c7c89..edf84d4cadc 100644 --- a/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp +++ b/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp @@ -17,6 +17,7 @@ #include "llvm/Analysis/LiveVar/MethodLiveVarInfo.h" // FIXME: Remove when AnalysisUsage sets can be symbolic! #include "llvm/Target/TargetMachine.h" #include "llvm/BasicBlock.h" +#include "llvm/Instruction.h" #include "SchedPriorities.h" #include <ext/hash_set> #include <algorithm> @@ -1287,14 +1288,11 @@ ChooseInstructionsForDelaySlots(SchedulingManager& S, SchedGraph *graph) { const MachineInstrInfo& mii = S.getInstrInfo(); - const TerminatorInst *termInstr = bb->getTerminator(); + const Instruction *termInstr = (Instruction*)bb->getTerminator(); MachineCodeForInstruction &termMvec=MachineCodeForInstruction::get(termInstr); vector<SchedGraphNode*> delayNodeVec; const MachineInstr* brInstr = NULL; - assert(termInstr->getOpcode() != Instruction::Call - && "Call used as terminator?"); - if (termInstr->getOpcode() != Instruction::Ret) { // To find instructions that need delay slots without searching the full diff --git a/llvm/lib/CodeGen/InstrSched/SchedGraph.h b/llvm/lib/CodeGen/InstrSched/SchedGraph.h index 80355e49860..fb6087c44d9 100644 --- a/llvm/lib/CodeGen/InstrSched/SchedGraph.h +++ b/llvm/lib/CodeGen/InstrSched/SchedGraph.h @@ -391,13 +391,13 @@ private: // for <const SchedGraphNode, SchedGraphNode::const_iterator>. // template <class _NodeType, class _EdgeType, class _EdgeIter> -class PredIterator: public std::bidirectional_iterator<_NodeType, ptrdiff_t> { +class SGPredIterator: public std::bidirectional_iterator<_NodeType, ptrdiff_t> { protected: _EdgeIter oi; public: - typedef PredIterator<_NodeType, _EdgeType, _EdgeIter> _Self; + typedef SGPredIterator<_NodeType, _EdgeType, _EdgeIter> _Self; - inline PredIterator(_EdgeIter startEdge) : oi(startEdge) {} + inline SGPredIterator(_EdgeIter startEdge) : oi(startEdge) {} inline bool operator==(const _Self& x) const { return oi == x.oi; } inline bool operator!=(const _Self& x) const { return !operator==(x); } @@ -420,13 +420,13 @@ public: }; template <class _NodeType, class _EdgeType, class _EdgeIter> -class SuccIterator: public std::bidirectional_iterator<_NodeType, ptrdiff_t> { +class SGSuccIterator: public std::bidirectional_iterator<_NodeType, ptrdiff_t> { protected: _EdgeIter oi; public: - typedef SuccIterator<_NodeType, _EdgeType, _EdgeIter> _Self; + typedef SGSuccIterator<_NodeType, _EdgeType, _EdgeIter> _Self; - inline SuccIterator(_EdgeIter startEdge) : oi(startEdge) {} + inline SGSuccIterator(_EdgeIter startEdge) : oi(startEdge) {} inline bool operator==(const _Self& x) const { return oi == x.oi; } inline bool operator!=(const _Self& x) const { return !operator==(x); } @@ -451,9 +451,9 @@ public: // sg_pred_iterator // sg_pred_const_iterator // -typedef PredIterator<SchedGraphNode, SchedGraphEdge, SchedGraphNode::iterator> +typedef SGPredIterator<SchedGraphNode, SchedGraphEdge, SchedGraphNode::iterator> sg_pred_iterator; -typedef PredIterator<const SchedGraphNode, const SchedGraphEdge,SchedGraphNode::const_iterator> +typedef SGPredIterator<const SchedGraphNode, const SchedGraphEdge,SchedGraphNode::const_iterator> sg_pred_const_iterator; inline sg_pred_iterator pred_begin( SchedGraphNode *N) { @@ -474,9 +474,9 @@ inline sg_pred_const_iterator pred_end( const SchedGraphNode *N) { // sg_succ_iterator // sg_succ_const_iterator // -typedef SuccIterator<SchedGraphNode, SchedGraphEdge, SchedGraphNode::iterator> +typedef SGSuccIterator<SchedGraphNode, SchedGraphEdge, SchedGraphNode::iterator> sg_succ_iterator; -typedef SuccIterator<const SchedGraphNode, const SchedGraphEdge,SchedGraphNode::const_iterator> +typedef SGSuccIterator<const SchedGraphNode, const SchedGraphEdge,SchedGraphNode::const_iterator> sg_succ_const_iterator; inline sg_succ_iterator succ_begin( SchedGraphNode *N) { diff --git a/llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp b/llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp index cd0ca6645ac..af02e57616d 100644 --- a/llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp +++ b/llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp @@ -159,7 +159,7 @@ SelectInstructionsForMethod(Method* method, TargetMachine &target) void InsertPhiElimInst(BasicBlock *BB, MachineInstr *CpMI) { - TerminatorInst *TermInst = BB->getTerminator(); + Instruction *TermInst = (Instruction*)BB->getTerminator(); MachineCodeForInstruction &MC4Term = MachineCodeForInstruction::get(TermInst); MachineInstr *FirstMIOfTerm = *( MC4Term.begin() ); |