PowerPC: Don't use getNextNode() for insertion point
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Thu, 8 Oct 2015 22:20:37 +0000 (22:20 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Thu, 8 Oct 2015 22:20:37 +0000 (22:20 +0000)
commit9dd9ad6bac63f0e3a8b1be083067b36f68846753
tree6286e15ee65bcd91b0f383980f01a660223477a8
parent2c87d24da09ecd2c14c38a0b4f7a0e3f332b08ee
PowerPC: Don't use getNextNode() for insertion point

Stop using `getNextNode()` to create an insertion point for machine
instructions (at least, in this one place).  Instead, use an iterator.
As a drive-by, clean up dump statements to use iterator logic.

The `getNextNode()` interface isn't actually supposed to work for
insertion points; it's supposed to return `nullptr` if this is the last
node.  It's currently broken and will "happen" to work, but if we ever
fix the function, we'll get some strange failures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249758 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCVSXSwapRemoval.cpp