Skip to content
  1. Dec 03, 2012
    • Chandler Carruth's avatar
      Use the new script to sort the includes of every file under lib. · ed0881b2
      Chandler Carruth authored
      Sooooo many of these had incorrect or strange main module includes.
      I have manually inspected all of these, and fixed the main module
      include to be the nearest plausible thing I could find. If you own or
      care about any of these source files, I encourage you to take some time
      and check that these edits were sensible. I can't have broken anything
      (I strictly added headers, and reordered them, never removed), but they
      may not be the headers you'd really like to identify as containing the
      API being implemented.
      
      Many forward declarations and missing includes were added to a header
      files to allow them to parse cleanly when included first. The main
      module rule does in fact have its merits. =]
      
      llvm-svn: 169131
      ed0881b2
  2. Nov 30, 2012
    • Chandler Carruth's avatar
      Fix non-determinism introduced in r168970 and pointed out by Duncan. · d9ef81e1
      Chandler Carruth authored
      We're iterating over a non-deterministically ordered container looking
      for two saturating flags. To do this correctly, we have to saturate
      both, and only stop looping if both saturate to their final value.
      Otherwise, which flag we see first changes the result.
      
      This is also a micro-optimization of the previous version as now we
      don't go into the (possibly expensive) test logic once the first
      violation of either constraint is detected.
      
      llvm-svn: 168989
      d9ef81e1
    • Chandler Carruth's avatar
      Rearrange the comments, control flow, and variable names; no · 77d433da
      Chandler Carruth authored
      functionality changed.
      
      Evan's commit r168970 moved the code that the primary comment in this
      function referred to to the other end of the function without moving the
      comment, and there has been a steady creep of "boolean" logic in it that
      is simpler if handled via early exit. That way each special case can
      have its own comments. I've also made the variable name a bit more
      explanatory than "AllFit". This is in preparation to fix the
      non-deterministic output of this function.
      
      llvm-svn: 168988
      77d433da
    • Evan Cheng's avatar
      Fix logic to determine whether to turn a switch into a lookup table. When · 65df808f
      Evan Cheng authored
      the tables cannot fit in registers (i.e. bitmap), do not emit the table
      if it's using an illegal type.
      
      rdar://12779436
      
      llvm-svn: 168970
      65df808f
  3. Nov 29, 2012
    • Meador Inge's avatar
      instcombine: Migrate puts optimizations · 75798bb7
      Meador Inge authored
      This patch migrates the puts optimizations from the simplify-libcalls
      pass into the instcombine library call simplifier.
      
      All the simplifiers from simplify-libcalls have now been migrated to
      instcombine.  Yay!  Just a few other bits to migrate (prototype attribute
      inference and a few statistics) and simplify-libcalls can finally be put
      to rest.
      
      llvm-svn: 168925
      75798bb7
    • Meador Inge's avatar
      instcombine: Migrate fputs optimizations · f8e72508
      Meador Inge authored
      This patch migrates the fputs optimizations from the simplify-libcalls
      pass into the instcombine library call simplifier.
      
      llvm-svn: 168893
      f8e72508
    • Meador Inge's avatar
      instcombine: Migrate fwrite optimizations · bc84d1a4
      Meador Inge authored
      This patch migrates the fwrite optimizations from the simplify-libcalls
      pass into the instcombine library call simplifier.
      
      llvm-svn: 168892
      bc84d1a4
    • Meador Inge's avatar
      instcombine: Migrate fprintf optimizations · 1009cecc
      Meador Inge authored
      This patch migrates the fprintf optimizations from the simplify-libcalls
      pass into the instcombine library call simplifier.
      
      llvm-svn: 168891
      1009cecc
  4. Nov 27, 2012
  5. Nov 26, 2012
  6. Nov 25, 2012
  7. Nov 20, 2012
    • Bill Wendling's avatar
      Make the AttrListPtr object a part of the LLVMContext. · f86efb9b
      Bill Wendling authored
      When code deletes the context, the AttributeImpls that the AttrListPtr points to
      are now invalid. Therefore, instead of keeping a separate managed static for the
      AttrListPtrs that's reference counted, move it into the LLVMContext and delete
      it when deleting the AttributeImpls.
      
      llvm-svn: 168354
      f86efb9b
  8. Nov 16, 2012
  9. Nov 15, 2012
  10. Nov 13, 2012
    • Alexey Samsonov's avatar
      Figure out <size> argument of llvm.lifetime intrinsics at the moment they are... · cfd662f2
      Alexey Samsonov authored
      Figure out <size> argument of llvm.lifetime intrinsics at the moment they are created (during function inlining)
      
      llvm-svn: 167821
      cfd662f2
    • Meador Inge's avatar
      instcombine: Migrate math library call simplifications · 193e035b
      Meador Inge authored
      This patch migrates the math library call simplifications from the
      simplify-libcalls pass into the instcombine library call simplifier.
      
      I have typically migrated just one simplifier at a time, but the math
      simplifiers are interdependent because:
      
         1. CosOpt, PowOpt, and Exp2Opt all depend on UnaryDoubleFPOpt.
         2. CosOpt, PowOpt, Exp2Opt, and UnaryDoubleFPOpt all depend on
            the option -enable-double-float-shrink.
      
      These two factors made migrating each of these simplifiers individually
      more of a pain than it would be worth.  So, I migrated them all together.
      
      llvm-svn: 167815
      193e035b
  11. Nov 12, 2012
    • Meador Inge's avatar
      Normalize memcmp constant folding results. · b3e91f6a
      Meador Inge authored
      The library call simplifier folds memcmp calls with all constant arguments
      to a constant.  For example:
      
        memcmp("foo", "foo", 3) ->  0
        memcmp("hel", "foo", 3) ->  1
        memcmp("foo", "hel", 3) -> -1
      
      The folding is implemented in terms of the system memcmp that LLVM gets
      linked with.  It currently just blindly uses the value returned from
      the system memcmp as the folded constant.
      
      This patch normalizes the values returned from the system memcmp to
      (-1, 0, 1) so that we get consistent results across multiple platforms.
      The test cases were adjusted accordingly.
      
      llvm-svn: 167726
      b3e91f6a
  12. 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
    • 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
  13. Nov 10, 2012
  14. Nov 08, 2012
  15. Nov 07, 2012
  16. Nov 01, 2012
    • Chandler Carruth's avatar
      Revert the majority of the next patch in the address space series: · 5da3f051
      Chandler Carruth authored
      r165941: Resubmit the changes to llvm core to update the functions to
               support different pointer sizes on a per address space basis.
      
      Despite this commit log, this change primarily changed stuff outside of
      VMCore, and those changes do not carry any tests for correctness (or
      even plausibility), and we have consistently found questionable or flat
      out incorrect cases in these changes. Most of them are probably correct,
      but we need to devise a system that makes it more clear when we have
      handled the address space concerns correctly, and ideally each pass that
      gets updated would receive an accompanying test case that exercises that
      pass specificaly w.r.t. alternate address spaces.
      
      However, from this commit, I have retained the new C API entry points.
      Those were an orthogonal change that probably should have been split
      apart, but they seem entirely good.
      
      In several places the changes were very obvious cleanups with no actual
      multiple address space code added; these I have not reverted when
      I spotted them.
      
      In a few other places there were merge conflicts due to a cleaner
      solution being implemented later, often not using address spaces at all.
      In those cases, I've preserved the new code which isn't address space
      dependent.
      
      This is part of my ongoing effort to clean out the partial address space
      code which carries high risk and low test coverage, and not likely to be
      finished before the 3.2 release looms closer. Duncan and I would both
      like to see the above issues addressed before we return to these
      changes.
      
      llvm-svn: 167222
      5da3f051
    • Chandler Carruth's avatar
      Revert the series of commits starting with r166578 which introduced the · 7ec5085e
      Chandler Carruth authored
      getIntPtrType support for multiple address spaces via a pointer type,
      and also introduced a crasher bug in the constant folder reported in
      PR14233.
      
      These commits also contained several problems that should really be
      addressed before they are re-committed. I have avoided reverting various
      cleanups to the DataLayout APIs that are reasonable to have moving
      forward in order to reduce the amount of churn, and minimize the number
      of commits that were reverted. I've also manually updated merge
      conflicts and manually arranged for the getIntPtrType function to stay
      in DataLayout and to be defined in a plausible way after this revert.
      
      Thanks to Duncan for working through this exact strategy with me, and
      Nick Lewycky for tracking down the really annoying crasher this
      triggered. (Test case to follow in its own commit.)
      
      After discussing with Duncan extensively, and based on a note from
      Micah, I'm going to continue to back out some more of the more
      problematic patches in this series in order to ensure we go into the
      LLVM 3.2 branch with a reasonable story here. I'll send a note to
      llvmdev explaining what's going on and why.
      
      Summary of reverted revisions:
      
      r166634: Fix a compiler warning with an unused variable.
      r166607: Add some cleanup to the DataLayout changes requested by
               Chandler.
      r166596: Revert "Back out r166591, not sure why this made it through
               since I cancelled the command. Bleh, sorry about this!
      r166591: Delete a directory that wasn't supposed to be checked in yet.
      r166578: Add in support for getIntPtrType to get the pointer type based
               on the address space.
      llvm-svn: 167221
      7ec5085e
  17. Oct 31, 2012
Loading