Commit Graph

387410 Commits

Author SHA1 Message Date
Fangrui Song dcf6d0d389 [llvm-objdump] Fix -a after D100433
-a is alias for --archive-headers, not --all-headers
2021-05-04 10:17:36 -07:00
Fraser Cormack 6523ff6d47 [ValueTypes] Add MVTs for v256i16 and v256f16
This patch adds the two MVTs to fix a legalizer crash when using vector
shuffles of <256 x i16> and <128 x i16> on RISC-V. The legalizer can't
promote the operand of `v256i32 = any_extend_vector_inreg v128i16`.

Reviewed By: craig.topper, RKSimon

Differential Revision: https://reviews.llvm.org/D101769
2021-05-04 18:06:13 +01:00
Ahsan Saghir 670736a904 [PowerPC] Prevent argument promotion of types with size greater than 128 bits
This patch prevents argument promotion of types having
type size greater than 128 bits.

Fixes Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=49952

Reviewed By: #powerpc, nemanjai

Differential Revision: https://reviews.llvm.org/D101188
2021-05-04 12:09:25 -05:00
Bjorn Pettersson 33ff3c2049 Revert "Make dependency between certain analysis passes transitive"
This reverts commit 3655f0757f.

It caused assertion failures related to setLastUser in polly builds.
2021-05-04 19:08:41 +02:00
Louis Dionne 6da1c46227 [libc++] NFC: Fix typo in Ranges Status 2021-05-04 13:06:58 -04:00
Wei Mi 82956de05f [SampleFDO] Fix a bug when appending function symbol into the Callees set of
Root node in ProfiledCallGraph.

In ProfiledCallGraph::addProfiledFunction, to add a function symbol into the
ProfiledCallGraph, currently an uninitialized ProfiledCallGraphNode node is
created by ProfiledFunctions[Name] and inserted into Callees set of Root node
before the node is initialized. The Callees set use
ProfiledCallGraphNodeComparer as its comparator so the uninitialized
ProfiledCallGraphNode may fail to be inserted into Callees set if it happens
to contain a name in memory which has been inserted into the Callees set
before. The problem will prevent some function symbols from being annotated
with profiles and cause performance regression. The patch fixes the problem.

Differential Revision: https://reviews.llvm.org/D101815
2021-05-04 10:05:59 -07:00
Fangrui Song 0c2e2f88fb [llvm-objdump] Improve newline consistency between different pieces of information
When dumping multiple pieces of information (e.g. --all-headers),
there is sometimes no separator between two pieces.
This patch uses the "\nheader:\n" style, which generally improves
compatibility with GNU objdump.

Note: objdump -t/-T does not add a newline before "SYMBOL TABLE:" and "DYNAMIC SYMBOL TABLE:".
We add a newline to be consistent with other information.

`objdump -d` prints two empty lines before the first 'Disassembly of section'.
We print just one with this patch.

Differential Revision: https://reviews.llvm.org/D101796
2021-05-04 09:56:07 -07:00
gbreynoo a617e2064d [llvm-objdump] Remove Generic Options group from help text output
Reapply 7368624 after revert and fix

Looking at other tools using tablegen for help output, general options
like --help are not separated from other options. This change removes
the "Generic Options" option group so the options are listed together.
the macho specific option group is left unaffected.

The test help.test was modified to reflect this change.

Differential Revision: https://reviews.llvm.org/D101652
2021-05-04 17:42:20 +01:00
Med Ismail Bennani adfffebec6 [lldb/Core] Add SourceLocationSpec class (NFC)
A source location specifier class that holds a Declaration object containing
a FileSpec with line and column information. The column line is optional.
It also holds search flags that can be fetched by resolvers to look inlined
declarations and/or exact matches.

It describes a specific location in a source file and allows the user
to perform checks and comparaisons between multiple instances of that class.

Differential Revision: https://reviews.llvm.org/D100962

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2021-05-04 16:34:45 +00:00
Med Ismail Bennani 1435f6b00b [lldb] Move and clean-up the Declaration class (NFC)
This patch moves the Declaration class from the Symbol library to the
Core library. This will allow to use it in a more generic fashion and
aims to lower the dependency cycles when it comes to the linking.

The patch also does some cleaning up by making column information
permanent and removing the LLDB_ENABLE_DECLARATION_COLUMNS directives.

