Commit Graph

430941 Commits

Author SHA1 Message Date
Simon Pilgrim 293899c64b [X86] Don't assume an AND/ANDNP element is undef/undemanded just because one element is undef
For mask ops like these, the other operand's corresponding element might be zero (result = zero) - so we must demand all the bits and that element.

This appears to be what D128570 was trying to fix - both sides of the funnel shift mask of the vXi64 (legalized to v2Xi32) were incorrectly simplifying the upper 32-bit halves to undef, resulting in bad folds later on.

I intend to address the test case regressions, but this close to the release branch I'd prefer to get a fix in first.
2022-07-24 10:53:38 +01:00
Fangrui Song 7feab85df8 [MC] Remove unused renameELFSection 2022-07-24 01:23:07 -07:00
Fangrui Song 6977ff4006 [MC] Delete dead zlib-gnu code and simplify writeSectionData 2022-07-24 01:17:34 -07:00
Nathan Ridge 2eba08fd9a [clangd] Do not try to use $0 as a placeholder in completion snippets
$0 can only be used as a tab stop, not as a placeholder (e.g.
`${0:expression}` is not valid)

Fixes https://github.com/clangd/clangd/issues/1190

Differential Revision: https://reviews.llvm.org/D128621
2022-07-24 03:01:18 -04:00
Kazu Hirata 5bbe452e75 Revert "[Orc] Use default member initialization (NFC)"
This reverts commit d534967b66.

The patch causes build failures, such as:

https://lab.llvm.org/buildbot/#/builders/121/builds/21760
2022-07-23 21:10:10 -07:00
Kazu Hirata 068d5066b3 [Hexagon] Remove unused declaration getByteVectorTy (NFC)
The declaration was introduced without a corresponding definition on
Sep 7, 2020 in commit f5d07a05bb.
2022-07-23 19:40:44 -07:00
Fangrui Song 89357f0cb9 [Passes] Simplify ChangePrinter names. NFC 2022-07-23 19:32:13 -07:00
Brad Smith ba1915028e [libcxx] Remove static inline and make use of _LIBCPP_HIDE_FROM_ABI in __support/xlocale/__nop_locale_mgmt.h header
Reviewed By: ldionne

Differential Revision: https://reviews.llvm.org/D129949
2022-07-23 22:12:37 -04:00
Kazu Hirata 2201d1827f [Analysis] Use default member initialization (NFC) 2022-07-23 18:36:24 -07:00
Kazu Hirata d534967b66 [Orc] Use default member initialization (NFC)
Identified with modernize-use-default-member-init
2022-07-23 18:36:23 -07:00
Craig Topper 9adc00a9d0 [RISCV] Add a continue to reduce nesting. NFC 2022-07-23 17:36:12 -07:00
NAKAMURA Takumi 944cb96429 clang/include/clang/module.modulemap: Mark `Tooling/Inclusions/*.inc` as textual.
Fixes llvmorg-15-init-917-g46a6f5ae148a
2022-07-24 09:32:34 +09:00
Kazu Hirata 7bfa06f6c0 [CodeGen] Use range-based for loops (NFC) 2022-07-23 16:10:46 -07:00
Kazu Hirata 3736a498d4 [IPO] Use std::array for AccessKind2Accesses (NFC)
Switching to std:array allow us to use fill.

While I am at it, this patch also converts one for loop to a
range-based one.
2022-07-23 15:47:53 -07:00
Augusto Noronha 2622c5e212 [lldb] Adapt lldb tests to changes in 71cdb8c6f1 2022-07-23 15:37:26 -07:00
Fangrui Song 7225213c0a [LegacyPM] Remove {,PostInline}EntryExitInstrumenterPass
Following recent changes removing non-core features of the legacy
PM/optimization pipeline.
2022-07-23 15:30:15 -07:00
Amaury Séchet 8293645e1b Autogenerate tests for win64-byval.ll . NFC 2022-07-23 21:58:06 +00:00
Nuno Lopes a30e77b6f6 fix tests for commit 9df0b254d2 2022-07-23 22:32:30 +01:00
Nuno Lopes 9df0b254d2 [NFC] Switch a few uses of undef to poison as placeholders for unreachable code 2022-07-23 21:50:11 +01:00
Kazu Hirata 2d2e2e7ea9 [Vectorize] Remove isConsecutiveLoadOrStore (NFC)
The last use was removed on Jan 4, 2022 in commit
95a93722db.
2022-07-23 13:01:14 -07:00
Kazu Hirata ae998555ba [AMDGPU] Remove a redundant variable (NFC)
ArrayRef has operator[], so we don't need to access the contents via
data().
2022-07-23 12:29:05 -07:00
Kazu Hirata c730f9a164 Convert for_each to range-based for loops (NFC) 2022-07-23 12:17:27 -07:00
Kazu Hirata 97718180d7 [Analysis] Remove a redundant return statement (NFC)
Identified with readability-redundant-control-flow.
2022-07-23 11:35:19 -07:00
Fangrui Song c17450a094 [AMDGPU] Change DEBUG_TYPE from isel to amdgpu-isel
to match all other *ISelDAGToDAG.cpp
2022-07-23 11:32:02 -07:00
Kazu Hirata 85dadf6d8d [TableGen] Drop an unnecessary const from a return type (NFC)
This patch also drops "&" that binds to a temporary.

