[LLVMdev] setOnlyReadsMemory / setDoesNotAccessMemory

Duncan Sands baldrick at free.fr
Tue Aug 18 11:10:54 PDT 2009


Hi,

> Last time I checked, the optimizers don't consider the possibility of 
> readonly/readnone
> functions unwinding, and hence will happily eliminate calls to 
> readonly/readnone functions,
> even when they aren't marked nounwind.  So if your function can unwind, 
> don't mark it
> readonly/readnone.

the situation has improved in svn.  For example, an unused call to a
readonly function is not be removed unless the function is also marked
nounwind.

Ciao,

Duncan.



More information about the llvm-dev mailing list