[PATCH] [Inliner] Use whitelist instead of blacklist when checking function attribute compatibility and make the check stricter

Akira Hatanaka ahatanak at gmail.com
Thu Apr 23 14:42:59 PDT 2015


In http://reviews.llvm.org/D7802#155864, @mkuper wrote:

> As a side note, I just ran into the - more or less - mirror image of this.
>
> CodeExtractor currently doesn't copy any function attributes into the function it creates (except, for some reason, nounwind). 
>  Copying all attributes, however, doesn't seem safe. For example, a readnone function can have a stack allocation and the pointer can be passed into the extracted function. On the other hand, we definitely want to copy target-cpu/target-features.


I can confirm CodeExtractor doesn't copy target-cpu and target-features. I haven't thought through the solution, but probably we can either fix CodeExtractor to recompute the attributes like readnone or remove them and let FunctionAttrs deduce them later.


http://reviews.llvm.org/D7802

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list