Commit d8e1c20
authored
[LangRef] Clarify norecurse attribute definition when a function could occur in a cycle in dynamic call-graph (#157087)
Update the definition of the `norecurse` attribute to forbid marking a
function as `norecurse` if any call path from its body may reach it
(possibly through an external function without a visible definition).
This makes it clear that `norecurse` excludes both direct and mutual
recursion, even when recursion could arise through callees in separate
modules.
This kind of scenario only arises when norecurse is forced through a llvm user option `-mllvm -force-attribute=<fname>:norecurse`
There are a few examples in
#157081 which shows that the
function attribute inference incorrectly infers norecurse when the
behavior (as per new definition) is not enforced.1 parent aac8eb8 commit d8e1c20
1 file changed
+10
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2256 | 2256 | | |
2257 | 2257 | | |
2258 | 2258 | | |
2259 | | - | |
2260 | | - | |
2261 | | - | |
| 2259 | + | |
| 2260 | + | |
| 2261 | + | |
| 2262 | + | |
| 2263 | + | |
| 2264 | + | |
| 2265 | + | |
| 2266 | + | |
| 2267 | + | |
| 2268 | + | |
2262 | 2269 | | |
2263 | 2270 | | |
2264 | 2271 | | |
| |||
0 commit comments