summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/RewriteStatepointsForGC/base-pointers.ll
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2015-04-10 22:53:14 +0000
committerPhilip Reames <listmail@philipreames.com>2015-04-10 22:53:14 +0000
commitdf1ef08c0c6448dc51242d0ffc9fc0909d1306a4 (patch)
tree4a40d6f05aef3d58c6ac585aa3a83f2add01d629 /llvm/test/Transforms/RewriteStatepointsForGC/base-pointers.ll
parent704e78b14967c10e566c66fa061feba268da45c6 (diff)
downloadbcm5719-llvm-df1ef08c0c6448dc51242d0ffc9fc0909d1306a4.tar.gz
bcm5719-llvm-df1ef08c0c6448dc51242d0ffc9fc0909d1306a4.zip
[RewriteStatepointsForGC] Use an actual liveness algorithm
When rewriting statepoints to make relocations explicit, we need to have a conservative but consistent notion of where a particular pointer is live at a particular site. The old code just used dominance, which is correct, but decidedly more conservative then it needed to be. This patch implements a simple dataflow algorithm that's run one per function (well, twice counting fixup after base pointer insertion). There's still lots of room to make this faster, but it's fast enough for all practical purposes today. Differential Revision: http://reviews.llvm.org/D8674 llvm-svn: 234657
Diffstat (limited to 'llvm/test/Transforms/RewriteStatepointsForGC/base-pointers.ll')
-rw-r--r--llvm/test/Transforms/RewriteStatepointsForGC/base-pointers.ll4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/test/Transforms/RewriteStatepointsForGC/base-pointers.ll b/llvm/test/Transforms/RewriteStatepointsForGC/base-pointers.ll
index c5035eb3b1b..35c0b0e001b 100644
--- a/llvm/test/Transforms/RewriteStatepointsForGC/base-pointers.ll
+++ b/llvm/test/Transforms/RewriteStatepointsForGC/base-pointers.ll
@@ -76,7 +76,9 @@ loop: ; preds = %loop, %entry
; CHECK-LABEL: loop
; CHECK: %base_phi = phi i64 addrspace(1)*
; CHECK-DAG: [ %base_obj, %entry ]
-; CHECK-DAG: [ %base_select.relocated, %loop ]
+; Given the two selects are equivelent, so are their base phis - ideally,
+; we'd have commoned these, but that's a missed optimization, not correctness.
+; CHECK-DAG: [ [[DISCARD:%base_select.*.relocated]], %loop ]
; CHECK-NOT: base_phi2
; CHECK: next = select
; CHECK: base_select
OpenPOWER on IntegriCloud