[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
Loading
Please sign in to comment