[PATCH] D100724: [SimplifyLibCalls] Transform printf("%s", str) to puts(str) or noop.
Dawid Jurczak via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 22 07:17:45 PDT 2021
yurai007 marked an inline comment as done.
yurai007 added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp:2387
+ if (OperandStr.empty())
+ return (Value *)CI;
+ // printf("%s", "a") --> putchar('a')
----------------
xbolva00 wrote:
> spatel wrote:
> > We have seen problems before with this type of change, but I don't remember exactly how we fixed it.
> > @xbolva00 may recall.
> > Should we use eraseFromParent() to make sure that InstCombine's worklist is updated as expected?
> This pattern is used from line 2368 so probably nothing to worry about.
I think that as long as CI->use_empty() - which is the case - there shouldn't be any problem.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100724/new/
https://reviews.llvm.org/D100724
More information about the llvm-commits
mailing list