[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
loops.
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.
http://reviews.llvm.org/D22160
Files:
lib/Target/PowerPC/PPCBranchSelector.cpp
lib/Target/PowerPC/PPCCTRLoops.cpp
lib/Target/PowerPC/PPCFrameLowering.cpp
lib/Target/PowerPC/PPCInstrInfo.cpp
lib/Target/PowerPC/PPCTLSDynamicCall.cpp
lib/Target/PowerPC/PPCVSXCopy.cpp
lib/Target/PowerPC/PPCVSXFMAMutate.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22160.63291.patch
Type: text/x-patch
Size: 28038 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160708/232b87f3/attachment.bin>
More information about the llvm-commits
mailing list