Commit Graph

390327 Commits

Author SHA1 Message Date
Nikita Popov 1ffa6499ea [TargetLowering] Use IRBuilderBase instead of IRBuilder<> (NFC)
Don't require a specific kind of IRBuilder for TargetLowering hooks.
This allows us to drop the IRBuilder.h include from TargetLowering.h.

Differential Revision: https://reviews.llvm.org/D103759
2021-06-06 16:29:50 +02:00
Nikita Popov 85dfb377dd [LexicalScopesTest] Add missing IRBuilder.h include (NFC)
This currently depends on a transitive include via TargetLowering.h.
2021-06-06 16:29:50 +02:00
Simon Pilgrim 0f938a6ed8 X86Operand.h - fix uninitialized variable warnings in constructor. NFCI. 2021-06-06 15:25:03 +01:00
Simon Pilgrim 76a1be05fa AssumeBundleQueries.cpp - don't dereference a dyn_cast<> result. NFCI.
Use cast<> instead which will assert that the cast is correct and not just return null - the match() should have already failed if the cast isn't valid anyhow.

Fixes static analysis warning.
2021-06-06 15:25:03 +01:00
Michael Kruse d466ca087a [Clang][OpenMP] Add static version of getSingleClause<ClauseT>. NFC.
The current method getSingleClause requires an instance of OMPExecutableDirective to be called. Introduce a static version taking a list of clauses as argument instead that can be used during parsing/Sema before any OMPExecutableDirective has been created.

This is the same approach as taken for getClausesOfKind for getting more more than a single clause of a type which also has a method and static version. NFC patch extracted out of D99459 by request.

Reviewed By: ABataev

Differential Revision: https://reviews.llvm.org/D103665
2021-06-06 09:17:42 -05:00
Nikita Popov 506875c879 [TargetLowering] Move methods out of line (NFC)
Move methods using IRBuilder out of line, so we can drop the
dependency on the header.
2021-06-06 16:02:10 +02:00
Nikita Popov 9914200393 [CodeGen] Add missing includes (NFC)
These currently rely on the IRBuilder.h include in TargetLowering.h.
Make them explicit.
2021-06-06 15:48:27 +02:00
Simon Pilgrim 9ced408fe9 SimplifyCFG.cpp - remove dead early-return code added at rGcc63203908da. NFCI.
We've already checked that ScanIdx == 0 a few lines above.
2021-06-06 14:15:11 +01:00
Simon Pilgrim 5fc8cdcb03 BreadthFirstIterator.h - fix uninitialized variable warning in default constructor. NFCI. 2021-06-06 14:13:08 +01:00
Simon Pilgrim 937c4cffd0 Fix implicit fall through compiler warning. NFCI. 2021-06-06 13:45:11 +01:00
Simon Pilgrim 6e90192fdf PatternMatch.h - wrap WrapFlags tests inside brackets to stop static analysis warning about & vs && usage. NFCI. 2021-06-06 13:38:39 +01:00
Simon Pilgrim ab2d295552 BPFISelDAGToDAG.cpp - don't dereference a dyn_cast<> result. NFCI.
Use cast<> instead which will assert that the cast is correct and not just return null.

Fixes static analysis warnings.
2021-06-06 13:24:29 +01:00
Simon Pilgrim 139a36454f SmallVector.h - remove unused MathExtras.h header. NFCI. 2021-06-06 12:05:39 +01:00
Simon Pilgrim c18df1e156 Fix uninitialized variable warnings. NFCI. 2021-06-06 11:09:55 +01:00
Simon Pilgrim c2ab3d2c85 LibcBenchmark.h - add missing implicit cmath header dependency. NFCI.
Noticed while investigating if we can remove an unnecessary MathExtras.h include from SmallVector.h
2021-06-06 10:39:31 +01:00
Simon Pilgrim 72390f0c28 DirectoryWatcher-linux.cpp - add missing implicit MathExtras.h header dependency. NFCI. 2021-06-06 09:40:20 +01:00
Simon Pilgrim b47a7bb703 Revert rG0b18c4c0ec03f0321ee83b9976da5777d0e4f53f "SmallVector.h - remove unused MathExtras.h header (REAPPLIED). NFCI."
Buildbots still seem to find implicit header dependencies that I can't locally....
2021-06-06 09:39:19 +01:00
Simon Pilgrim 0b18c4c0ec SmallVector.h - remove unused MathExtras.h header (REAPPLIED). NFCI.
Try again to remove this header - I think I've found the implicit dependencies (mainly for <cmath>) on linux builds now.
2021-06-06 09:30:15 +01:00
Liqiang Tao 48252d7570 Revert "[llvm] Add interface to order inlining" 2021-06-06 14:45:03 +08:00
Liqiang Tao 478dc47292 [llvm] Add interface to order inlining
This patch abstract Calls in Inliner:run() to InlineOrder.
With this patch, it's possible to customize the inlining order, i.e. use queue or priority queue.

Reviewed By: kazu

