diff options
author | Andrew Trick <atrick@apple.com> | 2012-04-20 20:05:21 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2012-04-20 20:05:21 +0000 |
commit | 918f38ab2420bbdc350a6ec8c6ba6b09e37126b2 (patch) | |
tree | b5f71cd331a4e0e99b8e9f96d7bfe1df1ce6bde1 /lib/CodeGen/ScheduleDAGInstrs.cpp | |
parent | d4786e221c679fced994993d9ee7228572d4b148 (diff) | |
download | llvm-918f38ab2420bbdc350a6ec8c6ba6b09e37126b2.tar.gz llvm-918f38ab2420bbdc350a6ec8c6ba6b09e37126b2.tar.bz2 llvm-918f38ab2420bbdc350a6ec8c6ba6b09e37126b2.tar.xz |
misched: initialize BB
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155226 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/ScheduleDAGInstrs.cpp')
-rw-r--r-- | lib/CodeGen/ScheduleDAGInstrs.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/CodeGen/ScheduleDAGInstrs.cpp b/lib/CodeGen/ScheduleDAGInstrs.cpp index d46eb896e5..ae49b05858 100644 --- a/lib/CodeGen/ScheduleDAGInstrs.cpp +++ b/lib/CodeGen/ScheduleDAGInstrs.cpp @@ -126,7 +126,8 @@ static const Value *getUnderlyingObjectForInstr(const MachineInstr *MI, return 0; } -void ScheduleDAGInstrs::startBlock(MachineBasicBlock *BB) { +void ScheduleDAGInstrs::startBlock(MachineBasicBlock *bb) { + BB = bb; LoopRegs.Deps.clear(); if (MachineLoop *ML = MLI.getLoopFor(BB)) if (BB == ML->getLoopLatch()) @@ -134,6 +135,7 @@ void ScheduleDAGInstrs::startBlock(MachineBasicBlock *BB) { } void ScheduleDAGInstrs::finishBlock() { + BB = 0; // Nothing to do. } @@ -159,7 +161,7 @@ void ScheduleDAGInstrs::enterRegion(MachineBasicBlock *bb, MachineBasicBlock::iterator begin, MachineBasicBlock::iterator end, unsigned endcount) { - BB = bb; + assert(bb == BB && "startBlock should set BB"); RegionBegin = begin; RegionEnd = end; EndIndex = endcount; |