summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [clang-move] Use appendArgumentsAdjuster for adding extra argumentsAlexander Shaposhnikov2016-12-121-25/+17
| | | | | | | | | | | 1. Remove some boilerplate code for appending -fparse-all-comments to the list of arguments. 2. Run clang-format -i against ClangMoveMain.cpp. Test plan: make check-all Differential revision: https://reviews.llvm.org/D27669 llvm-svn: 289464
* [libcxx] [test] Change ifstream constructor tests to handle read-only files.Stephan T. Lavavej2016-12-124-24/+36
| | | | | | | | | | | | | Certain source control systems like to set the read-only bit on their files, which interferes with opening "test.dat" for both input and output. Fortunately, we can work around this without losing test coverage. Now, the ifstream.cons tests have comments referring to the ofstream.cons tests. There, we're creating writable files (not checked into source control), where the ifstream constructor tests will succeed. Fixes D26814. llvm-svn: 289463
* [libcxx] [test] Fix an improper assumption about Null Forward Iterators.Stephan T. Lavavej2016-12-121-4/+0
| | | | | | | | Value-initialized iterators still can't be compared to those with parents. Fixes D26626. llvm-svn: 289462
* Refactor BitcodeReader: move Metadata and ValueId handling in their own ↵Mehdi Amini2016-12-126-1395/+1694
| | | | | | | | | | | | | | | | | | class/file Summary: I'm planning on changing the way we load metadata to enable laziness. I'm getting lost in this gigantic files, and gigantic class that is the bitcode reader. This is a first toward splitting it in a few coarse components that are more easily understandable. Reviewers: pcc, tejohnson Subscribers: mgorny, llvm-commits, dexonsmith Differential Revision: https://reviews.llvm.org/D27646 llvm-svn: 289461
* [CrashReproducer] Collect PCH included via -include-pchBruno Cardoso Lopes2016-12-123-3/+78
| | | | | | | | | | | | Collect the necessary input PCH files. Do not try to validate the AST before copying it out because if the crash is in this path, we won't be able to collect it. Instead only check if it's a file containg an AST. rdar://problem/27913709 llvm-svn: 289460
* [Frontend] Use vfs for directory iteration while searching PCHs. NFCIBruno Cardoso Lopes2016-12-121-3/+4
| | | | | | | Use the vfs lookup instead of real filesytem and handle the case where -include-pch is a directory and this dir is searched for a PCH. llvm-svn: 289459
* Fix typo and remove unnecessary statement.Samuel Antao2016-12-121-2/+1
| | | | llvm-svn: 289458
* Remove IsMetadataMaterialized from BitcodeReader (NFC)Mehdi Amini2016-12-121-5/+1
| | | | | | | | | | | | Summary: It does not seem useful. Reviewers: pcc, dexonsmith Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D27668 llvm-svn: 289457
* [LiveRangeEdit] Add assert string and descriptive comment.Geoff Berry2016-12-121-1/+3
| | | | llvm-svn: 289456
* Bring back note about not supporting global register variables.Michael Kuperstein2016-12-121-0/+4
| | | | | | | | | | This was accidentally removed in r260506, even though we only support non-allocatable global register variables. The general (allocatable) case is explicitly not supported. Differential Revision: https://reviews.llvm.org/D27473 llvm-svn: 289455
* Fix compile with GCC 5 or laterDimitry Andric2016-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | Summary: Compiling with GCC 5 or later can fail with a bogus error "constructor required before non-static data member for llvm::ValueEnumerator::MDRange::First has been parsed". This was originally fixed upstream in GCC PR 70528, but later this fix was reverted, and released versions of GCC still show the bogus error. To work around this, replace MDRange's declaration of a default constructor with a definition. Reviewers: dexonsmith, rsmith, rivanvx Subscribers: llvm-commits, dim, dexonsmith Differential Revision: https://reviews.llvm.org/D18730 llvm-svn: 289454
* Revert "[SCEVExpand] do not hoist divisions by zero (PR30935)"Reid Kleckner2016-12-124-261/+35
| | | | | | | | | Reverts r289412. It caused an OOB PHI operand access in instcombine when ASan is enabled. Reduction in progress. Also reverts "[SCEVExpander] Add a test case related to r289412" llvm-svn: 289453
* Avoid use of std::to_string. NFC.Vedant Kumar2016-12-121-1/+1
| | | | | | | Apparently this routine isn't available on some Android platforms. See the mailing list thread re: D21695. llvm-svn: 289452
* COFF: Fix memory leaks reported by lsan.Peter Collingbourne2016-12-123-9/+10
| | | | llvm-svn: 289451
* Fix format and a few typos in comments.Samuel Antao2016-12-123-18/+16
| | | | llvm-svn: 289450
* symbolizer: Add lseek64 to global symbol list.Peter Collingbourne2016-12-121-0/+1
| | | | llvm-svn: 289449
* [mips] For PIC code convert unconditional jump to unconditional branchSimon Atanasyan2016-12-123-70/+218
| | | | | | | | | | | | Unconditional branch uses relative addressing which is the right choice in case of position independent code. This is a fix for the bug: https://dmz-portal.mips.com/bugz/show_bug.cgi?id=2445 Differential revision: https://reviews.llvm.org/D27483 llvm-svn: 289448
* AMDGPU: llvm.amdgcn.interp.mov is a source of divergenceNicolai Haehnle2016-12-121-0/+1
| | | | | | | | | | | | | | Summary: While the result is constant across a single primitive, each pixel shader wave can have pixels from multiple primitives. Reviewers: tstellarAMD, arsenm Subscribers: kzhuravl, wdng, yaxunl, llvm-commits, tony-tye Differential Revision: https://reviews.llvm.org/D27572 llvm-svn: 289447
* [Fix] Add missing include from r289444.Filipe Cabecinhas2016-12-121-0/+2
| | | | llvm-svn: 289446
* remove stale FIXME note from test; NFCSanjay Patel2016-12-121-1/+1
| | | | llvm-svn: 289445
* [clang] Version support for UBSan handlersFilipe Cabecinhas2016-12-127-36/+84
| | | | | | | | | | | | | | | | | | | | | | This adds a way for us to version any UBSan handler by itself. The patch overrides D21289 for a better implementation (we're able to rev up a single handler). After this, then we can land a slight modification of D19667+D19668. We probably don't want to keep all the versions in compiler-rt (maybe we want to deprecate on one release and remove the old handler on the next one?), but with this patch we will loudly fail to compile when mixing incompatible handler calls, instead of silently compiling and then providing bad error messages. Reviewers: kcc, samsonov, rsmith, vsk Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D21695 llvm-svn: 289444
* [X86] Regenerate vector bitcast/widening tests.Simon Pilgrim2016-12-121-118/+110
| | | | llvm-svn: 289443
* [InstCombine] fix bug when offsetting case values of a switch (PR31260)Sanjay Patel2016-12-122-29/+20
| | | | | | | | | | | | | We could truncate the condition and then try to fold the add into the original condition value causing wrong case constants to be used. Move the offset transform ahead of the truncate transform and return after each transform, so there's no chance of getting confused values. Fix for: https://llvm.org/bugs/show_bug.cgi?id=31260 llvm-svn: 289442
* [ThinLTO] Import only necessary DICompileUnit fieldsTeresa Johnson2016-12-126-6/+173
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: As discussed on mailing list, for ThinLTO importing we don't need to import all the fields of the DICompileUnit. Don't import enums, macros, retained types lists. Also only import local scoped imported entities. Since we don't currently import any global variables, we also don't need to import the list of global variables (added an assert to verify none are being imported). This is being done by pre-populating the value map entries to map the unneeded metadata to nullptr. For the imported entities, we can simply replace the source module's list with a new list containing only those needed imported entities. This is done in the IRLinker constructor so that value mapping automatically does the desired mapping. Reviewers: mehdi_amini, dexonsmith, dblaikie, aprantl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D27635 llvm-svn: 289441
* [Driver] Attempt to fix new linux-ld tests on WindowsMichal Gorny2016-12-121-3/+3
| | | | | | (broken by r289436) llvm-svn: 289440
* [InstCombine] clean up range-for-loops in visitSwitchInst(); NFCISanjay Patel2016-12-121-7/+7
| | | | llvm-svn: 289439
* [X86] Regenerate test.Simon Pilgrim2016-12-121-0/+2
| | | | llvm-svn: 289438
* [InstCombine] add test to show PR31260 miscompile; NFCSanjay Patel2016-12-121-0/+34
| | | | llvm-svn: 289437
* [Driver] Fix finding multilib gcc install on Gentoo (with gcc-config)Michal Gorny2016-12-128-45/+174
| | | | | | | | | | | | | | | | | | | | | | | | | Fix the gcc-config code to support multilib gcc installs properly. This solves two problems: -mx32 using the 64-bit gcc directory (due to matching installation triple), and -m32 not respecting gcc-config at all (due to mismatched installation triple). In order to fix the former issue, split the multilib scan out of Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple() (the code is otherwise unchanged), and call it for each installation found via gcc-config. In order to fix the latter issue, split the gcc-config processing out of Generic_GCC::GCCInstallationDetector::init() and repeat it for all triples, including extra and biarch triples. The only change in the gcc-config code itself is adding the call to multilib scan. Convert the gentoo_linux_gcc_multi_version_tree test input to multilib x86_64+32+x32 install, and add appropriate tests to linux-header-search and linux-ld. Differential Revision: https://reviews.llvm.org/D26887 llvm-svn: 289436
* [SCEVExpander] Add a test case related to r289412Sanjoy Das2016-12-121-5/+33
| | | | llvm-svn: 289435
* [ScheduleOptimizer] Fix memory leak. NFC.Michael Kruse2016-12-121-1/+3
| | | | llvm-svn: 289434
* Use function_ref to avoid allocation in std::function. NFC.Benjamin Kramer2016-12-122-2/+4
| | | | llvm-svn: 289433
* [ELF][MIPS] Fix .MIPS.options ri_gp_value on MIPS64Simon Atanasyan2016-12-123-7/+11
| | | | | | | | | | | The VA of _gp was being truncated to 32 bits when calling getVa(), but for 64bit MIPS we need to write a 64 bit value to .MIPS.options. Patch by Alexander Richardson. Differential revision: https://reviews.llvm.org/D27672 llvm-svn: 289432
* [StaticAnalysis] Remove unnecessary parameter in CallGraphNode::addCallee.Haojian Wu2016-12-122-3/+3
| | | | | | | | | | | | | | | Summary: Remove the CallGraph in addCallee as it is not used in addCallee. It decouples addCallee from CallGraph, so that we can use CallGraphNode within our customized CallGraph. Reviewers: bkramer Subscribers: cfe-commits, ioeric Differential Revision: https://reviews.llvm.org/D27674 llvm-svn: 289431
* Update inline argument comment. NFCI.Simon Pilgrim2016-12-121-3/+3
| | | | | | combineX86ShufflesRecursively 'HasPSHUFB' flag has been the more generic 'HasVariableMask' flag for some time. llvm-svn: 289430
* [X86][SSE] Add support for combining SSE VSHLI/VSRLI uniform constant shifts.Simon Pilgrim2016-12-126-46/+58
| | | | | | Fixes some missed constant folding opportunities and allows us to combine shuffles that end with a logical bit shift. llvm-svn: 289429
* clang-format: Separate out a language kind for ObjC.Daniel Jasper2016-12-1210-744/+858
| | | | | | | | | | | | | While C(++) and ObjC are generally formatted the same way and can be mixed, people might want to choose different styles based on the language. This patch recognizes .m and .mm files as ObjC and also implements a very crude detection of whether or not a .h file contains ObjC code. This can be improved over time. Also move most of the ObjC tests into their own test file to keep file size maintainable. llvm-svn: 289428
* Remove some annotations from TestMultipleTargetsPavel Labath2016-12-121-8/+2
| | | | | | | The test passes on linux. The i386 case is already handled by skipIfHostIncompatibleWithRemote. llvm-svn: 289427
* [X86][SSE] Lower suitably sign-extended mul vXi64 using PMULDQSimon Pilgrim2016-12-124-149/+59
| | | | | | | | PMULDQ returns the 64-bit result of the signed multiplication of the lower 32-bits of vXi64 vector inputs, we can lower with this if the sign bits stretch that far. Differential Revision: https://reviews.llvm.org/D27657 llvm-svn: 289426
* [SelectionDAG] Add support for EXTRACT_SUBVECTOR to ComputeNumSignBitsSimon Pilgrim2016-12-122-40/+18
| | | | | | Pre-commit as discussed on D27657 llvm-svn: 289425
* [X86] Teach selectScalarSSELoad to accept full 128-bit vector loads and the ↵Craig Topper2016-12-124-12/+34
| | | | | | | | X86ISD::VZEXT_LOAD opcode. Disable peephole on some of the tests that no longer require it to properly fold scalar intrinsics. llvm-svn: 289424
* [X86] Change CMPSS/CMPSD intrinsic instructions to use sse_load_f32/f64 as ↵Craig Topper2016-12-121-12/+12
| | | | | | | | | | its memory pattern instead of full vector load. These intrinsics only load a single element. We should use sse_loadf32/f64 to give more options of what loads it can match. Currently these instructions are often only getting their load folded thanks to the load folding in the peephole pass. I plan to add more types of loads to sse_load_f32/64 so we can match without the peephole. llvm-svn: 289423
* [Driver] Simplify ToolChain::GetCXXStdlibType (NFC)Jonas Hahnfeld2016-12-121-34/+13
| | | | | | | | | | I made the wrong assumption that execution would continue after an error Diag which led to unneeded complex code. This patch aligns with the better implementation of ToolChain::GetRuntimeLibType. Differential Revision: https://reviews.llvm.org/D25669 llvm-svn: 289422
* build: add support for standalone lld buildSaleem Abdulrasool2016-12-123-2/+61
| | | | | | | | | | Enable building lld as a standalone project. This is motivated by the desire to package lld for inclusion in a linux distribution. This allows building lld against an existing paired llvm installation. Now that lld is usable on x86_64, it makes sense to revive this configuration to allow distributions to package it. llvm-svn: 289421
* [XRay][CMake] Check target for XRay Flight Data RecorderPetr Hosek2016-12-121-0/+8
| | | | | | | | | This target doesn't currently do anything, but it is required by the runtimes build. Differential Revision: https://reviews.llvm.org/D27640 llvm-svn: 289420
* [X86] Remove some intrinsic instructions from hasPartialRegUpdateCraig Topper2016-12-126-22/+25
| | | | | | | | | | | | | | | | | Summary: These intrinsic instructions are all selected from intrinsics that have well defined behavior for where the upper bits come from. It's not the same place as the lower bits. As you can see we were suppressing load folding for these instructions in some cases. In none of the cases was the separate load helping avoid a partial dependency on the destination register. So we should just go ahead and allow the load to be folded. Only foldMemoryOperand was suppressing folding for these. They all have patterns for folding sse_load_f32/f64 that aren't gated with OptForSize, but sse_load_f32/f64 doesn't allow 128-bit vector loads. It only allows scalar_to_vector and vzmovl of scalar loads to match. There's no reason we can't allow a 128-bit vector load to be narrowed so I would like to fix sse_load_f32/f64 to allow that. And if I do that it changes some of these same test cases to fold the load too. Reviewers: spatel, zvi, RKSimon Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D27611 llvm-svn: 289419
* [libcxx][CMake] Move the warning to HandleOutOfTreeLLVMPetr Hosek2016-12-122-7/+4
| | | | | | | | This currently gives a warning when building libcxx under runtimes. Differential Revision: https://reviews.llvm.org/D27643 llvm-svn: 289418
* COFF: Remove an unused mutex declaration.Peter Collingbourne2016-12-121-2/+0
| | | | llvm-svn: 289415
* COFF: Use a DenseSet instead of a map to atomic_flag to track which archive ↵Peter Collingbourne2016-12-122-12/+3
| | | | | | | | members have been read. Differential Revision: https://reviews.llvm.org/D27667 llvm-svn: 289414
* Add two new AST nodes to represent initialization of an array in terms ofRichard Smith2016-12-1222-29/+545
| | | | | | | | | | | | | | | | | | | | initialization of each array element: * ArrayInitLoopExpr is a prvalue of array type with two subexpressions: a common expression (an OpaqueValueExpr) that represents the up-front computation of the source of the initialization, and a subexpression representing a per-element initializer * ArrayInitIndexExpr is a prvalue of type size_t representing the current position in the loop This will be used to replace the creation of explicit index variables in lambda capture of arrays and copy/move construction of classes with array elements, and also C++17 structured bindings of arrays by value (which inexplicably allow copying an array by value, unlike all of C++'s other array declarations). No uses of these nodes are introduced by this change, however. llvm-svn: 289413
OpenPOWER on IntegriCloud