- Jun 29, 2021
-
-
Tom Stellard authored
Revert "Revert "[Coverage] Fix branch coverage merging in FunctionCoverageSummary::get() for instantiation"" This reverts commit 33d312b2. The original patch was correct, so we need to restore it in the release branch.
-
- Jun 26, 2021
-
-
David Green authored
The ARMConstantIsland pass will convert any t2B to tB if they are within range after it has added or moved any constant pools. They don't need to be deliberately converted beforehand, and it doesn't deal with needing to convert tB to t2B very well.
-
David Green authored
Now that we are calling SimplifyInstructionsInBlock, make sure we update Changed when it reports alterations.
-
David Green authored
Surprisingly, not all instructions are always simplified after unrolling and before MVE gather/scatter lowering. Notably dead gather operations can be left around which cause the gather/scatter lowering pass to crash if there are multiple gathers, some of which are dead. This patch ensures they are simplified before we modify anything, which can change some of the existing tests, including making them no-longer test what they originally tested. This uses a combination of disabling the gather/scatter lowering pass and adjusting the test to keep them as before. Differential Revision: https://reviews.llvm.org/D103150
-
David Green authored
-
David Green authored
CGP can move instructions like a ptrtoint into a loop, but the MVETailPredication when converting them will currently assume invariant trip counts. This tries to ensure the operands are loop invariant, and bails if not. Differential Revision: https://reviews.llvm.org/D100550
-
David Green authored
This ensures that the operands of any gather/scatter instructions that we attempt to push out of the loop are invariant, preventing invalid IR from being generated.
-
Victor Campos authored
In function ConvertVPTBlocks(), it is assumed that every instruction within a vector-predicated block is predicated. This is false for debug instructions, used by LLVM. Because of this, an assertion failure is reached when an input contains debug instructions inside VPT blocks. In non-assert builds, an out of bounds memory access took place. The present patch properly covers the case of debug instructions. Reviewed By: dmgreen Differential Revision: https://reviews.llvm.org/D99075
-
David Green authored
Debug info is currently preventing VPT block creation, leading to different codegen. This patch attempts to skip any debug instructions during vpt block creation, making sure they do not interfere. Differential Revision: https://reviews.llvm.org/D103610
-
David Green authored
-
- Jun 25, 2021
-
-
Christoffer Lernö authored
The LLVM C API is missing type attributes as is needed by attributes such as sret and byval. This patch adds three missing wrapper functions. Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=48249 https://reviews.llvm.org/D97763 (cherry picked from commit 528f6f7d)
-
Sean Fertile authored
Do not defer to the base class when the register constraint is a physical fpr. The base class will select SPILLTOVSRRC as the register class and register allocation will fail on subtargets without VSX registers. Differential Revision: https://reviews.llvm.org/D91629 (cherry picked from commit 4e127bce)
-
- Jun 24, 2021
-
-
Jan Kratochvil authored
Differential Revision: https://reviews.llvm.org/D98195 (cherry picked from commit 4289a7f1)
-
Jan Kratochvil authored
`AttributeSpec` does not contain values while `DWARFAttribute` already does. Therefore one no longer needs to pass `uint64_t *OffsetPtr`. Differential Revision: https://reviews.llvm.org/D98194 (cherry picked from commit ba8907bf)
-
Xun Li authored
This patch is to address https://bugs.llvm.org/show_bug.cgi?id=48857. Previous attempts can be found in D104007 and D101980. A lot of discussions can be found in those two patches. To summarize the bug: When Clang emits IR for coroutines, the first thing it does is to make a copy of every argument to the local stack, so that uses of the arguments in the function will all refer to the local copies instead of the arguments directly. However, in some cases we find that arguments are still directly used: When Clang emits IR for a function that has pass-by-value arguments, sometimes it emits an argument with byval attribute. A byval attribute is considered to be local to the function (just like alloca) and hence it can be easily determined that it does not alias other values. If in the IR there exists a memcpy from a byval argument to a local alloca, and then from that local alloca to another alloca, MemCpyOpt will optimize out the first memcpy because byval argument's content will not change. This causes issues because after a coroutine suspension, the byval argument may die outside of the function, and latter uses will lead to memory use-after-free. This is only a problem for arguments with either byval attribute or noalias attribute, because only these two kinds are considered local. Arguments without these two attributes will be considered to alias coro_suspend and hence we won't have this problem. So we need to be able to deal with these two attributes in coroutines properly. For noalias arguments, since coro_suspend may potentially change the value of any argument outside of the function, we simply shouldn't mark any argument in a coroutiune as noalias. This can be taken care of in CoroEarly pass. For byval arguments, if such an argument needs to live across suspensions, we will have to copy their value content to the frame, not just the pointer. Differential Revision: https://reviews.llvm.org/D104184 (cherry picked from commit 3522167e)
-
Vy Nguyen authored
[llvm] Fix thinko in getVendorSignature(), where expected values of ECX and EDX were flipped for the AMD case. Follow up to D97504 Differential Revision: https://reviews.llvm.org/D98322 (cherry picked from commit 64d2c326)
-
Vy Nguyen authored
[llvm-exegesis] Disable the LBR check on AMD https://bugs.llvm.org/show_bug.cgi?id=48918 The bug reported a hang (or very very slow runtime) on a Zen2. Unfortunately, we don't have the hardware right now to debug it and I was not able to reproduce the bug on a HSW. Theory we've got is that the lbr-checking code could be confused on AMD. Differential Revision: https://reviews.llvm.org/D97504 New change: - Surround usages of x86 helper in llvm-exegesis/X86/Target.cpp with ifdef - Fix bug which caused the caller of getVendorSignature to not have a copy of EAX that it expected. (cherry picked from commit f8b01d54)
-
- Jun 23, 2021
-
-
Amanieu d'Antras authored
Fixes PR49932 Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D100322 (cherry picked from commit ad9ce814)
-
Arthur Eubanks authored
Fixes PR42961. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D97872 (cherry picked from commit c8227f06)
-
Louis Dionne authored
Before this patch, feature-test macros didn't take special availability markup into account, which means that feature-test macros can sometimes appear to "lie". For example, if you compile in C++20 mode and target macOS 10.13, the __cpp_lib_filesystem feature-test macro will be provided even though the <filesystem> declarations are marked as unavailable. This patch fixes that. rdar://68142369 Differential Revision: https://reviews.llvm.org/D94983 (cherry picked from commit 76fc3575)
-
zoecarver authored
Refs: https://bugs.llvm.org/show_bug.cgi?id=32147 Differential Revision: https://reviews.llvm.org/D80882 (cherry picked from commit 097d77d6)
-
jasonliu authored
Summary: When building with gcc on AIX, it seems that gcc does not like the `always_inline` without the `inline` keyword. So adding the inline keywords in for __open in ifstream and ofstream. That will also make it consistent with __open in basic_filebuf (it seems we added `inline` there before for gcc build as well). Differential Revision: https://reviews.llvm.org/D99422 (cherry picked from commit 52e9d80d)
-
Tamar Christina authored
The Linux kernel has removed the interface to cyclades from the latest kernel headers[1] due to them being orphaned for the past 13 years. libsanitizer uses this header when compiling against glibc, but glibcs itself doesn't seem to have any references to cyclades. Further more it seems that the driver is broken in the kernel and the firmware doesn't seem to be available anymore. As such since this is breaking the build of libsanitizer (and so the GCC bootstrap[2]) I propose to remove this. [1] https://lkml.org/lkml/2021/3/2/153 [2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100379 Reviewed By: eugenis Differential Revision: https://reviews.llvm.org/D102059 (cherry picked from commit 68d5235c)
-
Louis Dionne authored
The new Docker images don't have gcc or g++, only the versioned equivalents.
-
Louis Dionne authored
When we removed the allocator<void> specialization, the triviality of std::allocator<void> changed because the primary template had a non-trivial default constructor and the specialization didn't (so std::allocator<void> went from trivial to non-trivial). This commit fixes that oversight by giving a trivial constructor to the primary template when instantiated on cv-void. This was reported in https://llvm.org/PR50299. (cherry picked from commit 71e4d434) Differential Revision: https://reviews.llvm.org/D104486
-
- Jun 22, 2021
-
-
Joachim Meyer authored
As noted in https://bugs.llvm.org/show_bug.cgi?id=46666, the current behavior of assuming if-conversion safety if a loop is annotated parallel (`!llvm.loop.parallel_accesses`), is not expectable, the documentation for this behavior was since removed from the LangRef again, and can lead to invalid reads. This was observed in POCL (https://github.com/pocl/pocl/issues/757) and would require similar workarounds in current work at hipSYCL. The question remains why this was initially added and what the implications of removing this optimization would be. Do we need an alternative mechanism to propagate the information about legality of if-conversion? Or is the idea that conditional loads in `#pragma clang loop vectorize(assume_safety)` can be executed unmasked without additional checks flawed in general? I think this implication is not part of what a user of that pragma (and corresponding metadata) would expect and thus dangerous. Only two additional tests failed, which are adapted in this patch. Depending on the further direction force-ifcvt.ll should be removed or further adapted. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D103907 (cherry picked from commit 4f01122c)
-
serge-sans-paille authored
This fixes an issue introduced by https://reviews.llvm.org/D70662 Function-scope static initialization are guarded in C++, so we should probably not use it because it introduces a dependency on __cxa_guard* symbols. In the context of clang, libasan is linked statically, and it currently needs to the odd situation where compiling C code with clang and asan requires -lstdc++ Differential Revision: https://reviews.llvm.org/D102475 (cherry picked from commit 41448275)
-
Vitaly Buka authored
As mentioned in https://gcc.gnu.org/PR100114 , glibc starting with the https://sourceware.org/git/?p=glibc.git;a=commit;h=6c57d320484988e87e446e2e60ce42816bf51d53 change doesn't define SIGSTKSZ and MINSIGSTKSZ macros to constants, but to sysconf function call. sanitizer_posix_libcdep.cpp has static const uptr kAltStackSize = SIGSTKSZ * 4; // SIGSTKSZ is not enough. which is generally fine, just means that when SIGSTKSZ is not a compile time constant will be initialized later. The problem is that kAltStackSize is used in SetAlternateSignalStack which is called very early, from .preinit_array initialization, i.e. far before file scope variables are constructed, which means it is not initialized and mmapping 0 will fail: ==145==ERROR: AddressSanitizer failed to allocate 0x0 (0) bytes of SetAlternateSignalStack (error code: 22) Here is one possible fix, another one could be to make kAltStackSize a preprocessor macro if _SG_SIGSTKSZ is defined (but perhaps with having an automatic const variable initialized to it so that sysconf isn't at least called twice during SetAlternateSignalStack. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D100645 (cherry picked from commit 82150606)
-
Haojian Wu authored
(cherry picked from commit a83ef21f)
-
serge-sans-paille authored
So don't define __tune__k8__ for these micro architecture. SSE, SSE2 and SSE3 appear in https://www.amd.com/system/files/TechDocs/25112.PDF but not SSE4.x. Differential Revision: https://reviews.llvm.org/D104116 (cherry picked from commit 092c3039)
-
Jonas Paulsson authored
When a large "irregular" (e.g. i96) integer call argument is converted to indirect, 64-bit parts are stored to the stack. The full stack space (e.g. i128) was not allocated prior to this patch, but rather just the exact space of the original type. This caused neighboring values on the stack to be overwritten. Thanks to Josh Stone for reporting this. Review: Ulrich Weigand Fixes https://bugs.llvm.org/show_bug.cgi?id=49322 Differential Revision: https://reviews.llvm.org/D97514 (cherry picked from commit 52bbbf4d)
-
- Jun 17, 2021
-
-
zoecarver authored
Ensures that `get_return_object`'s return type is the same as the return type for the function calling `co_return`. Otherwise, we try to construct an object, then free it, then return it. Differential Revision: https://reviews.llvm.org/D103196 (cherry picked from commit 52123c96)
-
Louis Dionne authored
GCC has been failing those tests, and we marked them as such in a3ab5120 on 'main'. Cherry-pick only that part of the change into the LLVM 12 release so that we can get the CI green again.
-
Arthur O'Dwyer authored
This allows us to turn -Wdeprecated-copy back on. We turned it off in 3b71de41 because Clang's implementation became more stringent and started diagnosing the old code here. Differential Revision: https://reviews.llvm.org/D101183 (cherry picked from commit 70d94c3f)
-
Louis Dionne authored
This is a cherry-pick of 87784cc6 on 'main' for backporting to LLVM 12. Differential Revision: https://reviews.llvm.org/D104324
-
- Jun 16, 2021
-
-
Timm Bäder authored
From https://llvm.org/docs/LangRef.html#asm-template-argument-modifiers: I: Print the letter ‘i’ if the operand is an integer constant, otherwise nothing. Used to print ‘addi’ vs ‘add’ instructions. Differential Revision: https://reviews.llvm.org/D103968 (cherry picked from commit a9e4f91a)
-
Tim Wojtulewicz authored
This commit removes the old way of handling Whitesmiths mode in favor of just setting the levels during parsing and letting the formatter handle it from there. It requires a bit of special-casing during the parsing, but ends up a bit cleaner than before. It also removes some of switch/case unit tests that don't really make much sense when dealing with Whitesmiths. Differential Revision: https://reviews.llvm.org/D94500 (cherry picked from commit f7f9f94b)
-
- Jun 15, 2021
-
-
Joseph Huber authored
Summary: There was a typo in libomptarget that told users to use LIBOMPTARGET_DEBUG instead of LIBOMPTARGET_INFO. (cherry picked from commit 0af4e74a)
-
Kai Luo authored
When `-fstack-clash-protection` is enabled and stack has to be realigned, some parts of redzone is written prior the probe, so probe might overwrite content already written in redzone. To avoid it, we have to make sure the first probe is at full probe size or is the last probe so that we can skip redzone. It also fixes violation of ABI under PPC where `r1` isn't updated atomically. This fixes https://bugs.llvm.org/show_bug.cgi?id=49903. Reviewed By: jsji Differential Revision: https://reviews.llvm.org/D100290 (cherry picked from commit bf58600b)
-
Kai Luo authored
According to ELF V2 ABI, `0` should be the dwarf number of `r0`. Currently MMA's register also uses `0` as its dwarf number, this confuses `RegisterInfoEmitter` and generates wrong dwarf -> llvm mapping. ``` extern const MCRegisterInfo::DwarfLLVMRegPair PPCDwarfFlavour1Dwarf2L[] = { { 0U, PPC::VSRp31 }, ``` This leads to wrong cfi output in https://reviews.llvm.org/D100290. Reviewed By: jsji Differential Revision: https://reviews.llvm.org/D103761 (cherry picked from commit c87c2943)
-