- Feb 22, 2020
-
-
Mark Searles authored
This reverts commit 977cd661. It breaks OpenCL testing. OpenCL Runtime is using PT_LOAD information to calculate memory for global variables. This commit should be relanded once the OpenCL runtime stops relying on PT_LOAD information for calculating global variable memory size. Differential Revision: https://reviews.llvm.org/D74995
-
Vedant Kumar authored
On Apple platforms, is __arm__ isn't defined and we're not on Intel, we use an alternate std::string layout. I.e., the libcxx string test fails on phones because the hand-crafted "garbage" string structs are actually valid strings. See: ``` // _LIBCPP_ALTERNATE_STRING_LAYOUT is an old name for // _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT left here for backward compatibility. #if (defined(__APPLE__) && !defined(__i386__) && !defined(__x86_64__) && \ (!defined(__arm__) || __ARM_ARCH_7K__ >= 2)) || \ defined(_LIBCPP_ALTERNATE_STRING_LAYOUT) #define _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT #endif ``` Disable inspection of the garbage structs on Apple+ARM devices. -
Fangrui Song authored
Heads-up message: https://lists.llvm.org/pipermail/llvm-dev/2020-February/139390.html GNU as started to emit warnings for changed sh_type or sh_flags in 2000. GNU as>=2.35 will emit errors for most sh_type/sh_flags change, and error for entsize change. Some cases remain warnings for legacy reasons: .section .init_array,"ax", @progbits .section .init_array,"ax", @init_array # And some obscure sh_flags changes (OS/Processor specific flags) The rationale of a diagnostic (warning or error) is that sh_type, sh_flags or sh_entsize changes usually indicate user errors. The values are taken from the first .section directive. Successive directives are ignored. We just try to be rigid and emit errors for all sh_type/sh_flags/sh_entsize change. A possible improvement in the future is to reuse llvm-readobj/ELFDumper.cpp:getSectionTypeString so that we can name the type in the diagnostics. Reviewed By: psmith Differential Revision: https://reviews.llvm.org/D73999
-
Jordan Rupprecht authored
Summary: GNU objdump prints the method name in disassembly output, and upon further investigation this seems to come from debug info, not the symbol table. Some additional refactoring is necessary to make this work even when the line number is 0/the filename is unknown. The added test case includes a note for this scenario. See http://llvm.org/PR41341 for more info. Reviewers: dblaikie, MaskRay, jhenderson Reviewed By: MaskRay Subscribers: ormris, jvesely, aprantl, kerbowa, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D74507
-
River Riddle authored
Summary: This details the C++ format as well as the new declarative format. This has been one of the major missing pieces from the toy tutorial. Differential Revision: https://reviews.llvm.org/D74938
-
River Riddle authored
This revision add support for formatting successor variables in a similar way to operands, attributes, etc. Differential Revision: https://reviews.llvm.org/D74789
-
River Riddle authored
This revision add support in ODS for specifying the successors of an operation. Successors are specified via the `successors` list: ``` let successors = (successor AnySuccessor:$target, AnySuccessor:$otherTarget); ``` Differential Revision: https://reviews.llvm.org/D74783
-
River Riddle authored
This range is useful when an desired API expects a range or when comparing two different ranges for equality, but the underlying data is a splat. This range removes the need to explicitly construct a vector in those cases. Differential Revision: https://reviews.llvm.org/D74683
-
River Riddle authored
This matches the '(print|parse)OptionalAttrDictWithKeyword' functionality provided by the assembly parser/printer. Differential Revision: https://reviews.llvm.org/D74682
-
River Riddle authored
When operations have optional attributes, or optional operands(i.e. empty variadic operands), the assembly format often has an optional section to represent these arguments. This revision adds basic support for defining an "optional group" in the assembly format to support this. An optional group is defined by wrapping a set of elements in `()` followed by `?` and requires the following: * The first element of the group must be either a literal or an operand argument. - This is because the first element must be optionally parsable. * There must be exactly one argument variable within the group that is marked as the anchor of the group. The anchor is the element whose presence controls whether the group should be printed/parsed. An element is marked as the anchor by adding a trailing `^`. * The group must only contain literals, variables, and type directives. - Any attribute variables may be used, but only optional attributes can be marked as the anchor. - Only variadic, i.e. optional, operand arguments can be used. - The elements of a type directive must be defined within the same optional group. An example of this can be seen with the assembly format for ReturnOp, which has a variadic number of operands. ``` def ReturnOp : ... { let arguments = (ins Variadic<AnyType>:$operands); // We only print the operands+types if there are a non-zero number // of operands. let assemblyFormat = "attr-dict ($operands^ `:` type($operands))?"; } ``` Differential Revision: https://reviews.llvm.org/D74681 -
River Riddle authored
This allows for injecting type constraints that are not direct 1-1 mappings, for example when one type is equal to the element type of another. This allows for moving over several more parsers to the declarative form. Differential Revision: https://reviews.llvm.org/D74648
-
Stefanos Baziotis authored
Recently I had to use it and although one assumes it returns null if there's no parent loop, I think it helps to doc it. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D74890
-
Stella Stamenova authored
This reverts commit 0bb90628 since it is causing failures on the Windows LLDB buildbot: http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/14048
-
Francis Visoiu Mistrih authored
This removes a couple useless includes and the dependency of X86Desc on Object, which was useless as well.
-
Johannes Doerfert authored
To unblock the builders this disables a test for which the CHECK lines need to be updated. The patch causing the failure was not reverted because it is needed for a different problem we are investigating. Here we just need to update the CHECK lines which will happen in the meantime.
-
Quentin Colombet authored
This patch adds a cache that is valid only for the duration of a call to getKnownBits. With such short lived cache we avoid all the problems of cache invalidation while still getting the benefits of reusing the information we already computed. This cache is useful whenever an instruction occurs more than once in a chain of computation. E.g., v0 = G_ADD v1, v2 v3 = G_ADD v0, v1 Previously we would compute the known bits for: v1, v2, v0, then v1 again and finally v3. With the patch, now we won't have to recompute v1 again. NFC
-
Johannes Doerfert authored
The buildbot http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win shows some strange SCC iterator bug since 16188f9d which we need to investigate. This patch should remove the part of 16188f9d that could have exposed the problem.
-
Whitney Tsang authored
Summary: Blocks in a loop can be in any order as long as the loop header is the first block in Blocks. With some order of Blocks, cloneLoopWithPreheader would trigger the assertion in addBasicBlockToLoop. Example: define void @test(i64 %N) { preheader.i: br label %header.i header.i: %i = phi i64 [ 0, %preheader.i ], [ %inc.i, %latch.i ] br label %header.j header.j: %j = phi i64 [ 0, %header.i ], [ %inc.j, %latch.j ] br label %header.k header.k: %k = phi i64 [ 0, %header.j ], [ %inc.k, %latch.k ] call void @baz(i64 %i, i64 %j, i64 %k) br label %latch.k latch.k: %inc.k = add nsw i64 %k, 1 %cmp.k = icmp slt i64 %inc.k, %N br i1 %cmp.k, label %header.k, label %latch.j latch.j: %inc.j = add nsw i64 %j, 1 %cmp.j = icmp slt i64 %inc.j, %N br i1 %cmp.j, label %header.j, label %latch.i latch.i: %inc.i = add nsw i64 %i, 1 %cmp.i = icmp slt i64 %inc.i, %N br i1 %cmp.i, label %header.i, label %exit.i exit.i: ret void } declare void @baz(i64, i64, i64) If the blocks of loop-i is in the order: header.i, latch.k, header.k, header.j, latch.j, latch.i, then cloneLoopWithPreheader would trigger the assertion in addBasicBlockToLoop assert(contains(SameHeader) && getHeader() == SameHeader->getHeader() && "Incorrect LI specified for this loop!"); As latch.k is in both loop-j and loop-k, it would be set as the header of both loops after adding latch.k. If we update loop headers during cloning blocks, then after adding header.k, the header of loop-k would be updated with header.k, while the header of loop-j stays as latch.k. When adding header.j, SameHeader is loop-k, SameHeader->getHeader() is header.k, but getHeader() is latch.k, which trigger the assertion. Reviewer: jdoerfert, Meinersbur, fhahn, kbarton, hfinkel, bmahjour, etiotto Reviewed By: Meinersbur Subscribers: hiraditya, llvm-commits Tag: LLVM Differential Revision: https://reviews.llvm.org/D74382 -
Sid Manning authored
Differential Revision: https://reviews.llvm.org/D74972
-
Fangrui Song authored
1874dee5 moved CPU_(SUB_)TYPE logic to BinaryFormat. Object is not directly referenced.
-
Fangrui Song authored
[AArch64][SVE] Fix -DBUILD_SHARED_LIBS=on builds after -D74808/1874dee5
-
Sanjay Patel authored
We want flag users to check individual fast-math flags, not that all of them are set. This was also probably not working as intended because NoFPExcept isn't always set on non-strict nodes.
-
Volodymyr Sapsai authored
Follow-up to 20d51b2f, rename the setter to make it consistent with the getter. Also fixed a few comments along the way, didn't try to find all references to a module manager. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D74939
-
Fangrui Song authored
-
Med Ismail Bennani authored
Currently, in macOS, when a process crashes, lldb halts inside the implementation disassembly without yielding any useful information. The only way to get more information is to detach from the process, then wait for ReportCrash to generate a report, find the report, then see what error message was included in it. Instead of waiting for this to happen, lldb could locate the error_string and make it available to the user. This patch addresses this issue by enabling the user to fetch extended crash information for crashed processes using `process status --verbose`. Depending on the platform, this will try to gather different crash information into an structured data dictionnary. This dictionnary is generic and extensible, as it contains an array for each different type of crash information. On Darwin Platforms, lldb will iterate over each of the target's images, extract their `__crash_info` section and generated a StructuredData::Array containing, in each entry, the module spec, its UUID, the crash messages and the abort cause. The array will be inserted into the platform's `m_extended_crash_info` dictionnary and `FetchExtendedCrashInformation` will return its JSON representation like this: ``` { "crash-info annotations": [ { "abort-cause": 0, "image": "/usr/lib/system/libsystem_malloc.dylib", "message": "main(76483,0x1000cedc0) malloc: *** error for object 0x1003040a0: pointer being freed was not allocated", "message2": "", "uuid": "5747D0C9-900D-3306-8D70-1E2EA4B7E821" }, ... ], ... } ``` This crash information can also be fetched using the SB API or lldb-rpc protocol using SBTarget::GetExtendedCrashInformation(). rdar://37736535 Differential Revision: https://reviews.llvm.org/D74657 Signed-off-by:Med Ismail Bennani <medismail.bennani@gmail.com>
-
Med Ismail Bennani authored
Since the `platform process` commamnd has more tests now, this commits separates each of the `platform process` subcommand's test in its own directory. Differential Revision: https://reviews.llvm.org/D74836 Signed-off-by:
Med Ismail Bennani <medismail.bennani@gmail.com>
-
Alexander Shaposhnikov authored
In this diff we change the storage of a section to unique_ptr. This refactoring was factored out from D71647. Test plan: make check-all Differential revision: https://reviews.llvm.org/D74946
-
Cameron McInally authored
Add support for DestructiveBinaryComm DestructiveInstType, as well as the lowering code to expand the new Pseudos into the final movprfx+instruction pairs. Differential Revision: https://reviews.llvm.org/D73711
-
Jay Foad authored
Reviewers: arsenm Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, rovka, dstuttard, tpr, t-tye, hiraditya, kerbowa, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D74987
-
Sanjay Patel authored
This should be the last step in the current cleanup. Follow-ups should resolve the TODO about cost calc and enable the more general case where we extract different elements.
-
LLVM GN Syncbot authored
-
Haibo Huang authored
Summary: This change allows a hard coded relative PYTHONHOME setting. So that python can easily be packaged together with lldb. The change includes: 1. Extend LLDB_RELOCATABLE_PYTHON to all platforms. It defaults to ON for platforms other than Windows, to keep the behavior compatible. 2. Allows to customize LLDB_PYTHON_HOME. But still defaults to PYTHON_HOME. 3. LLDB_PYTHON_HOME can be a path relative to liblldb. If it is relative, we will resolve it before send it to Py_DecodeLocale. Subscribers: mgorny, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D74727
-
Francis Visoiu Mistrih authored
This moves all the logic of converting LLVM Triples to MachO::CPU_(SUB_)TYPE from the specific target (Target)AsmBackend to more convenient functions in lib/BinaryFormat. This also gets rid of the separate two X86AsmBackend classes. The previous attempt was to add it to libObject, but that adds an unnecessary dependency to libObject from all the targets. Differential Revision: https://reviews.llvm.org/D74808
-
Craig Topper authored
[X86] Add a new format type for instructions that represent named prefix bytes like data16 and rep. Use it to make a simpler version of isPrefix. isPrefix was added to support the patches to align branches. it relies on a switch over instruction names. This moves those opcodes to a new format so the information is tablegen and we can just check for a specific value in some bits in TSFlags instead. I've left the other function in place for now so that the existing patches in phabricator will still work. I'll work with the owner to get them migrated.
-
Reid Kleckner authored
Pointed out by Jay Foad.
-
Francesco Petrogalli authored
Summary: The patch covers both register/register and register/immediate addressing modes. Reviewers: efriedma, andwar, sdesmalen Reviewed By: sdesmalen Subscribers: sdesmalen, tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D74581
-
Sanjay Patel authored
More cleanup is possible now, but we probably need to resolve the TODO about the existing difference between compares and binops.
-
Francesco Petrogalli authored
Summary: Added register + immediate and register + register addressing modes for the following intrinsics: 1. Masked load and stores: * Sign and zero extended load and truncated stores. * No extension or truncation. 2. Masked non-temporal load and store. Reviewers: andwar, efriedma Subscribers: cameron.mcinally, sdesmalen, tschuett, kristof.beyls, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D74254 -
Rob Suderman authored
Summary: NFC - Moved StandardOps/Ops.h to a StandardOps/IR dir to better match surrounding directories. This is to match other dialects, and prepare for moving StandardOps related transforms in out for Transforms and into StandardOps/Transforms. Differential Revision: https://reviews.llvm.org/D74940
-
Krzysztof Parzyszek authored
When each byte in b&m is non-zero, this conversion Q->V->Q is a no-op.
-