llvm-project
5d91c11d - [flang] Support cuf.device_address in FIR AliasAnalysis. (#177518)

Commit
20 days ago
[flang] Support cuf.device_address in FIR AliasAnalysis. (#177518) Support `cuf.device_address` same way as `fir.address_of`. This implementation implies that the host address and the device address `MustAlias` (as shown in the new test). This should be conservatively correct as long as `MustAlias` does not allow to assume that the actual addresses are the same (that is what LLVM documentation implies, I believe). It is probably worth adding an operation interface to handle `fir::AddrOfOp` and `cuf::DeviceAddressOp` in FIR AliasAnalysis, but for the initial implementation I hardcoded the checks. I also removed the call to `fir::valueHasFirAttribute` that performs on demand SymbolTable lookups, which may be costly, and added SymbolTable caching in FIR AliasAnalysis object. Anyway, `fir::valueHasFirAttribute` does not work for `cuf::DeviceAddressOp`.
Author
Parents
Loading