[llvm] [GlobalISel] Use more inline elements in a match table SmallVector (PR #202568)

Cullen Rhodes via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 9 03:21:32 PDT 2026


https://github.com/c-rhodes created https://github.com/llvm/llvm-project/pull/202568

The 4 inline elements for OnFailResumeAt only cover 36.8% (33455 / 90902) of
aarch64-isel executeMatchTable invocations encountered while compiling sqlite3
on aarch64-O0-g.

The 8 inline elements cover 100% (maximum observed depth was 6). Small -0.09%
CTMark geomean improvement on aarch64-O0-g.

https://llvm-compile-time-tracker.com/compare.php?from=2de2edb943fe1b83d79bdffa03606eb8c5452e9b&to=8deb4f949b5f80a26a8a61775fb411bf30fefd80&stat=instructions%3Au

Assisted-by: codex

>From 8deb4f949b5f80a26a8a61775fb411bf30fefd80 Mon Sep 17 00:00:00 2001
From: Cullen Rhodes <cullen.rhodes at arm.com>
Date: Tue, 9 Jun 2026 09:40:13 +0000
Subject: [PATCH] [GlobalISel] Use more inline elements in a match table
 SmallVector

The 4 inline elements for OnFailResumeAt only cover 36.8% (33455 /
90902) of aarch64-isel executeMatchTable invocations encountered while
compiling sqlite3 on aarch64-O0-g.

The 8 inline elements cover 100% (maximum observed depth was 6). This
improves CTMark geomean by -0.14% with sqlite -0.30%.

Assisted-by: codex
---
 llvm/include/llvm/CodeGen/GlobalISel/GIMatchTableExecutorImpl.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/include/llvm/CodeGen/GlobalISel/GIMatchTableExecutorImpl.h b/llvm/include/llvm/CodeGen/GlobalISel/GIMatchTableExecutorImpl.h
index 70ee75108ffb8..e0720928c6526 100644
--- a/llvm/include/llvm/CodeGen/GlobalISel/GIMatchTableExecutorImpl.h
+++ b/llvm/include/llvm/CodeGen/GlobalISel/GIMatchTableExecutorImpl.h
@@ -51,7 +51,7 @@ bool GIMatchTableExecutor::executeMatchTable(
     CodeGenCoverage *CoverageInfo) const {
 
   uint64_t CurrentIdx = 0;
-  SmallVector<uint64_t, 4> OnFailResumeAt;
+  SmallVector<uint64_t, 8> OnFailResumeAt;
   NewMIVector OutMIs;
 
   GISelChangeObserver *Observer = Builder.getObserver();



More information about the llvm-commits mailing list