1. Mar 29, 2019
    • Simon Pilgrim's avatar
      [SLP] Add support for commutative icmp/fcmp predicates · 6a75c36e
      Simon Pilgrim authored
      For the cases where the icmp/fcmp predicate is commutative, use reorderInputsAccordingToOpcode to collect and commute the operands.
      
      This requires a helper to recognise commutativity in both general Instruction and CmpInstr types - the CmpInst::isCommutative doesn't overload the Instruction::isCommutative method for reasons I'm not clear on (maybe because its based on predicate not opcode?!?).
      
      Differential Revision: https://reviews.llvm.org/D59992
      
      llvm-svn: 357266
      6a75c36e
    • Fangrui Song's avatar
      [llvm-objcopy] Fix case style of LayoutSegments. NFC · 8da6a6ce
      Fangrui Song authored
      llvm-svn: 357265
      8da6a6ce
    • Simon Atanasyan's avatar
      [mips] Fix lowering a signed immediate for *.d MSA instructions · f26f56d6
      Simon Atanasyan authored
      The `lowerMSASplatImm` function zero-extends `i32` immediates while
      building constant. If target type is `i64`, negative immediate loses
      the sign. As a result, for example `__builtin_msa_ldi_d(-1)` lowered
      to series of instruction loads incorrect value 0xffffffff to the `$w0`
      register instead of single `ldi.d $w0, -1` instruction.
      
      The fix zero-extends unsigned immediates and signed-extend signed
      immediates.
      
      Differential Revision: http://reviews.llvm.org/D59884
      
      llvm-svn: 357264
      f26f56d6
    • Roman Lebedev's avatar
      [NFC][llvm-exegesis] Also promote getSchedClassPoint() into ResolvedSchedClass. · 4d81e877
      Roman Lebedev authored
      Summary:
      It doesn't need anything from Analysis::SchedClassCluster class,
      and takes ResolvedSchedClass as param, so this seems rather fitting.
      
      Reviewers: courbet, gchatelet
      
      Reviewed By: courbet
      
      Subscribers: tschuett, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D59994
      
      llvm-svn: 357263
      4d81e877
    • Dmitry Preobrazhensky's avatar
      [AMDGPU][MC] Corrected conversion rules for inlinable constants to match rules for literals · d6827ce3
      Dmitry Preobrazhensky authored
      See bug 40806: https://bugs.llvm.org/show_bug.cgi?id=40806
      
      Reviewers: artem.tamazov, arsenm
      
      Differential Revision: https://reviews.llvm.org/D59786
      
      llvm-svn: 357262
      d6827ce3
    • Nico Weber's avatar
      gn build: Merge r357248 · 1f700a1a
      Nico Weber authored
      llvm-svn: 357261
      1f700a1a
    • Nico Weber's avatar
      gn build: Merge r357259 · 7e9f6231
      Nico Weber authored
      llvm-svn: 357260
      7e9f6231
    • Roman Lebedev's avatar
      [NFC][llvm-exegesis] Refactor ResolvedSchedClass & friends · 1d1330c5
      Roman Lebedev authored
      Summary:
      `ResolvedSchedClass` will need to be used outside of `Analysis`
      (before `InstructionBenchmarkClustering` even), therefore promote
      it into a non-private top-level class, and while there also
      move all of the functions that are only called by `ResolvedSchedClass`
      into that same new file.
      
      Reviewers: courbet, gchatelet
      
      Reviewed By: courbet
      
      Subscribers: mgorny, tschuett, mgrang, jdoerfert, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D59993
      
      llvm-svn: 357259
      1d1330c5
    • Sanjay Patel's avatar
      [DAGCombiner] simplify shuffle of shuffle · 12685d0f
      Sanjay Patel authored
      After investigating the examples from D59777 targeting an SSE4.1 machine,
      it looks like a very different problem due to how we map illegal types (256-bit in these cases).
      
      We're missing a shuffle simplification that maps elements of a vector back to a shuffled operand.
      We have a more general version of this transform in DAGCombiner::visitVECTOR_SHUFFLE(), but that
      generality means it is limited to patterns with a one-use constraint, and the examples here have
      2 uses. We don't need any uses or legality limitations for a simplification (no new value is
      created).
      
      It looks like we miss this pattern in IR too.
      
      In one of the zext examples here, we have shuffle masks like this:
      
      Shuf0 = vector_shuffle<0,u,3,7,0,u,3,7>
      Shuf = vector_shuffle<4,u,6,7,u,u,u,u>
      
      ...so that's moving the high half of the 1st vector into the low half. But the high half of the
      1st vector is already identical to the low half.
      
      Differential Revision: https://reviews.llvm.org/D59961
      
      llvm-svn: 357258
      12685d0f
    • Florian Hahn's avatar
      Recommit "[DSE] Preserve basic block ordering using OrderedBasicBlock." · 9b41a732
      Florian Hahn authored
      Updated to use DenseMap::insert instead of [] operator for insertion, to
      avoid a crash caused by epoch checks.
      
      This reverts commit 2b85de43.
      
      llvm-svn: 357257
      9b41a732
    • Nirav Dave's avatar
      [DAGCombine] Improve Lifetime node chains. · 9259de21
      Nirav Dave authored
      Improve both start and end lifetime nodes chain dependencies.
      
      Reviewers: courbet
      
      Reviewed By: courbet
      
      Subscribers: hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D59795
      
      llvm-svn: 357256
      9259de21
    • Hans Wennborg's avatar
      3c7f11ef
    • Sanjay Patel's avatar
      [DAGCombiner] fold sext into decrement · 665a3850
      Sanjay Patel authored
      This is a sibling to rL357178 that I noticed we'd hit if we chose
      an alternate transform in D59818.
      
        %z = zext i8 %x to i32
        %dec = add i32 %z, -1
        %r = sext i32 %dec to i64
        =>
        %z2 = zext i8 %x to i64
        %r = add i64 %z2, -1
      
      https://rise4fun.com/Alive/kPP
      
      The x86 vector diffs show a slight regression, so there's a chance
      that we should limit this and the previous transform to scalars.
      
      But given that we allowed vectors before, I'm matching that behavior
      here. We should change both transforms together if that's the right
      thing to do.
      
      llvm-svn: 357254
      665a3850
    • Simon Pilgrim's avatar
      Fix MSVC "not all control paths return a value" warning. NFCI. · 945db0be
      Simon Pilgrim authored
      llvm-svn: 357253
      945db0be
    • Hans Wennborg's avatar
      Switch lowering: exploit unreachable fall-through when lowering case range cluster · 800b12f9
      Hans Wennborg authored
      In the example below, we would previously emit two range checks, one for cases
      1--3 and one for 4--6. This patch makes us exploit the fact that the
      fall-through is unreachable and only one range check is necessary.
      
        switch i32 %i, label %default [
          i32 1,  label %bb1
          i32 2,  label %bb1
          i32 3,  label %bb1
          i32 4,  label %bb2
          i32 5,  label %bb2
          i32 6,  label %bb2
        ]
        default: unreachable
      
      llvm-svn: 357252
      800b12f9
    • Sanjay Patel's avatar
      [x86] add tests for decrement+sext; NFC · 881bcbe0
      Sanjay Patel authored
      llvm-svn: 357251
      881bcbe0
    • Oliver Stannard's avatar
      [AArch64] Support selecting TPIDR_EL[1-3] as the thread base · d83a5593
      Oliver Stannard authored
      Add an -mtp=el[0-3] option to select which of the AArch64 thread ID registers
      will be used for the TLS base pointer.
      
      This is a followup to rL356657 which added subtarget features to enable
      accesses to the privileged thread ID registers.
      
      Patch by Philip Derrin!
      
      Differential revision: https://reviews.llvm.org/D59631
      
      llvm-svn: 357250
      d83a5593
    • Dmitry Preobrazhensky's avatar
      [AMDGPU][MC] Corrected handling of tied src for atomic return MUBUF opcodes · 7f33574b
      Dmitry Preobrazhensky authored
      See bug 40917: https://bugs.llvm.org/show_bug.cgi?id=40917
      
      Reviewers: artem.tamazov, arsenm
      
      Differential Revision: https://reviews.llvm.org/D59878
      
      llvm-svn: 357249
      7f33574b
    • Andrea Di Biagio's avatar
      [MCA] Add an experimental MicroOpQueue stage. · e074ac60
      Andrea Di Biagio authored
      This patch adds an experimental stage named MicroOpQueueStage.
      MicroOpQueueStage can be used to simulate a hardware micro-op queue (basically,
      a decoupling queue between 'decode' and 'dispatch').  Users can specify a queue
      size, as well as a optional MaxIPC (which - in the absence of a "Decoders" stage
      - can be used to simulate a different throughput from the decoders).
      
      This stage is added to the default pipeline between the EntryStage and the
      DispatchStage only if PipelineOption::MicroOpQueue is different than zero. By
      default, llvm-mca sets PipelineOption::MicroOpQueue to the value of hidden flag
      -micro-op-queue-size.
      
      Throughput from the decoder can be simulated via another hidden flag named
      -decoder-throughput.  That flag allows us to quickly experiment with different
      frontend throughputs.  For targets that declare a loop buffer, flag
      -decoder-throughput allows users to do multiple runs, each time simulating a
      different throughput from the decoders.
      
      This stage can/will be extended in future. For example, we could add a "buffer
      full" event to notify bottlenecks caused by backpressure. flag
      -decoder-throughput would probably go away if in future we delegate to another
      stage (DecoderStage?) the simulation of a (potentially variable) throughput from
      the decoders. For now, flag -decoder-throughput is "good enough" to run some
      simple experiments.
      
      Differential Revision: https://reviews.llvm.org/D59928
      
      llvm-svn: 357248
      e074ac60
    • Konstantin Zhuravlyov's avatar
      AMDGPU: Make sram-ecc off by default for Vega20 · 2b766ed7
      Konstantin Zhuravlyov authored
      Differential Revision: https://reviews.llvm.org/D59718
      
      llvm-svn: 357247
      2b766ed7
    • James Henderson's avatar
      [llvm-readelf]Merge dynamic and static relocation printing to avoid code duplication · 814ab373
      James Henderson authored
      The majority of the printRelocation and printDynamicRelocation functions
      were identical. This patch factors this all out into a new function.
      There are a couple of minor differences to do with printing of symbols
      without names, but I think these are harmless, and in some cases a small
      improvement.
      
      Reviewed by: grimar, rupprecht, Higuoxing
      
      Differential Revision: https://reviews.llvm.org/D59823
      
      llvm-svn: 357246
      814ab373
    • Roman Lebedev's avatar
      [NFC][llvm-exegesis] Refactor Analysis::SchedClassCluster::measurementsMatch() · b8fb15d4
      Roman Lebedev authored
      Summary:
      The diff looks scary but it really isn't:
      1. I moved the check for the number of measurements into `SchedClassClusterCentroid::validate()`
      2. While there, added a check that we can only have a single inverse throughput measurement. I missed that when adding it initially.
      3. In `Analysis::SchedClassCluster::measurementsMatch()` is called with the current LLVM values from schedule class and the values from Centroid.
      3.1. The values from centroid we can already get from `SchedClassClusterCentroid::getAsPoint()`.
           This isn't 100% a NFC, because previously for inverse throughput we used `min()`. I have asked whether i have done that correctly in
           https://reviews.llvm.org/D57647?id=184939#inline-510384 but did not hear back. I think `avg()` should be used too, thus it is a fix.
      3.2. Finally, refactor the computation of the LLVM-specified values into `Analysis::SchedClassCluster::getSchedClassPoint()`
           I will need that function for [[ https://bugs.llvm.org/show_bug.cgi?id=41275 | PR41275 ]]
      
      Reviewers: courbet, gchatelet
      
      Reviewed By: courbet
      
      Subscribers: tschuett, jdoerfert, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D59951
      
      llvm-svn: 357245
      b8fb15d4
    • Simon Pilgrim's avatar
      [X86] Add X86TargetLowering::isCommutativeBinOp override. · aeaf7fcd
      Simon Pilgrim authored
      We currently just have test coverage for PMULUDQ - will add more in the future.
      
      llvm-svn: 357244
      aeaf7fcd
    • Simon Pilgrim's avatar
      [SLP] Add support for swapping icmp/fcmp predicates to permit vectorization · 62f0d165
      Simon Pilgrim authored
      We should be able to match elements with the swapped predicate as well - as long as we commute the source operands.
      
      Differential Revision: https://reviews.llvm.org/D59956
      
      llvm-svn: 357243
      62f0d165
    • Kang Zhang's avatar
      [PowerPC] Add the support for __builtin_setrnd() in clang · e5ac385f
      Kang Zhang authored
      Summary:
      PowerPC64/PowerPC64le supports the builtin function __builtin_setrnd to set the floating point rounding mode. This function will use the least significant two bits of integer argument to set the floating point rounding mode.
      double __builtin_setrnd(int mode);
      The effective values for mode are:
      0 - round to nearest
      1 - round to zero
      2 - round to +infinity
      3 - round to -infinity
      Note that the mode argument will modulo 4, so if the int argument is greater than 3, it will only use the least significant two bits of the mode. Namely, builtin_setrnd(102)) is equal to builtin_setrnd(2).
      
      Reviewed By: jsji
      
      Differential Revision: https://reviews.llvm.org/D59403
      
      llvm-svn: 357242
      e5ac385f
    • Kang Zhang's avatar
      [PowerPC] Add the support for __builtin_setrnd() · 05f78b35
      Kang Zhang authored
      Summary:
      PowerPC64/PowerPC64le supports the builtin function __builtin_setrnd to set the floating point rounding mode. This function will use the least significant two bits of integer argument to set the floating point rounding mode.
      double __builtin_setrnd(int mode);
      The effective values for mode are:
      0 - round to nearest
      1 - round to zero
      2 - round to +infinity
      3 - round to -infinity
      Note that the mode argument will modulo 4, so if the int argument is greater than 3, it will only use the least significant two bits of the mode. Namely, builtin_setrnd(102)) is equal to builtin_setrnd(2).
      
      Reviewed By: jsji
      
      Differential Revision: https://reviews.llvm.org/D59405
      
      llvm-svn: 357241
      05f78b35
    • Pavel Labath's avatar
      [Sanitizer] Add interceptor for wctomb · 711bea9d
      Pavel Labath authored
      Summary:
      This is required to avoid msan false positives for code using this
      function (although generally one should avoid using this function in
      favor of wcrtomb).
      
      Reviewers: eugenis, EricWF, vitalybuka
      
      Subscribers: srhines, kubamracek, fedor.sergeev, delcypher, llvm-commits, #sanitizers
      
      Tags: #llvm, #sanitizers
      
      Differential Revision: https://reviews.llvm.org/D59548
      
      llvm-svn: 357240
      711bea9d
    • Clement Courbet's avatar
      [ScheduleDAG] Move `Topo` and `addEdge` to base class. · b70355f0
      Clement Courbet authored
      Some DAG mutations can only be applied to `ScheduleDAGMI`, and have to
      internally cast a `ScheduleDAGInstrs` to `ScheduleDAGMI`.
      
      There is nothing actually specific to `ScheduleDAGMI` in `Topo`.
      
      llvm-svn: 357239
      b70355f0
    • Fangrui Song's avatar
      [llvm-objcopy] Delete two redundant reinterpret_cast. NFC · 5ed0a8bf
      Fangrui Song authored
      llvm-svn: 357238
      5ed0a8bf
    • Jim Lin's avatar
      Test commit. Fix typo. · 421c0942
      Jim Lin authored
      llvm-svn: 357237
      421c0942
    • Michael Liao's avatar
      [Sema] Fix a crash when nonnull checking · ce38992a
      Michael Liao authored
      Summary:
      - If a parameter is used, nonnull checking needs function prototype to
        retrieve the corresponding parameter's attributes. However, at the
        prototype substitution phase when a template is being instantiated,
        expression may be created and checked without a fully specialized
        prototype. Under such a scenario, skip nonnull checking on that
        argument.
      
      Reviewers: rjmccall, tra, yaxunl
      
      Subscribers: javed.absar, kristof.beyls, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D59900
      
      llvm-svn: 357236
      ce38992a
    • Matt Arsenault's avatar
      AMDGPU/GlobalISel: Insert waterfall loop for vector indexing · 5fddf091
      Matt Arsenault authored
      The register index can only really be an SGPR. Lie that a VGPR index
      is legal, and then rewrite the instruction in a waterfall loop to
      handle the index.
      
      llvm-svn: 357235
      5fddf091
    • Zi Xuan Wu's avatar
      [PowerPC] Strength reduction of multiply by a constant by shift and add/sub in place · 1445b77e
      Zi Xuan Wu authored
      A shift and add/sub sequence combination is faster in place of a multiply by constant. 
      Because the cycle or latency of multiply is not huge, we only consider such following
      worthy patterns.
      
      ```
      (mul x, 2^N + 1) => (add (shl x, N), x)
      (mul x, -(2^N + 1)) => -(add (shl x, N), x)
      (mul x, 2^N - 1) => (sub (shl x, N), x)
      (mul x, -(2^N - 1)) => (sub x, (shl x, N))
      ```
      
      And the cycles or latency is subtarget-dependent so that we need consider the
      subtarget to determine to do or not do such transformation. 
      Also data type is considered for different cycles or latency to do multiply.
      
      Differential Revision: https://reviews.llvm.org/D58950
      
      llvm-svn: 357233
      1445b77e
    • Nico Weber's avatar
      gn build: Add check-clang-tools to run clang-tools-extra lit tests · 2a3f42c9
      Nico Weber authored
      Only runs the clang-tools-extra lit tests; not yet the unit tests.
      
      Add a build file for clangd-indexer too, since it's needed for
      the tests.
      
      Differential Revision: https://reviews.llvm.org/D59955
      
      llvm-svn: 357232
      2a3f42c9
    • Nico Weber's avatar
      Add .py extension to clang-tools-extra lit cfg files · ef7b8423
      Nico Weber authored
      Follow-up to r313892, which did this for clang and llvm.
      
      Differential Revision: https://reviews.llvm.org/D59953
      
      llvm-svn: 357231
      ef7b8423
    • Xing GUO's avatar
      [llvm-readobj] Change variable names to match LLVM-style. NFC. · 09a77fec
      Xing GUO authored
      Summary: This patch helps change variable names to match LLVM-style
      
      Reviewers: jhenderson, Higuoxing
      
      Reviewed By: Higuoxing
      
      Subscribers: rupprecht, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D59931
      
      llvm-svn: 357230
      09a77fec
    • Akira Hatanaka's avatar
      [CodeGen][ObjC] Adjust the addresses passed to calls to synthesized · 8b8d3623
      Akira Hatanaka authored
      copy/move constructor/assignment operator functions for non-trivial C
      structs.
      
      This commit fixes a bug where the offset of struct fields weren't being
      taken into account when computing the addresses passed to calls to the
      special functions.
      
      For example, the copy constructor for S1 (__copy_constructor_8_8_s0_s8)
      would pass the start addresses of the destination and source structs to
      the call to S0's copy constructor (_copy_constructor_8_8_s0) without
      adding the offset of field f1 to the addresses.
      
      typedef struct {
        id f0;
        S0 f1;
      } S1;
      
      void test(S1 s1) {
        S1 t = s1;
      }
      
      rdar://problem/49400610
      
      llvm-svn: 357229
      8b8d3623
    • Akira Hatanaka's avatar
      Fix typos and formatting. NFC. · 801cc327
      Akira Hatanaka authored
      llvm-svn: 357228
      801cc327
    • Florian Hahn's avatar
      Revert Recommit "[DSE] Preserve basic block ordering using OrderedBasicBlock." · 2b85de43
      Florian Hahn authored
      Another buildbot failure
      
      http://lab.llvm.org:8011/builders/clang-cmake-x86_64-sde-avx512-linux/builds/20402
      
      clang-9: /home/ssglocal/clang-cmake-x86_64-sde-avx512-linux/clang-cmake-x86_64-sde-avx512-linux/llvm/include/llvm/ADT/DenseMap.h:1228: llvm::DenseMapIterator<KeyT, ValueT, KeyInfoT, Bucket, IsConst>::value_type* llvm::DenseMapIterator<KeyT, ValueT, KeyInfoT, Bucket, IsConst>::operator->() const [with KeyT = const llvm::Instruction*; ValueT = unsigned int; KeyInfoT = llvm::DenseMapInfo<const llvm::Instruction*>; Bucket = llvm::detail::DenseMapPair<const llvm::Instruction*, unsigned int>; bool IsConst = false; llvm::DenseMapIterator<KeyT, ValueT, KeyInfoT, Bucket, IsConst>::pointer = llvm::detail::DenseMapPair<const llvm::Instruction*, unsigned int>*; llvm::DenseMapIterator<KeyT, ValueT, KeyInfoT, Bucket, IsConst>::value_type = llvm::detail::DenseMapPair<const llvm::Instruction*, unsigned int>]: Assertion `isHandleInSync() && "invalid iterator access!"' failed.
      
      0.	Program arguments: /home/ssglocal/clang-cmake-x86_64-sde-avx512-linux/clang-cmake-x86_64-sde-avx512-linux/stage1.install/bin/clang-9 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name ArchiveCommandLine.cpp -mrelocation-model static -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu skylake-avx512 -dwarf-column-info -debugger-tuning=gdb -momit-leaf-frame-pointer -coverage-notes-file /home/ssglocal/clang-cmake-x86_64-sde-avx512-linux/clang-cmake-x86_64-sde-avx512-linux/test/sandbox/build/MultiSource/Benchmarks/7zip/Output/ArchiveCommandLine.llvm.gcno -resource-dir /home/ssglocal/clang-cmake-x86_64-sde-avx512-linux/clang-cmake-x86_64-sde-avx512-linux/stage1.install/lib/clang/9.0.0 -I /home/ssglocal/clang-cmake-x86_64-sde-avx512-linux/clang-cmake-x86_64-sde-avx512-linux/test/sandbox/build/MultiSource/Benchmarks/7zip -I /home/ssglocal/clang-cmake-x86_64-sde-avx512-linux/clang-cmake-x86_64-sde-avx512-linux/test/test-suite/MultiSource/Benchmarks/7zip -I /home/ssglocal/clang-cmake-x86_64-sde-avx512-linux/clang-cmake-x86_64-sde-avx512-linux/test/test-suite/include -I ../../../include -D _GNU_SOURCE -D __STDC_LIMIT_MACROS -D NDEBUG -D BREAK_HANDLER -D UNICODE -D _UNICODE -I /home/ssglocal/clang-cmake-x86_64-sde-avx512-linux/clang-cmake-x86_64-sde-avx512-linux/test/test-suite/MultiSource/Benchmarks/7zip/C -I /home/ssglocal/clang-cmake-x86_64-sde-avx512-linux/clang-cmake-x86_64-sde-avx512-linux/test/test-suite/MultiSource/Benchmarks/7zip/CPP/myWindows -I /home/ssglocal/clang-cmake-x86_64-sde-avx512-linux/clang-cmake-x86_64-sde-avx512-linux/test/test-suite/MultiSource/Benchmarks/7zip/CPP/include_windows -I /home/ssglocal/clang-cmake-x86_64-sde-avx512-linux/clang-cmake-x86_64-sde-avx512-linux/test/test-suite/MultiSource/Benchmarks/7zip/CPP -I . -D _FILE_OFFSET_BITS=64 -D _LARGEFILE_SOURCE -D NDEBUG -D _REENTRANT -D ENV_UNIX -D _7ZIP_LARGE_PAGES -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/x86_64-linux-gnu/c++/5.4.0 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/x86_64-linux-gnu/c++/5.4.0 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/backward -internal-isystem /usr/local/include -internal-isystem /home/ssglocal/clang-cmake-x86_64-sde-avx512-linux/clang-cmake-x86_64-sde-avx512-linux/stage1.install/lib/clang/9.0.0/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O3 -std=gnu++98 -fdeprecated-macro -fdebug-compilation-dir /home/ssglocal/clang-cmake-x86_64-sde-avx512-linux/clang-cmake-x86_64-sde-avx512-linux/test/sandbox/build/MultiSource/Benchmarks/7zip -ferror-limit 19 -fmessage-length 0 -pthread -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -vectorize-loops -vectorize-slp -o Output/ArchiveCommandLine.llvm.o -x c++ /home/ssglocal/clang-cmake-x86_64-sde-avx512-linux/clang-cmake-x86_64-sde-avx512-linux/test/test-suite/MultiSource/Benchmarks/7zip/CPP/7zip/UI/Common/ArchiveCommandLine.cpp -faddrsig
      
      This reverts r357222 (git commit 64cccfcc)
      
      llvm-svn: 357227
      2b85de43
    • Thomas Lively's avatar
      [WebAssembly] Merge used feature sets, update atomics linkage policy · 3f34e1b8
      Thomas Lively authored
      Summary:
      It does not currently make sense to use WebAssembly features in some functions
      but not others, so this CL adds an IR pass that takes the union of all used
      feature sets and applies it to each function in the module. This allows us to
      prevent atomics from being lowered away if some function has opted in to using
      them. When atomics is not enabled anywhere, we detect whether there exists any
      atomic operations or thread local storage that would be stripped and disallow
      linking with objects that contain atomics if and only if atomics or tls are
      stripped. When atomics is enabled, mark it as used but do not require it of
      other objects in the link. These changes allow libraries that do not use atomics
      to be built once and linked into both single-threaded and multithreaded
      binaries.
      
      Reviewers: aheejin, sbc100, dschuff
      
      Subscribers: jgravelle-google, hiraditya, sunfish, jfb, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D59625
      
      llvm-svn: 357226
      3f34e1b8