This is an archive of the discontinued LLVM Phabricator instance.

Hexagon: Avoid implicit iterator conversions, NFC
ClosedPublic

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

Details

Reviewers
kparzysz
Summary

Avoid implicit iterator conversions from MachineInstrBundleIterator to
MachineInstr* in the Hexagon backend, mostly by preferring MachineInstr&
over MachineInstr* and switching to range-based for loops.

There's a long tail of API cleanup here, but I'm planning to leave the
rest to the Hexagon maintainers. HexagonInstrInfo defines many of its
own predicates, and most of them still take MachineInstr*. Some of
those actually check for nullptr, so I didn't feel comfortable changing
them to MachineInstr& en masse.

Diff Detail

Event Timeline

dexonsmith updated this revision to Diff 63279.Jul 8 2016, 12:13 PM
dexonsmith retitled this revision from to Hexagon: Avoid implicit iterator conversions, NFC.
dexonsmith updated this object.
dexonsmith added a subscriber: llvm-commits.
dexonsmith updated this revision to Diff 63284.Jul 8 2016, 12:18 PM
dexonsmith updated this object.Jul 8 2016, 2:31 PM
kparzysz accepted this revision.Jul 11 2016, 8:37 AM
kparzysz edited edge metadata.
This revision is now accepted and ready to land.Jul 11 2016, 8:37 AM

Thanks! Committed in r275142.

dexonsmith closed this revision.Jul 11 2016, 7:03 PM