- Jun 17, 2020
-
-
Siva Chandra Reddy authored
Summary: To get the target order correct, the benchmarks directory has been moved one level higher. Previously, it was living in the utils directory. The utils directory is a collection of utils which are to be used by the tests and implementations. However, benchmarks *use* the implementations. So, moving it out of utils helps us setup proper target level dependencies. Reviewers: gchatelet Differential Revision: https://reviews.llvm.org/D81910
-
Julian Lettner authored
Let's have one canonical place to define ResultCode instances and their labels. Also make ResultCode's `__init__` function self-registering to better support custom ResultCodes.
-
Shilei Tian authored
DeviceID is added for some cases that we only have the __tgt_async_info but do not know its corresponding device id. However, to communicate with target plugins, we need that information. Event is added for another way to synchronize.
-
Zequan Wu authored
Summary: Rename --elf-cg-profile to --cg-profile and keep --elf-cg-profile as an alias of --cg-profile. Reviewers: jhenderson, MaskRay, espindola, hans Reviewed By: jhenderson, MaskRay Subscribers: emaste, rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D81855
-
Davide Italiano authored
When the zext gets promoted, it used to retain the original location, which pessimizes the debugging experience causing an unexpected jump in stepping at -Og. Fixes https://bugs.llvm.org/show_bug.cgi?id=46120 (which also contains a full C repro). Differential Revision: https://reviews.llvm.org/D81437
-
Ian Levesque authored
Summary: Add a flag to omit the xray_fn_idx to cut size overhead and relocations roughly in half at the cost of reduced performance for single function patching. Minor additions to compiler-rt support per-function patching without the index. Reviewers: dberris, MaskRay, johnislarry Subscribers: hiraditya, arphaman, cfe-commits, #sanitizers, llvm-commits Tags: #clang, #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D81995
-
Alexandre Ganea authored
In order to support hot-patching, we need to make sure the first emitted instruction in a function is a two-byte+ op. This is already the case on x86_64, which seems to always emit two-byte+ ops. However on 32-bit targets this wasn't the case. PATCHABLE_OP now lowers to a XCHG AX, AX, (66 90) like MSVC does. However when targetting pentium3 (/arch:SSE) or i386 (/arch:IA32) targets, we generate MOV EDI,EDI (8B FF) like MSVC does. This is for compatiblity reasons with older tools that rely on this two byte pattern. Differential Revision: https://reviews.llvm.org/D81301
-
Alexandre Ganea authored
This is to support https://reviews.llvm.org/D81301.
-
Fangrui Song authored
Test cases are restored from a3bed4bd
-
Jonas Devlieghere authored
Now that the log file is included in the reproducers, the path needs to be remapped for the test to find the new file in the reproducer.
-
Michał Górny authored
Fix various tool libraries not to link to clang's .a libraries and dylib simultaneously. This may cause breakage, in particular through duplicate command-line option declarations. Differential Revision: https://reviews.llvm.org/D81967
-
Michał Górny authored
Force linking llvm-exegesis to static LLVM libraries instead of dylib to prevent duplicate symbols due to linking both. Ideally, we'd want to link to the dylib only here but the target sub-libraries use hidden symbols from LLVM target libraries and therefore linking the dylib fails. Differential Revision: https://reviews.llvm.org/D81922
-
Michał Górny authored
Fix the CMake rules for LLVMCFIVerify library not to pull duplicate LLVM .a libraries when linking to the dylib. This prevents problems due to duplicate symbols and apparently fixes mingw32. This is an alternative approach to D44650 that just forces .a libraries instead. However, there doesn't seem to be any reason to do that. Differential Revision: https://reviews.llvm.org/D81921
-
Michał Górny authored
Skip 'really hidden' options when performing lookup of the nearest option when invalid option was passed. Since these options aren't even documented in --help-hidden, it seems inconsistent to suggest them to users. This fixes clang-tools-extra test failures due to unexpected suggestions when linking the tools to LLVM dylib (that provides more options than the subset of LLVM libraries linked directly). Differential Revision: https://reviews.llvm.org/D82001
-
Yuanfang Chen authored
Reviewers: probinson Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D81970
-
Scott Linder authored
Summary: CFI emitted during PEI at the beginning of the prologue needs to apply to any inserted waitcnts on function entry. Reviewers: arsenm, t-tye, RamNalamothu Reviewed By: arsenm Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, kerbowa, llvm-commits Tags: #llvm, #debug-info Differential Revision: https://reviews.llvm.org/D76881
-
Kadir Cetinkaya authored
Summary: Clangd was using bounds from the stale preamble, which might result in crashes. For example: ``` #include "a.h" #include "b.h" // this line is newly inserted #include "c.h" ``` PreambleBounds for the baseline only contains first two lines, but ReplayPreamble logic contains an include from the third line. This would result in a crash as we only lex preamble part of the current file during ReplayPreamble. This patch adds a `preambleBounds` method to PreamblePatch, which can be used to figure out preamble bounds for the current version of the file. Then uses it when attaching ReplayPreamble, so that it can lex the up-to-date preamble region. Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D81964
-
vnalamot authored
Summary: Future patch needs some of these in multiple places. The definitions of these can't be in the header and be eligible for inlining without making the full declaration of GCNSubtarget visible. I'm not sure what the right trade-off is, but I opted to not bloat SIRegisterInfo.h Reviewers: arsenm, cdevadas Reviewed By: arsenm Subscribers: RamNalamothu, qcolombet, jvesely, wdng, nhaehnle, hiraditya, kerbowa, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D79878
-
sstefan1 authored
Summary: Introduction of OpenMP-specific information cache based on Attributor's `InformationCache`. This should make it easier to share information between them. Reviewers: jdoerfert, JonChesterfield, hamax97, jhuber6, uenoku Subscribers: yaxunl, hiraditya, guansong, uenoku, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D81798
-
Jay Foad authored
-
Simon Pilgrim authored
Help reduce the diffs in D81517
-
Simon Pilgrim authored
Move ScalarEvolution::forgetLoopDispositions implementation to ScalarEvolution.cpp to remove the dependency. Add implicit header dependency to source files where necessary.
-
Sjoerd Meijer authored
To set up a tail-predicated loop, we need to to calculate the number of elements processed by the loop. We can now use intrinsic @llvm.get.active.lane.mask() to do this, which is emitted by the vectoriser in D79100. This intrinsic generates a predicate for the masked loads/stores, and consumes the Backedge Taken Count (BTC) as its second argument. We can now use that to reconstruct the loop tripcount, instead of the IR pattern match approach we were using before. Many thanks to Eli Friedman and Sam Parker for all their help with this work. This also adds overflow checks for the different, new expressions that we create: the loop tripcount, and the sub expression that calculates the remaining elements to be processed. For the latter, SCEV is not able to calculate precise enough bounds, so we work around that at the moment, but is not entirely correct yet, it's conservative. The overflow checks can be overruled with a force flag, which is thus potentially unsafe (but not really because the vectoriser is the only place where this intrinsic is emitted at the moment). It's also good to mention that the tail-predication pass is not yet enabled by default. We will follow up to see if we can implement these overflow checks better, either by a change in SCEV or we may want revise the definition of llvm.get.active.lane.mask. Differential Revision: https://reviews.llvm.org/D79175
-
Kirill Naumov authored
This reverts commit 37e06e8f.
-
Kirill Naumov authored
This reverts commit 52b0db22.
-
Kirill Naumov authored
This reverts commit 34fba68d.
-
Kirill Naumov authored
If the GEP instruction contanins only constants as its arguments, then it should be recognized as a constant. For now, there was also added a flag to turn off this simplification if it causes any regressions ("disable-gep-const-evaluation") which is off by default. Once I gather needed data of the effectiveness of this simplification, the flag will be deleted. Reviewers: apilipenko, davidxl, mtrofin Reviewed By: mtrofin Differential Revision: https://reviews.llvm.org/D81026
-
Kirill Naumov authored
This patch enables printing of constants to see which instructions were constant-folded. Needed for tests and better visiual analysis of inliner's work. Reviewers: apilipenko, mtrofin, davidxl, fedor.sergeev Reviewed By: mtrofin Differential Revision: https://reviews.llvm.org/D81024
-
Kirill Naumov authored
This class allows to see the inliner's decisions for better optimization verifications and tests. To use, use flag "-passes="print<inline-cost>"". Reviewers: apilipenko, mtrofin, davidxl, fedor.sergeev Reviewed By: mtrofin Differential revision: https://reviews.llvm.org/D81743
-
Nathan James authored
When using `-warnings-as-errors`, If there are any warnings promoted to errors, clang-tidy exits with the number of warnings. This really isn't needed and can cause issues when the number of warnings doesn't fit into 8 bits as POSIX terminals aren't designed to handle more than that. This addresses https://bugs.llvm.org/show_bug.cgi?id=46305. Bug originally added in D15528 Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D81953
-
Hans Wennborg authored
This reverts commit 5a95be22. It causes GCC 5.3 to segfault: In file included from /work/llvm.monorepo/llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp:357:0: lib/Target/AArch64/AArch64GenGlobalISel.inc:189:17: in constexpr expansion of ‘llvm::LLT::scalar(16u)’ lib/Target/AArch64/AArch64GenGlobalISel.inc:205:1: internal compiler error: Segmentation fault
-
Alexey Bataev authored
Summary: The OpenMP loops are normalized and transformed into the loops from 0 to max number of iterations. In some cases, original scheme may lead to overflow during calculation of number of iterations. If it is unknown, if we can end up with overflow or not (the bounds are not constant and we cannot define if there is an overflow), cast original type to the unsigned. Reviewers: jdoerfert Subscribers: yaxunl, guansong, sstefan1, openmp-commits, cfe-commits, caomhin Tags: #clang, #openmp Differential Revision: https://reviews.llvm.org/D81881
-
Alexey Bataev authored
Summary: Added codegen for scan directives in parallel for regions. Emits the code for the directive with inscan reductions. Original code: ``` #pragma omp for simd reduction(inscan, op : ...) for(...) { <input phase>; #pragma omp scan (in)exclusive(...) <scan phase> } ``` is transformed to something: ``` size num_iters = <num_iters>; <type> buffer[num_iters]; #pragma omp for simd for (i: 0..<num_iters>) { <input phase>; buffer[i] = red; } #pragma omp barrier for (int k = 0; k != ceil(log2(num_iters)); ++k) for (size cnt = last_iter; cnt >= pow(2, k); --k) buffer[i] op= buffer[i-pow(2,k)]; #pragma omp for simd for (0..<num_iters>) { red = InclusiveScan ? buffer[i] : buffer[i-1]; <scan phase>; } ``` Reviewers: jdoerfert Reviewed By: jdoerfert Subscribers: yaxunl, guansong, sstefan1, cfe-commits, caomhin Tags: #clang Differential Revision: https://reviews.llvm.org/D81658
-
Florian Hahn authored
-
Benjamin Kramer authored
-
Sjoerd Meijer authored
"error: 'get' is deprecated: The base class version of get with the scalable argument defaulted to false is deprecated." Changed VectorType::get() -> FixedVectorType::get().
-
Sjoerd Meijer authored
Fixed ARM regression test. Please see the original commit message rG47650451738c for details.
-
Mariya Podchishchaeva authored
Summary: SYCL and OpenMP prohibits thread local storage in device code, so this commit ensures that error is emitted for device code and not emitted for host code when host target supports it. Reviewers: jdoerfert, erichkeane, bader Reviewed By: jdoerfert, erichkeane Subscribers: guansong, riccibruno, ABataev, yaxunl, ebevhan, Anastasia, sstefan1, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D81641
-
David Green authored
In more complicated loops we can easily hit the complexity limits of loop strength reduction. If we do and filtering occurs, it's all too easy to remove the wrong formulae for post-inc preferring accesses due to it attempting to maximise register re-use. The patch adds an alternative filtering step when the target is preferring postinc to pick postinc formulae instead, hopefully lowering the complexity to below the limit so that aggressive filtering is not needed. There is also a change in here to stop considering existing addrecs as free under postinc. We should already be modelling them as a reg so don't want it to cause us to get the cost wrong. (I'm not sure that code makes sense in general, but there are X86 tests specifically for it where it seems to be helping so have left it around for the standard non-post-inc case). Differential Revision: https://reviews.llvm.org/D80273
-
Georgii Rymar authored
`Elf_GnuHash_Impl` has the following method: ``` ArrayRef<Elf_Word> values(unsigned DynamicSymCount) const { return ArrayRef<Elf_Word>(buckets().end(), DynamicSymCount - symndx); } ``` When DynamicSymCount is less than symndx we return an array with the huge broken size. This patch fixes the issue and adds an assert. This assert helped to fix an issue in one of the test cases. Differential revision: https://reviews.llvm.org/D81937
-