[llvm-commits] [llvm] r71077 - in /llvm/trunk: lib/Transforms/IPO/FunctionAttrs.cpp test/Transforms/FunctionAttrs/2009-05-06-Malloc.ll
Duncan Sands
baldrick at free.fr
Thu May 7 09:45:03 PDT 2009
Hi,
> >> Fix PR3754: don't mark functions that wrap MallocInst with
> >> the readnone. Since MallocInst is scheduled for deletion
> >> it doesn't seem worth doing anything more subtle, such as
> >> having mayWriteToMemory return true for MallocInst.
> >
> > I don't like this fix at all. What's wrong with just making
> > mayWriteToMemory return true on MallocInst?
>
> I agree, that seems like the obvious fix...?
because that would possibly pessimize places that may start
thinking that a MallocInst can modify local memory etc. Rather
than analyzing all such places etc, I'd prefer to spend my time
on deleting MallocInst altogether. In the meantime, this small
patch fixes a real problem.
Ciao,
Duncan.
More information about the llvm-commits
mailing list