summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [cl] Don't print subcommand help when no subcommands present.Zachary Turner2016-10-111-4/+6
| | | | | | | | | | | | | | | | Previously we would print USAGE: <exe> [subcommand] [options] Even if no subcommands were present. This changes the output format to only print "[subcommand]" if there is at least one subcommand. Fixes llvm.org/pr30598 Patch by Serge Guelton llvm-svn: 283892
* [OpenCL] Allow partial initializer for array and structYaxun Liu2016-10-112-2/+69
| | | | | | | | | | | | | | Currently Clang allows partial initializer for C99 but not for OpenCL, e.g. float a[16][16] = {1.0f, 2.0f}; is allowed in C99 but not allowed in OpenCL. This patch fixes that. Differential Revision: https://reviews.llvm.org/D25335 llvm-svn: 283891
* Revert r283887 and r283882, until the issue is understood and fixed.Vassil Vassilev2016-10-1115-239/+36
| | | | llvm-svn: 283890
* [ThinLTO/tests] Check we don't fail if --thinlto-jobs is not passed.Davide Italiano2016-10-111-3/+9
| | | | | | While here, fix the CHECK lines of an existing test. llvm-svn: 283889
* Use StringRef instead of raw pointer in SourceManagerInternals LineTableInfo ↵Mehdi Amini2016-10-111-2/+2
| | | | | | API (NFC) llvm-svn: 283888
* r283882 followup. Don't demote ParmVarDecls. This should fix our module builds.Vassil Vassilev2016-10-111-14/+16
| | | | llvm-svn: 283887
* [clang-tidy] Ignore empty members and bases in ↵Malcolm Parsons2016-10-112-1/+51
| | | | | | | | | | | | | | cppcoreguidelines-pro-type-member-init Summary: Empty/incomplete variables/members/bases don't need to be initialized Reviewers: mgehre, aaron.ballman, alexfh Subscribers: nemanjai, cfe-commits Differential Revision: https://reviews.llvm.org/D25238 llvm-svn: 283886
* [DAG] simplify logic; NFCSanjay Patel2016-10-111-8/+6
| | | | llvm-svn: 283885
* [DAG] hoist DL(N) and fix formatting; NFCSanjay Patel2016-10-111-25/+32
| | | | llvm-svn: 283884
* [X86][SSE] Regenerate scalar i64 uitofp testSimon Pilgrim2016-10-111-16/+41
| | | | | | Added 32-bit target test llvm-svn: 283883
* [modules] PR28752: Do not instantiate variable declarations which are not ↵Vassil Vassilev2016-10-1115-36/+237
| | | | | | | | | | visible. https://reviews.llvm.org/D24508 Patch developed in collaboration with Richard Smith! llvm-svn: 283882
* [X86][SSE] Regenerate vector load-trunc testSimon Pilgrim2016-10-111-1/+20
| | | | llvm-svn: 283881
* [X86][SSE] Regenerate vsplit and testsSimon Pilgrim2016-10-111-6/+53
| | | | | | To make it more obvious how bad some of that truncation code is.... llvm-svn: 283880
* [clang-tidy] Fix template agrument false positives in unused-using-decls.Haojian Wu2016-10-112-0/+44
| | | | | | | | | | | | | | Summary: * Fix a false postive when an using class is used in an explicit template instantiation. * Fix a false postive when an using template class is used as template argument. Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25437 llvm-svn: 283879
* [DAG] fix formatting; NFCSanjay Patel2016-10-111-72/+68
| | | | llvm-svn: 283878
* [LCSSA] Implement linear algorithm for the isRecursivelyLCSSAFormIgor Laevsky2016-10-115-40/+50
| | | | | | | | For each block check that it doesn't have any uses outside of it's innermost loop. Differential Revision: https://reviews.llvm.org/D25364 llvm-svn: 283877
* [x86] update test to use FileCheck and auto-generate checksSanjay Patel2016-10-111-5/+15
| | | | llvm-svn: 283876
* [clang-tidy] readability-avoid-const-params-in-decls template instantiation ↵Malcolm Parsons2016-10-112-1/+43
| | | | | | | | | | | | | | bugfix Summary: Bugfix for 30398. Don't warn for template instantiations Reviewers: aaron.ballman, hokein, alexfh Subscribers: omtcyfz, cfe-commits Differential Revision: https://reviews.llvm.org/D24652 llvm-svn: 283873
* [Support/ELF] - Add OpenBSD PT_OPENBSD_RANDOMIZE, PT_OPENBSD_WXNEEDED constants.George Rimar2016-10-111-0/+3
| | | | | | | | Docs for reference: http://man.openbsd.org/OpenBSD-current/man5/elf.5 https://github.com/openbsd/src/commit/2a5a8fc7e30928c2cff57cfe5fb491c90d8478ad llvm-svn: 283872
* Fix Arm64InstEmulation tests for windowsPavel Labath2016-10-111-15/+4
| | | | | | | | MSVC does not like the declaration of a terminate() function (I guess it looks too much like std::terminate()). While I'm there, move the setup/teardown code into the functions gtest provides for that purpose. llvm-svn: 283870
* [clang-tidy] modernize-use-default default constructor bugfixMalcolm Parsons2016-10-112-7/+25
| | | | | | | | | | | | | | Summary: Only member initializers that are written should prevent using '= default' on a default constructor. Reviewers: klimek, sbenza, aaron.ballman, alexfh Subscribers: Eugene.Zelenko, alexfh, klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D24444 llvm-svn: 283869
* Revert "[Driver][Diagnostics] Make 'show option names' default for driver ↵Renato Golin2016-10-113-14/+5
| | | | | | | | warnings" This reverts commit r283827, as it's breaking all ARM/AARch64 bots. llvm-svn: 283868
* [Thumb] Save/restore high registers in Thumb1 pro/epiloguesOliver Stannard2016-10-116-36/+620
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The high registers are not allocatable in Thumb1 functions, but they could still be used by inline assembly, so we need to save and restore the callee-saved high registers (r8-r11) in the prologue and epilogue. This is complicated by the fact that the Thumb1 push and pop instructions cannot access these registers. Therefore, we have to move them down into low registers before pushing, and move them back after popping into low registers. In most functions, we will have low registers that are also being pushed/popped, which we can use as the temporary registers for saving/restoring the high registers. However, this is not guaranteed, so we may need to push some extra low registers to ensure that the high registers can be saved/restored. For correctness, it would be sufficient to use just one low register, but if we have enough low registers available then we only need one push/pop instruction, rather than one per high register. We can also use the argument/return registers when they are not live, and the link register when saving (but not restoring), reducing the number of extra registers we need to push. There are still a few extreme edge cases where we need two push/pop instructions, because not enough low registers can be made live in the prologue or epilogue. In addition to the regression tests included here, I've also tested this using a script to generate functions which clobber different combinations of registers, have different numbers of argument and return registers (including variadic arguments), allocate different fixed sized objects on the stack, and do or don't use variable sized allocas and the __builtin_return_address intrinsic (all of which affect the available registers in the prologue and epilogue). I ran these functions in a test harness which verifies that all of the callee-saved registers are correctly preserved. Differential Revision: https://reviews.llvm.org/D24228 llvm-svn: 283867
* [ARM] Fix registers clobbered by SjLj EH on soft-float targetsOliver Stannard2016-10-115-8/+39
| | | | | | | | | | | | | | | | | | | Currently, the Int_eh_sjlj_dispatchsetup intrinsic is marked as clobbering all registers, including floating-point registers that may not be present on the target. This is technically true, as we could get linked against code that does use the FP registers, but that will not actually work, as the soft-float code cannot save and restore the FP registers. SjLj exception handling can only work correctly if either all or none of the code is built for a target with FP registers. Therefore, we can assume that, when Int_eh_sjlj_dispatchsetup is compiled for a soft-float target, it is only going to be linked against other soft-float code, and so only clobbers the general-purpose registers. This allows us to check that no non-savable registers are clobbered when generating the prologue/epilogue. Differential Revision: https://reviews.llvm.org/D25180 llvm-svn: 283866
* Fix typo in documentationMalcolm Parsons2016-10-111-1/+1
| | | | llvm-svn: 283865
* Delete clang-completion-mode.el.Manuel Klimek2016-10-111-248/+0
| | | | | | | | | | | | It has been unmaintained for a while (last change was more than four years ago), and it appears not widely used. By now there are multiple well-maintained alternatives (emacs-ycmd, atuo-complete-clang), and if users try to make this work they'll likely have a bad user experience. Reasoning and problems pointed out by Philipp Stephani. llvm-svn: 283864
* clang-include-fixer.el: Don't prompt the user about killing ↵Manuel Klimek2016-10-111-0/+2
| | | | | | | | | | | | clang-include-fixer processes By default, Emacs prompts the user when killing processes on exit. This is useful for stateful processes such as interactive shells. However, clang-include-fixer processes are stateless; the only effect of killing them is to cancel a clang-include-fixer operation. Therefore prompting the user is just a nuisance. Patch by Philipp Stephani. Differential Revision: https://reviews.llvm.org/D25378 llvm-svn: 283863
* [AArch64] Allow label arithmetic with add/sub/cmpDiana Picus2016-10-118-26/+345
| | | | | | | | | | | | | Allow instructions such as 'cmp w0, #(end - start)' by folding the expression into a constant. For ELF, we fold only if the symbols are in the same section. For MachO, we fold if the expression contains only symbols that are not linker visible. Fixes https://llvm.org/bugs/show_bug.cgi?id=18920 Differential Revision: https://reviews.llvm.org/D23834 llvm-svn: 283862
* Make Emacs libraries compatible with Emacs 24.Manuel Klimek2016-10-112-3/+13
| | | | | | | | Emacs 24 doesn't have format-message, fall back to format in that case. Patch by Philipp Stephani. llvm-svn: 283861
* Fix formatting in findRegisterUseOperandIdx. NFC.Fraser Cormack2016-10-111-7/+5
| | | | llvm-svn: 283860
* [ELF] - Fixed assertion fail when symbol table has invalid sh_info value.George Rimar2016-10-113-0/+8
| | | | | | | | | | | This part was splitted from D25016. When sh_info value was set in the way that non-local symbol was treated as local, lld was asserting, patch fixes that. Differential revision: https://reviews.llvm.org/D25371 llvm-svn: 283859
* Reverted r283740 [Object/ELF] - Do not crash on invalid Header->e_shoff value.George Rimar2016-10-113-6/+0
| | | | | | | | | | | | | | | | Bot does not like it: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/17075 /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/test/Object/invalid.test:70:32: error: expected string not found in input INVALID-SEC-ADDRESS-ALIGNMENT: Invalid address alignment of section headers ^ <stdin>:1:1: note: scanning from here /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/Object/ELF.h:412:7: runtime error: upcast of misaligned address 0x000002d8b899 for type 'llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<llvm::support::endianness::little, true> >', which requires 2 byte alignment ^ <stdin>:1:125: note: possible intended match here /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/Object/ELF.h:412:7: runtime error: upcast of misaligned address 0x000002d8b899 for type 'llvm::object::Elf_Shdr_Impl<llvm::object::ELFType<llvm::support::endianness::little, true> >', which requires 2 byte alignment llvm-svn: 283858
* Revert "Codegen: Tail-duplicate during placement."Daniel Jasper2016-10-1125-953/+95
| | | | | | | | | This reverts commit r283842. test/CodeGen/X86/tail-dup-repeat.ll causes and llc crash with our internal testing. I'll share a link with you. llvm-svn: 283857
* Turn FileManager DirectoryEntry::Name from raw pointer to StringRef (NFC)Mehdi Amini2016-10-118-34/+36
| | | | llvm-svn: 283856
* Use LLVM_CONSTEXPR to appease MSVC2013 (fixup for r283854)Mehdi Amini2016-10-111-2/+2
| | | | llvm-svn: 283855
* Make RandomNumberGenerator compatible with <random>Mehdi Amini2016-10-113-7/+41
| | | | | | | | | | | | | LLVM's RandomNumberGenerator wasn't compatible with the random distribution from <random>. Fixes PR25105 Patch by: Serge Guelton <serge.guelton@telecom-bretagne.eu> Differential Revision: https://reviews.llvm.org/D25443 llvm-svn: 283854
* Explicitly ignore return code in test for test systems that use pipefailDaniel Jasper2016-10-111-2/+2
| | | | llvm-svn: 283853
* Tune isHotFunction/isColdFunctionDehao Chen2016-10-111-6/+2
| | | | | | | | | | | | Summary: This patch sets function as hot if function's entry count is hot/cold. Reviewers: eraman, davidxl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D25048 llvm-svn: 283852
* Fix warning; NFCMatthias Braun2016-10-111-2/+2
| | | | llvm-svn: 283851
* MIRParser: generic register operands with typesMatthias Braun2016-10-112-2/+3
| | | | | | This should fix the fallout of r283848. llvm-svn: 283850
* Add a second, more complicated, arm64 example program toJason Molenda2016-10-111-11/+169
| | | | | | the arm64 assembly unwind tests. llvm-svn: 283849
* MIRParser: Rewrite register info initialization; mostly NFCMatthias Braun2016-10-116-110/+188
| | | | | | | | | | | | | | | | | | | | | | This changes MachineRegisterInfo to be initializes after parsing all instructions. This is in preparation for upcoming commits that allow the register class specification on the operand or deduce them from the MCInstrDesc. This commit removes the unused feature of having nonsequential register numbers. This was confusing anyway as the vreg numbers would be different after parsing when you had "holes" in your numbering. This patch also introduces the concept of an incomplete virtual register. An incomplete virtual register may be used during .mir parsing to construct MachineOperands without knowing the exact register class (or register bank) yet. NFC except for some error messages. Differential Revision: https://reviews.llvm.org/D22397 llvm-svn: 283848
* Add a first unit test for the arm64 instruction profiled unwindJason Molenda2016-10-118-17/+241
| | | | | | | | | | | | | | | | | | | | | | | plan generator. Fix a small bug in EmulateInstructionARM64::GetFramePointerRegister which was returning the stack pointer reg instead of fp, prevented the unwinder from recognizing the switch to using the fp in a function. (<rdar://problem/28663117>) Add a new eContextRestoreStackPointer context hint so that the arm64 emulator can flag when the frame pointer value is copied back in to the stack pointer and that should be used to compute the canonical frame address again in an epilogue sequence. (<rdar://problem/28704862>) Small changes to UnwindAssemblyInstEmulation to have a method we can call without a live process/thread/etc for unit tests. <rdar://problem/28663117> <rdar://problem/28704862> <rdar://problem/28509178> llvm-svn: 283847
* Fixing the bug number for darwin on this failure.Jim Ingham2016-10-111-1/+3
| | | | llvm-svn: 283843
* Codegen: Tail-duplicate during placement.Kyle Butt2016-10-1125-95/+953
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Issue with early tail-duplication of blocks that branch to a fallthrough predecessor fixed with test case: tail-dup-branch-to-fallthrough.ll Differential revision: https://reviews.llvm.org/D18226 llvm-svn: 283842
* [libFuzzer] implement value profile for switch, increase the size of the PCs ↵Kostya Serebryany2016-10-113-4/+11
| | | | | | array, make sure we don't overflow it llvm-svn: 283841
* [libFuzzer] add switch testsKostya Serebryany2016-10-112-0/+38
| | | | llvm-svn: 283840
* Fixup test/Driver/opt-record.c for nvptx pointer sizeHal Finkel2016-10-111-1/+1
| | | | | | On some systems, it looks like nvptx is used instead of nvptx64. llvm-svn: 283839
* [RegAllocGreedy] Attempt to split unspillable live intervalsDylan McKay2016-10-113-6/+89
| | | | | | | | | | | | | | | | | | | | | | | Summary: Previously, when allocating unspillable live ranges, we would never attempt to split. We would always bail out and try last ditch graph recoloring. This patch changes this by attempting to split all live intervals before performing recoloring. This fixes LLVM bug PR14879. I can't add test cases for any backends other than AVR because none of them have small enough register classes to trigger the bug. Reviewers: qcolombet Subscribers: MatzeB Differential Revision: https://reviews.llvm.org/D25070 llvm-svn: 283838
* Revert "Add section header stream to PDB." because it depends on r283823.Rui Ueyama2016-10-116-64/+19
| | | | | | The change this patch depends on was reverted. llvm-svn: 283837
OpenPOWER on IntegriCloud