- Jun 27, 2021
-
-
Nico Weber authored
libunwind uses unwind info to find the function address belonging to the current instruction pointer. libunwind/src/CompactUnwinder.hpp's step functions read functionStart for UNWIND_X86_64_MODE_STACK_IND (and for nothing else), so these encodings need a dedicated entry per function, so that the runtime can get the stacksize off the `subq` instrunction in the function's prologue. This matches ld64. (CompactUnwinder.hpp from https://opensource.apple.com/source/libunwind/ also reads functionStart in a few more cases if `SUPPORT_OLD_BINARIES` is set, but it defaults to 0, and ld64 seems to not worry about these additional cases.) Related upstream bug: https://crbug.com/1220175 Differential Revision: https://reviews.llvm.org/D104978
-
Jan Kratochvil authored
D104271 broke buildbots for lld/test/ELF/non-abs-reloc.s .
-
Jan Kratochvil authored
llvm-dwarfdump was silent even when the format of DWARF was invalid and/or llvm-dwarfdump did not understand/support some of the constructs. This can be pretty confusing as llvm-dwarfdump is a tool for DWARF producers+consumers development. Review comments also by @dblaikie. Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D104271
-
Matthias Springer authored
Reduce code duplication: Move various helper functions, that are duplicated in TensorDialect, MemRefDialect, LinalgDialect, StandardDialect, into a new StaticValueUtils.cpp. Differential Revision: https://reviews.llvm.org/D104687
-
Craig Topper authored
Don't allow vectors to split into GPRs for 'r' and other scalar constraints. Prevents assertion in getCopyToPartsVector. Makes PR50907 give a better error instead of crashing.
-
Alexander Shaposhnikov authored
Fix the command line guide for -g/-s/-S. In particular, previously it was incorrectly stating that -S is an alias for --strip-all. Differential revision: https://reviews.llvm.org/D104888
-
Craig Topper authored
We need to mask the immediate to the width of a single vector rather than 2 vectors. If we use the width of 2 vectors then any shift larger than the length of 1 vector is going to overflow the shuffle indices. Fixes PR50895.
-
Ed Maste authored
In FreeBSD 14 the project will deprecate the _p special profiling libraries. Support for -pg (i.e., mcount) still exists but libraries compiled with -pg will not be built by default, so stop linking against them. Reviewed by: Dimitry Andric Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.llvm.org/D104753
-
David Green authored
The MVETRUNC node truncates two wide vectors to a single vector with narrower elements. This is usually lowered to a series of extract/insert elements, going via GPR registers. This patch changes that to instead use a pair of truncating stores and a stack reload. This cuts down the number of instructions at the expense of some stack space. Differential Revision: https://reviews.llvm.org/D104515
-
Matheus Izvekov authored
The feature was implemented in D99005, but we forgot to add the test macro. Reviewed By: Quuxplusone Differential Revision: https://reviews.llvm.org/D104984
-
David Green authored
Currently, when encountering store(trunc(..)) where the trunc is double a legal vector lenth in MVE, we spilt the node into two different stores each performing half of the trunc from the wider type. This works well for efficiently lowering wider than legal types, else the trunc becomes a series of individual lane moves. Unfortunately this splitting is currently one of the first combines attempted, so can happen before any other combines which might be more preferable. This patch instead introduces the concept of a MVETRUNC ISel node that the trunk is initially lowered to, to keep it intact as a single item as opposed to splitting it up. This allows us to push the store(trunc(..)) combine later, allowing other optimisations to potentially happen on the trunc first. The store(trunc(..)) splitting can then be done later in the legalisation period if needed, or else fall back to a buildvector as before. This can also be used in the future to lower to loads/stores, as opposed to the more expensive lane extracts/inserts. Some extra combines are added to keep all the existing tests happy. Differential Revision: https://reviews.llvm.org/D91921
-
Craig Topper authored
-
David Green authored
This adds MVE lowering for VABDS/VABDU, using the code parted from AArch64 in D91937. Differential Revision: https://reviews.llvm.org/D91938
-
David Green authored
This ports the AArch64 SABD and USBD over to DAG Combine, where they can be used by more backends (notably MVE in a follow-up patch). The matching code has changed very little, just to handle legal operations and types differently. It selects from (ABS (SUB (EXTEND a), (EXTEND b))), producing a ubds/abdu which is zexted to the original type. Differential Revision: https://reviews.llvm.org/D91937
-
Nikita Popov authored
-
- Jun 26, 2021
-
-
LLVM GN Syncbot authored
-
mydeveloperday authored
I find as I develop I'm moving between many different languages C++,C#,JavaScript all the time. As I move between the file types I like to keep `clang-format` as my formatting tool of choice. (hence why I initially added C# support in {D58404}) I know those other languages have their own tools but I have to learn them all, and I have to work out how to configure them, and they may or may not have integration into my IDE or my source code integration. I am increasingly finding that I'm editing additional JSON files as part of my daily work and my editor and git commit hooks are just not setup to go and run [[ https://stedolan.github.io/jq/ | jq ]], So I tend to go to [[ https://jsonformatter.curiousconcept.com/ | JSON Formatter ]] and copy and paste back and forth. To get nicely formatted JSON. This is a painful process and I'd like a new one that causes me much less friction. This has come up from time to time: {D10543} https://stackoverflow.com/questions/35856565/clang-format-a-json-file https://bugs.llvm.org/show_bug.cgi?id=18699 I would like to stop having to do that and have formatting JSON as a first class clang-format support `Language` (even if it has minimal style settings at present). This revision adds support for formatting JSON using the inbuilt JSON serialization library of LLVM, With limited control at present only over the indentation level This adds an additional Language into the .clang-format file to separate the settings from your other supported languages. Reviewed By: HazardyKnusperkeks Differential Revision: https://reviews.llvm.org/D93528 -
mydeveloperday authored
https://bugs.llvm.org/show_bug.cgi?id=50702 I believe {D44609} may be too aggressive with brace wrapping rules which doesn't always apply to Lamdbas The introduction of BeforeLambdaBody and AllowShortLambdasOnASingleLine has impact on brace handling on other block types, which I suspect we didn't see before as people may not be using the BeforeLambdaBody style From what I can tell this can be seen by the unit test I change as its not honouring the orginal LLVM brace wrapping style for the `Fct()` function I added a unit test from PR50702 and have removed some of the code (which has zero impact on the unit test, which kind of suggests its unnecessary), some additional attempt has been made to try and ensure we'll only break on what is actually a LamdbaLBrace Reviewed By: HazardyKnusperkeks Differential Revision: https://reviews.llvm.org/D104222
-
mydeveloperday authored
https://bugs.llvm.org/show_bug.cgi?id=50525 AlignConsecutiveAssignments/Declarations cause incorrect alignment in the presence of a DesignatedInitializerPeriod (https://gcc.gnu.org/onlinedocs/gcc/Designated-Inits.html) ``` static NTSTATUS stg(PLW_STREAM Stream, int identity) { NTSTATUS status; BYTE payload[256] = {'l', 'h', 'o', 't', 's', 'e'}; struct dm_rpc_header header = {.drh_magic = DRH_MAGIC, .drh_op_code = RPC_OP_ECHO, .drh_payload_size = sizeof(payload), .drh_body_size = sizeof(payload), .drh_request_id = 1}; header.drh_version = identity; ``` This fix addresses that by ensuring the period isn't ignored Reviewed By: HazardyKnusperkeks Differential Revision: https://reviews.llvm.org/D104900
-
David Green authored
-
Florian Hahn authored
Suggested in D104197, avoids the early exit.
-
LLVM GN Syncbot authored
-
Lang Hames authored
ELFLinkGraphBuilder<ELFT> will hold generic parsing and LinkGraph-building code that can be shared between JITLink ELF backends for different architectures. For now it's just a stub. The plan is to incrementally move functionality down from ELFLinkGraphBuilder_x86_64 into the new template.
-
Timm Bäder authored
Clang can be configured with a different default unwindlib, for example gcc. In that case, -lunwind will not be present in the output. Fix this by explicitly specifying libunwind as the unwindlib. Differential Revision: https://reviews.llvm.org/D104899
-
Jim Lin authored
Reviewed By: frasercrmck Differential Revision: https://reviews.llvm.org/D104838
-
Saurabh Jha authored
There were some issues in the patch https://reviews.llvm.org/D104198. I also forgot to address one comment. This patch addresses these. Reviewed By: xgupta Differential Revision: https://reviews.llvm.org/D104971
-
Craig Topper authored
[RISCV] Add DAG combine to detect opportunities to replace (i64 (any_extend (i32 X)) with sign_extend. If type legalization is going to insert a sign_extend for other users of X and we can fold the sign_extend into ADDW/MULW/SUBW, it is better to replace the ANY_EXTEND so we don't end up with a separate ADD/MUL/SUB instruction for the users of the ANY_EXTEND. I'm only handling setcc uses right now, but there are other instructions that force sign_extends like ashr. There are probably other *W instructions we could use in addition to ADDW/SUBW/MULW. My motivating case was a loop terminating compare and a phi use as seen in the new test file. Reviewed By: asb Differential Revision: https://reviews.llvm.org/D104581
-
Gus Smith authored
This allows us to use `buildLattices` in the `Merger` unittests. Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D104879
-
Eric Astor authored
-
Luo, Yuanke authored
When set opt-bisect-limit to some value that is less than ISel pass in command line and CurBisectNum expired, "DAG to DAG" pass lower its opt level to O0. However "processimpdefs" and "X86 FP Stackifier" is not stopped due to the CurBisectNum expiration. So undefined fp0 is generated. This cause crash in the "X86 FP Stackifier" pass, because Stackifier doesn't expect any undefined fp value. Here is the scenario that cause compiler crash. successors: %bb.26 liveins: $r14 ST_FPrr $st0, implicit-def $fpsw, implicit $fpcw renamable $rdi = MOV64ri @.str.3.16422 renamable $rdx = LEA64r %stack.6, 1, $noreg, 0, $noreg ADJCALLSTACKDOWN64 0, 0, 0, implicit-def $rsp, implicit-def dead $eflags, implicit-def $ssp, implicit $rsp, implicit $ssp dead $esi = MOV32r0 implicit-def dead $eflags, implicit-def $rsi CALL64pcrel32 @foo, implicit $rsp, implicit $ssp, implicit $rdi, implicit $rsi, implicit $rdx, implicit-def dead $fp0 renamable $xmm0 = MOVSDrm_alt %stack.10, 1, $noreg, 0, $noreg :: (load 8 from %stack.10) ADJCALLSTACKUP64 0, 0, implicit-def $rsp, implicit-def dead $eflags, implicit-def $ssp, implicit $rsp, implicit $ssp renamable $fp2 = CHS_Fp80 killed undef renamable $fp0, implicit-def $fpsw JMP_1 %bb.26 The CALL64pcrel32 mark fp0 dead, so llvm free the stack slot for fp0 and the stack become empty. In the late instruction CHS_Fp80, it use undefined register fp0, the original code assume there must be a stack slot for the src register (fp0) without respecting it is undefined, so llvm report error. We have some discussion in https://reviews.llvm.org/D104440 and we decide to fix it in fast ISel. The fix is to lower undefined fp value to zero value, so that it release the burden of "X86 FP Stackifier" pass. Thank Craig for the suggestion and the initial patch to fix it. Differential Revision: https://reviews.llvm.org/D104678 -
Jon Chesterfield authored
Most tests passed with an extra argument to explicitly enable the pass. One does not, deleted it as part of this change. I can't see why the codegen would be different between default on and default off but switched on. It can be retrieved from the project history. This would be a revert, but git revert was not clean. Disabling the pass and leaving it in tree is less likely to cause breakage elsewhere than patching up the git revert conflicts on unfamiliar code. It'll be landed without review, as @hsmhsm is believed unavailable at present. Differential Revision: https://reviews.llvm.org/D104962
-
Andrew Browne authored
Previously on x86_64: +--------------------+ 0x800000000000 (top of memory) | application memory | +--------------------+ 0x700000008000 (kAppAddr) | | | unused | | | +--------------------+ 0x300000000000 (kUnusedAddr) | origin | +--------------------+ 0x200000008000 (kOriginAddr) | unused | +--------------------+ 0x200000000000 | shadow memory | +--------------------+ 0x100000008000 (kShadowAddr) | unused | +--------------------+ 0x000000010000 | reserved by kernel | +--------------------+ 0x000000000000 MEM_TO_SHADOW(mem) = mem & ~0x600000000000 SHADOW_TO_ORIGIN(shadow) = kOriginAddr - kShadowAddr + shadow Now for x86_64: +--------------------+ 0x800000000000 (top of memory) | application 3 | +--------------------+ 0x700000000000 | invalid | +--------------------+ 0x610000000000 | origin 1 | +--------------------+ 0x600000000000 | application 2 | +--------------------+ 0x510000000000 | shadow 1 | +--------------------+ 0x500000000000 | invalid | +--------------------+ 0x400000000000 | origin 3 | +--------------------+ 0x300000000000 | shadow 3 | +--------------------+ 0x200000000000 | origin 2 | +--------------------+ 0x110000000000 | invalid | +--------------------+ 0x100000000000 | shadow 2 | +--------------------+ 0x010000000000 | application 1 | +--------------------+ 0x000000000000 MEM_TO_SHADOW(mem) = mem ^ 0x500000000000 SHADOW_TO_ORIGIN(shadow) = shadow + 0x100000000000 Reviewed By: stephan.yichao.zhao, gbalats Differential Revision: https://reviews.llvm.org/D104896
-
Siva Chandra Reddy authored
__builtin_ctzl takes an unsigned long argument which need not be 64-bit long on all platforms. Using __builtin_ctzll, which takes an unsigned long long argument, ensures that 64-bit values will be handled on a wider range of platforms. Without this change, the test corresponding to M512 fails in Windows. Reviewed By: gchatelet Differential Revision: https://reviews.llvm.org/D104897
-
Nikita Popov authored
This reverts commit 5cb20ef8. Assertion failures with this patch were reported on https://reviews.llvm.org/rG5cb20ef8a235, revert for now.
-
Duncan P. N. Exon Smith authored
Bring back the testcase dropped in 1e6303e6 and get it passing by checking explicitly for `ptr*` in LLParser. Uses `Type::isOpaquePointerTy()` from ad4bb828. Differential Revision: https://reviews.llvm.org/D104938
-
Aart Bik authored
Reviewed By: gussmith23 Differential Revision: https://reviews.llvm.org/D104939
-
Matheus Izvekov authored
Word on the grapevine was that the committee had some discussion that ended with unanimous agreement on eliminating relational function pointer comparisons. We wanted to be bold and just ban all of them cold turkey. But then we chickened out at the last second and are going for eliminating just the spaceship overload candidate instead, for now. See D104680 for reference. This should be fine and "safe", because the only possible semantic change this would cause is that overload resolution could possibly be ambiguous if there was another viable candidate equally as good. But to save face a little we are going to: * Issue an "error" for three-way comparisons on function pointers. But all this is doing really is changing one vague error message, from an "invalid operands to binary expression" into an "ordered comparison of function pointers", which sounds more like we mean business. * Otherwise "warn" that comparing function pointers like that is totally not cool (unless we are told to keep quiet about this). Signed-off-by:
Matheus Izvekov <mizvekov@gmail.com> Reviewed By: rsmith Differential Revision: https://reviews.llvm.org/D104892
-
Jonas Devlieghere authored
Avoid standing the Objective-C runtime lock by calling objc_copyRealizedClassList_nolock instead of objc_copyRealizedClassList. We already guarantee that no other threads can run while we're running this utility expression, similar to when we parse the data ourselves from the gdb_objc_realized_classes struct. Worst case this will crash if the list is getting edited, which won't do any harm and we'll just try again later. Differential revision: https://reviews.llvm.org/D104951
-
Jim Ingham authored
This was an oversight of the commit: bb93483c that added support for the Frozen variants. Also added a test case for the way that currently produces one of these variants (a copy).
-
Eli Friedman authored
The implementation is identical, but it makes the semantics a bit more obvious.
-