- Mar 29, 2020
-
-
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
-
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).
-
- Mar 28, 2020
-
-
Matt Arsenault authored
-
Benjamin Kramer authored
Found by msan.
-
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
-
Reid Kleckner authored
There was already a test case for landingpads to handle this case, but I had forgotten to consider PHI instructions preceding the EH_LABEL in the landingpad. PR45261
-
Nikita Popov authored
To make sure that replaced operands get DCEd. This drops one iteration from gepphigep.ll, which is still not optimal. This was the last test case performing more than 3 iterations. NFC-ish, only worklist order should change.
-
Nikita Popov authored
The `NewGEP->setOperand(DI, NewPN)` call was duplicated, and the insertion of NewGEP is the same in both if/else, so we can extract it.
-
Alexandre Ganea authored
Tested on Linux with Clang 9, and on Windows with Visual Studio 2019 16.5.1 with -DLLVM_ENABLE_THREADS=ON and OFF.
-
Nikita Popov authored
Because this code does not use the IC-aware replaceInstUsesWith() helper, we need to manually push users to the worklist. This is NFC-ish, in that it may only change worklist order.
-
Nikita Popov authored
This particular case will stop needing multiple iterations in a followup change.
-
Enna1 authored
This statement if (ReplaceWith == S) ReplaceWith = UndefValue::get(S->getType()); is introduced in https://reviews.llvm.org/rG35609d97ae89b8e13f40f4e6b9b056954f8baa83 to fix a case where unreachable code can cause select instruction simplification to fail. In https://reviews.llvm.org/rGd10480657527ffb44ea213460fb3676a6b1300aa, we begin to perform a depth-first walk of basic blocks. This means we will not visit unreachable blocks. So we do not need this the special check any more. Differential Revision: https://reviews.llvm.org/D76753
-
Martin Storsjö authored
MC already knows how to emulate the .weak directive (with its ELF semantics; i.e., an undefined weak symbol resolves to 0, and a defined weak symbol has lower link precedence than a strong symbol of the same name) using COFF weak externals. Plumb this through the ASM printer too, so that definitions marked with __attribute__((weak)) at the language level (which gets translated to weak linkage at the IR level) have the corresponding .weak directive emitted. Note that declarations marked with __attribute__((weak)) at the language level (which translates to extern_weak at the IR level) already have .weak directives emitted. Weak*/linkonce* symbols without an associated comdat (in particular, ones generated with __attribute__((weak)) in C/C++) were earlier emitted as normal unique globals, as the comdat is required to provide the linkonce semantics. This change makes sure they are emitted as .weak instead, allowing other symbols to override them. Rename the existing coff-weak.ll test to coff-linkonce.ll. I'm not quite sure what that test covers, since the behavior being tested in it (the emission of a one_only section) is just a result of passing -function-sections to llc; the linkonce_odr makes no difference. Add a new coff-weak.ll which tests the new directive emission. Based on an previous patch by Shoaib Meenai. Differential Revision: https://reviews.llvm.org/D44543
-
Florian Hahn authored
The LatticeVal alias was introduced to reduce the diff size for the transition to ValueLatticeElement, which is done now. This patch removes the unnecessary alias and updates some very verbose type uses with auto.
-
Florian Hahn authored
LatticeVal is an alias for ValueLatticeElement and the function is not used any longer.
-
Michael Liao authored
-
Martin Storsjö authored
This seems to be used in some resource files, e.g. https://github.com/wxWidgets/wxWidgets/blob/f3217573d7240411e7817c9d76d965b2452987a2/include/wx/msw/wx.rc#L28. MSVC rc.exe and GNU windres both allow any value here, and silently just truncate to uint16_t range. This just explicitly allows the -1 value and errors out on others - the same was done for control IDs in dialogs in c1a67857. Differential Revision: https://reviews.llvm.org/D76951
-
Simon Pilgrim authored
-
Simon Pilgrim authored
-
Simon Pilgrim authored
Including some test coverage for PR38522
-
Evan LeClercq authored
I added a list of options to configure should someone have issues with long build time or running out of memory. This was added under common problems in the getting started section of the documentation. Reviewed By: Meinersbur, dim, e-leclercq Differential Revision: https://reviews.llvm.org/D75425
-
Uday Bondhugula authored
Minor update/fixes to comments for the Attributor pass, and dyn_cast -> cast. Signed-off-by:
Uday Bondhugula <uday@polymagelabs.com> Differential Revision: https://reviews.llvm.org/D76972
-
Serge Pavlov authored
This change implements constant folding to constrained versions of intrinsics, implementing rounding: floor, ceil, trunc, round, rint and nearbyint. Differential Revision: https://reviews.llvm.org/D72930
-
Jonas Devlieghere authored
This reverts commit 8913769e because the unit test is failing on the Windows bot.
-
Jessica Paquette authored
When we see this: ``` %a = COPY $physreg ... SOMETHING implicit-def $physreg ... %b = COPY $physreg ``` The two copies are not equivalent, and so we shouldn't perform any folding on them. When we have two instructions which use a physical register check that they define the same virtual register(s) as well. e.g., if we run into this case ``` %a = COPY $physreg ... %b = COPY %a ``` we can say that the two copies are the same, and can be folded. Differential Revision: https://reviews.llvm.org/D76890
-
Jonas Devlieghere authored
This is not (yet) necessary.
-
Jonas Devlieghere authored
Extend the FileCollector's API with addDirectory which adds a directory and its contents to the VFS mapping. Differential revision: https://reviews.llvm.org/D76671
-
Kamlesh Kumar authored
Fixes https://bugs.llvm.org/show_bug.cgi?id=45303 (clang crashed on __builtin_thread_pointer) Reviewed By: lenary, MaskRay, luismarques Differential Revision: https://reviews.llvm.org/D76828
-
David Blaikie authored
Without this some instances of copy construction would use the converting constructor & lead to the destination function_ref referring to the source function_ref instead of the underlying functor. Discovered in feedback from 857bf5da Thanks to Johannes Doerfert, Arthur O'Dwyer, and Richard Smith for the discussion and debugging.
-
Nemanja Ivanovic authored
In DAGCombiner::visitLOAD() we perform some checks before breaking up an indexed load. However, we don't do the same checking in ForwardStoreValueToDirectLoad() which can lead to failures later during combining (see: https://bugs.llvm.org/show_bug.cgi?id=45301). This patch just adds the same checks to this function as well. Fixes: https://bugs.llvm.org/show_bug.cgi?id=45301 Differential revision: https://reviews.llvm.org/D76778
-