[llvm] Add a pass to collect dropped var stats for MIR. (PR #115566)

LLVM Continuous Integration via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 18 16:12:51 PST 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `ml-opt-dev-x86-64` running on `ml-opt-dev-x86-64-b1` while building `llvm` at step 6 "test-build-unified-tree-check-all".

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

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

```
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
...
31.107 [136/26/567] Linking CXX executable unittests/Target/TargetMachineCTests
31.164 [135/26/568] Building CXX object unittests/Target/PowerPC/CMakeFiles/PowerPCTests.dir/AIXRelocModelTest.cpp.o
31.426 [134/26/569] Building CXX object unittests/CodeGen/GlobalISel/CMakeFiles/GlobalISelTests.dir/LegalizerHelperTest.cpp.o
31.508 [133/26/570] Building CXX object unittests/Target/RISCV/CMakeFiles/RISCVTests.dir/MCInstrAnalysisTest.cpp.o
32.730 [132/26/571] Building CXX object unittests/DebugInfo/DWARF/CMakeFiles/DebugInfoDWARFTests.dir/DwarfGenerator.cpp.o
33.528 [131/26/572] Building CXX object unittests/CodeGen/GlobalISel/CMakeFiles/GlobalISelTests.dir/InstructionSelectTest.cpp.o
34.015 [130/26/573] Building CXX object unittests/IR/CMakeFiles/IRTests.dir/DroppedVariableStatsIRTest.cpp.o
34.219 [129/26/574] Linking CXX executable unittests/Target/PowerPC/PowerPCTests
34.276 [128/26/575] Building CXX object unittests/TargetParser/CMakeFiles/TargetParserTests.dir/RISCVISAInfoTest.cpp.o
35.094 [127/26/576] Building CXX object unittests/MIR/CMakeFiles/MIRTests.dir/DroppedVariableStatsMIRTest.cpp.o
FAILED: unittests/MIR/CMakeFiles/MIRTests.dir/DroppedVariableStatsMIRTest.cpp.o 
ccache /usr/bin/c++ -DCPUINFO_SUPPORTED_PLATFORM=1 -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/b/ml-opt-dev-x86-64-b1/build/unittests/MIR -I/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/unittests/MIR -I/b/ml-opt-dev-x86-64-b1/build/include -I/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/include -I/b/ml-opt-dev-x86-64-b1/llvm-project/third-party/unittest/googletest/include -I/b/ml-opt-dev-x86-64-b1/llvm-project/third-party/unittest/googlemock/include -isystem /tmp/tflitebuild/tensorflow/include -isystem /tmp/tflitebuild/eigen/include/eigen3 -isystem /tmp/tflitebuild/abseil-cpp/include -isystem /tmp/tflitebuild/flatbuffers/include -isystem /tmp/tflitebuild/gemmlowp/include/gemmlowp -isystem /tmp/tflitebuild/ml_dtypes/src/ml_dtypes -isystem /tmp/tflitebuild/ml_dtypes/src/ml_dtypes/ml_dtypes -isystem /tmp/tflitebuild/ruy/include -isystem /tmp/tflitebuild/cpuinfo/include -isystem /tmp/tflitebuild/ARM_NEON_2_x86_SSE/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wno-dangling-else -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -DEIGEN_NEON_GEBP_NR=4 -DTFL_STATIC_LIBRARY_BUILD -Wno-suggest-override -std=c++17 -MD -MT unittests/MIR/CMakeFiles/MIRTests.dir/DroppedVariableStatsMIRTest.cpp.o -MF unittests/MIR/CMakeFiles/MIRTests.dir/DroppedVariableStatsMIRTest.cpp.o.d -o unittests/MIR/CMakeFiles/MIRTests.dir/DroppedVariableStatsMIRTest.cpp.o -c /b/ml-opt-dev-x86-64-b1/llvm-project/llvm/unittests/MIR/DroppedVariableStatsMIRTest.cpp
/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/unittests/MIR/DroppedVariableStatsMIRTest.cpp:35:17: error: ‘LLVMTargetMachine’ was not declared in this scope
   35 | std::unique_ptr<LLVMTargetMachine>
      |                 ^~~~~~~~~~~~~~~~~
/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/unittests/MIR/DroppedVariableStatsMIRTest.cpp:35:34: error: template argument 1 is invalid
   35 | std::unique_ptr<LLVMTargetMachine>
      |                                  ^
/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/unittests/MIR/DroppedVariableStatsMIRTest.cpp:35:34: error: template argument 2 is invalid
/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/unittests/MIR/DroppedVariableStatsMIRTest.cpp: In function ‘int {anonymous}::createTargetMachine(std::string, llvm::StringRef, llvm::StringRef)’:
/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/unittests/MIR/DroppedVariableStatsMIRTest.cpp:40:12: error: cannot convert ‘std::nullptr_t’ to ‘int’ in return
   40 |     return nullptr;
      |            ^~~~~~~
/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/unittests/MIR/DroppedVariableStatsMIRTest.cpp:42:26: error: ‘LLVMTargetMachine’ was not declared in this scope; did you mean ‘createTargetMachine’?
   42 |   return std::unique_ptr<LLVMTargetMachine>(
      |                          ^~~~~~~~~~~~~~~~~
      |                          createTargetMachine
/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/unittests/MIR/DroppedVariableStatsMIRTest.cpp:42:43: error: template argument 1 is invalid
   42 |   return std::unique_ptr<LLVMTargetMachine>(
      |                                           ^
/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/unittests/MIR/DroppedVariableStatsMIRTest.cpp:42:43: error: template argument 2 is invalid
/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/unittests/MIR/DroppedVariableStatsMIRTest.cpp:43:19: error: ‘LLVMTargetMachine’ does not name a type; did you mean ‘createTargetMachine’?
   43 |       static_cast<LLVMTargetMachine *>(T->createTargetMachine(
      |                   ^~~~~~~~~~~~~~~~~
      |                   createTargetMachine
/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/unittests/MIR/DroppedVariableStatsMIRTest.cpp:43:37: error: expected ‘>’ before ‘*’ token
   43 |       static_cast<LLVMTargetMachine *>(T->createTargetMachine(
      |                                     ^
/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/unittests/MIR/DroppedVariableStatsMIRTest.cpp:43:37: error: expected ‘(’ before ‘*’ token
   43 |       static_cast<LLVMTargetMachine *>(T->createTargetMachine(
      |                                     ^
      |                                     (
/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/unittests/MIR/DroppedVariableStatsMIRTest.cpp:43:38: error: expected primary-expression before ‘>’ token
   43 |       static_cast<LLVMTargetMachine *>(T->createTargetMachine(
      |                                      ^
/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/unittests/MIR/DroppedVariableStatsMIRTest.cpp: In member function ‘virtual void {anonymous}::DroppedVariableStatsMIR_BothDeleted_Test::TestBody()’:
/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/unittests/MIR/DroppedVariableStatsMIRTest.cpp:185:28: error: request for member ‘get’ in ‘TM’, which is of non-class type ‘int’
  185 |   MachineModuleInfo MMI(TM.get());
      |                            ^~~

```

</details>

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


More information about the llvm-commits mailing list