Commit Graph

422814 Commits

Author SHA1 Message Date
Craig Topper 0971819740 [RISCV] Don't lookup TII in RISCVInstrInfo::getVLENFactoredAmount. NFCI
We're already inside of our implementation of TII.
2022-05-03 19:35:21 -07:00
Amir Ayupov 60957a5a08 [BOLT] Fix ICPJumpTablesTopN option use
Fix non-sensical `opts::ICPJumpTablesTopN != 0 ? opts::ICPTopN : opts::ICPTopN`.
Refactor/simplify another similar assignment.

Reviewed By: rafauler

Differential Revision: https://reviews.llvm.org/D124880
2022-05-03 19:34:10 -07:00
Amir Ayupov c3d5372093 [BOLT][NFC] Make ICP options naming uniform
Rename `opts::IndirectCallPromotion*` to `opts::ICP*`, making option naming
uniform and easier to follow.

Reviewed By: rafauler

Differential Revision: https://reviews.llvm.org/D124879
2022-05-03 19:32:45 -07:00
Amir Ayupov d0b1c98c96 [BOLT][NFC] ICP: simplify findTargetsIndex
Unnest lambda and use `llvm::is_contained`.

Reviewed By: rafauler

Differential Revision: https://reviews.llvm.org/D124877
2022-05-03 19:31:20 -07:00
Amir Ayupov ec02227bf7 [BOLT][NFC] Refactor ICP::findCallTargetSymbols
Reduce nesting making it easier to read.

Reviewed By: rafauler

Differential Revision: https://reviews.llvm.org/D124876
2022-05-03 19:29:22 -07:00
Amir Ayupov f9db6d2d5b [BOLT][CMAKE] Fix llvm-bolt-fuzzer build
Add X86/AArch64 targets to resolve missing dependencies, e.g.:
`undefined reference to `LLVMInitializeX86AsmParser'`

Follow-up to D124206

Reviewed By: rafauler

Differential Revision: https://reviews.llvm.org/D124886
2022-05-03 19:25:48 -07:00
Weverything 5afd20806d [riscv] Mark function as used to avoid unused warning. 2022-05-03 18:51:23 -07:00
Hongtao Yu 3113e5bb52 [CSSPGO] Relax size limitation for priority inlining with preinlined profile
As a follow-up to D124632, I'm turning on unlimited size caps for inlining with preinlined profile. It should be safe as a preinlined profile has "bounded" inline contexts.

No noticeable size or perf delta was seen with two of our internal large services, but I think this is still a good change to be consistent with the other case.

Reviewed By: wenlei

Differential Revision: https://reviews.llvm.org/D124793
2022-05-03 18:43:07 -07:00
Hongtao Yu e95ae395aa [CSSPGO][NFC] Replace SampleProfileLoader::ProfileIsCS with FunctionSamples::ProfileIsCS.
The two fields have the same meaning. Their values come from the reader. Therefore I'm removing one.

Reviewed By: wenlei

Differential Revision: https://reviews.llvm.org/D124788
2022-05-03 18:32:37 -07:00
Alex Borcan e29dc0c6fd [lld] Implement safe icf for MachO
This change implements --icf=safe for MachO based on addrsig section that is implemented in D123751.

Reviewed By: int3, #lld-macho

