[clang] [llvm] [X86] Reduce -ffixed-r compile-time overhead (PR #184606)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 4 07:47:22 PST 2026
================
@@ -366,9 +357,23 @@ void x86::getX86TargetFeatures(const Driver &D, const llvm::Triple &Triple,
RESERVE_REG(r13)
RESERVE_REG(r14)
RESERVE_REG(r15)
+#undef RESERVE_REG
+
+ bool NeedDetectEGPR = Args.hasArg(
+ options::OPT_ffixed_r16, options::OPT_ffixed_r17, options::OPT_ffixed_r18,
+ options::OPT_ffixed_r19, options::OPT_ffixed_r20, options::OPT_ffixed_r21,
+ options::OPT_ffixed_r22, options::OPT_ffixed_r23, options::OPT_ffixed_r24,
+ options::OPT_ffixed_r25, options::OPT_ffixed_r26, options::OPT_ffixed_r27,
+ options::OPT_ffixed_r28, options::OPT_ffixed_r29, options::OPT_ffixed_r30,
+ options::OPT_ffixed_r31);
----------------
zhouguangyuan0718 wrote:
This point has been discussed in the previous PR, refer to here: https://github.com/llvm/llvm-project/pull/180242#discussion_r2787884240.
In general, there are two reasons, gcc does as this, and other architectures in llvm do as this.
https://github.com/llvm/llvm-project/pull/184606
More information about the cfe-commits
mailing list