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

2024-07-09 Thread Feng Zou via cfe-commits
@@ -1815,12 +1822,12 @@ def : ProcModel<"pantherlake", AlderlakePModel, def : ProcModel<"clearwaterforest", AlderlakePModel, ProcessorFeatures.CWFFeatures, ProcessorFeatures.ADLTuning>; def : ProcModel<"graniterapids", SapphireRapidsModel, -Proce

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

2024-07-08 Thread via cfe-commits
@@ -1815,12 +1822,12 @@ def : ProcModel<"pantherlake", AlderlakePModel, def : ProcModel<"clearwaterforest", AlderlakePModel, ProcessorFeatures.CWFFeatures, ProcessorFeatures.ADLTuning>; def : ProcModel<"graniterapids", SapphireRapidsModel, -Proce

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

2024-07-07 Thread Shengchen Kan via cfe-commits
https://github.com/KanRobert closed https://github.com/llvm/llvm-project/pull/97721 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-07-04 Thread Shengchen Kan via cfe-commits
https://github.com/KanRobert approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/97721 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-07-04 Thread Feng Zou via cfe-commits
https://github.com/fzou1 updated https://github.com/llvm/llvm-project/pull/97721 >From 3c75e22504416afae288723aff34120d88b100db Mon Sep 17 00:00:00 2001 From: Feng Zou Date: Thu, 4 Jul 2024 15:43:12 +0800 Subject: [PATCH 1/2] Support branch hint For more details about this feature, please refer

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

2024-07-04 Thread Shengchen Kan via cfe-commits
https://github.com/KanRobert edited https://github.com/llvm/llvm-project/pull/97721 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-07-04 Thread Shengchen Kan via cfe-commits
KanRobert wrote: Updated. https://github.com/llvm/llvm-project/pull/97721 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-07-04 Thread Shengchen Kan via cfe-commits
https://github.com/KanRobert edited https://github.com/llvm/llvm-project/pull/97721 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-07-04 Thread Feng Zou via cfe-commits
@@ -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

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

2024-07-04 Thread Feng Zou via cfe-commits
fzou1 wrote: Thanks. It's simpler. What's the metadata for "!prof !0" and "!prof !1"? https://github.com/llvm/llvm-project/pull/97721 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

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

2024-07-04 Thread Shengchen Kan via cfe-commits
KanRobert wrote: This test is too verbose, not robust and miss coverage. I would suggest the following ``` ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5 ; RUN: llc < %s -mtriple=x86_64 -mattr=+branch-hint

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

2024-07-04 Thread Shengchen Kan via cfe-commits
@@ -54,6 +55,14 @@ using namespace llvm; +static cl::opt EnableBranchHint("branch-hint", KanRobert wrote: `enable-branch-hint` is more in line with our current naming habits https://github.com/llvm/llvm-project/pull/97721 ___

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

2024-07-04 Thread Shengchen Kan via cfe-commits
@@ -0,0 +1,95 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: llc < %s -mtriple=x86_64-linux -branch-hint -branch-hint-probability-threshold=60 -show-mc-encoding | FileCheck %s KanRobert wrote: Drop -show-mc-encoding ht

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

2024-07-04 Thread Shengchen Kan via cfe-commits
@@ -0,0 +1,95 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: llc < %s -mtriple=x86_64-linux -branch-hint -branch-hint-probability-threshold=60 -show-mc-encoding | FileCheck %s + +; Design: Insert "ds # encoding: [0x3e]" for condition bra

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

2024-07-04 Thread Shengchen Kan via cfe-commits
@@ -0,0 +1,95 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: llc < %s -mtriple=x86_64-linux -branch-hint -branch-hint-probability-threshold=60 -show-mc-encoding | FileCheck %s + +; Design: Insert "ds # encoding: [0x3e]" for condition bra

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

2024-07-04 Thread Shengchen Kan via cfe-commits
@@ -0,0 +1,95 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: llc < %s -mtriple=x86_64-linux -branch-hint -branch-hint-probability-threshold=60 -show-mc-encoding | FileCheck %s + +; Design: Insert "ds # encoding: [0x3e]" for condition bra

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

2024-07-04 Thread Shengchen Kan via cfe-commits
@@ -0,0 +1,95 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: llc < %s -mtriple=x86_64-linux -branch-hint -branch-hint-probability-threshold=60 -show-mc-encoding | FileCheck %s + +; Design: Insert "ds # encoding: [0x3e]" for condition bra

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

2024-07-04 Thread Shengchen Kan via cfe-commits
@@ -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

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

2024-07-04 Thread Shengchen Kan via cfe-commits
@@ -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

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

2024-07-04 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon edited https://github.com/llvm/llvm-project/pull/97721 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits