Add method for replacing instructions to LibCallSimplifier
authorMeador Inge <meadori@codesourcery.com>
Sun, 11 Nov 2012 03:51:43 +0000 (03:51 +0000)
committerMeador Inge <meadori@codesourcery.com>
Sun, 11 Nov 2012 03:51:43 +0000 (03:51 +0000)
commit76fc1a479aff768573812d0fb2523d1c2aa4aa67
treead9557c799358b24a56bcf7fe860c80fa49a1732
parent1ed35ba2ddb40d1744800087bb590d31ec04ef05
Add method for replacing instructions to LibCallSimplifier

In some cases the library call simplifier may need to replace instructions
other than the library call being simplified.  In those cases it may be
necessary for clients of the simplifier to override how the replacements
are actually done.  As such, a new overrideable method for replacing
instructions was added to LibCallSimplifier.

A new subclass of LibCallSimplifier is also defined which overrides
the instruction replacement method.  This is because the instruction
combiner defines its own replacement method which updates the worklist
when instructions are replaced.

llvm-svn: 167681
llvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h
llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp