- Nov 30, 2021
-
-
Craig Topper authored
Prevents crashes or cannot select errors. Reviewed By: frasercrmck Differential Revision: https://reviews.llvm.org/D113822
-
Vitaly Buka authored
In multi-threaded application concurrent StackStore::Store may finish in order different from assigned Id. So we can't assume that after we switch writing the next block the previous is done. The workaround is to count exact number of uptr stored into the block, including skipped tail/head which were not able to fit entire trace. Depends on D114490. Reviewed By: morehouse Differential Revision: https://reviews.llvm.org/D114493
-
Hsiangkai Wang authored
When we have out-going arguments passing through stack and we do not reserve the stack space in the prologue. Use BP to access stack objects after adjusting the stack pointer before function calls. callseq_start -> sp = sp - reserved_space // // Use FP to access fixed stack objects. // Use BP to access non-fixed stack objects. // call @foo callseq_end -> sp = sp + reserved_space Differential Revision: https://reviews.llvm.org/D114246
-
Hsiangkai Wang authored
If the number of arguments is too large to use register passing, it needs to occupy stack space to pass the arguments to the callee. There are two scenarios. One is to reserve the space in prologue and the other is to reserve the space before the function calls. When we need to reserve the stack space before function calls, the stack pointer is adjusted. Under the scenario, we should not use stack pointer to access the stack objects. It looks like, callseq_start -> sp = sp - reserved_space // // We should not use SP to access stack objects in this area. // call @foo callseq_end -> sp = sp + reserved_space Differential Revision: https://reviews.llvm.org/D114245
-
Mircea Trofin authored
Differential Revision: https://reviews.llvm.org/D114763
-
Vitaly Buka authored
Reviewed By: dvyukov, kstoimenov Differential Revision: https://reviews.llvm.org/D114464
-
Luís Ferreira authored
This reverts commit 6f99e1aa.
-
David Blaikie authored
-
Aart Bik authored
Moves sparse tensor output support forward by generalizing from injective insertions only to include reductions. This revision accepts the case with all parallel outer and all reduction inner loops, since that can be handled with an injective insertion still. Next revision will allow the inner parallel loop to move inward (but that will require "access pattern expansion" aka "workspace"). Reviewed By: bixia Differential Revision: https://reviews.llvm.org/D114399
-
Matthias Braun authored
Differential Revision: https://reviews.llvm.org/D112754
-
Matthias Braun authored
Differential Revision: https://reviews.llvm.org/D113151
-
Luís Ferreira authored
Anonymous symbols are represented by 0 in the mangled symbol. We should skip them in order to represent the demangled name correctly, otherwise demangled names like `demangle..anon` can happen. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D114307
-
David Blaikie authored
Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D114305
-
David Blaikie authored
This patch adds support for simple single qualified names that includes internal mangled names and normal symbol names. Differential Revision: https://reviews.llvm.org/D111415
-
Mircea Trofin authored
There are 2 eviction queries. One is made by tryAssign, when it attempts to free an interference occupying the hint of the candidate. The other is during 'regular' interference resolution, where we scan over all physical registers and try to see if we can evict live ranges in favor of the candidate. We currently use the same logic in both cases, just that the former never passes the cost to any subsequent query. Technically, the 2 decisions could be implemented with different policies. This patch splits the 2. RFC: https://lists.llvm.org/pipermail/llvm-dev/2021-November/153639.html Differential Revision: https://reviews.llvm.org/D114019
-
Luís Ferreira authored
Reviewed By: teemperor, JDevlieghere Differential Revision: https://reviews.llvm.org/D113604 Signed-off-by:
Luís Ferreira <contact@lsferreira.net>
-
Jon Chesterfield authored
-
Salman Javed authored
Fixes https://bugs.llvm.org/show_bug.cgi?id=48613. llvm-header-guard is suggesting header guards with leading underscores if the header file path begins with a '/' or similar special character. Only reserved identifiers should begin with an underscore. Differential Revision: https://reviews.llvm.org/D114149
-
Jeremy Morse authored
If we have a variable where its fragments are split into overlapping segments: DBG_VALUE $ax, $noreg, !123, !DIExpression(DW_OP_LLVM_fragment_0, 16) ... DBG_VALUE $eax, $noreg, !123, !DIExpression(DW_OP_LLVM_fragment_0, 32) we should only propagate the most recently assigned fragment out of a block. LiveDebugValues only deals with live-in variable locations, as overlaps within blocks is DbgEntityHistoryCalculators domain. InstrRefBasedLDV has kept the accumulateFragmentMap method from VarLocBasedLDV, we just need it to recognise DBG_INSTR_REFs. Once it's produced a mapping of variable / fragments to the overlapped variable / fragments, VLocTracker uses it to identify when a debug instruction needs to terminate the other parts it overlaps with. The test is updated for some standard "InstrRef picks different registers" variation, and the order of some unrelated DBG_VALUEs changes. Differential Revision: https://reviews.llvm.org/D114603
-
Fabian Wolff authored
Fixes PR#52190. There is already a check for converting ashr instructions with non-negative left-hand sides into lshr; this patch adds an optimization to remove ashr altogether if the left-hand side is known to be in the range [-1, 1). Differential Revision: https://reviews.llvm.org/D113835
-
Philip Reames authored
The basic problem we have is that we're trying to reuse an instruction which is mapped to some SCEV. Since we can have multiple such instructions (potentially with different flags), this is analogous to our need to drop flags when performing CSE. A trivial implementation would simply drop flags on any instruction we decided to reuse, and that would be correct. This patch is almost that trivial patch except that we preserve flags on the reused instruction when existing users would imply UB on overflow already. Adding new users can, at most, refine this program to one which doesn't execute UB which is valid. In practice, this fixes two conceptual problems with the previous code: 1) a binop could have been canonicalized into a form with different opcode or operands, or 2) the inbounds GEP case which was simply unhandled. On the test changes, most are pretty straight forward. We loose some flags (in some cases, they'd have been dropped on the next CSE pass anyways). The one that took me the longest to understand was the ashr-expansion test. What's happening there is that we're considering reuse of the mul, previously we disallowed it entirely, now we allow it with no flags. The surrounding diffs are all effects of generating the same mul with a different operand order, and then doing simple DCE. The loss of the inbounds is unfortunate, but even there, we can recover most of those once we actually treat branch-on-poison as immediate UB. Differential Revision: https://reviews.llvm.org/D112734
-
- Nov 29, 2021
-
-
Jeremy Morse authored
These are some final test changes for using instruction referencing on X86: * Most of these tests just have the flag switched so that they run with instr-ref, and just work: these tests were fixed by earlier patches. * There are some spurious differences in textual outputs, * A few have different temporary labels in the output because more MCSymbols are printed to the output. Differential Revision: https://reviews.llvm.org/D114588
-
Philip Reames authored
-
Philip Reames authored
Suggested in review of D114453, done as a separate change to get all uses at once.
-
Jeremy Morse authored
Usually dbg.declares get translated into either entries in an MF side-table, or a DBG_VALUE on entry to the function with IsIndirect set (including in instruction referencing mode). Much rarer is a dbg.declare attached to a non-argument value, such as in the test added in this patch where there's a variable-length-array. Such dbg.declares become SDDbgValue nodes with InIndirect=true. As it happens, we weren't correctly emitting DBG_INSTR_REFs with the additional indirection. This patch adds the extra indirection, encoded as adding an additional DW_OP_deref to the expression. Differential Revision: https://reviews.llvm.org/D114440
-
Philip Reames authored
This change should be NFC. It's posted for review mostly to make sure others are happy with the names I'm introducing for "exact full unroll" and "bounded full unroll". The motivation here is that our cost model for bounded unrolling is too aggressive - it gives benefits for exits we aren't going to prune - but I also just think the new version of the code is a lot easier to follow. Differential Revision: https://reviews.llvm.org/D114453
-
Fangrui Song authored
PR48282: This behavior matches GNU ld and gold. Reviewed By: markj Differential Revision: https://reviews.llvm.org/D114663
-
Sanjay Patel authored
or (mul X, Y), X --> mul X, (add Y, 1) (when the multiply has no common bits with X) We already have this fold if the pattern ends in 'add', but we can miss it if the 'add' becomes 'or' via another no-common-bits transform. This is part of fixing: http://llvm.org/PR49055 ...but it won't make a difference on that example yet. https://alive2.llvm.org/ce/z/Vrmoeb Differential Revision: https://reviews.llvm.org/D114729
-
Jeremy Morse authored
InstrRefBasedLDV observes when variable locations are clobbered, scans what values are available in the machine, and re-issues a DBG_VALUE for the variable if it can find another location. Unfortunately, I hadn't joined up the Indirectness flag, so if it did this to an Indirect Value, the indirectness would be dropped. Fix this, and add a test that if we clobber a variable value (on the stack in this case), then the recovered variable location keeps the Indirect flag. Differential Revision: https://reviews.llvm.org/D114378
-
David Green authored
-
Matt Arsenault authored
This was trying to figure out the build path for amdgpu-arch, and making assumptions about where it is which were not working on my system. Whether a standalone build or not, we should have a proper imported target to get the location from.
-
Adrian Prantl authored
-
Jeremy Morse authored
This patch contains a bunch of replacements of: DBG_VALUE $somereg with, SOMEINST debug-instr-number1 DBG_INSTR_REF 1, 0, ... It's mostly SelectionDAG tests that are making sure that the variable location assignment is placed in the correct position in the instructions. To avoid a loss in test coverage of SelectionDAG, which is used by a lot of different backends, all these tests now have two modes and sets of RUN lines, one for DBG_VALUE mode, the other for instruction referencing. Differential Revision: https://reviews.llvm.org/D114258
-
Matt Arsenault authored
This reverts commit 6c27d389. This is failing on the buildbots
-
Aart Bik authored
Reviewed By: pifon2a Differential Revision: https://reviews.llvm.org/D114730
-
Nikita Popov authored
-
Sanjay Patel authored
-
Stanislav Mekhanoshin authored
``` ---------------------------------------- define i3 @src(i3 %a, i3 %b, i3 %c) { %0: %or1 = or i3 %b, %c %not1 = xor i3 %or1, 7 %and1 = and i3 %a, %not1 %xor1 = xor i3 %b, %c %or2 = or i3 %xor1, %a %not2 = xor i3 %or2, 7 %or3 = or i3 %and1, %not2 ret i3 %or3 } => define i3 @tgt(i3 %a, i3 %b, i3 %c) { %0: %obc = or i3 %b, %c %xbc = xor i3 %b, %c %o = or i3 %a, %xbc %and = and i3 %obc, %o %r = xor i3 %and, 7 ret i3 %r } Transformation seems to be correct! ``` Differential Revision: https://reviews.llvm.org/D112955
-
Steven Wan authored
We're close to hitting the limited number of driver diagnostics, increase `DIAG_SIZE_DRIVER` to accommodate more. Reviewed By: erichkeane Differential Revision: https://reviews.llvm.org/D114615
-
Anshil Gandhi authored
Introduce `__hip_atomic_load`, `__hip_atomic_store` and `__hip_atomic_compare_exchange_weak` builtins in HIP. Reviewed By: yaxunl Differential Revision: https://reviews.llvm.org/D114553
-