search for: availablecalls

Displaying 3 results from an estimated 3 matches for "availablecalls".

2016 Mar 15
7
RFC: DenseMap grow() slowness
...for (inst_iterator FI = inst_begin(F), FE = inst_end(F); FI != FE; ++FI) { if (FI->mayReadOrWriteMemory()) ++LoadCount; else if (isa<CallInst>(*FI)) ++CallCount; else ++InstCount; } AvailableValues.resize(InstCount); AvailableLoads.resize(LoadCount); AvailableCalls.resize(CallCount); But it does the job, and saves ~20% of time in EarlyCSE on my profiles. Yes, iterating over the entire function is way cheaper than grow(). Downsides are that while it’s still bounded by function size, it could end up allocating a good bit more depending on — in EarlyCSE’s case...
2016 Mar 15
2
RFC: DenseMap grow() slowness
...if (FI->mayReadOrWriteMemory()) >> ++LoadCount; >> else if (isa<CallInst>(*FI)) >> ++CallCount; >> else >> ++InstCount; >> } >> AvailableValues.resize(InstCount); >> AvailableLoads.resize(LoadCount); >> AvailableCalls.resize(CallCount); >> >> But it does the job, and saves ~20% of time in EarlyCSE on my profiles. Yes, iterating over the entire function is way cheaper than grow(). Downsides are that while it’s still bounded by function size, it could end up allocating a good bit more depending on — i...
2016 Mar 15
2
RFC: DenseMap grow() slowness
..._end(F); FI != FE; ++FI) { > if (FI->mayReadOrWriteMemory()) > ++LoadCount; > else if (isa<CallInst>(*FI)) > ++CallCount; > else > ++InstCount; > } > AvailableValues.resize(InstCount); > AvailableLoads.resize(LoadCount); > AvailableCalls.resize(CallCount); > > But it does the job, and saves ~20% of time in EarlyCSE on my profiles. Yes, iterating over the entire function is way cheaper than grow(). Downsides are that while it’s still bounded by function size, it could end up allocating a good bit more depending on — in EarlyC...