Differential revision: https://reviews.llvm.org/D101556

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2021-05-04 16:34:44 +00:00
Med Ismail Bennani 0c3f762c8f [lldb/Utility] Update path in FileSpec documentation (NFC)
Update FileSpec doxygen path to reflect its actual location in the
source-tree.

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2021-05-04 16:34:44 +00:00
Dimitry Andric dffddde73a Revert "[llvm-objdump] Remove Generic Options group from help text output"
This reverts commit 73686247ac, as there
were git stash conflict markers left unresolved.
2021-05-04 18:28:31 +02:00
Christudasan Devadasan 80c79035ef DAG: Cleanup assertion in EmitFuncArgumentDbgValue
Removing an assertion introduced with D68945. The
patch was later reverted with 6531a78ac4, but failed
to remove this assertion. It causes a problem while
trying to split a 64-bit argument into sub registers.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D101594
2021-05-04 21:48:58 +05:30
Dimitry Andric 7e83a7f1fd Reland "[MC][ELF] Work around R_MIPS_LO16 relocation handling problem"
This fixes PR49821, and avoids "ld.lld: error: test.o:(.rodata.str1.1):
offset is outside the section" errors when linking MIPS objects with
negative R_MIPS_LO16 implicit addends.

ld.lld handles R_MIPS_HI16/R_MIPS_LO16 separately, not as a whole, so it
doesn't know that an R_MIPS_HI16 with implicit addend 1 and an
R_MIPS_LO16 with implicit addend -32768 represents 32768, which is in
range of a MergeInputSection. We could introduce a new RelExpr member
(like R_RISCV_PC_INDIRECT for R_RISCV_PCREL_HI20 / R_RISCV_PCREL_LO12)
but the complexity is unnecessary given that GNU as keeps the original
symbol for this case as well.

Adds a new test case for PR49821, and also updates two other test cases
that are affected by this change.

Reviewed By: atanasyan, MaskRay

Differential Revision: https://reviews.llvm.org/D101773
2021-05-04 18:16:09 +02:00
Jennifer Yu 5285748c2c Fix assert on the variable which is used in omp clause is not marked
as used.

The problem only happens with constexpr variable, for constexpr variable,
variable is not marked during parser variable.   This is because compiler
might find some var's associate expressions may not actully an odr-used
later,  the variables get kept in MaybeODRUseExprs, in normal case, at
end of process fullExpr, the variable will be marked during the call to
CleanupVarDeclMarking(). Since we are processing expression of OpenMP
clauses, and the ActOnFinishFullExpr is not getting called that casue
variable is not get marked.

One way to fix this is to call CleanupVarDeclMarking() in EndOpenMPClause
for each omp directive.

This to fix https://bugs.llvm.org/show_bug.cgi?id=50206

Differential Revision: https://reviews.llvm.org/D101781
2021-05-04 09:07:35 -07:00
Fabian Meumertzheim b1048ff682 [libFuzzer] Preserve position hint in auto dictionary
Currently, the position hint of an entry in the persistent auto
dictionary is fixed to 1. As a consequence, with a 50% chance, the entry
is applied right after the first byte of the input. As the position 1
does not appear to have any particular significance, this is likely a
bug that may have been caused by confusing the constructor parameter
with a success count.

This commit resolves the issue by preserving any existing position hint
or disabling the hint if the original entry didn't have one.

Reviewed By: morehouse

Differential Revision: https://reviews.llvm.org/D101686
2021-05-04 09:06:51 -07:00
Sanjay Patel a6f79b5671 [InstCombine] avoid infinite loops with select/icmp transforms
This fixes https://llvm.org/PR48900 , but as seen in the
regression tests prevents some optimizations.

There are a few options to restore those (switch to min/max
intrinsics, add larger pattern matching for select with
dominating condition, improve CVP), but we need to prevent
the bug 1st.
2021-05-04 11:54:06 -04:00
gbreynoo 73686247ac [llvm-objdump] Remove Generic Options group from help text output
Looking at other tools using tablegen for help output, general options
like --help are not separated from other options. This change removes
the "Generic Options" option group so the options are listed together.
the macho specific option group is left unaffected.

The test help.test was modified to reflect this change.

Differential Revision: https://reviews.llvm.org/D101652
2021-05-04 16:48:03 +01:00
Amy Kwan 1998a08655 [PowerPC][NFC] Update atomic patterns to use the refactored load/store implementation
This patch updates the scalar atomic patterns to use the refactored load/store
implementation introduced in D93370.
All existing test cases pass with when the refactored patterns are utilized.

