diff options
Diffstat (limited to 'backend/utils/TableGen/rcc-tblgen.cpp')
| -rw-r--r-- | backend/utils/TableGen/rcc-tblgen.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/backend/utils/TableGen/rcc-tblgen.cpp b/backend/utils/TableGen/rcc-tblgen.cpp index 5a5a419..47f0de4 100644 --- a/backend/utils/TableGen/rcc-tblgen.cpp +++ b/backend/utils/TableGen/rcc-tblgen.cpp @@ -23,6 +23,7 @@ struct CommandLine final { std::string TablesPath; std::string GlobalISelPath; std::string GlobalISelCombinerPath; + std::string MacroFusionPath; }; [[nodiscard]] bool parseCommandLine(int ArgumentCount, char *Arguments[], CommandLine &Result) { @@ -38,7 +39,7 @@ struct CommandLine final { } if (Argument == "--register-header" || Argument == "--instruction-header" || Argument == "--tables" || Argument == "--global-isel" || - Argument == "--global-isel-combiner") { + Argument == "--global-isel-combiner" || Argument == "--macro-fusion") { if (Index + 1 >= ArgumentCount) { std::cerr << "rcc-tblgen: missing value for " << Argument << '\n'; return false; @@ -52,6 +53,8 @@ struct CommandLine final { Destination = &Result.GlobalISelPath; else if (Argument == "--global-isel-combiner") Destination = &Result.GlobalISelCombinerPath; + else if (Argument == "--macro-fusion") + Destination = &Result.MacroFusionPath; else Destination = &Result.TablesPath; *Destination = Arguments[++Index]; @@ -62,12 +65,13 @@ struct CommandLine final { } if (!Result.InputPaths.empty() && !Result.RegisterHeaderPath.empty() && !Result.InstructionHeaderPath.empty() && !Result.TablesPath.empty() && - !Result.GlobalISelPath.empty() && !Result.GlobalISelCombinerPath.empty()) { + !Result.GlobalISelPath.empty() && !Result.GlobalISelCombinerPath.empty() && + !Result.MacroFusionPath.empty()) { return true; } std::cerr << "usage: rcc-tblgen --input <file> [--input <fragment>]... --register-header <file> " "--instruction-header <file> --tables <file> --global-isel <file> " - "--global-isel-combiner <file>\n"; + "--global-isel-combiner <file> --macro-fusion <file>\n"; return false; } @@ -233,7 +237,8 @@ int main(int ArgumentCount, char *Arguments[]) { writeFile(Command.InstructionHeaderPath, Output.InstructionHeader) && writeFile(Command.TablesPath, Output.TargetTables) && writeFile(Command.GlobalISelPath, Output.GlobalISel) && - writeFile(Command.GlobalISelCombinerPath, Output.GlobalISelCombiner) + writeFile(Command.GlobalISelCombinerPath, Output.GlobalISelCombiner) && + writeFile(Command.MacroFusionPath, Output.MacroFusion) ? 0 : 1; } |
