diff options
author | Sanjin Sijaric <ssijaric@codeaurora.org> | 2018-10-24 21:07:38 +0000 |
---|---|---|
committer | Sanjin Sijaric <ssijaric@codeaurora.org> | 2018-10-24 21:07:38 +0000 |
commit | 625d08eea1f462de66130d0a09cf51d66f27e942 (patch) | |
tree | 178cef112c1fe396c036b480c3c3cf644eb78364 | |
parent | a0d18b63141a5231d9f1d2ddd5b46bcd1d0a85d1 (diff) | |
download | bcm5719-llvm-625d08eea1f462de66130d0a09cf51d66f27e942.tar.gz bcm5719-llvm-625d08eea1f462de66130d0a09cf51d66f27e942.zip |
[MIR] Add hasWinCFI field
Adding hasWinCFI field so that I can add MIR test cases to
https://reviews.llvm.org/D50166.
Differential Revision: https://reviews.llvm.org/D51201
llvm-svn: 345196
-rw-r--r-- | llvm/include/llvm/CodeGen/MIRYamlMapping.h | 2 | ||||
-rw-r--r-- | llvm/lib/CodeGen/MIRParser/MIRParser.cpp | 1 | ||||
-rw-r--r-- | llvm/lib/CodeGen/MIRPrinter.cpp | 1 |
3 files changed, 4 insertions, 0 deletions
diff --git a/llvm/include/llvm/CodeGen/MIRYamlMapping.h b/llvm/include/llvm/CodeGen/MIRYamlMapping.h index dc9057521e7..98ac81915dc 100644 --- a/llvm/include/llvm/CodeGen/MIRYamlMapping.h +++ b/llvm/include/llvm/CodeGen/MIRYamlMapping.h @@ -494,6 +494,7 @@ struct MachineFunction { bool FailedISel = false; // Register information bool TracksRegLiveness = false; + bool HasWinCFI = false; std::vector<VirtualRegisterDefinition> VirtualRegisters; std::vector<MachineFunctionLiveIn> LiveIns; Optional<std::vector<FlowStringValue>> CalleeSavedRegisters; @@ -517,6 +518,7 @@ template <> struct MappingTraits<MachineFunction> { YamlIO.mapOptional("selected", MF.Selected, false); YamlIO.mapOptional("failedISel", MF.FailedISel, false); YamlIO.mapOptional("tracksRegLiveness", MF.TracksRegLiveness, false); + YamlIO.mapOptional("hasWinCFI", MF.HasWinCFI, false); YamlIO.mapOptional("registers", MF.VirtualRegisters, std::vector<VirtualRegisterDefinition>()); YamlIO.mapOptional("liveins", MF.LiveIns, diff --git a/llvm/lib/CodeGen/MIRParser/MIRParser.cpp b/llvm/lib/CodeGen/MIRParser/MIRParser.cpp index 0102f1240a8..00da92a92ec 100644 --- a/llvm/lib/CodeGen/MIRParser/MIRParser.cpp +++ b/llvm/lib/CodeGen/MIRParser/MIRParser.cpp @@ -355,6 +355,7 @@ MIRParserImpl::initializeMachineFunction(const yaml::MachineFunction &YamlMF, if (YamlMF.Alignment) MF.setAlignment(YamlMF.Alignment); MF.setExposesReturnsTwice(YamlMF.ExposesReturnsTwice); + MF.setHasWinCFI(YamlMF.HasWinCFI); if (YamlMF.Legalized) MF.getProperties().set(MachineFunctionProperties::Property::Legalized); diff --git a/llvm/lib/CodeGen/MIRPrinter.cpp b/llvm/lib/CodeGen/MIRPrinter.cpp index 88e2f16d3fd..80129463715 100644 --- a/llvm/lib/CodeGen/MIRPrinter.cpp +++ b/llvm/lib/CodeGen/MIRPrinter.cpp @@ -196,6 +196,7 @@ void MIRPrinter::print(const MachineFunction &MF) { YamlMF.Name = MF.getName(); YamlMF.Alignment = MF.getAlignment(); YamlMF.ExposesReturnsTwice = MF.exposesReturnsTwice(); + YamlMF.HasWinCFI = MF.hasWinCFI(); YamlMF.Legalized = MF.getProperties().hasProperty( MachineFunctionProperties::Property::Legalized); |