Differential Revision: https://reviews.llvm.org/D103315
2021-06-06 12:03:02 +08:00
Simon Pilgrim 551a697c5c xray-color-helper.cpp - add missing implicit cmath header dependency. NFCI.
Noticed while investigating if we can remove an unnecessary MathExtras.h include from SmallVector.h (necessary for gcc builds but not MSVC)
2021-06-05 21:33:24 +01:00
Simon Pilgrim 6ff62d7e17 xray-color-helper.h - sort includes. NFCI. 2021-06-05 21:33:23 +01:00
Simon Pilgrim e8423dbf35 BranchProbability.cpp - add missing implicit cmath header dependency. NFCI.
Noticed while investigating if we can remove an unnecessary MathExtras.h include from SmallVector.h (necessary for gcc builds but not MSVC)
2021-06-05 21:14:43 +01:00
Simon Pilgrim e3ae4ce66e Revert rG7b839b3542983a313a9bf9f8d8039ceeea35c4d7 - "SmallVector.h - remove unused MathExtras.h header. NFCI."
Breaks on linux buildbots as I seem to have missed some implicit header dependencies....
2021-06-05 20:59:46 +01:00
Alexander Shaposhnikov 5e49ee8794 [lld][MachO] Add support for $ld$install_name symbols
This diff adds support for $ld$install_name symbols.

Test plan: make check-lld-macho

Differential revision: https://reviews.llvm.org/D103746
2021-06-05 12:58:59 -07:00
Simon Pilgrim 7b839b3542 SmallVector.h - remove unused MathExtras.h header. NFCI. 2021-06-05 20:19:58 +01:00
David Green 12f53e5392 [AArch64] Remove AArch64ISD::NEG
This NEG node is just a vector negation, easily represented as a SUB
zero. Removing it from the one place it is generated is essentially an
NFC, but can allow some extra folding. The updated tests are now loading
different constant literals, which have already been negated.

Differential Revision: https://reviews.llvm.org/D103703
2021-06-05 19:54:42 +01:00
Simon Pilgrim be51737f59 Fix "not all control paths return a value" MSVC warning. NFCI. 2021-06-05 19:42:00 +01:00
Simon Pilgrim fe6c45dd27 BitstreamWriter.h - add missing implicit MathExtras.h header dependency. NFCI.
Noticed while investigating if we can remove an unnecessary MathExtras.h include from SmallVector.h
2021-06-05 19:20:14 +01:00
Simon Pilgrim 128f5d16ef ELFTypes.h - add missing implicit MathExtras.h header dependency. NFCI.
Noticed while investigating if we can remove an unnecessary MathExtras.h include from SmallVector.h
2021-06-05 19:11:40 +01:00
Simon Pilgrim d118fa2914 [MCA] Support.h - add missing implicit MathExtras.h header dependency. NFCI.
Noticed while investigating if we can remove an unnecessary MathExtras.h include from SmallVector.h
2021-06-05 19:10:49 +01:00
Simon Pilgrim 6ebb28d32e EndianStream.h - add missing implicit MathExtras.h header dependency. NFCI.
Noticed while investigating if we can remove an unnecessary MathExtras.h include from SmallVector.h
2021-06-05 18:05:40 +01:00
Simon Pilgrim 24b9bc8498 MsgPackReader.cpp - add missing implicit MathExtras.h header dependency. NFCI.
Noticed while investigating if we can remove an unnecessary MathExtras.h include from SmallVector.h
2021-06-05 18:05:40 +01:00
Simon Pilgrim e32d73ef5e NativeFormatting.cpp - add missing implicit MathExtras.h header dependency. NFCI.
Noticed while investigating if we can remove an unnecessary MathExtras.h include from SmallVector.h
2021-06-05 18:05:39 +01:00
Arthur O'Dwyer 11e0882e8d [libc++] graph_header_deps.py: Update the computing of "root" (public) headers.
The "root nodes" of the graph are displayed in bold. My intent here
was to bold just the public-API headers, e.g. <vector> and
<experimental/coroutine> and <stdlib.h>, but not helper headers
such as <__functional_base> and <__iterator/next.h>. However,
the recent mass helper-header-ification has exposed defects in
this logic: all the new helpers were ending up bolded! Fix this.
Also, add <__undef_macros> to the list of headers we don't display
by default (like <__config>); it's not interesting to see those edges.

Also, add a sample `dot` command line to the `--help` text.
2021-06-05 12:47:30 -04:00
Arthur O'Dwyer 469d18c064 [libc++] Fix result-type and value_type computation in <valarray>.
The `operator[]` of `_UnaryOp` and `_BinaryOp` returns the result of
calling `__op_`, so its return type should be `__result_type`, not
e.g. `_A0::value_type`. However, `_UnaryOp::value_type` also should
never have been `_A0::value_type`; it needs to be the correct type
for the result of the unary op, e.g. `bool` when the op is `logical_not`.

This turns out to matter when multiple operators are nested, e.g.
`+(v == v)` needs to have a `value_type` of `bool`, not `int`,
even when `v` is of type `valarray<int>`.

Differential Revision: https://reviews.llvm.org/D103416
2021-06-05 12:29:36 -04:00
Aaron Puchert dc1e7b73b8 Make TableGenGlobalISel an object library
That's how it was originally intended but that wasn't possible because
we still needed to support older CMake versions.

