1. Apr 15, 2019
    • Alexander Potapenko's avatar
      [Transforms][ASan] Move findAllocaForValue() to Utils/Local.cpp. NFC · 6a63e5aa
      Alexander Potapenko authored
      Summary:
      Factor out findAllocaForValue() from ASan so that we can use it in
      MSan to handle lifetime intrinsics.
      
      Reviewers: eugenis, pcc
      
      Subscribers: hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D60615
      
      llvm-svn: 358380
      6a63e5aa
    • Serguei Katkov's avatar
      [NewPM] Add Option handling for SimplifyCFG · f5432837
      Serguei Katkov authored
      This patch enables passing options to SimplifyCFGPass via the passes pipeline.
      
      Reviewers: chandlerc, fedor.sergeev, leonardchan, philip.pfaffe
      Reviewed By: fedor.sergeev
      Subscribers: llvm-commits
      Differential Revision: https://reviews.llvm.org/D60675
      
      llvm-svn: 358379
      f5432837
    • Eric Liu's avatar
      [Lookup] Invisible decls should not be ambiguous when renaming. · dc8d8fb2
      Eric Liu authored
      Summary:
      For example, a renamed type in a header file can conflict with declaration in
      a random file that includes the header, but we should not consider the decl ambiguous if
      it's not visible at the rename location. This improves consistency of generated replacements
      when header file is included in different TUs.
      
      Reviewers: hokein
      
      Subscribers: cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D60257
      
      llvm-svn: 358378
      dc8d8fb2
    • Fangrui Song's avatar
      [DWARF] Delete redundant check in DWARFAddressRange::intersects · 42605f83
      Fangrui Song authored
      llvm-svn: 358377
      42605f83
    • Fangrui Song's avatar
      [DWARF] Fix DWARFVerifier::DieRangeInfo::intersects · b93de4cd
      Fangrui Song authored
      It was incorrect if RHS had more than 1 ranges and one of the ranges interacted with *this
      
      llvm-svn: 358376
      b93de4cd
    • Paul Hoad's avatar
      [clang-format] [PR41170] Break after return type ignored with certain comments positions · bd8a1ce7
      Paul Hoad authored
      Summary:
      Addresses https://bugs.llvm.org/show_bug.cgi?id=41170
      
      The AlwaysBreakAfterReturn type setting can go wrong if the line ends with a comment
      ```
      void foo() /* comment */
      ```
      or
      
      ```
      void foo() // comment
      ```
      
      It will incorrectly see such functions as Declarations and not Definitions
      
      The following code addresses this by looking for function which end with `; <comment>` rather than just `;` or `<comment>`
      
      Reviewers: klimek, djasper, reuk, russellmcc, owenpan, sammccall
      Reviewed By: owenpan
      Subscribers: lebedev.ri, cfe-commits, sammccall
      Tags: #clang
      Differential Revision: https://reviews.llvm.org/D60363
      
      llvm-svn: 358375
      bd8a1ce7
    • Fangrui Song's avatar
      [DWARF] Make DWARFDebugLine::ParsingState::RowNumber a local variable · 50a09670
      Fangrui Song authored
      llvm-svn: 358374
      50a09670
    • Kadir Cetinkaya's avatar
      [clangd] Reorder source files in CMakeLists · 43e92880
      Kadir Cetinkaya authored
      llvm-svn: 358373
      43e92880
    • Bjorn Pettersson's avatar
      [SelectionDAG] Use KnownBits::computeForAddSub/computeForAddCarry · 60569363
      Bjorn Pettersson authored
      Summary:
      Use KnownBits::computeForAddSub/computeForAddCarry
      in SelectionDAG::computeKnownBits when doing value
      tracking for addition/subtraction.
      
      This should improve the precision of the known bits,
      as we only used to make a simple estimate of known
      zeroes. The KnownBits support functions are also
      able to deduce bits that are known to be one in the
      result.
      
      Reviewers: spatel, RKSimon, nikic, lebedev.ri
      
      Reviewed By: nikic
      
      Subscribers: nikic, javed.absar, lebedev.ri, hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D60460
      
      llvm-svn: 358372
      60569363
    • Craig Topper's avatar
      [X86] Regenerate checks for domain-reassignment.mir · abd87ff4
      Craig Topper authored
      Apparently there are some stray IMPLICIT_DEF operations that weren't in the
      checks. Not sure if they've always been there or something changed at some
      point.
      
      llvm-svn: 358371
      abd87ff4
    • Jim Lin's avatar
      [Sparc] Fix typo. NFC. · 489f8255
      Jim Lin authored
      llvm-svn: 358370
      489f8255
    • Amara Emerson's avatar
      [GlobalISel] Enable CSE in the IRTranslator & legalizer for -O0 with constants only. · 946b1246
      Amara Emerson authored
      Other opcodes shouldn't be CSE'd until we can be sure debug info quality won't
      be degraded.
      
      This change also improves the IRTranslator so that in most places, but not all,
      it creates constants using the MIRBuilder directly instead of first creating a
      new destination vreg and then creating a constant. By doing this, the
      buildConstant() method can just return the vreg of an existing G_CONSTANT
      instead of having to create a COPY from it.
      
      I measured a 0.2% improvement in compile time and a 0.9% improvement in code
      size at -O0 ARM64.
      
      Compile time:
      Program                                        base   cse    diff
      test-suite...ark/tramp3d-v4/tramp3d-v4.test     9.04   9.12  0.8%
      test-suite...Mark/mafft/pairlocalalign.test     2.68   2.66 -0.7%
      test-suite...-typeset/consumer-typeset.test     5.53   5.51 -0.4%
      test-suite :: CTMark/lencod/lencod.test         5.30   5.28 -0.3%
      test-suite :: CTMark/Bullet/bullet.test        25.82  25.76 -0.2%
      test-suite...:: CTMark/ClamAV/clamscan.test     6.92   6.90 -0.2%
      test-suite...TMark/7zip/7zip-benchmark.test    34.24  34.17 -0.2%
      test-suite :: CTMark/SPASS/SPASS.test           6.25   6.24 -0.1%
      test-suite...:: CTMark/sqlite3/sqlite3.test     1.66   1.66 -0.1%
      test-suite :: CTMark/kimwitu++/kc.test         13.61  13.60 -0.0%
      Geomean difference                                          -0.2%
      
      Code size:
      Program                                        base     cse      diff
      test-suite...-typeset/consumer-typeset.test    1315632  1266480 -3.7%
      test-suite...:: CTMark/ClamAV/clamscan.test    1313892  1297508 -1.2%
      test-suite :: CTMark/lencod/lencod.test        1439504  1423112 -1.1%
      test-suite...TMark/7zip/7zip-benchmark.test    2936980  2904172 -1.1%
      test-suite :: CTMark/Bullet/bullet.test        3478276  3445460 -0.9%
      test-suite...ark/tramp3d-v4/tramp3d-v4.test    8082868  8033492 -0.6%
      test-suite :: CTMark/kimwitu++/kc.test         3870380  3853972 -0.4%
      test-suite :: CTMark/SPASS/SPASS.test          1434904  1434896 -0.0%
      test-suite...Mark/mafft/pairlocalalign.test    764528   764528   0.0%
      test-suite...:: CTMark/sqlite3/sqlite3.test    782092   782092   0.0%
      Geomean difference                                              -0.9%
      
      Differential Revision: https://reviews.llvm.org/D60580
      
      llvm-svn: 358369
      946b1246
    • Amara Emerson's avatar
      [GlobalISel] Introduce a CSEConfigBase class to allow targets to define their own CSE configs. · d189680b
      Amara Emerson authored
      Because CodeGen can't depend on GlobalISel, we need a way to encapsulate the CSE
      configs that can be passed between TargetPassConfig and the targets' custom
      pass configs. This CSEConfigBase allows targets to create custom CSE configs
      which is then used by the GISel passes for the CSEMIRBuilder.
      
      This support will be used in a follow up commit to allow constant-only CSE for
      -O0 compiles in D60580.
      
      llvm-svn: 358368
      d189680b
    • Nico Weber's avatar
    • Nico Weber's avatar
      gn build: Merge r358297 · 274f305a
      Nico Weber authored
      llvm-svn: 358366
      274f305a
    • Nico Weber's avatar
      gn build: Merge r358243 · 6de31be6
      Nico Weber authored
      llvm-svn: 358365
      6de31be6
    • Nico Weber's avatar
      gn build: Merge r358272 · ce1452ad
      Nico Weber authored
      llvm-svn: 358364
      ce1452ad
    • Nico Weber's avatar
      llvm-undname: Fix another crash-on-invalid found by oss-fuzz · 63fe2593
      Nico Weber authored
      llvm-svn: 358363
      63fe2593
    • Craig Topper's avatar
      [X86] Redefine KUNPCK instructions to take a narrower source register class... · 5b92eb00
      Craig Topper authored
      [X86] Redefine KUNPCK instructions to take a narrower source register class than destination register class. Remove copies from the isel output pattern.
      
      There's no reason for the inputs to be the destination register class. This just
      forces an unnecessary copy in the output patterns.
      
      llvm-svn: 358362
      5b92eb00
    • Craig Topper's avatar
      [X86] Put the locked mi8 instrutions above the locked mi/mi32 so they will be prefered. · 96950f1f
      Craig Topper authored
      We want 64mi8 to be prefered over 64mi32. The order for 16mi/32mi doesn't
      really matter.
      
      llvm-svn: 358361
      96950f1f
    • Craig Topper's avatar
      [X86] Change IMUL with immediate instruction order to ri8 instructions come... · 72b976e5
      Craig Topper authored
      [X86] Change IMUL with immediate instruction order to ri8 instructions come before ri/ri32 instructions.
      
      This will ensure IMUL64ri8 is tried before IMUL64ri32. For IMUL32 and IMUL16 the
      order doesn't really matter because only the ri8 versions use a predicate. That
      automatically gives them priority.
      
      llvm-svn: 358360
      72b976e5
    • Craig Topper's avatar
      [X86] Move VPTESTM matching from the isel table to custom code in X86ISelDAGToDAG. · 3c579764
      Craig Topper authored
      We had many tablegen patterns for these instructions. And due to the
      commutability of the patterns, tablegen expands them to even more patterns. All
      together VPTESTMD patterns accounted for more the 50K of the 610K isel table.
      This had gotten bad when we stopped canonicalizing AND to vXi64. This required
      a pattern for every combination of bitcast input type.
      
      This change moves the matching to custom code where it is easier to look through
      the bitcasts without being concerned with the specific types.
      
      The test changes are because we are now stricter with one use checks as its
      required to make load folding legal. We now require the AND and any BITCAST to
      only have a single use. This prevents forming VPTESTM and a VPAND with the same
      inputs.
      
      We now support broadcast loads for 128/256 patterns without VLX. We'll widen to
      512-bit like and still fold the broadcast since the amount of memory read
      doesn't change.
      
      There are a few tests that got slightly longer because are now prefering
      load + VPTESTM over XOR+VPCMPEQ for (seteq (load), allzeros). Previously we were
      able to share the XOR with multiple VPTESTM instructions.
      
      llvm-svn: 358359
      3c579764
    • Craig Topper's avatar
      [X86] Don't form masked vpcmp/vcmp/vptestm operations if the setcc node has more than one use. · b17e5ec6
      Craig Topper authored
      We're better of emitting a single compare + kand rather than a compare for the
      other use and a masked compare.
      
      I'm looking into using custom instruction selection for VPTESTM to reduce the
      ridiculous number of permutations of patterns in the isel table. Putting a one
      use check on all masked compare folding makes load fold matching in the custom
      code easier.
      
      llvm-svn: 358358
      b17e5ec6
  2. Apr 14, 2019