[PATCH] D58694: LLVM: Optimization Pass: Function Attribute: Fix error caused by adding incompactible attribute to WriteOnly attribute of pointer argument

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 3 11:13:54 PDT 2019


jdoerfert added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/FunctionAttrs.cpp:281
     F->removeFnAttr(Attribute::ReadNone);
     F->removeFnAttr(Attribute::WriteOnly);
 
----------------
jdoerfert wrote:
> In my opinion, this is what you want to do when a new attribute is derived: Clear the existing incompatible ones.
> 
> 
To make it clearer, this is what we *always* should do when a new attribute is derived, not only for *write-only* attributes at this particular position you modified.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D58694





More information about the llvm-commits mailing list