Page MenuHomePhabricator

[X86] Fix a bug when calculating the ldtilecfg insertion points.
ClosedPublic

Authored by pengfei on Mar 18 2021, 2:34 AM.

Details

Summary

The BB we initialized the ldtilecfg is special. We don't need to check
if its predecessor BBs need to insert ldtilecfg for calls.

We reused the flag HasCallBeforeAMX, so that the predecessors won't be
added to CfgNeedInsert.

This case happens only when the entry BB is in a loop. We need to hoist
the first tile config point out of the loop in future.

Diff Detail

Event Timeline

pengfei created this revision.Mar 18 2021, 2:34 AM
pengfei requested review of this revision.Mar 18 2021, 2:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 18 2021, 2:34 AM
LuoYuanke added inline comments.Mar 19 2021, 7:19 AM
llvm/lib/Target/X86/X86PreTileConfig.cpp
303

It take the some time to re-understand what HasCallBeforeAMX means. It seems NoPredUpdate is more readable than HasCallBeforeAMX, but it is not related to this patch.

LuoYuanke accepted this revision.Mar 19 2021, 7:20 AM

LGTM, thanks.

This revision is now accepted and ready to land.Mar 19 2021, 7:20 AM
pengfei added inline comments.Mar 19 2021, 11:26 PM
llvm/lib/Target/X86/X86PreTileConfig.cpp
303

Good suggestion. I refactored it bassed on your thought by D99010.