Commit Graph

428137 Commits

Author SHA1 Message Date
Kazu Hirata f8c1c9afd3 [mlir] Fix a warning
This patch fixes:

  llvm-project/mlir/lib/Dialect/Linalg/Transforms/SplitReduction.cpp:300:26:
  error: comparison of integers of different signs: 'int64_t' (aka
  'long') and 'size_t' (aka 'unsigned long') [-Werror,-Wsign-compare]
2022-06-25 09:18:04 -07:00
Jacques Pienaar 701051a8c2 [mlir][shape] Switch types to ODS generated (NFC)
These were already pretty simple, so just switching to generated.
2022-06-25 09:06:52 -07:00
Matt Arsenault e7bc73739a GlobalISel: Make LoadStoreOpt preserve all
Avoids dropping CSE info analysis
2022-06-25 09:24:54 -04:00
Matt Arsenault 341e03f9f3 X86: Regenerate test checks 2022-06-25 09:24:53 -04:00
Matt Arsenault a397846cb0 CodeGen: Use else if between Value and PseudoSourceValue cases
These are mutually exclusive.
2022-06-25 09:24:25 -04:00
Arjun P 8a7ead691b [MLIR][Presburger] Support computing a representation of a set that only has locals that are divs
This paves the way for integer-exact projection, and for supporting
non-division locals in subtraction, complement, and equality checks.

Reviewed By: Groverkss

Differential Revision: https://reviews.llvm.org/D127463
2022-06-25 14:23:32 +01:00
Michał Górny 1452e2e5cb Reland "[lldb] [llgs] Support multiprocess in qfThreadInfo"
Now preserving the non-standard behavior of returning "OK" response
when there is no debugged process.

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.llvm.org/D128152
2022-06-25 15:15:37 +02:00
sstwcw 1f69f7ea9a [clang-format] NFC Sort names of format token types
Suggested by HazardyKnusperkeks in D126845.

Reviewed By: HazardyKnusperkeks, owenpan

Differential Revision: https://reviews.llvm.org/D126934
2022-06-25 12:09:49 +00:00
Rainer Orth b4ae67fffa [asan][test] XFAIL global-location-nodebug.cpp on Solaris
A new test `FAIL`s on Solaris:

  FAIL: AddressSanitizer-i386-sunos ::
TestCases/global-location-nodebug.cpp (465 of 64279)
  FAIL: AddressSanitizer-i386-sunos-dynamic ::
TestCases/global-location-nodebug.cpp (961 of 64279)

The problem is the unconditional use of `-Wl,-S`:

  ld: fatal: dlopen() of support library (-lstdc++) failed with error:
ld.so.1: ld: -lstdc++: open failed: No such file or directory

`ld -S` has a completely different semantics compared to GNU `ld
-S`/`--strip-debug`: specify a link-edit support library.  To avoid this,
I've chosen to `XFAIL` the test.

Tested on `amd64-pc-solaris2.11`.

Differential Revision: https://reviews.llvm.org/D128516
2022-06-25 10:40:11 +02:00
Michał Górny f609b54e24 Revert "[lldb] [llgs] Support multiprocess in qfThreadInfo"
This reverts part of commit 75757c86c6.
It broke the following test:

  commands/target/auto-install-main-executable/TestAutoInstallMainExecutable.py

I need more time to figure it out, so I'm reverting the code changes
and marking the tests depending on them xfail.
2022-06-25 09:46:28 +02:00
Pavel Samolysov 6e3d4712b9 [DeadArgElim] Replace insert with emplace (NFC) 2022-06-25 10:31:27 +03:00
Valentin Clement 575eb2133b
[flang] Use descriptors for real/complex input other than kinds 4 and 8
This patch is part of the upstreaming effort from fir-dev branch.

Reviewed By: PeteSteinfeld, vdonaldson

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

Co-authored-by: V Donaldson <vdonaldson@nvidia.com>
2022-06-25 09:19:34 +02:00
Siva Chandra Reddy 4965cea2f3 [libc] Add compound assignment and pre-increment operators to UInt. 2022-06-25 06:38:24 +00:00
Fangrui Song 262b4091f9 [Driver] Fix -fstrict-flex-arrays= help message after D126864 2022-06-24 22:20:37 -07:00
Fangrui Song 572b08790a [clang] Add back -fsanitize=array-bounds workaround for size-1 array after -fstrict-flex-arrays change
Before C99 introduced flexible array member, common practice uses size-1 array
to emulate FAM, e.g. https://github.com/python/cpython/issues/94250
As a result, -fsanitize=array-bounds instrumentation skipped such structures
as a workaround (from 539e4a77bb).

