Skip to content
  1. Jan 12, 2018
  2. Jan 11, 2018
    • Matthias Braun's avatar
      PeepholeOpt cleanup/refactor; NFC · bfd9c4a4
      Matthias Braun authored
      - Less unnecessary use of `auto`
      - Add early `using RegSubRegPair(AndIdx) =` to avoid countless
        `TargetInstrInfo::` qualifications.
      - Use references instead of pointers where possible.
      - Remove unused parameters.
      - Rewrite the CopyRewriter class hierarchy:
         - Pull out uncoalescable copy rewriting functionality into
           PeepholeOptimizer class.
         - Use an abstract base class to make it clear that rewriters are
           independent.
      - Remove unnecessary \brief in doxygen comments.
      - Remove unused constructor and method from ValueTracker.
      - Replace UseAdvancedTracking of ValueTracker with DisableAdvCopyOpt use.
      
      llvm-svn: 322325
      bfd9c4a4
    • Evgeniy Stepanov's avatar
      [hwasan] Stack instrumentation. · 99fa3e77
      Evgeniy Stepanov authored
      Summary:
      Very basic stack instrumentation using tagged pointers.
      Tag for N'th alloca in a function is built as XOR of:
       * base tag for the function, which is just some bits of SP (poor
         man's random)
       * small constant which is a function of N.
      
      Allocas are aligned to 16 bytes. On every ReturnInst allocas are
      re-tagged to catch use-after-return.
      
      This implementation has a bunch of issues that will be taken care of
      later:
      1. lifetime intrinsics referring to tagged pointers are not
         recognized in SDAG. This effectively disables stack coloring.
      2. Generated code is quite inefficient. There is one extra
         instruction at each memory access that adds the base tag to the
         untagged alloca address. It would be better to keep tagged SP in a
         callee-saved register and address allocas as an offset of that XOR
         retag, but that needs better coordination between hwasan
         instrumentation pass and prologue/epilogue insertion.
      3. Lifetime instrinsics are ignored and use-after-scope is not
         implemented. This would be harder to do than in ASan, because we
         need to use a differently tagged pointer depending on which
         lifetime.start / lifetime.end the current instruction is dominated
         / post-dominated.
      
      Reviewers: kcc, alekseyshl
      
      Subscribers: srhines, kubamracek, javed.absar, hiraditya, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D41602
      
      llvm-svn: 322324
      99fa3e77
    • Sanjay Patel's avatar
      [InstSimplify] add tests for implied cmp with zero (PR35790); NFC · ac0edcb3
      Sanjay Patel authored
      llvm-svn: 322323
      ac0edcb3
    • Davide Italiano's avatar
      [testsuite] Remove a broken test which tried to find App in bundles. · 4bec480f
      Davide Italiano authored
      That never really worked, and the change associated isn't yet
      committed, so, let's try to make the bots green for now.
      
      llvm-svn: 322322
      4bec480f
    • Sam Clegg's avatar
    • Sam Clegg's avatar
      [WebAssembly] When loading libraries look for companion `.imports` file · 31efdcd7
      Sam Clegg authored
      This allows libraries to supply a list of symbols which are
      allowed to be undefined at link time (i.e. result in imports).
      
      This method replaces the existing mechanism (-allow-undefined-file)
      used by the clang driver to allow undefined symbols in libc.
      
      For more on motivation for this see:
       https://github.com/WebAssembly/tool-conventions/issues/35
      
      In the long run we hope to remove this features and instead
      include this information in the object format itself.
      
      Differential Revision: https://reviews.llvm.org/D41922
      
      llvm-svn: 322320
      31efdcd7
    • Matthias Braun's avatar
      PeepholeOptimizer: Fix for vregs without defs · ea4359e9
      Matthias Braun authored
      The PeepholeOptimizer would fail for vregs without a definition. If this
      was caused by an undef operand abort to keep the code simple (so we
      don't need to add logic everywhere to replicate the undef flag).
      
      Differential Revision: https://reviews.llvm.org/D40763
      
      llvm-svn: 322319
      ea4359e9
    • Rafael Espindola's avatar
      Make internal/private GVs implicitly dso_local. · cbca487f
      Rafael Espindola authored
      While updating clang tests for having clang set dso_local I noticed
      that:
      
      - There are *a lot* of tests to update.
      - Many of the updates are redundant.
      
      They are redundant because a GV is "obviously dso_local". This patch
      starts formalizing that a bit by requiring that internal and private
      GVs be dso_local too. Since they all are, we don't have to print
      dso_local to the textual representation, making it a bit more compact
      and easier to read.
      
      llvm-svn: 322318
      cbca487f
Loading