Commit Graph

408606 Commits

Author SHA1 Message Date
Mehdi Amini 1461bd13c9 Revert "Define a `cppAccessorType` to const-ref in APFloatParameter and update ODS emitter to use it for verifier signatures"
This reverts commit 89af17c0c7.

This broke the gcc5 build.
2022-01-03 06:32:50 +00:00
William S. Moses 93c791839a [MLIR] Canonicalize/fold select %x, 1, 0 to extui
Two canonicalizations for select %x, 1, 0
  If the return type is i1, return simply the condition %x, otherwise extui %x to the return type.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D116517
2022-01-03 01:26:28 -05:00
William S. Moses 834cf3be22 [MLIR][Arith] Canonicalize and/or with ext
Replace and(ext(a),ext(b)) with ext(and(a,b)). This both reduces one instruction, and results in the computation (and/or) being done on a smaller type.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D116519
2022-01-03 01:25:30 -05:00
Mehdi Amini 78389de4d3 Add back missing return to non-void function
It was incorrectly removed accidentally in e4e463e747.
2022-01-03 06:18:25 +00:00
Mehdi Amini a5a24c9370 Remove misused RAII gil_scoped_release/gil_scoped_acquire: without name they don't have any effect
I'm not sure what is the right fix here, but adding a name to all these
lead to many segfaults.

Reviewed By: stellaraccident

Differential Revision: https://reviews.llvm.org/D116506
2022-01-03 06:17:04 +00:00
Groverkss 29120a5130 [MLIR][NFC] Fix clang-tidy errors in Analysis/Presburger/
This patch fixes clang-tidy errors related to different parameter names
in header file and source file in Analysis/Presburger/ directory.
2022-01-03 11:42:48 +05:30
Mehdi Amini 564619b786 Use cast<> instead of dyn_cast<> when we don't check the result (NFC) 2022-01-03 06:06:36 +00:00
Mehdi Amini 891a0d7ccd Remove dead return after return (NFC) 2022-01-03 06:03:34 +00:00
Mehdi Amini e4e463e747 Remove useless nesting blok and dead return statement in TosaToLinalg.cpp (NFC)
Flagged by Coverity.
2022-01-03 06:02:21 +00:00
Mehdi Amini a1e62aa75b Minor reflow of FloorDivSIOp/CeilDivSIOp folder to limit the number of APInt API calls (NFC)
Cache the result of the comparison in boolean, and check early for 0 to
leverage `(a < 0) == !(a > 0)`.
2022-01-03 05:55:23 +00:00
Groverkss 8506c8c13b [MLIR] Move LinearTransform to Presburger/
This patch moves LinearTransform to Presburger/ and makes it use
IntegerPolyhedron instead of FlatAffineConstraints. Also modifies its usage in
`FlatAffineConstraints::findIntegerSample` to support the changes.

This patch is part of a series of patches for moving presburger math functionality into Presburger directory.

Reviewed By: arjunp

Differential Revision: https://reviews.llvm.org/D116311
2022-01-03 11:11:09 +05:30
William S. Moses 1bb9f4e482 [MLIR] Create folders for extsi/extui
Create folders/canonicalizers for extsi/extui. Specifically,

extui(extui(x)) -> extui(x)
extsi(extsi(x)) -> extsi(x)
extsi(extui(x)) -> extui(x)

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D116515
2022-01-03 00:11:23 -05:00
Mehdi Amini 89af17c0c7 Define a `cppAccessorType` to const-ref in APFloatParameter and update ODS emitter to use it for verifier signatures
This reduce an unnecessary amount of copy of non-trivial objects, like
APFloat.

Reviewed By: rriddle, jpienaar

Differential Revision: https://reviews.llvm.org/D116505
2022-01-03 04:57:11 +00:00
Mehdi Amini 590a62d1b2 Add a script to run clang-tidy on the entire MLIR codebase 2022-01-03 04:55:26 +00:00
Lang Hames 6c348c1d3f [JITLink] Move AllocActions and associated types out of JITLinkMemoryManager.
They're shared with LinkGraph, so having them as top-level types makes sense,
and saves users from qualifying the names everywhere.
2022-01-03 14:37:18 +11:00
Mehdi Amini 717c4bf7e3 Apply clang-tidy fixes for misc-unused-parameters in MLIR AffineStructures.cpp (NFC) 2022-01-03 02:32:41 +00:00
Ellis Hoag e27b5f9371 [clang][AST] Fix crash when printing error
Clang will crash if it tries to compile the following code. This commit
fixes it.
```
$ cat foo.c
void foo(_Nullable int *ptr) {
    __auto_type _Nonnull a = ptr;
};
$ clang foo.c -c -Wnullable-to-nonnull-conversion
```

