summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/clang_f_opts.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Make FP_CONTRACT ON the default.Stephen Canon2015-11-161-0/+2
| | | | | | Differential Revision: D14200 llvm-svn: 253269
* Recommit "Clang support for -flto=thin."Teresa Johnson2015-10-151-1/+1
| | | | | | | | | This recommits r250398 with fixes to the tests for bot failures. Add "-target x86_64-unknown-linux" to the clang invocations that check for the gold plugin. llvm-svn: 250455
* Revert "Clang support for -flto=thin." (bot failures)Teresa Johnson2015-10-151-1/+1
| | | | | | | | | | | Rolling this back for now since there are a couple of bot failures on the new tests I added, and I won't have a chance to look at them in detail until later this afternoon. I think the new tests need some restrictions on having the gold plugin available. This reverts commit r250398. llvm-svn: 250402
* Clang support for -flto=thin.Teresa Johnson2015-10-151-1/+1
| | | | | | | | | | | | | | | | | | | Summary: Add clang support for -flto=thin option, which is used to set the EmitFunctionSummary code gen option on compiles. Add -flto=full as an alias to the existing -flto. Add tests to check for proper overriding of -flto variants on the command line, and convert grep tests to FileCheck. Reviewers: dexonsmith, joker.eph Subscribers: davidxl, cfe-commits Differential Revision: http://reviews.llvm.org/D11908 llvm-svn: 250398
* Add -fno-coverage-mapping flag.Diego Novillo2015-08-051-0/+5
| | | | | | | This new flag allows the user to disable a previous instance of -fcoverage-mapping, if needed. llvm-svn: 244170
* Add flags to disable profile generation.Diego Novillo2015-08-051-0/+10
| | | | | | | | | | | | This patch adds flags -fno-profile-instr-generate and -fno-profile-instr-use, and the GCC aliases -fno-profile-generate and -fno-profile-use. These flags are used in situations where users need to disable profile generation or use for specific files in a build, without affecting other files. llvm-svn: 244153
* Claim arguments that belong to 'clang_ignored_gcc_optimization_f_Group'Douglas Katzman2015-08-051-0/+13
| | | | | | | | | | This seems preferable to printing two warnings per unsupported option- one warning about not supporting it, and one about not using it. It also makes the '-Wno-' option do what you mean. Differential Revision: http://reviews.llvm.org/D11766 llvm-svn: 244079
* Tweak a couple of -fprofile tests in clang/test to accept backslash in path.NAKAMURA Takumi2015-07-101-2/+2
| | | | llvm-svn: 241903
* Add GCC-compatible flags -fprofile-generate and -fprofile-use.Diego Novillo2015-07-091-5/+34
| | | | | | | | | | | | | | | | | | This patch adds support for specifying where the profile is emitted in a way similar to GCC. These flags are used to specify directories instead of filenames. When -fprofile-generate=DIR is used, the compiler will generate code to write to <DIR>/default.profraw. The patch also adds a couple of extensions: LLVM_PROFILE_FILE can still be used to override the directory and file name to use and -fprofile-use accepts both directories and filenames. To simplify the set of flags used in the backend, all the flags get canonicalized to -fprofile-instr-{generate,use} when passed to the backend. The decision to use a default name for the profile is done in the driver. llvm-svn: 241825
* [Driver] Handle -fno-signed-char and -fno-unsigned-charDavid Majnemer2015-05-231-0/+11
| | | | | | | GCC maps -fno-unsigned-char to -fsigned-char and -fno-signed-char to -funsigned-char. llvm-svn: 238105
* Fix tests so they work when the linker is gccFilipe Cabecinhas2015-02-121-2/+6
| | | | | | | | | | | If the linker is gcc (the default for Generic_ELF toolchains), we end up passing most of the arguments to the linker. Some tests were failing to account for this in their usage of *-NOT: lines and would fail if compiled with -DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-unknown-unknown llvm-svn: 228902
* Alright, just XFAIL all these for Windows.Dan Albert2014-10-101-11/+0
| | | | | | | I'm going to fix up FileCheck to better handle things like this soon, but for now let's just unblock the Windows people. llvm-svn: 219513
* XFAIL coverage -no-integrated-as tests for msvc.Dan Albert2014-10-101-6/+0
| | | | | | | Windows can't use -no-integrated-as, so split these tests out into a separate file and XFAIL them for win32,win64. llvm-svn: 219472
* _Really_ fix these tests (probably).Dan Albert2014-10-101-4/+4
| | | | llvm-svn: 219468
* Hopefully fixes test failures for msvc.Dan Albert2014-10-101-4/+4
| | | | | | | | | Looks like llvm::sys::path::filename() was canonicalizing my paths before emitting them for FileCheck to stumble over. Fix a style nit with r219460 while I'm at it. llvm-svn: 219464
* PR21195: Emit .gcno files to the proper location.Dan Albert2014-10-101-0/+17
| | | | | | | | When building with coverage, -no-integrated-as, and -c, the driver was emitting -cc1 -coverage-file pointing at a file in /tmp. Ensure the coverage file is emitted in the same directory as the output file. llvm-svn: 219460
* Driver: Restore -fkeep-inline-functions as an ignored flagJustin Bogner2014-08-271-0/+2
| | | | | | | | | | Several options were moved to the clang_ignored_gcc_optimization group in r213365, but -fkeep-inline-functions was accidentally dropped. This restores the flag. Patch by Steven Wu. Thanks! llvm-svn: 216522
* Ignore -fdevirtualize and -fdevirtualize-speculatively for gcc compatReid Kleckner2014-08-261-0/+4
| | | | llvm-svn: 216477
* GCC compatibility: Ignore -fexec-charset=UTF-8 argument. It is the default ↵Sylvestre Ledru2014-08-111-1/+4
| | | | | | | | | | | | | | | | | | in Clang. Reject other values. Summary: Just like with -finput-charset=UTF-8 in review http://reviews.llvm.org/D4347, I think we should just ignore it when UTF-8 is provided. Reviewers: rnk, rafael Reviewed By: rafael Subscribers: rafael, cfe-commits Differential Revision: http://reviews.llvm.org/D4841 llvm-svn: 215368
* Driver: Add tests for -fprofile-arcs and -fno-profile-arcsJustin Bogner2014-08-071-0/+7
| | | | | | | I tried to be lazy and get away with no test in r215051, but Chad caught me :) llvm-svn: 215053
* Remove trailing whitespacesRui Ueyama2014-08-051-3/+3
| | | | llvm-svn: 214935
* Added f and m flags to be ignored. These will not display a warning. The ↵Arthur Marble2014-08-051-0/+10
| | | | | | | | | | revision for this patch is here: http://reviews.llvm.org/D4570. This will help with the rebuild of Debian with clang. Here is a link to the errors that Debian is experiencing: http://clang.debian.net/status.php?version=3.4.2&key=UNKNOWN_ARG llvm-svn: 214907
* Added flags that should be ignored for compatibility. These flags will displayArthur Marble2014-08-051-0/+121
| | | | | | | | | a warning. Revision for this patch is here: http://reviews.llvm.org/D4565. This patch will help with the rebuild of Debian with clang and many other projects that wish to use clang. Here is a link to the errors that Debian is experiencing: http://clang.debian.net/status.php?version=3.4.2&key=UNKNOWN_ARG llvm-svn: 214906
* Split -Winvalid-command-line-argument into -Wignored-optimization-argumentReid Kleckner2014-07-231-0/+3
| | | | | | | | | | Reviewers: rsmith, nlewycky Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4636 llvm-svn: 213817
* Moved 25 flags to clang_ignored_gcc_optimization_f_Group. Will display a warningArthur Marble2014-07-181-4/+54
| | | | | | | | | to the user if they try to pass those optimizations. The revision for this patch is here: http://reviews.llvm.org/D4474. This patch will fix many errors in the rebuild of Debian with clang. Here is a link to the page for unknown arguments: http://clang.debian.net/status.php?version=3.4.2&key=UNKNOWN_ARG llvm-svn: 213365
* Avoid non-attributive uses of 'unsupported' in diagnosticsAlp Toker2014-07-141-1/+1
| | | | | | | | | | | | | We don't have a style guide for diagnostic messages, but convention strongly favours the forms: 'attribute is not supported', 'unsupported attribute' We generally avoid: 'attribute is unsupported', 'non-supported attribute' llvm-svn: 212972
* Change the diagnostic group for unsupported gcc optimizations added r212805Alp Toker2014-07-141-6/+6
| | | | | | | | | | Use -Winvalid-command-line-argument here to align with existing gcc opt diagnostics. Meanwhile -Wunused-command-line-argument is for flags that we support but were, say, fed into the wrong invocation. Also tweak wording to make sense with -Werror. llvm-svn: 212964
* Test for warning being silencedSylvestre Ledru2014-07-111-0/+9
| | | | | | | | | | | | | | | | Summary: Added some tests to see if the new warning would be silenced with a flag. Patch by Arthur Marble <arthur@info9.net> in the context of Debian Google Summer of code 2014. Reviewers: sylvestre.ledru Reviewed By: sylvestre.ledru Differential Revision: http://reviews.llvm.org/D4475 llvm-svn: 212833
* Tiny improvement in a test (missing quote)Sylvestre Ledru2014-07-111-1/+1
| | | | llvm-svn: 212806
* GCC compatibility: Create a Group to ignore unsupported optimization.Sylvestre Ledru2014-07-111-0/+8
| | | | | | | | | | | | Returns a warning when using an unknown optimization flag. This patch includes -finline-limit as one of those ignored flags. More options will be moved in this group Patch by Arthur Marble <arthur@info9.net> in the context of Debian Google Summer of code 2014. Reviewers: rnk, Sylvestre llvm-svn: 212805
* gcc comptability: silent -fdefer-pop & -fno-defer-pop Sylvestre Ledru2014-07-041-0/+1
| | | | | | | | | | | | Reviewers: rafael, rnk Reviewed By: rnk Subscribers: rnk, cfe-commits Differential Revision: http://reviews.llvm.org/D4357 llvm-svn: 212327
* GCC compatibility: Ignore -finput_charset=UTF-8 argument. It is the default ↵Sylvestre Ledru2014-07-011-0/+4
| | | | | | | | | | | | | | | | in Clang. Currently, we fail with an error. Reviewers: rafael Reviewed By: rafael Subscribers: rnk, cfe-commits Differential Revision: http://reviews.llvm.org/D4347 llvm-svn: 212110
* [driver] Enable the slp vectorizer at -Oz.Chad Rosier2014-05-021-1/+1
| | | | | | PR19568 llvm-svn: 207858
* [driver] Disable the slp vectorizer at -O0, -O1, and -Oz. This mirrors theChad Rosier2014-04-281-0/+11
| | | | | | | | behavior of the loop vectorizer, which is enabled at -O2, -O3, -O4, -Ofast and -Os. PR19568 llvm-svn: 207433
* Suppress clang/test/Driver/clang_f_opts.c for targeting cygming since ↵NAKAMURA Takumi2014-02-251-0/+2
| | | | | | r202058 is incompatible to gcc driver. llvm-svn: 202093
* Implement -fno-short-wcharRichard Barton2014-02-241-0/+7
| | | | llvm-svn: 202058
* Fix broken CHECK linesNico Rieck2014-02-161-1/+1
| | | | llvm-svn: 201477
* Revert r194097: "With this patch -Wwrite-strings is still implemented with ↵Argyrios Kyrtzidis2014-02-071-2/+2
| | | | | | | | | | | | | the terrible hack of passing -fconst-strings to -cc1" Passing or not a language option based on diagnostic settings is a bad idea, it breaks using a PCH that was compiled with different diagnostic settings. Also add a test case to make sure we don't regress. llvm-svn: 200964
* Add flag -fauto-profile as alias to -fprofile-sample-use.Diego Novillo2013-12-061-0/+3
| | | | | | | | | | Summary: GCC uses -fauto-profile to enable sample-based PGO. This patch adds it to Clang as an alias for -fprofile-sample-use. Differential Revision: http://llvm-reviews.chandlerc.com/D2353 llvm-svn: 196589
* Remove period at end of "optimization level is unsupported" diagnosticHans Wennborg2013-11-181-1/+1
| | | | llvm-svn: 195048
* Make test/Driver/clang_f_opts.c not write to the test dirHans Wennborg2013-11-181-1/+1
| | | | | | | After r195009, the test would write a .o file to the test dir. Send that to /dev/null instead. Also fix the typo in test/Frontend/invalid-o-level.c. llvm-svn: 195047
* Using an invalid -O falls back on -O3 instead of an errorSylvestre Ledru2013-11-181-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Currently with clang: $ clang -O20 foo.c error: invalid value '20' in '-O20' With the patch: $ clang -O20 foo.c warning: optimization level '-O20' is unsupported; using '-O3' instead. 1 warning generated. This matches the gcc behavior (with a warning added) Pass all tests: Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. Testing Time: 94.14s Expected Passes : 6721 Expected Failures : 20 Unsupported Tests : 17 (which was not the case of http://llvm-reviews.chandlerc.com/D2125) Differential Revision: http://llvm-reviews.chandlerc.com/D2212 llvm-svn: 195009
* Add -freroll-loops to enable loop rerollingHal Finkel2013-11-171-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | This adds -freroll-loops (and -fno-reroll-loops in the usual way) to enable loop rerolling as part of the optimization pass manager. This transformation can enable vectorization, reduce code size (or both). Briefly, loop rerolling can transform a loop like this: for (int i = 0; i < 3200; i += 5) { a[i] += alpha * b[i]; a[i + 1] += alpha * b[i + 1]; a[i + 2] += alpha * b[i + 2]; a[i + 3] += alpha * b[i + 3]; a[i + 4] += alpha * b[i + 4]; } into this: for (int i = 0; i < 3200; ++i) { a[i] += alpha * b[i]; } Loop rerolling is currently disabled by default at all optimization levels. llvm-svn: 194967
* Revert "Using an invalid -O falls back on -O3 instead of an error"Alp Toker2013-11-151-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | Trying to fix test failures since earlier today. One of the tests added in this commit is outputting test/Driver/clang_f_opts.s which the builders that build in-tree (eg. clang-native-arm-cortex-a9) are trying to run as a test case, causing failures. clang_f_opts.c: If -### doesn't emit the warning then this test probably shouldn't be in here in the first place. Frontend maybe? invalid-o-level.c: Running %clang_cc1 in the Driver tests doesn't make sense because -cc1 bypasses the driver. (I'm not reverting the commit that introduced this but please fix instead of keeping it this way.) Reverting to fix the build failures and also so that the tests can be thought out more thoroughly. This reverts commit r194817. llvm-svn: 194845
* Using an invalid -O falls back on -O3 instead of an errorSylvestre Ledru2013-11-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Currently with clang: $ clang -O20 foo.c error: invalid value '20' in '-O20' With the patch: $ clang -O20 foo.c warning: optimization level '-O20' is unsupported; using '-O3' instead. 1 warning generated. This matches the gcc behavior (with a warning added) Pass all tests: Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. Testing Time: 94.14s Expected Passes : 6721 Expected Failures : 20 Unsupported Tests : 17 (which was not the case of http://llvm-reviews.chandlerc.com/D2125) Reviewers: chandlerc, rafael, rengolin, hfinkel Reviewed By: rengolin CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2152 llvm-svn: 194817
* Add -fprofile-sample-use to Clang's driver.Diego Novillo2013-11-131-0/+3
| | | | | | | | This adds a new option -fprofile-sample-use=filename to Clang. It tells the driver to schedule the SampleProfileLoader pass and passes on the name of the profile file to use. llvm-svn: 194567
* Revert "Using an invalid -O falls back on -O3 instead of an error"Sylvestre Ledru2013-11-111-3/+0
| | | | | | | | This reverts commit r194403. Was breaking too many tests... llvm-svn: 194420
* Revert "Remove -### from the -O20 test, it was failing the test (?)"Sylvestre Ledru2013-11-111-1/+1
| | | | | | | | This reverts commit r194414. Was breaking too many tests... llvm-svn: 194419
* Remove -### from the -O20 test, it was failing the test (?)Sylvestre Ledru2013-11-111-1/+1
| | | | llvm-svn: 194414
* Using an invalid -O falls back on -O3 instead of an errorSylvestre Ledru2013-11-111-0/+3
| | | | | | | | | | | | | | | | | | | | | Summary: Currently with clang: $ clang -O20 foo.c error: invalid value '20' in '-O20' With the patch: $ clang -O20 foo.c warning: invalid value '20' in '-O20'. Fall back on value '3' Reviewers: rengolin, hfinkel Reviewed By: rengolin CC: cfe-commits, hfinkel, rengolin Differential Revision: http://llvm-reviews.chandlerc.com/D2125 llvm-svn: 194403
OpenPOWER on IntegriCloud