summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [SCEV] Assume parameters coming from function calls contain IVsTobias Grosser2017-05-272-1/+84
| | | | | | | | | | | | | | | | | | | | The optimistic delinearization implemented in LLVM detects array sizes by looking for non-linear products between parameters and induction variables. In OpenCL code, such products often look like: A[get_global_id(0) * N + get_global_id(1)] Hence, the IV is hidden in the get_global_id() call and consequently delinearization would fail as no induction variable is available that helps us to identify N as array size parameter. We now use a very simple heuristic to change this. We assume that each parameter that comes directly from a function call is a hidden induction variable. As a result, we can delinearize the access above to: A[get_global_id(0)][get_global_id(1] llvm-svn: 304073
* [DAGCombiner] use narrow load to avoid vector extractSanjay Patel2017-05-2713-144/+142
| | | | | | | | | | | | | | | | | | If we have (extract_subvector(load wide vector)) with no other users, that can just be (load narrow vector). This is intentionally conservative. Follow-ups may loosen the one-use constraint to account for the extract cost or just remove the one-use check. The memop chain updating is based on code that already exists multiple times in x86 lowering, so that should be pulled into a helper function as a follow-up. Background: this is a potential improvement noticed via regressions caused by making x86's peekThroughBitcasts() not loop on consecutive bitcasts (see comments in D33137). Differential Revision: https://reviews.llvm.org/D33578 llvm-svn: 304072
* Update some tests to changes in isl's internal representationTobias Grosser2017-05-275-9/+11
| | | | | | This was forgotten as part of r304069. llvm-svn: 304070
* Update isl to isl-0.18-662-g17e172eTobias Grosser2017-05-2767-812/+2673
| | | | | | This is a general maintenance update llvm-svn: 304069
* Update information on isl C++ bindings in Polly release notesTobias Grosser2017-05-271-9/+8
| | | | llvm-svn: 304068
* ClangdTests.cpp: Fix a possible typo, it was "if (TmpDir2 != TmpDir2)"NAKAMURA Takumi2017-05-271-1/+1
| | | | | | It caused failures in unittests if TmpDir2 is not "/tmp" . llvm-svn: 304067
* [TableGen] Remove all the static vectors named TheActualPool.Craig Topper2017-05-271-12/+0
| | | | | | These used to hold std::unique_ptrs that managed the allocation for the various *Init object so that they would be deleted on exit. Everything is allocated in a BumpPtrAllocator name so there is no reason for these to still exist. llvm-svn: 304066
* [coroutines] Define getPassName() for coroutine passesGor Nishanov2017-05-274-0/+6
| | | | | | | | | | | | Reviewers: GorNishanov Reviewed By: GorNishanov Subscribers: EricWF, llvm-commits Differential Revision: https://reviews.llvm.org/D33622 llvm-svn: 304065
* [PartialInlining] Replace delete with unique_ptr in ↵Vitaly Buka2017-05-271-7/+3
| | | | | | | | | | | | | | computeCallsiteToProfCountMap Reviewers: davidxl Reviewed By: davidxl Subscribers: vsk, llvm-commits Differential Revision: https://reviews.llvm.org/D33220 llvm-svn: 304064
* ScalarEvolution unit test: fix typo that breaks check-allGor Nishanov2017-05-271-1/+1
| | | | llvm-svn: 304063
* [Polly] Added the list of Instructions to output in ScopInfo passTobias Grosser2017-05-274-7/+89
| | | | | | | | | | | | Summary: This patch outputs all the list of instructions in BlockStmts. Reviewers: Meinersbur, grosser, bollu Subscribers: bollu, llvm-commits, pollydev Differential Revision: https://reviews.llvm.org/D33163 llvm-svn: 304062
* Rearrange Dom unittest to accommodate multiple testsAdam Nemet2017-05-271-223/+213
| | | | | | | | | | | I've taken the approach from the LoopInfo test: * Rather than running in the pass manager just build the analyses manually * Split out the common parts (makeLLVMModule, runWithDomTree) into helpers Differential Revision: https://reviews.llvm.org/D33617 llvm-svn: 304061
* clang-format DomTree unittestAdam Nemet2017-05-271-242/+241
| | | | llvm-svn: 304060
* AArch64/PEI: Do not add reserved regs to liveinsMatthias Braun2017-05-273-5/+9
| | | | | | | We do not track liveness for reserved registers. It is unnecessary to add them to block livein lists. llvm-svn: 304059
* [SCEVExpander] Try harder to avoid introducing inttoptrKeno Fischer2017-05-273-9/+144
| | | | | | | | | | | | | | | | Summary: This fixes introduction of an incorrect inttoptr/ptrtoint pair in the included test case which makes use of non-integral pointers. I suspect there are more cases like this left, but this takes care of the one I was seeing at the moment. Reviewers: sanjoy Subscribers: mzolotukhin, llvm-commits Differential Revision: https://reviews.llvm.org/D33129 llvm-svn: 304058
* Revert "[coroutines] Support "coroutines" feature in module map requires clause"Eric Fiselier2017-05-276-30/+1
| | | | | | This reverts commit r304054. llvm-svn: 304057
* [OpenMP] Create COMDAT group for OpenMP offload registration code to avoid ↵George Rokos2017-05-2712-113/+155
| | | | | | | | | | multiple copies Thanks to Sergey Dmitriev for submitting the patch. Differential Revision: https://reviews.llvm.org/D33509 llvm-svn: 304056
* ScheduleDAGInstrs: Fix fixupKills()Matthias Braun2017-05-276-163/+56
| | | | | | | | | | | | Rewrite fixupKills() to use the LivePhysRegs class. Simplifies the code and fixes a bug where the CSR registers in return blocks where missed leading to invalid kill flags. Also remove the unnecessary rule that we wouldn't set kill flags on tied operands. No tests as I have an upcoming commit improving MachineVerifier checks to catch these cases in multiple existing lit tests. llvm-svn: 304055
* [coroutines] Support "coroutines" feature in module map requires clauseEric Fiselier2017-05-276-1/+30
| | | | | | | | | | | | | | Summary: In order for libc++ to add `<experimental/coroutine>` to its module map, there has to be a feature that can be used to detect if coroutines support is enabled in Clang. Reviewers: rsmith Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D33538 llvm-svn: 304054
* [Demangler] copy changes made in libcxxabi's r303718 to ItaniumDemangleErik Pilkington2017-05-271-21/+28
| | | | llvm-svn: 304053
* [AArch64][GlobalISel] Add the Localizer pass for the O0 pipelineQuentin Colombet2017-05-274-4/+109
| | | | | | | This should fix most of the issue we have right now with constants being spilled all over the place. llvm-svn: 304052
* [GlobalISel] Add a localizer pass for target to useQuentin Colombet2017-05-277-0/+523
| | | | | | | | | | | | | This reverts commit r299287 plus clean-ups. The localizer pass is a helper pass that could be run at O0 in the GISel pipeline to work around the deficiency of the fast register allocator. It basically shortens the live-ranges of the constants so that the allocator does not spill all over the place. Long term fix would be to make the greedy allocator fast. llvm-svn: 304051
* [GVN] Recommit the patch "Add phi-translate support in scalarpre".Wei Mi2017-05-275-26/+278
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The recommit is to fix a bug about ExtractValue and InsertValue ops. For those ops, some varargs inside GVN::Expression are not value numbers but raw index numbers. It is wrong to do phi-translate for raw index numbers, and the fix is to stop doing that. Right now scalarpre doesn't have phi-translate support, so it will miss some simple pre opportunities. Like the following testcase, current scalarpre cannot recognize the last "a * b" is fully redundent because a and b used by the last "a * b" expr are both defined by phis. long a[100], b[100], g1, g2, g3; __attribute__((pure)) long goo(); void foo(long a, long b, long c, long d) { g1 = a * b; if (__builtin_expect(g2 > 3, 0)) { a = c; b = d; g2 = a * b; } g3 = a * b; // fully redundant. } The patch adds phi-translate support in scalarpre. This is only a temporary solution before the newpre based on newgvn is available. Differential Revision: https://reviews.llvm.org/D32252 llvm-svn: 304050
* BranchRelaxation: computeLiveIns() after creating new blockMatthias Braun2017-05-271-0/+4
| | | | | | | | One case in BranchRelaxation did not compute liveins after creating a new block. This is catched by existing tests with an upcoming commit that will improve MachineVerifier checking of livein lists. llvm-svn: 304049
* AArch64: Fix cmpxchg O0 expansionMatthias Braun2017-05-263-64/+74
| | | | | | | | | | | | | | - Rewrite livein calculation to use the computeLiveIns() helper function. This is slightly less efficient but easier to reason about and doesn't unnecessarily add pristine and reserved registers[1] - Zero the status register at the beginning of the loop to make sure it has a defined value. - Remove kill flags of values that need to stay alive throughout the loop. [1] An upcoming commit of mine will tighten the MachineVerifier to catch these. llvm-svn: 304048
* [llvm-pdbdump] pdb2yaml: add an -all option to dump everything we canBob Haarman2017-05-263-0/+18
| | | | | | | | | | | | Reviewers: amccarth, rnk, zturner Reviewed By: zturner Subscribers: fhahn, llvm-commits Differential Revision: https://reviews.llvm.org/D33613 llvm-svn: 304047
* Bitcode: Remove some dead code. Spotted by Teresa.Peter Collingbourne2017-05-261-23/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D33609 llvm-svn: 304046
* [asan] Enable back halt_on_error-torture.cc disabled on PowerPC.Alex Shlyapnikov2017-05-261-4/+0
| | | | | | | | | | | | | | Summary: D33521 addressed a memory ordering issue in BlockingMutex, which seems to be the cause of a flakiness of a few ASan tests on PowerPC. Reviewers: eugenis Subscribers: kubamracek, nemanjai, llvm-commits Differential Revision: https://reviews.llvm.org/D33611 llvm-svn: 304045
* [InstSimplify] Push commuted op checks for and/or of icmp further down to ↵Craig Topper2017-05-261-33/+47
| | | | | | | | | | | | avoid duplicate work Previously, we called simplifyPossiblyCastedAndOrOfICmps twice with the operands commuted, but the call to simplifyAndOrOfICmpsWithConstants further down already handles commuting and doesn't need to be called both ways. This patch pushes double calls further down to just the individual routines that need to be called twice. Differential Revision: https://reviews.llvm.org/D33603 llvm-svn: 304044
* [bpf] disallow global_addr+off foldingAlexei Starovoitov2017-05-262-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | Wrong assembly code is generated for a simple program with clang. If clang only produces IR and llc is used for IR lowering and optimization, correct assembly code is generated. The main reason is that clang feeds default Reloc::Static to llvm and llc feeds no RelocMode to llvm, where for llc case, BPF backend picks up Reloc::PIC_ mode. This leads different IR lowering behavior and clang permits global_addr+off folding while llc doesn't. This patch introduces isOffsetFoldingLegal function into BPF backend and the function always return false. This will make clang and llc behave the same for the lowering. Bug https://bugs.llvm.org//show_bug.cgi?id=33183 has more detailed explanation. Signed-off-by: Yonghong Song <yhs@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> llvm-svn: 304043
* Fix test broken by r304020David Blaikie2017-05-261-1/+6
| | | | | | | | | | It's a workaround because the test was flakey passing to begin with, but it looks like (going off commit history) it really did want to test in the presence of debug info, so keep that behavior (by adding something to the CU so it's not dropped) & restore the flakey pass in the process. (added a FIXME in case someone else decides to look at it later) llvm-svn: 304042
* [Mips] Placate GCC's -Wmisleading-indentation. NFCI.Davide Italiano2017-05-261-17/+17
| | | | llvm-svn: 304041
* [lib/LTO] Don't reinvent the code for switching linkage.Davide Italiano2017-05-261-10/+4
| | | | | | Differential Revision: https://reviews.llvm.org/D33582 llvm-svn: 304040
* [compiler-rt] Don't reset non-default user handler if ↵Vitaly Buka2017-05-262-1/+124
| | | | | | | | | | | | allow_user_segv_handler is true. Reviewers: eugenis, kcc Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D32457 llvm-svn: 304039
* LivePhysRegs: Rework constructor + documentation; NFCMatthias Braun2017-05-2611-32/+31
| | | | | | | - Take reference instead of pointer to a TRI that cannot be nullptr. - Improve documentation comments. llvm-svn: 304038
* LivePhysRegs: Doxygen cleanup; NFCMatthias Braun2017-05-261-45/+45
| | | | | | | | - Remove unnecessary \brief - @p -> \p - Add \file and /// to introduction llvm-svn: 304037
* LivePhysRegs: Add default for removeRegsInMask(Clobbers); NFCMatthias Braun2017-05-262-2/+3
| | | | llvm-svn: 304036
* MachineVerifier: Remove unused set; NFCMatthias Braun2017-05-261-5/+0
| | | | llvm-svn: 304035
* [Hexagon] Cleanup of unused function isCalleeSaveReg (NFC)Sumanth Gundapaneni2017-05-262-6/+0
| | | | llvm-svn: 304034
* Resubmit r303861.Konstantin Zhuravlyov2017-05-262-0/+8
| | | | | | | | [AMDGPU] add __builtin_amdgcn_s_getpc Patch by Tim Corringham llvm-svn: 304033
* allow_user_segv_handler was already removedVitaly Buka2017-05-261-4/+0
| | | | | | New default behavior matches previous allow_user_segv_handler=1 llvm-svn: 304032
* Resubmit r303859 with test fixed.Konstantin Zhuravlyov2017-05-263-1/+28
| | | | | | | | | | [AMDGPU] add intrinsic for s_getpc Summary: The s_getpc instruction is exposed as intrinsic llvm.amdgcn.s.getpc. Patch by Tim Corringham llvm-svn: 304031
* Remove unused diagnostics. NFC.Benjamin Kramer2017-05-261-4/+0
| | | | llvm-svn: 304030
* Make helper functions static. NFC.Benjamin Kramer2017-05-268-12/+22
| | | | llvm-svn: 304029
* Make helper functions static. NFC.Benjamin Kramer2017-05-264-13/+13
| | | | llvm-svn: 304028
* Fix the ManagedStatic list ordering when using ↵Frederich Munch2017-05-261-3/+8
| | | | | | | | | | | | | | | | | | | | DynamicLibrary::addPermanentLibrary. Summary: r295737 included a fix for leaking libraries loaded via. DynamicLibrary::addPermanentLibrary. This created a problem where static constructors in a library could insert llvm::ManagedStatic objects before DynamicLibrary would register it's own ManagedStatic, meaning a crash could occur at shutdown. r301562 exasperated this problem by cleaning up the DynamicLibrary ManagedStatic during llvm_shutdown. Reviewers: v.g.vassilev, lhames, efriedma Reviewed By: efriedma Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D33581 llvm-svn: 304027
* [libcxxabi] iconv is not needed for mingw-w64Martell Malone2017-05-261-1/+1
| | | | llvm-svn: 304026
* [scan-build] Patch to scan-build tool to support "--target=<value>" flagPetr Hosek2017-05-261-1/+2
| | | | | | | | | | | | | | | | | The scan-build script provided by clang can be used to detect defects in code in the compile time. However, we discovered that the "--target=<value>" flag in clang is not properly handled by this script, which results in failures when analyzing projects that have used this flag in their makefile. This single line of change allows scan-build script to properly handle the "--target=<value>" flag. Patch by Haowei Wu Differential Revision: https://reviews.llvm.org/D33263 llvm-svn: 304025
* [lld][ELF]Add option to make .dynamic read onlyPetr Hosek2017-05-265-3/+53
| | | | | | | | | | | | | | The .dynamic section of an ELF almost doesn't need to be written to with the exception of the DT_DEBUG entry. For several reasons having a read only .dynamic section would be useful. This change adds the -z keyword "rodynamic" which forces .dynamic to be read-only. In this case DT_DEBUG will not be emited. Patch by Jake Ehrlich Differential Revision: https://reviews.llvm.org/D33251 llvm-svn: 304024
* [InstSimplify] Move a variable declaration to make simplifyAndOfICmps look ↵Craig Topper2017-05-261-1/+1
| | | | | | more like simplifyOrOfICmps. NFC llvm-svn: 304023
OpenPOWER on IntegriCloud