Displaying 3 results from an estimated 3 matches for "availableloads".
2016 Mar 15
7
RFC: DenseMap grow() slowness
...ount = 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);
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 mor...
2016 Mar 15
2
RFC: DenseMap grow() slowness
...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 u...
2016 Mar 15
2
RFC: DenseMap grow() slowness
...st_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...