[llvm] [NFC] Switch a number of DenseMaps to SmallDenseMaps for speedup (PR #109417)

LLVM Continuous Integration via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 26 05:45:35 PDT 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `llvm-x86_64-debian-dylib` running on `gribozavr4` while building `llvm` at step 7 "test-build-unified-tree-check-llvm".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/60/builds/8618

<details>
<summary>Here is the relevant piece of the build log for the reference</summary>

```
Step 7 (test-build-unified-tree-check-llvm) failure: test (failure)
...
1.185 [2/10/687] Linking CXX executable unittests/Target/LoongArch/LoongArchTests
1.216 [2/9/688] Linking CXX executable unittests/Target/WebAssembly/WebAssemblyTests
1.221 [2/8/689] Linking CXX executable unittests/Target/VE/VETests
1.323 [2/7/690] Linking CXX executable unittests/Target/ARM/ARMTests
1.344 [2/6/691] Linking CXX executable unittests/Target/RISCV/RISCVTests
1.363 [2/5/692] Linking CXX executable unittests/Target/AArch64/AArch64Tests
1.457 [2/4/693] Linking CXX executable unittests/tools/llvm-mca/LLVMMCATests
1.871 [2/3/694] Linking CXX executable unittests/tools/llvm-exegesis/LLVMExegesisTests
1.968 [2/2/695] Linking CXX executable unittests/Target/AMDGPU/AMDGPUTests
2.814 [2/1/696] Building CXX object unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o
FAILED: unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/b/1/llvm-x86_64-debian-dylib/build/unittests/Analysis -I/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/unittests/Analysis -I/b/1/llvm-x86_64-debian-dylib/build/include -I/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/include -I/b/1/llvm-x86_64-debian-dylib/llvm-project/third-party/unittest/googletest/include -I/b/1/llvm-x86_64-debian-dylib/llvm-project/third-party/unittest/googlemock/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -std=c++17 -MD -MT unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o -MF unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o.d -o unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o -c /b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:143:57: error: non-virtual member function marked 'override' hides virtual member function
      SparseSolver<TestLatticeKey, TestLatticeVal> &SS) override {
                                                        ^
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/include/llvm/Analysis/SparsePropagation.h:90:16: note: hidden overloaded virtual function 'llvm::AbstractLatticeFunction<llvm::PointerIntPair<llvm::Value *, 2, (anonymous namespace)::IPOGrouping, llvm::PointerLikeTypeTraits<llvm::Value *>, llvm::PointerIntPairInfo<llvm::Value *, 2, llvm::PointerLikeTypeTraits<llvm::Value *>>>, (anonymous namespace)::TestLatticeVal>::ComputeInstructionState' declared here: type mismatch at 2nd parameter ('SmallDenseMap<llvm::PointerIntPair<llvm::Value *, 2, (anonymous namespace)::IPOGrouping, llvm::PointerLikeTypeTraits<llvm::Value *>, llvm::PointerIntPairInfo<llvm::Value *, 2, llvm::PointerLikeTypeTraits<llvm::Value *>>>, (anonymous namespace)::TestLatticeVal, 16> &' vs 'DenseMap<(anonymous namespace)::TestLatticeKey, (anonymous namespace)::TestLatticeVal> &' (aka 'DenseMap<PointerIntPair<llvm::Value *, 2, (anonymous namespace)::IPOGrouping>, (anonymous namespace)::TestLatticeVal> &'))
  virtual void ComputeInstructionState(
               ^
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:230:19: error: field type '(anonymous namespace)::TestLatticeFunc' is an abstract class
  TestLatticeFunc Lattice;
                  ^
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/include/llvm/Analysis/SparsePropagation.h:90:16: note: unimplemented pure virtual method 'ComputeInstructionState' in 'TestLatticeFunc'
  virtual void ComputeInstructionState(
               ^
In file included from /b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:13:
In file included from /b/1/llvm-x86_64-debian-dylib/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:65:
In file included from /b/1/llvm-x86_64-debian-dylib/llvm-project/third-party/unittest/googletest/include/gtest/gtest-death-test.h:43:
In file included from /b/1/llvm-x86_64-debian-dylib/llvm-project/third-party/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h:47:
In file included from /b/1/llvm-x86_64-debian-dylib/llvm-project/third-party/unittest/googletest/include/gtest/gtest-matchers.h:49:
In file included from /b/1/llvm-x86_64-debian-dylib/llvm-project/third-party/unittest/googletest/include/gtest/gtest-printers.h:122:
/b/1/llvm-x86_64-debian-dylib/llvm-project/third-party/unittest/googletest/include/gtest/internal/gtest-internal.h:457:40: error: cannot initialize return object of type 'testing::Test *' with an rvalue of type 'SparsePropagationTest_MarkBlockExecutable_Test *'
  Test* CreateTest() override { return new TestClass; }
                                       ^~~
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:255:1: note: in instantiation of member function 'testing::internal::TestFactoryImpl<SparsePropagationTest_MarkBlockExecutable_Test>::CreateTest' requested here
TEST_F(SparsePropagationTest, MarkBlockExecutable) {
^
/b/1/llvm-x86_64-debian-dylib/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:2208:41: note: expanded from macro 'TEST_F'
#define TEST_F(test_fixture, test_name) GTEST_TEST_F(test_fixture, test_name)
                                        ^
/b/1/llvm-x86_64-debian-dylib/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:2205:3: note: expanded from macro 'GTEST_TEST_F'
  GTEST_TEST_(test_fixture, test_name, test_fixture, \
  ^
/b/1/llvm-x86_64-debian-dylib/llvm-project/third-party/unittest/googletest/include/gtest/internal/gtest-internal.h:1556:15: note: expanded from macro 'GTEST_TEST_'
          new ::testing::internal::TestFactoryImpl<GTEST_TEST_CLASS_NAME_(     \
              ^
/b/1/llvm-x86_64-debian-dylib/llvm-project/third-party/unittest/googletest/include/gtest/internal/gtest-internal.h:457:40: error: cannot initialize return object of type 'testing::Test *' with an rvalue of type 'SparsePropagationTest_GlobalVariableConstant_Test *'
  Test* CreateTest() override { return new TestClass; }
                                       ^~~
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:291:1: note: in instantiation of member function 'testing::internal::TestFactoryImpl<SparsePropagationTest_GlobalVariableConstant_Test>::CreateTest' requested here

```

</details>

https://github.com/llvm/llvm-project/pull/109417


More information about the llvm-commits mailing list