X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FIR%2FValue.cpp;h=925f2058e5592f48dd06ce9cfeab7e9c48fbba15;hb=ded192283600c9bc462017bb2ca81b2c0b419b42;hp=eb5c2253f4e0c81278310f85c35fca52e638df20;hpb=aaa3fa61d2d2107095f90648249ffb2f6f7099ca;p=oota-llvm.git diff --git a/lib/IR/Value.cpp b/lib/IR/Value.cpp index eb5c2253f4e..925f2058e55 100644 --- a/lib/IR/Value.cpp +++ b/lib/IR/Value.cpp @@ -39,8 +39,6 @@ using namespace llvm; //===----------------------------------------------------------------------===// // Value Class //===----------------------------------------------------------------------===// -const unsigned Value::NumUserOperandsBits; - static inline Type *checkType(Type *Ty) { assert(Ty && "Value defined with a null type: Error!"); return Ty; @@ -369,7 +367,7 @@ void Value::replaceAllUsesWith(Value *New) { // constant because they are uniqued. if (auto *C = dyn_cast(U.getUser())) { if (!isa(C)) { - C->replaceUsesOfWithOnConstant(this, New, &U); + C->handleOperandChange(this, New, &U); continue; } } @@ -492,8 +490,7 @@ Value *Value::stripAndAccumulateInBoundsConstantOffsets(const DataLayout &DL, return V; Offset = GEPOffset; V = GEP->getPointerOperand(); - } else if (Operator::getOpcode(V) == Instruction::BitCast || - Operator::getOpcode(V) == Instruction::AddrSpaceCast) { + } else if (Operator::getOpcode(V) == Instruction::BitCast) { V = cast(V)->getOperand(0); } else if (GlobalAlias *GA = dyn_cast(V)) { V = GA->getAliasee();