This is an archive of the discontinued LLVM Phabricator instance.

Use range-loop in machine-scheduler. NFCI.
ClosedPublic

Authored by javed.absar on Jun 17 2017, 2:28 PM.

Details

Summary

Converts to range-loop usage in machine scheduler. This makes the code neater and easier to read, and also keeps pace of the machine scheduler implementation with C++11 features.

Diff Detail

Repository
rL LLVM

Event Timeline

javed.absar created this revision.Jun 17 2017, 2:28 PM
javed.absar retitled this revision from Use range-loop in machine-scheduler to Use range-loop in machine-scheduler. NFCI..Jun 19 2017, 3:05 AM
javed.absar edited the summary of this revision. (Show Details)
javed.absar edited the summary of this revision. (Show Details)Jun 19 2017, 3:09 AM
MatzeB added inline comments.Jun 19 2017, 10:29 AM
lib/CodeGen/MachineScheduler.cpp
793 ↗(On Diff #102948)

We already have the iteration variable, no need to keep this one around. Please rename the iteration variable to SU and change the users to SU.xxx and &SU.

1025 ↗(On Diff #102948)

Use PressureChange instead of auto.

1944–1945 ↗(On Diff #102948)

Remove commented code

2956 ↗(On Diff #102948)

Remove commented code. There is more instances of this coming.

Thanks Matthias for review. Please find the changes as requested.

MatzeB accepted this revision.Jun 20 2017, 8:41 PM

LGTM

This revision is now accepted and ready to land.Jun 20 2017, 8:41 PM
This revision was automatically updated to reflect the committed changes.