Differential Revision: https://reviews.llvm.org/D94498
2021-05-04 10:46:45 -05:00
William S. Moses cb395b84b0 [MLIR] Add not icmp canonicalization documentation
See: https://reviews.llvm.org/D101710
2021-05-04 11:44:25 -04:00
gbreynoo 3273f27692 [llvm-objdump] Remove --cfg option from command guide
The llvm-objdump command guide has the option --cfg which was removed
from the tool by 888320e9fa in 2014. This
change updates the command guide to reflect this.

Differential Revision: https://reviews.llvm.org/D101648
2021-05-04 16:42:13 +01:00
William S. Moses 8e211bf1c8 [MLIR][SCF] Assume uses of condition in the body of scf.while is true
Differential Revision: https://reviews.llvm.org/D101801
2021-05-04 11:39:07 -04:00
Florian Hahn 4ba8720f88
[VPlan] Representing backedge def-use feeding reduction phis.
This patch updates the code handling reduction recipes to also keep
track of the incoming value from the latch in the recipe. This is needed
to model the def-use chains completely in VPlan, so that it is possible
to replace the incoming value with an arbitrary VPValue.

Reviewed By: Ayal

Differential Revision: https://reviews.llvm.org/D99294
2021-05-04 16:33:22 +01:00
William S. Moses 93297e4bac [MLIR] Replace a not of a comparison with appropriate comparison
Differential Revision: https://reviews.llvm.org/D101710
2021-05-04 11:23:29 -04:00
Zachary Henkel 54bff1522f Rename a template parameter that conflicted with a common macro; NFC
The CALLBACK macro is used extensively in the Windows SDK.
2021-05-04 11:19:54 -04:00
Louis Dionne 75952d6df6 [libc++] Move the Debug iterators check to CI stage 3
It's not a default configuration, so it belongs to stage 3.
2021-05-04 11:10:41 -04:00
LLVM GN Syncbot 6ede28c9e1 [gn build] Port 2021d272ad 2021-05-04 15:06:28 +00:00
Louis Dionne 2021d272ad [libc++] Implement ranges::view
Differential Revision: https://reviews.llvm.org/D101547
2021-05-04 11:05:58 -04:00
Brock Wyma 4f8d585fbf [CodeView] Truncate Long Type Names With An MD5 Hash
Replace long CodeView type names with an MD5 hash of the name.

Differential Revision: https://reviews.llvm.org/D97881
2021-05-04 10:51:21 -04:00
Ella Ma d882750f11 [analyzer] Fix a crash for dereferencing an empty llvm::Optional variable in SMTConstraintManager.h.
The first crash reported in the bug report 44338.

Condition `!isSat.hasValue() || isNotSat.getValue()` here should be
`!isNotSat.hasValue() || isNotSat.getValue()`.
`getValue()` here crashed when we used the static analyzer to analyze
postgresql-12.0.

Patch By: OikawaKirie

Reviewed By: steakhal, martong

Differential Revision: https://reviews.llvm.org/D83660
2021-05-04 16:50:21 +02:00
Fraser Cormack 2d480abd9a [LangRef] Fix a typo in the vector-type memory layout section 2021-05-04 15:40:53 +01:00
Sander de Smalen 9931ae645e Reland "[LV] Calculate max feasible scalable VF."
Relands https://reviews.llvm.org/D98509

This reverts commit 51d648c119.
2021-05-04 15:44:41 +01:00
Nico Weber bfb9c749c0 Fix some typos in d7ec48d71b 2021-05-04 10:44:01 -04:00
Tobias Gysi 05d2297b86 [mlir][linalg] Always lower index operations during loop lowering.
Ensure the index operations are lowered on all linalg loop lowering paths.

Differential Revision: https://reviews.llvm.org/D101827
2021-05-04 14:30:59 +00:00
Saurabh Jha db210bc69b [Matrix] Implement C-style explicit type conversions in CXX for matrix types
This patch implements C-style explicit type conversions in CXX for matrix types. It is part of fixing https://bugs.llvm.org/show_bug.cgi?id=47141

Reviewed By: fhahn

Differential Revision: https://reviews.llvm.org/D101696
2021-05-04 15:27:57 +01:00
Nico Weber d7ec48d71b [clang] accept -fsanitize-ignorelist= in addition to -fsanitize-blacklist=
Use that for internal names (including the default ignorelists of the
sanitizers).

