[llvm-commits] [llvm] r124843 - /llvm/trunk/lib/CodeGen/TailDuplication.cpp

Evan Cheng evan.cheng at apple.com
Thu Feb 3 17:10:12 PST 2011


Author: evancheng
Date: Thu Feb  3 19:10:12 2011
New Revision: 124843

URL: http://llvm.org/viewvc/llvm-project?rev=124843&view=rev
Log:
Update comments.

Modified:
    llvm/trunk/lib/CodeGen/TailDuplication.cpp

Modified: llvm/trunk/lib/CodeGen/TailDuplication.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TailDuplication.cpp?rev=124843&r1=124842&r2=124843&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/TailDuplication.cpp (original)
+++ llvm/trunk/lib/CodeGen/TailDuplication.cpp Thu Feb  3 19:10:12 2011
@@ -504,8 +504,9 @@
     if (!I->isPHI() && !I->isDebugValue())
       InstrCount += 1;
   }
-  // Heuristically, don't tail-duplicate calls if it would expand code size,
-  // as it's less likely to be worth the extra cost.
+  // Don't tail-duplicate calls before register allocation. Calls presents a
+  // barrier to register allocation so duplicating them may end up increasing
+  // spills.
   if (InstrCount > 1 && (PreRegAlloc && HasCall))
     return false;
 





More information about the llvm-commits mailing list