Identified with readability-const-return-type.
2022-07-23 11:30:23 -07:00
Kazu Hirata 71cdb8c6f1 [ADT] Use default member initialization (NFC)
Identified with modernize-use-default-member-init.
2022-07-23 10:50:27 -07:00
Peter Klausler a9782fead3 [flang] Correct IsHostAssociated() to be true for BLOCK constructs
The predicate IsHostAssocited() was implemented in a way that would
return true only for cases of host association into a module or inner
subprogram.  Technically, the use of a name in a BLOCK construct
that is not declared therein is considered in the Fortran standard
to also be a form of host association, and this matters when doing
error checking on DATA statements.

Differential Revision: https://reviews.llvm.org/D130388
2022-07-23 10:46:54 -07:00
Simon Pilgrim ac8be21365 [DAG] isSplatValue - don't attempt to merge any BITCAST sub elements if they contain UNDEFs
We still haven't found a solution that correctly handles 'don't care' sub elements properly - given how close it is to the next release branch, I'm making this fail safe change and we can revisit this later if we can't find alternatives.

NOTE: This isn't a reversion of D128570 - it's the removal of undef handling across bitcasts entirely

Fixes #56520
2022-07-23 18:38:48 +01:00
Simon Pilgrim 825df62e8b [X86] Add test case for Issue #56520 2022-07-23 18:31:56 +01:00
Peter Klausler b09c890510 [flang] Clean up bogus semantic error on procedure pointer assignment
When a procedure pointer with no interface is associated with
an EXTERNAL name with no interface information, but it is later
inferred that the procedure pointer must be a subroutine because it
appears in a CALL statement, don't complain that the EXTERNAL name
is not also known to be a subroutine.

Subroutine vs. function errors are still caught in procedure pointer
assignment compatibility checking; this fix simply ensures that those
more nuanced tests are not overridded by the attribute set equality test.

Also, leave in some code for dumping the differing attributes in legitimate
error cases that was added in the coures of debugging the specific problem.

Differential Revision: https://reviews.llvm.org/D130385
2022-07-23 10:18:28 -07:00
Jez Ng ee61dc5f6c [lld-macho][nfc] Reduce nesting of code added in D130125 2022-07-23 13:16:00 -04:00
Peter Klausler 3096b85696 [flang] Don't fold zero-length substring references
In some contexts the code looks cleaner if we fold zero-length substring
references into empty character constants, but those don't work in
variable definition contexts and can lead to bogus semantic error
messages.

Differential Revision: https://reviews.llvm.org/D130383
2022-07-23 10:08:09 -07:00
Nico Weber 1b4b12a340 Revert "[NFC] Improve FileSpec internal APIs and usage in preparation for adding caching of resolved/absolute." and follow-ups
This reverts commit 9429b67b8e.

It broke the build on Windows, see comments on https://reviews.llvm.org/D130309

It also reverts these follow-ups:

Revert "Fix buildbot breakage after https://reviews.llvm.org/D130309."
This reverts commit f959d815f4.

Revert "Fix buildbot breakage after https://reviews.llvm.org/D130309."
This reverts commit 0bbce7a4c2.

Revert "Cache the value for absolute path in FileSpec."
This reverts commit dabe877248.
2022-07-23 12:35:48 -04:00
Peter Klausler cbfc223920 [flang] Fix name of dummy argument to intrinsic NEW_LINE(A='')
It should be A= but I misspelled it in the intrinsics table as X=.

Differential Revision: https://reviews.llvm.org/D130382
2022-07-23 09:30:56 -07:00
John Ericson 32560211c6 Fix one stray `{LLVM -> CLANG}_TOOLS_INSTALL_DIR`
Follow up to D117977, where I missed this new usage after one rebase.

Thanks @tsteller in https://reviews.llvm.org/D117977#3670919 for
noticing.

Reviewed By: mstorsjo

Differential Revision: https://reviews.llvm.org/D130362
2022-07-23 16:26:32 +00:00
Kazu Hirata 1cc7f5bede Use static_assert instead of assert (NFC)
Identified with misc-static-assert.
2022-07-23 09:22:27 -07:00
Jez Ng d23da0ec6c [lld-macho] Fold __objc_imageinfo sections
Previously, we treated it as a regular ConcatInputSection. However, ld64
actually parses its contents and uses that to synthesize a single image
info struct, generating one 8-byte section instead of `8 * number of
object files with ObjC code`.

I'm not entirely sure what impact this section has on the runtime, so I
just tried to follow ld64's semantics as closely as possible in this
diff. My main motivation though was to reduce binary size.

No significant perf change on chromium_framework on my 16-core Mac Pro:

             base           diff           difference (95% CI)
  sys_time   1.764 ± 0.062  1.748 ± 0.032  [  -2.4% ..   +0.5%]
  user_time  5.112 ± 0.104  5.106 ± 0.046  [  -0.9% ..   +0.7%]
  wall_time  6.111 ± 0.184  6.085 ± 0.076  [  -1.6% ..   +0.8%]
  samples    30             32

