[llvm] [CodeGen, CHERI] Add capability types to MVT. (PR #156616)
    Sergei Barannikov via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Sep  3 10:21:34 PDT 2025
    
    
  
================
@@ -228,6 +228,9 @@ namespace llvm {
       return isSimple() ? V.is2048BitVector() : isExtended2048BitVector();
     }
 
+    /// Return true if this is a capability type.
+    bool isCapability() const { return isSimple() ? V.isCapability() : false; }
----------------
s-barannikov wrote:
> We decided to rename it to capability to clarify this.
Sorry, this term doesn't make sense for me. The dictionary describes "capability" as "the power or ability to do something", but I don't see how a *type* or a *pointer* can be that power or ability to do something (and what is something?).
Can this be named `isCheriPointer()` maybe? And the individual types `cheri_ptr64`/`cheri_ptr128`?
https://github.com/llvm/llvm-project/pull/156616
    
    
More information about the llvm-commits
mailing list