Commit Graph

433054 Commits

Author SHA1 Message Date
wanglian fbc4c26e9a [SelectionDAG][NFC] Fix return type when used isConstantIntBuildVectorOrConstantInt
and isConstantFPBuildVectorOrConstantFP

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D131870
2022-08-16 10:07:24 +08:00
Kshitij Jain 29fe204b4e Re-apply "[JITLink] Introduce ELF/i386 backend " with correct authorship.
I (lhames) accidentally pushed 5f300397c6 on
Kshitij Jain's behalf without updating the patch author first (my apologies
Kshitij!).

Re-applying with correct authorship.

https://reviews.llvm.org/D131347
2022-08-15 18:44:43 -07:00
Lang Hames 73600b7c8a Revert "[JITLink] Introduce ELF/i386 backend support for JITLink."
This reverts commit 5f300397c6.

No functional issues, I just failed to correctly set authorship on the patch.
2022-08-15 18:44:43 -07:00
LLVM GN Syncbot f09f4b73fc [gn build] Port 5f300397c6 2022-08-16 01:39:36 +00:00
Lang Hames 5f300397c6 [JITLink] Introduce ELF/i386 backend support for JITLink.
This initial ELF/i386 JITLink backend enables JIT-linking of minimal ELF i386
object files. No relocations are supported yet.

Reviewed By: lhames

Differential Revision: https://reviews.llvm.org/D131347
2022-08-15 18:35:51 -07:00
Ben Shi f45d89d73d [Driver] Support linking to compiler-rt for target AVR
Reviewed By: aykevl

Differential Revision: https://reviews.llvm.org/D128133
2022-08-16 09:22:50 +08:00
David Blaikie 248591aabe flang: Fix flang build with -Wctad-maybe-unsupported
Shooting from the hip since I don't have a flang build locally, but
hopefully this works.
2022-08-16 01:08:17 +00:00
Jonas Devlieghere 11f45f36dc
[lldb] Fetching symbols in the background with dsymForUUID
On macOS, LLDB uses the DebugSymbols.framework to locate symbol rich
dSYM bundles. [1] The framework uses a variety of methods, one of them
calling into a binary or shell script to locate (and download) dSYMs.
Internally at Apple, that tool is called dsymForUUID and for simplicity
I'm just going to refer to it that way here too, even though it can be
be an arbitrary executable.

The most common use case for dsymForUUID is to fetch symbols from the
network. This can take a long time, and because the calls to the
DebugSymbols.framework are blocking, it takes a while to launch the
process. This is expected and therefore many people don't use this
functionality, but instead use add-dsym when they want symbols for a
given frame, backtrace or module. This is a little faster because you're
only fetching symbols for the module you care about, but it's still a
slow, blocking operation.

This patch introduces a hybrid approach between the two. When
symbols.enable-background-lookup is enabled, lldb will do the equivalent
of add-dsym in the background for every module that shows up in the
backtrace but doesn't have symbols for. From the user's perspective
there is no slowdown, because the process launches immediately, with
whatever symbols are available. Meanwhile, more symbol information is
added over time as the background fetching completes.

[1] https://lldb.llvm.org/use/symbols.html

rdar://76241471

Differential revision: https://reviews.llvm.org/D131328
2022-08-15 17:57:24 -07:00
Jonas Devlieghere 8d36a82d0a
[lldb] Flush the global thread pool in Debugger::Terminate
Use the Initialize/Terminate pattern for the global thread pool to make
sure it gets flushed during teardown.

Differential revision: https://reviews.llvm.org/D131407
2022-08-15 17:57:23 -07:00
Rahman Lavaee df2213f345 [EHStreamer] Omit @LPStart when function has no landing pads
When no landing pads exist for a function, `@LPStart` is undefined and must be omitted.

EH table is generally not emitted for functions without landing pads, except when the personality function is uknown (`!isNoOpWithoutInvoke(classifyEHPersonality(Per))`). In that case, we must omit `@LPStart` even when machine function splitting is enabled.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D131626
2022-08-15 17:09:46 -07:00
Ben Shi 65c022a75f Revert "[Driver] Support linking to compiler-rt for target AVR"
This reverts commit 44a647d21d.
2022-08-16 07:55:41 +08:00
Nirvedh Meshram b8f62dc22a [MLIR][SPIRV] Add intel joint matrix ops
Reviewed By: antiagainst

Differential Revision: https://reviews.llvm.org/D131586
2022-08-15 23:49:45 +00:00
David Blaikie c63f2581f4 Enable -Wctad-maybe-unsupported in LLVM build
Warns on potentially unintended use of C++17 Class Template Argument
Deduction. Use of this feature with types that aren't intended to
support it may may future refactorings of those types more difficult -
so this warning fires whenever the feature is used with a type that may
not have intended to be used with CTAD (the warning uses the existence
of at least one explicit deduction guide to indicate that a type
intentionally supports CTAD - absent that, it's assumed to not be
intended to support CTAD & produces a warning).

