[llvm-commits] [llvm] r56341 - in /llvm/trunk: include/llvm/ include/llvm/Transforms/ lib/Transforms/IPO/ test/Analysis/GlobalsModRef/ test/Transforms/AddReadAttrs/

Duncan Sands baldrick at free.fr
Sat Sep 20 09:52:00 PDT 2008


Hi Devang,

> > +    if (F == 0)
> > +      // May write memory.
> > +      return false;
> 
> ??

this occurs for the external nodes, which represent
an unknown external function.  I've added a comment.

> > +    if (F->isDeclaration() || F->hasWeakLinkage()) {
> 
> What about CommonLinkage, GhostLinkage etc..?

I was following the logic in resolveAliasedGlobal (which
shouldn't resolve aliases if they are not definitive, i.e.
may be overridden).  Perhaps Anton can comment.  Anyway,
hopefully PR2742 will take care of all such problems.

> How about using mayReadMemory() and mayWriteMemory() here ?

Good idea, done!

Thanks for the review,

Duncan.



More information about the llvm-commits mailing list