[PATCH] D52729: [InstCombine] Fix SimplifyLibCalls erasing an instruction while IC still had references to it

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 11 07:34:08 PDT 2018


aemerson added inline comments.


================
Comment at: include/llvm/Transforms/Utils/SimplifyLibCalls.h:105
+          &replaceAllUsesWithDefault,
+      function_ref<void(Instruction *)> Eraser = &eraseFromParentDefault);
 
----------------
spatel wrote:
> This will fail at link time if a client has not provided the function? Isn't it better to just require this param (and the existing RAUW)?
Yeah I did think it was a bit odd that the default implementation for the RAUW was removed at some point (it was there when the callback was originally added). I'll add them in.


Repository:
  rL LLVM

https://reviews.llvm.org/D52729





More information about the llvm-commits mailing list