[PATCH] D74792: [SimplifyLibCalls][IRBuilder] Accept any IRBuilder in SimplifyLibCalls

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 19 07:00:18 PST 2020


nikic marked an inline comment as done.
nikic added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp:3109-3111
+      IRBuilderBase::InsertPointGuard Guard(Builder);
+      Builder.SetInsertPoint(SimplifiedCI);
+      if (Value *V = optimizeStringMemoryLibCall(SimplifiedCI, Builder)) {
----------------
nhaehnle wrote:
> The OperandBundlesGuard covers this point, where bundles where previously not applied as far as I can tell. Is that intended?
It looks like the separate builder was introduced in https://github.com/llvm/llvm-project/commit/b491a2d641add36f1a2f7674d6b5df038c2d638e to fix the insertion position, and the later introduction of operand bundle handling in https://github.com/llvm/llvm-project/commit/b70e23c3909ca9a848a7ba963ee6580f48c57c5f forgot to adjust this separate builder. I don't think that operand bundles were intentionally dropped here. (Though most likely nobody is using operand bundles on fortified library calls in the first place.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74792/new/

https://reviews.llvm.org/D74792





More information about the llvm-commits mailing list