Commit Graph

427098 Commits

Author SHA1 Message Date
Jonas Devlieghere de74756571
[lldb] Remove LogHandler::Create functions (NFC)
Remove the LogHandler::Create functions. Except for the StreamHandler
they were just forwarding their arguments to std::make_shared.
2022-06-16 21:04:08 -07:00
Jez Ng 8eeede973c [lld-macho][nfc] Tests for -force_load + regular archive load combinations
I realized we'd forgotten to cover this case (though our existing
behavior is indeed correct / matches ld64's).

Reviewed By: #lld-macho, thakis

Differential Revision: https://reviews.llvm.org/D128025
2022-06-16 23:50:07 -04:00
Jacques Pienaar 02b9ddb2f2 [mlir] Disable warning in test of deprecated feature (NFC)
Disable warning for deprecation in test of deprecated feature. Also
remove additional test of deprecated feature from TestOps.td.
2022-06-16 20:15:13 -07:00
Jacques Pienaar d30c0221cf [mlir] Split MLProgram global load and store to Graph variants
* Split ops into X_graph variants as discussed;
* Remove tokens from non-Graph region variants and rely on side-effect
  modelling there while removing side-effect modelling from Graph
  variants and relying on explicit ordering there;
* Make tokens required to be produced by Graph variants - but kept
  explicit token type specification given previous discussion on this
  potentially being configurable in future;

This results in duplicating some code. I considered adding helper
functions but decided against adding an abstraction there early given
size of duplication and creating accidental coupling.

Differential Revision: https://reviews.llvm.org/D127813
2022-06-16 20:01:54 -07:00
Lian Wang f2bcf33058 [LegalizeTypes][NFC] Merge promote SPLAT_VECTOR and promote SCALAR_TO_VECTOR to one function
Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D127825
2022-06-17 02:43:52 +00:00
Jacques Pienaar 287ade415e [mlir][doc] Avoid duplication with constraints and defs
Where a constraint also has a def, emit the def only to avoid duplicate
output (and def has more complete info). Also move attributes and types
to the end rather than some on top and some at end.

Differential Revision: https://reviews.llvm.org/D127823
2022-06-16 19:42:56 -07:00
Lian Wang 16215eb979 [LegalizeTypes][RISCV][NFC] Modify assert in PromoteIntRes_STEP_VECTOR and add some tests for RISCV
Reviewed By: david-arm

Differential Revision: https://reviews.llvm.org/D127939
2022-06-17 02:26:09 +00:00
Lian Wang 5e16a781ba [RISCV][NFC][test] Correct a wrong test in vreductions-fp-vp.ll
Reviewed By: victor-eds, frasercrmck

Differential Revision: https://reviews.llvm.org/D127946
2022-06-17 02:22:59 +00:00
Lang Hames 232bd331cb [ORC-RT] Make the ORC runtime C API public.
This is a first step towards allowing programs to pre-link against the ORC
runtime, which would allow us to move some code that is currently in the LLVM
OrcTarget library into the ORC runtime instead.

The C API header has limited utility as-is, but serves as a minimal first step
and provides clients with tools for interacting with wrapper functions.

Reviewed By: beanz

Differential Revision: https://reviews.llvm.org/D127324
2022-06-16 19:02:23 -07:00
Matt Arsenault 32bd0c1714 llvm-reduce: Try to fix dynamic libraries build 2022-06-16 21:48:04 -04:00
Maryam Moghadas 711a71d1ab PowerPC] Emit warning for incompatible vector types that are currently diagnosed with -fno-lax-vector-conversions
This patch is the last prerequisite to switch the default behaviour to -fno-lax-vector-conversions in the future.
The first path ;D124093; fixed the altivec implicit castings.

Reviewed By: amyk

Differential Revision: https://reviews.llvm.org/D126540
2022-06-16 20:28:34 -05:00
Lei Huang febe4f650b [PowerPC][NFC] Undefine __XL_COMPAT_ALTIVEC__ in builtin lit test
Add defines and undefines of the __XL_COMPAT_ALTIVEC__ to ensure
consistent results regardless of the default for this macro.
2022-06-16 20:16:52 -05:00
Jennifer Yu bb83f8e70b [OpenMP] Initial parsing and sema for 'parallel masked' construct
Differential Revision: https://reviews.llvm.org/D127454
2022-06-16 18:01:15 -07:00
LiaoChunyu 6181c19283 [AMDGPU][NFC] Remove isConstantAddr
fix isConstantAddr defined but not used

