Skip to content
  1. Nov 09, 2019
  2. Nov 08, 2019
    • Fangrui Song's avatar
      [MC] Emit unused undefined symbol even if its binding is not set · 8f089f20
      Fangrui Song authored
      Recommit r373168, which was reverted by r373242. This actually exposed a
      boringssl bug which has been fixed for more than one month.
      
      For the following two cases, we currently suppress the symbols. This
      patch emits them (compatible with GNU as).
      
      * `test2_a = undef`: if `undef` is otherwise unused.
      * `.hidden hidden`: if `hidden` is unused. This is the main point of the
        patch, because omitting the symbol would cause a linker semantic
        difference.
      
      It causes a behavior change that is not compatible with GNU as:
      
      .weakref foo1, bar1
      
      When neither foo1 nor bar1 is used, we now emit bar1, which is arguably
      more consistent.
      
      Another change is that we will emit .TOC. for .TOC.@tocbase .  For this
      directive, suppressing .TOC. can be seen as a size optimization, but we
      choose to drop it for simplicity and consistency.
      8f089f20
    • Stephan T. Lavavej's avatar
      [www] More HTTPS and outdated link fixes. · 3a7a2244
      Stephan T. Lavavej authored
      Resolves D69981.
      3a7a2244
    • joanlluch's avatar
      [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (3) (baseline tests) · fe0763d2
      joanlluch authored
      Summary:
      This is baseline tests for D69326
      
      Incorporates a command line flag for the MSP430 and adds a test cases to help showing the effects of applying D69326
      
      More details and motivation for this patch in D69326
      
      Reviewers: spatel, asl, lebedev.ri
      
      Reviewed By: spatel, asl
      
      Subscribers: hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D69975
      fe0763d2
    • Shoaib Meenai's avatar
      [llvm-xray] Add basic test for AArch64 support · 56cd447e
      Shoaib Meenai authored
      Based on a test provided by Ian Levesque <ianlevesque@fb.com>.
      56cd447e
    • David Blaikie's avatar
      DebugInfo: Use separate macinfo contributions for each CU · 39c308f6
      David Blaikie authored
      The macinfo support was broken for LTO situations, by terminating
      macinfo lists only once - multiple macinfo contributions were correctly
      labeled, but they all continued/flowed into later contributions until
      only one terminator appeared at the end of the section.
      
      Correctly terminate each contribution & fix the parsing to handle this
      situation too. The parsing fix is also necessary for dumping linked
      binaries - the previous code would stop at the end of the first
      contribution - missing all later contributions in a linked binary.
      
      It'd be nice to improve the dumping to print the offsets of each
      contribution so it'd be easier to know which CU AT_macro_info refers to
      which macinfo contribution.
      39c308f6
    • LLVM GN Syncbot's avatar
      gn build: Merge f0af11d8 · fa03665e
      LLVM GN Syncbot authored
      fa03665e
    • bmahjour's avatar
      [DDG] Data Dependence Graph - Pi Block · f0af11d8
      bmahjour authored
          Summary:
          This patch adds Pi Blocks to the DDG. A pi-block represents a group of DDG
          nodes that are part of a strongly-connected component of the graph.
          Replacing all the SCCs with pi-blocks results in an acyclic representation
          of the DDG. For example if we have:
             {a -> b}, {b -> c, d}, {c -> a}
          the cycle a -> b -> c -> a is abstracted into a pi-block "p" as follows:
             {p -> d} with "p" containing: {a -> b}, {b -> c}, {c -> a}
          In this implementation the edges between nodes that are part of the pi-block
          are preserved. The crossing edges (edges where one end of the edge is in the
          set of nodes belonging to an SCC and the other end is outside that set) are
          replaced with corresponding edges to/from the pi-block node instead.
      
          Authored By: bmahjour
      
          Reviewer: Meinersbur, fhahn, myhsu, xtian, dmgreen, kbarton, jdoerfert
      
          Reviewed By: Meinersbur
      
          Subscribers: ychen, arphaman, simoll, a.elovikov, mgorny, hiraditya, jfb, wuzish, llvm-commits, jsji, Whitney, etiotto, ppc-slack
      
          Tag: #llvm
      
          Differential Revision: https://reviews.llvm.org/D68827
      f0af11d8
    • Eli Friedman's avatar
      [AArch64][X86] Don't assume __powidf2 is available on Windows. · 5df3a872
      Eli Friedman authored
      We had some code for this for 32-bit ARM, but this doesn't really need
      to be in target-specific code; generalize it.
      
      (I think this started showing up recently because we added an
      optimization that converts pow to powi.)
      
      Differential Revision: https://reviews.llvm.org/D69013
      5df3a872
    • Gil Rapaport's avatar
      Revert "[LV] Apply sink-after & interleave-groups as VPlan transformations (NFCI)" · 9f08ce0d
      Gil Rapaport authored
      This reverts commit 11ed1c02 - causes an assert failure.
      9f08ce0d
    • Nikita Popov's avatar
      Reapply [LVI] Normalize pointer behavior · 885a05f4
      Nikita Popov authored
      Fix cache invalidation by not guarding the dereferenced pointer cache
      erasure by SeenBlocks. SeenBlocks is only populated when actually
      caching a value in the block, which doesn't necessarily have to happen
      just because dereferenced pointers were calculated.
      
      -----
      
      Related to D69686. As noted there, LVI currently behaves differently
      for integer and pointer values: For integers, the block value is always
      valid inside the basic block, while for pointers it is only valid at
      the end of the basic block. I believe the integer behavior is the
      correct one, and CVP relies on it via its getConstantRange() uses.
      
      The reason for the special pointer behavior is that LVI checks whether
      a pointer is dereferenced in a given basic block and marks it as
      non-null in that case. Of course, this information is valid only after
      the dereferencing instruction, or in conservative approximation,
      at the end of the block.
      
      This patch changes the treatment of dereferencability: Instead of
      including it inside the block value, we instead treat it as something
      similar to an assume (it essentially is a non-nullness assume) and
      incorporate this information in intersectAssumeOrGuardBlockValueConstantRange()
      if the context instruction is the terminator of the basic block.
      This happens either when determining an edge-value internally in LVI,
      or when a terminator was explicitly passed to getValueAt(). The latter
      case makes this change not fully NFC, because we can now fold
      terminator icmps based on the dereferencability information in the
      same block. This is the reason why I changed one JumpThreading test
      (it would optimize the condition away without the change).
      
      Of course, we do not want to recompute dereferencability on each
      intersectAssume call, so we need a new cache for this. The
      dereferencability analysis requires walking the entire basic block
      and computing underlying objects of all memory operands. This was
      previously done separately for each queried pointer value. In the
      new implementation (both because this makes the caching simpler,
      and because it is faster), I instead only walk the full BB once and
      cache all the dereferenced pointers. So the traversal is now performed
      only once per BB, instead of once per queried pointer value.
      
      I think the overall model now makes more sense than before, and there
      will be no more pitfalls due to differing integer/pointer behavior.
      
      Differential Revision: https://reviews.llvm.org/D69914
      885a05f4
    • Jan Korous's avatar
      [clang] Add VFS support for sanitizers' blacklists · 590f279c
      Jan Korous authored
      Differential Revision: https://reviews.llvm.org/D69648
      590f279c
    • Tom Stellard's avatar
      [cmake] Remove LLVM_{BUILD,LINK}_LLVM_DYLIB options on Windows · 3ffbf972
      Tom Stellard authored
      Summary: The options aren't supported so they can be removed.
      
      Reviewers: beanz, smeenai, compnerd
      
      Reviewed By: compnerd
      
      Subscribers: mgorny, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D69877
      3ffbf972
    • evgeny's avatar
      [ThinLTO] Fix bug when importing writeonly variables · 7f92d66f
      evgeny authored
      Patch enables import of write-only variables with non-trivial initializers
      to fix linker errors. Initializers of imported variables are converted to
      'zeroinitializer' to avoid promotion of referenced objects.
      
      Differential revision: https://reviews.llvm.org/D70006
      7f92d66f
    • Tom Stellard's avatar
      [cmake] Remove SVN support from VersionFromVCS.cmake · caad2170
      Tom Stellard authored
      Reviewers: phosek
      
      Subscribers: mgorny, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D69682
      caad2170
    • Kazu Hirata's avatar
      [JumpThreading] Fix a comment typo (NFC) · 9aff5e1c
      Kazu Hirata authored
      Reviewers: kazu
      
      Subscribers: hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D70013
      9aff5e1c
    • Nikita Popov's avatar
      Revert "[LVI] Normalize pointer behavior" · 43ae5f43
      Nikita Popov authored
      This reverts commit 15bc4dc9.
      
      clang-cmake-x86_64-sde-avx512-linux buildbot reported quite a few
      compile-time regressions in test-suite, will investigate.
      43ae5f43
    • Nikita Popov's avatar
      [LVI] Normalize pointer behavior · 15bc4dc9
      Nikita Popov authored
      Related to D69686. As noted there, LVI currently behaves differently
      for integer and pointer values: For integers, the block value is always
      valid inside the basic block, while for pointers it is only valid at
      the end of the basic block. I believe the integer behavior is the
      correct one, and CVP relies on it via its getConstantRange() uses.
      
      The reason for the special pointer behavior is that LVI checks whether
      a pointer is dereferenced in a given basic block and marks it as
      non-null in that case. Of course, this information is valid only after
      the dereferencing instruction, or in conservative approximation,
      at the end of the block.
      
      This patch changes the treatment of dereferencability: Instead of
      including it inside the block value, we instead treat it as something
      similar to an assume (it essentially is a non-nullness assume) and
      incorporate this information in intersectAssumeOrGuardBlockValueConstantRange()
      if the context instruction is the terminator of the basic block.
      This happens either when determining an edge-value internally in LVI,
      or when a terminator was explicitly passed to getValueAt(). The latter
      case makes this change not fully NFC, because we can now fold
      terminator icmps based on the dereferencability information in the
      same block. This is the reason why I changed one JumpThreading test
      (it would optimize the condition away without the change).
      
      Of course, we do not want to recompute dereferencability on each
      intersectAssume call, so we need a new cache for this. The
      dereferencability analysis requires walking the entire basic block
      and computing underlying objects of all memory operands. This was
      previously done separately for each queried pointer value. In the
      new implementation (both because this makes the caching simpler,
      and because it is faster), I instead only walk the full BB once and
      cache all the dereferenced pointers. So the traversal is now performed
      only once per BB, instead of once per queried pointer value.
      
      I think the overall model now makes more sense than before, and there
      will be no more pitfalls due to differing integer/pointer behavior.
      
      Differential Revision: https://reviews.llvm.org/D69914
      15bc4dc9
    • Simon Pilgrim's avatar
    • Simon Pilgrim's avatar
    • Simon Pilgrim's avatar
    • Simon Pilgrim's avatar
      CrashRecoveryContextCleanup - fix uninitialized variable warnings. NFCI. · 24d507f4
      Simon Pilgrim authored
      Remove default values from constructor.
      24d507f4
    • Philip Reames's avatar
      [LICM] Support hosting of dynamic allocas out of loops · 8d22100f
      Philip Reames authored
      This patch implements a correct, but not terribly useful, transform. In particular, if we have a dynamic alloca in a loop which is guaranteed to execute, and provably not captured, we hoist the alloca out of the loop. The capture tracking is needed so that we can prove that each previous stack region dies before the next one is allocated. The transform decreases the amount of stack allocation needed by a linear factor (e.g. the iteration count of the loop).
      
      Now, I really hope no one is actually using dynamic allocas. As such, why this patch?
      
      Well, the actual problem I'm hoping to make progress on is allocation hoisting. There's a large draft patch out for review (https://reviews.llvm.org/D60056), and this patch was the smallest chunk of testable functionality I could come up with which takes a step vaguely in that direction.
      
      Once this is in, it makes motivating the changes to capture tracking mentioned in TODOs testable. After that, I hope to extend this to trivial malloc free regions (i.e. free dominating all loop exits) and allocation functions for GCed languages.
      
      Differential Revision: https://reviews.llvm.org/D69227
      8d22100f
Loading