Commit Graph

9461 Commits

Author SHA1 Message Date
Alex Brachet 1f61260847 Revert "[ifs] Add --strip-size flag"
This reverts commit b6b0fd6a94.
2022-05-14 17:33:27 +00:00
Alex Brachet b6b0fd6a94 [ifs] Add --strip-size flag
st_size may not be of importance to the abi if you are not using
copy relocations. This is helpful when you want to check the abi
of a shared object both when instrumented and not because asan
will increase the size of objects to include the redzone.

Differential revision: https://reviews.llvm.org/D124792
2022-05-14 17:25:50 +00:00
Kristof Beyls e1a8d05dd2 Update my office hours 2022-05-13 16:30:02 +02:00
Nicolai Hähnle 38bb46523f GlobalISel: Trivial documentation and comment fixes
Differential Revision: https://reviews.llvm.org/D124808
2022-05-10 07:48:56 -05:00
Nikita Popov 3d888b0491 [Docs] Clarify CLANG_ENABLE_OPAQUE_POINTERS behavior (NFC)
While it originally did, this option no longer affects the cc1
interface. For the cc1 interface, -no-opaque-pointers has to be
passed, there is no cmake option.
2022-05-10 10:02:01 +02:00
Anastasia Stulova cd99227c78 [Docs] Added my office hours. 2022-05-09 17:39:41 +01:00
Groverkss 4d1fd705f0 [docs] Add Office Hours for Tobias Grosser 2022-05-08 21:14:31 +05:30
Brian Tracy 87a55137e2 Fix "the the" typo in documentation and user facing strings
There are many more instances of this pattern, but I chose to limit this change to .rst files (docs), anything in libcxx/include, and string literals. These have the highest chance of being seen by end users.

Reviewed By: #libc, Mordante, martong, ldionne

Differential Revision: https://reviews.llvm.org/D124708
2022-05-05 17:52:08 +02:00
Tobias Hieta 350bdf9227 [CMake] Make omitting CMAKE_BUILD_TYPE an error
After a lot of discussion in this diff the consensus was that it is really hard to guess the users intention with their LLVM build. Instead of trying to guess if Debug or Release is the correct default option we opted for just not specifying CMAKE_BUILD_TYPE a error.

Discussion on discourse here:
https://discourse.llvm.org/t/rfc-select-a-better-linker-by-default-or-warn-about-using-bfd

Reviewed By: hans, mehdi_amini, aaron.ballman, jhenderson, MaskRay, awarzynski

Differential Revision: https://reviews.llvm.org/D124153
2022-05-04 14:01:33 +02:00
Tobias Hieta 30e8796496 [docs] Improve documentation around CMAKE_BUILD_TYPE
See discussion in: https://reviews.llvm.org/D124153

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D124367
2022-05-04 11:23:45 +02:00
David Kreitzer 29f70e3e7d Minor correction in bitreverse intrinsic semantics
Differential Revision: https://reviews.llvm.org/D124861
2022-05-03 11:41:10 -07:00
Serge Pavlov d9b5544e0f [Doc] Refine description of llvm.is_fpclass 2022-05-03 19:28:47 +07:00
Tanya Lattner 751716bebd Add transparency report. 2022-05-02 16:29:38 -07:00
Augie Fackler c7ae423e39 BuildLibCalls: add alloc-family attribute to many allocator functions
Differential Revision: https://reviews.llvm.org/D123086
2022-05-02 11:12:55 -04:00
Phoebe Wang 7c04454227 [ArgPromotion][Attributor] Update min-legal-vector-width when do promotion
X86 codegen uses function attribute `min-legal-vector-width` to select the proper ABI. The intention of the attribute is to reflect user's requirement when they passing or returning vector arguments. So Clang front-end will iterate the vector arguments and set `min-legal-vector-width` to the width of the maximum for both caller and callee.

It is assumed any middle end optimizations won't care of the attribute expect inlining and argument promotion.
- For inlining, we will propagate the attribute of inlined functions because the inlining functions become the newer caller.
- For argument promotion, we check the `min-legal-vector-width` of the caller and callee and refuse to promote when they don't match.

The problem comes from the optimizations' combination, as shown by https://godbolt.org/z/zo3hba8xW. The caller `foo` has two callees `bar` and `baz`. When doing argument promotion, both `foo` and `bar` has the same `min-legal-vector-width`. So the argument was promoted to vector. Then the inlining inlines `baz` to `foo` and updates `min-legal-vector-width`, which results in ABI mismatch between `foo` and `bar`.

This patch fixes the problem by expanding the concept of `min-legal-vector-width` to indicator of functions arguments. That says, any passes touch functions arguments have to set `min-legal-vector-width` to the value reflects the width of vector arguments. It makes sense to me because any arguments modifications are ABI related and should response for the ABI compatibility.

Differential Revision: https://reviews.llvm.org/D123284
2022-05-02 14:13:05 +08:00
Sylvestre Ledru ee4ac3a856 doc: update of the adv build doc now that clang is in tree too
And be more consistent in the declarations
2022-05-01 22:59:49 +02:00
Jack Andersen 09325d3606 [CAPI] Expose CastInst::getCastOpcode in C API
Reviewed By: deadalnix

Differential Revision: https://reviews.llvm.org/D91514
2022-04-30 18:40:04 -04:00
Joe Nash ec6d1a0278 Fix sphinx build error in AMDGPUUsage.rst
Corrects error from
813e521e55
2022-04-29 13:32:06 -04:00
Joe Nash 813e521e55 [AMDGPU] Add gfx11 subtarget ELF definition
This is the first patch of a series to upstream support for the new
subtarget.

Contributors:
Jay Foad <jay.foad@amd.com>
Konstantin Zhuravlyov <kzhuravl_dev@outlook.com>

Patch 1/N for upstreaming AMDGPU gfx11 architectures.

Reviewed By: foad, kzhuravl, #amdgpu

Differential Revision: https://reviews.llvm.org/D124536
2022-04-29 12:27:17 -04:00
David Tenty 8042699a30 [LLVM] Add exported visibility style for XCOFF
For the AIX linker, under default options, global or weak symbols which
have no visibility bits set to zero (i.e. no visibility, similar to ELF
default) are only exported if specified on an export list provided to
the linker. So AIX has an additional visibility style called
"exported" which indicates to the linker that the symbol should
be explicitly globally exported.

