diff options
author | David Sehr <sehr@chromium.org> | 2013-05-08 09:28:31 -0700 |
---|---|---|
committer | David Sehr <sehr@chromium.org> | 2013-05-08 09:28:31 -0700 |
commit | 8c9803a8981992ffd6bb1a901c9c3a52f2aedfce (patch) | |
tree | 1e47699dab33d564f63e44a4ad87aeb396fa39b3 /include/llvm/Transforms | |
parent | 77cc10ffb869891e7eff5a5fa1be4437c3360cf8 (diff) |
Insert denominator zero checks for NaCl
This IR pass for ARM inserts a comparison and a branch to trap if the
denominator of a DIV or REM instruction is zero. This makes ARM fault
identically to x86 in this case.
BUG= https://code.google.com/p/nativeclient/issues/detail?id=2833
R=eliben@chromium.org
Review URL: https://codereview.chromium.org/14607004
Diffstat (limited to 'include/llvm/Transforms')
-rw-r--r-- | include/llvm/Transforms/NaCl.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/llvm/Transforms/NaCl.h b/include/llvm/Transforms/NaCl.h index ba765c1c21..edd641e901 100644 --- a/include/llvm/Transforms/NaCl.h +++ b/include/llvm/Transforms/NaCl.h @@ -30,6 +30,7 @@ ModulePass *createFlattenGlobalsPass(); ModulePass *createGlobalCleanupPass(); ModulePass *createResolveAliasesPass(); ModulePass *createStripMetadataPass(); +FunctionPass *createInsertDivideCheckPass(); Instruction *PhiSafeInsertPt(Use *U); void PhiSafeReplaceUses(Use *U, Value *NewVal); |