Reviewed By: #lld-macho, thakis

Differential Revision: https://reviews.llvm.org/D130125
2022-07-23 12:12:01 -04:00
Simon Pilgrim 676a03d8a5 [X86] matchBinaryShuffle - limit SHUFFLE(X,Y) -> OR(X,Y) cases to where X + Y are the same width as the result
Minor bit of prep work toward not unnecessarily widening shuffle operands in combineX86ShufflesRecursively, instead only widening in combineX86ShuffleChain if we actual find a match - see Issue #45319
2022-07-23 16:56:45 +01:00
Jez Ng b35e0d0cf3 [lld-macho] Fix segfault when handling LTO + object file weak defs
which occurs when there are EH frames present in the object file's weak
def.

Reviewed By: abrachet

Differential Revision: https://reviews.llvm.org/D130409
2022-07-23 11:48:45 -04:00
Dmitry Vassiliev 4acc02357e [IR] Fixed ambiguous call to llvm::report_fatal_error
This patch fixes the following error with MSVC 16.9.2:
llvm/lib/IR/GCStrategy.cpp(35): error C2668: 'llvm::report_fatal_error': ambiguous call to overloaded function
llvm/include/llvm/Support/ErrorHandling.h(75): note: could be 'void llvm::report_fatal_error(const llvm::Twine &,bool)'
llvm/include/llvm/Support/ErrorHandling.h(73): note: or 'void llvm::report_fatal_error(llvm::StringRef,bool)'
llvm/lib/IR/GCStrategy.cpp(35): note: while trying to match the argument list '(const std::string)'

Reviewed By: RKSimon, barannikov88

Differential Revision: https://reviews.llvm.org/D130407
2022-07-23 16:28:18 +02:00
Dmitri Gribenko aba43035bd Use llvm::sort instead of std::sort where possible
llvm::sort is beneficial even when we use the iterator-based overload,
since it can optionally shuffle the elements (to detect
non-determinism). However llvm::sort is not usable everywhere, for
example, in compiler-rt.

Reviewed By: nhaehnle

Differential Revision: https://reviews.llvm.org/D130406
2022-07-23 15:19:05 +02:00
Corentin Jabot e82880e6b8 [Clang] Update the status of N2393 in c_status.html 2022-07-23 15:15:12 +02:00
Dmitri Gribenko cd9a5cfd2e Use the range-based overload of llvm::sort where possible
Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D130403
2022-07-23 15:13:25 +02:00
Simon Pilgrim 5f89d2bae9 [DAG] Move OR(AND(X,C1),AND(OR(X,Y),C2)) -> OR(AND(X,OR(C1,C2)),AND(Y,C2)) fold to SimplifyDemandedBits
This will fix the SystemZ v3i31 memcpy regression in D77804 (with the help of D129765 as well....).

It should also allow us to /bend/ the oneuse limitation for cases where we can use demanded bits to safely peek though multiple uses of the AND ops.
2022-07-23 13:17:24 +01:00
Corentin Jabot 559f07b872 [Clang] Adjust extension warnings for #warning
The #warning directive is standard in C++2b and C2x,
this adjusts the pedantic and extensions warning accordingly.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D130415
2022-07-23 14:10:11 +02:00
Corentin Jabot aee76cb59c [Clang] Add support for Unicode identifiers (UAX31) in C2x mode.
This implements
N2836 Identifier Syntax using Unicode Standard Annex 31.

The feature was already implemented for C++,
and the semantics are the same.

Unlike C++ there was, afaict, no decision to
backport the feature in older languages mode,
so C17 and earlier are not modified and the
code point tables for these language modes are conserved.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D130416
2022-07-23 14:08:08 +02:00
Benjamin Kramer 66e66117ba [bazel] Add missing dependencies after 535b507ba5 2022-07-23 13:25:23 +02:00
Simon Pilgrim 6aff1b7b3c [DAG] SimplifyDemandedBits - pull out repeated getValueType() calls. NFC. 2022-07-23 12:01:54 +01:00
Simon Pilgrim 2421a5af72 [DAG] ExpandIntRes_ADDSUB - create UADDO/USUBO instead of ADDCARRY/SUBCARRY if overflow is known to be zero
As noticed on D127115, when splitting ADD/SUB nodes we often end up with cases where overflow from the lower bits is impossible - in such cases we're better off breaking the carry chain dependency as soon as possible.

This path is being exercised by llvm/test/CodeGen/ARM/dsp-mlal.ll, although I haven't been able to get any codegen diff without a topological worklist.
2022-07-23 11:13:44 +01:00
Dimitrije Milosevic 2bfb0fcb51 [MIPS][compiler-rt] Fix stat struct's size for O32 ABI
Add the MIPS O32 ABI value for the stat struct's size.

Differential Revision: https://reviews.llvm.org/D129749.
2022-07-23 11:53:00 +02:00