Commit Graph

228 Commits

Author SHA1 Message Date
Sven van Haastregt 241f335b26 [OpenCL][Docs] Rename C++ for OpenCL label
To avoid potential confusion with OpenCL C++.
2020-01-09 16:31:45 +00:00
Anastasia Stulova e456165f9f [OpenCL] Add link to C++ for OpenCL documentation
Remove description of language mode from the language
extensions and add a link to pdf document.

Tags: #clang

Differential Revision: https://reviews.llvm.org/D72076
2020-01-03 12:01:03 +00:00
Francis Visoiu Mistrih 07b8f8e5f5 [Remarks][Driver] Place temporary remark files next to temporary object files
On Darwin, when used for generating a linked binary from a source file
(through an intermediate object file), the driver will invoke `cc1` to
generate a temporary object file. The temporary remark file will now be
emitted next to the object file, which will then be picked up by
`dsymutil` and emitted in the .dSYM bundle.

This is available for all formats except YAML since by default, YAML
doesn't need a section and the remark file will be lost.
2019-12-18 16:42:02 -08:00
Francis Visoiu Mistrih f550961c6e [Docs] Fix indentation in remarks section 2019-12-18 16:41:52 -08:00
Francis Visoiu Mistrih 3bd7cbb90c [Remarks][Docs] Enhance documentation for opt-remarks driver options
Add better documentation about the naming scheme, add a few more
explicit descriptions and make the sphinx look better.
2019-12-10 13:19:49 -08:00
Melanie Blower 7f9b513847 Reapply af57dbf12e "Add support for options -frounding-math, ftrapping-math, -ffp-model=, and -ffp-exception-behavior="
Patch was reverted because https://bugs.llvm.org/show_bug.cgi?id=44048
        The original patch is modified to set the strictfp IR attribute
        explicitly in CodeGen instead of as a side effect of IRBuilder.
        In the 2nd attempt to reapply there was a windows lit test fail, the
        tests were fixed to use wildcard matching.

        Differential Revision: https://reviews.llvm.org/D62731
2019-12-05 03:48:04 -08:00
Melanie Blower 5412913631 Revert " Reapply af57dbf12e "Add support for options -frounding-math, ftrapping-math, -ffp-model=, and -ffp-exception-behavior=""
This reverts commit cdbed2dd85.
Build break on Windows (lit fail)
2019-12-04 12:21:23 -08:00
Melanie Blower cdbed2dd85 Reapply af57dbf12e "Add support for options -frounding-math, ftrapping-math, -ffp-model=, and -ffp-exception-behavior="
Patch was reverted because https://bugs.llvm.org/show_bug.cgi?id=44048
        The original patch is modified to set the strictfp IR attribute
        explicitly in CodeGen instead of as a side effect of IRBuilder

        Differential Revision: https://reviews.llvm.org/D62731
2019-12-04 11:32:33 -08:00
Eric Christopher 30e7ee3c4b Temporarily Revert "Add support for options -frounding-math, ftrapping-math, -ffp-model=, and -ffp-exception-behavior="
and a follow-up NFC rearrangement as it's causing a crash on valid. Testcase is on the original review thread.

This reverts commits af57dbf12e and e6584b2b7b
2019-11-18 10:46:48 -08:00
Melanie Blower af57dbf12e Add support for options -frounding-math, ftrapping-math, -ffp-model=, and -ffp-exception-behavior=
Add options to control floating point behavior: trapping and
    exception behavior, rounding, and control of optimizations that affect
    floating point calculations. More details in UsersManual.rst.

    Reviewers: rjmccall

    Differential Revision: https://reviews.llvm.org/D62731
