[LLVMbugs] [Bug 8467] New: Unnecessary relaxation
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Oct 26 08:39:39 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=8467
Summary: Unnecessary relaxation
Product: libraries
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: X86
AssignedTo: unassignedbugs at nondot.org
ReportedBy: rafael.espindola at gmail.com
CC: llvmbugs at cs.uiuc.edu
In the following assembly, the last je is relaxed, but it doesn't need to be:
je .LBB0_25
je .LBB0_11
.zero 125, 0x90
.LBB0_25:
.zero 119, 0x90
.align 16, 0x90
.zero 7, 0x90
je .LBB0_25
In the first pass we don't relax the first jump as we think it is in range. The
second jump is relaxed. The address of LBB0_25 is then 133. The last jump will
be at address 263 and we relax it.
In the next pass we notice that we have to relax the first jump and LBB0_25
goes to address 137. The last jump is still at the same address, but now a
relaxation is not necessary.
Relaxation is a hard problem, but I think it is possible to do a bit better by
also estimating the maximum address a fragment can get to. This is low
priority.
--
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