Reviewed By: rampitec

Differential Revision: https://reviews.llvm.org/D127959
2022-06-17 08:49:29 +08:00
LLVM GN Syncbot 6f1a7eb9e7 [gn build] Port eea11e7369 2022-06-17 00:40:13 +00:00
Matt Arsenault eea11e7369 llvm-reduce: Add reduction pass to simplify instructions 2022-06-16 20:39:27 -04:00
Matt Arsenault 6b8bd0f72d llvm-reduce: Support replacing FP values with 1.0 2022-06-16 20:13:17 -04:00
Pengxuan Zheng 2e0c46044a [Object][COFF] Improve section name parsing
Inspired by discussions on D127369, we probably can further improve LLVM's COFF
section name parsing. Hopefully, this makes the logic simpler and handles some
edge cases more elegantly.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D127902
2022-06-16 17:01:10 -07:00
Fangrui Song 0e182469ee [sanitizer] Delete empty sanitizer_openbsd.cpp after D89759 2022-06-16 16:38:01 -07:00
Paul Walker fcd058acc9 [SVE][CodeGen] Restructure SVE fixed length tests to use update_llc_test_checks.
Most tests have been updated to make use of vscale_range to reduce
the number of RUN lines.  For the remaining RUN lines the check
prefixes have been updated to ensure the original expectation of
the manual CHECK lines is maintained after update_llc_test_checks
is run.
2022-06-17 00:30:56 +01:00
Jonas Devlieghere af6ec9200b
[lldb] Cleanup Python API reference files after building the docs
The sphinx-automodapi extension requires that the generated RST files
live next to the index file. This means that we generate them in the
source directory rather than the build directory. This patch ensures
these files are removed again when sphinx finishes its build.

The proper solution to this problem would be to move everything in the
doc folder from the source directory to the build directory before
generating the docs.

I believe that old RST files being kept around is the reason that the
Python API references on the website isn't getting updated. This patch
is meant as a speculative fix and a way to confirm that.
2022-06-16 16:30:49 -07:00
Aart Bik 2a2886160d [mlir][sparse] improved testing and codegen for semi-ring operations
The semi-ring blocks were simply "inlined" by the sparse compiler but
without any filtering or patching. This revision improves the analysis
(rejecting blocks that use non-invariant computations from outside
their blocks, except for linalg.index) and also improves the codegen
by properly patching up index computations (previous version crashed).

With a regression test. Also updated the documentation now that the
example code is properly working.

Reviewed By: bixia

Differential Revision: https://reviews.llvm.org/D128000
2022-06-16 16:13:42 -07:00
LLVM GN Syncbot 21f557e13a [gn build] Port ff3989e6ae 2022-06-16 22:31:40 +00:00
LLVM GN Syncbot 8eefbd2a57 [gn build] Port 61fac2c370 2022-06-16 22:31:39 +00:00
David Blaikie 61fac2c370 Incomplete attempt to pull DWARFTypePrinter into its own file for reuse
from lldb
2022-06-16 22:28:28 +00:00
Philip Reames ea690e7019 [RISCV] Rename VTy param of RISCVTTIImpl::getArithmeticReductionCost [NFC]
Having it be consistent with getMinMaxReductionCost for ease of copy paste outweights the minor clarity of calling it VTy instead of Ty.
2022-06-16 15:26:09 -07:00
Konstantin Varlamov ff3989e6ae [libc++][ranges] Implement `ranges::sort`.
Differential Revision: https://reviews.llvm.org/D127557
2022-06-16 15:21:06 -07:00
Lei Huang dba2ff500d fix x86 sanitizer failure due to use of or 2022-06-16 17:20:31 -05:00
Jonas Devlieghere 663612dfd8
[lldb] Remove references to epydoc from the documentation
We no longer rely on epydoc but instead use a sphinx plugin to generate
the Python API reference.
2022-06-16 15:17:40 -07:00
Jonas Devlieghere 6ac608b3d8
[lldb] Add RotatingLogHandler
Add a log handler that maintains a circular buffer with a fixed size.

Differential revision: https://reviews.llvm.org/D127937
2022-06-16 15:17:40 -07:00
Craig Topper 9d7b01dc95 [RISCV] Implement RISCVTargetLowering::getTargetConstantFromLoad.
This allows computeKnownBits to see the constant being loaded.

