- Jun 15, 2021
-
-
Vitaly Buka authored
ubsan detected: lld/MachO/SyntheticSections.cpp:636:15: runtime error: null pointer passed as argument 2, which is declared to never be null
-
Yaxun (Sam) Liu authored
A lambda in a function template may be recursively instantiated. The recursive lambda will cause a lambda function instantiated multiple times, one inside another. The inner LocalInstantiationScope should not be marked as MergeWithParentScope since it already has references to locals properly substituted, otherwise it causes assertion due to the check for duplicate locals in merged LocalInstantiationScope. Reviewed by: Richard Smith Differential Revision: https://reviews.llvm.org/D98068
-
Louis Dionne authored
The runtimes build has assertions enabled, which is necessary to catch some of the modules-related issues we've been seeing recently. This patch enables testing with modules in the runtimes build so as to cover those cases. In the future, a better solution would be to systematically use versions of Clang that have assertions enabled. However, the Clangs we release currently don't have assertions enabled by default, which causes a challenge for the CI (we could try to build our own Clang from ToT with assertions in the CI, but that poses some problems). Differential Revision: https://reviews.llvm.org/D104252
-
Alexander Shaposhnikov authored
Add first bits for emitting LC_DATA_IN_CODE. Test plan: make check-lld-macho Differential revision: https://reviews.llvm.org/D103006
-
Kai Luo authored
Export `lq`, `stq`, `lqarx` and `stqcx.` in preparation for implementing 16-byte lock free atomic operations on AIX. Add a new register class `g8prc` for these instructions, since these instructions require even-odd register pair. Reviewed By: nemanjai, jsji, #powerpc Differential Revision: https://reviews.llvm.org/D103010
-
Vitaly Buka authored
-
Sean Silva authored
This is useful for "build tuple" type ops. In my case, in npcomp, I have an op: ``` // Result type is `!torch.tuple<!torch.tensor, !torch.tensor>`. torch.prim.TupleConstruct %0, %1 : !torch.tensor, !torch.tensor ``` and the context is required for the `Torch::TupleType::get` call (for the case of an empty tuple). The handling of these FmtContext's in the code is pretty ad-hoc -- I didn't attempt to rationalize it and just made a targeted fix. As someone unfamiliar with the code I had a hard time seeing how to more broadly fix the situation. Differential Revision: https://reviews.llvm.org/D104274
-
Leonard Chan authored
If SymbolizePC failes, it's possible for the newline to not be emitted. Differential Revision: https://reviews.llvm.org/D103845
-
Jacob Hegna authored
If the flag is not set, the script saved_model_aot_compile.py in tensorflow will default it to the correct value. However, in TF 2.5, the way the value is set in TensorFlowCompile.cmake file triggers a build error. Reviewed By: mtrofin Differential Revision: https://reviews.llvm.org/D103972
-
Adrian Prantl authored
One nice feature of the os_signpost API is that format string substitutions happen in the consumer, not the logging application. LLVM's current Signpost class doesn't take advantage of this though and instead always uses a static "Begin/End %s" format string. This patch uses variadic macros to allow the API to be used as intended. Unfortunately, the primary use-case I had in mind (the LLDB_SCOPED_TIMER() macro) does not get much better from this, because __PRETTY_FUNCTION__ is *not* a macro, but a static string, so signposts created by LLDB_SCOPED_TIMER() still use a static "%s" format string. At least LLDB_SCOPED_TIMERF() works as intended. This reapplies the previously reverted patch with additional include order fixes for non-modular builds of LLDB. Differential Revision: https://reviews.llvm.org/D103575
-
Huihui Zhang authored
Currently, Loop strengh reduce is not handling loops with scalable stride very well. Take loop vectorized with scalable vector type <vscale x 8 x i16> for instance, (refer to test/CodeGen/AArch64/sve-lsr-scaled-index-addressing-mode.ll added). Memory accesses are incremented by "16*vscale", while induction variable is incremented by "8*vscale". The scaling factor "2" needs to be extracted to build candidate formula i.e., "reg(%in) + 2*reg({0,+,(8 * %vscale)}". So that addrec register reg({0,+,(8*vscale)}) can be reused among Address and ICmpZero LSRUses to enable optimal solution selection. This patch allow LSR getExactSDiv to recognize special cases like "C1*X*Y /s C2*X*Y", and pull out "C1 /s C2" as scaling factor whenever possible. Without this change, LSR is missing candidate formula with proper scaled factor to leverage target scaled-index addressing mode. Note: This patch doesn't fully fix AArch64 isLegalAddressingMode for scalable vector. But allow simple valid scale to pass through. Reviewed By: sdesmalen Differential Revision: https://reviews.llvm.org/D103939 -
Adrian Prantl authored
This reverts commit 03841edd. Unfortunately this still breaks the LLDB standalone bot.
-
Krzysztof Parzyszek authored
-
Siva Chandra Reddy authored
-
Matt Morehouse authored
Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D104265
-
Adrian Prantl authored
One nice feature of the os_signpost API is that format string substitutions happen in the consumer, not the logging application. LLVM's current Signpost class doesn't take advantage of this though and instead always uses a static "Begin/End %s" format string. This patch uses variadic macros to allow the API to be used as intended. Unfortunately, the primary use-case I had in mind (the LLDB_SCOPED_TIMER() macro) does not get much better from this, because __PRETTY_FUNCTION__ is *not* a macro, but a static string, so signposts created by LLDB_SCOPED_TIMER() still use a static "%s" format string. At least LLDB_SCOPED_TIMERF() works as intended. This reapplies the previsously reverted patch with additional MachO.h macro #undefs. Differential Revision: https://reviews.llvm.org/D103575
-
George Balatsouras authored
Reviewed By: stephan.yichao.zhao Differential Revision: https://reviews.llvm.org/D104165
-
Roman Lebedev authored
Iff we have `SCALAR_TO_VECTOR` (and we demand it's only defined 0'th element), and said scalar was produced by `EXTRACT_VECTOR_ELT` from the 0'th element of some vector, then we can just continue traversal into said source vector. This comes up in X86 vector uniform shift lowering. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D104250
-
Aaron Ballman authored
This is not the complete set of language-related documents for C11, but is about 75% complete.
-
Hanhan Wang authored
The parser of generic op did not recognize the output from mlir-opt when there are multiple outputs. One would wrap the result types with braces, and one would not. The patch makes the behavior the same. Reviewed By: mravishankar Differential Revision: https://reviews.llvm.org/D104256
-
Piotr Sobczak authored
The code in fixLdsBranchVmemWARHazard looks for patterns of a vmem/lds access followed by a branch, followed by an lds/vmem access. The handling of the hazard requires an arbitrary number of instructions to process. In the worst case where a function has a vmem access, but no lds accesses, all instructions are examined only to conclude that the hazard cannot occur. Add the pre-processing stage which detects if there is both lds and vmem present in the function and only then does the more costly search. This patch significantly improves compilation time in the cases the hazard cannot happen. In one pathological case I looked at IsHazardInst is needlesly called 88.6 milions times. The numbers could also be improved by introducing a map around the inner calls to ::getWaitStatesSince in fixLdsBranchVmemWARHazard, but nothing will beat not running fixLdsBranchVmemWARHazard at all in the cases detected by shouldRunLdsBranchVmemWARHazardFixup(). Differential Revision: https://reviews.llvm.org/D104219
-
Xing Xue authored
Summary: A -Wunused-parameter warning was introduced by patch rG7f0244af [libc++abi] NFC: adding a new parameter base to functions for calculating… (authored by xingxue). The unused parameter base will be used in a follow-on patch D101298. This patch is to avoid the warning before D101298 is landed. Reviewers: ldionne, sfertile, compnerd, libc++abi Reviewed by: ldionne Differential Revision: https://reviews.llvm.org/D104235
-
Louis Dionne authored
-
Alexey Bataev authored
Added support for CXXRewrittenBinaryOperator as a condition in ranged for loops. This is a new kind of expression, need to extend support for C++20 constructs. It fixes PR49970: range-based for compilation fails for libstdc++ vector with -std=c++20. Differential Revision: https://reviews.llvm.org/D104240
-
Chris Lattner authored
This changes the pass manager to not rerun the verifier when a pass says it didn't change anything or after an OpToOpPassAdaptor, since neither of those cases need verification (and if the pass lied, then there will be much larger semantic problems than will be caught by the verifier). This maintains behavior in EXPENSIVE_CHECKS mode. Differential Revision: https://reviews.llvm.org/D104243
-
Arthur Eubanks authored
-
River Riddle authored
Interface patterns are unique in that they get added to every operation that also implements that interface, given that they aren't tied to individual operations. When the same interface pattern gets added to multiple operations (such as the current behavior with Linalg), an reference to each of these patterns is added to every op (meaning that an operation will now have N references to effectively the same pattern). This revision fixes this problematic behavior in Linalg, and can bring upwards of a 25% reduction in compile time in Linalg based workloads. Differential Revision: https://reviews.llvm.org/D104160
-
Arthur Eubanks authored
-
Saleem Abdulrasool authored
Pass swift_async context in a callee-saved register rather than as a regular parameter. This is similar to the Swift `self` and `error` parameters.
-
Arthur Eubanks authored
Emphasize that this is basically an attempt to remove ``PointerType::getElementType`` and ``Type::getPointerElementType()``. Add a couple more subtasks. Differential Revision: https://reviews.llvm.org/D104151
-
Vitaly Buka authored
To fix 'set but not used' warning on sanitizer-x86_64-linux-android bot.
-
Arthur Eubanks authored
It assumes that PointerType will keep having an optional pointee type, but we'd like to remove the pointee type in PointerType at some point. I feel like the current implementation could be simplified anyway, although perhaps I'm underestimating the amount of work needed throughout BitcodeReader. We will still need a side table to keep track of pointee types. This will be reimplemented at some point. This is essentially a revert of a4771e9d (which doesn't look like it was reviewed anyway). Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D103135
-
Jez Ng authored
UBSAN seems to have added this check somewhere along the way... This might also fix the PPC buildbot, which is failing on the same test
-
Jez Ng authored
-
Alexey Bataev authored
The parser code assumes building with C++ compiler and asserts when using clang (not clang++) on C file. I made the code dependent on input language. This shows up for amdgpu target. Reviewed By: ABataev Differential Revision: https://reviews.llvm.org/D103899
-
wlei authored
This change provides the option to merge and aggregate cold context by the last k frames instead of context-less name. By default K = 1 means the context-less one. This is for better perf tuning. The more selective merging and trimming will rely on llvm-profgen's preinliner. Reviewed By: wenlei, hoy Differential Revision: https://reviews.llvm.org/D104131
-
Michael Benfield authored
Differential Revision: https://reviews.llvm.org/D103623
-
Fraser Cormack authored
This patch adds support for loading and storing unaligned vectors via an equivalently-sized i8 vector type, which has support in the RVV specification for byte-aligned access. This offers a more optimal path for handling of unaligned fixed-length vector accesses, which are currently scalarized. It also prevents crashing when `LegalizeDAG` sees an unaligned scalable-vector load/store operation. Future work could be to investigate loading/storing via the largest vector element type for the given alignment, in case that would be more optimal on hardware. For instance, a 4-byte-aligned nxv2i64 vector load could loaded as nxv4i32 instead of as nxv16i8. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D104032
-
Asher Mancinelli authored
Move buffer unit test from Runtime directory to RuntimeGtest directory and use GTest. Test coverage is only maintained. Differential Revision: https://reviews.llvm.org/D102335 Reviewed By: awarzynski, klausler
-
Chris Lattner authored
This changes the outer verification loop to not recurse into IsolatedFromAbove operations - instead return them up to a place where a parallel for loop can process them all in parallel. This also changes Dominance checking to happen on IsolatedFromAbove chunks of the region tree, which makes it easy to fold operation and dominance verification into a single simple parallel regime. This speeds up firtool in CIRCT from ~40s to 31s on a large testcase in -verify-each mode (the default). The .fir parser and module passes in particular benefit from this - FModule passes (roughly analogous to function passes) were already running the verifier in parallel as part of the pass manager. This allows the whole-module passes to verify their enclosed functions / FModules in parallel. -verify-each mode is still faster (26.3s on the same testcase), but we do expect the verifier to take *some* time. Differential Revision: https://reviews.llvm.org/D104207
-