diff options
author | Sumanth Gundapaneni <sgundapa@codeaurora.org> | 2017-06-30 20:10:28 +0000 |
---|---|---|
committer | Sumanth Gundapaneni <sgundapa@codeaurora.org> | 2017-06-30 20:10:28 +0000 |
commit | cf73758dc85f95ea0f6e71bd279b201eb8e5a0d9 (patch) | |
tree | ab627cf1da9bd147311a178b22e8c357a9852b6f /llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp | |
parent | d2130f51a197dafb969f12f98cde62b148c318d4 (diff) | |
download | bcm5719-llvm-cf73758dc85f95ea0f6e71bd279b201eb8e5a0d9.tar.gz bcm5719-llvm-cf73758dc85f95ea0f6e71bd279b201eb8e5a0d9.zip |
[Hexagon] Guard the generation of lookup table
The llvm flag "-hexagon-emit-lookup-tables" guards the generation
of lookup table from a switch statement.
Differential Revision: https://reviews.llvm.org/D34819
llvm-svn: 306869
Diffstat (limited to 'llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp')
-rw-r--r-- | llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp b/llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp index 4dacb150139..34df2ebcc52 100644 --- a/llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp +++ b/llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp @@ -49,6 +49,10 @@ static cl::opt<bool> TraceGVPlacement("trace-gv-placement", cl::Hidden, cl::init(false), cl::desc("Trace global value placement")); +static cl::opt<bool> + EmitJtInText("hexagon-emit-jt-text", cl::Hidden, cl::init(false), + cl::desc("Emit hexagon jump tables in function section")); + // TraceGVPlacement controls messages for all builds. For builds with assertions // (debug or release), messages are also controlled by the usual debug flags // (e.g. -debug and -debug-only=globallayout) @@ -256,6 +260,11 @@ unsigned HexagonTargetObjectFile::getSmallDataSize() const { return SmallDataThreshold; } +bool HexagonTargetObjectFile::shouldPutJumpTableInFunctionSection( + bool UsesLabelDifference, const Function &F) const { + return EmitJtInText; +} + /// Descends any type down to "elementary" components, /// discovering the smallest addressable one. /// If zero is returned, declaration will not be modified. |