[PATCH] D12608: [RewriteStatepointsForGC] Strengthen invariants around BDVs

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 3 14:20:54 PDT 2015

reames created this revision.
reames added a reviewer: sanjoy.
reames added a subscriber: llvm-commits.

As a first step towards a new implementation of the base pointer inference algorithm, introduce an abstraction for BDVs, strengthen the assertions around them, and rewrite the BDV relation code in terms of the abstraction which includes an explicit notion of whether the BDV is also a base.  The later is motivated by the fact we had a bug where insertelement was always assumed to be a base pointer even though the BDV code knew it wasn't.  The strengthened assertions in this patch would have caught that bug.

The next step will be to separate the DefiningValueMap into a BDV use list cache (entirely within findBasePointers) and a base pointer cache.  Having the former will allow me to use a deterministic visit order when visiting BDVs in the inference algorithm and remove a bunch of ordering related hacks.  Before actually doing the last step, I'm likely going to extend the lattice with a 'BaseN' (seen only base inputs) state so that I can kill the post process optimization step.  



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12608.33973.patch
Type: text/x-patch
Size: 10990 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150903/cda68159/attachment.bin>

More information about the llvm-commits mailing list