diff options
author | Chris Lattner <sabre@nondot.org> | 2004-11-22 17:18:36 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-11-22 17:18:36 +0000 |
commit | 6d048a0d32e8c527b46312a6da8cbc9496025984 (patch) | |
tree | 7675953da7819a6cf02f45046524f3bc0929f906 /llvm/lib/Transforms/Scalar/LoopUnroll.cpp | |
parent | a343a36713a03e85e332c0018288ea40cf400413 (diff) | |
download | bcm5719-llvm-6d048a0d32e8c527b46312a6da8cbc9496025984.tar.gz bcm5719-llvm-6d048a0d32e8c527b46312a6da8cbc9496025984.zip |
Do not consider debug intrinsics in the size computations for loop unrolling.
Patch contributed by Michael McCracken!
llvm-svn: 18108
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopUnroll.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LoopUnroll.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopUnroll.cpp b/llvm/lib/Transforms/Scalar/LoopUnroll.cpp index f87b2cae933..1b807873e6a 100644 --- a/llvm/lib/Transforms/Scalar/LoopUnroll.cpp +++ b/llvm/lib/Transforms/Scalar/LoopUnroll.cpp @@ -28,6 +28,7 @@ #include "llvm/Support/Debug.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/STLExtras.h" +#include "llvm/IntrinsicInst.h" #include <cstdio> #include <set> #include <algorithm> @@ -86,6 +87,8 @@ static unsigned ApproximateLoopSize(const Loop *L) { // Ignore PHI nodes in the header. } else if (I->hasOneUse() && I->use_back() == Term) { // Ignore instructions only used by the loop terminator. + } else if (DbgInfoIntrinsic *DbgI = dyn_cast<DbgInfoIntrinsic>(I)) { + // Ignore debug instructions } else { ++Size; } |