- Jun 23, 2023
-
-
Sheng authored
`TargetGlobalTLSAddress` is not considered and handled correctly when matching addressing mode, which leads to an incorrect result of instruction selection. fixes #63162. Reviewed By: myhsu Differential Revision: https://reviews.llvm.org/D153103
-
Vitaly Buka authored
-
Vitaly Buka authored
-
Vitaly Buka authored
-
Vitaly Buka authored
-
Alex Langford authored
The Objective-C runtime and the shared cache has changed slightly. Given a class_ro_t, the baseMethods ivar is now a pointer union and may either be a method_list_t pointer or a pointer to a relative list of lists. The entries of this relative list of lists are indexes that refer to a specific image in the shared cache in addition to a pointer offset to find the accompanying method_list_t. We have to go over each of these entries, parse it, and then if the relevant image is loaded in the process, we add those methods to the relevant clang Decl. In order to determine if an image is loaded, the Objective-C runtime exposes a symbol that lets us determine if a particular image is loaded. We maintain a data structure SharedCacheImageHeaders to keep track of that information. There is a known issue where if an image is loaded after we create a Decl for a class, the Decl will not have the relevant methods from that image (i.e. for Categories). rdar://107957209 Differential Revision: https://reviews.llvm.org/D153597
-
Matt Arsenault authored
This reverts commit aa7e09eb.
-
Matt Arsenault authored
-
Daniel Hoekwater authored
On AArch64, object files may be greater than 2^32 bytes. If an offset is greater than the max value of a 32-bit unsigned integer, LLVM silently truncates the offset. Instead, make it return an error. Differential Revision: https://reviews.llvm.org/D153494
-
Fangrui Song authored
-
Philip Reames authored
I tried to give a rough overview of our current pseudo structure. I'm mostly focused on the policy handling bits - since that's what I'm in the process of changing - but touched on the other dimensions in the process of framing it. Differential Revision: https://reviews.llvm.org/D152937
-
Shatian Wang authored
Order code sections with names in the form of ".text.cold.i" based on the value of i [Context] SplitFunctions.cpp implements splitting strategies that can potentially split each function into maximum N>2 fragments. When such N-way splitting happens, new code sections with names ".text.cold.1", ..., ".text.cold.i", ... "text.cold.N-2" will be created A section with name ".text.cold.i" contains the the (i+2)th fragment of each function. As an example, if each function is splitted into N=3 fragments: hot, warm, cold, then code sections will now include - a section with name ".text" containing hot fragments - a section with name ".text.cold" containing warm fragments - a section with name ".text.cold.1" containing cold fragments The order of these new sections in the output binary currently depends on the order in which they are encountered by the emitter. For example, under N=3-way splitting, if the first function is 2-way splitted into hot and cold and the second function is 3-way splitted into hot, warm, and cold then the cold fragment is encountered first, resulting in the final section to be in the following order .text (hot), .text.cold.1 (cold), .text.cold (warm) The above is suboptimal because the distance of jumps/calls between the hot and the warm sections will be much bigger than when ordering the sections as follows .text (hot), .text.cold (warm), .text.cold.1 (cold) This diff orders the sections with names in the form of ".text.cold" or ".text.cold.i" based on the value of i (assuming the i-value of ".text.cold" is 0). Reviewed By: rafauler Differential Revision: https://reviews.llvm.org/D152941
-
Maksim Panchenko authored
When optimizations passes do not change anything, skip their diagnostics output. NFC otherwise. Reviewed By: Amir Differential Revision: https://reviews.llvm.org/D153386
-
Jonas Devlieghere authored
The variable is named `bundle_dir` but the documentation referenced `directory` which generated a warning.
-
Tomasz Kuchta authored
I noticed that in some cases _tolower shows as uninstrumented - I've added it as "functional" in the done_abilist.txt file Reviewed by: browneee Differential Revision: https://reviews.llvm.org/D153410
-
Fangrui Song authored
This workaround appears to apply with gold<2.34 -O2/-O3 (linker -O2, not compiler driver -O2). This used to be more visible as we used -Wl,-O3 in CMake, but the option is generally not recommended and has been removed by d63016a8 (Dec 2021). This finishes a workaround removal work started by D64327 (2019). Link: https://github.com/llvm/llvm-project/issues/45269
-
Manna, Soumi authored
In getNVPTXLaneID(CodeGenFunction &), the value of LaneIDBits is 4294967295 since function call llvm::Log2_32(CGF->getTarget()->getGridValue().GV_Warp_Size) might return 4294967295. unsigned LaneIDBits = llvm::Log2_32(CGF.getTarget().getGridValue().GV_Warp_Size); unsigned LaneIDMask = ~0u >> (32u - LaneIDBits); The shift amount (32U - LaneIDBits) might be 33, So it has undefined behavior for right shifting by more than 31 bits. This patch adds an assert to guard the LaneIDBits overflow issue with LaneIDMask value. Reviewed By: tahonermann Differential Revision: https://reviews.llvm.org/D151606 -
Peter Klausler authored
The predicate IsPureProcedure() crashes with infinite recursion when presented with mutually recursive statement functions -- an error case that should be recoverable. Fix by adding a visited set. Fixes bug https://github.com/llvm/llvm-project/issues/63231 Differential Revision: https://reviews.llvm.org/D153569
-
Jon Chesterfield authored
Clang defaults to failing to build if it can't find rocm device libs Reviewed By: jhuber6 Differential Revision: https://reviews.llvm.org/D153581
-
Valentin Clement authored
Lower multi-dimensional arrays reduction for add and mul operator. Depends on D153448 Reviewed By: razvanlupusoru Differential Revision: https://reviews.llvm.org/D153455
-
Valentin Clement authored
Lower 1d array reduction for add and mul operator. Multi-dimensional arrays and other operator will follow. Reviewed By: razvanlupusoru Differential Revision: https://reviews.llvm.org/D153448
-
Manna, Soumi authored
This patch uses castAs instead of getAs which will assert if the type doesn't match and adds nullptr check if needed. Also this patch improves the codes and passes I.getData() instead of doing a lookup in dumpVarDefinitionName() since we're iterating over the same map in LocalVariableMap::dumpContex(). Reviewed By: aaron.ballman, aaronpuchert Differential Revision: https://reviews.llvm.org/D153033
-
Vitaly Buka authored
-
Manna, Soumi authored
This patch adds missing assignment operator to the class which has user-defined copy constructor. Reviewed By: tahonermann, aaronpuchert Differential Revision: https://reviews.llvm.org/D150931
-
Vitaly Buka authored
Sanitizers allocate shadow and memory as MAP_NORESERVE. User memory can stay this way and do not increase RSS as long as we don't store there. The shadow unpoisoning also can avoid RSS increase for zeroed pages. However as soon we poison the shadow, we need the page in RSS. To avoid unnececary RSS increase we should not poison memory just before unpoisoning them. Depends on D153497. Reviewed By: thurston Differential Revision: https://reviews.llvm.org/D153500
-
Fangrui Song authored
When the MCAssembler is non-null and the MCAsmLayout is null, we can fold A-B when * A and B are in the same fragment, or * A's fragment suceeds B's fragment, and they are not separated by non-data fragments (D69411) This patch allows folding when A's fragment precedes B's fragment so that `9997b - . == 0` below can be evaluated as true: ``` nop .arch_extension sec 9997:nop // old behavior: error: expected absolute expression .if 9997b - . == 0 .endif ``` Add a case to llvm/test/MC/ARM/directive-if-subtraction.s. Note: for MCAsmStreamer, we cannot evaluate `.if . - 9997b == 0` at parse time due to MCAsmStreamer::getAssemblerPtr returning nullptr (D45164). Some Darwin tests check that this folding does not work. Add `.p2align 2` to block some label difference folding or adjust the tests. Reviewed By: nickdesaulniers Differential Revision: https://reviews.llvm.org/D153096
-
Florian Hahn authored
Test cases for #62565.
-
Joseph Huber authored
These headers are currently broken when included from the offloading languages like OpenMP, OpenCL, CUDA, and HIP. Turn this logic off so we can compile these languages when the GPU libc is installed. I am currently trying to remedy this and have made an RFC for it in libc, see https://discourse.llvm.org/t/rfc-implementing-gpu-headers-in-the-llvm-c-library/71523. Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D153578
-
Fangrui Song authored
-
Manna, Soumi authored
Reviewed By: erichkeane, steakhal, tahonermann, shafik Differential Revision: https://reviews.llvm.org/D150744
-
Sam McCall authored
This appears to be just an accidental copy rather than move from a scratch variable. As well as doing redundant work, these copies introduce extra SAT variables which make debugging harder (each Enviroment has a unique FC token). Example flow condition before: ``` (B0:1 = V15) (B1:1 = V8) (B2:1 = V10) (B3:1 = (V4 & (!V7 => V6))) (V10 = (B3:1 & !V7)) (V12 = B1:1) (V13 = B2:1) (V15 = (V12 | V13)) (V3 = V2) (V4 = V3) (V8 = (B3:1 & !!V7)) B0:1 V2 ``` after: ``` (B0:1 = (V9 | V10)) (B1:1 = (B3:1 & !!V6)) (B2:1 = (B3:1 & !V6)) (B3:1 = (V3 & (!V6 => V5))) (V10 = B2:1) (V3 = V2) (V9 = B1:1) B0:1 V2 ``` (with labelling from D153488) There are also some more copies that can be avoided here (when multiple blocks without terminating statements are joined), but they're less trivial, so I'll put those in another patch. Differential Revision: https://reviews.llvm.org/D153491
-
Joe Nash authored
The _e64_dpp suffix can be added to an instruction to force the AsmParser to encode it as VOP3 with DPP if possible on GFX11+. This has been the behavior since GFX11 was introduced; this patch only updates the documentation. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D153564
-
Vitaly Buka authored
ComplexDeinterleavingPass.cpp:1849:3: error: default label in switch which covers all enumeration values This reverts commit 116953b8.
-
Craig Topper authored
As the extension list continues to grow it probably makes sense to use a binary search rather than linear search. Sorting the strings will make this possible. This also avoids any question about where to add new strings in the tables. Reviewed By: asb Differential Revision: https://reviews.llvm.org/D153170
-
Vitaly Buka authored
For the secondary allocation we don't need poison and fill memory if we skip quarantine, and we don't need to poison after quarantine. In both cases the secondary allocator will unmap memory and unpoison the shadow from get_allocator().Deallocate(). Depends on D153496. Reviewed By: thurston Differential Revision: https://reviews.llvm.org/D153497
-
Matt Arsenault authored
The select-of-different-exp pattern appears in the device libraries. I haven't seen the select-of-values case.
-
Matt Arsenault authored
-
Paul Robinson authored
-
Florian Hahn authored
getExpr is missing a check to make sure the result is invertible. This can lead to incorrect results, so return nullptr in those cases like in other places in IVUsers. Fixes #62660. Reviewed By: qcolombet Differential Revision: https://reviews.llvm.org/D153202
-