- Mar 20, 2020
-
-
Lang Hames authored
Updates the object buffer ownership scheme in jitLinkForOrc and related functions: Ownership of both the object::ObjectFile and underlying MemoryBuffer is passed into jitLinkForOrc and passed back to the onEmit callback once linking is complete. This avoids the use-after-free errors that were seen in 98f2bb44.
-
Petr Hosek authored
While the VMO size is always page aligned, we can record the content size as a property and then use this metadata when writing the profile to a file. Differential Revision: https://reviews.llvm.org/D76402
-
Petr Hosek authored
This makes toolchain independent of the path it was built in by rewriting all absolute paths embedded in sources and debug info into relative ones. Differential Revision: https://reviews.llvm.org/D76189
-
Petr Hosek authored
This handles not paths embedded in debug info, but also in sources. Since the use of this flag is controlled by an option, rather than replacing the new option, we add a new option. Differential Revision: https://reviews.llvm.org/D76018
-
Simon Pilgrim authored
-
Stefan Agner authored
Add pseudo instructions for ldrsbt/ldrht/ldrsht with implicit immediate and add fall back C++ code to transform the instruction to the equivalent LDRSBTi/LDRHTi/LDRSHTi form. This is similar to how it has been done in commit fb3950ec This fixes: https://bugs.llvm.org/show_bug.cgi?id=45070
-
Nathan Ridge authored
Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D76098
-
Sam McCall authored
Summary: The expected pattern is for subclasses to initialize through computeDependence, which needs only setDependence. The few places that still use addDependence can be simulated with get+set. Reviewers: hokein Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D76392
-
Benjamin Kramer authored
Avoids -Wunused-variable warnings in Release builds.
-
Ilya Leoshkevich authored
Summary: Some kernels can provide 16EiB worth of mappings to each process, which causes mmap test to run for a very long time. In order to make it stop after a few seconds, make mmap_interceptor() fail when the original mmap() returns an address which is outside of the application range. Reviewers: eugenis Reviewed By: eugenis Subscribers: #sanitizers, Andreas-Krebbel, stefansf, jonpa, uweigand Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D76426
-
Florian Hahn authored
This logic can be shared with the tiled code generation. Reviewers: anemet, Gerolf, hfinkel, andrew.w.kaylor, LuoYuanke Reviewed By: anemet Differential Revision: https://reviews.llvm.org/D75565
-
Kazu Hirata authored
Summary: This patch fixes https://bugs.llvm.org/show_bug.cgi?id=44611 by preventing an infinite loop in the jump threading pass when -jump-threading-across-loop-headers is on. Specifically, without this patch, jump threading through two basic blocks would trigger on the same area of the CFG over and over, resulting in an infinite loop. Consider testcase PR44611-across-header-hang.ll in this patch. The first opportunity to thread through two basic blocks is: from bb_body2 through bb_header and bb_body1 to bb_body2. The pass duplicates bb_header and bb_body1 as, say, bb_header.thread1 and bb_body1.thread1. Since bb_header contains a successor edge back to itself, bb_header.thread1 also contains a successor edge to bb_header, immediately giving rise to the next jump threading opportunity: from bb_header.thread1 through bb_header and bb_body1 to bb_body2. After that, we repeatedly thread an incoming edge into bb_header through bb_header and bb_body1 to bb_body2. In other words, we keep peeling one iteration from bb_header's self loop. The patch fixes the problem by preventing the pass from duplicating a basic block containing a self loop. Reviewers: wmi, junparser, efriedma Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D76390
-
Richard Smith authored
This comes up when substituting into an already-substituted template argument during constraint satisfaction checking.
-
Scott Linder authored
Remove the gap left between the stack pointer (s32) and frame pointer (s34) now that the scratch wave offset is no longer a part of the calling convention ABI. Update llvm/docs/AMDGPUUsage.rst to reflect the change. Tags: #llvm Differential Revision: https://reviews.llvm.org/D75657
-
Scott Linder authored
Add the scratch wave offset to the scratch buffer descriptor (SRSrc) in the entry function prologue. This allows us to removes the scratch wave offset register from the calling convention ABI. As part of this change, allow the use of an inline constant zero for the SOffset of MUBUF instructions accessing the stack in entry functions when a frame pointer is not requested/required. Entry functions with calls still need to set up the calling convention ABI stack pointer register, and reference it in order to address arguments of called functions. The ABI stack pointer register remains unswizzled, but is now wave-relative instead of queue-relative. Non-entry functions also use an inline constant zero SOffset for wave-relative scratch access, but continue to use the stack and frame pointers as before. When the stack or frame pointer is converted to a swizzled offset it is now scaled directly, as the scratch wave offset no longer needs to be subtracted first. Update llvm/docs/AMDGPUUsage.rst to reflect these changes to the calling convention. Tags: #llvm Differential Revision: https://reviews.llvm.org/D75138
-
Scott Linder authored
Tags: #llvm Differential Revision: https://reviews.llvm.org/D76035
-
Scott Linder authored
Remove dead code and factor repeated conditions out into a single check. Rename and move code to make it more obvious what is running only for entry functions. Simplify function arguments to make it clearer what the relevant inputs are. Make flat scratch init accept an MBB iterator and move it to where it was logically being emitted within the prologue. These changes will make a future update to the calling convention simpler. Tags: #llvm Differential Revision: https://reviews.llvm.org/D75092
-
Sid Manning authored
Enable standard linux defines when the triple is Linux and the environment is musl. Differential Revision: https://reviews.llvm.org/D76310
-
Florian Hahn authored
This patch slightly generalizes the code to emit loads and stores of a matrix and adds helpers to load/store a tile of a larger matrix. This will be used in a follow-up patch introducing initial tiling. Reviewers: anemet, Gerolf, hfinkel, andrew.w.kaylor, LuoYuanke Reviewed By: anemet Differential Revision: https://reviews.llvm.org/D75564
-
Simon Pilgrim authored
These shifts are masked to be inrange so we should be able to replace them with generic shifts.
-
Erich Keane authored
https://reviews.llvm.org/D76435 fixes this problem, functions that are being declared but ARE called aren't entered into the callgraph.
-
Jonas Devlieghere authored
Add support for hardware breakpoints on ARM64. Differential revision: https://reviews.llvm.org/D76411
-
Sean Silva authored
Builder::get{I32,I64}VectorAttr are actually of limited applicability since vector types can't have zero elements, whereas many uses of this kind of attribute (such as dimension lists for "transpose"-like and other tensor ops) often can result in empty lists. Differential Revision: https://reviews.llvm.org/D76403 -
Simon Pilgrim authored
[InstCombine][X86] simplifyX86immShift - handle variable out-of-range vector shift by immediate amounts (PR40391) If we know the SSE shift amount is out of range then we can simplify to zero value (logical) or a 'signsplat' bitwidth-1 shift (arithmetic). This allows us to remove the equivalent ConstantInt constant folding path from simplifyX86immShift.
-
Cameron McInally authored
Support prefixing destructive operations, with the MOVPRFX instruction, to build constructive operations. Differential Revision: https://reviews.llvm.org/D75064
-
Lang Hames authored
Along the same lines as eb918d8d: This code also had to acquire the session mutex, and this could cause a deadlock under the wrong circumstances. This patch updates GenericLLVMIRPlatformSupport to just use the session lock for everything.
-
Lang Hames authored
-
Lang Hames authored
In MachOPlatform, obtaining the link-order for a JITDylib requires locking the session, but also needs to be part of a larger atomic operation that collates initializer symbols tracked by the platform. Trying to do this under a separate platform mutex leads to potential locking order issues, e.g. T1 locks session then tries to lock platform to register a new init symbol meanwhile T2 locks platform then tries to lock session to obtain link order. Removing the platform lock and performing all these operations under the session lock eliminates this possibility. At the same time we also need to collate init pointers from the MachOPlatform::InitScraperPlugin, and we don't need or want to lock the session for that. The new InitSeqMutex has been added to guard these init pointers, and the session mutex is never obtained while the InitSeqMutex is held.
-
Lang Hames authored
-
Lang Hames authored
The MU may define no symbols, but still contain a non-trivial destructor (e.g. an LLVM IR module that has been stripped of all externally visible definitions, but which still needs to lock its context to be destroyed). Bailing out early ensures that we destroy the unit outside the session lock, rather than under it which may cause deadlocks. Also adds some extra sanity-checking assertions.
-
Sanjay Patel authored
-
Raphael Isemann authored
(This is D68010 but I also set the new parameter in LibStdcpp.cpp to fix the Debian tests). Summary: Printing a summary for an empty NSPathStore2 string currently prints random bytes behind the empty string pointer from memory (rdar://55575888). It seems the reason for this is that the SourceSize parameter in the `ReadStringAndDumpToStreamOptions` - which is supposed to contain the string length - actually uses the length 0 as a magic value for saying "read as much as possible from the buffer" which is clearly wrong for empty strings. This patch adds another flag that indicates if we have know the string length or not and makes this behaviour dependent on that (which seemingly was the original purpose of this magic value). Reviewers: aprantl, JDevlieghere, shafik Reviewed By: aprantl Subscribers: christof, abidh, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68010
-
Raphael Isemann authored
Currently when an expression fails to parse and we have a FixIt, we keep the failed UserExpression around while trying to parse the expression with applied fixits. This means that we have this rather confusing control flow: 1. Original expression created and parsing attempted. 2. Expression with applied FixIts is created and parsing attempted. 3. Original expression is destroyed and parser deconstructed. 4. Expression with applied FixIts is destroyed and parser deconstructed. This patch just deletes the original expression so that step 2 and 3 are swapped and the whole process looks more like just sequentially parsing two expressions (which is what we actually do here). Doesn't fix anything just makes the code less fragile.
-
zoecarver authored
This patch updates <type_traits> to use builtin type traits whenever possible to improve compile times. Differential Revision: https://reviews.llvm.org/D67900
-
Marcel Hlopko authored
Summary: Rollforward of https://reviews.llvm.org/rGdd12826808f9079e164b82e64b0697a077379241 after temporarily adding -fno-delayed-template-parsing to the TreeTest. Original summary: > Copy of https://reviews.llvm.org/D72334, submitting with Ilya's permission. > > Handles template declaration of all kinds. > > Also builds template declaration nodes for specializations and explicit > instantiations of classes. > > Some missing things will be addressed in the follow-up patches: > > * specializations of functions and variables, > * template parameters. Reviewers: gribozavr2 Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D76418
-
Craig Topper authored
Previously we multiplied the cost for the table entries by the number of splits needed. But that implies that each split goes through a reduction to scalar independently. I think what really happens is that the we AND/OR the split pieces until we're down to a single value with a legal type and then do special reduction sequence on that. So to model that this patch takes the number of splits minus one multiplied by the cost of a AND/OR at the legal element count and adds that on top of the table lookup. Differential Revision: https://reviews.llvm.org/D76400
-
Vedant Kumar authored
A number of X86 tests were accidentally disabled in https://reviews.llvm.org/D73568. This commit re-enables those tests. ``` $ for x86_test in $(gg 'REQUIRES: x86$' llvm/test | fst); do sed -i "" '/REQUIRES: x86/d' $x86_test; done ``` (Note that 'x86' is not an available feature, that's what caused the tests to be disabled.)
-