- Jun 25, 2022
-
-
Xing Xue authored
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
-
Wei Yi Tee authored
[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
-
Kirill Okhotnikov authored
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. ```
-
Fangrui Song authored
This reverts commit 4817b772. It caused some `^/\n` and had some objection about its readability improvement.
-
Philip Reames authored
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.
-
Philip Reames authored
Both of these are only reached if useRVVForFixedLengthVectors is true. Given that, we know that getRealMinVLen() == getMinRVVVectorSizeInBits().
-
Wei Yi Tee authored
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
-
Alexander Yermolovich authored
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
-
Thomas Raoux authored
When creating a scf.for without argument a scf.yield is automatically created. Make sure we don't create a second one. Differential Revision: https://reviews.llvm.org/D128405
-
Philip Reames authored
This doesn't change behavior, it just makes it slightly more obvious what's going on. Note that getRealMinVLen is always >= getMinRVVVectorSizeInBits. The first case is a bit tricky, as you have to know that getMinRVVVectorSizeInBits returns 0 when not set, and thus is equivalent to the else value clause. The new code structure makes it more obvious we return 0 unless using RVV for fixed length vectors.
-
Valentin Clement authored
Lower the `parallel loop` contrsuct and refactor some of the code of parallel and loop lowering to be reused. Also add tests for loop and parallel since they were not upstreamed. This patch is part of the upstreaming effort from fir-dev branch. Reviewed By: PeteSteinfeld Differential Revision: https://reviews.llvm.org/D128510
-
Valentin Clement authored
In merge FSOURCE and TSOURCE must have the same Fortran dynamic types, but this does not imply that FSOURCE and TSOURCE will be lowered to the same MLIR types. For instance, TSOURCE may be a character expression with a compile type constant length (!fir.char<1,4>) while FSOURCE may have dynamic length (!fir.char<1,?>). Cast FSOURCE to TSOURCE MLIR types to handle these cases. This patch is part of the upstreaming effort from fir-dev branch. Reviewed By: PeteSteinfeld Differential Revision: https://reviews.llvm.org/D128507 Co-authored-by:
Jean Perier <jperier@nvidia.com>
-
Mitch Phillips authored
Currently, `__attribute__((no_sanitize('hwaddress')))` is not possible. Add this piece of plumbing, and now that we properly support copying attributes between an old and a new global variable, add a regression test for the GlobalOpt bug that previously lost the attribute. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D127544 -
Mitch Phillips authored
Globals that shouldn't be sanitized are currently communicated to HWASan through the use of the llvm.asan.globals IR metadata. Now that we have an on-GV attribute, use it. Reviewed By: pcc Differential Revision: https://reviews.llvm.org/D127543
-
Valentin Clement authored
Explicitly map host associated symbols in DoConcurrent with shared locality-spec, clauses in OpenMP/OpenACC. The mapping of host-assoc symbols is set to their parent SymbolBox. This is achieved through a new interface function in the AbstractConverter. This was already upstream for OpenMP. This patch is part of the upstreaming effort from fir-dev branch. Reviewed By: PeteSteinfeld Differential Revision: https://reviews.llvm.org/D128518 Co-authored-by:
Kiran Chandramohan <kiran.chandramohan@arm.com>
-
Thomas Raoux authored
Small change to relax the pattern to support any vector containing a single element. Differential Revision: https://reviews.llvm.org/D128545
-
Valentin Clement authored
LBOUND with a non constant DIM argument use the runtime to allow runtime verification of DIM <= RANK. The interface uses a descriptor. This caused undefined behavior because the runtime believed it was seeing an explicit shape arrays with zero extent and returned `1` (the runtime descriptor does not allow making a difference between an explicit shape and an assumed size. Assumed size are not meant to be described by runtime descriptors). Fix the issue by setting the last extent of assumed size to `1` when creating the descriptor to inquire about the LBOUND with the runtime. This patch is part of the upstreaming effort from fir-dev branch. Reviewed By: PeteSteinfeld Differential Revision: https://reviews.llvm.org/D128509 Co-authored-by:
Jean Perier <jperier@nvidia.com>
-
Philip Reames authored
We currently have a costing bug around the etype == ELEN case, so add otherwise duplicate tests to show test diffs as I work on other parts of costing.
-
Venkata Ramanaiah Nalamothu authored
The requirements for "thread until <line number>" are: a) If any code contributed by <line number> or the nearest subsequent of <line number> is executed before leaving the function, stop b) If you end up leaving the function w/o triggering (a), then stop In case of (a), since the <line number> may have multiple entries in the line table and the compiler might have scheduled/moved the relevant code across, and the lldb does not know the control flow, set breakpoints on all the line table entries of best match of <line number> i.e. exact or the nearest subsequent line. Along with the above, currently, CommandObjectThreadUntil is also setting the breakpoints on all the subsequent line numbers after the best match and this latter part is wrong. This issue is discussed at http://lists.llvm.org/pipermail/lldb-dev/2018-August/013979.html. In fact, currently `TestStepUntil.py` is not actually testing step until scenarios and `test_missing_one` test fails without this patch if tests are made to run. Fixed the test as well. Reviewed By: jingham Differential Revision: https://reviews.llvm.org/D50304
-
Fangrui Song authored
The convention does not add //\n. Having all RUN/CHECK lines separated by //\n makes editor movement difficult (e.g. { } in Vim). -
Jonas Devlieghere authored
The definition of Host::SystemLog was (unintentionally) guarded by !defined(_WIN32).
-
Aart Bik authored
Putting some direct use restrictions on tensor allocations in the sparse case enables the use of simplifying assumptions in the bufferization analysis. Reviewed By: springerm Differential Revision: https://reviews.llvm.org/D128463
-
Jonas Devlieghere authored
Because the diagnostic events are processed by the default event handler in its own thread, tests cannot rely on output ordering. Split stdout and stderr to make the test reliable again.
-
Jonas Devlieghere authored
Add a system log handler that emits log messages to the operating system log. In addition to the log handler itself, this patch also introduces a new Host::SystemLog helper function to abstract over writing to the system log. Differential revision: https://reviews.llvm.org/D128321
-
David Blaikie authored
Reverting to simplify some Google-internal rollout issues. Will recommit in a week or two. This reverts commit 517bbc64.
-
Mingming Liu authored
The annotation is flag gated; flag is turned off by default. Differential Revision: https://reviews.llvm.org/D125495
-
Daniel Douglas authored
This patch changes the default behavior to avoid spin waiting and yielding. (See “Don’t Keep Threads Active And Idle” section here: https://developer.apple.com/documentation/apple-silicon/tuning-your-code-s-performance-for-apple-silicon) We verified using instruments traces that the changes improve scheduling behavior on macOS. We also collected results using EPCC schedbench (https://github.com/LangdalP/EPCC-OpenMP-micro-benchmarks) that are attached here that show a reduction in standard deviation and max test run time across all scheduling types. Static scheduling sees dramatic improvements with these changes, we see a 2-4x average runtime improvement in the benchmark. Differential Revision: https://reviews.llvm.org/D126510
-
Fazlay Rabbi authored
This patch gives basic parsing and semantic support for "masked taskloop" construct introduced in OpenMP 5.1 (section 2.16.7) Differential Revision: https://reviews.llvm.org/D128478
-
Eli Friedman authored
We were marking definitions, but not declarations. Marking declarations makes computing the address more efficient. Fixes issue reported at https://discourse.llvm.org/t/63090 Differential Revision: https://reviews.llvm.org/D128482
-
Akira Hatanaka authored
This fixes a bug in clang where it emits the following diagnostic when compiling the test case: "argument to 'sizeof' in 'memset' call is the same pointer type 'S' as the destination" The code that merges __auto_type with other types was committed in https://reviews.llvm.org/D122029. Differential Revision: https://reviews.llvm.org/D128373
-
Richard authored
- Sort changes to existing checks by check name - Correct check link
-
Jonas Devlieghere authored
As it exists today, Host::SystemLog is used exclusively for error reporting. With the introduction of diagnostic events, we have a better way of reporting those. Instead of printing directly to stderr, these messages now get printed to the debugger's error stream (when using the default event handler). Alternatively, if someone is listening for these events, they can decide how to display them, for example in the context of an IDE such as Xcode. This change also means we no longer write these messages to the system log on Darwin. As far as I know, nobody is relying on this, but I think this is something we could add to the diagnostic event mechanism. Differential revision: https://reviews.llvm.org/D128480
-
Alexey Bataev authored
Improved/fixed cost modeling for shuffles by providing masks, improved cost model for non-identity insertelements. Differential Revision: https://reviews.llvm.org/D115462
-
Joshua Root authored
The result of pointer subtraction is of type ptrdiff_t, which is not necessarily the same underlying type as ssize_t. This can lead to a compilation error since std::min requires both parameters to be the same type. Fixes: https://github.com/llvm/llvm-project/issues/54846 Reviewed By: alexander-shaposhnikov, drodriguez, jhenderson Differential Revision: https://reviews.llvm.org/D128117
-
Arthur Eubanks authored
The initial land incorrectly optimized forwarding non-Constants in non-nosync/norecurse functions. Bail on non-Constants since norecurse should cause global -> alloca promotion anyway. The initial land also incorrectly assumed that StoredOnceStore was the only store to the global, but it actually means that only one value other than the global initializer is stored. Add a check that there's only one store. Compile time tracker: https://llvm-compile-time-tracker.com/compare.php?from=c80b88ee29f34078d2149de94e27600093e6c7c0&to=ef2c2b7772424b6861a75e794f3c31b45167304a&stat=instructions Reviewed By: nikic, asbirlea, jdoerfert Differential Revision: https://reviews.llvm.org/D128128
-
Casey Carter authored
... per N4910 [thread.barrier.class]/5.
-
Siva Chandra Reddy authored
Also, the unused specializations of __int128_t have been removed. Differential Revision: https://reviews.llvm.org/D128304
-
- Jun 24, 2022
-
-
Philip Reames authored
-
Philip Reames authored
[RISCV] Modify a test line so it exercises the intended configuration once we turn on scalable vectorization
-
Peter Collingbourne authored
GOT references to absolute symbols can't be relaxed to use ADRP/ADD in position-independent code because these instructions produce a relative address. Differential Revision: https://reviews.llvm.org/D128492
-