- Jul 12, 2023
-
-
David Stenberg authored
This extends DWARFDebugLine to properly parse line number programs with maximum_operations_per_instruction > 1 for VLIW targets. No functions that use that parsed output to retrieve line information have been extended to support multiple op-indexes. This means that when retrieving information for an address with multiple op-indexes, e.g. when using llvm-addr2line, the penultimate row for that address will be used, which in most cases is the row for the second largest op-index. This will be addressed in further changes, but this patch at least allows us to correctly parse such line number programs, with a warning saying that the line number information may be incorrect (incomplete). Reviewed By: StephenTozer Differential Revision: https://reviews.llvm.org/D152536
-
Krasimir Georgiev authored
This reverts commit 14c3ab94. Causes build bot failures.
-
pvanhout authored
It's the only combine (AFAIK) that didn't use an apply function. There is no reason for it to mutate instructions in the matcher, so split it up. Reviewed By: aemerson, arsenm Differential Revision: https://reviews.llvm.org/D154947
-
Akash Banerjee authored
This patch migrates the UseDevicePtr and UseDeviceAddr clause related code for handling privatisation from Clang codegen to the OMPIRBuilder Depends on D150860 Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D152554
-
Ivan Kosarev authored
Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D154528
-
John Brawn authored
Currently when compiling for an execute-only target without movt then EmitStructByval will generate a constant pool load which isn't compatible with execute-only. Handle this by emitting tMOVi32imm, and also simplify the existing movt handling by emitting t2MOVi32imm or MOVi32imm. Differential Revision: https://reviews.llvm.org/D154944
-
John Brawn authored
The expansion of the various MOVi32imm pseudo-instructions works by splitting the operand into components (either halfwords or bytes) and emitting instructions to combine those components into the final result. When the operand is an immediate with some components being zero this can result in pointless instructions that just add zero. Avoid this by restructuring things so that a separate function handles splitting the operand into components, then don't emit the component if it is a zero immediate. This is straightforward for movw/movt, where we just don't emit the movt if it's zero, but the thumb1 expansion using mov/add/lsl is more complex, as even when we don't emit a given byte we still need to get the shift correct. Differential Revision: https://reviews.llvm.org/D154943
-
Peixin Qiao authored
This patch precommits a test for: https://reviews.llvm.org/D148420 Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D150069
-
Björn Schäpers authored
Remove the double check, move the comment. This changes behavior, but I think for the better. Despite the comment my personal opinion would be to not even gracefully handle the one semicolon, it shouldn't be there. Differential Revision: https://reviews.llvm.org/D138373
-
Björn Schäpers authored
It worked only correct for a tab as the first char. Fixes https://github.com/llvm/llvm-project/issues/56769 Differential Revision: https://reviews.llvm.org/D138402
-
David Stenberg authored
This is a preparatory patch for extending DWARFDebugLine to properly parse line number programs with maximum_operations_per_instruction > 1 for VLIW targets. Add some scaffolding for handling op-index in line number programs, and add printouts for that in the table. As this affects a lot of tests, this is done in a separate commit to get a cleaner review for the actual op-index implementation. Verbose printouts are not present in many tests, and adding op-index to those will require a bit more code changes, so that is done in the actual implementation patch. Reviewed By: StephenTozer Differential Revision: https://reviews.llvm.org/D152535
-
Nikita Popov authored
These no longer show codegen regressions.
-
Nikita Popov authored
Uses an x86 triple.
-
Nikita Popov authored
Instead of checking the pointer type, check the element type of the GEP. Previously we ended up reusing GEP increments that were not in expanded form, thus not respecting LSRs choice of representation. The change in 2011-10-06-ReusePhi.ll recovers a regression that appeared when converting that test to opaque pointers. Changes in various Thumb tests now compute the step outside the loop instead of using add.w inside the loop, which is LSR's preferred representation for this target.
-
Adrian Kuegel authored
The get() call is redundant.
-
Aleksandr Popov authored
Here is activated check elimination which was parsed previously in https://reviews.llvm.org/D154069 * Added runtime check that computed range's boundary doesn't overflow in terms of range type. * From the statement INT_MIN <= END <= INT_MAX is inferred check: isNonNegative(INT_MAX - END) * isNonNegative(END - INT_MIN). * If overflow happens, check will return 0 and the safe interval will be empty. Reviewed By: skatkov Differential Revision: https://reviews.llvm.org/D154188
-
Juan Manuel MARTINEZ CAAMAÑO authored
It seems that the sanitizer-x86_64-linux-android wasn't able to deduce the template argument: AMDGPULowerModuleLDSPass.cpp:1192:53: error: no viable constructor or deduction guide for deduction of template arguments of 'vector' auto TableLookupVariablesOrdered = sortByName(std::vector( This patch makes the template argument explicit. -
Alexander Shaposhnikov authored
This diff switches OperationVerifier to using a worklist rather than recursion. The exception is our handling of isolated regions, it can still contain recursive calls, however, the parallel processing of these regions is preserved. This fixes the crash of the "verifier" on the input from https://github.com/llvm/circt/issues/5316 (but the IR printer would still crash with stack overflow). Test plan: ninja check-mlir check-all Differential revision: https://reviews.llvm.org/D154925
-
Martin Storsjö authored
This was broken by 56ac9d46.
-
David Green authored
The isDef asserts that the operand isReg, so the checks need to happen in the other order.
-
Piotr Sobczak authored
The existing check run label "DEFAULT" may clash with the label from switch "DEFAULT", so renaming it for clarity. Differential Revision: https://reviews.llvm.org/D154825
-
Adrian Kuegel authored
-
Adrian Kuegel authored
-
Nikita Popov authored
-
Guray Ozen authored
Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D155048
-
Dmitry Polukhin authored
The crash happens in clang::driver::tools::SplitDebugName when Output is InputInfo::Nothing. It doesn't happen with standalone clang driver because output is created in Driver::BuildJobsForActionNoCache. Example backtrace: ``` * thread #1, name = 'clangd', stop reason = hit program assert * frame #0: 0x00007ffff5c4eacf libc.so.6`raise + 271 frame #1: 0x00007ffff5c21ea5 libc.so.6`abort + 295 frame #2: 0x00007ffff5c21d79 libc.so.6`__assert_fail_base.cold.0 + 15 frame #3: 0x00007ffff5c47426 libc.so.6`__assert_fail + 70 frame #4: 0x000055555dc0923c clangd`clang::driver::InputInfo::getFilename(this=0x00007fffffff9398) const at InputInfo.h:84:5 frame #5: 0x000055555dcd0d8d clangd`clang::driver::tools::SplitDebugName(JA=0x000055555f6c6a50, Args=0x000055555f6d0b80, Input=0x00007fffffff9678, Output=0x00007fffffff9398) at CommonArgs.cpp:1275:40 frame #6: 0x000055555dc955a5 clangd`clang::driver::tools::Clang::Constru... -
Nikita Popov authored
-
Nikita Popov authored
-
Dominic Chen authored
Provide platform-specific x87 FPU definitions and operations Differential Revision: https://reviews.llvm.org/D153823
-
Juan Manuel MARTINEZ CAAMAÑO authored
Fixed compilation error and reudndant copy warning Differential Revision: https://reviews.llvm.org/D154977
-
Jay Foad authored
Documentation for TargetLowering::getShiftAmountTy says that LegalTypes should generally be true during type legalization, so this patch does that. On AMDGPU the effect is that we use i32 (a sane type) instead of i64 (pointer sized type) for more shift amounts, which in turn allows more formation of rotates and funnel shifts pre-legalization. Differential Revision: https://reviews.llvm.org/D154960
-
LLVM GN Syncbot authored
-
Sameer Sahasrabuddhe authored
This is a reboot of the original design and implementation by Nicolai Haehnle <nicolai.haehnle@amd.com>: https://reviews.llvm.org/D85603 This change also obsoletes an earlier attempt at restarting the work on convergence tokens: https://reviews.llvm.org/D104504 Changes relative to D85603: 1. Clean up the definition of a "convergent operation", a convergent call and convergent function. 2. Clean up the relationship between dynamic instances, sets of threads and convergence tokens. 3. Redistribute the formal rules into the definitions of the convergence intrinsics. 4. Expand on the semantics of entering a function from outside LLVM, and the environment-defined outcome of the entry intrinsic. 5. Replace the term "cycle" with "closed path". The static rules are defined in terms of closed paths, and then a relation is established with cycles. 6. Specify that if a function contains a controlled convergent operation, then all converg...
-
Tuan Chuong Goh authored
Add more legal types for SMIN, SMAX, UMIN, UMAX in cost modelling for AArch64 Differential Revision: https://reviews.llvm.org/D154622
-
Marius Brehler authored
This adds operations for binary multiplicative arithmetic operators to EmitC. The input and output arguments for the remainder operator are restricted to index (emitted as size_t), integers and the EmitC opaque types (as the operator can be overloaded for a custom type). The multiplication and division operator further support floating point numbers. Reviewed By: jpienaar Differential Revision: https://reviews.llvm.org/D154846
-
Andrzej Warzynski authored
Clarify a few diagnostics so that they are more consistent with the corresponding condition. For example: ``` if (positionAttr.size() > static_cast<unsigned>(getSourceVectorType().getRank())) ``` should lead to ("no greater than"): ``` return emitOpError( "expected position attribute of rank no greater than vector rank"); ``` as opposed to ("smaller"): ``` return emitOpError( "expected position attribute of rank smaller than vector rank"); ``` Differential Revision: https://reviews.llvm.org/D154998 -
LLVM GN Syncbot authored
-
Sam McCall authored
Fixes two places where we relied on map iteration order when processing values, which leaked nondeterminism into the generated SAT formulas. Adds a couple of tests that directly assert that the SAT system is equivalent on each run. It's desirable that the formulas are deterministic based on the input: - our SAT solver is naive and perfermance is sensitive to even simple semantics-preserving transformations like A|B to B|A. (e.g. it's likely to choose a different variable to split on). Timeout failures are bad, but *flaky* ones are terrible to debug. - similarly when debugging, it's important to have a consistent understanding of what e.g. "V23" means across runs. --- Both changes in this patch were isolated from a nullability analysis of real-world code which was extremely slow, spending ages in the SAT solver at "random" points that varied on each run. I've included a reduced version of the code as a regression test. One of the changes shows up directly as flow-condition nondeterminism with a no-op analysis, the other relied on bits of the nullability analysis but I found a synthetic example to show the problem. Differential Revision: https://reviews.llvm.org/D154948
-
Corentin Jabot authored
This covers * P2558R2 (C++, wg21.link/P2558) * N2701 (C, https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2701.htm) * N3124 (C, https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3124.pdf) This patch * Disallow representing $ as a UCN in all language mode, which did not properly work (see GH62133), and which in made ill-formed in C++ and C by P2558 and N3124 respectively * Allow a UCN for any character in C2X, in string and character literals Fixes #62133 Reviewed By: #clang-language-wg, tahonermann Differential Revision: https://reviews.llvm.org/D153621
-
Dhruv Chawla authored
This patch generalizes the fold implemented by foldAndOrOfICmpEqZeroAndICmp, which are: (icmp eq X, 0) | (icmp ult Other, X) -> (icmp ule Other, X-1) (icmp ne X, 0) & (icmp uge Other, X) -> (icmp ugt Other, X-1) to the following: (icmp eq X, C) | (icmp ult Other, (X - C)) -> (icmp ule Other, (X - (C + 1))) (icmp ne X, C) & (icmp uge Other, (X - C)) -> (icmp ugt Other, (X - (C + 1))) The function foldAndOrOfICmpEqZeroAndICmp is also renamed to foldAndOrOfICmpEqConstantAndICmp to reflect the changes. Proofs: https://alive2.llvm.org/ce/z/yXGv6q Fixes #63749. Differential Revision: https://reviews.llvm.org/D154937
-