Skip to content
  1. Jan 19, 2014
    • Michael Gottesman's avatar
      [APInt] Fix nearestLogBase2 to return correct answers for very large APInt and... · 84fcbdea
      Michael Gottesman authored
      [APInt] Fix nearestLogBase2 to return correct answers for very large APInt and APInt with a bitwidth of 1.
      
      I also improved the comments, added some more tests, etc.
      
      llvm-svn: 199610
      84fcbdea
    • Michael Gottesman's avatar
      [APInt] Fixed bug where APInt(UINT32_MAX, 0) would blow up when being constructed. · 073af74e
      Michael Gottesman authored
      This was due to arithmetic overflow in the getNumBits() computation. Now we
      cast BitWidth to a uint64_t so that does not occur during the computation. After
      the computation is complete, the uint64_t is truncated when the function
      returns.
      
      I know that this is not something that is likely to happen, but it *IS* a valid
      input and we should not blow up.
      
      llvm-svn: 199609
      073af74e
    • 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
  2. Jan 17, 2014
  3. Jan 16, 2014
    • Bill Wendling's avatar
      Reapply r194218 with fix: · 91686d6d
      Bill Wendling authored
      Move copying of global initializers below the cloning of functions.
      
      The BlockAddress doesn't have access to the correct basic blocks until the
      functions have been cloned. This causes the BlockAddress to point to the old
      values. Just wait until the functions have been cloned before copying the
      initializers.
      PR13163
      
      llvm-svn: 199354
      91686d6d
  4. Jan 13, 2014
    • Rafael Espindola's avatar
      Update getLazyBitcodeModule to use ErrorOr for error handling. · 5b6c1e8e
      Rafael Espindola authored
      llvm-svn: 199125
      5b6c1e8e
    • 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
  5. Jan 12, 2014
  6. Jan 11, 2014
  7. Jan 10, 2014
  8. Jan 09, 2014
    • Rafael Espindola's avatar
      Add a unit test for the copy constructor. · cd56deb6
      Rafael Espindola authored
      I would not normally add tests like these, but the copy constructor is not
      used at all in our codebase with c++11, so having this tests might prevent
      breaking the c++03 build again.
      
      llvm-svn: 198886
      cd56deb6
  9. Jan 08, 2014
  10. 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
    • Chandler Carruth's avatar
      Re-sort all of the includes with ./utils/sort_includes.py so that · 8a8cd2ba
      Chandler Carruth authored
      subsequent changes are easier to review. About to fix some layering
      issues, and wanted to separate out the necessary churn.
      
      Also comment and sink the include of "Windows.h" in three .inc files to
      match the usage in Memory.inc.
      
      llvm-svn: 198685
      8a8cd2ba
  11. Jan 05, 2014
  12. Jan 03, 2014
  13. Jan 02, 2014
  14. Jan 01, 2014
  15. Dec 30, 2013
  16. Dec 28, 2013
  17. Dec 27, 2013
    • Chandler Carruth's avatar
      Introduce a simple line-by-line iterator type into the Support library. · f8c5281c
      Chandler Carruth authored
      This is an iterator which you can build around a MemoryBuffer. It will
      iterate through the non-empty, non-comment lines of the buffer as
      a forward iterator. It should be small and reasonably fast (although it
      could be made much faster if anyone cares, I don't really...).
      
      This will be used to more simply support the text-based sample
      profile file format, and is largely based on the original patch by
      Diego. I've re-worked the style of it and separated it from the work of
      producing a MemoryBuffer from a file which both simplifies the interface
      and makes it easier to test.
      
      The style of the API follows the C++ standard naming conventions to fit
      in better with iterators in general, much like the Path and FileSystem
      interfaces follow standard-based naming conventions.
      
      llvm-svn: 198068
      f8c5281c
  18. Dec 25, 2013
  19. Dec 20, 2013
  20. Dec 19, 2013
  21. Dec 18, 2013
Loading