================
@@ -889,10 +919,50 @@ inline raw_ostream &operator<<(raw_ostream &OS, const 
Value &V) {
   return OS;
 }
 
+inline Use::~Use() {
+  if (Val)
+    Val->removeUse(*this);
+}
+
+void Use::addToList(unsigned &Count) {
+  assert(isa<ConstantData>(Val) && "Only ConstantData is ref-counted");
+  ++Count;
+
+  // We don't have a uselist - clear the remnant if we are replacing a
+  // non-constant value.
+  Prev = nullptr;
+  Next = nullptr;
----------------
arsenm wrote:

I meant to revisit this. I think this was only a problem in cases where 
Use::swap was used between a register and a constant 

https://github.com/llvm/llvm-project/pull/134692
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to