HomePhabricator

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

Description

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

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

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.EditedThu, Sep 26, 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.Sat, Sep 28, 3:28 AM