Skip to content

[ADT] Make set_subtract more efficient when subtrahend is larger (NFC) #98702

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 17, 2024

Conversation

teresajohnson
Copy link
Contributor

If the subtrahend is larger, iterate the minuend set instead.

Noticed when subtracting a large set from a number of other smaller
sets for an upcoming MemProf change, this change makes that much faster.

I subsequently found a couple of callsites in one file that were calling
set_subtract with a vector subtrahend, which doesn't have the "count()"
interface. Add a separate helper for subtracting a vector.

If the subtrahend is larger, iterate the minuend set instead.

Noticed when subtracting a large set from a number of other smaller
sets for an upcoming MemProf change, this change makes that much faster.

I subsequently found a couple of callsites in one file that were calling
set_subtract with a vector subtrahend, which doesn't have the "count()"
interface. Add a separate helper for subtracting a vector.
@llvmbot
Copy link
Member

llvmbot commented Jul 12, 2024

@llvm/pr-subscribers-llvm-adt

Author: Teresa Johnson (teresajohnson)

Changes

If the subtrahend is larger, iterate the minuend set instead.

Noticed when subtracting a large set from a number of other smaller
sets for an upcoming MemProf change, this change makes that much faster.

I subsequently found a couple of callsites in one file that were calling
set_subtract with a vector subtrahend, which doesn't have the "count()"
interface. Add a separate helper for subtracting a vector.


Full diff: https://github.com/llvm/llvm-project/pull/98702.diff

2 Files Affected:

  • (modified) llvm/include/llvm/ADT/SetOperations.h (+18)
  • (modified) llvm/lib/CodeGen/MachineVerifier.cpp (+4-2)
diff --git a/llvm/include/llvm/ADT/SetOperations.h b/llvm/include/llvm/ADT/SetOperations.h
index 1a911b239f4c..7be7a55ae13c 100644
--- a/llvm/include/llvm/ADT/SetOperations.h
+++ b/llvm/include/llvm/ADT/SetOperations.h
@@ -92,9 +92,27 @@ S1Ty set_difference(const S1Ty &S1, const S2Ty &S2) {
   return Result;
 }
 
+/// set_subtract_vec(A, B) - Compute A := A - B, where B can be a vector.
+///
+template <class S1Ty, class S2Ty>
+void set_subtract_vec(S1Ty &S1, const S2Ty &S2) {
+  for (typename S2Ty::const_iterator SI = S2.begin(), SE = S2.end(); SI != SE;
+       ++SI)
+    S1.erase(*SI);
+}
+
 /// set_subtract(A, B) - Compute A := A - B
 ///
