summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
diff options
context:
space:
mode:
authorRyan Govostes <rzg@apple.com>2016-05-05 01:27:04 +0000
committerRyan Govostes <rzg@apple.com>2016-05-05 01:27:04 +0000
commit8c21be6b3e55d172212a69264deb43dea7c706c3 (patch)
tree8cf9aa91e91413c6b09196a012317954300d37eb /llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
parentb86dc66e753df9005aec9bbb39a4c00fa233015c (diff)
downloadbcm5719-llvm-8c21be6b3e55d172212a69264deb43dea7c706c3.tar.gz
bcm5719-llvm-8c21be6b3e55d172212a69264deb43dea7c706c3.zip
Revert "[asan] add option to set shadow mapping offset"
This reverts commit ba89768f97b1d4326acb5e33c14eb23a05c7bea7. llvm-svn: 268588
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp')
-rw-r--r--llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
index 7648352d0b9..f2b5179b436 100644
--- a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
@@ -204,13 +204,10 @@ static cl::opt<bool> ClSkipPromotableAllocas(
// These flags allow to change the shadow mapping.
// The shadow mapping looks like
-// Shadow = (Mem >> scale) + offset
+// Shadow = (Mem >> scale) + (1 << offset_log)
static cl::opt<int> ClMappingScale("asan-mapping-scale",
cl::desc("scale of asan shadow mapping"),
cl::Hidden, cl::init(0));
-static cl::opt<uint64_t> ClMappingOffset("asan-mapping-offset",
- cl::desc("offset of asan shadow mapping [EXPERIMENTAL]"),
- cl::Hidden, cl::init(0));
// Optimization flags. Not user visible, used mostly for testing
// and benchmarking the tool.
@@ -407,14 +404,10 @@ static ShadowMapping getShadowMapping(Triple &TargetTriple, int LongSize,
}
Mapping.Scale = kDefaultShadowScale;
- if (ClMappingScale.getNumOccurrences() > 0) {
+ if (ClMappingScale) {
Mapping.Scale = ClMappingScale;
}
- if (ClMappingOffset.getNumOccurrences() > 0) {
- Mapping.Offset = ClMappingOffset;
- }
-
// OR-ing shadow offset if more efficient (at least on x86) if the offset
// is a power of two, but on ppc64 we have to use add since the shadow
// offset is not necessary 1/8-th of the address space. On SystemZ,
OpenPOWER on IntegriCloud