Reviewed By: sammccall

Differential Revision: https://reviews.llvm.org/D116342
2022-01-02 18:03:42 -08:00
William S. Moses 1a0a177965 [MLIR] Create fold for cmp of ext
This patch creates folds for cmpi( ext(%x : i1, iN) != 0) -> %x

In essence this matches patterns matching an extension of a boolean, that != 0, which is equivalent to the original condition.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D116504
2022-01-02 19:48:52 -05:00
Wenlei He 9a2120a6e1 [llvm-profgen] Error out for unsupported AutoFDO profile generate with probe
Error out instead of siliently generate empty profile when trying to generate AutoFDO profile with probe binary.

Differential Revision: https://reviews.llvm.org/D116508
2022-01-02 16:38:56 -08:00
Mehdi Amini 3f127d8aaa Use `= default` for the ValueShapeRange copy-constructor (NFC)
This makes it trivially copyable.
2022-01-02 23:43:52 +00:00
Mehdi Amini 56f5e4abb8 Replace raw-loop with llvm::any_of() in PresburgerSet.cpp (NFC)
Reported by clang-tidy.
2022-01-02 22:39:57 +00:00
Mehdi Amini 4f415216ca Apply clang-tidy fixes for performance-unnecessary-value-param to MLIR (NFC) 2022-01-02 22:37:13 +00:00
Mehdi Amini 337c937ddb Apply clang-tidy fixes for performance-move-const-arg to MLIR (NFC) 2022-01-02 22:36:56 +00:00
Mehdi Amini 7964568632 Apply clang-tidy fixes for readability-simplify-boolean-expr to MLIR NormalizeMemRefs.cpp (NFC) 2022-01-02 22:26:57 +00:00
Martin Storsjö a8877c5ccc [clang] [MinGW] Pass --no-demangle through to the mingw linker
Clang has custom handling of --no-demangle, where it is removed
from the input -Wl and -Xlinker options, and readded specifically
by the drivers where it's known to be supported.

Both ld.bfd and lld support the --no-demangle option. This handles
the option in the same way as in ToolChains/Gnu.cpp.

Differential Revision: https://reviews.llvm.org/D114064
2022-01-03 00:22:40 +02:00
Mehdi Amini e4853be2f1 Apply clang-tidy fixes for performance-for-range-copy to MLIR (NFC) 2022-01-02 22:19:56 +00:00
Mehdi Amini abb336d26b Apply clang-tidy fixes for modernize-use-equals-default to MLIR (NFC) 2022-01-02 22:18:36 +00:00
Mehdi Amini f829d62c21 Apply clang-tidy fixes for modernize-use-default-member-init to MLIR ReductionNode.cpp (NFC) 2022-01-02 22:18:21 +00:00
Mehdi Amini 5caee2176a Apply clang-tidy fixes for bugprone-argument-comment to MLIR ArithmeticOps.cpp (NFC) 2022-01-02 22:14:48 +00:00
Nathan Sidwell b50fea47b6 [clang] Allow using std::coroutine_traits in std::experimental
This is that diff I was aiming for.  When transitioning code from
coroutines-ts to c++20, it can be useful to add a using declaration to
std::experimental pointing to std::coroutine_traits.  This permits
that use by checking whether lookup in std::experimentl finds a
different decl to lookup in std.  You still get a warning about
std::experimental::coroutine_traits being a thing, just not an error.

Reviewed By: ChuanqiXu

