- Apr 26, 2023
-
-
Arthur Eubanks authored
-
Congcong Cai authored
Fixed: https://github.com/llvm/llvm-project/issues/62122 This change pointer to add diagnose message for this code. ``` struct S { static int F(int n = 0 ? 0) { return 0; } }; ``` For default parameter, we should set it as unparsed even if meeting syntax error because it should be issued in real parser time instead of set is as invalid directly without diagnose. Reviewed By: rsmith Differential Revision: https://reviews.llvm.org/D148372
-
Arthur Eubanks authored
According to https://clang.llvm.org/docs/LTOVisibility.html, classes on Windows with dllimport/export receive public LTO visibility and therefore should not participate in WPD. Reviewed By: pcc Differential Revision: https://reviews.llvm.org/D129700
-
Paul Osmialowski authored
The vectorisation analysis collects strides for loop invariant pointers, which is wrong because they are not strided. We don't need to generate SCEV checks (which are costly performancewise) for such pointers, we just need to do the appropriate aliasing checks. This patch fixes the problem by changing getStrideFromPointer() to treat loop invariant pointers as having no stride. Originally proposed by David Sherwood with further suggestions from Florian Hahn. Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D146958
-
max authored
This reverts commit 3bab7cb0 because it breaks sanitizers. Differential Revision: https://reviews.llvm.org/D149188
-
Paul Osmialowski authored
This commit introduces a test for the change introduced by the `[SCEV] Do not plant SCEV checks unnecessarily` commit, D146958. Reviewed By: fhahn, david-arm Differential Revision: https://reviews.llvm.org/D146974
-
Teresa Johnson authored
This test was added in D72538, along with multiple LLVM pipeline tests, to ensure that distributed ThinLTO backends invoked via clang set up the expected ThinLTO optimization pipeline. However, this introduces churn to clang tests from LLVM pipeline changes (see recent comment in that patch). Since the full pipeline setup is tested by LLVM, I have changed this test to simply look for a single pass that is only invoked during LTO backends, to make sure that clang is provoking the an LTO backend pipeline setup.
-
Valentin Clement authored
Add lowering for assumed size array in data clause to the newly added data operand operations. Depends on D148840 Reviewed By: razvanlupusoru Differential Revision: https://reviews.llvm.org/D148969
-
LLVM GN Syncbot authored
-
Shubham Sandeep Rastogi authored
In llvm/test/DebugInfo/Generic/empty.ll, there are two RUN lines. The second one use the option "-split-dwarf-file=foo.dwo" Since darwin doesn't support split dwarf, there is an assertion when running the test: "Assertion failed: (Section && "Cannot switch to a null section!"), function switchSection, file llvm/lib/MC/MCStreamer.cpp, line 1238" While there is an XFAIL for darwin in the test, It is not a good practice to run a test on darwin which causes an assertion. This patch is a small refactoring of the test so that the split-dwarf test can be it's own file with an explicit elf triple. Differential Review: https://reviews.llvm.org/D149106
-
walter erquinigo authored
This change ensures that the REPL map inside Target is destroyed correctly when `Target::Destroy()` is invoked. Not doing so results in the REPL not finishing its job when the debugger is initialized in REPL mode reading from a file. In my particular case, my REPL doesn't print the stdout of the last expression in the input file unless I include this change. Differential Revision: https://reviews.llvm.org/D149180
-
Nawal Copty authored
The llvm.used (or llvm.compiler.used) global variable is an array that contains a list of pointers to global variables and functions. The GlobalOpt (Global Variable Optimizer) pass is not preserving the address space for llvm.used and llvm.compiler.used global variables.This patch updates the setUsedInitializer() function in GlobalOpt.cpp, so the address space is preserved. Reviewed By: aeubanks Differential Revision: https://reviews.llvm.org/D144518
-
Owen Anderson authored
Updated with build fix for unit tests Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D149125
-
Neumann Hon authored
Differential Revision: https://reviews.llvm.org/D148821
-
Craig Topper authored
If the -0.0 has multiple uses we won't fold the reduction.
-
Florian Hahn authored
Add handling for `mul nsw` for signed systems based on the logic for `mul nuw` for unsigned.
-
Florian Hahn authored
Split up larger test functions into 2 versions, one with the checks in the then and one with the checks in the else block. The original versions of the function caused timeouts even with larger thresholds. The new versions verify very quickly.
-
Julian Lettner authored
The kernel and kext environments do not provide the `__cxa_atexit()` function, so we can't use it for lowering global module destructors. Unfortunately, just querying for "compiling for kernel/kext?" in the LTO pipeline isn't possible (kernel/kext identifier isn't part of the triple yet) so we need to pass down a CodeGen flag. rdar://93536111 Differential Revision: https://reviews.llvm.org/D148967
-
Philip Reames authored
This is a follow on to D147117 and D147355. In both cases, we were adding special cases to compute zext(BTC+1) instead of zext(BTC)+1 when the BTC+1 computation was known not to overflow. Differential Revision: https://reviews.llvm.org/D148661
-
Florian Hahn authored
-
Joseph Huber authored
Summary: This causes problems when included. Fix this to hopefully get the bots working again.
-
Joseph Huber authored
Summary: The previous GPU `libc` patch added support for `atoi`. However, it didn't also enable generating the errno header. This caused including it to use the system's header which invariably will cause compiler problems.
-
Martin Storsjö authored
Previously, an .exe suffix was only added for MSVC configurations. In practice, an .exe suffix is added implicitly by MinGW toolchains if the output is a suffixless file name. However this can cause lots of subtle build system confusion, when it's not generating the file it expected. Differential Revision: https://reviews.llvm.org/D149029
-
Craig Topper authored
The argument is the AVL itself, not some operation that has an AVL. Thus "is" instead of "has" is a better name.
-
Jorge Gorbe Moya authored
-
Joseph Huber authored
The 'errno' value is most likely not useful on the GPU and it prevents us from providing certain functions on the GPU that depend on it, like `atoi`. This patch makes the necessary changes to support `errno` by simple replacing it with a consumer class. Supporting `errno` on the GPU is possible in some aspects. The first approach would be to use a buffer of shared memory that has enough space for all threads. Another option would be to change code generation to support `thread_local` using `address_space(5)` memory allocated at kernel launch. The former could look like the following, which could be implemented in a later patch: ``` template <typename T> using SharedBuffer = T[gpu::MAX_THREADS] [[clang::address_space(3)]]; template <typename T> struct ErrnoSetter { constexpr ErrnoSetter(SharedBuffer<T> &storage) : storage(storage) {} SharedBuffer<T> &storage; void operator=(const T &val) { storage[gpu::get_thread_id()] = val; } }; static SharedBuffer<int> thread_local_buffer [[clang::loader_uninitialized]]; ErrnoSetter<int> __llvmlibc_internal_errno(thread_local_buffer); ``` Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D149107 -
Markus Mützel authored
When building the Fortran runtime on MinGW, `clock_gettime` is currently used. That function is provided by the `pthread` library on that platform. That means that all programs that link `libFortranRuntime` also require to be linked with `pthread` on that platform. There is already a code path (for MSVC) that doesn't use `clock_gettime` in the implementation of the Fortran library. Use the same code path also on MinGW by undefining `CLOCKID`. Reviewed By: vzakhari Differential Revision: https://reviews.llvm.org/D149051
-
Slava Zakharin authored
I believe this test started failing pre-commit testing after D148038. For example: https://buildkite.com/llvm-project/premerge-checks/builds/148654#0187b72b-7360-4c52-be94-93eefcb269f4 https://buildkite.com/llvm-project/premerge-checks/builds/148642#0187b691-15a7-44c4-ae23-c7e97ec67755 On Windows the .exe suffix is used for clang-offload-packager tool: "c:\\program files\\llvm\\bin\\clang-offload-packager.exe" ... At the same time, I believe I have seen this test sporadically fail before, meaning that the .exe suffix is not added consistently. I am not sure why this might be happening. I decided just to allow the suffix.
-
Alex Bradbury authored
This will allow reusing the same logic for a select combine.
-
Tobias Hieta authored
There was a bunch of references to bugzilla and other old instructions in there. I have updated it to match the current reality. Reviewed By: tstellar Differential Revision: https://reviews.llvm.org/D149131
-
Cullen Rhodes authored
-
Slava Zakharin authored
Fortran runtime standalone build is broken after D140998 because of the missing CMake modules path. This is a fix. Differential Revision: https://reviews.llvm.org/D149090
-
OCHyams authored
A `ValueAsMetadata` may be replaced with nullptr for several reasons including deleting values and value remapping a use-before-def. In the case of a `MetadataAsValue` user, `handleChangedOperand` intercepts and replaces the metadata with an empty tuple (`!{}`). At the moment, an empty metadata operand in a debug intrinsics signals that it can be deleted. Given that we end up with empty metadata operands in circumstances where the Value has been "lost" the current behaviour can lead to incorrect variable locations. Instead, we should treat empty metadata as meaning "there is no location for the variable" (the same as we currently treat undef operands). This patch changes `isKillLocation` to take this into account. Related to https://discourse.llvm.org/t/auto-undef-debug-uses-of-a-deleted-value Reviewed By: StephenTozer Differential Revision: https://reviews.llvm.org/D140902
-
- Apr 25, 2023
-
-
Aaron Ballman authored
This amends 2e275e24. That commit added a null to pointer cast kind when determining whether the expression can be a valid constant initializer, but failed to update the constant expression evaluator to perform the evaluation. This commit updates the constant expression evaluator to handle that cast kind.
-
OCHyams authored
This helps towards the effort to remove UndefValue from LLVM. Related to https://discourse.llvm.org/t/auto-undef-debug-uses-of-a-deleted-value Reviewed By: nlopes Differential Revision: https://reviews.llvm.org/D140991
-
Emilio Cota authored
While at it, fix some typos. Differential Revision: https://reviews.llvm.org/D149159
-
Jay Foad authored
After D147334 we never select _SGPR forms of SMEM instructions on subtargets that also support the _SGPR_IMM form, so there is no need to handle them here. Differential Revision: https://reviews.llvm.org/D149139
-
Doru Bercea authored
-
Victor Perez authored
Move mlir-translate exception-related tests from basic.ll to exception.ll. Signed-off-by:
Victor Perez <victor.perez@codeplay.com> Differential Revision: https://reviews.llvm.org/D149043
-
Zhongyunde authored
Use simplifySelectWithICmpEq to handle the implied equalities from the icmp-or, then both of ICMP_NE and ICMP_EQ will be addressed (X | Y) == 0 ? X : 0 --> 0 (commuted 2 ways) (X | Y) != 0 ? 0 : X --> 0 (commuted 2 ways) Fixes https://github.com/llvm/llvm-project/issues/62263 Reviewed By: nikic, RKSimon Differential Revision: https://reviews.llvm.org/D148986
-