- Mar 22, 2022
-
-
Valentin Clement authored
In FIR, we want to wrap function pointers in a special box known as a boxproc value. Fortran has a limited form of dynamic scoping [https://tinyurl.com/2p8v2hw7] between "host procedures" and "internal procedures". There are a number of implementations possible. Boxproc typed values abstract away the implementation details of when a function pointer can be passed directly (as a raw address) and when a function pointer has to account for the presence of a dynamic scope. When lowering Fortran syntax to FIR, all function pointers are emboxed as boxproc values. When creating LLVM IR, we must strip away the abstraction and produce low-level LLVM "assembly" code. This patch implements that transformation as converting the boxproc values to either raw function pointers or executable trampolines on the stack as needed. The trampoline then captures the dynamic scope context within an executable thunk that can be passed instead of the function's raw address. Some extra handling is r...
-
chenglin.bi authored
Baseline tests for D122013 (issue #54132).
-
Nikita Popov authored
-
Krasimir Georgiev authored
Follow-up from https://github.com/llvm/llvm-project/commit/36d13d3f8adb3d1a6bae71370afa23d11a94dc78; https://reviews.llvm.org/D121451. Restore the old behavior in situations where we use # as comments and long strings of #'s for comment sections. Reviewed By: MyDeveloperDay Differential Revision: https://reviews.llvm.org/D122230
-
Florian Hahn authored
createInductionResumeValues only uses its loop argument only to get the pre-header, but the pre-header is already known (we created/cached it earlier). Remove the unneeded loop argument.
-
Pavel Labath authored
By default these timeouts are extremely small (0.1s). This means that 100ms after sending an EOF, pexpect will start sending the process increasingly aggressive signals, but the small timeouts mean that (on a loaded machine) the kernel may not have enough time to process the signal even if the overall effect of the signal is to kill the application. It turns out we were already relying on this signals (instead of regular EOF quits) in our tests. In my experiments it was sufficient to block SIGINT and SIGHUP to cause some test to become flaky. This was most likely the reason of a couple of flakes on the lldb-x86_64-debian bot, and is probably the reason why the pexpect tests are flaky on several other (e.g. asan) bots. This patch increses the timeout to 6 seconds (60-fold increase), which is hopefully sufficient to avoid flakes even in the most extreme situations.
-
Kiran Chandramohan authored
The intrinsic computes the exponent, log real and complex numbers and log10 for real numbers. By default they are lowered to runtime calls to libpgmath. kind=10 and 16 are not supported. With the llvm option, it can be lowered to llvm intrinsics (not all types .eg. complex are supported for llvm lowering). This is part of the upstreaming effort from the fir-dev branch in [1]. [1] https://github.com/flang-compiler/f18-llvm-project Reviewed By: PeteSteinfeld Differential Revision: https://reviews.llvm.org/D122132 Co-authored-by:
Eric Schweitz <eschweitz@nvidia.com> Co-authored-by:
William S Moses <gh@wsmoses.com>
-
Nikita Popov authored
Worth noting that the code marked with FIXME is dead and would produce invalid IR if hit. Someone familiar with this code should probably look into that.
-
Aaron Ballman authored
@mgehre-amd pointed out the following post-commit review feedback on the changes in 8cba7217: As an example, the paper says 3wb /* Yields an _BitInt(3); two value bits, one sign bit */. So I would expect that 0xFwb gives _BitInt(5); four value bits, one sign bit, but with this implementation I get _BitInt(2). This is because ResultVal as 4 bits, and getMinSignedBits() inteprets it as negative and thus says that 1 bit is enough to represent -1. This corrects the behavior for calculating the bit-width and adds some test coverage.
-
Joseph Huber authored
This patch adds a configuration option to simply use the default pass pipeline in favor of the LTO-specific one. We observed some severe performance penalties when uding device-side LTO for OpenMP offloading applications caused by the LTO-pass pipeline. This is primarily because OpenMP uses an LLVM bitcode library to implement a GPU runtime library. In a standard compilation we link this bitcode library into each source file and optimize it with the default pipeline. When performing LTO we link it late with all the files, but the bitcode library never has the regular optimization pipeline applied to it so we miss a few optimizations just using the LTO pipeline to optimize it. I'm not committed to this solution, but it's the easiest method to solve this performance regression when using LTO without changing the optimizatin pipeline for other users. Reviewed By: tianshilei1992 Differential Revision: https://reviews.llvm.org/D122133
-
Arjun P authored
Reviewed By: Groverkss Differential Revision: https://reviews.llvm.org/D122149
-
Arjun P authored
[MLIR][Presburger] MultiAffineFunction::removeIdRange: fix bug where kind wasn't passed on to IntegerPolyhedron::removeIdRange Reviewed By: Groverkss Differential Revision: https://reviews.llvm.org/D122158
-
Arjun P authored
Previously, an UndoLogEntry was added by addRow but not by addZeroRow. So calling directly into addZeroRow, as LexSimplex::addCut does, was not an undoable operation. In the current usage of addCut this could never lead to an incorrect result, and addZeroRow is protected, so it is not currently possible to add a regression test for this. This bug needs to be fixed for the symbolic integer lexmin algorithm. Reviewed By: Groverkss Differential Revision: https://reviews.llvm.org/D122162
-
Sanjay Patel authored
When shifting by a byte-multiple: bswap (shl X, C) --> lshr (bswap X), C bswap (lshr X, C) --> shl (bswap X), C This is an IR implementation of a transform suggested in D120648. The "swaps cancel" test models the motivating optimization from that proposal. Alive2 checks (as noted in the other review, we could use knownbits to handle shift-by-variable-amount, but that can be an enhancement patch): https://alive2.llvm.org/ce/z/pXUaRf https://alive2.llvm.org/ce/z/ZnaMLf Differential Revision: https://reviews.llvm.org/D122010
-
Djordje Todorovic authored
Before this patch the DebugifyLevel option was used for the synthetic mode, so after this, it will be used in the original mode as well. Differential Revision: https://reviews.llvm.org/D115623
-
Nikita Popov authored
Rather than iterating over users and comparing operands, iterate over uses and check operand number. Otherwise, we'll end up promoting a store twice if it has two equal operands. This can only happen with opaque pointers, as otherwise both operands differ by a level of indirection, so a bitcast would have to be involved. Fixes https://github.com/llvm/llvm-project/issues/54495.
-
Igor Kudrin authored
NVPTX does not support generating binary files, which is required for these tests. The majority of tests in 'DebugInfo/Generic' also require emitting object files, so they all are disabled for NVPTX. Differential Revision: https://reviews.llvm.org/D121996
-
Igor Kudrin authored
If 'config.target_triple' is empty, there is no sense to define the 'object-emission' tag. Differential Revision: https://reviews.llvm.org/D121994
-
Igor Kudrin authored
For '-filetype=null', 'NVPTXTargetStreamer' is not created, so the return value of 'OutStreamer->getTargetStreamer()' should be checked before calling the methods. Differential Revision: https://reviews.llvm.org/D122001
-
Igor Kudrin authored
These tests are located in 'X86' subfolders which means that they should be compiled for that target. As they did not have the target specified explicitly, they in fact were compiled for a default target triple. Not all targets support all required features for these tests; for example, if NVPTX is used as a default triple, the tests fail. The patch makes the tests run for 'x86_64', thus they pass regardless of the default target. Differential Revision: https://reviews.llvm.org/D121998
-
Bryan Chan authored
Update the FileCheck patterns in a test case to prevent a path name containing the `@` character from causing it to fail unnecessarily, e.g. during a Jenkins CI job.
-
Vince Bridgers authored
Usages of makeNull need to be deprecated in favor of makeNullWithWidth for architectures where the pointer size should not be assumed. This can occur when pointer sizes can be of different sizes, depending on address space for example. See https://reviews.llvm.org/D118050 as an example. This was uncovered initially in a downstream compiler project, and tested through those systems tests. steakhal performed systems testing across a large set of open source projects. Co-authored-by: steakhal Resolves: https://github.com/llvm/llvm-project/issues/53664 Reviewed By: NoQ, steakhal Differential Revision: https://reviews.llvm.org/D119601
-
Sanjay Patel authored
This is the IR counterpart to 370ebc9d which provided a bswap narrowing fix for issue #53867. Here we can be more general (although I'm not sure yet what would happen for illegal types in codegen - too rare to worry about?): https://alive2.llvm.org/ce/z/3-CPfo This will be more effective if we have moved the shift after the bswap as proposed in D122010, but it is independent of that patch. Differential Revision: https://reviews.llvm.org/D122166
-
Sanjay Patel authored
-
David Green authored
-
alex-t authored
In the frame index lowering we have to insert shift and add instructions to adjust stack object access. We need to take care of the stack object user kind and use scalar shift/add for scalar users. Reviewed By: rampitec Differential Revision: https://reviews.llvm.org/D121524
-
Djordje Todorovic authored
Before we start addressing the issue with having a lot of false positives when using debugify in the original mode, we have made a few patches that should speed up the execution of the testing utility Passes. For example, when testing a large project (let's say LLVM project itself), we can face a lot of potential DI issues. Usually, we use -verify-each-debuginfo-preserve (that is very similar to -debugify-each) -- it collects DI metadata before each Pass, and after the Pass it checks if the Pass preserved the DI metadata. However, we can speed up this process, since we don't need to collect DI metadata before each Pass -- we could use the DI metadata that are collected after the previous Pass from the pipeline as an input for the next Pass. This patch speeds up the utility for ~2x. Differential Revision: https://reviews.llvm.org/D115622
-
Shraiysh Vaishay authored
This patch adds translation from PFT to FIR for critical construct. This is part of the upstreaming effort from the fir-dev branch in [1]. [1] https://github.com/flang-compiler/f18-llvm-project Co-authored-by:
kiranchandramohan <kiranchandramohan@gmail.com> Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D122218
-
Simon Pilgrim authored
Noticed by D122216
-
alex-t authored
In the frame index lowering we have to insert shift and add instructions to adjust stack object access. We need to take care of the stack object user kind and use scalar shift/add for scalar users. Reviewed By: rampitec Differential Revision: https://reviews.llvm.org/D121524
-
Simon Moll authored
VPIntrinsic::getStaticVectorLength infers the operational vector length of a VPIntrinsic instance from a type that is used with the intrinsic. The function used the mask operand before. Yet, vp.merge|select do not have a mask operand (in the predicating sense that the other VP intrinsics are using them - it is a selection mask for them). Fallback to the return type to fix this. Reviewed By: kaz7 Differential Revision: https://reviews.llvm.org/D121913
-
Nikita Popov authored
-
Shengchen Kan authored
Reviewed By: pengfei, RKSimon Differential Revision: https://reviews.llvm.org/D122216
-
serge-sans-paille authored
Regression introduced by f1985a3f
-
Zakk Chen authored
Reviewed By: rogfer01 Differential Revision: https://reviews.llvm.org/D120227
-
Haojian Wu authored
It was reverted, because the test had a lift-time issue. Reland f66d3758 with a fix.
-
Alex Bradbury authored
This fixes bug <https://github.com/llvm/llvm-project/issues/54022>. For now this means that defined functions will have two .functype directives emitted. Given discussion in that bug has suggested interest in moving towards using something other than .functype to mark the beginning of a function (which would, as a side-effect, solve this issue), this patch doesn't attempt to avoid that duplication. Some test cases that used CHECK-LABEL: foo rather than CHECK-LABEL: foo: are broken by this change. This patch updates those test cases to always have a colon at the end of the CHECK-LABEL string. Differential Revision: https://reviews.llvm.org/D122134
-
Nikita Popov authored
-
Martin Storsjö authored
In MinGW mode, it's possible to build LLVM/Clang with LLVM_LINK_LLVM_DYLIB (which implicitly enables plugins too). Other existing ways of building plugins on Windows is to build with LLVM_EXPORT_SYMBOLS_FOR_PLUGINS, where each executable exports its symbols. With LLVM_LINK_LLVM_DYLIB, we can't generally skip building plugins even if they are set up with PLUGIN_TOOL, as some plugins (e.g. under clang/examples) set up that way do build properly (as they manually call clang_target_link_libraries, which links in the libclang-cpp.dll dylib). For CTTestTidyModule, there's no corresponding dylib that would provide the same exports. Differential Revision: https://reviews.llvm.org/D121687
-
serge-sans-paille authored
Preprocessor output diff: -238205 lines Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup Differential Revision: https://reviews.llvm.org/D122183
-