This is an archive of the discontinued LLVM Phabricator instance.

[MIR-Renamer][WIP] opcode-chain based Canonical MIR VReg renaming.
AbandonedPublic

Authored by plotfi on Nov 8 2019, 2:53 PM.

Details

Summary

This patch is a first stab at renaming vregs not by an index increment but by the chain of encountered instruction opcodes in the defuse. Ideally something like:

%36:fpr64 = LDRDroX killed %30, %35, 0, 0
%38:gpr32common = ADDWri %32, 20, 0
%39:gpr64common = SMADDLrrr killed %38, %24, killed %37
STRDroX killed %36, killed %39, %35, 0, 0

Can be renamed to:

%STRDroXSBFMXr35:gpr64 = SBFMXri %STRDroXINSERT_SUBRE39, 61, 31
%STRDroXLDRDro33:fpr64 = LDRDroX %STRDroXLDRXu36, %STRDroXSBFMXr35, 0, 0
%STRDroXSMADDLrr34:gpr64common = SMADDLrrr %STRDroXADDWr37, %STURDiMOVi32im30, %STRDroXLDRXu38
STRDroX %STRDroXLDRDro33, %STRDroXSMADDLrr34, %BSTRDroXSBFMXr35, 0, 0

This is a rough work in progress. Only posting something this early without tests so that others can mess with it.

Diff Detail