This change maps "dllexport" in the LLVM IR to correspond to XCOFF
exported as we feel this best models the intended semantic (discussion
on the discourse RFC thread: https://discourse.llvm.org/t/rfc-adding-exported-visibility-style-to-the-ir-to-model-xcoff-exported-visibility/61853)
and allows us to enable writing this visibility for the AIX target
in the assembly path.

Reviewed By: DiggerLin

Differential Revision: https://reviews.llvm.org/D123951
2022-04-28 14:56:00 -04:00
Andrew Savonichev 1041a9642b [lit] Support %if ... %else syntax for RUN lines
This syntax allows to modify RUN lines based on features
available. For example:

    RUN: ... | FileCheck %s --check-prefix=%if windows %{CHECK-W%} %else %{CHECK-NON-W%}
    CHECK-W: ...
    CHECK-NON-W: ...

The whole command can be put under %if ... %else:

    RUN: %if tool_available %{ %tool %} %else %{ true %}

or:

    RUN: %if tool_available %{ %tool %}

If tool_available feature is missing, we'll have an empty command in
this RUN line.  LIT used to emit an error for empty commands, but now
it treats such commands as nop in all cases.

Multi-line expressions are also supported:

    RUN: %if tool_available %{ \
    RUN:   %tool               \
    RUN: %} %else %{           \
    RUN:   true                \
    RUN: %}

Background and motivation:
D121727 [NVPTX] Integrate ptxas to LIT tests
https://reviews.llvm.org/D121727

Differential Revision: https://reviews.llvm.org/D122569
2022-04-27 20:29:08 +03:00
Hans Wennborg aed44d2822 Remove the Visual Studio/MSBuild integration (llvm/tools/msbuild/)
This has been obsolete and abandoned since MS started including an
integration themselves in Visual Studio 2019.

See discussion at
https://discourse.llvm.org/t/building-the-llvm-with-msbuild/62053/

Differential revision: https://reviews.llvm.org/D124521
2022-04-27 17:28:43 +02:00
Youngsuk Kim e1567e771b [docs] Fix typos in the 'CodeGenerator' doc
NFC.

Differential Revision: https://reviews.llvm.org/D124305
2022-04-26 21:47:12 -07:00
Augie Fackler a907d36cfe Attributes: add a new `allocptr` attribute
This continues the push away from hard-coded knowledge about functions
towards attributes. We'll use this to annotate free(), realloc() and
cousins and obviate the hard-coded list of free functions.

Differential Revision: https://reviews.llvm.org/D123083
2022-04-26 13:57:11 -04:00
Tanya Lattner 6c1a0d5205 Consistently use the same apostrophe in these docs. 2022-04-26 09:29:44 -07:00
Serge Pavlov 170a903144 Intrinsic for checking floating point class
This change introduces a new intrinsic, `llvm.is.fpclass`, which checks
if the provided floating-point number belongs to any of the the specified
value classes. The intrinsic implements the checks made by C standard
library functions `isnan`, `isinf`, `isfinite`, `isnormal`, `issubnormal`,
`issignaling` and corresponding IEEE-754 operations.

The primary motivation for this intrinsic is the support of strict FP
mode. In this mode using compare instructions or other FP operations is
not possible, because if the value is a signaling NaN, floating-point
exception `Invalid` is raised, but the aforementioned functions must
never raise exceptions.

Currently there are two solutions for this problem, both are
implemented partially. One of them is using integer operations to
implement the check. It was implemented in https://reviews.llvm.org/D95948
for `isnan`. It solves the problem of exceptions, but offers one
solution for all targets, although some can do the check in more
efficient way.

The other, implemented in https://reviews.llvm.org/D96568, introduced a
hook 'clang::TargetCodeGenInfo::testFPKind', which injects a target
specific code into IR to implement `isnan` and some other functions. It is
convenient for targets that have dedicated instruction to determine FP data
class. However using target-specific intrinsic complicates analysis and can
prevent some optimizations.

A special intrinsic for value class checks allows representing data class
tests with enough flexibility. During IR transformations it represents the
check in target-independent way and saves it from undesired transformations.
In the instruction selector it allows efficient lowering depending on the
used target and mode.

This implementation is an extended variant of `llvm.isnan` introduced
in https://reviews.llvm.org/D104854. It is limited to minimal intrinsic
support. Target-specific treatment will be implemented in separate
patches.

Differential Revision: https://reviews.llvm.org/D112025
2022-04-26 13:09:16 +07:00
Tanya Lattner eb2c30b8b3 Provide the complete response and reporting Code of Conduct documentation. Remove the word draft from all documents, add information about the CoC committee expectations and add a place for transparency reports.
This patch provides the response and reporting guides for Code of Conduct reports. It also removes the word draft from all the documents,
adds information about the CoC committee, and a place to put transparency reports. A post will also be made on Discourse to provide more details about the history of the code of conduct, this patch, and next steps. Please see that post for full details. I will put a link below once I have it.

Reviewed By: aaron.ballman, hubert.reinterpretcast

Differential Revision: https://reviews.llvm.org/D122937
2022-04-25 23:03:44 -07:00
Florian Hahn b00fd35277
[LangRef] Limit readnone,read/writeonly to memory visible outside the fn
This patch unifies the wording used for readnone, readonly and writeonly
attributes. The definitions now more specifically refer to memory visible
outside the function

The motivation for the clarification is D123473.

Reviewed By: nlopes

Differential Revision: https://reviews.llvm.org/D124124
2022-04-25 11:32:50 +01:00
Vitaly Buka 9be90748f1 Revert "[asan] Emit .size directive for global object size before redzone"
Revert "[docs] Fix underline"

Breaks a lot of asan tests in google.

This reverts commit 365c3e85bc.
This reverts commit 78a784bea4.
2022-04-21 16:21:17 -07:00
Alex Brachet 365c3e85bc [docs] Fix underline 2022-04-21 21:05:49 +00:00
Alex Brachet 78a784bea4 [asan] Emit .size directive for global object size before redzone
This emits an `st_size` that represents the actual useable size of an object before the redzone is added.

Reviewed By: vitalybuka, MaskRay, hctim

Differential Revision: https://reviews.llvm.org/D123010
2022-04-21 20:46:38 +00:00
Xiang Li 5c3a68d1e2 [DeveloperPolicy] Add invitation link for commit access.
In some case, GitHub will not send notification for commit access invitation. Add invitation link for people don't get notification from GitHub.

Reviewed By: lattner

Differential Revision: https://reviews.llvm.org/D124191
2022-04-21 12:44:59 -07:00
Nikola Tesic c5600aef88 [Debugify] Limit number of processed functions for original mode
Debugify in OriginalDebugInfo mode, does (DebugInfo) collect-before-pass & check-after-pass
for each instruction, which is pretty expensive. When used to analyze DebugInfo losses
in large projects (like LLVM), this raises the build time unacceptably.
This patch introduces a limit for the number of processed functions per compile unit.
By default, the limit is set to UINT_MAX (practically unlimited), and by using the introduced
option  -debugify-func-limit  the limit could be set to any positive integer number.

Differential revision: https://reviews.llvm.org/D115714
2022-04-21 13:58:17 +02:00
Aaron Ballman 009048ab31 Update the developer policy to mention release notes
As a project, Clang has gotten negative public feedback about our lack
of communicating changes to users. There are comments on places like
Hacker News or Reddit where users have (rightfully) been confused as to
what changes happen in a given release, leading to misinformation like
Clang not adding support for C++20 features:
https://news.ycombinator.com/item?id=28761464.

This documents the expectation that changes which impact users should
have release notes, and it's normal for code reviewers to ask an author
to add a release note for a given change.

This addresses: https://github.com/llvm/llvm-project/issues/54965

RFC: https://discourse.llvm.org/t/rfc-update-developer-policy-on-release-notes/61856

Differential Revision: https://reviews.llvm.org/D123957
2022-04-20 11:36:30 -04:00
Ilia Diachkov 7fd4622d48 [SPIR-V](1/6) Add stub for SPIRV backend
This patch contains enough for lib/Target/SPIRV to compile: a basic
SPIRVTargetMachine and SPIRVTargetInfo.

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

Authors: Aleksandr Bezzubikov, Lewis Crawford, Ilia Diachkov,
Michal Paszkowski, Andrey Tretyakov, Konrad Trifunovic

Co-authored-by: Aleksandr Bezzubikov <zuban32s@gmail.com>
Co-authored-by: Ilia Diachkov <iliya.diyachkov@intel.com>
Co-authored-by: Michal Paszkowski <michal.paszkowski@outlook.com>
Co-authored-by: Andrey Tretyakov <andrey1.tretyakov@intel.com>
Co-authored-by: Konrad Trifunovic <konrad.trifunovic@intel.com>
2022-04-20 01:10:25 +02:00
Paul Kirth bac6cd5bf8 [misexpect] Re-implement MisExpect Diagnostics
Reimplements MisExpect diagnostics from D66324 to reconstruct its
original checking methodology only using MD_prof branch_weights
metadata.

New checks rely on 2 invariants:

1) For frontend instrumentation, MD_prof branch_weights will always be
   populated before llvm.expect intrinsics are lowered.

2) for IR and sample profiling, llvm.expect intrinsics will always be
   lowered before branch_weights are populated from the IR profiles.

These invariants allow the checking to assume how the existing branch
weights are populated depending on the profiling method used, and emit
the correct diagnostics. If these invariants are ever invalidated, the
MisExpect related checks would need to be updated, potentially by
re-introducing MD_misexpect metadata, and ensuring it always will be
transformed the same way as branch_weights in other optimization passes.

Frontend based profiling is now enabled without using LLVM Args, by
introducing a new CodeGen option, and checking if the -Wmisexpect flag
has been passed on the command line.

Reviewed By: tejohnson

Differential Revision: https://reviews.llvm.org/D115907
2022-04-19 21:23:48 +00:00
Chih-Ping Chen eab6e94f91 [DebugInfo] Add a TargetFuncName field in DISubprogram for
specifying DW_AT_trampoline as a string. Also update the signature
of DIBuilder::createFunction to reflect this addition.

Differential Revision: https://reviews.llvm.org/D123697
2022-04-15 16:38:23 -04:00
Michael Williamson f4cc757560 Add missing word in llc docs 2022-04-14 22:29:03 -04:00
Shoaib Meenai 7226e7fd14 [cmake] Loosen multi-distribution restrictions
We've found that there are cases where it's useful to be able to include
the same target in multiple distributions (e.g. if you want a
distribution that's a superset of another distribution, for convenience
purposes), and that there are cases where the distribution of a target
and its umbrella can legitimately differ (e.g. the LTO library would
commonly be distributed alongside your tools, but it also falls under
the llvm-libraries umbrella, which would commonly be distributed
separately). Relax the restrictions while providing an option to restore
them (which is mostly useful to ensure you aren't accidentally placing
targets in the wrong distributions).

There could be further refinements here (e.g. excluding a target from an
umbrella if it's explicitly included in some other distribution, or
having variables to control which targets are allowed to be duplicated
or placed in a separate distribution than their umbrellas), but we can
punt on those until there's an actual need.
2022-04-13 20:33:28 -07:00
Jonas Paulsson 46f83caebc [InlineAsm] Add support for address operands ("p").
This patch adds support for inline assembly address operands using the "p"
constraint on X86 and SystemZ.

