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: unassignedb...@nondot.org
          Reporter: ahmed.bouga...@gmail.com
                CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to