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

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 11 14:09:14 PST 2019


paquette added inline comments.


================
Comment at: lib/CodeGen/GlobalISel/Combiner.cpp:114
     Changed = false;
+    unsigned MF_Size = 0;
+    for (auto &MBB : MF)
----------------
arsenm wrote:
> size_t
MFSize?


================
Comment at: lib/CodeGen/GlobalISel/Combiner.cpp:115
+    unsigned MF_Size = 0;
+    for (auto &MBB : MF)
+      MF_Size += MBB.size();
----------------
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


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