This was in fact broken on X86 (see example at
https://reviews.llvm.org/D110267, Nov 23).

These operands should probably be treated the same as memory operands by
CodeGenPrepare, which have been commented with "TODO" there.

Review: Xiang Zhang and Ulrich Weigand

Differential Revision: https://reviews.llvm.org/D122220
2022-04-13 12:50:21 +02:00
Lang Hames db8469c4d7 [docs][ORC] Fix RST error in dfffb7df24. 2022-04-12 16:06:11 -07:00
Lang Hames dfffb7df24 [docs] Update OrcV2 doc to include some notes on code removal. 2022-04-12 15:58:25 -07:00
Changpeng Fang 8edaf25986 AMDGPU: Emit metadata for the hidden_multigrid_sync_arg conditionally
Summary:
  Introduce a new function attribute, amdgpu-no-multigrid-sync-arg, which is default.
We use implicitarg_ptr + offset to check whether the multigrid synchronization
pointer is used. If yes, we remove this attribute and also remove
amdgpu-no-implicitarg-ptr. We generate metadata for the hidden_multigrid_sync_arg
only when the amdgpu-no-multigrid-sync-arg attribute is removed from the function.

Reviewers: arsenm, sameerds, b-sumner and foad

Differential Revision: https://reviews.llvm.org/D123548
2022-04-12 12:36:30 -07:00
Arthur Eubanks 9faab435a3 [docs] Mention that we are in the process of removing the legacy PM for the optimization pipeline
And remove references to flags to turn it off.

Reviewed By: nikic, MaskRay

Differential Revision: https://reviews.llvm.org/D123547
2022-04-12 10:47:58 -07:00
Dmitry Preobrazhensky c33770d87f [AMDGPU][DOC][NFC] Updated GFX10 assembler syntax description
The description has been updated to reflect AMDGPU MC changes:
- enabled literals for src0 of v_fmaak_f*, v_fmamk_f*, v_madak_f32, v_madmk_f32;
- enabled global_atomic_fcmpswap and global_atomic_fcmpswap_x2;
- enabled dlc with flat_atomic* and global_atomic_*.

Bug fixing and improvements:
- enabled s_wait_idle;
- enabled s_waitcnt_depctr;
- added description of s_waitcnt_depctr syntactic sugar;
- disabled SYSMSG_OP_HOST_TRAP_ACK (it is not supported on GFX10);
- corrected description of lgkmcnt (accept values from 0 to 63).
2022-04-12 15:18:44 +03:00
Dmitry Preobrazhensky 4e83d4fd92 [AMDGPU][DOC][NFC] Updated GFX1030 assembler syntax description
Summary of changes:
- enabled null for VOP operands;
- added description of s_waitcnt_depctr syntactic sugar.
2022-04-12 14:58:18 +03:00
Nikita Popov 702d5de438 [Clang] Enable opaque pointers by default
Enable opaque pointers by default in clang, which can be disabled
either via cc1 option -no-opaque-pointers or cmake flag
-DCLANG_ENABLE_OPAQUE_POINTERS=OFF.

See https://llvm.org/docs/OpaquePointers.html for context.

Differential Revision: https://reviews.llvm.org/D123300
2022-04-11 11:13:45 +02:00
Aaron Ballman 33ab88ef8d Fix Sphinx build 2022-04-08 07:12:08 -04:00
Tobias Hieta 4c72deb613 Bump minimum toolchain version
RFC: https://discourse.llvm.org/t/rfc-increasing-the-gcc-and-clang-requirements-to-support-c-17-in-llvm

Following the policy here: https://llvm.org/docs/DeveloperPolicy.html#toolchain

This forum post here will be updated with the timeline and status: https://discourse.llvm.org/t/important-new-toolchain-requirements-to-build-llvm-will-most-likely-be-landing-within-a-week-prepare-your-buildbots/61447

Reviewed By: mehdi_amini, jyknight, jhenderson, cor3ntin, MaskRay

Differential Revision: https://reviews.llvm.org/D122976
2022-04-08 09:05:33 +02:00
Roman Sokolkov 153431ec7a [docs] Fix Kaleidoscope code example
* replace virtual with override
* use default like in full code example

Differential Revision: https://reviews.llvm.org/D123110
2022-04-06 10:41:10 +01:00
Nikita Popov ed4e6e0398 [cmake] Remove LLVM_ENABLE_NEW_PASS_MANAGER cmake option
Or rather, error out if it is set to something other than ON. This
removes the ability to enable the legacy pass manager by default,
but does not remove the ability to explicitly enable it through
various flags like -flegacy-pass-manager or -enable-new-pm=0.

I checked, and our test suite definitely doesn't pass with
LLVM_ENABLE_NEW_PASS_MANAGER=OFF anymore.

Differential Revision: https://reviews.llvm.org/D123126
2022-04-06 09:52:21 +02:00
Scott Linder 09f33a430b [AMDGPU][OpenCL] Remove "printf and hostcall" diagnostic
The diagnostic is unreliable, and triggers even for dead uses of
hostcall that may exist when linking the device-libs at lower
optimization levels.

Eliminate the diagnostic, and directly document the limitation for
OpenCL before code object V5.

Make some NFC changes to clarify the related code in the
MetadataStreamer.

Add a clang test to tie OCL sources containing printf to the backend IR
tests for this situation.

Reviewed By: sameerds, arsenm, yaxunl

Differential Revision: https://reviews.llvm.org/D121951
2022-04-05 19:10:23 +00:00
Nikita Popov d4d30d6bb1 [Docs] Update opaque pointers docs (NFC)
Point people to the cc1 instead of the mllvm flag, as the mllvm
flag will stop working for clang usage at some point.

Update transition state to mention that support in Clang/LLVM is
complete, and only the default switch is pending.
2022-04-05 12:10:36 +02:00
Michael Kruse c7bd9dcb06 [docs] Add Loop Opt WG meeting ics.
Add ics file for biweekly loop optimization meeting.

Reviewed By: #loopoptwg, bmahjour

Differential Revision: https://reviews.llvm.org/D120343
2022-04-04 20:07:51 -05:00
gbreynoo 3ad6f53502 [llvm-objcopy][docs] Update --update-section description
I noticed that when --update-section was added to llvm-objcopy it was
not added to the command guide, see
25bcd94234. This change adds it to the
docs and updates the help text.

Differential Revision: https://reviews.llvm.org/D122907
2022-04-04 16:18:17 +01:00
Arthur Eubanks bca96760f7 [cmake] Remove LLVM_USE_NEWPM option
This option tells the host clang to use the new pass manager.
Given that it's been the default for a while, this seems unnecessary.

This was added in D57068.

(this does not affect any LLVM/Clang functionality)

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D122947
2022-04-01 20:24:38 -07:00
Dmitry Preobrazhensky 111cb395c9 [AMDGPU][DOC][NFC] Added GFX1013 assembler syntax description 2022-04-01 14:47:38 +03:00
Xiang1 Zhang a56f264958 Refine tls-load-hoista llvm option
Reviewed By: LuoYuanke

Differential Revision: https://reviews.llvm.org/D122890
2022-04-01 19:03:58 +08:00
yanming a7c0b7504c [VP] Add more cast VPintrinsic and docs.
Add vp.fptoui, vp.uitofp, vp.fptrunc, vp.fpext, vp.trunc, vp.zext, vp.sext, vp.ptrtoint, vp.inttoptr intrinsic and docs.

Reviewed By: frasercrmck, craig.topper

Differential Revision: https://reviews.llvm.org/D122291
2022-04-01 09:16:10 +08:00
Jorge Gorbe Moya fc7573f29c Revert "[misexpect] Re-implement MisExpect Diagnostics"
This reverts commit 46774df307.
2022-03-31 14:54:41 -07:00
Vy Nguyen 1ae449f9a3 Reland "[llvm-readobj][MachO] Add option to sort the symbol table before dumping (MachO only, for now)."
https://reviews.llvm.org/D116787

This reverts commit 33b3c86afa.

New change: fixed build failures:
 - in stabs-sorted:restore the the ERR-KEY statements, which were accidentally deleted during refactoring
 - in ObjDumper.h/MachODumper.cpp: refactor so that current dumpers which didn't provide an impl that accept a SymCom still works
2022-03-31 14:21:41 -04:00
Paul Kirth 46774df307 [misexpect] Re-implement MisExpect Diagnostics
Reimplements MisExpect diagnostics from D66324 to reconstruct its
original checking methodology only using MD_prof branch_weights
metadata.

New checks rely on 2 invariants:

1) For frontend instrumentation, MD_prof branch_weights will always be
   populated before llvm.expect intrinsics are lowered.

2) for IR and sample profiling, llvm.expect intrinsics will always be
   lowered before branch_weights are populated from the IR profiles.

These invariants allow the checking to assume how the existing branch
weights are populated depending on the profiling method used, and emit
the correct diagnostics. If these invariants are ever invalidated, the
MisExpect related checks would need to be updated, potentially by
re-introducing MD_misexpect metadata, and ensuring it always will be
transformed the same way as branch_weights in other optimization passes.

Frontend based profiling is now enabled without using LLVM Args, by
introducing a new CodeGen option, and checking if the -Wmisexpect flag
has been passed on the command line.

Reviewed By: tejohnson

Differential Revision: https://reviews.llvm.org/D115907
2022-03-31 17:38:21 +00:00
Vy Nguyen 33b3c86afa Revert "[llvm-readobj][MachO] Add option to sort the symbol table before dumping (MachO only, for now)."
This reverts commit ea9cf2dc96.

Broke LLDB - reverting to investigage
2022-03-31 09:33:32 -04:00
Vy Nguyen ea9cf2dc96 [llvm-readobj][MachO] Add option to sort the symbol table before dumping (MachO only, for now).
This would help making tests less brittle as the order will be fixed.

(see also PR/53026)

    Differential Revision: https://reviews.llvm.org/D116787
2022-03-31 09:13:31 -04:00
Frances Wingerter aaf6608441 [docs] [tools] Document and alphabetize all llvm-config command-line options
Also implements explicit handling for the already-documented --help
flag.
2022-03-31 08:44:10 +01:00
Fraser Cormack cc67a8fcf1 [VP][LangRef] Correct select operands in vp.fptosi docs 2022-03-31 08:30:18 +01:00
Jessica Paquette ce6e280c33 Recommit "[Docs] Add documentation for llvm-remark-size-diff"
Add it to the toctree for the LLVM command guide.
2022-03-30 13:37:49 -07:00
Jessica Paquette 73138d280d Revert "[Docs] Add documentation for llvm-remark-size-diff"
This reverts commit bdea2afc8c.

Bot failure.
2022-03-30 13:34:03 -07:00
Jessica Paquette bdea2afc8c [Docs] Add documentation for llvm-remark-size-diff
Add documentation describing how to

- Use `llvm-remark-size-diff`
- Interpret the output from the tool

Differential Revision: https://reviews.llvm.org/D122744
2022-03-30 13:27:18 -07:00
Fraser Cormack 73244e8f85 [VP] Add vp.icmp comparison intrinsic and docs
This patch mostly follows up on D121292 which introduced the vp.fcmp
intrinsic.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D122729
2022-03-30 17:05:11 +01:00
Fraser Cormack a0e5d9e1f4 [LangRef][NFC] Correct select operands in vp.fcmp docs
Thanks for craig.topper for spotting this.
2022-03-30 17:03:15 +01:00
Fraser Cormack da6131f20a [VP] Add vp.fcmp comparison intrinsic and docs
This patch adds the first support for vector-predicated comparison
intrinsics, starting with vp.fcmp. It uses metadata to encode its
condition code, like the llvm.experimental.constrained.fcmp intrinsic.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D121292
2022-03-30 14:39:18 +01:00
Michael Kruse 793b7f903d [docs] Update LoopTerminology.
Includes 2 corrections:

 * Update irreducible control flow and add references to CycleTerminology;
   Natural loop is not the only definition of something looping in LLVM anymore.

 * Mention mustprogress loop and function attributes to be used
   instead of the llvm.sideeffect intrinsic.
2022-03-29 23:26:18 -05:00
Paul Kirth 90cb325abd Revert "[misexpect] Re-implement MisExpect Diagnostics"
This reverts commit 2add3fbd97.
2022-03-29 06:20:30 +00:00
Paul Kirth 6c77972bac Revert "[docs][misexpect][NFC] Fix malformed table in docs"
This reverts commit a427e18896.
2022-03-29 06:19:53 +00:00
Paul Kirth a427e18896 [docs][misexpect][NFC] Fix malformed table in docs
Reviewed By: abrachet

Differential Revision: https://reviews.llvm.org/D122623
2022-03-29 00:14:07 +00:00
Paul Kirth 2add3fbd97 [misexpect] Re-implement MisExpect Diagnostics
Reimplements MisExpect diagnostics from D66324 to reconstruct its
original checking methodology only using MD_prof branch_weights
metadata.

New checks rely on 2 invariants:

1) For frontend instrumentation, MD_prof branch_weights will always be
   populated before llvm.expect intrinsics are lowered.

2) for IR and sample profiling, llvm.expect intrinsics will always be
   lowered before branch_weights are populated from the IR profiles.

These invariants allow the checking to assume how the existing branch
weights are populated depending on the profiling method used, and emit
the correct diagnostics. If these invariants are ever invalidated, the
MisExpect related checks would need to be updated, potentially by
re-introducing MD_misexpect metadata, and ensuring it always will be
transformed the same way as branch_weights in other optimization passes.

Frontend based profiling is now enabled without using LLVM Args, by
introducing a new CodeGen option, and checking if the -Wmisexpect flag
has been passed on the command line.

Reviewed By: tejohnson

Differential Revision: https://reviews.llvm.org/D115907
2022-03-28 23:30:04 +00:00
Aaron Ballman 07f33a357d Correct a minor point with the Phabricator docs
The repository field we want to leave blank is on the page as the
`Create Diff` button, so merged the instructions about leaving the
field blank and clicking the button.
2022-03-28 07:15:09 -04:00
lizhengxian.123 23b3df5675 [docs][Lexicon] Add new explanation for some shortcomings(WPD, CFI) for lexicon
Add explanations for WPD(whole program devirtualization) and another meaning for CFI(control flow Integrity).

Reviewed By: tejohnson

Differential Revision: https://reviews.llvm.org/D122473
2022-03-28 12:46:28 +08:00
Lang Hames 34b547dfbf [docs][ORC] Simplify paragraph on hardcoding process addresses. 2022-03-26 13:14:26 -07:00
Lang Hames 824a73bbfa [docs][ORC] Reword "How to Add Process and Library Symbols to the JITDylibs".
Now opens with advice on what to do, rather than what *not* to do.
2022-03-26 13:02:01 -07:00
Jonas Devlieghere 61efe14e21
[lldb] Add a fuzzer for target creation
This patch adds a generic fuzzer that interprets inputs as object files
and uses them to create a target in lldb. It is very similar to the
llvm-dwarfdump fuzzer which found a bunch of issues in libObject.

Differential revision: https://reviews.llvm.org/D122461
2022-03-25 09:34:00 -07:00
Dmitry Preobrazhensky 5975f1c5f9 [AMDGPU][DOC][NFC] Added GFX1030 assembler syntax description 2022-03-25 18:14:04 +03:00
Nikita Popov 840bb72543 [lldb] Avoid pointer element type accesses 2022-03-24 13:09:23 +01:00
Nikita Popov c2b3a9abc8 [Docs] Update opaque pointers transition state (NFC)
Opaque pointer support in Clang is now complete.
2022-03-24 11:51:54 +01:00
Kristof Beyls 51d9aaf4e5 Update my office hours
Adding LLVM security group as another topic I can talk about.
2022-03-24 09:56:43 +01:00
Xiang1 Zhang 9566405020 [Inline asm] Fix mangle problem when variable used in inline asm.
(Correct 'Mem symbol + IntelExpr' output in PIC model)

Reviewed By: skan

Differential Revision: https://reviews.llvm.org/D121785
2022-03-24 09:41:23 +08:00
Julian Lettner 64902d335c Reland "Lower `@llvm.global_dtors` using `__cxa_atexit` on MachO"
For MachO, lower `@llvm.global_dtors` into `@llvm_global_ctors` with
`__cxa_atexit` calls to avoid emitting the deprecated `__mod_term_func`.

Reuse the existing `WebAssemblyLowerGlobalDtors.cpp` to accomplish this.

Enable fallback to the old behavior via Clang driver flag
(`-fregister-global-dtors-with-atexit`) or llc / code generation flag
(`-lower-global-dtors-via-cxa-atexit`).  This escape hatch will be
removed in the future.

Differential Revision: https://reviews.llvm.org/D121736
2022-03-23 18:36:55 -07:00
Zequan Wu 581dc3c729 Revert "Lower `@llvm.global_dtors` using `__cxa_atexit` on MachO"
This reverts commit 22570bac69.
2022-03-23 16:11:54 -07:00
Xiaodong Liu 9580f95488 [Dockerfile] Upgrade debian base image to version 10
Debian8 is too old to build LLVM project, the version
of GCC, CMake and python are lower than the requirements:
https://llvm.org/docs/GettingStarted.html#software

Debian10 is the earliest release that has software
packages that meet the above requirements.

Reviewed By: sammccall

Differential Revision: https://reviews.llvm.org/D120826
2022-03-23 15:32:15 +00:00
Nikita Popov 5737ce259b [LangRef] Allow non-power-of-two assume operand bundle
There has been a lot of confusion on this in the past (see for
example https://reviews.llvm.org/D110634 and earlier revisions),
so let's try to get some clarity here. This patch specifies that
a) specifying a non-constant assumed alignment is explicitly
allowed and b) an invalid (non-power-of-two) alignment is not UB,
but rather converts it into an assumption that the pointer is null.

This change is done for two reasons:
a) Assume operand bundles are specifically used in cases where the
alignment is not known during frontend codegen (otherwise we'd just
use an align attribute), so rejecting this case doesn't make sense.
b) At least for aligned_alloc the C standard specifies that passing
an invalid alignment results in a null pointer, not undefined
behavior.

Differential Revision: https://reviews.llvm.org/D119414
2022-03-23 15:51:16 +01:00
Aaron Ballman ab26841704 Fix LLVM sphinx build
This amends a749e3295d to fix a few
missed targets in the contributor documentation.
2022-03-23 10:17:47 -04:00
Danny Mösch a749e3295d Replace links to archived mailing lists by links to Discourse forums 2022-03-23 10:10:20 -04:00
Nikita Popov d04d2d43d7 [Docs] Update opaque pointers docs (NFC)
Mention automatic enablement of opaque pointers mode that was
recently implemented. Update wording in the transition state,
because it seems like my overly cautious wording has given some
people an incorrect impression of the state of opaque pointer
support in clang.
2022-03-21 10:13:09 +01:00
Nikita Popov d41d798737 [Docs] Fix reference (NFC) 2022-03-21 10:06:27 +01:00
Itay Bookstein d155c7da51 [docs] Fix a couple of typos
Signed-off-by: Itay Bookstein <ibookstein@gmail.com>
2022-03-19 20:24:38 +02:00
Fangrui Song c6692f819e [GlobalOpt] Don't replace alias with aliasee if either alias/aliasee may be preemptible
Generalize D99629 for ELF. A default visibility non-local symbol is preemptible
in a -shared link. `isInterposable` is an insufficient condition.

Moreover, a non-preemptible alias may be referenced in a sub constant expression
which intends to lower to a PC-relative relocation. Replacing the alias with a
preemptible aliasee may introduce a linker error.

Respect dso_preemptable and suppress optimization to fix the abose issues. With
the change, `alias = 345` will not be rewritten to use aliasee in a `-fpic`
compile.
```
int aliasee;
extern int alias __attribute__((alias("aliasee"), visibility("hidden")));
void foo() { alias = 345; } // intended to access the local copy
```

While here, refine the condition for the alias as well.

For some binary formats like COFF, `isInterposable` is a sufficient condition.
But I think canonicalization for the changed case has little advantage, so I
don't bother to add the `Triple(M.getTargetTriple()).isOSBinFormatELF()` or
`getPICLevel/getPIELevel` complexity.

For instrumentations, it's recommended not to create aliases that refer to
globals that have a weak linkage or is preemptible. However, the following is
supported and the IR needs to handle such cases.
```
int aliasee __attribute__((weak));
extern int alias __attribute__((alias("aliasee")));
```

