[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
Wed Sep 25 06:30:40 PDT 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `clang-aarch64-quick` running on `linaro-clang-aarch64-quick` while building `llvm` at step 5 "ninja check 1".

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

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

```
Step 5 (ninja check 1) failure: stage 1 checked (failure)
...
[45/82] Linking CXX executable unittests/MC/MCTests
[46/82] Linking CXX executable unittests/ObjectYAML/ObjectYAMLTests
[47/82] Linking CXX executable tools/clang/unittests/Frontend/FrontendTests
[48/82] Linking CXX executable tools/clang/unittests/Index/IndexTests
[49/82] Linking CXX executable tools/clang/unittests/Serialization/SerializationTests
[50/82] Linking CXX executable unittests/DebugInfo/DWARF/DebugInfoDWARFTests
[51/82] Linking CXX executable unittests/ProfileData/ProfileDataTests
[52/82] Linking CXX executable unittests/CodeGen/GlobalISel/GlobalISelTests
[53/82] Linking CXX executable unittests/CodeGen/CodeGenTests
[54/82] Building CXX object unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o
FAILED: unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o 
/usr/local/bin/c++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/unittests/Analysis -I/home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/llvm/unittests/Analysis -I/home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/include -I/home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/llvm/include -I/home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/third-party/unittest/googletest/include -I/home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/third-party/unittest/googlemock/include -fPIC -fno-semantic-interposition -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 -std=c++17  -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -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 /home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/llvm/unittests/Analysis/SparsePropagation.cpp
../llvm/llvm/unittests/Analysis/SparsePropagation.cpp:143:57: error: non-virtual member function marked 'override' hides virtual member function
  143 |       SparseSolver<TestLatticeKey, TestLatticeVal> &SS) override {
      |                                                         ^
../llvm/llvm/include/llvm/Analysis/SparsePropagation.h:90:16: note: hidden overloaded virtual function 'llvm::AbstractLatticeFunction<llvm::PointerIntPair<llvm::Value *, 2, (anonymous namespace)::IPOGrouping>, (anonymous namespace)::TestLatticeVal>::ComputeInstructionState' declared here: type mismatch at 2nd parameter ('SmallDenseMap<PointerIntPair<Value *, 2, IPOGrouping, PointerLikeTypeTraits<Value *>, PointerIntPairInfo<Value *, 2, PointerLikeTypeTraits<Value *>>>, TestLatticeVal, 16> &' vs 'DenseMap<TestLatticeKey, TestLatticeVal> &' (aka 'DenseMap<PointerIntPair<Value *, 2, IPOGrouping>, (anonymous namespace)::TestLatticeVal> &'))
   90 |   virtual void ComputeInstructionState(
      |                ^
../llvm/llvm/unittests/Analysis/SparsePropagation.cpp:230:19: error: field type 'TestLatticeFunc' is an abstract class
  230 |   TestLatticeFunc Lattice;
      |                   ^
../llvm/llvm/include/llvm/Analysis/SparsePropagation.h:90:16: note: unimplemented pure virtual method 'ComputeInstructionState' in 'TestLatticeFunc'
   90 |   virtual void ComputeInstructionState(
      |                ^
In file included from ../llvm/llvm/unittests/Analysis/SparsePropagation.cpp:13:
In file included from ../llvm/third-party/unittest/googletest/include/gtest/gtest.h:65:
In file included from ../llvm/third-party/unittest/googletest/include/gtest/gtest-death-test.h:43:
In file included from ../llvm/third-party/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h:47:
In file included from ../llvm/third-party/unittest/googletest/include/gtest/gtest-matchers.h:49:
In file included from ../llvm/third-party/unittest/googletest/include/gtest/gtest-printers.h:122:
../llvm/third-party/unittest/googletest/include/gtest/internal/gtest-internal.h:457:40: error: cannot initialize return object of type 'Test *' with an rvalue of type 'SparsePropagationTest_MarkBlockExecutable_Test *'
  457 |   Test* CreateTest() override { return new TestClass; }
      |                                        ^~~
../llvm/llvm/unittests/Analysis/SparsePropagation.cpp:255:1: note: in instantiation of member function 'testing::internal::TestFactoryImpl<SparsePropagationTest_MarkBlockExecutable_Test>::CreateTest' requested here
  255 | TEST_F(SparsePropagationTest, MarkBlockExecutable) {
      | ^
../llvm/third-party/unittest/googletest/include/gtest/gtest.h:2208:41: note: expanded from macro 'TEST_F'
 2208 | #define TEST_F(test_fixture, test_name) GTEST_TEST_F(test_fixture, test_name)
      |                                         ^
../llvm/third-party/unittest/googletest/include/gtest/gtest.h:2205:3: note: expanded from macro 'GTEST_TEST_F'
 2205 |   GTEST_TEST_(test_fixture, test_name, test_fixture, \
      |   ^
../llvm/third-party/unittest/googletest/include/gtest/internal/gtest-internal.h:1556:15: note: expanded from macro 'GTEST_TEST_'
 1556 |           new ::testing::internal::TestFactoryImpl<GTEST_TEST_CLASS_NAME_(     \
      |               ^
../llvm/third-party/unittest/googletest/include/gtest/internal/gtest-internal.h:457:40: error: cannot initialize return object of type 'Test *' with an rvalue of type 'SparsePropagationTest_GlobalVariableConstant_Test *'
  457 |   Test* CreateTest() override { return new TestClass; }
      |                                        ^~~
../llvm/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