9965 Commits

Author SHA1 Message Date
Zain Jaffal
db01cf7b7c Recommit "Add an option to print out annotation remark count."
Add missing new line for `llvm/docs/CommandGuide/llvm-remarkutil.rst`

This reverts commit 0f7fcb4c670fbef2c25b835fdfdd29598c6c13ae.
2023-04-07 23:42:39 +01:00
Zain Jaffal
0f7fcb4c67 Revert "Add an option to print out annotation remark count."
This reverts commit 7cc80ef5fa359b68ee85033f98b1bef1f37fb21c.
2023-04-07 23:42:24 +01:00
Zain Jaffal
7cc80ef5fa Add an option to print out annotation remark count.
This adds a `annotation-count` option to llvm-remarkutil.

```
llvm-remarkutil annotation-count -remark=REMARK
```
This will print out the remark count for a pass that uses annotation remarks.

Differential Revision: https://reviews.llvm.org/D147710
2023-04-07 23:33:29 +01:00
Michael Buch
8b0033e58a [ReleaseNotes] DebugInfo: preferred_name attribute changes
Describes changes made in D145803.

Differential Revision: https://reviews.llvm.org/D147695
2023-04-07 01:37:37 +01:00
aabhinavg
40847375d8 [Docs][typo] Done the required fix for the #61690
Differential Revision: https://reviews.llvm.org/D146898
2023-04-06 22:22:33 +05:30
Kristof Beyls
eaa106cf1c [docs] Also mention Discord on Contributing.rst page
Differential Revision: https://reviews.llvm.org/D145480
2023-04-06 08:20:53 +02:00
Aaron Ballman
ceacb32524 Fix LLVM sphinx build
This addresses issues found by:
https://lab.llvm.org/buildbot/#/builders/30/builds/33698
2023-04-05 13:25:07 -04:00
Roy Sundahl
5f17ba1a38 [sanitizers] Simplify Explainer about dyld and weak overrides on Darwin. (NFC)
Presenting more than one way to satisfy the single-weak-ref requirement leads to
confusing messaging for the end user. Use the introduction of a single unused
weak variable as the preferred solution. This differential modifies D146745.

rdar://103453678

Reviewed By: yln, thetruestblue

Differential Revision: https://reviews.llvm.org/D147526
2023-04-05 10:04:29 -07:00
Alex Bradbury
3d969191b2 [docs][RISCV] Remove outdated note about zfa implementation status
MC layer and codegen support for fli.{h,s,d} has since been implemented.
2023-04-05 14:53:14 +01:00
Archibald Elliott
0104305bc8 [NFC][AArch64] Late 2022 A-Profile Extension Release Notes 2023-04-04 11:39:41 +01:00
Philip Reames
d7b2003761 [RISCV][docs] Document which revision of the specification we implement
This is intended to document the decision made in recent discussion, and ratified at the last risc-v sync up call two weeks ago.

The wording here turned out to be a bit tricky. I ended up using the word "revision" as the specification internally defines several versioning schemes, and RVI assigns particular meaning to the words "specification version" that I really didn't want to get into. If anyone has suggestions on how to improve this, please don't hesitate to chime in.

Differential Revision: https://reviews.llvm.org/D147183
2023-04-03 13:54:32 -07:00
Roy Sundahl
f1c5c84ae1 [sanitizers] Explainer about dyld and weak overrides on Darwin. (NFC)
Explain in the release notes that the Darwin dynamic linker (dyld) requires
that at least one weak symbol be present in any mach-o file that defines an
intended override of a sanitizer dylib weak reference.

rdar://103453678

Reviewed By: thetruestblue

Differential Revision: https://reviews.llvm.org/D146745
2023-03-31 08:55:49 -07:00
Qiongsi Wu
f624372ccb [AIX][CodeGen] Renaming mroptr to xcoff-mroptr
This patch renames the `mroptr` option to `mxcoff-roptr` to indicate in the option itself that it is xcoff specific.

Reviewed By: hubert.reinterpretcast

Differential Revision: https://reviews.llvm.org/D147161
2023-03-31 10:09:48 -04:00
Fangrui Song
0de988c98c [docs] Update LLVM_TARGETS_TO_BUILD list 2023-03-30 19:23:14 -07:00
Craig Topper
dc90af501f [RISCV] Bump I, F, D, and A extension versions to 20191214 spec version
New versions I2.1, F2.2, D2.2 A2.1

Make F and Zfinx imply Zicsr.
Make G imply Zifencei.

This should have no impact to generated code. We have no plans to require Zicsr/Zifencei extension to be explicitly enabled to use Zicsr/Zifencei instructions in assembly.

