diff options
author | Zhigang Gong <zhigang.gong@gmail.com> | 2014-05-22 08:42:03 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@gmail.com> | 2014-05-22 08:42:03 +0800 |
commit | edf9ed9f4dde690c73871a68b391468a07df85bc (patch) | |
tree | 2fe0d585aa076dad843cbe61c25928410906c9eb | |
parent | 9e1059dbce47fb911a60a15942584635a919a1f1 (diff) |
GBE: fix post scheduling bug.fixsched
Signed-off-by: Zhigang Gong <zhigang.gong@gmail.com>
-rw-r--r-- | backend/src/backend/gen_context.cpp | 3 | ||||
-rw-r--r-- | backend/src/backend/gen_insn_scheduling.cpp | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/backend/src/backend/gen_context.cpp b/backend/src/backend/gen_context.cpp index 87218de6..41f2db17 100644 --- a/backend/src/backend/gen_context.cpp +++ b/backend/src/backend/gen_context.cpp @@ -2000,8 +2000,7 @@ namespace gbe schedulePreRegAllocation(*this, *this->sel); if (UNLIKELY(ra->allocate(*this->sel) == false)) return false; - if (reservedSpillRegs == 0) - schedulePostRegAllocation(*this, *this->sel); + schedulePostRegAllocation(*this, *this->sel); if (OCL_OUTPUT_REG_ALLOC) ra->outputAllocation(); this->clearFlagRegister(); diff --git a/backend/src/backend/gen_insn_scheduling.cpp b/backend/src/backend/gen_insn_scheduling.cpp index bd0fb225..a06f9554 100644 --- a/backend/src/backend/gen_insn_scheduling.cpp +++ b/backend/src/backend/gen_insn_scheduling.cpp @@ -581,7 +581,9 @@ namespace gbe // Make labels and branches non-schedulable (i.e. they act as barriers) for (int32_t insnID = 0; insnID < insnNum; ++insnID) { ScheduleDAGNode *node = tracker.insnNodes[insnID]; - if (node->insn.isBranch() || node->insn.isLabel() || node->insn.opcode == SEL_OP_EOT || node->insn.opcode == SEL_OP_IF) + if (node->insn.isBranch() || node->insn.isLabel() + || node->insn.opcode == SEL_OP_EOT || node->insn.opcode == SEL_OP_IF + || node->insn.opcode == SEL_OP_BARRIER) tracker.makeBarrier(insnID, insnNum); } |