D126864 accidentally dropped the workaround. Add it back with tests.
2022-06-24 22:15:47 -07:00
Siva Chandra Reddy a83034ef2b [libc][Obvious] Compare values of the same type in memory_utils/backend_test. 2022-06-25 04:50:04 +00:00
Siva Chandra Reddy bcdd9fbf08 [libc][Obvious] Fix incorrect nested namespace name. 2022-06-25 04:47:21 +00:00
Siva Chandra Reddy 66a6c1073a [libc] Add a cacheline size of arm target.
It is set arbitrarily at 32 now. It can be adjusted as required in
future.
2022-06-25 04:42:40 +00:00
Petr Hosek f3caa98e49 Revert "[CMake][compiler-rt] Clean up the use of libcxx and libcxxabi"
This reverts commit 4164cfa537 since
it broke the clang-x86_64-debian-fast builder:

  https://lab.llvm.org/buildbot/#/builders/109/builds/41339
2022-06-25 03:10:55 +00:00
Petr Hosek 4164cfa537 [CMake][compiler-rt] Clean up the use of libcxx and libcxxabi
We no longer support the use of LLVM_ENABLE_PROJECTS for libcxx and
libcxxabi. We don't use paths to libcxx and libcxxabi in compiler-rt.

Differential Revision: https://reviews.llvm.org/D126905
2022-06-25 02:53:43 +00:00
Shao-Ce SUN 529f05cdbb [RISCV][MC] Fold UIMM related code
Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D128495
2022-06-25 10:50:50 +08:00
Björn Schäpers b3aeca3962 [clang-format] Further improve requires clause detection
If there is a typeish token before the requires, it can't be a requires
expression.

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

Differential Revision: https://reviews.llvm.org/D128496
2022-06-25 04:43:38 +02:00
Petr Hosek 72ec31afad [CMake] Use set rather than list PREPEND
list PREPEND is only supported since CMake 3.15.

Differential Revision: https://reviews.llvm.org/D128548
2022-06-25 02:19:55 +00:00
Min-Yih Hsu 1f62e245e6 [MCA][unittest] Hot fix for -Wpessimizing-move on test harness
Hot fix for -Wpessimizing-move build errors regarding MCA unit test
harness introduced in 97579dcc6d.
2022-06-24 18:31:27 -07:00
Jonas Devlieghere be265d25ca
[lldb] Add support for specifying a log handler
This patch adds a new flag to `log enable`, allowing the user to specify
a custom log handler. In addition to the default (stream) handler, this
allows using the circular log handler (which logs to a fixed size,
in-memory circular buffer) as well as the system log handler (which logs
to the operating system log).

Differential revision: https://reviews.llvm.org/D128323
2022-06-24 18:24:00 -07:00
Mircea Trofin 7ae92a69c2 [MLInliner] No need to invalidate everything post-inlining.
We really just need to invalidate loop info and the dominator tree, in
addition to the FunctionPropertiesInfo we were invalidating originally.
Doing more adds unnecessary compile time overhead.
2022-06-24 18:22:06 -07:00
LLVM GN Syncbot 73709fe09c [gn build] Port b847692ed8 2022-06-25 01:03:12 +00:00
Nico Weber 012412d192 [gn build] (manually) port 97579dcc6d (LLVMMCATests)
The CMake code makes a number of imho strange choices. I pointed those
out on https://reviews.llvm.org/D127083.

The GN build mirrors the CMake build's choices for now.
2022-06-24 21:02:35 -04:00
lewuathe bd861056a5 [mlir][affine] Rigorous check for loop unrolling store operation
Static loop unrolling does not change the operation type. We can rigorously make sure to use affine.store in the check.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D128237
2022-06-25 09:30:43 +09:00
Fabian Parzefall 96f6ec5090 [BOLT] Mark option values of --split-functions deprecated
The SplitFunctions pass does not distinguish between various splitting
modes anymore. This change updates the command line interface to
reflect this behavior by deprecating values passed to the
--split-function option.

Reviewed By: rafauler

Differential Revision: https://reviews.llvm.org/D128558
2022-06-24 17:01:13 -07:00
lewuathe d72d488039 [mlir][quant] output spec verification check for quant.region
We can have validation test for quant.region having incompatible output spec.

Reviewed By: stellaraccident

Differential Revision: https://reviews.llvm.org/D128245
2022-06-25 08:57:44 +09:00
Philip Reames 4710e78974 [RISCV] Implement RISCVTTIImpl::getMaxVScale correctly
The comments in the existing code appear to pre-exist the standardization of the +v extension. In particular, the specification *does* provide a bound on the maximum value VLEN can take. From what I can tell, the LMUL comment was simply a misunderstanding of what this API returns.

