[PATCH] D11489: [RewriteStatepointsForGC] Handle extractelement fully in the base pointer algorithm
listmail at philipreames.com
Fri Jul 24 10:57:35 PDT 2015
reames created this revision.
reames added reviewers: sanjoy, igor-laevsky, pgavlin.
reames added a subscriber: llvm-commits.
When rewriting the IR such that base pointers are available for every live pointer, we potentially need to duplicate instructions to propagate the base. The original code had only handled PHI and Select under the belief those were the only instructions which would need duplicated. When I added support for vector instructions, I'd added a collection of hacks for ExtractElement which caught most of the common cases. Of course, I then found the one test case my hacks couldn't cover. :)
This change removes all of the early hacks for extract element. By defining extractelement as a BDV (rather than trying to look through it), we can extend the rewriting algorithm to duplicate the extract as needed.
Note that I'm removing several peephole optimizations which were possible with the old scheme, but hard to express with the new one. I plan on adding these back as a separate change since it'll need to be structured rather differently. I want to get the code correct first. :)
w.r.t. testing, this is mostly covered by existing tests (live-vector.ll). I've added a couple of new ones to show the failing case (test2 in base-vector.ll). With the removal of the early peepholes, the new code should be reasonably well tested by the existing tests.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 12624 bytes
Desc: not available
More information about the llvm-commits