Skip to content
  1. Mar 13, 2009
    • Evan Cheng's avatar
      Fix some significant problems with constant pools that resulted in unnecessary... · 1fb8aedd
      Evan Cheng authored
      Fix some significant problems with constant pools that resulted in unnecessary paddings between constant pool entries, larger than necessary alignments (e.g. 8 byte alignment for .literal4 sections), and potentially other issues.
      
      1. ConstantPoolSDNode alignment field is log2 value of the alignment requirement. This is not consistent with other SDNode variants.
      2. MachineConstantPool alignment field is also a log2 value.
      3. However, some places are creating ConstantPoolSDNode with alignment value rather than log2 values. This creates entries with artificially large alignments, e.g. 256 for SSE vector values.
      4. Constant pool entry offsets are computed when they are created. However, asm printer group them by sections. That means the offsets are no longer valid. However, asm printer uses them to determine size of padding between entries.
      5. Asm printer uses expensive data structure multimap to track constant pool entries by sections.
      6. Asm printer iterate over SmallPtrSet when it's emitting constant pool entries. This is non-deterministic.
      
      
      Solutions:
      1. ConstantPoolSDNode alignment field is changed to keep non-log2 value.
      2. MachineConstantPool alignment field is also changed to keep non-log2 value.
      3. Functions that create ConstantPool nodes are passing in non-log2 alignments.
      4. MachineConstantPoolEntry no longer keeps an offset field. It's replaced with an alignment field. Offsets are not computed when constant pool entries are created. They are computed on the fly in asm printer and JIT.
      5. Asm printer uses cheaper data structure to group constant pool entries.
      6. Asm printer compute entry offsets after grouping is done.
      7. Change JIT code to compute entry offsets on the fly.
      
      llvm-svn: 66875
      1fb8aedd
    • Owen Anderson's avatar
      Convert VirtRegMap to a MachineFunctionPass. · d37ddf5b
      Owen Anderson authored
      llvm-svn: 66870
      d37ddf5b
    • Chris Lattner's avatar
      generalize the previous code to use the full generality of LEA · 99cc1337
      Chris Lattner authored
      for i32/i64 expressions (we could also do i16 on cpus where
      i16 lea is fast, but I didn't add this).  On the example, we now
      generate:
      
      _test:
      	movl	4(%esp), %eax
      	cmpl	$42, (%eax)
      	setl	%al
      	movzbl	%al, %eax
      	leal	4(%eax,%eax,8), %eax
      	ret
      
      instead of:
      
      _test:
      	movl	4(%esp), %eax
      	cmpl	$41, (%eax)
      	movl	$4, %ecx
      	movl	$13, %eax
      	cmovg	%ecx, %eax
      	ret
      
      llvm-svn: 66869
      99cc1337
    • Chris Lattner's avatar
      optimize the case of cond ? 42 : 41 and friends. This compiles the · 4be6df5d
      Chris Lattner authored
      example to:
      
      _test:
      	movl	4(%esp), %eax
      	cmpl	$41, (%eax)
      	setg	%al
      	movzbl	%al, %eax
      	orl	$4294967294, %eax
      	ret
      
      instead of:
      
              movl    4(%esp), %eax
              cmpl    $41, (%eax)
      	movl	$4294967294, %ecx
      	movl	$4294967295, %eax
      	cmova	%ecx, %eax
      	ret
      
      which is smaller in code size and faster. rdar://6668608
      
      llvm-svn: 66868
      4be6df5d
    • Bill Wendling's avatar
      Oops...I committed too much. · fa54bc20
      Bill Wendling authored
      llvm-svn: 66867
      fa54bc20
    • Bill Wendling's avatar
      Temporarily XFAIL this test. · b02eadf6
      Bill Wendling authored
      llvm-svn: 66866
      b02eadf6
    • Dan Gohman's avatar
      Enhance address-mode folding of ISD::ADD to handle cases where the · a1d92423
      Dan Gohman authored
      operands can't both be fully folded at the same time. For example,
      in the included testcase, a global variable is being added with
      an add of two values. The global variable wants RIP-relative
      addressing, so it can't share the address with another base
      register, but it's still possible to fold the initial add.
      
      llvm-svn: 66865
      a1d92423
    • Dale Johannesen's avatar
      Fix one more place where debug info affected · cecfa6e0
      Dale Johannesen authored
      codegen (speculative execution).
      
      llvm-svn: 66859
      cecfa6e0
    • Chris Lattner's avatar
      b858c0eb
    • Chris Lattner's avatar
      Eliminate a 9640 byte static mutable initialized data item by moving it · 0bf18690
      Chris Lattner authored
      to the stack.  This shrinks all llvm tools by 9k, and improves reentrancy.
      
      llvm-svn: 66847
      0bf18690
    • Chris Lattner's avatar
      static functions don't need an anonymous namespace. · 91702096
      Chris Lattner authored
      llvm-svn: 66845
      91702096
    • Dan Gohman's avatar
      Fix a typo in a comment. · a19c662a
      Dan Gohman authored
      llvm-svn: 66843
      a19c662a
    • Dale Johannesen's avatar
      Previous debug info fix to this code wasn't quite · ed6f5a82
      Dale Johannesen authored
      right; did the wrong thing when there are exactly 11
      non-debug instructions, followed by debug info.
      Remove a FIXME since it's apparently been fixed along the way.
      
      llvm-svn: 66840
      ed6f5a82
  2. Mar 12, 2009
  3. Mar 11, 2009
Loading