This patch introduces preliminary support for additional memory locations. They are: target_mem0 and target_mem1 and they model memory locations that cannot be represented with existing memory locations. It was a solution suggested in : https://discourse.llvm.org/t/rfc-improving-fpmr-handling-for-fp8-intrinsics-in-llvm/86868/6 Currently, these locations are not yet target-specific. The goal is to enable the compiler to express read/write effects on these resources.
8 lines
414 B
LLVM
8 lines
414 B
LLVM
; RUN: llvm-dis < %S/Inputs/memory-attribute-upgrade.bc | FileCheck %s
|
|
|
|
; CHECK: ; Function Attrs: memory(write, argmem: read, target_mem0: none, target_mem1: none)
|
|
; CHECK-NEXT: define void @test_any_write_argmem_read(ptr %p)
|
|
|
|
; CHECK: ; Function Attrs: memory(read, argmem: readwrite, inaccessiblemem: none, target_mem0: none, target_mem1: none)
|
|
; CHECK-NEXT: define void @test_any_read_argmem_readwrite(ptr %p)
|