OSDN Git Service

[GlobalISel] Print/Parse FailedISel MachineFunction property
authorRoman Tereshin <rtereshin@apple.com>
Wed, 28 Feb 2018 17:55:45 +0000 (17:55 +0000)
committerRoman Tereshin <rtereshin@apple.com>
Wed, 28 Feb 2018 17:55:45 +0000 (17:55 +0000)
commit8e63a838087fe82bf9af5df9d659ca0528147093
tree209f32600af63e6784e309b4fa7df60ee4e85c8f
parent70716e54e03f8a92d646403c7d4c3eb87c70804e
[GlobalISel] Print/Parse FailedISel MachineFunction property

FailedISel MachineFunction property is part of the CodeGen pipeline
state as much as every other property, notably, Legalized,
RegBankSelected, and Selected. Let's make that part of the state also
serializable / de-serializable, so if GlobalISel aborts on some of the
functions of a large module, but not the others, it could be easily seen
and the state of the pipeline could be maintained through llc's
invocations with -stop-after / -start-after.

To make MIR printable and generally to not to break it too much too
soon, this patch also defers cleaning up the vreg -> LLT map until
ResetMachineFunctionPass.

To make MIR with FailedISel: true also machine verifiable, machine
verifier is changed so it treats a MIR-module as non-regbankselected and
non-selected if there is FailedISel property set.

Reviewers: qcolombet, ab

Reviewed By: dsanders

Subscribers: javed.absar, rovka, kristof.beyls, llvm-commits

Differential Revision: https://reviews.llvm.org/D42877

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@326343 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/MIRYamlMapping.h
lib/CodeGen/GlobalISel/InstructionSelect.cpp
lib/CodeGen/MIRParser/MIRParser.cpp
lib/CodeGen/MIRPrinter.cpp
lib/CodeGen/MachineVerifier.cpp
lib/CodeGen/ResetMachineFunctionPass.cpp
test/CodeGen/MIR/AArch64/print-parse-verify-failedISel-property.mir [new file with mode: 0644]