Skip to content
  1. Jul 09, 2011
    • Chris Lattner's avatar
      Land the long talked about "type system rewrite" patch. This · b1ed91f3
      Chris Lattner authored
      patch brings numerous advantages to LLVM.  One way to look at it
      is through diffstat:
       109 files changed, 3005 insertions(+), 5906 deletions(-)
      
      Removing almost 3K lines of code is a good thing.  Other advantages
      include:
      
      1. Value::getType() is a simple load that can be CSE'd, not a mutating
         union-find operation.
      2. Types a uniqued and never move once created, defining away PATypeHolder.
      3. Structs can be "named" now, and their name is part of the identity that
         uniques them.  This means that the compiler doesn't merge them structurally
         which makes the IR much less confusing.
      4. Now that there is no way to get a cycle in a type graph without a named
         struct type, "upreferences" go away.
      5. Type refinement is completely gone, which should make LTO much MUCH faster
         in some common cases with C++ code.
      6. Types are now generally immutable, so we can use "Type *" instead 
         "const Type *" everywhere.
      
      Downsides of this patch are that it removes some functions from the C API,
      so people using those will have to upgrade to (not yet added) new API.  
      "LLVM 3.0" is the right time to do this.
      
      There are still some cleanups pending after this, this patch is large enough
      as-is.
      
      llvm-svn: 134829
      b1ed91f3
  2. Jul 07, 2011
    • Owen Anderson's avatar
      Fix a subtle issue in SmallVector. The following code did not work as expected: · 145a260f
      Owen Anderson authored
        vec.insert(vec.begin(), vec[3]);
      The issue was that vec[3] returns a reference into the vector, which is invalidated when insert() memmove's the elements down to make space.  The method needs to specifically detect and handle this case to correctly match std::vector's semantics.
      
      Thanks to Howard Hinnant for clarifying the correct behavior, and explaining how std::vector solves this problem.
      
      llvm-svn: 134554
      145a260f
  3. Jun 22, 2011
  4. Jun 20, 2011
    • Chris Lattner's avatar
      Revamp the "ConstantStruct::get" methods. Previously, these were scattered · cc19efaa
      Chris Lattner authored
      all over the place in different styles and variants.  Standardize on two
      preferred entrypoints: one that takes a StructType and ArrayRef, and one that
      takes StructType and varargs.
      
      In cases where there isn't a struct type convenient, we now add a
      ConstantStruct::getAnon method (whose name will make more sense after a few
      more patches land).  
      
      It would be "really really nice" if the ConstantStruct::get and 
      ConstantVector::get methods didn't make temporary std::vectors.
      
      llvm-svn: 133412
      cc19efaa
  5. Jun 19, 2011
  6. Jun 16, 2011
  7. Jun 15, 2011
  8. May 22, 2011
  9. May 18, 2011
    • Duncan Sands's avatar
      Teach getCastOpcode about element-by-element vector casts. For example, "trunc" · a8514535
      Duncan Sands authored
      can be used to turn a <4 x i64> into a <4 x i32> but getCastOpcode would assert
      if you passed these types to it.  Note that this strictly extends the previous
      functionality: if getCastOpcode previously accepted two vector types (i.e. didn't
      assert) then it still will and returns the same opcode (BitCast).  That's because
      before it would only accept vectors with the same bitwidth, and the new code only
      touches vectors with the same length.  However if two vectors have both the same
      bitwidth and the same length then their element types have the same bitwidth, so
      the new logic will return BitCast as before.
      
      llvm-svn: 131530
      a8514535
  10. May 11, 2011
  11. Apr 28, 2011
  12. Apr 21, 2011
  13. Apr 15, 2011
  14. Apr 11, 2011
  15. Apr 01, 2011
  16. Mar 31, 2011
  17. Mar 30, 2011
  18. Mar 17, 2011
  19. Mar 02, 2011
  20. Feb 21, 2011
  21. Feb 20, 2011
  22. Feb 11, 2011
  23. Feb 04, 2011
  24. Feb 03, 2011
  25. Feb 02, 2011
    • Duncan Sands's avatar
      Remove NoVendor and NoOS, added in commit 123990, from Triple. While it · fdfdbd09
      Duncan Sands authored
      may be useful to understand "none", this is not the place for it.  Tweak
      the fix to Normalize while there: the fix added in 123990 works correctly,
      but I like this way better.  Finally, now that Triple understands some
      non-trivial environment values, teach the unittests about them.
      
      llvm-svn: 124720
      fdfdbd09
  26. Jan 27, 2011
    • Chris Lattner's avatar
      · 2114b762
      Chris Lattner authored
      Don't infinitely recurse!  Patch by Marius Wachtler!
      
      llvm-svn: 124366
      2114b762
  27. Jan 21, 2011
    • Renato Golin's avatar
      Clang was not parsing target triples involving EABI and was generating wrong... · 83758d5c
      Renato Golin authored
      Clang was not parsing target triples involving EABI and was generating wrong IR (wrong PCS) and passing the wrong information down llc via the target-triple printed in IR. I've fixed this by adding the parsing of EABI into LLVM's Triple class and using it to choose the correct PCS in Clang's Tools. A Clang patch is on its way to use this infrastructure.
      
      llvm-svn: 123990
      83758d5c
  28. Jan 15, 2011
  29. Jan 13, 2011
  30. Jan 08, 2011
    • Rafael Espindola's avatar
      First step in fixing PR8927: · 45e6c195
      Rafael Espindola authored
      Add a unnamed_addr bit to global variables and functions. This will be used
      to indicate that the address is not significant and therefore the constant
      or function can be merged with others.
      
      If an optimization pass can show that an address is not used, it can set this.
      
      Examples of things that can have this set by the FE are globals created to
      hold string literals and C++ constructors.
      
      Adding unnamed_addr to a non-const global should have no effect unless
      an optimization can transform that global into a constant.
      
      Aliases are not allowed to have unnamed_addr since I couldn't figure
      out any use for it.
      
      llvm-svn: 123063
      45e6c195
Loading