From: Chad Rosier Date: Tue, 1 Jul 2014 17:23:11 +0000 (+0000) Subject: Revert "MachineScheduler: better book-keeping for asserts." X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f575a737518d44febcae48206f2cddf3c8935a67;p=platform%2Fupstream%2Fllvm.git Revert "MachineScheduler: better book-keeping for asserts." This reverts commit r212088, which is causing a number of spec failures. Will provide reduced test cases shortly. PR20057 llvm-svn: 212109 --- diff --git a/llvm/lib/CodeGen/MachineScheduler.cpp b/llvm/lib/CodeGen/MachineScheduler.cpp index 5b5b3f3..8365330 100644 --- a/llvm/lib/CodeGen/MachineScheduler.cpp +++ b/llvm/lib/CodeGen/MachineScheduler.cpp @@ -1690,7 +1690,7 @@ bool SchedBoundary::checkHazard(SUnit *SU) { unsigned NRCycle = getNextResourceCycle(PI->ProcResourceIdx, PI->Cycles); if (NRCycle > CurrCycle) { #ifndef NDEBUG - MaxObservedStall = std::max(PI->Cycles, MaxObservedStall); + MaxObservedStall = std::max(NRCycle - CurrCycle, MaxObservedStall); #endif DEBUG(dbgs() << " SU(" << SU->NodeNum << ") " << SchedModel->getResourceName(PI->ProcResourceIdx) @@ -1954,12 +1954,10 @@ void SchedBoundary::bumpNode(SUnit *SU) { PE = SchedModel->getWriteProcResEnd(SC); PI != PE; ++PI) { unsigned PIdx = PI->ProcResourceIdx; if (SchedModel->getProcResource(PIdx)->BufferSize == 0) { - if (isTop()) { - ReservedCycles[PIdx] = - std::max(getNextResourceCycle(PIdx, 0), NextCycle + PI->Cycles); - } - else - ReservedCycles[PIdx] = NextCycle; + ReservedCycles[PIdx] = isTop() ? NextCycle + PI->Cycles : NextCycle; +#ifndef NDEBUG + MaxObservedStall = std::max(PI->Cycles, MaxObservedStall); +#endif } } } diff --git a/llvm/test/CodeGen/AArch64/arm64-misched-basic-A53.ll b/llvm/test/CodeGen/AArch64/arm64-misched-basic-A53.ll index bc7ed7f..a03d36b 100644 --- a/llvm/test/CodeGen/AArch64/arm64-misched-basic-A53.ll +++ b/llvm/test/CodeGen/AArch64/arm64-misched-basic-A53.ll @@ -172,32 +172,3 @@ entry: } declare void @llvm.trap() - -; Regression test for PR20057: "permanent hazard"' -; Resource contention on LDST. -; CHECK: ********** MI Scheduling ********** -; CHECK: testLdStConflict -; CHECK: *** Final schedule for BB#1 *** -; CHECK: LD4Fourv2d -; CHECK: STRQui -; CHECK: ********** INTERVALS ********** -define void @testLdStConflict() { -entry: - br label %loop - -loop: - %0 = call { <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64> } @llvm.aarch64.neon.ld4.v2i64.p0i8(i8* null) - %ptr = bitcast i8* undef to <2 x i64>* - store <2 x i64> zeroinitializer, <2 x i64>* %ptr, align 4 - %ptr1 = bitcast i8* undef to <2 x i64>* - store <2 x i64> zeroinitializer, <2 x i64>* %ptr1, align 4 - %ptr2 = bitcast i8* undef to <2 x i64>* - store <2 x i64> zeroinitializer, <2 x i64>* %ptr2, align 4 - %ptr3 = bitcast i8* undef to <2 x i64>* - store <2 x i64> zeroinitializer, <2 x i64>* %ptr3, align 4 - %ptr4 = bitcast i8* undef to <2 x i64>* - store <2 x i64> zeroinitializer, <2 x i64>* %ptr4, align 4 - br label %loop -} - -declare { <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64> } @llvm.aarch64.neon.ld4.v2i64.p0i8(i8*)