[PATCH] D67679: [SLC] Convert some strndup calls to strdup calls
Dávid Bolvanský via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 18 07:49:26 PDT 2019
xbolva00 marked an inline comment as done.
xbolva00 added inline comments.
================
Comment at: lib/Transforms/InstCombine/InstCombineCalls.cpp:4226
if (isAllocLikeFn(&Call, &TLI))
- return visitAllocSite(Call);
+ if (Instruction *I = visitAllocSite(Call))
+ return I;
----------------
jdoerfert wrote:
> xbolva00 wrote:
> > sight, this breaks things (eg. zstd build)
> Why ;) ?
This function (visitAllocSite) is just weird. Looking at eraseInstFromFunction, eraseInstFromFunction always returns nullptr; so visitAllocSite returns nullptr in both branches too. If I changed it, it breaks the compiler on some tests.
Instead of hacking this, if think this new patch is reasonable. First, it tries to optimize call, and then possibly visit (remove/annotate) AllocSite.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67679/new/
https://reviews.llvm.org/D67679
More information about the llvm-commits
mailing list