summaryrefslogtreecommitdiff
path: root/llvm/utils/TableGen/Common/PredicateExpander.cpp
AgeCommit message (Collapse)Author
2025-04-03[TableGen] Emit `llvm::is_contained` for `CheckOpcode` predicate (#134057)Pengcheng Wang
When the list is large, using `llvm::is_contained` is of higher performance than a sequence of comparisons. When the list is small, the `llvm::is_contained` can be inlined and unrolled, which has the same effect as using a sequence of comparisons. And the generated code is more readable.
2024-10-01[TableGen] Change `getValueAsListOfDefs` to return const pointer vector ↵Rahul Joshi
(#110713) Change `getValueAsListOfDefs` to return a vector of const Record pointer, and remove `getValueAsListOfConstDefs` that was added as a transition aid. 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-24[NFC][TableGen] Adopt scaled indent in PredicateExpander (#109801)Rahul Joshi
Adopt scaled indent in PredicateExpander. Added pre/post inc/dec operators to `indent` and related unit tests. Verified by comparing *.inc files generated by LLVM build with/without the change.
2024-09-21[TableGen] Change getReg() == 0 to !getReg().isValid() in ↵Craig Topper
expandCheckInvalidRegOperand. NFC
2024-09-20[LLVM][TableGen] Use const Record pointers in PredicateExpander (#109365)Rahul Joshi
Use const Record pointers in PredicateExpander. 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-03-25[RFC][TableGen] Restructure TableGen Source (#80847)Pierre van Houtryve
Refactor of the llvm-tblgen source into: - a "Basic" library, which contains the bare minimum utilities to build `llvm-min-tablegen` - a "Common" library which contains all of the helpers for TableGen backends. Such helpers can be shared by more than one backend, and even unit tested (e.g. CodeExpander is, maybe we can add more over time) Fixes #80647