summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Remove all _LIBCPP_VERSION tests from under test/stdEric Fiselier2016-10-0813-24/+127
| | | | llvm-svn: 283644
* Purge all usages of _LIBCPP_STD_VER under test/std/algorithmEric Fiselier2016-10-0817-121/+132
| | | | llvm-svn: 283643
* [AVR] Add backend dependencies to MCTargetDesc/LLVMBuild.txtDylan McKay2016-10-081-1/+1
| | | | llvm-svn: 283642
* [pdb] Dump Module Symbols to Yaml.Zachary Turner2016-10-0815-36/+705
| | | | | | | | | | | | | | This is the first step towards round-tripping symbol information, and thusly being able to write symbol information to a PDB. This patch writes the symbol information for each compiland to the Yaml when running in pdb2yaml mode. There's still some loose ends, such as what to do about relocations (necessary in order to print linkage names), how to print enums with friendly names, and how to give the dumper access to the StringTable, but this is a good first start. llvm-svn: 283641
* Fix incorrect assertion in AVRFrameLowering.cppDylan McKay2016-10-081-1/+2
| | | | | | This wasn't looking at the right instruction, and would always fail. llvm-svn: 283640
* [AVR] Don't worry about call frame size when initializing frame pointerDylan McKay2016-10-081-3/+2
| | | | | | | | | | | | | We previously only used the frame pointer if the frame pointer was too big. This was to work around a bug (described in this old commit) https://sourceforge.net/p/avr-llvm/code/204/tree//llvm/trunk/AVR/AVRFrameLowering.cpp?diff=50d64d912718465cb887d17a:203 I mistakenly invered the condition assuming it was a typo. I am now removing it because it doesn't seem to be a problem anymore (plus it's a dirty hack). llvm-svn: 283639
* [AVR] Don't shadow container while iterating in range-based loopDylan McKay2016-10-081-2/+4
| | | | | | This works on clang, but fails on GCC 4.6 llvm-svn: 283638
* [CUDA] Do a better job at detecting wrong-side calls.Justin Lebar2016-10-086-79/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Move CheckCUDACall from ActOnCallExpr and BuildDeclRefExpr to DiagnoseUseOfDecl. This lets us catch some edge cases we were missing, specifically around class operators. This necessitates a few other changes: - Avoid emitting duplicate deferred diags in CheckCUDACall. Previously we'd carefully placed our call to CheckCUDACall such that it would only ever run once for a particular callsite. But now this isn't the case. - Emit deferred diagnostics from a template specialization/instantiation's primary template, in addition to from the specialization/instantiation itself. DiagnoseUseOfDecl ends up putting the deferred diagnostics on the template, rather than the specialization, so we need to check both. Reviewers: rsmith Subscribers: cfe-commits, tra Differential Revision: https://reviews.llvm.org/D24573 llvm-svn: 283637
* [AVR] Use references rather than pointers in AVRISelLoweringDylan McKay2016-10-081-2/+2
| | | | llvm-svn: 283636
* Allow a maximum of 64 bits to be returned in registersDylan McKay2016-10-082-0/+17
| | | | | | | | The rest spills to the stack Authored by Jake Goulding llvm-svn: 283635
* [AVR] Expand MULHS for all typesDylan McKay2016-10-083-0/+56
| | | | | | | | | | Once MULHS was expanded, this exposed an issue where the condition register was thought to be 16-bit. This caused an attempt to copy a 16-bit register to an 8-bit register. Authored by Jake Goulding llvm-svn: 283634
* Add missing <memory> include in testEric Fiselier2016-10-081-0/+1
| | | | llvm-svn: 283633
* Add missing include in test_allocator.hEric Fiselier2016-10-081-2/+3
| | | | llvm-svn: 283632
* [libc++] Fix stack_allocatorEric Fiselier2016-10-0832-135/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: To quote STL the problems with stack allocator are" >"stack_allocator<T, N> is seriously nonconformant to N4582 17.6.3.5 [allocator.requirements]. > First, it lacks a rebinding constructor. (The nested "struct rebind" isn't sufficient.) > Second, it lacks templated equality/inequality. > Third, it completely ignores alignment. > Finally, and most severely, the Standard forbids its existence. Allocators are forbidden from returning memory "inside themselves". This requirement is implied by the Standard's requirements for rebinding and equality. It's permitted to return memory from a separate buffer object on the stack, though." This patch attempts to address all of those issues. First, instead of storing the buffer inside the allocator I've change `stack_allocator` to accept the buffer as an argument. Second, in order to fix rebinding I changed the parameter list from `<class T, size_t NumElements>` to `<class T, size_t NumBytes>`. This allows allocator rebinding between types that have different sizes. Third, I added copy and rebinding constructors and assignment operators. And finally I fixed the allocation logic to always return properly aligned storage. Reviewers: mclow.lists, howard.hinnant, STL_MSFT Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25154 llvm-svn: 283631
* [AVR] Add the 'SoftFail' field to all instruction formatsDylan McKay2016-10-081-0/+2
| | | | | | This will be used in the future for disassembly. llvm-svn: 283630
* [AVR] Set up the instruction printer and the assembly backendDylan McKay2016-10-081-0/+19
| | | | llvm-svn: 283629
* [AVR] Add dependencies to AVR libraries in AVRCodeGenDylan McKay2016-10-081-1/+2
| | | | llvm-svn: 283628
* [AVR] Add missing subdirectories to LLVMBuildDylan McKay2016-10-081-1/+1
| | | | llvm-svn: 283627
* [llvm-opt-report] Don't leave space for opts that never happenHal Finkel2016-10-086-160/+167
| | | | | | | | | | Because screen space is precious, if an optimization (vectorization, for example) never happens, don't leave empty space for the associated markers on every line of the output. This makes the output much more compact, and allows for the later inclusion of markers for more (although perhaps rare) optimizations. llvm-svn: 283626
* [coroutines] Store an address of destroy OR cleanup part in the coroutine frame.Gor Nishanov2016-10-083-18/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: If heap allocation of a coroutine is elided, we need to make sure that we will update an address stored in the coroutine frame from f.destroy to f.cleanup. Before this change, CoroSplit synthesized these stores after coro.begin: ``` store void (%f.Frame*)* @f.resume, void (%f.Frame*)** %resume.addr store void (%f.Frame*)* @f.destroy, void (%f.Frame*)** %destroy.addr ``` In those cases where we did heap elision, but were not able to devirtualize all indirect calls, destroy call will attempt to "free" the coroutine frame stored on the stack. Oops. Now we use select to put an appropriate coroutine subfunction in the destroy slot. As bellow: ``` store void (%f.Frame*)* @f.resume, void (%f.Frame*)** %resume.addr %0 = select i1 %need.alloc, void (%f.Frame*)* @f.destroy, void (%f.Frame*)* @f.cleanup store void (%f.Frame*)* %0, void (%f.Frame*)** %destroy.addr ``` Reviewers: majnemer Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D25377 llvm-svn: 283625
* [docs] Fix indentation bug in LangRef.Lang Hames2016-10-081-2/+2
| | | | llvm-svn: 283624
* [AVR] Add the assembly printerDylan McKay2016-10-082-0/+183
| | | | | | | | | | | | Summary: This adds the AVRAsmPrinter class. Reviewers: arsenm, kparzysz Subscribers: llvm-commits, wdng, beanz, japaric, mgorny Differential Revision: https://reviews.llvm.org/D25271 llvm-svn: 283623
* AMDGPU/SI: Handle div_fmas hazard in GCNHazardRecognizerTom Stellard2016-10-073-0/+83
| | | | | | | | | | Reviewers: arsenm Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, tony-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D25250 llvm-svn: 283622
* Disable alignment support of 0x4000 for Win32. https://reviews.llvm.org/D25053Marshall Clow2016-10-071-3/+3
| | | | llvm-svn: 283621
* Fix PR30642 - libc++ leaks always-visible symbols into programsEric Fiselier2016-10-071-1/+1
| | | | | | | | | | | | | | | This was caused by r281673, specifically changing `_LIBCPP_EXTERN_TEMPLATE_TYPE_VIS` from `__attribute__((__type_visibility__("default")))` to `__attribute__((__visibility("default")))`. I made that change because I thought the external instantiations needed their members to have default visibility. However since libc++ never builds with -fvisibility=hidden this appears not to be needed. Instead this change caused previously hidden inline methods to become un-hidden, which is a regression. This patch reverts the problematic change and fixes PR30642. llvm-svn: 283620
* Codegen: Tail-duplicate during placement.Kyle Butt2016-10-0724-95/+884
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tail duplication pass uses an assumed layout when making duplication decisions. This is fine, but passes up duplication opportunities that may arise when blocks are outlined. Because we want the updated CFG to affect subsequent placement decisions, this change must occur during placement. In order to achieve this goal, TailDuplicationPass is split into a utility class, TailDuplicator, and the pass itself. The pass delegates nearly everything to the TailDuplicator object, except for looping over the blocks in a function. This allows the same code to be used for tail duplication in both places. This change, in concert with outlining optional branches, allows triangle shaped code to perform much better, esepecially when the taken/untaken branches are correlated, as it creates a second spine when the tests are small enough. Issue from previous rollback fixed, and a new test was added for that case as well. Issue was worklist/scheduling/taildup issue in layout. Issue from 2nd rollback fixed, with 2 additional tests. Issue was tail merging/loop info/tail-duplication causing issue with loops that share a header block. Differential revision: https://reviews.llvm.org/D18226 llvm-svn: 283619
* Fix shadow warnings. Patch from STL@microsoft.comEric Fiselier2016-10-071-10/+10
| | | | llvm-svn: 283618
* swifterror: Don't compute swifterror vregs during instruction selectionArnold Schwaighofer2016-10-079-225/+295
| | | | | | | | | | | | | | | | | | | | | | | | | The code used llvm basic block predecessors to decided where to insert phi nodes. Instruction selection can and will liberally insert new machine basic block predecessors. There is not a guaranteed one-to-one mapping from pred. llvm basic blocks and machine basic blocks. Therefore the current approach does not work as it assumes we can mark predecessor machine basic block as needing a copy, and needs to know the set of all predecessor machine basic blocks to decide when to insert phis. Instead of computing the swifterror vregs as we select instructions, propagate them at the end of instruction selection when the MBB CFG is complete. When an instruction needs a swifterror vreg and we don't know the value yet, generate a new vreg and remember this "upward exposed" use, and reconcile this at the end of instruction selection. This will only happen if the target supports promoting swifterror parameters to registers and the swifterror attribute is used. rdar://28300923 llvm-svn: 283617
* Rename variable to not use C++ reserved name (leading underscore + capital) ↵Mehdi Amini2016-10-071-2/+2
| | | | | | (NFC) llvm-svn: 283616
* Fix MSVC build: requires namespace in front of StringRef (NFC)Mehdi Amini2016-10-071-1/+1
| | | | llvm-svn: 283615
* [DAG] clean up foldSelectOfConstants(); NFCISanjay Patel2016-10-071-19/+14
| | | | | | | Rename variables, simplify logic. Not clear yet why we don't handle a target with ZeroOrNegativeOneBooleanContent too. llvm-svn: 283613
* [InstCombine] Don't unpack arrays that are too large (part 2).Davide Italiano2016-10-072-0/+16
| | | | | | | This is similar to r283599, but for store instructions. Thanks to David for pointing out! llvm-svn: 283612
* Driver: use StringRef instead of raw pointer in lookupTypeForExtension() (NFC)Mehdi Amini2016-10-076-6/+9
| | | | llvm-svn: 283611
* Add missing include.Zachary Turner2016-10-071-0/+1
| | | | llvm-svn: 283610
* Refactor Symbol visitor code.Zachary Turner2016-10-0711-177/+466
| | | | | | | | | | | | | Type visitor code had already been refactored previously to decouple the visitor and the visitor callback interface. This was necessary for having the flexibility to visit in different ways (for example, dumping to yaml, reading from yaml, dumping to ScopedPrinter, etc). This patch merely implements the same visitation pattern for symbol records that has already been implemented for type records. llvm-svn: 283609
* [cmake] Treat polly as "in tree" if LLVM_EXTERNAL_POLLY_SOURCE_DIR is providedHongbin Zheng2016-10-071-0/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D25354 llvm-svn: 283608
* Fix a few warnings caught by clang.Zachary Turner2016-10-072-2/+2
| | | | llvm-svn: 283607
* Fix various issues in std::any and the related tests.Eric Fiselier2016-10-0717-276/+244
| | | | | | | | | | | | | | | | | | | | * Fix self-swap. Patch from Casey Carter. * Remove workarounds and tests for types with deleted move constructors. This was originally added as part of a LWG proposed resolution that has since changed. * Re-apply most recent PR for LWG 2769. * Re-apply most recent PR for LWG 2754. Specifically fix the SFINAE checks to use the decayed type. * Fix tests to allow moved-from std::any's to have a non-empty state. This is the behavior of MSVC's std::any. * Various whitespace and test fixes. llvm-svn: 283606
* Turn ArchName/BoundArch in Driver from raw pointer to StringRef (NFC)Mehdi Amini2016-10-0710-41/+39
| | | | llvm-svn: 283605
* Remove a stray dump().Sean Callanan2016-10-071-2/+0
| | | | | | <rdar://problem/28635530> llvm-svn: 283604
* Remove unused variable.Zachary Turner2016-10-071-1/+0
| | | | llvm-svn: 283603
* Visually align table def with respective enum. NFCDouglas Katzman2016-10-071-19/+43
| | | | | | | 'warn_attribute_wrong_decl_type' has to stay in sync with 'enum AttributeDeclKind' which is much easier when they line up. llvm-svn: 283601
* Define PATH_MAX on windowsHongbin Zheng2016-10-071-0/+6
| | | | | | Differential Revision: https://reviews.llvm.org/D25372 llvm-svn: 283600
* [InstCombine] Don't unpack arrays that are too largeDavide Italiano2016-10-072-0/+15
| | | | | | Differential Revision: https://reviews.llvm.org/D25376 llvm-svn: 283599
* [esan] Fix ESan test failure on Debian Sid botQin Zhao2016-10-071-1/+1
| | | | | | | | | | | | Summary: Increase early allocation buffer size. Reviewers: bruening Subscribers: kubabrecka Differential Revision: https://reviews.llvm.org/D25380 llvm-svn: 283598
* [DAG] move fold (select C, 0, 1 -> xor C, 1) to a helper function; NFCSanjay Patel2016-10-071-16/+31
| | | | | | We're missing at least 3 other similar folds based on what we have in InstCombine. llvm-svn: 283596
* AMDGPU/SI: Add support for 8-byte relocationsTom Stellard2016-10-072-0/+17
| | | | | | | | | | Reviewers: arsenm, kzhuravl Subscribers: wdng, nhaehnle, yaxunl, llvm-commits, tony-tye Differential Revision: https://reviews.llvm.org/D25375 llvm-svn: 283593
* [RS4GC] Strengthen coverage: add more testsAnna Thomas2016-10-072-0/+27
| | | | | | | | | | | | Summary: Add tests for cases where we have zero coverage in RS4GC. Reviewers: sanjoy, reames Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D25341 llvm-svn: 283591
* Revert r283572 - [Driver] Make -print-libgcc-file-name print compiler-rt lib ↵Michal Gorny2016-10-074-28/+3
| | | | | | | | | | when used Revert the -print-libgcc-file-name change as the new test fails on Darwin. It needs to be updated to run the libgcc part only on systems supporting that rtlib. llvm-svn: 283586
* Improve comments.Rui Ueyama2016-10-071-3/+6
| | | | | | | Also use uint64_t instead of uintX_t so that you don't have to think about two different cases to verify that the code is correct. llvm-svn: 283585
OpenPOWER on IntegriCloud