Skip to content
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

[NFC] Switch a number of DenseMaps to SmallDenseMaps for speedup #109417

Merged
merged 3 commits into from
Sep 25, 2024

Conversation

jmorse
Copy link
Member

@jmorse jmorse commented Sep 20, 2024

tl;dr, if we use SmallDenseMaps instead of DenseMaps at these locations, we get a substantial speedup because there's less spurious malloc traffic:

https://llvm-compile-time-tracker.com/compare.php?from=983635c014767a2a37f87a4b564b59a78b866154&to=1198cb4aa9c1715d18212a21328801b6985b8ca7&stat=instructions:u

Background: inspired by @SLTozer 's introspective collection of stacktraces for some debug-info things, I've instrumented DenseMap to print where it was allocated and the max number of elements it contained. Run over CTMark and with the addition of some filtering, this has picked out the locations in LLVM where we allocate a DenseMap hashtable off the heap but we could instead get away with using the inline buckets of a SmallDenseMap and avoid calling malloc. I picked 16 inline elements at callsites which occasionally have more than 12 elements inserted, and four inline elements for some callsites where there typically aren't any elements inserted.

One drawback of this technique is that it's fully tuned to making the compile-time-tracker happy, so might not be representative in general. Counterpoints would be that CTMark is chosen to have a range of different inputs and is vaguely representative, avoiding allocations is almost always a win, and in scenarios where we will /always/ insert at least one element it makes sense to spend a little stack memory to avoid that.

(I've got two more patches that contribute another ~0.3% speedup, but it's now hit diminishing returns).

Some instrumentation of densemap allocations has indicated that these are
the variables that most often are filled by a small number of elements,
and thus will benefit the most from having inline elements. I picked 16
inline elements at callsites which occasionally have more than 12 elements
inserted, four inline elements for callsites where there typically aren't
any elements inserted.
@llvmbot
Copy link
Collaborator

llvmbot commented Sep 20, 2024

@llvm/pr-subscribers-llvm-analysis
@llvm/pr-subscribers-llvm-selectiondag

@llvm/pr-subscribers-llvm-transforms

Author: Jeremy Morse (jmorse)

Changes

tl;dr, if we use SmallDenseMaps instead of DenseMaps at these locations, we get a substantial speedup because there's less spurious malloc traffic:

https://llvm-compile-time-tracker.com/compare.php?from=983635c014767a2a37f87a4b564b59a78b866154&to=1198cb4aa9c1715d18212a21328801b6985b8ca7&stat=instructions:u

Background: inspired by @SLTozer 's introspective collection of stacktraces for some debug-info things, I've instrumented DenseMap to print where it was allocated and the max number of elements it contained. Run over CTMark and with the addition of some filtering, this has picked out the locations in LLVM where we allocate a DenseMap hashtable off the heap but we could instead get away with using the inline buckets of a SmallDenseMap and avoid calling malloc. I picked 16 inline elements at callsites which occasionally have more than 12 elements inserted, and four inline elements for some callsites where there typically aren't any elements inserted.

One drawback of this technique is that it's fully tuned to making the compile-time-tracker happy, so might not be representative in general. Counterpoints would be that CTMark is chosen to have a range of different inputs and is vaguely representative, avoiding allocations is almost always a win, and in scenarios where we will /always/ insert at least one element it makes sense to spend a little stack memory to avoid that.

(I've got two more patches that contribute another ~0.3% speedup, but it's now hit diminishing returns).


Patch is 32.79 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/109417.diff

14 Files Affected:

  • (modified) llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h (+1-1)
  • (modified) llvm/include/llvm/Analysis/SparsePropagation.h (+3-3)
  • (modified) llvm/lib/Analysis/MemoryDependenceAnalysis.cpp (+2-2)
  • (modified) llvm/lib/Analysis/ScalarEvolution.cpp (+2-2)
  • (modified) llvm/lib/CodeGen/CalcSpillWeights.cpp (+1-1)
  • (modified) llvm/lib/CodeGen/MachineLICM.cpp (+5-5)
  • (modified) llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp (+17-17)
  • (modified) llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h (+18-17)
  • (modified) llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp (+1-1)
  • (modified) llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp (+6-6)
  • (modified) llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h (+1-1)
  • (modified) llvm/lib/Transforms/IPO/CalledValuePropagation.cpp (+7-7)
  • (modified) llvm/lib/Transforms/Utils/BasicBlockUtils.cpp (+2-2)
  • (modified) llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp (+4-4)
