- Mar 30, 2020
-
-
Uday Bondhugula authored
Add missing assert checks for input to mlir::interchangeLoops utility. Rename interchangeLoops -> permuteLoops; update doc comments to clarify inputs / return val. Other than the assert checks, this is NFC. Signed-off-by:
Uday Bondhugula <uday@polymagelabs.com> Differential Revision: https://reviews.llvm.org/D77003
-
Nikita Popov authored
To make sure the old operands are DCEd. NFC apart from worklist order.
-
Nikita Popov authored
We don't return the replaceInstUsesWith() result, so we're responsible for cleaning up. NFC apart from worklist order changes.
-
Uday Bondhugula authored
Aligned_alloc is a standard lib function and has been in glibc since 2.16 and in the C11 standard. It has semantics similar to malloc/calloc for several analyses/transforms. This patch introduces aligned_alloc in target library info and memory builtins. Subsequent ones will make other passes aware and fix https://bugs.llvm.org/show_bug.cgi?id=44062 This change will also be useful to LLVM generators that need to allocate buffers of vector elements larger than 16 bytes (for eg. 256-bit ones), element boundary alignment for which is not typically provided by glibc malloc. Signed-off-by:
Uday Bondhugula <uday@polymagelabs.com> Differential Revision: https://reviews.llvm.org/D76970
-
Matt Arsenault authored
-
Matt Arsenault authored
-
Matt Arsenault authored
This was was never actually hit, but FTRUNC was clearly not the intent here.
-
Matt Arsenault authored
Use functions now that we have them for less boilerplate in the output.
-
Matt Arsenault authored
-
Sanjay Patel authored
-
Sanjay Patel authored
-
Simon Pilgrim authored
-
Simon Pilgrim authored
-
Nikita Popov authored
Rather than converting to a dummy select with equal true and false ops, just directly return the resulting value. As a side-effect, this fixes missing DCE of the previously replaced operand.
-
Florian Hahn authored
BitVector::set_bits() returns an iterator range yielding unsinged elements, which always will be copied while const & gives the impression that there will be no copy. Newer version of clang complain: warning: loop variable 'SetBitsIt' is always a copy because the range of type 'iterator_range<llvm::BitVector::const_set_bits_iterator>' (aka 'iterator_range<const_set_bits_iterator_impl<llvm::BitVector> >') does not return a reference [-Wrange-loop-analysis] Reviewers: jdoerfert, rnk Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D77010 -
Nikita Popov authored
Add a replaceUse() helper to mirror replaceOperand() for the rare cases where we're working directly on uses. NFC apart from worklist order changes.
-
Nikita Popov authored
Usually when we replaceInstUsesWith() we also return the original instruction, and InstCombine will take care of erasing it. Here we don't do that, so we need to manually erase it. NFC apart from worklist order changes.
-
Nikita Popov authored
To make sure the old operands get DCEd. NFC apart from worklist order changes.
-
- Mar 29, 2020
-
-
Simon Pilgrim authored
As explained on PR40720, EXTRACTF128 is always as good/better than VPERM2F128, and we can use the implicit zeroing of the upper half. I've added some extra tests to vector-shuffle-combining-avx2.ll to make sure we don't lose coverage.
-
Simon Pilgrim authored
This was an inner helper function for the real matchShuffleAsByteRotate function, but it is more generic and is used directly for VALIGN lowering which doesn't work at the byte level.
-
Simon Pilgrim authored
Allows us to combine VALIGN instructions with other shuffles - the combiner doesn't create VALIGN yet though.
-
Kazuaki Ishizaki authored
Reviewers: mravishankar, antiagainst, nicolasvasilache, herhut, aartbik, mehdi_amini, bondhugula Reviewed By: mehdi_amini, bondhugula Subscribers: bondhugula, jdoerfert, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, nicolasvasilache, csigg, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, Joonsoo, bader, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D76993
-
Florian Hahn authored
This patch changes VPWidenRecipe to only store a single original IR instruction. This is the first required step towards modeling it's operands as VPValues and also towards breaking it up into a VPInstruction. Discussed as part of D74695. Reviewers: Ayal, gilr, rengolin Reviewed By: gilr Differential Revision: https://reviews.llvm.org/D76988
-
Nikita Popov authored
We use a SmallPtrSet to track visited nodes, use a SmallVector of the same size for the stack.
-
Simon Pilgrim authored
Replace the explicit isAtom() || isSLM() test with the more general (and more specific) slowTwoMemOps() check to avoid the use of the PUSHrmm push from memory case. This is actually very tricky to test in anything but quite complex code, but the atomic-idempotent.ll tests seem to be the most straightforward to use. Differential Revision: https://reviews.llvm.org/D76239
-
Aaron Smith authored
-
Richard Diamond authored
Summary: On targets with different pointer sizes, -alignment-from-assumptions could attempt to create SCEV expressions which use different effective SCEV types. The provided test illustrates the issue. In `getNewAlignment`, AASCEV would be the (only) alloca, which would have an effective SCEV type of i32. But PtrSCEV, the GEP in this case, due to being in the flat/default address space, will have an effective SCEV of i64. This patch resolves the issue by truncating PtrSCEV to AASCEV's effective type. Reviewers: hfinkel, jdoerfert Reviewed By: jdoerfert Subscribers: jvesely, nhaehnle, hiraditya, javed.absar, kerbowa, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D75471
-
Craig Topper authored
-
Fangrui Song authored
Generalizes ad7199f3 (R_PPC_NONE/R_PPC64_NONE).
-
Joerg Sonnenberger authored
The __builtin_stdarg_start is the legacy spelling of __builtin_va_start. It should behave exactly the same, but for the last 9 years it would behave subtly different for diagnostics. Follow the change from 29ad95b2 to require custom type checking.
-
Matt Arsenault authored
-
Benjamin Kramer authored
Found by msan.
-
Benjamin Kramer authored
Found by llvm::sort's expensive checks.
-
Benjamin Kramer authored
-
Nikita Popov authored
Dropping unreachable code may reduce use counts on other instructions, so it's better to do this earlier rather than later. NFC-ish, may only impact worklist order.
-
Nikita Popov authored
Merge AddReachableCodeToWorklist() into prepareICWorklistFromFunction(). It's one logical step, and this makes it easier to move code.
-
Benjamin Kramer authored
This is safe if the iterator type is a pointer and the comparator is stateless. The enable_if pattern I'm adding here only uses array_pod_sort for the default comparator (std::less). Using array_pod_sort has a potential performance impact, but I didn't notice anything when testing clang. Sorting doesn't seem to be on the hot path anywhere in LLVM. Shrinks Release+Asserts clang by 73k.
-
Benjamin Kramer authored
Found by the expensive checks in llvm::sort.
-
Yonghong Song authored
Currently, bpf does not specify 128bit alignment in its layout spec. So for a structure like struct ipv6_key_t { unsigned pid; unsigned __int128 saddr; unsigned short lport; }; clang will generate IR type %struct.ipv6_key_t = type { i32, [12 x i8], i128, i16, [14 x i8] } Additional padding is to ensure later IR->MIR can generate correct stack layout with target layout spec. But it is common practice for a tracing program to be first compiled with target flag (e.g., x86_64 or aarch64) through clang to generate IR and then go through llc to generate bpf byte code. Tracing program often refers to kernel internal data structures which needs to be compiled with non-bpf target. But such a compilation model may cause a problem on aarch64. The bcc issue https://github.com/iovisor/bcc/issues/2827 reported such a problem. For the above structure, since aarch64 has "i128:128" in its layout string, the generated IR will have %struct.ipv6_key_t = type { i32, i128, i16 } Since bpf does not have "i128:128" in its spec string, the selectionDAG assumes alignment 8 for i128 and computes the stack storage size for the above is 32 bytes, which leads incorrect code later. The x86_64 does not have this issue as it does not have "i128:128" in its layout spec as it does permits i128 to be alignmented at 8 bytes at stack. Its IR type looks like %struct.ipv6_key_t = type { i32, [12 x i8], i128, i16, [14 x i8] } The fix here is add i128 support in layout spec, the same as aarch64. The only downside is we may have less optimal stack allocation in certain cases since we require 16byte alignment for i128 instead of 8. But this is probably fine as i128 is not used widely and in most cases users should already have proper alignment. Differential Revision: https://reviews.llvm.org/D76587 -
Benjamin Kramer authored
-