[llvm] [InferAS] Infer the address space of inttoptr (PR #173244)

Luo Yuanke via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 14 15:19:34 PST 2026


================

----------------
LuoYuanke wrote:

To not break parallel compiling the `DenseMap` can not be a global variable, right? If it is a member field of `InferAddressSpacesImpl`, the caller can not be a const method, otherwise compiler would report an error on the callsite which calls `getIntToPtrPointerOperand(const Operator *, PtrIntCastMap &)`, if the `DenseMap` is not mutable.
```
error: passing ‘const PtrIntCastMap’ {aka ‘const llvm::DenseMap<const llvm::Value*, llvm::Value*>’} as ‘this’ argument discards qualifiers [-fpermissive]
```

https://github.com/llvm/llvm-project/pull/173244


More information about the llvm-commits mailing list