- Jun 22, 2023
-
-
Valentin Clement authored
Add support for couple of FIR types such as fir.ptr, fir.heap, fir.box, fir.class Reviewed By: razvanlupusoru Differential Revision: https://reviews.llvm.org/D153461
-
Owen Pan authored
Don't finalize a preprocessor branch directive if it's the first token of an annotated line. See the rationale at https://reviews.llvm.org/D150057#inline-1449546. Fixes #63379 Differential Revision: https://reviews.llvm.org/D153243
-
Christopher Ferris authored
The ScopedString class has two functions named append. One takes a va_list, but on some platforms va_list is typedef'd to char*. That means that this call: std::string value; Str.append("print this string %s", value.c_str()); The compiler can incorrectly think this is the va_list function, leading to crashes when calling this. To fix this, change the name of the va_list function to be vappend to avoid this. Fix https://github.com/llvm/llvm-project/issues/62893 Reviewed By: Chia-hungDuan Differential Revision: https://reviews.llvm.org/D153389 -
Louis Dionne authored
Previously, it wouldn't take into account files in ignore_format.txt (at least not on OSX) because the `find` command would return file names like `libcxx/src//new_handler.cpp`, which never matched the file names in `ignore_format.txt`. Differential Revision: https://reviews.llvm.org/D153416
-
Jason Molenda authored
Two new entitlements, com.apple.private.thread-set-state and com.apple.private.set-exception-port should be included in the debugserver entitlement plist when built internally at Apple. The desktop builds of debugserver don't need these entitlements; don't add them to debugserver-macosx-entitlements.plist. rdar://108912676 rdar://103032208
-
Louis Dionne authored
This doesn't change the selection, but it expands the conditions to add comments and make it clearer what's happening. It also removes a -Wundef instance when we checked __ARM_ARCH_7K__ >= 2 without checking that it is defined in the first place. Differential Revision: https://reviews.llvm.org/D153413
-
David Green authored
Commit ec77747f regenerated the check lines without being very careful about which lines were updated. This attempts to fix them to make sure the V7 and V8 lines are emitted as needed.
-
Amilendra Kodithuwakku authored
This reverts commit a685ddf1. This relands Arm CMSE support (D139092) and fixes the GCC build bot errors.
-
Razvan Lupusoru authored
For all other compute and data constructs, the data operands list is named `dataClauseOperands`. Update `acc.host_data` to be consistent with this naming. Reviewed By: clementval Differential Revision: https://reviews.llvm.org/D153425
-
Peiming Liu authored
Reviewed By: aartbik, K-Wu Differential Revision: https://reviews.llvm.org/D153397
-
Tomasz Kuchta authored
This patch adds a support for the libc strncat() function in DFSAN Reviewed by: browneee Differential Revision: https://reviews.llvm.org/D152196
-
Valentin Clement authored
Lower private and firstprivate operands through their corresponding data entry operation to support array section. Depends on D152972 Reviewed By: razvanlupusoru Differential Revision: https://reviews.llvm.org/D152974
-
Valentin Clement authored
acc.firstprivate operation will be used as data entry operation for the firstprivate operands. Depends on D152970 Reviewed By: razvanlupusoru Differential Revision: https://reviews.llvm.org/D152972
-
Valentin Clement authored
acc.private operation will be used as data entry operation for the private operands. Reviewed By: razvanlupusoru Differential Revision: https://reviews.llvm.org/D152970
-
Med Ismail Bennani authored
This patch disables TestStackCoreScriptedProcess.py since it times out non deterministicly. Signed-off-by:Med Ismail Bennani <ismail@bennani.ma>
-
Arthur Eubanks authored
As requested in D151254 Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D153435
-
Vitaly Buka authored
-
Vitaly Buka authored
Now it implemented as OnMap everywhere, but in follow up patches we can optimize Asan handler.
-
Florian Hahn authored
The test shows a mis-compile where @test gets incorrectly simplified to unreachable. The test case is reduced from a ThinLTO build of Clang, with only the relevant pass sequence included.
-
Vitaly Buka authored
It's used by test only to test "test-only" code.
-
Shubham Sandeep Rastogi authored
This patch tries to reduce the size of the debug_loclist section by replacing the DW_LLE_start_length opcodes currently emitted by dsymutil in favor of using DW_LLE_base_address + DW_LLE_offset_pair instead. The DW_LLE_start_length is one AddressSize followed by a ULEB per entry, whereas, the DW_LLE_base_address + DW_LLE_offset_pair will use one AddressSize for the base address, and then the DW_LLE_offset_pair is a pair of ULEBs. This will be more efficient where a loclist fragment has many entries. Differential Revision: https://reviews.llvm.org/D153080
-
Guozhi Wei authored
Sometimes LLVM generates branch to return instruction, like PR63227. It is because in function MachineBlockPlacement::canTailDuplicateUnplacedPreds we avoid duplicating a BB into another already placed BB to prevent destroying computed layout. But if the successor BB is a return block, duplicating it will only reduce taken branches without hurt to any other branches. Differential Revision: https://reviews.llvm.org/D153093
-
Vitaly Buka authored
Deallocate is a more appropiate place to update free count.
-
LLVM GN Syncbot authored
-
Tim Besard authored
PTX does not have a notion of `unreachable`, which results in emitted basic blocks having an edge to the next block: ``` block1: call @does_not_return(); // unreachable block2: // ptxas will create a CFG edge from block1 to block2 ``` This may result in significant changes to the control flow graph, e.g., when LLVM moves unreachable blocks to the end of the function. That's a problem in the context of divergent control flow, as `ptxas` uses the CFG to determine divergent regions, while some intructions may not be executed divergently. For example, `bar.sync` is not allowed to be executed divergently on Pascal or earlier. If we start with the following: ``` entry: // start of divergent region @%p0 bra cont; @%p1 bra unlikely; ... bra.uni cont; unlikely: ... // unreachable cont: // end of divergent region bar.sync 0; bra.uni exit; exit: ret; ``` it is transformed by the branch-folder and block-placement passes to: ``` entry: // start of divergent region @%p0 bra cont; @%p1 bra unlikely; ... bra.uni cont; cont: bar.sync 0; bra.uni exit; unlikely: ... // unreachable exit: // end of divergent region ret; ``` After moving the `unlikely` block to the end of the function, it has an edge to the `exit` block, which widens the divergent region and makes the `bar.sync` instruction happen divergently. That causes wrong computations, as we've been running into for years with Julia code (which emits a lot of `trap` + `unreachable` code all over the place). To work around this, add an `exit` instruction before every `unreachable`, as `ptxas` understands that exit terminates the CFG. Note that `trap` is not equivalent, and only future versions of `ptxas` will model it like `exit`. Another alternative would be to emit a branch to the block itself, but emitting `exit` seems like a cleaner solution to represent `unreachable` to me. Also note that this may not be sufficient, as it's possible that the block with unreachable control flow is branched to from different divergent regions, e.g. after block merging, in which case it may still be the case that `ptxas` could reconstruct a CFG where divergent regions are merged (I haven't confirmed this, but also haven't encountered this pattern in the wild yet): ``` entry: // start of divergent region 1 @%p0 bra cont1; @%p1 bra unlikely; bra.uni cont1; cont1: // intended end of divergent region 1 bar.sync 0; // start of divergent region 2 @%p2 bra cont2; @%p3 bra unlikely; bra.uni cont2; cont2: // intended end of divergent region 2 bra.uni exit; unlikely: ... exit; exit: // possible end of merged divergent region? ``` I originally tried to avoid the above by cloning paths towards `unreachable` and splitting the outgoing edges, but that quickly became too complicated. I propose we go with the simple solution first, also because modern GPUs with more flexible hardware thread schedulers don't even suffer from this issue. Finally, although I expect this to fix most of https://bugs.llvm.org/show_bug.cgi?id=27738, I do still encounter miscompilations with Julia's unreachable-heavy code when targeting these older GPUs using an older `ptxas` version (specifically, from CUDA 11.4 or below). This is likely due to related bugs in `ptxas` which have been fixed since, as I have filed several reproducers with NVIDIA over the past couple of years. I'm not inclined to look into fixing those issues over here, and will instead be recommending our users to upgrade CUDA to 11.5+ when using these GPUs. Also see: - https://github.com/JuliaGPU/CUDAnative.jl/issues/4 - https://github.com/JuliaGPU/CUDA.jl/issues/1746 - https://discourse.llvm.org/t/llvm-reordering-blocks-breaks-ptxas-divergence-analysis/71126 Reviewed By: jdoerfert, tra Differential Revision: https://reviews.llvm.org/D152789
-
Med Ismail Bennani authored
This patch should address the failure of TestStackCoreScriptedProcess that is happening specifically on x86_64. It turns out that in 1370a1cb, I changed the way we extract integers from a `StructuredData::Dictionary` and in order to get a stop info from the scripted process, we call a method that returns a `SBStructuredData` containing the stop reason data. TestStackCoreScriptedProcess` was failing specifically on x86_64 because the stop info dictionary contains the signal number, that the `Scripted Thread` was trying to extract as a signed integer where it was actually parsed as an unsigned integer. That caused `GetValueForKeyAsInteger` to return the default value parameter, `LLDB_INVALID_SIGNAL_NUMBER`. This patch address the issue by extracting the signal number with the appropriate type and re-enables the test. Differential Revision: https://reviews.llvm.org/D152848 Signed-off-by:
Med Ismail Bennani <ismail@bennani.ma>
-
cynecx authored
The COFFAsmParser (to my surprise) didn't support the .pushsection and .popsection directives. These directives aren't directly useful, however for frontends that have inline asm support this is really useful. Rust in particular, has support for inline asm, which can be used together with these directives to "emulate" features like static generics. This patch adds support for the two mentioned directives. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D152085
-
Felipe de Azevedo Piovezan authored
When LLDB needs to access a debug section, it generally calls SectionList::FindSectionByType with the corresponding type (we have one type for each DWARF section). However, the missing entries made some sections be classified as "eSectionTypeOther", which makes all calls to `FindSectionByType` fail. With this patch, a check-lldb build with `-DLLDB_TEST_USER_ARGS=--dwarf-version=5` reports a much lower number of failures: Unsupported : 327 Passed : 2423 Expectedly Failed: 16 Unresolved : 2 Failed : 52 This is down from previously 400~ failures. Differential Revision: https://reviews.llvm.org/D153433
-
Stella Laurenzo authored
This reverts commit f55fd19b. As noted on the original thread, other uses of LLVM_LIBRARY_OUTPUT_INTDIR are optional. Will make a separate patch that makes this use optional as well.
-
Alex Langford authored
ConstString's benefits are not being utilized here, StringRef is sufficient. Differential Revision: https://reviews.llvm.org/D153177
-
Tom Eccles authored
It seems just replacing the operation was not replacing all of the uses when the types of the expression before and after this pass differ (due to differing shape information). Now the shape information is always kept the same. This fixes https://github.com/llvm/llvm-project/issues/63399 Differential Revision: https://reviews.llvm.org/D153333
-
Lorenzo Chelini authored
`ForeachThreadOp` was renamed to `ForallOp`, update the filename to avoid confusion. See: https://reviews.llvm.org/D144242
-
Adam Paszke authored
The bytecode writer config was heap-allocated, but was never freed, causing ASAN errors. Reviewed By: jpienaar Differential Revision: https://reviews.llvm.org/D153440
-
Joseph Huber authored
This patch prepares the RPC interface to be installed. We place this in the existing `llvm-gpu-none` directory as it will also give us access to the generated `libc` headers for the opcodes. Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D153040
-
Luke Lau authored
This avoids undefs from being expanded to a build vector of zeroes. As noted by @craig.topper in D153399 Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D153411
-
Joseph Huber authored
This does some simple cleanup prior to landing the patch to install these. Differential Revision: https://reviews.llvm.org/D153439
-
Petr Hosek authored
posix_compat.h uses struct timeval which is defined in <sys/time.h> but it doesn't include it. On most POSIX platforms like Linux or macOS, that headers is transitively included by other headers like <sys/stat.h>, but there are other platforms where this is not the case. Differential Revision: https://reviews.llvm.org/D153384
-
- Jun 21, 2023
-
-
Craig Topper authored
A build_vector is the canonical representation rather than multiple insert_vector_elts. Unfortunately, this regresses quite a few tests now primarily due to not having a vmv.s.x special case, but I hope we can improve this with future patches. Stress testing in our downstream found an infinite loop in DAG combine. This patch breaks the infinite loop. The insert_vector_element chain starts with a fixed vector undef. Fixed vector undef is currently expanded to a build_vector of 0s which gets lowered to a vmv.v.i. The insert chain overwrites all elements so SimplifyDemandedVectorElts turns the vmv.v.i back into undef and the cycle repeats. We probably should custom lower fixed vector undef to scalable vector undef. I think that would also fix the infinite loop, but I didn't test that. Reviewed By: luke Differential Revision: https://reviews.llvm.org/D153399
-
Fangrui Song authored
They will demonstrate some symbol that --adjust-vma= should not adjust. Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D153401
-
Craig Topper authored
The definition for ISD::EXTRACT_SUBVECTOR says the index must be aligned to the known minimum elements of the extracted type. We mostly got away with this but it turns out there are places that depend on this. For example, this code in getNode for ISD::EXTRACT_SUBVECTOR ``` // EXTRACT_SUBVECTOR of CONCAT_VECTOR can be simplified if the pieces of // the concat have the same type as the extract. if (N1.getOpcode() == ISD::CONCAT_VECTORS && N1.getNumOperands() > 0 && VT == N1.getOperand(0).getValueType()) { unsigned Factor = VT.getVectorMinNumElements(); return N1.getOperand(N2C->getZExtValue() / Factor); } ``` This depends on N2C->getZExtValue() being evenly divisible by Factor. Reviewed By: luke Differential Revision: https://reviews.llvm.org/D153380
-