summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [LV] Fix PR33613 - retain order of insertelement per partAyal Zaks2017-06-282-10/+62
| | | | | | | | | | | | r306381 caused PR33613, by reversing the order in which insertelements were generated per unroll part. This patch fixes PR33613 by retraining this order, placing each set of insertelements per part immediately after the last scalar being packed for this part. Includes a test case derived from PR33613. Reference: https://bugs.llvm.org/show_bug.cgi?id=33613 Differential Revision: https://reviews.llvm.org/D34760 llvm-svn: 306575
* [Dominators] Move IDoms out of DominatorTreeBase and put them in SNCAInfoJakub Kuderski2017-06-282-22/+21
| | | | | | | | | | | | | | Summary: The temporary IDoms map was used only during DomTree calculation. We can move it to SNCAInfo so that it's no longer a DominatorTreeBase member. Reviewers: sanjoy, dberlin, chandlerc Reviewed By: dberlin Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34317 llvm-svn: 306574
* Fix PR33625.Rafael Espindola2017-06-282-1/+13
| | | | | | We were failing to convert this expression to pcrel. llvm-svn: 306573
* [Dominators] Move InfoRec outside of DominatorTreeBaseJakub Kuderski2017-06-282-66/+68
| | | | | | | | | | | | | | | | | Summary: The InfoRec struct is used only during tree construction, so there is no point having it as a DominatorTreeBase member. This patch moves it into the Calculate function instead and makes it pass it to its helper functions. Reviewers: sanjoy, dberlin, chandlerc Reviewed By: dberlin Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34305 llvm-svn: 306572
* [BBVectorize] Regenerate simple testsSimon Pilgrim2017-06-284-578/+609
| | | | llvm-svn: 306571
* Don't repeat name in comment and format. NFC.Rafael Espindola2017-06-281-19/+15
| | | | llvm-svn: 306568
* Another test commit.Chih-Hung Hsieh2017-06-281-4/+4
| | | | llvm-svn: 306567
* [COFF] Allow debug info to relocate against discarded symbolsReid Kleckner2017-06-2811-103/+374
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In order to do this without switching on the symbol kind multiple times, I created Defined::getChunkAndOffset and use that instead of SymbolBody::getRVA in the inner relocation loop. Now we get the symbol's chunk before switching over relocation types, so we can test if it has been discarded outside the inner relocation type switch. This also simplifies application of section relative relocations. Previously we would switch on symbol kind to compute the RVA, then the relocation type, and then the symbol kind again to get the output section so we could subtract that from the symbol RVA. Now we *always* have an OutputSection, so applying SECREL and SECTION relocations isn't as much of a special case. I'm still not quite happy with the cleanliness of this code. I'm not sure what offsets and bases we should be using during the relocation processing loop: VA, RVA, or OutputSectionOffset. Reviewers: ruiu, pcc Reviewed By: ruiu Subscribers: majnemer, inglorion, llvm-commits, aprantl Differential Revision: https://reviews.llvm.org/D34650 llvm-svn: 306566
* Add basic 64-bit SPARC supportRui Ueyama2017-06-287-3/+375
| | | | | | | | | | | | | | | Add support for the most common SPARC relocations. Make DT_PLTGOT point to the PLT on SPARC. Mark the PLT as executable on SPARC. This adds a basic test that creates a SPARV9 executable that invokes the exit system call on OpenBSD. Patch by Mark Kettenis. Differential Revision: https://reviews.llvm.org/D34618 llvm-svn: 306565
* [LoopUnroll] Fix bug in computeUnrollCount causing it to not honor MaxCountGeoff Berry2017-06-282-0/+33
| | | | | | | | | | Reviewers: sanjoy, anna, reames, apilipenko, igor-laevsky, mkuper Subscribers: mcrosier, llvm-commits, mzolotukhin Differential Revision: https://reviews.llvm.org/D34532 llvm-svn: 306564
* [InstCombine] add tests for icmp with bswapped operands; NFCSanjay Patel2017-06-281-0/+30
| | | | llvm-svn: 306563
* [Dominators] Move number to node mapping out of DominatorTreeBaseJakub Kuderski2017-06-282-36/+38
| | | | | | | | | | | | | | Summary: Number to node mapping in DominatorTreeBase is used only during calculation, so there is no point keeping is as a member variable. This patch moves this mapping to Calculate function and passes it to helper functions. It also makes the name more descriptive. Reviewers: sanjoy, dberlin, davide, chandlerc Reviewed By: dberlin Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34295 llvm-svn: 306562
* [PGO] Reduce IO in profile dumping with mergingXinliang David Li2017-06-284-25/+39
| | | | | | Differential Revision: http://reviews.llvm.org/D34709 llvm-svn: 306561
* [InstCombine] use local variable to reduce code; NFCISanjay Patel2017-06-281-18/+14
| | | | llvm-svn: 306560
* [Bash-autocompletion] Invoke clang where user calledYuka Takahashi2017-06-281-1/+1
| | | | | | | | | Summary: When user build clang and used completion Eg. `build/bin/clang -fno[tab]`, we want to invoke `build/bin/clang --autocomplete=-fno`, rather than `clang --autocomplete=-fno`. Differential Revision: https://reviews.llvm.org/D34761 llvm-svn: 306559
* [clangd] Add "Go to Declaration" functionalityMarc-Andre Laperle2017-06-2812-4/+428
| | | | | | | | | | | | | | | | Summary: This change allows to navigate to most identifiers' declarations in code. This is a first step towards implementing "Go to Definition". It reuses clangIndex in order to detect which occurrences corresponds to the position requested. The occurrences' Decls are then used to generate locations suitable for navigating to the declarations. Reviewers: krasimir, bkramer, ilya-biryukov Reviewed By: ilya-biryukov Subscribers: cfe-commits, mgorny Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D34269 llvm-svn: 306558
* Rangify loops, formatting changes, use bool instead of unsigned, NFCKrzysztof Parzyszek2017-06-281-18/+16
| | | | llvm-svn: 306557
* Don't repeat names and reformat. NFC.Rafael Espindola2017-06-281-46/+37
| | | | llvm-svn: 306556
* [Bash-autocompletion] Check clang version in BashYuka Takahashi2017-06-281-2/+9
| | | | | | | | | | | | | | Summary: Add check if user's clang version supports --autocomplete or not. If not, we just autocomplete files. Reviewers: ruiu, v.g.vassilev, teemperor Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D34607 llvm-svn: 306555
* [LoopUnroll] Pass SCEV to getUnrollingPreferences hook. NFCI.Geoff Berry2017-06-2817-37/+48
| | | | | | | | | | Reviewers: sanjoy, anna, reames, apilipenko, igor-laevsky, mkuper Subscribers: jholewinski, arsenm, mzolotukhin, nemanjai, nhaehnle, javed.absar, mcrosier, llvm-commits Differential Revision: https://reviews.llvm.org/D34531 llvm-svn: 306554
* Missed a check for UndefVI in r306466Krzysztof Parzyszek2017-06-282-1/+50
| | | | llvm-svn: 306553
* [globalisel][tablegen] Post-commit review nits for r306388. NFCDaniel Sanders2017-06-281-37/+31
| | | | | | One early exit and a missing assert string. llvm-svn: 306552
* Revert r306504: Re-enable wait.cc, wait4.cc, waitid.cc tests on Darwin.Kuba Mracek2017-06-283-0/+5
| | | | llvm-svn: 306551
* [AArch64] AArch64CondBrTuningPass generates wrong branch instructionsAlexandros Lamprineas2017-06-282-7/+7
| | | | | | | | | | | Some conditional branch instructions generated by this pass are checking the wrong condition code. The instructions TBZ and TBNZ are transformed into B.GE and B.LT instead of B.PL and B.MI respectively. They should only be checking the Negative bit. Differential Revision: https://reviews.llvm.org/D34743 llvm-svn: 306550
* Use vfs::FileSystem in ASTUnit when creating CompilerInvocation.Ilya Biryukov2017-06-283-8/+9
| | | | | | | | | | | | | | Summary: It used to always call into the RealFileSystem before. Reviewers: bkramer, krasimir, klimek, bruno Reviewed By: klimek Subscribers: bruno, cfe-commits Differential Revision: https://reviews.llvm.org/D34469 llvm-svn: 306549
* Don't repeat name in comments. 80 columns. NFC.Rafael Espindola2017-06-281-22/+16
| | | | llvm-svn: 306548
* [ARM] Improve if-conversion for M-class CPUs without branch predictorsJohn Brawn2017-06-286-14/+239
| | | | | | | | | | | | | The current heuristic in isProfitableToIfCvt assumes we have a branch predictor, and so gives the wrong answer in some cases when we don't. This patch adds a subtarget feature to indicate that a subtarget has no branch predictor, and changes the heuristic in isProfitableToiIfCvt when it's present. This gives a slight overall improvement in a set of embedded benchmarks on Cortex-M4 and Cortex-M33. Differential Revision: https://reviews.llvm.org/D34398 llvm-svn: 306547
* [X86] Added BSWAP tests for illegal i64/i128/i256 'wide' scalar integersSimon Pilgrim2017-06-281-0/+173
| | | | llvm-svn: 306546
* [X86][SSE] Dropped -mcpu from vector bswap testsSimon Pilgrim2017-06-281-7/+4
| | | | | | Use triple and attribute only for consistency llvm-svn: 306545
* [globalisel][tablegen] Multiple 80-col corrections.Daniel Sanders2017-06-281-20/+41
| | | | llvm-svn: 306544
* [X86][LLVM][test]Expanding Supports lowerInterleavedStore() in ↵Michael Zuckerman2017-06-281-0/+58
| | | | | | | | | X86InterleavedAccess test. Exapnding the test to include AVX target. Adding base tast (to trunk) for Store strid=4 vf=32. llvm-svn: 306543
* Create inliner params based on size and opt levels.Easwaran Raman2017-06-281-3/+11
| | | | | | Differential revision: https://reviews.llvm.org/D34309 llvm-svn: 306542
* Add zero-length check to memcpy/memset load store loop expansionTeresa Johnson2017-06-282-5/+16
| | | | | | | | | | | | | | | | Summary: I was testing using this expansion logic in other cases besides NVPTX, and found some runtime failures due to the lack of a check for a zero length memcpy/memset before the loop. There is already such a check in the memmove expansion code though. Reviewers: hfinkel Subscribers: jholewinski, wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D34707 llvm-svn: 306541
* Heap allocation for new arrays.Michael Kruse2017-06-289-34/+346
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch aims to implement the option of allocating new arrays created by polly on heap instead of stack. To enable this option, a key named 'allocation' must be written in the imported json file with the value 'heap'. We need such a feature because in a next iteration, we will implement a mechanism of maximal static expansion which will need a way to allocate arrays on heap. Indeed, the expansion is very costly in terms of memory and doing the allocation on stack is not worth considering. The malloc and the free are added respectively at polly.start and polly.exiting such that there is no use-after-free (for instance in case of Scop in a loop) and such that all memory cells allocated with a malloc are free'd when we don't need them anymore. We also add : - In the class ScopArrayInfo, we add a boolean as member called IsOnHeap which represents the fact that the array in allocated on heap or not. - A new branch in the method allocateNewArrays in the ISLNodeBuilder for the case of heap allocation. allocateNewArrays now takes a BBPair containing polly.start and polly.exiting. allocateNewArrays takes this two blocks and add the malloc and free calls respectively to polly.start and polly.exiting. - As IntPtrTy for the malloc call, we use the DataLayout one. To do that, we have modified : - createScopArrayInfo and getOrCreateScopArrayInfo such that it returns a non-const SAI, in order to be able to call setIsOnHeap in the JSONImporter. - executeScopConditionnaly such that it return both start block and end block of the scop, because we need this two blocs to be able to add the malloc and the free calls at the right position. Differential Revision: https://reviews.llvm.org/D33688 llvm-svn: 306540
* Test commitTobias Grosser2017-06-281-1/+0
| | | | llvm-svn: 306539
* [clang-tidy] Enable inline variable definitions in headersGabor Horvath2017-06-284-1/+24
| | | | | | Differential Revision: https://reviews.llvm.org/D34449 llvm-svn: 306538
* [GlobalISel][X86] Test G_CONSTANT i32 0 TableGen'erated selection.NFC.Igor Breger2017-06-281-0/+21
| | | | llvm-svn: 306537
* Revert r306528Nikolai Bozhenov2017-06-282-1/+10
| | | | llvm-svn: 306536
* [GlobalISel][X86] Support bitwise operations : G_AND, G_OR, G_XORIgor Breger2017-06-2811-2/+1100
| | | | | | | | | | | | | | Summary: Support G_AND, G_OR, G_XOR for i8/i16/i32/i64. Selection done via TableGen'erated code. Reviewers: zvi, guyblank, aymanmus, m_zuckerman Reviewed By: aymanmus Subscribers: rovka, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D34605 llvm-svn: 306533
* Reverting commit 306414 on behalf of @gadi.haberMichael Zuckerman2017-06-2832-9532/+5254
| | | | llvm-svn: 306532
* [X86][AVX2] Dropped -mcpu from avx2 arithmetic/intrinsics testsSimon Pilgrim2017-06-2810-384/+364
| | | | | | Use triple and attribute only for consistency llvm-svn: 306531
* [clangd] Allow to override resource dir in ClangdServer.Ilya Biryukov2017-06-285-20/+34
| | | | | | | | | | | | | | Reviewers: bkramer, krasimir, klimek Reviewed By: klimek Subscribers: klimek, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D34470 llvm-svn: 306530
* [X86] Correct dwarf unwind information in function epiloguePetar Jovanovic2017-06-2874-266/+1846
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CFI instructions that set appropriate cfa offset and cfa register are now inserted in emitEpilogue() in X86FrameLowering. Majority of the changes in this patch: 1. Ensure that CFI instructions do not affect code generation. 2. Enable maintaining correct information about cfa offset and cfa register in a function when basic blocks are reordered, merged, split, duplicated. These changes are target independent and described below. Changed CFI instructions so that they: 1. are duplicable 2. are not counted as instructions when tail duplicating or tail merging 3. can be compared as equal Add information to each MachineBasicBlock about cfa offset and cfa register that are valid at its entry and exit (incoming and outgoing CFI info). Add support for updating this information when basic blocks are merged, split, duplicated, created. Add a verification pass (CFIInfoVerifier) that checks that outgoing cfa offset and register of predecessor blocks match incoming values of their successors. Incoming and outgoing CFI information is used by a late pass (CFIInstrInserter) that corrects CFA calculation rule for a basic block if needed. That means that additional CFI instructions get inserted at basic block beginning to correct the rule for calculating CFA. Having CFI instructions in function epilogue can cause incorrect CFA calculation rule for some basic blocks. This can happen if, due to basic block reordering, or the existence of multiple epilogue blocks, some of the blocks have wrong cfa offset and register values set by the epilogue block above them. Patch by Violeta Vukobrat. Differential Revision: https://reviews.llvm.org/D18046 llvm-svn: 306529
* [ValueTracking] Enabling existing ValueTracking patch by default.Nikolai Bozhenov2017-06-282-10/+1
| | | | | | | | | | | | | | | The original patch was an improvement to IR ValueTracking on non-negative integers. It has been checked in to trunk (D18777, r284022). But was disabled by default due to performance regressions. Perf impact has improved. The patch would be enabled by default. Reviewers: reames Differential Revision: https://reviews.llvm.org/D34101 Patch by: Olga Chupina <olga.chupina@intel.com> llvm-svn: 306528
* [ELF] - Do not crash when LLD synthesizes output sections with BYTE commands ↵George Rimar2017-06-282-4/+11
| | | | | | | | | | | | | | | | | and -r This is PR33596. Previously LLD would crash because BYTE command synthesized output section, but it was not assigned to Sec member of OutputSectionCommand. Behaviour of -script and -r combination is not well defined, but it seems after this change LLD naturally inherits behavior of GNU linkers - creates output section requested in script and does not crash anymore. Differential revision: https://reviews.llvm.org/D34676 llvm-svn: 306527
* [ELF] - Do not set st_size field of SHT_UNDEF symbols.George Rimar2017-06-283-1/+44
| | | | | | | | | | | | | | | | | This fixes PR33598. Size field for undefined symbols is not significant. Setting it to fixed value, like zero, may be useful though. For example when we have 2 DSO's, like in this PR, if lower level DSO may change slightly (in part of some symbol's st_size) and higher-level DSO is rebuilt, then tools that monitoring checksum of high level DSO file can notice it and trigger cascade of some other unnecessary actions. If we set st_size to zero, that can be avoided. Differential revision: https://reviews.llvm.org/D34673 llvm-svn: 306526
* [InstCombine] Canonicalize clamp of float types to minmax in fast mode.Nikolai Bozhenov2017-06-284-31/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This commit allows matchSelectPattern to recognize clamp of float arguments in the presence of FMF the same way as already done for integers. This case is a little different though. With integers, given the min/max pattern is recognized, DAGBuilder starts selecting MIN/MAX "automatically". That is not the case for float, because for them only full FMINNAN/FMINNUM/FMAXNAN/FMAXNUM ISD nodes exist and they do care about NaNs. On the other hand, some backends (e.g. X86) have only FMIN/FMAX nodes that do not care about NaNS and the former NAN/NUM nodes are illegal thus selection is not happening. So I decided to do such kind of transformation in IR (InstCombiner) instead of complicating the logic in the backend. Reviewers: spatel, jmolloy, majnemer, efriedma, craig.topper Reviewed By: efriedma Subscribers: hiraditya, javed.absar, n.bozhenov, llvm-commits Patch by Andrei Elovikov <andrei.elovikov@intel.com> Differential Revision: https://reviews.llvm.org/D33186 llvm-svn: 306525
* Add tests to document current InstCombine behavior for clamp pattern.Nikolai Bozhenov2017-06-281-0/+500
| | | | | | | | | | | | | | | | | | | Summary: This commit adds the tests for clamp pattern as a prerequisite of D33186 to make the impact of that fix more clear and also to document current behavior. Reviewers: spatel, jmolloy Reviewed By: spatel Subscribers: n.bozhenov, llvm-commits Patch by Andrei Elovikov <andrei.elovikov@intel.com> Differential Revision: https://reviews.llvm.org/D34350 llvm-svn: 306524
* [ELF] Consolidate .ARM.extab.* sections into .ARM.extabPeter Smith2017-06-284-6/+5
| | | | | | | | | | | | | | | | | | | When -ffunction-sections and ARM C++ exceptions are used each .text.suffix section will have at least one .ARM.exidx.suffix section and may have an additional .ARM.extab.suffix section if the unwinding instructions are too large to inline into the .ARM.exidx table entry. For a large program without a linker script this can lead to a large number of section header table entries that can increase the size of the ELF file. This change introduces a default rule for .ARM.extab.* to be placed in a single output section called .ARM.extab . This follows the behavior of ld.gold and ld.bfd. fixes pr33407 Differential Revision: https://reviews.llvm.org/D34678 llvm-svn: 306522
* [DWARFCallFrameInfo] Add Type enum to differentiate eh/debug_frame sectionsPavel Labath2017-06-285-39/+39
| | | | | | | | | | | | | | | | | Summary: instead of using a boolean to differentiate between the two section types, use an enum to make the intent clearer. I also remove the RegisterKind argument from the constructor, as this can be deduced from the Type argument. Reviewers: clayborg, jasonmolenda Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D34681 llvm-svn: 306521
OpenPOWER on IntegriCloud