OSDN Git Service

Merging r338902:
authorHans Wennborg <hans@hanshq.net>
Wed, 8 Aug 2018 13:14:57 +0000 (13:14 +0000)
committerHans Wennborg <hans@hanshq.net>
Wed, 8 Aug 2018 13:14:57 +0000 (13:14 +0000)
commitf208a0a1daa9526563817e0f8da6b303b82b8e1d
tree80ad449dff80058469a3389e7e18910d9fbcde78
parent62ca9ef3b9aff92f53de29cb74429f58d4201c82
Merging r338902:
------------------------------------------------------------------------
r338902 | jgalenson | 2018-08-03 19:12:23 +0200 (Fri, 03 Aug 2018) | 5 lines

Fix crash in bounds checking.

In r337830 I added SCEV checks to enable us to insert fewer bounds checks.  Unfortunately, this sometimes crashes when multiple bounds checks are added due to SCEV caching issues.  This patch splits the bounds checking pass into two phases, one that computes all the conditions (using SCEV checks) and the other that adds the new instructions.

Differential Revision: https://reviews.llvm.org/D49946
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_70@339239 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Instrumentation/BoundsChecking.cpp
test/Instrumentation/BoundsChecking/many-traps-2.ll [new file with mode: 0644]