10631 Commits

Author SHA1 Message Date
zhijian lin
3034632a27
[llvm-readobj] enable demangle option for the xcoff object file (#78455)
enable `--demangle` option for the xcoff object file for llvm-readobj
2024-03-01 09:21:11 -05:00
Reid Kleckner
4d12f70896
Add guidance on bans to the CoC section and link to the developer policy (#82551)
This seemed like relevant information to include in the code of conduct.
2024-02-29 13:34:11 -08:00
Craig Topper
95aab69c10
[RISCV] Remove experimental from Zacas. (#83195)
Document that we don't use the double compare and swap instructions due
to ABI concerns.
2024-02-28 21:46:58 -08:00
Matt Arsenault
c36cbba6fb Update IEEE-754 2018 draft references to IEEE-754 2019 2024-02-29 10:39:06 +05:30
Patrick Dougherty
782147e82a
[CMake][LIT] Add option to run lit testsuites in parallel (#82899)
Currently `add_lit_target` sets the `USES_TERMINAL` CMake option. When
using Ninja, this forces all lit testsuite targets into the
single-threaded `console` pool.

This PR adds a new option `LLVM_PARALLEL_LIT` which drops the
`USES_TERMINAL` flag, allowing Ninja to run them in parallel.

The default setting (`LLVM_PARALLEL_LIT=OFF`) retains the existing
behavior of serial testsuite execution.
2024-02-28 11:53:12 -07:00
Ilia Kuklin
07d8a457ad
[llvm-objcopy] Add --set-symbol-visibility and --set-symbols-visibility options (#80872)
Add options --set-symbol-visibility and --set-symbols-visibility to
manually change the visibility of symbols.

There is already an option to set the visibility of newly added symbols
via --add-symbol and --new-symbol-visibility. This option will allow to
change the visibility of already existing symbols.
2024-02-28 17:38:26 +05:00
Aiden Grossman
1d1186de34
[llvm-exegesis] Add loop-register snippet annotation (#82873)
This patch adds a LLVM-EXEGESIS-LOOP-REGISTER snippet annotation which
allows a user to specify the register to use for the loop counter in the
loop repetition mode. This allows for executing snippets that don't work
with the default value (currently R8 on X86).
2024-02-27 12:28:25 -08:00
Micah Weston
9ca8db352d
[SHT_LLVM_BB_ADDR_MAP] Adds pretty printing of BFI and BPI for PGO Analysis Map in tools. (#82292)
Primary change is to add a flag `--pretty-pgo-analysis-map` to
llvm-readobj and llvm-objdump that prints block frequencies and branch
probabilities in the same manner as BFI and BPI respectively. This can
be helpful if you are manually inspecting the outputs from the tools.

In order to print, I moved the `printBlockFreqImpl` function from
Analysis to Support and renamed it to `printRelativeBlockFreq`.
2024-02-27 14:13:00 -05:00
Jacek Caban
13fd4bf4e5
[llvm-ar][Archive] Use getDefaultTargetTriple instead of host triple for the fallback archive format. (#82888) 2024-02-27 19:56:00 +01:00
Paul Walker
ae94354721 [LLVM][LangRef] Remove bogus ':' from vector constant text. 2024-02-27 17:40:55 +00:00
Fangrui Song
8b56d9ef4d
[llvm-objcopy] Improve help messages (#82830)
https://reviews.llvm.org/D63820 added
llvm/docs/CommandGuide/llvm-objcopy.rst with clearer semantics, e.g.

```
Read a list of names from the file <filename> and mark defined symbols with those names as global in the output

instead of the help message
Read a list of symbols from <filename> and marks them global" (omits "defined")

Rename sections called <old> to <new> in the output

instead of the help message
Rename a section from old to new (multiple sections may be named <old>
```

Sync the help messages to incorporate the CommandGuide improvement.

While here, switch to the conventional imperative sentences for a few
options. Additionally, mark some options as grp_coff or grp_macho.
2024-02-27 08:13:23 -08:00
Bill Wendling
e87724560f [docs] Remove ref to deleted "Packaging.rst"
This is a fix for commit e9cdd165d7bc ("[docs] Remove the Packaging
"Tips" which seems to be about pre-cmake ./configure (#82958)"). The
doc was removed but not the references to it.
2024-02-26 14:28:08 -08:00
Mehdi Amini
e9cdd165d7
[docs] Remove the Packaging "Tips" which seems to be about pre-cmake ./configure (#82958)
It was already marked outdated in 2012: 5b26461e0999 and hasn't been
updated since.
2024-02-26 13:30:31 -08:00
Tom Honermann
1d2eced006
[llvm][docs] Update the Python version requirement to 3.8.0 for lit testing on Windows with substitute (virtual) drives. (#81663)
Following the changes made for:
- https://reviews.llvm.org/D154130: [lit][clang] Avoid realpath on Windows due to MAX_PATH limitations
in commit:
- 05d613ea931b6de1b46dfe04b8e55285359047f4

Python 3.8.0 or newer is now required by at least the following tests
when they are run on Windows from a substitute (virtual) drive. A
substitute drive is often used as a workaround for `MAX_PATH`
limitations on Windows. These tests are impacted because they use the
lit `%{?:real}` path expansion syntax to expand symbolic links and
substitute drives. This path expansion is implemented with Python's
`os.path.realpath()` function which changed behavior in Python 3.8.0
with regard to expansion of substitute drives. The changes mentioned
above rely on the newer Python behavior.
- `clang/test/Lexer/case-insensitive-include-absolute.c`
- `clang/test/Lexer/case-insensitive-include-win.c`

This change updates the LLVM Getting Started guide to note this newer
Python version dependency for this relatively niche case. Python 3.6.0
remains the minimum required Python version otherwise.
2024-02-26 11:46:03 -05:00
Yeting Kuo
e510fc7753
[VP][RISCV] Introduce vp.lrint/llrint and RISC-V support. (#82627)
RISC-V implements vector lrint/llrint by vfcvt.x.f.v.
2024-02-26 16:37:41 +08:00
Yeting Kuo
850dde063b
[RISCV][VP] Introduce vp saturating addition/subtraction and RISC-V support. (#82370)
This patch also pick the MatchContext framework from DAGCombiner to an
indiviual header file to make the framework be used from other files in
llvm/lib/CodeGen/SelectionDAG/.
2024-02-23 14:17:15 +08:00
Fangrui Song
26d71d9ed5
[llvm-readobj,ELF] Support --decompress/-z (#82594)
When a section has the SHF_COMPRESSED flag, -p/-x dump the compressed
content by default. In GNU readelf, if --decompress/-z is specified,
-p/-x will dump the decompressed content. This patch implements the
option.

Close #82507
2024-02-22 09:24:21 -08:00
Ian Hickson
770fd38566
[LangRef] Document string literals in LLVM's format (#82529) 2024-02-22 14:35:23 +01:00
Aiden Grossman
2dfa30d0ca Revert "[python] Bump Python minimum version to 3.8 (#78828)"
This reverts commit 0a6c74e21cc6750c843310ab35b47763cddaaf32.

This created a lot of post-commit failures due to buildbots running
older versions of Python.
2024-02-19 21:51:54 -08:00
Craig Hesling
0a6c74e21c
[python] Bump Python minimum version to 3.8 (#78828)
As per the RFC
https://discourse.llvm.org/t/rfc-upgrading-llvms-minimum-required-python-version/67571,
raise the minimum Python version to ensure that the Python syntax
doesn't become overly obsolete, to enable new Python feature usage,
and to improve the maintainability of CI.

One of the primary use cases for this higher Python version is to enable
python type annotations that are more aligned with current Python
best practices. This is not only important for our own internal Python
for testing, but for the Python bindings that are exposed to users.
2024-02-19 21:16:45 -08:00
Aiden Grossman
0c1f62073f
[Docs][llvm-exegesis] Add documentation on validation counters option (#82132)
This patch documents the --validation-counter flag.
2024-02-19 01:39:01 -08:00
J. Ryan Stinnett
c681ea6623
[Docs] Fix large vertical space at top of pages (#81599)
This fixes a large vertical blank space at the top of the page that was caused
by the floating sidebar.
2024-02-16 11:19:10 +00:00
Ulrich Weigand
bf471c915d
[docs][llvm-objcopy] Add missing formats (#81981)
Bring list of supported formats in docs back in sync with the code.
2024-02-16 12:11:04 +01:00
Yingwei Zheng
a300a1a711
[RISCV][ISel] Add codegen support for the experimental zabha extension (#80192)
This patch implements the codegen support of zabha (Byte and Halfword
Atomic Memory Operations) v1.0-rc1 extension.
See also https://github.com/riscv/riscv-zabha/blob/v1.0-rc1/zabha.adoc.

---------

Co-authored-by: Craig Topper <craig.topper@sifive.com>
2024-02-16 15:35:09 +08:00
Youngsuk Kim
a057506b7b
[docs][NVPTX] Use opaque pointers in IR examples (NFC) (#81941)
Replace outdated typed-pointer notation in LLVM IR examples. NFC.
2024-02-15 19:08:46 -05:00
Haopeng Liu
1d03d59aff Revert "add initialized attribute LangRef"
This reverts commit 69a96ae0e80f0e62c1f25a1c255a3f46ff7dc9e8.
2024-02-15 22:23:54 +00:00
Haopeng Liu
69a96ae0e8 add initialized attribute LangRef 2024-02-15 22:17:56 +00:00
Derek Schuff
79213da031
Update release notes for Wasm improvements to nm and objdump (#81924)
Describes improvements made for #76107
2024-02-15 13:44:22 -08:00
Pierre van Houtryve
43c7eb5d7b
[AMDGPU] Replace '.' with '-' in generic target names (#81718)
The dot is too confusing for tools. Output temporaries would have
'10.3-generic' so tools could parse it as an extension, device libs &
the associated clang driver logic are also confused by the dot.

After discussions, we decided it's better to just remove the '.' from
the target name than fix each issue one by one.
2024-02-14 15:19:04 +01:00
Richard Dzenis
3985eda8ee
[docs] Update links for C++ compiler supported features in CodingStandards (#81587) 2024-02-13 21:19:49 +02:00
Pierre van Houtryve
87d7711934
[AMDGPU][SIMemoryLegalizer] Fix order of GL0/1_INV on GFX10/11 (#81450)
Fixes SWDEV-443292
2024-02-13 09:07:51 +01:00
Austin Kerbow
4bcbeaed63
[AMDGPU] Enable kernel arg preloading with gfx90a (#81180)
Add a trap instruction to the beginning of the kernel prologue to handle
cases where preloading is attempted on HW loaded with incompatible
firmware.
2024-02-12 22:33:29 -08:00
Konstantin Zhuravlyov
75a1c4e10b
AMDGPU/NFC: Reserve 0x055 MACH in e_flag for future use (#81501) 2024-02-12 13:37:25 -05:00
J. Ryan Stinnett
a3dcc7ab3a
[Docs][DebugInfo][RemoveDIs] Revise debug info migration guide title (#81480) 2024-02-12 17:56:17 +00:00
Mariusz Sikora
0c63453714
[AMDGPU][NFC] Docs - remove duplicates (#81465) 2024-02-12 12:25:54 +01:00
Benji Smith
b726a81947
[C API] Add blockaddress getters to C API (#81382)
This allows for accessing the function/basic block that a blockaddress
constant refers to

Due to the difficulties of fully supporting cloning BlockAddress values
in echo.cpp, tests are instead done using a unit test.

This previously was up for review at
https://github.com/llvm/llvm-project/pull/77390.
2024-02-12 10:59:00 +01:00
Pierre van Houtryve
f93aa5157a
[AMDGPU] Introduce GFX9/10.1/10.3/11 Generic Targets (#76955)
These generic targets include multiple GPUs and will, in the future,
provide a way to build once and run on multiple GPU, at the cost of less
optimization opportunities.

Note that this is just doing the compiler side of things, device libs an
runtimes/loader/etc. don't know about these targets yet, so none of them
actually work in practice right now. This is just the initial commit to
make LLVM aware of them.

This contains the documentation changes for both this change and #76954
as well.
2024-02-12 10:18:20 +01:00
pvanhout
f5399e89a2 Remove trailing whitespaces in AMDGPUUsage.rst 2024-02-12 09:30:10 +01:00
Danny Mösch
00e80fbfb9
[NFC] Correct C++ standard names (#81421) 2024-02-11 19:43:34 +01:00
Joseph Huber
07dc85ba0c
[NVVMReflect] Improve folding inside of the NVVMReflect pass (#81253)
Summary:
The previous patch did very simple folding that only worked for driectly
used branches. This patch improves this by traversing the use-def chain
to sipmlify every constant subexpression until it reaches a terminator
we can delete. The support should work for all expected cases now.
2024-02-09 13:39:03 -06:00
quic-areg
7ddc320525
[llvm-objcopy] Support SREC output format (#75874)
Adds a new output target "srec" to write SREC files from ELF inputs.

https://en.wikipedia.org/wiki/SREC_(file_format)
2024-02-09 16:15:23 +00:00
Corbin Robeck
fcb59203c8
[AMDGPU][DOC] Add MI200 Names to AMDGPUUsage Doc (#81252) 2024-02-09 10:05:26 -05:00
Jan Patrick Lehr
f661057865
Revert "[AMDGPU] Compiler should synthesize private buffer resource descriptor from flat_scratch_init" (#81234)
Reverts llvm/llvm-project#79586

This broke the AMDGPU OpenMP Offload buildbot.
The typical error message was that the GPU attempted to read beyong the
largest legal address.

Error message:
AMDGPU fatal error 1: Received error in queue 0x7f8363f22000:
HSA_STATUS_ERROR_MEMORY_APERTURE_VIOLATION: The agent attempted to
access memory beyond the largest legal address.
2024-02-09 09:57:38 +01:00
Joseph Huber
ffabcbcf8f [NVVMReflect][Reland] Force dead branch elimination in NVVMReflect (#81189)
Summary:
The `__nvvm_reflect` function is used to guard invalid code that varies
between architectures. One problem with this feature is that if it is
used without optimizations, it will leave invalid code in the module
that will then make it to the backend. The `__nvvm_reflect` pass is
already mandatory, so it should do some trivial branch removal to ensure
that constants are handled correctly. This dead branch elimination only
works in the trivial case of a compare on a branch and does not touch
any conditionals that were not realted to the `__nvvm_reflect` call in
order to preserve `O0` semantics as much as possible. This should allow
the following to work on NVPTX targets

```c
int foo() {
  if (__nvvm_reflect("__CUDA_ARCH") >= 700)
    asm("valid;\n");
}
```

Relanding after fixing a bug.
2024-02-08 20:09:44 -06:00
David Blaikie
93471466be
Document use of skip-precommit-approval label for non-review pull requests (#81053)
Derived from this discussion:
https://discourse.llvm.org/t/prs-without-approvals-muddy-the-waters/76656
2024-02-08 16:41:04 -08:00
Joseph Huber
0800a36053 Revert "[NVVMReflect] Force dead branch elimination in NVVMReflect (#81189)"
This reverts commit 9211e67da36782db44a46ccb9ac06734ccf2570f.

Summary:
This seemed to crash one one of the CUDA math tests. Revert until it can
be fixed.
2024-02-08 17:32:04 -06:00
Joseph Huber
9211e67da3
[NVVMReflect] Force dead branch elimination in NVVMReflect (#81189)
Summary:
The `__nvvm_reflect` function is used to guard invalid code that varies
between architectures. One problem with this feature is that if it is
used without optimizations, it will leave invalid code in the module
that will then make it to the backend. The `__nvvm_reflect` pass is
already mandatory, so it should do some trivial branch removal to ensure
that constants are handled correctly. This dead branch elimination only
works in the trivial case of a compare on a branch and does not touch
any conditionals that were not realted to the `__nvvm_reflect` call in
order to preserve `O0` semantics as much as possible. This should allow
the following to work on NVPTX targets

```c
int foo() {
  if (__nvvm_reflect("__CUDA_ARCH") >= 700)
    asm("valid;\n");
}
```
2024-02-08 17:16:31 -06:00
alex-t
88e52511ca
[AMDGPU] Compiler should synthesize private buffer resource descriptor from flat_scratch_init (#79586)
This change implements synthesizing the private buffer resource
descriptor in the kernel prolog instead of using the preloaded kernel
argument.
2024-02-08 20:27:36 +01:00
Nicolai Hähnle
c0ff10814f
docs/GettingStarted: document linker-related cmake options (#80932)
Both LLVM_LINK_LLVM_DYLIB and LLVM_PARALLEL_LINK_JOBS help with some
common gotchas. It seems worth documenting them here explicitly.

Based on a review comment, also "refactor" the documentation to avoid duplication.
2024-02-08 19:24:55 +01:00
Yi Kong
1b87ebce92
[llvm-objcopy] Add --remove-symbol-prefix (#79415) 2024-02-07 17:38:09 +09:00