[PATCH] D33587: [DAGCombine] Do several rounds of combine.
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 1 11:52:08 PDT 2017
arsenm added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1316
- // While the worklist isn't empty, find a node and try to combine it.
- while (!WorklistMap.empty()) {
- SDNode *N;
- // The Worklist holds the SDNodes in order, but it may contain null entries.
- do {
- N = Worklist.pop_back_val();
- } while (!N);
-
- bool GoodWorklistEntry = WorklistMap.erase(N);
- (void)GoodWorklistEntry;
- assert(GoodWorklistEntry &&
- "Found a worklist entry without a corresponding map entry!");
-
- // If N has no uses, it is dead. Make sure to revisit all N's operands once
- // N is deleted from the DAG, since they too may now be dead or may have a
- // reduced number of uses, allowing other xforms.
- if (recursivelyDeleteUnusedNodes(N))
- continue;
+ for (unsigned Iterration = 0; Iterration < 3; Iterration++) {
+ // Add all the dag nodes to the worklist.
----------------
Spelling
https://reviews.llvm.org/D33587
More information about the llvm-commits
mailing list