With 'for' loop there is is a single place where 'Current' is adjusted. It helps to avoid copy paste and makes a bit easy to understand overall loop controll flow.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp | ||
---|---|---|
1450–1451 | Good suggestion. Done. |
Comment Actions
LGTM, this looks like a nice simplification to ensure Current is updated correctly at the end of each iteration. Thanks!
The braces here and at the other changed lines are now redundant. Would be good to remove them.