1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

Disable tail duplication of call instructions. The cost

metric is way off for these in general, and this works around
buggy code like that in PR1764.  we'll see if there is a big
performance impact of this.  If so, I'll revert it tomorrow.

llvm-svn: 43668
This commit is contained in:
Chris Lattner 2007-11-04 06:37:55 +00:00
parent c289d4b13d
commit 493f83eeb1

View File

@ -115,6 +115,11 @@ bool TailDup::shouldEliminateUnconditionalBranch(TerminatorInst *TI) {
for (unsigned Size = 0; I != Dest->end(); ++I) {
if (Size == Threshold) return false; // The block is too large.
// Don't tail duplicate call instructions. They are very large compared to
// other instructions.
if (isa<CallInst>(I) || isa<InvokeInst>(I)) return false;
// Only count instructions that are not debugger intrinsics.
if (!isa<DbgInfoIntrinsic>(I)) ++Size;
}