See https://reviews.llvm.org/D147183 for documentation regarding what version specification we implement.

Reviewed By: asb

Differential Revision: https://reviews.llvm.org/D147179
2023-03-30 15:28:44 -07:00
wlei
280ece9a69 fix docs warning in llvm-profdata.rst 2023-03-30 11:21:48 -07:00
wlei
339b8a0019 [AutoFDO] Use flattened profiles for profile staleness metrics
For profile staleness report, before it only counts for the top-level function samples in the nested profile, the samples in the inlinees are ignored. This could affect the quality of the metrics when there are heavily inlined functions. This change adds a feature to flatten the nested profile and we're changing to use flatten profile as the input for stale profile detection and matching.
Example for profile flattening:

```
Original profile:
_Z3bazi:20301:1000
 1: 1000
 3: 2000
 5: inline1:1600
   1: 600
   3: inline2:500
     1: 500

Flattened profile:
_Z3bazi:18701:1000
 1: 1000
 3: 2000
 5: 600 inline1:600
inline1:1100:600
 1: 600
 3: 500 inline2: 500
inline2:500:500
 1: 500
```
This feature could be useful for offline analysis, like understanding the hotness of each individual function. So I'm adding the support to `llvm-profdata merge` under `--gen-flattened-profile`.

Reviewed By: hoy, wenlei

Differential Revision: https://reviews.llvm.org/D146452
2023-03-30 11:05:10 -07:00
Daniel Thornburgh
9dce77f067 [Docs][llvm-cov] Correct flag name. 2023-03-30 10:41:10 -07:00
Jakub Kuderski
8c40ad17d4 [docs] Add section on iteration utilities (zip & enumerate)
Since these are not in C++17, mention them in the programmers manual.

Reviewed By: kazu

