[LLVMbugs] [Bug 535] NEW: Register allocator should remove unnecessary copies
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Wed Mar 9 12:54:17 PST 2005
http://llvm.cs.uiuc.edu/bugs/show_bug.cgi?id=535
Summary: Register allocator should remove unnecessary copies
Product: libraries
Version: trunk
Platform: DEC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P2
Component: Register Allocator
AssignedTo: unassignedbugs at nondot.org
ReportedBy: alenhar2 at uiuc.edu
$29 is involved in 3 unnecessary copies.
llc -print-machineinstrs ex_spill.bc -march=alpha
# Machine code for foo():
(0x120fa8b50, LLVM BB @0x120fa3120):
%$16 = IDEF
%$29 = IDEF
%reg1025 = BIS %$29, %$29
%reg1026 = BIS %$16, %$16
%reg1027 = BIS %reg1026, %reg1026
%reg1028 = LOAD_IMM 5
%$29 = BIS %reg1025, %reg1025
STL_SYM %reg1028, <ga:MyVar>
%reg1029 = LOAD_IMM 12
%$29 = BIS %reg1025, %reg1025
STL_SYM %reg1029, <ga:MyVar2>
%reg1030 = LOAD_IMM 0
%$0 = BIS %reg1030, %reg1030
RETURN
# End machine code for foo().
# Machine code for foo():
(0x120fa8b50, LLVM BB @0x120fa3120):
%$16 = IDEF
%$29 = IDEF
%$0 = BIS %$29, %$29
%$1 = LOAD_IMM 5
%$29 = BIS %$0, %$0
STL_SYM %$1, <ga:MyVar>
%$1 = LOAD_IMM 12
%$29 = BIS %$0, %$0
STL_SYM %$1, <ga:MyVar2>
%$0 = LOAD_IMM 0
RETURN
# End machine code for foo().
Here is the .ll file:
%MyVar = uninitialized global int
%MyVar2 = uninitialized global int
implementation
int "foo"(int %blah)
begin
store int 5, int *%MyVar
store int 12, int* %MyVar2
ret int 0
end
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
More information about the llvm-bugs
mailing list