[llvm] r325529 - [Coroutines] Move debug statement before assert

Brian Gesiak via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 19 12:50:09 PST 2018


Author: modocache
Date: Mon Feb 19 12:50:09 2018
New Revision: 325529

URL: http://llvm.org/viewvc/llvm-project?rev=325529&view=rev
Log:
[Coroutines] Move debug statement before assert

Summary:
Move a debug statement to above where an assertion is hit, so that the debug
statement can be inspected before a stack trace.

Test Plan: `check-llvm`


Modified:
    llvm/trunk/lib/Transforms/Coroutines/CoroFrame.cpp

Modified: llvm/trunk/lib/Transforms/Coroutines/CoroFrame.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Coroutines/CoroFrame.cpp?rev=325529&r1=325528&r2=325529&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Coroutines/CoroFrame.cpp (original)
+++ llvm/trunk/lib/Transforms/Coroutines/CoroFrame.cpp Mon Feb 19 12:50:09 2018
@@ -739,6 +739,8 @@ static void moveSpillUsesAfterCoroBegin(
     for (User *U : CurrentValue->users()) {
       Instruction *I = cast<Instruction>(U);
       if (!DT.dominates(CoroBegin, I)) {
+        DEBUG(dbgs() << "will move: " << *I << "\n");
+
         // TODO: Make this more robust. Currently if we run into a situation
         // where simple instruction move won't work we panic and
         // report_fatal_error.
@@ -748,7 +750,6 @@ static void moveSpillUsesAfterCoroBegin(
                                " dominated by CoroBegin");
         }
 
-        DEBUG(dbgs() << "will move: " << *I << "\n");
         NeedsMoving.push_back(I);
       }
     }




More information about the llvm-commits mailing list