Skip to content
  1. Nov 15, 2012
    • Dmitri Gribenko's avatar
      0011bbf9
    • Hans Wennborg's avatar
      Make GlobalOpt be conservative with TLS variables (PR14309) · 709e015c
      Hans Wennborg authored
      For global variables that get the same value stored into them
      everywhere, GlobalOpt will replace them with a constant. The problem is
      that a thread-local GlobalVariable looks like one value (the address of
      the TLS var), but is different between threads.
      
      This patch introduces Constant::isThreadDependent() which returns true
      for thread-local variables and constants which depend on them (e.g. a GEP
      into a thread-local array), and teaches GlobalOpt not to track such
      values.
      
      llvm-svn: 168037
      709e015c
    • Duncan Sands's avatar
      Fix a crash observed by Shuxin Yang. The issue here is that LinearizeExprTree, · ac852c74
      Duncan Sands authored
      the utility for extracting a chain of operations from the IR, thought that it
      might as well combine any constants it came across (rather than just returning
      them along with everything else).  On the other hand, the factorization code
      would like to see the individual constants (this is quite reasonable: it is
      much easier to pull a factor of 3 out of 2*3 than it is to pull it out of 6;
      you may think 6/3 isn't so hard, but due to overflow it's not as easy to undo
      multiplications of constants as it may at first appear).  This patch therefore
      makes LinearizeExprTree stupider: it now leaves optimizing to the optimization
      part of reassociate, and sticks to just analysing the IR.
      
      llvm-svn: 168035
      ac852c74
    • NAKAMURA Takumi's avatar
  2. Nov 14, 2012
    • Hal Finkel's avatar
      Replace std::vector -> SmallVector in BBVectorize · e9740a46
      Hal Finkel authored
      For now, this uses 8 on-stack elements. I'll need to do some profiling
      to see if this is the best number.
      
      Pointed out by Jakob in post-commit review.
      
      llvm-svn: 167966
      e9740a46
    • Hal Finkel's avatar
      Fix the largest offender of determinism in BBVectorize · 1b7f0aba
      Hal Finkel authored
      Iterating over the children of each node in the potential vectorization
      plan must happen in a deterministic order (because it affects which children
      are erased when two children conflict). There was no need for this data
      structure to be a map in the first place, so replacing it with a vector
      is a small change.
      
      I believe that this was the last remaining instance if iterating over the
      elements of a Dense* container where the iteration order could matter.
      There are some remaining iterations over std::*map containers where the order
      might matter, but so long as the Value* for instructions in a block increase
      with the order of the instructions in the block (or decrease) monotonically,
      then this will appear to be deterministic.
      
      llvm-svn: 167942
      1b7f0aba
    • Alexey Samsonov's avatar
      [TSan] fix indentation · 2b27170f
      Alexey Samsonov authored
      llvm-svn: 167928
      2b27170f
    • Nadav Rotem's avatar
      use the getSplat API. Patch by Paul Redmond. · a43bcddc
      Nadav Rotem authored
      llvm-svn: 167892
      a43bcddc
  3. Nov 13, 2012
  4. Nov 12, 2012
  5. Nov 11, 2012
    • Meador Inge's avatar
      instcombine: Migrate memset optimizations · d4825780
      Meador Inge authored
      This patch migrates the memset optimizations from the simplify-libcalls
      pass into the instcombine library call simplifier.
      
      llvm-svn: 167689
      d4825780
    • Meador Inge's avatar
      instcombine: Migrate memmove optimizations · 9cf328b5
      Meador Inge authored
      This patch migrates the memmove optimizations from the simplify-libcalls
      pass into the instcombine library call simplifier.
      
      llvm-svn: 167687
      9cf328b5
    • Meador Inge's avatar
      instcombine: Migrate memcpy optimizations · dd9234a1
      Meador Inge authored
      This patch migrates the memcpy optimizations from the simplify-libcalls
      pass into the instcombine library call simplifier.
      
      llvm-svn: 167686
      dd9234a1
    • Nadav Rotem's avatar
      Fix a comment typo and add comments. · 12930749
      Nadav Rotem authored
      llvm-svn: 167684
      12930749
    • Meador Inge's avatar
      instcombine: Migrate memcmp optimizations · 4d2827c1
      Meador Inge authored
      This patch migrates the memcmp optimizations from the simplify-libcalls
      pass into the instcombine library call simplifier.
      
      llvm-svn: 167683
      4d2827c1
    • Meador Inge's avatar
      instcombine: Migrate strstr optimizations · 56edbc93
      Meador Inge authored
      This patch migrates the strstr optimizations from the simplify-libcalls
      pass into the instcombine library call simplifier.
      
      llvm-svn: 167682
      56edbc93
    • Meador Inge's avatar
      Add method for replacing instructions to LibCallSimplifier · 76fc1a47
      Meador Inge authored
      In some cases the library call simplifier may need to replace instructions
      other than the library call being simplified.  In those cases it may be
      necessary for clients of the simplifier to override how the replacements
      are actually done.  As such, a new overrideable method for replacing
      instructions was added to LibCallSimplifier.
      
      A new subclass of LibCallSimplifier is also defined which overrides
      the instruction replacement method.  This is because the instruction
      combiner defines its own replacement method which updates the worklist
      when instructions are replaced.
      
      llvm-svn: 167681
      76fc1a47
  6. Nov 10, 2012
  7. Nov 09, 2012
  8. Nov 08, 2012
  9. Nov 07, 2012
  10. Nov 03, 2012
  11. Nov 02, 2012
    • Alexey Samsonov's avatar
      Fix whitespaces · 9bdb63ae
      Alexey Samsonov authored
      llvm-svn: 167295
      9bdb63ae
    • Chandler Carruth's avatar
      Revert the switch of loop-idiom to use the new dependence analysis. · 099f5cb0
      Chandler Carruth authored
      The new analysis is not yet ready for prime time. It has a *critical*
      flawed assumption, and some troubling shortages of testing. Until it's
      been hammered into better shape, let's stick with the working code. This
      should be easy to revert itself when the analysis is ready.
      
      Fixes PR14241, a miscompile of any memcpy-able loop which uses a pointer
      as the induction mechanism. If you have been seeing miscompiles in this
      revision range, you really want to test with this backed out. The
      results of this miscompile are a bit subtle as they can lead to
      downstream passes concluding things are impossible which are in fact
      possible.
      
      Thanks to David Blaikie for the majority of the reduction of this
      miscompile. I'll be checking in the test case in a non-revert commit.
      
      Revesions reverted here:
      
      r167045: LoopIdiom: Fix a serious missed optimization: we only turned
               top-level loops into memmove.
      r166877: LoopIdiom: Add checks to avoid turning memmove into an infinite
               loop.
      r166875: LoopIdiom: Recognize memmove loops.
      r166874: LoopIdiom: Replace custom dependence analysis with
               DependenceAnalysis.
      llvm-svn: 167286
      099f5cb0
Loading