There are other places where GlobalAlias isInterposable usage may need to be
fixed.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D107249
2022-03-18 14:17:05 -07:00
Mehdi Amini 7b983917d4 Add a cmake flag to turn `llvm_unreachable()` into builtin_trap() when assertions are disabled
This re-lands 6316129e06 after fixing the condition logic.

The new flag seems to not be working yet on Windows, where the builtin
trap isn't "no return".

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D121750
2022-03-18 19:24:14 +00:00
Dmitry Preobrazhensky 53491e4519 [AMDGPU][DOC][NFC] Added links to MI200 documentation
Differential Revision: https://reviews.llvm.org/D121811
2022-03-18 13:17:42 +03:00
Nikita Popov 112aafcaf4 Revert "Add a cmake flag to turn `llvm_unreachable()` into builtin_trap() when assertions are disabled"
This reverts commit 6316129e06.

This was implemented with inverted logic.
2022-03-18 09:21:53 +01:00
James Henderson c975668ffc Fix llvm-strip --only-keep-debug documentation for ELF
The functionality (and llvm-objcopy's corresponding documentation) was
added in
5ad0103d8a.
It looks like the llvm-strip docs to match were missed.

Reviewed by: gbreynoo

Differential Revision: https://reviews.llvm.org/D121902
2022-03-18 06:49:05 +00:00
Paul Kirth 964398ccb1 Revert "Revert "Revert "[misexpect] Re-implement MisExpect Diagnostics"""
This reverts commit 6cf560d69a.
2022-03-18 00:21:33 +00:00
Paul Kirth 6cf560d69a Revert "Revert "[misexpect] Re-implement MisExpect Diagnostics""
I mistakenly reverted my commit, so I'm relanding it.

This reverts commit 10866a1df4.
2022-03-18 00:04:22 +00:00
Paul Kirth 10866a1df4 Revert "[misexpect] Re-implement MisExpect Diagnostics"
This reverts commit e7749d4713.
2022-03-17 23:54:26 +00:00
Paul Kirth e7749d4713 [misexpect] Re-implement MisExpect Diagnostics
Reimplements MisExpect diagnostics from D66324 to reconstruct its
original checking methodology only using MD_prof branch_weights
metadata.

New checks rely on 2 invariants:

1) For frontend instrumentation, MD_prof branch_weights will always be
   populated before llvm.expect intrinsics are lowered.

2) for IR and sample profiling, llvm.expect intrinsics will always be
   lowered before branch_weights are populated from the IR profiles.

These invariants allow the checking to assume how the existing branch
weights are populated depending on the profiling method used, and emit
the correct diagnostics. If these invariants are ever invalidated, the
MisExpect related checks would need to be updated, potentially by
re-introducing MD_misexpect metadata, and ensuring it always will be
transformed the same way as branch_weights in other optimization passes.

Frontend based profiling is now enabled without using LLVM Args, by
introducing a new CodeGen option, and checking if the -Wmisexpect flag
has been passed on the command line.

Differential Revision: https://reviews.llvm.org/D115907
2022-03-17 23:46:23 +00:00
Alina Sbirlea 6c4931e7d0 [docs] Fix codeblock. 2022-03-17 15:53:20 -07:00
Alina Sbirlea 187a5f230f [docs] Add details to MemorySSA docs.
Add more details to the docs regarding optimized accesses for Uses and Defs.
Include incoming changes from https://reviews.llvm.org/D121381.

Differential Revision: https://reviews.llvm.org/D121740
2022-03-17 15:25:09 -07:00
Mehdi Amini 6316129e06 Add a cmake flag to turn `llvm_unreachable()` into builtin_trap() when assertions are disabled
Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D121750
2022-03-17 22:21:14 +00:00
Johannes Doerfert 88c3c346f6
Add another office hour 2022-03-17 12:48:13 -05:00
Julian Lettner 22570bac69 Lower `@llvm.global_dtors` using `__cxa_atexit` on MachO
For MachO, lower `@llvm.global_dtors` into `@llvm_global_ctors` with
`__cxa_atexit` calls to avoid emitting the deprecated `__mod_term_func`.

Reuse the existing `WebAssemblyLowerGlobalDtors.cpp` to accomplish this.

Enable fallback to the old behavior via Clang driver flag
(`-fregister-global-dtors-with-atexit`) or llc / code generation flag
(`-lower-global-dtors-via-cxa-atexit`).  This escape hatch will be
removed in the future.

Differential Revision: https://reviews.llvm.org/D121736
2022-03-17 10:47:13 -07:00
Craig Topper dc516ce6c8 [RISCV] Mention Zvfh extension in release notes. NFC 2022-03-17 10:12:50 -07:00
Stanislav Mekhanoshin 3a37d08b35 [AMDGPU] Correct gfx940 memory model documentation.
Differential Revision: https://reviews.llvm.org/D121397
2022-03-16 11:59:40 -07:00
Bill Wendling 114a8903b8 [docs] Fix typo in tutorial
Use "operands" instead of "operators"

Closes #54397
2022-03-16 11:44:23 -07:00
Tobias Nießen eaafa70017 [libfuzzer] improve introductory sentence
This merely adds a missing "an" in the introductory sentence.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D121760
2022-03-15 17:19:20 -07:00
Simon Pilgrim 7262eacd41 Revert rG9c542a5a4e1ba36c24e48185712779df52b7f7a6 "Lower `@llvm.global_dtors` using `__cxa_atexit` on MachO"
Mane of the build bots are complaining: Unknown command line argument '-lower-global-dtors'
2022-03-15 13:01:35 +00:00
Keith Smiley 6541d3e979 [test] Add lit helper for windows paths
This adds 2 new lit helpers `%{fs-src-root}` and `%{fs-sep}`, these
allow writing tests that correctly handle slashes on Windows. In the
case of tests like clang/test/CodeGen/debug-prefix-map.c, these are
unable to correctly test behavior on both platforms, unless they fork
and add OS requirements, because the relevant logic hits host specific
codepaths like checking if paths are absolute.

Differential Revision: https://reviews.llvm.org/D111457
2022-03-14 20:05:55 -07:00
Julian Lettner 9c542a5a4e Lower `@llvm.global_dtors` using `__cxa_atexit` on MachO
For MachO, lower `@llvm.global_dtors` into `@llvm_global_ctors` with
`__cxa_atexit` calls to avoid emitting the deprecated `__mod_term_func`.

Reuse the existing `WebAssemblyLowerGlobalDtors.cpp` to accomplish this.

Enable fallback to the old behavior via Clang driver flag
(`-fregister-global-dtors-with-atexit`) or llc / code generation flag
(`-lower-global-dtors-via-cxa-atexit`).  This escape hatch will be
removed in the future.

Differential Revision: https://reviews.llvm.org/D121327
2022-03-14 17:51:18 -07:00
Stanislav Mekhanoshin 47bac63d3f [AMDGPU] gfx940 memory model
Differential Revision: https://reviews.llvm.org/D121242
2022-03-14 15:01:46 -07:00
sstwcw 65a3712af6 [yamlio] Allow parsing an entire mapping as an enumeration
For when we want to change a configuration option from an enum into a
struct.  The need arose when working on D119599.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D120363
2022-03-14 04:41:40 +00:00
Nikita Popov 374bb6dd80 [docs] Update opaque pointers transition state (NFC)
Bitcode is now supported.
2022-03-11 09:35:38 +01:00
Sylvestre Ledru 54d7fde46e llvm-ifs doc: Replace a utf-8 char by a more classic one
Fails on old python (like on ubuntu bionic) otherwise with:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 2130: ordinal not in range(128)
2022-03-10 22:45:05 +01:00
Aaron Ballman 11407c58a2 Fix the dates for the C and C++ language working group
It's 1st and 3rd Wed of the month instead of every other.
2022-03-10 13:09:00 -05:00
Lorenzo Albano 28cfa764c2 [VP] Strided loads/stores
This patch introduces two new experimental IR intrinsics and SDAG nodes
to represent vector strided loads and stores.

Reviewed By: simoll

Differential Revision: https://reviews.llvm.org/D114884
2022-03-10 18:46:54 +01:00
Xiang1 Zhang c31014322c TLS loads opimization (hoist)
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D120000
2022-03-10 09:29:06 +08:00
Aaron Ballman c233c1acf8 Add the C and C++ Language Working Group meeting info 2022-03-09 10:19:06 -05:00
Aaron Ballman 338dfcd60f Update my office hours
Adds "frontend attributes" to the list of things to come talk about,
removes the extra timezone information to hopefully reduce confusion
about daylight savings time.
2022-03-09 07:57:30 -05:00
Tom Stellard 9cb0605c0e docs: Update instructions for requesting backports to the release branches
Reviewed By: lattner

Differential Revision: https://reviews.llvm.org/D120974
2022-03-08 16:28:02 -08:00
Jacob Lambert 5160447f58 [AMDGPU] Add gfx10 assembler directive to specify shared VGPR count
Reviewed By: rampitec

Differential Revision: https://reviews.llvm.org/D105507
2022-03-07 14:27:41 -08:00
Petr Hosek b5f1a8cfc3 [llvm-cov] New parameters to set coverage coverage_watermark
Add a pairs of parameters to set coverage watermark for llvm-cov, and
user can change the percentage thresholds marked with different colors
in the report.

Patch By: tanjinhua

Differential Revision: https://reviews.llvm.org/D116876
2022-03-04 22:21:40 -08:00
Tanya Lattner ca8432f1ee Update references to the mailing list to reference Discourse. Also update references to LLVM Bugzilla as we have moved to GitHub issues.
Reviewed By: lattner

