[llvm-commits] [llvm][PATCH][Review Requested] Maintain live-ins for anti-dependency checking
Jakob Stoklund Olesen
stoklund at 2pi.dk
Mon Apr 16 11:16:26 PDT 2012
On Apr 16, 2012, at 10:38 AM, "Gurd, Preston" <preston.gurd at intel.com> wrote:
> If possible, it would be appreciated if this patch could be reviewed in time for inclusion in the llvm 3.1 release. We would have proposed this patch sooner, were it not for the fact that we have only just discovered the problem.
>
> This patch fixes a problem which arose when using the Post-RA scheduler on X86 Atom. Some of our tests failed because the tail merging part of the BranchFolding pass was creating new basic blocks which did not contain live-in information. When the anti-dependency code in the Post-RA scheduler ran, it would sometimes rename the register containing the function return value because the fact that the return value was live-in to the subsequent block had been lost. To fix this, it is necessary to run the RegisterScavenging code in the BranchFolding pass.
Hi Preston,
Please add an assertion to the PostRA scheduler that catches this problem. You can use the MRI->tracksLiveness() function to determine if live-ins are accurate.
Please enable this only for Atom. Other x86 sub-targets don't need the extra compile time and risk of scavenger assertions.
Please remove the call to TRI->requiresRegisterScavenging(), and fix the other targets to use your new hook instead.
Please rename the hook to something less specific to branch folding. For example, shouldTrackLivenessAfterRegAlloc().
/jakob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120416/5e0e4347/attachment.html>
More information about the llvm-commits
mailing list