This is an archive of the discontinued LLVM Phabricator instance.

CodeGen: Refactor MIR parsing
ClosedPublic

Authored by MatzeB on Jun 1 2017, 4:41 PM.

Details

Summary

When parsing .mir files immediately construct the MachineFunctions and
put them into MachineModuleInfo.

This allows us to get rid of the delayed construction (and delayed error
reporting) through the MachineFunctionInitialzier interface.

Diff Detail

Repository
rL LLVM

Event Timeline

MatzeB created this revision.Jun 1 2017, 4:41 PM
qcolombet accepted this revision.Jun 5 2017, 10:59 AM

LGTM.
Nitpicks below

include/llvm/CodeGen/MachineModuleInfo.h
153 ↗(On Diff #101136)

Rename to getOrCreateMachineFunction

157 ↗(On Diff #101136)

Rename to getMachineFunction

lib/CodeGen/MIRParser/MIRParser.cpp
64 ↗(On Diff #101136)

Could you add a comment for that variable too?

This revision is now accepted and ready to land.Jun 5 2017, 10:59 AM
This revision was automatically updated to reflect the committed changes.
llvm/trunk/test/CodeGen/MIR/AArch64/generic-virtual-registers-error.mir