This API returns the maximum value that vscale can take at runtime. This is used in the vectorizer to bound the largest scalable VF (e.g. LMUL in RISCV terms) which can be used without violating memory dependence.

Differential Revision: https://reviews.llvm.org/D128538
2022-06-24 16:51:53 -07:00
Kirill Okhotnikov 27aca975b6 [libc][math] Fix broken compilation due to __builtin_inf/nan functions. 2022-06-25 01:39:32 +02:00
Min-Yih Hsu 87805d6a24 [MCA] Hot fix for -Wmismatched-tags errors on mca::SourceMgr
Hot fix for -Wmismatched-tags build errors regarding mca::SourceMgr
changes introduced in 97579dcc6d.
2022-06-24 16:14:18 -07:00
Min-Yih Hsu b847692ed8 [MCA] Allow mca::Instruction-s to be recycled and reused
This patch introduces a new feature that allows InstrBuilder to reuse
mca::Instruction recycled from IncrementalSourceMgr. This significantly
reduces the memory footprint.
Note that we're only recycling instructions that have static InstrDesc
and no variadic operands.

Differential Revision: https://reviews.llvm.org/D127084
2022-06-24 15:39:51 -07:00
Min-Yih Hsu 97579dcc6d [MCA] Introducing incremental SourceMgr and resumable pipeline
The new resumable mca::Pipeline capability introduced in this patch
allows users to save the current state of pipeline and resume from the
very checkpoint.
It is better (but not require) to use with the new IncrementalSourceMgr,
where users can add mca::Instruction incrementally rather than having a
fixed number of instructions ahead-of-time.

Note that we're using unit tests to test these new features. Because
integrating them into the `llvm-mca` tool will make too many churns.

Differential Revision: https://reviews.llvm.org/D127083
2022-06-24 15:39:51 -07:00
Petr Hosek 048e6bb46b [CMake][compiler-rt] Treat target cflags as list rather than string
This is need after 30dfe016d4.

Differential Revision: https://reviews.llvm.org/D128548
2022-06-24 22:37:00 +00:00
Wei Yi Tee 0f65a3e610 [clang][dataflow] Implement functionality to compare if two boolean values are equivalent.
`equivalentBoolValues` compares equivalence between two booleans. The current implementation does not consider constraints imposed by flow conditions on the booleans and its subvalues.

Depends On D128520

Reviewed By: gribozavr2, xazax.hun

Differential Revision: https://reviews.llvm.org/D128521
2022-06-25 00:10:35 +02:00
Wei Yi Tee 42a7ddb428 [clang][dataflow] Refactor function that queries the solver for satisfiability checking.
Given a set of `Constraints`, `querySolver` adds common background information across queries (`TrueVal` is always true and `FalseVal` is always false) and passes the query to the solver.

`checkUnsatisfiable` is a simple wrapper around `querySolver` for checking that the solver returns an unsatisfiable result.

Depends On D128519

Reviewed By: gribozavr2, xazax.hun

Differential Revision: https://reviews.llvm.org/D128520
2022-06-25 00:05:43 +02:00
Kirill Okhotnikov 349fee08d5 [libc][math] Fix broken aarch64 due to clz refactoring. 2022-06-24 23:59:26 +02:00
Mitch Phillips 243fc3daf6 fix-forward hwasan-globals.cpp (round 2)
Just force the aarch64 target compilation (after making sure the test
only runs if that target is available).

Because global metadata isn't target-specific, just selecting a target
here is fine.

Should fix https://reviews.llvm.org/D127544#3609312
2022-06-24 14:49:37 -07:00
Mitch Phillips fadc98b06b Don't run hwasan-globals.cpp test on non-x86/aarch64
Fix-forward for https://reviews.llvm.org/D127544#3609312

IR pass has some target-specific inline asm lowering that check-fails
for non-x86 non-aarch64 targets.

For now, just run these tests only on those targets.
2022-06-24 14:33:41 -07:00
Xing Xue 60f7bdfd03 [libc++][AIX] Make basic_string layout compatible with earlier version
Summary:
Patch D123580 changed to use bit fields for strings in long and short mode. As a result, this changes the layout of these strings on AIX because bit fields on AIX are 4 bytes, which breaks the ABI compatibility with earlier strings before the change on AIX. This patch uses the attribute 'packed' and anonymous structure to make string layout compatible. This patch will also make test cases alignof.compile.pass.cpp and sizeof.compile.pass.cpp introduced in D127672 pass on AIX.

