- Mar 12, 2020
-
-
Florian Hahn authored
This patch adds support for propagating matrix expressions along the inlined-at chain and emitting remarks at the traversed function scopes. To motivate this new behavior, consider the example below. Without the remark 'up-leveling', we would only get remarks in load.h and store.h, but we cannot generate a remark describing the full expression in toplevel.cpp, which is the place where the user has the best chance of spotting/fixing potential problems. With this patch, we generate a remark for the load in load.h, one for the store in store.h and one for the complete expression in toplevel.cpp. For a bigger example, please see remarks-inlining.ll. load.h: template <typename Ty, unsigned R, unsigned C> Matrix<Ty, R, C> load(Ty *Ptr) { Matrix<Ty, R, C> Result; Result.value = *reinterpret_cast <typename Matrix<Ty, R, C>::matrix_t *>(Ptr); return Result; } store.h: template <typename Ty, unsigned R, unsigned C> void store(Matrix<Ty, R, C> M1, Ty *Ptr) { *reinterpret_cast<typename decltype(M1)::matrix_t *>(Ptr) = M1.value; } toplevel.cpp void test(double *A, double *B, double *C) { store(add(load<double, 3, 5>(A), load<double, 3, 5>(B)), C); } For a given function, we traverse the inlined-at chain for each matrix instruction (= instructions with shape information). We collect the matrix instructions in each DISubprogram we visit. This produces a mapping of DISubprogram -> (List of matrix instructions visible in the subpogram). We then generate remarks using the list of instructions for each subprogram in the inlined-at chain. Note that the list of instructions for a subprogram includes the instructions from its own subprograms recursively. For example using the example above, for the subprogram 'test' this includes inline functions 'load' and 'store'. This allows surfacing the remarks at a level useful to users. Please note that the current approach may create a lot of extra remarks. Additional heuristics to cut-off the traversal can be implemented in the future. For example, it might make sense to stop 'up-leveling' once all matrix instructions are at the same debug location. Reviewers: anemet, Gerolf, thegameg, hfinkel, andrew.w.kaylor, LuoYuanke Reviewed By: anemet Differential Revision: https://reviews.llvm.org/D73600 -
Alexey Bataev authored
-
Sterling Augustine authored
Summary: Copying all of the saved register state on every entry to parseInstruction is a severe performance contraint, especially because most of this saved state is never used. On x86 linux this is about 560 bytes, and will be more on other platforms. When performance testing libunwind, this memcpy appears at the top of nearly all our tests. By only saving this state as needed, we see increasing in performance of around 2.5% for the ctak test here. https://github.com/clasp-developers/ctak Certain internal extremely exception-heavy tasks run in about 2/3 the time. Note that by stashing the new boolean inside what had been padding in the original structure, this uses no additional memory. Subscribers: fedor.sergeev, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D75692
-
Andrzej Warzynski authored
Reviewers: sdesmalen, efriedma Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D75928
-
Philip Reames authored
A downstream test case (see included reduced test) revealed that we have a bug in how we handle duplicate relocations. If we have the same SDValue relocated twice, and that value happens to be a constant (such as null), we only export one of the two llvm::Values. Exporting on a per llvm::Value basis is required to allow lowering of gc.relocates in following basic blocks (e.g. invokes). Without it, we end up with a use of an undefined vreg and bad things happen. Rather than fixing the optimization - which appears to be hard - I propose we simply remove it. There are no tests in tree that change with this code removed. If we find out later that this did matter for something, we can reimplement a variation of this in CodeGenPrepare to catch the easy cases without complicating the lowering code. Thanks to Denis and Serguei who did all the hard work of figuring out what went wrong here. The patch is by far the easy part. :) Differential Revision: https://reviews.llvm.org/D75964
-
Adrian Prantl authored
This patch allows skipping a test based on a default setting, which is useful when running the testsuite in different "modes" based on a default setting. This is a feature I need for the Swift testsuite, but I think it's generally useful. Differential Revision: https://reviews.llvm.org/D75864
-
Fangrui Song authored
See `docs/ELF/linker_script.rst` for the new computation for sh_addr and sh_addralign. `ALIGN(section_align)` now means: "increase alignment to section_align" (like yet another input section requirement). The "start of section .foo changes from 0x11 to 0x20" warning no longer makes sense. Change it to warn if sh_addr%sh_addralign!=0. To decrease the alignment from the default max_input_align, use `.output ALIGN(8) : {}` instead of `.output : ALIGN(8) {}` See linkerscript/section-address-align.test as an example. When both an output section address and ALIGN are set (can be seen as an "undefined behavior" https://sourceware.org/ml/binutils/2020-03/msg00115.html), lld may align more than GNU ld, but it makes a linker script working with GNU ld hard to break with lld. This patch can be considered as restoring part of the behavior before D74736. Differential Revision: https://reviews.llvm.org/D75724
-
- Mar 11, 2020
-
-
James Henderson authored
Speculative fix for build bot failures such as http://lab.llvm.org:8011/builders/clang-cmake-armv7-quick/builds/14317/
-
David Green authored
-
Haojian Wu authored
previously, we emited "exceeds the max limit 49" which was weird, now we emit "exceeds the max limit 50".
-
Matt Arsenault authored
This was failng on any pre-assigned copy to the VCC bank. This is something of a workaround for the default implementation in getInstrMappingImpl, and how it treats copy-like operations in general. Copy-like operations are considered to only have one result register bank, rather than separate banks for each source like a normal instruction. To avoid potentially mishandling reg_sequence with impossible operand combinations, the generic implementation errors on impossible costs. If the bank was already assigned, is treated it as-if it were an unsatisfiable REG_SEQUENCE mapping. We really don't get any value from any of what getInstrMappingImpl tries to do for copies, so just directly emit the simple mapping we really want.
-
Christian Sigg authored
Reviewers: herhut, mravishankar Reviewed By: herhut Subscribers: merge_guards_bot, jholewinski, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, Joonsoo, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D73794
-
Christian Sigg authored
Summary: Follow-up from D72589. Reviewers: dblaikie Reviewed By: dblaikie Subscribers: merge_guards_bot, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D73609
-
Hubert Tong authored
Speculative fix for buildbot breakage: http://lab.llvm.org:8011/builders/clang-ppc64le-rhel/builds/1899/steps/ninja%20check%201/logs/stdio D75742 introduces checks that cause bots to complain about comparing values where the integer types mismatch on signedness. This patch makes the expected value unsigned in various cases (since the value being tested is unsigned).
-
Artem Dergachev authored
error: default initialization of an object of const type 'const clang::QualType' without a user-provided default constructor Irrelevant; // A placeholder, whenever we do not care about the type. ^ {} -
Joachim Protze authored
This patch will allow dynamic libraries to call into the fiber support functions introduced in https://reviews.llvm.org/D54889 Differential Revision: https://reviews.llvm.org/D74487
-
Alexey Bataev authored
Summary: Explicitly initialize data members of RTLsTy class upon construction. Reviewers: grokos Subscribers: guansong, openmp-commits, caomhin, kkwli0 Tags: #openmp Differential Revision: https://reviews.llvm.org/D75946
-
Valentin Clement authored
Summary: This patch add some builtin operation for the gpu.all_reduce ops. - for Integer only: `and`, `or`, `xor` - for Float and Integer: `min`, `max` This is useful for higher level dialect like OpenACC or OpenMP that can lower to the GPU dialect. Differential Revision: https://reviews.llvm.org/D75766
-
Stephan Herhut authored
Attribution to original author got lost.
-
Jonathan Coe authored
Summary: Allow `?` inside C# generics. Do not mistake casts like `(Type?)` as conditional operators. Reviewers: krasimir Subscribers: cfe-commits, MyDeveloperDay Tags: #clang-format, #clang Differential Revision: https://reviews.llvm.org/D75983
-
Jonathan Coe authored
Reviewers: krasimir Reviewed By: krasimir Subscribers: cfe-commits, MyDeveloperDay Tags: #clang-format, #clang Differential Revision: https://reviews.llvm.org/D75984
-
Sam Parker authored
Precommit test for LowOverheadLoops.
-
Sam Parker authored
Move some logic around in LowOverheadLoop::ValidateLiveOut
-
Simon Pilgrim authored
For i32 and i64 cases, X86ISD::SHLD/SHRD are close enough to ISD::FSHL/FSHR that we can use them directly, we just need to account for the operand commutation for SHRD. The i16 SHLD/SHRD case is annoying as the shift amount is modulo-32 (vs funnel shift modulo-16), so I've added X86ISD::FSHL/FSHR equivalents, which matches the generic implementation in all other terms. Something I'm slightly concerned with is that ISD::FSHL/FSHR legality is controlled by the Subtarget.isSHLDSlow() feature flag - we don't normally use non-ISA features for this but it allows the DAG combines to continue to operate after legalization in a lot more cases. The X86 *bits.ll changes are all affected by the same issue - we now have a "FSHR(-1,-1,amt) -> ROTR(-1,amt) -> (-1)" simplification that reduces the dependencies enough for the branch fall through code to mess up. Differential Revision: https://reviews.llvm.org/D75748
-
Peter Smith authored
LLD implements Linker Scripts as they are described in the GNU ld manual. This description is far from a specification, with the only true reference the GNU ld implementation, which has undocumented behaviour that can vary from release to release. To make it easy for people to switch between linkers we try to follow GNU ld implementation details wherever possible. We reserve the right to make our own decisions where the undocumented GNU ld behaviour is not appropriate for LLD. We don't have a place to document these decisions and it can be difficult for users to find out this information. This file is a statement of the LLD implementation policy and will contain intentional deviations from GNU ld. The first patch that will add concrete details to this file is D75724 Differential Revision: https://reviews.llvm.org/D75921
-
LLVM GN Syncbot authored
-
James Henderson authored
The archive library truncated the size of archive members whose size was greater than max uint32_t. This patch fixes the issue and adds some unit tests to verify. Reviewed by: ruiu, MaskRay, grimar, rupprecht Differential Revision: https://reviews.llvm.org/D75742
-
Anna Welker authored
Refines the gather/scatter cost model, but also changes the TTI function getIntrinsicInstrCost to accept an additional parameter which is needed for the gather/scatter cost evaluation. This did require trivial changes in some non-ARM backends to adopt the new parameter. Extending gathers and truncating scatters are now priced cheaper. Differential Revision: https://reviews.llvm.org/D75525
-
Victor Campos authored
Summary: Instead of generating two i32 instructions for each load or store of a volatile i64 value (two LDRs or STRs), now emit LDRD/STRD. These improvements cover architectures implementing ARMv5TE or Thumb-2. The code generation explicitly deviates from using the register-offset variant of LDRD/STRD. In this variant, the register allocated to the register-offset cannot be reused in any of the remaining operands. Such restriction seems to be non-trivial to implement in LLVM, thus it is left as a to-do. Reviewers: dmgreen, efriedma, john.brawn, nickdesaulniers Reviewed By: efriedma, nickdesaulniers Subscribers: danielkiss, alanphipps, hans, nathanchance, nickdesaulniers, vvereschaka, kristof.beyls, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70072
-
QingShan Zhang authored
-
Sebastian Neubauer authored
This is a preparation for introducing a llvm.amdgcn.ballot intrinsic in D65088.
-
QingShan Zhang authored
-
Jonas Devlieghere authored
Check that the multi loader isn't null and print an error otherwise. This patch also extends the test to cover these error paths.
-
Akira Hatanaka authored
to __builtin_os_log_format if ARC isn't enabled Fixes a bug introduced in this commit: https://github.com/llvm/llvm-project/commit/f4d791f8332c2bb7e89849d0fe4ef48cb0a23229 rdar://problem/60301219
-
Serge Pavlov authored
Behavior of IEEEFloat::roundToIntegral is aligned with IEEE-754 operation roundToIntegralExact. In partucular this function now: - returns opInvalid for signaling NaNs, - returns opInexact if the result of rounding differs from argument. Differential Revision: https://reviews.llvm.org/D75246
-
Matt Arsenault authored
If the loaded memory size was smaller than the result size, this would produce out of bounds memory accesses. I'm wondering if we need a distinct narrow memory legalize action type, since a case I care about is decomposing a 4-byte unaligned access into 4 extending loads, which would leave the original result register type. I'm currently awkwardly using narrowScalar to handle unaligned accesses that need to be split.
-
Matt Arsenault authored
-
Matt Arsenault authored
-
Leonard Chan authored
We were seeing non-deterministic binary size differences depending on which toolchain was used to build fuchsia. This is because libunwind embeded the FILE path into a logging macro, even for release builds, which makes the code dependent on the build directory. This removes the file and line number from the error message. This is consistent with how other runtimes report error, e.g. https://github.com/llvm/llvm-project/blob/master/libcxxabi/src/abort_message.cpp#L30. Differential Revision: https://reviews.llvm.org/D75890
-
Hubert Tong authored
Speculative fix for buildbot failure in http://lab.llvm.org:8011/builders/clang-ppc64le-rhel/builds/1881/steps/build%20stage%201/logs/stdio Cause appears to be D75716.
-