This is an archive of the discontinued LLVM Phabricator instance.

SystemZ: Avoid implicit iterator conversions, NFC
ClosedPublic

Authored by dexonsmith on Jul 8 2016, 12:27 PM.

Details

Reviewers
uweigand
Summary

Avoid implicit conversions from MachineInstrBundleIterator to
MachineInstr* in the SystemZ backend, mainly by preferring MachineInstr&
over MachineInstr* and using range-based for loops.

Diff Detail

Event Timeline

dexonsmith updated this revision to Diff 63293.Jul 8 2016, 12:27 PM
dexonsmith retitled this revision from to SystemZ: Avoid implicit iterator conversions, NFC.
dexonsmith updated this object.
dexonsmith added a subscriber: llvm-commits.
uweigand accepted this revision.Jul 11 2016, 9:05 AM
uweigand edited edge metadata.

I'll defer to your expertise on that. Patch looks good to me.

I guess I'm not fully familiar with some of the C++ language details here. Would you mind explaining in more detail what the problem is specifically, and what we should be doing to avoid this issue in the future? Using something like "&*I" in the LDCleanup file wouldn't have naturally occurred to me ... :-)

This revision is now accepted and ready to land.Jul 11 2016, 9:05 AM
dexonsmith closed this revision.Jul 11 2016, 6:56 PM

Committed in r275137, and somehow that didn't get included in Phab despite top-posting...