[PATCH] D35989: [SCEV][NFC] Introduces expression sizes estimation

Sanjoy Das via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 16 11:07:44 PST 2019


sanjoy added a comment.

In D35989#901470 <https://reviews.llvm.org/D35989#901470>, @mkazantsev wrote:

> Re-requesting review per Daniil's comment above. @sanjoy , is this overhead acceptable? I can come up with an alternative maps-based solution if it is not (i.e. only calculate this size for those SCEVs where we need it).


Do you have an estimate of what is the max memory consumption when bootstrapping?  I'm pretty sure 0.8M is a very small fraction of the total memory consumption, but would be nice to be sure.



================
Comment at: include/llvm/Analysis/ScalarEvolutionExpressions.h:419
                 ScalarEvolution *se, SCEVUnknown *next) :
-      SCEV(ID, scUnknown), CallbackVH(V), SE(se), Next(next) {}
+      SCEV(ID, scUnknown, 0), CallbackVH(V), SE(se), Next(next) {}
 
----------------
Like `SCEVConstant` this should probably be `1` as well?  Same for `SCEVCouldNotCompute`?  They're both leaf nodes.

If it needs to be `0` then please add a comment why.


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

https://reviews.llvm.org/D35989





More information about the llvm-commits mailing list