[clang] [llvm] Support branch hint (PR #97721)

Simon Pilgrim via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 4 06:14:33 PDT 2024


================
@@ -749,6 +749,11 @@ def TuningUseGLMDivSqrtCosts
     : SubtargetFeature<"use-glm-div-sqrt-costs", "UseGLMDivSqrtCosts", "true",
         "Use Goldmont specific floating point div/sqrt costs">;
 
+// Starting with Redwood Cove architecture, the branch has branch taken hint
+// (i.e., instruction prefix 3EH).
+def TuningBranchHint: SubtargetFeature<"branch-hint", "HasBranchHint", "true",
----------------
RKSimon wrote:

Why have you added this as a Tuning bit and not a Feature bit? Tuning bits are guaranteed to work on all applicable CPUs - they just might not be performant. 

https://github.com/llvm/llvm-project/pull/97721


More information about the cfe-commits mailing list