summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/implicit-null-check.ll
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2015-06-30 21:22:32 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2015-06-30 21:22:32 +0000
commit9c41a93e24880289837cb387dc78dc643edc9ec6 (patch)
treea03059fd480e461d157d000e66280c8431d09420 /llvm/test/CodeGen/X86/implicit-null-check.ll
parent2b00f08620d99e49734a9cae8c14461912afbc47 (diff)
downloadbcm5719-llvm-9c41a93e24880289837cb387dc78dc643edc9ec6.tar.gz
bcm5719-llvm-9c41a93e24880289837cb387dc78dc643edc9ec6.zip
[FaultMaps] Let the frontend pre-select implicit null check candidates.
Summary: This change introduces a !make.implicit metadata that allows the frontend to pre-select the set of explicit null checks that will be considered for transformation into implicit null checks. The reason for not using profiling data instead of !make.implicit is explained in the change to `FaultMaps.rst`. Reviewers: atrick, reames, pgavlin, JosephTremoulet Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10824 llvm-svn: 241116
Diffstat (limited to 'llvm/test/CodeGen/X86/implicit-null-check.ll')
-rw-r--r--llvm/test/CodeGen/X86/implicit-null-check.ll8
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/test/CodeGen/X86/implicit-null-check.ll b/llvm/test/CodeGen/X86/implicit-null-check.ll
index defd48a781a..1d1b36bbd5d 100644
--- a/llvm/test/CodeGen/X86/implicit-null-check.ll
+++ b/llvm/test/CodeGen/X86/implicit-null-check.ll
@@ -21,7 +21,7 @@ define i32 @imp_null_check_load(i32* %x) {
entry:
%c = icmp eq i32* %x, null
- br i1 %c, label %is_null, label %not_null
+ br i1 %c, label %is_null, label %not_null, !make.implicit !0
is_null:
ret i32 42
@@ -42,7 +42,7 @@ define i32 @imp_null_check_gep_load(i32* %x) {
entry:
%c = icmp eq i32* %x, null
- br i1 %c, label %is_null, label %not_null
+ br i1 %c, label %is_null, label %not_null, !make.implicit !0
is_null:
ret i32 42
@@ -65,7 +65,7 @@ define i32 @imp_null_check_add_result(i32* %x, i32 %p) {
entry:
%c = icmp eq i32* %x, null
- br i1 %c, label %is_null, label %not_null
+ br i1 %c, label %is_null, label %not_null, !make.implicit !0
is_null:
ret i32 42
@@ -76,6 +76,8 @@ define i32 @imp_null_check_add_result(i32* %x, i32 %p) {
ret i32 %p1
}
+!0 = !{}
+
; CHECK-LABEL: __LLVM_FaultMaps:
; Version:
OpenPOWER on IntegriCloud