
Model C/C++ `errno` macro by adding a corresponding `errno` memory location kind to the IR. Preliminary work to separate `errno` writes from other memory accesses, to the benefit of alias analyses and optimization correctness. Previous discussion: https://discourse.llvm.org/t/rfc-modelling-errno-memory-effects/82972.
8 lines
338 B
LLVM
8 lines
338 B
LLVM
; RUN: llvm-dis < %S/Inputs/memory-attribute-upgrade.bc | FileCheck %s
|
|
|
|
; CHECK: ; Function Attrs: memory(write, argmem: read)
|
|
; CHECK-NEXT: define void @test_any_write_argmem_read(ptr %p)
|
|
|
|
; CHECK: ; Function Attrs: memory(read, argmem: readwrite, inaccessiblemem: none)
|
|
; CHECK-NEXT: define void @test_any_read_argmem_readwrite(ptr %p)
|