Differential Revision: https://reviews.llvm.org/D147199
2023-03-30 13:14:37 -04:00
Benjamin Kramer
2657e554d1 [docs] Fix a typo (malicously-crafter) 2023-03-29 18:49:04 +02:00
Alex Bradbury
d3291c692c [RISCV][MC] Add support for the experimental zicond extension
This patch adds the basic MC layer support for Zicond, based on
[1.0-rc1](https://github.com/riscv/riscv-zicond/releases/tag/v1.0-rc1).
As with other extensions, if there are additional changes between
release candidates without incrementing the version number we won't be
able to reflect that in the version number. I believe we've previously
decided this is not a problem for extensions still considered
experimental (i.e. not yet ratified).

Differential Revision: https://reviews.llvm.org/D146946
2023-03-29 12:17:50 +01:00
Krzysztof Drewniak
916425b2d1 [llvm] Use pointer index type for more GEP offsets (pre-codegen)
Many uses of getIntPtrType() were using that type to calculate the
neened type for GEP offset arguments. However, some time ago,
DataLayout was extended to support pointers where the size of the
pointer is not equal to the size of the values used to index it.

Much code was already migrated to, for example, use getIndexSizeInBits
instead of getPtrSizeInBits, but some rewrites still used
getIntPtrType() to get the type for GEP offsets.

This commit changes uses of getIntPtrType() to getIndexType() where
they are involved in a GEP-related calculation.

In at least one case (bounds check insertion) this resolves a compiler
crash that the new test added here would previously trigger.

This commit does not impact
- C library-related rewriting (memcpy()), which are operating under
the assumption that intptr_t == size_t. While all the mechanisms for
breaking this assumption now exist, doing so is outside the scope of
this commit.
- Code generation and below. Note that the use of getIntPtrType() in
CodeGenPrepare will be changed in a future commit.
- Usage of getIntPtrType() in any backend

Depends on D143435

Reviewed By: arichardson

Differential Revision: https://reviews.llvm.org/D143437
2023-03-28 16:41:02 +00:00
Wael Yehia
256914bf1c [AIX] Update release notes regarding -mxcoff-build-id and the profile runtime 2023-03-28 14:53:12 +00:00
Lang Hames
8b1771bd9f [ORC] Move most ORC APIs to ExecutorAddr, introduce ExecutorSymbolDef.
ExecutorAddr was introduced in b8e5f918166 as an eventual replacement for
JITTargetAddress. ExecutorSymbolDef is introduced in this patch as a
replacement for JITEvaluatedSymbol: ExecutorSymbolDef is an (ExecutorAddr,
JITSymbolFlags) pair, where JITEvaluatedSymbol was a (JITTargetAddress,
JITSymbolFlags) pair.

A number of APIs had already migrated from JITTargetAddress to ExecutorAddr,
but many of ORC's internals were still using the older type. This patch aims
to address that.

Some public APIs are affected as well. If you need to migrate your APIs you can
use the following operations:

* ExecutorAddr::toPtr replaces jitTargetAddressToPointer and
  jitTargetAddressToFunction.

* ExecutorAddr::fromPtr replace pointerToJITTargetAddress.

* ExecutorAddr(JITTargetAddress) creates an ExecutorAddr value from a
  JITTargetAddress.

* ExecutorAddr::getValue() creates a JITTargetAddress value from an
  ExecutorAddr.

JITTargetAddress and JITEvaluatedSymbol will remain in JITSymbol.h for now, but
the aim will be to eventually deprecate and remove these types (probably when
MCJIT and RuntimeDyld are deprecated).
2023-03-27 17:37:58 -07:00
Jonas Devlieghere
4d683f7fa7
[dsymutil] Add the ability to generate universal binaries with a fat64 header
Add the ability to generate universal binaries with a fat64 header.

rdar://107223939

Differential revision: https://reviews.llvm.org/D146879
2023-03-27 16:22:16 -07:00
Lang Hames
c2a1ab3c29 [docs] Fix code example: the JITLink APIs use ExecutorAddr now. 2023-03-27 14:57:43 -07:00
Aiden Grossman
8d3a09daca [Docs][llvm-exegesis] Refactor snippet annotations in documentation
Currently, the llvm-exegesis documentation page has all
snippet annotation information under an example. This patch refactors
the annotation documentation to a separate section to make things more
clear and to make adding future annotations easier. This patch also
significantly expands the documentation on the memory scratch space to
which a pointer can be passed through a register as the documentation on
this was quite sparse previously.

Reviewed By: courbet

Differential Revision: https://reviews.llvm.org/D146890
2023-03-27 08:22:25 +00:00
wangpc
41eafdf9aa [TableGen] Format document
Add missing bang operators and reorder them in alphabetical order.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D146687
2023-03-27 11:27:35 +08:00
Aiden Grossman
7bda9ffb9c [Docs][llvm-mc] Add documentation on --filetype flag
Currently the filetype flag is not documented, and knowing the behavior
of this flag is fairly important for doing anything other than
disassembling to text assembly.

Reviewed By: lattner

Differential Revision: https://reviews.llvm.org/D146878
2023-03-25 17:44:27 +00:00
4vtomat
9795aa042a [RISCV] Support vector crypto extension ISA string and assembly
LLVM implements the 0.3 draft specification:
https://github.com/riscv/riscv-crypto/releases/download/v20230206/riscv-crypto-spec-vector.pdf
, and current vector crypto extension version can be found in:
https://github.com/riscv/riscv-crypto.

Differential Revision: https://reviews.llvm.org/D141672
2023-03-25 05:15:55 -07:00
Qiongsi Wu
4f9929add5 [AIX][CodeGen] Storage Locations for Constant Pointers
This patch adds an `llc` option `-mroptr` to specify storage locations for constant pointers on AIX.

When the `-mroptr` option is specified, constant pointers, virtual function tables, and virtual type tables are placed in read-only storage. Otherwise, by default, pointers, virtual function tables, and virtual type tables are placed are placed in read/write storage.

https://reviews.llvm.org/D144190 enables the `-mroptr` option for `clang`.

Reviewed By: hubert.reinterpretcast, stephenpeckham, myhsu, MaskRay, serge-sans-paille

Differential Revision: https://reviews.llvm.org/D144189
2023-03-23 09:44:47 -04:00
Job Noorman
c39dd7c1db [RISCV][MC] Add support for RV64E
Implement MC support for the recently ratified RV64E base instruction
set.

Differential Revision: https://reviews.llvm.org/D143570
2023-03-23 12:32:25 +00:00
Christopher Ferris
0433abc8e0 [docs][scudo] Add information about M_PURGE_ALL.
Add information about M_PURGE_ALL

Reviewed By: Chia-hungDuan

Differential Revision: https://reviews.llvm.org/D146336
2023-03-22 13:36:29 -07:00
David Spickett
85bc498826 [LLDB] Show sub type of signals when debugging a core file
Previously we only looked at the si_signo field, so you got:
```
(lldb) bt
* thread #1, name = 'a.out.mte', stop reason = signal SIGSEGV
  * frame #0: 0x00000000004007f4
```
This patch adds si_code so we can show:
```
(lldb) bt
* thread #1, name = 'a.out.mte', stop reason = signal SIGSEGV: sync tag check fault
  * frame #0: 0x00000000004007f4
```

The order of errno and code was incorrect in ElfLinuxSigInfo::Parse.
It was the order that a "swapped" siginfo arch would use, which for Linux,
is only MIPS. We removed MIPS Linux support some time ago.

See:
fe15c26ee2/include/uapi/asm-generic/siginfo.h (L121)

A test is added using memory tagging faults. Which were the original
motivation for the changes.

Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D146045
2023-03-21 09:10:09 +00:00
NAKAMURA Takumi
4178ef43b2 TableGen: Introduce llvm::TableGen::Emitter to register backends
`Opt(flag, func, desc)` registers an option into `Action`.

`OptClass<EmitterC>` is also available if `EmitterC(RK).run(OS)` is capable.

`Action` is defined as `ManagedStatic<cl::opt>` to guarantee to be created
when each registration of emitter is invoked.

`llvm::TableGenMain(argv0, MainFn)` invokes `Action` instead of `MainFn`

Differential Revision: https://reviews.llvm.org/D144351
2023-03-21 16:21:27 +09:00
Austin Kerbow
09f756c880 [AMDGPU] Add release note for ommited barrier waitcnt
Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D146353
2023-03-19 21:15:28 -07:00
Mark de Wever
d0398d3593 Revert "Reland "[CMake] Bumps minimum version to 3.20.0.""
This reverts commit a72165e5df59032cdd54dcb18155f2630d73abd1.

Some buildbots have not been updated yet.
2023-03-18 20:32:43 +01:00
Mark de Wever
a72165e5df Reland "[CMake] Bumps minimum version to 3.20.0."
This reverts commit 92523a35a827539db8557bbc3ecab7f9ea3f6ade.

Test whether all CI runners are updated.
2023-03-18 13:33:42 +01:00
Paul Kirth
93c1a5f3dd [llvm-readobj] Rename JSON Flag fields to be more consistent
Today the JSON uses `Value` and `RawValue` when printing `Flags`, when really
the `Value` field is always the name of an Enum variant, and `RawValue` is its
underlying numeric value. Similarly, we rename the `RawFlags` key to `Value`,
to match the new scheme. This also allows JSON parsing to use consistent logic
for `Flag` types.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D137091
2023-03-18 00:04:47 +00:00
Daniel Thornburgh
41e4578ae1 [Docs] Fix llvm-cov debuginfod option formatting. 2023-03-17 15:49:21 -07:00
Carlos Alberto Enciso
ca3f7a5c06 [Docs] Fix typo in LoopTerminology. 2023-03-17 13:42:27 +00:00
Aaron Ballman
d73c51bfda Fix LLVM Sphinx build
This addresses the issue found by:
https://lab.llvm.org/buildbot/#/builders/30/builds/33006
2023-03-16 14:03:39 -04:00
Arthur Eubanks
a63270cda8 [docs] Mention removal of legacy optimization pipeline and inliner alloca merging
Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D146243
2023-03-16 10:48:06 -07:00
Arthur Eubanks
c1b4240322 [opt] Rename -enable-new-pm -> -bugpoint-enable-legacy-pm
-enable-new-pm is no longer necessary except for bugpoint. Make the name more clunky so it hopefully won't be used.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D146103
2023-03-16 09:51:44 -07:00
Frederic Cambus
245f26a430 [docs] Document "PGO" (Profile-Guided Optimization) in the lexicon. 2023-03-16 12:14:44 +01:00
Nikita Popov
bbfb13a5ff [ConstExpr] Remove select constant expression
This removes the select constant expression, as part of
https://discourse.llvm.org/t/rfc-remove-most-constant-expressions/63179.
Uses of this expressions have already been removed in advance,
so this just removes related infrastructure and updates tests.

Differential Revision: https://reviews.llvm.org/D145382
2023-03-16 10:32:08 +01:00
Teresa Johnson
1f884ef769 [docs] Document MemProf metadata in LangRef
Add documentation for memprof and callsite metadata in LangRef.

Differential Revision: https://reviews.llvm.org/D146007
2023-03-14 11:04:17 -07:00
aabhinavg
ae2d8def6b [Docs] Added llvm-reduce docs in CommandGuide
[Docs] Added llvm-reduce docs in CommandGuide

Differential Revision: https://reviews.llvm.org/D146020
2023-03-14 20:55:20 +05:30
Nikita Popov
af101f9ae0 [IR] Allow !range on vector of integer instructions
Inspired by https://reviews.llvm.org/D144467#4188310, this allows
!range on vector of integer instructions, with the usual
element-wise interpretation, which is already used by various
analysis APIs that support vectors.

Differential Revision: https://reviews.llvm.org/D145920
2023-03-14 09:41:56 +01:00
aabhinavg
5686364d90 [Docs] Added llvm-mc documentation
Fix #61313

Reviewed By: lattner

Differential Revision: https://reviews.llvm.org/D145844
2023-03-14 08:23:15 +05:30