[llvm] 2c2ff26 - [GlobalISel] Avoid copying complex pattern renderers (NFC) (#221657)

via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 7 23:50:52 PDT 2026


Author: Cullen Rhodes
Date: 2026-09-08T07:50:47+01:00
New Revision: 2c2ff263a437efccf074a07cb2906025252153d0

URL: https://github.com/llvm/llvm-project/commit/2c2ff263a437efccf074a07cb2906025252153d0
DIFF: https://github.com/llvm/llvm-project/commit/2c2ff263a437efccf074a07cb2906025252153d0.diff

LOG: [GlobalISel] Avoid copying complex pattern renderers (NFC) (#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

Added: 
    

Modified: 
    llvm/include/llvm/CodeGen/GlobalISel/GIMatchTableExecutorImpl.h

Removed: 
    


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