[llvm] [KeyInstr] Enable Key Instructions support in LLVM (PR #144324)
Orlando Cazalet-Hyams via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 16 03:06:01 PDT 2025
https://github.com/OCHyams created https://github.com/llvm/llvm-project/pull/144324
Set LLVM_EXPERIMENTAL_KEY_INSTRUCTIONS=ON by default. This enables support for Key Instructions in LLVM by default, it does not enable the feature by default.
This does have an affect on compile time, which looks to have mostly been "paid for" (if that argument stands) by my PR #143399.
>From compile-time-tracker:
1. this patch
2. PR #143399
3. base
```
Commit stage1-O3 stage1-ReleaseThinLTO stage1-ReleaseLTO-g stage1-O0-g stage1-aarch64-O3 stage1-aarch64-O0-g stage2-O3 stage2-O0-g stage2-clang
1. 61213M (+0.02%) 77397M (+0.01%) 89413M (+0.08%) 18865M (+0.13%) 68670M (+0.01%) 23100M (+0.12%) 53409M (+0.00%) 16550M (+0.20%) 34060797M (+0.02%)
2. 61201M (-0.01%) 77389M (+0.00%) 89343M (-0.06%) 18841M (-0.16%) 68666M (+0.00%) 23073M (-0.16%) 53408M (-0.01%) 16518M (+0.01%) 34054978M (+0.00%)
3. 61207M (+0.00%) 77386M (-0.01%) 89396M (-0.02%) 18871M (-0.02%) 68665M (+0.01%) 23109M (+0.02%) 53415M (-0.02%) 16516M (-0.00%) 34054300M (-0.00%)
```
Compare 2-1: https://llvm-compile-time-tracker.com/compare.php?from=89490929c34f45842df1588cf78d836f51c2c222&to=7d00712c28bbcc8a8e00d672f2f7c109fb5823c9&stat=instructions%3Au
Compare 3-2: https://llvm-compile-time-tracker.com/compare.php?from=2b7b0e178259a910355631d7d648c89052000872&to=89490929c34f45842df1588cf78d836f51c2c222&stat=instructions%3Au
>From 68403dea43bf8d2df6eb8ff3cc48f0deef4a8281 Mon Sep 17 00:00:00 2001
From: Orlando Cazalet-Hyams <orlando.hyams at sony.com>
Date: Mon, 16 Jun 2025 11:01:49 +0100
Subject: [PATCH] [KeyInstr] Enable Key Instructions support in LLVM
Set LLVM_EXPERIMENTAL_KEY_INSTRUCTIONS=ON by default. This enables support for
Key Instructions in LLVM by default, it does not enable the feature by default.
This does have an affect on compile time, which looks to have mostly been
"paid for" (if that argument stands) by my PR #143399.
>From compile-time-tracker:
1. this patch
2. PR #143399
3. base
```
Commit stage1-O3 stage1-ReleaseThinLTO stage1-ReleaseLTO-g stage1-O0-g stage1-aarch64-O3 stage1-aarch64-O0-g stage2-O3 stage2-O0-g stage2-clang
1. 61213M (+0.02%) 77397M (+0.01%) 89413M (+0.08%) 18865M (+0.13%) 68670M (+0.01%) 23100M (+0.12%) 53409M (+0.00%) 16550M (+0.20%) 34060797M (+0.02%)
2. 61201M (-0.01%) 77389M (+0.00%) 89343M (-0.06%) 18841M (-0.16%) 68666M (+0.00%) 23073M (-0.16%) 53408M (-0.01%) 16518M (+0.01%) 34054978M (+0.00%)
3. 61207M (+0.00%) 77386M (-0.01%) 89396M (-0.02%) 18871M (-0.02%) 68665M (+0.01%) 23109M (+0.02%) 53415M (-0.02%) 16516M (-0.00%) 34054300M (-0.00%)
```
Compare 2-1: https://llvm-compile-time-tracker.com/compare.php?from=89490929c34f45842df1588cf78d836f51c2c222&to=7d00712c28bbcc8a8e00d672f2f7c109fb5823c9&stat=instructions%3Au
Compare 3-2: https://llvm-compile-time-tracker.com/compare.php?from=2b7b0e178259a910355631d7d648c89052000872&to=89490929c34f45842df1588cf78d836f51c2c222&stat=instructions%3Au
---
llvm/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 0849bec26d56a..2dcf2c934b967 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -573,7 +573,7 @@ set(LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING "DISABLED" CACHE STRING
set_property(CACHE LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING PROPERTY STRINGS DISABLED COVERAGE COVERAGE_AND_ORIGIN)
option(LLVM_EXPERIMENTAL_KEY_INSTRUCTIONS
- "Add additional fields to DILocations to support Key Instructions" OFF)
+ "Add additional fields to DILocations to support Key Instructions" ON)
set(WINDOWS_PREFER_FORWARD_SLASH_DEFAULT OFF)
if (MINGW)
More information about the llvm-commits
mailing list