[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 11:50:16 PDT 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `premerge-monolithic-linux` running on `premerge-linux-1` while building `llvm` at step 7 "test-build-unified-tree-check-all".

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

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

```
Step 7 (test-build-unified-tree-check-all) failure: test (failure)
...
-- Configuring done
-- Generating done
-- Build files have been written to: /build/buildbot/premerge-monolithic-linux/build/runtimes/runtimes-bins
3.574 [6/57/85] cd /build/buildbot/premerge-monolithic-linux/llvm-project/clang/bindings/python && /etc/cmake/bin/cmake -E env CLANG_NO_DEFAULT_CONFIG=1 CLANG_LIBRARY_PATH=/build/buildbot/premerge-monolithic-linux/build/lib /usr/bin/python3.10 -m unittest discover
........................................................................................................................................
----------------------------------------------------------------------
Ran 136 tests in 2.708s

OK
6.416 [6/7/135] 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 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/build/buildbot/premerge-monolithic-linux/build/unittests/Analysis -I/build/buildbot/premerge-monolithic-linux/llvm-project/llvm/unittests/Analysis -I/build/buildbot/premerge-monolithic-linux/build/include -I/build/buildbot/premerge-monolithic-linux/llvm-project/llvm/include -I/build/buildbot/premerge-monolithic-linux/llvm-project/third-party/unittest/googletest/include -I/build/buildbot/premerge-monolithic-linux/llvm-project/third-party/unittest/googlemock/include -gmlt -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  -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 /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp
/build/buildbot/premerge-monolithic-linux/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 {
                                                        ^
/build/buildbot/premerge-monolithic-linux/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>, (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> &'))
  virtual void ComputeInstructionState(
               ^
/build/buildbot/premerge-monolithic-linux/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:230:19: error: field type 'TestLatticeFunc' is an abstract class
  TestLatticeFunc Lattice;
                  ^
/build/buildbot/premerge-monolithic-linux/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 /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:13:
In file included from /build/buildbot/premerge-monolithic-linux/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:65:
In file included from /build/buildbot/premerge-monolithic-linux/llvm-project/third-party/unittest/googletest/include/gtest/gtest-death-test.h:43:
In file included from /build/buildbot/premerge-monolithic-linux/llvm-project/third-party/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h:47:
In file included from /build/buildbot/premerge-monolithic-linux/llvm-project/third-party/unittest/googletest/include/gtest/gtest-matchers.h:49:
In file included from /build/buildbot/premerge-monolithic-linux/llvm-project/third-party/unittest/googletest/include/gtest/gtest-printers.h:122:
/build/buildbot/premerge-monolithic-linux/llvm-project/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 *'
  Test* CreateTest() override { return new TestClass; }
                                       ^~~
/build/buildbot/premerge-monolithic-linux/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) {
^
/build/buildbot/premerge-monolithic-linux/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)
                                        ^
/build/buildbot/premerge-monolithic-linux/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, \
  ^
/build/buildbot/premerge-monolithic-linux/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_(     \
              ^
/build/buildbot/premerge-monolithic-linux/llvm-project/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 *'
  Test* CreateTest() override { return new TestClass; }
                                       ^~~
/build/buildbot/premerge-monolithic-linux/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