summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorAnna Thomas <anna@azul.com>2017-01-27 17:57:05 +0000
committerAnna Thomas <anna@azul.com>2017-01-27 17:57:05 +0000
commite7d865e34ee13b29ae2d2478de0297e5ba6a79bc (patch)
treecf12ee307cad38119c5465c89e2836884bddb652 /llvm/lib
parent2208a851012a2d0bc09a375972cbcc8248487766 (diff)
downloadbcm5719-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.cpp10
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,
OpenPOWER on IntegriCloud