[PATCH] D110547: [MemCpyOpt] Use EarliestEscapeInfo instead of callCapturesBefore.

Alina Sbirlea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 27 13:35:09 PDT 2021


asbirlea added a comment.

+1 on Nikita's comment that BatchAA cannot be used with a single instance for MemCpyOpt.

However, perhaps it's worth considering using it on the call paths when no memory instructions are created, and at least some of the improved results will remain.
The question is what's the cost of creating a BatchAA instance every time one of the calls in `iterateOnFunction` returns true (either all those adding instructions, or change all APIs to return a {MadeChange, AddedMemInstr} pair).

I'd compare the cost of the extra memory for keeping the EI and BAA alongside AA, plus compile for creating the BAA instance on every mem instruction insert, with the improved metrics obtained, and see if it's worth pursuing.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110547



More information about the llvm-commits mailing list