llvm-project/clang/lib/Frontend
Chandler Carruth 54c2910692 The only useful loop unrolling flag to give realistically is
'-fno-unroll-loops'. The option to the backend is even called
'DisableUnrollLoops'. This is precisely the form that Clang *didn't*
support. We didn't recognize the flag, we didn't pass it to the CC1
layer, and even if we did we wouldn't use it. Clang only inspected the
positive form of the flag, and only did so to enable loop unrolling when
the optimization level wasn't high enough. This only occurs for an
optimization level that even has a chance of running the loop unroller
when optimizing for size.

This commit wires up the 'no' variant, and switches the code to actually
follow the standard flag pattern of using the last flag and allowing
a flag in either direction to override the default.

I think this is still wrong. I don't know why we disable the loop
unroller entirely *from Clang* when optimizing for size, as the loop
unrolling pass *already has special logic* for the case where the
function is attributed as optimized for size! We should really be
trusting that. Maybe in a follow-up patch, I don't really want to change
behavior here.

llvm-svn: 187969
2013-08-08 08:34:35 +00:00
..
ASTConsumers.cpp Add -ast-dump-lookups switch to -cc1 to dump DeclContext lookup maps. Test to 2013-06-24 01:45:33 +00:00
ASTMerge.cpp When building a module, forward diagnostics to the outer diagnostic consumer. 2013-05-03 22:58:43 +00:00
ASTUnit.cpp [PCH] Fix a PCH serialization crash, with invalid code related to forward enum references. 2013-08-07 21:17:33 +00:00
CMakeLists.txt clang/lib: [CMake] Update tblgen'd dependencies. 2012-07-27 06:18:33 +00:00
CacheTokens.cpp Use llvm::sys::fs::UniqueID for windows and unix. 2013-08-01 21:42:11 +00:00
ChainedDiagnosticConsumer.cpp Remove spurious mode marker from .cpp file. 2012-10-29 06:05:01 +00:00
ChainedIncludesSource.cpp Use SmallVectorImpl& for function arguments instead of SmallVector. 2013-07-05 19:34:19 +00:00
CompilerInstance.cpp Use the simpler is_directory. 2013-07-17 04:23:07 +00:00
CompilerInvocation.cpp The only useful loop unrolling flag to give realistically is 2013-08-08 08:34:35 +00:00
CreateInvocationFromCommandLine.cpp [Driver] Refactor clang driver to use LLVM's Option library 2013-06-14 17:17:23 +00:00
DependencyFile.cpp Modernize some low-hanging PathV1 uses. 2013-06-13 14:26:04 +00:00
DependencyGraph.cpp Remove useless 'llvm::' qualifier from names like StringRef and others that are 2013-01-12 19:30:44 +00:00
DiagnosticRenderer.cpp Replace ArrayRef<T>() with None, now that we have an implicit ArrayRef constructor from None 2013-05-05 00:41:58 +00:00
FrontendAction.cpp Avoid crashing if a directory has no pch files. 2013-07-28 13:23:37 +00:00
FrontendActions.cpp Add -ast-dump-lookups switch to -cc1 to dump DeclContext lookup maps. Test to 2013-06-24 01:45:33 +00:00
FrontendOptions.cpp Remove duplicated case. 2013-06-22 16:44:45 +00:00
HeaderIncludeGen.cpp Update for llvm API change. 2013-07-16 19:44:23 +00:00
InitHeaderSearch.cpp Modernize some low-hanging PathV1 uses. 2013-06-13 14:26:04 +00:00
InitPreprocessor.cpp C++1y: Update __cplusplus to temporary value 201305L to allow detection of provisional C++1y support. 2013-05-07 19:32:56 +00:00
LangStandards.cpp Remove unnecessary default cases in switches over enums. 2012-01-17 02:30:50 +00:00
LayoutOverrideSource.cpp Excise <cctype> from Clang (except clang-tblgen) in favor of CharInfo.h. 2013-02-08 22:30:41 +00:00
LogDiagnosticPrinter.cpp Remove DiagnosticConsumer::clone(), a bad idea that is now unused. 2013-05-03 23:07:45 +00:00
Makefile BUILD_ARCHIVE is the default for libraries, no need to set it. 2010-07-18 00:14:47 +00:00
MultiplexConsumer.cpp Started implementing variable templates. Top level declarations should be fully supported, up to some limitations documented as FIXMEs or TODO. Static data member templates work very partially. Static data member templates of class templates need particular attention... 2013-08-06 01:03:05 +00:00
PrintPreprocessedOutput.cpp Adding support for MSVC #pragma detect_mismatch functionality by emitting a FAILIFMISMATCH linker command into the object file. 2013-06-04 02:07:14 +00:00
SerializedDiagnosticPrinter.cpp Remove DiagnosticConsumer::clone(), a bad idea that is now unused. 2013-05-03 23:07:45 +00:00
TextDiagnostic.cpp Use llvm::sys::fs::UniqueID for windows and unix. 2013-08-01 21:42:11 +00:00
TextDiagnosticBuffer.cpp Remove DiagnosticConsumer::clone(), a bad idea that is now unused. 2013-05-03 23:07:45 +00:00
TextDiagnosticPrinter.cpp Remove DiagnosticConsumer::clone(), a bad idea that is now unused. 2013-05-03 23:07:45 +00:00
VerifyDiagnosticConsumer.cpp This patch adds new private headers to the module map. Private 2013-06-20 21:14:14 +00:00
Warnings.cpp Revert r177218. 2013-05-03 23:20:27 +00:00