llvm-6502/test
Evan Cheng 206d1856ad Added a linearscan register allocation optimization. When the register allocator spill an interval with multiple uses in the same basic block, it creates a different virtual register for each of the reloads. e.g.
%reg1498<def> = MOV32rm %reg1024, 1, %reg0, 12, %reg0, Mem:LD(4,4) [sunkaddr39 + 0]
        %reg1506<def> = MOV32rm %reg1024, 1, %reg0, 8, %reg0, Mem:LD(4,4) [sunkaddr42 + 0]
        %reg1486<def> = MOV32rr %reg1506
        %reg1486<def> = XOR32rr %reg1486, %reg1498, %EFLAGS<imp-def,dead>
        %reg1510<def> = MOV32rm %reg1024, 1, %reg0, 4, %reg0, Mem:LD(4,4) [sunkaddr45 + 0]

=>

        %reg1498<def> = MOV32rm %reg2036, 1, %reg0, 12, %reg0, Mem:LD(4,4) [sunkaddr39 + 0]
        %reg1506<def> = MOV32rm %reg2037, 1, %reg0, 8, %reg0, Mem:LD(4,4) [sunkaddr42 + 0]
        %reg1486<def> = MOV32rr %reg1506
        %reg1486<def> = XOR32rr %reg1486, %reg1498, %EFLAGS<imp-def,dead>
        %reg1510<def> = MOV32rm %reg2038, 1, %reg0, 4, %reg0, Mem:LD(4,4) [sunkaddr45 + 0]

From linearscan's point of view, each of reg2036, 2037, and 2038 are separate registers, each is "killed" after a single use. The reloaded register is available and it's often clobbered right away. e.g. In thise case reg1498 is allocated EAX while reg2036 is allocated RAX. This means we end up with multiple reloads from the same stack slot in the same basic block.

Now linearscan recognize there are other reloads from same SS in the same BB. So it'll "downgrade" RAX (and its aliases) after reg2036 is allocated until the next reload (reg2037) is done. This greatly increase the likihood reloads from SS are reused.

This speeds up sha1 from OpenSSL by 5.8%. It is also an across the board win for SPEC2000 and 2006.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69585 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-20 08:01:12 +00:00
..
Analysis change this to test for an alias result more directly. 2009-03-16 18:28:27 +00:00
Archive
Assembler Fix a bug in our autoupgrade support: in an argument list to a function 2009-03-25 06:36:36 +00:00
Bindings/Ocaml tweak this to accept asmprinter changes. I have no way to verify this, hopefully 2009-03-01 01:28:40 +00:00
Bitcode fix a bitcode reader bug where it can't handle extractelement correctly: 2009-02-03 02:11:28 +00:00
BugPoint Re-commit r67334 and r67349 with fix. 2009-03-21 18:12:24 +00:00
CodeGen Added a linearscan register allocation optimization. When the register allocator spill an interval with multiple uses in the same basic block, it creates a different virtual register for each of the reloads. e.g. 2009-04-20 08:01:12 +00:00
DebugInfo Global variables don't have a corresponding llvm.dbg.declare, yet it is possible 2009-03-10 13:41:26 +00:00
ExecutionEngine remove a testcase that depends on -debug existing. 2009-03-13 20:31:25 +00:00
Feature Add support for embedded metadata to LLVM. This introduces two new types of 2009-04-04 07:22:01 +00:00
FrontendAda Adjust this test for recent sroa improvements. 2009-03-12 11:56:12 +00:00
FrontendC Add a __builtin___memset_chk test. 2009-03-27 02:45:14 +00:00
FrontendC++ These tests pass on linux. 2009-03-25 16:43:59 +00:00
FrontendFortran Testcase for PR2437. 2009-02-09 09:41:49 +00:00
FrontendObjC Check for alignment. 2009-04-15 04:51:05 +00:00
FrontendObjC++ This is an objective-c test, not an objective-c++ one. 2008-10-06 18:42:48 +00:00
Integer Converted a1.ll to unittests. 2009-03-24 21:36:09 +00:00
lib Re-commit r67334 and r67349 with fix. 2009-03-21 18:12:24 +00:00
Linker Reimplement the old and horrible bison parser for .ll files with a nice 2009-01-02 07:01:27 +00:00
LLVMC Add a comment. 2009-03-06 17:59:58 +00:00
Other Update call graph after inlining invoke. 2009-03-31 17:36:12 +00:00
Scripts
TableGen add support for a few simple escape characters in tblgen strings. 2009-03-13 21:03:27 +00:00
Transforms Another testcase for IV shortening. 2009-04-16 00:45:21 +00:00
Verifier Reimplement the old and horrible bison parser for .ll files with a nice 2009-01-02 07:01:27 +00:00
Makefile Re-commit r67334 and r67349 with fix. 2009-03-21 18:12:24 +00:00
Makefile.tests
TestRunner.sh Fix a bashism in TestRunner.sh. 2008-07-28 18:41:03 +00:00