summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Enable simplify and forward-op-tree by defaultTobias Grosser2017-08-021-2/+2
| | | | | | | | | These passes have been tested over the last month and should generally help to remove scalar data dependences in Polly. We enable them to give them even wider test coverage. Large performance regressions and any kind of correctness regressions are not expected. llvm-svn: 309878
* Exclude version symbols for static libompJonathan Peyton2017-08-021-0/+5
| | | | | | | | | | | | We use symbol versioning for GNU-compatibility but libgomp has versioned symbols only in the shared library but not in the static. Moreover, version symbols in the static library can cause an error at link time. Patch by Olga Malysheva Differential Revision: https://reviews.llvm.org/D36225 llvm-svn: 309877
* [Power9] Exploit vector absolute difference instructions on Power 9Stefan Pintilie2017-08-023-1/+410
| | | | | | | | | Power 9 has instructions to do absolute difference (VABSDUB, VABSDUH, VABSDUW) for byte, halfword and word. We should take advantage of these. Differential Revision: https://reviews.llvm.org/D34684 llvm-svn: 309876
* Move lock acquire/release functions in task deque cleanup codeJonathan Peyton2017-08-021-3/+2
| | | | | | | | | | | | | The original locations can be reached without initializing the lock variable (td_deque_lock), so it is potentially unsafe. It is guaranteed that the lock is initialized if the deque (td_deque) is not NULL, and lock functions can be safely called. Patch by Hansang Bae Differential Revision: https://reviews.llvm.org/D36017 llvm-svn: 309875
* Add new envirable KMP_TEAMS_THREAD_LIMITJonathan Peyton2017-08-025-10/+30
| | | | | | | | | | | | | | | | | | | | This change adds a new environment variable, KMP_TEAMS_THREAD_LIMIT, which is used to set a new global variable, __kmp_teams_max_nth, which is checked when determining the size and quantity of teams that will be created in the teams construct. Specifically, it is a limit on the total number of threads in a given teams construct. It differentiates the limits for the teams construct from the limits for regular parallel regions (KMP_DEVICE_THREAD_LIMIT/__kmp_max_nth and OMP_THREAD_LIMIT/__kmp_cg_max_nth). When each individual team is formed, it is still subject to those limits. After the clauses to the teams construct are parsed and calculated, we check to make sure we are within this limit, and if not, reduce num_threads per team and/or number of teams, accordingly. The default value is set to the number of available processors on the system. Patch by Terry Wilmarth Differential Revision: https://reviews.llvm.org/D36009 llvm-svn: 309874
* [UBSan] Provide default blacklist filename for UBSanHan Shen2017-08-021-0/+2
| | | | | | | | | | | | | | | | | Summary: This is to provide a default blacklist filename for UBSan. While UBSan is turned on, it's better that clang pick up a blacklist file (when exists), just as what ASan / MSan does, so we do not end up adding the "-fsanitize-blacklist" option to every command line. Reviewers: chandlerc, echristo, vsk, eugenis Reviewed By: vsk, eugenis Subscribers: vsk, eugenis, echristo, cfe-commits Differential Revision: https://reviews.llvm.org/D35849 llvm-svn: 309873
* [NewGVN] Now that load coercion is enable, we pass this test.Davide Italiano2017-08-021-1/+0
| | | | llvm-svn: 309872
* Move setNewAccessRelation to isl++Tobias Grosser2017-08-026-32/+27
| | | | llvm-svn: 309871
* Move ScopStmt::setAccessRelation to isl++Tobias Grosser2017-08-022-8/+8
| | | | llvm-svn: 309870
* Replace asserts with llvm_unreachable to clarify intentTobias Grosser2017-08-021-2/+2
| | | | llvm-svn: 309856
* [AArch64] Add Exynos M2 feature test (NFC)Evandro Menezes2017-08-021-0/+1
| | | | | | Test fusion of AES operations. llvm-svn: 309855
* Add new ASAN_OPTION: sleep_after_init.Kostya Serebryany2017-08-023-0/+19
| | | | | | | | | | | | | | Summary: As mentioned in https://github.com/google/sanitizers/issues/834, suggested option can be handy for debugging. Reviewers: kcc Reviewed By: kcc Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D35409 llvm-svn: 309854
* Fix r309826: Appease clang-format check.Philip Pfaffe2017-08-021-1/+1
| | | | llvm-svn: 309853
* [docs] Remove accidental unindent to appease the sphinx botVedant Kumar2017-08-021-4/+4
| | | | | | | Bot failure: http://lab.llvm.org:8011/builders/clang-sphinx-docs/builds/12043/steps/docs-clang-html/logs/stdio llvm-svn: 309852
* Fix shadowing warningMarshall Clow2017-08-021-1/+1
| | | | llvm-svn: 309851
* [Dominators] Teach LoopDeletion to use the new incremental APIJakub Kuderski2017-08-024-25/+136
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch makes LoopDeletion use the incremental DominatorTree API. We modify LoopDeletion to perform the deletion in 5 steps: 1. Create a new dummy edge from the preheader to the exit, by adding a conditional branch. 2. Inform the DomTree about the new edge. 3. Remove the conditional branch and replace it with an unconditional edge to the exit. This removes the edge to the loop header, making it unreachable. 4. Inform the DomTree about the deleted edge. 5. Remove the unreachable block from the function. Creating the dummy conditional branch is necessary to perform incremental DomTree update. We should consider using the batch updater when it's ready. Reviewers: dberlin, davide, grosser, sanjoy Reviewed By: dberlin, grosser Subscribers: mzolotukhin, llvm-commits Differential Revision: https://reviews.llvm.org/D35391 llvm-svn: 309850
* [StackColoring] Update AliasAnalysis information in stack coloring pass (part 2)Hiroshi Inoue2017-08-022-11/+10
| | | | | | | | | | | | | | | | | | | | | This patch is update after the first patch (https://reviews.llvm.org/rL309651) based on the post-commit comments. Stack coloring pass need to maintain AliasAnalysis information when merging stack slots of different types. Actually, there is a FIXME comment in StackColoring.cpp // FIXME: In order to enable the use of TBAA when using AA in CodeGen, // we'll also need to update the TBAA nodes in MMOs with values // derived from the merged allocas. But, TBAA has been already enabled in CodeGen without fixing this pass. The incorrect TBAA metadata results in recent failures in bootstrap test on ppc64le (PR33928) by allowing unsafe instruction scheduling. Although we observed the problem on ppc64le, this is a platform neutral issue. This patch makes the stack coloring pass maintains AliasAnalysis information when merging multiple stack slots. This patch fixes PR33928. llvm-svn: 309849
* This ppc64 implementation of clear_cache works for both big and little endian.Sterling Augustine2017-08-021-1/+1
| | | | llvm-svn: 309848
* [ubsan] Test -fsanitize=vptr without -fsanitize=nullVedant Kumar2017-08-022-2/+2
| | | | | | | | This reverts commit r309042, thereby adding a test for -fsanitize=vptr functionality without -fsanitize=null. It also removes -fsanitize=null from another -fsanitize=vptr test. llvm-svn: 309847
* [ubsan] Have -fsanitize=vptr emit a null check if -fsanitize=null isn't ↵Vedant Kumar2017-08-029-40/+29
| | | | | | | | | | | | | | | | | | available In r309007, I made -fsanitize=null a hard prerequisite for -fsanitize=vptr. I did not see the need for the two checks to have separate null checking logic for the same pointer. I expected the two checks to either always be enabled together, or to be mutually compatible. In the mailing list discussion re: r309007 it became clear that that isn't the case. If a codebase is -fsanitize=vptr clean but not -fsanitize=null clean, it's useful to have -fsanitize=vptr emit its own null check. That's what this patch does: with it, -fsanitize=vptr can be used without -fsanitize=null. Differential Revision: https://reviews.llvm.org/D36112 llvm-svn: 309846
* Fix code format on r309826Singapuram Sanjay Srivallabh2017-08-022-3/+2
| | | | | | | | | | | | | | | | | Summary: Fix code format on r309826 / D35458 Reviewers: grosser, bollu Reviewed By: grosser Subscribers: pollydev Tags: #polly Differential Revision: https://reviews.llvm.org/D36232 llvm-svn: 309845
* Revert "Xray docs with description of Flight Data Recorder binary format."Keith Wyss2017-08-023-403/+5
| | | | | | | | This reverts commit 3462b8ad41a840fd54dbbd0d3f2a514c5ad6f656. The docs-llvm-html target failed. llvm-svn: 309842
* [AsmParser][GAS-compatibility] Ignore an empty 'p2align' directiveCoby Tayree2017-08-022-2/+14
| | | | | | | | | GAS ignores the aforementioned issue this patch aligns LLVM + throws in an appropriate warning Differential Revision: https://reviews.llvm.org/D36060 llvm-svn: 309841
* Use more consistent namesRafael Espindola2017-08-026-31/+32
| | | | | | | | | | | | | | | | | | | | Reviewing another change I noticed that we use "getSymbols" to mean different things in different files. Depending on the file it can return ArrayRef<StringRef> ArrayRef<SymbolBody*> ArrayRef<Symbol*> ArrayRef<Elf_Sym> With this change it always returns an ArrayRef<SymbolBody*>. The other functions are renamed getELFsyms() and getSymbolNames(). Note that we cannot return ArrayRef<Symbol*> instead of ArreyRef<SymbolBody*> because local symbols have a SymbolBody but not a Symbol. llvm-svn: 309840
* [InstCombine] Add missing test case for (xor (sext (cmp)), -1) -> (sext (!cmp)).Craig Topper2017-08-021-0/+14
| | | | llvm-svn: 309839
* Fix PR33727: std::basic_stringbuf only works with DefaultConstructible ↵Marshall Clow2017-08-022-1/+21
| | | | | | allocators. Thanks to Jonathan Wakely for the report and suggested fix llvm-svn: 309838
* Xray docs with description of Flight Data Recorder binary format.Keith Wyss2017-08-023-5/+403
| | | | | | | | | | | | | | 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
* Fix r309826: Move intantiation and specialization of ↵Philip Pfaffe2017-08-021-6/+11
| | | | | | | | | | 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
* Assert that the offset of a DBG_VALUE is always 0. (NFC)Adrian Prantl2017-08-022-4/+8
| | | | llvm-svn: 309834
* Revert "[lit] Avoid copying llvm/utils/lit/tests/Inputs with lit site configs"Reid Kleckner2017-08-025-31/+29
| | | | | | | This reverts r309602, check-lit still leaves Output directories in the source directory. llvm-svn: 309833
* AMDGPU: Restore using MRI to find highest used regsMatt Arsenault2017-08-021-5/+23
| | | | | | | | | | 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
* Remove the unused Offset field from MachineLocation (NFC)Adrian Prantl2017-08-023-37/+8
| | | | | | rdar://problem/33580047 llvm-svn: 309831
* [DAG] Improve candidate pruning in store merge failure case. NFCINirav Dave2017-08-021-20/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [ELF] When the code segment is the last, align it to the page boundaryPetr Hosek2017-08-029-32/+91
| | | | | | | | | | | 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
* [Polly][PM][WIP] Polly pass registrationPhilip Pfaffe2017-08-028-2/+343
| | | | | | | | | | | | | | | | | | | | | 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
* [AArch64] Improve the test of conditional branch fusionEvandro Menezes2017-08-021-5/+25
| | | | | | Separate the checking of the fused pairings with B.cc and CBcc. llvm-svn: 309825
* Remove unused includes of MachineLocation.h (NFC)Adrian Prantl2017-08-023-2/+1
| | | | llvm-svn: 309824
* Remove unreachable code. (NFC)Adrian Prantl2017-08-024-26/+5
| | | | | | | | MachineLocation::getOffset() always returns 0. rdar://problem/33580047 llvm-svn: 309823
* Remove debug metadata from copied instruction to prevent GPUModule ↵Singapuram Sanjay Srivallabh2017-08-022-0/+114
| | | | | | | | | | | | | | | | | | | | | | | | | verification failure 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
* [AArch64] Simplify AES*Tied pseudo expansion (NFC).Florian Hahn2017-08-021-10/+3
| | | | | | | | | | | | | | | | 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
* configure.py: Make python3 friendlyJan Vesely2017-08-022-6/+19
| | | | | | | | | | 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
* [InlineCost] Remove redundant call. NFC.Chad Rosier2017-08-021-2/+3
| | | | llvm-svn: 309819
* Assert that the offset in MachineLocation::set() is always 0. (NFC)Adrian Prantl2017-08-021-0/+1
| | | | llvm-svn: 309818
* [InlineCost] Simplify more 'and' and 'or' operations.Chad Rosier2017-08-022-0/+124
| | | | | | Differential Revision: https://reviews.llvm.org/D35856 llvm-svn: 309817
* [SLPVectorizer] Generalize interface of functions, NFC.Alexey Bataev2017-08-022-13/+17
| | | | llvm-svn: 309816
* Define _GNU_SOURCE for RTEMS c++Walter Lee2017-08-022-0/+3
| | | | | | | | | | | | Summary: This is required by the libc++ locale support. Reviewers: jyknight Subscribers: fedor.sergeev Differential Revision: https://reviews.llvm.org/D36121 llvm-svn: 309815
* [SLPVectorizer] Test update, NFC.Alexey Bataev2017-08-021-30/+151
| | | | llvm-svn: 309814
* [rename] NFC, extract symbol canonicalization logic into functionAlex Lorenz2017-08-022-7/+25
| | | | | | This function will be used by the clang-refactor's rename actions llvm-svn: 309813
* [SLP] Fix for PR31880: shuffle and vectorize repeated scalar ops on ↵Alexey Bataev2017-08-022-65/+167
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | extracted elements 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
* [PM] Fix proxy invalidationPhilip Pfaffe2017-08-022-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
OpenPOWER on IntegriCloud