summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
authorOliver Stannard <oliver.stannard@arm.com>2016-10-07 08:48:24 +0000
committerOliver Stannard <oliver.stannard@arm.com>2016-10-07 08:48:24 +0000
commit4df1cc0b00f7ee72a1841de2080d9a4f7a1a6955 (patch)
tree5ee57a9ce646cdb5ce5858ca4d695e36f81741df /llvm/lib/Analysis
parent68c6c8cd782d204e040e676f4bdfb8b4b7210a3e (diff)
downloadbcm5719-llvm-4df1cc0b00f7ee72a1841de2080d9a4f7a1a6955.tar.gz
bcm5719-llvm-4df1cc0b00f7ee72a1841de2080d9a4f7a1a6955.zip
[ARM] Don't convert switches to lookup tables of pointers with ROPI/RWPI
With the ROPI and RWPI relocation models we can't always have pointers to global data or functions in constant data, so don't try to convert switches into lookup tables if any value in the lookup table would require a relocation. We can still safely emit lookup tables of other values, such as simple constants. Differential Revision: https://reviews.llvm.org/D24462 llvm-svn: 283530
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/TargetTransformInfo.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/TargetTransformInfo.cpp b/llvm/lib/Analysis/TargetTransformInfo.cpp
index 7f225a59258..fb0db03eb3f 100644
--- a/llvm/lib/Analysis/TargetTransformInfo.cpp
+++ b/llvm/lib/Analysis/TargetTransformInfo.cpp
@@ -178,6 +178,9 @@ unsigned TargetTransformInfo::getJumpBufSize() const {
bool TargetTransformInfo::shouldBuildLookupTables() const {
return TTIImpl->shouldBuildLookupTables();
}
+bool TargetTransformInfo::shouldBuildLookupTablesForConstant(Constant *C) const {
+ return TTIImpl->shouldBuildLookupTablesForConstant(C);
+}
bool TargetTransformInfo::enableAggressiveInterleaving(bool LoopHasReductions) const {
return TTIImpl->enableAggressiveInterleaving(LoopHasReductions);
OpenPOWER on IntegriCloud