- Feb 09, 2024
-
-
Joseph Huber authored
This reverts commit 9211e67d. Summary: This seemed to crash one one of the CUDA math tests. Revert until it can be fixed.
-
-
Joseph Huber authored
Summary: Currently, the linker wrapper sorts input files into different link jobs according to their architectures. Here we assume each architecture is a unique and incompatible link job unless they are specifically marked compatible. This patch simply adds an `all` target to represent an architecture that should be linked against every single other architecture. This will be useful for modelling generic IR such as the ROCm device libraries or the NVPTX libdevice.
-
Joseph Huber authored
Summary: The `__nvvm_reflect` function is used to guard invalid code that varies between architectures. One problem with this feature is that if it is used without optimizations, it will leave invalid code in the module that will then make it to the backend. The `__nvvm_reflect` pass is already mandatory, so it should do some trivial branch removal to ensure that constants are handled correctly. This dead branch elimination only works in the trivial case of a compare on a branch and does not touch any conditionals that were not realted to the `__nvvm_reflect` call in order to preserve `O0` semantics as much as possible. This should allow the following to work on NVPTX targets ```c int foo() { if (__nvvm_reflect("__CUDA_ARCH") >= 700) asm("valid;\n"); } ``` -
Alex MacLean authored
The current implementation of aliases tries to remove all the aliases in the module to prevent the generic version of `AsmPrinter` from emitting them incorrectly. Unfortunately, if the aliases are used this will fail. Instead let's override the function to print aliases directly. In addition, the declarations of the alias functions must occur before the uses. To fix this we emit alias declarations as part of `emitDeclarations` and only emit the `.alias` directives at the end (where we can assume the aliasee has also already been declared).
-
Valentin Clement (バレンタイン クレメン) authored
The custom printer for `fir.global` was eluding all the attributes present on the op when printing the attribute dictionary. So any attribute that is not part of the pretty printing was therefore discarded. This patch fix the printer and also make use of the getters for the attribute names when they are hardcoded.
-
Jerry Wu authored
Add `scf::wrapWhileLoopInZeroTripCheck` to wrap scf while loop in zero-trip-check.
-
Luke Lau authored
Otherwise we will crash since target intrinsics don't have their types legalized. Let the mgather get legalized first, then do the combine on the legal type. Fixes #81088 Co-authored-by:Craig Topper <craig.topper@sifive.com>
-
Reid Kleckner authored
This code was correct as written prior to C++17, which allowed bases to appear in the initializer list. This was observable by creating non-constant aggregate initialization at file scope in a compound literal, but since that behavior will change soon if we implement support for dynamic initialization, I also added a unit test for `isConstantInitializer`. This fixes at least one part of issue #80510 . --------- Co-authored-by:Aaron Ballman <aaron@aaronballman.com>
-
Davide Italiano authored
-
Maksim Panchenko authored
We run CheckLargeFunctions pass in non-relocation mode to prevent the emission of functions that later could not be written to the output due to their large size. The main reason behind the pass is to prevent the emission of metadata for such functions since this metadata becomes incorrect if the function is left unmodified. Currently, the pass is enabled in non-relocation mode only when debug info output is also enabled. As we emit increasingly more kinds of metadata, e.g. for the Linux kernel, it becomes more challenging to track metadata that needs to be fixed. Hence, I'm enabling the pass to always run in non-relocation mode.
-
NAKAMURA Takumi authored
-
Arthur Eubanks authored
This was missing in the gn build for some reason, causing build errors like http://45.33.8.238/linux/130337/step_4.txt after 3b57b647.
-
Alex MacLean authored
Cleanup some dead variables. In addition, switch to a `MAKE_CASE` macro, similar to other targets, to reduce boilerplate.
-
Craig Topper authored
MCPhysReg is 2 bytes, while Register is 4 bytes.
-
Fangrui Song authored
DWARFLinkerImpl::DWARFLinkerImpl initializes DebugStrStrings/DebugLineStrStrings/CommonSections using GlobalData but GlobalData is initialized after the three members. Move GlobalData before. Fix #81110
-
Timm Bäder authored
-
Derek Schuff authored
Currently symbol info is generated from a linking section or from export names. This PR generates symbols in a WasmObjectFile from the name section as well, which allows tools like objdump and nm to show useful information for more linked binaries. There are some limitations: most notably that we don't assume any particular ABI, so we don't get detailed information about data symbols if the segments are merged (which is the default). Covers most of the desired functionality from #76107
-
NAKAMURA Takumi authored
Deprecate `TestVectors`, since no one uses it. This affects the output order of ExecVectors. The current impl emits sorted by binary value of ExecVector. This impl emits along the traversal of `buildTestVector()`.
-
Jonas Devlieghere authored
LLDB has a setting (symbols.enable-background-lookup) that calls dsymForUUID on a background thread for images as they appear in the current backtrace. Originally, the laziness of only looking up symbols for images in the backtrace only existed to bring the number of dsymForUUID calls down to a manageable number. Users have requesting the same functionality but blocking. This gives them the same user experience as enabling dsymForUUID globally, but without the massive upfront cost of having to download all the images, the majority of which they'll likely not need. This patch renames the setting to have a more generic name (symbols.auto-download) and changes its values from a boolean to an enum. Users can now specify "off", "background" and "foreground". The default remains "off" although I'll probably change that in the near future.
-
Philip Reames authored
This adjusts the isSubVectorExtractCheap callback to consider any extract which fits entirely within the first VLEN bits of the src vector (and uses a 5 bit immediate for the slide) as cheap. These can be done via a single m1 vslide1down.vi instruction. This allows our generic DAG combine logic to kick in and recognize a few more cases where shuffle source is longer than the dest, but that using a wider shuffle is still profitable. (Or as shown in the test diff, we can split the wider source and do two narrower shuffles.)
-
Jonas Devlieghere authored
Reverts llvm/llvm-project#80890
-
John Demme authored
Currently, a method exists to get the count of the operation objects which are still alive. This helps for sanity checking, but isn't terribly useful for debugging. This new method returns the actual operation objects which are still alive. This allows Python code like the following: ``` gc.collect() live_ops = ir.Context.current._get_live_operation_objects() for op in live_ops: print(f"Warning: {op} is still live. Referrers:") for referrer in gc.get_referrers(op)[0]: print(f" {referrer}") ``` -
Yinying Li authored
1. Add parsing methods for block[n, m]. 2. Encode n and m with the newly extended 64-bit LevelType enum. 3. Update 2:4 methods names/comments to n:m.
-
Natalie Chouinard authored
Add a SPIR-V target-specific intrinsic for creating handles, which is used for lowering HLSL resources types like RWBuffer. `llvm/lib/TargetParser/Triple.cpp`: SPIR-V intrinsics use "spv" as the target prefix, not "spirv". As far as I can tell, this is the first one that is used via the `CGBuiltin` codepath, which relies on `getArchTypePrefix`, so I've corrected it here. `clang/lib/Basic/Targets/SPIR.h`: When records are laid out in the lowering from AST to IR, they were incorrectly offset because these Pointer attributes were defaulting to 32. Related to #81036
-
Jacob Lambert authored
-
Philip Reames authored
Fixes https://github.com/llvm/llvm-project/issues/80910. Per the documentation in ISDOpcodes.h, for BUILD_VECTOR "The types of the operands must match the vector element type, except that integer types are allowed to be larger than the element type, in which case the operands are implicitly truncated." This transform was assuming that the scalar operand type matched the result type. This resulted in essentially performing a truncate before a binop, instead of after. As demonstrated by the test case changes, this is often not legal.
-
alex-t authored
[AMDGPU] Compiler should synthesize private buffer resource descriptor from flat_scratch_init (#79586) This change implements synthesizing the private buffer resource descriptor in the kernel prolog instead of using the preloaded kernel argument.
-
Jonas Devlieghere authored
LLDB has a setting (symbols.enable-background-lookup) that calls dsymForUUID on a background thread for images as they appear in the current backtrace. Originally, the laziness of only looking up symbols for images in the backtrace only existed to bring the number of dsymForUUID calls down to a manageable number. Users have requesting the same functionality but blocking. This gives them the same user experience as enabling dsymForUUID globally, but without the massive upfront cost of having to download all the images, the majority of which they'll likely not need. This patch renames the setting to have a more generic name (symbols.auto-download) and changes its values from a boolean to an enum. Users can now specify "off", "background" and "foreground". The default remains "off" although I'll probably change that in the near future.
-
Jeremy Kun authored
-
Krystian Stasiowski authored
The following test case in `clang-tools-extra/test/clang-tidy/infrastructure/diagnostic.cpp` is failing: ``` #ifdef PR64602 // Should not crash template <class T = void> struct S { auto foo(auto); }; template <> auto S<>::foo(auto) { return 1; } // CHECK8: error: template parameter list matching the non-templated nested type 'S<>' should be empty ('template<>') [clang-diagnostic-error] #endif ``` #80864 fixes a bug where we would (incorrectly) append invented template parameters to empty template parameter lists, which causes this test to fail. -
Fangrui Song authored
The MemoryBuffer is created using `RequiresNullTerminator`, so we can safely skip the `CurPtr != CurBuf.end()` check. The redundant check causes a cppcheck report. In addition, elsewhere, including `*CurPtr == '#'` below, makes the null terminator assumption as well. Close #81120
-
Chelsea Cassanova authored
This commit adds a new broadcast bit to the debugger. When in use, it will be listened to for progress events that will be delivered and kept track of by category as opposed to the current behaviour of coming in one by one.
-
Jan Svoboda authored
-
Nicolai Hähnle authored
Both LLVM_LINK_LLVM_DYLIB and LLVM_PARALLEL_LINK_JOBS help with some common gotchas. It seems worth documenting them here explicitly. Based on a review comment, also "refactor" the documentation to avoid duplication.
-
Valentin Clement authored
-
Nikolas Klauser authored
This reduces the time to include `<compare>` from 84ms to 36ms.
-
Nikolas Klauser authored
The cv specializations for `numeric_limits` inherited privately for some reason. We can simplify the implementation by inheriting publicly and removing the members that just replicate the values from the base class.
-
Nikolas Klauser authored
-
Jeremy Morse authored
This reverts commit bdde5f9b. Two situations that are tripping a few buildbots: https://lab.llvm.org/buildbot/#/builders/205/builds/25126 Here, polly is currently presenting a DebugLoc attached to a debugging intrinsic as a "true" source location in a user report, something that's unreliable. https://lab.llvm.org/buildbot/#/builders/184/builds/10242 These HWAsan failures are probably (97% confidence) because in StackInfoBuilder::visit we're not observing DPValues attached to lifetime intrinsics because they're delt with higher up the function. But it's late-o'clock here, so revert for now.
-