Differential Revision: https://reviews.llvm.org/D120833
2022-03-04 14:27:50 -08:00
Augie Fackler d664c4b73c Attributes: add a new allocalign attribute
This will let us start moving away from hard-coded attributes in
MemoryBuiltins.cpp and put the knowledge about various attribute
functions in the compilers that emit those calls where it probably
belongs.

Differential Revision: https://reviews.llvm.org/D117921
2022-03-04 15:57:53 -05:00
Arthur Eubanks f0b61f7957 Revert "[GlobalOpt] Don't replace alias with aliasee if either alias/aliasee may be preemptible"
This reverts commit 30e8f83c84.

Causes huge compile time regressions on certain large files. Will followup offline with author.
2022-03-03 11:04:14 -08:00
Aakanksha 840695814a [AMDGPU] Add gfx1036 target
Differential Revision: https://reviews.llvm.org/D120846
2022-03-02 23:26:38 +00:00
Stanislav Mekhanoshin 2e2e64df4a [AMDGPU] Add gfx940 target
This is target definition only.

Differential Revision: https://reviews.llvm.org/D120688
2022-03-02 13:54:48 -08:00
Simon Moll d05ddb86f6 [VP] vp.sitofp cast intrinsic and docs
Reviewed By: frasercrmck

Differential Revision: https://reviews.llvm.org/D119922
2022-03-02 10:16:19 +01:00
Simon Moll febf548129 [VP] Fix vp.fptosi LangRef example
Reviewed By: frasercrmck

Differential Revision: https://reviews.llvm.org/D120068
2022-03-02 10:15:32 +01:00
Zequan Wu 5c9e20d7d0 [PDB] Add char8_t type
Differential Revision: https://reviews.llvm.org/D120690
2022-03-01 13:39:51 -08:00
Tong Zhang 17ce89fa80 [SanitizerBounds] Add support for NoSanitizeBounds function
Currently adding attribute no_sanitize("bounds") isn't disabling
-fsanitize=local-bounds (also enabled in -fsanitize=bounds). The Clang
frontend handles fsanitize=array-bounds which can already be disabled by
no_sanitize("bounds"). However, instrumentation added by the
BoundsChecking pass in the middle-end cannot be disabled by the
attribute.

The fix is very similar to D102772 that added the ability to selectively
disable sanitizer pass on certain functions.

In this patch, if no_sanitize("bounds") is provided, an additional
function attribute (NoSanitizeBounds) is attached to IR to let the
BoundsChecking pass know we want to disable local-bounds checking. In
order to support this feature, the IR is extended (similar to D102772)
to make Clang able to preserve the information and let BoundsChecking
pass know bounds checking is disabled for certain function.

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D119816
2022-03-01 18:47:02 +01:00
Haowei Wu 8ada9b570d [doc] Add llvm-ifs commandline guide
This patch adds llvm-ifs commandline guide

Differential Review: https://reviews.llvm.org/D118514
2022-02-28 11:18:09 -08:00
Changpeng Fang ca62b1db9f [AMDGPU][NFC]: Emit metadata for hidden_heap_v1 kernarg
Summary:
  Emit metadata for hidden_heap_v1 kernarg

Reviewers:
  sameerds, b-sumner

Fixes:
  SWDEV-307188

Differential Revision:
  https://reviews.llvm.org/D119027
2022-02-25 10:45:35 -08:00
Daniel Thornburgh 565add5a62 [Debuginfod] Add BUILD_ID syntax to llvm-symbolizer.
This adds a BUILD_ID prefix to the llvm-symbolizer stdin and argument
syntax. The prefix causes the given binary name to be interpreted as a
build ID instead of an object file path. The semantics are analagous to
the behavior of --obj and --build-id.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D119901
2022-02-25 00:39:13 +00:00
Aaron Ballman 14536ce007 Add myself to the office hours; correct small typo in prose 2022-02-23 08:14:11 -05:00
Alina Sbirlea ed69e3266c [Docs]Add office hours. 2022-02-22 16:40:01 -08:00
Adrian Prantl 621e2de138 Add a (nonfunctional) -dyld_info flag to llvm-objdump.
Darwin otool implements this flag as a one-stop solution for
displaying bind and rebase info. As I am working on upstreaming
chained fixup support this command will be useful to write testcases.

Differential Revision: https://reviews.llvm.org/D113573
2022-02-22 11:06:27 -08:00
Tanya Lattner b4990ac330 Update references to the mailing lists that have moved to Discourse. 2022-02-21 18:58:48 -08:00
Kristof Beyls 7a837d38bd Create office hours documentation.
Differential Revision: https://reviews.llvm.org/D120036
2022-02-21 20:21:16 +01:00
Alex Bradbury 8d894270a6 [docs] Update ReleaseNotes template
This change makes several updates to the ReleaseNotes template:

* Orders the backend/target updates alphabetically
* Adds RISC-V to the list
* Uses "Backend" rather than a mix of "Target" and "Backend" (I don't
  have a strong view on which term is used, but we should be
  consistent!)
* Uses * ... as the placeholder text, as this matches the format
  actually used for most updates in recent releases

