[llvm] [NFC][DecoderEmitter] Predicate generation code cleanup (PR #158140)
Sergei Barannikov via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 12 10:57:24 PDT 2025
================
@@ -1269,15 +1253,13 @@ unsigned DecoderTableBuilder::getPredicateIndex(StringRef Predicate) const {
}
void DecoderTableBuilder::emitPredicateTableEntry(unsigned EncodingID) const {
- if (!doesOpcodeNeedPredicate(EncodingID))
- return;
-
// Build up the predicate string.
SmallString<256> Predicate;
// FIXME: emitPredicateMatch() functions can take a buffer directly rather
// than a stream.
raw_svector_ostream PS(Predicate);
- emitPredicateMatch(PS, EncodingID);
+ if (!emitPredicateMatch(PS, EncodingID))
+ return;
----------------
s-barannikov wrote:
`Predicate.empty()` could also work
https://github.com/llvm/llvm-project/pull/158140
More information about the llvm-commits
mailing list