Commit Graph

454776 Commits

Author SHA1 Message Date
Stephen Tozer
73a01952b5 [Dexter] Add a simple logging class to Dexter
Adds a basic logging class to Dexter that uses the existing PrettyOutput
class for printing and supports 3 levels of verbosity (note, warning,
error). Intended to consolidate the logging logic for Dexter into one
place, removing the need for conditional log statements and making it
easier for us later if we wish to use a more complete logging class.

Reviewed By: Orlando

Differential Revision: https://reviews.llvm.org/D144983
2023-03-15 19:25:37 +00:00
Zequan Wu
bc14c40dc1 [gn build] Manually port d505d20 2023-03-15 15:04:20 -04:00
Wolfgang Pieb
634430d585 [MSVC][dllexport/dllimport] Propagate a dllexport/dllimport attribute to template baseclass
For the Playstation platform, mimick MSVC in propagating dllexport/dllimport attributes
to an instantiated template base class.

Reviewed By: hans

Differential Revision: https://reviews.llvm.org/D145970
2023-03-15 11:47:54 -07:00
Arthur Eubanks
e94b59ee75 [Debugify/Strip] Fix returned PreservedAnalyses 2023-03-15 11:45:25 -07:00
Arthur Eubanks
6a3fdcdd38 [WPD] Fix PreservedAnalyses value after runForTesting() 2023-03-15 11:43:24 -07:00
Alexandre Ganea
7adaefbaa8 [wasm] Silence 'not all control paths return a value' warning when
building with MSVC on Windows
2023-03-15 14:20:18 -04:00
Alexandre Ganea
ff7dfe4c40 [DebugInfo][MSF] Silence 'not all control paths return a value' warning
when building with MSVC on Windows
2023-03-15 14:20:18 -04:00
Simon Pilgrim
5be5510098 [X86] lzcnt-cmp.ll - enable CMOV on 32-bit LZCNT tests
There are no 32-bit targets that have LZCNT but not CMOV, and this allows us to test the straight line i64 pattern - otherwise we're doing the same branchy code as the 32-bit BSR test
2023-03-15 18:14:53 +00:00
Alexandros Lamprineas
9627bcdeac [FuncSpec][NFC] Command line option renaming.
Standardize all options with 'funcspec' prefix and shorter abreviations.

Differential Revision: https://reviews.llvm.org/D145378
2023-03-15 18:03:44 +00:00
Alex Bradbury
a7e13d6f1b [clang][RISCV][test] Add test coverage for _Float16 ABI lowering
By the psABI, any test case where a FPR would be used for a float, it
should also be used if you replaced that float with a _Float16. This
doesn't hold true in current Clang for the special cases in the FP
calling convention involving structs. This patch doesn't attempt to fix
that, simply to add coverage. D145074 contains the fix.

Differential Revision: https://reviews.llvm.org/D145070
2023-03-15 18:00:39 +00:00
Lei Zhang
59e4fbfcd0 [mlir][memref] Fold subview into GPU subgroup MMA load/store ops
This commits adds support for folding subview into GPU subgroup
MMA load/store ops.

Reviewed By: ThomasRaoux

Differential Revision: https://reviews.llvm.org/D146150
2023-03-15 17:49:32 +00:00
Simon Pilgrim
28a0d0e85a [DAG] Don't fold zext(logicalshift(zext(x),c)) -> logicalshift(zext(x),c) if the outer zext is free
Avoid widening the shift to a bigger type if the zext would be free anyway

Pulled out of D146121
2023-03-15 17:45:12 +00:00
Alexey Lapshin
1358df4dc4 [DWARFLinkerParallel] add AddressesMap interface.
This patch is extracted from D96035. It adds AddressesMap map interface
to the DWARFLinkerParallel library. This interface mostly match with the
paired interface from the DWARFLinker library, except that it does
not depend on DIEInfo class.

Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D140788
2023-03-15 18:43:45 +01:00
Yuanfang Chen
e7a2da5298 [Inliner] Assign dummy debug location to the memcpy for byval argument
A similar fix to D133095.

