http://llvm.org/bugs/show_bug.cgi?id=18883
Bug ID: 18883
Summary: Possible bug in MachineScheduler tryPressure
Product: new-bugs
Version: trunk
Hardware: Macintosh
OS: MacOS X
Status: NEW
Keywords: code-quality
Severity: normal
Priority: P
Component: new bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
I've been working on an out-of-tree target for which register pressure
reduction is critical. Sometime between the 3.3 and 3.4 releases something
changed in MachineScheduler which caused my target to generate poor instruction
schedules. It's also still present on the trunk so far as I can see.
I believe that the problem may lie in static function tryPressure() in
MachineScheduler.cpp with the code whose comment starts:
// If one candidate decreases and the other increases, go with it.
If I understood correctly, if one candidate has UnitInc<0 and the other has
UnitInc>=0 then pick the candidate with UnitInc<0 because it reduces register
pressure. If that's the case, then should the call be to tryGreater(), in order
to pick the candidate for which UnitInc<0 has value 1, rather than tryLess()
which will pick the candidate for which is has value 0?
I can't easily supply a test case because I see this problem on my target,
which only has a few registers, but it might take quite a bit of work to make
it happen on other targets.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs