[llvm] [GlobalISel] Avoid copying complex pattern renderers (NFC) (PR #221657)
Cullen Rhodes via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 6 23:59:06 PDT 2026
https://github.com/c-rhodes created https://github.com/llvm/llvm-project/pull/221657
They're immediately destroyed after being copied, move them instead.
Improves aarch64-O0-g CTMark geomean -0.10%.
https://llvm-compile-time-tracker.com/compare.php?from=97cbc1e404b980edc58bfbcabb6f1c61793b624b&to=69a2cfb9a265b7c4a18ef7121a7afb239c886d13&stat=instructions:u
Assisted-by: codex
>From 69a2cfb9a265b7c4a18ef7121a7afb239c886d13 Mon Sep 17 00:00:00 2001
From: Cullen Rhodes <cullen.rhodes at arm.com>
Date: Fri, 8 May 2026 13:58:34 +0000
Subject: [PATCH] [GlobalISel] Avoid copying complex pattern renderers (NFC)
They're immediately destroyed after being copied, move them instead.
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 e0720928c6526..fdedd452448f5 100644
--- a/llvm/include/llvm/CodeGen/GlobalISel/GIMatchTableExecutorImpl.h
+++ b/llvm/include/llvm/CodeGen/GlobalISel/GIMatchTableExecutorImpl.h
@@ -862,7 +862,7 @@ bool GIMatchTableExecutor::executeMatchTable(
(Exec.*ExecInfo.ComplexPredicates[ComplexPredicateID])(
State.MIs[InsnID]->getOperand(OpIdx));
if (Renderer)
- State.Renderers[RendererID] = *Renderer;
+ State.Renderers[RendererID] = std::move(*Renderer);
else if (handleReject() == RejectAndGiveUp)
return false;
break;
More information about the llvm-commits
mailing list