This is disabled in libcxx because lots of the standard library is
assumed to provide ctad-usable APIs and the false positive suppression
in the diagnostic is based on system header classification which doesn't
apply in the libcxx build itself.

Differential Revision: https://reviews.llvm.org/D131727
2022-08-15 23:28:51 +00:00
Arthur Eubanks 5a1f864e89 [test][llvm-reduce] Fix simplify-cfg.ll
D131920 broke some Windows bots with "x6" in the buildbot paths.
https://lab.llvm.org/buildbot#builders/123/builds/12276
2022-08-15 16:21:39 -07:00
Adrian Vogelsgesang 877620bd96 [libc++] Implement `operator<=>` for `error_{code,condition}`
Implements part of P1614R2 "The Mothership has Landed"

Differential Revision: https://reviews.llvm.org/D131371
2022-08-15 16:05:53 -07:00
Adrian Vogelsgesang 0e876eda26 [libc++] Implement `operator<=>` for `error_category`
Implements part of P1614R2 "The Mothership has Landed"

Differential Revision: https://reviews.llvm.org/D131363
2022-08-15 16:05:08 -07:00
Aiden Grossman 24cdf97d63 [mlgo] Add ability to create feature-gated development features in regalloc advisor
Currently there is no way to add in development features to the ML
regalloc evict advisor which is useful to have when working on feature
engineering/improving the current model. This patch adds in the ability
to add in development features to the ML regalloc evict advisor which
are gated by a runtime flag and not added in at all if not compiled in
LLVM development mode. This sets the stage for future work where we are
planning on upstreaming some of the newer features that we are currently
experimenting with.

Reviewed By: mtrofin

Differential Revision: https://reviews.llvm.org/D131209
2022-08-15 16:01:37 -07:00
LLVM GN Syncbot a74b028f58 [gn build] Port 2f1fa6242a 2022-08-15 22:49:18 +00:00
Nico Weber 330abe8d43 fix comment typo to cycle bots 2022-08-15 18:49:02 -04:00
Michael Jones 438d1f18a5 [libc] add guard for file pieces of printf
In the printf_core CMake, the file pieces are defined as object
libraries that depend on the File data structure. If these are added
unconditionally they'll try to evaluate that dependancy even when there
is no File available. This patch adds a guard to prevent that error.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D131921
2022-08-15 15:43:24 -07:00
Thomas Raoux 444b4fda17 [mlir][tosa] Fix clamp float lowering
min and max were mixed up after switching to using float min/max

