[PATCH] D60074: [Attributor] Deduce "no-recurse" function attribute
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 7 11:25:08 PDT 2019
efriedma added a comment.
In terms of the correctness of this patch, I'm specifically concerned that this patch has no equivalent to the `SCCNodes.size() != 1` check in FunctionAttrs, so it will derive norecurse in cases where FunctionAttrs would not. For example:
define void @f(i32 %x) {
entry:
%x.addr = alloca i32, align 4
store i32 %x, i32* %x.addr, align 4
%0 = load i32, i32* %x.addr, align 4
%tobool = icmp ne i32 %0, 0
br i1 %tobool, label %if.then, label %if.end
if.then:
call void @g() norecurse
br label %if.end
if.end:
ret void
}
define void @g() norecurse {
entry:
call void @f(i32 0)
ret void
}
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60074/new/
https://reviews.llvm.org/D60074
More information about the llvm-commits
mailing list