This recovers the rv64zbp test case changes from D127520.

Reviewed By: reames

Differential Revision: https://reviews.llvm.org/D127679
2022-06-16 15:11:18 -07:00
Craig Topper 5afdceb82b [RISCV] Add RISCVISD opcode for PseudoLLA.
Rather than emitting a MachineSDNode from lowering. Let isel match it.

This is consistent with the RISCVISD::HI and ADD_LO nodes that were
also added. Having them both the same will make D127679 consistent.

Reviewed By: reames

Differential Revision: https://reviews.llvm.org/D127714
2022-06-16 15:11:03 -07:00
Mitch Phillips ee28837a1f [NFCI] Whitespace in SemaDeclAttr.cpp 2022-06-16 15:10:32 -07:00
Maryam Moghadas a9ddb7d54e [PowerPC] Fixing implicit castings in altivec for -fno-lax-vector-conversions
XL considers different vector types to be incompatible with each other.
For example assignment between variables of types vector float and vector
long long or even vector signed int and vector unsigned int are diagnosed.
clang, however does not diagnose such cases and does a simple bitcast between
the two types. This could easily result in program errors. This patch is to
fix the implicit casts in altivec.h so that there is no incompatible vector
type errors whit -fno-lax-vector-conversions, this is the prerequisite patch
to switch the default to -fno-lax-vector-conversions later.

Reviewed By: nemanjai, amyk

Differential Revision: https://reviews.llvm.org/D124093
2022-06-16 17:07:03 -05:00
Richard 6e566bc552 [clang-tidy] Organize check doc files into subdirectories (NFC)
- Rename doc files to subdirs by module
- Update release notes and check list to use subdirs
- Update add_new_check.py to handle doc subdirs

Differential Revision: https://reviews.llvm.org/D126495
2022-06-16 16:06:20 -06:00
Craig Topper 4191de262f [RISCV] Don't emit LUI/ADDI MachineSDNodes from getAddr
Instead add RISCVISD opcodes that will be selected to LUI/ADDI
during isel.

I'm looking into maybe moving doPeepholeLoadStoreADDI into isel.
Having the ADDI as a RISCVISD node will make it visible to isel.

Reviewed By: reames

Differential Revision: https://reviews.llvm.org/D127713
2022-06-16 14:56:07 -07:00
Craig Topper e6c7a3a54f [SelectionDAG] Don't apply MinRCSize constraint in InstrEmitter::AddRegisterOperand for IMPLICIT_DEF sources.
MinRCSize is 4 and prevents constrainRegClass from changing the
register class if the new class has size less than 4.

IMPLICIT_DEF gets a unique vreg for each use and will be removed
by the ProcessImplicitDef pass before register allocation. I don't
think there is any reason to prevent constraining the virtual register
to whatever register class the use needs.

The attached test case was previously creating a copy of IMPLICIT_DEF
because vrm8nov0 has 3 registers in it.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D128005
2022-06-16 14:55:14 -07:00
Mitch Phillips 011e0604eb Add DWARF string debug to clang release notes.
D12353 added inline strings to the DWARF info produced by clang. This
turns out to break some debugging software that assumes that a
DW_TAG_variable *must* come with a DW_AT_name. Add a release note to
broadcast this change.

Reviewed By: paulkirth

Differential Revision: https://reviews.llvm.org/D126224
2022-06-16 14:54:12 -07:00
Aart Bik 36c01876d7 [mlir][sparse] fix asan issue
The LinalgElementwiseOpFusion pass has become smarter, and converts
the simple conversion linalg operation into a sparse dialect convert
operation. However, since our current bufferization does not take the
new semantics into consideration, we leak memory of the allocation.
For now, this has been fixed by making the operation less trivial.

Reviewed By: bixia

Differential Revision: https://reviews.llvm.org/D128002
2022-06-16 14:49:02 -07:00
Mitch Phillips ed5a349b89 Make setSanitizerMetadata byval.
This fixes a UaF bug in llvm::GlobalObject::copyAttributesFrom, where a
sanitizer metadata object is captured by reference, and passed by
reference to llvm::GlobalValue::setSanitizerMetadata. The reference
comes from the same map that the new value is going to be inserted to,
and the map insertion triggers iterator invalidation - leading to a
use-after-free on the dangling reference.