Differential Revision: https://reviews.llvm.org/D131923
2022-08-15 22:25:14 +00:00
Nico Weber 73f0ca806e [gn build] Try to unbreak mac after f56e486fdc 2022-08-15 18:22:08 -04:00
Philip Reames 33e7a0a33b [RISCV][LV] Add test coverage for upcoming dependence distance handling change 2022-08-15 15:20:36 -07:00
Nico Weber f56e486fdc [gn build] Make ubsan_init_standalone_preinit.cpp syncable
...after https://reviews.llvm.org/D131916
2022-08-15 18:17:06 -04:00
Vitaly Buka e0e960923f [AArch64] Fix signed integer overflow in CSINC case
Followup to D131815, which overlflows on different
values.
2022-08-15 15:04:20 -07:00
Martin Sebor 65967708d2 [InstCombine] Adjust snprintf folding of constant strings (PR #56598)
Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D130494
2022-08-15 15:59:21 -06:00
Lei Zhang 6f4f9e316c [mlir][spirv] Add a test covering load/store with memory operands
Reviewed By: kuhar

Differential Revision: https://reviews.llvm.org/D131904
2022-08-15 17:48:33 -04:00
John Regehr 2f1fa6242a this pass calls simplifyCFG on individual basic blocks; we want this
so that we can reduce away incidental parts of the CFG in cases where
the full simplifyCFG pass makes the test case uninteresting

Differential Revision: https://reviews.llvm.org/D131920
2022-08-15 15:45:20 -06:00
Arthur Eubanks 633f5663c3 [LegacyPM] Remove ThinLTO bitcode writer legacy pass
Using the legacy PM for the optimization pipeline is deprecated and in
the process of being removed. This is a small step in that direction.

For an example of migrating to the new PM:
853b57fe80
2022-08-15 14:21:16 -07:00
Arthur Eubanks 853b57fe80 [NFC][llvm-reduce] Use new pass manager for printing ThinLTO bitcode 2022-08-15 14:14:08 -07:00
Rafael Auler e99490512e [test-release] Add option to build BOLT
Add a flag to enable BOLT. Should be used in x86-64 and
AArch64 linux builds only, since BOLT doesn't really support other
targets and is mostly tested on these two systems as hosts.

Reviewed By: tstellar

Differential Revision: https://reviews.llvm.org/D131703
2022-08-15 14:03:30 -07:00
Kai Sasaki 5605f17a4d [mlir][complex] Mark all supported operation illegal explicitly for complex to libm
We can mark all supported operations illegal explicitly to ensure no convertible ops remain.

Differential Revision: https://reviews.llvm.org/D131877
2022-08-15 17:02:16 -04:00
Arthur Eubanks 6d17254df4 [gn build] Add ubsan libraries
clang -fsanitize=undefined works with this.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D131916
2022-08-15 13:55:36 -07:00
Philip Reames e792a353b5 [slp] adjust debug output to include final computed cost 2022-08-15 13:51:39 -07:00
Vitaly Buka ace3ce8ad7 [test][libc++][hwasan] Handle hwaddress_sanitizer 2022-08-15 13:50:54 -07:00
Nico Weber 8403cd5b00 chained-fixups.yaml: force little-endian output
`__LINK_EDIT` contents are little-endian, so the whole file must be.
Might fix the test on big-endian systems.
2022-08-15 16:47:47 -04:00
Michael Jones e0e7fa36d3 [libc] enable s(n)printf without fullbuild
To use the FILE data structure, LLVM-libc must be in fullbuild mode
since it expects its own implementation. This means that (f)printf can't
be used without fullbuild, but s(n)printf only uses strings. This patch
adjusts the CMake to allow for this.

Reviewed By: sivachandra, lntue

Differential Revision: https://reviews.llvm.org/D131913
2022-08-15 13:45:34 -07:00
Alexey Bataev aed5e3bea1 [SLP][NFC]Add a test for delaying of insertelements vectorization, NFC. 2022-08-15 13:26:51 -07:00
Sam Estep 2efc8f8d65 [clang][dataflow] Add an option for context-sensitive depth
This patch adds a `Depth` field (default value 2) to `ContextSensitiveOptions`, allowing context-sensitive analysis of functions that call other functions. This also requires replacing the `DeclCtx` field on `Environment` with a `CallString` field that contains a vector of decl contexts, to ensure that the analysis doesn't try to analyze recursive or mutually recursive calls (which would result in a crash, due to the way we handle `StorageLocation`s).

Reviewed By: xazax.hun

Differential Revision: https://reviews.llvm.org/D131809
2022-08-15 19:58:40 +00:00
Alan Zhao ff8aadf58d [clang][diagnostics] Don't warn about unreachable code in constexpr if
The point of a constexpr if statement is to determine which branch to
take at compile time, so warning on unreachable code is meaningless in
these situations.

Fixes #57123.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D131818
2022-08-15 15:24:39 -04:00
Jameson Nash 3a8d7fe201 [SimplifyCFG] teach simplifycfg not to introduce ptrtoint for NI pointers
SimplifyCFG expects to be able to cast both sides to an int, if either side can be case to an int, but this is not desirable or legal, in general, per D104547.

Spotted in https://github.com/JuliaLang/julia/issues/45702

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D128670
2022-08-15 15:11:48 -04:00
Matthias Springer 31fbdab376 [mlir][transforms] Add topological sort analysis
This change add a helper function for computing a topological sorting of a list of ops. E.g. this can be useful in transforms where a subset of ops should be cloned without dominance errors.

The analysis reuses the existing implementation in TopologicalSortUtils.cpp.

Differential Revision: https://reviews.llvm.org/D131669
2022-08-15 21:09:18 +02:00
Diego Caballero e86119b4ff [mlir] Minor fixes after removing types from attributes
D130092 removed types from attributes. This patch fixes a minor
issues what was exposed when integrating that change in IREE. An
explicit cast is needed so that the template type of `makeArrayRef`
is automatically deduced.

Co-authored-by: Lei Zhang <antiagainst@google.com>

Reviewed By: Mogball

Differential Revision: https://reviews.llvm.org/D131604
2022-08-15 19:07:25 +00:00
Stella Laurenzo f55a6fde1d [mlir] Make sure that aggregate shared libraries define all of their symbols.
We were hitting issues on Linux where this was only being caught at runtime, and different linkers (BFD vs LLD) are differently strict in such situations. Such libraries will also fail to build properly on Windows (but test coverage of that is limited, so it is better to enforce globally).

Differential Revision: https://reviews.llvm.org/D131911
2022-08-15 12:02:24 -07:00
Alexey Bataev 2819126d0c [SLP][NFC]Replace multiple isa calls with single one where possible,
NFC.
2022-08-15 11:56:58 -07:00
Slava Zakharin 2dde4ba639 [mlir][math] Added algebraic simplification for IPowI operation.
Differential Revision: https://reviews.llvm.org/D130390
2022-08-15 11:55:05 -07:00
Jeff Niu 133624acf9 [mlir][python] Fix build on windows
Reviewed By: stella.stamenova, ashay-github

Differential Revision: https://reviews.llvm.org/D131906
2022-08-15 14:51:04 -04:00
Kevin Athey c22841049e [MSAN] clean up style from D131728
Depends on D131728

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D131903
2022-08-15 11:46:07 -07:00
Slava Zakharin cd3a234fa9 [mlir][math] Added constant folding for IPowI operation.
Differential Revision: https://reviews.llvm.org/D130389
2022-08-15 11:31:14 -07:00
Diego Caballero 43beaeed38 Revert "antiagainst's fix"
This reverts commit 42d48d0966.
2022-08-15 18:27:35 +00:00