[all-commits] [llvm/llvm-project] 0291e2: [Inliner] Run always-inliner in inliner-wrapper
aeubanks via All-commits
all-commits at lists.llvm.org
Thu Oct 22 19:16:48 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 0291e2c9330930bd74bfb8206cf6447a84bf492c
https://github.com/llvm/llvm-project/commit/0291e2c9330930bd74bfb8206cf6447a84bf492c
Author: Arthur Eubanks <aeubanks at google.com>
Date: 2020-10-22 (Thu, 22 Oct 2020)
Changed paths:
M llvm/lib/Transforms/IPO/Inliner.cpp
M llvm/test/Other/new-pm-defaults.ll
M llvm/test/Other/new-pm-lto-defaults.ll
A llvm/test/Other/new-pm-module-inliner-wrapper.ll
M llvm/test/Other/new-pm-thinlto-defaults.ll
M llvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll
M llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll
M llvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll
M llvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll
M llvm/test/Other/scc-deleted-printer.ll
M llvm/test/Transforms/Inline/inline_stats.ll
A llvm/test/Transforms/Inline/pr46945.ll
Log Message:
-----------
[Inliner] Run always-inliner in inliner-wrapper
An alwaysinline function may not get inlined in inliner-wrapper due to
the inlining order.
Previously for the following, the inliner would first inline @a() into @b(),
```
define void @a() {
entry:
call void @b()
ret void
}
define void @b() alwaysinline {
entry:
br label %for.cond
for.cond:
call void @a()
br label %for.cond
}
```
making @b() recursive and unable to be inlined into @a(), ending at
```
define void @a() {
entry:
call void @b()
ret void
}
define void @b() alwaysinline {
entry:
br label %for.cond
for.cond:
call void @b()
br label %for.cond
}
```
Running always-inliner first makes sure that we respect alwaysinline in more cases.
Fixes https://bugs.llvm.org/show_bug.cgi?id=46945.
Reviewed By: davidxl, rnk
Differential Revision: https://reviews.llvm.org/D86988
More information about the All-commits
mailing list