Skip to content
  1. Feb 26, 2013
    • Kostya Serebryany's avatar
      Unify clang/llvm attributes for asan/tsan/msan (LLVM part) · cf880b94
      Kostya Serebryany authored
      These are two related changes (one in llvm, one in clang).
      LLVM: 
      - rename address_safety => sanitize_address (the enum value is the same, so we preserve binary compatibility with old bitcode)
      - rename thread_safety => sanitize_thread
      - rename no_uninitialized_checks -> sanitize_memory
      
      CLANG: 
      - add __attribute__((no_sanitize_address)) as a synonym for __attribute__((no_address_safety_analysis))
      - add __attribute__((no_sanitize_thread))
      - add __attribute__((no_sanitize_memory))
      
      for S in address thread memory
      If -fsanitize=S is present and __attribute__((no_sanitize_S)) is not
      set llvm attribute sanitize_S
      
      llvm-svn: 176075
      cf880b94
  2. Feb 11, 2013
  3. Sep 05, 2012
  4. Aug 10, 2012
    • Chad Rosier's avatar
      [ms-inline asm] Add a new Inline Asm Non-Standard Dialect attribute. · 09f74b55
      Chad Rosier authored
      This new attribute is intended to be used by the backend to determine how
      the inline asm string should be parsed/printed. This patch adds the 
      ia_nsdialect attribute and also adds a test case to ensure the IR is
      correctly parsed, but there is no functional change at this time.
      
      The standard dialect is assumed to be AT&T.  Therefore, this attribute
      should only be added to MS-style inline assembly statements, which use
      the Intel dialect.  If we ever support more dialects we'll need to
      add additional state to the attribute.
      
      llvm-svn: 161641
      09f74b55
  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. Oct 04, 2011
  7. 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
  8. Aug 29, 2010
  9. Aug 04, 2010
  10. May 04, 2010
  11. Mar 01, 2010
  12. 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
  13. Jan 15, 2010
  14. Aug 26, 2009
  15. Jul 27, 2009
  16. Jul 23, 2009
  17. Jul 17, 2009
  18. Jul 08, 2009
  19. Jun 05, 2009
  20. Mar 30, 2009
  21. Mar 11, 2009
  22. 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
  23. Jan 06, 2009
  24. Jan 05, 2009
  25. Sep 15, 2008
  26. Jun 09, 2008
  27. Jun 02, 2008
  28. May 23, 2008
Loading