[llvm-bugs] [Bug 28142] New: RegScavenger (as used by BranchFolding) pessimises liveness

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jun 15 08:13:50 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=28142

            Bug ID: 28142
           Summary: RegScavenger (as used by BranchFolding) pessimises
                    liveness
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Common Code Generator Code
          Assignee: unassignedbugs at nondot.org
          Reporter: ahmed.bougacha at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

This came up in http://reviews.llvm.org/D21085; on the original testcase:
  Looks like BranchFolding, when merging tails, indiscriminately marks every
register defined but not killed (it might really be live, but not necessarily)
before the tail as live-in the new tail block. It queries the
RegisterScavenger, which walks the original block forward, using kill flags;
maybe it should walk the tail block backward instead?

That patch adds forward liveness computation to X86FixupBWInsts (using flags,
via LivePhysRegs) as a stopgap.

Instead, seems like we should:
- teach RegScavenger to compute liveness backwards (or replace it with
something else)
- fix the various users; in this case, BranchFolding
- remove the X86FixupBWInsts workaround, and probably more

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160615/98a2561d/attachment-0001.html>


More information about the llvm-bugs mailing list