This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Set hasSideEffects for MFFS and MTFSF
AbandonedPublic

Authored by qiucf on Jul 27 2020, 11:36 PM.

Details

Reviewers
jsji
hfinkel
nemanjai
steven.zhang
ZhangKang
Group Reviewers
Restricted Project
Summary

MFFS: Move From FPSCR.

MTFSF: Move To FPSCR Fields under control masks.

LLVM currently doesn't model these bits well. Setting hasSideEffects prevents may-raise-exception FP instructions scheduled across MFFS/MTFSF.

Diff Detail

Event Timeline

qiucf created this revision.Jul 27 2020, 11:36 PM
Harbormaster returned this revision to the author for changes because remote builds failed.Jul 28 2020, 12:46 AM
qiucf requested review of this revision.Jul 28 2020, 7:40 PM
qiucf removed rG LLVM Github Monorepo as the repository for this revision.

Please adding a scheduling test(i.e. checking the dependency between MFFS and floating operations) to show your change fixing what you want.

llvm/lib/Target/PowerPC/PPCInstrInfo.td
2936

Please add necessary comments here to indicate why we want to set this flag for the read instr.

qiucf updated this revision to Diff 281457.Jul 28 2020, 8:33 PM
qiucf marked an inline comment as done.

Add comments and test

qiucf abandoned this revision.Jul 29 2020, 11:40 PM

Ah, setting them as scheduling boundary seems a better approach. I'll abandon this patch to create new one.