From 0ddb6f28fa839bf0dd871500707c70c054a4e2c1 Mon Sep 17 00:00:00 2001 From: Hideto Ueno Date: Fri, 5 Jun 2026 16:52:20 -0700 Subject: [PATCH 1/6] Bump LLVM --- include/circt/Dialect/FIRRTL/FIRRTLAnnotations.h | 12 +----------- include/circt/Dialect/FIRRTL/FIRRTLOps.h | 4 ---- include/circt/Dialect/FIRRTL/FIRRTLTypes.h | 4 ---- .../Dialect/Synth/Analysis/LongestPathAnalysis.h | 7 +------ include/circt/Scheduling/DependenceIterator.h | 4 ---- include/circt/Scheduling/Problems.h | 10 ---------- include/circt/Support/FVInt.h | 4 ---- include/circt/Support/FieldRef.h | 3 --- include/circt/Support/InstanceGraph.h | 4 ---- lib/Conversion/DCToHW/DCToHW.cpp | 4 ++-- lib/Conversion/HandshakeToDC/HandshakeToDC.cpp | 2 +- lib/Conversion/ImportVerilog/ImportVerilog.cpp | 4 ---- lib/Conversion/SeqToSV/FirMemLowering.h | 5 ----- lib/Dialect/Arc/Transforms/ArcCanonicalizer.cpp | 4 ---- lib/Dialect/Arc/Transforms/FindInitialVectors.cpp | 7 ------- .../Calyx/Transforms/AffineParallelUnroll.cpp | 4 ---- lib/Dialect/DC/DCOps.cpp | 2 +- lib/Dialect/FIRRTL/Transforms/Dedup.cpp | 8 +------- lib/Dialect/FIRRTL/Transforms/InferResets.cpp | 3 --- lib/Dialect/FIRRTL/Transforms/InferWidths.cpp | 7 +------ lib/Dialect/FIRRTL/Transforms/ModuleSummary.cpp | 1 - lib/Dialect/LLHD/Transforms/DeseqUtils.h | 9 --------- lib/Dialect/LLHD/Transforms/Mem2Reg.cpp | 3 --- lib/Dialect/RTG/Transforms/ElaborationPass.cpp | 7 +------ lib/Dialect/SV/Transforms/HWCleanup.cpp | 5 ++--- lib/Dialect/Synth/Transforms/LowerVariadic.cpp | 5 ----- lib/Dialect/Synth/Transforms/StructuralHash.cpp | 5 ----- lib/Target/DebugInfo/EmitHGLDD.cpp | 1 - llvm | 2 +- 29 files changed, 12 insertions(+), 128 deletions(-) diff --git a/include/circt/Dialect/FIRRTL/FIRRTLAnnotations.h b/include/circt/Dialect/FIRRTL/FIRRTLAnnotations.h index 84a3ebdd6167..e425b5d343f5 100644 --- a/include/circt/Dialect/FIRRTL/FIRRTLAnnotations.h +++ b/include/circt/Dialect/FIRRTL/FIRRTLAnnotations.h @@ -369,7 +369,7 @@ struct AnnoTargetImpl { /// An annotation target is used to keep track of something that is targeted by /// an Annotation. struct AnnoTarget { - AnnoTarget(detail::AnnoTargetImpl impl = nullptr) : impl(impl){}; + AnnoTarget(detail::AnnoTargetImpl impl = nullptr) : impl(impl) {}; operator bool() const { return impl; } bool operator==(const AnnoTarget &other) const { return impl == other.impl; } @@ -485,11 +485,6 @@ struct DenseMapInfo { mlir::DictionaryAttr(static_cast( DenseMapInfo::getEmptyKey()))); } - static Annotation getTombstoneKey() { - return Annotation( - mlir::DictionaryAttr(static_cast( - llvm::DenseMapInfo::getTombstoneKey()))); - } static unsigned getHashValue(Annotation val) { return mlir::hash_value(val.getAttr()); } @@ -506,11 +501,6 @@ struct DenseMapInfo { auto i = DenseMapInfo::getEmptyKey(); return AnnoTarget(AnnoTargetImpl(o, i)); } - static AnnoTarget getTombstoneKey() { - auto *o = DenseMapInfo::getTombstoneKey(); - auto i = DenseMapInfo::getTombstoneKey(); - return AnnoTarget(AnnoTargetImpl(o, i)); - } static unsigned getHashValue(AnnoTarget val) { auto impl = val.getImpl(); return hash_combine(impl.getOp(), impl.getPortNo()); diff --git a/include/circt/Dialect/FIRRTL/FIRRTLOps.h b/include/circt/Dialect/FIRRTL/FIRRTLOps.h index 7ce884161399..1057cddd353e 100644 --- a/include/circt/Dialect/FIRRTL/FIRRTLOps.h +++ b/include/circt/Dialect/FIRRTL/FIRRTLOps.h @@ -237,10 +237,6 @@ struct DenseMapInfo { return FModuleOp::getFromOpaquePointer( DenseMapInfo::getEmptyKey()); } - static inline FModuleOp getTombstoneKey() { - return FModuleOp::getFromOpaquePointer( - DenseMapInfo::getTombstoneKey()); - } static unsigned getHashValue(const FModuleOp &val) { return DenseMapInfo::getHashValue(val); } diff --git a/include/circt/Dialect/FIRRTL/FIRRTLTypes.h b/include/circt/Dialect/FIRRTL/FIRRTLTypes.h index c579117511a1..4b0069ebbb2c 100644 --- a/include/circt/Dialect/FIRRTL/FIRRTLTypes.h +++ b/include/circt/Dialect/FIRRTL/FIRRTLTypes.h @@ -416,10 +416,6 @@ struct DenseMapInfo { auto pointer = llvm::DenseMapInfo::getEmptyKey(); return FIRRTLType(static_cast(pointer)); } - static FIRRTLType getTombstoneKey() { - auto pointer = llvm::DenseMapInfo::getTombstoneKey(); - return FIRRTLType(static_cast(pointer)); - } static unsigned getHashValue(FIRRTLType val) { return mlir::hash_value(val); } static bool isEqual(FIRRTLType LHS, FIRRTLType RHS) { return LHS == RHS; } }; diff --git a/include/circt/Dialect/Synth/Analysis/LongestPathAnalysis.h b/include/circt/Dialect/Synth/Analysis/LongestPathAnalysis.h index d3eecb0f31e9..060cb9976884 100644 --- a/include/circt/Dialect/Synth/Analysis/LongestPathAnalysis.h +++ b/include/circt/Dialect/Synth/Analysis/LongestPathAnalysis.h @@ -337,7 +337,7 @@ class IncrementalLongestPathAnalysis : private LongestPathAnalysis, // for computing statistics and CAPI. class LongestPathCollection { public: - LongestPathCollection(MLIRContext *ctx) : ctx(ctx){}; + LongestPathCollection(MLIRContext *ctx) : ctx(ctx) {}; const DataflowPath &getPath(unsigned index) const { return paths[index]; } MLIRContext *getContext() const { return ctx; } llvm::SmallVector paths; @@ -381,11 +381,6 @@ struct DenseMapInfo { auto [path, value, bitPos] = Info::getEmptyKey(); return Object(path, value, bitPos); } - - static Object getTombstoneKey() { - auto [path, value, bitPos] = Info::getTombstoneKey(); - return Object(path, value, bitPos); - } static llvm::hash_code getHashValue(Object object) { return Info::getHashValue( {object.instancePath, object.value, object.bitPos}); diff --git a/include/circt/Scheduling/DependenceIterator.h b/include/circt/Scheduling/DependenceIterator.h index 6486418bccdb..533bc77f1428 100644 --- a/include/circt/Scheduling/DependenceIterator.h +++ b/include/circt/Scheduling/DependenceIterator.h @@ -131,10 +131,6 @@ struct DenseMapInfo { static inline Dependence getEmptyKey() { return Dependence(DenseMapInfo::getEmptyKey(), nullptr); } - static inline Dependence getTombstoneKey() { - return Dependence(DenseMapInfo::getTombstoneKey(), - nullptr); - } static unsigned getHashValue(const Dependence &val) { return llvm::hash_value(val.getAsTuple()); } diff --git a/include/circt/Scheduling/Problems.h b/include/circt/Scheduling/Problems.h index bacdb4abbd5d..62a1d0c38918 100644 --- a/include/circt/Scheduling/Problems.h +++ b/include/circt/Scheduling/Problems.h @@ -581,11 +581,6 @@ struct DenseMapInfo { DenseMapInfo::getEmptyKey()); } - static inline circt::scheduling::Problem::OperatorType getTombstoneKey() { - return circt::scheduling::Problem::OperatorType{ - DenseMapInfo::getTombstoneKey()}; - } - static unsigned getHashValue(const circt::scheduling::Problem::OperatorType &val) { return DenseMapInfo::getHashValue(val.attr); @@ -604,11 +599,6 @@ struct DenseMapInfo { DenseMapInfo::getEmptyKey()); } - static inline circt::scheduling::Problem::ResourceType getTombstoneKey() { - return circt::scheduling::Problem::ResourceType( - DenseMapInfo::getTombstoneKey()); - } - static unsigned getHashValue(const circt::scheduling::Problem::ResourceType &val) { return DenseMapInfo::getHashValue(val.attr); diff --git a/include/circt/Support/FVInt.h b/include/circt/Support/FVInt.h index da486e37934d..dc6674ce64e0 100644 --- a/include/circt/Support/FVInt.h +++ b/include/circt/Support/FVInt.h @@ -728,10 +728,6 @@ struct DenseMapInfo { return circt::FVInt(DenseMapInfo::getEmptyKey()); } - static inline circt::FVInt getTombstoneKey() { - return circt::FVInt(DenseMapInfo::getTombstoneKey()); - } - static unsigned getHashValue(const circt::FVInt &Key); static bool isEqual(const circt::FVInt &LHS, const circt::FVInt &RHS) { diff --git a/include/circt/Support/FieldRef.h b/include/circt/Support/FieldRef.h index d97598ae5dc1..981c86231eb9 100644 --- a/include/circt/Support/FieldRef.h +++ b/include/circt/Support/FieldRef.h @@ -105,9 +105,6 @@ struct DenseMapInfo { static inline circt::FieldRef getEmptyKey() { return circt::FieldRef(DenseMapInfo::getEmptyKey(), 0); } - static inline circt::FieldRef getTombstoneKey() { - return circt::FieldRef(DenseMapInfo::getTombstoneKey(), 0); - } static unsigned getHashValue(const circt::FieldRef &val) { return circt::hash_value(val); } diff --git a/include/circt/Support/InstanceGraph.h b/include/circt/Support/InstanceGraph.h index a26cf5ddce77..5ba0d6b92065 100644 --- a/include/circt/Support/InstanceGraph.h +++ b/include/circt/Support/InstanceGraph.h @@ -590,10 +590,6 @@ struct llvm::DenseMapInfo { return circt::igraph::InstancePath(ArrayRefInfo::getEmptyKey()); } - static circt::igraph::InstancePath getTombstoneKey() { - return circt::igraph::InstancePath(ArrayRefInfo::getTombstoneKey()); - } - static llvm::hash_code getHashValue(circt::igraph::InstancePath path) { auto range = llvm::map_range(path, [](auto op) { return op.getAsOpaquePointer(); }); diff --git a/lib/Conversion/DCToHW/DCToHW.cpp b/lib/Conversion/DCToHW/DCToHW.cpp index bb55d9b5d745..e700f9323f10 100644 --- a/lib/Conversion/DCToHW/DCToHW.cpp +++ b/lib/Conversion/DCToHW/DCToHW.cpp @@ -85,7 +85,7 @@ static Type toESIHWType(Type t) { return esi::ChannelType::get(vt.getContext(), toHWType(vt.getInnerType())); }) - .Case([](TokenType tt) { + .Case([](dc::TokenType tt) { return esi::ChannelType::get(tt.getContext(), IntegerType::get(tt.getContext(), 0)); }) @@ -837,7 +837,7 @@ class BufferConversionPattern : public OpConversionPattern { } // namespace -static bool isDCType(Type type) { return isa(type); } +static bool isDCType(Type type) { return isa(type); } /// Returns true if the given `op` is considered as legal - i.e. it does not /// contain any dc-typed values. diff --git a/lib/Conversion/HandshakeToDC/HandshakeToDC.cpp b/lib/Conversion/HandshakeToDC/HandshakeToDC.cpp index c9344100f62e..3aadb1f4af45 100644 --- a/lib/Conversion/HandshakeToDC/HandshakeToDC.cpp +++ b/lib/Conversion/HandshakeToDC/HandshakeToDC.cpp @@ -95,7 +95,7 @@ class DCTypeConverter : public TypeConverter { return dc::ValueType::get(type.getContext(), type); }); addConversion([](ValueType type) { return type; }); - addConversion([](TokenType type) { return type; }); + addConversion([](dc::TokenType type) { return type; }); addTargetMaterialization([](mlir::OpBuilder &builder, mlir::Type resultType, mlir::ValueRange inputs, diff --git a/lib/Conversion/ImportVerilog/ImportVerilog.cpp b/lib/Conversion/ImportVerilog/ImportVerilog.cpp index e4988a4fc66f..905f123925dc 100644 --- a/lib/Conversion/ImportVerilog/ImportVerilog.cpp +++ b/lib/Conversion/ImportVerilog/ImportVerilog.cpp @@ -171,10 +171,6 @@ namespace llvm { template <> struct DenseMapInfo { static slang::BufferID getEmptyKey() { return slang::BufferID(); } - static slang::BufferID getTombstoneKey() { - return slang::BufferID(UINT32_MAX - 1, ""sv); - // UINT32_MAX is already used by `BufferID::getPlaceholder`. - } static unsigned getHashValue(slang::BufferID id) { return llvm::hash_value(id.getId()); } diff --git a/lib/Conversion/SeqToSV/FirMemLowering.h b/lib/Conversion/SeqToSV/FirMemLowering.h index edb9a80611ca..53fa4e240e63 100644 --- a/lib/Conversion/SeqToSV/FirMemLowering.h +++ b/lib/Conversion/SeqToSV/FirMemLowering.h @@ -122,11 +122,6 @@ struct DenseMapInfo { cfg.depth = DenseMapInfo::getEmptyKey(); return cfg; } - static inline circt::FirMemConfig getTombstoneKey() { - circt::FirMemConfig cfg; - cfg.depth = DenseMapInfo::getTombstoneKey(); - return cfg; - } static unsigned getHashValue(const circt::FirMemConfig &cfg) { return cfg.hashValue(); } diff --git a/lib/Dialect/Arc/Transforms/ArcCanonicalizer.cpp b/lib/Dialect/Arc/Transforms/ArcCanonicalizer.cpp index 43c678295abd..edaff9e171a9 100644 --- a/lib/Dialect/Arc/Transforms/ArcCanonicalizer.cpp +++ b/lib/Dialect/Arc/Transforms/ArcCanonicalizer.cpp @@ -739,10 +739,6 @@ struct DenseMapInfo> { return SmallVector(); } - static inline SmallVector getTombstoneKey() { - return SmallVector(); - } - static unsigned getHashValue(const SmallVector &inputs) { return hashValue(inputs); } diff --git a/lib/Dialect/Arc/Transforms/FindInitialVectors.cpp b/lib/Dialect/Arc/Transforms/FindInitialVectors.cpp index 7f3fd2785f45..cb8322516cb5 100644 --- a/lib/Dialect/Arc/Transforms/FindInitialVectors.cpp +++ b/lib/Dialect/Arc/Transforms/FindInitialVectors.cpp @@ -157,13 +157,6 @@ struct DenseMapInfo { DictionaryAttr()); } - static inline Key getTombstoneKey() { - static StringRef tombStoneKeyOpName = - DenseMapInfo::getTombstoneKey(); - return Key(1, tombStoneKeyOpName, SmallVector(), SmallVector(), - DictionaryAttr()); - } - static unsigned getHashValue(const Key &key) { return hash_value(std::get<0>(key)) ^ hash_value(std::get<1>(key)) ^ hash_value(std::get<2>(key)) ^ hash_value(std::get<3>(key)) ^ diff --git a/lib/Dialect/Calyx/Transforms/AffineParallelUnroll.cpp b/lib/Dialect/Calyx/Transforms/AffineParallelUnroll.cpp index 7abc8e2a1e77..abfd0b0894e5 100644 --- a/lib/Dialect/Calyx/Transforms/AffineParallelUnroll.cpp +++ b/lib/Dialect/Calyx/Transforms/AffineParallelUnroll.cpp @@ -56,10 +56,6 @@ struct DenseMapInfo { return {DenseMapInfo::getEmptyKey(), {}, {}}; } - static AffineAccessExpr getTombstoneKey() { - return {DenseMapInfo::getTombstoneKey(), {}, {}}; - } - static unsigned getHashValue(const AffineAccessExpr &expr) { unsigned h = DenseMapInfo::getHashValue(expr.memref); h = llvm::hash_combine(h, DenseMapInfo::getHashValue(expr.map)); diff --git a/lib/Dialect/DC/DCOps.cpp b/lib/Dialect/DC/DCOps.cpp index fe68625222d5..6ca54c2b9b90 100644 --- a/lib/Dialect/DC/DCOps.cpp +++ b/lib/Dialect/DC/DCOps.cpp @@ -350,7 +350,7 @@ LogicalResult UnpackOp::inferReturnTypes( DictionaryAttr attrs, mlir::PropertyRef properties, mlir::RegionRange regions, SmallVectorImpl &results) { auto inputType = cast(operands.front().getType()); - results.push_back(TokenType::get(context)); + results.push_back(dc::TokenType::get(context)); results.push_back(inputType.getInnerType()); return success(); } diff --git a/lib/Dialect/FIRRTL/Transforms/Dedup.cpp b/lib/Dialect/FIRRTL/Transforms/Dedup.cpp index 9da07e082a14..d02843d409b4 100644 --- a/lib/Dialect/FIRRTL/Transforms/Dedup.cpp +++ b/lib/Dialect/FIRRTL/Transforms/Dedup.cpp @@ -432,10 +432,6 @@ struct llvm::DenseMapInfo { return DenseMapInfo::getEmptyKey(); } - static inline ModuleInfoRef getTombstoneKey() { - return DenseMapInfo::getTombstoneKey(); - } - static unsigned getHashValue(const ModuleInfoRef &ref) { // We assume SHA256 is already a good hash and just truncate down to the // number of bytes we need for DenseMap. @@ -450,9 +446,7 @@ struct llvm::DenseMapInfo { static bool isEqual(const ModuleInfoRef &lhs, const ModuleInfoRef &rhs) { auto *empty = getEmptyKey().info; - auto *tombstone = getTombstoneKey().info; - if (lhs.info == empty || rhs.info == empty || lhs.info == tombstone || - rhs.info == tombstone) + if (lhs.info == empty || rhs.info == empty) return lhs.info == rhs.info; return *lhs.info == *rhs.info; } diff --git a/lib/Dialect/FIRRTL/Transforms/InferResets.cpp b/lib/Dialect/FIRRTL/Transforms/InferResets.cpp index e053b0a7c70c..38728d84c5f9 100644 --- a/lib/Dialect/FIRRTL/Transforms/InferResets.cpp +++ b/lib/Dialect/FIRRTL/Transforms/InferResets.cpp @@ -319,9 +319,6 @@ struct DenseMapInfo { static inline ResetSignal getEmptyKey() { return ResetSignal{DenseMapInfo::getEmptyKey(), {}}; } - static inline ResetSignal getTombstoneKey() { - return ResetSignal{DenseMapInfo::getTombstoneKey(), {}}; - } static unsigned getHashValue(const ResetSignal &x) { return circt::hash_value(x.field); } diff --git a/lib/Dialect/FIRRTL/Transforms/InferWidths.cpp b/lib/Dialect/FIRRTL/Transforms/InferWidths.cpp index 6e55d95ee86e..878cad68fe47 100644 --- a/lib/Dialect/FIRRTL/Transforms/InferWidths.cpp +++ b/lib/Dialect/FIRRTL/Transforms/InferWidths.cpp @@ -336,15 +336,10 @@ struct InternedSlotInfo : DenseMapInfo { auto *pointer = llvm::DenseMapInfo::getEmptyKey(); return static_cast(pointer); } - static T *getTombstoneKey() { - auto *pointer = llvm::DenseMapInfo::getTombstoneKey(); - return static_cast(pointer); - } static unsigned getHashValue(const T *val) { return mlir::hash_value(*val); } static bool isEqual(const T *lhs, const T *rhs) { auto empty = getEmptyKey(); - auto tombstone = getTombstoneKey(); - if (lhs == empty || rhs == empty || lhs == tombstone || rhs == tombstone) + if (lhs == empty || rhs == empty) return lhs == rhs; return *lhs == *rhs; } diff --git a/lib/Dialect/FIRRTL/Transforms/ModuleSummary.cpp b/lib/Dialect/FIRRTL/Transforms/ModuleSummary.cpp index da41cf079a9e..607b11c52ff2 100644 --- a/lib/Dialect/FIRRTL/Transforms/ModuleSummary.cpp +++ b/lib/Dialect/FIRRTL/Transforms/ModuleSummary.cpp @@ -104,7 +104,6 @@ template <> struct DenseMapInfo { using KeyTy = ModuleSummaryPass::KeyTy; static KeyTy getEmptyKey() { return {{}, ~0ULL}; } - static KeyTy getTombstoneKey() { return {{}, ~0ULL - 1}; } static unsigned getHashValue(const KeyTy &val) { return mlir::hash_value(val); } diff --git a/lib/Dialect/LLHD/Transforms/DeseqUtils.h b/lib/Dialect/LLHD/Transforms/DeseqUtils.h index 79418493e742..fc680baa5294 100644 --- a/lib/Dialect/LLHD/Transforms/DeseqUtils.h +++ b/lib/Dialect/LLHD/Transforms/DeseqUtils.h @@ -317,9 +317,6 @@ struct DenseMapInfo { static inline FixedValue getEmptyKey() { return FixedValue{DenseMapInfo::getEmptyKey(), false, false}; } - static inline FixedValue getTombstoneKey() { - return FixedValue{DenseMapInfo::getTombstoneKey(), false, false}; - } static unsigned getHashValue(const FixedValue &key) { return hash_value(key); } @@ -336,9 +333,6 @@ struct DenseMapInfo { static inline FixedValues getEmptyKey() { return {DenseMapInfo::getEmptyKey()}; } - static inline FixedValues getTombstoneKey() { - return {DenseMapInfo::getTombstoneKey()}; - } static unsigned getHashValue(const FixedValues &key) { return hash_value(key); } @@ -354,9 +348,6 @@ struct DenseMapInfo { static inline VF getEmptyKey() { return VF(DenseMapInfo::getEmptyKey(), ~0ULL); } - static inline VF getTombstoneKey() { - return VF(DenseMapInfo::getTombstoneKey(), ~0ULL - 1); - } static unsigned getHashValue(const VF &key) { return DenseMapInfo::getHashValue(key.value) ^ DenseMapInfo::getHashValue(key.fieldID) ^ diff --git a/lib/Dialect/LLHD/Transforms/Mem2Reg.cpp b/lib/Dialect/LLHD/Transforms/Mem2Reg.cpp index eb7d998b5505..996f0d31fbb3 100644 --- a/lib/Dialect/LLHD/Transforms/Mem2Reg.cpp +++ b/lib/Dialect/LLHD/Transforms/Mem2Reg.cpp @@ -185,9 +185,6 @@ struct llvm::DenseMapInfo { static DriveCondition getEmptyKey() { return DenseMapInfo::getEmptyKey(); } - static DriveCondition getTombstoneKey() { - return DenseMapInfo::getTombstoneKey(); - } static unsigned getHashValue(DriveCondition d) { return DenseMapInfo::getHashValue( d.conditionAndMode); diff --git a/lib/Dialect/RTG/Transforms/ElaborationPass.cpp b/lib/Dialect/RTG/Transforms/ElaborationPass.cpp index 6258e21bc2df..a111cbf3c8b4 100644 --- a/lib/Dialect/RTG/Transforms/ElaborationPass.cpp +++ b/lib/Dialect/RTG/Transforms/ElaborationPass.cpp @@ -137,7 +137,6 @@ namespace llvm { template <> struct DenseMapInfo { static inline unsigned getEmptyKey() { return false; } - static inline unsigned getTombstoneKey() { return true; } static unsigned getHashValue(const bool &val) { return val * 37U; } static bool isEqual(const bool &lhs, const bool &rhs) { return lhs == rhs; } @@ -174,10 +173,6 @@ struct StorageKeyInfo { return HashedStorage(0, DenseMapInfo::getEmptyKey()); } - static inline HashedStorage getTombstoneKey() { - return HashedStorage( - 0, DenseMapInfo::getTombstoneKey()); - } static inline unsigned getHashValue(const HashedStorage &key) { return key.hashcode; @@ -192,7 +187,7 @@ struct StorageKeyInfo { } static inline bool isEqual(const StorageTy &lhs, const HashedStorage &rhs) { - if (isEqual(rhs, getEmptyKey()) || isEqual(rhs, getTombstoneKey())) + if (isEqual(rhs, getEmptyKey())) return false; return lhs.isEqual(rhs.storage); diff --git a/lib/Dialect/SV/Transforms/HWCleanup.cpp b/lib/Dialect/SV/Transforms/HWCleanup.cpp index 941848fb83d3..c440ae429654 100644 --- a/lib/Dialect/SV/Transforms/HWCleanup.cpp +++ b/lib/Dialect/SV/Transforms/HWCleanup.cpp @@ -51,9 +51,8 @@ struct AlwaysLikeOpInfo : public llvm::DenseMapInfo { // Trivially the same. if (lhs == rhs) return true; - // Filter out tombstones and empty ops. - if (lhs == getTombstoneKey() || lhs == getEmptyKey() || - rhs == getTombstoneKey() || rhs == getEmptyKey()) + // Filter out empty ops. + if (lhs == getEmptyKey() || rhs == getEmptyKey()) return false; // Compare attributes. if (lhs->getName() != rhs->getName() || diff --git a/lib/Dialect/Synth/Transforms/LowerVariadic.cpp b/lib/Dialect/Synth/Transforms/LowerVariadic.cpp index dc1c56b1859d..1ef2665923c0 100644 --- a/lib/Dialect/Synth/Transforms/LowerVariadic.cpp +++ b/lib/Dialect/Synth/Transforms/LowerVariadic.cpp @@ -114,11 +114,6 @@ struct DenseMapInfo { return {{DenseMapInfo::getEmptyKey(), false}}; } - static OperandKey getTombstoneKey() { - // Return a vector containing the mlir::Value tombstone key - return {{DenseMapInfo::getTombstoneKey(), false}}; - } - static unsigned getHashValue(const OperandKey &val) { llvm::hash_code hash = 0; // Iteratively combine the hash of each pair in the vector diff --git a/lib/Dialect/Synth/Transforms/StructuralHash.cpp b/lib/Dialect/Synth/Transforms/StructuralHash.cpp index c8f074e2781e..bad93c5cc27a 100644 --- a/lib/Dialect/Synth/Transforms/StructuralHash.cpp +++ b/lib/Dialect/Synth/Transforms/StructuralHash.cpp @@ -65,11 +65,6 @@ struct llvm::DenseMapInfo { {}); } - static StructuralHashKey getTombstoneKey() { - return StructuralHashKey( - llvm::DenseMapInfo::getTombstoneKey(), {}); - } - static unsigned getHashValue(const StructuralHashKey &key) { auto hash = hash_value(key.opName); for (const auto &operand : key.operandPairs) diff --git a/lib/Target/DebugInfo/EmitHGLDD.cpp b/lib/Target/DebugInfo/EmitHGLDD.cpp index 2540a6dc19d4..195ec9bd9df4 100644 --- a/lib/Target/DebugInfo/EmitHGLDD.cpp +++ b/lib/Target/DebugInfo/EmitHGLDD.cpp @@ -105,7 +105,6 @@ namespace llvm { template <> struct DenseMapInfo { static JValue getEmptyKey() { return nullptr; } - static JValue getTombstoneKey() { return JArray({nullptr}); } static unsigned getHashValue(const JValue &x) { SmallString<128> buffer; llvm::raw_svector_ostream(buffer) << x; diff --git a/llvm b/llvm index fb8243f32c95..b7152ff7026a 160000 --- a/llvm +++ b/llvm @@ -1 +1 @@ -Subproject commit fb8243f32c955690ebdfdd32eb9aaaf0c391b648 +Subproject commit b7152ff7026a05282b6ae91ccf150ede0217b08a From a4022327dd1f489a54d69420c9b36640449e1e48 Mon Sep 17 00:00:00 2001 From: Hideto Ueno Date: Fri, 5 Jun 2026 21:00:38 -0700 Subject: [PATCH 2/6] Fix kanagawa error message --- test/Dialect/Kanagawa/inner_ref_errors.mlir | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Dialect/Kanagawa/inner_ref_errors.mlir b/test/Dialect/Kanagawa/inner_ref_errors.mlir index da46a89c93e2..f02d7921f47f 100644 --- a/test/Dialect/Kanagawa/inner_ref_errors.mlir +++ b/test/Dialect/Kanagawa/inner_ref_errors.mlir @@ -23,7 +23,7 @@ kanagawa.class sym @InvalidGetVar { %parent = kanagawa.path [ #kanagawa.step> ] - // expected-error @+1 {{'kanagawa.get_var' op result #0 must be memref of any type values, but got 'i32'}} + // expected-error @+1 {{'kanagawa.get_var' op result #0 must be memref of any non-token type values, but got 'i32'}} %var = kanagawa.get_var %parent, @var : !kanagawa.scoperef<@foo::@InvalidGetVar> -> i32 kanagawa.return } From 585363a215d5e3d0fd6bd3f73b924c5fa7728759 Mon Sep 17 00:00:00 2001 From: Hideto Ueno Date: Fri, 5 Jun 2026 21:14:30 -0700 Subject: [PATCH 3/6] [Scheduling] Fix DenseMap iteration --- lib/Scheduling/ChainingSupport.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/Scheduling/ChainingSupport.cpp b/lib/Scheduling/ChainingSupport.cpp index 531f0e15f475..c29e6a7220b7 100644 --- a/lib/Scheduling/ChainingSupport.cpp +++ b/lib/Scheduling/ChainingSupport.cpp @@ -73,18 +73,22 @@ LogicalResult scheduling::computeChainBreakingDependences( // All chains/accumulated delays incoming at `op` are now known. auto opr = *prob.getLinkedOperatorType(op); + // Collect the chains that need to be broken. + SmallVector chainsToBreak; for (auto incomingChain : chains[op]) { Operation *origin = incomingChain.first; float delay = incomingChain.second; // Check whether `op` could be appended to the incoming chain without // violating the cycle time constraint. if (delay + *prob.getIncomingDelay(opr) > cycleTime) { - // If not, add a chain-breaking auxiliary dep ... - result.emplace_back(origin, op); - // ... and end the chain here. - chains[op].erase(origin); + chainsToBreak.push_back(origin); } } + // Break the chains and add the auxiliary dependences. + for (Operation *origin : chainsToBreak) { + result.emplace_back(origin, op); + chains[op].erase(origin); + } return success(); }); From 64cc1ad69c21f47e59926fc779ccc240e55d7bd6 Mon Sep 17 00:00:00 2001 From: Hideto Ueno Date: Fri, 5 Jun 2026 23:53:06 -0700 Subject: [PATCH 4/6] Fix NLATable DenseMap usage --- include/circt/Dialect/FIRRTL/NLATable.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/include/circt/Dialect/FIRRTL/NLATable.h b/include/circt/Dialect/FIRRTL/NLATable.h index 7fff7537a480..552a0a128ce1 100644 --- a/include/circt/Dialect/FIRRTL/NLATable.h +++ b/include/circt/Dialect/FIRRTL/NLATable.h @@ -83,10 +83,7 @@ class NLATable { // Handle the case when there are more than one Instances for the same // target module. Getting the `commonNLA`, in that case is not enough, // remove the NLAs that donot have the InstanceOp as the innerSym. - for (auto nla : llvm::make_early_inc_range(nlas)) { - if (!nla.hasInnerSym(mod, instSym)) - nlas.erase(nla); - } + nlas.remove_if([&](auto nla) { return !nla.hasInnerSym(mod, instSym); }); } /// Get the NLAs that the module `modName` particiaptes in, and insert them From d23f8598ad42838f517f97a8a1cfb8f67ec7683d Mon Sep 17 00:00:00 2001 From: Hideto Ueno Date: Fri, 5 Jun 2026 23:59:23 -0700 Subject: [PATCH 5/6] Fix LLHD usage --- lib/Dialect/LLHD/Transforms/Mem2Reg.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/Dialect/LLHD/Transforms/Mem2Reg.cpp b/lib/Dialect/LLHD/Transforms/Mem2Reg.cpp index 996f0d31fbb3..cce8e92209a6 100644 --- a/lib/Dialect/LLHD/Transforms/Mem2Reg.cpp +++ b/lib/Dialect/LLHD/Transforms/Mem2Reg.cpp @@ -946,9 +946,10 @@ void Promoter::findPromotableSlots() { // Populate `promotable` with the slots and projections we are promoting. promotable.insert(slots.begin(), slots.end()); - for (auto [projection, slot] : llvm::make_early_inc_range(projections)) - if (!promotable.contains(slot)) - projections.erase(projection); + projections.remove_if([&](auto elem) { + auto [projection, slot] = elem; + return !promotable.contains(slot); + }); for (auto [projection, slot] : projections) promotable.insert(projection); From 8f414e6c2aaabb7fee8a668ec8b8e63b3265a70d Mon Sep 17 00:00:00 2001 From: Hideto Ueno Date: Sat, 6 Jun 2026 00:01:04 -0700 Subject: [PATCH 6/6] Format --- include/circt/Dialect/FIRRTL/FIRRTLAnnotations.h | 2 +- include/circt/Dialect/Synth/Analysis/LongestPathAnalysis.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/circt/Dialect/FIRRTL/FIRRTLAnnotations.h b/include/circt/Dialect/FIRRTL/FIRRTLAnnotations.h index e425b5d343f5..2274288032cc 100644 --- a/include/circt/Dialect/FIRRTL/FIRRTLAnnotations.h +++ b/include/circt/Dialect/FIRRTL/FIRRTLAnnotations.h @@ -369,7 +369,7 @@ struct AnnoTargetImpl { /// An annotation target is used to keep track of something that is targeted by /// an Annotation. struct AnnoTarget { - AnnoTarget(detail::AnnoTargetImpl impl = nullptr) : impl(impl) {}; + AnnoTarget(detail::AnnoTargetImpl impl = nullptr) : impl(impl){}; operator bool() const { return impl; } bool operator==(const AnnoTarget &other) const { return impl == other.impl; } diff --git a/include/circt/Dialect/Synth/Analysis/LongestPathAnalysis.h b/include/circt/Dialect/Synth/Analysis/LongestPathAnalysis.h index 060cb9976884..d8e04c17db22 100644 --- a/include/circt/Dialect/Synth/Analysis/LongestPathAnalysis.h +++ b/include/circt/Dialect/Synth/Analysis/LongestPathAnalysis.h @@ -337,7 +337,7 @@ class IncrementalLongestPathAnalysis : private LongestPathAnalysis, // for computing statistics and CAPI. class LongestPathCollection { public: - LongestPathCollection(MLIRContext *ctx) : ctx(ctx) {}; + LongestPathCollection(MLIRContext *ctx) : ctx(ctx){}; const DataflowPath &getPath(unsigned index) const { return paths[index]; } MLIRContext *getContext() const { return ctx; } llvm::SmallVector paths;