diff options
| author | Owen Anderson <resistor@mac.com> | 2025-09-11 17:44:30 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-11 17:44:30 +0800 |
| commit | 0f13cae7ff1b0efe37e1f1a2d6cdda48803b44ca (patch) | |
| tree | 86dc87ea76fd8c01dc7e9cc52536066b5fcb449d /llvm/lib/CodeGen/ValueTypes.cpp | |
| parent | 40270e8ef207a25850fd3cd14cbf3301e1785080 (diff) | |
[CodeGen, CHERI] Add capability types to MVT. (#156616)
This adds value types for representing capability types, enabling their use in instruction selection and other parts of the backend.
These types are distinguished from each other only by size. This is sufficient, at least today, because no existing CHERI configuration supports multiple capability sizes simultaneously. Hybrid configurations supporting intermixed integral pointers and capabilities do exist, and are one of the reasons why these value types are needed beyond existing integral types.
Co-authored-by: David Chisnall <theraven@theravensnest.org>
Co-authored-by: Jessica Clarke <jrtc27@jrtc27.com>
Diffstat (limited to 'llvm/lib/CodeGen/ValueTypes.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/ValueTypes.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/ValueTypes.cpp b/llvm/lib/CodeGen/ValueTypes.cpp index 10970b719fca..0743c92c5b95 100644 --- a/llvm/lib/CodeGen/ValueTypes.cpp +++ b/llvm/lib/CodeGen/ValueTypes.cpp @@ -176,6 +176,8 @@ std::string EVT::getEVTString() const { return "i" + utostr(getSizeInBits()); if (isFloatingPoint()) return "f" + utostr(getSizeInBits()); + if (isCheriCapability()) + return "c" + utostr(getSizeInBits()); llvm_unreachable("Invalid EVT!"); case MVT::bf16: return "bf16"; case MVT::ppcf128: return "ppcf128"; |