Fixes https://github.com/llvm/llvm-project/issues/58770.

Reviewed By: aprantl

Differential Revision: https://reviews.llvm.org/D145607
2023-03-15 10:30:28 -07:00
Mark de Wever
471ab69f5b [libc++] Fixes accidental CI breakage. 2023-03-15 18:30:02 +01:00
Philip Reames
e3dac9e93f [MSAN] Replace another open-coded convertToBool instance [nfc]
Note that getCleanShadow always returns Constant::getNullValue so the prior code is equivalent to convertToBool.
2023-03-15 10:24:49 -07:00
Philip Reames
75e22e8699 [MSAN] Inline getShadowTyNoVec into convertShadowToScalar [nfc]
This is an implementation detail of the flattening scheme, so hide it in the implementation thereof.  This does require one caller to go through the appropriate utility, but doing that makes the code cleaner anyways.
2023-03-15 10:24:49 -07:00
Simon Pilgrim
2281286eb7 [X86] Add more thorough testing of the zext(logicalshift(zext(x),c)) -> logicalshift(zext(x),c) fold
Add tests for more extension combos, 64-bit targets and some illegal types
2023-03-15 17:20:42 +00:00
Mark de Wever
fea30f215c [NFC][libc++] Uses newer libc++ style. 2023-03-15 18:16:13 +01:00
ibricchi
65f7ebe72e [InlineOrder] Plugin Inline Order
Adds the ability to load a plugin to control the inline order.
This allows developing and distributing inlining heuristics
outside of tree. And together with the inline advisor plugins
allows for fine grained control of the inliner.

The PluginInlineOrderAnalysis class serves as the entry point
for dynamic advisors. Plugins must register instances of this
class to provide their own InlineOrder.

Reviewed By: kazu

Differential Revision: https://reviews.llvm.org/D140637
2023-03-15 13:15:14 -04:00
Jake Egan
1628a5695e Revert "[InlineOrder] Plugin Inline Order"
This commit is causing a CMake error on AIX. Will recommit with
a fix.

This reverts commit e46d8a7315.
2023-03-15 13:12:04 -04:00
Stephen Tozer
2e7f339389 [Dexter] Add target_run_args option
Adds an option to Dexter that passes command line arguments to the
debugged process, following (and in addition to) any arguments given by
the DexCommandLine command.

Differential Revision: https://reviews.llvm.org/D144979
2023-03-15 17:11:30 +00:00
Paul Kirth
ade336d6e1 [codegen][riscv] Emit CFI directives when using shadow call stack
Currently we don't emit any CFI instructions for the SCS register when
enabling SCS on RISCV. This causes problems when unwinding, since the
SCS register isn't being handled properly.

Reviewed By: mcgrathr

Differential Revision: https://reviews.llvm.org/D145205
2023-03-15 17:10:23 +00:00
Alex Bradbury
8964d7a1d7 [clang][RISCV][NFC] Combine RV32/RV64 ABI tests into single files
After D134050, it makes sense to combine the RV64 ABI tests into a
single file in order to make it more maintainable (i.e. not having to
split tests based on the combinations of ABIs they're expected to
impact). This patch deletes duplicated tests but doesn't do much further
reorganisation beyond that.

I imagine the logical ordering of tests in the file and comments could
be further improved in the future. My personal feeling is that it's
probably not worth investing the time to try to get this "perfect", and
to instead settle for this incremental step forward. But if there's
reviewer interest in attempting to further iterate, I'm happy to do so.

Differential Revision: https://reviews.llvm.org/D140400
2023-03-15 17:07:02 +00:00
Mark de Wever
b2093ca804 [NFC][libc++] Fixes a typo. 2023-03-15 18:03:43 +01:00
Mark de Wever
f7efcaca77 [libc++][charconv] Granularizes the header.
Having the header granularized makes it possible to remove the
dependency on this header in <format>. This <format> header gets
included in more headers due to more usage of std::formatter in the
library. This should reduce the number of transitive includes.

