Skip to content
  1. Mar 27, 2014
  2. Mar 26, 2014
  3. Mar 13, 2014
    • Chandler Carruth's avatar
      [PM] As was pointed out in review, I need to define a custom swap in · 999b92d5
      Chandler Carruth authored
      order to use the single assignment. That's probably worth doing for
      a lot of these types anyways as they may have non-trivial moves and so
      getting copy elision in more places seems worthwhile.
      
      I've tried to add some tests that actually catch this mistake, and one
      of the types is now well tested but the others' tests still fail to
      catch this. I'll keep working on tests, but this gets the core pattern
      right.
      
      llvm-svn: 203780
      999b92d5
  4. Mar 10, 2014
  5. Mar 09, 2014
  6. Mar 07, 2014
  7. Mar 06, 2014
    • Ahmed Charles's avatar
      Replace OwningPtr<T> with std::unique_ptr<T>. · 56440fd8
      Ahmed Charles authored
      This compiles with no changes to clang/lld/lldb with MSVC and includes
      overloads to various functions which are used by those projects and llvm
      which have OwningPtr's as parameters. This should allow out of tree
      projects some time to move. There are also no changes to libs/Target,
      which should help out of tree targets have time to move, if necessary.
      
      llvm-svn: 203083
      56440fd8
  8. Mar 04, 2014
  9. Mar 02, 2014
  10. Feb 25, 2014
    • Rafael Espindola's avatar
      Fix resetting the DataLayout in a Module. · 248ac139
      Rafael Espindola authored
      No tool does this currently, but as everything else in a module we should be
      able to change its DataLayout.
      
      Most of the fix is in DataLayout to make sure it can be reset properly.
      
      The test uses Module::setDataLayout since the fact that we mutate a DataLayout
      is an implementation detail. The module could hold a OwningPtr<DataLayout> and
      the DataLayout itself could be immutable.
      
      Thanks to Philip Reames for pushing me in the right direction.
      
      llvm-svn: 202198
      248ac139
    • Rafael Espindola's avatar
      Make DataLayout a plain object, not a pass. · 93512512
      Rafael Espindola authored
      Instead, have a DataLayoutPass that holds one. This will allow parts of LLVM
      don't don't handle passes to also use DataLayout.
      
      llvm-svn: 202168
      93512512
  11. Feb 05, 2014
    • Chandler Carruth's avatar
      [PM] Don't require analysis results to be const in the new pass manager. · eedf9fca
      Chandler Carruth authored
      I think this was just over-eagerness on my part. The analysis results
      need to often be non-const because they need to (in some cases at least)
      be updated by the transformation pass in order to remain correct. It
      also makes lazy analyses (a common case) needlessly annoying to write in
      order to make their entire state mutable.
      
      llvm-svn: 200881
      eedf9fca
  12. Jan 22, 2014
    • Matt Arsenault's avatar
      Bug 18228 - Fix accepting bitcasts between vectors of pointers with a · fc3c91d0
      Matt Arsenault authored
      different number of elements.
      
      Bitcasts were passing with vectors of pointers with different number of
      elements since the number of elements was checking
      SrcTy->getVectorNumElements() == SrcTy->getVectorNumElements() which
      isn't helpful. The addrspacecast was also wrong, but that case at least
      is caught by the verifier. Refactor bitcast and addrspacecast handling
      in castIsValid to be more readable and fix this problem.
      
      llvm-svn: 199821
      fc3c91d0
  13. Jan 19, 2014
    • Chandler Carruth's avatar
      [PM] Make the verifier work independently of any pass manager. · 043949d4
      Chandler Carruth authored
      This makes the 'verifyFunction' and 'verifyModule' functions totally
      independent operations on the LLVM IR. It also cleans up their API a bit
      by lifting the abort behavior into their clients and just using an
      optional raw_ostream parameter to control printing.
      
      The implementation of the verifier is now just an InstVisitor with no
      multiple inheritance. It also is significantly more const-correct, and
      hides the const violations internally. The two layers that force us to
      break const correctness are building a DomTree and dispatching through
      the InstVisitor.
      
      A new VerifierPass is used to implement the legacy pass manager
      interface in terms of the other pieces.
      
      The error messages produced may be slightly different now, and we may
      have slightly different short circuiting behavior with different usage
      models of the verifier, but generally everything works equivalently and
      this unblocks wiring the verifier up to the new pass manager.
      
      llvm-svn: 199569
      043949d4
  14. Jan 13, 2014
    • Chandler Carruth's avatar
      [PM] Split DominatorTree into a concrete analysis result object which · 73523021
      Chandler Carruth authored
      can be used by both the new pass manager and the old.
      
      This removes it from any of the virtual mess of the pass interfaces and
      lets it derive cleanly from the DominatorTreeBase<> template. In turn,
      tons of boilerplate interface can be nuked and it turns into a very
      straightforward extension of the base DominatorTree interface.
      
      The old analysis pass is now a simple wrapper. The names and style of
      this split should match the split between CallGraph and
      CallGraphWrapperPass. All of the users of DominatorTree have been
      updated to match using many of the same tricks as with CallGraph. The
      goal is that the common type remains the resulting DominatorTree rather
      than the pass. This will make subsequent work toward the new pass
      manager significantly easier.
      
      Also in numerous places things became cleaner because I switched from
      re-running the pass (!!! mid way through some other passes run!!!) to
      directly recomputing the domtree.
      
      llvm-svn: 199104
      73523021
    • Chandler Carruth's avatar
      [cleanup] Move the Dominators.h and Verifier.h headers into the IR · 5ad5f15c
      Chandler Carruth authored
      directory. These passes are already defined in the IR library, and it
      doesn't make any sense to have the headers in Analysis.
      
      Long term, I think there is going to be a much better way to divide
      these matters. The dominators code should be fully separated into the
      abstract graph algorithm and have that put in Support where it becomes
      obvious that evn Clang's CFGBlock's can use it. Then the verifier can
      manually construct dominance information from the Support-driven
      interface while the Analysis library can provide a pass which both
      caches, reconstructs, and supports a nice update API.
      
      But those are very long term, and so I don't want to leave the really
      confusing structure until that day arrives.
      
      llvm-svn: 199082
      5ad5f15c
  15. Jan 12, 2014
  16. Jan 11, 2014
  17. Jan 07, 2014
    • Chandler Carruth's avatar
      Move the LLVM IR asm writer header files into the IR directory, as they · 9aca918d
      Chandler Carruth authored
      are part of the core IR library in order to support dumping and other
      basic functionality.
      
      Rename the 'Assembly' include directory to 'AsmParser' to match the
      library name and the only functionality left their -- printing has been
      in the core IR library for quite some time.
      
      Update all of the #includes to match.
      
      All of this started because I wanted to have the layering in good shape
      before I started adding support for printing LLVM IR using the new pass
      infrastructure, and commandline support for the new pass infrastructure.
      
      llvm-svn: 198688
      9aca918d
  18. Jan 05, 2014
  19. Jan 02, 2014
  20. Jan 01, 2014
  21. Dec 13, 2013
  22. Dec 10, 2013
  23. Dec 05, 2013
  24. Dec 02, 2013
    • Diego Novillo's avatar
      Fix dominator descendants for unreachable blocks. · ee592429
      Diego Novillo authored
      When a block is unreachable, asking its dom tree descendants should
      return the empty set. However, the computation of the descendants
      was causing a segmentation fault because the dom tree node we get
      from the basic block is initially NULL.
      
      Fixed by adding a test for a valid dom tree node before we iterate.
      
      The patch also adds some unit tests to the existing dom tree tests.
      
      llvm-svn: 196099
      ee592429
Loading