diff --git a/llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h b/llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h
index decb33e6af6bcb..c31e663498d5f3 100644
--- a/llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h
+++ b/llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h
@@ -492,7 +492,7 @@ class MemoryDependenceResults {
                                    const MemoryLocation &Loc, bool isLoad,
                                    BasicBlock *BB,
                                    SmallVectorImpl<NonLocalDepResult> &Result,
-                                   DenseMap<BasicBlock *, Value *> &Visited,
+                                   SmallDenseMap<BasicBlock *, Value *, 16> &Visited,
                                    bool SkipFirstBlock = false,
                                    bool IsIncomplete = false);
   MemDepResult getNonLocalInfoForBlock(Instruction *QueryInst,
diff --git a/llvm/include/llvm/Analysis/SparsePropagation.h b/llvm/include/llvm/Analysis/SparsePropagation.h
index d5805a7314757f..194f4787a8de91 100644
--- a/llvm/include/llvm/Analysis/SparsePropagation.h
+++ b/llvm/include/llvm/Analysis/SparsePropagation.h
@@ -89,7 +89,7 @@ template <class LatticeKey, class LatticeVal> class AbstractLatticeFunction {
   /// \p ChangedValues.
   virtual void
   ComputeInstructionState(Instruction &I,
-                          DenseMap<LatticeKey, LatticeVal> &ChangedValues,
+                          SmallDenseMap<LatticeKey, LatticeVal, 16> &ChangedValues,
                           SparseSolver<LatticeKey, LatticeVal> &SS) = 0;
 
   /// PrintLatticeVal - Render the given LatticeVal to the specified stream.
@@ -401,7 +401,7 @@ void SparseSolver<LatticeKey, LatticeVal, KeyInfo>::visitPHINode(PHINode &PN) {
   // computed from its incoming values.  For example, SSI form stores its sigma
   // functions as PHINodes with a single incoming value.
   if (LatticeFunc->IsSpecialCasedPHI(&PN)) {
-    DenseMap<LatticeKey, LatticeVal> ChangedValues;
+    SmallDenseMap<LatticeKey, LatticeVal, 16> ChangedValues;
     LatticeFunc->ComputeInstructionState(PN, ChangedValues, *this);
     for (auto &ChangedValue : ChangedValues)
       if (ChangedValue.second != LatticeFunc->getUntrackedVal())
@@ -456,7 +456,7 @@ void SparseSolver<LatticeKey, LatticeVal, KeyInfo>::visitInst(Instruction &I) {
 
   // Otherwise, ask the transfer function what the result is.  If this is
   // something that we care about, remember it.
-  DenseMap<LatticeKey, LatticeVal> ChangedValues;
+  SmallDenseMap<LatticeKey, LatticeVal, 16> ChangedValues;
   LatticeFunc->ComputeInstructionState(I, ChangedValues, *this);
   for (auto &ChangedValue : ChangedValues)
     if (ChangedValue.second != LatticeFunc->getUntrackedVal())
diff --git a/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp b/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
index 79504ca7b73c8f..c5fba184cd0850 100644
--- a/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
+++ b/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
@@ -888,7 +888,7 @@ void MemoryDependenceResults::getNonLocalPointerDependency(
   // each block.  Because of critical edges, we currently bail out if querying
   // a block with multiple different pointers.  This can happen during PHI
   // translation.
-  DenseMap<BasicBlock *, Value *> Visited;
+  SmallDenseMap<BasicBlock *, Value *, 16> Visited;
   if (getNonLocalPointerDepFromBB(QueryInst, Address, Loc, isLoad, FromBB,
                                    Result, Visited, true))
     return;
@@ -1038,7 +1038,7 @@ bool MemoryDependenceResults::getNonLocalPointerDepFromBB(
     Instruction *QueryInst, const PHITransAddr &Pointer,
     const MemoryLocation &Loc, bool isLoad, BasicBlock *StartBB,
     SmallVectorImpl<NonLocalDepResult> &Result,
-    DenseMap<BasicBlock *, Value *> &Visited, bool SkipFirstBlock,
+    SmallDenseMap<BasicBlock *, Value *, 16> &Visited, bool SkipFirstBlock,
     bool IsIncomplete) {
   // Look up the cached info for Pointer.
   ValueIsLoadPair CacheKey(Pointer.getAddr(), isLoad);
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index 1d3443588ce60d..b2c2944c57978d 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -2255,7 +2255,7 @@ const SCEV *ScalarEvolution::getAnyExtendExpr(const SCEV *Op,
 /// the common case where no interesting opportunities are present, and
 /// is also used as a check to avoid infinite recursion.
 static bool
-CollectAddOperandsWithScales(DenseMap<const SCEV *, APInt> &M,
+CollectAddOperandsWithScales(SmallDenseMap<const SCEV *, APInt, 16> &M,
                              SmallVectorImpl<const SCEV *> &NewOps,
                              APInt &AccumulatedConstant,
                              ArrayRef<const SCEV *> Ops, const APInt &Scale,
@@ -2753,7 +2753,7 @@ const SCEV *ScalarEvolution::getAddExpr(SmallVectorImpl<const SCEV *> &Ops,
   // operands multiplied by constant values.
   if (Idx < Ops.size() && isa<SCEVMulExpr>(Ops[Idx])) {
     uint64_t BitWidth = getTypeSizeInBits(Ty);
-    DenseMap<const SCEV *, APInt> M;
+    SmallDenseMap<const SCEV *, APInt, 16> M;
     SmallVector<const SCEV *, 8> NewOps;
     APInt AccumulatedConstant(BitWidth, 0);
     if (CollectAddOperandsWithScales(M, NewOps, AccumulatedConstant,
diff --git a/llvm/lib/CodeGen/CalcSpillWeights.cpp b/llvm/lib/CodeGen/CalcSpillWeights.cpp
index 9d8c9119f7719d..88ed2291313c95 100644
--- a/llvm/lib/CodeGen/CalcSpillWeights.cpp
+++ b/llvm/lib/CodeGen/CalcSpillWeights.cpp
@@ -222,7 +222,7 @@ float VirtRegAuxInfo::weightCalcHelper(LiveInterval &LI, SlotIndex *Start,
 
   bool IsExiting = false;
   std::set<CopyHint> CopyHints;
-  DenseMap<unsigned, float> Hint;
+  SmallDenseMap<unsigned, float, 8> Hint;
   for (MachineRegisterInfo::reg_instr_nodbg_iterator
            I = MRI.reg_instr_nodbg_begin(LI.reg()),
            E = MRI.reg_instr_nodbg_end();
diff --git a/llvm/lib/CodeGen/MachineLICM.cpp b/llvm/lib/CodeGen/MachineLICM.cpp
index 6768eeeb4364c8..c1f3d5ac4ff957 100644
--- a/llvm/lib/CodeGen/MachineLICM.cpp
+++ b/llvm/lib/CodeGen/MachineLICM.cpp
@@ -239,7 +239,7 @@ namespace {
 
     bool IsCheapInstruction(MachineInstr &MI) const;
 
-    bool CanCauseHighRegPressure(const DenseMap<unsigned, int> &Cost,
+    bool CanCauseHighRegPressure(const SmallDenseMap<unsigned, int> &Cost,
                                  bool Cheap);
 
     void UpdateBackTraceRegPressure(const MachineInstr *MI);
@@ -264,7 +264,7 @@ namespace {
 
     void InitRegPressure(MachineBasicBlock *BB);
 
-    DenseMap<unsigned, int> calcRegisterCost(const MachineInstr *MI,
+    SmallDenseMap<unsigned, int> calcRegisterCost(const MachineInstr *MI,
                                              bool ConsiderSeen,
                                              bool ConsiderUnseenAsDef);
 
@@ -977,10 +977,10 @@ void MachineLICMImpl::UpdateRegPressure(const MachineInstr *MI,
 /// If 'ConsiderSeen' is true, updates 'RegSeen' and uses the information to
 /// figure out which usages are live-ins.
 /// FIXME: Figure out a way to consider 'RegSeen' from all code paths.
-DenseMap<unsigned, int>
+SmallDenseMap<unsigned, int>
 MachineLICMImpl::calcRegisterCost(const MachineInstr *MI, bool ConsiderSeen,
                                   bool ConsiderUnseenAsDef) {
-  DenseMap<unsigned, int> Cost;
+  SmallDenseMap<unsigned, int> Cost;
   if (MI->isImplicitDef())
     return Cost;
   for (unsigned i = 0, e = MI->getDesc().getNumOperands(); i != e; ++i) {
@@ -1248,7 +1248,7 @@ bool MachineLICMImpl::IsCheapInstruction(MachineInstr &MI) const {
 /// Visit BBs from header to current BB, check if hoisting an instruction of the
 /// given cost matrix can cause high register pressure.
 bool MachineLICMImpl::CanCauseHighRegPressure(
-    const DenseMap<unsigned, int> &Cost, bool CheapInstr) {
+    const SmallDenseMap<unsigned, int>& Cost, bool CheapInstr) {
   for (const auto &RPIdAndCost : Cost) {
     if (RPIdAndCost.second <= 0)
       continue;
diff --git a/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp b/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
index 53ce21906204c8..738319d44d2a53 100644
--- a/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
@@ -83,7 +83,7 @@ static unsigned countOperands(SDNode *Node, unsigned NumExpUses,
 /// implicit physical register output.
 void InstrEmitter::EmitCopyFromReg(SDNode *Node, unsigned ResNo, bool IsClone,
                                    Register SrcReg,
-                                   DenseMap<SDValue, Register> &VRBaseMap) {
+                                   VRBaseMapType &VRBaseMap) {
   Register VRBase;
   if (SrcReg.isVirtual()) {
     // Just use the input register directly!
@@ -187,7 +187,7 @@ void InstrEmitter::CreateVirtualRegisters(SDNode *Node,
                                        MachineInstrBuilder &MIB,
                                        const MCInstrDesc &II,
                                        bool IsClone, bool IsCloned,
-                                       DenseMap<SDValue, Register> &VRBaseMap) {
+                                       VRBaseMapType &VRBaseMap) {
   assert(Node->getMachineOpcode() != TargetOpcode::IMPLICIT_DEF &&
          "IMPLICIT_DEF should have been handled as a special case elsewhere!");
 
@@ -266,7 +266,7 @@ void InstrEmitter::CreateVirtualRegisters(SDNode *Node,
 /// getVR - Return the virtual register corresponding to the specified result
 /// of the specified node.
 Register InstrEmitter::getVR(SDValue Op,
-                             DenseMap<SDValue, Register> &VRBaseMap) {
+                             VRBaseMapType &VRBaseMap) {
   if (Op.isMachineOpcode() &&
       Op.getMachineOpcode() == TargetOpcode::IMPLICIT_DEF) {
     // Add an IMPLICIT_DEF instruction before every use.
@@ -280,7 +280,7 @@ Register InstrEmitter::getVR(SDValue Op,
     return VReg;
   }
 
-  DenseMap<SDValue, Register>::iterator I = VRBaseMap.find(Op);
+  VRBaseMapType::iterator I = VRBaseMap.find(Op);
   assert(I != VRBaseMap.end() && "Node emitted out of order - late");
   return I->second;
 }
@@ -318,7 +318,7 @@ InstrEmitter::AddRegisterOperand(MachineInstrBuilder &MIB,
                                  SDValue Op,
                                  unsigned IIOpNum,
                                  const MCInstrDesc *II,
-                                 DenseMap<SDValue, Register> &VRBaseMap,
+                                 VRBaseMapType &VRBaseMap,
                                  bool IsDebug, bool IsClone, bool IsCloned) {
   assert(Op.getValueType() != MVT::Other &&
          Op.getValueType() != MVT::Glue &&
@@ -399,7 +399,7 @@ void InstrEmitter::AddOperand(MachineInstrBuilder &MIB,
                               SDValue Op,
                               unsigned IIOpNum,
                               const MCInstrDesc *II,
-                              DenseMap<SDValue, Register> &VRBaseMap,
+                              VRBaseMapType &VRBaseMap,
                               bool IsDebug, bool IsClone, bool IsCloned) {
   if (Op.isMachineOpcode()) {
     AddRegisterOperand(MIB, Op, IIOpNum, II, VRBaseMap,
@@ -500,7 +500,7 @@ Register InstrEmitter::ConstrainForSubReg(Register VReg, unsigned SubIdx,
 /// EmitSubregNode - Generate machine code for subreg nodes.
 ///
 void InstrEmitter::EmitSubregNode(SDNode *Node,
-                                  DenseMap<SDValue, Register> &VRBaseMap,
+                                  VRBaseMapType &VRBaseMap,
                                   bool IsClone, bool IsCloned) {
   Register VRBase;
   unsigned Opc = Node->getMachineOpcode();
@@ -634,7 +634,7 @@ void InstrEmitter::EmitSubregNode(SDNode *Node,
 ///
 void
 InstrEmitter::EmitCopyToRegClassNode(SDNode *Node,
-                                     DenseMap<SDValue, Register> &VRBaseMap) {
+                                     VRBaseMapType &VRBaseMap) {
   Register VReg = getVR(Node->getOperand(0), VRBaseMap);
 
   // Create the new VReg in the destination class and emit a copy.
@@ -654,7 +654,7 @@ InstrEmitter::EmitCopyToRegClassNode(SDNode *Node,
 /// EmitRegSequence - Generate machine code for REG_SEQUENCE nodes.
 ///
 void InstrEmitter::EmitRegSequence(SDNode *Node,
-                                  DenseMap<SDValue, Register> &VRBaseMap,
+                                  VRBaseMapType &VRBaseMap,
                                   bool IsClone, bool IsCloned) {
   unsigned DstRCIdx = Node->getConstantOperandVal(0);
   const TargetRegisterClass *RC = TRI->getRegClass(DstRCIdx);
@@ -703,7 +703,7 @@ void InstrEmitter::EmitRegSequence(SDNode *Node,
 ///
 MachineInstr *
 InstrEmitter::EmitDbgValue(SDDbgValue *SD,
-                           DenseMap<SDValue, Register> &VRBaseMap) {
+                           VRBaseMapType &VRBaseMap) {
   DebugLoc DL = SD->getDebugLoc();
   assert(cast<DILocalVariable>(SD->getVariable())
              ->isValidLocationForIntrinsic(DL) &&
@@ -755,7 +755,7 @@ MachineOperand GetMOForConstDbgOp(const SDDbgOperand &Op) {
 void InstrEmitter::AddDbgValueLocationOps(
     MachineInstrBuilder &MIB, const MCInstrDesc &DbgValDesc,
     ArrayRef<SDDbgOperand> LocationOps,
-    DenseMap<SDValue, Register> &VRBaseMap) {
+    VRBaseMapType &VRBaseMap) {
   for (const SDDbgOperand &Op : LocationOps) {
     switch (Op.getKind()) {
     case SDDbgOperand::FRAMEIX:
@@ -786,7 +786,7 @@ void InstrEmitter::AddDbgValueLocationOps(
 
 MachineInstr *
 InstrEmitter::EmitDbgInstrRef(SDDbgValue *SD,
-                              DenseMap<SDValue, Register> &VRBaseMap) {
+                              VRBaseMapType &VRBaseMap) {
   MDNode *Var = SD->getVariable();
   const DIExpression *Expr = (DIExpression *)SD->getExpression();
   DebugLoc DL = SD->getDebugLoc();
@@ -862,7 +862,7 @@ InstrEmitter::EmitDbgInstrRef(SDDbgValue *SD,
       // Look up the corresponding VReg for the given SDNode, if any.
       SDNode *Node = DbgOperand.getSDNode();
       SDValue Op = SDValue(Node, DbgOperand.getResNo());
-      DenseMap<SDValue, Register>::iterator I = VRBaseMap.find(Op);
+      VRBaseMapType::iterator I = VRBaseMap.find(Op);
       // No VReg -> produce a DBG_VALUE $noreg instead.
       if (I == VRBaseMap.end())
         break;
@@ -928,7 +928,7 @@ MachineInstr *InstrEmitter::EmitDbgNoLocation(SDDbgValue *SD) {
 
 MachineInstr *
 InstrEmitter::EmitDbgValueList(SDDbgValue *SD,
-                               DenseMap<SDValue, Register> &VRBaseMap) {
+                               VRBaseMapType &VRBaseMap) {
   MDNode *Var = SD->getVariable();
   DIExpression *Expr = SD->getExpression();
   DebugLoc DL = SD->getDebugLoc();
@@ -944,7 +944,7 @@ InstrEmitter::EmitDbgValueList(SDDbgValue *SD,
 
 MachineInstr *
 InstrEmitter::EmitDbgValueFromSingleOp(SDDbgValue *SD,
-                                       DenseMap<SDValue, Register> &VRBaseMap) {
+                                       VRBaseMapType &VRBaseMap) {
   MDNode *Var = SD->getVariable();
   DIExpression *Expr = SD->getExpression();
   DebugLoc DL = SD->getDebugLoc();
@@ -996,7 +996,7 @@ InstrEmitter::EmitDbgLabel(SDDbgLabel *SD) {
 ///
 void InstrEmitter::
 EmitMachineNode(SDNode *Node, bool IsClone, bool IsCloned,
-                DenseMap<SDValue, Register> &VRBaseMap) {
+                VRBaseMapType &VRBaseMap) {
   unsigned Opc = Node->getMachineOpcode();
 
   // Handle subreg insert/extract specially
@@ -1238,7 +1238,7 @@ EmitMachineNode(SDNode *Node, bool IsClone, bool IsCloned,
 /// needed dependencies.
 void InstrEmitter::
 EmitSpecialNode(SDNode *Node, bool IsClone, bool IsCloned,
-                DenseMap<SDValue, Register> &VRBaseMap) {
+                VRBaseMapType &VRBaseMap) {
   switch (Node->getOpcode()) {
   default:
 #ifndef NDEBUG
diff --git a/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h b/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h
index 959bce31c8b278..fcfcaa8d35b848 100644
--- a/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h
+++ b/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h
@@ -30,6 +30,8 @@ class TargetLowering;
 class TargetMachine;
 
 class LLVM_LIBRARY_VISIBILITY InstrEmitter {
+  using VRBaseMapType = SmallDenseMap<SDValue, Register, 16>;
+
   MachineFunction *MF;
   MachineRegisterInfo *MRI;
   const TargetInstrInfo *TII;
@@ -45,18 +47,17 @@ class LLVM_LIBRARY_VISIBILITY InstrEmitter {
   /// EmitCopyFromReg - Generate machine code for an CopyFromReg node or an
   /// implicit physical register output.
   void EmitCopyFromReg(SDNode *Node, unsigned ResNo, bool IsClone,
-                       Register SrcReg, DenseMap<SDValue, Register> &VRBaseMap);
+                       Register SrcReg, VRBaseMapType &VRBaseMap);
 
   void CreateVirtualRegisters(SDNode *Node,
                               MachineInstrBuilder &MIB,
                               const MCInstrDesc &II,
                               bool IsClone, bool IsCloned,
-                              DenseMap<SDValue, Register> &VRBaseMap);
+                              VRBaseMapType &VRBaseMap);
 
   /// getVR - Return the virtual register corresponding to the specified result
   /// of the specified node.
-  Register getVR(SDValue Op,
-                 DenseMap<SDValue, Register> &VRBaseMap);
+  Register getVR(SDValue Op, VRBaseMapType &VRBaseMap);
 
   /// AddRegisterOperand - Add the specified register as an operand to the
   /// specified machine instr. Insert register copies if the register is
@@ -65,7 +66,7 @@ class LLVM_LIBRARY_VISIBILITY InstrEmitter {
                           SDValue Op,
                           unsigned IIOpNum,
                           const MCInstrDesc *II,
-                          DenseMap<SDValue, Register> &VRBaseMap,
+                          VRBaseMapType &VRBaseMap,
                           bool IsDebug, bool IsClone, bool IsCloned);
 
   /// AddOperand - Add the specified operand to the specified machine instr.  II
@@ -76,7 +77,7 @@ class LLVM_LIBRARY_VISIBILITY InstrEmitter {
                   SDValue Op,
                   unsigned IIOpNum,
                   const MCInstrDesc *II,
-                  DenseMap<SDValue, Register> &VRBaseMap,
+                  VRBaseMapType &VRBaseMap,
                   bool IsDebug, bool IsClone, bool IsCloned);
 
   /// ConstrainForSubReg - Try to constrain VReg to a register class that
@@ -87,7 +88,7 @@ class LLVM_LIBRARY_VISIBILITY InstrEmitter {
 
   /// EmitSubregNode - Generate machine code for subreg nodes.
   ///
-  void EmitSubregNode(SDNode *Node, DenseMap<SDValue, Register> &VRBaseMap,
+  void EmitSubregNode(SDNode *Node, VRBaseMapType &VRBaseMap,
                       bool IsClone, bool IsCloned);
 
   /// EmitCopyToRegClassNode - Generate machine code for COPY_TO_REGCLASS nodes.
@@ -95,11 +96,11 @@ class LLVM_LIBRARY_VISIBILITY InstrEmitter {
   /// register is constrained to be in a particular register class.
   ///
   void EmitCopyToRegClassNode(SDNode *Node,
-                              DenseMap<SDValue, Register> &VRBaseMap);
+                              VRBaseMapType &VRBaseMap);
 
   /// EmitRegSequence - Generate machine code for REG_SEQUENCE nodes.
   ///
-  void EmitRegSequence(SDNode *Node, DenseMap<SDValue, Register> &VRBaseMap,
+  void EmitRegSequence(SDNode *Node, VRBaseMapType &VRBaseMap,
                        bool IsClone, bool IsCloned);
 public:
   /// CountResults - The results of target nodes have register or immediate
@@ -110,29 +111,29 @@ class LLVM_LIBRARY_VISIBILITY InstrEmitter {
   void AddDbgValueLocationOps(MachineInstrBuilder &MIB,
                               const MCInstrDesc &DbgValDesc,
                               ArrayRef<SDDbgOperand> Locations,
-                              DenseMap<SDValue, Register> &VRBaseMap);
+                              VRBaseMapType &VRBaseMap);
 
   /// EmitDbgValue - Generate machine instruction for a dbg_value node.
   ///
   MachineInstr *EmitDbgValue(SDDbgValue *SD,
-                             DenseMap<SDValue, Register> &VRBaseMap);
+                             VRBaseMapType &VRBaseMap);
 
   /// Emit a dbg_value as a DBG_INSTR_REF. May produce DBG_VALUE $noreg instead
   /// if there is no variable location; alternately a half-formed DBG_INSTR_REF
   /// that refers to a virtual register and is corrected later in isel.
   MachineInstr *EmitDbgInstrRef(SDDbgValue *SD,
-                                DenseMap<SDValue, Register> &VRBaseMap);
+                                VRBaseMapType &VRBa...
[truncated]

@llvmbot
Copy link
Collaborator

llvmbot commented Sep 20, 2024

@llvm/pr-subscribers-llvm-regalloc

Author: Jeremy Morse (jmorse)

Changes

tl;dr, if we use SmallDenseMaps instead of DenseMaps at these locations, we get a substantial speedup because there's less spurious malloc traffic:

https://llvm-compile-time-tracker.com/compare.php?from=983635c014767a2a37f87a4b564b59a78b866154&amp;to=1198cb4aa9c1715d18212a21328801b6985b8ca7&amp;stat=instructions:u

Background: inspired by @SLTozer 's introspective collection of stacktraces for some debug-info things, I've instrumented DenseMap to print where it was allocated and the max number of elements it contained. Run over CTMark and with the addition of some filtering, this has picked out the locations in LLVM where we allocate a DenseMap hashtable off the heap but we could instead get away with using the inline buckets of a SmallDenseMap and avoid calling malloc. I picked 16 inline elements at callsites which occasionally have more than 12 elements inserted, and four inline elements for some callsites where there typically aren't any elements inserted.

One drawback of this technique is that it's fully tuned to making the compile-time-tracker happy, so might not be representative in general. Counterpoints would be that CTMark is chosen to have a range of different inputs and is vaguely representative, avoiding allocations is almost always a win, and in scenarios where we will /always/ insert at least one element it makes sense to spend a little stack memory to avoid that.

(I've got two more patches that contribute another ~0.3% speedup, but it's now hit diminishing returns).


Patch is 32.79 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/109417.diff

14 Files Affected:

  • (modified) llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h (+1-1)
  • (modified) llvm/include/llvm/Analysis/SparsePropagation.h (+3-3)
  • (modified) llvm/lib/Analysis/MemoryDependenceAnalysis.cpp (+2-2)
  • (modified) llvm/lib/Analysis/ScalarEvolution.cpp (+2-2)
  • (modified) llvm/lib/CodeGen/CalcSpillWeights.cpp (+1-1)
  • (modified) llvm/lib/CodeGen/MachineLICM.cpp (+5-5)
  • (modified) llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp (+17-17)
  • (modified) llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h (+18-17)
  • (modified) llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp (+1-1)
  • (modified) llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp (+6-6)
  • (modified) llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h (+1-1)
  • (modified) llvm/lib/Transforms/IPO/CalledValuePropagation.cpp (+7-7)
  • (modified) llvm/lib/Transforms/Utils/BasicBlockUtils.cpp (+2-2)
  • (modified) llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp (+4-4)
diff --git a/llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h b/llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h
index decb33e6af6bcb..c31e663498d5f3 100644
--- a/llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h
+++ b/llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h
@@ -492,7 +492,7 @@ class MemoryDependenceResults {
                                    const MemoryLocation &Loc, bool isLoad,
                                    BasicBlock *BB,
                                    SmallVectorImpl<NonLocalDepResult> &Result,
-                                   DenseMap<BasicBlock *, Value *> &Visited,
+                                   SmallDenseMap<BasicBlock *, Value *, 16> &Visited,
                                    bool SkipFirstBlock = false,
                                    bool IsIncomplete = false);
   MemDepResult getNonLocalInfoForBlock(Instruction *QueryInst,
diff --git a/llvm/include/llvm/Analysis/SparsePropagation.h b/llvm/include/llvm/Analysis/SparsePropagation.h
index d5805a7314757f..194f4787a8de91 100644
--- a/llvm/include/llvm/Analysis/SparsePropagation.h
+++ b/llvm/include/llvm/Analysis/SparsePropagation.h
@@ -89,7 +89,7 @@ template <class LatticeKey, class LatticeVal> class AbstractLatticeFunction {
   /// \p ChangedValues.
   virtual void
   ComputeInstructionState(Instruction &I,
-                          DenseMap<LatticeKey, LatticeVal> &ChangedValues,
+                          SmallDenseMap<LatticeKey, LatticeVal, 16> &ChangedValues,
                           SparseSolver<LatticeKey, LatticeVal> &SS) = 0;
 
   /// PrintLatticeVal - Render the given LatticeVal to the specified stream.
@@ -401,7 +401,7 @@ void SparseSolver<LatticeKey, LatticeVal, KeyInfo>::visitPHINode(PHINode &PN) {
   // computed from its incoming values.  For example, SSI form stores its sigma
   // functions as PHINodes with a single incoming value.
   if (LatticeFunc->IsSpecialCasedPHI(&PN)) {
-    DenseMap<LatticeKey, LatticeVal> ChangedValues;
+    SmallDenseMap<LatticeKey, LatticeVal, 16> ChangedValues;
     LatticeFunc->ComputeInstructionState(PN, ChangedValues, *this);
     for (auto &ChangedValue : ChangedValues)
       if (ChangedValue.second != LatticeFunc->getUntrackedVal())
@@ -456,7 +456,7 @@ void SparseSolver<LatticeKey, LatticeVal, KeyInfo>::visitInst(Instruction &I) {
 
   // Otherwise, ask the transfer function what the result is.  If this is
   // something that we care about, remember it.
-  DenseMap<LatticeKey, LatticeVal> ChangedValues;
+  SmallDenseMap<LatticeKey, LatticeVal, 16> ChangedValues;
   LatticeFunc->ComputeInstructionState(I, ChangedValues, *this);
   for (auto &ChangedValue : ChangedValues)
     if (ChangedValue.second != LatticeFunc->getUntrackedVal())
diff --git a/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp b/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
index 79504ca7b73c8f..c5fba184cd0850 100644
--- a/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
+++ b/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
@@ -888,7 +888,7 @@ void MemoryDependenceResults::getNonLocalPointerDependency(
   // each block.  Because of critical edges, we currently bail out if querying
   // a block with multiple different pointers.  This can happen during PHI
   // translation.
-  DenseMap<BasicBlock *, Value *> Visited;
+  SmallDenseMap<BasicBlock *, Value *, 16> Visited;
   if (getNonLocalPointerDepFromBB(QueryInst, Address, Loc, isLoad, FromBB,
                                    Result, Visited, true))
     return;
@@ -1038,7 +1038,7 @@ bool MemoryDependenceResults::getNonLocalPointerDepFromBB(
     Instruction *QueryInst, const PHITransAddr &Pointer,
     const MemoryLocation &Loc, bool isLoad, BasicBlock *StartBB,
     SmallVectorImpl<NonLocalDepResult> &Result,
-    DenseMap<BasicBlock *, Value *> &Visited, bool SkipFirstBlock,
+    SmallDenseMap<BasicBlock *, Value *, 16> &Visited, bool SkipFirstBlock,
     bool IsIncomplete) {
   // Look up the cached info for Pointer.
   ValueIsLoadPair CacheKey(Pointer.getAddr(), isLoad);
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index 1d3443588ce60d..b2c2944c57978d 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -2255,7 +2255,7 @@ const SCEV *ScalarEvolution::getAnyExtendExpr(const SCEV *Op,
 /// the common case where no interesting opportunities are present, and
 /// is also used as a check to avoid infinite recursion.
 static bool
-CollectAddOperandsWithScales(DenseMap<const SCEV *, APInt> &M,
+CollectAddOperandsWithScales(SmallDenseMap<const SCEV *, APInt, 16> &M,
                              SmallVectorImpl<const SCEV *> &NewOps,
                              APInt &AccumulatedConstant,
                              ArrayRef<const SCEV *> Ops, const APInt &Scale,
@@ -2753,7 +2753,7 @@ const SCEV *ScalarEvolution::getAddExpr(SmallVectorImpl<const SCEV *> &Ops,
   // operands multiplied by constant values.
   if (Idx < Ops.size() && isa<SCEVMulExpr>(Ops[Idx])) {
     uint64_t BitWidth = getTypeSizeInBits(Ty);
-    DenseMap<const SCEV *, APInt> M;
+    SmallDenseMap<const SCEV *, APInt, 16> M;
     SmallVector<const SCEV *, 8> NewOps;
     APInt AccumulatedConstant(BitWidth, 0);
     if (CollectAddOperandsWithScales(M, NewOps, AccumulatedConstant,
diff --git a/llvm/lib/CodeGen/CalcSpillWeights.cpp b/llvm/lib/CodeGen/CalcSpillWeights.cpp
index 9d8c9119f7719d..88ed2291313c95 100644
--- a/llvm/lib/CodeGen/CalcSpillWeights.cpp
+++ b/llvm/lib/CodeGen/CalcSpillWeights.cpp
@@ -222,7 +222,7 @@ float VirtRegAuxInfo::weightCalcHelper(LiveInterval &LI, SlotIndex *Start,
 
   bool IsExiting = false;
   std::set<CopyHint> CopyHints;
-  DenseMap<unsigned, float> Hint;
+  SmallDenseMap<unsigned, float, 8> Hint;
   for (MachineRegisterInfo::reg_instr_nodbg_iterator
            I = MRI.reg_instr_nodbg_begin(LI.reg()),
            E = MRI.reg_instr_nodbg_end();
diff --git a/llvm/lib/CodeGen/MachineLICM.cpp b/llvm/lib/CodeGen/MachineLICM.cpp
index 6768eeeb4364c8..c1f3d5ac4ff957 100644
--- a/llvm/lib/CodeGen/MachineLICM.cpp
+++ b/llvm/lib/CodeGen/MachineLICM.cpp
@@ -239,7 +239,7 @@ namespace {
 
     bool IsCheapInstruction(MachineInstr &MI) const;
 
-    bool CanCauseHighRegPressure(const DenseMap<unsigned, int> &Cost,
+    bool CanCauseHighRegPressure(const SmallDenseMap<unsigned, int> &Cost,
                                  bool Cheap);
 
     void UpdateBackTraceRegPressure(const MachineInstr *MI);
@@ -264,7 +264,7 @@ namespace {
 
     void InitRegPressure(MachineBasicBlock *BB);
 
-    DenseMap<unsigned, int> calcRegisterCost(const MachineInstr *MI,
+    SmallDenseMap<unsigned, int> calcRegisterCost(const MachineInstr *MI,
                                              bool ConsiderSeen,
                                              bool ConsiderUnseenAsDef);
 
@@ -977,10 +977,10 @@ void MachineLICMImpl::UpdateRegPressure(const MachineInstr *MI,
 /// If 'ConsiderSeen' is true, updates 'RegSeen' and uses the information to
 /// figure out which usages are live-ins.
 /// FIXME: Figure out a way to consider 'RegSeen' from all code paths.
-DenseMap<unsigned, int>
+SmallDenseMap<unsigned, int>
 MachineLICMImpl::calcRegisterCost(const MachineInstr *MI, bool ConsiderSeen,
                                   bool ConsiderUnseenAsDef) {
-  DenseMap<unsigned, int> Cost;
+  SmallDenseMap<unsigned, int> Cost;
   if (MI->isImplicitDef())
     return Cost;
   for (unsigned i = 0, e = MI->getDesc().getNumOperands(); i != e; ++i) {
@@ -1248,7 +1248,7 @@ bool MachineLICMImpl::IsCheapInstruction(MachineInstr &MI) const {
 /// Visit BBs from header to current BB, check if hoisting an instruction of the
 /// given cost matrix can cause high register pressure.
 bool MachineLICMImpl::CanCauseHighRegPressure(
-    const DenseMap<unsigned, int> &Cost, bool CheapInstr) {
+    const SmallDenseMap<unsigned, int>& Cost, bool CheapInstr) {
   for (const auto &RPIdAndCost : Cost) {
     if (RPIdAndCost.second <= 0)
       continue;
diff --git a/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp b/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
index 53ce21906204c8..738319d44d2a53 100644
--- a/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
@@ -83,7 +83,7 @@ static unsigned countOperands(SDNode *Node, unsigned NumExpUses,
 /// implicit physical register output.
 void InstrEmitter::EmitCopyFromReg(SDNode *Node, unsigned ResNo, bool IsClone,
                                    Register SrcReg,
-                                   DenseMap<SDValue, Register> &VRBaseMap) {
+                                   VRBaseMapType &VRBaseMap) {
   Register VRBase;
   if (SrcReg.isVirtual()) {
     // Just use the input register directly!
@@ -187,7 +187,7 @@ void InstrEmitter::CreateVirtualRegisters(SDNode *Node,
                                        MachineInstrBuilder &MIB,
                                        const MCInstrDesc &II,
                                        bool IsClone, bool IsCloned,
-                                       DenseMap<SDValue, Register> &VRBaseMap) {
+                                       VRBaseMapType &VRBaseMap) {
   assert(Node->getMachineOpcode() != TargetOpcode::IMPLICIT_DEF &&
          "IMPLICIT_DEF should have been handled as a special case elsewhere!");
 
@@ -266,7 +266,7 @@ void InstrEmitter::CreateVirtualRegisters(SDNode *Node,
 /// getVR - Return the virtual register corresponding to the specified result
 /// of the specified node.
 Register InstrEmitter::getVR(SDValue Op,
-                             DenseMap<SDValue, Register> &VRBaseMap) {
+                             VRBaseMapType &VRBaseMap) {
   if (Op.isMachineOpcode() &&
       Op.getMachineOpcode() == TargetOpcode::IMPLICIT_DEF) {
     // Add an IMPLICIT_DEF instruction before every use.
@@ -280,7 +280,7 @@ Register InstrEmitter::getVR(SDValue Op,
     return VReg;
   }
 
-  DenseMap<SDValue, Register>::iterator I = VRBaseMap.find(Op);
+  VRBaseMapType::iterator I = VRBaseMap.find(Op);
   assert(I != VRBaseMap.end() && "Node emitted out of order - late");
   return I->second;
 }
@@ -318,7 +318,7 @@ InstrEmitter::AddRegisterOperand(MachineInstrBuilder &MIB,
                                  SDValue Op,
                                  unsigned IIOpNum,
                                  const MCInstrDesc *II,
-                                 DenseMap<SDValue, Register> &VRBaseMap,
+                                 VRBaseMapType &VRBaseMap,
                                  bool IsDebug, bool IsClone, bool IsCloned) {
   assert(Op.getValueType() != MVT::Other &&
          Op.getValueType() != MVT::Glue &&
@@ -399,7 +399,7 @@ void InstrEmitter::AddOperand(MachineInstrBuilder &MIB,
                               SDValue Op,
                               unsigned IIOpNum,
                               const MCInstrDesc *II,
-                              DenseMap<SDValue, Register> &VRBaseMap,
+                              VRBaseMapType &VRBaseMap,
                               bool IsDebug, bool IsClone, bool IsCloned) {
   if (Op.isMachineOpcode()) {
     AddRegisterOperand(MIB, Op, IIOpNum, II, VRBaseMap,
@@ -500,7 +500,7 @@ Register InstrEmitter::ConstrainForSubReg(Register VReg, unsigned SubIdx,
 /// EmitSubregNode - Generate machine code for subreg nodes.
 ///
 void InstrEmitter::EmitSubregNode(SDNode *Node,
-                                  DenseMap<SDValue, Register> &VRBaseMap,
+                                  VRBaseMapType &VRBaseMap,
                                   bool IsClone, bool IsCloned) {
   Register VRBase;
   unsigned Opc = Node->getMachineOpcode();
@@ -634,7 +634,7 @@ void InstrEmitter::EmitSubregNode(SDNode *Node,
 ///
 void
 InstrEmitter::EmitCopyToRegClassNode(SDNode *Node,
-                                     DenseMap<SDValue, Register> &VRBaseMap) {
+                                     VRBaseMapType &VRBaseMap) {
   Register VReg = getVR(Node->getOperand(0), VRBaseMap);
 
   // Create the new VReg in the destination class and emit a copy.
@@ -654,7 +654,7 @@ InstrEmitter::EmitCopyToRegClassNode(SDNode *Node,
 /// EmitRegSequence - Generate machine code for REG_SEQUENCE nodes.
 ///
 void InstrEmitter::EmitRegSequence(SDNode *Node,
-                                  DenseMap<SDValue, Register> &VRBaseMap,
+                                  VRBaseMapType &VRBaseMap,
                                   bool IsClone, bool IsCloned) {
   unsigned DstRCIdx = Node->getConstantOperandVal(0);
   const TargetRegisterClass *RC = TRI->getRegClass(DstRCIdx);
@@ -703,7 +703,7 @@ void InstrEmitter::EmitRegSequence(SDNode *Node,
 ///
 MachineInstr *
 InstrEmitter::EmitDbgValue(SDDbgValue *SD,
-                           DenseMap<SDValue, Register> &VRBaseMap) {
+                           VRBaseMapType &VRBaseMap) {
   DebugLoc DL = SD->getDebugLoc();
   assert(cast<DILocalVariable>(SD->getVariable())
              ->isValidLocationForIntrinsic(DL) &&
@@ -755,7 +755,7 @@ MachineOperand GetMOForConstDbgOp(const SDDbgOperand &Op) {
 void InstrEmitter::AddDbgValueLocationOps(
     MachineInstrBuilder &MIB, const MCInstrDesc &DbgValDesc,
     ArrayRef<SDDbgOperand> LocationOps,
-    DenseMap<SDValue, Register> &VRBaseMap) {
+    VRBaseMapType &VRBaseMap) {
   for (const SDDbgOperand &Op : LocationOps) {
     switch (Op.getKind()) {
     case SDDbgOperand::FRAMEIX:
@@ -786,7 +786,7 @@ void InstrEmitter::AddDbgValueLocationOps(
 
 MachineInstr *
 InstrEmitter::EmitDbgInstrRef(SDDbgValue *SD,
-                              DenseMap<SDValue, Register> &VRBaseMap) {
+                              VRBaseMapType &VRBaseMap) {
   MDNode *Var = SD->getVariable();
   const DIExpression *Expr = (DIExpression *)SD->getExpression();
   DebugLoc DL = SD->getDebugLoc();
@@ -862,7 +862,7 @@ InstrEmitter::EmitDbgInstrRef(SDDbgValue *SD,
       // Look up the corresponding VReg for the given SDNode, if any.
       SDNode *Node = DbgOperand.getSDNode();
       SDValue Op = SDValue(Node, DbgOperand.getResNo());
-      DenseMap<SDValue, Register>::iterator I = VRBaseMap.find(Op);
+      VRBaseMapType::iterator I = VRBaseMap.find(Op);
       // No VReg -> produce a DBG_VALUE $noreg instead.
       if (I == VRBaseMap.end())
         break;
@@ -928,7 +928,7 @@ MachineInstr *InstrEmitter::EmitDbgNoLocation(SDDbgValue *SD) {
 
 MachineInstr *
 InstrEmitter::EmitDbgValueList(SDDbgValue *SD,
-                               DenseMap<SDValue, Register> &VRBaseMap) {
+                               VRBaseMapType &VRBaseMap) {
   MDNode *Var = SD->getVariable();
   DIExpression *Expr = SD->getExpression();
   DebugLoc DL = SD->getDebugLoc();
@@ -944,7 +944,7 @@ InstrEmitter::EmitDbgValueList(SDDbgValue *SD,
 
 MachineInstr *
 InstrEmitter::EmitDbgValueFromSingleOp(SDDbgValue *SD,
-                                       DenseMap<SDValue, Register> &VRBaseMap) {
+                                       VRBaseMapType &VRBaseMap) {
   MDNode *Var = SD->getVariable();
   DIExpression *Expr = SD->getExpression();
   DebugLoc DL = SD->getDebugLoc();
@@ -996,7 +996,7 @@ InstrEmitter::EmitDbgLabel(SDDbgLabel *SD) {
 ///
 void InstrEmitter::
 EmitMachineNode(SDNode *Node, bool IsClone, bool IsCloned,
-                DenseMap<SDValue, Register> &VRBaseMap) {
+                VRBaseMapType &VRBaseMap) {
   unsigned Opc = Node->getMachineOpcode();
 
   // Handle subreg insert/extract specially
@@ -1238,7 +1238,7 @@ EmitMachineNode(SDNode *Node, bool IsClone, bool IsCloned,
 /// needed dependencies.
 void InstrEmitter::
 EmitSpecialNode(SDNode *Node, bool IsClone, bool IsCloned,
-                DenseMap<SDValue, Register> &VRBaseMap) {
+                VRBaseMapType &VRBaseMap) {
   switch (Node->getOpcode()) {
   default:
 #ifndef NDEBUG
diff --git a/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h b/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h
index 959bce31c8b278..fcfcaa8d35b848 100644
--- a/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h
+++ b/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h
@@ -30,6 +30,8 @@ class TargetLowering;
 class TargetMachine;
 
 class LLVM_LIBRARY_VISIBILITY InstrEmitter {
+  using VRBaseMapType = SmallDenseMap<SDValue, Register, 16>;
+
   MachineFunction *MF;
   MachineRegisterInfo *MRI;
   const TargetInstrInfo *TII;
@@ -45,18 +47,17 @@ class LLVM_LIBRARY_VISIBILITY InstrEmitter {
   /// EmitCopyFromReg - Generate machine code for an CopyFromReg node or an
   /// implicit physical register output.
   void EmitCopyFromReg(SDNode *Node, unsigned ResNo, bool IsClone,
-                       Register SrcReg, DenseMap<SDValue, Register> &VRBaseMap);
+                       Register SrcReg, VRBaseMapType &VRBaseMap);
 
   void CreateVirtualRegisters(SDNode *Node,
                               MachineInstrBuilder &MIB,
                               const MCInstrDesc &II,
                               bool IsClone, bool IsCloned,
-                              DenseMap<SDValue, Register> &VRBaseMap);
+                              VRBaseMapType &VRBaseMap);
 
   /// getVR - Return the virtual register corresponding to the specified result
   /// of the specified node.
-  Register getVR(SDValue Op,
-                 DenseMap<SDValue, Register> &VRBaseMap);
+  Register getVR(SDValue Op, VRBaseMapType &VRBaseMap);
 
   /// AddRegisterOperand - Add the specified register as an operand to the
   /// specified machine instr. Insert register copies if the register is
@@ -65,7 +66,7 @@ class LLVM_LIBRARY_VISIBILITY InstrEmitter {
                           SDValue Op,
                           unsigned IIOpNum,
                           const MCInstrDesc *II,
-                          DenseMap<SDValue, Register> &VRBaseMap,
+                          VRBaseMapType &VRBaseMap,
                           bool IsDebug, bool IsClone, bool IsCloned);
 
   /// AddOperand - Add the specified operand to the specified machine instr.  II
@@ -76,7 +77,7 @@ class LLVM_LIBRARY_VISIBILITY InstrEmitter {
                   SDValue Op,
                   unsigned IIOpNum,
                   const MCInstrDesc *II,
-                  DenseMap<SDValue, Register> &VRBaseMap,
+                  VRBaseMapType &VRBaseMap,
                   bool IsDebug, bool IsClone, bool IsCloned);
 
   /// ConstrainForSubReg - Try to constrain VReg to a register class that
@@ -87,7 +88,7 @@ class LLVM_LIBRARY_VISIBILITY InstrEmitter {
 
   /// EmitSubregNode - Generate machine code for subreg nodes.
   ///
-  void EmitSubregNode(SDNode *Node, DenseMap<SDValue, Register> &VRBaseMap,
+  void EmitSubregNode(SDNode *Node, VRBaseMapType &VRBaseMap,
                       bool IsClone, bool IsCloned);
 
   /// EmitCopyToRegClassNode - Generate machine code for COPY_TO_REGCLASS nodes.
@@ -95,11 +96,11 @@ class LLVM_LIBRARY_VISIBILITY InstrEmitter {
   /// register is constrained to be in a particular register class.
   ///
   void EmitCopyToRegClassNode(SDNode *Node,
-                              DenseMap<SDValue, Register> &VRBaseMap);
+                              VRBaseMapType &VRBaseMap);
 
   /// EmitRegSequence - Generate machine code for REG_SEQUENCE nodes.
   ///
-  void EmitRegSequence(SDNode *Node, DenseMap<SDValue, Register> &VRBaseMap,
+  void EmitRegSequence(SDNode *Node, VRBaseMapType &VRBaseMap,
                        bool IsClone, bool IsCloned);
 public:
   /// CountResults - The results of target nodes have register or immediate
@@ -110,29 +111,29 @@ class LLVM_LIBRARY_VISIBILITY InstrEmitter {
   void AddDbgValueLocationOps(MachineInstrBuilder &MIB,
                               const MCInstrDesc &DbgValDesc,
                               ArrayRef<SDDbgOperand> Locations,
-                              DenseMap<SDValue, Register> &VRBaseMap);
+                              VRBaseMapType &VRBaseMap);
 
   /// EmitDbgValue - Generate machine instruction for a dbg_value node.
   ///
   MachineInstr *EmitDbgValue(SDDbgValue *SD,
-                             DenseMap<SDValue, Register> &VRBaseMap);
+                             VRBaseMapType &VRBaseMap);
 
   /// Emit a dbg_value as a DBG_INSTR_REF. May produce DBG_VALUE $noreg instead
   /// if there is no variable location; alternately a half-formed DBG_INSTR_REF
   /// that refers to a virtual register and is corrected later in isel.
   MachineInstr *EmitDbgInstrRef(SDDbgValue *SD,
-                                DenseMap<SDValue, Register> &VRBaseMap);
+                                VRBaseMapType &VRBa...
[truncated]

Copy link

github-actions bot commented Sep 20, 2024

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff efdb3ae23247850d3886e3708400f0d991ed59e1 1e079343e73248de60f8b6279f2fc66b3ccd689a --extensions h,cpp -- llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h llvm/include/llvm/Analysis/SparsePropagation.h llvm/lib/Analysis/MemoryDependenceAnalysis.cpp llvm/lib/Analysis/ScalarEvolution.cpp llvm/lib/CodeGen/CalcSpillWeights.cpp llvm/lib/CodeGen/MachineLICM.cpp llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h llvm/lib/Transforms/IPO/CalledValuePropagation.cpp llvm/lib/Transforms/Utils/BasicBlockUtils.cpp llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
View the diff from clang-format here.
diff --git a/llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h b/llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h
index c31e663498..700343561f 100644
--- a/llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h
+++ b/llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h
@@ -487,14 +487,12 @@ private:
   MemDepResult getCallDependencyFrom(CallBase *Call, bool isReadOnlyCall,
                                      BasicBlock::iterator ScanIt,
                                      BasicBlock *BB);
-  bool getNonLocalPointerDepFromBB(Instruction *QueryInst,
-                                   const PHITransAddr &Pointer,
-                                   const MemoryLocation &Loc, bool isLoad,
-                                   BasicBlock *BB,
-                                   SmallVectorImpl<NonLocalDepResult> &Result,
-                                   SmallDenseMap<BasicBlock *, Value *, 16> &Visited,
-                                   bool SkipFirstBlock = false,
-                                   bool IsIncomplete = false);
+  bool getNonLocalPointerDepFromBB(
+      Instruction *QueryInst, const PHITransAddr &Pointer,
+      const MemoryLocation &Loc, bool isLoad, BasicBlock *BB,
+      SmallVectorImpl<NonLocalDepResult> &Result,
+      SmallDenseMap<BasicBlock *, Value *, 16> &Visited,
+      bool SkipFirstBlock = false, bool IsIncomplete = false);
   MemDepResult getNonLocalInfoForBlock(Instruction *QueryInst,
                                        const MemoryLocation &Loc, bool isLoad,
                                        BasicBlock *BB, NonLocalDepInfo *Cache,
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index b2c2944c57..d2ffda254d 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -2254,12 +2254,10 @@ const SCEV *ScalarEvolution::getAnyExtendExpr(const SCEV *Op,
 /// may be exposed. This helps getAddRecExpr short-circuit extra work in
 /// the common case where no interesting opportunities are present, and
 /// is also used as a check to avoid infinite recursion.
-static bool
-CollectAddOperandsWithScales(SmallDenseMap<const SCEV *, APInt, 16> &M,
-                             SmallVectorImpl<const SCEV *> &NewOps,
-                             APInt &AccumulatedConstant,
-                             ArrayRef<const SCEV *> Ops, const APInt &Scale,
-                             ScalarEvolution &SE) {
+static bool CollectAddOperandsWithScales(
+    SmallDenseMap<const SCEV *, APInt, 16> &M,
+    SmallVectorImpl<const SCEV *> &NewOps, APInt &AccumulatedConstant,
+    ArrayRef<const SCEV *> Ops, const APInt &Scale, ScalarEvolution &SE) {
   bool Interesting = false;
 
   // Iterate over the add operands. They are sorted, with constants first.
diff --git a/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp b/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
index 12a48ab06f..bd834871c9 100644
--- a/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
@@ -183,10 +183,10 @@ void InstrEmitter::EmitCopyFromReg(SDNode *Node, unsigned ResNo, bool IsClone,
 }
 
 void InstrEmitter::CreateVirtualRegisters(SDNode *Node,
-                                       MachineInstrBuilder &MIB,
-                                       const MCInstrDesc &II,
-                                       bool IsClone, bool IsCloned,
-                                       VRBaseMapType &VRBaseMap) {
+                                          MachineInstrBuilder &MIB,
+                                          const MCInstrDesc &II, bool IsClone,
+                                          bool IsCloned,
+                                          VRBaseMapType &VRBaseMap) {
   assert(Node->getMachineOpcode() != TargetOpcode::IMPLICIT_DEF &&
          "IMPLICIT_DEF should have been handled as a special case elsewhere!");
 
@@ -311,13 +311,10 @@ static bool isConvergenceCtrlMachineOp(SDValue Op) {
 /// AddRegisterOperand - Add the specified register as an operand to the
 /// specified machine instr. Insert register copies if the register is
 /// not in the required register class.
-void
-InstrEmitter::AddRegisterOperand(MachineInstrBuilder &MIB,
-                                 SDValue Op,
-                                 unsigned IIOpNum,
-                                 const MCInstrDesc *II,
-                                 VRBaseMapType &VRBaseMap,
-                                 bool IsDebug, bool IsClone, bool IsCloned) {
+void InstrEmitter::AddRegisterOperand(MachineInstrBuilder &MIB, SDValue Op,
+                                      unsigned IIOpNum, const MCInstrDesc *II,
+                                      VRBaseMapType &VRBaseMap, bool IsDebug,
+                                      bool IsClone, bool IsCloned) {
   assert(Op.getValueType() != MVT::Other &&
          Op.getValueType() != MVT::Glue &&
          "Chain and glue operands should occur at end of operand list!");
@@ -627,9 +624,8 @@ void InstrEmitter::EmitSubregNode(SDNode *Node, VRBaseMapType &VRBaseMap,
 /// COPY_TO_REGCLASS is just a normal copy, except that the destination
 /// register is constrained to be in a particular register class.
 ///
-void
-InstrEmitter::EmitCopyToRegClassNode(SDNode *Node,
-                                     VRBaseMapType &VRBaseMap) {
+void InstrEmitter::EmitCopyToRegClassNode(SDNode *Node,
+                                          VRBaseMapType &VRBaseMap) {
   Register VReg = getVR(Node->getOperand(0), VRBaseMap);
 
   // Create the new VReg in the destination class and emit a copy.
@@ -695,9 +691,8 @@ void InstrEmitter::EmitRegSequence(SDNode *Node, VRBaseMapType &VRBaseMap,
 
 /// EmitDbgValue - Generate machine instruction for a dbg_value node.
 ///
-MachineInstr *
-InstrEmitter::EmitDbgValue(SDDbgValue *SD,
-                           VRBaseMapType &VRBaseMap) {
+MachineInstr *InstrEmitter::EmitDbgValue(SDDbgValue *SD,
+                                         VRBaseMapType &VRBaseMap) {
   DebugLoc DL = SD->getDebugLoc();
   assert(cast<DILocalVariable>(SD->getVariable())
              ->isValidLocationForIntrinsic(DL) &&
@@ -746,10 +741,10 @@ MachineOperand GetMOForConstDbgOp(const SDDbgOperand &Op) {
       /* SubReg */ 0, /* isDebug */ true);
 }
 
-void InstrEmitter::AddDbgValueLocationOps(
-    MachineInstrBuilder &MIB, const MCInstrDesc &DbgValDesc,
-    ArrayRef<SDDbgOperand> LocationOps,
-    VRBaseMapType &VRBaseMap) {
+void InstrEmitter::AddDbgValueLocationOps(MachineInstrBuilder &MIB,
+                                          const MCInstrDesc &DbgValDesc,
+                                          ArrayRef<SDDbgOperand> LocationOps,
+                                          VRBaseMapType &VRBaseMap) {
   for (const SDDbgOperand &Op : LocationOps) {
     switch (Op.getKind()) {
     case SDDbgOperand::FRAMEIX:
@@ -778,9 +773,8 @@ void InstrEmitter::AddDbgValueLocationOps(
   }
 }
 
-MachineInstr *
-InstrEmitter::EmitDbgInstrRef(SDDbgValue *SD,
-                              VRBaseMapType &VRBaseMap) {
+MachineInstr *InstrEmitter::EmitDbgInstrRef(SDDbgValue *SD,
+                                            VRBaseMapType &VRBaseMap) {
   MDNode *Var = SD->getVariable();
   const DIExpression *Expr = (DIExpression *)SD->getExpression();
   DebugLoc DL = SD->getDebugLoc();
@@ -920,9 +914,8 @@ MachineInstr *InstrEmitter::EmitDbgNoLocation(SDDbgValue *SD) {
   return BuildMI(*MF, DL, Desc, false, 0U, Var, Expr);
 }
 
-MachineInstr *
-InstrEmitter::EmitDbgValueList(SDDbgValue *SD,
-                               VRBaseMapType &VRBaseMap) {
+MachineInstr *InstrEmitter::EmitDbgValueList(SDDbgValue *SD,
+                                             VRBaseMapType &VRBaseMap) {
   MDNode *Var = SD->getVariable();
   DIExpression *Expr = SD->getExpression();
   DebugLoc DL = SD->getDebugLoc();
@@ -936,9 +929,8 @@ InstrEmitter::EmitDbgValueList(SDDbgValue *SD,
   return &*MIB;
 }
 
-MachineInstr *
-InstrEmitter::EmitDbgValueFromSingleOp(SDDbgValue *SD,
-                                       VRBaseMapType &VRBaseMap) {
+MachineInstr *InstrEmitter::EmitDbgValueFromSingleOp(SDDbgValue *SD,
+                                                     VRBaseMapType &VRBaseMap) {
   MDNode *Var = SD->getVariable();
   DIExpression *Expr = SD->getExpression();
   DebugLoc DL = SD->getDebugLoc();
@@ -988,9 +980,8 @@ InstrEmitter::EmitDbgLabel(SDDbgLabel *SD) {
 /// EmitMachineNode - Generate machine code for a target-specific node and
 /// needed dependencies.
 ///
-void InstrEmitter::
-EmitMachineNode(SDNode *Node, bool IsClone, bool IsCloned,
-                VRBaseMapType &VRBaseMap) {
+void InstrEmitter::EmitMachineNode(SDNode *Node, bool IsClone, bool IsCloned,
+                                   VRBaseMapType &VRBaseMap) {
   unsigned Opc = Node->getMachineOpcode();
 
   // Handle subreg insert/extract specially
@@ -1230,9 +1221,8 @@ EmitMachineNode(SDNode *Node, bool IsClone, bool IsCloned,
 
 /// EmitSpecialNode - Generate machine code for a target-independent node and
 /// needed dependencies.
-void InstrEmitter::
-EmitSpecialNode(SDNode *Node, bool IsClone, bool IsCloned,
-                VRBaseMapType &VRBaseMap) {
+void InstrEmitter::EmitSpecialNode(SDNode *Node, bool IsClone, bool IsCloned,
+                                   VRBaseMapType &VRBaseMap) {
   switch (Node->getOpcode()) {
   default:
 #ifndef NDEBUG
diff --git a/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h b/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h
index 16d754cdc2..99f8af97b9 100644
--- a/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h
+++ b/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h
@@ -51,11 +51,9 @@ private:
   void EmitCopyFromReg(SDNode *Node, unsigned ResNo, bool IsClone,
                        Register SrcReg, VRBaseMapType &VRBaseMap);
 
-  void CreateVirtualRegisters(SDNode *Node,
-                              MachineInstrBuilder &MIB,
-                              const MCInstrDesc &II,
-                              bool IsClone, bool IsCloned,
-                              VRBaseMapType &VRBaseMap);
+  void CreateVirtualRegisters(SDNode *Node, MachineInstrBuilder &MIB,
+                              const MCInstrDesc &II, bool IsClone,
+                              bool IsCloned, VRBaseMapType &VRBaseMap);
 
   /// getVR - Return the virtual register corresponding to the specified result
   /// of the specified node.
@@ -64,23 +62,18 @@ private:
   /// AddRegisterOperand - Add the specified register as an operand to the
   /// specified machine instr. Insert register copies if the register is
   /// not in the required register class.
-  void AddRegisterOperand(MachineInstrBuilder &MIB,
-                          SDValue Op,
-                          unsigned IIOpNum,
-                          const MCInstrDesc *II,
-                          VRBaseMapType &VRBaseMap,
-                          bool IsDebug, bool IsClone, bool IsCloned);
+  void AddRegisterOperand(MachineInstrBuilder &MIB, SDValue Op,
+                          unsigned IIOpNum, const MCInstrDesc *II,
+                          VRBaseMapType &VRBaseMap, bool IsDebug, bool IsClone,
+                          bool IsCloned);
 
   /// AddOperand - Add the specified operand to the specified machine instr.  II
   /// specifies the instruction information for the node, and IIOpNum is the
   /// operand number (in the II) that we are adding. IIOpNum and II are used for
   /// assertions only.
-  void AddOperand(MachineInstrBuilder &MIB,
-                  SDValue Op,
-                  unsigned IIOpNum,
-                  const MCInstrDesc *II,
-                  VRBaseMapType &VRBaseMap,
-                  bool IsDebug, bool IsClone, bool IsCloned);
+  void AddOperand(MachineInstrBuilder &MIB, SDValue Op, unsigned IIOpNum,
+                  const MCInstrDesc *II, VRBaseMapType &VRBaseMap, bool IsDebug,
+                  bool IsClone, bool IsCloned);
 
   /// ConstrainForSubReg - Try to constrain VReg to a register class that
   /// supports SubIdx sub-registers.  Emit a copy if that isn't possible.
diff --git a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
index 31939ae592..3398bca669 100644
--- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
@@ -736,7 +736,7 @@ void ScheduleDAGSDNodes::VerifyScheduledSequence(bool isBottomUp) {
 /// ProcessSDDbgValues - Process SDDbgValues associated with this node.
 static void
 ProcessSDDbgValues(SDNode *N, SelectionDAG *DAG, InstrEmitter &Emitter,
-                   SmallVectorImpl<std::pair<unsigned, MachineInstr*> > &Orders,
+                   SmallVectorImpl<std::pair<unsigned, MachineInstr *>> &Orders,
                    InstrEmitter::VRBaseMapType &VRBaseMap, unsigned Order) {
   if (!N->getHasDebugValue())
     return;
@@ -807,9 +807,9 @@ ProcessSourceNode(SDNode *N, SelectionDAG *DAG, InstrEmitter &Emitter,
   ProcessSDDbgValues(N, DAG, Emitter, Orders, VRBaseMap, Order);
 }
 
-void ScheduleDAGSDNodes::
-EmitPhysRegCopy(SUnit *SU, SmallDenseMap<SUnit *, Register, 16> &VRBaseMap,
-                MachineBasicBlock::iterator InsertPos) {
+void ScheduleDAGSDNodes::EmitPhysRegCopy(
+    SUnit *SU, SmallDenseMap<SUnit *, Register, 16> &VRBaseMap,
+    MachineBasicBlock::iterator InsertPos) {
   for (const SDep &Pred : SU->Preds) {
     if (Pred.isCtrl())
       continue; // ignore chain preds

Copy link
Contributor

@nikic nikic left a comment

Choose a reason for hiding this comment

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

LGTM. As long as it's not inside nested maps, there's basically no downside to having inline storage.

Also nice results on clang, so this clearly does generalize beyond CTMark:

bin/clang-20 	6913606M 	6858510M (-0.80%)
bin/llvm-tblgen 	261829M 	261017M (-0.31%)
bin/clang-tblgen 	121228M 	118689M (-2.09%)

@@ -770,7 +770,7 @@ void ScheduleDAGLinearize::Schedule() {
MachineBasicBlock*
ScheduleDAGLinearize::EmitSchedule(MachineBasicBlock::iterator &InsertPos) {
InstrEmitter Emitter(DAG->getTarget(), BB, InsertPos);
DenseMap<SDValue, Register> VRBaseMap;
SmallDenseMap<SDValue, Register, 16> VRBaseMap;
Copy link
Contributor

@nikic nikic Sep 20, 2024

Choose a reason for hiding this comment

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

Make VRBaseMapType public and use InstrEmitter::VRBaseMapType here?

@jmorse
Copy link
Member Author

jmorse commented Sep 25, 2024

NB: I can't fix all the clang-format errors as the existing files aren't clean, and it'd transform this patch into a 75% clang-format patch.

@jmorse jmorse merged commit 3f37c51 into llvm:main Sep 25, 2024
4 of 8 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 25, 2024

LLVM Buildbot has detected a new failure on builder llvm-clang-x86_64-sie-ubuntu-fast running on sie-linux-worker while building llvm at step 6 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
...
3.992 [2/12/73] Linking CXX executable tools/clang/unittests/Tooling/ToolingTests
4.002 [2/11/74] Linking CXX executable unittests/tools/llvm-mca/LLVMMCATests
4.009 [2/10/75] Linking CXX executable unittests/ExecutionEngine/Orc/OrcJITTests
4.071 [2/9/76] Linking CXX executable unittests/IR/IRTests
4.112 [2/8/77] Linking CXX executable unittests/tools/llvm-exegesis/LLVMExegesisTests
4.117 [2/7/78] Linking CXX executable unittests/Transforms/Scalar/ScalarTests
4.149 [2/6/79] Linking CXX executable unittests/Passes/Plugins/PluginsTests
4.208 [2/5/80] Linking CXX executable unittests/Target/X86/X86Tests
4.246 [2/4/81] Linking CXX executable tools/clang/unittests/Frontend/FrontendTests
4.304 [2/3/82] Building CXX object unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o
FAILED: unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/g++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/unittests/Analysis -I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/unittests/Analysis -I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/include -I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/include -I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/third-party/unittest/googletest/include -I/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/third-party/unittest/googlemock/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -std=c++17 -MD -MT unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o -MF unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o.d -o unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o -c /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:141:8: error: ‘void {anonymous}::TestLatticeFunc::ComputeInstructionState(llvm::Instruction&, llvm::DenseMap<llvm::PointerIntPair<llvm::Value*, 2, {anonymous}::IPOGrouping>, {anonymous}::TestLatticeVal>&, llvm::SparseSolver<llvm::PointerIntPair<llvm::Value*, 2, {anonymous}::IPOGrouping>, {anonymous}::TestLatticeVal, llvm::LatticeKeyInfo<llvm::PointerIntPair<llvm::Value*, 2, {anonymous}::IPOGrouping> > >&)’ marked ‘override’, but does not override
  141 |   void ComputeInstructionState(
      |        ^~~~~~~~~~~~~~~~~~~~~~~
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:230:19: error: cannot declare field ‘{anonymous}::SparsePropagationTest::Lattice’ to be of abstract type ‘{anonymous}::TestLatticeFunc’
  230 |   TestLatticeFunc Lattice;
      |                   ^~~~~~~
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:98:7: note:   because the following virtual functions are pure within ‘{anonymous}::TestLatticeFunc’:
   98 | class TestLatticeFunc
      |       ^~~~~~~~~~~~~~~
In file included from /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:9:
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/include/llvm/Analysis/SparsePropagation.h:90:16: note:     ‘void llvm::AbstractLatticeFunction<LatticeKey, LatticeVal>::ComputeInstructionState(llvm::Instruction&, llvm::SmallDenseMap<LatticeKey, LatticeVal, 16>&, llvm::SparseSolver<LatticeKey, LatticeVal>&) [with LatticeKey = llvm::PointerIntPair<llvm::Value*, 2, {anonymous}::IPOGrouping>; LatticeVal = {anonymous}::TestLatticeVal]’
   90 |   virtual void ComputeInstructionState(
      |                ^~~~~~~~~~~~~~~~~~~~~~~
5.006 [2/2/83] Linking CXX executable tools/clang/unittests/Interpreter/ExceptionTests/ClangReplInterpreterExceptionTests
5.191 [2/1/84] Linking CXX executable tools/clang/unittests/Interpreter/ClangReplInterpreterTests
ninja: build stopped: subcommand failed.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 25, 2024

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

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
...
4.723 [4/23/684] Building CXX object unittests/tools/llvm-profgen/CMakeFiles/LLVMProfgenTests.dir/ContextCompressionTest.cpp.o
4.745 [3/23/685] Building CXX object unittests/tools/llvm-mca/CMakeFiles/LLVMMCATests.dir/X86/X86TestBase.cpp.o
4.745 [3/22/686] Linking CXX executable unittests/MC/AMDGPU/AMDGPUMCTests
4.746 [3/21/687] Building CXX object unittests/tools/llvm-mca/CMakeFiles/LLVMMCATests.dir/X86/TestIncrementalMCA.cpp.o
4.808 [2/21/688] Linking CXX executable unittests/Transforms/Vectorize/SandboxVectorizer/SandboxVectorizerTests
4.851 [2/20/689] Linking CXX executable unittests/tools/llvm-profgen/LLVMProfgenTests
4.943 [2/19/690] Linking CXX executable unittests/Transforms/Coroutines/CoroTests
4.979 [2/18/691] Linking CXX executable unittests/Transforms/Instrumentation/InstrumentationTests
5.020 [2/17/692] Linking CXX executable unittests/tools/llvm-profdata/LLVMProfdataTests
5.074 [2/16/693] Building CXX object unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o
FAILED: unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o 
ccache /usr/bin/c++ -DCPUINFO_SUPPORTED_PLATFORM=1 -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/b/ml-opt-devrel-x86-64-b1/build/unittests/Analysis -I/b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/unittests/Analysis -I/var/lib/buildbot/.local/lib/python3.7/site-packages/tensorflow/include -I/b/ml-opt-devrel-x86-64-b1/build/include -I/b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/include -I/b/ml-opt-devrel-x86-64-b1/llvm-project/third-party/unittest/googletest/include -I/b/ml-opt-devrel-x86-64-b1/llvm-project/third-party/unittest/googlemock/include -isystem /tmp/tflitebuild/tensorflow/include -isystem /tmp/tflitebuild/eigen/include/eigen3 -isystem /tmp/tflitebuild/abseil-cpp/include -isystem /tmp/tflitebuild/flatbuffers/include -isystem /tmp/tflitebuild/gemmlowp/include/gemmlowp -isystem /tmp/tflitebuild/ml_dtypes/src/ml_dtypes -isystem /tmp/tflitebuild/ml_dtypes/src/ml_dtypes/ml_dtypes -isystem /tmp/tflitebuild/ruy/include -isystem /tmp/tflitebuild/cpuinfo/include -isystem /tmp/tflitebuild/ARM_NEON_2_x86_SSE/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -DEIGEN_NEON_GEBP_NR=4 -DTFL_STATIC_LIBRARY_BUILD -Wno-suggest-override -std=c++17 -MD -MT unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o -MF unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o.d -o unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o -c /b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp
/b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:141:8: error: ‘void {anonymous}::TestLatticeFunc::ComputeInstructionState(llvm::Instruction&, llvm::DenseMap<llvm::PointerIntPair<llvm::Value*, 2, {anonymous}::IPOGrouping>, {anonymous}::TestLatticeVal>&, llvm::SparseSolver<llvm::PointerIntPair<llvm::Value*, 2, {anonymous}::IPOGrouping>, {anonymous}::TestLatticeVal, llvm::LatticeKeyInfo<llvm::PointerIntPair<llvm::Value*, 2, {anonymous}::IPOGrouping> > >&)’ marked ‘override’, but does not override
  141 |   void ComputeInstructionState(
      |        ^~~~~~~~~~~~~~~~~~~~~~~
/b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:230:19: error: cannot declare field ‘{anonymous}::SparsePropagationTest::Lattice’ to be of abstract type ‘{anonymous}::TestLatticeFunc’
  230 |   TestLatticeFunc Lattice;
      |                   ^~~~~~~
/b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:98:7: note:   because the following virtual functions are pure within ‘{anonymous}::TestLatticeFunc’:
   98 | class TestLatticeFunc
      |       ^~~~~~~~~~~~~~~
In file included from /b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:9:
/b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/include/llvm/Analysis/SparsePropagation.h:90:16: note:     ‘void llvm::AbstractLatticeFunction<LatticeKey, LatticeVal>::ComputeInstructionState(llvm::Instruction&, llvm::SmallDenseMap<LatticeKey, LatticeVal, 16>&, llvm::SparseSolver<LatticeKey, LatticeVal>&) [with LatticeKey = llvm::PointerIntPair<llvm::Value*, 2, {anonymous}::IPOGrouping>; LatticeVal = {anonymous}::TestLatticeVal]’
   90 |   virtual void ComputeInstructionState(
      |                ^~~~~~~~~~~~~~~~~~~~~~~
5.077 [2/15/694] Linking CXX executable unittests/Transforms/Vectorize/VectorizeTests
5.285 [2/14/695] Linking CXX executable unittests/ExecutionEngine/MCJIT/MCJITTests
5.560 [2/13/696] Linking CXX executable unittests/Target/AMDGPU/AMDGPUTests
5.567 [2/12/697] Linking CXX executable unittests/Target/X86/X86Tests
6.004 [2/11/698] Linking CXX executable unittests/tools/llvm-cfi-verify/CFIVerifyTests
6.089 [2/10/699] Linking CXX executable unittests/Transforms/Utils/UtilsTests
6.111 [2/9/700] Linking CXX executable unittests/Transforms/Scalar/ScalarTests
6.654 [2/8/701] Linking CXX executable unittests/CodeGen/CodeGenTests
6.690 [2/7/702] Linking CXX executable unittests/DebugInfo/DWARF/DebugInfoDWARFTests
6.700 [2/6/703] Linking CXX executable unittests/MIR/MIRTests
6.796 [2/5/704] Linking CXX executable unittests/CodeGen/GlobalISel/GlobalISelTests
6.865 [2/4/705] Linking CXX executable unittests/tools/llvm-mca/LLVMMCATests
6.907 [2/3/706] Linking CXX executable unittests/MI/MITests
7.290 [2/2/707] Linking CXX executable unittests/Target/TargetMachineCTests
7.620 [2/1/708] Linking CXX executable unittests/tools/llvm-exegesis/LLVMExegesisTests
ninja: build stopped: subcommand failed.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 25, 2024

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

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
...
4.772 [3/22/685] Building CXX object unittests/tools/llvm-mca/CMakeFiles/LLVMMCATests.dir/X86/TestIncrementalMCA.cpp.o
4.785 [3/21/686] Building CXX object unittests/tools/llvm-mca/CMakeFiles/LLVMMCATests.dir/X86/X86TestBase.cpp.o
4.887 [2/21/687] Linking CXX executable unittests/Transforms/Vectorize/SandboxVectorizer/SandboxVectorizerTests
4.888 [2/20/688] Linking CXX executable unittests/tools/llvm-profgen/LLVMProfgenTests
4.966 [2/19/689] Linking CXX executable unittests/Target/RISCV/RISCVTests
4.968 [2/18/690] Linking CXX executable unittests/Passes/Plugins/PluginsTests
5.016 [2/17/691] Linking CXX executable unittests/tools/llvm-profdata/LLVMProfdataTests
5.062 [2/16/692] Linking CXX executable unittests/Transforms/Vectorize/VectorizeTests
5.105 [2/15/693] Linking CXX executable unittests/ExecutionEngine/MCJIT/MCJITTests
5.211 [2/14/694] Building CXX object unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o
FAILED: unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o 
ccache /usr/bin/c++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/b/ml-opt-rel-x86-64-b1/build/unittests/Analysis -I/b/ml-opt-rel-x86-64-b1/llvm-project/llvm/unittests/Analysis -I/var/lib/buildbot/.local/lib/python3.7/site-packages/tensorflow/include -I/b/ml-opt-rel-x86-64-b1/build/include -I/b/ml-opt-rel-x86-64-b1/llvm-project/llvm/include -I/b/ml-opt-rel-x86-64-b1/llvm-project/third-party/unittest/googletest/include -I/b/ml-opt-rel-x86-64-b1/llvm-project/third-party/unittest/googlemock/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -std=c++17 -MD -MT unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o -MF unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o.d -o unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o -c /b/ml-opt-rel-x86-64-b1/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp
/b/ml-opt-rel-x86-64-b1/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:141:8: error: ‘void {anonymous}::TestLatticeFunc::ComputeInstructionState(llvm::Instruction&, llvm::DenseMap<llvm::PointerIntPair<llvm::Value*, 2, {anonymous}::IPOGrouping>, {anonymous}::TestLatticeVal>&, llvm::SparseSolver<llvm::PointerIntPair<llvm::Value*, 2, {anonymous}::IPOGrouping>, {anonymous}::TestLatticeVal, llvm::LatticeKeyInfo<llvm::PointerIntPair<llvm::Value*, 2, {anonymous}::IPOGrouping> > >&)’ marked ‘override’, but does not override
  141 |   void ComputeInstructionState(
      |        ^~~~~~~~~~~~~~~~~~~~~~~
/b/ml-opt-rel-x86-64-b1/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:230:19: error: cannot declare field ‘{anonymous}::SparsePropagationTest::Lattice’ to be of abstract type ‘{anonymous}::TestLatticeFunc’
  230 |   TestLatticeFunc Lattice;
      |                   ^~~~~~~
/b/ml-opt-rel-x86-64-b1/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:98:7: note:   because the following virtual functions are pure within ‘{anonymous}::TestLatticeFunc’:
   98 | class TestLatticeFunc
      |       ^~~~~~~~~~~~~~~
In file included from /b/ml-opt-rel-x86-64-b1/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:9:
/b/ml-opt-rel-x86-64-b1/llvm-project/llvm/include/llvm/Analysis/SparsePropagation.h:90:16: note:     ‘void llvm::AbstractLatticeFunction<LatticeKey, LatticeVal>::ComputeInstructionState(llvm::Instruction&, llvm::SmallDenseMap<LatticeKey, LatticeVal, 16>&, llvm::SparseSolver<LatticeKey, LatticeVal>&) [with LatticeKey = llvm::PointerIntPair<llvm::Value*, 2, {anonymous}::IPOGrouping>; LatticeVal = {anonymous}::TestLatticeVal]’
   90 |   virtual void ComputeInstructionState(
      |                ^~~~~~~~~~~~~~~~~~~~~~~
5.523 [2/13/695] Linking CXX executable unittests/Target/AMDGPU/AMDGPUTests
5.529 [2/12/696] Linking CXX executable unittests/Target/X86/X86Tests
5.969 [2/11/697] Linking CXX executable unittests/tools/llvm-cfi-verify/CFIVerifyTests
6.000 [2/10/698] Linking CXX executable unittests/Transforms/Scalar/ScalarTests
6.146 [2/9/699] Linking CXX executable unittests/Transforms/Utils/UtilsTests
6.516 [2/8/700] Linking CXX executable unittests/CodeGen/CodeGenTests
6.574 [2/7/701] Linking CXX executable unittests/MIR/MIRTests
6.773 [2/6/702] Linking CXX executable unittests/tools/llvm-mca/LLVMMCATests
6.803 [2/5/703] Linking CXX executable unittests/CodeGen/GlobalISel/GlobalISelTests
6.851 [2/4/704] Linking CXX executable unittests/DebugInfo/DWARF/DebugInfoDWARFTests
7.116 [2/3/705] Linking CXX executable unittests/Target/TargetMachineCTests
7.184 [2/2/706] Linking CXX executable unittests/MI/MITests
7.420 [2/1/707] Linking CXX executable unittests/tools/llvm-exegesis/LLVMExegesisTests
ninja: build stopped: subcommand failed.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 25, 2024

LLVM Buildbot has detected a new failure on builder arc-builder running on arc-worker while building llvm at step 6 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
...
10.105 [34/18/26] Linking CXX executable unittests/DebugInfo/Symbolizer/DebugInfoSymbolizerTests
10.181 [33/18/27] Linking CXX executable unittests/DebugInfo/GSYM/DebugInfoGSYMTests
10.370 [32/18/28] Linking CXX executable unittests/DWARFLinkerParallel/DWARFLinkerParallelTests
10.622 [31/18/29] Linking CXX executable unittests/Debuginfod/DebuginfodTests
10.831 [30/18/30] Linking CXX executable unittests/DebugInfo/PDB/DebugInfoPDBTests
11.319 [29/18/31] Linking CXX executable unittests/ExecutionEngine/ExecutionEngineTests
11.450 [28/18/32] Linking CXX executable unittests/DebugInfo/LogicalView/DebugInfoLogicalViewTests
11.495 [27/18/33] Linking CXX executable unittests/ExecutionEngine/JITLink/JITLinkTests
11.892 [26/18/34] Linking CXX executable unittests/InterfaceStub/InterfaceStubTests
12.089 [25/18/35] Building CXX object unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o
FAILED: unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o 
/usr/bin/c++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iunittests/Analysis -I/buildbot/worker/arc-folder/llvm-project/llvm/unittests/Analysis -Iinclude -I/buildbot/worker/arc-folder/llvm-project/llvm/include -I/buildbot/worker/arc-folder/llvm-project/third-party/unittest/googletest/include -I/buildbot/worker/arc-folder/llvm-project/third-party/unittest/googlemock/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -std=c++17 -MD -MT unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o -MF unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o.d -o unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o -c /buildbot/worker/arc-folder/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp
/buildbot/worker/arc-folder/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:141:8: error: 'void {anonymous}::TestLatticeFunc::ComputeInstructionState(llvm::Instruction&, llvm::DenseMap<llvm::PointerIntPair<llvm::Value*, 2, {anonymous}::IPOGrouping>, {anonymous}::TestLatticeVal>&, llvm::SparseSolver<llvm::PointerIntPair<llvm::Value*, 2, {anonymous}::IPOGrouping>, {anonymous}::TestLatticeVal, llvm::LatticeKeyInfo<llvm::PointerIntPair<llvm::Value*, 2, {anonymous}::IPOGrouping> > >&)' marked 'override', but does not override
  141 |   void ComputeInstructionState(
      |        ^~~~~~~~~~~~~~~~~~~~~~~
/buildbot/worker/arc-folder/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:230:19: error: cannot declare field '{anonymous}::SparsePropagationTest::Lattice' to be of abstract type '{anonymous}::TestLatticeFunc'
  230 |   TestLatticeFunc Lattice;
      |                   ^~~~~~~
/buildbot/worker/arc-folder/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:98:7: note:   because the following virtual functions are pure within '{anonymous}::TestLatticeFunc':
   98 | class TestLatticeFunc
      |       ^~~~~~~~~~~~~~~
In file included from /buildbot/worker/arc-folder/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:9:
/buildbot/worker/arc-folder/llvm-project/llvm/include/llvm/Analysis/SparsePropagation.h:90:16: note:     'void llvm::AbstractLatticeFunction<LatticeKey, LatticeVal>::ComputeInstructionState(llvm::Instruction&, llvm::SmallDenseMap<LatticeKey, LatticeVal, 16>&, llvm::SparseSolver<LatticeKey, LatticeVal>&) [with LatticeKey = llvm::PointerIntPair<llvm::Value*, 2, {anonymous}::IPOGrouping>; LatticeVal = {anonymous}::TestLatticeVal]'
   90 |   virtual void ComputeInstructionState(
      |                ^~~~~~~~~~~~~~~~~~~~~~~
12.089 [25/17/36] Linking CXX executable tools/clang/unittests/CodeGen/ClangCodeGenTests
12.797 [25/16/37] Linking CXX executable unittests/Linker/LinkerTests
12.809 [25/15/38] Linking CXX executable unittests/FuzzMutate/FuzzMutateTests
13.072 [25/14/39] Linking CXX executable unittests/CodeGen/GlobalISel/GlobalISelTests
13.238 [25/13/40] Linking CXX executable tools/clang/unittests/Tooling/ToolingTests
13.609 [25/12/41] Linking CXX executable unittests/DebugInfo/DWARF/DebugInfoDWARFTests
13.683 [25/11/42] Linking CXX executable tools/clang/unittests/Index/IndexTests
13.743 [25/10/43] Linking CXX executable tools/clang/unittests/Support/ClangSupportTests
13.804 [25/9/44] Linking CXX executable tools/clang/unittests/Serialization/SerializationTests
14.125 [25/8/45] Linking CXX executable unittests/CodeGen/CodeGenTests
14.682 [25/7/46] Linking CXX executable tools/clang/unittests/Frontend/FrontendTests
14.694 [25/6/47] Linking CXX executable unittests/Frontend/LLVMFrontendTests
15.562 [25/5/48] Linking CXX executable unittests/ExecutionEngine/Orc/OrcJITTests
16.295 [25/4/49] Linking CXX executable unittests/IR/IRTests
16.364 [25/3/50] Linking CXX executable unittests/ExecutionEngine/MCJIT/MCJITTests
20.152 [25/2/51] Linking CXX executable tools/clang/unittests/Interpreter/ExceptionTests/ClangReplInterpreterExceptionTests
20.287 [25/1/52] Linking CXX executable tools/clang/unittests/Interpreter/ClangReplInterpreterTests
ninja: build stopped: subcommand failed.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 25, 2024

LLVM Buildbot has detected a new failure on builder llvm-clang-x86_64-win-fast running on as-builder-3 while building llvm at step 7 "test-build-unified-tree-check-llvm-unit".

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

Here is the relevant piece of the build log for the reference
Step 7 (test-build-unified-tree-check-llvm-unit) failure: test (failure)
...
[507/707] Building CXX object unittests\Support\CMakeFiles\SupportTests.dir\IndexedAccessorTest.cpp.obj
[508/707] Building CXX object unittests\Support\CMakeFiles\SupportTests.dir\DataExtractorTest.cpp.obj
[509/707] Linking CXX executable unittests\CodeGen\GlobalISel\GlobalISelTests.exe
[510/707] Linking CXX executable unittests\Remarks\RemarksTests.exe
[511/707] Linking CXX executable unittests\MC\MCTests.exe
[512/707] Building CXX object unittests\Support\CMakeFiles\SupportTests.dir\MD5Test.cpp.obj
[513/707] Building CXX object unittests\Support\CMakeFiles\SupportTests.dir\MathExtrasTest.cpp.obj
[514/707] Building CXX object unittests\Target\ARM\CMakeFiles\ARMTests.dir\InstSizes.cpp.obj
[515/707] Building CXX object unittests\Target\ARM\CMakeFiles\ARMTests.dir\MachineInstrTest.cpp.obj
[516/707] Building CXX object unittests\Analysis\CMakeFiles\AnalysisTests.dir\SparsePropagation.cpp.obj
FAILED: unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.obj 
C:\ninja\ccache.exe C:\PROGRA~1\MICROS~2\2022\COMMUN~1\VC\Tools\MSVC\1438~1.331\bin\Hostx64\x64\cl.exe  /nologo /TP -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -IC:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\build\unittests\Analysis -IC:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\llvm\unittests\Analysis -IC:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\build\include -IC:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\llvm\include -IC:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\third-party\unittest\googletest\include -IC:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\third-party\unittest\googlemock\include /DWIN32 /D_WINDOWS   /Zc:inline /Zc:preprocessor /Zc:__cplusplus /Oi /bigobj /permissive- /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd5105 -wd4324 -wd4251 -wd4275 -w14062 -we4238 /Gw /O2 /Ob2 /DNDEBUG -MD  /EHs-c- /GR- -std:c++17 /showIncludes /Founittests\Analysis\CMakeFiles\AnalysisTests.dir\SparsePropagation.cpp.obj /Fdunittests\Analysis\CMakeFiles\AnalysisTests.dir\ /FS -c C:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\llvm\unittests\Analysis\SparsePropagation.cpp
C:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\llvm\unittests\Analysis\SparsePropagation.cpp(141): error C3668: '`anonymous-namespace'::TestLatticeFunc::ComputeInstructionState': method with override specifier 'override' did not override any base class methods
C:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\llvm\unittests\Analysis\SparsePropagation.cpp(230): error C2259: '`anonymous-namespace'::TestLatticeFunc': cannot instantiate abstract class
C:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\llvm\unittests\Analysis\SparsePropagation.cpp(98): note: see declaration of '`anonymous-namespace'::TestLatticeFunc'
C:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\llvm\unittests\Analysis\SparsePropagation.cpp(230): note: due to following members:
C:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\llvm\unittests\Analysis\SparsePropagation.cpp(230): note: 'void llvm::AbstractLatticeFunction<`anonymous-namespace'::TestLatticeKey,`anonymous-namespace'::TestLatticeVal>::ComputeInstructionState(llvm::Instruction &,llvm::SmallDenseMap<LatticeKey,LatticeVal,16,llvm::DenseMapInfo<KeyT,void>,llvm::detail::DenseMapPair<KeyT,ValueT>> &,llvm::SparseSolver<LatticeKey,LatticeVal,llvm::LatticeKeyInfo<`anonymous-namespace'::TestLatticeKey>> &)': is abstract
        with
        [
            LatticeKey=`anonymous-namespace'::TestLatticeKey,
            LatticeVal=`anonymous-namespace'::TestLatticeVal,
            KeyT=`anonymous-namespace'::TestLatticeKey,
            ValueT=`anonymous-namespace'::TestLatticeVal
        ]
C:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\llvm\include\llvm/Analysis/SparsePropagation.h(90): note: see declaration of 'llvm::AbstractLatticeFunction<`anonymous-namespace'::TestLatticeKey,`anonymous-namespace'::TestLatticeVal>::ComputeInstructionState'
[517/707] Building CXX object unittests\Support\CMakeFiles\SupportTests.dir\ManagedStatic.cpp.obj
[518/707] Building CXX object unittests\Support\CMakeFiles\SupportTests.dir\SipHashTest.cpp.obj
[519/707] Building CXX object unittests\Support\CMakeFiles\SupportTests.dir\ModRefTest.cpp.obj
[520/707] Building CXX object unittests\Support\CMakeFiles\SupportTests.dir\SuffixTreeTest.cpp.obj
[521/707] Building CXX object unittests\Support\CMakeFiles\SupportTests.dir\TypeNameTest.cpp.obj
[522/707] Building CXX object unittests\Support\CMakeFiles\SupportTests.dir\RegexTest.cpp.obj
[523/707] Building CXX object unittests\Support\CMakeFiles\SupportTests.dir\SHA256.cpp.obj
[524/707] Building CXX object unittests\Support\CMakeFiles\SupportTests.dir\TypeTraitsTest.cpp.obj
[525/707] Building CXX object unittests\Support\CMakeFiles\SupportTests.dir\TypeSizeTest.cpp.obj
[526/707] Building CXX object unittests\Support\CMakeFiles\SupportTests.dir\MemoryTest.cpp.obj
[527/707] Building CXX object unittests\Support\CMakeFiles\SupportTests.dir\SignalsTest.cpp.obj
[528/707] Building CXX object unittests\Support\CMakeFiles\SupportTests.dir\OptimizedStructLayoutTest.cpp.obj
[529/707] Building CXX object unittests\Support\CMakeFiles\SupportTests.dir\SourceMgrTest.cpp.obj
[530/707] Building CXX object unittests\Support\CMakeFiles\SupportTests.dir\ReverseIterationTest.cpp.obj
[531/707] Building CXX object unittests\Support\CMakeFiles\SupportTests.dir\Threading.cpp.obj
[532/707] Building CXX object unittests\Support\CMakeFiles\SupportTests.dir\UTCTimeTest.cpp.obj
[533/707] Building CXX object unittests\Support\CMakeFiles\SupportTests.dir\UnicodeTest.cpp.obj
[534/707] Building CXX object unittests\Support\CMakeFiles\SupportTests.dir\ScaledNumberTest.cpp.obj
[535/707] Building CXX object unittests\Support\CMakeFiles\SupportTests.dir\ParallelTest.cpp.obj
[536/707] Building CXX object unittests\Support\CMakeFiles\SupportTests.dir\ProgramTest.cpp.obj
[537/707] Building CXX object unittests\Support\CMakeFiles\SupportTests.dir\ProcessTest.cpp.obj
[538/707] Building CXX object unittests\Support\CMakeFiles\SupportTests.dir\TimerTest.cpp.obj
[539/707] Building CXX object unittests\Support\CMakeFiles\SupportTests.dir\VersionTupleTest.cpp.obj
[540/707] Building CXX object unittests\Support\CMakeFiles\SupportTests.dir\TrailingObjectsTest.cpp.obj

@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 25, 2024

LLVM Buildbot has detected a new failure on builder clang-aarch64-quick running on linaro-clang-aarch64-quick while building llvm at step 5 "ninja check 1".

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

Here is the relevant piece of the build log for the reference
Step 5 (ninja check 1) failure: stage 1 checked (failure)
...
[45/82] Linking CXX executable unittests/MC/MCTests
[46/82] Linking CXX executable unittests/ObjectYAML/ObjectYAMLTests
[47/82] Linking CXX executable tools/clang/unittests/Frontend/FrontendTests
[48/82] Linking CXX executable tools/clang/unittests/Index/IndexTests
[49/82] Linking CXX executable tools/clang/unittests/Serialization/SerializationTests
[50/82] Linking CXX executable unittests/DebugInfo/DWARF/DebugInfoDWARFTests
[51/82] Linking CXX executable unittests/ProfileData/ProfileDataTests
[52/82] Linking CXX executable unittests/CodeGen/GlobalISel/GlobalISelTests
[53/82] Linking CXX executable unittests/CodeGen/CodeGenTests
[54/82] Building CXX object unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o
FAILED: unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o 
/usr/local/bin/c++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/unittests/Analysis -I/home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/llvm/unittests/Analysis -I/home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/include -I/home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/llvm/include -I/home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/third-party/unittest/googletest/include -I/home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/third-party/unittest/googlemock/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 -O3 -DNDEBUG -std=c++17  -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -MD -MT unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o -MF unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o.d -o unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o -c /home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/llvm/unittests/Analysis/SparsePropagation.cpp
../llvm/llvm/unittests/Analysis/SparsePropagation.cpp:143:57: error: non-virtual member function marked 'override' hides virtual member function
  143 |       SparseSolver<TestLatticeKey, TestLatticeVal> &SS) override {
      |                                                         ^
../llvm/llvm/include/llvm/Analysis/SparsePropagation.h:90:16: note: hidden overloaded virtual function 'llvm::AbstractLatticeFunction<llvm::PointerIntPair<llvm::Value *, 2, (anonymous namespace)::IPOGrouping>, (anonymous namespace)::TestLatticeVal>::ComputeInstructionState' declared here: type mismatch at 2nd parameter ('SmallDenseMap<PointerIntPair<Value *, 2, IPOGrouping, PointerLikeTypeTraits<Value *>, PointerIntPairInfo<Value *, 2, PointerLikeTypeTraits<Value *>>>, TestLatticeVal, 16> &' vs 'DenseMap<TestLatticeKey, TestLatticeVal> &' (aka 'DenseMap<PointerIntPair<Value *, 2, IPOGrouping>, (anonymous namespace)::TestLatticeVal> &'))
   90 |   virtual void ComputeInstructionState(
      |                ^
../llvm/llvm/unittests/Analysis/SparsePropagation.cpp:230:19: error: field type 'TestLatticeFunc' is an abstract class
  230 |   TestLatticeFunc Lattice;
      |                   ^
../llvm/llvm/include/llvm/Analysis/SparsePropagation.h:90:16: note: unimplemented pure virtual method 'ComputeInstructionState' in 'TestLatticeFunc'
   90 |   virtual void ComputeInstructionState(
      |                ^
In file included from ../llvm/llvm/unittests/Analysis/SparsePropagation.cpp:13:
In file included from ../llvm/third-party/unittest/googletest/include/gtest/gtest.h:65:
In file included from ../llvm/third-party/unittest/googletest/include/gtest/gtest-death-test.h:43:
In file included from ../llvm/third-party/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h:47:
In file included from ../llvm/third-party/unittest/googletest/include/gtest/gtest-matchers.h:49:
In file included from ../llvm/third-party/unittest/googletest/include/gtest/gtest-printers.h:122:
../llvm/third-party/unittest/googletest/include/gtest/internal/gtest-internal.h:457:40: error: cannot initialize return object of type 'Test *' with an rvalue of type 'SparsePropagationTest_MarkBlockExecutable_Test *'
  457 |   Test* CreateTest() override { return new TestClass; }
      |                                        ^~~
../llvm/llvm/unittests/Analysis/SparsePropagation.cpp:255:1: note: in instantiation of member function 'testing::internal::TestFactoryImpl<SparsePropagationTest_MarkBlockExecutable_Test>::CreateTest' requested here
  255 | TEST_F(SparsePropagationTest, MarkBlockExecutable) {
      | ^
../llvm/third-party/unittest/googletest/include/gtest/gtest.h:2208:41: note: expanded from macro 'TEST_F'
 2208 | #define TEST_F(test_fixture, test_name) GTEST_TEST_F(test_fixture, test_name)
      |                                         ^
../llvm/third-party/unittest/googletest/include/gtest/gtest.h:2205:3: note: expanded from macro 'GTEST_TEST_F'
 2205 |   GTEST_TEST_(test_fixture, test_name, test_fixture, \
      |   ^
../llvm/third-party/unittest/googletest/include/gtest/internal/gtest-internal.h:1556:15: note: expanded from macro 'GTEST_TEST_'
 1556 |           new ::testing::internal::TestFactoryImpl<GTEST_TEST_CLASS_NAME_(     \
      |               ^
../llvm/third-party/unittest/googletest/include/gtest/internal/gtest-internal.h:457:40: error: cannot initialize return object of type 'Test *' with an rvalue of type 'SparsePropagationTest_GlobalVariableConstant_Test *'
  457 |   Test* CreateTest() override { return new TestClass; }
      |                                        ^~~
../llvm/llvm/unittests/Analysis/SparsePropagation.cpp:291:1: note: in instantiation of member function 'testing::internal::TestFactoryImpl<SparsePropagationTest_GlobalVariableConstant_Test>::CreateTest' requested here

@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 25, 2024

LLVM Buildbot has detected a new failure on builder llvm-nvptx-nvidia-ubuntu running on as-builder-7 while building llvm at step 6 "test-build-unified-tree-check-llvm".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-llvm) failure: test (failure)
...
0.993 [2/10/659] Linking CXX executable unittests/DebugInfo/DWARF/DebugInfoDWARFTests
0.993 [2/9/660] Linking CXX executable unittests/Object/ObjectTests
1.002 [2/8/661] Linking CXX executable unittests/ExecutionEngine/Orc/OrcJITTests
1.042 [2/7/662] Linking CXX executable unittests/tools/llvm-exegesis/LLVMExegesisTests
1.080 [2/6/663] Linking CXX executable unittests/CodeGen/CodeGenTests
1.095 [2/5/664] Linking CXX executable unittests/Frontend/LLVMFrontendTests
1.253 [2/4/665] Linking CXX executable unittests/IR/IRTests
1.355 [2/3/666] Linking CXX executable unittests/ADT/ADTTests
1.377 [2/2/667] Linking CXX executable unittests/Support/SupportTests
4.600 [2/1/668] Building CXX object unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o
FAILED: unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/c++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/unittests/Analysis -I/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/unittests/Analysis -I/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/include -I/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/include -I/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/third-party/unittest/googletest/include -I/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/third-party/unittest/googlemock/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -std=c++17 -MD -MT unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o -MF unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o.d -o unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o -c /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:141:8: error: ‘void {anonymous}::TestLatticeFunc::ComputeInstructionState(llvm::Instruction&, llvm::DenseMap<llvm::PointerIntPair<llvm::Value*, 2, {anonymous}::IPOGrouping>, {anonymous}::TestLatticeVal>&, llvm::SparseSolver<llvm::PointerIntPair<llvm::Value*, 2, {anonymous}::IPOGrouping>, {anonymous}::TestLatticeVal, llvm::LatticeKeyInfo<llvm::PointerIntPair<llvm::Value*, 2, {anonymous}::IPOGrouping> > >&)’ marked ‘override’, but does not override
  141 |   void ComputeInstructionState(
      |        ^~~~~~~~~~~~~~~~~~~~~~~
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:230:19: error: cannot declare field ‘{anonymous}::SparsePropagationTest::Lattice’ to be of abstract type ‘{anonymous}::TestLatticeFunc’
  230 |   TestLatticeFunc Lattice;
      |                   ^~~~~~~
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:98:7: note:   because the following virtual functions are pure within ‘{anonymous}::TestLatticeFunc’:
   98 | class TestLatticeFunc
      |       ^~~~~~~~~~~~~~~
In file included from /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:9:
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/include/llvm/Analysis/SparsePropagation.h:90:16: note:     ‘void llvm::AbstractLatticeFunction<LatticeKey, LatticeVal>::ComputeInstructionState(llvm::Instruction&, llvm::SmallDenseMap<LatticeKey, LatticeVal, 16>&, llvm::SparseSolver<LatticeKey, LatticeVal>&) [with LatticeKey = llvm::PointerIntPair<llvm::Value*, 2, {anonymous}::IPOGrouping>; LatticeVal = {anonymous}::TestLatticeVal]’
   90 |   virtual void ComputeInstructionState(
      |                ^~~~~~~~~~~~~~~~~~~~~~~
ninja: build stopped: subcommand failed.

jmorse added a commit that referenced this pull request Sep 25, 2024
…dup (#109417)"

This reverts commit 3f37c51.

Lo and behold, I missed a unit test
@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 25, 2024

LLVM Buildbot has detected a new failure on builder llvm-nvptx64-nvidia-ubuntu running on as-builder-7 while building llvm at step 6 "test-build-unified-tree-check-llvm".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-llvm) failure: test (failure)
...
0.987 [2/10/659] Linking CXX executable unittests/Transforms/Utils/UtilsTests
0.988 [2/9/660] Linking CXX executable unittests/Object/ObjectTests
0.994 [2/8/661] Linking CXX executable unittests/ExecutionEngine/Orc/OrcJITTests
1.029 [2/7/662] Linking CXX executable unittests/tools/llvm-exegesis/LLVMExegesisTests
1.066 [2/6/663] Linking CXX executable unittests/CodeGen/CodeGenTests
1.126 [2/5/664] Linking CXX executable unittests/Frontend/LLVMFrontendTests
1.233 [2/4/665] Linking CXX executable unittests/IR/IRTests
1.337 [2/3/666] Linking CXX executable unittests/ADT/ADTTests
1.360 [2/2/667] Linking CXX executable unittests/Support/SupportTests
4.661 [2/1/668] Building CXX object unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o
FAILED: unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/c++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/unittests/Analysis -I/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/unittests/Analysis -I/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/build/include -I/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/include -I/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/llvm-project/third-party/unittest/googletest/include -I/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/llvm-project/third-party/unittest/googlemock/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -std=c++17 -MD -MT unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o -MF unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o.d -o unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o -c /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:141:8: error: ‘void {anonymous}::TestLatticeFunc::ComputeInstructionState(llvm::Instruction&, llvm::DenseMap<llvm::PointerIntPair<llvm::Value*, 2, {anonymous}::IPOGrouping>, {anonymous}::TestLatticeVal>&, llvm::SparseSolver<llvm::PointerIntPair<llvm::Value*, 2, {anonymous}::IPOGrouping>, {anonymous}::TestLatticeVal, llvm::LatticeKeyInfo<llvm::PointerIntPair<llvm::Value*, 2, {anonymous}::IPOGrouping> > >&)’ marked ‘override’, but does not override
  141 |   void ComputeInstructionState(
      |        ^~~~~~~~~~~~~~~~~~~~~~~
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:230:19: error: cannot declare field ‘{anonymous}::SparsePropagationTest::Lattice’ to be of abstract type ‘{anonymous}::TestLatticeFunc’
  230 |   TestLatticeFunc Lattice;
      |                   ^~~~~~~
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:98:7: note:   because the following virtual functions are pure within ‘{anonymous}::TestLatticeFunc’:
   98 | class TestLatticeFunc
      |       ^~~~~~~~~~~~~~~
In file included from /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:9:
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx64-nvidia-ubuntu/llvm-project/llvm/include/llvm/Analysis/SparsePropagation.h:90:16: note:     ‘void llvm::AbstractLatticeFunction<LatticeKey, LatticeVal>::ComputeInstructionState(llvm::Instruction&, llvm::SmallDenseMap<LatticeKey, LatticeVal, 16>&, llvm::SparseSolver<LatticeKey, LatticeVal>&) [with LatticeKey = llvm::PointerIntPair<llvm::Value*, 2, {anonymous}::IPOGrouping>; LatticeVal = {anonymous}::TestLatticeVal]’
   90 |   virtual void ComputeInstructionState(
      |                ^~~~~~~~~~~~~~~~~~~~~~~
ninja: build stopped: subcommand failed.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 25, 2024

LLVM Buildbot has detected a new failure on builder clang-armv8-quick running on linaro-clang-armv8-quick while building llvm at step 5 "ninja check 1".

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

Here is the relevant piece of the build log for the reference
Step 5 (ninja check 1) failure: stage 1 checked (failure)
...
[39/83] Linking CXX executable unittests/Transforms/Vectorize/VectorizeTests
[40/83] Linking CXX executable tools/clang/unittests/Analysis/ClangAnalysisTests
[41/83] Linking CXX executable unittests/Transforms/IPO/IPOTests
[42/83] Linking CXX executable unittests/MIR/MIRTests
[43/83] Linking CXX executable unittests/DebugInfo/DWARF/DebugInfoDWARFTests
[44/83] Linking CXX executable unittests/tools/llvm-profdata/LLVMProfdataTests
[45/83] Linking CXX executable tools/clang/unittests/ASTMatchers/Dynamic/DynamicASTMatchersTests
[46/83] Linking CXX executable tools/clang/tools/extra/unittests/clang-query/ClangQueryTests
[47/83] Linking CXX executable unittests/MI/MITests
[48/83] Building CXX object unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o
FAILED: unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o 
/usr/local/bin/c++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_FILE_OFFSET_BITS=64 -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/tcwg-buildbot/worker/clang-armv8-quick/stage1/unittests/Analysis -I/home/tcwg-buildbot/worker/clang-armv8-quick/llvm/llvm/unittests/Analysis -I/home/tcwg-buildbot/worker/clang-armv8-quick/stage1/include -I/home/tcwg-buildbot/worker/clang-armv8-quick/llvm/llvm/include -I/home/tcwg-buildbot/worker/clang-armv8-quick/llvm/third-party/unittest/googletest/include -I/home/tcwg-buildbot/worker/clang-armv8-quick/llvm/third-party/unittest/googlemock/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 -O3 -DNDEBUG -std=c++17  -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -MD -MT unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o -MF unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o.d -o unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o -c /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/llvm/unittests/Analysis/SparsePropagation.cpp
../llvm/llvm/unittests/Analysis/SparsePropagation.cpp:143:57: error: non-virtual member function marked 'override' hides virtual member function
  143 |       SparseSolver<TestLatticeKey, TestLatticeVal> &SS) override {
      |                                                         ^
../llvm/llvm/include/llvm/Analysis/SparsePropagation.h:90:16: note: hidden overloaded virtual function 'llvm::AbstractLatticeFunction<llvm::PointerIntPair<llvm::Value *, 2, (anonymous namespace)::IPOGrouping>, (anonymous namespace)::TestLatticeVal>::ComputeInstructionState' declared here: type mismatch at 2nd parameter ('SmallDenseMap<PointerIntPair<Value *, 2, IPOGrouping, PointerLikeTypeTraits<Value *>, PointerIntPairInfo<Value *, 2, PointerLikeTypeTraits<Value *>>>, TestLatticeVal, 16> &' vs 'DenseMap<TestLatticeKey, TestLatticeVal> &' (aka 'DenseMap<PointerIntPair<Value *, 2, IPOGrouping>, (anonymous namespace)::TestLatticeVal> &'))
   90 |   virtual void ComputeInstructionState(
      |                ^
../llvm/llvm/unittests/Analysis/SparsePropagation.cpp:230:19: error: field type 'TestLatticeFunc' is an abstract class
  230 |   TestLatticeFunc Lattice;
      |                   ^
../llvm/llvm/include/llvm/Analysis/SparsePropagation.h:90:16: note: unimplemented pure virtual method 'ComputeInstructionState' in 'TestLatticeFunc'
   90 |   virtual void ComputeInstructionState(
      |                ^
In file included from ../llvm/llvm/unittests/Analysis/SparsePropagation.cpp:13:
In file included from ../llvm/third-party/unittest/googletest/include/gtest/gtest.h:65:
In file included from ../llvm/third-party/unittest/googletest/include/gtest/gtest-death-test.h:43:
In file included from ../llvm/third-party/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h:47:
In file included from ../llvm/third-party/unittest/googletest/include/gtest/gtest-matchers.h:49:
In file included from ../llvm/third-party/unittest/googletest/include/gtest/gtest-printers.h:122:
../llvm/third-party/unittest/googletest/include/gtest/internal/gtest-internal.h:457:40: error: cannot initialize return object of type 'Test *' with an rvalue of type 'SparsePropagationTest_MarkBlockExecutable_Test *'
  457 |   Test* CreateTest() override { return new TestClass; }
      |                                        ^~~
../llvm/llvm/unittests/Analysis/SparsePropagation.cpp:255:1: note: in instantiation of member function 'testing::internal::TestFactoryImpl<SparsePropagationTest_MarkBlockExecutable_Test>::CreateTest' requested here
  255 | TEST_F(SparsePropagationTest, MarkBlockExecutable) {
      | ^
../llvm/third-party/unittest/googletest/include/gtest/gtest.h:2208:41: note: expanded from macro 'TEST_F'
 2208 | #define TEST_F(test_fixture, test_name) GTEST_TEST_F(test_fixture, test_name)
      |                                         ^
../llvm/third-party/unittest/googletest/include/gtest/gtest.h:2205:3: note: expanded from macro 'GTEST_TEST_F'
 2205 |   GTEST_TEST_(test_fixture, test_name, test_fixture, \
      |   ^
../llvm/third-party/unittest/googletest/include/gtest/internal/gtest-internal.h:1556:15: note: expanded from macro 'GTEST_TEST_'
 1556 |           new ::testing::internal::TestFactoryImpl<GTEST_TEST_CLASS_NAME_(     \
      |               ^
../llvm/third-party/unittest/googletest/include/gtest/internal/gtest-internal.h:457:40: error: cannot initialize return object of type 'Test *' with an rvalue of type 'SparsePropagationTest_GlobalVariableConstant_Test *'
  457 |   Test* CreateTest() override { return new TestClass; }
      |                                        ^~~
../llvm/llvm/unittests/Analysis/SparsePropagation.cpp:291:1: note: in instantiation of member function 'testing::internal::TestFactoryImpl<SparsePropagationTest_GlobalVariableConstant_Test>::CreateTest' requested here

@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 25, 2024

LLVM Buildbot has detected a new failure on builder clang-cmake-x86_64-avx512-linux running on avx512-intel64 while building llvm at step 7 "ninja check 1".

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

Here is the relevant piece of the build log for the reference
Step 7 (ninja check 1) failure: stage 1 checked (failure)
...
[2/2] Linking CXX shared library /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/lib/clang/20/lib/x86_64-unknown-linux-gnu/libclang_rt.memprof.so
[40/90] Linking CXX executable unittests/Transforms/Vectorize/VectorizeTests
[41/90] cd /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/runtimes/runtimes-bins && /usr/bin/cmake --build /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/runtimes/runtimes-bins/ --target runtimes-test-depends --config Release
ninja: no work to do.
[42/90] No install step for 'runtimes'
[43/90] Linking CXX executable unittests/DebugInfo/LogicalView/DebugInfoLogicalViewTests
[45/90] Completed 'runtimes'
[46/90] Linking CXX executable unittests/tools/llvm-cfi-verify/CFIVerifyTests
[47/90] Linking CXX executable unittests/Transforms/IPO/IPOTests
[48/90] Building CXX object unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o
FAILED: unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o 
/usr/bin/c++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iunittests/Analysis -I/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/llvm/unittests/Analysis -Iinclude -I/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/llvm/include -I/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/third-party/unittest/googletest/include -I/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/third-party/unittest/googlemock/include -march=cascadelake -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -std=c++17 -MD -MT unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o -MF unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o.d -o unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o -c /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/llvm/unittests/Analysis/SparsePropagation.cpp
/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/llvm/unittests/Analysis/SparsePropagation.cpp:141:8: error: ‘void {anonymous}::TestLatticeFunc::ComputeInstructionState(llvm::Instruction&, llvm::DenseMap<llvm::PointerIntPair<llvm::Value*, 2, {anonymous}::IPOGrouping>, {anonymous}::TestLatticeVal>&, llvm::SparseSolver<llvm::PointerIntPair<llvm::Value*, 2, {anonymous}::IPOGrouping>, {anonymous}::TestLatticeVal, llvm::LatticeKeyInfo<llvm::PointerIntPair<llvm::Value*, 2, {anonymous}::IPOGrouping> > >&)’ marked ‘override’, but does not override
  141 |   void ComputeInstructionState(
      |        ^~~~~~~~~~~~~~~~~~~~~~~
/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/llvm/unittests/Analysis/SparsePropagation.cpp:230:19: error: cannot declare field ‘{anonymous}::SparsePropagationTest::Lattice’ to be of abstract type ‘{anonymous}::TestLatticeFunc’
  230 |   TestLatticeFunc Lattice;
      |                   ^~~~~~~
/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/llvm/unittests/Analysis/SparsePropagation.cpp:98:7: note:   because the following virtual functions are pure within ‘{anonymous}::TestLatticeFunc’:
   98 | class TestLatticeFunc
      |       ^~~~~~~~~~~~~~~
In file included from /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/llvm/unittests/Analysis/SparsePropagation.cpp:9:
/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/llvm/include/llvm/Analysis/SparsePropagation.h:90:16: note:     ‘void llvm::AbstractLatticeFunction<LatticeKey, LatticeVal>::ComputeInstructionState(llvm::Instruction&, llvm::SmallDenseMap<LatticeKey, LatticeVal, 16>&, llvm::SparseSolver<LatticeKey, LatticeVal>&) [with LatticeKey = llvm::PointerIntPair<llvm::Value*, 2, {anonymous}::IPOGrouping>; LatticeVal = {anonymous}::TestLatticeVal]’
   90 |   virtual void ComputeInstructionState(
      |                ^~~~~~~~~~~~~~~~~~~~~~~
[49/90] Linking CXX executable unittests/Transforms/Instrumentation/InstrumentationTests
[50/90] Linking CXX executable unittests/CodeGen/GlobalISel/GlobalISelTests
[51/90] Linking CXX executable unittests/MI/MITests
[52/90] Linking CXX executable unittests/Transforms/Coroutines/CoroTests
[53/90] Linking CXX executable unittests/tools/llvm-mca/LLVMMCATests
[54/90] Linking CXX executable unittests/Passes/PassBuilderBindings/PassesBindingsTests
[55/90] Linking CXX executable unittests/Transforms/Utils/UtilsTests
[56/90] Linking CXX executable unittests/Frontend/LLVMFrontendTests
[57/90] Linking CXX executable unittests/MIR/MIRTests
[58/90] Linking CXX executable unittests/Target/TargetMachineCTests
[59/90] Linking CXX executable unittests/ExecutionEngine/Orc/OrcJITTests
[60/90] Linking CXX executable unittests/DebugInfo/DWARF/DebugInfoDWARFTests
[61/90] Linking CXX executable unittests/Transforms/Scalar/ScalarTests
[62/90] Linking CXX executable unittests/Passes/Plugins/PluginsTests
[63/90] Linking CXX executable unittests/Target/X86/X86Tests
[64/90] Linking CXX executable unittests/tools/llvm-exegesis/LLVMExegesisTests
[65/90] Linking CXX executable tools/clang/unittests/Sema/SemaTests
[66/90] Linking CXX executable tools/clang/unittests/Lex/LexTests
[67/90] Linking CXX executable unittests/IR/IRTests
[68/90] Linking CXX executable unittests/ExecutionEngine/MCJIT/MCJITTests
[69/90] Linking CXX executable tools/clang/unittests/Index/IndexTests
[70/90] Linking CXX executable tools/clang/unittests/Support/ClangSupportTests
[71/90] Linking CXX executable tools/clang/unittests/Analysis/ClangAnalysisTests
[72/90] Linking CXX executable tools/clang/unittests/Rewrite/RewriteTests

@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 25, 2024

LLVM Buildbot has detected a new failure on builder lld-x86_64-ubuntu-fast running on as-builder-4 while building llvm at step 6 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
...
2.605 [2/41/672] Linking CXX executable unittests/ObjectYAML/ObjectYAMLTests
2.915 [2/40/673] Linking CXX executable unittests/Support/SupportTests
2.938 [2/39/674] Linking CXX executable unittests/Object/ObjectTests
2.983 [2/38/675] Linking CXX executable unittests/Bitcode/BitcodeTests
3.103 [2/37/676] Linking CXX executable unittests/FuzzMutate/FuzzMutateTests
3.332 [2/36/677] Linking CXX executable unittests/Transforms/Vectorize/VectorizeTests
3.532 [2/35/678] Linking CXX executable unittests/MC/MCTests
3.606 [2/34/679] Linking CXX executable unittests/Transforms/IPO/IPOTests
3.695 [2/33/680] Linking CXX executable unittests/DebugInfo/LogicalView/DebugInfoLogicalViewTests
4.325 [2/32/681] Building CXX object unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o
FAILED: unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/c++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/unittests/Analysis -I/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/unittests/Analysis -I/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/include -I/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/include -I/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/third-party/unittest/googletest/include -I/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/third-party/unittest/googlemock/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -std=c++17 -MD -MT unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o -MF unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o.d -o unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o -c /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp
/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:141:8: error: ‘void {anonymous}::TestLatticeFunc::ComputeInstructionState(llvm::Instruction&, llvm::DenseMap<llvm::PointerIntPair<llvm::Value*, 2, {anonymous}::IPOGrouping>, {anonymous}::TestLatticeVal>&, llvm::SparseSolver<llvm::PointerIntPair<llvm::Value*, 2, {anonymous}::IPOGrouping>, {anonymous}::TestLatticeVal, llvm::LatticeKeyInfo<llvm::PointerIntPair<llvm::Value*, 2, {anonymous}::IPOGrouping> > >&)’ marked ‘override’, but does not override
  141 |   void ComputeInstructionState(
      |        ^~~~~~~~~~~~~~~~~~~~~~~
/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:230:19: error: cannot declare field ‘{anonymous}::SparsePropagationTest::Lattice’ to be of abstract type ‘{anonymous}::TestLatticeFunc’
  230 |   TestLatticeFunc Lattice;
      |                   ^~~~~~~
/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:98:7: note:   because the following virtual functions are pure within ‘{anonymous}::TestLatticeFunc’:
   98 | class TestLatticeFunc
      |       ^~~~~~~~~~~~~~~
In file included from /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:9:
/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/include/llvm/Analysis/SparsePropagation.h:90:16: note:     ‘void llvm::AbstractLatticeFunction<LatticeKey, LatticeVal>::ComputeInstructionState(llvm::Instruction&, llvm::SmallDenseMap<LatticeKey, LatticeVal, 16>&, llvm::SparseSolver<LatticeKey, LatticeVal>&) [with LatticeKey = llvm::PointerIntPair<llvm::Value*, 2, {anonymous}::IPOGrouping>; LatticeVal = {anonymous}::TestLatticeVal]’
   90 |   virtual void ComputeInstructionState(
      |                ^~~~~~~~~~~~~~~~~~~~~~~
4.952 [2/31/682] Linking CXX executable unittests/tools/llvm-cfi-verify/CFIVerifyTests
5.168 [2/30/683] Linking CXX executable unittests/Target/PowerPC/PowerPCTests
5.284 [2/29/684] Linking CXX executable unittests/Target/LoongArch/LoongArchTests
5.377 [2/28/685] Linking CXX executable unittests/Target/VE/VETests
5.507 [2/27/686] Linking CXX executable unittests/Target/WebAssembly/WebAssemblyTests
5.509 [2/26/687] Linking CXX executable unittests/Target/ARM/ARMTests
5.702 [2/25/688] Linking CXX executable unittests/Target/AArch64/AArch64Tests
5.850 [2/24/689] Linking CXX executable unittests/Target/RISCV/RISCVTests
5.925 [2/23/690] Linking CXX executable unittests/Transforms/Instrumentation/InstrumentationTests
6.087 [2/22/691] Linking CXX executable unittests/Frontend/LLVMFrontendTests
6.118 [2/21/692] Linking CXX executable unittests/Transforms/Coroutines/CoroTests
6.364 [2/20/693] Linking CXX executable unittests/tools/llvm-mca/LLVMMCATests
6.405 [2/19/694] Linking CXX executable unittests/Transforms/Utils/UtilsTests
6.635 [2/18/695] Linking CXX executable unittests/Passes/PassBuilderBindings/PassesBindingsTests
6.912 [2/17/696] Linking CXX executable unittests/Passes/Plugins/PluginsTests
7.091 [2/16/697] Linking CXX executable unittests/IR/IRTests
7.115 [2/15/698] Linking CXX executable unittests/Transforms/Scalar/ScalarTests
7.194 [2/14/699] Linking CXX executable unittests/ExecutionEngine/Orc/OrcJITTests
7.424 [2/13/700] Linking CXX executable unittests/Target/X86/X86Tests
7.624 [2/12/701] Linking CXX executable unittests/MC/AMDGPU/AMDGPUMCTests
7.702 [2/11/702] Linking CXX executable unittests/tools/llvm-exegesis/LLVMExegesisTests
7.821 [2/10/703] Linking CXX executable unittests/Target/AMDGPU/AMDGPUTests
8.119 [2/9/704] Linking CXX executable unittests/ExecutionEngine/MCJIT/MCJITTests
10.614 [2/8/705] Linking CXX executable unittests/Target/TargetMachineCTests

@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 25, 2024

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

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

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

OK
6.416 [6/7/135] Building CXX object unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o
FAILED: unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/clang++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/build/buildbot/premerge-monolithic-linux/build/unittests/Analysis -I/build/buildbot/premerge-monolithic-linux/llvm-project/llvm/unittests/Analysis -I/build/buildbot/premerge-monolithic-linux/build/include -I/build/buildbot/premerge-monolithic-linux/llvm-project/llvm/include -I/build/buildbot/premerge-monolithic-linux/llvm-project/third-party/unittest/googletest/include -I/build/buildbot/premerge-monolithic-linux/llvm-project/third-party/unittest/googlemock/include -gmlt -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -std=c++17 -MD -MT unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o -MF unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o.d -o unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o -c /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp
/build/buildbot/premerge-monolithic-linux/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:143:57: error: non-virtual member function marked 'override' hides virtual member function
      SparseSolver<TestLatticeKey, TestLatticeVal> &SS) override {
                                                        ^
/build/buildbot/premerge-monolithic-linux/llvm-project/llvm/include/llvm/Analysis/SparsePropagation.h:90:16: note: hidden overloaded virtual function 'llvm::AbstractLatticeFunction<llvm::PointerIntPair<llvm::Value *, 2, (anonymous namespace)::IPOGrouping>, (anonymous namespace)::TestLatticeVal>::ComputeInstructionState' declared here: type mismatch at 2nd parameter ('SmallDenseMap<PointerIntPair<Value *, 2, IPOGrouping, PointerLikeTypeTraits<Value *>, PointerIntPairInfo<Value *, 2, PointerLikeTypeTraits<Value *>>>, TestLatticeVal, 16> &' vs 'DenseMap<TestLatticeKey, TestLatticeVal> &' (aka 'DenseMap<PointerIntPair<Value *, 2, IPOGrouping>, (anonymous namespace)::TestLatticeVal> &'))
  virtual void ComputeInstructionState(
               ^
/build/buildbot/premerge-monolithic-linux/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:230:19: error: field type 'TestLatticeFunc' is an abstract class
  TestLatticeFunc Lattice;
                  ^
/build/buildbot/premerge-monolithic-linux/llvm-project/llvm/include/llvm/Analysis/SparsePropagation.h:90:16: note: unimplemented pure virtual method 'ComputeInstructionState' in 'TestLatticeFunc'
  virtual void ComputeInstructionState(
               ^
In file included from /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:13:
In file included from /build/buildbot/premerge-monolithic-linux/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:65:
In file included from /build/buildbot/premerge-monolithic-linux/llvm-project/third-party/unittest/googletest/include/gtest/gtest-death-test.h:43:
In file included from /build/buildbot/premerge-monolithic-linux/llvm-project/third-party/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h:47:
In file included from /build/buildbot/premerge-monolithic-linux/llvm-project/third-party/unittest/googletest/include/gtest/gtest-matchers.h:49:
In file included from /build/buildbot/premerge-monolithic-linux/llvm-project/third-party/unittest/googletest/include/gtest/gtest-printers.h:122:
/build/buildbot/premerge-monolithic-linux/llvm-project/third-party/unittest/googletest/include/gtest/internal/gtest-internal.h:457:40: error: cannot initialize return object of type 'Test *' with an rvalue of type 'SparsePropagationTest_MarkBlockExecutable_Test *'
  Test* CreateTest() override { return new TestClass; }
                                       ^~~
/build/buildbot/premerge-monolithic-linux/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:255:1: note: in instantiation of member function 'testing::internal::TestFactoryImpl<SparsePropagationTest_MarkBlockExecutable_Test>::CreateTest' requested here
TEST_F(SparsePropagationTest, MarkBlockExecutable) {
^
/build/buildbot/premerge-monolithic-linux/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:2208:41: note: expanded from macro 'TEST_F'
#define TEST_F(test_fixture, test_name) GTEST_TEST_F(test_fixture, test_name)
                                        ^
/build/buildbot/premerge-monolithic-linux/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:2205:3: note: expanded from macro 'GTEST_TEST_F'
  GTEST_TEST_(test_fixture, test_name, test_fixture, \
  ^
/build/buildbot/premerge-monolithic-linux/llvm-project/third-party/unittest/googletest/include/gtest/internal/gtest-internal.h:1556:15: note: expanded from macro 'GTEST_TEST_'
          new ::testing::internal::TestFactoryImpl<GTEST_TEST_CLASS_NAME_(     \
              ^
/build/buildbot/premerge-monolithic-linux/llvm-project/third-party/unittest/googletest/include/gtest/internal/gtest-internal.h:457:40: error: cannot initialize return object of type 'Test *' with an rvalue of type 'SparsePropagationTest_GlobalVariableConstant_Test *'
  Test* CreateTest() override { return new TestClass; }
                                       ^~~
/build/buildbot/premerge-monolithic-linux/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:291:1: note: in instantiation of member function 'testing::internal::TestFactoryImpl<SparsePropagationTest_GlobalVariableConstant_Test>::CreateTest' requested here

jmorse added a commit that referenced this pull request Sep 26, 2024
This time with 100% more building unit tests. Original commit message follows.

[NFC] Switch a number of DenseMaps to SmallDenseMaps for speedup (#109417)

If we use SmallDenseMaps instead of DenseMaps at these locations,
we get a substantial speedup because there's less spurious malloc
traffic. Discovered by instrumenting DenseMap with some accounting
code, then selecting sites where we'll get the most bang for our buck.
@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 26, 2024

LLVM Buildbot has detected a new failure on builder clang-x86_64-debian-fast running on gribozavr4 while building llvm at step 6 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
...
4.250 [2/20/1155] Linking CXX executable tools/clang/unittests/Serialization/SerializationTests
4.280 [2/19/1156] Linking CXX executable tools/clang/unittests/Index/IndexTests
4.299 [2/18/1157] Linking CXX executable unittests/tools/llvm-exegesis/LLVMExegesisTests
4.309 [2/17/1158] Linking CXX executable unittests/ExecutionEngine/MCJIT/MCJITTests
4.313 [2/16/1159] Linking CXX executable tools/clang/unittests/AST/ASTTests
4.314 [2/15/1160] Linking CXX executable unittests/Target/AMDGPU/AMDGPUTests
5.069 [2/14/1161] Linking CXX executable unittests/MIR/MIRTests
5.081 [2/13/1162] Linking CXX executable tools/clang/unittests/CodeGen/ClangCodeGenTests
5.085 [2/12/1163] Linking CXX executable unittests/Target/TargetMachineCTests
5.116 [2/11/1164] Building CXX object unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o
FAILED: unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/clang++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/b/1/clang-x86_64-debian-fast/llvm.obj/unittests/Analysis -I/b/1/clang-x86_64-debian-fast/llvm.src/llvm/unittests/Analysis -I/b/1/clang-x86_64-debian-fast/llvm.obj/include -I/b/1/clang-x86_64-debian-fast/llvm.src/llvm/include -I/b/1/clang-x86_64-debian-fast/llvm.src/third-party/unittest/googletest/include -I/b/1/clang-x86_64-debian-fast/llvm.src/third-party/unittest/googlemock/include -std=c++11 -Wdocumentation -Wno-documentation-deprecated-sync -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 -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -std=c++17 -MD -MT unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o -MF unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o.d -o unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o -c /b/1/clang-x86_64-debian-fast/llvm.src/llvm/unittests/Analysis/SparsePropagation.cpp
/b/1/clang-x86_64-debian-fast/llvm.src/llvm/unittests/Analysis/SparsePropagation.cpp:143:57: error: non-virtual member function marked 'override' hides virtual member function
      SparseSolver<TestLatticeKey, TestLatticeVal> &SS) override {
                                                        ^
/b/1/clang-x86_64-debian-fast/llvm.src/llvm/include/llvm/Analysis/SparsePropagation.h:90:16: note: hidden overloaded virtual function 'llvm::AbstractLatticeFunction<llvm::PointerIntPair<llvm::Value *, 2, (anonymous namespace)::IPOGrouping, llvm::PointerLikeTypeTraits<llvm::Value *>, llvm::PointerIntPairInfo<llvm::Value *, 2, llvm::PointerLikeTypeTraits<llvm::Value *>>>, (anonymous namespace)::TestLatticeVal>::ComputeInstructionState' declared here: type mismatch at 2nd parameter ('SmallDenseMap<llvm::PointerIntPair<llvm::Value *, 2, (anonymous namespace)::IPOGrouping, llvm::PointerLikeTypeTraits<llvm::Value *>, llvm::PointerIntPairInfo<llvm::Value *, 2, llvm::PointerLikeTypeTraits<llvm::Value *>>>, (anonymous namespace)::TestLatticeVal, 16> &' vs 'DenseMap<(anonymous namespace)::TestLatticeKey, (anonymous namespace)::TestLatticeVal> &' (aka 'DenseMap<PointerIntPair<llvm::Value *, 2, (anonymous namespace)::IPOGrouping>, (anonymous namespace)::TestLatticeVal> &'))
  virtual void ComputeInstructionState(
               ^
/b/1/clang-x86_64-debian-fast/llvm.src/llvm/unittests/Analysis/SparsePropagation.cpp:230:19: error: field type '(anonymous namespace)::TestLatticeFunc' is an abstract class
  TestLatticeFunc Lattice;
                  ^
/b/1/clang-x86_64-debian-fast/llvm.src/llvm/include/llvm/Analysis/SparsePropagation.h:90:16: note: unimplemented pure virtual method 'ComputeInstructionState' in 'TestLatticeFunc'
  virtual void ComputeInstructionState(
               ^
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/llvm/unittests/Analysis/SparsePropagation.cpp:13:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/third-party/unittest/googletest/include/gtest/gtest.h:65:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/third-party/unittest/googletest/include/gtest/gtest-death-test.h:43:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/third-party/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h:47:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/third-party/unittest/googletest/include/gtest/gtest-matchers.h:49:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/third-party/unittest/googletest/include/gtest/gtest-printers.h:122:
/b/1/clang-x86_64-debian-fast/llvm.src/third-party/unittest/googletest/include/gtest/internal/gtest-internal.h:457:40: error: cannot initialize return object of type 'testing::Test *' with an rvalue of type 'SparsePropagationTest_MarkBlockExecutable_Test *'
  Test* CreateTest() override { return new TestClass; }
                                       ^~~
/b/1/clang-x86_64-debian-fast/llvm.src/llvm/unittests/Analysis/SparsePropagation.cpp:255:1: note: in instantiation of member function 'testing::internal::TestFactoryImpl<SparsePropagationTest_MarkBlockExecutable_Test>::CreateTest' requested here
TEST_F(SparsePropagationTest, MarkBlockExecutable) {
^
/b/1/clang-x86_64-debian-fast/llvm.src/third-party/unittest/googletest/include/gtest/gtest.h:2208:41: note: expanded from macro 'TEST_F'
#define TEST_F(test_fixture, test_name) GTEST_TEST_F(test_fixture, test_name)
                                        ^
/b/1/clang-x86_64-debian-fast/llvm.src/third-party/unittest/googletest/include/gtest/gtest.h:2205:3: note: expanded from macro 'GTEST_TEST_F'
  GTEST_TEST_(test_fixture, test_name, test_fixture, \
  ^
/b/1/clang-x86_64-debian-fast/llvm.src/third-party/unittest/googletest/include/gtest/internal/gtest-internal.h:1556:15: note: expanded from macro 'GTEST_TEST_'
          new ::testing::internal::TestFactoryImpl<GTEST_TEST_CLASS_NAME_(     \
              ^
/b/1/clang-x86_64-debian-fast/llvm.src/third-party/unittest/googletest/include/gtest/internal/gtest-internal.h:457:40: error: cannot initialize return object of type 'testing::Test *' with an rvalue of type 'SparsePropagationTest_GlobalVariableConstant_Test *'
  Test* CreateTest() override { return new TestClass; }
                                       ^~~
/b/1/clang-x86_64-debian-fast/llvm.src/llvm/unittests/Analysis/SparsePropagation.cpp:291:1: note: in instantiation of member function 'testing::internal::TestFactoryImpl<SparsePropagationTest_GlobalVariableConstant_Test>::CreateTest' requested here

@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 26, 2024

LLVM Buildbot has detected a new failure on builder llvm-x86_64-debian-dylib running on gribozavr4 while building llvm at step 7 "test-build-unified-tree-check-llvm".

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

Here is the relevant piece of the build log for the reference
Step 7 (test-build-unified-tree-check-llvm) failure: test (failure)
...
1.185 [2/10/687] Linking CXX executable unittests/Target/LoongArch/LoongArchTests
1.216 [2/9/688] Linking CXX executable unittests/Target/WebAssembly/WebAssemblyTests
1.221 [2/8/689] Linking CXX executable unittests/Target/VE/VETests
1.323 [2/7/690] Linking CXX executable unittests/Target/ARM/ARMTests
1.344 [2/6/691] Linking CXX executable unittests/Target/RISCV/RISCVTests
1.363 [2/5/692] Linking CXX executable unittests/Target/AArch64/AArch64Tests
1.457 [2/4/693] Linking CXX executable unittests/tools/llvm-mca/LLVMMCATests
1.871 [2/3/694] Linking CXX executable unittests/tools/llvm-exegesis/LLVMExegesisTests
1.968 [2/2/695] Linking CXX executable unittests/Target/AMDGPU/AMDGPUTests
2.814 [2/1/696] Building CXX object unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o
FAILED: unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/b/1/llvm-x86_64-debian-dylib/build/unittests/Analysis -I/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/unittests/Analysis -I/b/1/llvm-x86_64-debian-dylib/build/include -I/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/include -I/b/1/llvm-x86_64-debian-dylib/llvm-project/third-party/unittest/googletest/include -I/b/1/llvm-x86_64-debian-dylib/llvm-project/third-party/unittest/googlemock/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 -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -std=c++17 -MD -MT unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o -MF unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o.d -o unittests/Analysis/CMakeFiles/AnalysisTests.dir/SparsePropagation.cpp.o -c /b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:143:57: error: non-virtual member function marked 'override' hides virtual member function
      SparseSolver<TestLatticeKey, TestLatticeVal> &SS) override {
                                                        ^
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/include/llvm/Analysis/SparsePropagation.h:90:16: note: hidden overloaded virtual function 'llvm::AbstractLatticeFunction<llvm::PointerIntPair<llvm::Value *, 2, (anonymous namespace)::IPOGrouping, llvm::PointerLikeTypeTraits<llvm::Value *>, llvm::PointerIntPairInfo<llvm::Value *, 2, llvm::PointerLikeTypeTraits<llvm::Value *>>>, (anonymous namespace)::TestLatticeVal>::ComputeInstructionState' declared here: type mismatch at 2nd parameter ('SmallDenseMap<llvm::PointerIntPair<llvm::Value *, 2, (anonymous namespace)::IPOGrouping, llvm::PointerLikeTypeTraits<llvm::Value *>, llvm::PointerIntPairInfo<llvm::Value *, 2, llvm::PointerLikeTypeTraits<llvm::Value *>>>, (anonymous namespace)::TestLatticeVal, 16> &' vs 'DenseMap<(anonymous namespace)::TestLatticeKey, (anonymous namespace)::TestLatticeVal> &' (aka 'DenseMap<PointerIntPair<llvm::Value *, 2, (anonymous namespace)::IPOGrouping>, (anonymous namespace)::TestLatticeVal> &'))
  virtual void ComputeInstructionState(
               ^
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:230:19: error: field type '(anonymous namespace)::TestLatticeFunc' is an abstract class
  TestLatticeFunc Lattice;
                  ^
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/include/llvm/Analysis/SparsePropagation.h:90:16: note: unimplemented pure virtual method 'ComputeInstructionState' in 'TestLatticeFunc'
  virtual void ComputeInstructionState(
               ^
In file included from /b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:13:
In file included from /b/1/llvm-x86_64-debian-dylib/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:65:
In file included from /b/1/llvm-x86_64-debian-dylib/llvm-project/third-party/unittest/googletest/include/gtest/gtest-death-test.h:43:
In file included from /b/1/llvm-x86_64-debian-dylib/llvm-project/third-party/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h:47:
In file included from /b/1/llvm-x86_64-debian-dylib/llvm-project/third-party/unittest/googletest/include/gtest/gtest-matchers.h:49:
In file included from /b/1/llvm-x86_64-debian-dylib/llvm-project/third-party/unittest/googletest/include/gtest/gtest-printers.h:122:
/b/1/llvm-x86_64-debian-dylib/llvm-project/third-party/unittest/googletest/include/gtest/internal/gtest-internal.h:457:40: error: cannot initialize return object of type 'testing::Test *' with an rvalue of type 'SparsePropagationTest_MarkBlockExecutable_Test *'
  Test* CreateTest() override { return new TestClass; }
                                       ^~~
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:255:1: note: in instantiation of member function 'testing::internal::TestFactoryImpl<SparsePropagationTest_MarkBlockExecutable_Test>::CreateTest' requested here
TEST_F(SparsePropagationTest, MarkBlockExecutable) {
^
/b/1/llvm-x86_64-debian-dylib/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:2208:41: note: expanded from macro 'TEST_F'
#define TEST_F(test_fixture, test_name) GTEST_TEST_F(test_fixture, test_name)
                                        ^
/b/1/llvm-x86_64-debian-dylib/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:2205:3: note: expanded from macro 'GTEST_TEST_F'
  GTEST_TEST_(test_fixture, test_name, test_fixture, \
  ^
/b/1/llvm-x86_64-debian-dylib/llvm-project/third-party/unittest/googletest/include/gtest/internal/gtest-internal.h:1556:15: note: expanded from macro 'GTEST_TEST_'
          new ::testing::internal::TestFactoryImpl<GTEST_TEST_CLASS_NAME_(     \
              ^
/b/1/llvm-x86_64-debian-dylib/llvm-project/third-party/unittest/googletest/include/gtest/internal/gtest-internal.h:457:40: error: cannot initialize return object of type 'testing::Test *' with an rvalue of type 'SparsePropagationTest_GlobalVariableConstant_Test *'
  Test* CreateTest() override { return new TestClass; }
                                       ^~~
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/unittests/Analysis/SparsePropagation.cpp:291:1: note: in instantiation of member function 'testing::internal::TestFactoryImpl<SparsePropagationTest_GlobalVariableConstant_Test>::CreateTest' requested here

augusto2112 pushed a commit to augusto2112/llvm-project that referenced this pull request Sep 26, 2024
…m#109417)

If we use SmallDenseMaps instead of DenseMaps at these locations,
we get a substantial speedup because there's less spurious malloc
traffic. Discovered by instrumenting DenseMap with some accounting
code, then selecting sites where we'll get the most bang for our buck.
augusto2112 pushed a commit to augusto2112/llvm-project that referenced this pull request Sep 26, 2024
…dup (llvm#109417)"

This reverts commit 3f37c51.

Lo and behold, I missed a unit test
augusto2112 pushed a commit to augusto2112/llvm-project that referenced this pull request Sep 26, 2024
This time with 100% more building unit tests. Original commit message follows.

[NFC] Switch a number of DenseMaps to SmallDenseMaps for speedup (llvm#109417)

If we use SmallDenseMaps instead of DenseMaps at these locations,
we get a substantial speedup because there's less spurious malloc
traffic. Discovered by instrumenting DenseMap with some accounting
code, then selecting sites where we'll get the most bang for our buck.
Sterling-Augustine pushed a commit to Sterling-Augustine/llvm-project that referenced this pull request Sep 27, 2024
This time with 100% more building unit tests. Original commit message follows.

[NFC] Switch a number of DenseMaps to SmallDenseMaps for speedup (llvm#109417)

If we use SmallDenseMaps instead of DenseMaps at these locations,
we get a substantial speedup because there's less spurious malloc
traffic. Discovered by instrumenting DenseMap with some accounting
code, then selecting sites where we'll get the most bang for our buck.
xgupta pushed a commit to xgupta/llvm-project that referenced this pull request Oct 4, 2024
…m#109417)

If we use SmallDenseMaps instead of DenseMaps at these locations,
we get a substantial speedup because there's less spurious malloc
traffic. Discovered by instrumenting DenseMap with some accounting
code, then selecting sites where we'll get the most bang for our buck.
xgupta pushed a commit to xgupta/llvm-project that referenced this pull request Oct 4, 2024
…dup (llvm#109417)"

This reverts commit 3f37c51.

Lo and behold, I missed a unit test
xgupta pushed a commit to xgupta/llvm-project that referenced this pull request Oct 4, 2024
This time with 100% more building unit tests. Original commit message follows.

[NFC] Switch a number of DenseMaps to SmallDenseMaps for speedup (llvm#109417)

If we use SmallDenseMaps instead of DenseMaps at these locations,
we get a substantial speedup because there's less spurious malloc
traffic. Discovered by instrumenting DenseMap with some accounting
code, then selecting sites where we'll get the most bang for our buck.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants