Skip to content
  1. Dec 27, 2010
    • Cameron Zwarich's avatar
      Land a first cut at StrongPHIElimination. There are only 5 new test failures · 25d046ce
      Cameron Zwarich authored
      when running without the verifier, and I have not yet checked them to see if
      the new results are still correct. There are more verifier failures, but they
      all seem to be additional occurrences of verifier failures that occur with the
      existing PHIElimination pass. There are a few obvious issues with the code:
      
      1) It doesn't properly update the register equivalence classes during copy
      insertion, and instead recomputes them before merging live intervals and
      renaming registers. I wanted to keep this first patch simple for debugging
      purposes, but it shouldn't be very hard to do this.
      
      2) It doesn't mix the renaming and live interval merging with the copy insertion
      process, which leads to a lot of virtual register churn. Virtual registers and
      live intervals are created, only to later be merged into others. The code should
      be smarter and only create a new virtual register if there is no existing
      register in the same congruence class.
      
      3) In one place the code uses a DenseMap per basic block, which is unnecessary
      heap allocation. There should be an inline storage version of DenseMap.
      
      I did a quick compile-time test of running llc on 403.gcc with and without
      StrongPHIElimination. It is slightly slower with StrongPHIElimination, because
      the small decrease in the coalescer runtime can't beat the increase in phi
      elimination runtime. Perhaps fixing the above performance issues will narrow
      the gap.
      
      I also haven't yet run any tests of the quality of the generated code.
      
      llvm-svn: 122582
      25d046ce
    • Cameron Zwarich's avatar
      Add knowledge of phi-def and phi-kill valnos to MachineVerifier's predecessor · b95bfe16
      Cameron Zwarich authored
      valno verification. The "Different value live out of predecessor" check is
      incorrect in the case of phi-def valnos, so just skip that check for phi-def
      valnos and instead check that all of the valnos for predecessors have phi-kill.
      Fixes PR8863.
      
      llvm-svn: 122581
      b95bfe16
    • Michael J. Spencer's avatar
      Support/PathV1: Deprecate GetRootDirectory. · 9e590024
      Michael J. Spencer authored
      llvm-svn: 122580
      9e590024
    • Rafael Espindola's avatar
      Handle reloc_riprel_4byte_movq_load. Should make the bots happy. · 8fc59a68
      Rafael Espindola authored
      llvm-svn: 122579
      8fc59a68
    • Rafael Espindola's avatar
      Add support for the same encodings of the personality function that gnu as · 2ac8355e
      Rafael Espindola authored
      supports.
      
      llvm-svn: 122577
      2ac8355e
    • Benjamin Kramer's avatar
      BuildLibCalls: Nuke EmitMemCpy, EmitMemMove and EmitMemSet. They are dead and... · 84bd73c5
      Benjamin Kramer authored
      BuildLibCalls: Nuke EmitMemCpy, EmitMemMove and EmitMemSet. They are dead and superseded by IRBuilder.
      
      llvm-svn: 122576
      84bd73c5
    • Benjamin Kramer's avatar
      SimplifyLibCalls: Use IRBuilder to simplify code. · 7cba269d
      Benjamin Kramer authored
      llvm-svn: 122575
      7cba269d
    • Chris Lattner's avatar
      have loop-idiom nuke instructions that feed stores that get removed. · b9fe685b
      Chris Lattner authored
      llvm-svn: 122574
      b9fe685b
    • Chris Lattner's avatar
      implement enough of the memset inference algorithm to recognize and insert · 29e14edc
      Chris Lattner authored
      memsets.  This is still missing one important validity check, but this is enough
      to compile stuff like this:
      
      void test0(std::vector<char> &X) {
        for (std::vector<char>::iterator I = X.begin(), E = X.end(); I != E; ++I)
          *I = 0;
      }
      
      void test1(std::vector<int> &X) {
        for (long i = 0, e = X.size(); i != e; ++i)
          X[i] = 0x01010101;
      }
      
      With:
       $ clang t.cpp -S -o - -O2 -emit-llvm | opt -loop-idiom | opt -O3 | llc 
      
      to:
      
      __Z5test0RSt6vectorIcSaIcEE:            ## @_Z5test0RSt6vectorIcSaIcEE
      ## BB#0:                                ## %entry
      	subq	$8, %rsp
      	movq	(%rdi), %rax
      	movq	8(%rdi), %rsi
      	cmpq	%rsi, %rax
      	je	LBB0_2
      ## BB#1:                                ## %bb.nph
      	subq	%rax, %rsi
      	movq	%rax, %rdi
      	callq	___bzero
      LBB0_2:                                 ## %for.end
      	addq	$8, %rsp
      	ret
      ...
      __Z5test1RSt6vectorIiSaIiEE:            ## @_Z5test1RSt6vectorIiSaIiEE
      ## BB#0:                                ## %entry
      	subq	$8, %rsp
      	movq	(%rdi), %rax
      	movq	8(%rdi), %rdx
      	subq	%rax, %rdx
      	cmpq	$4, %rdx
      	jb	LBB1_2
      ## BB#1:                                ## %for.body.preheader
      	andq	$-4, %rdx
      	movl	$1, %esi
      	movq	%rax, %rdi
      	callq	_memset
      LBB1_2:                                 ## %for.end
      	addq	$8, %rsp
      	ret
      
      llvm-svn: 122573
      29e14edc
  2. Dec 26, 2010
  3. Dec 25, 2010
  4. Dec 24, 2010
Loading