Commit Graph

189 Commits

Author SHA1 Message Date
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
Richard Smith 869038e362 [docs] List correct default for -ftemplate-depth; also add missing
documentation for -fconstexpr-steps.

llvm-svn: 336747
2018-07-11 00:34:54 +00:00
Piotr Padlewski e368de364e Add -fforce-emit-vtables
Summary:
 In many cases we can't devirtualize
 because definition of vtable is not present. Most of the
 time it is caused by inline virtual function not beeing
 emitted. Forcing emitting of vtable adds a reference of these
 inline virtual functions.
 Note that GCC was always doing it.

Reviewers: rjmccall, rsmith, amharc, kuhar

Subscribers: llvm-commits, cfe-commits

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

Co-authored-by: Krzysztof Pszeniczny <krzysztof.pszeniczny@gmail.com>
llvm-svn: 334600
2018-06-13 13:55:42 +00:00
Joel Galenson 267ea72437 [docs] Fix typos in the Clang User's Manual.
llvm-svn: 331644
2018-05-07 16:23:46 +00:00
Sanjay Patel c81450e29b [Driver, CodeGen] rename options to disable an FP cast optimization
As suggested in the post-commit thread for rL331056, we should match these 
clang options with the established vocabulary of the corresponding sanitizer
option. Also, the use of 'strict' is well-known for these kinds of knobs, 
and we can improve the descriptive text in the docs.

So this intends to match the logic of D46135 but only change the words.
Matching LLVM commit to match this spelling of the attribute to follow shortly.

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

llvm-svn: 331209
2018-04-30 18:19:03 +00:00
Sanjay Patel d175476566 [Driver, CodeGen] add options to enable/disable an FP cast optimization
As discussed in the post-commit thread for:
rL330437 ( http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20180423/545906.html )

We need a way to opt-out of a float-to-int-to-float cast optimization because too much 
existing code relies on the platform-specific undefined result of those casts when the 
float-to-int overflows.

The LLVM changes associated with adding this function attribute are here:
rL330947
rL330950
rL330951

Also as suggested, I changed the LLVM doc to mention the specific sanitizer flag that 
catches this problem:
rL330958

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

llvm-svn: 331041
2018-04-27 14:22:48 +00:00
Hans Wennborg 729eb0b2f8 UsersManual.rst: update text for /GX- to match r328708
llvm-svn: 329052
2018-04-03 09:28:21 +00:00
Tony Tye 1a3f3a2d14 [AMDGPU] Remove use of OpenCL triple environment and replace with function attribute for AMDGPU (CLANG)
- Remove use of the opencl and amdopencl environment member of the target triple for the AMDGPU target.
- Use a function attribute to communicate to the AMDGPU backend.

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

llvm-svn: 328347
2018-03-23 18:43:15 +00:00
Aaron Ballman 567d9a3948 Update the supported C language standards in the user manual.
Remove mention of -std=c94 (it is spelled iso9899:1994, not c94) and add mention of -std=c17 and -std=gnu17.

llvm-svn: 327264
2018-03-12 13:09:13 +00:00
Hans Wennborg 1bab70109b UsersManual: improve the clang-cl text some more
llvm-svn: 326438
2018-03-01 14:48:19 +00:00
Hans Wennborg 69d6d7a4d8 UsersManual: beef up the clang-cl text a little
llvm-svn: 326434
2018-03-01 14:00:19 +00:00
Eric Fiselier 123c749ee9 [Driver] Add option to manually control discarding value names in LLVM IR.
Summary:
Currently, assertion-disabled Clang builds emit value names when generating LLVM IR. This is controlled by the `NDEBUG` macro, and is not easily overridable. In order to get IR output containing names from a release build of Clang, the user must manually construct the CC1 invocation w/o the `-discard-value-names` option. This is less than ideal.

For example, Godbolt uses a release build of Clang, and so when asked to emit LLVM IR the result lacks names, making it harder to read. Manually invoking CC1 on Compiler Explorer is not feasible.

This patch adds the driver options `-fdiscard-value-names` and `-fno-discard-value-names` which allow the user to override the default behavior. If neither is specified, the old behavior remains.

Reviewers: erichkeane, aaron.ballman, lebedev.ri

Reviewed By: aaron.ballman

Subscribers: bogner, cfe-commits

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

llvm-svn: 324498
2018-02-07 18:36:51 +00:00
Eric Christopher c61c9b6147 Clarify that optimization levels -O2 and above are recommended for use of PGO.
llvm-svn: 323902
2018-01-31 19:52:58 +00:00
Brian Gesiak 4995614f7c [docs] Use monospace for PCH option flags
Summary:
Use monospace for option flags in the PCH section, instead of the
italics that were being used previously.

