llvm-project/clang/lib
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
..
ARCMigrate ObjectiveC migration: tweak setting of lifetime attribute 2013-08-06 18:06:23 +00:00
AST Correctly allign arrays on 32 bit systems. 2013-08-07 18:08:19 +00:00
ASTMatchers Fix crash when encountering alias templates in isDerivedFrom matches. 2013-08-02 21:24:09 +00:00
Analysis [analyzer] Include analysis stack in crash traces. 2013-07-19 00:59:08 +00:00
Basic ObjectiveC migrator: Add another family of factory 2013-08-02 20:54:18 +00:00
CodeGen UBSan: Fix alignment checks emitted in downcasts. 2013-08-08 01:08:17 +00:00
Driver The only useful loop unrolling flag to give realistically is 2013-08-08 08:34:35 +00:00
Edit ObjectiveC migrator: Remove semicolon after the typedef 2013-07-18 22:17:33 +00:00
Format Revert r187935 "Support for double width characters." 2013-08-08 02:19:56 +00:00
Frontend The only useful loop unrolling flag to give realistically is 2013-08-08 08:34:35 +00:00
FrontendTool Indicate success for simple options when clang called with -cc1. 2013-08-07 12:54:47 +00:00
Headers Use a shuffle with undef elements instead of inserting 0s in the 128-bit to 256-bit casting intrinsics to improve performance. Thanks to Katya Romanova for identifying this issue. 2013-08-05 06:17:21 +00:00
Lex DataFlowSanitizer; Clang changes. 2013-08-07 22:47:34 +00:00
Parse PR9992: Serialize and deserialize the token sequence for a function template in 2013-08-07 21:41:30 +00:00
Rewrite [frontend] '-frewrite-includes' should not ignore headers included from command-line. 2013-07-26 15:32:04 +00:00
Sema Emit an error for enum increments and decrements in C++ mode. 2013-08-08 01:50:23 +00:00
Serialization PR9992: Serialize and deserialize the token sequence for a function template in 2013-08-07 21:41:30 +00:00
StaticAnalyzer Eliminate CXXConstructorDecl::IsImplicitlyDefined. 2013-08-07 16:16:48 +00:00
Tooling Allow clang tools to display an overview when using the CommonOptionsParser. 2013-07-19 12:20:59 +00:00
CMakeLists.txt Turn CLANG_ENABLE_{ARCMT,REWRITER,STATIC_ANALYZER} into proper options so that 2013-05-29 21:09:18 +00:00
Makefile Dont use/link ARCMT, StaticAnalyzer and Rewriter to clang when the user 2012-12-13 16:09:42 +00:00