Differential Revision: https://reviews.llvm.org/D120043
2022-02-20 19:42:07 +00:00
Nuno Lopes 35b92c1464 [docs] fix typo 2022-02-20 18:43:30 +00:00
Nuno Lopes 8608650a76 [docs] Frotend perf tips: mention poison vs undef and noundef attribute 2022-02-20 11:59:04 +00:00
Nuno Lopes da23fc966b [docs] Simplify the description of poison values 2022-02-20 11:41:49 +00:00
Nuno Lopes 5c404049b5 [docs] Add a note saying that the use of poison is preferred to the use of undef
Plus fix a few wrong examples with undef
2022-02-20 11:33:47 +00:00
fourdim bc53ebbda8 [docs] HowToCrossCompileLLVM.rst: update cmake options
This patch updates the cmake options suggested when cross compiling. This should fix [#52819](https://github.com/llvm/llvm-project/issues/52819).

Brad King (Member of CMake) says:

The linked [CMAKE_CROSSCOMPILING](https://cmake.org/cmake/help/v3.22/variable/CMAKE_CROSSCOMPILING.html) documentation says:

This variable will be set to true by CMake if the `CMAKE_SYSTEM_NAME` variable has been set manually (i.e. in a toolchain file or as a cache entry from the cmake command line).

It is not meant to be set by project code or toolchain files. It is always set automatically. Don't put `set(CMAKE_CROSSCOMPILING ON)` anywhere in your code.

`CMAKE_CROSSCOMPILING` indicates only whether `CMAKE_SYSTEM_NAME` was set by the user/project/toolchain-file instead of by CMake.

In LLVM project, `CMAKE_CROSSCOMPILING` is used to determine whether to execute some tests on the host machine.

LLVM needs to use another method for that. `CMAKE_CROSSCOMPILING` is not a reliable indicator of whether produced binaries will run on the host, and does not claim so in its documentation. If one sets `CMAKE_SYSTEM_NAME` to Linux in a toolchain file, and builds on a Linux host, that doesn't mean the target architecture or minimum glibc version is the same.

Reviewed By: rengolin

Differential Revision: https://reviews.llvm.org/D119804
2022-02-19 20:37:12 +08:00
Arthur Eubanks bfdf28f963 [docs][NewPM] Remove buildDefaultAAPipeline() in example
With D113210 we're already using the default AA pipeline by default.
2022-02-18 10:43:26 -08:00
zhijian fd3ba1f862 Title: Export unique symbol list with llvm-nm new option "--export-symbols"
Summary:

the patch implement of following functionality.
1. export the symbols from archive or object files.
2. sort the export symbols. (based on same symbol name and visibility)
3. delete the duplicate export symbols (based on same symbol name and visibility)
4. print out the  unique and sorted export symbols (print the symbol name and visibility).

there are two new options are add in the patch
1. --export-symbols (enable the functionality of export unique symbol)
2. --no-rsrc (exclude the symbol name begin with "__rsrc" from be exporting from xcoff object file)

Export symbol list for xcoff object file has the same functionality as
The patch has the same functionality as
https://www.ibm.com/docs/en/xl-c-aix/13.1.0?topic=library-exporting-symbols-createexportlist-utility

Reviewers: James Henderson,Fangrui Song
Differential Revision: https://reviews.llvm.org/D112735
2022-02-17 11:37:33 -05:00
Nikita Popov dce3b403a7 [Docs] Use correct rst syntax 2022-02-17 14:08:46 +01:00
Nikita Popov 4846568191 [Docs] Update opaque pointers docs
Expand migration instructions.
2022-02-17 13:03:33 +01:00
Jacob Lambert 7470244475 [AMDGPU] Add agpr_count to metadata and AsmParser
gfx90a allows the number of ACC registers (AGPRs) to be set
independently to the VGPR registers. For both HSA and PAL metadata, we
now include an "agpr_count" key to report the number of AGPRs set for
supported devices (gfx90a, gfx908, as determined by hasMAIInsts()).
This is collected from SIProgramInfo.NumAccVGPR for both HSA and PAL.
The AsmParser also now recognizes ".kernel.agpr_count" for supported
devices.

Differential Revision: https://reviews.llvm.org/D116140
2022-02-16 15:17:23 -08:00
Kristof Beyls 520a925272 Fix 2 RestructuredText warnings. 2022-02-16 14:16:52 +01:00
Simon Moll 03e83cc8eb [VP] vp.fptosi cast intrinsic and docs
Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D119535
2022-02-15 18:17:19 +01:00
zhijian 0135aa7b98 [llvm-nm] add a new option -X to specify the type of object file llvm-nm should examine
Summary:
Added a new option "-X" to specify, which type of object file should be examine.

For example:

1. "llvm-nm -X64 archive.a" only deal with the 64bit object files in the archive.a ,ignore the all 32bit object files in the archive.a
2. "llvm-nm -X32 xcoffobj32.o xcoffobj64.o " only deal with the 32bit object file "xcoffobj32.o" , 64bit object file "xcoffobj64.o" will be ignored

Reviewers: James Henderson,Fangrui Song
Differential Revision: https://reviews.llvm.org/D118193
2022-02-15 09:43:31 -05:00
David Spickett 8d4d0f7d1a [lldb] Remove memory region non-address change from release notes
This is now on 14.x as af19ae529271f9ae96927662d7d876489115fb26
so it is not new to 15.
2022-02-15 11:36:55 +00:00
Markus Böck db8ae2fef1 [llvm][doc] Update comments and documentation of custom stackmap formats in GC
Since https://reviews.llvm.org/D53892 it is possible to emit a custom stackmap by overwriting the emitStackMaps method of GCMetadataPrinter. That way even AOT compilers can generate a more efficient and more suitable format for their needs.

This patch updates documentation and stale comments in source code. In particular it removes the issue from the issue list in the Statepoints documentation and adjusts comments in GCStrategy.

Differential Revision: https://reviews.llvm.org/D119660
2022-02-15 12:17:19 +01:00
Ahmed Bougacha c703f852c9 [IR] Define "ptrauth" operand bundle.
This introduces a new "ptrauth" operand bundle to be used in
call/invoke. At the IR level, it's semantically equivalent to an
@llvm.ptrauth.auth followed by an indirect call, but it additionally
provides additional hardening, by preventing the intermediate raw
pointer from being exposed.

This mostly adds the IR definition, verifier checks, and support in
a couple of general helper functions. Clang IRGen and backend support
will come separately.

Note that we'll eventually want to support this bundle in indirectbr as
well, for similar reasons.  indirectbr currently doesn't support bundles
at all, and the IR data structures need to be updated to allow that.

Differential Revision: https://reviews.llvm.org/D113685
2022-02-14 11:27:35 -08:00
Momchil Velikov 6398903ac8 Extend the `uwtable` attribute with unwind table kind
We have the `clang -cc1` command-line option `-funwind-tables=1|2` and
the codegen option `VALUE_CODEGENOPT(UnwindTables, 2, 0) ///< Unwind
tables (1) or asynchronous unwind tables (2)`. However, this is
encoded in LLVM IR by the presence or the absence of the `uwtable`
attribute, i.e.  we lose the information whether to generate want just
some unwind tables or asynchronous unwind tables.

Asynchronous unwind tables take more space in the runtime image, I'd
estimate something like 80-90% more, as the difference is adding
roughly the same number of CFI directives as for prologues, only a bit
simpler (e.g. `.cfi_offset reg, off` vs. `.cfi_restore reg`). Or even
more, if you consider tail duplication of epilogue blocks.
Asynchronous unwind tables could also restrict code generation to
having only a finite number of frame pointer adjustments (an example
of *not* having a finite number of `SP` adjustments is on AArch64 when
untagging the stack (MTE) in some cases the compiler can modify `SP`
in a loop).
Having the CFI precise up to an instruction generally also means one
cannot bundle together CFI instructions once the prologue is done,
they need to be interspersed with ordinary instructions, which means
extra `DW_CFA_advance_loc` commands, further increasing the unwind
tables size.

That is to say, async unwind tables impose a non-negligible overhead,
yet for the most common use cases (like C++ exceptions), they are not
even needed.

This patch extends the `uwtable` attribute with an optional
value:
      -  `uwtable` (default to `async`)
      -  `uwtable(sync)`, synchronous unwind tables
      -  `uwtable(async)`, asynchronous (instruction precise) unwind tables

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D114543
2022-02-14 14:35:02 +00:00
Nikita Popov 5a43a278f7 [Docs] Update OpaquePointers transition state (NFC)
We're at a point where working optimized binaries can be produced
in opaque pointer mode.
2022-02-14 12:55:58 +01:00
Markus Böck e101eb5c7b [llvm][doc] Add Aarch64 to list of architectures supporting statepoints
Fixes https://github.com/llvm/llvm-project/issues/53655

Differential Revision: https://reviews.llvm.org/D119659
2022-02-13 20:35:15 +01:00
YASHASVI KHATAVKAR f9f78a2c40 Fix build broken by missing empty line in SourceLevelDebugging.rst 2022-02-11 15:19:07 -05:00
YASHASVI KHATAVKAR 70fdbf35de Adding DiBuilder interface for assumed length strings 2022-02-11 14:40:02 -05:00
Julien Pages dcb2da13f1 [AMDGPU] Add a new intrinsic to control fp_trunc rounding mode
Add a new llvm.fptrunc.round intrinsic to precisely control
the rounding mode when converting from f32 to f16.

Differential Revision: https://reviews.llvm.org/D110579
2022-02-11 12:08:23 -05:00
Louis Dionne 6a7f6e9404 [docs] Fix missing space in the GettingStarted documentation 2022-02-11 09:17:37 -05:00
Arthur Eubanks 2fa87ab524 [docs] Replace `opt -analyze` with better alternatives.
`opt -analyze` is legacy PM-specific. Show better ways of doing the same
thing, generally with some sort of `-passes=print<foo>`.

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D119486
2022-02-10 15:38:31 -08:00
YASHASVI KHATAVKAR 93d1a623ce Reverting an entire stack of changes causing build failures 2022-02-10 17:58:22 -05:00
YASHASVI KHATAVKAR ac15cd7af6 Modified SourceLevelDebugging.rst to include information about memory location exp 2022-02-10 15:24:51 -05:00
Louis Dionne 4ae83bb2b1 Update all LLVM documentation mentioning runtimes in LLVM_ENABLE_PROJECTS
We are moving away from building the runtimes with LLVM_ENABLE_PROJECTS,
however the documentation was largely outdated. This commit updates all
the documentation I could find to use LLVM_ENABLE_RUNTIMES instead of
LLVM_ENABLE_PROJECTS for building runtimes.

Note that in the near future, libcxx, libcxxabi and libunwind will stop
supporting being built with LLVM_ENABLE_PROJECTS altogether. I don't know
what the plans are for other runtimes like libc, openmp and compiler-rt,
so I didn't make any changes to the documentation that would imply
something for those projects.

Once this lands, I will also cherry-pick this on the release/14.x branch
to make sure that LLVM's documentation is up-to-date and reflects what
we intend to support in the future.

Differential Revision: https://reviews.llvm.org/D119351
2022-02-10 15:05:23 -05:00
David Spickett 2937b28218 Reland "[lldb] Remove non address bits when looking up memory regions"
This reverts commit 0df522969a.

Additional checks are added to fix the detection of the last memory region
in GetMemoryRegions or repeating the "memory region" command when the
target has non-address bits.

Normally you keep reading from address 0, looking up each region's end
address until you get LLDB_INVALID_ADDR as the region end address.
(0xffffffffffffffff)

This is what the remote will return once you go beyond the last mapped region:
[0x0000fffffffdf000-0x0001000000000000) rw- [stack]
[0x0001000000000000-0xffffffffffffffff) ---

Problem is that when we "fix" the lookup address, we remove some bits
from it. On an AArch64 system we have 48 bit virtual addresses, so when
we fix the end address of the [stack] region the result is 0.
So we loop back to the start.

[0x0000fffffffdf000-0x0001000000000000) rw- [stack]
[0x0000000000000000-0x0000000000400000) ---

To fix this I added an additional check for the last range.
If the end address of the region is different once you apply
FixDataAddress, we are at the last region.

Since the end of the last region will be the last valid mappable
address, plus 1. That 1 will be removed by the ABI plugin.

The only side effect is that on systems with non-address bits, you
won't get that last catch all unmapped region from the max virtual
address up to 0xf...f.

[0x0000fffff8000000-0x0000fffffffdf000) ---
[0x0000fffffffdf000-0x0001000000000000) rw- [stack]
<ends here>

Though in some way this is more correct because that region is not
just unmapped, it's not mappable at all.

No extra testing is needed because this is already covered by
TestMemoryRegion.py, I simply forgot to run it on system that had
both top byte ignore and pointer authentication.

This change has been tested on a qemu VM with top byte ignore,
memory tagging and pointer authentication enabled.

Reviewed By: omjavaid

Differential Revision: https://reviews.llvm.org/D115508
2022-02-10 10:42:49 +00:00
Lu Weining 42fd2bfc90 [LoongArch 1/6] Add triples loongarch{32,64} for the upcoming LoongArch target
This is the first patch to incrementally add an MC layer for LoongArch to LLVM.
This patch also adds unit testcases for these new triples.

RFC for adding this new backend:
https://lists.llvm.org/pipermail/llvm-dev/2021-December/154371.html

Differential revision: https://reviews.llvm.org/D115857
2022-02-10 10:23:34 +00:00
Daniel Thornburgh 694f384553 [Debuginfod] Flag-determine debuginfod lookups in llvm-symbolizer.
This change adds a pair of flags controlling whether llvm-symbolizer
attempts debuginfod lookups. Lookups are attempted if --debuginfod is
passed and disabled if --no-debuginfod is passed.

The default behavior is made more nuanced: debuginfod lookups are now
only attempted if an HTTP client is compiled in and at least one backing
debuginfod URL was configured via environment variable. Previously,
debuginfod lookups would always be attempted, even if there were no
chance that they could succeed.

Reviewed By: phosek

Differential Revision: https://reviews.llvm.org/D118665
2022-02-09 22:20:54 +00:00
Craig Topper 60745fb16f [VP] llvm.vp.fneg intrinsic and LangRef
Reviewed By: frasercrmck

Differential Revision: https://reviews.llvm.org/D119262
2022-02-09 07:54:36 -08:00
Daniel Thornburgh dcd4950d42 [Symbolizer] Add Build ID flag to llvm-symbolizer.
This adds a --build-id=<hex build ID> flag to llvm-symbolizer. If --obj
is unspecified, this will attempt to look up the provided build ID using
whatever mechanisms are available to the Symbolizer (typically,
debuginfod). The semantics are then as if the found binary were given
using the --obj flag.

Reviewed By: jhenderson, phosek

Differential Revision: https://reviews.llvm.org/D118633
2022-02-08 23:08:18 +00:00
Lancelot Six 046017291f [AMDGPU][NFC] AMDGPUUsage.rst: fix wording. 2022-02-07 20:06:17 -05:00
Craig Topper cef177d186 [VP] llvm.vp.fma intrinsic and LangRef
Differential Revision: https://reviews.llvm.org/D119185
2022-02-07 15:53:27 -08:00
Keith Smiley 4c12a75e69 [llvm-libtool-darwin] Add -warnings_as_errors
libtool can currently produce 2 warnings:

1. No symbols were in the object file
2. An object file with the same basename was specified multiple times

The first warning here is often harmless and may just mean you have some
translation units with no symbols for the target you're building for.
The second warning can lead to real issues like those mentioned in
https://reviews.llvm.org/D113130 where ODR violations can slip in.

This introduces a new -warnings_as_errors flag that can be used by build
systems that want to verify they never hit these warnings. For example
with bazel the libtool caller first uniques names to make sure the
duplicate base name case is not possible, but if that doesn't work as
expected, having it fail would be preferred.

It's also worth noting that llvm-libtool-darwin works around an issue
that cctools libtool experiences related to debug info and duplicate
basenames, the workaround is described here:
30baa5d2a4/llvm/lib/Object/ArchiveWriter.cpp (L424-L465)
And it avoids this bug:
f0cbbb1c37/DuplicateBasenameIssue

Differential Revision: https://reviews.llvm.org/D118931
2022-02-07 14:39:21 -08:00
Mark Murray 3d7662142d [ARM] Undeprecate complex IT blocks
AArch32/Armv8A  introduced the performance deprecation of certain patterns
of IT instructions.  After some debate internal to ARM, this is now being
reverted; i.e. no IT instruction patterns are performance deprecated
anymore, as the perfomance degredation is not significant enough.

This reverts the following:

"ARMv8-A deprecates some uses of the T32 IT instruction. All uses of
IT that apply to instructions other than a single subsequent 16-bit
instruction from a restricted set are deprecated, as are explicit
references to the PC within that single 16-bit instruction. This permits
the non-deprecated forms of IT and subsequent instructions to be treated
as a single 32-bit conditional instruction."

The deprecation no longer applies, but the behaviour may be controlled
by the -arm-restrict-it and -arm-no-restrict-it command-line options,
with the latter being the default. No warnings about complex IT blocks
will be generated.

Reviewed By: dmgreen

Differential Revision: https://reviews.llvm.org/D118044
2022-02-07 15:47:53 +00:00
Volodymyr Turanskyy c127ba25fb Add LLVM Embedded Toolchains call to the table of sync ups.
LLVM Embedded Toolchains working group regular sync up calls to start in early
March, adding details to the table of sync ups for general reference.

Differential Revision: https://reviews.llvm.org/D118884
2022-02-07 16:38:42 +01:00
Dmitry Preobrazhensky 95a52b376a [AMDGPU][GFX9][DOC][NFC] Corrected description of registers available via getreg/setreg
This is to reflect changes introduced by https://reviews.llvm.org/D118860.
2022-02-04 17:55:32 +03:00
Nikita Popov e990e591c9 [LangRef] Require elementtype attribute for gc.statepoint intrinsic
The gc.statepoint intrinsic currently determines the target function
type based on the pointer element type of the argument. In order to
support opaque pointers, require that the argument is annotated with
an elementtype attribute.

Here's an example of the change:

    ; Before:
      %safepoint_token = tail call token (i64, i32, i1 ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_i1f(i64 0, i32 0, i1 ()* @return_i1, i32 0, i32 0, i32 0, i32 0)

    ; After:
      %safepoint_token = tail call token (i64, i32, i1 ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_i1f(i64 0, i32 0, i1 ()* elementtype(i1 ()) @return_i1, i32 0, i32 0, i32 0, i32 0)

    ; After with opaque pointers:
      %safepoint_token = tail call token (i64, i32, i1 ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(i1 ()) @return_i1, i32 0, i32 0, i32 0, i32 0)

Differential Revision: https://reviews.llvm.org/D117890
2022-02-04 09:47:31 +01:00
Changpeng Fang 022c8d4a3f AMDGPU [NFC]: Fix a few typos in docs AMDGPUUsage.rst
Summery:
  Fix a few typos in docs AMDGPUUsage.rst

Differential Revision:
  https://reviews.llvm.org/D118272
2022-02-02 14:22:52 -08:00
Lancelot SIX 73ed118eda [Docs][NFC] Contributing.rst: fix wording
Fix a sentence containing two consecutive 'and'.
2022-02-02 13:49:03 +01:00
Tom Stellard a2601c9887 Bump the trunk major version to 15 2022-02-01 23:54:52 -08:00
Tom Stellard e80c52986e [docs] Remove hard-coded version numbers from sphinx configs
This updates all the non-runtime project release notes to use the
version number from CMake instead of the hard-coded version numbers
in conf.py.

It also hides warnings about pre-releases when the git suffix
is dropped from the LLVM version in CMake.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D112181
2022-02-01 23:14:12 -08:00
Tanya Lattner 1b12e92c80 Update status on migration again. Add note about issues with reply by email from emails pre-migration. 2022-02-01 22:25:31 -08:00
Tanya Lattner bbc5b62e85 Add new status of the move to Discourse. 2022-02-01 18:30:46 -08:00
Tanya Lattner e36afc6511 Update discourse migration status. 2022-02-01 18:09:31 -08:00
Tanya Lattner 769d634789 Update status of move. 2022-02-01 10:45:40 -08:00
Fangrui Song 30e8f83c84 [GlobalOpt] Don't replace alias with aliasee if either alias/aliasee may be preemptible
Generalize D99629 for ELF. A default visibility non-local symbol is preemptible
in a -shared link. `isInterposable` is an insufficient condition.

Moreover, a non-preemptible alias may be referenced in a sub constant expression
which intends to lower to a PC-relative relocation. Replacing the alias with a
preemptible aliasee may introduce a linker error.

Respect dso_preemptable and suppress optimization to fix the abose issues. With
the change, `alias = 345` will not be rewritten to use aliasee in a `-fpic`
compile.
```
int aliasee;
extern int alias __attribute__((alias("aliasee"), visibility("hidden")));
void foo() { alias = 345; } // intended to access the local copy
```

While here, refine the condition for the alias as well.

For some binary formats like COFF, `isInterposable` is a sufficient condition.
But I think canonicalization for the changed case has little advantage, so I
don't bother to add the `Triple(M.getTargetTriple()).isOSBinFormatELF()` or
`getPICLevel/getPIELevel` complexity.

For instrumentations, it's recommended not to create aliases that refer to
globals that have a weak linkage or is preemptible. However, the following is
supported and the IR needs to handle such cases.
```
int aliasee __attribute__((weak));
extern int alias __attribute__((alias("aliasee")));
```

There are other places where GlobalAlias isInterposable usage may need to be
fixed.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D107249
2022-02-01 10:41:16 -08:00
Fangrui Song dd6e7e0d57 [llvm-ar] Add --thin for creating a thin archive
In GNU ar (since 2008), the modifier 'T' means creating a thin archive.
In many other ar implementations (FreeBSD, macOS, elfutils, etc), -T
means "allow filename truncation of extracted files", as specified by
X/Open System Interface.

For portability, 'T' with thin archive semantics should be avoided.

See https://sourceware.org/bugzilla/show_bug.cgi?id=28759 binutils 2.38
will deprecate 'T' (without diagnostic) and add --thin.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D116979
2022-02-01 09:56:50 -08:00
Tanya Lattner acef496b5e Add status of migration. 2022-01-31 19:03:29 -08:00
Changpeng Fang 1194b9cdda AMDGPU {NFC}: Add code object v5 support and generate metadata for implicit kernel args
Summary:
  Add code object v5 support (deafult is still v4)
  Generate metadata for implicit kernel args for the new ABI
  Set the metadata version to be 1.2

Reviewers:
  t-tye, b-sumner, arsenm, and bcahoon

Fixes:
  SWDEV-307188, SWDEV-307189

Differential Revision:
  https://reviews.llvm.org/D118272
2022-01-31 18:07:47 -08:00
Daniel McIntosh 0ee7a2c304 [docs] Update Prolog/Epilog Code Insertion docs to show it's still incomplete
Compact Unwind is a subsection, but that was lost in rGff9feeb520a32d076c3095468208ae116c428285

Reviewed By: void

Differential Revision: https://reviews.llvm.org/D118499
2022-01-31 15:25:46 -05:00
Jeff Bailey f86844da49 Remove reference to LLVMLibC as the doc has moved.
https://reviews.llvm.org/D117436 caused a build failure
due to this error.

Tested:
ninja docs-llvm-libc builds

Reviewed By: abrachet

Differential Revision: https://reviews.llvm.org/D118537
2022-01-29 23:39:03 +00:00