Differential Revision: https://reviews.llvm.org/D123752
2022-05-03 21:01:03 -04:00
Joseph Huber 46a5a8029e [OpenMP] Fix save-temps name in linker wrapper
Summary:
The wrapped registration code had a typo in the save-temps version of
the name.
2022-05-03 20:51:05 -04:00
Philip Reames dbe716e874 [riscv] Add vsetvli tests involving moves to/from scalar regs 2022-05-03 17:25:35 -07:00
Philip Reames dbbbc9e2ca [riscv] Add a couple more vsetvli tests 2022-05-03 16:49:52 -07:00
Weverything 0e86cddf98 [psuedo] Fix for unused warning by moving code into debug macro. 2022-05-03 16:07:59 -07:00
Weverything 3dd00461f9 [trace][intelpt] Fix out-of-bounds access.
The StringRef single argument constructor expects a null-terminated
string.  Explicitly pass the size to prevent reading pass the end
of the array.
2022-05-03 16:07:58 -07:00
Matt Arsenault c4e5a24dd6 ARM: Fix using undefined virtual registers in test
The verifier apparently doesn't work correctly and should have
caught this.
2022-05-04 00:05:49 +01:00
Matt Arsenault 994c96aef6 ARM: Cleanup MIR test
Drop IR section, renumber registers, regenerate to use -NEXT
2022-05-04 00:05:15 +01:00
Matt Arsenault 574ca03ef3 AMDGPU: Remove some invalid kill flags in tests
These killed registers need to be live out of the block but the
verifier wasn't catching it.
2022-05-04 00:05:15 +01:00
Matt Arsenault 5dfe4b7cf2 AMDGPU: Regenerate test checks 2022-05-04 00:05:15 +01:00
Matt Arsenault 241ca47db5 llvm-reduce: Reduce includes 2022-05-04 00:05:15 +01:00
Amir Ayupov 1d5263c554 [BOLT][TEST] Fix test failures on AArch64 builder
Address X86 tests failures on AArch64 builder:
https://lab.llvm.org/staging/#/builders/211/builds/82

Inputs fail to cross-compile due to a missing header:
```
/usr/include/stdio.h:27:10: fatal error: 'bits/libc-header-start.h' file not found
#include <bits/libc-header-start.h>
```

As inputs are linked with `-nostdlib` anyway, don't include stdio.h.

Reviewed By: yota9

Differential Revision: https://reviews.llvm.org/D124863
2022-05-03 15:39:43 -07:00
Alex Borcan afaa56df7a Implement support for __llvm_addrsig for MachO in llvm-mc
The __llvm_addrsig section is a section that the linker needs for safe icf.
This was not yet implemented for MachO - this is the implementation.
It has been tested with a safe deduplication implementation inside lld.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D123751
2022-05-03 18:19:18 -04:00
Jonas Devlieghere b945b62cf3
[lldb] Add a function to check if lldb is running in an interactive session
This patch adds a function to check if lldb is running in an interactive
debug session. Currently this API only works on macOS. It's expected to
be used in combination with Host::OpenFileInExternalEditor.

Differential revision: https://reviews.llvm.org/D124872
2022-05-03 15:11:57 -07:00
Jonas Devlieghere 3d08c778c0
[lldb] Session transcript should use the async debugger streams
When writing out the session transcript, print output to the
asynchronous debugger stream to prevent it from potentially interleaving
with other output.

Differential revision: https://reviews.llvm.org/D124873
2022-05-03 15:11:57 -07:00
Aart Bik 2617f2f708 [mlir][sparse] fix build issue with unused local under opt builds
Reviewed By: rdzhabarov

Differential Revision: https://reviews.llvm.org/D124883
2022-05-03 14:55:32 -07:00
Jon Roelofs e1c808b36e Fix zero-width bitfield extracts to emit 0
Fixes #55129
2022-05-03 14:46:42 -07:00
Chris Bieneman 15d20b9764 Fix DXBC magic parsing
This gets identify_magic working correctly for DXContainer files
2022-05-03 14:41:48 -07:00
Philip Reames 2982d0032b Fix a buildbot warning [nfc] 2022-05-03 14:40:27 -07:00
Aart Bik 1abcdc677c [mlir][sparse] add missing types to from/to-MLIR conversion routines
This will enable our usual set of element types in external
environments, such as PyTACO support.

Reviewed By: bixia

