[PATCH] D60619: New pass to produce more easily-read IR.
Arnt Gulbrandsen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 27 03:04:52 PDT 2019
arnt added a comment.
I rebased onto this morning's LLVM now.
I don't have commit access (as far as I can tell at least) and cannot find a way to land code from phabricator, so if this is to land, one of the reviewers has to commit it for me. Is that right?
================
Comment at: llvm/lib/Transforms/Utils/ImproveReadingOrder.cpp:123
+ if (!HeadingTowardsUnreachable && PDT.dominates(u, Current))
+ HeadingTowardsUnreachable = u;
+ for (auto s : Successors) {
----------------
jdoerfert wrote:
> It took me a while to see that you only want to find one witness:
> Add a break, remove the `!HadingTowardsUnreachable`.
Sorry, adding break, goto or continue is more than I'll do without compelling, specific reason.
================
Comment at: llvm/lib/Transforms/Utils/ImproveReadingOrder.cpp:116
+ std::map<std::pair<uint, uint>, BasicBlock *> Ordered;
+ uint n = 0;
+ while (n < Terminator->getNumSuccessors()) {
----------------
jdoerfert wrote:
> Please do not use `uint`, I'm with him: https://stackoverflow.com/a/5678057
If it pleases you.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60619/new/
https://reviews.llvm.org/D60619
More information about the llvm-commits
mailing list