2019-11-07 07:22:45 -08:00
Francis Visoiu Mistrih f5094e1829 [Remarks] Fix Sphinx formatting 2019-10-28 13:13:39 -07:00
Francis Visoiu Mistrih 025166cf48 [Remarks] Add bitstream to the list of supported formats in clang 2019-10-28 13:08:05 -07:00
Reid Kleckner 5e866e411c Add -fgnuc-version= to control __GNUC__ and other GCC macros
I noticed that compiling on Windows with -fno-ms-compatibility had the
side effect of defining __GNUC__, along with __GNUG__, __GXX_RTTI__, and
a number of other macros for GCC compatibility. This is undesirable and
causes Chromium to do things like mix __attribute__ and __declspec,
which doesn't work. We should have a positive language option to enable
GCC compatibility features so that we can experiment with
-fno-ms-compatibility on Windows. This change adds -fgnuc-version= to be
that option.

My issue aside, users have, for a long time, reported that __GNUC__
doesn't match their expectations in one way or another. We have
encouraged users to migrate code away from this macro, but new code
continues to be written assuming a GCC-only environment. There's really
nothing we can do to stop that. By adding this flag, we can allow them
to choose their own adventure with __GNUC__.

This overlaps a bit with the "GNUMode" language option from -std=gnu*.
The gnu language mode tends to enable non-conforming behaviors that we'd
rather not enable by default, but the we want to set things like
__GXX_RTTI__ by default, so I've kept these separate.

Helps address PR42817

Reviewed By: hans, nickdesaulniers, MaskRay

Differential Revision: https://reviews.llvm.org/D68055

llvm-svn: 374449
2019-10-10 21:04:25 +00:00
Erich Keane f124ab9fe1 Recommit -r372180
Commit message below, original caused the sphinx build bot to fail, this
one should fix it.

Create UsersManual section entitled 'Controlling Floating Point
Behavior'

Create a new section for documenting the floating point options. Move
all the floating point options into this section, and add new entries
for the floating point options that exist but weren't previously
described in the UsersManual.

Patch By: mibintc
Differential Revision: https://reviews.llvm.org/D67517

llvm-svn: 372229
2019-09-18 15:09:49 +00:00
Erich Keane f478c8bf92 Revert "Create UsersManual section entitled 'Controlling Floating Point"
This reverts commit a08d5a4b0e.

llvm-svn: 372185
2019-09-17 21:27:07 +00:00
Erich Keane a08d5a4b0e Create UsersManual section entitled 'Controlling Floating Point
Behavior'

Create a new section for documenting the floating point options. Move
all the floating point options into this section, and add new entries
for the floating point options that exist but weren't previously
  described in the UsersManual.

Patch By: mibintc
Differential Revision: https://reviews.llvm.org/D67517

llvm-svn: 372180
2019-09-17 20:45:23 +00:00
Anastasia Stulova 976022e35c [Docs][OpenCL] Several corrections to C++ for OpenCL
Differential Revision:https://reviews.llvm.org/D64418

llvm-svn: 369749
2019-08-23 11:43:49 +00:00
JF Bastien 6e33c647f3 [docs] don't use :option: for Wall Wextra
The bots are sad that they're not documented.

llvm-svn: 367918
2019-08-05 19:59:07 +00:00
JF Bastien 36eab654c5 [docs] don't use :option: for C++ compat
The bots are sad that they're not documented.

llvm-svn: 367914
2019-08-05 19:45:23 +00:00
JF Bastien df22ff103c [docs] document -Weveything more betterer
Reviewers: aaron.ballman

Subscribers: jkorous, dexonsmith, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D65706

llvm-svn: 367889
2019-08-05 16:53:45 +00:00
Anastasia Stulova 88ed70e247 [OpenCL] Rename lang mode flag for C++ mode
Rename lang mode flag to -cl-std=clc++/-cl-std=CLC++
or -std=clc++/-std=CLC++.

This aligns with OpenCL C conversion and removes ambiguity
with OpenCL C++. 

Differential Revision: https://reviews.llvm.org/D65102

llvm-svn: 367008
2019-07-25 11:04:29 +00:00
Anastasia Stulova 79f4e4770b [Docs][OpenCL] Documentation of C++ for OpenCL mode
Added documentation of C++ for OpenCL mode into Clang
User Manual and Language Extensions document.