Differential Revision: https://reviews.llvm.org/D101832
2021-05-04 10:24:00 -04:00
Bradley Smith 9f37980d45 [AArch64][SVE] Fold insert(zero, extract(X, 0), 0) -> X, when X is known to zero lanes 1-N
Specifically, this allow us to rely on the lane zero'ing behaviour of
SVE reduce instructions.

Co-authored-by: Paul Walker <paul.walker@arm.com>

Differential Revision: https://reviews.llvm.org/D101369
2021-05-04 15:05:05 +01:00
Simon Pilgrim b04148f777 Local.cpp - Avoid DebugLoc copies - use const reference from getDebugLoc. NFCI. 2021-05-04 14:31:50 +01:00
Anastasia Stulova 64911eec75 [OpenCL] Allow pipe as a valid identifier prior to OpenCL 2.0.
Pipe has not been a reserved keyword in the earlier OpenCL
standards. However we failed to allow its use as an identifier
in the original commit. This issues is fixed now and testing
is improved accordingly.

Differential Revision: https://reviews.llvm.org/D101052
2021-05-04 14:30:42 +01:00
Jan Svoboda 00895831ab [clang][cli][docs] Clarify marshalling infrastructure documentation 2021-05-04 15:16:32 +02:00
Simon Pilgrim 2bb41851a1 [Utils] recognizeBSwapOrBitReverseIdiom - support matching from funnel shift roots (PR40058)
We were missing bitreverse matches in cases where InstCombine had seen a byte-level rotation at the end of a bitreverse sequence (replacing or() with fshl()), hindering the exhaustive bitreverse matching in CodeGenPrepare later on.
2021-05-04 13:46:45 +01:00
Simon Pilgrim e0dd708f40 [CodeGenPrepare][X86] Add bitreverse detection tests
Initially only test for XOP which is the only thing that supports scalar bitreverse - we can add vector tests later.
2021-05-04 13:29:19 +01:00
Simon Pilgrim bd82cec016 [X86] Update PR20841 test description to make it clear we SHOULDN'T be folding EFLAGS with XADD 2021-05-04 13:29:19 +01:00
Jan Svoboda d0e3a15e36 [clang][cli] NFC: Remove confusing `EmptyKPM` variable 2021-05-04 14:27:57 +02:00
Adrian Kuegel 93537fabce [mlir] Add lowering from math.expm1 to LLVM.
Differential Revision: https://reviews.llvm.org/D96776
2021-05-04 14:22:10 +02:00
David Stuttard 8f2948731e [AMDGPU][AsmParser] Correct the order of optional operands to mimg
Ordering of operands was incorrect meaning that a16 operand was treated as tfe

Differential Revision: https://reviews.llvm.org/D101618

Change-Id: I3b15e71ef5ff625f19f52823414ab684d76aca33
2021-05-04 13:14:48 +01:00
Florian Hahn d65e5f60f1
[IndVarSimplify] Add additional tests using isImpliedViaMerge. 2021-05-04 13:11:47 +01:00
Alexey Bataev 369cd2ae52 Revert "[SLP]Allow masked gathers only if allowed by target."
This reverts commit fd18547e07. Need to
add a check for the size of the vectorization tree to avoid some extra
vectorization.
2021-05-04 04:53:22 -07:00
Dávid Bolvanský 80b897e21b [InstCombine] ctpop(X) ^ ctpop(Y) & 1 --> ctpop(X^Y) & 1 (PR50094)
Original pattern: (__builtin_parity(x) ^ __builtin_parity(y))

LLVM rewrites it as: (__builtin_popcount(x) ^ __builtin_popcount(y)) & 1

Optimized form:  __builtin_popcount(X^Y) & 1

Alive proof: https://alive2.llvm.org/ce/z/-GdWFr

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D101802
2021-05-04 13:16:18 +02:00
Georgy Komarov c2e9baf2e8
[clang-tidy] Fix cppcoreguidelines-pro-type-vararg false positives with __builtin_ms_va_list
This commit fixes cppcoreguidelines-pro-type-vararg false positives on
'char *' variables.

The incorrect warnings generated by clang-tidy can be illustrated with
the following minimal example:

```
goid foo(char* in) {
  char *tmp = in;
}
```

The problem is that __builtin_ms_va_list desugared as 'char *', which
leads to false positives.

Fixes bugzilla issue 48042.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D101259
2021-05-04 13:49:20 +03:00