Use SCEV to avoid inserting some bounds checks.
authorJoel Galenson <jgalenson@google.com>
Tue, 24 Jul 2018 15:21:54 +0000 (15:21 +0000)
committerJoel Galenson <jgalenson@google.com>
Tue, 24 Jul 2018 15:21:54 +0000 (15:21 +0000)
commit8dbcc58917a6c39be05fe8de29ce84ae4adcb50e
treecbb0873f0f60f88beb52f6949b9c92ca9d7a51ad
parent3241724536b2c5a6ea0666676e7ad9d1b8bacfa4
Use SCEV to avoid inserting some bounds checks.

This patch uses SCEV to avoid inserting some bounds checks when they are not needed.  This slightly improves the performance of code compiled with the bounds check sanitizer.

Differential Revision: https://reviews.llvm.org/D49602

llvm-svn: 337830
llvm/lib/Transforms/Instrumentation/BoundsChecking.cpp
llvm/test/Instrumentation/BoundsChecking/opt.ll [new file with mode: 0644]