From: Devang Patel Date: Mon, 17 Mar 2008 23:41:20 +0000 (+0000) Subject: Update heuritics that estimates cost of call instructions. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b176038f989d98ac9f5f1dc2b52b6ef1723b2b78;p=oota-llvm.git Update heuritics that estimates cost of call instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48474 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/LoopUnroll.cpp b/lib/Transforms/Scalar/LoopUnroll.cpp index ff8ece2aa8c..71a5955b76b 100644 --- a/lib/Transforms/Scalar/LoopUnroll.cpp +++ b/lib/Transforms/Scalar/LoopUnroll.cpp @@ -100,6 +100,11 @@ static unsigned ApproximateLoopSize(const Loop *L) { // Ignore instructions only used by the loop terminator. } else if (isa(I)) { // Ignore debug instructions + } else if (isa(I)) { + if (isa(I)) + Size = Size + 3; + else + Size = Size + 10; } else { ++Size; }