summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [Support] Test directory iterators and recursive directory iterators with ↵Juergen Ributzka2017-03-131-0/+78
| | | | | | | | | | | broken symlinks. This commit adds a unit test to the file system tests to verify the behavior of the directory iterator and recursive directory iterator with broken symlinks. This test is Unix only. llvm-svn: 297669
* Revert "GlobalISel: move vector extract/insert inside generic opcode region."Tim Northover2017-03-132-14/+3
| | | | | | I was writing against an earlier branch and Volkan had already fixed this. llvm-svn: 297668
* [X86][MMX] Fix folding of shift value loads to cover whole 64-bitsSimon Pilgrim2017-03-134-54/+53
| | | | | | | | | | | | rL230225 made the assumption that only the lower 32-bits of an MMX register load is used as a shift value, when in fact the whole 64-bits are reloaded and treated as a i64 to determine the shift value. This patch reverts rL230225 to ensure that the whole 64-bits of memory are folded and ensures that the upper 32-bit are zero'd for cases where the shift value has come from a scalar source. Found during fuzz testing. Differential Revision: https://reviews.llvm.org/D30833 llvm-svn: 297667
* GlobalISel: move vector extract/insert inside generic opcode region.Tim Northover2017-03-132-3/+14
| | | | | | | Otherwise they won't be legalized or selected, causing instruction selection to fail horribly. llvm-svn: 297666
* [asan] Split SIGSEGV / SIGBUS handling so we can handle only one of them and ↵Filipe Cabecinhas2017-03-136-5/+53
| | | | | | | | | | | | | | not the other. Summary: This is useful in some platforms where one of these signals is special. Reviewers: kubamracek, kcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D30783 llvm-svn: 297665
* Revert r295004 (Add MXCSR) due to errors reported by MachineVerifierAndrew Kaylor2017-03-134-38/+25
| | | | | | I am leaving the code in clang which filters mxcsr from the clobber list because that is still technically correct and will be useful again when the MXCSR register is reintroduced. llvm-svn: 297664
* [GlobalISel] Update PRE_ISEL_GENERIC_OPCODE_END markerVolkan Keles2017-03-131-1/+1
| | | | llvm-svn: 297663
* AMDGPU: Re-use TM.getNullPointerValueMatt Arsenault2017-03-131-10/+8
| | | | llvm-svn: 297662
* Bring back r297624.Rafael Espindola2017-03-133-1/+25
| | | | | | The issues was just a missing REQUIRES in the test. llvm-svn: 297661
* [SimplifyCFG] move tests for PR31028 from CGPSanjay Patel2017-03-131-8/+5
| | | | | | Hopefully, this will make sense with a forthcoming patch. If not, we can move these back. llvm-svn: 297660
* AMDGPU: Make 0 the private nullptr valueMatt Arsenault2017-03-133-57/+145
| | | | | | | | | | | | We can't actually pretend that 0 is valid for address space 0. r295877 added a workaround to stop allocating user objects there, so we can use 0 as the invalid pointer. Some of the tests seemed to be using private as the non-0 null test address space, so add copies using local to make sure this is still stressed. llvm-svn: 297659
* AMDGPU: Treat 0 as private null pointer in addrspacecast loweringMatt Arsenault2017-03-134-17/+23
| | | | llvm-svn: 297658
* Revert "Fix crash when multiple raw_fd_ostreams to stdout are created."Rafael Espindola2017-03-133-23/+1
| | | | | | | This reverts commit r297624. It was failing on the bots. llvm-svn: 297657
* Fix some indenting and line-wrapping issues identified in ProgrammersManual. ↵Daniel Berlin2017-03-131-26/+28
| | | | | | Make description of debugCounters a little clearer llvm-svn: 297656
* Modules: Use hash of PCM content for SIGNATUREDuncan P. N. Exon Smith2017-03-1322-160/+436
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change ASTFileSignature from a random 32-bit number to the hash of the PCM content. - Move definition ASTFileSignature to Basic/Module.h so Module and ASTSourceDescriptor can use it. - Change the signature from uint64_t to std::array<uint32_t,5>. - Stop using (saving/reading) the size and modification time of PCM files when there is a valid SIGNATURE. - Add UNHASHED_CONTROL_BLOCK, and use it to store the SIGNATURE record and other records that shouldn't affect the hash. Because implicit modules reuses the same file for multiple levels of -Werror, this includes DIAGNOSTIC_OPTIONS and DIAG_PRAGMA_MAPPINGS. This helps to solve a PCH + implicit Modules dependency issue: PCH files are handled by the external build system, whereas implicit modules are handled by internal compiler build system. This prevents invalidating a PCH when the compiler overwrites a PCM file with the same content (modulo the diagnostic differences). Design and original patch by Manman Ren! llvm-svn: 297655
* Widen bitfield for type specifiers for OpenCL typesReid Kleckner2017-03-131-2/+3
| | | | | | Added a static_assert to catch this issue at compile time. llvm-svn: 297654
* [Outliner] Add tail call supportJessica Paquette2017-03-136-48/+159
| | | | | | | | | | | | | | This commit adds tail call support to the MachineOutliner pass. This allows the outliner to insert jumps rather than calls in areas where tail calling is possible. Outlined tail calls include the return or terminator of the basic block being outlined from. Tail call support allows the outliner to take returns and terminators into consideration while finding candidates to outline. It also allows the outliner to save more instructions. For example, in the X86-64 outliner, a tail called outlined function saves one instruction since no return has to be inserted. llvm-svn: 297653
* [X86] Lower AVX2 gather intrinsics similar to AVX-512. Apply the same input ↵Craig Topper2017-03-135-86/+86
| | | | | | | | source optimizations to break execution dependencies. For AVX-512 we force the input to zero if the input is undef or the mask is all ones to break an execution dependency. This patch brings the same behavior to AVX2. llvm-svn: 297652
* [AVX-512] If gather mask is all ones, force the input to a zero vector.Craig Topper2017-03-132-40/+44
| | | | | | | | We were already forcing undef inputs to become a zero vector, this now catches an all ones mask too. Ideally we'd use undef and let execution dep fix handle picking the best register/clearance for the undef, but I don't think it can handle the early clobber today. llvm-svn: 297651
* AMDGPU: Fold icmp/fcmp into icmp intrinsicMatt Arsenault2017-03-132-0/+398
| | | | | | | The typical use is a library vote function which compares to 0. Fold the user condition into the intrinsic. llvm-svn: 297650
* [Linker] Provide callback for internalizationJonas Devlieghere2017-03-139-34/+100
| | | | | | Differential Revision: https://reviews.llvm.org/D30738 llvm-svn: 297649
* [SelectionDAG] Enhance SDTCisSameNumEltsAs to work with scalar types and use ↵Craig Topper2017-03-133-45/+64
| | | | | | | | | | | | it on extend/trunc/round operations. Currently we don't enforce that ISD::ANY_EXTEND, ZERO_EXTEND, SIGN_EXTEND, TRUNC, FP_ROUND, FP_EXTEND have the same number of elements(including scalar) between their input and output. Though we have them documented as such. Up until a few months ago x86 created nodes that violated this rule. That's all been fixed now, and we should enforce the rule going forward. In order to do this we need to allow SDTCisSameNumEltsAs to support scalar types and not enforce being a vector. If one type is scalar we will force the other type to also be scalar. Differential Revision: https://reviews.llvm.org/D30878 llvm-svn: 297648
* Add missing include on <limits>.Zachary Turner2017-03-131-0/+1
| | | | llvm-svn: 297646
* [ELF] Fail the link early if an output path is invalidRui Ueyama2017-03-133-3/+47
| | | | | | | | | | | | | | | Patch from James Henderson. If a user has a long link, e.g. due to a large LTO link, they do not wish to run it and find that it failed because there was a mistake in their command-line, after they waited for some significant amount of time. This change adds some basic checking of the linker output file path, which is run shortly after parsing the command-line and linker script. An error is emitted if LLD cannot write to the specified path. Differential Revision: https://reviews.llvm.org/D30449 llvm-svn: 297645
* API gardening: Rename FindAllocaDbgValue to findDbgValue (NFC)Adrian Prantl2017-03-132-12/+8
| | | | | | | | and use have it use SmallVectorImpl. There is nothing specific about allocas in this function. llvm-svn: 297643
* [X86] Add checking of the scale argument to scatter/gather builtinsCraig Topper2017-03-134-0/+124
| | | | | | | | The only valid values for scale immediate of scatter/gather builtins are 1, 2, 4, or 8. This patch enforces this in the frontend otherwise we generate invalid instruction encodings in the backend. Differential Revision: https://reviews.llvm.org/D30875 llvm-svn: 297642
* Use numeric_limits<size_t>::max() instead of size_t(-1).Zachary Turner2017-03-131-2/+5
| | | | llvm-svn: 297641
* Fix up some enumerate() callsites in LLDB.Zachary Turner2017-03-135-15/+15
| | | | llvm-svn: 297640
* Fix a warning due to signed/unsigned comparison.Zachary Turner2017-03-131-1/+1
| | | | llvm-svn: 297639
* ELF: Resolve _end symbols correctly.Peter Collingbourne2017-03-132-4/+22
| | | | | | | | | Fix a bug introduced in r297313 which caused them to resolve to the end of the ELF header in PIEs and DSOs. Differential Revision: https://reviews.llvm.org/D30843 llvm-svn: 297638
* Fix another occurrence of needing to use member accessors.Zachary Turner2017-03-131-2/+2
| | | | llvm-svn: 297637
* Use the new member accessors of llvm::enumerate.Zachary Turner2017-03-131-3/+3
| | | | | | | The value_type is no longer a struct, it's a class whose members you have to access via a method. llvm-svn: 297635
* [ADT] Improve the genericity of llvm::enumerate().Zachary Turner2017-03-133-40/+98
| | | | | | | | | | | | | | There were some issues in the implementation of enumerate() preventing it from being used in various contexts. These were all related to the fact that it did not supporter llvm's iterator_facade_base class. So this patch adds support for that and additionally exposes a new helper method to_vector() that will evaluate an entire range and store the results in a vector. Differential Revision: https://reviews.llvm.org/D30853 llvm-svn: 297633
* Remove an unused variable.Zachary Turner2017-03-131-1/+0
| | | | llvm-svn: 297632
* [include-fixer] Add fuzzy SymbolIndex, where identifier needn't match exactly.Sam McCall2017-03-139-42/+339
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add fuzzy SymbolIndex, where identifier needn't match exactly. The purpose for this is global autocomplete in clangd. The query will be a partial identifier up to the cursor, and the results will be suggestions. It's in include-fixer because: - it handles SymbolInfos, actually SymbolIndex is exactly the right interface - it's a good harness for lit testing the fuzzy YAML index - (Laziness: we can't unit test clangd until reorganizing with a tool/ dir) Other questionable choices: - FuzzySymbolIndex, which just refines the contract of SymbolIndex. This is an interface to allow extension to large monorepos (*cough*) - an always-true safety check that Identifier == Name is removed from SymbolIndexManager, as it's not true for fuzzy matching - exposing -db=fuzzyYaml from include-fixer is not a very useful feature, and a non-orthogonal ui (fuzziness vs data source). -db=fixed is similar though. Reviewers: bkramer Subscribers: cfe-commits, mgorny Differential Revision: https://reviews.llvm.org/D30720 llvm-svn: 297630
* [CGP] add tests for PR31028; NFCSanjay Patel2017-03-131-0/+122
| | | | llvm-svn: 297629
* [CodeCompletion] Format block parameter placeholders in implicit propertyAlex Lorenz2017-03-132-2/+17
| | | | | | | | setters using the block type information that's obtained from the property rdar://12604235 llvm-svn: 297628
* [ASTImporter] Import fix of GCCAsmStmts w/ missing symbolic operandsGabor Horvath2017-03-133-2/+17
| | | | | | | | Patch by Zoltan Gera! Differential Revision: https://reviews.llvm.org/D30831 llvm-svn: 297627
* Delete dead code. NFCJonathan Roelofs2017-03-132-12/+0
| | | | | | | | Also has the side-effect of fixing the build on systems with glibc < 2.12 https://reviews.llvm.org/D30844 llvm-svn: 297626
* [llvm-pdbdump] Add support for dumping symbols from Yaml -> PDB.Zachary Turner2017-03-136-65/+98
| | | | | | | | Previously we could round-trip type records from PDB -> Yaml -> PDB, but for symbols we could only go from PDB -> Yaml. This completes the round-tripping for symbols as well. llvm-svn: 297625
* Fix crash when multiple raw_fd_ostreams to stdout are created.Rafael Espindola2017-03-133-1/+23
| | | | | | | | | | | | | | | | | | | | | If raw_fd_ostream is constructed with the path of "-", it claims ownership of the stdout file descriptor. This means that it closes stdout when it is destroyed. If there are multiple users of raw_fd_ostream wrapped around stdout, then a crash can occur because of operations on a closed stream. An example of this would be running something like "clang -S -o - -MD -MF - test.cpp". Alternatively, using outs() (which creates a local version of raw_fd_stream to stdout) anywhere combined with such a stream usage would cause the crash. The fix duplicates the stdout file descriptor when used within raw_fd_ostream, so that only that particular descriptor is closed when the stream is destroyed. Patch by James Henderson! llvm-svn: 297624
* [clang-format] Add more examples and fix a bug in the py generation scriptSylvestre Ledru2017-03-133-1/+558
| | | | | | | | | | | | Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D30860 llvm-svn: 297623
* [ELF] - Remove unnecessary template. NFC.George Rimar2017-03-135-14/+10
| | | | llvm-svn: 297622
* [ARM] GlobalISel: Support SP in regbankselectDiana Picus2017-03-132-0/+36
| | | | | | | We used to hit an unreachable in getRegBankFromRegClass when dealing with the stack pointer. This commit adds support for the GPRsp reg class. llvm-svn: 297621
* When diagnosing taking address of packed members skip __unaligned-qualified ↵Roger Ferrer Ibanez2017-03-132-0/+20
| | | | | | | | | | | | expressions Given that we have already explicitly stated in the qualifier that the expression is __unaligned, it makes little sense to diagnose that the address of the packed member may not be aligned. Differential Revision: https://reviews.llvm.org/D30884 llvm-svn: 297620
* [analyzer] Fix a rare crash for valist check.Gabor Horvath2017-03-133-7/+24
| | | | | | | | | It looks like on some host-triples the result of a valist related expr can be a LazyCompoundVal. Handle that case in the check. Patch by Abramo Bagnara! llvm-svn: 297619
* Reverting r297617 because it broke some bots:Aaron Ballman2017-03-135-304/+55
| | | | | | http://bb.pgr.jp/builders/cmake-llvm-x86_64-linux/builds/49970 llvm-svn: 297618
* Add support for getting file system permissions and implement ↵Aaron Ballman2017-03-135-55/+304
| | | | | | | | sys::fs::permissions to set them. Patch by James Henderson. llvm-svn: 297617
* Android.rules: Add libc++ supportPavel Labath2017-03-132-10/+26
| | | | | | | | | | | | | | | Summary: This adds support for building libc++ tests when targetting android. The tests are still not passing due to several other problems, but this way we can at least build them. Reviewers: eugene, EricWF, danalbert Subscribers: srhines, lldb-commits Differential Revision: https://reviews.llvm.org/D30737 llvm-svn: 297616
* Fix windows build broken by r297612Pavel Labath2017-03-131-1/+1
| | | | | | I have got my boolean logic incorrect. Sorry about the spam. llvm-svn: 297615
OpenPOWER on IntegriCloud