diff options
| author | Benjamin Kramer <benny.kra@googlemail.com> | 2014-03-25 18:02:07 +0000 |
|---|---|---|
| committer | Benjamin Kramer <benny.kra@googlemail.com> | 2014-03-25 18:02:07 +0000 |
| commit | ab88f62614752aef658dcb5dc4f14543ff2b2b14 (patch) | |
| tree | 88ef73b512b7fda9e9de6164dba95816d0c1571a /clang/lib/Driver/Tools.cpp | |
| parent | 3dbe10503aea12c952045e2f0f27762c70641dea (diff) | |
| download | bcm5719-llvm-ab88f62614752aef658dcb5dc4f14543ff2b2b14.tar.gz bcm5719-llvm-ab88f62614752aef658dcb5dc4f14543ff2b2b14.zip | |
Fix an logic error in the clang driver preventing crtfastmath.o from linking when -Ofast is used without -ffast-math
In gcc using -Ofast forces linking of crtfastmath.o.
In the current clang crtfastmath.o is only linked when -ffast-math/-funsafe-math-optimizations passed. It can lead to performance issues, when using only -Ofast without explicit -ffast-math (I faced with it).
My patch fixes inconsistency with gcc behaviour and also introduces few tests on it.
Patch by Zinovy Nis!
Differential Revision: http://llvm-reviews.chandlerc.com/D3114
llvm-svn: 204742
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
| -rw-r--r-- | clang/lib/Driver/Tools.cpp | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index ef3e00329dd..c90fb81f030 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -2034,13 +2034,6 @@ static void SplitDebugInfo(const ToolChain &TC, Compilation &C, C.addCommand(new Command(JA, T, Exec, StripArgs)); } -static bool isOptimizationLevelFast(const ArgList &Args) { - if (Arg *A = Args.getLastArg(options::OPT_O_Group)) - if (A->getOption().matches(options::OPT_Ofast)) - return true; - return false; -} - /// \brief Vectorize at all optimization levels greater than 1 except for -Oz. static bool shouldEnableVectorizerAtOLevel(const ArgList &Args) { if (Arg *A = Args.getLastArg(options::OPT_O_Group)) { |