The problem here is that the sources in TableGenGlobalISel are meant to
be linked into both llvm-tblgen and TableGenTests (a unit test), but not
be part of LLVM proper. So they shouldn't be an ordinary LLVM component.
Because they are used in llvm-tblgen, they can't draw in the LLVM dylib
dependency, but then we'd have to do the same thing in TableGenTests to
make sure we don't link both a static Support library and another copy
through the LLVM dylib.

With an object library we're just reusing the object files and don't
have to care about dependencies at all.

Differential Revision: https://reviews.llvm.org/D74588
2021-06-05 15:04:33 +02:00
Mark de Wever fbe4c839e8 [libc++][doc] Update Format status.
The first part of the <format> header patch series is now complete for
review. This updates the status document.
2021-06-05 13:58:38 +02:00
Roman Lebedev e350494fb0
[NFC] Promote willNotOverflow() / getStrengthenedNoWrapFlagsFromBinOp() from IndVars into SCEV proper
We might want to use it when creating SCEV proper in createSCEV(),
now that we don't `forgetValue()` in `SimplifyIndvar::strengthenOverflowingOperation()`,
which might have caused us to loose some optimization potential.
2021-06-05 12:17:51 +03:00
Nikita Popov 92ce29ee45 [LoopUnroll] Regenerate test checks (NFC) 2021-06-05 10:52:02 +02:00
Bruce Mitchener 2606918f46 Revert "[LLDB/API] Expose args and env from SBProcessInfo."
This reverts commit 8d33437d03.

This broke one of the buildbots.
2021-06-05 15:50:49 +07:00
Nikita Popov db45746821 [LoopUnroll] Separate peeling from unrolling
Loop peeling is currently performed as part of UnrollLoop().
Outside test scenarios, it is always performed with an unroll
count of 1. This means that unrolling doesn't actually do anything
apart from performing post-unroll simplification.

When testing, it's currently possible to specify both an explicit
peel count and an explicit unroll count. This doesn't perform any
sensible operation and may result in miscompiles, see
https://bugs.llvm.org/show_bug.cgi?id=45939.

This patch moves peeling from UnrollLoop() into tryToUnrollLoop(),
so that peeling does not also perform a susequent unroll. We only
run the post-unroll simplifications. Specifying both an explicit
peel count and unroll count is forbidden.

In the future, we may want to support both (non-PGO) peeling a
loop and unrolling it, but this needs to be done by first performing
the peel and then recalculating unrolling heuristics on a now
possibly analyzable loop.

Differential Revision: https://reviews.llvm.org/D103362
2021-06-05 10:32:00 +02:00
Alexander Shaposhnikov cf29a92b90 [lld][MachO] Fix typo in special-symbol-ld-previous.s
Fix typo in the test special-symbol-ld-previous.s. NFC.
2021-06-05 01:27:42 -07:00
Vitaly Buka e3258b0894 Revert "Update and improve compiler-rt tests for -mllvm -asan_use_after_return=(never|[runtime]|always)."
Windows is still broken.

This reverts commit 927688a4cd.
2021-06-05 00:39:50 -07:00
Amir Ayupov 065a9316aa [MC] Add getLSDASection interface
This diff adds getLSDASection method to MCObjectFileInfo.

Test plan: make check-all

Differential revision: https://reviews.llvm.org/D102298
2021-06-05 00:28:20 -07:00
Kevin Athey 927688a4cd Update and improve compiler-rt tests for -mllvm -asan_use_after_return=(never|[runtime]|always).
In addition:
  - optionally add global flag to capture compile intent for UAR:
    __asan_detect_use_after_return_always.
    The global is a SANITIZER_WEAK_ATTRIBUTE.

for issue: https://github.com/google/sanitizers/issues/1394

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D103304
2021-06-05 00:26:10 -07:00
Vitaly Buka c2f2c1b32c Revert "[gn build] manually port 60e5243e59 (weak asan symbol)"
Not needed after d8a4a2cb93.

This reverts commit 00542932fe.
2021-06-05 00:02:50 -07:00
Bruce Mitchener 8d33437d03 [LLDB/API] Expose args and env from SBProcessInfo.
This is another step towards implementing the equivalent of
`platform process list` and related functionality.

`uint32_t` is used for the argument count and index despite the
underlying value being `size_t` to be consistent with other
index-based access to arguments.

Differential Revision: https://reviews.llvm.org/D103675
2021-06-05 13:42:18 +07:00
Fangrui Song 06e7de795b Fix some -Wunused-but-set-variable in -DLLVM_ENABLE_ASSERTIONS=off build 2021-06-04 23:34:43 -07:00
Alexander Shaposhnikov 1309c181a8 [lld][MachO] Add first bits to support special symbols
This diff adds first bits to support special symbols $ld$previous* in LLD.
$ld$* symbols modify properties/behavior of the library
(e.g. its install name, compatibility version or hide/add symbols)
for specific target versions.

Test plan: make check-lld-macho

Differential revision: https://reviews.llvm.org/D103505
2021-06-04 23:32:26 -07:00