[llvm] Use sizeWithoutDebugLargerThan when considering outlining (PR #85539)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 16 09:01:52 PDT 2024
https://github.com/AtariDreams created https://github.com/llvm/llvm-project/pull/85539
None
>From 0a7fa1d054faf8b2ae3678df3cd2194dfce4f701 Mon Sep 17 00:00:00 2001
From: Rose <gfunni234 at gmail.com>
Date: Sat, 16 Mar 2024 12:00:40 -0400
Subject: [PATCH] Use sizeWithoutDebugLargerThan when considering outlining
---
llvm/lib/CodeGen/MachineOutliner.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/llvm/lib/CodeGen/MachineOutliner.cpp b/llvm/lib/CodeGen/MachineOutliner.cpp
index dc2f5ef15206e8..f1fd47ee120e2c 100644
--- a/llvm/lib/CodeGen/MachineOutliner.cpp
+++ b/llvm/lib/CodeGen/MachineOutliner.cpp
@@ -1028,11 +1028,11 @@ void MachineOutliner::populateMapper(InstructionMapper &Mapper, Module &M,
LLVM_DEBUG(dbgs() << " MAPPING MBB: '" << MBB.getName() << "'\n");
// If there isn't anything in MBB, then there's no point in outlining from
// it.
- // If there are fewer than 2 instructions in the MBB, then it can't ever
+ // If there is only 1 instruction in the MBB, then it can't ever
// 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;
More information about the llvm-commits
mailing list