void accessesGlobal(StoreInst* SI) { Value *V = SI->getPointerOperand(); if (isa(V)) return true; if (ConstantExpr *CE = dyn_cast(V)) if (CE->getOpcode() == Instruction::GetElementPtr) if (isa(CE->getOperand(0))) return true; return false; }