Displaying 3 results from an estimated 3 matches for "loadcount".
2016 Mar 15
7
RFC: DenseMap grow() slowness
...2 bits more per entry (or whatever), and it might not help that much, since we still have to do the whole reinsertion routine.
3. Pre-calculate an estimate as to the map size we need. For example, in EarlyCSE, this is possibly gross overestimate of size needed:
unsigned InstCount = 0;
unsigned LoadCount = 0;
unsigned CallCount = 0;
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);
Avai...
2016 Mar 15
2
RFC: DenseMap grow() slowness
...and it might not help that much, since we still have to do the whole reinsertion routine.
>> 3. Pre-calculate an estimate as to the map size we need. For example, in EarlyCSE, this is possibly gross overestimate of size needed:
>>
>> unsigned InstCount = 0;
>> unsigned LoadCount = 0;
>> unsigned CallCount = 0;
>> 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
>...
2016 Mar 15
2
RFC: DenseMap grow() slowness
...y (or whatever), and it might not help that much, since we still have to do the whole reinsertion routine.
> 3. Pre-calculate an estimate as to the map size we need. For example, in EarlyCSE, this is possibly gross overestimate of size needed:
>
> unsigned InstCount = 0;
> unsigned LoadCount = 0;
> unsigned CallCount = 0;
> 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;
>...