Differential Revision: https://reviews.llvm.org/D64418

llvm-svn: 366351
2019-07-17 17:21:31 +00:00
Francis Visoiu Mistrih 36a7a98272 [Remarks][Driver] Use the specified format in the remarks file extension
By default, use `.opt.yaml`, but when a format is specified with
`-fsave-optimization-record=<format>`, use `.opt.<format>`.

llvm-svn: 363627
2019-06-17 22:49:38 +00:00
Francis Visoiu Mistrih 34667519dc [Remarks] Extend -fsave-optimization-record to specify the format
Use -fsave-optimization-record=<format> to specify a different format
than the default, which is YAML.

For now, only YAML is supported.

llvm-svn: 363573
2019-06-17 16:06:00 +00:00
Francis Visoiu Mistrih 5501dda247 [Remarks][NFC] Improve testing and documentation of -foptimization-record-passes
This adds:

* documentation to the user manual
* nicer error message
* test for the error case
* test for the gold plugin

llvm-svn: 363463
2019-06-14 21:38:57 +00:00
J. Ryan Stinnett d45eaf9405 [Docs] Modernize references to macOS
Summary:
This updates all places in documentation that refer to "Mac OS X", "OS X", etc.
to instead use the modern name "macOS" when no specific version number is
mentioned.

If a specific version is mentioned, this attempts to use the OS name at the time
of that version:

* Mac OS X for 10.0 - 10.7
* OS X for 10.8 - 10.11
* macOS for 10.12 - present

Reviewers: JDevlieghere

Subscribers: mgorny, christof, arphaman, cfe-commits, lldb-commits, libcxx-commits, llvm-commits

Tags: #clang, #lldb, #libc, #llvm

Differential Revision: https://reviews.llvm.org/D62654

llvm-svn: 362113
2019-05-30 16:46:22 +00:00
Saleem Abdulrasool 09c2625108 Driver: support `/Zc:char8_t` and `/Zc:char8_t-`
Update the `cl` emulation to support the `/Zc:char8_t[-]?` options as per the
MSVC 2019.1 toolset.  These are aliases for `-fchar8_t` and `-fno-char8_t`.

llvm-svn: 361859
2019-05-28 18:26:00 +00:00
Rong Xu a4a09b2398 [PGO] Clang part of change for context-sensitive PGO (part1)
Part 1 of CSPGO change in Clang. This includes changes in clang options
and calls to llvm PassManager. Tests will be committed in part2.
This change needs the PassManager change in llvm.

Differential Revision: https://reviews.llvm.org/D54176

llvm-svn: 355331
2019-03-04 20:21:31 +00:00
Eugene Zelenko adcb3f520b [Documentation] Use HTTPS whenever possible
Differential revision: https://reviews.llvm.org/D56946

llvm-svn: 351976
2019-01-23 20:39:07 +00:00
Hans Wennborg 5168ddfac4 UsersManual.rst: Update the clang-cl flags section
llvm-svn: 351312
2019-01-16 09:13:47 +00:00
Vitaly Buka 8076c57fd2 [asan] Add clang flag -fsanitize-address-use-odr-indicator
Reviewers: eugenis, m.ostapenko, ygribov

Subscribers: hiraditya, llvm-commits

Differential Revision: https://reviews.llvm.org/D55157

