[all-commits] [llvm/llvm-project] 51572c: [NFC][DAGCombiner]: Only consider nodes with no us...
Dhruv Chawla via All-commits
all-commits at lists.llvm.org
Thu May 25 07:23:24 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 51572c2cd7200552280599fbc68d016bb1f18934
https://github.com/llvm/llvm-project/commit/51572c2cd7200552280599fbc68d016bb1f18934
Author: Dhruv Chawla <44582521+dc03 at users.noreply.github.com>
Date: 2023-05-25 (Thu, 25 May 2023)
Changed paths:
M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Log Message:
-----------
[NFC][DAGCombiner]: Only consider nodes with no uses for pruning when forming initial worklist
When the worklist is initially being formed, there is no need to
consider all nodes for pruning. This is because the first time calling
getNextWorklistEntry will only clear those nodes which have no uses,
with their operands being added to the worklist. However, when the worklist is
created for the first time all nodes are added anyways, so this operation
actually ends up adding no nodes.
This patch adds a parameter IsCandidateForPruning to AddToWorklist with a
default value of true to avoid having to update every call site.
Differential Revision: https://reviews.llvm.org/D151416
More information about the All-commits
mailing list