Skip to content
  1. 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
  2. Oct 04, 2011
  3. Jun 15, 2011
    • John McCall's avatar
      Add a new function attribute, nonlazybind, which inhibits lazy-loading · 4b7a8d68
      John McCall authored
      optimizations when emitting calls to the function;  instead those calls may
      use faster relocations which require the function to be immediately resolved
      upon loading the dynamic object featuring the call.  This is useful when it
      is known that the function will be called frequently and pervasively and
      therefore there is no merit in delaying binding of the function.
      
      Currently only implemented for x86-64, where it turns into a call through
      the global offset table.
      
      Patch by Dan Gohman, who assures me that he's going to add LangRef documentation
      for this once it's committed.
      
      llvm-svn: 133080
      4b7a8d68
  4. Aug 29, 2010
  5. Aug 04, 2010
  6. May 04, 2010
  7. Mar 01, 2010
  8. Feb 06, 2010
    • Jakob Stoklund Olesen's avatar
      Reintroduce the InlineHint function attribute. · 74bb06c0
      Jakob Stoklund Olesen authored
      This time it's for real! I am going to hook this up in the frontends as well.
      
      The inliner has some experimental heuristics for dealing with the inline hint.
      When given a -respect-inlinehint option, functions marked with the inline
      keyword are given a threshold just above the default for -O3.
      
      We need some experiments to determine if that is the right thing to do.
      
      llvm-svn: 95466
      74bb06c0
  9. Jan 15, 2010
  10. Aug 26, 2009
  11. Jul 27, 2009
  12. Jul 23, 2009
  13. Jul 17, 2009
  14. Jul 08, 2009
  15. Jun 05, 2009
  16. Mar 30, 2009
  17. Mar 11, 2009
  18. Mar 07, 2009
    • Duncan Sands's avatar
      Introduce new linkage types linkonce_odr, weak_odr, common_odr · 12da8ce3
      Duncan Sands authored
      and extern_weak_odr.  These are the same as the non-odr versions,
      except that they indicate that the global will only be overridden
      by an *equivalent* global.  In C, a function with weak linkage can
      be overridden by a function which behaves completely differently.
      This means that IP passes have to skip weak functions, since any
      deductions made from the function definition might be wrong, since
      the definition could be replaced by something completely different
      at link time.   This is not allowed in C++, thanks to the ODR
      (One-Definition-Rule): if a function is replaced by another at
      link-time, then the new function must be the same as the original
      function.  If a language knows that a function or other global can
      only be overridden by an equivalent global, it can give it the
      weak_odr linkage type, and the optimizers will understand that it
      is alright to make deductions based on the function body.  The
      code generators on the other hand map weak and weak_odr linkage
      to the same thing.
      
      llvm-svn: 66339
      12da8ce3
  19. Jan 06, 2009
  20. Jan 05, 2009
  21. Sep 15, 2008
  22. Jun 09, 2008
  23. Jun 02, 2008
  24. May 23, 2008
Loading