Commit Graph

9372 Commits

Author SHA1 Message Date
Phoebe Wang 6e02e27536 Reland "[X86][RFC] Enable `_Float16` type support on X86 following the psABI"
Disabled 2 mlir tests due to the runtime doesn't support `_Float16`, see
the issue here https://github.com/llvm/llvm-project/issues/55992
2022-06-15 09:15:31 +08:00
Jonas Devlieghere 33b6891db2
[dsymutil] Automatically generate a reproducer when dsymutil crashes
Automatically generate a reproducer when dsymutil crashes. We already
support generating reproducers with the --gen-reproducer flag, which
emits a reproducer on exit. This patch adds support for doing the same
on a crash and makes it the default behavior.

rdar://68357665

Differential revision: https://reviews.llvm.org/D127441
2022-06-14 16:00:08 -07:00
Chuanqi Xu 735e6c40b5 [Coroutines] Convert coroutine.presplit to enum attr
This is required by @nikic in https://reviews.llvm.org/D127383 to
decrease the cost to check whether a function is a coroutine and this
fixes a FIXME too.

Reviewed By: rjmccall, ezhulenev

Differential Revision: https://reviews.llvm.org/D127471
2022-06-14 14:23:46 +08:00
Mehdi Amini 5d8298a768 Revert "[X86][RFC] Enable `_Float16` type support on X86 following the psABI"
This reverts commit 2d2da259c8.

