1. Sep 23, 2016
  2. Sep 22, 2016
    • Zachary Turner's avatar
      Speculative fix for build failures due to consumeInteger. · d5d57635
      Zachary Turner authored
      A recent patch added support for consumeInteger() and made
      getAsInteger delegate to this function.  A few buildbots are
      failing as a result with an assertion failure.  On a hunch,
      I tested what happens if I call getAsInteger() on an empty
      string, and sure enough it crashes the same way that the
      buildbots are crashing.
      
      I confirmed that getAsInteger() on an empty string did not
      crash before my patch, so I suspect this to be the cause.
      
      I also added a unit test for the empty string.
      
      llvm-svn: 282170
      d5d57635
    • Vedant Kumar's avatar
      [docs] Touch up the coverage docs some more · 74c3fd17
      Vedant Kumar authored
      llvm-svn: 282169
      74c3fd17
    • Sebastian Pop's avatar
      GVN-hoist: fix store past load dependence analysis (PR30216) · 8e6e3318
      Sebastian Pop authored
      To hoist stores past loads, we used to search for potential
      conflicting loads on the hoisting path by following a MemorySSA
      def-def link from the store to be hoisted to the previous
      defining memory access, and from there we followed the def-use
      chains to all the uses that occur on the hoisting path. The
      problem is that the def-def link may point to a store that does
      not alias with the store to be hoisted, and so the loads that are
      walked may not alias with the store to be hoisted, and even as in
      the testcase of PR30216, the loads that may alias with the store
      to be hoisted are not visited.
      
      The current patch visits all loads on the path from the store to
      be hoisted to the hoisting position and uses the alias analysis
      to ask whether the store may alias the load. I was not able to
      use the MemorySSA functionality to ask for whether load and
      store are clobbered: I'm not sure which function to call, so I
      used a call to AA->isNoAlias().
      
      Store past store is still working as before using a MemorySSA
      query: I added an extra test to pr30216.ll to make sure store
      past store does not regress.
      
      Differential Revision: https://reviews.llvm.org/D24517
      
      llvm-svn: 282168
      8e6e3318
    • Pavel Labath's avatar
      Fix TestBreakpointSerialization on windows · 2a66884f
      Pavel Labath authored
      The test exposed a bug in the StructuredData Serialization code, which did not
      escape the backslash properly. This manifested itself as windows breakpoint
      serialization roundtrip test not succeeding (as windows paths included
      backslashes).
      
      llvm-svn: 282167
      2a66884f
    • Rafael Espindola's avatar
      Simplify. NFC. · 26442083
      Rafael Espindola authored
      It doesn't matter which direction we rotate and we haven't really
      started optimizing the linker script code, so keep this simple.
      
      llvm-svn: 282166
      26442083
    • Sebastian Pop's avatar
      GVN-hoist: fix typo · 5d68aa79
      Sebastian Pop authored
      llvm-svn: 282165
      5d68aa79
    • Zachary Turner's avatar
      [Support] Add StringRef::consumeInteger. · 65fd2fc7
      Zachary Turner authored
      StringRef::getInteger() exists and treats the entire string as
      an integer of the specified radix, failing if any invalid characters
      are encountered or the number overflows.
      
      Sometimes you might have something like "123456foo" and you want
      to get the number 123456 and leave the string "foo" remaining.
      This is similar to what would be possible by using the standard
      runtime library functions strtoul et al and specifying an end
      pointer.
      
      This patch adds consumeInteger(), which does exactly that.  It
      consumes as much as possible until an invalid character is found,
      and modifies the StringRef in place so that upon return only
      the portion of the StringRef after the number remains.
      
      Differential Revision: https://reviews.llvm.org/D24778
      
      llvm-svn: 282164
      65fd2fc7
    • Etienne Bergeron's avatar
      [compiler-rt] fix typo in option description [NFC] · 7f0e3153
      Etienne Bergeron authored
      llvm-svn: 282163
      7f0e3153
    • Sebastian Pop's avatar
      GVN-hoist: move hoist testcase to GVNHoist dir · f6bfc1ad
      Sebastian Pop authored
      llvm-svn: 282161
      f6bfc1ad
    • Sebastian Pop's avatar
      GVN-hoist: only hoist relevant scalar instructions · 440f15b7
      Sebastian Pop authored
      Without this patch, GVN-hoist would think that a branch instruction is a scalar instruction
      and would try to value number it. The patch filters out all such kind of irrelevant instructions.
      
      A bit frustrating is that there is no easy way to discard all those very infrequent instructions,
      a bit like isa<TerminatorInst> that stands for a large family of instructions. I'm thinking that
      checking for those very infrequent other instructions would cost us more in compilation time
      than just letting those instructions getting numbered, so I'm still thinking that a simpler check:
      
        if (isa<TerminatorInst>(I))
          return false;
      
      is better than listing all the other less frequent instructions.
      
      Differential Revision: https://reviews.llvm.org/D23929
      
      llvm-svn: 282160
      440f15b7
    • Rafael Espindola's avatar
      Handle empty sections with symbol assignments. · 9546fffb
      Rafael Espindola authored
      Before the symbols were becoming undefined.
      
      llvm-svn: 282159
      9546fffb
    • Haojian Wu's avatar
      [clang-tidy] Add doc for `explain-config` option. · e5555e21
      Haojian Wu authored
      llvm-svn: 282158
      e5555e21
    • Dmitry Vyukov's avatar
      tsan: fix bug introduced in 282152 · 5f44b044
      Dmitry Vyukov authored
      In ShadowToMem we call MemToShadow potentially for incorrect addresses.
      So DCHECK(IsAppMem(p)) can fire in debug mode.
      Fix this by swapping range and MemToShadow checks.
      
      llvm-svn: 282157
      5f44b044
    • Daniel Marjamaki's avatar
      Fix Wbitfield-constant-conversion false positives · ee5b5f52
      Daniel Marjamaki authored
      Summary:
      The diagnostic did not handle ~ well. An expression such as ~0 is often used when 'all ones' is needed.
      
      Differential Revision: https://reviews.llvm.org/D24232
      
      llvm-svn: 282156
      ee5b5f52
    • Keith Walker's avatar
      Reapplying r281895 (and follow-up r281964) after fixing pr30468. · ba159897
      Keith Walker authored
      The additional fix is:
      
      When adding debug information to a lowered phi node in mem2reg
      check that we have a valid insertion point after the phi for adding
      the debug information.
      
      This change addresses the issue in pr30468 where a lowered phi was
      added before a catchswitch and no debug information should be added
      after the phi in this case.
      
      Differential Revision: https://reviews.llvm.org/D24797
      
      llvm-svn: 282155
      ba159897
    • Teresa Johnson's avatar
      Third attempt to fix Sphinx bot · 14142bfc
      Teresa Johnson authored
      Bot now complaining about -flto=thin reference, used similar workaround
      for that failure.
      
      llvm-svn: 282154
      14142bfc
    • Tim Northover's avatar
      GlobalISel: handle stack-based parameters on AArch64. · a5e38fa0
      Tim Northover authored
      llvm-svn: 282153
      a5e38fa0
    • Dmitry Vyukov's avatar
      tsan: support pie binaries on newer kernels · cc1f318b
      Dmitry Vyukov authored
      4.1+ Linux kernels map pie binaries at 0x55:
      https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d1fd836dcf00d2028c700c7e44d2c23404062c90
      Currently tsan does not support app memory at 0x55 (https://github.com/google/sanitizers/issues/503).
      Older kernels also map pie binaries at 0x55 when ASLR is disables (most notably under gdb).
      
      This change extends tsan mapping for linux/x86_64 to cover 0x554-0x568 app range and fixes both 4.1+ kernels and gdb.
      
      This required to slightly shrink low and high app ranges and move heap. The mapping become even more non-linear, since now we xor lower bits. Now even a continuous app range maps to split, intermixed shadow ranges. This breaks ShadowToMemImpl as it assumes linear mapping at least within a continuous app range (however it turned out to be already broken at least on arm64/42-bit vma as uncovered by r281970). So also change ShadowToMemImpl to hopefully a more robust implementation that does not assume a linear mapping.
      
      llvm-svn: 282152
      cc1f318b