- May 08, 2024
-
-
Harald van Dijk authored
We already remapped DILocations for DbgVariableRecords, but DbgLabelRecords have debug locations too that need to be mapped the same way.
-
Weaver authored
This reverts commit a99ce615. Caused test failure on following buildbot: https://lab.llvm.org/buildbot/#/builders/139/builds/65066
-
Kadir Cetinkaya authored
We can have concurrent accesses to same PreambleData (e.g. code-completion and ast-builds). Hence we need to deep copy TargetOpts.
-
Benjamin Kramer authored
-
Aleksandr Popov authored
Encapsulate check that a call has a deopt bundle to make it easier to change the deopt scheme.
-
YunQiang Su authored
Gas uses encoding DW_EH_PE_absptr for PIC, and gnu ld converts it to DW_EH_PE_sdata4|DW_EH_PE_pcrel. LLD doesn't have this workarounding, thus complains ``` relocation R_MIPS_32 cannot be used against local symbol; recompile with -fPIC relocation R_MIPS_64 cannot be used against local symbol; recompile with -fPIC ``` So, let's generates asm/obj files with `DW_EH_PE_sdata4|DW_EH_PE_pcrel` encoding. In fact, GNU ld supports such OBJs well. For N64, maybe we should use sdata8, while GNU ld doesn't support it well, and in fact sdata4 is enough now. So we just ignore the `Large` for `MCObjectFileInfo::initELFMCObjectFileInfo`. Maybe we should switch back to sdata8 once GNU LD supports it well. Fixes: #58377.
-
Simon Pilgrim authored
Fixes #91433
-
Benjamin Maxwell authored
This patch: 1. Removes some duplicate test cases 2. Removes unnecessary uses of `-convert-arm-sme-to-llvm` 3. Ensures tile values have uses via `test.some_use()` 1 and 2 will make these tests easier to update. 3 will be needed as ArmSME operations will be pure.
-
Kiran Chandramohan authored
Add support for the -w option to switch OFF all Flang warnings. This patch only supports switching OFF the frontend warnings. TODO : Support for MLIR, LLVM and Driver warnings. TODO : Support interactions between -w, -pedantic, -Wall
-
Kiran Chandramohan authored
Extend the checker that deals with CYCLE to handle EXIT also. The difference for EXIT is that it is not allowed to EXIT from the innermost associated loops while it is OK to CYCLE in the innermost associated loop. Also add an incrementer on leaving the DO loop for EXIT checks.
-
Ramkumar Ramachandra authored
The matcher m_Trunc() matches an Operator with a given Opcode, which could either be an Instruction or ConstExpr. VectorCombine::foldTruncFromReductions() incorrectly assumes that the pattern matched is always an Instruction, and attempts a cast. Fix this. Fixes #88796.
-
Ramkumar Ramachandra authored
-
Nikolas Klauser authored
-
Adrian Kuegel authored
atom.add.noftz.bf16 is supported since SM 9.0 and PTX 7.8
-
Luke Lau authored
-
Luke Lau authored
If a segmented load has an undefined passthru then it will be selected as a reg_sequence with implicit_def operands, which currently slips through the implicit_def -> noreg peephole. This patch fixes this so we're able to infer if the passthru is undefined without the need for looking through vreg definitions with MachineRegisterInfo, which will help with moving RISCVInsertVSETVLI to LiveIntervals in #70549
-
Freddy Ye authored
-
martinboehme authored
For some callers (see change in DataflowAnalysis.h), this is more convenient.
-
Mircea Trofin authored
Follow-up from PR ##89838. Some build bots warn-as-error about signed/unsigned comparison in CtxInstrProfilingTest. Example: https://lab.llvm.org/buildbot/#/builders/37/builds/34610
-
Christian Ulmann authored
This commit changes the `MemorySlotInterface` back to using `OpBuilder` instead of a rewriter. This was originally introduced in https://reviews.llvm.org/D150432 but it was shown that patterns are a bad idea for both Mem2Reg and SROA. Mem2Reg suffers from the usage of a rewriter due to being forced to create new basic blocks. This is an issue, as it leads to the invalidation of the dominance information, which can be expensive to recompute.
-
Farzon Lotfi authored
This change is an implementation of #87367's investigation on supporting IEEE math operations as intrinsics. Which was discussed in this RFC: https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294 If you want an overarching view of how this will all connect see: https://github.com/llvm/llvm-project/pull/90088 Changes: - `llvm/docs/GlobalISel/GenericOpcode.rst` - Document the `G_FTAN` opcode - `llvm/include/llvm/IR/Intrinsics.td` - Create the tan intrinsic - `llvm/include/llvm/Support/TargetOpcodes.def` - Create a `G_FTAN` Opcode handler - `llvm/include/llvm/Target/GenericOpcodes.td` - Define the `G_FTAN` Opcode - `llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp` Map the tan intrinsic to `G_FTAN` Opcode - `llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp` - Map the `G_FTAN` opcode to the GLSL 4.5 and openCL tan instructions. - `llvm/lib/Target/SPIRV/SPIRVLegalizerInfo.cpp` - Define `G_FTAN` as a legal spirv target opcode.
-
Luke Lau authored
For vector merge operands, we check if it's a NoRegister beforehand so any other register type should have a definition. For VL operands, they don't get replaced with NoRegisters since they're scalar and should also always have a definition, even if it's an implicit_def. All the definitions at this stage should also be unique, this will change in #70549
-
Craig Topper authored
[RISCV] Don't crash if parseNormalizedArchString encounters a multi-letter extension with an unknown prefix. (#91398) The sorting code previously asserted if a prefix was multiple letters, but didn't start with s, x, or z. Replace the assert with an explicit check and sort the multi-letter extension after the known multi-letter prefixes.
-
Craig Topper authored
[DAGCombiner] Be more careful about looking through extends and truncates in mergeTruncStores. (#91375) Previously we recursively looked through extends and truncates on both SourceValue and WideVal. SourceValue is the largest source found for each of the stores we are combining. WideVal is the source for the current store. Previously we could incorrectly look through a (zext (trunc X)) pair and incorrectly believe X to be a good source. I think we could also look through a zext on one store and a sext on another store and arbitrarily pick one of the extends as the final source. With this patch we only look through one level of extend or truncate. And we don't look through extends/truncs on both SourceValue and WideVal at the same time. This may lose some optimization cases, but keeps everything we had tests for. Fixes #90936.
-
Farzon Lotfi authored
This change is an implementation of #87367's investigation on supporting IEEE math operations as intrinsics. Which was discussed in this RFC: https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294 If you want an overarching view of how this will all connect see: https://github.com/llvm/llvm-project/pull/90088 Changes: - `llvm/include/llvm/IR/Intrinsics.td` - Create the tan intrinsic - `llvm/lib/Target/DirectX/DXIL.td` - Map `int_tan` (the tan intrinsic) to the equivalent DXIL Op.
-
Craig Topper authored
This detects the same extension name being added twice. Mostly I'm worried about the case that the same string appears with two different versions. We will only preserve one of the versions. We could allow the same version to be repeated, but that doesn't seem useful at the moment. I've updated addExtension to use map::emplace instead of map::operator[]. This means we only keep the first version if there are duplicates. Previously we kept the last version, but that shouldn't matter now that we don't allow duplicates. parseArchString already doesn't allow duplicates.
-
Thorsten Schütt authored
LLVM ERROR: unable to legalize instruction: %275:_(<4 x p0>) = G_PTR_ADD %268:_, %274:_(<4 x s64>) (in function: prepare_for_pass)
-
Luke Lau authored
It was relying on the fact that vsetvlis have side effects to prevent reordering, but #91319 proposes to remove the side effects. This reworks it to use volatile loads and stores instead.
-
Liao Chunyu authored
spec: https://github.com/openhwgroup/cv32e40p/blob/master/docs/source/instruction_set_extensions.rst#immediate-branching-operations Contributors: @CharKeaney, @jeremybennett, @lewis-revill, @NandniJamnadas, @PaoloS02, @simonpcook, @xingmingjie, @realqhc, @PhilippvK,@melonedo
-
Jhonatan Cléto authored
Summary: The `GenericDeviceTy::dataDelete` method doesn't verify the `TargetAllocTy` of the of the device pointer. Because of this, it can use the `MemoryManager` to free the ptr. However, the `TARGET_ALLOC_HOST` and `TARGET_ALLOC_SHARED` types are not allocated using the `MemoryManager` in the `GenericDeviceTy::dataAlloc` method. Since the `MemoryManager` uses the `DeviceAllocatorTy::free` operation without specifying the type of the ptr, some plugins may use incorrect operations to free ptrs of certain types. In particular, this bug causes the CUDA plugin to use the `cuMemFree` operation on ptrs of type `TARGET_ALLOC_HOST`, resulting in an unchecked error, as shown in the output snippet of the test `offload/test/api/omp_host_pinned_memory_alloc.c`: ``` omptarget --> Notifying about an unmapping: HstPtr=0x00007c6114200000 omptarget --> Call to llvm_omp_target_free_host for device 0 and address 0x00007c6114200000 omptarget --> Call to omp_get_num_devices returning 1 omptarget --> Call to omp_get_initial_device returning 1 PluginInterface --> MemoryManagerTy::free: target memory 0x00007c6114200000. PluginInterface --> Cannot find its node. Delete it on device directly. TARGET CUDA RTL --> Failure to free memory: Error in cuMemFree[Host]: invalid argument omptarget --> omp_target_free deallocated device ptr ``` This patch fixes this by adding the check of the device pointer type before calling the appropriate operation for each type.
-
Farzon Lotfi authored
This change is an implementation of #87367's investigation on supporting IEEE math operations as intrinsics. Which was discussed in this RFC: https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294 If you want an overarching view of how this will all connect see: https://github.com/llvm/llvm-project/pull/90088 Changes: - `clang/docs/LanguageExtensions.rst` - Document the new elementwise tan builtin. - `clang/include/clang/Basic/Builtins.td` - Implement the tan builtin. - `clang/lib/CodeGen/CGBuiltin.cpp` - invoke the tan intrinsic on uses of the builtin - `clang/lib/Headers/hlsl/hlsl_intrinsics.h` - Associate the tan builtin with the equivalent hlsl apis - `clang/lib/Sema/SemaChecking.cpp` - Add generic sema checks as well as HLSL specifc sema checks to the tan builtin - `llvm/include/llvm/IR/Intrinsics.td` - Create the tan intrinsic - `llvm/docs/LangRef.rst` - Document the tan intrinsic
-
Jie Fu authored
/llvm-project/mlir/lib/Dialect/Bufferization/Transforms/BufferResultsToOutParams.cpp:124:26: error: 'cast' is deprecated: Use mlir::cast<U>() instead [-Werror,-Wdeprecated-declarations] 124 | orig.getType().cast<MemRefType>().hasStaticShape()) { | -
Menooker authored
[MLIR][Bufferization] BufferResultsToOutParams: Add an option to eliminate AllocOp and avoid Copy (#90011) Add an option hoist-static-allocs to remove the unnecessary memref.alloc and memref.copy after this pass, when the memref in ReturnOp is allocated by memref.alloc and is statically shaped. Instead, it replaces the uses of the allocated memref with the memref in the out argument. By default, BufferResultsToOutParams will result in a memcpy operation to copy the originally returned memref to the output argument memref. This is inefficient when the source of memcpy (the returned memref in the original ReturnOp) is from a local AllocOp. The pass can use the output argument memref to replace the locally allocated memref for better performance.hoist-static-allocs avoids dynamic allocation and memory movement. This option will be critical for performance-sensivtive applications, which require BufferResultsToOutParams pass for a caller-owned output buffer calling convension.
-
Ryosuke Niwa authored
-
Yingwei Zheng authored
See the LangRef: > All uses of a value returned by the same ‘freeze’ instruction are guaranteed to always observe the same value, while different ‘freeze’ instructions may yield different values. It is incorrect to replace freezes with the simplified value. Proof: https://alive2.llvm.org/ce/z/3Dn9Cd https://alive2.llvm.org/ce/z/Qyh5h6 Fixes https://github.com/llvm/llvm-project/issues/91178
-
Nikita Popov authored
In practice I end up reviewing most changes to the C API.
-
Jinsong Ji authored
- Remove Range attr when comparing for tailcall - Add test for testcall with range
-
Aart Bik authored
-
Benji Smith authored
This adds LLVMBuildCallBr to create CallBr instructions, and getters for the CallBr-specific data. The remainder of its data, e.g. arguments/function, can be accessed using existing getters.
-