Skip to content
  1. Nov 14, 2016
  2. Nov 10, 2016
  3. Oct 31, 2016
    • Victor Leschuk's avatar
      DebugInfo: make DW_TAG_atomic_type valid · e1156c2e
      Victor Leschuk authored
      DW_TAG_atomic_type was already included in Dwarf.defs and emitted correctly,
      however Verifier didn't recognize it as valid.
      Thus we introduce the following changes:
      
        * Make DW_TAG_atomic_type valid tag for IR and DWARF (enabled only with -gdwarf-5)
        * Add it to related docs
        * Add DebugInfo tests
      
      Differential Revision: https://reviews.llvm.org/D26144
      
      llvm-svn: 285624
      e1156c2e
  4. Oct 13, 2016
  5. Oct 08, 2016
  6. Sep 19, 2016
  7. Sep 18, 2016
  8. Sep 15, 2016
  9. Sep 10, 2016
  10. Sep 08, 2016
    • Reid Kleckner's avatar
      Remove restriction that 'sret' must be on the first parameter · 1361c0c6
      Reid Kleckner authored
      On Windows, it is often applied to the second parameter, and the x86
      backend is prepared to deal with sret appearing on any parameter.
      
      Other backends assume it only appears on parameter zero, but those are
      target-specific requirements, and not an IR-level rule.
      
      llvm-svn: 280951
      1361c0c6
  11. Aug 31, 2016
  12. Aug 30, 2016
    • Peter Zotov's avatar
      docs: mention that clobbering output regs in inline asm is illegal. · 00257231
      Peter Zotov authored
      I've found this out the hard way; LLVM will not normally catch this
      error (unless -verify-machineinstrs is passed), and under certain
      very specific circumstances (such as register scavenger running
      under pressure) this would result in an opaque crash in codegen.
      
      llvm-svn: 280071
      00257231
  13. Aug 14, 2016
  14. Aug 10, 2016
  15. Aug 08, 2016
    • Charles Davis's avatar
      Revert "[X86] Support the "ms-hotpatch" attribute." · e9c32c7e
      Charles Davis authored
      This reverts commit r278048. Something changed between the last time I
      built this--it takes awhile on my ridiculously slow and ancient
      computer--and now that broke this.
      
      llvm-svn: 278053
      e9c32c7e
    • Charles Davis's avatar
      [X86] Support the "ms-hotpatch" attribute. · 0822aa11
      Charles Davis authored
      Summary:
      Based on two patches by Michael Mueller.
      
      This is a target attribute that causes a function marked with it to be
      emitted as "hotpatchable". This particular mechanism was originally
      devised by Microsoft for patching their binaries (which they are
      constantly updating to stay ahead of crackers, script kiddies, and other
      ne'er-do-wells on the Internet), but is now commonly abused by Windows
      programs to hook API functions.
      
      This mechanism is target-specific. For x86, a two-byte no-op instruction
      is emitted at the function's entry point; the entry point must be
      immediately preceded by 64 (32-bit) or 128 (64-bit) bytes of padding.
      This padding is where the patch code is written. The two byte no-op is
      then overwritten with a short jump into this code. The no-op is usually
      a `movl %edi, %edi` instruction; this is used as a magic value
      indicating that this is a hotpatchable function.
      
      Reviewers: majnemer, sanjoy, rnk
      
      Subscribers: dberris, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D19908
      
      llvm-svn: 278048
      0822aa11
  16. Jul 29, 2016
    • Sanjoy Das's avatar
      [IR] Introduce a non-integral pointer type · c6af5ead
      Sanjoy Das authored
      Summary:
      This change adds a `ni` specifier in the `datalayout` string to denote
      pointers in some given address spaces as "non-integral", and adds some
      typing rules around these special pointers.
      
      Reviewers: majnemer, chandlerc, atrick, dberlin, eli.friedman, tstellarAMD, arsenm
      
      Subscribers: arsenm, mcrosier, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D22488
      
      llvm-svn: 277085
      c6af5ead
  17. Jul 28, 2016
  18. Jul 27, 2016
  19. Jul 22, 2016
    • Anna Thomas's avatar
      Invariant start/end intrinsics overloaded for address space · 0be4a0e6
      Anna Thomas authored
      Summary:
      The llvm.invariant.start and llvm.invariant.end intrinsics currently
      support specifying invariant memory objects only in the default address
      space.
      
      With this change, these intrinsics are overloaded for any adddress space
      for memory objects
      and we can use these llvm invariant intrinsics in non-default address
      spaces.
      
      Example: llvm.invariant.start.p1i8(i64 4, i8 addrspace(1)* %ptr)
      
      This overloaded intrinsic is needed for representing final or invariant
      memory in managed languages.
      
      Reviewers: apilipenko, reames
      
      Subscribers: llvm-commits
      llvm-svn: 276447
      0be4a0e6
  20. Jul 21, 2016
    • Anna Thomas's avatar
      Revert "Invariant start/end intrinsics overloaded for address space" · c858faa2
      Anna Thomas authored
      This reverts commit r276316.
      
      llvm-svn: 276320
      c858faa2
    • Anna Thomas's avatar
      Invariant start/end intrinsics overloaded for address space · 29b24dfe
      Anna Thomas authored
      Summary:
      The llvm.invariant.start and llvm.invariant.end intrinsics currently
      support specifying invariant memory objects only in the default address space.
      
      With this change, these intrinsics are overloaded for any adddress space for memory objects
      and we can use these llvm invariant intrinsics in non-default address spaces.
      
      Example: llvm.invariant.start.p1i8(i64 4, i8 addrspace(1)* %ptr)
      
      This overloaded intrinsic is needed for representing final or invariant memory in managed languages.
      
      Reviewers: tstellarAMD, reames, apilipenko
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D22519
      
      llvm-svn: 276316
      29b24dfe
  21. Jul 20, 2016
    • Renato Golin's avatar
      [docs] Fixing Sphinx warnings to unclog the buildbot · 124f2593
      Renato Golin authored
      Lots of blocks had "llvm" or "nasm" syntax types but either weren't following
      the syntax, or the syntax has changed (and sphinx hasn't keep up) or the type
      doesn't even exist (nasm?).
      
      Other documents had :options: what were invalid. I only removed those that had
      warnings, and left the ones that didn't, in order to follow the principle of
      least surprise.
      
      This is like this for ages, but the buildbot is now failing on errors. It may
      take a while to upgrade the buildbot's sphinx, if that's even possible, but
      that shouldn't stop us from getting docs updates (which seem down for quite
      a while).
      
      Also, we're not losing any syntax highlight, since when it doesn't parse, it
      doesn't colour. Ie. those blocks are not being highlighted anyway.
      
      I'm trying to get all docs in one go, so that it's easy to revert later if we
      do fix, or at least easy to know what's to fix.
      
      llvm-svn: 276109
      124f2593
  22. Jul 13, 2016
  23. Jul 10, 2016
    • Hal Finkel's avatar
      Update the LangRef description of the 'returned' attribute · 3b66caa2
      Hal Finkel authored
      The description of the 'returned' attribute says that it is only used when
      code-generating the caller. I'd like to make the optimizer smarter about
      looking through functions with returned arguments (generally, but motivated by
      my llvm.noalias work). As David pointed out in the review of D22202, the
      LangRef should be updated to make its expanded uses clearer.
      
      Differential Revision: http://reviews.llvm.org/D22205
      
      llvm-svn: 275026
      3b66caa2
  24. Jul 06, 2016
  25. Jul 04, 2016
    • Nicolai Haehnle's avatar
      Add writeonly IR attribute · 84c9f991
      Nicolai Haehnle authored
      Summary:
      This complements the earlier addition of IntrWriteMem and IntrWriteArgMem
      LLVM intrinsic properties, see D18291.
      
      Also start using the attribute for memset, memcpy, and memmove intrinsics,
      and remove their special-casing in BasicAliasAnalysis.
      
      Reviewers: reames, joker.eph
      
      Subscribers: joker.eph, llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D18714
      
      llvm-svn: 274485
      84c9f991
  26. Jul 02, 2016
  27. Jun 28, 2016
    • Artur Pilipenko's avatar
      Support arbitrary addrspace pointers in masked load/store intrinsics · 7ad95ec2
      Artur Pilipenko authored
      This is a resubmittion of 263158 change after fixing the existing problem with intrinsics mangling (see LTO and intrinsics mangling llvm-dev thread for details).
      
      This patch fixes the problem which occurs when loop-vectorize tries to use @llvm.masked.load/store intrinsic for a non-default addrspace pointer. It fails with "Calling a function with a bad signature!" assertion in CallInst constructor because it tries to pass a non-default addrspace pointer to the pointer argument which has default addrspace.
      
      The fix is to add pointer type as another overloaded type to @llvm.masked.load/store intrinsics.
      
      Reviewed By: reames
      
      Differential Revision: http://reviews.llvm.org/D17270
      
      llvm-svn: 274043
      7ad95ec2
  28. Jun 27, 2016
    • Matt Arsenault's avatar
      Verifier: Reject non-float !fpmath · 82f41518
      Matt Arsenault authored
      Code already assumes this is float. getFPAccuracy()
      crashes on any other type.
      
      llvm-svn: 273912
      82f41518
    • Artur Pilipenko's avatar
      Revert -r273892 "Support arbitrary addrspace pointers in masked load/store... · 72f76b88
      Artur Pilipenko authored
      Revert -r273892 "Support arbitrary addrspace pointers in masked load/store intrinsics" since some of the clang tests don't expect to see the updated signatures. 
      
      llvm-svn: 273895
      72f76b88
    • Artur Pilipenko's avatar
      Support arbitrary addrspace pointers in masked load/store intrinsics · a36aa415
      Artur Pilipenko authored
      This is a resubmittion of 263158 change after fixing the existing problem with intrinsics mangling (see LTO and intrinsics mangling llvm-dev thread for details).
      
      This patch fixes the problem which occurs when loop-vectorize tries to use @llvm.masked.load/store intrinsic for a non-default addrspace pointer. It fails with "Calling a function with a bad signature!" assertion in CallInst constructor because it tries to pass a non-default addrspace pointer to the pointer argument which has default addrspace.
      
      The fix is to add pointer type as another overloaded type to @llvm.masked.load/store intrinsics.
      
      Reviewed By: reames
      
      Differential Revision: http://reviews.llvm.org/D17270
      
      llvm-svn: 273892
      a36aa415
  29. Jun 25, 2016
    • Peter Collingbourne's avatar
      IR: Introduce llvm.type.checked.load intrinsic. · 0312f614
      Peter Collingbourne authored
      This intrinsic safely loads a function pointer from a virtual table pointer
      using type metadata. This intrinsic is used to implement control flow integrity
      in conjunction with virtual call optimization. The virtual call optimization
      pass will optimize away llvm.type.checked.load intrinsics associated with
      devirtualized calls, thereby removing the type check in cases where it is
      not needed to enforce the control flow integrity constraint.
      
      This patch also introduces the capability to copy type metadata between
      global variables, and teaches the virtual call optimization pass to do so.
      
      Differential Revision: http://reviews.llvm.org/D21121
      
      llvm-svn: 273756
      0312f614
  30. Jun 24, 2016
    • Peter Collingbourne's avatar
      IR: New representation for CFI and virtual call optimization pass metadata. · 7efd7506
      Peter Collingbourne authored
      The bitset metadata currently used in LLVM has a few problems:
      
      1. It has the wrong name. The name "bitset" refers to an implementation
         detail of one use of the metadata (i.e. its original use case, CFI).
         This makes it harder to understand, as the name makes no sense in the
         context of virtual call optimization.
      
      2. It is represented using a global named metadata node, rather than
         being directly associated with a global. This makes it harder to
         manipulate the metadata when rebuilding global variables, summarise it
         as part of ThinLTO and drop unused metadata when associated globals are
         dropped. For this reason, CFI does not currently work correctly when
         both CFI and vcall opt are enabled, as vcall opt needs to rebuild vtable
         globals, and fails to associate metadata with the rebuilt globals. As I
         understand it, the same problem could also affect ASan, which rebuilds
         globals with a red zone.
      
      This patch solves both of those problems in the following way:
      
      1. Rename the metadata to "type metadata". This new name reflects how
         the metadata is currently being used (i.e. to represent type information
         for CFI and vtable opt). The new name is reflected in the name for the
         associated intrinsic (llvm.type.test) and pass (LowerTypeTests).
      
      2. Attach metadata directly to the globals that it pertains to, rather
         than using the "llvm.bitsets" global metadata node as we are doing now.
         This is done using the newly introduced capability to attach
         metadata to global variables (r271348 and r271358).
      
      See also: http://lists.llvm.org/pipermail/llvm-dev/2016-June/100462.html
      
      Differential Revision: http://reviews.llvm.org/D21053
      
      llvm-svn: 273729
      7efd7506
  31. Jun 16, 2016
  32. Jun 14, 2016
    • Peter Collingbourne's avatar
      IR: Introduce local_unnamed_addr attribute. · 96efdd61
      Peter Collingbourne authored
      If a local_unnamed_addr attribute is attached to a global, the address
      is known to be insignificant within the module. It is distinct from the
      existing unnamed_addr attribute in that it only describes a local property
      of the module rather than a global property of the symbol.
      
      This attribute is intended to be used by the code generator and LTO to allow
      the linker to decide whether the global needs to be in the symbol table. It is
      possible to exclude a global from the symbol table if three things are true:
      - This attribute is present on every instance of the global (which means that
        the normal rule that the global must have a unique address can be broken without
        being observable by the program by performing comparisons against the global's
        address)
      - The global has linkonce_odr linkage (which means that each linkage unit must have
        its own copy of the global if it requires one, and the copy in each linkage unit
        must be the same)
      - It is a constant or a function (which means that the program cannot observe that
        the unique-address rule has been broken by writing to the global)
      
      Although this attribute could in principle be computed from the module
      contents, LTO clients (i.e. linkers) will normally need to be able to compute
      this property as part of symbol resolution, and it would be inefficient to
      materialize every module just to compute it.
      
      See:
      http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160509/356401.html
      http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160516/356738.html
      for earlier discussion.
      
      Part of the fix for PR27553.
      
      Differential Revision: http://reviews.llvm.org/D20348
      
      llvm-svn: 272709
      96efdd61
  33. Jun 13, 2016
    • Ulrich Weigand's avatar
      [SystemZ] Enable index register memory constraints for inline ASM · daae87aa
      Ulrich Weigand authored
      This enables use of the 'R' and 'T' memory constraints for inline ASM
      operands on SystemZ, which allow an index register as well as an
      immediate displacement. This patch includes corresponding documentation
      and test case updates.
      
      As with the last patch of this kind, I moved the 'm' constraint to the
      most general case, which is now 'T' (base + 20-bit signed displacement +
      index register).
      
      Author: colpell
      Differential Revision: http://reviews.llvm.org/D21239
      
      llvm-svn: 272547
      daae87aa
Loading