[PATCH] D90328: Eliminates dead store of an exisiting value

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 14 13:16:17 PST 2021


nikic added a comment.

Compile-time: https://llvm-compile-time-tracker.com/compare.php?from=a3904cc77f181cff7355357688edfc392a236f5d&to=b5ccbbb5b1d8fc76e2291a860e4cf0a4787b77d4&stat=instructions Seems mostly fine, only outlier is kimwitu++ in NewPM-O3 configuration (k.cc has 1.25% regression).

Something I don't understand about the general approach here is why we start at the `Def` store and walk all uses to find a `Use` store to eliminate. Wouldn't it be more efficient to start at the `Use` store, and check the defining access? With the current approach, I think we'll only find the cases where `Def` is the defining access of `Use`, as everything else would be an indirect use. This approach should also be much easier to make more powerful (by using `getClobberingMemoryAccess()`) without running into compile-time issues from visiting indirect uses.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90328



More information about the llvm-commits mailing list