[PATCH] D22160: PowerPC: Avoid implicit iterator conversions, NFC
Duncan P. N. Exon Smith via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 8 12:25:58 PDT 2016
dexonsmith created this revision.
dexonsmith added a subscriber: llvm-commits.
Herald added a subscriber: nemanjai.
Avoid implicit conversions from MachineInstrBundleInstr to MachineInstr*
in the PowerPC backend, mainly by preferring MachineInstr& over
MachineInstr* when a pointer isn't nullable and using range-based for
There was one piece of questionable code in PPCInstrInfo::AnalyzeBranch,
where a condition checked a pointer converted from an iterator for
nullptr. Since this case is impossible (moreover, the code above
guarantees that the iterator is valid), I removed the check when I
changed the pointer to a reference.
Despite that case, there should be no functionality change here.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 28038 bytes
Desc: not available
More information about the llvm-commits