[PATCH] Fix a performance problem in gep(gep ...) merging

Wei Mi wmi at google.com
Tue Apr 14 09:40:44 PDT 2015


> I might be misunderstanding why this patch helps, please bear with me. Is
> this not a special case of a general problem, mainly that we're merging
> something into a loop that was previously two operations one inside and one
> outside the loop? Why wouldn't this problem come up in other ways?

merging something into a loop was not the key problem here. If the
cost after merging is less than the cost of the target, the merging is
still beneficial even if the target is inside loop. So the criterial
deciding whether to do the merging for a case is to see whether
merging is beneficial. We want to find out all the important cases for
which gep merging is beneficial.

Quentin mentioned the beneficial addressing mode case I didn't think
of before. And it is possible that I can filter out some testcases
from internal benchmarks. working on it right now.

Wei.



More information about the llvm-commits mailing list