Reviewed by: philnik, Mordante, hubert.reinterpretcast, libc++

Differential Revision: https://reviews.llvm.org/D128285
2022-06-24 17:25:15 -04:00
Wei Yi Tee 00e9d53453 [clang][dataflow] Move logic for creating implication and iff expressions into `DataflowAnalysisContext` from `DataflowEnvironment`.
To keep functionality of creating boolean expressions in a consistent location.

Depends On D128357

Reviewed By: gribozavr2, sgatev, xazax.hun

Differential Revision: https://reviews.llvm.org/D128519
2022-06-24 23:16:44 +02:00
Kirill Okhotnikov b8e8012aa2 [libc][math] fmod/fmodf implementation.
This is a implementation of find remainder fmod function from standard libm.
The underline algorithm is developed by myself, but probably it was first
invented before.
Some features of the implementation:
1. The code is written on more-or-less modern C++.
2. One general implementation for both float and double precision numbers.
3. Spitted platform/architecture dependent and independent code and tests.
4. Tests covers 100% of the code for both float and double numbers. Tests cases with NaN/Inf etc is copied from glibc.
5. The new implementation in general 2-4 times faster for “regular” x,y values. It can be 20 times faster for x/y huge value, but can also be 2 times slower for double denormalized range (according to perf tests provided).
6. Two different implementation of division loop are provided. In some platforms division can be very time consuming operation. Depend on platform it can be 3-10 times slower than multiplication.

Performance tests:

The test is based on core-math project (https://gitlab.inria.fr/core-math/core-math). By Tue Ly suggestion I took hypot function and use it as template for fmod. Preserving all test cases.

`./check.sh <--special|--worst> fmodf` passed.
`CORE_MATH_PERF_MODE=rdtsc ./perf.sh fmodf` results are

```
GNU libc version: 2.35
GNU libc release: stable
21.166 <-- FPU
51.031 <-- current glibc
37.659 <-- this fmod version.
```
2022-06-24 23:09:14 +02:00
Fangrui Song 5c29ffda90 Revert "[Driver][test] Replace ^//$ with empty string"
This reverts commit 4817b7729a.

It caused some `^/\n` and had some objection about its readability improvement.
2022-06-24 13:52:27 -07:00
Philip Reames a0443dd47c [RISCV] Simplify 16 bit index handling in lowerVECTOR_REVERSE [nfc]
getRealMaxVLen returns an upper bound on the value of VLEN.  We can use this upper bound (which unless explicitly set at command line is going to result in a e8 MaxVLMax of much greater than 256) instead of explicitly handling the unknown case separately from the bounded by number greater than 256 case.

Note as well that this code already implicitly depends on a capped value for VLEN.  If infinite VLEN were possible, than 16 bit indices wouldn't be enough.
2022-06-24 13:08:39 -07:00
Philip Reames f1e1c3ce77 [RISCV] Replace two calls to getMinRVVVectorSizeInBits in fixed length lowering [nfc]
Both of these are only reached if useRVVForFixedLengthVectors is true.  Given that, we know that getRealMinVLen() == getMinRVVVectorSizeInBits().
2022-06-24 13:00:57 -07:00
Wei Yi Tee fb88ea6260 [clang][dataflow] Store flow condition constraints in a single `FlowConditionConstraints` map.
A flow condition is represented with an atomic boolean token, and it is bound to a set of constraints: `(FC <=> C1 ^ C2 ^ ...)`. \
This was internally represented as `(FC v !C1 v !C2 v ...) ^ (C1 v !FC) ^ (C2 v !FC) ^ ...` and tracked by 2 maps:
- `FlowConditionFirstConjunct` stores the first conjunct `(FC v !C1 v !C2 v ...)`
- `FlowConditionRemainingConjuncts` stores the remaining conjuncts `(C1 v !FC) ^ (C2 v !FC) ^ ...`

This patch simplifies the tracking of the constraints by using a single `FlowConditionConstraints` map which stores `(C1 ^ C2 ^ ...)`, eliminating the use of two maps.

Reviewed By: gribozavr2, sgatev, xazax.hun

Differential Revision: https://reviews.llvm.org/D128357
2022-06-24 21:52:16 +02:00
Alexander Yermolovich 11a8dd65ec [BOLT][DWARF] Add support for DW_AT_call_pc/DW_AT_call_return_pc
DWARF 5 added two new attributes DW_AT_call_pc and DW_AT_call_return_pc.
Adding support for them.

Reviewed By: maksfb

Differential Revision: https://reviews.llvm.org/D128526
2022-06-24 12:37:58 -07:00