Skip to content
  1. Jan 26, 2012
  2. Jan 24, 2012
  3. Jan 22, 2012
  4. Jan 21, 2012
  5. Jan 20, 2012
    • Kostya Serebryany's avatar
      Extend Attributes to 64 bits · a5054ad2
      Kostya Serebryany authored
      Problem: LLVM needs more function attributes than currently available (32 bits).
      One such proposed attribute is "address_safety", which shows that a function is being checked for address safety (by AddressSanitizer, SAFECode, etc).
      
      Solution:
      - extend the Attributes from 32 bits to 64-bits
      - wrap the object into a class so that unsigned is never erroneously used instead
      - change "unsigned" to "Attributes" throughout the code, including one place in clang.
      - the class has no "operator uint64 ()", but it has "uint64_t Raw() " to support packing/unpacking.
      - the class has "safe operator bool()" to support the common idiom:  if (Attributes attr = getAttrs()) useAttrs(attr);
      - The CTOR from uint64_t is marked explicit, so I had to add a few explicit CTOR calls
      - Add the new attribute "address_safety". Doing it in the same commit to check that attributes beyond first 32 bits actually work.
      - Some of the functions from the Attribute namespace are worth moving inside the class, but I'd prefer to have it as a separate commit.
      
      Tested:
      "make check" on Linux (32-bit and 64-bit) and Mac (10.6)
      built/run spec CPU 2006 on Linux with clang -O2.
      
      
      This change will break clang build in lib/CodeGen/CGCall.cpp.
      The following patch will fix it.
      
      llvm-svn: 148553
      a5054ad2
  6. Jan 18, 2012
  7. Jan 17, 2012
  8. Jan 13, 2012
  9. Jan 11, 2012
  10. Jan 10, 2012
  11. Jan 09, 2012
  12. Jan 07, 2012
  13. Jan 06, 2012
  14. Jan 05, 2012
  15. Jan 04, 2012
  16. Dec 30, 2011
  17. Dec 22, 2011
  18. Dec 21, 2011
  19. Dec 20, 2011
Loading