diff options
author | Sanjoy Das <sanjoy@playingwithpointers.com> | 2016-06-22 22:16:51 +0000 |
---|---|---|
committer | Sanjoy Das <sanjoy@playingwithpointers.com> | 2016-06-22 22:16:51 +0000 |
commit | e57bf680ec117a98093c1a0094bcbcabf8d31947 (patch) | |
tree | b32291d66d9f4f50f62d261898d5204adf84054b /llvm/lib/Object | |
parent | 590e85b57561f07d09b51067090d4abc763afca5 (diff) | |
download | bcm5719-llvm-e57bf680ec117a98093c1a0094bcbcabf8d31947.tar.gz bcm5719-llvm-e57bf680ec117a98093c1a0094bcbcabf8d31947.zip |
[ImplicitNullChecks] Hoist trivial depdendencies if possible
When trying to convert a loading instruction into a FAULTING_LOAD, we
sometimes face code like this:
if %R10 is not null:
%R9<def> = MOV32ri Immediate
%R9<def, tied> = AND32rm %R9, 0x20(%R10)
else:
goto TRAP
In these cases we would like to use the AND32rm instruction as the
faulting operation by hoisting the "depedency" def-ing %R9 also above
the control flow, transforming the program into:
%R9<def> = MOV32ri Immediate
%R9<def, tied> = FAULTING_LOAD_OP(AND32rm %R9, 0x20(%R10), FailPath: TRAP)
This change teaches ImplicitNullChecks to do the above, when safe.
llvm-svn: 273501
Diffstat (limited to 'llvm/lib/Object')
0 files changed, 0 insertions, 0 deletions