- Mar 04, 2021
-
-
Philip Reames authored
This is almost purely NFC, it just fits more obviously in the flow of the code now that we've standardized on the index different approach. The non-NFC bit is that because of canceling the VariableOffsets in the subtract, we can now handle the case where both sides involve a common variable offset. This isn't an "interesting" improvement; it just happens to fall out of the natural code structure. One subtle point - the placement of this above the BaseAlias check is important in the original code as this can return NoAlias even when we can't find a relation between the bases otherwise. Also added some enhancement TODOs noticed while understanding the existing code. Note: This is slightly different than the LGTMed version. I fixed the "inbounds" issue Nikita noticed with the original code in e6e5ef40 and rebased this to include the same fix. Differential Revision: https://reviews.llvm.org/D97520
-
Baptiste Saleil authored
VirtRegRewriter may sometimes fail to correctly apply the kill flag where necessary, which causes unecessary code gen on PowerPC. This patch fixes the way masks for defined lanes are computed and the way mask for used lanes is computed. Contact albion.fung@ibm.com instead of author for problems related to this commit. Differential Revision: https://reviews.llvm.org/D92405
-
Philip Reames authored
This was pointed out in review of D97520 by Nikita, but existed in the original code as well. The basic issue is that a decomposed GEP expression describes (potentially) more than one getelementptr. The "inbounds" derived UB which justifies this aliasing rule requires that the entire offset be composed of "inbounds" geps. Otherwise, as can be seen in the recently added and changes in this patch test, we can end up with a large commulative offset with only a small sub-offset actually being "inbounds". If that small sub-offset lies within the object, the result was unsound. We could potentially be fancier here, but for the moment, simply be conservative when any of the GEPs parsed aren't inbounds.
-
Philip Reames authored
-
Louis Dionne authored
https://llvm.org/PR47602 https://llvm.org/PR47601 Differential Revision: https://reviews.llvm.org/D97808
-
Philip Reames authored
-
Arnold Schwaighofer authored
Before we used the same argument as the entry point. The resume partial function might want to use a different ABI for its context argument Differential Revision: https://reviews.llvm.org/D97333
-
Benjamin Kramer authored
Differential Revision: https://reviews.llvm.org/D97860
-
Nathan James authored
... For removal in next release cycle. The clang warning that does the same thing is enabled by default and typically emits better diagnostics making this check surplus to requirements. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D97491
-
- Mar 03, 2021
-
-
Nathan James authored
After rG5e180181 The help command still lists IgnoreImplicitCastsAndParentheses as a valid option. Reviewed By: aaron.ballman, rsmith Differential Revision: https://reviews.llvm.org/D97806
-
Simon Pilgrim authored
Add handling for reusing an existing broadcast(x) to a wider vector.
-
David Tenty authored
Adding it to the general filepaths results in it being added to the linker arguments. The AIX linker always looks in this path anyway and adds it as a default library path component. Adding this duplicate explicitly results in duplicate entries in path in the loader section of executables and messes up tools like CMake that parse the default library flags. Reviewed By: ZarkoCA Differential Revision: https://reviews.llvm.org/D97574
-
Daniel McIntosh authored
Currently the test on line 3 is identical to the test on line 1. Looking at the rest of the file (particularily the use of FOVERRIDE as the check-prefix), I think it's pretty clear that this line was supposed to use `-ftrigraphs` instead of `-trigraphs`. Reviewed By: thakis Differential Revision: https://reviews.llvm.org/D97796
-
Benjamin Kramer authored
This gets rid of a dubious shape_eq %a, %a fold, that folds shape_eq even if %a is not an Attribute. Differential Revision: https://reviews.llvm.org/D97728
-
Nico Weber authored
This reverts commit 04c3040f. Breaks instrprof-value-merge.c in bootstrap builds.
-
Benjamin Kramer authored
This includes allowing extents and not just shapes. Differential Revision: https://reviews.llvm.org/D97716
-
Melanie Blower authored
Reviewed By: Aaron Ballman Differential Revision: https://reviews.llvm.org/D97764
-
Aaron Ballman authored
https://wg21.link/P2173 is making its way through WG21 currently and has not been formally adopted yet. This feature provides very useful functionality in that you can specify attributes on the various function *declarations* generated by a lambda expression, where the current C++ grammar only allows attributes which apply to the various function *types* so generated. This patch implements P2173 on the assumption that it will be adopted by WG21 with this syntax for C++23.
-
Anastasia Stulova authored
This commit refactors extension support to allow specifying whether pragma is needed or not explicitly. For backward compatibility pragmas are set to required for all extensions that were added prior to this but not for OpenCL 3.0 features. Differential Revision: https://reviews.llvm.org/D97052
-
Hans Wennborg authored
Revert "[ObjC][ARC] Use operand bundle 'clang.arc.attachedcall' instead of explicitly emitting retainRV or claimRV calls in the IR" This caused miscompiles of Chromium tests for iOS due clobbering of live registers. See discussion on the code review for details. > Background: > > This fixes a longstanding problem where llvm breaks ARC's autorelease > optimization (see the link below) by separating calls from the marker > instructions or retainRV/claimRV calls. The backend changes are in > https://reviews.llvm.org/D92569. > > https://clang.llvm.org/docs/AutomaticReferenceCounting.html#arc-runtime-objc-autoreleasereturnvalue > > What this patch does to fix the problem: > > - The front-end adds operand bundle "clang.arc.attachedcall" to calls, > which indicates the call is implicitly followed by a marker > instruction and an implicit retainRV/claimRV call that consumes the > call result. In addition, it emits a call to > @llvm.objc.clang.arc.noop.use, which consumes the call result, to > prevent the middle-end passes from changing the return type of the > called function. This is currently done only when the target is arm64 > and the optimization level is higher than -O0. > > - ARC optimizer temporarily emits retainRV/claimRV calls after the calls > with the operand bundle in the IR and removes the inserted calls after > processing the function. > > - ARC contract pass emits retainRV/claimRV calls after the call with the > operand bundle. It doesn't remove the operand bundle on the call since > the backend needs it to emit the marker instruction. The retainRV and > claimRV calls are emitted late in the pipeline to prevent optimization > passes from transforming the IR in a way that makes it harder for the > ARC middle-end passes to figure out the def-use relationship between > the call and the retainRV/claimRV calls (which is the cause of > PR31925). > > - The function inliner removes an autoreleaseRV call in the callee if > nothing in the callee prevents it from being paired up with the > retainRV/claimRV call in the caller. It then inserts a release call if > claimRV is attached to the call since autoreleaseRV+claimRV is > equivalent to a release. If it cannot find an autoreleaseRV call, it > tries to transfer the operand bundle to a function call in the callee. > This is important since the ARC optimizer can remove the autoreleaseRV > returning the callee result, which makes it impossible to pair it up > with the retainRV/claimRV call in the caller. If that fails, it simply > emits a retain call in the IR if retainRV is attached to the call and > does nothing if claimRV is attached to it. > > - SCCP refrains from replacing the return value of a call with a > constant value if the call has the operand bundle. This ensures the > call always has at least one user (the call to > @llvm.objc.clang.arc.noop.use). > > - This patch also fixes a bug in replaceUsesOfNonProtoConstant where > multiple operand bundles of the same kind were being added to a call. > > Future work: > > - Use the operand bundle on x86-64. > > - Fix the auto upgrader to convert call+retainRV/claimRV pairs into > calls with the operand bundles. > > rdar://71443534 > > Differential Revision: https://reviews.llvm.org/D92808 This reverts commit ed4718ec.
-
Hans Wennborg authored
-
Kadir Cetinkaya authored
Clangd uses codecompletion limit as the limit for workspacesymbols, so in theory this should only be an order of magnitude slower than a codecompletion request with empty identifier (as code completion limits the available symbols). This is also what LSP suggests "Clients may send an empty string here to request all symbols.". Clangd doesn't really fulfill the "all" part of that statement, but we never do unless user set the index query limit to zero explicitly. Differential Revision: https://reviews.llvm.org/D97773
-
Ayke van Laethem authored
Some instructions (especially mov+pop instructions) were setting the wrong operands. For example, the pop instruction had the register set as a source operand while it is a destination operand (the value is loaded into the register). I have found these issues using the machine verifier and using manual code inspection. Differential Revision: https://reviews.llvm.org/D97159
-
Ayke van Laethem authored
The previous expansion used SBCI, which is incorrect because the NEGW pseudo instruction accepts a DREGS operand (2xGPR8) and SBCI only allows LD8 registers. One solution could be to correct the NEGW pseudo instruction, but another solution is to use a different instruction (sbc) that does accept a GPR8 register and therefore allows more freedom to the register allocator. The output now matches avr-gcc for the following code: int foo(int n) { return -n; } I've found this issue using the machine instruction verifier: it was complaining about the wrong register class in NEGWRd.mir. Differential Revision: https://reviews.llvm.org/D97131 -
Ayke van Laethem authored
These aliases are sometimes used in assembly code and make the code more readable. They are supported by avr-gcc too. Differential Revision: https://reviews.llvm.org/D96492
-
Matt Arsenault authored
Refactor insertion of the asserting ops. This enables using them for AMDGPU. This code should essentially be the same for every target. Mips, X86 and ARM all have different code there now, but this seems to be an accident. The assignment functions are called with different types than they would be in the DAG, so this is all likely an assortment of hacks to get around that.
-
Aaron Ballman authored
Our diagnostics relating to static assertions were a bit confused. For instance, when in MS compatibility mode in C (where we accept static_assert even without including <assert.h>), we would fail to warn the user that they were using the wrong spelling (even in pedantic mode), we were missing a compatibility warning about using _Static_assert in earlier standards modes, diagnostics for the optional message were not reflected in C as they were in C++, etc.
-
Piotr Sobczak authored
* Add amdgcn_strict_wqm intrinsic. * Add a corresponding STRICT_WQM machine instruction. * The semantic is similar to amdgcn_strict_wwm with a notable difference that not all threads will be forcibly enabled during the computations of the intrinsic's argument, but only all threads in quads that have at least one thread active. * The difference between amdgc_wqm and amdgcn_strict_wqm, is that in the strict mode an inactive lane will always be enabled irrespective of control flow decisions. Reviewed By: critson Differential Revision: https://reviews.llvm.org/D96258
-
Vladislav Vinogradov authored
Use `StringLiteral` for function return type if it is known to return constant string literals only. This will make it visible to API users, that such values can be safely stored, since they refers to constant data, which will never be deallocated. `StringRef` is general is not safe to store for a long term, since it might refer to temporal data allocated in heap. Add `inline` and `constexpr` methods support to `OpMethod`. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D97390
-
Vladislav Vinogradov authored
Instead of hard-coded check. Reviewed By: ftynse, rriddle Differential Revision: https://reviews.llvm.org/D97612
-
Christian Sigg authored
Until I have a better solution with dynamic initialization, to get the nvidia build bot green again.
-
Raphael Isemann authored
That's all just dead code that hasn't been changed in years. Reviewed By: JDevlieghere Differential Revision: https://reviews.llvm.org/D97760
-
Christian Sigg authored
Move test inputs to test/Integration directory. Move runtime wrappers to ExecutionEngine. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D97463
-
Stephen Kelly authored
Differential Revision: https://reviews.llvm.org/D97156
-
Sam McCall authored
-
JinGu Kang authored
Differential Revision: https://reviews.llvm.org/D97775
-
Mikael Holmen authored
gcc complained with [1110/1140] Building CXX object tools/lld/MachO/CMakeFiles/lldMachO2.dir/SyntheticSections.cpp.o ../../lld/MachO/SyntheticSections.cpp: In function 'int16_t ordinalForDylibSymbol(const lld::macho::DylibSymbol&)': ../../lld/MachO/SyntheticSections.cpp:287:14: warning: enumeral and non-enumeral type in conditional expression [-Wextra] 286 | return config->namespaceKind == NamespaceKind::flat || dysym.isDynamicLookup() | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 287 | ? MachO::BIND_SPECIAL_DYLIB_FLAT_LOOKUP | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 288 | : dysym.getFile()->ordinal; | ~~~~~~~~~~~~~~~~~~~~~~~~~~ -
Andy Yankovsky authored
Apply changes from https://reviews.llvm.org/D91014 to other places where DWARF entries are being processed. Test case is provided by @jankratochvil. The test is marked to run only on x64 and exclude Windows and Darwin, because the assembly is not OS-independent. (First attempt https://reviews.llvm.org/D96778 broke the build bots) Reviewed By: jankratochvil Differential Revision: https://reviews.llvm.org/D97765
-
Piotr Sobczak authored
* Introduce the new intrinsic amdgcn_strict_wwm * Deprecate the old intrinsic amdgcn_wwm The change is done for consistency as the "strict" prefix will become an important, distinguishing factor between amdgcn_wqm and amdgcn_strictwqm in the future. The "strict" prefix indicates that inactive lanes do not take part in control flow, specifically an inactive lane enabled by a strict mode will always be enabled irrespective of control flow decisions. The amdgcn_wwm will be removed, but doing so in two steps gives users time to switch to the new name at their own pace. Reviewed By: critson Differential Revision: https://reviews.llvm.org/D96257
-
Carl Ritson authored
While the underlying instruction is called image_msaa_load, the resource must be x component only. Rename the intrinsic for clarity. Reviewed By: foad Differential Revision: https://reviews.llvm.org/D97829
-