From 7b412cb823f09378d45a0d0baf1127f4466c640c Mon Sep 17 00:00:00 2001
From: Chris Lattner
Consider the following fragment of Java code: @@ -193,6 +191,9 @@ Entry: %X = alloca %Object* ... + ;; Java null-initializes pointers. + store %Object* null, %Object** %X + ;; "CodeBlock" is the block corresponding to the start ;; of the scope above. CodeBlock: diff --git a/llvm/lib/Transforms/Scalar/LowerGC.cpp b/llvm/lib/Transforms/Scalar/LowerGC.cpp index 9807099..bac7ac7 100644 --- a/llvm/lib/Transforms/Scalar/LowerGC.cpp +++ b/llvm/lib/Transforms/Scalar/LowerGC.cpp @@ -284,10 +284,7 @@ bool LowerGC::runOnFunction(Function &F) { new StoreInst(Null, RootPtrPtr, IP); // Each occurrance of the llvm.gcroot intrinsic now turns into an - // initialization of the slot with the address and a zeroing out of the - // address specified. - new StoreInst(Constant::getNullValue(PtrLocTy->getElementType()), - GCRoots[i]->getOperand(1), GCRoots[i]); + // initialization of the slot with the address. new StoreInst(GCRoots[i]->getOperand(1), RootPtrPtr, GCRoots[i]); } -- cgit v1.1