Differential Revision: https://reviews.llvm.org/D124875
2022-05-03 14:36:37 -07:00
Yangguang Li 3a8266902b [SCEV] Removed an unnecessary assertion
The assertion is to check we always get backedge taken count
(`BECount`) of zero when the exit condition is in select form
(`isa<BinaryOperation>(ExitCond)`) and the exit limit for the
first operand is zero `EL0.ExactNotTaken->isZero()`). However
the assertion is checking that the exit condition is NOT in
select form. Removing the the whole assertion since we now handle
select form in ScalarEvolution::getSequentialMinMaxExpr.

Reviewed By: reames, nikic

Differential Revision: https://reviews.llvm.org/D122835
2022-05-03 17:26:27 -04:00
Stella Stamenova 5f14aee3bb [mlir] Fix Visual Studio warnings
There are only a couple of warnings when compiling with VS on Windows. This fixes the last remaining warnings so that we can enable LLVM_ENABLE_WERROR on the mlir windows bot.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D124862
2022-05-03 14:12:15 -07:00
Benjamin Kramer 9eccc7357e [bazel] Fix the build after 2c33266084 2022-05-03 23:04:10 +02:00
Philip Reames be50b8c185 [riscv] Add debug printing support for VSETVLIInfo class [nfc] 2022-05-03 14:00:17 -07:00
Jim Kitchen 2c33266084 [mlir][sparse] Add lowering for unary and binary ops
Adding lowering for Unary and Binary required several changes due to
their unique nature of containing custom code for different "regions"
of the sparse structure being operated on. Along with a Kind, a pointer
to the Operation is passed along to be merged once the lattice
structure is figured out.

The original operation is maintained, as it is required for subsequent
lattice decisions. However, sparse_tensor.binary has some branches
are considered as fully handled and therefore are marked with as
kBinaryBranch to distinguish them.

A unique aspect of the custom code is that sometimes the desired result
is no result at all -- i.e. a user wants overlapping sparse entries to
become empty in the output. The solution to this is to return an
uninitialized Value(), which is checked and handled elsewhere in the
code and results in nothing being written to the output tensor for that
case.

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D123057
2022-05-03 15:50:26 -05:00
Haojian Wu c4546091ed [pseudo] Use a real language option in the parser.
Differential Revision: https://reviews.llvm.org/D124831
2022-05-03 22:24:56 +02:00
Sanjay Patel 432c199e84 [InstCombine] move shuffle after min/max with same-shuffled operands
This is an intrinsic version of the existing fold for binops.
As a first step, I only allowed min/max, but the code is set
up to make adding more intrinsics easy (with more or less than
2 arguments).

This (and possible follow-ups) are discussed in issue #46238.
2022-05-03 16:23:11 -04:00
Sanjay Patel a47e03685b [InstCombine] add tests for min/max with shuffled operands; NFC
Issue #46238
2022-05-03 16:23:11 -04:00
David Pagan 37471cf2c3 [clang][OpenMP] Local variable alignment incorrect with align clause
If alignment specified with align clause is less than natural alignment for
list item type, the alignment should be set to the natural alignment.

See OMP5.1 specification, page 185, lines 7-10

Differential Revision: https://reviews.llvm.org/D124676
2022-05-03 13:10:01 -07:00
Haojian Wu ed1b32791d [pseudo] Print the GSS::Node details when the unittest fails, NFC. 2022-05-03 22:06:10 +02:00
Hansang Bae 7e23b46ab8 [OpenMP] Possible fix for sporadic test failure from loop_dispatch.c
This patch tries to fix sporadic test failure after the change
https://reviews.llvm.org/D122107.
Made the test wait until every thread has at least one loop iteration.

Differential Revision: https://reviews.llvm.org/D124812
2022-05-03 14:46:32 -05:00
Amir Ayupov 39492ba5d6 Revert "[BOLT][TEST] Fix test failures on AArch64 builder"
This reverts commit 88b6d3211c.
2022-05-03 12:45:15 -07:00
Amir Ayupov 88b6d3211c [BOLT][TEST] Fix test failures on AArch64 builder
Address X86 tests failures on AArch64 builder:
https://lab.llvm.org/staging/#/builders/211/builds/82