This patch fixes that bug by making setSanitizerMetadata's argument
byval. This should also systematically prevent the problem from
happening in future, as it's a very easy pattern to have. This shouldn't
be any performance problem, the SanitizerMetadata struct is a bitfield
POD.
2022-06-16 14:47:27 -07:00
Tue Ly 72c1effb34 [libc] Add a status page for math functions.
Add a status page for math functions.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D127920
2022-06-16 17:41:46 -04:00
Philip Reames 2fa2cee6a8 [RISCV] Start merging demanded reasoning - starting with load/stores [nfc]
This change merges the logic for reasoning about demanded portions of the VTYPE register between the main dataflow algorithm and the backwards mutation post pass. In the process, we get to delete a bunch of now redundant code.

This should be entirely NFC. I included a slight hack (see TODO) to avoid changing behavior in the post pass while being able to use the generalized logic in the prepass. I will fix the TODO in a separate change once this lands.

Differential Revision: https://reviews.llvm.org/D127983
2022-06-16 14:34:53 -07:00
Philip Reames d764aa7fc6 [RISCV] Add cost model for scalable scatter and gather
The costing we use for fixed length vector gather and scatter is to simply count up the memory ops, and multiply by a fixed memory op cost. For scalable vectors, we don't actually know how many lanes are active. Instead, we have to end up making a worst case assumption on how many lanes could be active. In the generic +V case, this results in very high costs, but we can do better when we know an upper bound on the VLEN.

There's some obvious ways to improve this - e.g. using information about VL and mask bits from the instruction to reduce the upper bound - but this seems like a reasonable starting point.

The resulting costs do bias us pretty strongly away from generating scatter/gather for generic +V.  Without this, we'd be returning an invalid cost and thus definitely not vectorizing, so no major change in practical behavior expected.

Differential Revision: https://reviews.llvm.org/D127541
2022-06-16 14:22:31 -07:00
bixia1 bbb73ade43 [mlir][complex] Add Python bindings for complex ops.
Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D127916
2022-06-16 14:19:11 -07:00
Mitch Phillips 911841f717 Revert "[TableGen][DirectX] generate DXIL operation table with TableGen."
This reverts commit 46fcdf2364.

Reason: Broke the buildbots:
https://lab.llvm.org/buildbot/#/builders/77/builds/18671
2022-06-16 14:07:54 -07:00
Sterling Augustine df6087ee37 Move debug-only code inside LLVM_DEUG to prevent unused variable warnings. 2022-06-16 14:01:26 -07:00
Mitch Phillips 13e9c1d18e Reland "[ASan] Use debuginfo for symbolization."
This reverts commit 99796d06db.

Hint: Looking here because your manual invocation of something in
'check-asan' broke? You need a new symbolizer (after D123538).

An upcoming patch will remove the internal metadata for global
variables. With D123534 and D123538, clang now emits DWARF debug info
for constant strings (the only global variable type it was missing), and
llvm-symbolizer is now able to symbolize all global variable addresses
(where previously it wouldn't give you the file:line information).

Move ASan's runtime over from the internal metadata to DWARF.

Differential Revision: https://reviews.llvm.org/D127552
2022-06-16 13:58:55 -07:00
Xiang Li 46fcdf2364 [TableGen][DirectX] generate DXIL operation table with TableGen.
Add more feature to tableGen backend gen-dxil-operation.

It will generate getOpCodeProperty, getOpCodeClassName and getOpCodeName when build DirectX target.
Each of these functions has a table which generate based on DXIL operations.

These generated functions will replace the manually written functions which used for query DXIL operation information.

Reviewed By: bogner

Differential Revision: https://reviews.llvm.org/D125520
2022-06-16 13:39:10 -07:00
Amanieu d'Antras caa2a829cd [MergeFunctions] Preserve symbols used llvm.used/llvm.compiler.used
llvm.used and llvm.compiler.used are often used with inline assembly
that refers to a specific symbol so that the symbol is kept through to
the linker even though there are no references to it from LLVM IR.

This fixes the MergeFunctions pass to preserve references to these
symbols in llvm.used/llvm.compiler.used so they are not deleted from the
IR. This doesn't prevent these functions from being merged, but
guarantees that an alias or thunk with the expected symbol name is kept
in the IR.

Differential Revision: https://reviews.llvm.org/D127751
2022-06-16 21:36:39 +01:00
LLVM GN Syncbot decb600b02 [gn build] Port 6ff49af33d 2022-06-16 20:34:45 +00:00