[PATCH] D132828: Add new optimization pass of Tree Height Reduction
YOUXIANG CHEN via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 21 17:21:35 PST 2022
seanxilinx added a comment.
In D132828#3942506 <https://reviews.llvm.org/D132828#3942506>, @kawashima-fj wrote:
> In D132828#3941665 <https://reviews.llvm.org/D132828#3941665>, @seanxilinx wrote:
>
>> @kawashima-fj, I think it is a good optimization pass. I want to integrate it into my product. Is there any license issue since it is not taken by LLVM? Thanks
>
> @seanxilinx No, there is no license issue. This patch was posted here under the license same as the LLVM (Apache License v2.0 with LLVM Exceptions).
>
> As I explained in D138107 <https://reviews.llvm.org/D138107>, D132828 <https://reviews.llvm.org/D132828> and D138107 <https://reviews.llvm.org/D138107> achieve similar transformation. However, if the LLVM community wants both, I can continue this patch.
Thanks @kawashima-fj for your contribution.
================
Comment at: llvm/lib/Transforms/Scalar/TreeHeightReduction.cpp:462
+Node *TreeHeightReduction::constructTree(Value *V, BasicBlock *BB) {
+ if (!isBranchCandidate(V))
+ return new Node(V);
----------------
for the root of tree, we may not need to check whether it is isBranchCandidate or not.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132828/new/
https://reviews.llvm.org/D132828
More information about the llvm-commits
mailing list