1. Nov 06, 2020
    • David Spickett's avatar
      [Clang][AArch64] Remove unused prefix in constrained rounding test · aecd52b9
      David Spickett authored
      This test was added in 7f38812d
      and all the other tests make use of the COMMONIR check. So I think
      this was left in by mistake for this particular test.
      
      Reviewed By: kpn
      
      Differential Revision: https://reviews.llvm.org/D90921
      aecd52b9
    • Than McIntosh's avatar
      [NFC] Fix typo in comment. · b3d0f028
      Than McIntosh authored
      Differential Revision: https://reviews.llvm.org/D90846
      b3d0f028
    • Paul C. Anagnostopoulos's avatar
    • Michał Górny's avatar
      [lldb] [test] Avoid double negation in llgs/debugserver logic · 1a8d5282
      Michał Górny authored
      Use positive logic (i.e. llgs_platform/debugserver_platform) for
      indicating which platforms use the particular server variant.
      Deduplicate the lists — it is rather expected that none of the platforms
      using LLGS would use debugserver.
      
      Differential Revision: https://reviews.llvm.org/D90875
      1a8d5282
    • Simon Moll's avatar
      [VE][NFC] Refactor to support more than one calling conv · adc69743
      Simon Moll authored
      Prepare for supporting  different calling conventions by factoring out
      things into CC-dependent selection functions (getParamCC, getReturnCC).
      
      Reviewed By: kaz7
      
      Differential Revision: https://reviews.llvm.org/D90911
      adc69743
    • Louis Dionne's avatar
    • Louis Dionne's avatar
      Allow running back-deployment testing against libc++abi · 4d79ef81
      Louis Dionne authored
      Summary:
      Before this patch, we could only link against the back-deployment libc++abi
      dylib. This patch allows linking against the just-built libc++abi, but
      running against the back-deployment one -- just like we do for libc++.
      
      Also, add XFAIL markup to flag expected errors.
      4d79ef81
    • Florian Hahn's avatar
      [SLP] Also try to vectorize incoming values of PHIs . · d8d1cc64
      Florian Hahn authored
      Currently we do not consider incoming values of PHIs as roots for SLP
      vectorization. This means we miss scenarios like the one in the test
      case and PR47670.
      
      It appears quite straight-forward to consider incoming values of PHIs as
      roots for vectorization, but I might be missing something that makes
      this problematic.
      
      In terms of vectorized instructions, this applies to quite a few
      benchmarks across MultiSource/SPEC2000/SPEC2006 on X86 with -O3 -flto
      
          Same hash: 185 (filtered out)
          Remaining: 52
          Metric: SLP.NumVectorInstructions
      
          Program                                        base    patch   diff
           test-suite...ProxyApps-C++/HPCCG/HPCCG.test     9.00   27.00  200.0%
           test-suite...C/CFP2000/179.art/179.art.test     8.00   22.00  175.0%
           test-suite...T2006/458.sjeng/458.sjeng.test    14.00   30.00  114.3%
           test-suite...ce/Benchmarks/PAQ8p/paq8p.test    11.00   18.00  63.6%
           test-suite...s/FreeBench/neural/neural.test    12.00   18.00  50.0%
           test-suite...rimaran/enc-3des/enc-3des.test    65.00   95.00  46.2%
           test-suite...006/450.soplex/450.soplex.test    63.00   89.00  41.3%
           test-suite...ProxyApps-C++/CLAMR/CLAMR.test   177.00  250.00  41.2%
           test-suite...nchmarks/McCat/18-imp/imp.test    13.00   18.00  38.5%
           test-suite.../Applications/sgefa/sgefa.test    26.00   35.00  34.6%
           test-suite...pplications/oggenc/oggenc.test   100.00  133.00  33.0%
           test-suite...6/482.sphinx3/482.sphinx3.test   103.00  134.00  30.1%
           test-suite...oxyApps-C++/miniFE/miniFE.test   169.00  213.00  26.0%
           test-suite.../Benchmarks/Olden/tsp/tsp.test    59.00   73.00  23.7%
           test-suite...TimberWolfMC/timberwolfmc.test   503.00  622.00  23.7%
           test-suite...T2006/456.hmmer/456.hmmer.test    65.00   79.00  21.5%
           test-suite...libquantum/462.libquantum.test    58.00   68.00  17.2%
           test-suite...ternal/HMMER/hmmcalibrate.test    84.00   98.00  16.7%
           test-suite...ications/JM/ldecod/ldecod.test   351.00  401.00  14.2%
           test-suite...arks/VersaBench/dbms/dbms.test    52.00   57.00   9.6%
           test-suite...ce/Benchmarks/Olden/bh/bh.test   118.00  128.00   8.5%
           test-suite.../Benchmarks/Bullet/bullet.test   6355.00 6880.00  8.3%
           test-suite...nsumer-lame/consumer-lame.test   480.00  519.00   8.1%
           test-suite...000/183.equake/183.equake.test   226.00  244.00   8.0%
           test-suite...chmarks/Olden/power/power.test   105.00  113.00   7.6%
           test-suite...6/471.omnetpp/471.omnetpp.test    92.00   99.00   7.6%
           test-suite...ications/JM/lencod/lencod.test   1173.00 1261.00  7.5%
           test-suite...0/253.perlbmk/253.perlbmk.test    55.00   59.00   7.3%
           test-suite...oxyApps-C/miniAMR/miniAMR.test    92.00   98.00   6.5%
           test-suite...chmarks/MallocBench/gs/gs.test   446.00  473.00   6.1%
           test-suite.../CINT2006/403.gcc/403.gcc.test   464.00  491.00   5.8%
           test-suite...6/464.h264ref/464.h264ref.test   998.00  1055.00  5.7%
           test-suite...006/453.povray/453.povray.test   5711.00 6007.00  5.2%
           test-suite...FreeBench/distray/distray.test   102.00  107.00   4.9%
           test-suite...:: External/Povray/povray.test   4184.00 4378.00  4.6%
           test-suite...DOE-ProxyApps-C/CoMD/CoMD.test   112.00  117.00   4.5%
           test-suite...T2006/445.gobmk/445.gobmk.test   104.00  108.00   3.8%
           test-suite...CI_Purple/SMG2000/smg2000.test   789.00  819.00   3.8%
           test-suite...yApps-C++/PENNANT/PENNANT.test   233.00  241.00   3.4%
           test-suite...marks/7zip/7zip-benchmark.test   417.00  428.00   2.6%
           test-suite...arks/mafft/pairlocalalign.test   627.00  643.00   2.6%
           test-suite.../Benchmarks/nbench/nbench.test   259.00  265.00   2.3%
           test-suite...006/447.dealII/447.dealII.test   4641.00 4732.00  2.0%
           test-suite...lications/ClamAV/clamscan.test   106.00  108.00   1.9%
           test-suite...CFP2000/177.mesa/177.mesa.test   1639.00 1664.00  1.5%
           test-suite...oxyApps-C/RSBench/rsbench.test    66.00   65.00  -1.5%
           test-suite.../CINT2000/252.eon/252.eon.test   3416.00 3444.00  0.8%
           test-suite...CFP2000/188.ammp/188.ammp.test   1846.00 1861.00  0.8%
           test-suite.../CINT2000/176.gcc/176.gcc.test   152.00  153.00   0.7%
           test-suite...CFP2006/444.namd/444.namd.test   3528.00 3544.00  0.5%
           test-suite...T2006/473.astar/473.astar.test    98.00   98.00   0.0%
           test-suite...frame_layout/frame_layout.test    NaN     39.00   nan%
      
      On ARM64, there appears to be a slight regression on SPEC2006, which
      might be interesting to investigate:
      
         test-suite...T2006/473.astar/473.astar.test   0.9%
      
      Reviewed By: ABataev
      
      Differential Revision: https://reviews.llvm.org/D88735
      d8d1cc64
    • David Zarzycki's avatar
      [lld testing] Unbreak read-only source builds · 179d91b3
      David Zarzycki authored
      Tests must not modify the source tree.
      179d91b3
    • Simon Pilgrim's avatar
      95c23e2d
    • David Spickett's avatar
      [AArch64][MC] Remove unused CHECK-ERROR in SVE test file · 624d3fe0
      David Spickett authored
      This file is only ever looking for errors so we can
      just use the default CHECK.
      
      Reviewed By: sdesmalen
      
      Differential Revision: https://reviews.llvm.org/D90915
      624d3fe0
    • David Spickett's avatar
      [AArch64][MC] Remove unused prefix in v8.4-a trace test · 42848b82
      David Spickett authored
      It was unused when added and the CHECK-ERROR lines
      cover the possible outputs.
      
      Reviewed By: ostannard
      
      Differential Revision: https://reviews.llvm.org/D90913
      42848b82
    • Kazushi (Jam) Marukawa's avatar
      [VE] Optimize address calculation · 43df29e2
      Kazushi (Jam) Marukawa authored
      Optimize address calculations using LEA/LEASL instructions.
      Update comments in VEISelLowering.cpp also.  Update an
      existing regression test optimized by this modification.
      
      Reviewed By: simoll
      
      Differential Revision: https://reviews.llvm.org/D90878
      43df29e2
    • Simon Moll's avatar
      [VE][TTI] don't advertise vregs/vops · d3b33a78
      Simon Moll authored
      Claim to not have any vector support to dissuade SLP, LV and friends
      from generating SIMD IR for the VE target.  We will take this back once
      vector isel is stable.
      
      Reviewed By: kaz7, fhahn
      
      Differential Revision: https://reviews.llvm.org/D90462
      d3b33a78
    • Simon Pilgrim's avatar
    • Sander de Smalen's avatar
      [VPlan] NFC: Change VFRange to take ElementCount · 4a3bb9ea
      Sander de Smalen authored
      This patch changes the type of Start, End in VFRange to be an ElementCount
      instead of `unsigned`. This is done as preparation to make VPlans for
      scalable vectors, but is otherwise NFC.
      
      Reviewed By: dmgreen, fhahn, vkmr
      
      Differential Revision: https://reviews.llvm.org/D90715
      4a3bb9ea
    • Alex Zinenko's avatar
      [mlir] Add folding of memref_cast inside another memref_cast · 0c782c21
      Alex Zinenko authored
      There exists a generic folding facility that folds the operand of a memref_cast
      into users of memref_cast that support this. However, it was not used for the
      memref_cast itself. Fix it to enable elimination of memref_cast chains such as
      
        %1 = memref_cast %0 : A to B
        %2 = memref_cast %1 : B to A
      
      that is achieved by combining the folding with the existing "A to A" cast
      elimination.
      
      Reviewed By: nicolasvasilache
      
      Differential Revision: https://reviews.llvm.org/D90910
      0c782c21
    • Krasimir Georgiev's avatar
      [clang-format] do not break before { in JS comments · 2dbcbd35
      Krasimir Georgiev authored
      In JavaScript some @tags can be followed by `{`, and machinery that parses
      these comments will fail to understand the comment if followed by a line break.
      
      clang-format already handles this case by not breaking before `{` in comments.
      However this was not working in cases when the column limit falls within `@tag`
      or between `@tag` and `{`. This adapts clang-format for this case.
      
      Reviewed By: mprobst
      
      Differential Revision: https://reviews.llvm.org/D90908
      2dbcbd35
    • Sander de Smalen's avatar
      [TypeSize] Extend UnivariateLinearPolyBase with getWithIncrement/Decrement methods · 5ee9ef85
      Sander de Smalen authored
      This patch adds getWithIncrement/getWithDecrement methods to
      ElementCount and TypeSize to allow:
      
        TypeSize::getFixed(8).getWithIncrement(8)     <=> TypeSize::getFixed(16)
        TypeSize::getFixed(16).getWithDecrement(8)    <=> TypeSize::getFixed(8)
        TypeSize::getScalable(8).getWithIncrement(8)  <=> TypeSize::getScalable(16)
        TypeSize::getScalable(16).getWithDecrement(8) <=> TypeSize::getScalable(8)
      
      This patch implements parts of the POC in D90342.
      
      Reviewed By: ctetreau, dmgreen
      
      Differential Revision: https://reviews.llvm.org/D90713
      5ee9ef85
    • Roman Lebedev's avatar
      [IR] CmpInst: Add getFlippedSignednessPredicate() · 8d0fdd36
      Roman Lebedev authored
      And refactor a few places to use it
      8d0fdd36
    • Roman Lebedev's avatar
      [IR] CmpInst: add isRelational() · d4f70d64
      Roman Lebedev authored
      Since there's CmpInst::isEquality(), it only makes sense
      to have it's inverse for consistency.
      d4f70d64
    • Roman Lebedev's avatar
      [IR] CmpInst: add isEquality(Pred) · c7c702a2
      Roman Lebedev authored
      Currently there is only a member version of isEquality(),
      which requires an actual [IF]CmpInst to be avaliable,
      which isn't always possible, and is inconsistent with
      the general pattern here.
      
      I wanted to use it in a new patch, but it wasn't there..
      c7c702a2
    • Roman Lebedev's avatar
      [IR] CmpInst: add getUnsignedPredicate() · a5ae3eda
      Roman Lebedev authored
      There's already getSignedPredicate(), it is not symmetrical to not have
      it's opposite. I wanted to use it in new code, but it wasn't there..
      a5ae3eda
    • Freddy Ye's avatar
      [X86] use macros to split GFNI intrinsics into different kinds · 5e312e00
      Freddy Ye authored
      Tremont microarchitecture only has GFNI(SSE) version, not AVX and
      AVX512 version. This patch is to avoid compiling fail on Windows when
      using -march=tremont to invoke one of GFNI(SSE) intrinsic.
      
      Differential Revision: https://reviews.llvm.org/D90822
      5e312e00
    • Max Kazantsev's avatar
      84fe777a
    • Yevgeny Rouban's avatar
      [BranchProbabilityInfo] Introduce method copyEdgeProbabilities(). NFC · 681d6c71
      Yevgeny Rouban authored
      A new method is introduced to allow bulk copy of outgoing edge
      probabilities from one block to another. This can be useful when
      a block is cloned from another one and we do not know if there
      are edge probabilities set for the original block or not.
      Copying outside of the BranchProbabilityInfo class makes the user
      unconditionally set the cloned block's edge probabilities even if
      they are unset for the original block.
      
      Reviewed By: MaskRay
      
      Differential Revision: https://reviews.llvm.org/D90839
      681d6c71
    • Max Kazantsev's avatar
      [Test] Run test with expensive SE inference. NFC · 1776581b
      Max Kazantsev authored
      The planned changes require expensive inference to kick in
      1776581b
    • Yevgeny Rouban's avatar
      [BranchProbabilityInfo] Remove block handles in eraseBlock() · e38c8e75
      Yevgeny Rouban authored
      BranchProbabilityInfo::eraseBlock() is a public method and
      can be called without deleting the block itself.
      This method is made remove the correspondent tracking handle
      from BranchProbabilityInfo::Handles along with
      the probabilities of the block. Handles.erase() call is moved
      to eraseBlock().
      In setEdgeProbability() we need to add the block handle only once.
      
      Reviewed By: kazu
      
      Differential Revision: https://reviews.llvm.org/D90838
      e38c8e75
    • Stella Laurenzo's avatar
      [mlir][CAPI] Add missing 'static' to inline C function. · 60e2c5b0
      Stella Laurenzo authored
      * Asked to submit separately from https://reviews.llvm.org/D90824
      60e2c5b0
    • Yevgeny Rouban's avatar
      [BranchProbabilityInfo] Get rid of MaxSuccIdx. NFC · 4931158d
      Yevgeny Rouban authored
      This refactoring allows to eliminate the MaxSuccIdx map
      proposed in the commit a7b662d0.
      The idea is to remove probabilities for a block BB for
      all its successors one by one from first, second, ...
      till N-th until they are defined in Probs. This works
      because probabilities for the block are set at once for
      all its successors from number 0 to N-1 and the rest
      are removed if there were stale probs.
      The protected method setEdgeProbability(), which set
      probabilities for individual successor, is removed.
      This makes it clear that the probabilities are set in
      bulk by the public method with the same name.
      
      Reviewed By: kazu, MaskRay
      
      Differential Revision: https://reviews.llvm.org/D90837
      4931158d
    • Mehdi Amini's avatar
      Check for nullptr before dereferencing in translateModuleToLLVMIR() · 2af37cf7
      Mehdi Amini authored
      This is defensive with respect to invocations of this API with an IR
      that isn't ready to be converted to LLVM IR.
      2af37cf7
    • Fangrui Song's avatar
      [test] Properly test -Werror-implicit-function-declaration and -Wvec-elem-size · 247c5b5d
      Fangrui Song authored
      Reviewed By: dblaikie
      
      Differential Revision: https://reviews.llvm.org/D90874
      247c5b5d
    • Valentin Clement's avatar
      [flang][openacc] Add parsing tests and semantic check for set directive · 9914a873
      Valentin Clement authored
      This patch add some parsing and clause validity tests for the set directive.
      It makes use of the possibility introduces in patch D90770 to check the restriction
      were one of the default_async, device_num and device_type clauses is required but also
      not more than once on the set directive.
      
      Reviewed By: sameeranjoshi
      
      Differential Revision: https://reviews.llvm.org/D90771
      9914a873
    • Walter Erquinigo's avatar
      [trace][intel-pt] Implement the basic decoding functionality · cfd96f05
      Walter Erquinigo authored
      Depends on D89408.
      
      This diff finally implements trace decoding!
      
      The current interface is
      
        $ trace load /path/to/trace/session/file.json
        $ thread trace dump instructions
      
        thread #1: tid = 3842849, total instructions = 22
          [ 0] 0x40052d
          [ 1] 0x40052d
          ...
          [19] 0x400521
      
        $ # simply enter, which is a repeat command
          [20] 0x40052d
          [21] 0x400529
          ...
      
      This doesn't do any disassembly, which will be done in the next diff.
      
      Changes:
      - Added an IntelPTDecoder class, that is a wrapper for libipt, which is the actual library that performs the decoding.
      - Added TraceThreadDecoder class that decodes traces and memoizes the result to avoid repeating the decoding step.
      - Added a DecodedThread class, which represents the output from decoding and that for the time being only stores the list of reconstructed instructions. Later it'll contain the function call hierarchy, which will enable reconstructing backtraces.
      - Added basic APIs for accessing the trace in Trace.h:
        - GetInstructionCount, which counts the number of instructions traced for a given thread
        - IsTraceFailed, which returns an Error if decoding a thread failed
        - ForEachInstruction, which iterates on the instructions traced for a given thread, concealing the internal storage of threads, as plug-ins can decide to generate the instructions on the fly or to store them all in a vector, like I do.
      - DumpTraceInstructions was updated to print the instructions or show an error message if decoding was impossible.
      - Tests included
      
      Differential Revision: https://reviews.llvm.org/D89283
      cfd96f05
    • Kazushi (Jam) Marukawa's avatar
      [VE][NFC] Update rem.ll regression test · b8745751
      Kazushi (Jam) Marukawa authored
      `Replace ISD::SREM handling with KnownBits::srem to reduce code
      duplication` (bf04e343) changed
      the result of rem.ll regression test.  So, updating it.
      b8745751
    • Luo, Yuanke's avatar
      [X86] check the k pair register in ipra-reg-usage.ll. · 6ca8569f
      Luo, Yuanke authored
      Reviewed By: pengfei
      
      Differential Revision: https://reviews.llvm.org/D90810
      6ca8569f
    • Stella Stamenova's avatar
      Revert "Allow searching for prebuilt implicit modules." · c67656b9
      Stella Stamenova authored
      This reverts commit 71e108cd.
      
      This change caused a build failure on Windows:
      http://lab.llvm.org:8011/#/builders/83/builds/570
      c67656b9
    • Jonas Devlieghere's avatar
      [lldb] Remove Crashlog/interactive.test · 99a99c29
      Jonas Devlieghere authored
      This test requires running under the Python we built against (which is
      easy) and setting up the PYTHONPATH (which is not worth it for this
      simple test).
      99a99c29
    • Giorgis Georgakoudis's avatar
      [CodeExtractor] Replace uses of extracted bitcasts in out-of-region lifetime markers · 700d2417
      Giorgis Georgakoudis authored
      CodeExtractor handles bitcasts in the extracted region that have
      lifetime markers users in the outer region as outputs. That
      creates unnecessary alloca/reload instructions and extra lifetime
      markers. The patch identifies those cases, and replaces uses in
      out-of-region lifetime markers with new bitcasts in the outer region.
      
      **Example**
      ```
      define void @foo() {
      entry:
        %0 = alloca i32
        br label %extract
      
      extract:
        %1 = bitcast i32* %0 to i8*
        call void @llvm.lifetime.start.p0i8(i64 4, i8* %1)
        call void @use(i32* %0)
        br label %exit
      
      exit:
        call void @use(i32* %0)
        call void @llvm.lifetime.end.p0i8(i64 4, i8* %1)
        ret void
      }
      ```
      
      **Current extraction**
      ```
      define void @foo() {
      entry:
        %.loc = alloca i8*, align 8
        %0 = alloca i32, align 4
        br label %codeRepl
      
      codeRepl:                                         ; preds = %entry
        %lt.cast = bitcast i8** %.loc to i8*
        call void @llvm.lifetime.start.p0i8(i64 -1, i8* %lt.cast)
        %lt.cast1 = bitcast i32* %0 to i8*
        call void @llvm.lifetime.start.p0i8(i64 -1, i8* %lt.cast1)
        call void @foo.extract(i32* %0, i8** %.loc)
        %.reload = load i8*, i8** %.loc, align 8
        call void @llvm.lifetime.end.p0i8(i64 -1, i8* %lt.cast)
        br label %exit
      
      exit:                                             ; preds = %codeRepl
        call void @use(i32* %0)
        call void @llvm.lifetime.end.p0i8(i64 4, i8* %.reload)
        ret void
      }
      
      define internal void @foo.extract(i32* %0, i8** %.out) {
      newFuncRoot:
        br label %extract
      
      exit.exitStub:                                    ; preds = %extract
        ret void
      
      extract:                                          ; preds = %newFuncRoot
        %1 = bitcast i32* %0 to i8*
        store i8* %1, i8** %.out, align 8
        call void @use(i32* %0)
        br label %exit.exitStub
      }
      ```
      
      **Extraction with patch**
      ```
      define void @foo() {
      entry:
        %0 = alloca i32, align 4
        br label %codeRepl
      
      codeRepl:                                         ; preds = %entry
        %lt.cast1 = bitcast i32* %0 to i8*
        call void @llvm.lifetime.start.p0i8(i64 -1, i8* %lt.cast1)
        call void @foo.extract(i32* %0)
        br label %exit
      
      exit:                                             ; preds = %codeRepl
        call void @use(i32* %0)
        %lt.cast = bitcast i32* %0 to i8*
        call void @llvm.lifetime.end.p0i8(i64 4, i8* %lt.cast)
        ret void
      }
      
      define internal void @foo.extract(i32* %0) {
      newFuncRoot:
        br label %extract
      
      exit.exitStub:                                    ; preds = %extract
        ret void
      
      extract:                                          ; preds = %newFuncRoot
        %1 = bitcast i32* %0 to i8*
        call void @use(i32* %0)
        br label %exit.exitStub
      }
      ```
      
      Reviewed By: vsk
      
      Differential Revision: https://reviews.llvm.org/D90689
      700d2417
    • Vedant Kumar's avatar
      [TargetList] Delete the destructor · 65d15fef
      Vedant Kumar authored
      AFAICT, ~TargetList simply implements the default destructor, plus some
      locking.
      
      The history is murky, so I'm not sure why we do this locking. Perhaps,
      at some point, it was possible to delete the same TargetList instance
      from two different threads, setting up a race. If that were true, then
      the locking would protect against the race.
      
      Since TargetList is uniquely owned by Debugger (m_target_list), no such
      race is possible today.
      
      Testing: check-lldb
      
      Differential Revision: https://reviews.llvm.org/D90895
      65d15fef