[PATCH] D58073: [GlobalISel][NFC]: Add interface to reserve memory in GISelWorklist

Aditya Nandakumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 11 14:12:39 PST 2019


aditya_nandakumar marked 3 inline comments as done.
aditya_nandakumar added inline comments.


================
Comment at: lib/CodeGen/GlobalISel/Combiner.cpp:115
+    unsigned MF_Size = 0;
+    for (auto &MBB : MF)
+      MF_Size += MBB.size();
----------------
paquette wrote:
> arsenm wrote:
> > It seems weird to me to scan over the function just to estimate this. Can you start with some large constant and increase with each block as it's seen?
> `MF.getInstructionCount()` does this
What according to you is a large constant? Also could you elaborate on what  you mean by increase with each block as it's seen? IIUC are you suggesting NumBlocks * some_large_constant?


Repository:
  rL LLVM

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

https://reviews.llvm.org/D58073





More information about the llvm-commits mailing list