I believe these used to be links, for which single backticks would
have been appropriate, but since they were un-link-ified in
https://reviews.llvm.org/rL275560, I believe monospace is now more
appropriate, and so two backticks are needed.

Test Plan:
Build the `docs-clang-html` target and confirm the options are rendered
using monospace font.

Reviewers: sepavloff, aaron.ballman

Reviewed By: aaron.ballman

Subscribers: cfe-commits

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

llvm-svn: 322447
2018-01-13 18:34:07 +00:00
Hans Wennborg cb766537dd UserManual: Update with the latest clang-cl flags
llvm-svn: 321705
2018-01-03 13:20:25 +00:00
Serge Pavlov 93581c5792 Fixed markup formatting
llvm-svn: 321623
2018-01-01 15:53:16 +00:00
Serge Pavlov 208ac6547c Enable configuration files in clang
Clang is inherently a cross compiler and can generate code for any target
enabled during build. It however requires to specify many parameters in the
invocation, which could be hardcoded during configuration process in the
case of single-target compiler. The purpose of configuration files is to
make specifying clang arguments easier.

A configuration file is a collection of driver options, which are inserted
into command line before other options specified in the clang invocation.
It groups related options together and allows specifying them in simpler,
more flexible and less error prone way than just listing the options
somewhere in build scripts. Configuration file may be thought as a "macro"
that names an option set and is expanded when the driver is called.

Use of configuration files is described in `UserManual.rst`.

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

llvm-svn: 321621
2018-01-01 13:27:01 +00:00
Serge Pavlov 55b0747372 Reverted 321587: Enable configuration files in clang
Need to check targets in tests more carefully.

llvm-svn: 321588
2017-12-30 18:38:44 +00:00
Serge Pavlov c92ca91472 Enable configuration files in clang
Clang is inherently a cross compiler and can generate code for any target
enabled during build. It however requires to specify many parameters in the
invocation, which could be hardcoded during configuration process in the
case of single-target compiler. The purpose of configuration files is to
make specifying clang arguments easier.

A configuration file is a collection of driver options, which are inserted
into command line before other options specified in the clang invocation.
It groups related options together and allows specifying them in simpler,
more flexible and less error prone way than just listing the options
somewhere in build scripts. Configuration file may be thought as a "macro"
that names an option set and is expanded when the driver is called.

Use of configuration files is described in `UserManual.rst`.

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

llvm-svn: 321587
2017-12-30 17:59:26 +00:00
Alexey Bataev fa4814ddaf [docs] Added description of `-f[no]-openmp-simd` option to UsersManual.
llvm-svn: 321562
2017-12-29 18:27:00 +00:00
Vlad Tsyrklevich 634c601fe3 [CFI] Add CFI-icall pointer type generalization
Summary:
This change allows generalizing pointers in type signatures used for
cfi-icall by enabling the -fsanitize-cfi-icall-generalize-pointers flag.
This works by 1) emitting an additional generalized type signature
metadata node for functions and 2) llvm.type.test()ing for the
generalized type for translation units with the flag specified.

This flag is incompatible with -fsanitize-cfi-cross-dso because it would
require emitting twice as many type hashes which would increase artifact
size.

Reviewers: pcc, eugenis

Reviewed By: pcc

Subscribers: kcc

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

llvm-svn: 317044
2017-10-31 22:39:44 +00:00
Reka Kovacs f616a89d87 [docs] Fix typos in Clang's User's Manual.
llvm-svn: 314061
2017-09-23 12:13:32 +00:00
Sylvestre Ledru 6fd8839ab9 Fix two typos in the doc. Patch by kamleshbhalui on github
llvm-svn: 311854
2017-08-27 17:34:06 +00:00
Hans Wennborg 7f36a9543d Update clang-cl options in the users manual
llvm-svn: 308427
2017-07-19 09:52:24 +00:00
Brian Gesiak bb83ce4678 Add docs for -foptimization-record-file=
Summary: The Clang option was previously not included in the User's Manual.

Reviewers: anemet, davidxl, hfinkel

Reviewed By: hfinkel

Subscribers: cfe-commits

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

llvm-svn: 307193
2017-07-05 19:55:51 +00:00
Brian Gesiak 562eab97ea Un-revert "[Driver] Add -fdiagnostics-hotness-threshold"
Summary:
Un-revert https://reviews.llvm.org/D34868, but with a slight tweak to the
documentation to fix an error -- I had used the wrong syntax for a link.

