- Aug 07, 2021
-
-
Florian Hahn authored
After refactoring the phi recipes, we can now iterate over all header phis in a VPlan to detect reductions when it comes to fixing them up when tail folding. This reduces the coupling with the cost model & legal by using the information directly available in VPlan. It also removes a call to getOrAddVPValue, which references the original IR value which may become outdated after VPlan transformations. Reviewed By: Ayal Differential Revision: https://reviews.llvm.org/D100102
-
Andrea Di Biagio authored
This is related to PR51392. Before this patch, the timeline view was rounding doubles to the first decimal, using a logic similar to this: ``` double AverageTime = (double)Input / CumulativeExecutions; double Result = floor((AverageTime * 10) + 0.5) / 10 ``` Here, Input and CumulativeExecutions are both unsigned integers. The last operation is what effectively performs the rounding of AverageTime. PR51392 has been raised because - under specific -m32 configurations of GCC - one of the timeline tests reports slighlty different values (due to a different rounding choice). This patch tries to minimise the propagation of floating-point error by hoisting the multiply by 10, so that it is performed on the unsigned. ``` double AverageTime = (double)(Input * 10) / CumulativeExecutions; floor(AverageTime + 0.5) / 10 ``` So we are trading a floating point multiply for a integer multiply (which can be expanded using a simple MUL or using an `ADD + LEA` sequence). This decrease in floating point operations executed should also help with decreasing the error in the computation.. Strictly speaking, that computation will always be potentially subject to error (depending on what values are passed in input). However, this patch should improve the situation and make bug like PR51392 less frequent.
-
Simon Atanasyan authored
-
Simon Atanasyan authored
This patch enables compressed input sections on big-endian targets by checking the target endianness and selecting an appropriate `Chdr` structure. Fixes PR51369 Differential Revision: https://reviews.llvm.org/D107635
-
Amara Emerson authored
We should use MachineInstr::eraseFromParentAndMarkDBGValuesForRemoval() instead of eraseFromParent(). We should probably use that in other places too but fix this issue which affects clang bootstrap builds for now.
-
Roger Ferrer Ibanez authored
We were using an OpaqueValueExpr allocated on the stack to store the size of a VLA. Because the VLASizeMap in CodegenFunction uses the address of the expression to avoid recomputing VLAs, we were accidentally reusing an earlier llvm::Value. This led to invalid LLVM IR. This is a temporary solution until VLASizeMap can be pushed and popped based on the context. Differential Revision: https://reviews.llvm.org/D107666
-
Nemanja Ivanovic authored
This commit adds the isnan intrinsic and provides a default expansion for it in the SDAG. However, it makes the assumption that types it operates on are IEEE-compliant types. This is not always the case. An example of that is PPC "double double" which has a representation that - Does not need to conform to IEEE requirements for isnan as it is not an IEEE-compliant type - Does not have a representation that allows for straightforward reinterpreting as an integer and use of integer operations The result was that this commit broke __builtin_isnan for ppc_fp128 making many valid numeric values report a NaN. This patch simply changes the expansion to always expand to unordered comparison (regardless of whether FP exceptions are tracked). This is inline with previous semantics.
-
Matt Jacobson authored
Reviewed by: benshi001 Differential Revision: https://reviews.llvm.org/D107672
-
Roland McGrath authored
The _zx_vmar_root_self function is not a system call but a libc function declared in a separate header. Reviewed By: gulfem Differential Revision: https://reviews.llvm.org/D107616
-
Jonas Devlieghere authored
Upstream support for NSConstantArray, NSConstantIntegerNumber, NSConstant{Float,Double}Number and NSConstantDictionary. We would've upstreamed this earlier but testing it requires -fno-constant-nsnumber-literals, -fno-constant-nsarray-literals and -fno-constant-nsdictionary-literals which haven't been upstreamed yet. As a temporary workaround use the system compiler (xcrun clang) for the constant variant of the tests. I'm just upstreaming this. The patch and the tests were all authored by Fred Riss. Differential revision: https://reviews.llvm.org/D107660 -
Sterling Augustine authored
This reverts commit 34d78b6a. This breaks build bots witha missing file: /home/worker/2.0.1/lldb-x86_64-debian/llvm-project/lldb/source/Plugins/Language/ObjC/Cocoa.cpp:10:10: fatal error: 'objc/runtime.h' file not found
-
Jim Ingham authored
The pointer to the dyld trie data structure which lldb needs to parse to get "trampoline kinds" on Darwin used to be a field in the LC_DYLD_INFO load command. A new load command was added recently dedicated to this purpose: LC_DYLD_EXPORTS_TRIE. The format of the trie did not change, however. So all we have to do is use the new command if present. The commands are supposed to be mutually exclusive, so I added an lldb_assert to warn if they are not. Differential Revision: https://reviews.llvm.org/D107673
-
Max Kudryavtsev authored
Perform scalar constant propagation for FPTruncOp only if the resulting value can be represented without precision loss or rounding. Example: %cst = constant 1.000000e+00 : f32 %0 = fptrunc %cst : f32 to bf16 --> %cst = constant 1.000000e+00 : bf16 Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D107518
-
Dave Airlie authored
These 3 are fairly simple, pipes, workgroups and subgroups. Reviewed By: Anastasia Differential Revision: https://reviews.llvm.org/D105858
-
Steffen Larsen authored
Adds NVPTX intrinsics for the CUDA PTX `ldmatrix.sync.aligned` instructions added in PTX 6.5. PTX ISA description of `ldmatrix.sync.aligned`: https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#warp-level-matrix-instructions-ldmatrix Authored-by:
Steffen Larsen <steffen.larsen@codeplay.com> Reviewed By: tra Differential Revision: https://reviews.llvm.org/D107046
-
Jonas Devlieghere authored
Upstream support for NSConstantArray, NSConstantIntegerNumber, NSConstant{Float,Double}Number and NSConstantDictionary. We would've upstreamed this earlier but testing it requires -fno-constant-nsnumber-literals, -fno-constant-nsarray-literals and -fno-constant-nsdictionary-literals which haven't been upstreamed yet. As a temporary workaround use the system compiler (xcrun clang) for the constant variant of the tests. I'm just upstreaming this. The patch and the tests were all authored by Fred Riss. Differential revision: https://reviews.llvm.org/D107660 -
Stanislav Mekhanoshin authored
The test shows excessive register pressure after the MachineLICM. This is a pre-commit for the patch fixing it. Differential Revision:
-
Jim Ingham authored
This provides a convenient way to limit a breakpoint to the current thread when setting it from the command line w/o having to figure out what the current thread is. Differential Revision: https://reviews.llvm.org/D107015
-
Paul Robinson authored
This reverts commit 100a7b61. Speculating that this is the reason behind a sanitizer failure: https://lab.llvm.org/buildbot/#/builders/37/builds/5945
-
Zequan Wu authored
-
Joseph Huber authored
After D94315 we add the `NoInline` attribute to the outlined function to handle data environments in the OpenMP if clause. This conflicted with the `AlwaysInline` attribute added to the outlined function. for better performance in D106799. The data environments should ideally not require NoInline, but for now this fixes PR51349. Reviewed By: mikerice Differential Revision: https://reviews.llvm.org/D107649
-
Sanjay Patel authored
There may be some generalizations (see test comments) of these patterns, but this should handle the cases motivated by: https://llvm.org/PR51315 https://llvm.org/PR51259 The backend may want to transform differently, but at least for the x86 examples that I looked at, there does not appear to be any significant perf diff either way.
-
Sanjay Patel authored
https://llvm.org/PR51315
-
Michael Liao authored
- Replace 'cmp+sel' with 'umin' if possible. Reviewed By: foad Differential Revision: https://reviews.llvm.org/D107507
-
Zequan Wu authored
Merge two versions of `initializeProfileForContinuousMode` function into one. Differential Revision: https://reviews.llvm.org/D107591
-
Nick Desaulniers authored
The diagnostic texts for warning on attributes that don't appear on the initial declaration is generally useful. We'd like to re-use it in D106030, but first let's combine two that already are very similar so we may re-use it a third time in that commit. Also, fix a few places that were using notePreviousDefinition to point to declarations, to instead use diag::note_previous_declaration. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D107613
-
Sam McCall authored
These aren't terribly common, but we currently mishandle them badly. Not only do we not recogize the attributes themselves, but we often end up selecting some node other than the parent (because source ranges aren't accurate in the presence of attributes). Differential Revision: https://reviews.llvm.org/D89785
-
Sam McCall authored
This reverts commit 3241680f. Fixed mangled post-test formatting :-(
-
Sam McCall authored
This reverts commit a4bdcdad. Fails bots: https://lab.llvm.org/buildbot/#/builders/109/builds/20231/steps/6/logs/stdio
-
Sam McCall authored
Differential Revision: https://reviews.llvm.org/D89743
-
Fred Riss authored
It looks like recent CoreFoundation builds strip the non-public symbol that we were looking for to find the 2 boolean "classes". The public symbol is of course there, and it contains the address of the private one. If we don't find the private symbol directly, go through a memory read at the public symbol's location instead.
-
Amara Emerson authored
DAG is unnecessary and we need this hook to implement store merging on GlobalISel too.
-
Dimitry Andric authored
On FreeBSD, the system `<libelf.h>` already declares `struct Elf_Note` indirectly (via `<sys/elf_common.h>`). This results in compile errors when building the libomptarget amdgpu plugin. Avoid redeclaring `struct Elf_Note` on FreeBSD to fix the errors. Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D107661
-
Davide Italiano authored
-
Thomas Johnson authored
Differential Revision: https://reviews.llvm.org/D107611 -
Zahira Ammarguellat authored
This reverts commit 48ad446a.
-
Asher Mancinelli authored
Lift checks for -Werror into local functions. Reviewed By: awarzynski Differential Revision: https://reviews.llvm.org/D101261
-
Michał Górny authored
Include the vaue of LLVM_ENABLE_NEW_PASS_MANAGER in generated LLVMConfig.cmake since it is needed by clang's build system. This fixes test failures when the new pass manager is enabled (i.e. by default) by having clang's CMake files correctly detect that and skip relevant tests. Differential Revision: https://reviews.llvm.org/D107628
-
Alexander Belyaev authored
Differential Revision: https://reviews.llvm.org/D107643
-
Artem Belevich authored
Attempt to enable MemCpyOpt unconditionally in D104801 uncovered the fact that there are users that do not expect LLVM to materialize `memset` intrinsic. While other passes can do that, too, MemCpyOpt triggers it more frequently and breaks sanitizers and some downstream users. For now introduce a flag to force-enable the flag and opt-in only CUDA compilation with NVPTX back-end. Differential Revision: https://reviews.llvm.org/D106401
-