- Feb 08, 2022
-
-
James Y Knight authored
The above change assumed that malloc (and friends) would always allocate memory to getNewAlign(), even for allocations which have a smaller size. This is not actually required by spec (a 1-byte allocation may validly have 1-byte alignment). Some real-world malloc implementations do not provide this guarantee, and thus this optimization is breaking programs. Fixes #53540 This reverts commit c2297544. Differential Revision: https://reviews.llvm.org/D118804
-
LLVM GN Syncbot authored
-
Daniel Thornburgh authored
Debuginfod can pull in libcurl as a dependency, which isn't appropriate for libLLVM. (See https://gitlab.freedesktop.org/mesa/mesa/-/issues/5732). This change breaks out debuginfod into a separate non-component library that can be used directly in llvm-symbolizer. The tool can inject debuginfod into the Symbolizer library via an abstract DebugInfoFetcher interface, breaking the dependency of Symbolizer on debuinfod. See https://github.com/llvm/llvm-project/issues/52731 Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D118413
-
Amilendra Kodithuwakku authored
The original warning added in D115501 when pacbti is used with an incompatible architecture was not exactly correct because it was not really ignored and can affect codegen. Therefore reword to say that the pacbti option is incompatible with the given architecture. Reviewed By: chill Differential Revision: https://reviews.llvm.org/D119166
-
Leonard Chan authored
Differential Revision: https://reviews.llvm.org/D119201
-
Steffen Larsen authored
These changes make the Clang parser recognize expression parameter pack expansion and initializer lists in attribute arguments. Because expression parameter pack expansion requires additional handling while creating and instantiating templates, the support for them must be explicitly supported through the AcceptsExprPack flag. Handling expression pack expansions may require a delay to when the arguments of an attribute are correctly populated. To this end, attributes that are set to accept these - through setting the AcceptsExprPack flag - will automatically have an additional variadic expression argument member named DelayedArgs. This member is not exposed the same way other arguments are but is set through the new CreateWithDelayedArgs creator function generated for applicable attributes. To illustrate how to implement support for expression pack expansion support, clang::annotate is made to support pack expansions. This is done by making handleAnnotationAttr delay setting the actual attribute arguments until after template instantiation if it was unable to populate the arguments due to dependencies in the parsed expressions.
-
Alex Brachet authored
These were all the non OS agnostic implementations I could find in general directories. Currently none of these functions are actually enabled, but for when they do it makes sense that they be in linux/ specific directories. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D119164
-
Roman Lebedev authored
As long as *all* the invokes in the set are indirect, we can merge them, but don't merge direct invokes into the set, even though it would be legal to do.
-
Roman Lebedev authored
[SimplifyCFG] 'merge compatible invokes': don't create trivial PHI's with all-identical incoming values
-
Roman Lebedev authored
-
Stanislav Mekhanoshin authored
We can select _vgprcd versions of MAI instructions and have no AGPRs with the whole budget left for VGPRs if: 1. This is a kernel; 2. It has no calls; 3. It runs at least on 2 waves thus having not more that 256 VGPRs. 4. There is no inline asm requesting AGPRs. Differential Revision: https://reviews.llvm.org/D117253
-
Mahesh Ravishankar authored
There are a few different test passes that check elementwise fusion in Linalg. Consolidate them to a single pass controlled by different pass options (in keeping with how `TestLinalgTransforms` exists).
-
Josh Mottley authored
This patch adds partial lowering of the "GET_ENVIRONMENT_VARIABLE" intrinsic to the backend runtime hook implemented in patches D111394 and D112698. It also renames the `isPresent` lambda to `isAbsent` and moves it out to its own function in `Command.cpp`. Corresponding comment fixes for this are also modified. Lastly it adds the i1 type to `RuntimeCallTestBash.h`. Differential Revision: https://reviews.llvm.org/D118984
-
Craig Topper authored
Most Intel CPU scheduler files lumped the immediate and 1 instructions together, but uops.info shows they are quite different. For the most part the by 1 instructions were pretty accurate to the uops.info data except the latency was 3 instead of 2 as uops.info indicates. The by immediate instructions need 7 or 8 uops and have higher latency. It looks like the 8-bit by immediate instructions may need even more uops, but I just lumped them with the 16/32/64. Noticed while checking out PR53648. So mostly I cared about the by 1 instructions. Reviewed By: RKSimon, pengfei Differential Revision: https://reviews.llvm.org/D119217
-
Corentin Jabot authored
Implement P2128R6 in C++23 mode. Unlike GCC's implementation, this doesn't try to recover when a user meant to use a comma expression. Because the syntax changes meaning in C++23, the patch is *NOT* implemented as an extension. Instead, declaring an array with not exactly 1 parameter is an error in older languages modes. There is an off-by-default extension warning in C++23 mode. Unlike the standard, we supports default arguments; Ie, we assume, based on conversations in WG21, that the proposed resolution to CWG2507 will be accepted. We allow arrays OpenMP sections and C++23 multidimensional array to coexist: [a , b] multi dimensional array [a : b] open mp section [a, b: c] // error The rest of the patch is relatively straight forward: we take care to support an arbitrary number of arguments everywhere.
-
Joseph Huber authored
This patch replaces the function we emit the remark on when we run into the fix-point limit. Previously we got a function to emit a remark on from the worklist's associated function. However, the worklist may not always have an associated function in the case of global variables. Replace this with the function set, and if there are no functions don't emit the remark. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D119248
-
Joseph Huber authored
This patch manually adds the runtime include files to the list of dependencies when we build the bitcode runtime library. Previously if only the header was changed we would not recompile the source files. The solution used here isn't optimal because every source file not has a dependency on each header file regardless of if it was actually used by that file. Reviewed By: tianshilei1992 Differential Revision: https://reviews.llvm.org/D119254
-
Krzysztof Parzyszek authored
The documentation for the official (downstream) Qualcomm Hexagon Clang states that -mhvx sets the HVX version to be the same as the CPU version. The current implementation upstream would use the most recent versioned -mhvx= flag first (if present), then the CPU version. Change the upstream behavior to match the documented behavior of the downstream compiler.
-
Dawid Jurczak authored
Among many FoldingSet users most notable seem to be ASTContext and CodeGenTypes. The reasons that we spend not-so-tiny amount of time in FoldingSet calls from there, are following: 1. Default FoldingSet capacity for 2^6 items very often is not enough. For PointerTypes/ElaboratedTypes/ParenTypes it's not unlikely to observe growing it to 256 or 512 items. FunctionProtoTypes can easily exceed 1k items capacity growing up to 4k or even 8k size. 2. FoldingSetBase::GrowBucketCount cost itself is not very bad (pure reallocations are rather cheap thanks to BumpPtrAllocator). What matters is high collision rate when lot of items end up in same bucket slowing down FoldingSetBase::FindNodeOrInsertPos and trashing CPU cache (as items with same hash are organized in intrusive linked list which need to be traversed). This change address both issues by increasing initial size of FoldingSets used in ASTContext and CodeGenTypes. Extracted from: https://reviews.llvm.org/D118385 Differential Revision: https://reviews.llvm.org/D118608
-
Benjamin Kramer authored
Static functions in a header cause spurious unused function warnings.
-
Jacques Pienaar authored
-
Bixia Zheng authored
Add a Python method, output_sparse_tensor, to use sparse_tensor.out to write a sparse tensor value to a file. Modify the method that evaluates a tensor expression to return a pointer of the MLIR sparse tensor for the result to delay the extraction of the coordinates and non-zero values. Implement the Tensor to_file method to evaluate the tensor assignment and write the result to a file. Add unit tests. Modify test golden files to reflect the change that TNS outputs now have a comment line and two meta data lines. Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D118956
-
Balazs Benics authored
This reverts commit 841817b1. Ah, it still fails on build bots for some reason. Pinning the target triple was not enough.
-
Mark de Wever authored
This avoids using an libc++ internal macro in our tests. Reviewed By: #libc, philnik, ldionne Differential Revision: https://reviews.llvm.org/D118874
-
Mark de Wever authored
This has been suggested in D117950. Reviewed By: ldionne, #libc, philnik Differential Revision: https://reviews.llvm.org/D118971
-
Andy Yankovsky authored
On Windows certain function from `Signals.h` require that `DbgHelp.dll` is loaded. This typically happens when the main program calls `llvm::InitLLVM`, however in some cases main program doesn't do that (e.g. when the application is using LLDB via `liblldb.dll`). This patch adds a safe guard to prevent crashes. More discussion in https://reviews.llvm.org/D119009. Reviewed By: aganea Differential Revision: https://reviews.llvm.org/D119181
-
Mircea Trofin authored
Added a `NoopSavedModelImpl` type which can be used as a mock AOT-ed saved model, and further minimize conditional compilation cases. This also removes unused function warnings on gcc.
-
Krzysztof Drewniak authored
The conversion to the new ControlFlow dialect didn't change the GPUToROCDL pass - this commit fixes this issue. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D119188
-
Hongtao Yu authored
Tracking optimized-away inlinees based on all probes in a binary is expansive in terms of memory usage I'm making the tracking on-demand based on profiled functions only. This saves about 10% memory overall for a medium-sized benchmark. Before: note: After parsePerfTraces note: Thu Jan 27 18:42:09 2022 note: VM: 8.68 GB RSS: 8.39 GB note: After computeSizeForProfiledFunctions note: Thu Jan 27 18:42:41 2022 note: **VM: 10.63 GB RSS: 10.20 GB** note: After generateProbeBasedProfile note: Thu Jan 27 18:45:49 2022 note: VM: 25.00 GB RSS: 24.95 GB note: After postProcessProfiles note: Thu Jan 27 18:49:29 2022 note: VM: 26.34 GB RSS: 26.27 GB After: note: After parsePerfTraces note: Fri Jan 28 12:04:49 2022 note: VM: 8.68 GB RSS: 7.65 GB note: After computeSizeForProfiledFunctions note: Fri Jan 28 12:05:26 2022 note: **VM: 8.68 GB RSS: 8.42 GB** note: After generateProbeBasedProfile note: Fri Jan 28 12:08:03 2022 note: VM: 22.93 GB RSS: 22.89 GB note: After postProcessProfiles note: Fri Jan 28 12:11:30 2022 note: VM: 24.27 GB RSS: 24.22 GB This should be a no-diff change in terms of profile quality. Reviewed By: wenlei Differential Revision: https://reviews.llvm.org/D118515
-
Mark de Wever authored
This change is a preparation for adapting the tests for P2216 std::format improvements Reviewed By: #libc, Quuxplusone, ldionne Differential Revision: https://reviews.llvm.org/D118717
-
Balazs Benics authored
Sometimes when I pass the mentioned option I forget about passing the parameter list for c++ sources. It would be also useful newcomers to learn about this. This patch introduces some logic checking common misuses involving `-analyze-function`. Reviewed-By: martong Differential Revision: https://reviews.llvm.org/D118690
-
Matt Arsenault authored
Previously would reuse the VGPR used for large frame offsets with the one needed for copying from the AGPR. Fix this by reusing the register we already reserved for handling AGPR to AGPR copies.
-
Philip Reames authored
PredicatedScalarEvolution has a predicate type for representing A == B. This change generalizes it into something which can represent a A <pred> B. This generality is currently unused, but is motivated by a couple of recent cases which have come up. In particular, I'm currently playing around with using this to simplify the runtime checking code in LoopVectorizer. Regardless of the outcome of that prototyping, generalizing the compare node seemed useful.
-
Nikita Popov authored
Alloca promotion can only deal with cases where the load/store types match the alloca type (it explicitly does not support bitcasted load/stores). With opaque pointers this is no longer enforced through the pointer type, so add an explicit check.
-
Matt Arsenault authored
We need to guarantee cheap copies between AGPRs, and unfortunately gfx908 cannot directly do this. Theoretically we could set the scavenger up with an emergency spill slot, but it also feels unreasonable to pay that cost for what was assumed to be a simple and cheap copy. Pick a register that doesn't conflict with any ABI registers. This does not address the same issue when copying from SGPR to AGPR for gfx90a (this coincidentally fixes it for gfx908), but that's less interesting since the register allocator shouldn't be proactively introducing such copies. One edge case I'm worried about is respecting the VGPR budget implied by amdgpu-waves-per-eu. If the theoretical upper bound of a function is 32 VGPRs, this will force the actual count to be 33. This is also broken if inline assembly uses/defs something in v32. The coalescer will eliminate the intermediate vreg between the def and use, and the introduced copy will clobber the user value. (cherry picked from commit 3335784ac2d587ff4eac04586e189532ae8b2607)
-
Matt Arsenault authored
-
Louis Dionne authored
This testing configuration links tests against one libc++ shared library, but runs them against another libc++ shared library. This makes sure that we can build applications against the libc++ provided in a recent SDK and back-deploy them to platforms containing older libc++ dylibs. It also switches the Apple CI script to using that new configuration instead of the legacy one. Differential Revision: https://reviews.llvm.org/D119195
-
zhijian authored
Summary: 1.added a helper function isSymbolDefined(). 2.Split out sorting code 3.refactor symbol comparing function Reviewers: James Henderson,Fangrui Song Differential Revision: https://reviews.llvm.org/D119028
-
Sanjay Patel authored
The test diffs are identical to D119111. This only affects x86 currently because no other target has an override for the TLI hook that controls this transform.
-
Nikita Popov authored
The code assumed that the upgrade would happen due to the argument count changing from 4 to 5. However, a remangling upgrade is also possible here.
-