[llvm-commits] [llvm] r89602 - /llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp
Duncan Sands
baldrick at free.fr
Mon Nov 23 00:24:10 PST 2009
Hi Chris,
> bool BasicAliasAnalysis::pointsToConstantMemory(const Value *P) {
> if (const GlobalVariable *GV =
> dyn_cast<GlobalVariable>(P->getUnderlyingObject()))
> + // FIXME: shouldn't this require GV to be "ODR"?
I'm not sure, but I think it's the case that something declared weak and
constant can safely be considered constant, i.e. readonly. However you
can't assume that the initializer it has is correct - some other (read-only)
initializer may be substituted at link time.
Ciao,
Duncan.
More information about the llvm-commits
mailing list