Inputs fail to cross-compile due to a missing header:
```
/usr/include/stdio.h:27:10: fatal error: 'bits/libc-header-start.h' file not found
#include <bits/libc-header-start.h>
```

As inputs are linked with `-nostdlib` anyway, don't include stdio.h.

Reviewed By: yota9

Differential Revision: https://reviews.llvm.org/D124863
2022-05-03 12:42:30 -07:00
Duncan P. N. Exon Smith c1e17c7dfe ExtractAPI: Use %clang_cc1 and -verify in enum.c
Fix one test (enum.c) in ExtractAPI to use %clang_cc1 and -verify
instead of calling the full driver and FileCheck. This is an example for
my comment from https://reviews.llvm.org/D121873.

Differential Revision: https://reviews.llvm.org/D124634
2022-05-03 11:57:24 -07:00
Richard Smith c7ecfadf9b Fix some places where PseudoObjectExpr handling assumed that a
PseudoObjectExpr is only used for ObjC properties and subscripts.

For now, these assumptions are generally correct, but that's not part of
the design of PseudoObjectExpr. No functionality change intended.
2022-05-03 11:55:14 -07:00
David Kreitzer 29f70e3e7d Minor correction in bitreverse intrinsic semantics
Differential Revision: https://reviews.llvm.org/D124861
2022-05-03 11:41:10 -07:00
owenca 397188036d [clang-format][NFC] Clean up tryToParseLambdaIntroducer()
Differential Revision: https://reviews.llvm.org/D124818
2022-05-03 11:36:38 -07:00
LLVM GN Syncbot 88962f536f [gn build] Port 9f38da258e 2022-05-03 18:28:46 +00:00
Haojian Wu 9f38da258e [pseudo] Implement the GLR parsing algorithm.
This patch implements a standard GLR parsing algorithm, the
core piece of the pseudoparser.

- it parses preprocessed C++ code, currently it supports correct code
  only and parse them as a translation-unit;
- it produces a forest which stores all possible trees in an efficient
  manner (only a single node being build for per (SymbolID, Token Range));
  no disambiguation yet;

Reland with a fix for g++'s -fpermissive error on previous declaration `GSS& GSS;`.

Differential Revision: https://reviews.llvm.org/D121150
2022-05-03 20:25:23 +02:00
Bill Wendling f2639cf3fe [randstruct] Move initializer check to be more effective
If a randomized structure has an initializer with a dedicated
initializer in it, the field initialzed by that dedicated initializer
may end up at the end of the RecordDecl. This however may skip the
random layout initization check.

  struct t {
     int a, b, c, d, e;
  } x = { .a = 2, 4, 5, 6 };

Let's say that "a" is lands as the last field after randomization. The
call to CheckDesignatedInitializer sets the iterator to the end of the
initializer list. During the next iteration of the initializer list
check, it detects that and fails to issue the error about initializing
a randomized struct with non-designated initializer. Instead, it issues
an error about "excess elements in struct initializer", which is
confusing under these circumstances.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D124694
2022-05-03 11:23:12 -07:00
Dave Lee 2f9fc576be [lldb] Add setting for max depth of value object printing (NFC)
This adds a setting (`target.max-children-depth`) that will provide a default value for the `--depth` flag used by `expression` and `frame variable`.

The new setting uses the same default that's currently fixed in source: `UINT32_MAX`.

This provides two purposes:

1. Allowing downstream forks to provide a customized default.
2. Allowing users to set their own default.

Following `target.max-children-count`, a warning is emitted when the max depth is reached. The warning lets users know which flags or settings they can customize. This warning is shown only when the limit is the default value.

rdar://87466495

Differential Revision: https://reviews.llvm.org/D123954
2022-05-03 10:39:42 -07:00