[PATCH] D88328: [InferAttrs] Improve DSE for libcalls (partial fix for PR47644)

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 18 10:21:18 PDT 2020


fhahn added inline comments.


================
Comment at: llvm/test/Transforms/PhaseOrdering/dse-libcalls.ll:13
+; OLDPM-LABEL: @dse_strcpy(
+; OLDPM-NEXT:    ret void
+;
----------------
xbolva00 wrote:
> fhahn wrote:
> > jdoerfert wrote:
> > > I'm unsure how this is optimized because I don't see `argmemonly` on the `strcpy`. Did I miss it? If not, what is the justification here?
> > I think this is due to an inconsistency with the attributes. The implicit assumption is that MemoryLocation::getForArgument currently only returns a proper location for `argmemonly` I think. We should mark them as `argmemonly` and then probably have an assert in `getLocationFor` that is is only used for such functions.
> >> We should mark them as argmemonly
> 
> This part is done (I committed it yesterday)
nice, so I guess it should be safe to add the assert now.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88328



More information about the llvm-commits mailing list