Skip to content
  1. Feb 05, 2019
    • Dan Liew's avatar
      Previously if the user configured their build but then changed · de5220ed
      Dan Liew authored
      LLVM_ENABLED_PROJECT and reconfigured it had no effect on what
      projects were actually built. This was very confusing behaviour. The
      reason for this is that the value of the `LLVM_TOOL_<PROJECT>_BUILD`
      variables are already set.
      
      The problem here is that we have two sources of truth:
      
      * The projects listed in LLVM_ENABLE_PROJECTS.
      * The projects enabled/disabled with LLVM_TOOL_<PROJECT>_BUILD.
      
      At configure time we have no real way of knowing which source of truth
      the user wants so we apply the following heuristic:
      
      If the user ever sets `LLVM_ENABLE_PROJECTS` in the CMakeCache then that
      is used as the single source of truth and we force the
      `LLVM_TOOL_<PROJECT>_BUILD` CMake cache variables to have the
      appropriate values that match the contents of the
      `LLVM_ENABLE_PROJECTS`. If the user never sets `LLVM_ENABLE_PROJECTS`
      then they can continue to use and set the `LLVM_TOOL_<PROJECT>_BUILD`
      variables as the "source of truth".
      
      The problem with this approach is that if the user ever tries to use
      both `LLVM_ENABLE_PROJECTS` and `LLVM_TOOL_<PROJECT>_BUILD` for the same
      build directory then any user set value for `LLVM_TOOL_<PROJECT>_BUILD`
      variables will get overwriten, likely without the user noticing.
      
      Hopefully the above shouldn't matter in practice because the
      LLVM_TOOL_<PROJECT>_BUILD variables are not documented, but
      LLVM_ENABLE_PROJECTS is.
      
      We should probably deprecate the `LLVM_TOOL_<PROJECT>_BUILD`
      variables at some point by turning them into to regular CMake
      variables that don't live in the CMake cache.
      
      Differential Revision: https://reviews.llvm.org/D57535
      
      llvm-svn: 353148
      de5220ed
    • Hiroshi Inoue's avatar
      [NFC] fix trivial typos in comments · 02a2bb2f
      Hiroshi Inoue authored
      llvm-svn: 353147
      02a2bb2f
    • Clement Courbet's avatar
      [DAG][NFC] Add unit tests. · f3da6abf
      Clement Courbet authored
      In preparation for D57541.
      
      llvm-svn: 353144
      f3da6abf
    • Clement Courbet's avatar
      [DAG] BaseIndexOffset: FrameIndexSDNodes with the same FrameIndex compare equal. · 17b51b65
      Clement Courbet authored
      Reviewers: niravd
      
      Subscribers: arphaman, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D57692
      
      llvm-svn: 353143
      17b51b65
    • Craig Topper's avatar
      [X86] Connect the default fpsr and dirflag clobbers in inline assembly to the... · f86eb00f
      Craig Topper authored
      [X86] Connect the default fpsr and dirflag clobbers in inline assembly to the registers we have defined for them.
      
      Summary:
      We don't currently map these constraints to physical register numbers so they don't make it to the MachineIR representation of inline assembly.
      
      This could have problems for proper dependency tracking in the machine schedulers though I don't have a test case that shows that.
      
      Reviewers: rnk
      
      Reviewed By: rnk
      
      Subscribers: eraman, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D57641
      
      llvm-svn: 353141
      f86eb00f
    • Peter Collingbourne's avatar
      gn build: Upgrade to NDK r19. · 6141b037
      Peter Collingbourne authored
      NDK r19 includes a sysroot that can be used directly by the compiler
      without creating a standalone toolchain, so we just need a handful
      of flags to point Clang there.
      
      Differential Revision: https://reviews.llvm.org/D57733
      
      llvm-svn: 353139
      6141b037
    • Craig Topper's avatar
      [X86] Add test case from PR40529. NFC · 31259c52
      Craig Topper authored
      llvm-svn: 353138
      31259c52
    • Max Kazantsev's avatar
      [LSR] Check SCEV on isZero() after extend. PR40514 · d5e595b7
      Max Kazantsev authored
      When LSR first adds SCEVs to BaseRegs, it only does it if `isZero()` has
      returned false. In the end, in invocation of `InsertFormula`, it asserts that
      all values there are still not zero constants. However between these two
      points, it makes some transformations, in particular extends them to wider
      type.
      
      SCEV does not give us guarantee that if `S` is not a constant zero, then
      `sext(S)` is also not a constant zero. It might have missed some optimizing
      transforms when it was calculating `S` and then made them when it took `sext`.
      For example, it may happen if previously optimizing transforms were limited
      by depth or somehow else.
      
      This patch adds a bailout when we may end up with a zero SCEV after extension.
      
      Differential Revision: https://reviews.llvm.org/D57565
      Reviewed By: samparker
      
      llvm-svn: 353136
      d5e595b7
    • Teresa Johnson's avatar
      [SamplePGO] More pipeline changes when flattened profile used in ThinLTO postlink · b0bf530f
      Teresa Johnson authored
      Summary:
      Follow on to D54819/r351476.
      
      We also don't need to perform extra InstCombine pass when we aren't
      loading the sample profile in the ThinLTO backend because we have a
      flattened sample profile.
      
      Additionally, for consistency and clarity, when we aren't reloading the
      sample profile, perform ICP in the same location as non-sample PGO
      backends. To this end I have moved the ICP invocation for non-SamplePGO
      ThinLTO down into buildModuleSimplificationPipeline (partly addresses
      the FIXME where we were previously setting this up).
      
      Reviewers: wmi
      
      Subscribers: mehdi_amini, inglorion, eraman, steven_wu, dexonsmith, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D57705
      
      llvm-svn: 353135
      b0bf530f
    • Richard Trieu's avatar
      Fix narrowing issue from r353129 · a9354b2f
      Richard Trieu authored
      llvm-svn: 353134
      a9354b2f
    • Heejin Ahn's avatar
      [WebAssembly] Fix indentation after adding IsCanonical property (NFC) · e37ba2cb
      Heejin Ahn authored
      llvm-svn: 353132
      e37ba2cb
    • Wouter van Oortmerssen's avatar
      [WebAssembly] Make disassembler always emit most canonical name. · 1a91cb04
      Wouter van Oortmerssen authored
      Summary:
      There are a few instructions that all map to the same opcode, so
      when disassembling, we have to pick one. That was just the first one
      before (the except_ref variant in the case of "call"), now it is the
      one marked as IsCanonical in tablegen, or failing that, the shortest
      name (which is typically the "canonical" one).
      
      Also introduced a canonical "end" instruction for this purpose.
      
      Reviewers: dschuff, tlively
      
      Subscribers: sbc100, jgravelle-google, aheejin, llvm-commits, sunfish
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D57713
      
      llvm-svn: 353131
      1a91cb04
    • Wei Mi's avatar
      [SamplePGO][NFC] Minor improvement to replace a temporary vector with a · 4901f371
      Wei Mi authored
      brace-enclosed init list.
      
      Differential Revision: https://reviews.llvm.org/D57726
      
      llvm-svn: 353129
      4901f371
    • Matt Arsenault's avatar
      GlobalISel: Fix verifier crashing on non-register operands · 2bf74ec8
      Matt Arsenault authored
      Also correct the wording of error on subregisters.
      
      llvm-svn: 353128
      2bf74ec8
    • Thomas Lively's avatar
      [WebAssembly] memory.copy · d99af237
      Thomas Lively authored
      Summary: Depends on D57495.
      
      Reviewers: aheejin, dschuff
      
      Subscribers: sbc100, jgravelle-google, hiraditya, sunfish
      
      Differential Revision: https://reviews.llvm.org/D57498
      
      llvm-svn: 353127
      d99af237
    • Matt Arsenault's avatar
      GlobalISel: Consolidate load/store legalization · 7f09fd6b
      Matt Arsenault authored
      The fewerElementsVectors implementation for load/stores
      handles the scalar reduction case just as well, so drop
      the redundant code in narrowScalar. This also introduces
      support for narrowing irregular size breakdowns for
      scalars.
      
      llvm-svn: 353125
      7f09fd6b
    • Craig Topper's avatar
      [DAGCombiner] Discard pointer info when combining extract_vector_elt of a... · d4e37afe
      Craig Topper authored
      [DAGCombiner] Discard pointer info when combining extract_vector_elt of a vector load when the index isn't constant
      
      Summary:
      If the index isn't constant, this transform inserts a multiply and an add on the index to calculating the base pointer for a scalar load. But we still create a memory operand with an offset of 0 and the size of the scalar access. But the access is really to an unknown offset within the original access size.
      
      This can cause the machine scheduler to incorrectly calculate dependencies between this load and other accesses. In the case we saw, there was a 32 byte vector store that was split into two 16 byte stores, one with offset 0 and one with offset 16. The size of the memory operand for both was 16. The scheduler correctly detected the alias with the offset 0 store, but not the offset 16 store.
      
      This patch discards the pointer info so we don't incorrectly detect aliasing. I wasn't sure if we could keep using the original offset and size without risking some other transform on the load changing the size.
      
      I tried to reduce a test case, but there's still a lot of memory operations needed to get the scheduler to do the bad reordering. So it looked pretty fragile to maintain.
      
      Reviewers: efriedma
      
      Reviewed By: efriedma
      
      Subscribers: arphaman, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D57616
      
      llvm-svn: 353124
      d4e37afe
    • Teresa Johnson's avatar
      [SamplePGO] Minor efficiency improvement in samplePGO ICP · 4bdf82ce
      Teresa Johnson authored
      Summary:
      When attaching prof metadata to promoted direct calls in SamplePGO
      mode, no need to construct and use a SmallVector to pass a single count
      to the ArrayRef parameter, we can simply use a brace-enclosed init list.
      
      This made a small but consistent improvement for a ThinLTO backend
      compile I was measuring.
      
      Reviewers: wmi
      
      Subscribers: mehdi_amini, dexonsmith, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D57706
      
      llvm-svn: 353123
      4bdf82ce
    • Matt Arsenault's avatar
      GlobalISel: Implement narrowScalar for select · 81511e54
      Matt Arsenault authored
      Don't handle vector conditions.
      
      I think this can be merged in the future with
      fewerElementsVectorSelect, although this becomes slightly tricky with
      a vector condition.
      
      llvm-svn: 353122
      81511e54
    • Matt Arsenault's avatar
      GlobalISel: Combine g_extract with g_merge_values · 24f14993
      Matt Arsenault authored
      Try to use the underlying source registers.
      
      This enables legalization in more cases where some irregular
      operations are widened and others narrowed.
      
      This seems to make the test_combines_2 AArch64 test worse, since the
      MERGE_VALUES has multiple uses. Since this should be required for
      legalization, a hasOneUse check is probably inappropriate (or maybe
      should only be used if the merge is legal?).
      
      llvm-svn: 353121
      24f14993
    • Julian Lettner's avatar
      [Sanitizers] UBSan unreachable incompatible with Kernel ASan · 98b9f5b4
      Julian Lettner authored
      Summary:
      This is a follow up for https://reviews.llvm.org/D57278. The previous
      revision should have also included Kernel ASan.
      
      rdar://problem/40723397
      
      Subscribers: cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D57711
      
      llvm-svn: 353120
      98b9f5b4
    • Sam Clegg's avatar
      [llvm-readobj] Fix readobj test expectation broken in rL353109. NFC. · ae28be3a
      Sam Clegg authored
      llvm-svn: 353119
      ae28be3a
    • Evandro Menezes's avatar
      Revert "[PATCH] [TargetLibraryInfo] Update run time support for Windows" · 98f356cd
      Evandro Menezes authored
      This reverts accidental commit ff552771.
      
      llvm-svn: 353118
      98f356cd
    • Evandro Menezes's avatar
      [ADT] Refactor the Windows query functions (NFC) · d0167637
      Evandro Menezes authored
      Increase reuse in the query functions for Windows.
      
      llvm-svn: 353117
      d0167637
    • Evandro Menezes's avatar
      [PATCH] [TargetLibraryInfo] Update run time support for Windows · ff552771
      Evandro Menezes authored
      It seems that the run time for Windows has changed and supports more math
      functions than before.  Since LLVM requires at least VS2015, I assume that
      this is the run time that would be redistributed with programs built with
      Clang.  Thus, I based this update on the header file `math.h` that
      accompanies it.
      
      This patch addresses the PR40541.  Unfortunately, I have no access to a
      Windows development environment to validate it.
      
      llvm-svn: 353114
      ff552771
    • Matt Arsenault's avatar
      GlobalISel: Enforce operand types for constants · 1f795e2c
      Matt Arsenault authored
      A number of of tests were using imm operands, not cimm. Since CSE
      relies on the exact ConstantInt* pointer used, and implicit
      conversions are generally evil, also enforce the bitsize of the types.
      
      llvm-svn: 353113
      1f795e2c
    • Matt Arsenault's avatar
      GlobalISel: Verify g_select · f2a26339
      Matt Arsenault authored
      Factor the common vector element consistency check many instructions
      need out, although this makes the error messages worse.
      
      llvm-svn: 353112
      f2a26339
    • Matt Arsenault's avatar
      MachineVerifier: Move verification of G_* instructions to function · 46f9c6cf
      Matt Arsenault authored
      llvm-svn: 353111
      46f9c6cf
    • Sam Clegg's avatar
      [WebAssembly] MC: Mark more function aliases as functions · 313f9f54
      Sam Clegg authored
      Aliases of functions are now marked as function symbols even if
      they are bitcast to some other other non-function type.
      This is important for WebAssembly where object and function
      symbols can't alias each other.
      
      Fixes PR38866
      
      Differential Revision: https://reviews.llvm.org/D57538
      
      llvm-svn: 353109
      313f9f54
  2. Feb 04, 2019
Loading