summaryrefslogtreecommitdiff
path: root/llvm/lib/TableGen/DetailedRecordsBackend.cpp
AgeCommit message (Collapse)Author
2025-04-24[TableGen] Only store direct superclasses in Record (#123072)Jay Foad
In Record only store the direct superclasses instead of all superclasses. getSuperClasses recurses to find all superclasses when necessary. This gives a small reduction in memory usage. On lib/Target/X86/X86.td I measured about 2.0% reduction in total bytes allocated (measured by valgrind) and 1.3% reduction in peak memory usage (measured by /usr/bin/time -v). --------- Co-authored-by: Min-Yih Hsu <min@myhsu.dev>
2024-10-18[LLVM][TableGen] Change all `Init` pointers to const (#112705)Rahul Joshi
This is a part of effort to have better const correctness in TableGen backends: https://discourse.llvm.org/t/psa-planned-changes-to-tablegen-getallderiveddefinitions-api-potential-downstream-breakages/81089
2024-10-02[NFC][TableGen] Change `Record::getSuperClasses` to use const Record* (#110845)Rahul Joshi
Change `Record::getSuperClasses` to return a const pointer to the superclass records. This is a part of effort to have better const correctness in TableGen backends: https://discourse.llvm.org/t/psa-planned-changes-to-tablegen-getallderiveddefinitions-api-potential-downstream-breakages/81089
2024-09-04[TableGen] Print memory stats in detailed record emitter (#106990)Rahul Joshi
Print memory allocation and related statistics when dumping detailed record information.
2024-08-26[NFC][TableGen] Refactor JSON and detailed record emitter (#105770)Rahul Joshi
- Fix JSON and detailed record emitters to use const reference and pointers. - Fix code to use C++ structured bindings and range-based loops, including reverse() range for locations. - Eliminate `NL` define for "\n". - Change JSON emitter to populate `instance_list` in an earlier loop over superclasses instead of a separate loop. - Rename variables in JSON emitter to conform to LLVM naming conventions. - Eliminate unused headers in detailed record emitter.
2022-01-28Cleanup include dependencies for LLVMTableGenserge-sans-paille
Based on the output of include-what-you-use. No other library seems affected by the new forward declaration. $ clang++ -E -Iinclude -I../llvm/include ../llvm/lib/TableGen/*.cpp -std=c++14 -fno-rtti -fno-exceptions | wc -l before: 795231 after: 750654 Related Discourse thread: https://llvm.discourse.group/t/include-what-you-use-include-cleanup Differential Revision: https://reviews.llvm.org/D118374
2021-06-13DetailedRecordsBackend.cpp - printSectionHeading - avoid std::string ↵Simon Pilgrim
creation/copies. Don't create std::string from constant c-strings or pass std::string by value - we can use StringRef instead.
2021-06-13DetailedRecordsBackend.cpp - tidy implicit header dependencies. NFCI.Simon Pilgrim
We don't use <algorithm>, <set> or <vector>, but we do use std::pair (<utility>).
2021-01-27[TableGen] [DetailedRecords] Print record name that is null string as ""Paul C. Anagnostopoulos
Differential Revision: https://reviews.llvm.org/D95312 Add a test for the backend.
2020-12-06[TableGen] Delete 11 unused declarationsFangrui Song
2020-10-02[TableGen] New backend to print detailed records.Paul C. Anagnostopoulos
Pertinent lints are fixed.