GlobalISel: simplify MachineIRBuilder interface.
authorTim Northover <tnorthover@apple.com>
Wed, 7 Dec 2016 21:05:38 +0000 (21:05 +0000)
committerTim Northover <tnorthover@apple.com>
Wed, 7 Dec 2016 21:05:38 +0000 (21:05 +0000)
commit05cc4859ad289948175382daae0f3ef8c214a8f5
treeec252f4fba40a3c82067d11f935e84362315d197
parent64a055549a976c5c30c57cbb7ff696e809c79a2e
GlobalISel: simplify MachineIRBuilder interface.

MachineIRBuilder had weird before/after and beginning/end flags for the insert
point. Unfortunately the non-default means that instructions will be inserted
in reverse order which is almost never what anyone wants.

Really, I think we just want (like IRBuilder has) the ability to insert at any
C++ iterator-style point (i.e. before any instruction or before MBB.end()). So
this fixes MIRBuilders to behave like IRBuilders in this respect.

llvm-svn: 288980
llvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h
llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
llvm/lib/Target/AArch64/AArch64CallLowering.cpp
llvm/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll
llvm/test/CodeGen/AArch64/GlobalISel/call-translator-ios.ll
llvm/test/CodeGen/AArch64/GlobalISel/call-translator.ll
llvm/test/CodeGen/AArch64/GlobalISel/irtranslator-exceptions.ll
llvm/test/CodeGen/X86/GlobalISel/irtranslator-call.ll