[llvm] r283612 - [InstCombine] Don't unpack arrays that are too large (part 2).

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 11 08:49:38 PDT 2016


On Mon, Oct 10, 2016 at 7:04 PM, Sanjoy Das
<sanjoy at playingwithpointers.com> wrote:
> How about making the 1024 a cl::opt tunable parameter (also in
> https://reviews.llvm.org/rL283599)?
>
> -- Sanjoy

I have no strong opinion about this. A quick (probably non-exaustive)
search in lib/Transform/InstCombine/* shows that the only cl::opt is
the one to enable/disable expensive combines, so adding
threshold-based tunables doesn't seem quite common there.
I'm fine with adding the new tunable but maybe we should make more
generic? Something like "max size of the array we should consider when
performing transforms"? At that point we could also use it inside
`Instruction *InstCombiner::foldCmpLoadFromIndexedGlobal` which
hardcodes a similar threshold. What do you think?


-- 
Davide

"There are no solved problems; there are only problems that are more
or less solved" -- Henri Poincare


More information about the llvm-commits mailing list