summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [TargetTransformInfo, API] Add a list of operands to TTI::getUserCostEvgeny Astigeevich2017-06-295-13/+32
| | | | | | | | | | | | | | | | | | | | The changes are a result of discussion of https://reviews.llvm.org/D33685. It solves the following problem: 1. We can inform getGEPCost about simplified indices to help it with calculating the cost. But getGEPCost does not take into account the context which GEPs are used in. 2. We have getUserCost which can take the context into account but we cannot inform about simplified indices. With the changes getUserCost will have access to additional information as getGEPCost has. The one parameter getUserCost is also provided. Differential Revision: https://reviews.llvm.org/D34057 llvm-svn: 306674
* [Clang][X86][Goldmont]Adding new target-cpu: Goldmont Michael Zuckerman2017-06-292-0/+94
| | | | | | | | | | | | | | | [Clang-side] Connecting the GoldMont processor to his feature. Reviewers: 1. igorb 2. delena 3. zvi Differential Revision: https://reviews.llvm.org/D34807 llvm-svn: 306673
* [clang-format] Fix parsing of msg{field}-style proto optionsKrasimir Georgiev2017-06-292-2/+17
| | | | | | | | | | | | | | | | | | | | | | | Summary: This patch makes the `{` in `msg_field{field: OK}` in a proto option scope be treated as an assignment operator. Previosly the added test case was formatted as: ``` option (MyProto.options) = { field_a: OK field_b{field_c: OK} field_d: OKOKOK field_e: OK } ``` Reviewers: djasper Reviewed By: djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D34749 llvm-svn: 306672
* Recommit "[Support] Add RetryAfterSignal helper function"Pavel Labath2017-06-296-25/+60
| | | | | | | | | | | | | | | | | | | | | | | | | The difference from the previous version is the use of decltype, as the implementation of std::result_of in libc++ did not work correctly for variadic function like open(2). Original summary: This function retries an operation if it was interrupted by a signal (failed with EINTR). It's inspired by the TEMP_FAILURE_RETRY macro in glibc, but I've turned that into a template function. I've also added a fail-value argument, to enable the function to be used with e.g. fopen(3), which is documented to fail for any reason that open(2) can fail (which includes EINTR). The main user of this function will be lldb, but there were also a couple of uses within llvm that I could simplify using this function. Reviewers: zturner, silvas, joerg Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D33895 llvm-svn: 306671
* Make scripts/analyze-project-deps.py executablePavel Labath2017-06-291-1/+3
| | | | llvm-svn: 306669
* [unittests] Add a helper function for getting an input filePavel Labath2017-06-2922-100/+89
| | | | | | | | | | | | | | | | | Summary: Fetching an input file required about five lines of code, and this was repeated in multiple unit tests, with slight variations. Add a helper function for doing that into the lldbUtilityMocks module (which I rename to lldbUtilityHelpers to commemorate the fact it includes more than mocks) Reviewers: zturner, eugene Subscribers: emaste, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D34683 llvm-svn: 306668
* [ScopInfo] Do not use ScopStmt in Domain derivation of ScopInfo. NFCMichael Kruse2017-06-295-118/+230
| | | | | | | | | | | | | | ScopStmts were being used in the computation of the Domain of the SCoPs in ScopInfo. Once statements are split, there will not be a 1-to-1 correspondence between Stmts and Basic blocks. Thus this patch avoids the use of getStmtFor() by creating a map of BB to InvalidDomain and using it to compute the domain of the statements. Contributed-by: Nanidini Singhal <cs15mtech01004@iith.ac.in> Differential Revision: https://reviews.llvm.org/D33942 llvm-svn: 306667
* [UnwindAssembly/x86] Add support for "lea imm(%ebp), %esp" patternPavel Labath2017-06-293-0/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The instruction pattern: and $-16, %esp sub $imm, %esp ... lea imm(%ebp), %esp appears when the compiler is realigning the stack (for example in main(), or almost everywhere with -mstackrealign switch). The "and" instruction is very difficult to model, but that's not necessary, as these frames are always %ebp-based (the compiler also needs a way to restore the original %esp). Therefore the plans we were generating for these function were almost correct already. The only place we were doing it wrong were the last instructions of the epilogue (usually just "ret"), where we had to revert to %esp-based unwinding, as the %ebp had been popped already. This was wrong because our "distance of esp from cfa" counter had picked up the "sub" instruction (and incremented the counter) but it had not seen that the register was reset by the "lea" instruction. This patch fixes that shortcoming, and adds a test for handling functions like this. I have not been able to tickle the compiler into producing a 64-bit function with this pattern, but I don't see a reason why it couldn't produce it, if it chose to, so I add a x86_64 test as well. Reviewers: jasonmolenda, tberghammer Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D34750 llvm-svn: 306666
* [GlobalISel][X86] Support vector type G_MERGE_VALUES selection.Igor Breger2017-06-293-0/+179
| | | | | | | | | | | | | | | | Summary: Support vector type G_MERGE_VALUES selection. For now G_MERGE_VALUES marked as legal for any type, so nothing to do in legalizer. Split from https://reviews.llvm.org/D33665 Reviewers: qcolombet, t.p.northover, zvi, guyblank Reviewed By: guyblank Subscribers: rovka, kristof.beyls, guyblank, llvm-commits Differential Revision: https://reviews.llvm.org/D33958 llvm-svn: 306665
* [X86][SSE] Dropped -mcpu from palignr testsSimon Pilgrim2017-06-291-112/+147
| | | | | | | | Use triple and attribute only for consistency Add AVX tests as well llvm-svn: 306664
* [X86][SSE] Regenerate shuffle test with update_llc_test_checks.pySimon Pilgrim2017-06-291-5/+6
| | | | llvm-svn: 306663
* [X86][SSE] Dropped -mcpu from vector shift testsSimon Pilgrim2017-06-291-4/+3
| | | | | | Use triple and attribute only for consistency llvm-svn: 306662
* [X86][SSE] Dropped -mcpu from zero insertion testsSimon Pilgrim2017-06-291-9/+6
| | | | | | Use triple and attribute only for consistency llvm-svn: 306661
* Revert r306653, "[OpenCL] Allow function declaration with empty argument list."NAKAMURA Takumi2017-06-293-11/+2
| | | | | | It broke bots. llvm-svn: 306660
* [Tooling] FixedCompilationDatabase should be able to strip positionalAlex Lorenz2017-06-292-3/+26
| | | | | | | | | | | | | arguments when `-fsyntax-only` is used Previously, Clang failed to create a fixed compilation database when the compilation arguments use -fsyntax-only instead of -c. This commit fixes the issue by forcing Clang to look at the compilation job when stripping the positional arguments. Differential Revision: https://reviews.llvm.org/D34687 llvm-svn: 306659
* [LLVM][X86][Goldmont] Adding new target-cpu: GoldmontMichael Zuckerman2017-06-297-2/+47
| | | | | | | | | | | | | | | | [LLVM SIDE] Connecting the GoldMont processor to his feature. Reviewers: 1. igorb 2. zvi 3. delena 4. RKSimon 5. craig.topper Differential Revision: https://reviews.llvm.org/D34504 llvm-svn: 306658
* Test commitNAKAMURA Takumi2017-06-292-2/+2
| | | | llvm-svn: 306657
* [clangd] Run a test, searching for gcc install, only on Unix.Ilya Biryukov2017-06-291-0/+3
| | | | | | This should fix windows buildbots. llvm-svn: 306656
* [SLPVectorizer] Introducing getTreeEntry() helper function [NFC]Dinar Temirbulatov2017-06-291-34/+33
| | | | | | Differential Revision: https://reviews.llvm.org/D34756 llvm-svn: 306655
* [ARM] Add tGPRwithpc register class and use it for TBB/THHFlorian Hahn2017-06-293-6/+10
| | | | | | | | | | | | | | | | | | | | | | Summary: TBB and THH allow using a Thumb GPR or the PC as destination operand. A few machine verifier failures where due to those instructions not expecting PC as destination operand. Add -verify-machineinstrs to test/CodeGen/ARM/jump-table-tbh.ll to add test coverage even if expensive checks are disabled. Reviewers: MatzeB, t.p.northover, jmolloy Reviewed By: MatzeB Subscribers: aemerson, javed.absar, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D34610 llvm-svn: 306654
* [OpenCL] Allow function declaration with empty argument list.Alexey Bader2017-06-293-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: does it make sense to enable K&R function declaration style for OpenCL? clang throws following error message for the declaration w/o arguments: ``` int my_func(); error: function with no prototype cannot use the spir_function calling convention ``` Current way to fix this issue is to specify that parameter list is empty by using 'void': ``` int my_func(void); ``` Let me know what do you think about this patch. Reviewers: Anastasia, yaxunl Reviewed By: Anastasia Subscribers: cfe-commits, echuraev Differential Revision: https://reviews.llvm.org/D33681 llvm-svn: 306653
* [clangd] Added a test, checking that gcc install is searched via VFS.Ilya Biryukov2017-06-291-1/+62
| | | | | | | | | | | | Reviewers: bkramer, krasimir, klimek Reviewed By: klimek Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D34755 llvm-svn: 306652
* [clang-tidy] Fix modernize-use-nullptr only warns the first NULL argument.Haojian Wu2017-06-292-1/+29
| | | | | | | | | | | | Reviewers: alexfh Reviewed By: alexfh Subscribers: xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D34526 llvm-svn: 306651
* [clang-tidy] follow-up on misc-definitions-in-header check.Haojian Wu2017-06-293-3/+7
| | | | | | | | | | | | | | | | | Summary: A follow-up on D34449: * add `-std=c++11` to `.hpp` file by default. * add constexpr function to test and doc. Reviewers: alexfh Reviewed By: alexfh Subscribers: JDevlieghere, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D34771 llvm-svn: 306650
* Initializing NVPTX backend within PollySingapuram Sanjay Srivallabh2017-06-291-0/+5
| | | | | | | | | | | | | | | | | Summary: The NVPTX backend is now initialised within Polly. A language front-end need not be modified to initialise the backend, just for Polly. Reviewers: Meinersbur, grosser Reviewed By: Meinersbur Subscribers: vchuravy, mgorny Tags: #polly Differential Revision: https://reviews.llvm.org/D31859 llvm-svn: 306649
* Factor out a functionality from isBeforeInTranslationUnitGabor Horvath2017-06-292-37/+59
| | | | | | | | | | The first user of this API will be the cross translation unit functionality of the Static Analyzer which will be committed in a follow-up patch. Differential Revision: https://reviews.llvm.org/D34506 llvm-svn: 306648
* [BinaryFormat] Identify AArch64 COFF filesMartin Storsjo2017-06-291-2/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D34742 llvm-svn: 306647
* [X86] Adding shuffle tests demonstrating missed vcompress opportunities. NFCZvi Rackover2017-06-292-0/+145
| | | | llvm-svn: 306646
* Revert "[LSan] Make LSan allocator allocator_may_return_null compliant"Michael Zolotukhin2017-06-293-127/+3
| | | | | | | | This reverts commit r306624. The committed test failed on various bots (e.g. on green dragon). llvm-svn: 306644
* [lit] Re-apply: Fix some convoluted logic around Unicode encoding, and ↵David L. Jones2017-06-292-51/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | de-duplicate across modules that used it. (Take 2: this patch re-applies r306625, which was reverted in r306629. This patch includes only trivial fixes.) In Python2 and Python3, the various (non-)?Unicode string types are sort of spaghetti. Python2 has unicode support tacked on via the 'unicode' type, which is distinct from 'str' (which are bytes). Python3 takes the "unicode-everywhere" approach, with 'str' representing a Unicode string. Both have a 'bytes' type. In Python3, it is the only way to represent raw bytes. However, in Python2, 'bytes' is an alias for 'str'. This leads to interesting problems when an interface requires a precise type, but has to run under both Python2 and Python3. The previous logic appeared to be correct in all cases, but went through more layers of indirection than necessary. This change does the necessary conversions in one shot, with documentation about which paths might be taken in Python2 or Python3. Changes from r306625: some tests just print binary outputs, so in those cases, fall back to str() in Python3. For googletests, add one missing call to to_string(). (Tested by verifying the visible breakage with Python3. Verified that everything works in py2 and py3.) llvm-svn: 306643
* Fix two places in RegisterContextLLDB::InitializeNonZerothFrame whereJason Molenda2017-06-291-13/+14
| | | | | | | | I'm not running the saved pc through FixCodeAddress as soon as I should. <rdar://problem/30686307> llvm-svn: 306634
* Change the ABI class to have a weak pointer to its Process;Jason Molenda2017-06-2933-78/+88
| | | | | | | | | | | | | | | | some methods in the ABI need a Process to do their work. Instead of passing it in as a one-off argument to those methods, this patch puts it in the base class and the methods can retrieve if it needed. Note that ABI's are sometimes built without a Process (e.g. SBTarget::GetStackRedZoneSize) so it's entirely possible that the process weak pointer will not be able to reconsistitue into a strong pointer. <rdar://problem/32526754> llvm-svn: 306633
* [libc++] Hoist explicit instantiation above implicit. NFCShoaib Meenai2017-06-291-4/+4
| | | | | | | | | | | | | | | | The string literal operators have implicit instantiations of basic_string<char> and basic_string<wchar>, which prevent the dllimport on the subsequent explicit instantiation declarations from having an effect. Hoisting the explicit instantiations above the implicit ones fixes the issue. I think it's pretty unfortunate that the ordering has such an effect, and I'd fixed the same issue for dllexport in r288682. dllimport is more complicated from a codegen perspective, however, and clang's behavior of ignoring the dllimport when there's a previous implicit instantiation is consistent with cl, so changing the order is our only recourse. llvm-svn: 306632
* llvm-profdata: Indirect infrequently used fields to reduce memory usageDavid Blaikie2017-06-292-30/+66
| | | | | | | | | | | | | | | | | | | | | | | | | Examining a large profile example, it seems relatively few records have non-empty IndirectCall and MemOP data, so indirecting these through a unique_ptr (non-null only when they are non-empty) Reduces memory usage on this particular example from 14GB to 10GB according to valgrind's massif. I suspect it'd still be worth moving InstrProfWriter to its own data structure that had Counts and the indirected IndirectCall+MemOP, and did not include the Name, Hash, or Error fields. This would reduce the size of this dominant data structure by half of this new, lower amount. (Name(2), Hash(1), Error(1) ~= Counts(vector, 3), ValueProfData (unique_ptr, 1)) -> From code review feedback, might actually refactor InstrProfRecord itself to have a sub-struct with all the counts, and use that from InstrProfWriter, rather than InstrProfWriter owning its own data structure for this. Reviewers: davidxl Differential Revision: https://reviews.llvm.org/D34694 llvm-svn: 306631
* Revert "[asan] Control location of symbolizer on device using ↵Vitaly Buka2017-06-291-3/+0
| | | | | | | | | | ANDROID_SYMBOLIZER_PATH" Not needed, I am going to put symbolizer into tests dir. This reverts commit r306627. llvm-svn: 306630
* Revert "[lit] Fix some convoluted logic around Unicode encoding, and ↵David L. Jones2017-06-292-62/+51
| | | | | | | | de-duplicate across modules that used it." This reverts r306625. llvm-svn: 306629
* Track the set of module maps read while building a .pcm file and reload ↵Richard Smith2017-06-2915-54/+127
| | | | | | those when preprocessing from that .pcm file. llvm-svn: 306628
* [asan] Control location of symbolizer on device using ANDROID_SYMBOLIZER_PATHVitaly Buka2017-06-291-0/+3
| | | | llvm-svn: 306627
* Fix spelling: uncode -> unicode.David L. Jones2017-06-291-1/+1
| | | | | | | Remember kids: there is no 'I' in str or bytes, but there is ALWAYS an 'I' in unicode. llvm-svn: 306626
* [lit] Fix some convoluted logic around Unicode encoding, and de-duplicate ↵David L. Jones2017-06-292-51/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | across modules that used it. Summary: In Python2 and Python3, the various (non-)?Unicode string types are sort of spaghetti. Python2 has unicode support tacked on via the 'unicode' type, which is distinct from 'str' (which are bytes). Python3 takes the "unicode-everywhere" approach, with 'str' representing a Unicode string. Both have a 'bytes' type. In Python3, it is the only way to represent raw bytes. However, in Python2, 'bytes' is an alias for 'str'. This leads to interesting problems when an interface requires a precise type, but has to run under both Python2 and Python3. The previous logic appeared to be correct in all cases, but went through more layers of indirection than necessary. This change does the necessary conversions in one shot, with documentation about which paths might be taken in Python2 or Python3. Reviewers: zturner, modocache Subscribers: llvm-commits, sanjoy Differential Revision: https://reviews.llvm.org/D34793 llvm-svn: 306625
* [LSan] Make LSan allocator allocator_may_return_null compliantAlex Shlyapnikov2017-06-293-3/+127
| | | | | | | | | | | | | | | Summary: LSan allocator used to always return nullptr on too big allocation requests (the definition of "too big" depends on platform and bitness), now it follows policy configured by allocator_may_return_null flag. Reviewers: eugenis Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34786 llvm-svn: 306624
* [lit] Remove dead code not referenced in the LLVM SVN repo.David L. Jones2017-06-293-120/+90
| | | | | | | | | | | | | | | | | | | | | | | Summary: This change removes the intermediate 'FileBasedTest' format from lit. This format is only ever used by the ShTest format, so the logic can be moved into ShTest directly. In order to better clarify what the TestFormat subclasses do, I fleshed out the TestFormat base class with Python's notion of abstract methods, using @abc.abstractmethod. This gives a convenient way to document the expected interface, without the risk of instantiating an abstract class (that's what ABCMeta does -- it raises an exception if you try to instantiate a class which has abstract methods, but not if you instantiate a subclass that implements them). Reviewers: zturner, modocache Subscribers: sanjoy, llvm-commits Differential Revision: https://reviews.llvm.org/D34792 llvm-svn: 306623
* CodeGen: handle missed case of COMDAT handlingSaleem Abdulrasool2017-06-292-6/+13
| | | | | | | | When Protocol references are constructed, we need to add the reference symbol to a COMDAT group on non-MachO object file formats (MachO handles this by having a coalesced attribute). This adds the missing case. llvm-svn: 306622
* [asan] Fix try to fix test on AndroidVitaly Buka2017-06-291-4/+4
| | | | | | %T is dir on host system, device does not have it llvm-svn: 306621
* [asan] Disable tests which do no work on AndroidVitaly Buka2017-06-293-0/+9
| | | | llvm-svn: 306620
* [asan] This test now passesVitaly Buka2017-06-291-3/+0
| | | | llvm-svn: 306619
* Revert "Replace trivial use of external rc.exe by writing our own .res file."Eric Beckmann2017-06-2915-159/+128
| | | | | | | | | | | | | | | This reverts commit d4c7e9fc63c10dbab0c30186ef8575474a704496. This is done in order to address the failure of CrWinClangLLD etc. bots. These throw an error of "side-by-side configuration is incorrect" during compilation, which sounds suspiciously related to these manifest changes. Revert "Switch external cvtres.exe for llvm's own resource library." This reverts commit 71fe8ef283a9dab9a3f21432c98466cbc23990d1. llvm-svn: 306618
* [InstCombine] In visitXor, use m_Not on the instruction itself instead of ↵Craig Topper2017-06-291-3/+2
| | | | | | looking for all ones in Op1. This is consistent with 3 other not checks before this one. NFCI llvm-svn: 306617
* [CodeView] Fix some Clang-tidy modernize-use-using and Include What You Use ↵Eugene Zelenko2017-06-2924-161/+312
| | | | | | warnings; other minor fixes (NFC). llvm-svn: 306616
* [InstCombine] Retain TBAA when narrowing memory accessesKeno Fischer2017-06-283-3/+74
| | | | | | | | | | | | Summary: As discussed on the mailing list it is legal to propagate TBAA to loads/stores from/to smaller regions of a larger load tagged with TBAA. Do so for (load->extractvalue)=>(gep->load) and similar foldings. Reviewed By: sanjoy Differential Revision: https://reviews.llvm.org/D31954 llvm-svn: 306615
OpenPOWER on IntegriCloud