Implement smarter algorithm for choosing which blocks to tail-merge.

See test/CodeGen/X86/test-pic-jtbl.ll for a case where it works well;
shaves another 10K off our favorite benchmark.  I was hesitant about
this because of compile speed, but seems to do OK on a bootstrap.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37392 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dale Johannesen
2007-06-01 23:02:45 +00:00
parent e770787be1
commit a5a2117a46
2 changed files with 45 additions and 31 deletions

View File

@@ -2,10 +2,9 @@
; RUN: -o %t -f
; RUN: grep _GLOBAL_OFFSET_TABLE_ %t
; RUN: grep piclabel %t | wc -l | grep 3
; RUN: grep PLT %t | wc -l | grep 11
; RUN: grep PLT %t | wc -l | grep 6
; RUN: grep GOTOFF %t | wc -l | grep 1
; RUN: grep JTI %t | wc -l | grep 13
; Improved tail merging could reduce the number of PLT's and JTI's further.
; RUN: grep JTI %t | wc -l | grep 8
define void @bar(i32 %n.u) {
entry: