Skip to content
  1. May 02, 2014
  2. Apr 25, 2014
  3. Mar 09, 2014
    • Chandler Carruth's avatar
      [C++11] Add range based accessors for the Use-Def chain of a Value. · cdf47884
      Chandler Carruth authored
      This requires a number of steps.
      1) Move value_use_iterator into the Value class as an implementation
         detail
      2) Change it to actually be a *Use* iterator rather than a *User*
         iterator.
      3) Add an adaptor which is a User iterator that always looks through the
         Use to the User.
      4) Wrap these in Value::use_iterator and Value::user_iterator typedefs.
      5) Add the range adaptors as Value::uses() and Value::users().
      6) Update *all* of the callers to correctly distinguish between whether
         they wanted a use_iterator (and to explicitly dig out the User when
         needed), or a user_iterator which makes the Use itself totally
         opaque.
      
      Because #6 requires churning essentially everything that walked the
      Use-Def chains, I went ahead and added all of the range adaptors and
      switched them to range-based loops where appropriate. Also because the
      renaming requires at least churning every line of code, it didn't make
      any sense to split these up into multiple commits -- all of which would
      touch all of the same lies of code.
      
      The result is still not quite optimal. The Value::use_iterator is a nice
      regular iterator, but Value::user_iterator is an iterator over User*s
      rather than over the User objects themselves. As a consequence, it fits
      a bit awkwardly into the range-based world and it has the weird
      extra-dereferencing 'operator->' that so many of our iterators have.
      I think this could be fixed by providing something which transforms
      a range of T&s into a range of T*s, but that *can* be separated into
      another patch, and it isn't yet 100% clear whether this is the right
      move.
      
      However, this change gets us most of the benefit and cleans up
      a substantial amount of code around Use and User. =]
      
      llvm-svn: 203364
      cdf47884
  4. Mar 05, 2014
  5. Feb 21, 2014
    • Rafael Espindola's avatar
      Rename many DataLayout variables from TD to DL. · 37dc9e19
      Rafael Espindola authored
      I am really sorry for the noise, but the current state where some parts of the
      code use TD (from the old name: TargetData) and other parts use DL makes it
      hard to write a patch that changes where those variables come from and how
      they are passed along.
      
      llvm-svn: 201827
      37dc9e19
  6. Feb 04, 2014
  7. Dec 16, 2013
  8. Dec 12, 2013
  9. Dec 08, 2013
  10. Dec 05, 2013
  11. Nov 17, 2013
    • Hal Finkel's avatar
      Add the cold attribute to error-reporting call sites · 66cd3f1b
      Hal Finkel authored
      Generally speaking, control flow paths with error reporting calls are cold.
      So far, error reporting calls are calls to perror and calls to fprintf,
      fwrite, etc. with stderr as the stream. This can be extended in the future.
      
      The primary motivation is to improve block placement (the cold attribute
      affects the static branch prediction heuristics).
      
      llvm-svn: 194943
      66cd3f1b
  12. Nov 10, 2013
  13. Nov 03, 2013
  14. Sep 10, 2013
  15. Aug 31, 2013
  16. Aug 22, 2013
  17. Aug 19, 2013
  18. Aug 15, 2013
  19. Jun 27, 2013
  20. 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
  21. Apr 17, 2013
  22. Mar 12, 2013
    • Meador Inge's avatar
      LibCallSimplifier: optimize speed for short-lived instances · 20255ef2
      Meador Inge authored
      Nadav reported a performance regression due to the work I did to
      merge the library call simplifier into instcombine [1].  The issue
      is that a new LibCallSimplifier object is being created whenever
      InstCombiner::runOnFunction is called.  Every time a LibCallSimplifier
      object is used to optimize a call it creates a hash table to map from
      a function name to an object that optimizes functions of that name.
      For short-lived LibCallSimplifier instances this is quite inefficient.
      Especially for cases where no calls are actually simplified.
      
      This patch fixes the issue by dropping the hash table and implementing
      an explicit lookup function to correlate the function name to the object
      that optimizes functions of that name.  This avoids the cost of always
      building and destroying the hash table in cases where the LibCallSimplifier
      object is short-lived and avoids the cost of building the table when no
      simplifications are actually preformed.
      
      On a benchmark containing 100,000 calls where none of them are simplified
      I noticed a 30% speedup.  On a benchmark containing 100,000 calls where
      all of them are simplified I noticed an 8% speedup.
      
      [1] http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130304/167639.html
      
      llvm-svn: 176840
      20255ef2
  23. Mar 02, 2013
  24. Feb 27, 2013
  25. Feb 22, 2013
    • Bill Wendling's avatar
      Implement the NoBuiltin attribute. · 09bd1f71
      Bill Wendling authored
      The 'nobuiltin' attribute is applied to call sites to indicate that LLVM should
      not treat the callee function as a built-in function. I.e., it shouldn't try to
      replace that function with different code.
      
      llvm-svn: 175835
      09bd1f71
  26. Feb 19, 2013
  27. Feb 08, 2013
  28. Jan 02, 2013
    • Chandler Carruth's avatar
      Move all of the header files which are involved in modelling the LLVM IR · 9fb823bb
      Chandler Carruth authored
      into their new header subdirectory: include/llvm/IR. This matches the
      directory structure of lib, and begins to correct a long standing point
      of file layout clutter in LLVM.
      
      There are still more header files to move here, but I wanted to handle
      them in separate commits to make tracking what files make sense at each
      layer easier.
      
      The only really questionable files here are the target intrinsic
      tablegen files. But that's a battle I'd rather not fight today.
      
      I've updated both CMake and Makefile build systems (I think, and my
      tests think, but I may have missed something).
      
      I've also re-sorted the includes throughout the project. I'll be
      committing updates to Clang, DragonEgg, and Polly momentarily.
      
      llvm-svn: 171366
      9fb823bb
  29. Dec 19, 2012
  30. 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
  31. 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
  32. Nov 27, 2012
  33. Nov 26, 2012
Loading