[all-commits] [llvm/llvm-project] 8505a8: [TableGen] CodeGenInstAlias: reduce calls to isSub...
Alexander Richardson via All-commits
all-commits at lists.llvm.org
Fri Dec 5 09:24:29 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8505a879e57f7fa978576b25b6d0d1b8304009eb
https://github.com/llvm/llvm-project/commit/8505a879e57f7fa978576b25b6d0d1b8304009eb
Author: Alexander Richardson <alexrichardson at google.com>
Date: 2025-12-05 (Fri, 05 Dec 2025)
Changed paths:
M llvm/utils/TableGen/Common/CodeGenInstAlias.cpp
M llvm/utils/TableGen/Common/CodeGenTarget.cpp
M llvm/utils/TableGen/Common/CodeGenTarget.h
Log Message:
-----------
[TableGen] CodeGenInstAlias: reduce calls to isSubClassOf. NFCI
Add a `getAsRegClassLike()` helper to CodeGenTarget that handles the
`isSubClassOf` calls internally. This slightly reduces duplicated code
since it can be shared with `getInitValueAsRegClassLike()`.
Also change the llvm_unreachable at the end of this function to an
actual error since it could be reachable with bad inputs.
Reviewed By: s-barannikov, arsenm
Pull Request: https://github.com/llvm/llvm-project/pull/170767
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list