Skip to content
  1. Jul 27, 2013
  2. Jul 26, 2013
    • Chandler Carruth's avatar
      Re-implement the analysis of uses in mem2reg to be significantly more · 9af38fc2
      Chandler Carruth authored
      robust. It now uses an InstVisitor and worklist to actually walk the
      uses of the Alloca transitively and detect the pattern which we can
      directly promote: loads & stores of the whole alloca and instructions we
      can completely ignore.
      
      Also, with this new implementation teach both the predicate for testing
      whether we can promote and the promotion engine itself to use the same
      code so we no longer have strange divergence between the two code paths.
      
      I've added some silly test cases to demonstrate that we can handle
      slightly more degenerate code patterns now. See the below for why this
      is even interesting.
      
      Performance impact: roughly 1% regression in the performance of SROA or
      ScalarRepl on a large C++-ish test case where most of the allocas are
      basically ready for promotion. The reason is because of silly redundant
      work that I've left FIXMEs for and which I'll address in the next
      commit. I wanted to separate this commit as it changes the behavior.
      Once the redundant work in removing the dead uses of the alloca is
      fixed, this code appears to be faster than the old version. =]
      
      So why is this useful? Because the previous requirement for promotion
      required a *specific* visit pattern of the uses of the alloca to verify:
      we *had* to look for no more than 1 intervening use. The end goal is to
      have SROA automatically detect when an alloca is already promotable and
      directly hand it to the mem2reg machinery rather than trying to
      partition and rewrite it. This is a 25% or more performance improvement
      for SROA, and a significant chunk of the delta between it and
      ScalarRepl. To get there, we need to make mem2reg actually capable of
      promoting allocas which *look* promotable to SROA without have SROA do
      tons of work to massage the code into just the right form.
      
      This is actually the tip of the iceberg. There are tremendous potential
      savings we can realize here by de-duplicating work between mem2reg and
      SROA.
      
      llvm-svn: 187191
      9af38fc2
  3. Jul 25, 2013
    • Rafael Espindola's avatar
      Respect llvm.used in Internalize. · 17600e29
      Rafael Espindola authored
      The language reference says that:
      
      "If a symbol appears in the @llvm.used list, then the compiler,
      assembler, and linker are required to treat the symbol as if there is
      a reference to the symbol that it cannot see"
      
      Since even the linker cannot see the reference, we must assume that
      the reference can be using the symbol table. For example, a user can add
      __attribute__((used)) to a debug helper function like dump and use it from
      a debugger.
      
      llvm-svn: 187103
      17600e29
  4. Jul 24, 2013
  5. Jul 23, 2013
  6. Jul 21, 2013
  7. Jul 16, 2013
  8. Jul 15, 2013
  9. Jul 14, 2013
  10. Jul 11, 2013
  11. Jul 10, 2013
  12. Jul 04, 2013
  13. Jun 28, 2013
    • Manman Ren's avatar
      Debug Info: clean up usage of Verify. · 983a16c0
      Manman Ren authored
      No functionality change.
      It should suffice to check the type of a debug info metadata, instead of
      calling Verify. For cases where we know the type of a DI metadata, use
      assert.
      
      Also update testing cases to make them conform to the format of DI classes.
      
      llvm-svn: 185135
      983a16c0
  14. Jun 27, 2013
  15. Jun 26, 2013
  16. Jun 20, 2013
    • Meador Inge's avatar
      Remove the simplify-libcalls pass (finally) · dfb08a2c
      Meador Inge authored
      This commit completely removes what is left of the simplify-libcalls
      pass.  All of the functionality has now been migrated to the instcombine
      and functionattrs passes.  The following C API functions are now NOPs:
      
        1. LLVMAddSimplifyLibCallsPass
        2. LLVMPassManagerBuilderSetDisableSimplifyLibCalls
      
      llvm-svn: 184459
      dfb08a2c
  17. Jun 19, 2013
  18. Jun 04, 2013
    • Rafael Espindola's avatar
      Second part of pr16069 · a5e536ab
      Rafael Espindola authored
      The problem this time seems to be a thinko. We were assuming that in the CFG
      
      A
      | \
      |  B
      | /
      C
      
      speculating the basic block B would cause only the phi value for the B->C edge
      to be speculated. That is not true, the phi's are semantically in the edges, so
      if the A->B->C path is taken, any code needed for A->C is not executed and we
      have to consider it too when deciding to speculate B.
      
      llvm-svn: 183226
      a5e536ab
    • Hans Wennborg's avatar
      Typo: s/caes/cases/ in SimplifyCFG · 5cf30be6
      Hans Wennborg authored
      llvm-svn: 183219
      5cf30be6
  19. Jun 03, 2013
  20. Jun 01, 2013
Loading