diff options
| author | Daniel Sanders <daniel_l_sanders@apple.com> | 2017-08-23 10:09:25 +0000 |
|---|---|---|
| committer | Daniel Sanders <daniel_l_sanders@apple.com> | 2017-08-23 10:09:25 +0000 |
| commit | 499807079bfedb05bacee91c95cfb8acd96bf910 (patch) | |
| tree | 38c135799069033c237adc88dcc7cb95bc8d9850 /llvm/utils/TableGen/GlobalISelEmitter.cpp | |
| parent | 06d9eda1500943253795c2af5791880f63fd6049 (diff) | |
| download | bcm5719-llvm-499807079bfedb05bacee91c95cfb8acd96bf910.tar.gz bcm5719-llvm-499807079bfedb05bacee91c95cfb8acd96bf910.zip | |
[globalisel][tablegen] Add tests for FeatureBitsets and ComplexPattern predicates.
llvm-svn: 311542
Diffstat (limited to 'llvm/utils/TableGen/GlobalISelEmitter.cpp')
| -rw-r--r-- | llvm/utils/TableGen/GlobalISelEmitter.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/utils/TableGen/GlobalISelEmitter.cpp b/llvm/utils/TableGen/GlobalISelEmitter.cpp index 0e4eade442c..9f53ac40e3a 100644 --- a/llvm/utils/TableGen/GlobalISelEmitter.cpp +++ b/llvm/utils/TableGen/GlobalISelEmitter.cpp @@ -2567,7 +2567,8 @@ void GlobalISelEmitter::run(raw_ostream &OS) { for (const auto &Ty : LLTOperandMatcher::KnownTypes) TypeObjects.push_back(Ty); std::sort(TypeObjects.begin(), TypeObjects.end()); - OS << "enum {\n"; + OS << "// LLT Objects.\n" + << "enum {\n"; for (const auto &TypeObject : TypeObjects) { OS << " "; TypeObject.emitCxxEnumValue(OS); @@ -2605,7 +2606,8 @@ void GlobalISelEmitter::run(raw_ostream &OS) { FeatureBitsets.erase( std::unique(FeatureBitsets.begin(), FeatureBitsets.end()), FeatureBitsets.end()); - OS << "enum {\n" + OS << "// Feature bitsets.\n" + << "enum {\n" << " GIFBS_Invalid,\n"; for (const auto &FeatureBitset : FeatureBitsets) { if (FeatureBitset.empty()) @@ -2629,7 +2631,8 @@ void GlobalISelEmitter::run(raw_ostream &OS) { OS << "};\n\n"; // Emit complex predicate table and an enum to reference them with. - OS << "enum {\n" + OS << "// ComplexPattern predicates.\n" + << "enum {\n" << " GICP_Invalid,\n"; for (const auto &Record : ComplexPredicates) OS << " GICP_" << Record->getName() << ",\n"; |

