[MachineCSE][MachinePRE] Avoid hoisting code from code regions into hot BBs.


[MachineCSE][MachinePRE] Avoid hoisting code from code regions into hot BBs.

Current PRE hoists common computations into
CMBB = DT->findNearestCommonDominator(MBB, MBB1).
However, if CMBB is in a hot loop body, we might get performance

Differential Revision: https://reviews.llvm.org/D64394

Event Timeline

jgorbe added a subscriber: jgorbe.Aug 2 2019, 11:03 AM

FYI we have detected a 2-3% performance regression on Haswell machines in test-suite/MicroBenchmarks/ImageProcessing/Interpolation that seems to be caused by this commit.

This is not blocking us or anything, and it may still be worth having this change if it improves other stuff, just commenting in case you want to take a look :)

lkail added a comment.EditedSep 26 2019, 2:11 AM

Hi @jgorbe , I'm sorry I missed this message. Indeed we still get some enhance opportunity for this patch, such as considering register pressure. I'm wondering if the regression was caused by spilling.

lkail added a subscriber: lkail.Sep 28 2019, 3:28 AM