-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[TableGen] Split *GenRegisterInfo.inc. #167700
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,19 +15,34 @@ | |
|
|
||
| #include "llvm/Support/CommandLine.h" | ||
| #include <functional> | ||
| #include <map> | ||
|
|
||
| namespace llvm { | ||
|
|
||
| class raw_ostream; | ||
| class RecordKeeper; | ||
|
|
||
| /// Perform the action using Records, and write output to OS. | ||
| struct TableGenOutputFiles { | ||
| std::string MainFile; | ||
|
|
||
| // Translates additional output file names to their contents. | ||
| std::map<StringRef, std::string> AdditionalFiles; | ||
| }; | ||
|
|
||
| /// Returns true on error, false otherwise. | ||
| using TableGenMainFn = bool(raw_ostream &OS, const RecordKeeper &Records); | ||
|
|
||
| /// Perform the action using Records, and store output in OutFiles. | ||
| /// Returns true on error, false otherwise. | ||
| using MultiFileTableGenMainFn = bool(TableGenOutputFiles &OutFiles, | ||
| const RecordKeeper &Records); | ||
|
|
||
| int TableGenMain(const char *argv0, | ||
| std::function<TableGenMainFn> MainFn = nullptr); | ||
|
|
||
| int TableGenMain(const char *argv0, | ||
| std::function<MultiFileTableGenMainFn> MainFn = nullptr); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. function_ref?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done in #167888. |
||
|
|
||
| /// Controls emitting large character arrays as strings or character arrays. | ||
| /// Typically set to false when building with MSVC. | ||
| extern cl::opt<bool> EmitLongStrLiterals; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| // RUN: llvm-tblgen -gen-register-info -register-info-debug -I %p/../../include %s -o /dev/null 2>&1 | FileCheck %s | ||
| // RUN: llvm-tblgen -gen-register-info -register-info-debug -I %p/../../include %s -o - 2>&1 >/dev/null | FileCheck %s | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is this change?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I understand,
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Updated documentation.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, I misunderstood the concept. I thought it would generate several files which are supposed to be included directly and not via the "main" include that includes everything.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, I should have explained it. The general idea is to make the change as transparent to existing users as possible. They still include the same old .inc file but memory usage goes down anyway. |
||
| // Checks that tablegen correctly and completely infers subregister relations. | ||
| include "llvm/Target/Target.td" | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function_ref?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in #167888.