llvm-svn: 306948
2017-07-01 05:45:26 +00:00
Brian Gesiak 55e9c111b4 Revert "[Driver] Add -fdiagnostics-hotness-threshold"
Summary:
The commit caused a documentation breakage.

llvm-svn: 306946
2017-07-01 04:54:53 +00:00
Brian Gesiak dc6fa5d1f6 [Driver] Add -fdiagnostics-hotness-threshold
Summary:
Depends on https://reviews.llvm.org/D34867.

Add a Clang frontend option to enable optimization remark hotness
thresholds, which were added to LLVM in https://reviews.llvm.org/D34867.
This prevents diagnostics that do not meet a minimum hotness
threshold from being output. When generating optimization remarks for large
codebases with a ton of cold code paths, this option can be used
to limit the optimization remark output at a reasonable size.
Discussion of this change can be read here:
http://lists.llvm.org/pipermail/llvm-dev/2017-June/114377.html

Reviewers: anemet, davidxl, hfinkel

Reviewed By: anemet

Subscribers: fhahn, cfe-commits

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

llvm-svn: 306945
2017-07-01 04:44:38 +00:00
Bruno Cardoso Lopes 52dfe71645 [Driver] Add compiler option to generate a reproducer
One way to currently test the reproducers is to setup
"FORCE_CLANG_DIAGNOSTICS_CRASH=1" before invoking clang. This simulates
a crash and produces the same contents needed by the reproducers.  The
reproducers are specially useful when triaging Modules issues, not only
on crashes, but also for reproducing misleading warnings, errors, etc.

Add a '-gen-reproducer' driver option to clang (or any similar name) and
give users a flag option.

Note that clang already has a -fno-crash-diagnostics, which disables the
crash reproducers. I've decided not to propose "-fcrash-diagnostics"
since it doesn't convey the ideia of reproduction despite a crash.

rdar://problem/24114619

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

llvm-svn: 300109
2017-04-12 21:46:20 +00:00
Ismail Donmez cb17fbb00b Update Bugzilla URLs in docs
llvm-svn: 295433
2017-02-17 08:26:54 +00:00
Anastasia Stulova b376bee642 [OpenCL][Doc] Added OpenCL vendor extension description to user manual doc
Added description of a new feature that allows to specify
vendor extension in flexible way using compiler pragma instead
of modifying source code directly (committed in clang@r289979).

Review: D29829
llvm-svn: 295313
2017-02-16 12:49:29 +00:00
Amjad Aboud 546bc1103b [DebugInfo] Added support to Clang FE for generating debug info for preprocessor macros.
Added "-fdebug-macro" flag (and "-fno-debug-macro" flag) to enable (and to disable) emitting macro debug info.
Added CC1 "-debug-info-macro" flag that enables emitting macro debug info.

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

llvm-svn: 294637
2017-02-09 22:07:24 +00:00
Asiri Rathnayake b0bbb7decc Improve docs: Add missing #pragma push directive.
NFC.

llvm-svn: 293877
2017-02-02 10:35:18 +00:00
Hans Wennborg f6d61d4f39 UsersManual.rst: add missing newline
llvm-svn: 292265
2017-01-17 21:31:57 +00:00
Aaron Ballman 37ff16f951 Replace non-ASCII ellipsis with "..." to silence Sphinx warnings.
llvm-svn: 292115
2017-01-16 13:42:21 +00:00
Piotr Padlewski eb9dd5aec8 Add -fstrict-vtable-pointers to UsersManual
Summary: Add missing flag to UsersManual
It would be good to merge it to 4.0 branch.

Reviewers: hans

Subscribers: cfe-commits

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

llvm-svn: 292112
2017-01-16 13:20:08 +00:00
Sylvestre Ledru e86ee6b0a8 fix a few typo in the doc but also in the clang messages
llvm-svn: 292015
2017-01-14 11:41:45 +00:00
Hans Wennborg 9d1ed00a00 UsersManual.rst: Update clang-cl options list again
This time, make ignored options, such as /utf-8, show up as well if they
have help text.

Also, since we're now exposing -fdelayed-template-parsing, add help text
to the -fno version so that shows up as well.

llvm-svn: 291798
2017-01-12 19:26:54 +00:00
Hans Wennborg 715dd7fe33 UsersManual.rst: Update clang-cl options list
llvm-svn: 291783
2017-01-12 18:15:06 +00:00
Anastasia Stulova 18e165f50d [Docs][OpenCL] Added OpenCL feature description to Clang documentation.
Updated index and UsersManual with OpenCL description.

Review: https://reviews.llvm.org/D28080 
llvm-svn: 291780
2017-01-12 17:52:22 +00:00