dexonsmith added a comment.

In D83906#4182847 <https://reviews.llvm.org/D83906#4182847>, @hoy wrote:

> As far as I know, the optimizer IPO pass that infers function attributes 
> (i..e `InferFunctionAttrsPass`) is placed at the very beginning of the 
> optimization pipeline.  Does this sound to you that the side effects computed 
> for linkonce_odr functions there can be trusted by the rest of the pipeline?

Depends what you mean by "trusted". It assumes the attributes accurately 
describe the function it sees. The properties promised there will apply if/when 
the code is inlined. But, since the commit in 2016, it doesn't trust that they 
fully describe the source semantics, so IPA ignores them when the function is 
not inlined.

Note that the optimizer doesn't know if its input IR has already been 
optimized. Is this the first optimizer that has run on the IR, or could side 
effects have been refined away already? E.g., if the optimization pipeline in 
question runs at LTO time, the compile-time optimization pipeline has already 
run.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83906/new/

https://reviews.llvm.org/D83906

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to