[llvm] [TableGen] Add support for emitting new function definition to return a range of results for Primary Key (PR #96174)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 11 10:43:43 PDT 2024


================
@@ -793,7 +828,8 @@ void SearchableTableEmitter::run(raw_ostream &OS) {
     Table.Indices.push_back(
         parseSearchIndex(Table, IndexRec->getValue("Key"), IndexRec->getName(),
                          IndexRec->getValueAsListOfStrings("Key"),
-                         IndexRec->getValueAsBit("EarlyOut")));
+                         IndexRec->getValueAsBit("EarlyOut"),
+                         IndexRec->getValueAsBit("ReturnRange")));
----------------
topperc wrote:

> This would still require to have `ReturnRange` field in `struct SearchIndex` defined in the SearchableTableEmitter file. I have made the changes. Do let me know if this will be fine

That's fine. I just didn't want to expose something in the .td file that would always error if we could avoid it. The class in SearchTableEmitter isn't as user facing as the .td file.

https://github.com/llvm/llvm-project/pull/96174


More information about the llvm-commits mailing list