[PATCH] D38097: [IVUsers] Changes to make IVUsers's results robust to instruction and uselist ordering
Daniel Berlin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 22 08:58:14 PDT 2017
dberlin added a comment.
So, TL;DR, i'm not sure how much you really care, this isn't going to make your ordering completely consistent in the face of use list reordering or instruction ordering. It should work if there is a single cycle, but not if there are nested cycles.
Is there a reason not to use a complete solution, which would be "form sccs of ssa graph, sort them if necessary, perform whatever filtering you want".
Forming scc's guarantees you have all instructions that you could ever want to process.
You can then sort the SCC's by dominance order (DT dfs numbers, then local dfs numbers) if you don't like the ordering it produces, and process.
That will guarantee completely consistent ordering, as tarjan scc's are maximal.
https://reviews.llvm.org/D38097
More information about the llvm-commits
mailing list