This patch adds a two-argument SetInsertPoint method to IRBuilder that takes a block/iterator instead of an instruction. The patch also updates a variety of call sites to pass around iterators instead of instruction pointers. The motivating reason for doing this is given here [0], we'd like to pass around more information about the position of debug-info in the iterator object. That necessitates passing iterators around most of the time.
The set of changes in this patch are all NFC, and cover all uses of IRBuilder that are involved in stage2clang and a couple of other large C++ codebases I have to hand. It's not all the uses of SetInsertPoint, but should give an idea of how invasive the changes we want to make are. (In my opinion: not invasive).
No tests because this is all NFC; I do have various LLVM-IR inputs that are sensitive to these changes, but the exact test strategy and what order to land patches in is up for discussion. I'll elaborate in D151419, and not add reviewers here yet.
IIUC front and begin are equivalent (at the moment). What is the purpose of this change? If it's set-up for a future change in semantics of these functions it could be worth explaining the change in the commit message IMO.
(This pattern is repeated in multiple places)