[CodeGen] Add a pass to fold null checks into nearby memory operations.
authorSanjoy Das <sanjoy@playingwithpointers.com>
Mon, 15 Jun 2015 18:44:27 +0000 (18:44 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Mon, 15 Jun 2015 18:44:27 +0000 (18:44 +0000)
commit8d5b28507b2ba1594ee9b40d03c418e5798a9e90
treeee3d688e913ca28f9a79865c11afbc8d36c91801
parenta1e554d253271fe0f9cba91b5c64b20031d12fc8
[CodeGen] Add a pass to fold null checks into nearby memory operations.

Summary:
This change adds an "ImplicitNullChecks" target dependent pass.  This
pass folds null checks into memory operation using the FAULTING_LOAD
pseudo-op introduced in previous patches.

Depends on D10197
Depends on D10199
Depends on D10200

Reviewers: reames, rnk, pgavlin, JosephTremoulet, atrick

Reviewed By: atrick

Subscribers: ab, JosephTremoulet, llvm-commits

Differential Revision: http://reviews.llvm.org/D10201

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239743 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/Passes.h
include/llvm/InitializePasses.h
lib/CodeGen/CMakeLists.txt
lib/CodeGen/CodeGen.cpp
lib/CodeGen/ImplicitNullChecks.cpp [new file with mode: 0644]
lib/CodeGen/Passes.cpp
test/CodeGen/X86/implicit-null-check-negative.ll [new file with mode: 0644]
test/CodeGen/X86/implicit-null-check.ll [new file with mode: 0644]