summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [CodeGen][ObjC] Emit objc_unsafeClaimAutoreleasedReturnValue forAkira Hatanaka2016-12-132-0/+4
| | | | | | | | | | fragile runtime too. Follow-up to r258962. rdar://problem/29269006 llvm-svn: 289615
* Add support for Samsung Exynos M3 (NFC)Evandro Menezes2016-12-134-0/+32
| | | | llvm-svn: 289614
* Add support for Samsung Exynos M3 (NFC)Evandro Menezes2016-12-138-1/+49
| | | | llvm-svn: 289613
* Update the header docs to match a recent checkin.Greg Clayton2016-12-131-2/+2
| | | | llvm-svn: 289612
* Switch functions that returned bool and filled in a DWARFFormValue arg with ↵Greg Clayton2016-12-137-55/+58
| | | | | | | | ones that return Optional<DWARFFormValue> Differential Revision: https://reviews.llvm.org/D27737 llvm-svn: 289611
* llvm-cat: Allow bitcode files to be created with no modules.Peter Collingbourne2016-12-131-1/+1
| | | | llvm-svn: 289610
* [llvm-config] Fixing one check where shared libs implied dylibChris Bieneman2016-12-131-2/+2
| | | | | | We shouldn't print the dylib if LinkDylib is false. llvm-svn: 289609
* llvm-config: Set LinkMode in addition to LinkDyLib when using --ignore-llvmDerek Schuff2016-12-131-2/+3
| | | | | | | | | | | | | | | Summary: LinkDyLib is only used (before arg processing) to set up the default for LinkMode. So reset LinkMode as well, and process before --link-shared or --link-static to allow those flags to continue to override it. Reviewers: beanz Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D27736 llvm-svn: 289608
* [libFuzzer] fix an UB (invalid shift) spotted by ubsan. The code worked fine ↵Kostya Serebryany2016-12-131-1/+1
| | | | | | by luck, because the way shifts actually work on clang+x86 llvm-svn: 289607
* [sanitizers] -DAG is order-independent checkMike Aizatsky2016-12-131-3/+3
| | | | llvm-svn: 289606
* [llvm-config] Add --ignore-libllvmChris Bieneman2016-12-132-1/+4
| | | | | | This flag forces off linking libLLVM. This should resolve some issues reported on llvm-commits. llvm-svn: 289605
* [Hexagon] Fix some Clang-tidy modernize and Include What You Use warnings; ↵Eugene Zelenko2016-12-137-402/+359
| | | | | | other minor fixes (NFC). llvm-svn: 289604
* Change CoverageTracker from a global variable to member variable to avoid ↵Dehao Chen2016-12-131-52/+52
| | | | | | breaking thread-safety. (NFC) llvm-svn: 289603
* Re-land "[SCEVExpander] Use llvm data structures; NFC"Sanjoy Das2016-12-131-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | This change re-lands r289215, by reverting r289482. The underlying issue that caused it to be reverted has been fixed by Tim Northover in r289496. Original commit message for r289215: [SCEVExpander] Use llvm data structures; NFC Original commit message for r289482: Revert "[SCEVExpander] Use llvm data structures; NFC" This reverts r289215 (git SHA1 cb7b86a1). It breaks the ubsan build because a DenseMap that keys off of `AssertingVH<T>` will hit UB when it tries to cast the empty and tombstone keys to `T *` (due to insufficient alignment). This is the relevant stack trace (thanks to Mike Aizatsky): #0 0x25cf100 in llvm::AssertingVH<llvm::PHINode>::getValPtr() const llvm/include/llvm/IR/ValueHandle.h:212:39 #1 0x25cea20 in llvm::AssertingVH<llvm::PHINode>::operator=(llvm::AssertingVH<llvm::PHINode> const&) llvm/include/llvm/IR/ValueHandle.h:234:19 #2 0x25d0092 in llvm::DenseMapBase<llvm::DenseMap<llvm::AssertingVH<llvm::PHINode>, llvm::detail::DenseSetEmpty, llvm::DenseMapInfo<llvm::AssertingVH<llvm::PHINode> >, llvm::detail::DenseSetPair<llvm::AssertingVH<llvm::PHINode> > >, llvm::AssertingVH<llvm::PHINode>, llvm::detail::DenseSetEmpty, llvm::DenseMapInfo<llvm::AssertingVH<llvm::PHINode> >, llvm::detail::DenseSetPair<llvm::AssertingVH<llvm::PHINode> > >::clear() llvm/include/llvm/ADT/DenseMap.h:113:23 llvm-svn: 289602
* [IRCE] Avoid loop optimizations on pre and post loopsAnna Thomas2016-12-132-0/+115
| | | | | | | | | | | | | | | | | | | | | Summary: This patch will add loop metadata on the pre and post loops generated by IRCE. Currently, we have metadata for disabling optimizations such as vectorization, unrolling, loop distribution and LICM versioning (and confirmed that these optimizations check for the metadata before proceeding with the transformation). The pre and post loops generated by IRCE need not go through loop opts (since these are slow paths). Added two test cases as well. Reviewers: sanjoy, reames Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D26806 llvm-svn: 289588
* Add DLL thunks for new sancov APIs to fix Windows testsReid Kleckner2016-12-131-0/+4
| | | | llvm-svn: 289587
* CodeGen: Start using inrange annotations on vtable getelementptr.Peter Collingbourne2016-12-1312-38/+40
| | | | | | | | | | | | This annotation allows the optimizer to split vtable groups, as permitted by a change to the Itanium ABI [1] that prevents compilers from adjusting virtual table pointers between virtual tables. [1] https://github.com/MentorEmbedded/cxx-abi/pull/7 Differential Revision: https://reviews.llvm.org/D24431 llvm-svn: 289585
* CodeGen: New vtable group representation: struct of vtable arrays.Peter Collingbourne2016-12-1341-281/+317
| | | | | | | | | In a future change, this representation will allow us to use the new inrange annotation on getelementptr to allow the optimizer to split vtable groups. Differential Revision: https://reviews.llvm.org/D22296 llvm-svn: 289584
* [LV] Don't vectorize when we have a small static bound on trip countMichael Kuperstein2016-12-132-2/+27
| | | | | | | | | | We currently check if the exact trip count is known and is smaller than the "tiny loop" bound. We should be checking the maximum bound on the trip count instead. Differential Revision: https://reviews.llvm.org/D27690 llvm-svn: 289583
* ADT: Use delete[] to delete the array owned by OwningArrayRef, as we created ↵Peter Collingbourne2016-12-131-2/+2
| | | | | | it with new[]. llvm-svn: 289582
* [powerpc] deactivate readability-identifier-naming.cpp test on powerpc64leBill Seurer2016-12-131-0/+3
| | | | | | | | | The test case clang-tidy/readability-identifier-naming.cpp segfaults on powerpc64 little endian (starting with r288563) when a bootstrap build/test is done. To get the buildbot running again deactivate the test. When the issue is resolved reactivate it. llvm-svn: 289581
* Fix size_t typdef in new cppcoreguidelines-no-malloc.cpp testReid Kleckner2016-12-131-1/+1
| | | | llvm-svn: 289580
* ADT: Add OwningArrayRef class.Peter Collingbourne2016-12-131-0/+19
| | | | | | | | | This is a MutableArrayRef that owns its array. I plan to use this in D22296. Differential Revision: https://reviews.llvm.org/D27723 llvm-svn: 289579
* Object: Make IRObjectFile own multiple modules and enumerate symbols from ↵Peter Collingbourne2016-12-134-15/+40
| | | | | | | | | | all modules. This implements multi-module support in IRObjectFile. Differential Revision: https://reviews.llvm.org/D26951 llvm-svn: 289578
* Object: Remove module accessors from IRObjectFile, and hide its constructor.Peter Collingbourne2016-12-132-20/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D27079 llvm-svn: 289577
* LTO: Port the legacy LTO API to ModuleSymbolTable.Peter Collingbourne2016-12-132-33/+31
| | | | | | Differential Revision: https://reviews.llvm.org/D27078 llvm-svn: 289576
* Align EvalInfo in ExprConstant to avoid PointerUnion assertionsReid Kleckner2016-12-131-1/+1
| | | | | | | | | 32-bit MSVC doesn't provide more than 4 byte stack alignment by default. This conflicts with PointerUnion's attempt to make assertions about alignment. This fixes the problem by explicitly asking the compiler for 8 byte alignment. llvm-svn: 289575
* LTO: Port the new LTO API to ModuleSymbolTable.Peter Collingbourne2016-12-132-80/+85
| | | | | | Differential Revision: https://reviews.llvm.org/D27077 llvm-svn: 289574
* Generalize strided store pattern in interleave access passAlina Sbirlea2016-12-135-29/+400
| | | | | | | | | | | | | | | | | Summary: This patch aims to generalize matching of the strided store accesses to more general masks. The more general rule is to have consecutive accesses based on the stride: [x, y, ... z, x+1, y+1, ...z+1, x+2, y+2, ...z+2, ...] All elements in the masks need not form a contiguous space, there may be gaps. As before, undefs are allowed and filled in with adjacent element loads. Reviewers: HaoLiu, mssimpso Subscribers: mkuper, delena, llvm-commits Differential Revision: https://reviews.llvm.org/D23646 llvm-svn: 289573
* Corrected D27428: Do not use the alignment-rounded-up size with secondaryKostya Kortchinsky2016-12-133-20/+51
| | | | | | | | | | | | | | | | | | | | Summary: I atually had an integer overflow on 32-bit with D27428 that didn't reproduce locally, as the test servers would manage allocate addresses in the 0xffffxxxx range, which led to some issues when rounding addresses. At this point, I feel that Scudo could benefit from having its own combined allocator, as we don't get any benefit from the current one, but have to work around some hurdles (alignment checks, rounding up that is no longer needed, extraneous code). Reviewers: kcc, alekseyshl Subscribers: llvm-commits, kubabrecka Differential Revision: https://reviews.llvm.org/D27681 llvm-svn: 289572
* [Sema] Prefer SmallVector over `new`ed memory blocks. NFC.George Burgess IV2016-12-131-6/+4
| | | | llvm-svn: 289571
* Revert "AArch64CollectLOH: Rewrite as block-local analysis."Matthias Braun2016-12-135-471/+850
| | | | | | | | | | | | | This is not always behaving as expected as it turns out block live-in lists are only correct most of the time. Still waiting for reviews on https://reviews.llvm.org/D27559 to have them correct all of the time. See also http://llvm.org/PR31361, rdar://25117107 This reverts commit r288567. This reverts commit r288561. llvm-svn: 289570
* [bpf] change llvm-objdump to print dec instead of hexAlexei Starovoitov2016-12-131-0/+23
| | | | | | | | | since bpf instruction stream is multiple of 8 change llvm-objdump to print decimal instruction number instead of hex address, so that users don't have to do this math manually to match kernel verifier output Signed-off-by: Alexei Starovoitov <ast@kernel.org> llvm-svn: 289569
* Fix warning for noreturn functionReid Kleckner2016-12-131-0/+1
| | | | llvm-svn: 289568
* __uuidof() and declspec(uuid("...")) should be allowed on enumeration typesReid Kleckner2016-12-136-13/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although not specifically mentioned in the documentation, MSVC accepts __uuidof(…) and declspec(uuid("…")) attributes on enumeration types in addition to structs/classes. This is meaningful, as such types *do* have associated UUIDs in ActiveX typelibs, and such attributes are included by default in the wrappers generated by their #import construct, so they are not particularly unusual. clang currently rejects the declspec with a –Wignored-attributes warning, and errors on __uuidof() with “cannot call operator __uuidof on a type with no GUID” (because it rejected the uuid attribute, and therefore finds no value). This is causing problems for us while trying to use clang-tidy on a codebase that makes heavy use of ActiveX. I believe I have found the relevant places to add this functionality, this patch adds this case to clang’s implementation of these MS extensions. patch is against r285994 (or actually the git mirror 80464680ce). Both include an update to test/Parser/MicrosoftExtensions.cpp to exercise the new functionality. This is my first time contributing to LLVM, so if I’ve missed anything else needed to prepare this for review just let me know! __uuidof: https://msdn.microsoft.com/en-us/library/zaah6a61.aspx declspec(uuid("…")): https://msdn.microsoft.com/en-us/library/3b6wkewa.aspx #import: https://msdn.microsoft.com/en-us/library/8etzzkb6.aspx Reviewers: aaron.ballman, majnemer, rnk Differential Revision: https://reviews.llvm.org/D26846 llvm-svn: 289567
* GlobalISel: fix GOT accesses on AArch64.Tim Northover2016-12-132-5/+6
| | | | | | | | We were using the correct pseudo-instruction, but because the operand's flags weren't set correctly we still ended up emitting incorrect relocations during MC lowering. llvm-svn: 289566
* Make a DWARFDIE class that can help avoid using the wrong DWARFUnit when ↵Greg Clayton2016-12-1313-848/+1041
| | | | | | | | | | | | extracting attributes Many places pass around a DWARFDebugInfoEntryMinimal and a DWARFUnit. It is easy to get things wrong by using the wrong DWARFUnit with a DWARFDebugInfoEntryMinimal. This patch creates a DWARFDie class that contains the DWARFUnit and DWARFDebugInfoEntryMinimal objects so that they can't get out of sync. All attribute extraction has been moved out of DWARFDebugInfoEntryMinimal and into DWARFDie. DWARFDebugInfoEntryMinimal was also renamed to DWARFDebugInfoEntry. DWARFDie objects are temporary objects that are used by clients and contain 2 pointers that you always need to have anyway. Keeping them grouped will avoid errors and simplify many of the attribute extracting APIs by not having to pass in a DWARFUnit. Differential Revision: https://reviews.llvm.org/D27634 llvm-svn: 289565
* [libFuzzer] Add missing header needed for Windows.Marcos Pividori2016-12-131-0/+1
| | | | llvm-svn: 289564
* [libFuzzer] Avoid name collision with Windows API.Marcos Pividori2016-12-135-6/+6
| | | | | | | | | | Windows uses some macros to replace DeleteFile() by DeleteFileA() or DeleteFileW(). This was causing an error at link time. DeleteFile was renamed to RemoveFile(). Differential Revision: https://reviews.llvm.org/D27577 llvm-svn: 289563
* [libFuzzer] Implement DirName() for Windows.Marcos Pividori2016-12-131-1/+135
| | | | | | | | | | | | | | | | | | | | Implement DirName from scratch to avoid dependencies on external libraries. It's based on MSDN documentation for Naming Files, Paths, and Namespaces. The algorithm can't simply start from the end and look backwards for the first separator, because we need to preserve the prefix that represent the root location. We shouldn't remove anything there. In Windows we have many different options, like: \\Server\Share\ , \ , C: , C:\ , \\?\C:\ , \\?\UNC\Server\Share\ We remove the last separator in the rest of the path, if it exists. It was implemented to have a similar behaviour to dirname() in linux, removing trailing separators, returning "." when the path doesn't contain separators, etc. Differential Revision: https://reviews.llvm.org/D27579 llvm-svn: 289562
* [libFuzzer] Fix bug in detecting timeouts when input string is empty.Marcos Pividori2016-12-135-1/+24
| | | | | | | | | | | | | | I added a new flag RunningCB to know if the Fuzzer's main thread is running the CB function, instead of using (!CurrentUnitSize). (!CurrentUnitSize) doesn't work properly. For example, in FuzzerLoop.cpp, inside ShuffleAndMinimize() function, we execute the callback with an empty string (size=0). Previous implementation failed to detect timeouts in that execution. Also, I add a regression test for that case. Differential Revision: https://reviews.llvm.org/D27433 llvm-svn: 289561
* [libFuzzer] Clean up headers and file formatting of LibFuzzer files.Marcos Pividori2016-12-1323-28/+48
| | | | | | | | | | | | Reorganize #includes to follow LLVM Coding Standards. Include some missing headers. Required to use `Printf()`. Aside from that, this patch contains no functional change. It is purely a re-organization. Differential Revision: https://reviews.llvm.org/D27363 llvm-svn: 289560
* [libFuzzer] Properly use unsigned for workers, jobs and NumberOfCpuCores.Marcos Pividori2016-12-134-12/+12
| | | | | | | | | | | std::thread::hardware_concurrency() returns an unsigned, so I modify NumberOfCpuCores() to return unsigned too. The number of cpus is used to define the number of workers, so I decided to update the worker and jobs flags to be declared as unsigned too. Differential Revision: https://reviews.llvm.org/D27685 llvm-svn: 289559
* [libFuzzer] Properly use unsigned for Process ID.Marcos Pividori2016-12-134-7/+7
| | | | | | | | | | Use unsigned for PID instead of signed int. GetCurrentProcessId() returns an unsigned (DWORD) so we must be sure we can deal with all possible values. I use a long unsigned to be sure it can hold a 32 bit unsigned (DWORD). Differential Revision: https://reviews.llvm.org/D27281 llvm-svn: 289558
* [libFuzzer] Improve Signal Handler interface.Marcos Pividori2016-12-135-132/+97
| | | | | | | | | | | | Add new flags to FuzzingOptions to represent the different conditions on the signal handling. These options are passed when calling SetSignalHandler(). This changes simplify the implementation of Windows's exception handling. Now we can define a unique handler for all the exceptions. Differential Revision: https://reviews.llvm.org/D27238 llvm-svn: 289557
* Fix the test cases committed in r289521. Rong Xu2016-12-131-10/+8
| | | | llvm-svn: 289556
* [X86][SSE] Regenerate vector of pointers testsSimon Pilgrim2016-12-131-45/+75
| | | | llvm-svn: 289555
* [analyzer] Detect ObjC properties that are both (copy) and Mutable.Artem Dergachev2016-12-134-3/+148
| | | | | | | | | | | | | | | When an Objective-C property has a (copy) attribute, the default setter for this property performs a -copy on the object assigned. Calling -copy on a mutable NS object such as NSMutableString etc. produces an immutable object, NSString in our example. Hence the getter becomes type-incorrect. rdar://problem/21022397 Differential Revision: https://reviews.llvm.org/D27535 llvm-svn: 289554
* Update for clang after llvm::StringLiteral.Zachary Turner2016-12-131-1/+1
| | | | llvm-svn: 289553
* Fixing build failure by adding triple option to new test condition.Neil Hickey2016-12-131-1/+1
| | | | | | Adding -triple option to ensure target supports double for fpmath test. llvm-svn: 289552
OpenPOWER on IntegriCloud