Note formatting the new headers will be done in a followup patch.

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D145590
2023-03-15 18:01:53 +01:00
Mark de Wever
c416234c38 [libc++] Disables transitive includes in library.
I noticed this wile investigating https://llvm.org/PR61314

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D145798
2023-03-15 18:01:03 +01:00
Valentin Clement
94d9b7ce60
[flang] Detect fir.class nested in fir.box as invalid element type
Catch invalid element type in fir.box in the verifier so
it does not propagate later in lowering.

Reviewed By: PeteSteinfeld

Differential Revision: https://reviews.llvm.org/D146078
2023-03-15 17:35:57 +01:00
Philip Reames
4e3608bf29 [RISCV][TTI] Fix indentation and remove tabs [nfc] 2023-03-15 09:29:03 -07:00
Valentin Clement
426c495e88
[flang] Avoid to wrap box/class type with box/class
Adapat the fix made in D146079 to just avoid the type
to be wrapped with an extra fir.box or fir.class. The potential
load is delegated to the code that is after.

Reviewed By: PeteSteinfeld

Differential Revision: https://reviews.llvm.org/D146120
2023-03-15 17:28:16 +01:00
Arthur Eubanks
6d7da41b80 [Debugify] Invalidate function analyses
Since debugify inserts instructions.
2023-03-15 09:19:05 -07:00
Tres Popp
d58f5863c4 [mlir][Affine] Use stable sorting to prevent non-determinism
Differential Revision: https://reviews.llvm.org/D146151
2023-03-15 17:18:33 +01:00
Jakub Kuderski
0eaacc25bb [ADT] Make llvm::is_contained call member contains or find when available
This makes it so that calling `llvm::is_contained` no longer degrades
performance over member contains, even though both have almost identical
names. This would be the case in most set/map classes that can check for
an element being present in O(1) or O(log n) time vs. linear scan with
`std::find`. For C++17 maps/sets without `.contains`, use `.find` when available,
falling back to a linear scan with `std::find`.

I also considered detecting member contains and triggering a
`static_assert` instead, but decided against it because it's just as easy
to do the right thing and call `.contains`. This would also make some code fail
only when compiled in the C++20 mode when more container types come with
`.contains` member functions.

This was actually already the case with `CommandLine.h` calling `is_contained`
on `SmallPtrSet` and in a recent BOLT patch.

Reviewed By: kazu, dblaikie, MaskRay

Differential Revision: https://reviews.llvm.org/D146061
2023-03-15 12:07:56 -04:00
Frederic Cambus
d8df8710e1 [compiler-rt] Point UndefinedBehaviorSanitizer link to its own page. 2023-03-15 17:05:57 +01:00
Nikita Popov
9043cb752d [InstCombine] Add additional test for icmp eq/ne with bool load (NFC) 2023-03-15 17:03:27 +01:00
Nikita Popov
77c90ebeb7 [ASAN] Use AI.getAllocationSize() helper (NFC) 2023-03-15 16:51:52 +01:00
Kazu Hirata
8bdf387858 Use *{Map,Set}::contains (NFC)
Differential Revision: https://reviews.llvm.org/D146104
2023-03-15 08:46:32 -07:00
Alex Bradbury
9f40e86dcc [clang][RISCV][NFC][test] Move riscv-abi.cpp and riscv{32,64}-*abi.c tests to use update_cc_test_checks.py
This patch implements an initial step towards refactoring our ABI tests
(moving them to update_cc_test_checks.py). Future patches combine them.

Differential Revision: https://reviews.llvm.org/D134050
2023-03-15 15:43:50 +00:00
Nikita Popov
5cb8381aea [InstCombine] Regenerate test checks (NFC) 2023-03-15 16:42:18 +01:00
Arthur Eubanks
22dce16ea7 [StandardInstrumentations] Only turn on -verify-cfg-preserved by default in expensive checks builds
https://llvm-compile-time-tracker.com/compare.php?from=3fd42f50d8aadb4d0c348ac17cd2115c1b0564a4&to=50c37f6fc62a1e7bb4f0e307c89f760d42dbe4e9&stat=instructions:u
shows that this is fairly expensive, 5-10% increase in compile time, and I'd like to add more similar checks under the same flag.

