IR: Provide an IRBuilder Inserter that calls a callback after insertion
authorJustin Bogner <mail@justinbogner.com>
Thu, 4 Aug 2016 23:41:01 +0000 (23:41 +0000)
committerJustin Bogner <mail@justinbogner.com>
Thu, 4 Aug 2016 23:41:01 +0000 (23:41 +0000)
commit19dd0da153304f7947220141efd517f86406c9b3
tree50853177c541c09176e5ed2df5b6acf37a320947
parent68de2e98a64ffa4e26af6e51dd7517ef18426887
IR: Provide an IRBuilder Inserter that calls a callback after insertion

Add a generalized IRBuilderCallbackInserter, which is just given a
callback to execute after insertion. This can be used to get rid of
the custom inserter in InstCombine, which will in turn allow me to add
target specific InstCombineCalls API for intrinsics without horrible
layering violations.

llvm-svn: 277784
llvm/include/llvm/IR/IRBuilder.h
llvm/lib/Transforms/InstCombine/InstCombineInternal.h
llvm/lib/Transforms/InstCombine/InstructionCombining.cpp