- Feb 09, 2024
-
-
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.
-
Jan Svoboda authored
This patch provides more information to the `PPCallbacks::InclusionDirective()` hook. We now always pass the suggested module, regardless of whether it was actually imported or not. The extra `bool ModuleImported` parameter then denotes whether the header `#include` will be automatically translated into import the the module. The main change is in `clang/lib/Lex/PPDirectives.cpp`, where we take care to not modify `SuggestedModule` after it's been populated by `LookupHeaderIncludeOrImport()`. We now exclusively use the `SM` (`ModuleToImport`) variable instead, which has been equivalent to `SuggestedModule` until now. This allows us to use the original non-modified `SuggestedModule` for the callback itself. (This patch turns out to be necessary for https://github.com/apple/llvm-project/pull/8011).
-
Peiming Liu authored
-
Krystian Stasiowski authored
[Clang][Sema] Abbreviated function templates do not append invented parameters to empty template parameter lists (#80864) According to [dcl.fct] p23: > An abbreviated function template can have a _template-head_. The invented _template-parameters_ are appended to the _template-parameter-list_ after the explicitly declared _template-parameters_. `template<>` is not a _template-head_ -- a _template-head_ must have at least one _template-parameter_. This patch corrects our current behavior of appending the invented template parameters to the innermost template parameter list, regardless of whether it is empty. Example: ``` template<typename T> struct A { void f(auto); }; template<> void A<int>::f(auto); // ok template<> template<> // warning: extraneous template parameter list in template specialization void A<int>::f(auto); ``` -
Valentin Clement (バレンタイン クレメン) authored
This is a first simple patch to introduce a new FIR attribute to carry the CUDA variable attribute information to hlfir.declare and fir.declare operations. It currently lowers this information for local variables. The texture attribute is omitted since it is rejected by semantic and will not make its way to MLIR. This new attribute is added as optional attribute to the hlfir.declare and fir.declare operations.
-
S. Bharadwaj Yadavalli authored
Match DXIL TableGen class names with structure names in DXIL Emitter. Delete unnecessary Name field.
-
Cooper Partin authored
Fixes #55106 In HLSL bit shifts are defined to shift by shift size % type size. This contains the following changes: HLSL codegen bit shifts will be emitted as x << (y & (sizeof(x) - 1) and bitshift masking leverages the OpenCL pipeline for this. Tests were also added to validate this behavior. Before this change the following was being emitted: ; Function Attrs: noinline nounwind optnone define noundef i32 @"?shl32@@YAHHH@Z"(i32 noundef %V, i32 noundef %S) #0 { entry: %S.addr = alloca i32, align 4 %V.addr = alloca i32, align 4 store i32 %S, ptr %S.addr, align 4 store i32 %V, ptr %V.addr, align 4 %0 = load i32, ptr %V.addr, align 4 %1 = load i32, ptr %S.addr, align 4 %shl = shl i32 %0, %1 ret i32 %shl } After this change: ; Function Attrs: noinline nounwind optnone define noundef i32 @"?shl32@@YAHHH@Z"(i32 noundef %V, i32 noundef %S) #0 { entry: %S.addr = alloca i32, align 4 %V.addr = alloca i32, align 4 store i32 %S, ptr %S.addr, align 4 store i32 %V, ptr %V.addr, align 4 %0 = load i32, ptr %V.addr, align 4 %1 = load i32, ptr %S.addr, align 4 %shl.mask = and i32 %1, 31 %shl = shl i32 %0, %shl.mask ret i32 %shl } --------- Co-authored-by:Cooper Partin <coopp@ntdev.microsoft.com>
-
Philip Reames authored
This is a reduced test case for a fix for the issue identified in https://github.com/llvm/llvm-project/issues/80910.
-
Simon Pilgrim authored
[X86] X86FixupVectorConstants - use explicit register bitwidth for the loaded vector instead of using constant pool bitwidth Fixes #81136 - we might be loading from a constant pool entry wider than the destination register bitwidth, affecting the vextload scale calculation. ConvertToBroadcastAVX512 doesn't yet set an explicit bitwidth (it will default to the constant pool bitwidth) due to difficulties in looking up the original register width through the fold tables, but as we only use rebuildSplatCst this shouldn't cause any miscompilations, although it might prevent folding to broadcast if only the lower bits match a splatable pattern.
-
Dave Lee authored
Refactors logic in `ParseInternal` that was previously calling `GetFormatFromCString` twice, once with `partial_match_ok` set to false, and the second time set to true. With this change, lldb formats (ie `%@`, `%S`, etc) are checked first. If a format is not one of those, then `GetFormatFromCString` is called once, and now always checks for partial matches.
-
Jason Molenda authored
This formatter https://github.com/llvm/llvm-project/pull/78609 was originally passing the signed seconds (which can refer to times in the past) with an unsigned printf formatter, and had tests that expected to see negative values from the printf which always failed on macOS. I'm not clear how they ever passed on any platform. Fix the printf to print seconds as a signed value, and re-enable the tests.
-
Jeremy Morse authored
This patch causes all variable-location debug-info to be converted into non-intrinsic records as they passes through the optimisation / instrumentation passes. There's a brief introduction here [0] and a more detailed thread on what this means on discourse at [1]. If this commit is breaking your downstream tests, please see comment 12 in [1], which documents the kind of variation in tests we'd expect to see from this change and what to do about it. [0] https://llvm.org/docs/RemoveDIsDebugInfo.html [1] https://discourse.llvm.org/t/rfc-instruction-api-changes-needed-to-eliminate-debug-intrinsics-from-ir/68939
-
Adrian Prantl authored
-
Adrian Prantl authored
-
Valentin Clement (バレンタイン クレメン) authored
In #80317 the data op generation was updated to use correctly the #0 result from the hlfir.delcare op. In case of optional that are not descriptor, it is preferable to use the original input for the varPtr value of the OpenACC data op. This patch also make sure that the descriptor value of optional is only accessed when present.
-
stephenpeckham authored
XCOFF encodes a symbol type and alignment in a single 8-bit field. It is easier to read and write YAML files if the fields can be specified separately. This PR causes obj2yaml to write the fields separately and allows yaml2obj to read either the single combined field or the separate fields.
-
Simon Pilgrim authored
Make it clearer that this refers to the width of the constant element stored in memory - which won't match the register element width after a sext/zextload
-
Simon Pilgrim authored
-
Simon Pilgrim authored
[X86] X86FixupVectorConstants - add destination register width to rebuildSplatCst/rebuildZeroUpperCst/rebuildExtCst callbacks As found on #81136 - we aren't correctly handling for cases where the constant pool entry is wider than the destination register width, causing incorrect scaling of the truncated constant for load-extension cases. This first patch just pulls out the destination register width argument, its still currently driven by the constant pool entry but that will be addressed in a followup.
-
Ivan Kosarev authored
-
Jeremy Morse authored
A colleague observes that switching the default value of LLVM_EXPERIMENTAL_DEBUGINFO_ITERATORS to "On" hasn't flipped the value in their CMakeCache.txt. This probably means that everyone with an existing build tree is going to not have support built in, meaning everyone in LLVM would need to clean+rebuild their worktree when we flip the switch on... which doesn't sound good. So instead, just delete the flag and everything it does, making everyone build and run ~400 lit tests in RemoveDIs mode. None of the buildbots have had trouble with this, so it Should Be Fine (TM). (Sending for review as this is changing various comments, and touches several different areas -- I don't want to get too punchy).
-
- Feb 08, 2024
-
-
ian Bearman authored
Collection of changes with the goal of being able to convert `encoding` to `memorySpace` during bufferization - new API for encoder to allow implementation to select destination memory space - update existing bufferization implementations to support the new interface
-