aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen/ScheduleDAGInstrs.h
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2012-03-07 23:01:09 +0000
committerAndrew Trick <atrick@apple.com>2012-03-07 23:01:09 +0000
commit7afcda0c582f57a46de32e88ad6c6d5b25d513ce (patch)
treed2860be1254e186aec0ee19ad7e0d92abdd071ed /include/llvm/CodeGen/ScheduleDAGInstrs.h
parented395c8c475692f5a43eb4b5c5562503d67616d0 (diff)
downloadexternal_llvm-7afcda0c582f57a46de32e88ad6c6d5b25d513ce.zip
external_llvm-7afcda0c582f57a46de32e88ad6c6d5b25d513ce.tar.gz
external_llvm-7afcda0c582f57a46de32e88ad6c6d5b25d513ce.tar.bz2
Cleanup VLIWPacketizer to use the updated ScheduleDAGInstrs interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152262 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/ScheduleDAGInstrs.h')
-rw-r--r--include/llvm/CodeGen/ScheduleDAGInstrs.h25
1 files changed, 13 insertions, 12 deletions
diff --git a/include/llvm/CodeGen/ScheduleDAGInstrs.h b/include/llvm/CodeGen/ScheduleDAGInstrs.h
index 5b1cbaa..4c6b74d 100644
--- a/include/llvm/CodeGen/ScheduleDAGInstrs.h
+++ b/include/llvm/CodeGen/ScheduleDAGInstrs.h
@@ -245,15 +245,16 @@ namespace llvm {
/// end - Return an iterator to the bottom of the current scheduling region.
MachineBasicBlock::iterator end() const { return End; }
- /// NewSUnit - Creates a new SUnit and return a ptr to it.
+ /// newSUnit - Creates a new SUnit and return a ptr to it.
SUnit *newSUnit(MachineInstr *MI);
+ /// getSUnit - Return an existing SUnit for this MI, or NULL.
+ SUnit *getSUnit(MachineInstr *MI) const;
+
/// startBlock - Prepare to perform scheduling in the given block.
- ///
virtual void startBlock(MachineBasicBlock *BB);
/// finishBlock - Clean up after scheduling in the given block.
- ///
virtual void finishBlock();
/// Initialize the scheduler state for the next scheduling region.
@@ -304,13 +305,6 @@ namespace llvm {
virtual std::string getDAGName() const;
protected:
- SUnit *getSUnit(MachineInstr *MI) const {
- DenseMap<MachineInstr*, SUnit*>::const_iterator I = MISUnitMap.find(MI);
- if (I == MISUnitMap.end())
- return 0;
- return I->second;
- }
-
void initSUnits();
void addPhysRegDataDeps(SUnit *SU, const MachineOperand &MO);
void addPhysRegDeps(SUnit *SU, unsigned OperIdx);
@@ -322,8 +316,7 @@ namespace llvm {
}
};
- /// NewSUnit - Creates a new SUnit and return a ptr to it.
- ///
+ /// newSUnit - Creates a new SUnit and return a ptr to it.
inline SUnit *ScheduleDAGInstrs::newSUnit(MachineInstr *MI) {
#ifndef NDEBUG
const SUnit *Addr = SUnits.empty() ? 0 : &SUnits[0];
@@ -334,6 +327,14 @@ namespace llvm {
SUnits.back().OrigNode = &SUnits.back();
return &SUnits.back();
}
+
+ /// getSUnit - Return an existing SUnit for this MI, or NULL.
+ inline SUnit *ScheduleDAGInstrs::getSUnit(MachineInstr *MI) const {
+ DenseMap<MachineInstr*, SUnit*>::const_iterator I = MISUnitMap.find(MI);
+ if (I == MISUnitMap.end())
+ return 0;
+ return I->second;
+ }
} // namespace llvm
#endif