[llvm] Add unit tests for size returning new funcs in the MemProf use pass. (PR #105473)

LLVM Continuous Integration via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 26 10:00:35 PDT 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `openmp-offload-sles-build-only` running on `rocm-worker-hw-04-sles` while building `llvm` at step 8 "Add check check-llvm".

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

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

```
Step 8 (Add check check-llvm) failure: test (failure)
...
            ~~~~~~~~~~~^~~~
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include/llvm/ProfileData/InstrProf.h: In member function ‘std::vector<llvm::InstrProfValueSiteRecord>& llvm::InstrProfRecord::getOrCreateValueSitesForKind(uint32_t)’:
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include/llvm/ProfileData/InstrProf.h:972:23: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
     assert(IPVK_First <= ValueKind && ValueKind <= IPVK_Last &&
            ~~~~~~~~~~~^~~~
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/unittests/ProfileData/CoverageMappingTest.cpp: In member function ‘virtual void {anonymous}::CoverageMappingTest_TVIdxBuilder_Test::TestBody()’:
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/unittests/ProfileData/CoverageMappingTest.cpp:1116:10: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wdangling-else]
       if (Node.NextIDs[C] < 0)
          ^
[649/654] Building CXX object unittests/Transforms/Instrumentation/CMakeFiles/InstrumentationTests.dir/MemProfilerTest.cpp.o
FAILED: unittests/Transforms/Instrumentation/CMakeFiles/InstrumentationTests.dir/MemProfilerTest.cpp.o 
ccache /usr/bin/c++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iunittests/Transforms/Instrumentation -I/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/unittests/Transforms/Instrumentation -Iinclude -I/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include -I/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/third-party/unittest/googletest/include -I/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/third-party/unittest/googlemock/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-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -std=c++1z -MD -MT unittests/Transforms/Instrumentation/CMakeFiles/InstrumentationTests.dir/MemProfilerTest.cpp.o -MF unittests/Transforms/Instrumentation/CMakeFiles/InstrumentationTests.dir/MemProfilerTest.cpp.o.d -o unittests/Transforms/Instrumentation/CMakeFiles/InstrumentationTests.dir/MemProfilerTest.cpp.o -c /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/unittests/Transforms/Instrumentation/MemProfilerTest.cpp
In file included from /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include/llvm/Transforms/Instrumentation/MemProfiler.h:16:0,
                 from /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/unittests/Transforms/Instrumentation/MemProfilerTest.cpp:9:
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include/llvm/IR/ModuleSummaryIndex.h: In member function ‘llvm::TypeIdSummary& llvm::ModuleSummaryIndex::getOrInsertTypeIdSummary(llvm::StringRef)’:
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include/llvm/IR/ModuleSummaryIndex.h:1815:33: warning: unused variable ‘GUID’ [-Wunused-variable]
     for (auto &[GUID, TypeIdPair] : make_range(TidIter))
                                 ^
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include/llvm/IR/ModuleSummaryIndex.h: In member function ‘const llvm::TypeIdSummary* llvm::ModuleSummaryIndex::getTypeIdSummary(llvm::StringRef) const’:
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include/llvm/IR/ModuleSummaryIndex.h:1827:39: warning: unused variable ‘GUID’ [-Wunused-variable]
     for (const auto &[GUID, TypeIdPair] : make_range(TidIter))
                                       ^
In file included from /usr/include/c++/7/cassert:44:0,
                 from /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include/llvm/ProfileData/InstrProf.h:39,
                 from /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include/llvm/ProfileData/InstrProfReader.h:21,
                 from /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include/llvm/Transforms/Instrumentation/MemProfiler.h:18,
                 from /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/unittests/Transforms/Instrumentation/MemProfilerTest.cpp:9:
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include/llvm/ProfileData/InstrProf.h: In member function ‘llvm::ArrayRef<llvm::InstrProfValueSiteRecord> llvm::InstrProfRecord::getValueSitesForKind(uint32_t) const’:
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include/llvm/ProfileData/InstrProf.h:963:23: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
     assert(IPVK_First <= ValueKind && ValueKind <= IPVK_Last &&
            ~~~~~~~~~~~^~~~
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include/llvm/ProfileData/InstrProf.h: In member function ‘std::vector<llvm::InstrProfValueSiteRecord>& llvm::InstrProfRecord::getOrCreateValueSitesForKind(uint32_t)’:
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include/llvm/ProfileData/InstrProf.h:972:23: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
     assert(IPVK_First <= ValueKind && ValueKind <= IPVK_Last &&
            ~~~~~~~~~~~^~~~
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/unittests/Transforms/Instrumentation/MemProfilerTest.cpp: In static member function ‘static llvm::memprof::MemProfRecord llvm::memprof::{anonymous}::MockMemProfReader::makeRecord(llvm::ArrayRef<llvm::ArrayRef<llvm::memprof::Frame> >)’:
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/unittests/Transforms/Instrumentation/MemProfilerTest.cpp:71:68: error: class template argument deduction failed:
       AI.CallStack = std::vector(Callstack.begin(), Callstack.end());
                                                                    ^
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/unittests/Transforms/Instrumentation/MemProfilerTest.cpp:71:68: error: no matching function for call to ‘vector(llvm::ArrayRef<llvm::memprof::Frame>::iterator, llvm::ArrayRef<llvm::memprof::Frame>::iterator)’
In file included from /usr/include/c++/7/vector:64:0,
                 from /usr/include/c++/7/functional:61,
                 from /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include/llvm/ADT/SmallVector.h:24,
                 from /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include/llvm/ADT/ArrayRef.h:13,
                 from /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include/llvm/IR/ModuleSummaryIndex.h:18,
                 from /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include/llvm/Transforms/Instrumentation/MemProfiler.h:16,
                 from /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/unittests/Transforms/Instrumentation/MemProfilerTest.cpp:9:
/usr/include/c++/7/bits/stl_vector.h:411:2: note: candidate: template<class _Tp, class _Alloc, class _InputIterator, class> vector(_InputIterator, _InputIterator, const _Alloc&)-> std::vector<_Tp, _Alloc>
  vector(_InputIterator __first, _InputIterator __last,

```

</details>

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


More information about the llvm-commits mailing list