This enabled opaque pointers by default in LLVM. The effect of this is twofold: * If IR that contains *neither* explicit ptr nor %T* types is passed to tools, we will now use opaque pointer mode, unless -opaque-pointers=0 has been explicitly passed. * Users of LLVM as a library will now default to opaque pointers. It is possible to opt-out by calling setOpaquePointers(false) on LLVMContext. A cmake option to toggle this default will not be provided. Frontends or other tools that want to (temporarily) keep using typed pointers should disable opaque pointers via LLVMContext. Differential Revision: https://reviews.llvm.org/D126689
25 lines
925 B
LLVM
25 lines
925 B
LLVM
; RUN: opt -instrorderfile -S < %s | FileCheck %s
|
|
; RUN: opt -passes=instrorderfile -S < %s | FileCheck %s
|
|
|
|
target triple = "x86_64-apple-macosx10.10.0"
|
|
|
|
; CHECK: @_llvm_order_file_buffer ={{.*}}global [131072 x i64] zeroinitializer
|
|
; CHECK: @_llvm_order_file_buffer_idx = linkonce_odr global i32 0
|
|
; CHECK: @bitmap_0 ={{.*}}global [1 x i8] zeroinitializer
|
|
|
|
define i32 @_Z1fv() {
|
|
ret i32 0
|
|
}
|
|
; CHECK-LABEL: define i32 @_Z1fv
|
|
; CHECK: order_file_entry
|
|
; CHECK: %[[T1:.+]] = load i8, ptr @bitmap_0
|
|
; CHECK: store i8 1, ptr @bitmap_0
|
|
; CHECK: %[[T2:.+]] = icmp eq i8 %[[T1]], 0
|
|
; CHECK: br i1 %[[T2]], label %order_file_set, label
|
|
|
|
; CHECK: order_file_set
|
|
; CHECK: %[[T3:.+]] = atomicrmw add ptr @_llvm_order_file_buffer_idx, i32 1 seq_cst
|
|
; CHECK: %[[T5:.+]] = and i32 %[[T3]], 131071
|
|
; CHECK: %[[T4:.+]] = getelementptr [131072 x i64], ptr @_llvm_order_file_buffer, i32 0, i32 %[[T5]]
|
|
; CHECK: store i64 {{.*}}, ptr %[[T4]]
|