After structurization, some phi nodes can have a single incoming edge
and can be simplified away. This change runs a simplify query on all
phis that are either modified or added by the structurizer. This also
moves some phis closer to their use as a side benefit.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Transforms/Scalar/StructurizeCFG.cpp | ||
---|---|---|
661 | continue on separate line |
llvm/lib/Transforms/Scalar/StructurizeCFG.cpp | ||
---|---|---|
659–660 | I think auto hurts readability here |
llvm/lib/Transforms/Scalar/StructurizeCFG.cpp | ||
---|---|---|
659–660 | Why is that? The next line immediately makes it clear that we are only instead if the "whatever I" is a PHINode. Also in general, how is this any different from say "for (auto BB : *F) { ... }" or "for (auto II : *BB) { ... }"? |
llvm/lib/Transforms/Scalar/StructurizeCFG.cpp | ||
---|---|---|
659–660 | It's not, since it needs to be casted, and it's not even a normal Value, it's a WeakVH |
I think auto hurts readability here