[llvm-commits] CVS: llvm/lib/CodeGen/RegAlloc/AllocInfo.h
Brian Gaeke
gaeke at cs.uiuc.edu
Thu Oct 23 15:40:01 PDT 2003
Changes in directory llvm/lib/CodeGen/RegAlloc:
AllocInfo.h updated: 1.1 -> 1.2
---
Log message:
Move the implementations of ==, != on AllocInfos here, from UnpackTraceFunction.
---
Diffs of the changes: (+9 -0)
Index: llvm/lib/CodeGen/RegAlloc/AllocInfo.h
diff -u llvm/lib/CodeGen/RegAlloc/AllocInfo.h:1.1 llvm/lib/CodeGen/RegAlloc/AllocInfo.h:1.2
--- llvm/lib/CodeGen/RegAlloc/AllocInfo.h:1.1 Thu Oct 23 15:31:51 2003
+++ llvm/lib/CodeGen/RegAlloc/AllocInfo.h Thu Oct 23 15:39:18 2003
@@ -56,6 +56,15 @@
CV.push_back (ConstantSInt::get (Type::IntTy, Placement));
return ConstantStruct::get (ST, CV);
}
+
+ /// AllocInfos compare equal if the allocation placements are equal
+ /// (i.e., they can be equal even if they refer to operands from two
+ /// different instructions.)
+ ///
+ bool operator== (const AllocInfo &X) const {
+ return (X.AllocState == AllocState) && (X.Placement == Placement);
+ }
+ bool operator!= (const AllocInfo &X) const { return !(*this == X); }
};
#endif // ALLOCINFO_H
More information about the llvm-commits
mailing list