This matches the legacy pass manager.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D146068
2023-03-15 08:38:26 -07:00
Arthur Eubanks
a312118a03 [gn build] Manually port fe7b38 2023-03-15 08:36:28 -07:00
Arthur Eubanks
bfc6590e66 [PassManager] Run PassInstrumentation after analysis invalidation
This allows instrumentation to inspect cached analyses to verify them.

The CGSCC PassInstrumentation previously ran `runAfterPass()` on the original SCC, but really it should be running on UpdatedC when relevant since that's the relevant SCC after the pass.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D146096
2023-03-15 08:36:14 -07:00
Valentin Clement
942bc18d20
[flang] Rebox the polymorphic argument in merge intrinsic
When fsource or tsource is not polymorphic, the result is not
polymorphic. Rebox the polymoprhic arguement so the dynamic
type of the result is correct.

Reviewed By: PeteSteinfeld

Differential Revision: https://reviews.llvm.org/D146133
2023-03-15 16:32:29 +01:00
Alexey Lapshin
ede827f583 [DWARFLinker][DWARFv5] add support for DW_FORM_implicit_const form.
This patch adds handling of DW_FORM_implicit_const form.

Differential Revision: https://reviews.llvm.org/D146047
2023-03-15 16:25:44 +01:00
Konstantina Mitropoulou
6bc5aa592a [AMDGPU] Update mul.ll with auto-generated checks
Reviewed By: foad

Differential Revision: https://reviews.llvm.org/D145990
2023-03-15 08:16:28 -07:00
Simon Pilgrim
4ead58914c [X86] add-and-not.ll - add 32-bit test coverage 2023-03-15 15:13:02 +00:00
Philip Reames
de71056a7d [ASAN] Initial support memory checks on scalable vector typed allocas
This patch adjusts the memory instrumentation to account for scalable vector types in allocas. Note that we don't allow scalable vector globals, so we don't need to update that codepath.

A couple points.

First, this simply disables the optimization for scalable allocas. We can revisit this in the future, but it requires a bit of plumbing to get scalable object sizes through the visitor to be useful.

Second, I am simply disabling stack poisoning for scalable vector allocas. This is mostly for staging the change as I can't write a working test for memory instrumentation without doing so. I don't think it's unreasonable to do on it's own basis as without the bailout, we crash the compiler.

Differential Revision: https://reviews.llvm.org/D145259
2023-03-15 07:59:42 -07:00
Jakub Kuderski
8c258fda1f [ADT][mlir][NFCI] Do not use non-const lvalue-refs with enumerate
Replace references to enumerate results with either result_pairs
(reference wrapper type) or structured bindings. I did not use
structured bindings everywhere as it wasn't clear to me it would
improve readability.

This is in preparation to the switch to zip semantics which won't
support non-const lvalue reference to elements:
https://reviews.llvm.org/D144503.

I chose to use values instead of const lvalue-refs because MLIR is
biased towards avoiding `const` local variables. This won't degrade
performance because currently `result_pair` is cheap to copy (size_t
+ iterator), and in the future, the enumerator iterator dereference
will return temporaries anyway.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D146006
2023-03-15 10:43:56 -04:00
Hristo Hristov
bc47a195cc [libc++][spaceship] Implement operator<=> for map and multimap
Implements parts of P1614R2: `operator<=>` for `map` and `multimap`

Reviewed By: #libc, philnik

Spies: philnik, libcxx-commits, yaxunl

Differential Revision: https://reviews.llvm.org/D145976
2023-03-15 15:24:43 +01:00
pvanhout
723a53caaf [AMDGPU] Avoid constant bus limitation on V_BFE GISel pattern
For D141247 - if that pattern was used by GISel it could cause constant bus limitation failures.
Just use inline immediates instead of S_MOV to avoid the issue.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D146131
2023-03-15 15:01:33 +01:00