Differential Revision: https://reviews.llvm.org/D115943
2022-01-02 15:48:16 -05:00
Philip Reames 65035e0d06 Precommit SCEV symbolic w.overflow exit tests 2022-01-02 11:43:31 -08:00
Dave Lee a553969712 [lldb] Remove unused AproposAllSubCommands (NFC) 2022-01-02 11:30:51 -08:00
Philip Reames f28c8e46c9 Autogen a SCEV test for ease of update 2022-01-02 11:30:29 -08:00
Florian Hahn 6e0a333f71
[LV] Use Builder.CreateVectorReverse directly. (NFC)
IRBuilder::CreateVectorReverse already handles all cases required by
LoopVectorize. It can be used directly instead of reverseVector.
2022-01-02 19:09:30 +00:00
Kazu Hirata d677a7cb05 [clang] Remove redundant member initialization (NFC)
Identified with readability-redundant-member-init.
2022-01-02 10:20:23 -08:00
Kazu Hirata 5e1177302b [wasm] Use nullptr instead of NULL (NFC)
Identified with modernize-use-nullptr.
2022-01-02 10:20:21 -08:00
Kazu Hirata 7e163afd9e Remove redundant void arguments (NFC)
Identified by modernize-redundant-void-arg.
2022-01-02 10:20:19 -08:00
Kazu Hirata 677bbec9fd Remove unused "using" (NFC)
Identified by misc-unused-using-decls.
2022-01-02 10:20:17 -08:00
Kazu Hirata 41bfac6aed [Target] Remove unused forward declarations (NFC) 2022-01-02 10:20:15 -08:00
Philip Reames 890e685492 [SCEV] Drop unused param from new version of computeExitLimitFromICmp [NFC] 2022-01-02 10:15:17 -08:00
Philip Reames f19a95bbed [SCEV] Split computeExitLimitFromICmp into two versions [NFC]
This is in advance of a following change which needs to the non-icmp API.
2022-01-02 09:58:32 -08:00
Arthur O'Dwyer eda5bbfb9d [libc++] [test] Remove an erroneously copy-paste in the hypot() tests. NFC.
Line 1140 is a duplicate of line 1119; it tests the two-argument version
of std::hypot, whereas all the lines in this section are supposed to be
testing the C++17 three-argument version. Remove the erroneous duplicated line.

Split out of D116295.
2022-01-02 12:49:55 -05:00
Philip Reames 840fa88741 autogen unroll test for ease of futre update 2022-01-02 09:25:29 -08:00
Nathan Sidwell d4f09786e0 [clang] More informative mixed namespace diagnostics
First, let's check we get a TemplateDecl, before complaining about
where it might have been found.

Second, if it came from an unexpected place, show where that location is.

Reviewed By: ChuanqiXu

Differential Revision: https://reviews.llvm.org/D116164
2022-01-02 12:23:13 -05:00
Florian Hahn b1a333f0fe
[VPlan] Don't consider VPWidenCanonicalIVRecipe phi-like.
VPWidenCanonicalIVRecipe does not create PHI instructions, so it does
not need to be placed in the phi section of a VPBasicBlock.

Also tidies the code so the WidenCanonicalIV recipe and the
compare/lane-masks are created in the header.

Discussed D113223.

Reviewed By: Ayal

Differential Revision: https://reviews.llvm.org/D116473
2022-01-02 12:48:17 +00:00
Markus Böck dbeeb136ab [clang][MinGW] Explicitly ignore `-fPIC` & friends
GCC on Windows ignores this flag completely [0] which some build systems sadly rely on when compiling for Windows using MinGW. The current behaviour of clang however is to error out as -fPIC & friends has no effect on Windows.

This patch instead changes the behaviour for MinGW to ignore the option for the sake of compatibility

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

[0] https://gcc.gnu.org/legacy-ml/gcc-patches/2015-08/msg00836.html

Differential Revision: https://reviews.llvm.org/D116485
2022-01-02 12:06:54 +01:00
Markus Böck 1b708b67f6 [lld][MinGW] Ignore `--[no-]as-neeed` flags in MinGW driver
These flags are specific to ELF, but are still accepted by GNU ld, even if it does not do anything. This patch adds them as ignored option for the sake of compatibility.

Part of https://github.com/llvm/llvm-project/issues/52947

Differential Revision: https://reviews.llvm.org/D116484
2022-01-02 12:03:21 +01:00
Kazu Hirata 3782624c12 [DebugInfo] Remove hasInterestingContent (NFC)
hasInterestingContent was introduced without a use on Sep 15, 2015 in
commit e5162dba49.
2022-01-01 22:50:26 -08:00
Kazu Hirata 7b53fd1cff [CodeGen] Remove DisconnectedComponentsRenamed (NFC)
The last use was removed on May 31, 2016 in commit
f9acacaa92.
2022-01-01 22:50:24 -08:00
Kazu Hirata 3f7fd50c27 [AArch64] Remove unused constant NeonBitsPerVector (NFC) 2022-01-01 22:05:16 -08:00