llvm-svn: 348327
2018-12-05 01:44:31 +00:00
Calixte Denizet f4bf671af7 [Clang] Add options -fprofile-filter-files and -fprofile-exclude-files to filter the files to instrument with gcov (after revert https://reviews.llvm.org/rL346659)
Summary:
the previous patch (https://reviews.llvm.org/rC346642) has been reverted because of test failure under windows.
So this patch fix the test cfe/trunk/test/CodeGen/code-coverage-filter.c.

Reviewers: marco-c

Reviewed By: marco-c

Subscribers: cfe-commits, sylvestre.ledru

Differential Revision: https://reviews.llvm.org/D54600

llvm-svn: 347144
2018-11-17 19:41:39 +00:00
Hans Wennborg 7717a5cd8c UserManual: Tweak the /Zc:dllexportInlines- docs some
Addressing comments on https://reviews.llvm.org/D54319

llvm-svn: 346748
2018-11-13 09:05:12 +00:00
Calixte Denizet 186d5bd874 Revert rL346644, rL346642: the added test test/CodeGen/code-coverage-filter.c is failing under windows
llvm-svn: 346659
2018-11-12 14:57:17 +00:00
Calixte Denizet cedcc73d93 [Clang] Add options -fprofile-filter-files and -fprofile-exclude-files to filter the files to instrument with gcov
Summary:
These options are taking regex separated by colons to filter files.
- if both are empty then all files are instrumented
- if -fprofile-filter-files is empty then all the filenames matching any of the regex from exclude are not instrumented
- if -fprofile-exclude-files is empty then all the filenames matching any of the regex from filter are instrumented
- if both aren't empty then all the filenames which match any of the regex in filter and which don't match all the regex in filter are instrumented
- this patch is a follow-up of https://reviews.llvm.org/D52033

Reviewers: marco-c, vsk

Reviewed By: marco-c, vsk

Subscribers: cfe-commits, sylvestre.ledru

Differential Revision: https://reviews.llvm.org/D52034

llvm-svn: 346642
2018-11-12 09:12:27 +00:00
Hans Wennborg 96a7860f79 clang-cl: Add documentation for /Zc:dllexportInlines-
Differential revision: https://reviews.llvm.org/D54319

llvm-svn: 346639
2018-11-12 08:38:10 +00:00
Hans Wennborg 797004d2ea clang-cl: Add "/clang:" pass-through arg support.
The clang-cl driver disables access to command line options outside of the
"Core" and "CLOption" sets of command line arguments. This filtering makes it
impossible to pass arguments that are interpreted by the clang driver and not
by either 'cc1' (the frontend) or one of the other tools invoked by the driver.

An example driver-level flag is the '-fno-slp-vectorize' flag, which is
processed by the driver in Clang::ConstructJob and used to set the cc1 flag
"-vectorize-slp". There is no negative cc1 flag or -mllvm flag, so it is not
currently possible to disable the SLP vectorizer from the clang-cl driver.

This change introduces the "/clang:" argument that is available when the
driver mode is set to CL compatibility. This option works similarly to the
"-Xclang" option, except that the option values are processed by the clang
driver rather than by 'cc1'. An example usage is:

  clang-cl /clang:-fno-slp-vectorize /O2 test.c

Another example shows how "/clang:" can be used to pass a flag where there is
a conflict between a clang-cl compat option and an overlapping clang driver
option:

  clang-cl /MD /clang:-MD /clang:-MF /clang:test_dep_file.dep test.c

In the previous example, the unprefixed /MD selects the DLL version of the msvc
CRT, while the prefixed -MD flag and the -MF flags are used to create a make
dependency file for included headers.

One note about flag ordering: the /clang: flags are concatenated to the end of
the argument list, so in cases where the last flag wins, the /clang: flags
will be chosen regardless of their order relative to other flags on the driver
command line.

Patch by Neeraj K. Singh!

Differential revision: https://reviews.llvm.org/D53457

llvm-svn: 346393
2018-11-08 11:27:04 +00:00
Sylvestre Ledru bc5c3f5727 Update our URLs in clang doc to use https
llvm-svn: 346101
2018-11-04 17:02:00 +00:00
Filipe Cabecinhas 0eb5008352 Change -fsanitize-address-poison-class-member-array-new-cookie to -fsanitize-address-poison-custom-array-cookie
Handle it in the driver and propagate it to cc1

Reviewers: rjmccall, kcc, rsmith

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D52615

llvm-svn: 346001
2018-11-02 17:29:04 +00:00
Jonas Toth 20ab6954a4 [Doc] fix second error in UsersManual
llvm-svn: 344388
2018-10-12 17:57:18 +00:00
Jonas Toth 30f6c63107 [Doc] fix BB, add code-block type
llvm-svn: 344382
2018-10-12 17:44:01 +00:00
Richard Smith df398bd5fe Update user's manual documentation of profile remapping file to match
llvm-cxxmap documentation.

Add a hint as to how to perform off-line profile data remapping.

llvm-svn: 344319
2018-10-11 23:48:11 +00:00
Richard Smith cee53ce4f2 Update documentation to indicate that profile remapping support is only
implemented for the new pass manager so far.

llvm-svn: 344201
2018-10-10 23:33:18 +00:00
Richard Smith 8654ae52b0 Add a flag to remap manglings when reading profile data information.
This can be used to preserve profiling information across codebase
changes that have widespread impact on mangled names, but across which
most profiling data should still be usable. For example, when switching
from libstdc++ to libc++, or from the old libstdc++ ABI to the new ABI,
or even from a 32-bit to a 64-bit build.

The user can provide a remapping file specifying parts of mangled names
that should be treated as equivalent (eg, std::__1 should be treated as
equivalent to std::__cxx11), and profile data will be treated as
applying to a particular function if its name is equivalent to the name
of a function in the profile data under the provided equivalences. See
the documentation change for a description of how this is configured.

Remapping is supported for both sample-based profiling and instruction
profiling. We do not support remapping indirect branch target
information, but all other profile data should be remapped
appropriately.

Support is only added for the new pass manager. If someone wants to also
add support for this for the old pass manager, doing so should be
straightforward.

llvm-svn: 344199
2018-10-10 23:13:35 +00:00
Stephen Kelly 8a89bb61d2 Update the docs for using LLVM toolset in Visual Studio
Reviewers: hans

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D51079

llvm-svn: 340376
2018-08-22 01:11:18 +00:00
Hans Wennborg aade120545 UserManual: Update with the latest clang-cl flags
llvm-svn: 338528
2018-08-01 12:58:57 +00:00
Alexey Bataev cdbe44c95c [OPENMP] Modify the info about OpenMP support in UsersManual, NFC.
llvm-svn: 338252
2018-07-30 14:44:29 +00:00
Peter Collingbourne 14b468bab6 Re-land r337333, "Teach Clang to emit address-significance tables.",
which was reverted in r337336.

The problem that required a revert was fixed in r337338.

Also added a missing "REQUIRES: x86-registered-target" to one of
the tests.

Original commit message:
> Teach Clang to emit address-significance tables.
>
> By default, we emit an address-significance table on all ELF
> targets when the integrated assembler is enabled. The emission of an
> address-significance table can be controlled with the -faddrsig and
> -fno-addrsig flags.
>
> Differential Revision: https://reviews.llvm.org/D48155

llvm-svn: 337339
2018-07-18 00:27:07 +00:00
Peter Collingbourne 35c6996b68 Revert r337333, "Teach Clang to emit address-significance tables."
Causing multiple failures on sanitizer bots due to TLS symbol errors,
e.g.

/usr/bin/ld: __msan_origin_tls: TLS definition in /home/buildbots/ppc64be-clang-test/clang-ppc64be/stage1/lib/clang/7.0.0/lib/linux/libclang_rt.msan-powerpc64.a(msan.cc.o) section .tbss.__msan_origin_tls mismatches non-TLS reference in /tmp/lit_tmp_0a71tA/mallinfo-3ca75e.o

llvm-svn: 337336
2018-07-17 23:56:30 +00:00
Peter Collingbourne 27242c0402 Teach Clang to emit address-significance tables.
By default, we emit an address-significance table on all ELF
targets when the integrated assembler is enabled. The emission of an
address-significance table can be controlled with the -faddrsig and
-fno-addrsig flags.

Differential Revision: https://reviews.llvm.org/D48155

llvm-svn: 337333
2018-07-17 23:17:16 +00:00