diff options
author | Anna Thomas <anna@azul.com> | 2017-01-27 17:57:05 +0000 |
---|---|---|
committer | Anna Thomas <anna@azul.com> | 2017-01-27 17:57:05 +0000 |
commit | e7d865e34ee13b29ae2d2478de0297e5ba6a79bc (patch) | |
tree | cf12ee307cad38119c5465c89e2836884bddb652 /llvm/lib | |
parent | 2208a851012a2d0bc09a375972cbcc8248487766 (diff) | |
download | bcm5719-llvm-e7d865e34ee13b29ae2d2478de0297e5ba6a79bc.tar.gz bcm5719-llvm-e7d865e34ee13b29ae2d2478de0297e5ba6a79bc.zip |
NFC: Add debug tracing for more cases where loop unrolling fails.
llvm-svn: 293313
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopUnroll.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUnroll.cpp b/llvm/lib/Transforms/Utils/LoopUnroll.cpp index 5c3c94008d3..4fc7f410412 100644 --- a/llvm/lib/Transforms/Utils/LoopUnroll.cpp +++ b/llvm/lib/Transforms/Utils/LoopUnroll.cpp @@ -306,8 +306,10 @@ bool llvm::UnrollLoop(Loop *L, unsigned Count, unsigned TripCount, bool Force, Count = TripCount; // Don't enter the unroll code if there is nothing to do. - if (TripCount == 0 && Count < 2 && PeelCount == 0) + if (TripCount == 0 && Count < 2 && PeelCount == 0) { + DEBUG(dbgs() << "Won't unroll; almost nothing to do\n"); return false; + } assert(Count > 0); assert(TripMultiple > 0); @@ -362,8 +364,12 @@ bool llvm::UnrollLoop(Loop *L, unsigned Count, unsigned TripCount, bool Force, PreserveLCSSA)) { if (Force) RuntimeTripCount = false; - else + else { + DEBUG( + dbgs() << "Wont unroll; prolog and epilog code could not be inserted " + "when assuming runtime trip count\n"); return false; + } } // Notify ScalarEvolution that the loop will be substantially changed, |