Skip to content
  1. May 15, 2014
  2. Apr 25, 2014
  3. Apr 23, 2014
  4. Apr 21, 2014
    • Reid Kleckner's avatar
      Fix PR7272 in -tailcallelim instead of the inliner · 9b2cc647
      Reid Kleckner authored
      The -tailcallelim pass should be checking if byval or inalloca args can
      be captured before marking calls as tail calls.  This was the real root
      cause of PR7272.
      
      With a better fix in place, revert the inliner change from r105255.  The
      test case it introduced still passes and has been moved to
      test/Transforms/Inline/byval-tail-call.ll.
      
      Reviewers: chandlerc
      
      Differential Revision: http://reviews.llvm.org/D3403
      
      llvm-svn: 206789
      9b2cc647
  5. Apr 15, 2014
  6. 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
  7. Mar 06, 2014
  8. Mar 04, 2014
  9. Feb 18, 2014
  10. Dec 08, 2013
    • Mark Seaborn's avatar
      Fix inlining to not lose the "cleanup" clause from landingpads · 1b3dd352
      Mark Seaborn authored
      This fixes PR17872.  This bug can lead to C++ destructors not being
      called when they should be, when an exception is thrown.
      
      llvm-svn: 196711
      1b3dd352
    • Mark Seaborn's avatar
      Fix inlining to not produce duplicate landingpad clauses · ef3dbb93
      Mark Seaborn authored
      Before this change, inlining one "invoke" into an outer "invoke" call
      site can lead to the outer landingpad's catch/filter clauses being
      copied multiple times into the resulting landingpad.  This happens:
      
       * when the inlined function contains multiple "resume" instructions,
         because forwardResume() copies the clauses but is called multiple
         times;
      
       * when the inlined function contains a "resume" and a "call", because
         HandleCallsInBlockInlinedThroughInvoke() copies the clauses but is
         redundant with forwardResume().
      
      Fix this by deduplicating the code.
      
      This problem doesn't lead to any incorrect execution; it's only
      untidy.
      
      This change will make fixing PR17872 a little easier.
      
      llvm-svn: 196710
      ef3dbb93
  11. Dec 02, 2013
  12. Nov 03, 2013
  13. Oct 31, 2013
    • Manman Ren's avatar
      Do not convert "call asm" to "invoke asm" in Inliner. · 87a2adc7
      Manman Ren authored
      Given that backend does not handle "invoke asm" correctly ("invoke asm" will be
      handled by SelectionDAGBuilder::visitInlineAsm, which does not have the right
      setup for LPadToCallSiteMap) and we already made the assumption that inline asm
      does not throw in InstCombiner::visitCallSite, we are going to make the same
      assumption in Inliner to make sure we don't convert "call asm" to "invoke asm".
      
      If it becomes necessary to add support for "invoke asm" later on, we will need
      to modify the backend as well as remove the assumptions that inline asm does
      not throw.
      
      Fix rdar://15317907
      
      llvm-svn: 193808
      87a2adc7
  14. Oct 24, 2013
  15. May 01, 2013
  16. Apr 30, 2013
  17. Apr 23, 2013
  18. Mar 22, 2013
  19. 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
  20. 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
  21. Nov 13, 2012
  22. Oct 08, 2012
  23. Jun 29, 2012
    • Chandler Carruth's avatar
      Move llvm/Support/IRBuilder.h -> llvm/IRBuilder.h · aafe0918
      Chandler Carruth authored
      This was always part of the VMCore library out of necessity -- it deals
      entirely in the IR. The .cpp file in fact was already part of the VMCore
      library. This is just a mechanical move.
      
      I've tried to go through and re-apply the coding standard's preferred
      header sort, but at 40-ish files, I may have gotten some wrong. Please
      let me know if so.
      
      I'll be committing the corresponding updates to Clang and Polly, and
      Duncan has DragonEgg.
      
      Thanks to Bill and Eric for giving the green light for this bit of cleanup.
      
      llvm-svn: 159421
      aafe0918
  24. Jun 28, 2012
  25. Jun 09, 2012
  26. Mar 26, 2012
  27. Feb 25, 2012
  28. Feb 06, 2012
  29. Jan 31, 2012
Loading