1. Sep 01, 2014
    • Yuri Gorshenin's avatar
      [asan-assembly-instrumentation] Prologue and epilogue are moved out from InstrumentMemOperand(). · c107d147
      Yuri Gorshenin authored
      Reviewers: eugenis
      
      Subscribers: llvm-commits
      
      Differential revision: http://reviews.llvm.org/D4923
      
      llvm-svn: 216879
      c107d147
    • Dmitry Vyukov's avatar
      tsan: fix false positive related to signal handlers · 34fb3799
      Dmitry Vyukov authored
      Users expect synchronization between sigaction and arrival
      of the signal. See the test for details.
      
      llvm-svn: 216878
      34fb3799
    • Alexander Potapenko's avatar
      [ASan] Small refactoring - split the slow unwinding logic into sanitizer_unwind_posix.cc · 4d849961
      Alexander Potapenko authored
      This allows the slow unwinder to be used on OSX (it's disabled for now, see
      https://code.google.com/p/address-sanitizer/issues/detail?id=137 for details)
      
      llvm-svn: 216877
      4d849961
    • Alexander Potapenko's avatar
      Typo fix, no functionality change. · c8e749a5
      Alexander Potapenko authored
      llvm-svn: 216876
      c8e749a5
    • Dmitry Vyukov's avatar
      tsan: unbreak windows build · aa8fa60b
      Dmitry Vyukov authored
      Currently it fails with:
      
      # Testing race detector.
      race_windows_amd64.syso:gotsan.cc:(.text+0x4d89): undefined reference to `__imp_SymGetModuleBase64'
      race_windows_amd64.syso:gotsan.cc:(.text+0x4d90): undefined reference to `__imp_SymFunctionTableAccess64'
      race_windows_amd64.syso:gotsan.cc:(.text+0x4dd8): undefined reference to `__imp_StackWalk64'
      x86_64-w64-mingw32/bin/ld.exe: race_windows_amd64.syso
      : bad reloc address 0x10 in section `.data'
      collect2.exe: error: ld returned 1 exit status
      
      llvm-svn: 216875
      aa8fa60b
    • Renato Golin's avatar
      Thumb2 M-class MSR instruction support changes · 92c816c6
      Renato Golin authored
      This patch implements a few changes related to the Thumb2 M-class MSR instruction:
       * better handling of unpredictable encodings,
       * recognition of the _g and _nzcvqg variants by the asm parser only if the DSP
         extension is available, preferred output of MSR APSR moves with the _<bits>
         suffix for v7-M.
      
      Patch by Petr Pavlu.
      
      llvm-svn: 216874
      92c816c6
    • Patrik Hagglund's avatar
      Fix in InlineSpiller to make the rematerilization loop also consider · 296acbfe
      Patrik Hagglund authored
      implicit uses of the whole register when a sub register is defined.
      
      Now the same iterator is used in the rematerilization loop as in the
      spill loop later.
      
      Patch provided by Mikael Holmen.
      
      This fix was proposed and reviewed by Quentin Colombet,
      http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-August/076135.html.
      
      Unfortunately, this error in the rematerilization code has only been
      seen in a large test case for an out-of-tree target, and is probably
      hard to reproduce on an in-tree target. Therefore, no testcase is
      provided.
      
      llvm-svn: 216873
      296acbfe
    • Yuri Gorshenin's avatar
      Revert "[asan-assembly-instrumentation] Prologue and epilogue are moved out... · e2f01eb7
      Yuri Gorshenin authored
      Revert "[asan-assembly-instrumentation] Prologue and epilogue are moved out from InstrumentMemOperand()."
      
      This reverts commit 895aa397038b8de86d83ac0997a70949a486e112.
      
      llvm-svn: 216872
      e2f01eb7
    • Chandler Carruth's avatar
      Fix a really bad miscompile introduced in r216865 - the else-if logic · 18cee1de
      Chandler Carruth authored
      chain became completely broken here as *all* intrinsic users ended up
      being skipped, and the ones that seemed to be singled out were actually
      the exact wrong set.
      
      This is a great example of why long else-if chains can be easily
      confusing. Switch the entire code to use early exits and early continues
      to have simpler (and more importantly, correct) logic here, as well as
      fixing the reversed logic for detecting and continuing on lifetime
      intrinsics.
      
      I've also significantly cleaned up the test case and added another test
      case demonstrating an example where the optimization is not (trivially)
      safe to perform.
      
      llvm-svn: 216871
      18cee1de
    • Renato Golin's avatar
      Small refactor on VectorizerHint for deduplication · 86a6c3f2
      Renato Golin authored
      Previously, the hint mechanism relied on clean up passes to remove redundant
      metadata, which still showed up if running opt at low levels of optimization.
      That also has shown that multiple nodes of the same type, but with different
      values could still coexist, even if temporary, and cause confusion if the
      next pass got the wrong value.
      
      This patch makes sure that, if metadata already exists in a loop, the hint
      mechanism will never append a new node, but always replace the existing one.
      It also enhances the algorithm to cope with more metadata types in the future
      by just adding a new type, not a lot of code.
      
      Re-applying again due to MSVC 2013 being minimum requirement, and this patch
      having C++11 that MSVC 2012 didn't support.
      
      Fixes PR20655.
      
      llvm-svn: 216870
      86a6c3f2
    • Yuri Gorshenin's avatar
    • Benjamin Kramer's avatar
    • Matthew Gardiner's avatar
      Add an interface on ArchSpec to provide lldb client code · e77b2948
      Matthew Gardiner authored
      with a mechanism to query if the current target architecture
      has non 8-bit bytes.
      
      llvm-svn: 216867
      e77b2948
    • Hal Finkel's avatar
      Feed AA to the inliner and use AA->getModRefBehavior in AddAliasScopeMetadata · 0c083024
      Hal Finkel authored
      This feeds AA through the IFI structure into the inliner so that
      AddAliasScopeMetadata can use AA->getModRefBehavior to figure out which
      functions only access their arguments (instead of just hard-coding some
      knowledge of memory intrinsics). Most of the information is only available from
      BasicAA; this is important for preserving alias scoping information for
      target-specific intrinsics when doing the noalias parameter attribute to
      metadata conversion.
      
      llvm-svn: 216866
      0c083024
    • Nick Lewycky's avatar
      Ignore lifetime intrinsics in use list for MemCpyOptimizer. Patch by Luqman... · fc243d54
      Nick Lewycky authored
      Ignore lifetime intrinsics in use list for MemCpyOptimizer. Patch by Luqman Aden, review by Hal Finkel.
      
      llvm-svn: 216865
      fc243d54
    • Nick Lewycky's avatar
      Remove an errant outer loop that contains nothing but an inner loop over... · 97756409
      Nick Lewycky authored
      Remove an errant outer loop that contains nothing but an inner loop over exactly the same elements. While no functionality is change intended (and hence there are no changes to tests), you don't want to skip this revision if bisecting for errors.
      
      llvm-svn: 216864
      97756409
    • Hal Finkel's avatar
      Fix AddAliasScopeMetadata again - alias.scope must be a complete description · cbb85f24
      Hal Finkel authored
      I thought that I had fixed this problem in r216818, but I did not do a very
      good job. The underlying issue is that when we add alias.scope metadata we are
      asserting that this metadata completely describes the aliasing relationships
      within the current aliasing scope domain, and so in the context of translating
      noalias argument attributes, the pointers must all be based on noalias
      arguments (as underlying objects) and have no other kind of underlying object.
      In r216818 excluding appropriate accesses from getting alias.scope metadata is
      done by looking for underlying objects that are not identified function-local
      objects -- but that's wrong because allocas, etc. are also function-local
      objects and we need to explicitly check that all underlying objects are the
      noalias arguments for which we're adding metadata aliasing scopes.
      
      This fixes the underlying-object check for adding alias.scope metadata, and
      does some refactoring of the related capture-checking eligibility logic (and
      adds more comments; hopefully making everything a bit clearer).
      
      Fixes self-hosting on x86_64 with -mllvm -enable-noalias-to-md-conversion (the
      feature is still disabled by default).
      
      llvm-svn: 216863
      cbb85f24
    • Jingyue Wu's avatar
      [MachineSink] Use the real post dominator tree · 5208cc5d
      Jingyue Wu authored
      Summary:
      Fixes a FIXME in MachineSinking. Instead of using the simple heuristics
      in isPostDominatedBy, use the real MachinePostDominatorTree. The old
      heuristics caused instructions to sink unnecessarily, and might create
      register pressure.
      
      Test Plan:
      Added a NVPTX codegen test to verify that our change is in effect. It also
      shows the unnecessary register pressure caused by over-sinking. Updated
      affected tests in AArch64 and X86.
      
      Reviewers: eliben, meheff, Jiangning
      
      Reviewed By: Jiangning
      
      Subscribers: jholewinski, aemerson, mcrosier, llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D4814
      
      llvm-svn: 216862
      5208cc5d
    • David Blaikie's avatar
      DebugInfo: Elide lexical scopes which only contain other (inline or lexical) scopes. · 6a150a87
      David Blaikie authored
      DW_TAG_lexical_scopes inform debuggers about the instruction range for
      which a given variable (or imported declaration/module/etc) is valid. If
      the scope doesn't itself contain any such entities, it's a waste of
      space and should be omitted.
      
      We were correctly doing this for entirely empty leaves, but not for
      intermediate nodes.
      
      Reduces total (not just debug sections) .o file size for a bootstrap
      -gmlt LLVM by 22% and bootstrap -gmlt clang executable by 13%. The wins
      for a full -g build will be less as a % (and in absolute terms), but
      should still be substantial - with some of that win being fewer
      relocations, thus more substantiall reducing link times than fewer bytes
      alone would have.
      
      llvm-svn: 216861
      6a150a87
    • Matt Arsenault's avatar
      Consider addrspaces in canLosslesslyBitCastTo() · a8efaf96
      Matt Arsenault authored
      Make this conservatively correct and report false for different
      address spaces, which might require a nontrivial translation.
      
      Based on the few uses of this, I don't think this currently
      breaks anything.
      
      llvm-svn: 216846
      a8efaf96
    • David Blaikie's avatar
      DebugInfo: Move argument creation up into the caller that's unambiguously... · 3fbf3b85
      David Blaikie authored
      DebugInfo: Move argument creation up into the caller that's unambiguously handling the subprogram scope (replacing a conditional with an assertion in the process)
      
      llvm-svn: 216845
      3fbf3b85
    • Tobias Grosser's avatar
      Fix formatting · 6a4d3f74
      Tobias Grosser authored
      llvm-svn: 216844
      6a4d3f74
    • Tobias Grosser's avatar
      Introduce a typedef for the IDToValue type · 566ad58f
      Tobias Grosser authored
      llvm-svn: 216843
      566ad58f
    • Tobias Grosser's avatar
      Use range based for loops · 1fee67d6
      Tobias Grosser authored
      llvm-svn: 216842
      1fee67d6
  2. Aug 31, 2014