summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [ARM GlobalISel] Select G_PHIDiana Picus2018-01-042-16/+128
| | | | | | | | Select G_PHI to PHI and manually constrain the result register. This is very similar to how COPY is handled, so extract and reuse some of that code. llvm-svn: 321797
* [ARM GlobalISel] Add RegBankSelect tests for G_PHIDiana Picus2018-01-041-0/+85
| | | | | | | RegBankSelect already handles G_PHI with some generic code. Add a couple of tests for it. llvm-svn: 321796
* [ARM GlobalISel] Legalize scalar G_PHIDiana Picus2018-01-042-0/+177
| | | | | | | Mark G_PHI as Legal for s32 and p0, and also for s64 if we have hard float. Widen any smaller types. llvm-svn: 321795
* [libclang] Support querying whether a declaration is invalidIvan Donchevskii2018-01-046-18/+40
| | | | | | | | | | | | | | This is useful for e.g. highlighting purposes in an IDE. Note: First version of this patch was reverted due to failing tests in opencl-types.cl with -target ppc64le-unknown-linux. These tests are adapted now. Patch by Nikolai Kosjar. Differential Revision: https://reviews.llvm.org/D40072 llvm-svn: 321794
* [ARM GlobalISel] Fix selection of pointer constantsDiana Picus2018-01-042-11/+48
| | | | | | | | | | | | | | | | | | | | We used to handle G_CONSTANT with pointer type by forcing the type of the result register to s32 and then letting TableGen handle it. Unfortunately, setting the type only works for generic virtual registers, that haven't yet been constrained to a register class (e.g. those used only by a COPY later on). If the result register has already been constrained as a use of a previously selected instruction, then setting the type will assert. It would be nice to be able to teach TableGen to select pointer constants the same as integer constants, but since it's such an edge case (at the moment the only pointer constant that we're generally interested in is 0, and that is mostly used for comparisons and selects, which are also not supported by TableGen) it's probably not worth the effort right now. Instead, handle pointer constants with some trivial handwritten code. llvm-svn: 321793
* [ValueTracking] Adding missed lit-test for commit r316208Nikolai Bozhenov2018-01-041-0/+27
| | | | | | | | | | Reviewers: reames, hfinkel Differential Revision: https://reviews.llvm.org/D34101 Patch by: Olga Chupina <olga.chupina@intel.com> llvm-svn: 321792
* [X86] Codegen test for PR37563Sam Parker2018-01-041-0/+41
| | | | | | Adding test to ease review of D41628. llvm-svn: 321791
* [COFF] Add a testcase for dllexported symbols via embedded directivesMartin Storsjo2018-01-041-0/+60
| | | | | | | | This is in preparation for fixing PR35733. Differential Revision: https://reviews.llvm.org/D41630 llvm-svn: 321790
* [GVNHoist] Fix: PR35222 gvn-hoist incorrectly erases load in case of a loopAditya Kumar2018-01-042-1/+46
| | | | | | | | | | | Reviewers: dberlin sebpop eli.friedman Differential Revision: https://reviews.llvm.org/D41453 llvm-svn: 321789
* Revert "[Modules] Allow modules specified by -fmodule-map-file to shadow ↵Bruno Cardoso Lopes2018-01-0423-222/+52
| | | | | | | | | | | implicitly found ones" This reverts r321781 until I fix the leaks pointed out by bots: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/12146 http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap/builds/3741 llvm-svn: 321786
* Changes in the branch relaxation algorithm.Elena Demikhovsky2018-01-041-57/+107
| | | | | | | | | The existing version worked incorrectly when inversion of a branch condintion is impossible. Changed the "fixupConditionalBranch()" function - a new BB (a trampoline) is created to keep the original branch condition. Differential Revision: https://reviews.llvm.org/D41634 llvm-svn: 321785
* Remove the unit test from r321783.Bob Wilson2018-01-041-68/+0
| | | | | | | | | | | | | This test fails when run on the sanitizer bot, and I do not see a good way to fix it. The existing bogus target in MachineInstrTest.cpp is only good enough to create instructions but not sufficient to insert them into basic blocks. The addNodeToList ilist callback dereferences the pointer to the MachineRegisterInfo. Adding MachineRegisterInfo would also require TargetRegisterInfo, even a minimal implementation of that would be quite complicated. I would be glad to add this back if someone can suggest a better way to do it. llvm-svn: 321784
* support phi ranges for machine-level IRBob Wilson2018-01-044-22/+88
| | | | | | | | | | | | Add iterator ranges for machine instruction phis, similar to the IR-level phi ranges added in r303964. I updated a few places to use this. Besides general code simplification, this change will allow removing a non-upstream change from Swift's copy of LLVM (in a better way than my previous attempt in http://reviews.llvm.org/D19080). https://reviews.llvm.org/D41672 llvm-svn: 321783
* [tsan] Separate the constants in libignore and bump the maximum for ↵Kuba Mracek2018-01-042-5/+7
| | | | | | | | | | instrumented libraries We're having some use cases where we have more than 128 (the current maximum) instrumented dynamic libraries loaded into a single process. Let's bump the limit to 1024, and separate the constants. Differential Revision: https://reviews.llvm.org/D41190 llvm-svn: 321782
* [Modules] Allow modules specified by -fmodule-map-file to shadow implicitly ↵Bruno Cardoso Lopes2018-01-0423-52/+222
| | | | | | | | | | | | | | | | | | | | | | | | | | | | found ones When modules come from module map files explicitly specified by -fmodule-map-file= arguments, allow those to override/shadow modules with the same name that are found implicitly by header search. If such a module is looked up by name (e.g. @import), we will always find the one from -fmodule-map-file. If we try to use a shadowed module by including one of its headers report an error. This enables developers to force use of a specific copy of their module to be used if there are multiple copies that would otherwise be visible, for example if they develop modules that are installed in the default search paths. Patch originally by Ben Langmuir, http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20151116/143425.html Based on cfe-dev discussion: http://lists.llvm.org/pipermail/cfe-dev/2015-November/046164.html Differential Revision: https://reviews.llvm.org/D31269 rdar://problem/23612102 llvm-svn: 321781
* Inline a function that is only called once. NFC.Rafael Espindola2018-01-041-31/+26
| | | | llvm-svn: 321780
* PR35045: Convert injected-class-name to its corresponding simple-template-idRichard Smith2018-01-042-0/+15
| | | | | | | | | | during template argument deduction. We already did this when the injected-class-name was in P, but missed the case where it was in A. This (probably) can't happen except in implicit deduction guides. llvm-svn: 321779
* Replace cp -a in various Clang testsHubert Tong2018-01-045-5/+5
| | | | | | | | | | | | | | | | | | | Summary: cp -a is neither part of POSIX nor the LSB. The nearest equivalent under POSIX is cp -RPp; however, cp -R is sufficient for the intended purpose. test/Modules/crash-vfs-headermaps.m is not updated since it requires system-darwin anyway. Reviewers: bruno Reviewed By: bruno Subscribers: bruno, rcraik, cfe-commits Differential Revision: https://reviews.llvm.org/D41545 llvm-svn: 321778
* PR35028: Retain duplicate alignas attributes in template instantiation.Richard Smith2018-01-042-0/+12
| | | | llvm-svn: 321777
* Fix test to use -S instead of -c so it doesn't unnecessarily run the assembler.Douglas Yung2018-01-041-10/+10
| | | | | | Reviewed by Paul Robinson llvm-svn: 321776
* PR35815: Separate out the ns-consumed diagnostic into an error andAlex Lorenz2018-01-034-13/+36
| | | | | | | | | | | | | | | a warning This commit separates out the warn_nsconsumed_attribute_mismatch and warn_nsreturns_retained_attribute_mismatch diagnostic into a warning and error. This is needed to avoid a module import regression introduced by r313717 that turned these errors into warnings and started promoting them only when needed, which caused an error when importing a module as it had different warning settings. rdar://36265651 llvm-svn: 321775
* [msan] Intercept sendmmsg, recvmmsg.Evgeniy Stepanov2018-01-035-42/+167
| | | | | | | | | | | | Summary: Extend the sendmsg test to cover all recv*. Reviewers: vitalybuka Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D41620 llvm-svn: 321774
* Do not look up symbol names when n_strx == 0Michael Trent2018-01-033-0/+19
| | | | | | | | | | | | | | | | | | | | | | Summary: Historical tools for working with mach-o binaries verify the nlist field n_strx has a non-zero value before using that value to retrieve symbol names. Under some cirumstances, llvm-nm will attempt to display the symbol name at position 0, even though symbol names at that position are not well defined. This change addresses this problem by returning an empty string when n_strx is zero. rdar://problem/35750548 Reviewers: enderby, davide Reviewed By: enderby, davide Subscribers: davide, llvm-commits, JDevlieghere Differential Revision: https://reviews.llvm.org/D41657 llvm-svn: 321773
* Use references for a few arguments that are never null.Rafael Espindola2018-01-031-13/+13
| | | | llvm-svn: 321772
* [CGBuiltin] Handle unsigned mul overflow properly (PR35750)Vedant Kumar2018-01-032-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | r320902 fixed the IRGen for some types of checked multiplications. It did not handle unsigned overflow correctly in the case where the signed operand is negative (PR35750). Eli pointed out that on overflow, the result must be equal to the unique value that is equivalent to the mathematically-correct result modulo two raised to the k power, where k is the number of bits in the result type. This patch fixes the specialized IRGen from r320902 accordingly. Testing: Apart from check-clang, I modified the test harness from r320902 to validate the results of all multiplications -- not just the ones which don't overflow: https://gist.github.com/vedantk/3eb9c88f82e5c32f2e590555b4af5081 llvm.org/PR35750, rdar://34963321 Differential Revision: https://reviews.llvm.org/D41717 llvm-svn: 321771
* PR33503: When a qualified name in a redeclaration names a prior declaration inRichard Smith2018-01-032-10/+75
| | | | | | | | | | | an inline namespace, update its semantic DeclContext to match. We would previously get the semantic DeclContext wrong (pointing to the named scope rather than the inline namespace within it), resulting in wrong lookup results and linkage-related problems if the inline namespace was an anonymous namespace. llvm-svn: 321770
* Mention symbol name in error message.Rafael Espindola2018-01-0311-14/+13
| | | | llvm-svn: 321769
* Use getLocation to improve error message.Rafael Espindola2018-01-032-4/+9
| | | | llvm-svn: 321768
* [DAGCombine] Handle out of range EXTRACT_VECTOR_ELT indices Simon Pilgrim2018-01-033-1/+23
| | | | | | | | Handle this in DAGCombiner::visitEXTRACT_VECTOR_ELT the same as we already do in SelectionDAG::getNode and use APInt instead of getZExtValue. This should also fix oss-fuzz #4910 llvm-svn: 321767
* Add MSan interceptor for fstat(2)Kamil Rytarowski2018-01-032-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Add new MSan interceptor that corrects NetBSD's specific handling of fstat(2). NetBSD renames the call to __fstat50. Add new test: test/msan/fstat.cc Sponsored by <The NetBSD Foundation> Reviewers: joerg, eugenis, vitalybuka Reviewed By: vitalybuka Subscribers: llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D41637 llvm-svn: 321765
* [PRE] Add a bunch of test cases for LICM-like PRE patternsPhilip Reames2018-01-031-0/+168
| | | | | | These were inspired by a very old review I'm about to abandon (https://reviews.llvm.org/D7061). Several of the test cases from that worked without modification and expanding test coverage of such cases is always worthwhile. llvm-svn: 321764
* Introduce some infrastructure for adding C attributes with [[]] syntax.Aaron Ballman2018-01-033-5/+14
| | | | | | | | This patch adds support to the attribute tablegen for specifying a [[]] attribute is allowed in C mode. This patch also adds the annotate attribute to the list of double square bracket attributes we support in C mode. Eventually, I anticipate that this logic will be reversed (you have to opt out of allowing an attribute in C rather than opting in), but I want to see how the design plays out as more attributes are considered. llvm-svn: 321763
* [clang-tidy] Update fuchsia-overloaded-operator to check for valid locJulie Hockett2018-01-032-2/+9
| | | | | | | | | | | Updating fuchsia-overloaded-operator check to not issue warnings for invalid locations. Fixes PR35803. Differential Revision: https://reviews.llvm.org/D41708 llvm-svn: 321762
* [hwasan] Add heap tag randomization.Evgeniy Stepanov2018-01-033-8/+56
| | | | | | | | | | | | | | Summary: Generate tags for heap allocations from a pseudo-random sequence seeded with getrandom(), where available. Reviewers: kcc, alekseyshl Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D41616 llvm-svn: 321761
* [cmake] Fix typo in test/asan/CMakeLists.txtAzharuddin Mohammed2018-01-031-1/+1
| | | | | | | | | | | | | | | | | Summary: [cmake] Fix typo in test/asan/CMakeLists.txt Should be variable name instead of variable reference. Reviewers: samsonov, rnk, smeenai, beanz Reviewed By: smeenai Subscribers: kubamracek, llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D41214 llvm-svn: 321760
* [OpenMP] Initial implementation of code generation for pragma 'target teams ↵Carlo Bertolli2018-01-0315-18/+3047
| | | | | | | | | | distribute parallel for' on host https://reviews.llvm.org/D41709 This patch includes code generation and testing for offloading when target device is host. llvm-svn: 321759
* [CodeGen][NFC] Remove unused function declarationFrancis Visoiu Mistrih2018-01-031-3/+0
| | | | llvm-svn: 321758
* Calculate size of buffer instead of using a magic value.Paul Robinson2018-01-031-1/+1
| | | | | | | | Patch by Matthew Davis! Differential Revision: https://reviews.llvm.org/D41421 llvm-svn: 321757
* [ExpandMemcmp] rename variables and add hook to override pref for number of ↵Sanjay Patel2018-01-032-14/+29
| | | | | | | | | | | loads per block; NFC The preference only applies to 'memcmp() == 0' expansion, so try to make that clearer. x86 will likely benefit by increasing the default value from '1' to '2' as seen in PR33325: https://bugs.llvm.org/show_bug.cgi?id=33325 ...so that is the planned follow-up to this clean-up step. llvm-svn: 321756
* [X86] Remove 'else' after 'return' I forgot to cleanup before committing D41691.Craig Topper2018-01-031-4/+7
| | | | llvm-svn: 321755
* -gmodules: Emit debug info for implicit module imports via #include.Adrian Prantl2018-01-034-3/+24
| | | | | | | | | | | | When a type is only used as a template parameter and that type is the only type imported from another #include'd module, no skeleton CU for that module is generated, so a consumer doesn't know where to find the type definition. By emitting an import declaration, we can force a skeleton CU to be generated for each imported module. rdar://problem/36266156 llvm-svn: 321754
* Fix missing release metabug in merge-request.shMatt Arsenault2018-01-031-0/+3
| | | | llvm-svn: 321753
* AMDGPU: Remove dead fileMatt Arsenault2018-01-031-12/+0
| | | | llvm-svn: 321752
* StructurizeCFG: Fix broken backedge detectionMatt Arsenault2018-01-036-151/+475
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The work order was changed in r228186 from SCC order to RPO with an arbitrary sorting function. The sorting function attempted to move inner loop nodes earlier. This was was apparently relying on an assumption that every block in a given loop / the same loop depth would be seen before visiting another loop. In the broken testcase, a block outside of the loop was encountered before moving onto another block in the same loop. The testcase would then structurize such that one blocks unconditional successor could never be reached. Revert to plain RPO for the analysis phase. This fixes detecting edges as backedges that aren't really. The processing phase does use another visited set, and I'm unclear on whether the order there is as important. An arbitrary order doesn't work, and triggers some infinite loops. The reversed RPO list seems to work and is closer to the order that was used before, minus the arbitary custom sorting. A few of the changed tests now produce smaller code, and a few are slightly worse looking. llvm-svn: 321751
* Simplify code (NFC)Adrian Prantl2018-01-031-3/+2
| | | | llvm-svn: 321750
* [Docs] Re-generate command line documentation, primarily to get the icelake ↵Craig Topper2018-01-031-1/+21
| | | | | | feature command line options in, but there were a couple other changes too. llvm-svn: 321749
* [InstCombine] Check for out of range shift values using APInt before calling ↵Simon Pilgrim2018-01-032-4/+25
| | | | | | | | getZExtValue Reduced from oss-fuzz #4871 test case llvm-svn: 321748
* [X86] Remove useless custom inserter for 64-bit TAILJMP and TCRETURN opcodesCraig Topper2018-01-032-12/+1
| | | | | | | | | | This custom inserter was added in r124272 at which time it added about bunch of Defs for Win64. In r150708, those defs were removed leaving only the "return BB". So I think this means the custom inserter is a NOP these days. This patch removes the remaining code and stops tagging the instructions for custom insertion Differential Revision: https://reviews.llvm.org/D41671 llvm-svn: 321747
* [X86] Use ANY_EXTEND instead of SIGN_EXTEND in lowerMasksToRegCraig Topper2018-01-032-36/+11
| | | | | | | | Currently we use SIGN_EXTEND in lowerMasksToReg as part of calling convention setup, but we don't require a specific value for the upper bits. This patch changes it to ANY_EXTEND which will be lowered as SIGN_EXTEND if it ends up sticking around. llvm-svn: 321746
* Update PACKAGE_VERSION to 7.0.0svnHans Wennborg2018-01-031-1/+1
| | | | llvm-svn: 321743
OpenPOWER on IntegriCloud