+/// Selects the set to iterate based on the relative sizes of A and B for better
+/// efficiency.
+///
 template <class S1Ty, class S2Ty> void set_subtract(S1Ty &S1, const S2Ty &S2) {
+  if (S1.size() < S2.size()) {
+    for (typename S1Ty::iterator SI = S1.begin(), SE = S1.end(); SI != SE; ++SI)
+      if (S2.count(*SI))
+        S1.erase(SI);
+    return;
+  }
   for (typename S2Ty::const_iterator SI = S2.begin(), SE = S2.end(); SI != SE;
        ++SI)
     S1.erase(*SI);
diff --git a/llvm/lib/CodeGen/MachineVerifier.cpp b/llvm/lib/CodeGen/MachineVerifier.cpp
index d0d3af0e5e4f..c80edf974a67 100644
--- a/llvm/lib/CodeGen/MachineVerifier.cpp
+++ b/llvm/lib/CodeGen/MachineVerifier.cpp
@@ -2909,7 +2909,8 @@ void MachineVerifier::checkLiveness(const MachineOperand *MO, unsigned MONum) {
 void MachineVerifier::visitMachineBundleAfter(const MachineInstr *MI) {
   BBInfo &MInfo = MBBInfoMap[MI->getParent()];
   set_union(MInfo.regsKilled, regsKilled);
-  set_subtract(regsLive, regsKilled); regsKilled.clear();
+  set_subtract_vec(regsLive, regsKilled);
+  regsKilled.clear();
   // Kill any masked registers.
   while (!regMasks.empty()) {
     const uint32_t *Mask = regMasks.pop_back_val();
@@ -2918,7 +2919,8 @@ void MachineVerifier::visitMachineBundleAfter(const MachineInstr *MI) {
           MachineOperand::clobbersPhysReg(Mask, Reg.asMCReg()))
         regsDead.push_back(Reg);
   }
-  set_subtract(regsLive, regsDead);   regsDead.clear();
+  set_subtract_vec(regsLive, regsDead);
+  regsDead.clear();
   set_union(regsLive, regsDefined);   regsDefined.clear();
 }
 

@teresajohnson teresajohnson requested a review from snehasish July 12, 2024 23:56
Comment on lines 110 to 115
if (S1.size() < S2.size()) {
for (typename S1Ty::iterator SI = S1.begin(), SE = S1.end(); SI != SE; ++SI)
if (S2.count(*SI))
S1.erase(SI);
return;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we could teach set_subtract to use the new path S1.size() < S2.size() when either S2Ty::contains or S2Ty::find is available:

Suggested change
if (S1.size() < S2.size()) {
for (typename S1Ty::iterator SI = S1.begin(), SE = S1.end(); SI != SE; ++SI)
if (S2.count(*SI))
S1.erase(SI);
return;
}
using ElemTy = decltype(*S1.begin());
if constexpr (detail::HasMemberContains<S2Ty, ElemTy> ||
detail::HasMemberFind<S2Ty, ElemTy>) {
if (S1.size() < S2.size()) {
for (typename S1Ty::iterator SI = S1.begin(), SE = S1.end(); SI != SE; ++SI)
if (llvm::is_contained(S2, *SI))
S1.erase(SI);
return;
}
}

This way, we don't have to have set_subtract_vec. If S2Ty is a vector, the constexpr if would automatically drop the new path. I'm using detail::HasMemberContains<S2Ty, ElemTy> and detail::HasMemberFind<S2Ty, ElemTy> as a heuristic to see if S2Ty offers a sublinear lookup like O(1) or O(log(n)). Calling is_contained without the constexpr if would be a disaster, invoking a linear look up when S2Ty is a vector.

@kuhar Any thoughts here? I recall you generalized is_contained a while ago at 0eaacc2.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense to me in the absence of more standardized type traits we could use.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great tip! Done.

// wouldn't be efficient if it did. In the absence of a more direct check,
// ensure the type supports the contains or find interfaces.
if constexpr (detail::HasMemberContains<S2Ty, ElemTy> ||
detail::HasMemberFind<S2Ty, ElemTy>) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should only check for contains, and the count call below should be adjusted to use contains instead to match.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the detail::HasMemberContains and detail::HasMemberFind checks should go with is_contained in place of count below. This way, is_contained will pick C.contains(E) or C.find(E) != C.end() for you depending on the availability.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think there is a need to support find() here, especially as the rest of SetOperations.h does not support it either.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went ahead and changed it to just check and use contains

Copy link
Contributor

@kazutakahirata kazutakahirata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@teresajohnson teresajohnson merged commit fffe272 into llvm:main Jul 17, 2024
4 of 7 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 17, 2024

LLVM Buildbot has detected a new failure on builder mlir-rocm-mi200 running on mi200-buildbot while building llvm at step 5 "build-check-mlir-build-only".

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

Here is the relevant piece of the build log for the reference:

Step 5 (build-check-mlir-build-only) failure: build (failure)
...
56.341 [1245/58/3363] Building CXX object tools/mlir/lib/Dialect/Linalg/Transforms/CMakeFiles/obj.MLIRLinalgTransforms.dir/WinogradConv2D.cpp.o
56.346 [1244/58/3364] Building CXX object tools/mlir/lib/Dialect/LLVMIR/CMakeFiles/obj.MLIRLLVMDialect.dir/IR/LLVMAttrs.cpp.o
56.384 [1243/58/3365] Building CXX object tools/mlir/lib/Dialect/LLVMIR/CMakeFiles/obj.MLIRLLVMDialect.dir/IR/LLVMTypes.cpp.o
56.385 [1242/58/3366] Building CXX object tools/mlir/lib/Dialect/LLVMIR/CMakeFiles/obj.MLIRLLVMDialect.dir/IR/LLVMInterfaces.cpp.o
56.388 [1241/58/3367] Building CXX object tools/mlir/lib/Dialect/Linalg/Utils/CMakeFiles/obj.MLIRLinalgUtils.dir/Utils.cpp.o
56.407 [1240/58/3368] Building CXX object tools/mlir/lib/Dialect/LLVMIR/CMakeFiles/obj.MLIRLLVMDialect.dir/IR/LLVMMemorySlot.cpp.o
56.423 [1239/58/3369] Building CXX object tools/mlir/lib/Dialect/LLVMIR/CMakeFiles/obj.MLIRLLVMDialect.dir/IR/FunctionCallUtils.cpp.o
56.432 [1238/58/3370] Building CXX object tools/mlir/lib/Dialect/LLVMIR/CMakeFiles/obj.MLIRLLVMDialect.dir/IR/LLVMTypeSyntax.cpp.o
56.435 [1237/58/3371] Building CXX object tools/mlir/lib/Dialect/LLVMIR/CMakeFiles/obj.MLIRLLVMDialect.dir/IR/LLVMInlining.cpp.o
56.462 [1236/58/3372] Building CXX object tools/mlir/lib/Analysis/CMakeFiles/obj.MLIRAnalysis.dir/Liveness.cpp.o
FAILED: tools/mlir/lib/Analysis/CMakeFiles/obj.MLIRAnalysis.dir/Liveness.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/clang++ -DBUILD_EXAMPLES -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/vol/worker/mi200-buildbot/mlir-rocm-mi200/build/tools/mlir/lib/Analysis -I/vol/worker/mi200-buildbot/mlir-rocm-mi200/llvm-project/mlir/lib/Analysis -I/vol/worker/mi200-buildbot/mlir-rocm-mi200/build/include -I/vol/worker/mi200-buildbot/mlir-rocm-mi200/llvm-project/llvm/include -I/vol/worker/mi200-buildbot/mlir-rocm-mi200/llvm-project/mlir/include -I/vol/worker/mi200-buildbot/mlir-rocm-mi200/build/tools/mlir/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 -Wundef -Werror=mismatched-tags -Werror=global-constructors -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT tools/mlir/lib/Analysis/CMakeFiles/obj.MLIRAnalysis.dir/Liveness.cpp.o -MF tools/mlir/lib/Analysis/CMakeFiles/obj.MLIRAnalysis.dir/Liveness.cpp.o.d -o tools/mlir/lib/Analysis/CMakeFiles/obj.MLIRAnalysis.dir/Liveness.cpp.o -c /vol/worker/mi200-buildbot/mlir-rocm-mi200/llvm-project/mlir/lib/Analysis/Liveness.cpp
In file included from /vol/worker/mi200-buildbot/mlir-rocm-mi200/llvm-project/mlir/lib/Analysis/Liveness.cpp:19:
/vol/worker/mi200-buildbot/mlir-rocm-mi200/llvm-project/llvm/include/llvm/ADT/SetOperations.h:109:20: error: no viable conversion from 'typename SmallPtrSet<Value, 16>::iterator' (aka 'SmallPtrSetIterator<mlir::Value>') to 'mlir::Value'
  109 |           S1.erase(SI);
      |                    ^~
/vol/worker/mi200-buildbot/mlir-rocm-mi200/llvm-project/mlir/lib/Analysis/Liveness.cpp:80:11: note: in instantiation of function template specialization 'llvm::set_subtract<llvm::SmallPtrSet<mlir::Value, 16>, llvm::SmallPtrSet<mlir::Value, 16>>' requested here
   80 |     llvm::set_subtract(useValues, defValues);
      |           ^
/vol/worker/mi200-buildbot/mlir-rocm-mi200/llvm-project/mlir/include/mlir/IR/Value.h:96:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'typename SmallPtrSet<Value, 16>::iterator' (aka 'SmallPtrSetIterator<mlir::Value>') to 'const Value &' for 1st argument
   96 | class Value {
      |       ^~~~~
/vol/worker/mi200-buildbot/mlir-rocm-mi200/llvm-project/mlir/include/mlir/IR/Value.h:96:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'typename SmallPtrSet<Value, 16>::iterator' (aka 'SmallPtrSetIterator<mlir::Value>') to 'Value &&' for 1st argument
   96 | class Value {
      |       ^~~~~
/vol/worker/mi200-buildbot/mlir-rocm-mi200/llvm-project/mlir/include/mlir/IR/Value.h:98:13: note: candidate constructor not viable: no known conversion from 'typename SmallPtrSet<Value, 16>::iterator' (aka 'SmallPtrSetIterator<mlir::Value>') to 'detail::ValueImpl *' for 1st argument
   98 |   constexpr Value(detail::ValueImpl *impl = nullptr) : impl(impl) {}
      |             ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/vol/worker/mi200-buildbot/mlir-rocm-mi200/llvm-project/llvm/include/llvm/ADT/SmallPtrSet.h:361:22: note: passing argument to parameter 'Ptr' here
  361 |   bool erase(PtrType Ptr) {
      |                      ^
1 error generated.
56.467 [1236/57/3373] Building CXX object tools/mlir/lib/Dialect/LLVMIR/CMakeFiles/obj.MLIRNVVMDialect.dir/IR/NVVMDialect.cpp.o
56.481 [1236/56/3374] Building CXX object tools/mlir/lib/Dialect/LLVMIR/Transforms/CMakeFiles/obj.MLIRLLVMIRTransforms.dir/DIExpressionRewriter.cpp.o
56.492 [1236/55/3375] Building CXX object tools/mlir/lib/Dialect/LLVMIR/CMakeFiles/obj.MLIRROCDLDialect.dir/IR/ROCDLDialect.cpp.o
56.496 [1236/54/3376] Building CXX object tools/mlir/lib/Dialect/LLVMIR/CMakeFiles/obj.MLIRVCIXDialect.dir/IR/VCIXDialect.cpp.o
56.504 [1236/53/3377] Building CXX object tools/mlir/test/lib/Conversion/OneToNTypeConversion/CMakeFiles/MLIRTestOneToNTypeConversionPass.dir/TestOneToNTypeConversionPass.cpp.o
57.178 [1236/52/3378] Building CXX object lib/Transforms/Scalar/CMakeFiles/LLVMScalarOpts.dir/NewGVN.cpp.o
57.320 [1236/51/3379] Building CXX object lib/Target/X86/CMakeFiles/LLVMX86CodeGen.dir/X86CmovConversion.cpp.o
57.536 [1236/50/3380] Building AMDGPUGenGlobalISel.inc...
57.590 [1236/49/3381] Building CXX object lib/Analysis/CMakeFiles/LLVMAnalysis.dir/VectorUtils.cpp.o
57.842 [1236/48/3382] Building CXX object lib/Analysis/CMakeFiles/LLVMAnalysis.dir/LoopInfo.cpp.o
57.844 [1236/47/3383] Building CXX object lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/AsmParser.cpp.o
57.932 [1236/46/3384] Building CXX object lib/Transforms/Scalar/CMakeFiles/LLVMScalarOpts.dir/LoopStrengthReduce.cpp.o
58.181 [1236/45/3385] Building CXX object lib/Target/X86/CMakeFiles/LLVMX86CodeGen.dir/X86FixupLEAs.cpp.o
58.199 [1236/44/3386] Building CXX object lib/Analysis/CMakeFiles/LLVMAnalysis.dir/LoopAccessAnalysis.cpp.o
58.208 [1236/43/3387] Building CXX object tools/mlir/lib/Analysis/CMakeFiles/obj.MLIRAnalysis.dir/CFGLoopInfo.cpp.o
58.257 [1236/42/3388] Building CXX object lib/Target/X86/CMakeFiles/LLVMX86CodeGen.dir/X86PadShortFunction.cpp.o
58.307 [1236/41/3389] Building CXX object lib/Target/X86/CMakeFiles/LLVMX86CodeGen.dir/X86FixupBWInsts.cpp.o

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 17, 2024

LLVM Buildbot has detected a new failure on builder ppc64le-mlir-rhel-clang running on ppc64le-mlir-rhel-test while building llvm at step 5 "build-check-mlir-build-only".

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

Here is the relevant piece of the build log for the reference:

Step 5 (build-check-mlir-build-only) failure: build (failure)
...
77.730 [334/98/3553] Building CXX object lib/Analysis/CMakeFiles/LLVMAnalysis.dir/MustExecute.cpp.o
77.845 [334/97/3554] Building CXX object lib/Transforms/Vectorize/CMakeFiles/LLVMVectorize.dir/VPlanHCFGBuilder.cpp.o
77.878 [334/96/3555] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/SafeStack.cpp.o
78.297 [334/95/3556] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/SelectOptimize.cpp.o
78.389 [334/94/3557] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/LoopUnrollAndJam.cpp.o
78.527 [334/93/3558] Building CXX object lib/Analysis/CMakeFiles/LLVMAnalysis.dir/RegionInfo.cpp.o
78.655 [334/92/3559] Building CXX object lib/Transforms/Scalar/CMakeFiles/LLVMScalarOpts.dir/IndVarSimplify.cpp.o
78.868 [334/91/3560] Building CXX object lib/Analysis/CMakeFiles/LLVMAnalysis.dir/DependenceAnalysis.cpp.o
79.046 [334/90/3561] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/SimplifyIndVar.cpp.o
79.229 [334/89/3562] Building CXX object tools/mlir/lib/Dialect/Bufferization/Transforms/CMakeFiles/obj.MLIRBufferizationTransforms.dir/BufferViewFlowAnalysis.cpp.o
FAILED: tools/mlir/lib/Dialect/Bufferization/Transforms/CMakeFiles/obj.MLIRBufferizationTransforms.dir/BufferViewFlowAnalysis.cpp.o 
ccache /home/buildbots/llvm-external-buildbots/clang.16.0.1/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/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/tools/mlir/lib/Dialect/Bufferization/Transforms -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/llvm-project/mlir/lib/Dialect/Bufferization/Transforms -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/llvm-project/llvm/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/llvm-project/mlir/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/tools/mlir/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 -Wundef -Werror=mismatched-tags -Werror=global-constructors -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT tools/mlir/lib/Dialect/Bufferization/Transforms/CMakeFiles/obj.MLIRBufferizationTransforms.dir/BufferViewFlowAnalysis.cpp.o -MF tools/mlir/lib/Dialect/Bufferization/Transforms/CMakeFiles/obj.MLIRBufferizationTransforms.dir/BufferViewFlowAnalysis.cpp.o.d -o tools/mlir/lib/Dialect/Bufferization/Transforms/CMakeFiles/obj.MLIRBufferizationTransforms.dir/BufferViewFlowAnalysis.cpp.o -c /home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/llvm-project/mlir/lib/Dialect/Bufferization/Transforms/BufferViewFlowAnalysis.cpp
In file included from /home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/llvm-project/mlir/lib/Dialect/Bufferization/Transforms/BufferViewFlowAnalysis.cpp:16:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/llvm-project/llvm/include/llvm/ADT/SetOperations.h:109:20: error: no viable conversion from 'typename SmallPtrSet<Value, 16>::iterator' (aka 'SmallPtrSetIterator<mlir::Value>') to 'mlir::Value'
          S1.erase(SI);
                   ^~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/llvm-project/mlir/lib/Dialect/Bufferization/Transforms/BufferViewFlowAnalysis.cpp:63:11: note: in instantiation of function template specialization 'llvm::set_subtract<llvm::SmallPtrSet<mlir::Value, 16>, llvm::SetVector<mlir::Value, llvm::SmallVector<mlir::Value, 0>, llvm::DenseSet<mlir::Value, llvm::DenseMapInfo<mlir::Value>>, 0>>' requested here
    llvm::set_subtract(entry.second, aliasValues);
          ^
/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/llvm-project/mlir/include/mlir/IR/Value.h:96:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'typename SmallPtrSet<Value, 16>::iterator' (aka 'SmallPtrSetIterator<mlir::Value>') to 'const Value &' for 1st argument
class Value {
      ^
/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/llvm-project/mlir/include/mlir/IR/Value.h:96:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'typename SmallPtrSet<Value, 16>::iterator' (aka 'SmallPtrSetIterator<mlir::Value>') to 'Value &&' for 1st argument
/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/llvm-project/mlir/include/mlir/IR/Value.h:98:13: note: candidate constructor not viable: no known conversion from 'typename SmallPtrSet<Value, 16>::iterator' (aka 'SmallPtrSetIterator<mlir::Value>') to 'detail::ValueImpl *' for 1st argument
  constexpr Value(detail::ValueImpl *impl = nullptr) : impl(impl) {}
            ^
/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/llvm-project/llvm/include/llvm/ADT/SmallPtrSet.h:361:22: note: passing argument to parameter 'Ptr' here
  bool erase(PtrType Ptr) {
                     ^
1 error generated.
79.249 [334/88/3563] Building CXX object tools/mlir/lib/Analysis/CMakeFiles/obj.MLIRAnalysis.dir/Liveness.cpp.o
FAILED: tools/mlir/lib/Analysis/CMakeFiles/obj.MLIRAnalysis.dir/Liveness.cpp.o 
ccache /home/buildbots/llvm-external-buildbots/clang.16.0.1/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/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/tools/mlir/lib/Analysis -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/llvm-project/mlir/lib/Analysis -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/llvm-project/llvm/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/llvm-project/mlir/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/tools/mlir/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 -Wundef -Werror=mismatched-tags -Werror=global-constructors -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT tools/mlir/lib/Analysis/CMakeFiles/obj.MLIRAnalysis.dir/Liveness.cpp.o -MF tools/mlir/lib/Analysis/CMakeFiles/obj.MLIRAnalysis.dir/Liveness.cpp.o.d -o tools/mlir/lib/Analysis/CMakeFiles/obj.MLIRAnalysis.dir/Liveness.cpp.o -c /home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/llvm-project/mlir/lib/Analysis/Liveness.cpp
In file included from /home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/llvm-project/mlir/lib/Analysis/Liveness.cpp:19:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/llvm-project/llvm/include/llvm/ADT/SetOperations.h:109:20: error: no viable conversion from 'typename SmallPtrSet<Value, 16>::iterator' (aka 'SmallPtrSetIterator<mlir::Value>') to 'mlir::Value'
          S1.erase(SI);
                   ^~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/llvm-project/mlir/lib/Analysis/Liveness.cpp:80:11: note: in instantiation of function template specialization 'llvm::set_subtract<llvm::SmallPtrSet<mlir::Value, 16>, llvm::SmallPtrSet<mlir::Value, 16>>' requested here
    llvm::set_subtract(useValues, defValues);
          ^
/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/llvm-project/mlir/include/mlir/IR/Value.h:96:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'typename SmallPtrSet<Value, 16>::iterator' (aka 'SmallPtrSetIterator<mlir::Value>') to 'const Value &' for 1st argument
class Value {
      ^
/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/llvm-project/mlir/include/mlir/IR/Value.h:96:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'typename SmallPtrSet<Value, 16>::iterator' (aka 'SmallPtrSetIterator<mlir::Value>') to 'Value &&' for 1st argument
/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/llvm-project/mlir/include/mlir/IR/Value.h:98:13: note: candidate constructor not viable: no known conversion from 'typename SmallPtrSet<Value, 16>::iterator' (aka 'SmallPtrSetIterator<mlir::Value>') to 'detail::ValueImpl *' for 1st argument
  constexpr Value(detail::ValueImpl *impl = nullptr) : impl(impl) {}
            ^
/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/llvm-project/llvm/include/llvm/ADT/SmallPtrSet.h:361:22: note: passing argument to parameter 'Ptr' here
  bool erase(PtrType Ptr) {

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 17, 2024

LLVM Buildbot has detected a new failure on builder mlir-nvidia running on mlir-nvidia while building llvm at step 5 "build-check-mlir-build-only".

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

Here is the relevant piece of the build log for the reference:

Step 5 (build-check-mlir-build-only) failure: build (failure)
...
166.257 [1799/16/3090] Building CXX object tools/mlir/lib/Dialect/Vector/Transforms/CMakeFiles/obj.MLIRVectorTransforms.dir/LowerVectorBroadcast.cpp.o
166.285 [1798/16/3091] Building CXX object tools/mlir/lib/Dialect/Vector/Transforms/CMakeFiles/obj.MLIRVectorTransforms.dir/LowerVectorContract.cpp.o
166.289 [1797/16/3092] Linking CXX shared library lib/libMLIRArmNeonDialect.so.19.0git
166.293 [1796/16/3093] Building CXX object tools/mlir/lib/Dialect/ArmSME/IR/CMakeFiles/obj.MLIRArmSMEDialect.dir/Utils.cpp.o
166.296 [1795/16/3094] Creating library symlink lib/libMLIRArmNeonDialect.so
166.330 [1794/16/3095] Building CXX object tools/mlir/lib/Dialect/ArmNeon/Transforms/CMakeFiles/obj.MLIRArmNeonTransforms.dir/LowerContractionToSMMLAPattern.cpp.o
166.332 [1793/16/3096] Building CXX object tools/mlir/lib/Dialect/ArmSME/Transforms/CMakeFiles/obj.MLIRArmSMETransforms.dir/EnableArmStreaming.cpp.o
166.342 [1792/16/3097] Building CXX object tools/mlir/lib/Dialect/ArmSME/IR/CMakeFiles/obj.MLIRArmSMEDialect.dir/ArmSME.cpp.o
166.373 [1791/16/3098] Building CXX object tools/mlir/lib/Dialect/ArmSME/Transforms/CMakeFiles/obj.MLIRArmSMETransforms.dir/VectorLegalization.cpp.o
166.379 [1790/16/3099] Building CXX object tools/mlir/lib/Analysis/CMakeFiles/obj.MLIRAnalysis.dir/Liveness.cpp.o
FAILED: tools/mlir/lib/Analysis/CMakeFiles/obj.MLIRAnalysis.dir/Liveness.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/clang++ -DBUILD_EXAMPLES -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/vol/worker/mlir-nvidia/mlir-nvidia/llvm.obj/tools/mlir/lib/Analysis -I/vol/worker/mlir-nvidia/mlir-nvidia/llvm.src/mlir/lib/Analysis -I/vol/worker/mlir-nvidia/mlir-nvidia/llvm.obj/include -I/vol/worker/mlir-nvidia/mlir-nvidia/llvm.src/llvm/include -I/vol/worker/mlir-nvidia/mlir-nvidia/llvm.src/mlir/include -I/vol/worker/mlir-nvidia/mlir-nvidia/llvm.obj/tools/mlir/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 -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wundef -Werror=mismatched-tags -Werror=global-constructors -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT tools/mlir/lib/Analysis/CMakeFiles/obj.MLIRAnalysis.dir/Liveness.cpp.o -MF tools/mlir/lib/Analysis/CMakeFiles/obj.MLIRAnalysis.dir/Liveness.cpp.o.d -o tools/mlir/lib/Analysis/CMakeFiles/obj.MLIRAnalysis.dir/Liveness.cpp.o -c /vol/worker/mlir-nvidia/mlir-nvidia/llvm.src/mlir/lib/Analysis/Liveness.cpp
In file included from /vol/worker/mlir-nvidia/mlir-nvidia/llvm.src/mlir/lib/Analysis/Liveness.cpp:19:
/vol/worker/mlir-nvidia/mlir-nvidia/llvm.src/llvm/include/llvm/ADT/SetOperations.h:109:20: error: no viable conversion from 'typename SmallPtrSet<Value, 16>::iterator' (aka 'SmallPtrSetIterator<mlir::Value>') to 'mlir::Value'
          S1.erase(SI);
                   ^~
/vol/worker/mlir-nvidia/mlir-nvidia/llvm.src/mlir/lib/Analysis/Liveness.cpp:80:11: note: in instantiation of function template specialization 'llvm::set_subtract<llvm::SmallPtrSet<mlir::Value, 16>, llvm::SmallPtrSet<mlir::Value, 16> >' requested here
    llvm::set_subtract(useValues, defValues);
          ^
/vol/worker/mlir-nvidia/mlir-nvidia/llvm.src/mlir/include/mlir/IR/Value.h:96:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'typename SmallPtrSet<Value, 16>::iterator' (aka 'SmallPtrSetIterator<mlir::Value>') to 'const mlir::Value &' for 1st argument
class Value {
      ^
/vol/worker/mlir-nvidia/mlir-nvidia/llvm.src/mlir/include/mlir/IR/Value.h:96:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'typename SmallPtrSet<Value, 16>::iterator' (aka 'SmallPtrSetIterator<mlir::Value>') to 'mlir::Value &&' for 1st argument
/vol/worker/mlir-nvidia/mlir-nvidia/llvm.src/mlir/include/mlir/IR/Value.h:98:13: note: candidate constructor not viable: no known conversion from 'typename SmallPtrSet<Value, 16>::iterator' (aka 'SmallPtrSetIterator<mlir::Value>') to 'detail::ValueImpl *' for 1st argument
  constexpr Value(detail::ValueImpl *impl = nullptr) : impl(impl) {}
            ^
/vol/worker/mlir-nvidia/mlir-nvidia/llvm.src/llvm/include/llvm/ADT/SmallPtrSet.h:361:22: note: passing argument to parameter 'Ptr' here
  bool erase(PtrType Ptr) {
                     ^
1 error generated.
166.380 [1790/15/3100] Building CXX object tools/mlir/lib/Dialect/ArmSME/Transforms/CMakeFiles/obj.MLIRArmSMETransforms.dir/OuterProductFusion.cpp.o
166.388 [1790/14/3101] Building CXX object tools/mlir/lib/Dialect/ArmSVE/Transforms/CMakeFiles/obj.MLIRArmSVETransforms.dir/LegalizeForLLVMExport.cpp.o
166.411 [1790/13/3102] Building CXX object tools/mlir/lib/Dialect/ArmSVE/IR/CMakeFiles/obj.MLIRArmSVEDialect.dir/ArmSVEDialect.cpp.o
168.538 [1790/12/3103] Building CXX object tools/mlir/lib/Analysis/CMakeFiles/obj.MLIRAnalysis.dir/CFGLoopInfo.cpp.o
169.233 [1790/11/3104] Building CXX object lib/Target/X86/CMakeFiles/LLVMX86CodeGen.dir/X86TargetMachine.cpp.o
170.939 [1790/10/3105] Building CXX object lib/Target/X86/CMakeFiles/LLVMX86CodeGen.dir/X86InstCombineIntrinsic.cpp.o
171.224 [1790/9/3106] Building CXX object lib/Target/X86/CMakeFiles/LLVMX86CodeGen.dir/X86TargetTransformInfo.cpp.o
171.327 [1790/8/3107] Building CXX object tools/mlir/lib/ExecutionEngine/CMakeFiles/obj.MLIRExecutionEngineUtils.dir/OptUtils.cpp.o
171.984 [1790/7/3108] Building CXX object tools/llc/CMakeFiles/llc.dir/NewPMDriver.cpp.o
172.583 [1790/6/3109] Building CXX object lib/Analysis/CMakeFiles/LLVMAnalysis.dir/ScalarEvolution.cpp.o
174.486 [1790/5/3110] Building CXX object lib/Passes/CMakeFiles/LLVMPasses.dir/StandardInstrumentations.cpp.o
176.832 [1790/4/3111] Building CXX object lib/Passes/CMakeFiles/LLVMPasses.dir/PassBuilder.cpp.o
178.254 [1790/3/3112] Building CXX object tools/mlir/lib/Dialect/Linalg/Transforms/CMakeFiles/obj.MLIRLinalgTransforms.dir/DataLayoutPropagation.cpp.o
183.086 [1790/2/3113] Building CXX object lib/Transforms/Vectorize/CMakeFiles/LLVMVectorize.dir/SLPVectorizer.cpp.o
213.664 [1790/1/3114] Building CXX object lib/Target/X86/CMakeFiles/LLVMX86CodeGen.dir/X86ISelLowering.cpp.o
ninja: build stopped: subcommand failed.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 17, 2024

LLVM Buildbot has detected a new failure on builder flang-aarch64-out-of-tree running on linaro-flang-aarch64-out-of-tree while building llvm at step 5 "build-unified-tree".

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

Here is the relevant piece of the build log for the reference:

Step 5 (build-unified-tree) failure: build (failure)
...
93.952 [180/15/219] Building CXX object tools/clang/lib/Basic/CMakeFiles/obj.clangBasic.dir/Version.cpp.o
94.181 [180/14/220] Building CXX object lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64TargetTransformInfo.cpp.o
94.564 [177/16/221] Linking CXX static library lib/libLLVMInstCombine.a
94.680 [177/15/222] Linking CXX static library lib/libLLVMInstrumentation.a
100.320 [177/14/223] Building CXX object tools/llvm-objdump/CMakeFiles/llvm-objdump.dir/llvm-objdump.cpp.o
100.529 [171/19/224] Linking CXX static library lib/libLLVMScalarOpts.a
100.654 [166/23/225] Building CXX object tools/mlir/lib/Dialect/Linalg/IR/CMakeFiles/obj.MLIRLinalgDialect.dir/LinalgOps.cpp.o
100.660 [165/23/226] Linking CXX static library lib/libLLVMFrontendOpenMP.a
100.701 [162/25/227] Linking CXX static library lib/libLLVMCodeGen.a
101.005 [162/24/228] Building CXX object tools/mlir/lib/Analysis/CMakeFiles/obj.MLIRAnalysis.dir/Liveness.cpp.o
FAILED: tools/mlir/lib/Analysis/CMakeFiles/obj.MLIRAnalysis.dir/Liveness.cpp.o 
/usr/local/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 -I/home/tcwg-buildbot/worker/flang-aarch64-out-of-tree/build_llvm/tools/mlir/lib/Analysis -I/home/tcwg-buildbot/worker/flang-aarch64-out-of-tree/llvm-project/mlir/lib/Analysis -I/home/tcwg-buildbot/worker/flang-aarch64-out-of-tree/build_llvm/include -I/home/tcwg-buildbot/worker/flang-aarch64-out-of-tree/llvm-project/llvm/include -I/home/tcwg-buildbot/worker/flang-aarch64-out-of-tree/llvm-project/mlir/include -I/home/tcwg-buildbot/worker/flang-aarch64-out-of-tree/build_llvm/tools/mlir/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 -Wundef -Werror=mismatched-tags -Werror=global-constructors -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT tools/mlir/lib/Analysis/CMakeFiles/obj.MLIRAnalysis.dir/Liveness.cpp.o -MF tools/mlir/lib/Analysis/CMakeFiles/obj.MLIRAnalysis.dir/Liveness.cpp.o.d -o tools/mlir/lib/Analysis/CMakeFiles/obj.MLIRAnalysis.dir/Liveness.cpp.o -c /home/tcwg-buildbot/worker/flang-aarch64-out-of-tree/llvm-project/mlir/lib/Analysis/Liveness.cpp
In file included from ../llvm-project/mlir/lib/Analysis/Liveness.cpp:19:
../llvm-project/llvm/include/llvm/ADT/SetOperations.h:109:20: error: no viable conversion from 'typename SmallPtrSet<Value, 16>::iterator' (aka 'SmallPtrSetIterator<mlir::Value>') to 'mlir::Value'
  109 |           S1.erase(SI);
      |                    ^~
../llvm-project/mlir/lib/Analysis/Liveness.cpp:80:11: note: in instantiation of function template specialization 'llvm::set_subtract<llvm::SmallPtrSet<mlir::Value, 16>, llvm::SmallPtrSet<mlir::Value, 16>>' requested here
   80 |     llvm::set_subtract(useValues, defValues);
      |           ^
../llvm-project/mlir/include/mlir/IR/Value.h:96:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'typename SmallPtrSet<Value, 16>::iterator' (aka 'SmallPtrSetIterator<mlir::Value>') to 'const Value &' for 1st argument
   96 | class Value {
      |       ^~~~~
../llvm-project/mlir/include/mlir/IR/Value.h:96:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'typename SmallPtrSet<Value, 16>::iterator' (aka 'SmallPtrSetIterator<mlir::Value>') to 'Value &&' for 1st argument
   96 | class Value {
      |       ^~~~~
../llvm-project/mlir/include/mlir/IR/Value.h:98:13: note: candidate constructor not viable: no known conversion from 'typename SmallPtrSet<Value, 16>::iterator' (aka 'SmallPtrSetIterator<mlir::Value>') to 'detail::ValueImpl *' for 1st argument
   98 |   constexpr Value(detail::ValueImpl *impl = nullptr) : impl(impl) {}
      |             ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../llvm-project/llvm/include/llvm/ADT/SmallPtrSet.h:361:22: note: passing argument to parameter 'Ptr' here
  361 |   bool erase(PtrType Ptr) {
      |                      ^
1 error generated.
102.100 [162/23/229] Building CXX object lib/Passes/CMakeFiles/LLVMPasses.dir/PassBuilderPipelines.cpp.o
103.433 [162/22/230] Building CXX object examples/IRTransforms/CMakeFiles/ExampleIRTransforms.dir/SimplifyCFG.cpp.o
104.188 [162/21/231] Building CXX object tools/mlir/lib/ExecutionEngine/CMakeFiles/obj.MLIRExecutionEngineUtils.dir/OptUtils.cpp.o
108.356 [162/20/232] Building CXX object tools/mlir/lib/Analysis/CMakeFiles/obj.MLIRAnalysis.dir/CFGLoopInfo.cpp.o
109.440 [162/19/233] Building CXX object tools/mlir/test/lib/Analysis/CMakeFiles/MLIRTestAnalysis.dir/TestCFGLoopInfo.cpp.o
111.077 [162/18/234] Building CXX object tools/mlir/lib/Dialect/Bufferization/Transforms/CMakeFiles/obj.MLIRBufferizationTransforms.dir/BufferViewFlowAnalysis.cpp.o
FAILED: tools/mlir/lib/Dialect/Bufferization/Transforms/CMakeFiles/obj.MLIRBufferizationTransforms.dir/BufferViewFlowAnalysis.cpp.o 
/usr/local/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 -I/home/tcwg-buildbot/worker/flang-aarch64-out-of-tree/build_llvm/tools/mlir/lib/Dialect/Bufferization/Transforms -I/home/tcwg-buildbot/worker/flang-aarch64-out-of-tree/llvm-project/mlir/lib/Dialect/Bufferization/Transforms -I/home/tcwg-buildbot/worker/flang-aarch64-out-of-tree/build_llvm/include -I/home/tcwg-buildbot/worker/flang-aarch64-out-of-tree/llvm-project/llvm/include -I/home/tcwg-buildbot/worker/flang-aarch64-out-of-tree/llvm-project/mlir/include -I/home/tcwg-buildbot/worker/flang-aarch64-out-of-tree/build_llvm/tools/mlir/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 -Wundef -Werror=mismatched-tags -Werror=global-constructors -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT tools/mlir/lib/Dialect/Bufferization/Transforms/CMakeFiles/obj.MLIRBufferizationTransforms.dir/BufferViewFlowAnalysis.cpp.o -MF tools/mlir/lib/Dialect/Bufferization/Transforms/CMakeFiles/obj.MLIRBufferizationTransforms.dir/BufferViewFlowAnalysis.cpp.o.d -o tools/mlir/lib/Dialect/Bufferization/Transforms/CMakeFiles/obj.MLIRBufferizationTransforms.dir/BufferViewFlowAnalysis.cpp.o -c /home/tcwg-buildbot/worker/flang-aarch64-out-of-tree/llvm-project/mlir/lib/Dialect/Bufferization/Transforms/BufferViewFlowAnalysis.cpp
In file included from ../llvm-project/mlir/lib/Dialect/Bufferization/Transforms/BufferViewFlowAnalysis.cpp:16:
../llvm-project/llvm/include/llvm/ADT/SetOperations.h:109:20: error: no viable conversion from 'typename SmallPtrSet<Value, 16>::iterator' (aka 'SmallPtrSetIterator<mlir::Value>') to 'mlir::Value'
  109 |           S1.erase(SI);
      |                    ^~
../llvm-project/mlir/lib/Dialect/Bufferization/Transforms/BufferViewFlowAnalysis.cpp:63:11: note: in instantiation of function template specialization 'llvm::set_subtract<llvm::SmallPtrSet<mlir::Value, 16>, llvm::SetVector<mlir::Value, llvm::SmallVector<mlir::Value, 0>, llvm::DenseSet<mlir::Value>, 0>>' requested here
   63 |     llvm::set_subtract(entry.second, aliasValues);
      |           ^
../llvm-project/mlir/include/mlir/IR/Value.h:96:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'typename SmallPtrSet<Value, 16>::iterator' (aka 'SmallPtrSetIterator<mlir::Value>') to 'const Value &' for 1st argument
   96 | class Value {

teresajohnson added a commit that referenced this pull request Jul 17, 2024
…ger (NFC)" (#99386)

Reverts #98702

This broke some mlir code and needs investigation.
@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 17, 2024

LLVM Buildbot has detected a new failure on builder mlir-nvidia-gcc7 running on mlir-nvidia while building llvm at step 5 "build-check-mlir-build-only".

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

Here is the relevant piece of the build log for the reference:

Step 5 (build-check-mlir-build-only) failure: build (failure)
...
170.972 [1343/16/3132] Building C object tools/mlir/test/CAPI/CMakeFiles/mlir-capi-irdl-test.dir/irdl.c.o
171.000 [1342/16/3133] Building CXX object tools/mlir/lib/Dialect/GPU/CMakeFiles/obj.MLIRGPUTransforms.dir/Transforms/BufferDeallocationOpInterfaceImpl.cpp.o
171.009 [1341/16/3134] Building CXX object tools/mlir/lib/Dialect/GPU/CMakeFiles/obj.MLIRGPUTransforms.dir/Transforms/AsyncRegionRewriter.cpp.o
171.031 [1340/16/3135] Building CXX object tools/mlir/lib/Transforms/Utils/CMakeFiles/obj.MLIRTransformUtils.dir/DialectConversion.cpp.o
171.048 [1339/16/3136] Building CXX object tools/mlir/lib/Dialect/GPU/CMakeFiles/obj.MLIRGPUTransforms.dir/Transforms/KernelOutlining.cpp.o
171.071 [1338/16/3137] Building CXX object tools/mlir/lib/Dialect/GPU/CMakeFiles/obj.MLIRGPUTransforms.dir/Transforms/MemoryPromotion.cpp.o
171.101 [1337/16/3138] Building CXX object tools/mlir/lib/Dialect/GPU/CMakeFiles/obj.MLIRGPUTransforms.dir/Transforms/ModuleToBinary.cpp.o
171.121 [1336/16/3139] Building CXX object tools/mlir/lib/Dialect/GPU/CMakeFiles/obj.MLIRGPUTransforms.dir/Transforms/NVVMAttachTarget.cpp.o
171.138 [1335/16/3140] Building CXX object tools/mlir/lib/Dialect/GPU/CMakeFiles/obj.MLIRGPUTransforms.dir/Transforms/ParallelLoopMapper.cpp.o
171.150 [1334/16/3141] Building CXX object tools/mlir/lib/Analysis/CMakeFiles/obj.MLIRAnalysis.dir/Liveness.cpp.o
FAILED: tools/mlir/lib/Analysis/CMakeFiles/obj.MLIRAnalysis.dir/Liveness.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/g++-7 -DBUILD_EXAMPLES -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/vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.obj/tools/mlir/lib/Analysis -I/vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.src/mlir/lib/Analysis -I/vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.obj/include -I/vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.src/llvm/include -I/vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.src/mlir/include -I/vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.obj/tools/mlir/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 -Wundef -Wno-unused-but-set-parameter -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++1z -MD -MT tools/mlir/lib/Analysis/CMakeFiles/obj.MLIRAnalysis.dir/Liveness.cpp.o -MF tools/mlir/lib/Analysis/CMakeFiles/obj.MLIRAnalysis.dir/Liveness.cpp.o.d -o tools/mlir/lib/Analysis/CMakeFiles/obj.MLIRAnalysis.dir/Liveness.cpp.o -c /vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.src/mlir/lib/Analysis/Liveness.cpp
In file included from /vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.src/mlir/lib/Analysis/Liveness.cpp:19:0:
/vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.src/llvm/include/llvm/ADT/SetOperations.h: In instantiation of ‘void llvm::set_subtract(S1Ty&, const S2Ty&) [with S1Ty = llvm::SmallPtrSet<mlir::Value, 16>; S2Ty = llvm::SmallPtrSet<mlir::Value, 16>]’:
/vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.src/mlir/lib/Analysis/Liveness.cpp:80:44:   required from here
/vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.src/llvm/include/llvm/ADT/SetOperations.h:109:11: error: no matching function for call to ‘llvm::SmallPtrSet<mlir::Value, 16>::erase(llvm::SmallPtrSetImpl<mlir::Value>::iterator&)’
           S1.erase(SI);
           ^~
In file included from /vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.src/mlir/include/mlir/Analysis/Liveness.h:25:0,
                 from /vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.src/mlir/lib/Analysis/Liveness.cpp:13:
/vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.src/llvm/include/llvm/ADT/SmallPtrSet.h:361:8: note: candidate: bool llvm::SmallPtrSetImpl<T>::erase(PtrType) [with PtrType = mlir::Value]
   bool erase(PtrType Ptr) {
        ^~~~~
/vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.src/llvm/include/llvm/ADT/SmallPtrSet.h:361:8: note:   no known conversion for argument 1 from ‘llvm::SmallPtrSetImpl<mlir::Value>::iterator {aka llvm::SmallPtrSetIterator<mlir::Value>}’ to ‘mlir::Value’
171.170 [1334/15/3142] Building CXX object tools/mlir/lib/Dialect/GPU/CMakeFiles/obj.MLIRGPUTransforms.dir/Transforms/ROCDLAttachTarget.cpp.o
171.175 [1334/14/3143] Building CXX object tools/mlir/lib/Dialect/GPU/CMakeFiles/obj.MLIRGPUTransforms.dir/Transforms/ShuffleRewriter.cpp.o
171.729 [1334/13/3144] Building CXX object lib/Transforms/Vectorize/CMakeFiles/LLVMVectorize.dir/SLPVectorizer.cpp.o
172.272 [1334/12/3145] Building CXX object tools/mlir/lib/Analysis/CMakeFiles/obj.MLIRAnalysis.dir/CFGLoopInfo.cpp.o
174.945 [1334/11/3146] Building CXX object tools/mlir/lib/Dialect/Bufferization/Transforms/CMakeFiles/obj.MLIRBufferizationTransforms.dir/BufferViewFlowAnalysis.cpp.o
FAILED: tools/mlir/lib/Dialect/Bufferization/Transforms/CMakeFiles/obj.MLIRBufferizationTransforms.dir/BufferViewFlowAnalysis.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/g++-7 -DBUILD_EXAMPLES -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/vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.obj/tools/mlir/lib/Dialect/Bufferization/Transforms -I/vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.src/mlir/lib/Dialect/Bufferization/Transforms -I/vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.obj/include -I/vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.src/llvm/include -I/vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.src/mlir/include -I/vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.obj/tools/mlir/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 -Wundef -Wno-unused-but-set-parameter -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++1z -MD -MT tools/mlir/lib/Dialect/Bufferization/Transforms/CMakeFiles/obj.MLIRBufferizationTransforms.dir/BufferViewFlowAnalysis.cpp.o -MF tools/mlir/lib/Dialect/Bufferization/Transforms/CMakeFiles/obj.MLIRBufferizationTransforms.dir/BufferViewFlowAnalysis.cpp.o.d -o tools/mlir/lib/Dialect/Bufferization/Transforms/CMakeFiles/obj.MLIRBufferizationTransforms.dir/BufferViewFlowAnalysis.cpp.o -c /vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.src/mlir/lib/Dialect/Bufferization/Transforms/BufferViewFlowAnalysis.cpp
/vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.src/mlir/lib/Dialect/Bufferization/Transforms/BufferViewFlowAnalysis.cpp: In member function ‘void mlir::BufferViewFlowAnalysis::rename(mlir::Value, mlir::Value)’:
/vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.src/mlir/lib/Dialect/Bufferization/Transforms/BufferViewFlowAnalysis.cpp:70:23: warning: unused variable ‘_’ [-Wunused-variable]
   for (auto &[_, value] : dependencies) {
                       ^
In file included from /vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.src/mlir/lib/Dialect/Bufferization/Transforms/BufferViewFlowAnalysis.cpp:16:0:
/vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.src/llvm/include/llvm/ADT/SetOperations.h: In instantiation of ‘void llvm::set_subtract(S1Ty&, const S2Ty&) [with S1Ty = llvm::SmallPtrSet<mlir::Value, 16>; S2Ty = llvm::SetVector<mlir::Value, llvm::SmallVector<mlir::Value, 0>, llvm::DenseSet<mlir::Value, llvm::DenseMapInfo<mlir::Value> >, 0>]’:
/vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.src/mlir/lib/Dialect/Bufferization/Transforms/BufferViewFlowAnalysis.cpp:63:49:   required from here
/vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.src/llvm/include/llvm/ADT/SetOperations.h:109:11: error: no matching function for call to ‘llvm::SmallPtrSet<mlir::Value, 16>::erase(llvm::SmallPtrSetImpl<mlir::Value>::iterator&)’
           S1.erase(SI);
           ^~
In file included from /vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.src/mlir/include/mlir/Dialect/Bufferization/Transforms/BufferViewFlowAnalysis.h:13:0,
                 from /vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.src/mlir/lib/Dialect/Bufferization/Transforms/BufferViewFlowAnalysis.cpp:9:
/vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.src/llvm/include/llvm/ADT/SmallPtrSet.h:361:8: note: candidate: bool llvm::SmallPtrSetImpl<T>::erase(PtrType) [with PtrType = mlir::Value]
   bool erase(PtrType Ptr) {
        ^~~~~
/vol/worker/mlir-nvidia/mlir-nvidia-gcc7/llvm.src/llvm/include/llvm/ADT/SmallPtrSet.h:361:8: note:   no known conversion for argument 1 from ‘llvm::SmallPtrSetImpl<mlir::Value>::iterator {aka llvm::SmallPtrSetIterator<mlir::Value>}’ to ‘mlir::Value’
176.102 [1334/10/3147] Building CXX object tools/mlir/lib/ExecutionEngine/CMakeFiles/obj.MLIRExecutionEngineUtils.dir/OptUtils.cpp.o
176.195 [1334/9/3148] Building CXX object lib/Target/X86/CMakeFiles/LLVMX86CodeGen.dir/X86TargetMachine.cpp.o

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 17, 2024

LLVM Buildbot has detected a new failure on builder ppc64le-flang-rhel-clang running on ppc64le-flang-rhel-test while building llvm at step 5 "build-unified-tree".

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

Here is the relevant piece of the build log for the reference:

Step 5 (build-unified-tree) failure: build (failure)
...
25.149 [538/162/5766] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/PHIElimination.cpp.o
25.154 [538/161/5767] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/LoopUnrollAndJam.cpp.o
25.169 [538/160/5768] Building CXX object lib/Analysis/CMakeFiles/LLVMAnalysis.dir/DDG.cpp.o
25.179 [538/159/5769] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/MachineRegionInfo.cpp.o
25.191 [538/158/5770] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/BasicBlockUtils.cpp.o
25.262 [538/157/5771] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/MLRegAllocEvictAdvisor.cpp.o
25.393 [538/156/5772] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/PeepholeOptimizer.cpp.o
25.405 [538/155/5773] Building CXX object lib/Target/PowerPC/CMakeFiles/LLVMPowerPCCodeGen.dir/PPCCTRLoops.cpp.o
25.412 [538/154/5774] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/LoopSimplify.cpp.o
25.479 [538/153/5775] Building CXX object tools/mlir/lib/Analysis/CMakeFiles/obj.MLIRAnalysis.dir/Liveness.cpp.o
FAILED: tools/mlir/lib/Analysis/CMakeFiles/obj.MLIRAnalysis.dir/Liveness.cpp.o 
ccache /home/buildbots/llvm-external-buildbots/clang.16.0.1/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/home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/build/tools/mlir/lib/Analysis -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/mlir/lib/Analysis -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/build/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/llvm/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/mlir/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/build/tools/mlir/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 -Wundef -Werror=mismatched-tags -Werror=global-constructors -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT tools/mlir/lib/Analysis/CMakeFiles/obj.MLIRAnalysis.dir/Liveness.cpp.o -MF tools/mlir/lib/Analysis/CMakeFiles/obj.MLIRAnalysis.dir/Liveness.cpp.o.d -o tools/mlir/lib/Analysis/CMakeFiles/obj.MLIRAnalysis.dir/Liveness.cpp.o -c /home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/mlir/lib/Analysis/Liveness.cpp
In file included from /home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/mlir/lib/Analysis/Liveness.cpp:19:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/llvm/include/llvm/ADT/SetOperations.h:109:20: error: no viable conversion from 'typename SmallPtrSet<Value, 16>::iterator' (aka 'SmallPtrSetIterator<mlir::Value>') to 'mlir::Value'
          S1.erase(SI);
                   ^~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/mlir/lib/Analysis/Liveness.cpp:80:11: note: in instantiation of function template specialization 'llvm::set_subtract<llvm::SmallPtrSet<mlir::Value, 16>, llvm::SmallPtrSet<mlir::Value, 16>>' requested here
    llvm::set_subtract(useValues, defValues);
          ^
/home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/mlir/include/mlir/IR/Value.h:96:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'typename SmallPtrSet<Value, 16>::iterator' (aka 'SmallPtrSetIterator<mlir::Value>') to 'const Value &' for 1st argument
class Value {
      ^
/home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/mlir/include/mlir/IR/Value.h:96:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'typename SmallPtrSet<Value, 16>::iterator' (aka 'SmallPtrSetIterator<mlir::Value>') to 'Value &&' for 1st argument
/home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/mlir/include/mlir/IR/Value.h:98:13: note: candidate constructor not viable: no known conversion from 'typename SmallPtrSet<Value, 16>::iterator' (aka 'SmallPtrSetIterator<mlir::Value>') to 'detail::ValueImpl *' for 1st argument
  constexpr Value(detail::ValueImpl *impl = nullptr) : impl(impl) {}
            ^
/home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/llvm/include/llvm/ADT/SmallPtrSet.h:361:22: note: passing argument to parameter 'Ptr' here
  bool erase(PtrType Ptr) {
                     ^
1 error generated.
25.522 [538/152/5776] Building CXX object lib/Transforms/Vectorize/CMakeFiles/LLVMVectorize.dir/LoopIdiomVectorize.cpp.o
25.678 [538/151/5777] Building CXX object lib/Transforms/Scalar/CMakeFiles/LLVMScalarOpts.dir/TLSVariableHoist.cpp.o
25.705 [538/150/5778] Building CXX object lib/Analysis/CMakeFiles/LLVMAnalysis.dir/FunctionPropertiesAnalysis.cpp.o
25.708 [538/149/5779] Building CXX object lib/Analysis/CMakeFiles/LLVMAnalysis.dir/Loads.cpp.o
25.778 [538/148/5780] Building CXX object lib/Transforms/Scalar/CMakeFiles/LLVMScalarOpts.dir/LoopInstSimplify.cpp.o
25.982 [538/147/5781] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/ShrinkWrap.cpp.o
26.003 [538/146/5782] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/BranchFolding.cpp.o
26.545 [538/145/5783] Building CXX object lib/Transforms/Scalar/CMakeFiles/LLVMScalarOpts.dir/WarnMissedTransforms.cpp.o
26.656 [538/144/5784] Building CXX object lib/Transforms/Scalar/CMakeFiles/LLVMScalarOpts.dir/LoopAccessAnalysisPrinter.cpp.o
26.718 [538/143/5785] Building CXX object tools/mlir/lib/Dialect/Bufferization/Transforms/CMakeFiles/obj.MLIRBufferizationTransforms.dir/BufferViewFlowAnalysis.cpp.o
FAILED: tools/mlir/lib/Dialect/Bufferization/Transforms/CMakeFiles/obj.MLIRBufferizationTransforms.dir/BufferViewFlowAnalysis.cpp.o 
ccache /home/buildbots/llvm-external-buildbots/clang.16.0.1/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/home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/build/tools/mlir/lib/Dialect/Bufferization/Transforms -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/mlir/lib/Dialect/Bufferization/Transforms -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/build/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/llvm/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/mlir/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/build/tools/mlir/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 -Wundef -Werror=mismatched-tags -Werror=global-constructors -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT tools/mlir/lib/Dialect/Bufferization/Transforms/CMakeFiles/obj.MLIRBufferizationTransforms.dir/BufferViewFlowAnalysis.cpp.o -MF tools/mlir/lib/Dialect/Bufferization/Transforms/CMakeFiles/obj.MLIRBufferizationTransforms.dir/BufferViewFlowAnalysis.cpp.o.d -o tools/mlir/lib/Dialect/Bufferization/Transforms/CMakeFiles/obj.MLIRBufferizationTransforms.dir/BufferViewFlowAnalysis.cpp.o -c /home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/mlir/lib/Dialect/Bufferization/Transforms/BufferViewFlowAnalysis.cpp
In file included from /home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/mlir/lib/Dialect/Bufferization/Transforms/BufferViewFlowAnalysis.cpp:16:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/llvm/include/llvm/ADT/SetOperations.h:109:20: error: no viable conversion from 'typename SmallPtrSet<Value, 16>::iterator' (aka 'SmallPtrSetIterator<mlir::Value>') to 'mlir::Value'
          S1.erase(SI);
                   ^~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-flang-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/mlir/lib/Dialect/Bufferization/Transforms/BufferViewFlowAnalysis.cpp:63:11: note: in instantiation of function template specialization 'llvm::set_subtract<llvm::SmallPtrSet<mlir::Value, 16>, llvm::SetVector<mlir::Value, llvm::SmallVector<mlir::Value, 0>, llvm::DenseSet<mlir::Value, llvm::DenseMapInfo<mlir::Value>>, 0>>' requested here
    llvm::set_subtract(entry.second, aliasValues);
          ^

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 17, 2024

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

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

Here is the relevant piece of the build log for the reference:

Step 6 (build-unified-tree) failure: build (failure)
...
68.720 [3258/58/337] Linking CXX static library lib/libLLVMInstrumentation.a
68.774 [3257/58/338] Building CXX object lib/Target/SystemZ/CMakeFiles/LLVMSystemZCodeGen.dir/SystemZTargetMachine.cpp.o
68.863 [3256/58/339] Building CXX object lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyTargetTransformInfo.cpp.o
68.893 [3255/58/340] Linking CXX static library lib/libLLVMInstCombine.a
68.962 [3254/58/341] Linking CXX executable bin/llvm-ar
68.984 [3253/58/342] Generating ../../bin/llvm-ranlib
69.011 [3252/58/343] Building CXX object lib/Target/X86/CMakeFiles/LLVMX86CodeGen.dir/X86LowerAMXIntrinsics.cpp.o
69.019 [3251/58/344] Generating ../../bin/llvm-lib
69.031 [3250/58/345] Generating ../../bin/llvm-dlltool
69.051 [3249/58/346] Building CXX object tools/mlir/lib/Analysis/CMakeFiles/obj.MLIRAnalysis.dir/Liveness.cpp.o
FAILED: tools/mlir/lib/Analysis/CMakeFiles/obj.MLIRAnalysis.dir/Liveness.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/clang++ -DBUILD_EXAMPLES -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/build/buildbot/premerge-monolithic-linux/build/tools/mlir/lib/Analysis -I/build/buildbot/premerge-monolithic-linux/llvm-project/mlir/lib/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/mlir/include -I/build/buildbot/premerge-monolithic-linux/build/tools/mlir/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 -Wundef -Werror=mismatched-tags -Werror=global-constructors -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT tools/mlir/lib/Analysis/CMakeFiles/obj.MLIRAnalysis.dir/Liveness.cpp.o -MF tools/mlir/lib/Analysis/CMakeFiles/obj.MLIRAnalysis.dir/Liveness.cpp.o.d -o tools/mlir/lib/Analysis/CMakeFiles/obj.MLIRAnalysis.dir/Liveness.cpp.o -c /build/buildbot/premerge-monolithic-linux/llvm-project/mlir/lib/Analysis/Liveness.cpp
In file included from /build/buildbot/premerge-monolithic-linux/llvm-project/mlir/lib/Analysis/Liveness.cpp:19:
/build/buildbot/premerge-monolithic-linux/llvm-project/llvm/include/llvm/ADT/SetOperations.h:109:20: error: no viable conversion from 'typename SmallPtrSet<Value, 16>::iterator' (aka 'SmallPtrSetIterator<mlir::Value>') to 'mlir::Value'
          S1.erase(SI);
                   ^~
/build/buildbot/premerge-monolithic-linux/llvm-project/mlir/lib/Analysis/Liveness.cpp:80:11: note: in instantiation of function template specialization 'llvm::set_subtract<llvm::SmallPtrSet<mlir::Value, 16>, llvm::SmallPtrSet<mlir::Value, 16>>' requested here
    llvm::set_subtract(useValues, defValues);
          ^
/build/buildbot/premerge-monolithic-linux/llvm-project/mlir/include/mlir/IR/Value.h:96:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'typename SmallPtrSet<Value, 16>::iterator' (aka 'SmallPtrSetIterator<mlir::Value>') to 'const Value &' for 1st argument
class Value {
      ^
/build/buildbot/premerge-monolithic-linux/llvm-project/mlir/include/mlir/IR/Value.h:96:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'typename SmallPtrSet<Value, 16>::iterator' (aka 'SmallPtrSetIterator<mlir::Value>') to 'Value &&' for 1st argument
/build/buildbot/premerge-monolithic-linux/llvm-project/mlir/include/mlir/IR/Value.h:98:13: note: candidate constructor not viable: no known conversion from 'typename SmallPtrSet<Value, 16>::iterator' (aka 'SmallPtrSetIterator<mlir::Value>') to 'detail::ValueImpl *' for 1st argument
  constexpr Value(detail::ValueImpl *impl = nullptr) : impl(impl) {}
            ^
/build/buildbot/premerge-monolithic-linux/llvm-project/llvm/include/llvm/ADT/SmallPtrSet.h:361:22: note: passing argument to parameter 'Ptr' here
  bool erase(PtrType Ptr) {
                     ^
1 error generated.
69.443 [3249/57/347] Building CXX object lib/Target/WebAssembly/CMakeFiles/LLVMWebAssemblyCodeGen.dir/WebAssemblyCFGStackify.cpp.o
69.501 [3249/56/348] Linking CXX static library lib/libLLVMScalarOpts.a
69.503 [3249/55/349] Building CXX object tools/mlir/test/lib/Analysis/CMakeFiles/MLIRTestAnalysis.dir/TestCFGLoopInfo.cpp.o
69.605 [3249/54/350] Building CXX object lib/Target/PowerPC/CMakeFiles/LLVMPowerPCCodeGen.dir/PPCTargetMachine.cpp.o
69.859 [3249/53/351] Building CXX object lib/Target/VE/CMakeFiles/LLVMVECodeGen.dir/VETargetMachine.cpp.o
70.068 [3249/52/352] Building CXX object lib/Target/RISCV/CMakeFiles/LLVMRISCVCodeGen.dir/RISCVTargetTransformInfo.cpp.o
70.139 [3249/51/353] Building CXX object lib/Target/PowerPC/CMakeFiles/LLVMPowerPCCodeGen.dir/PPCTargetTransformInfo.cpp.o
70.194 [3249/50/354] Building CXX object lib/Target/X86/CMakeFiles/LLVMX86CodeGen.dir/X86OptimizeLEAs.cpp.o
70.247 [3249/49/355] Building CXX object lib/Target/AMDGPU/CMakeFiles/LLVMAMDGPUCodeGen.dir/SIISelLowering.cpp.o
70.258 [3249/48/356] Building CXX object lib/Target/X86/CMakeFiles/LLVMX86CodeGen.dir/X86PreTileConfig.cpp.o
70.734 [3249/47/357] Building CXX object tools/mlir/lib/Analysis/CMakeFiles/obj.MLIRAnalysis.dir/CFGLoopInfo.cpp.o
70.774 [3249/46/358] Building CXX object tools/mlir/lib/Dialect/Bufferization/Transforms/CMakeFiles/obj.MLIRBufferizationTransforms.dir/BufferViewFlowAnalysis.cpp.o
FAILED: tools/mlir/lib/Dialect/Bufferization/Transforms/CMakeFiles/obj.MLIRBufferizationTransforms.dir/BufferViewFlowAnalysis.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/clang++ -DBUILD_EXAMPLES -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/build/buildbot/premerge-monolithic-linux/build/tools/mlir/lib/Dialect/Bufferization/Transforms -I/build/buildbot/premerge-monolithic-linux/llvm-project/mlir/lib/Dialect/Bufferization/Transforms -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/mlir/include -I/build/buildbot/premerge-monolithic-linux/build/tools/mlir/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 -Wundef -Werror=mismatched-tags -Werror=global-constructors -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT tools/mlir/lib/Dialect/Bufferization/Transforms/CMakeFiles/obj.MLIRBufferizationTransforms.dir/BufferViewFlowAnalysis.cpp.o -MF tools/mlir/lib/Dialect/Bufferization/Transforms/CMakeFiles/obj.MLIRBufferizationTransforms.dir/BufferViewFlowAnalysis.cpp.o.d -o tools/mlir/lib/Dialect/Bufferization/Transforms/CMakeFiles/obj.MLIRBufferizationTransforms.dir/BufferViewFlowAnalysis.cpp.o -c /build/buildbot/premerge-monolithic-linux/llvm-project/mlir/lib/Dialect/Bufferization/Transforms/BufferViewFlowAnalysis.cpp
In file included from /build/buildbot/premerge-monolithic-linux/llvm-project/mlir/lib/Dialect/Bufferization/Transforms/BufferViewFlowAnalysis.cpp:16:
/build/buildbot/premerge-monolithic-linux/llvm-project/llvm/include/llvm/ADT/SetOperations.h:109:20: error: no viable conversion from 'typename SmallPtrSet<Value, 16>::iterator' (aka 'SmallPtrSetIterator<mlir::Value>') to 'mlir::Value'
          S1.erase(SI);
                   ^~
/build/buildbot/premerge-monolithic-linux/llvm-project/mlir/lib/Dialect/Bufferization/Transforms/BufferViewFlowAnalysis.cpp:63:11: note: in instantiation of function template specialization 'llvm::set_subtract<llvm::SmallPtrSet<mlir::Value, 16>, llvm::SetVector<mlir::Value, llvm::SmallVector<mlir::Value, 0>, llvm::DenseSet<mlir::Value, llvm::DenseMapInfo<mlir::Value>>, 0>>' requested here

yuxuanchen1997 pushed a commit that referenced this pull request Jul 25, 2024
#98702)

If the subtrahend is larger, iterate the minuend set instead.

Noticed when subtracting a large set from a number of other smaller
sets for an upcoming MemProf change, this change makes that much faster.

I subsequently found a couple of callsites in one file that were calling
set_subtract with a vector subtrahend, which doesn't have the "count()"
interface. Add a separate helper for subtracting a vector.
yuxuanchen1997 pushed a commit that referenced this pull request Jul 25, 2024
…ger (NFC)" (#99386)

Summary:
Reverts #98702

This broke some mlir code and needs investigation.

Test Plan: 

Reviewers: 

Subscribers: 

Tasks: 

Tags: 


Differential Revision: https://phabricator.intern.facebook.com/D60250971
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants