[llvm-branch-commits] [llvm] [RISCV] Support select optimization (PR #80124)

2024-07-05 Thread Pengcheng Wang via llvm-branch-commits
https://github.com/wangpc-pp updated https://github.com/llvm/llvm-project/pull/80124 >From e3fb1fe7bdd4b7c24f9361c4d14dd1206fc8c067 Mon Sep 17 00:00:00 2001 From: wangpc Date: Sun, 18 Feb 2024 11:12:16 +0800 Subject: [PATCH 1/2] Move after addIRPasses Created using spr 1.3.4 --- llvm/lib/Targ

[llvm-branch-commits] [llvm] [RISCV] Support select optimization (PR #80124)

2024-07-05 Thread Pengcheng Wang via llvm-branch-commits
https://github.com/wangpc-pp updated https://github.com/llvm/llvm-project/pull/80124 >From e3fb1fe7bdd4b7c24f9361c4d14dd1206fc8c067 Mon Sep 17 00:00:00 2001 From: wangpc Date: Sun, 18 Feb 2024 11:12:16 +0800 Subject: [PATCH 1/2] Move after addIRPasses Created using spr 1.3.4 --- llvm/lib/Targ

[llvm-branch-commits] [llvm] [RISCV] Support select optimization (PR #80124)

2024-07-04 Thread Pengcheng Wang via llvm-branch-commits
wangpc-pp wrote: https://github.com/llvm/llvm-project/pull/97708 is splitted out for adding `FeaturePredictableSelectIsExpensive`. https://github.com/llvm/llvm-project/pull/80124 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org

[llvm-branch-commits] [llvm] [RISCV] Support select optimization (PR #80124)

2024-07-04 Thread Pengcheng Wang via llvm-branch-commits
wangpc-pp wrote: Ping. I'd like to push this forward because we don't take branch probabilities into consideration now. Example: https://godbolt.org/z/doGhYadKM We should use branches instead of selects in this case and this patch (the enabling of SelectOpt) will optimize this. `clang -O3 -marc

[llvm-branch-commits] [llvm] [RISCV] Support select optimization (PR #80124)

2024-07-04 Thread Pengcheng Wang via llvm-branch-commits
https://github.com/wangpc-pp edited https://github.com/llvm/llvm-project/pull/80124 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [RISCV] Support select optimization (PR #80124)

2024-07-04 Thread Pengcheng Wang via llvm-branch-commits
https://github.com/wangpc-pp updated https://github.com/llvm/llvm-project/pull/80124 >From e3fb1fe7bdd4b7c24f9361c4d14dd1206fc8c067 Mon Sep 17 00:00:00 2001 From: wangpc Date: Sun, 18 Feb 2024 11:12:16 +0800 Subject: [PATCH 1/2] Move after addIRPasses Created using spr 1.3.4 --- llvm/lib/Targ

[llvm-branch-commits] [llvm] [RISCV] Support select optimization (PR #80124)

2024-07-04 Thread Pengcheng Wang via llvm-branch-commits
https://github.com/wangpc-pp updated https://github.com/llvm/llvm-project/pull/80124 >From e3fb1fe7bdd4b7c24f9361c4d14dd1206fc8c067 Mon Sep 17 00:00:00 2001 From: wangpc Date: Sun, 18 Feb 2024 11:12:16 +0800 Subject: [PATCH 1/2] Move after addIRPasses Created using spr 1.3.4 --- llvm/lib/Targ

[llvm-branch-commits] [llvm] [RISCV] Support select optimization (PR #80124)

2024-06-26 Thread Pengcheng Wang via llvm-branch-commits
https://github.com/wangpc-pp updated https://github.com/llvm/llvm-project/pull/80124 >From e3fb1fe7bdd4b7c24f9361c4d14dd1206fc8c067 Mon Sep 17 00:00:00 2001 From: wangpc Date: Sun, 18 Feb 2024 11:12:16 +0800 Subject: [PATCH 1/2] Move after addIRPasses Created using spr 1.3.4 --- llvm/lib/Targ

[llvm-branch-commits] [llvm] [RISCV] Support select optimization (PR #80124)

2024-06-26 Thread Pengcheng Wang via llvm-branch-commits
https://github.com/wangpc-pp updated https://github.com/llvm/llvm-project/pull/80124 >From e3fb1fe7bdd4b7c24f9361c4d14dd1206fc8c067 Mon Sep 17 00:00:00 2001 From: wangpc Date: Sun, 18 Feb 2024 11:12:16 +0800 Subject: [PATCH 1/2] Move after addIRPasses Created using spr 1.3.4 --- llvm/lib/Targ

[llvm-branch-commits] [llvm] [RISCV] Support select optimization (PR #80124)

2024-03-19 Thread Wang Pengcheng via llvm-branch-commits
wangpc-pp wrote: > > > JFYI, I don't find the AArch64 data particularly convincing for RISCV. > > > The magnitude of the change even on AArch64 is small, and could easily be > > > swung one direction or the other by differences in implementation between > > > the backends. > > > > > > Yeah!

[llvm-branch-commits] [llvm] [RISCV] Support select optimization (PR #80124)

2024-03-19 Thread Wang Pengcheng via llvm-branch-commits
@@ -101,6 +101,11 @@ static cl::opt EnableMISchedLoadClustering( cl::desc("Enable load clustering in the machine scheduler"), cl::init(false)); +static cl::opt +EnableSelectOpt("riscv-select-opt", cl::Hidden, wangpc-pp wrote: Most of the added pas

[llvm-branch-commits] [llvm] [RISCV] Support select optimization (PR #80124)

2024-03-18 Thread Craig Topper via llvm-branch-commits
topperc wrote: > > JFYI, I don't find the AArch64 data particularly convincing for RISCV. The > > magnitude of the change even on AArch64 is small, and could easily be swung > > one direction or the other by differences in implementation between the > > backends. > > Yeah! The result will dif

[llvm-branch-commits] [llvm] [RISCV] Support select optimization (PR #80124)

2024-03-18 Thread Craig Topper via llvm-branch-commits
@@ -1046,6 +1046,14 @@ def FeatureFastUnalignedAccess def FeaturePostRAScheduler : SubtargetFeature<"use-postra-scheduler", "UsePostRAScheduler", "true", "Schedule again after register allocation">; +def FeaturePredictableSelectIsExpensive + : SubtargetFeature<"predictabl

[llvm-branch-commits] [llvm] [RISCV] Support select optimization (PR #80124)

2024-03-18 Thread Craig Topper via llvm-branch-commits
@@ -101,6 +101,11 @@ static cl::opt EnableMISchedLoadClustering( cl::desc("Enable load clustering in the machine scheduler"), cl::init(false)); +static cl::opt +EnableSelectOpt("riscv-select-opt", cl::Hidden, topperc wrote: > I think the impact wo

[llvm-branch-commits] [llvm] [RISCV] Support select optimization (PR #80124)

2024-03-14 Thread Wang Pengcheng via llvm-branch-commits
wangpc-pp wrote: Ping. Any more concerns? https://github.com/llvm/llvm-project/pull/80124 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [RISCV] Support select optimization (PR #80124)

2024-03-06 Thread Wang Pengcheng via llvm-branch-commits
@@ -101,6 +101,11 @@ static cl::opt EnableMISchedLoadClustering( cl::desc("Enable load clustering in the machine scheduler"), cl::init(false)); +static cl::opt +EnableSelectOpt("riscv-select-opt", cl::Hidden, wangpc-pp wrote: @topperc WDYT? https

[llvm-branch-commits] [llvm] [RISCV] Support select optimization (PR #80124)

2024-02-26 Thread Wang Pengcheng via llvm-branch-commits
https://github.com/wangpc-pp edited https://github.com/llvm/llvm-project/pull/80124 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [RISCV] Support select optimization (PR #80124)

2024-02-26 Thread Wang Pengcheng via llvm-branch-commits
@@ -101,6 +101,11 @@ static cl::opt EnableMISchedLoadClustering( cl::desc("Enable load clustering in the machine scheduler"), cl::init(false)); +static cl::opt +EnableSelectOpt("riscv-select-opt", cl::Hidden, wangpc-pp wrote: Yeah, this point make

[llvm-branch-commits] [llvm] [RISCV] Support select optimization (PR #80124)

2024-02-26 Thread Craig Topper via llvm-branch-commits
@@ -101,6 +101,11 @@ static cl::opt EnableMISchedLoadClustering( cl::desc("Enable load clustering in the machine scheduler"), cl::init(false)); +static cl::opt +EnableSelectOpt("riscv-select-opt", cl::Hidden, topperc wrote: But we added a bunch of

[llvm-branch-commits] [llvm] [RISCV] Support select optimization (PR #80124)

2024-02-26 Thread Wang Pengcheng via llvm-branch-commits
@@ -101,6 +101,11 @@ static cl::opt EnableMISchedLoadClustering( cl::desc("Enable load clustering in the machine scheduler"), cl::init(false)); +static cl::opt +EnableSelectOpt("riscv-select-opt", cl::Hidden, wangpc-pp wrote: We have already disab

[llvm-branch-commits] [llvm] [RISCV] Support select optimization (PR #80124)

2024-02-26 Thread Craig Topper via llvm-branch-commits
@@ -101,6 +101,11 @@ static cl::opt EnableMISchedLoadClustering( cl::desc("Enable load clustering in the machine scheduler"), cl::init(false)); +static cl::opt +EnableSelectOpt("riscv-select-opt", cl::Hidden, topperc wrote: If no in tree targets u

[llvm-branch-commits] [llvm] [RISCV] Support select optimization (PR #80124)

2024-02-26 Thread Craig Topper via llvm-branch-commits
https://github.com/topperc deleted https://github.com/llvm/llvm-project/pull/80124 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [RISCV] Support select optimization (PR #80124)

2024-02-26 Thread Craig Topper via llvm-branch-commits
@@ -1046,6 +1046,14 @@ def FeatureFastUnalignedAccess def FeaturePostRAScheduler : SubtargetFeature<"use-postra-scheduler", "UsePostRAScheduler", "true", "Schedule again after register allocation">; +def FeaturePredictableSelectIsExpensive + : SubtargetFeature<"predictabl

[llvm-branch-commits] [llvm] [RISCV] Support select optimization (PR #80124)

2024-02-26 Thread Wang Pengcheng via llvm-branch-commits
wangpc-pp wrote: Ping. https://github.com/llvm/llvm-project/pull/80124 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [RISCV] Support select optimization (PR #80124)

2024-02-21 Thread Wang Pengcheng via llvm-branch-commits
https://github.com/wangpc-pp updated https://github.com/llvm/llvm-project/pull/80124 >From e3fb1fe7bdd4b7c24f9361c4d14dd1206fc8c067 Mon Sep 17 00:00:00 2001 From: wangpc Date: Sun, 18 Feb 2024 11:12:16 +0800 Subject: [PATCH 1/2] Move after addIRPasses Created using spr 1.3.4 --- llvm/lib/Targ

[llvm-branch-commits] [llvm] [RISCV] Support select optimization (PR #80124)

2024-02-21 Thread Yingwei Zheng via llvm-branch-commits
https://github.com/dtcxzyw edited https://github.com/llvm/llvm-project/pull/80124 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [RISCV] Support select optimization (PR #80124)

2024-02-21 Thread Yingwei Zheng via llvm-branch-commits
https://github.com/dtcxzyw requested changes to this pull request. https://github.com/llvm/llvm-project/pull/80124 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commi

[llvm-branch-commits] [llvm] [RISCV] Support select optimization (PR #80124)

2024-02-21 Thread Yingwei Zheng via llvm-branch-commits
@@ -451,6 +456,9 @@ void RISCVPassConfig::addIRPasses() { } TargetPassConfig::addIRPasses(); + + if (getOptLevel() == CodeGenOptLevel::Aggressive && EnableSelectOpt) dtcxzyw wrote: > Failed Tests (1): LLVM :: CodeGen/RISCV/O3-pipeline.ll Please update

[llvm-branch-commits] [llvm] [RISCV] Support select optimization (PR #80124)

2024-02-21 Thread Wang Pengcheng via llvm-branch-commits
wangpc-pp wrote: Gentle ping. https://github.com/llvm/llvm-project/pull/80124 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [RISCV] Support select optimization (PR #80124)

2024-02-17 Thread Wang Pengcheng via llvm-branch-commits
https://github.com/wangpc-pp updated https://github.com/llvm/llvm-project/pull/80124 >From e3fb1fe7bdd4b7c24f9361c4d14dd1206fc8c067 Mon Sep 17 00:00:00 2001 From: wangpc Date: Sun, 18 Feb 2024 11:12:16 +0800 Subject: [PATCH] Move after addIRPasses Created using spr 1.3.4 --- llvm/lib/Target/R