This breaks MLIR integration test (JIT crashing), reverting in the
meantime.
2022-06-12 15:14:37 +00:00
Phoebe Wang 2d2da259c8 [X86][RFC] Enable `_Float16` type support on X86 following the psABI
GCC and Clang/LLVM will support `_Float16` on X86 in C/C++, following
the latest X86 psABI. (https://gitlab.com/x86-psABIs)

_Float16 arithmetic will be performed using native half-precision. If
native arithmetic instructions are not available, it will be performed
at a higher precision (currently always float) and then truncated down
to _Float16 immediately after each single arithmetic operation.

Reviewed By: LuoYuanke

Differential Revision: https://reviews.llvm.org/D107082
2022-06-12 11:40:00 +08:00
Fangrui Song adf4142f76 [MC] De-capitalize SwitchSection. NFC
Add SwitchSection to return switchSection. The API will be removed soon.
2022-06-10 22:50:55 -07:00
Mitch Phillips 35b1a64589 Add documentation of new sanitizer-specific GV attributes.
Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D126922
2022-06-10 12:46:02 -07:00
Jay Foad 044b8f4bc8 [AMDGPU] Restore documentation of .amdhsa_shared_vgpr_count
This was accidentally lost in D127402.
2022-06-10 17:06:08 +01:00
Guillaume Chatelet 38637ee477 [clang] Add support for __builtin_memset_inline
In the same spirit as D73543 and in reply to https://reviews.llvm.org/D126768#3549920 this patch is adding support for `__builtin_memset_inline`.

The idea is to get support from the compiler to easily write efficient memory function implementations.

This patch could be split in two:
 - one for the LLVM part adding the `llvm.memset.inline.*` intrinsics.
 - and another one for the Clang part providing the instrinsic as a builtin.

Differential Revision: https://reviews.llvm.org/D126903
2022-06-10 13:13:59 +00:00
Jay Foad b0a3849439 [AMDGPU] Update dlc usage for GFX11
In GFX10 dlc controlled L1 cache bypass. In GFX11 it has been repurposed
to control MALL NOALLOC, and glc controls L1 as well as L0 cache bypass.

Update the documentation and SIMemoryLegalizer accordingly. Set dlc for
nontemporal and volatile accesses.

Differential Revision: https://reviews.llvm.org/D127405
2022-06-10 08:10:34 +01:00
Tony 802e3f4f57 [AMDGPU] Add GFX11 documentation to AMDGPUUsage
Update most of the document to include GFX11. Memory model changes will
come later.

Differential Revision: https://reviews.llvm.org/D127402
2022-06-10 08:10:34 +01:00
Nikita Popov 10ac235b07 [Docs] Add version support information for opaque pointers (NFC)
I've seen a few people try to enable opaque pointers with LLVM 14
already. While LLVM 14 has pretty good baseline support, there are
enough missing pieces that you're definitely going to hit assertion
failures if you try this.

Add some wording to make it clear what the support (or planned
support) for opaque/typed pointers is across LLVM 14, 15, and 16.
2022-06-08 11:54:34 +02:00
Martin Storsjö 20ca739701 [doc] Add release notes about SEH unwind information on ARM
Differential Revision: https://reviews.llvm.org/D127150
2022-06-08 11:32:17 +03:00
Nathan Lanza 9b3c5cba9f Update the ProgrammersManual explanation for ilist and iplist
They are now `using` aliases and thus the comments about iplist are now
incorrect. Remove them here.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D95210
2022-06-07 22:50:04 -04:00
J. Ryan Stinnett b878245af9 [DebugInfo][Docs] Improve code formatting in instruction referencing doc
This adds code blocks and inline code formatting to improve the readability of
the instruction referencing doc.

Reviewed By: Orlando

Differential Revision: https://reviews.llvm.org/D126767
2022-06-07 13:18:12 +02:00
Shilei Tian 0c3e6e5717 [NFC] Remove trailing whitespace 2022-06-06 18:59:13 -04:00
Fangrui Song f9e9037c86 [docs] Fix style and typo in HowToSetUpLLVMStyleRTTI.rst after D126943 2022-06-06 12:41:21 -07:00
Dmitry Preobrazhensky 4fed5f174f [AMDGPU][GFX8][DOC][NFC] Update assembler syntax description
Summary of changes:
- Updated MUBUF lds syntax (see https://reviews.llvm.org/D124485).
- Enabled literals with src0 for v_madak*, v_madmk* (see https://reviews.llvm.org/D111067).
- Minor bug fixing.
2022-06-06 17:42:16 +03:00
Dmitry Preobrazhensky 9c7e803f2d [AMDGPU][GFX7][DOC][NFC] Update assembler syntax description
Summary of changes:
- Updated MUBUF lds syntax (see https://reviews.llvm.org/D124485).
- Enabled literals with src0 of v_madak_f32, v_madmk_f32 (see https://reviews.llvm.org/D111067).
- Corrected LGKM_CNT description.
- Minor bug fixing.
2022-06-06 15:50:10 +03:00
Fangrui Song d0d1c416cb Remove unneeded cl::ZeroOrMore for cl::list options 2022-06-04 23:51:13 -07:00
Yuki Okushi fa7b4cf05e
[docs] Remove a link to an outdated Go docs
That link returns 404, we have bindings code on https://github.com/llvm/llvm-project/tree/main/llvm/bindings/go
but it seems we haven't published it and there are no docs yet.

Differential Revision: https://reviews.llvm.org/D126874
2022-06-03 23:50:35 +09:00
Kristof Beyls 8b18572ea7 [docs] Fix RST code-block syntax in HowToSetUpLLVMStyleRTTI.rst 2022-06-03 11:24:49 +02:00
bzcheeseman 47231248f5 [LLVM][Docs] Update for HowToSetUpLLVMStyleRTTI.rst, NFC.
This patch updates the document with some advanced use cases and examples on how to set up and use LLVM-style RTTI. It includes a few motivating examples to get readers comfortable with the concepts.

Reviewed By: lattner

Differential Revision: https://reviews.llvm.org/D126943
2022-06-02 22:34:38 -07:00
Fangrui Song dfa9221aa7 [docs] Mention LLVMContext::setOpaquePointers for C++ API 2022-06-02 13:28:42 -07:00
Guillaume Chatelet 53efdf33f8
Fix llvm.memset semantics description
The description was referring to a ``src`` parameter probably copied over from ``llvm.memcpy``
2022-06-02 13:25:03 +02:00
Nikita Popov b0ce6a0ae5 [Docs] Update default in opaque pointer docs (NFC)
Also mention a relevant C API.
2022-06-02 12:29:07 +02:00
Martin Storsjö 668bb96379 [ARM] Implement lowering of the sponentry intrinsic
This is needed for SEH based setjmp on Windows.

Differential Revision: https://reviews.llvm.org/D126763
2022-06-02 12:29:59 +03:00
Nikita Popov 41d5033eb1 [IR] Enable opaque pointers by default
This enabled opaque pointers by default in LLVM. The effect of this
is twofold:

* If IR that contains *neither* explicit ptr nor %T* types is passed
  to tools, we will now use opaque pointer mode, unless
  -opaque-pointers=0 has been explicitly passed.
* Users of LLVM as a library will now default to opaque pointers.
  It is possible to opt-out by calling setOpaquePointers(false) on
  LLVMContext.

A cmake option to toggle this default will not be provided. Frontends
or other tools that want to (temporarily) keep using typed pointers
should disable opaque pointers via LLVMContext.

Differential Revision: https://reviews.llvm.org/D126689
2022-06-02 09:40:56 +02:00
Matt Arsenault 09a539e926 AMDGPU: Add release notes about atomic load and store 2022-06-01 21:14:48 -04:00
Matthias Braun 850d53a197 LTO: Decide upfront whether to use opaque/non-opaque pointer types
LTO code may end up mixing bitcode files from various sources varying in
their use of opaque pointer types. The current strategy to decide
between opaque / typed pointers upon the first bitcode file loaded does
not work here, since we could be loading a non-opaque bitcode file first
and would then be unable to load any files with opaque pointer types
later.

So for LTO this:
- Adds an `lto::Config::OpaquePointer` option and enforces an upfront
  decision between the two modes.
- Adds `-opaque-pointers`/`-no-opaque-pointers` options to the gold
  plugin; disabled by default.
- `--opaque-pointers`/`--no-opaque-pointers` options with
  `-plugin-opt=-opaque-pointers`/`-plugin-opt=-no-opaque-pointers`
  aliases to lld; disabled by default.
- Adds an `-lto-opaque-pointers` option to the `llvm-lto2` tool.
- Changes the clang driver to pass `-plugin-opt=-opaque-pointers` to
  the linker in LTO modes when clang was configured with opaque
  pointers enabled by default.

This fixes https://github.com/llvm/llvm-project/issues/55377

Differential Revision: https://reviews.llvm.org/D125847
2022-06-01 18:05:53 -07:00
owenca 3d56131bf6 [Docs] Clarify the guideline on omitting braces
While working on a clang-format option RemoveBracesLLVM that removes
braces following the guideline, we were unsure about what to do with
the braces of do-while loops. The ratio of using to omitting the
braces is about 4:1 in the llvm-project source, so it will help to
add an example to the guideline.

Also cleans up the original examples including making the nested if
example more targeted on avoiding potential dangling else situations.

Differential Revision: https://reviews.llvm.org/D126512
2022-05-31 23:35:30 -07:00
Augie Fackler b0a1a308f2 LangRef: fix bad indentation in allockind bullets 2022-05-31 11:06:43 -04:00
Augie Fackler 42861faa8e attributes: introduce allockind attr for describing allocator fn behavior
I chose to encode the allockind information in a string constant because
otherwise we would get a bit of an explosion of keywords to deal with
the possible permutations of allocation function types.

I'm not sure that CodeGen.h is the correct place for this enum, but it
seemed to kind of match the UWTableKind enum so I put it in the same
place. Constructive suggestions on a better location most certainly
encouraged.

Differential Revision: https://reviews.llvm.org/D123088
2022-05-31 10:01:17 -04:00
Dmitry Preobrazhensky 62c46093f1 [AMDGPU][DOC][NFC] Add GFX90C and GFX940 assembler syntax description 2022-05-31 14:29:06 +03:00
Lian Wang 967ef4ad0a [NFC][VP] Fix llvm.vp.merge intrinsic Expansion in LangRef
Reviewed By: simoll

Differential Revision: https://reviews.llvm.org/D126457
2022-05-30 01:43:41 +00:00
Yuki Okushi 0a2d2eed43
[docs] Update the label name for new contributors
The `beginner` label is deprecated
and the `good first issue` label is now preferred.

Differential Revision: https://reviews.llvm.org/D126526
2022-05-28 23:14:31 +09:00
Anastasia Stulova 7df25978ef [Doc][OpenCL] Misc wording improvements for SPIR-V 2022-05-27 11:13:06 +01:00
Serge Pavlov bdd0093f4d [GlobalISel] Add G_IS_FPCLASS
Add a generic opcode to represent `llvm.is_fpclass` intrinsic.

Differential Revision: https://reviews.llvm.org/D121454
2022-05-27 13:49:47 +07:00
Sebastian Peryt d1c5da34a7 [DOC] Improve LangRef description of declare
This patch fixes formatting inside Functions section of declare
by making it consistent with the way how define is written.

Fixes #39844

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D125581
2022-05-26 14:34:34 -07:00
Sebastian Peryt 0f64945352 [DOC] Refactor Functions section in LangRef
This change is a small refactor of Functions section
to update placement of define syntax.

Reviewed By: RKSimon

Differential revision: https://reviews.llvm.org/D125831
2022-05-26 14:34:34 -07:00
Takafumi Arakaki 18e6b8234a Allow pointer types for atomicrmw xchg
This adds support for pointer types for `atomic xchg` and let us write
instructions such as `atomicrmw xchg i64** %0, i64* %1 seq_cst`. This
is similar to the patch for allowing atomicrmw xchg on floating point
types: https://reviews.llvm.org/D52416.

Differential Revision: https://reviews.llvm.org/D124728
2022-05-25 16:20:26 +00:00
Ivan Kosarev 046f901735 [TableGen] Undeprecate 'field' when used with the CodeEmitterGen backend.
Differential Revision: https://reviews.llvm.org/D126290
2022-05-25 15:15:19 +01:00
Kristof Beyls 8d29187506 Minutes for security group sync-ups have moved to Discourse. 2022-05-24 13:46:08 +02:00
Fangrui Song 224a8653c9 [llvm-nm][docs] Document -W and -U
Latest GNU nm (milestone: 2.39) has added -W/--no-weak and changed -U to mean
--defined-only (instead of --unicode=). The changes match our semantics.

Close #55297

Reviewed by: jhenderson, keith

Differential Revision: https://reviews.llvm.org/D126133
2022-05-23 09:58:54 -07:00
Jay Foad 9293539064 [TableGen] Remove an untrue statement from the docs
You can't use foreach in a record body. This was a mistake in the
documentation dating from when it was first written in D85838.
2022-05-23 15:19:33 +01:00
Anastasia Stulova 72832efc94 [SPIR-V] Allow setting SPIR-V version via target triple.
Currently added versions are from v1.0 to v1.5, other versions
can be added as needed.

This change also adds documentation about SPIR-V target support
in LLVM.

Differential Revision: https://reviews.llvm.org/D124776
2022-05-23 14:24:00 +01:00
J. Ryan Stinnett 7a1d5ef703 [DebugInfo][NFC] Add instr-ref documentation, migration guide
This used to be D102158, but all the code it describes got re-written, so I
figured I'd take another shot at documenting the new instruction referencing
variable locations, this time from a higher level. Happily there's no longer any
need to describe LiveDebugValues in any detail seeing how it's all SSA-based
now.

Probably the most important part is the explanation of what targets need to do
to support instruction referencing. The list is small, mostly because there's
nothing especially complicated that targets need to do: just instrument their
target-specific optimisations and implement the stack spill/restore recognition
target hooks.

This is a small amount of text (which is a virtue), I'm extremely happy to
expand on anything.

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

Co-authored-by: Jeremy Morse <jeremy.morse@sony.com>
2022-05-20 14:13:46 +01:00
Kristof Beyls 52f2d05723 Minutes for pauth sync-ups have moved to Discourse. 2022-05-20 14:00:53 +02:00
Kristof Beyls ac2f0a6f1d [Office Hours] add initial guidance for hosts
This includes adding guidance to announce an office hours session on the
Discord channel and/or IRC, as discussed at the office hours round table at
EuroLLVM 2022, see
https://discourse.llvm.org/t/office-hours-eurollvm-round-table-summary/62480.

Fixes #55423
2022-05-19 20:39:39 +02:00
Keith Smiley 6746e6a372
[docs][tools] Remove old llvm-bcanalyzer options
These no longer exist. A few have been added since but I'm not enough of
an expert to provide a useful blurb on them outside of what you see with
`--help`.

Differential Revision: https://reviews.llvm.org/D122361
2022-05-19 11:07:03 -07:00