[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:15:54 PST 2019
aditya_nandakumar marked 2 inline comments as done.
aditya_nandakumar added inline comments.
================
Comment at: lib/CodeGen/GlobalISel/Combiner.cpp:114
Changed = false;
+ unsigned MF_Size = 0;
+ for (auto &MBB : MF)
----------------
paquette wrote:
> arsenm wrote:
> > size_t
> MFSize?
Thanks. Will update.
================
Comment at: lib/CodeGen/GlobalISel/Combiner.cpp:115
+ unsigned MF_Size = 0;
+ for (auto &MBB : MF)
+ MF_Size += MBB.size();
----------------
aditya_nandakumar wrote:
> 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?
Didn't know it existed. Will change to it.
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