[PATCH] D119815: [FuncSpec]Save compilation time by caching uses of replaced value

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 15 01:42:45 PST 2022


SjoerdMeijer accepted this revision.
SjoerdMeijer added a comment.

Yeah, nice patch, thanks.

I was wondering if this was really caching and if it should be called something else, but I guess it is, it's cached very shortly/briefly, so it's alright. :)



================
Comment at: llvm/lib/Transforms/IPO/FunctionSpecialization.cpp:348
+    // Cache uses so that we can do propagation after replacing it with const.
+    SmallVector<Instruction *, 8> UseInsts;
+    for (auto *U : V->users())
----------------
Nit, quoting from the programmers manual:

> it is recommended to use SmallVector<T> (that is, omitting the N)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D119815



More information about the llvm-commits mailing list