- Aug 02, 2017
-
-
Craig Topper authored
llvm-svn: 309839
-
Marshall Clow authored
Fix PR33727: std::basic_stringbuf only works with DefaultConstructible allocators. Thanks to Jonathan Wakely for the report and suggested fix llvm-svn: 309838
-
Keith Wyss authored
Summary: Adding a new restructuredText file to document the trace format produced with an FDR mode handler and read by llvm-xray toolset. Reviewers: dberris, pelikan Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D36041 llvm-svn: 309836
-
Philip Pfaffe authored
Fix r309826: Move intantiation and specialization of OwningScopAnalysisManagerFunctionProxy to the polly namespace. When compiling with clang, explicit instantiation of the OwningScopAnalysisManagerFunctionProxy needs to happen within the polly namespace. Same goes with the specialization of its run method. llvm-svn: 309835
-
Adrian Prantl authored
llvm-svn: 309834
-
Reid Kleckner authored
This reverts r309602, check-lit still leaves Output directories in the source directory. llvm-svn: 309833
-
Matt Arsenault authored
If there are no calls, this is a faster path than searching the entire program for calls. This was supposed to be left in r309781. Fixes unused variable warning. llvm-svn: 309832
-
Adrian Prantl authored
rdar://problem/33580047 llvm-svn: 309831
-
Nirav Dave authored
During store merge we construct a sorted list of consecutive store candidates and consider subsequences for merging into a single store. For each subsequence we check if the stored value type is legal the merged store would have valid and fast and if the constructed value to be stored is valid. The only properties that affect this check between subsequences is the size of the subsequence, the alignment of the first store, the alignment of the stored load value (when merging stores-of-loads), and whether the merged value is a constant zero. If we do not find a viable mergeable subsequence starting from the first store of length N, we know that a subsequence starting at a later store of length N will also fail unless the new store's alignment, the new load's alignment (if we're merging store-of-loads), or we've dropped stores of nonzero value and could construct a merged stores of zero (for merging constants). As a result if we fail to find a valid subsequence starting from the first store we can safely skip considering subsequences that start with subsequent stores unless one of the above properties is true. This significantly (2x) improves compile time in some pathological cases. Reviewers: RKSimon, efriedma, zvi, spatel, waltl Subscribers: grandinj, llvm-commits Differential Revision: https://reviews.llvm.org/D35901 llvm-svn: 309830
-
Petr Hosek authored
When the data segment is the last segment, it is correct to leave it unaligned. However, when the code segment is the last segment, it should be aligned to the page boundary to avoid loading the non-segment parts of the ELF file at the end of the file. Differential Revision: https://reviews.llvm.org/D33630 llvm-svn: 309829
-
Philip Pfaffe authored
Summary: This patch is a first attempt at registering Polly passes with the LLVM tools. Tool plugins are still unsupported, but this registration is usable from the tools if Polly is linked into them (albeit requiring minimal patches to those tools). Registration requires a small amount of machinery (the owning analysis proxies), necessary for injecting ScopAnalysisManager objects into the calling tools. This patch is marked WIP because the registration is incomplete. Parsing manual pipelines is fully supported, but default pass injection into the O3 pipeline is lacking, mostly because there is opportunity for some redesign here, I believe. The first point of order would be insertion points. I think it makes sense to run before the vectorizers. Running Polly Early, however, is weird. Mostly because it actually is the default (which to me is unexpected), and because Polly runs it's own O1 pipeline. Why not instead insert it at an appropriate place somewhere after simplification happend? Running after the loop optimizers seems intuitive, but it also seems wasteful, since multiple consecutive loops might well be a single scop, and we don't need to run for all of them. My second request for comments would be regarding all those smallish helper passes we have, like PollyViewer, PollyPrinter, PollyImportJScop. Right now these are controlled by command line options, deciding whether they should be part of the Polly pipeline. What is your opinion on treating them like real passes, and have the user write an appropriate pipeline if they want to use any of them? Reviewers: grosser, Meinersbur, bollu Reviewed By: grosser Subscribers: llvm-commits, pollydev Tags: #polly Differential Revision: https://reviews.llvm.org/D35458 llvm-svn: 309826
-
Evandro Menezes authored
Separate the checking of the fused pairings with B.cc and CBcc. llvm-svn: 309825
-
Adrian Prantl authored
llvm-svn: 309824
-
Adrian Prantl authored
MachineLocation::getOffset() always returns 0. rdar://problem/33580047 llvm-svn: 309823
-
Singapuram Sanjay Srivallabh authored
Summary: **Remove debug metadata from instruction to be copied to prevent the source file's debug metadata being copied into GPUModule and eventually failing Module verification and ASM string codegeneration.** When copying the instruction onto the Module meant for the GPU, debug metadata attached to an instruction causes all related metadata to be pulled into the Module, including the DICompileUnit, which is not listed in llvm.dbg.cu of the Module. This fails the verification of the Module and generation of the ASM string. The only debug metadata of the instruction, the DebugLoc, is unset by this patch. This patch reattempts https://reviews.llvm.org/D35630 by targeting only those instructions that are to end up in a Module meant for the GPU. Reviewers: grosser, bollu Reviewed By: grosser Subscribers: pollydev Tags: #polly Differential Revision: https://reviews.llvm.org/D36161 llvm-svn: 309822
-
Florian Hahn authored
Summary: Suggested by @t.p.northover in https://bugs.llvm.org/show_bug.cgi?id=34015. Reviewers: javed.absar, t.p.northover, rengolin Reviewed By: t.p.northover Subscribers: aemerson, kristof.beyls, llvm-commits, t.p.northover Differential Revision: https://reviews.llvm.org/D36223 llvm-svn: 309821
-
Jan Vesely authored
mostly prints and exceptions. Few behavioral changes are documented in the text Generated Makefile is identical between python2 and python3 Signed-off-by:
Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by:
Aaron Watry <awatry@gmail.com> llvm-svn: 309820
-
Chad Rosier authored
llvm-svn: 309819
-
Adrian Prantl authored
llvm-svn: 309818
-
Chad Rosier authored
Differential Revision: https://reviews.llvm.org/D35856 llvm-svn: 309817
-
Alexey Bataev authored
llvm-svn: 309816
-
Walter Lee authored
Summary: This is required by the libc++ locale support. Reviewers: jyknight Subscribers: fedor.sergeev Differential Revision: https://reviews.llvm.org/D36121 llvm-svn: 309815
-
Alexey Bataev authored
llvm-svn: 309814
-
Alex Lorenz authored
This function will be used by the clang-refactor's rename actions llvm-svn: 309813
-
Alexey Bataev authored
Summary: Currently most of the time vectors of extractelement instructions are treated as scalars that must be gathered into vectors. But in some cases, like when we have extractelement instructions from single vector with different constant indeces or from 2 vectors of the same size, we can treat this operations as shuffle of a single vector or blending of 2 vectors. ``` define <2 x i8> @g(<2 x i8> %x, <2 x i8> %y) { %x0 = extractelement <2 x i8> %x, i32 0 %y1 = extractelement <2 x i8> %y, i32 1 %x0x0 = mul i8 %x0, %x0 %y1y1 = mul i8 %y1, %y1 %ins1 = insertelement <2 x i8> undef, i8 %x0x0, i32 0 %ins2 = insertelement <2 x i8> %ins1, i8 %y1y1, i32 1 ret <2 x i8> %ins2 } ``` can be converted to something like ``` define <2 x i8> @g(<2 x i8> %x, <2 x i8> %y) { %1 = shufflevector <2 x i8> %x, <2 x i8> %y, <2 x i32> <i32 0, i32 3> %2 = mul <2 x i8> %1, %1 ret <2 x i8> %2 } ``` Currently this type of conversion is considered as high cost transformation. Reviewers: mzolotukhin, delena, mkuper, hfinkel, RKSimon Subscribers: ashahid, RKSimon, spatel, llvm-commits Differential Revision: https://reviews.llvm.org/D30200 llvm-svn: 309812
-
Philip Pfaffe authored
Summary: I made a mistake in handling transitive invalidation of analysis results. I've updated the list of preserved analyses as well as the correct result dependences. The Invalidator passed through the invalidate() path can be used to transitively invalidate analyses. It frequently happens that analysis results depend on other analyses, and thus store references to their results. When the dependee now gets invalidated, the depender needs to be invalidated as well. This is the purpose of the Invalidator object, which can be used to check whether some dependee analysis is in the process of being invalidated. I originally was checking the wrong dependee analyses, which is an actual error, you can only check analysis results that are in the cache (which they are if you've captured their reference). The invalidation I'm handling inside the proxy deals with the standard analyses the proxy passes into the Scop pipeline, since I'm capturing their reference. This checking allows us to actually preserve a couple of results outside of the proxy, since the Scop pipeline shouldn't break those, or otherwise should update them accordingly. Reviewers: grosser, Meinersbur, bollu Reviewed By: grosser Subscribers: pollydev, llvm-commits Differential Revision: https://reviews.llvm.org/D36216 llvm-svn: 309811
-
Manuel Klimek authored
Differential Revision: https://reviews.llvm.org/D36154 llvm-svn: 309810
-
Manuel Klimek authored
Originally, we weren't able to match on Type nodes themselves (only QualType), so the hasDeclaration matcher was initially written to give what we thought are reasonable results for QualType matches. When we chagned the matchers to allow matching on Type nodes, it turned out that the hasDeclaration matcher was by chance written templated enough to now allow hasDeclaration to also match on (some) Type nodes. This patch change the hasDeclaration matcher to: a) work the same on Type and QualType nodes, b) be completely explicit about what nodes we can match instead of just allowing anything with a getDecl() to match, c) explicitly control desugaring only one level in very specific instances. d) adds hasSpecializedTemplate and tagType matchers to allow migrating existing use cases that now need more explicit matchers Note: This patch breaks clang-tools-extra. The corresponding patch there is approved and will land in a subsequent patch. Differential Revision: https://reviews.llvm.org/D27104 llvm-svn: 309809
-
Siddharth Bhat authored
We introduce `polly_mallocManaged` and `polly_freeManaged` as proxies for `cudaMallocManaged` / `cudaFree`. This is currently not used by Polly. It is auxiliary code that is used in `COSMO`. This is useful because `polly_mallocManaged` matches the signature of `malloc`, while `cudaMallocManaged` does not. We introduce `polly_freeManaged` for symmetry. We use this in COSMO to use the unified memory feature of the newer CUDA APIs (>= 6). Differential Revision: https://reviews.llvm.org/D35991 llvm-svn: 309808
-
Philip Pfaffe authored
llvm-svn: 309807
-
Diana Picus authored
This should enable us to test the generation of target-specific constant pools, e.g. for ARM: constants: - id: 0 value: 'g(GOT_PREL)-(LPC0+8-.)' alignment: 4 isTargetSpecific: true I intend to use this to test PIC support in GlobalISel for ARM. This is difficult to test outside of that context, since the existing MIR tests usually rely on parser support as well, and that seems a bit trickier to add. We could try to add a unit test, but the setup for that seems rather convoluted and overkill. We do test however that the parser reports a nice error when encountering a target-specific constant pool. Differential Revision: https://reviews.llvm.org/D36092 llvm-svn: 309806
-
Philip Pfaffe authored
llvm-svn: 309805
-
Daniel Sanders authored
Summary: Fix a bug discovered in an out-of-tree target where memoperands from pseudo-instructions that weren't part of the match were being merged into the result instructions as part of GIR_MergeMemOperands. This bug was caused by a change to the handling of State.MIs between rules when the state machine tables were fused into a single table. Previously, each rule would reset State.MIs using State.MIs.resize(1) but this is no longer done, as a result stale data is occasionally left in some elements of State.MIs. Most opcodes aren't affected by this but GIR_MergeMemOperands merges all memoperands from the intructions recorded in State.MIs into the result instruction. Suppose for example, we processed but rejected the following pattern: (signextend (load x)) at this point, State.MIs contains the signextend and the load. Now suppose we process and accept this pattern: (add x, y) at this point, State.MIs contains the add as well as the (now irrelevant) load. When GIR_MergeMemOperands is processed, the memoperands from that irrelevant load will be merged into the result instruction even though it was not part of the match. Bringing back the State.MIs.resize(1) would fix the problem but it would limit our ability to optimize the table in the future. Instead, this patch fixes the problem by explicitly stating which instructions should be merged into the result. There's no direct test case in this commit because a test case would be very brittle. However, at the time of writing this should fix the failures in http://green.lab.llvm.org/green/job/Compiler_Verifiers_GlobalISEL/ as well as a failure in test/CodeGen/ARM/GlobalISel/arm-isel.ll when expensive checks are enabled. Reviewers: ab, t.p.northover, qcolombet, rovka, aditya_nandakumar Subscribers: fhahn, kristof.beyls, igorb, llvm-commits Differential Revision: https://reviews.llvm.org/D36094 llvm-svn: 309804
-
Vadim Macagon authored
llvm-svn: 309803
-
Siddharth Bhat authored
On mixing the driver and runtime APIs, it is quite possible that a context already exists due to runtime API usage. In this case, Polly should try to use the same context. This patch teaches GPUJIT to detect that a context exists and how to pick up this context. Without this, calling `cudaMallocManaged`, for example, before a polly-generated kernel launch causes P100 to *hang*. This is a part of (https://reviews.llvm.org/D35991) that was extracted out. Differential Revision: https://reviews.llvm.org/D36162 llvm-svn: 309802
-
Ilya Biryukov authored
llvm-svn: 309801
-
Ilya Biryukov authored
To follow the style of other options shown on `clangd -help`. llvm-svn: 309800
-
Daniel Marjamaki authored
Example: #define MACRO(C) if (C) { static int x; .. } void foo() { MACRO(0); } Differential Revision: https://reviews.llvm.org/D36141 llvm-svn: 309799
-
Vitaly Buka authored
Summary: Fuchsia uses the "memintrinsics" interceptors, though not via any generalized interception mechanism. It doesn't use any other interceptors. Submitted on behalf of Roland McGrath. Reviewers: vitalybuka, alekseyshl, kcc Reviewed By: vitalybuka Subscribers: kubamracek, phosek, filcab, llvm-commits Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36189 llvm-svn: 309798
-
Vitaly Buka authored
Submitted on behalf of Roland McGrath. Reviewers: kcc, eugenis, alekseyshl, vitalybuka Reviewed By: kcc Subscribers: filcab, vitalybuka, phosek, llvm-commits, kubamracek, mgorny Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D35866 llvm-svn: 309797
-