llvm-project
8150ab93 - [LoopVectorize] Use CodeSize as the cost kind for minsize (#124119)

Commit
298 days ago
[LoopVectorize] Use CodeSize as the cost kind for minsize (#124119) Functions marked with minsize should aim for minimum code size, so the vectorizer should use CodeSize for the cost kind and also the cost we compare should be the cost for the entire loop: it shouldn't be divided by the number of vector elements and block costs shouldn't be divided by the block probability. Possibly we should also be doing this for optsize as well, but there are a lot of tests that assume the current behaviour and the definition of optsize is less clear than minsize (for minsize the goal is to "keep the code size of this function as small as possible" whereas for optsize it's "keep the code size of this function low").
Parents
Loading