OSDN Git Service

[RewriteStatepointsForGC] Use an actual liveness algorithm
authorPhilip Reames <listmail@philipreames.com>
Fri, 10 Apr 2015 22:53:14 +0000 (22:53 +0000)
committerPhilip Reames <listmail@philipreames.com>
Fri, 10 Apr 2015 22:53:14 +0000 (22:53 +0000)
commitd92e9ef1705f8f78a7b67d6462953419559bc44c
tree296cb35ee2968e01eb63855875354f70236facbe
parent50baf8e89d4d44952c5b0b519d90e88a6a608b21
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234657 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
test/Transforms/RewriteStatepointsForGC/base-pointers.ll