1. Oct 21, 2020
  2. Oct 20, 2020
    • Florian Hahn's avatar
      [DSE] Do not scan users of memory terminators for further reads. · 2e580102
      Florian Hahn authored
      isMemTerminator checks if the current def is a memory terminator that
      terminates the memory pointed to by DefLoc. We do not have to add any of
      their users to the worklist, because the follow-on users cannot read the
      memory in question.
      
      This leads to more stores eliminated in the presence of lifetime calls.
      Previously we added the users of those intrinsics to the worklist,
      limiting elimination.
      
      In terms of removed stores, this gives a nice boost on some benchmarks
      (MultiSource/SPEC2000/SPEC2006 on X86 with -flto -O3):
      
      Same hash: 205 (filtered out)
      Remaining: 32
      Metric: dse.NumFastStores
      
      Program                                          base   patch   diff
       test-suite...000/197.parser/197.parser.test     4.00    8.00  100.0%
       test-suite...rolangs-C++/family/family.test     4.00    7.00  75.0%
       test-suite...marks/7zip/7zip-benchmark.test   1722.00 2189.00 27.1%
       test-suite...CFP2000/177.mesa/177.mesa.test    30.00   38.00  26.7%
       test-suite :: External/Nurbs/nurbs.test        44.00   49.00  11.4%
       test-suite...lications/sqlite3/sqlite3.test   115.00  128.00  11.3%
       test-suite...006/447.dealII/447.dealII.test   2715.00 3013.00 11.0%
       test-suite...ProxyApps-C++/CLAMR/CLAMR.test   237.00  261.00  10.1%
       test-suite...tions/lambda-0.1.3/lambda.test    40.00   44.00  10.0%
       test-suite...3.xalancbmk/483.xalancbmk.test   1366.00 1475.00  8.0%
       test-suite...abench/jpeg/jpeg-6a/cjpeg.test    13.00   14.00   7.7%
       test-suite...oxyApps-C++/miniFE/miniFE.test    43.00   46.00   7.0%
       test-suite...lications/ClamAV/clamscan.test   230.00  246.00   7.0%
       test-suite...006/450.soplex/450.soplex.test   284.00  299.00   5.3%
       test-suite...nsumer-jpeg/consumer-jpeg.test    21.00   22.00   4.8%
      2e580102
    • Simon Pilgrim's avatar
    • Jay Foad's avatar
      [AMDGPU] Remove unused declaration. NFC. · 4913e362
      Jay Foad authored
      The implementation of this method was removed in D89706.
      4913e362
    • Simon Pilgrim's avatar
    • Mikhail Maltsev's avatar
      [clang] Use SourceLocation as key in hash maps, NFCI · 78194118
      Mikhail Maltsev authored
      The patch adjusts the existing `llvm::DenseMap<unsigned, T>` and
      `llvm::DenseSet<unsigned>` objects that store source locations, so
      that they use `SourceLocation` directly instead of `unsigned`.
      
      This patch relies on the `DenseMapInfo` trait added in D89719.
      
      It also replaces the construction of `SourceLocation` objects from
      the constants -1 and -2 with calls to the trait's methods `getEmptyKey`
      and `getTombstoneKey` where appropriate.
      
      Reviewed By: dexonsmith
      
      Differential Revision: https://reviews.llvm.org/D69840
      78194118
    • Hans Wennborg's avatar
      Explicitly initialize StreamingDiagnostic in derived class copy ctors · c76cdeac
      Hans Wennborg authored
      To pacify a GCC warning:
      
      [1/1] Building CXX object tools/clang/lib/Analysis/CMakeFiles/obj.clangAnalysis.dir/Dominators.cpp.o
      In file included from /work/llvm.monorepo/clang/include/clang/AST/NestedNameSpecifier.h:18:0,
                       from /work/llvm.monorepo/clang/include/clang/AST/Type.h:21,
                       from /work/llvm.monorepo/clang/include/clang/AST/DeclarationName.h:16,
                       from /work/llvm.monorepo/clang/include/clang/AST/DeclBase.h:18,
                       from /work/llvm.monorepo/clang/include/clang/Analysis/AnalysisDeclContext.h:20,
                       from /work/llvm.monorepo/clang/include/clang/Analysis/Analyses/Dominators.h:16,
                       from /work/llvm.monorepo/clang/lib/Analysis/Dominators.cpp:9:
      /work/llvm.monorepo/clang/include/clang/Basic/Diagnostic.h:
      In copy constructor ‘clang::DiagnosticBuilder::DiagnosticBuilder(const clang::DiagnosticBuilder&)’:
      /work/llvm.monorepo/clang/include/clang/Basic/Diagnostic.h:1287:3:
      warning: base class ‘class clang::StreamingDiagnostic’ should be explicitly initialized in the copy constructor [-Wextra]
         DiagnosticBuilder(const DiagnosticBuilder &D) {
         ^
      In file included from /work/llvm.monorepo/clang/include/clang/AST/Type.h:29:0,
                       from /work/llvm.monorepo/clang/include/clang/AST/DeclarationName.h:16,
                       from /work/llvm.monorepo/clang/include/clang/AST/DeclBase.h:18,
                       from /work/llvm.monorepo/clang/include/clang/Analysis/AnalysisDeclContext.h:20,
                       from /work/llvm.monorepo/clang/include/clang/Analysis/Analyses/Dominators.h:16,
                       from /work/llvm.monorepo/clang/lib/Analysis/Dominators.cpp:9:
      /work/llvm.monorepo/clang/include/clang/Basic/PartialDiagnostic.h:
      In copy constructor ‘clang::PartialDiagnostic::PartialDiagnostic(const clang::PartialDiagnostic&)’:
      /work/llvm.monorepo/clang/include/clang/Basic/PartialDiagnostic.h:52:3:
      warning: base class ‘class clang::StreamingDiagnostic’ should be explicitly initialized in the copy constructor [-Wextra]
         PartialDiagnostic(const PartialDiagnostic &Other) : DiagID(Other.DiagID) {
         ^
      c76cdeac