[LLVMbugs] [Bug 6450] New: LiveIntervals code doesn't properly identify unspillable registers.
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Mar 1 07:46:20 PST 2010
http://llvm.org/bugs/show_bug.cgi?id=6450
Summary: LiveIntervals code doesn't properly identify
unspillable registers.
Product: new-bugs
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P5
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: mwb.cde at googlemail.com
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=4342)
--> (http://llvm.org/bugs/attachment.cgi?id=4342)
LiveInterval patch - add no_spill field
The spiller code in LiveIntervalAnalysis.cpp and Spiller.cpp asserts
when passed a register with infinite weight even if the register is a
valid choice for spilling.
Registers that can't be spilled, because they are generated by the
spiller for a register placed on the stack, are identified by setting
their interval weight to HUGE_VALF (== inf). This makes them
indistinguishable from normal registers that have infinite weight,
which can occur with deeply nested loops such as generated by the test
case for bug 5846.
The attached LiveIntervals patch adds boolean field no_spill to class
LiveInterval, to indicate whether the interval represents a spillable
register, and updates the spiller code to set and test the field. It
does not change the setting and testing of the interval weight except
to remove the assertions so this patch should not affect any existing
code. The patch has been tested for the CodeGen component.
The RegAllocLinScan patch is a partial, untested change to
RegAllocLinearScan to make use of the no_spill field when trying to
find a register to spill. It gets the test-case for bug 5846 to
compile but is only meant as an example of use and has not been
tested.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list