[all-commits] [llvm/llvm-project] 00a831: [AArch64][SME] Extend Inliner cost-model with cust...
Sander de Smalen via All-commits
all-commits at lists.llvm.org
Tue Oct 31 03:29:02 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 00a831421fdd94aec65221bdb37042c1aacfe8e0
https://github.com/llvm/llvm-project/commit/00a831421fdd94aec65221bdb37042c1aacfe8e0
Author: Sander de Smalen <sander.desmalen at arm.com>
Date: 2023-10-31 (Tue, 31 Oct 2023)
Changed paths:
M llvm/include/llvm/Analysis/InlineCost.h
M llvm/include/llvm/Analysis/TargetTransformInfo.h
M llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
M llvm/lib/Analysis/InlineCost.cpp
M llvm/lib/Analysis/TargetTransformInfo.cpp
M llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
M llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
M llvm/lib/Transforms/IPO/PartialInlining.cpp
A llvm/test/Transforms/Inline/AArch64/sme-pstatesm-attrs-low-threshold.ll
M llvm/test/Transforms/Inline/AArch64/sme-pstatesm-attrs.ll
Log Message:
-----------
[AArch64][SME] Extend Inliner cost-model with custom penalty for calls. (#68416)
This is a stacked PR following on from #68415
This patch has two purposes:
(1) It tries to make inlining more likely when it can avoid a
streaming-mode change.
(2) It avoids inlining when inlining causes more streaming-mode changes.
An example of (1) is:
```
void streaming_compatible_bar(void);
void foo(void) __arm_streaming {
/* other code */
streaming_compatible_bar();
/* other code */
}
void f(void) {
foo(); // expensive streaming mode change
}
->
void f(void) {
/* other code */
streaming_compatible_bar();
/* other code */
}
```
where it wouldn't have inlined the function when foo would be a
non-streaming function.
An example of (2) is:
```
void streaming_bar(void) __arm_streaming;
void foo(void) __arm_streaming {
streaming_bar();
streaming_bar();
}
void f(void) {
foo(); // expensive streaming mode change
}
-> (do not inline into)
void f(void) {
streaming_bar(); // these are now two expensive streaming mode changes
streaming_bar();
}```
More information about the All-commits
mailing list