- Nov 20, 2017
-
-
Mohammed Agabaria authored
This patch depends on: https://reviews.llvm.org/D35348 Support of pattern selection of masked gathers of AVX2 (X86\AVX2 code gen) Update LoopVectorize to generate gathers for AVX2 processors. Reviewers: delena, zvi, RKSimon, craig.topper, aaboud, igorb Reviewed By: delena, RKSimon Differential Revision: https://reviews.llvm.org/D35772 llvm-svn: 318641
-
Craig Topper authored
llvm-svn: 318640
-
Max Kazantsev authored
In rL316552, we ban intersection of unsigned latch range with signed range check and vice versa, unless the entire range check iteration space is known positive. It was a correct functional fix that saved us from dealing with ambiguous values, but it also appeared to be a very restrictive limitation. In particular, in the following case: loop: %iv = phi i32 [ 0, %preheader ], [ %iv.next, %latch] %iv.offset = add i32 %iv, 10 %rc = icmp slt i32 %iv.offset, %len br i1 %rc, label %latch, label %deopt latch: %iv.next = add i32 %iv, 11 %cond = icmp i32 ult %iv.next, 100 br it %cond, label %loop, label %exit Here, the unsigned iteration range is `[0, 100)`, and the safe range for range check is `[-10, %len - 10)`. For unsigned iteration spaces, we use unsigned min/max functions for range intersection. Given this, we wanted to avoid dealing with `-10` because it is interpreted as a very big unsigned value. Semantically, range check's safe range goes through unsigned border, so in fact it is two disjoint ranges in IV's iteration space. Intersection of such ranges is not trivial, so we prohibited this case saying that we are not allowed to intersect such ranges. What semantics of this safe range actually means is that we can start from `-10` and go up increasing the `%iv` by one until we reach `%len - 10` (for simplicity let's assume that `%len - 10` is a reasonably big positive value). In particular, this safe iteration space includes `0, 1, 2, ..., %len - 11`. So if we were able to return safe iteration space `[0, %len - 10)`, we could safely intersect it with IV's iteration space. All values in this range are non-negative, so using signed/unsigned min/max for them is unambiguous. In this patch, we alter the algorithm of safe range calculation so that it returnes a subset of the original safe space which is represented by one continuous range that does not go through wrap. In order to reach this, we use modified SCEV substraction function. It can be imagined as a function that substracts by `1` (or `-1`) as long as the further substraction does not cause a wrap in IV iteration space. This allows us to perform IRCE in many situations when we deal with IV space and range check of different types (in terms of signed/unsigned). We apply this approach for both matching and not matching types of IV iteration space and the range check. One implication of this is that now IRCE became smarter in detection of empty safe ranges. For example, in this case: loop: %iv = phi i32 [ %begin, %preheader ], [ %iv.next, %latch] %iv.offset = sub i32 %iv, 10 %rc = icmp ult i32 %iv.offset, %len br i1 %rc, label %latch, label %deopt latch: %iv.next = add i32 %iv, 11 %cond = icmp i32 ult %iv.next, 100 br it %cond, label %loop, label %exit If `%len` was less than 10 but SCEV failed to trivially prove that `%begin - 10 >u %len- 10`, we could end up executing entire loop in safe preloop while the main loop was still generated, but never executed. Now, cutting the ranges so that if both `begin - 10` and `%len - 10` overflow, we have a trivially empty range of `[0, 0)`. This in some cases prevents us from meaningless optimization. Differential Revision: https://reviews.llvm.org/D39954 llvm-svn: 318639
-
Serguei Katkov authored
We must collect all AddModes even if they are the same. This is due to Original value is different but we need all original values collected as they are used as anchors in common phi finding. Reviewers: john.brawn, reames Reviewed By: john.brawn Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D40166 llvm-svn: 318638
-
Peter Collingbourne authored
The comdat sections in these test cases do not comply with the COFF specification, and link.exe rejects them. I plan to make a change to how we handle comdat sections which would also cause us to reject them. llvm-svn: 318637
-
Peter Collingbourne authored
llvm-svn: 318636
-
Peter Collingbourne authored
llvm-svn: 318635
-
Craig Topper authored
This leaf doesn't take an additional argument. llvm-svn: 318634
-
Craig Topper authored
[X86] Reorder and reformat the feature bit checks in getHostCPUFeatues to keep the bits in order per register and encourage future additions to be in order too. llvm-svn: 318633
-
- Nov 19, 2017
-
-
Philip Pfaffe authored
Summary: Most changes are mechanical, but in one place I changed the program semantics by fixing a likely bug: In `Scop::hasFeasibleRuntimeContext()`, I'm now explicitely handling the error-case. Before, when the call to `addNonEmptyDomainConstraints()` returned a null set, this (probably) accidentally worked because isl_bool_error converts to true. I'm checking for nullptr now. Reviewers: grosser, Meinersbur, bollu Reviewed By: Meinersbur Subscribers: nemanjai, kbarton, pollydev, llvm-commits Differential Revision: https://reviews.llvm.org/D39971 llvm-svn: 318632
-
Jan Kratochvil authored
Differential revision: https://reviews.llvm.org/D40216 llvm-svn: 318631
-
Sanjay Patel authored
llvm-svn: 318630
-
Sanjay Patel authored
llvm-svn: 318629
-
Sanjay Patel authored
As the first test shows, we could transform an llvm intrinsic which never sets errno into a libcall which could set errno (even though it's marked readnone?), so that's not ideal. It's possible that we can also transform a libcall which could set errno to an intrinsic given the fast-math-flags constraint, but that's deferred to determine exactly which set of FMF are needed. Differential Revision: https://reviews.llvm.org/D40150 llvm-svn: 318628
-
Sanjay Patel authored
The 'ord' and 'uno' predicates have a logic operation for NAN built into their definitions: FCMP_ORD = 7, ///< 0 1 1 1 True if ordered (no nans) FCMP_UNO = 8, ///< 1 0 0 0 True if unordered: isnan(X) | isnan(Y) So we can simplify patterns like this: (fcmp ord (known NNAN), X) && (fcmp ord X, Y) --> fcmp ord X, Y (fcmp uno (known NNAN), X) || (fcmp uno X, Y) --> fcmp uno X, Y It might be better to split this into (X uno 0) | (Y uno 0) as a canonicalization, but that would be another patch. Differential Revision: https://reviews.llvm.org/D40130 llvm-svn: 318627
-
Jan Kratochvil authored
Differential revision: https://reviews.llvm.org/D40211 llvm-svn: 318626
-
Eric Fiselier authored
llvm-svn: 318625
-
Craig Topper authored
Also fix the memop in the ins for these instructions. Not sure what effect this has. llvm-svn: 318624
-
Craig Topper authored
llvm-svn: 318623
-
Eric Fiselier authored
llvm-svn: 318622
-
Eric Fiselier authored
Summary: Currently `std::variant` always uses an unsigned int to store the variant index. However this isn't nessesary and causes `std::variant` to be larger than it needs to be in most cases. This patch changes the index type to be `unsigned char` when possible, and `unsigned short` or `unsigned int` otherwise, depending on the size (Although it's questionable if it's even possible to create a variant with 65535 elements. Unfortunately this change is an ABI break, and as such is only enabled in ABI v2. Reviewers: mpark Reviewed By: mpark Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D40210 llvm-svn: 318621
-
Craig Topper authored
llvm-svn: 318620
-
Craig Topper authored
llvm-svn: 318619
-
Eric Fiselier authored
llvm-svn: 318618
-
Craig Topper authored
llvm-svn: 318617
-
Craig Topper authored
This is the resolution we came to in D38824. llvm-svn: 318616
-
Alexei Starovoitov authored
Signed-off-by:
Alexei Starovoitov <ast@kernel.org> llvm-svn: 318615
-
Alexei Starovoitov authored
kernel verifier is becoming smarter and soon will support direct and indirect function calls. Remove obsolete error from BPF backend. Make call to use PCRel_4 fixup. 'bpf to bpf' calls are distinguished from 'bpf to kernel' calls by insn->src_reg == BPF_PSEUDO_CALL == 1 which is used as relocation indicator similar to ld_imm64->src_reg == BPF_PSEUDO_MAP_FD == 1 The actual 'call' instruction remains the same for both 'bpf to kernel' and 'bpf to bpf' calls. Signed-off-by:
Alexei Starovoitov <ast@kernel.org> llvm-svn: 318614
-
Craig Topper authored
Cannonlake comes after skylake and supports avx512 so this is probably a closer model for now. llvm-svn: 318613
-
Craig Topper authored
There are several patches out for review right now to implement Icelake features. This adds a CPU to collect them under. llvm-svn: 318612
-
Craig Topper authored
llvm-svn: 318611
-
Craig Topper authored
This uses the same encoding for cannonlake in the proposed gcc patches here. https://gcc.gnu.org/ml/gcc-patches/2017-11/msg00551.html llvm-svn: 318610
-
Saleem Abdulrasool authored
This option is not used in the frontend. Remove the method. llvm-svn: 318609
-
Martell Malone authored
set -pie as default for musl linux targets add detection of alpine linux append appropriate compile flags for alpine Reviewers: rnk Differential Revision: https://reviews.llvm.org/D39588 llvm-svn: 318608
-
Eric Fiselier authored
Summary: Currently, LIT configures the LLVM binary path before the Clang binary path. However this breaks testing out-of-tree Clang builds (where the LLVM binary path includes a copy of Clang). This patch reverses the order of the paths when looking for Clang, putting the Clang binary directory first. Reviewers: zturner, beanz, chapuni, modocache, EricWF Reviewed By: EricWF Subscribers: mgorny, cfe-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D40217 llvm-svn: 318607
-
Simon Pilgrim authored
llvm-svn: 318605
-
Simon Pilgrim authored
llvm-svn: 318603
-
- Nov 18, 2017
-
-
Eric Fiselier authored
The CodeGenCoverage.h header is installed, but it references the build-only header "llvm/Config/config.h". This breaks use of the CodeGenCoverage.h header once it is installed, because config.h isn't available. This patch fixes the error by moving the config.h include from the CodeGenCoverage.h header (where it's not needed), to the CodeGenCoverage.cpp source file. llvm-svn: 318602
-
Jonas Hahnfeld authored
Some target devices (e.g. Nvidia GPUs) don't support dynamic stack allocation and hence no VLAs. Print errors with description instead of failing in the backend or generating code that doesn't work. This patch handles explicit uses of VLAs (local variable in target or declare target region) or implicitly generated (private) VLAs for reductions on VLAs or on array sections with non-constant size. Differential Revision: https://reviews.llvm.org/D39505 llvm-svn: 318601
-
Jonas Toth authored
Summary: This check searches for missing `else` branches in `if-else if`-chains and missing `default` labels in `switch` statements, that use integers as condition. It is very similar to -Wswitch, but concentrates on integers only, since enums are already covered. The option to warn for missing `else` branches is deactivated by default, since it is very noise on larger code bases. Running it on LLVM: {F5354858} for default configuration {F5354866} just for llvm/lib/Analysis/ScalarEvolution.cpp, the else-path checker is very noisy! Reviewers: alexfh, aaron.ballman, hokein Reviewed By: aaron.ballman Subscribers: lebedev.ri, Eugene.Zelenko, cfe-commits, mgorny, JDevlieghere, xazax.hun Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D37808 llvm-svn: 318600
-