[llvm] Use sizeWithoutDebugLargerThan when considering outlining (PR #85539)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 16 09:48:26 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-aarch64
Author: AtariDreams (AtariDreams)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/85539.diff
2 Files Affected:
- (modified) llvm/lib/CodeGen/MachineOutliner.cpp (+1-1)
- (modified) llvm/test/CodeGen/AArch64/machine-outliner-mapper-stats.mir (+1-1)
``````````diff
diff --git a/llvm/lib/CodeGen/MachineOutliner.cpp b/llvm/lib/CodeGen/MachineOutliner.cpp
index dc2f5ef15206e8..22352776fab0ec 100644
--- a/llvm/lib/CodeGen/MachineOutliner.cpp
+++ b/llvm/lib/CodeGen/MachineOutliner.cpp
@@ -1032,7 +1032,7 @@ void MachineOutliner::populateMapper(InstructionMapper &Mapper, Module &M,
// contain something worth outlining.
// FIXME: This should be based off of the maximum size in B of an outlined
// call versus the size in B of the MBB.
- if (MBB.size() < MinMBBSize) {
+ if (!MBB.sizeWithoutDebugLargerThan(MinMBBSize - 1)) {
LLVM_DEBUG(dbgs() << " SKIP: MBB size less than minimum size of "
<< MinMBBSize << "\n");
continue;
diff --git a/llvm/test/CodeGen/AArch64/machine-outliner-mapper-stats.mir b/llvm/test/CodeGen/AArch64/machine-outliner-mapper-stats.mir
index 4cb8e8c10c2414..22bd61d65275fe 100644
--- a/llvm/test/CodeGen/AArch64/machine-outliner-mapper-stats.mir
+++ b/llvm/test/CodeGen/AArch64/machine-outliner-mapper-stats.mir
@@ -3,7 +3,7 @@
# CHECK: 2 machine-outliner - Unoutlinable instructions mapped + number of sentinel values
# CHECK: 2 machine-outliner - Invisible instructions skipped during mapping
-# CHECK: 4 machine-outliner - Outlinable instructions mapped
+# CHECK: 3 machine-outliner - Outlinable instructions mapped
# CHECK: 1 machine-outliner - Sentinel values inserted during mapping
# CHECK: 5 machine-outliner - Total number of instructions mapped and saved to mapping vector
``````````
</details>
https://github.com/llvm/llvm-project/pull/85539
More information about the llvm-commits
mailing list