I want to instrument some struct operations accrording to struct type with LLVM-21. However, I found that the struct type was stripped in LLVM IR. After checking relevant information, I know that LLVM-21 doesn’t support typed pointer anymore. Therefore, I want to know are there some ways to recover typed pointer in LLVM-21? Any help would be appreciated.
Support for typed pointers was removed in I think LLVM 17 or 18. So no, typed pointers simply do not exist anymore. Afaik if you care a lot about having an IR with type information, the recommended solution is generally to use a higher level IR (something like MLIR); we’re currently also in the process of replacing type-based GEPs with an offset-based ptradd
instruction, so that means even more type information will be removed in the future.