[llvm-commits] [llvm] r49515 - in /llvm/branches/ggreif/use-diet: include/llvm/Use.h include/llvm/User.h lib/VMCore/Use.cpp
Nick Lewycky
nicholas at mxc.ca
Thu Apr 10 19:52:58 PDT 2008
Gabor Greif wrote:
> Modified: llvm/branches/ggreif/use-diet/include/llvm/User.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/use-diet/include/llvm/User.h?rev=49515&r1=49514&r2=49515&view=diff
>
> ==============================================================================
> --- llvm/branches/ggreif/use-diet/include/llvm/User.h (original)
> +++ llvm/branches/ggreif/use-diet/include/llvm/User.h Thu Apr 10 21:23:37 2008
> @@ -254,7 +254,9 @@
> return OperandTraits<User>::op_begin(const_cast<User*>(this))[Idx];
> }
> inline Use *allocHangoffUses(unsigned) const;
> - void dropHungoffUses(Use*);
> + void dropHungoffUses(Use *U) {
> + U->zap(U, U->getImpliedUser());
> + }
Tab.
>
> Value *getOperand(unsigned i) const {
> assert(i < NumOperands && "getOperand() out of range!");
>
> Modified: llvm/branches/ggreif/use-diet/lib/VMCore/Use.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/use-diet/lib/VMCore/Use.cpp?rev=49515&r1=49514&r2=49515&view=diff
>
> ==============================================================================
> --- llvm/branches/ggreif/use-diet/lib/VMCore/Use.cpp (original)
> +++ llvm/branches/ggreif/use-diet/lib/VMCore/Use.cpp Thu Apr 10 21:23:37 2008
> @@ -49,6 +49,10 @@
> }
> }
>
> +//===----------------------------------------------------------------------===//
> +// Use initTags Implementation
> +//===----------------------------------------------------------------------===//
> +
> void Use::initTags(Use *Start, Use *Stop, ptrdiff_t Done) {
> ptrdiff_t Count = 0;
> while (Start != Stop)
> @@ -66,5 +70,14 @@
> }
> }
>
> +//===----------------------------------------------------------------------===//
> +// Use zap Implementation
> +//===----------------------------------------------------------------------===//
>
> +void Use::zap(Use *Start, const Use *Stop) {
> + while (Start != Stop) {
> + (Start++)->set(0);
> + }
Tab.
More information about the llvm-commits
mailing list