[PATCH] D63046: [Attributor] Deduce "willreturn" function attribute
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 5 19:54:17 PDT 2019
jdoerfert requested changes to this revision.
jdoerfert added inline comments.
This revision now requires changes to proceed.
================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:331
+ // Assume that all intrinsic without noreturn are willreturn
+ if (isa<IntrinsicInst>(I) && !ICS.hasFnAttr(Attribute::NoReturn)) {
+ continue;
----------------
I think we should be cautious and not mark intrinsics as `willreturn` in the update method but instead do it explicitly as such in the `Intrinsics.td` file.
Also, drop the braces around single statements.
================
Comment at: llvm/test/Transforms/FunctionAttrs/willreturn.ll:2
; RUN: opt -functionattrs -S < %s | FileCheck %s --check-prefix=FNATTR
+; RUN: opt -attributor -S < %s | FileCheck %s --check-prefix=ATTRIBUTOR
+
----------------
Explicitly activate the attributor.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63046/new/
https://reviews.llvm.org/D63046
More information about the llvm-commits
mailing list