Skip to content

Conversation

AZero13
Copy link
Contributor

@AZero13 AZero13 commented Mar 16, 2024

No description provided.

@llvmbot
Copy link
Member

llvmbot commented Mar 16, 2024

@llvm/pr-subscribers-backend-aarch64

Author: AtariDreams (AtariDreams)

Changes

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 --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
 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants