- Apr 20, 2009
-
-
Evan Cheng authored
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. llvm-svn: 69585
-
- Apr 19, 2009
-
-
Duncan Sands authored
bigger than the vector element type, turn checking of the operand type back on again, appropriately adjusted. llvm-svn: 69516
-
- Apr 18, 2009
-
-
Chris Lattner authored
patch by Jakob Stoklund Olesen! llvm-svn: 69472
-
Duncan Sands authored
type as the vector element type: allow them to be of a wider integer type than the element type all the way through the system, and not just as far as LegalizeDAG. This should be safe because it used to be this way (the old type legalizer would produce such nodes), so backends should be able to handle it. In fact only targets which have legal vector types with an illegal promoted element type will ever see this (eg: <4 x i16> on ppc). This fixes a regression with the new type legalizer (vec_splat.ll). Also, treat SCALAR_TO_VECTOR the same as BUILD_VECTOR. After all, it is just a special case of BUILD_VECTOR. llvm-svn: 69467
-
Evan Cheng authored
Add a new LiveInterval::overlaps(). It checks if the live interval overlaps a range specified by [Start, End). llvm-svn: 69434
-
Dale Johannesen authored
my earlier patch to this code only fixed half of it. llvm-svn: 69408
-
- Apr 17, 2009
-
-
Evan Cheng authored
register is available and when it's profitable. e.g. xorq %r12<kill>, %r13 addq %rax, -184(%rbp) addq %r13, -184(%rbp) ==> xorq %r12<kill>, %r13 movq -184(%rbp), %r12 addq %rax, %r12 addq %r13, %r12 movq %r12, -184(%rbp) Two more instructions, but fewer memory accesses. It can also open up opportunities for more optimizations. llvm-svn: 69341
-
- Apr 16, 2009
-
-
Dan Gohman authored
add dependencies on nodes with exactly one successor which is a COPY_TO_REGCLASS node. In the case that the copy is coalesced away, the dependence should be on the user of the copy, rather than the copy itself. llvm-svn: 69309
-
Dan Gohman authored
as INSERT_SUBREG instructions in the list-burr scheduler. llvm-svn: 69308
-
Devang Patel authored
Do not treat beginning of inlined scope as beginning of normal function scope if the location info is missing. Insetad of doing ... if (inlined_subroutine && known_location) DW_TAG_inline_subroutine else DW_TAG_subprogram do if (inlined_subroutine) { if (known_location) DW_TAG_inline_subroutine } else { DW_TAG_subprogram } llvm-svn: 69300
-
Devang Patel authored
This line was accidently lost yesterday. llvm-svn: 69286
-
Devang Patel authored
This code could use some refactoring help! llvm-svn: 69254
-
Devang Patel authored
If FastISel is run and it has known DebugLoc then use it. llvm-svn: 69253
-
Devang Patel authored
If location where the function was inlined is not know then do not emit debug info describing inlinied region. llvm-svn: 69252
-
- Apr 15, 2009
-
-
Devang Patel authored
llvm-svn: 69216
-
Devang Patel authored
This fixes test/CodeGen//2009-01-21-invalid-debug-info.m test case. llvm-svn: 69210
-
Dan Gohman authored
to support replacing a node with another that has a superset of the result types. Use this instead of calling ReplaceAllUsesOfValueWith for each value. llvm-svn: 69209
-
Devang Patel authored
llvm-svn: 69202
-
Dan Gohman authored
variadic operands correctly. Patch by Jakob Stoklund Olesen! llvm-svn: 69190
-
Dan Gohman authored
llvm-svn: 69126
-
Dan Gohman authored
llvm-svn: 69125
-
Dan Gohman authored
code out of line. llvm-svn: 69124
-
Devang Patel authored
Construct and emit DW_TAG_inlined_subroutine DIEs for inlined subroutine scopes (only in FastISel mode). llvm-svn: 69116
-
Dan Gohman authored
operator is used by a CopyToReg to export the value to a different block, don't reuse the CopyToReg's register for the subreg operation result if the register isn't precisely the right class for the subreg operation. Also, rename the h-registers.ll test, now that there are more than one. llvm-svn: 69087
-
- Apr 14, 2009
-
-
Dale Johannesen authored
memory and aren't volatile. This was interfering with good scheduling. llvm-svn: 69008
-
Evan Cheng authored
Fix PR3934 part 2. findOnlyInterestingUse() was not setting IsCopy and IsDstPhys which are returned by value and used by callee. This happened to work on the earlier test cases because of a logic error in the caller side. llvm-svn: 69006
-
Daniel Dunbar authored
llvm-svn: 68998
-
Bob Wilson authored
promoted to legal types without changing the type of the vector. This is following a suggestion from Duncan (http://lists.cs.uiuc.edu/pipermail/llvmdev/2009-February/019923.html). The transformation that used to be done during type legalization is now postponed to DAG legalization. This allows the BUILD_VECTORs to be optimized and potentially handled specially by target-specific code. It turns out that this is also consistent with an optimization done by the DAG combiner: a BUILD_VECTOR and INSERT_VECTOR_ELT may be combined by replacing one of the BUILD_VECTOR operands with the newly inserted element; but INSERT_VECTOR_ELT allows its scalar operand to be larger than the element type, with any extra high bits being implicitly truncated. The result is a BUILD_VECTOR where one of the operands has a type larger the the vector element type. Any code that operates on BUILD_VECTORs may now need to be aware of the potential type discrepancy between the vector element type and the BUILD_VECTOR operands. This patch updates all of the places that I could find to handle that case. llvm-svn: 68996
-
- Apr 13, 2009
-
-
Dan Gohman authored
it accordingly. Thanks to Jakob Stoklund Olesen for pointing out how this might be useful. llvm-svn: 68986
-
Bob Wilson authored
llvm-svn: 68981
-
Evan Cheng authored
llvm-svn: 68979
-
Devang Patel authored
Right now, Debugging information to encode scopes (DW_TAG_lexical_block) relies on DBG_LABEL. Unfortunately this intefers with the quality of optimized code. This patch updates dwarf writer to encode scoping information in DWARF only in FastISel mode. llvm-svn: 68973
-
Devang Patel authored
Reapply 68847. Now debug_inlined section is covered by TAI->doesDwarfUsesInlineInfoSection(), which is false by default. llvm-svn: 68964
-
Dan Gohman authored
This will be used to replace things like X86's MOV32to32_. Enhance ScheduleDAGSDNodesEmit to be more flexible and robust in the presense of subregister superclasses and subclasses. It can now cope with the definition of a virtual register being in a subclass of a use. Re-introduce the code for recording register superreg classes and subreg classes. This is needed because when subreg extracts and inserts get coalesced away, the virtual registers are left in the correct subclass. llvm-svn: 68961
-
Dan Gohman authored
a live interval. This is needed for some upcoming subreg changes. llvm-svn: 68956
-
Dan Gohman authored
the subreg field to 0, since the subreg field is only used for virtual register subregs. This doesn't change current functionality; it just eliminates bogus noise from debug output. llvm-svn: 68955
-
Dan Gohman authored
llvm-svn: 68953
-
Chris Lattner authored
to support C99 inline, GNU extern inline, etc. Related bugzilla's include PR3517, PR3100, & PR2933. Nothing uses this yet, but it appears to work. llvm-svn: 68940
-
- Apr 12, 2009
-
-
Chris Lattner authored
copying into the right register, avoiding a copy. llvm-svn: 68889
-
Chris Lattner authored
and make it return the assigned register. llvm-svn: 68888
-