summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [Driver] Support -muclibc / -mglibc command line options for a coupleSimon Atanasyan2014-08-1398-4/+370
| | | | | | | | | | | | | of MIPS toolchains. The uCLibc implemented for multiple architectures. A couple of MIPS toolchains contains both uCLibc and glibc implementation so these options allow to select used C library. Initially -muclibc / -mglibc (as well as -mbionic) have been implemented in gcc for various architectures so they are not MIPS specific. llvm-svn: 215552
* For NetBSD, use the same settings for PPC64 as for PPC when it comes toJoerg Sonnenberger2014-08-136-7/+73
| | | | | | | integrated assembler, libc++ and libgcc. Set emulation for ld for both platforms for correct -m32 handling. llvm-svn: 215551
* Fix linking in the Makefile build.Benjamin Kramer2014-08-131-1/+1
| | | | llvm-svn: 215550
* Fix crasher bug in clang-format.Manuel Klimek2014-08-132-1/+8
| | | | llvm-svn: 215549
* [clang-tidy] Add a generic header guard checker + LLVM implementation.Benjamin Kramer2014-08-1311-1/+452
| | | | | | | | | | | | | | | | | | | | The implementation is split into a generic part and a LLVM-specific part. Other codebases can implement it with their own style. The specific features supported are: - Verification (and fixing) of header guards against a style based on the file path - Automatic insertion of header guards for headers that are missing them - A warning when the header guard doesn't enable our fancy header guard optimization (e.g. when there's an include preceeding the guard) - Automatic insertion of a comment with the guard name after #endif. For the LLVM style we disable #endif comments for now, they're not very common in the codebase. We also only flag headers in the include directories, there doesn't seem to be a common style outside. Differential Revision: http://reviews.llvm.org/D4867 llvm-svn: 215548
* Remove unused private fields from r215544 to appease buildbots.Chad Rosier2014-08-132-8/+2
| | | | llvm-svn: 215547
* tsan: fix unaligned memory access routineDmitry Vyukov2014-08-131-3/+3
| | | | | | It was possimitically handling an aligned 8-byte access as 2 4-byte accesses. llvm-svn: 215546
* Try to unbreak the Makefile build.Benjamin Kramer2014-08-131-0/+1
| | | | llvm-svn: 215545
* [AArch64] Initial ELF/AArch64 SupportChad Rosier2014-08-1343-5/+1837
| | | | | | | | | | This patch adds the initial ELF/AArch64 support to lld. Only a basic "Hello World" app has been successfully tested for both dynamic and static compiling. Differential Revision: http://reviews.llvm.org/D4778 Patch by Daniel Stewart <stewartd@codeaurora.org>! llvm-svn: 215544
* Also run extra tools unit tests in shared library builds.Benjamin Kramer2014-08-132-5/+24
| | | | | | Took me way too long to figure out why they didn't run. llvm-svn: 215543
* [mips] Refactor calls to setCanHaveModuleDir.Toma Tabacu2014-08-132-133/+55
| | | | | | | | | | | | | | | | | Summary: Moved some calls to setCanHaveModuleDir to the MipsTargetStreamer base class and removed the resulting empty functions from the MipsTargetELFStreamer class. Also fixed a missing call to setCanHaveModuleDir in MipsTargetELFStreamer::emitDirectiveSetMicroMips. Reviewers: dsanders Reviewed By: dsanders Subscribers: tomatabacu Differential Revision: http://reviews.llvm.org/D4781 llvm-svn: 215542
* Default getFile() to use the last accessed name in the FileEntry.Manuel Klimek2014-08-134-0/+20
| | | | | | | | | | | | With modules we start accessing headers for the first time while reading the module map, which often has very different paths from the include scanning logic. Using the name by which the file was accessed gets us one step closer to the right solution, which is using a FileName abstraction that decouples the name by which a file was accessed from the FileEntry. llvm-svn: 215541
* [shuffle] Stand back! I'm about to (try to) do math!Chandler Carruth2014-08-131-2/+39
| | | | | | | | | | | | | | | | | | | Especially with blends and large tree heights there was a problem with the fuzzer where it would end up with enough undef shuffle elements in enough parts of the tree that in a birthday-attack kind of way we ended up regularly having large numbers of undef elements in the result. I was seeing reasonably frequent cases of *all* results being undef which prevents us from doing any correctness checking at all. While having undef lanes is important, this was too much. So I've tried to apply some math to the probabilities of having an undef lane and balance them against the tree height. Please be gentle, I'm really terrible at math. I probably made a bunch of amateur mistakes here. Fixes, etc. are quite welcome. =D At least in running it some, it seems to be producing more interesting (for correctness testing) results. llvm-svn: 215540
* Asserting that the call to chdir succeeds in this test. Fixes some ↵Aaron Ballman2014-08-131-2/+2
| | | | | | -Wunused-result warnings. llvm-svn: 215539
* [optnone] Make the optnone attribute effective at suppressing functionChandler Carruth2014-08-132-7/+37
| | | | | | | | | | | | | attribute and function argument attribute synthesizing and propagating. As with the other uses of this attribute, the goal remains a best-effort (no guarantees) attempt to not optimize the function or assume things about the function when optimizing. This is particularly useful for compiler testing, bisecting miscompiles, triaging things, etc. I was hitting specific issues using optnone to isolate test code from a test driver for my fuzz testing, and this is one step of fixing that. llvm-svn: 215538
* Silence a -Wparenthesis warning with these asserts. NFC.Aaron Ballman2014-08-131-2/+2
| | | | llvm-svn: 215537
* [SKX] Extended non-temporal load/store instructions for AVX512VL subsets.Robert Khasanov2014-08-137-36/+391
| | | | | | | | | Added avx512_movnt_vl multiclass for handling 256/128-bit forms of instruction. Added encoding and lowering tests. Reviewed by Elena Demikhovsky <elena.demikhovsky@intel.com> llvm-svn: 215536
* Re-commit: [mips] Implement .ent, .end, .frame, .mask and .fmask.Daniel Sanders2014-08-135-22/+369
| | | | | | | | | | | Patch by Matheus Almeida and Toma Tabacu The lld test failure on the previous attempt to commit was caused by the addition of the .pdr section causing the offsets it was checking to change. This has been fixed by removing the .ent/.end directives from that test since they weren't really needed. llvm-svn: 215535
* [mips] Remove .end and .end from test/elf/Mips/hilo16-3.testDaniel Sanders2014-08-131-2/+0
| | | | | | | | | | | The commit of the .ent/.end implementation will change the result of the relocation evaluations (because of a new section and additional relocations) which will lead to a failure if the .ent/.end directives are present in this test. We don't really need the .ent/.end directives in this test so let's just remove them to preserve the current output. llvm-svn: 215534
* [shuffle] Make the seed an optional component and add support forChandler Carruth2014-08-131-2/+3
| | | | | | letting the python very directly compute a UUID. llvm-svn: 215533
* Revert r215415 which causse MSan to crash on a great deal of C++ code.Chandler Carruth2014-08-132-23/+0
| | | | | | I've followed up on the original commit as well. llvm-svn: 215532
* Emit diagnostic for -munaligned-access on v6m targetsOliver Stannard2014-08-132-1/+7
| | | | | | | | | | Rather than silently disabling unaligned accesses for v6m targets as in the previous patch to llvm, instead produce a warning saying that this architecture doesn't support unaligned accesses. Patch by Ben Foster llvm-svn: 215531
* [shuffle] Teach the shuffle fuzzer to fuzz blends, including formingChandler Carruth2014-08-131-39/+67
| | | | | | | | | | | | | | | | | a tree of inputs to blend iteratively together. This required a pretty substantial rewrite of the innards. The number of shuffle instructions is now bounded in terms of tree-height. There is a flag to disable blends so that its still possible to test single input shuffles. I've also improved various aspects of how the test program is generated, primarily to simplify the test harness and allow some optimizations to clean up how we actually check the results and build up the inputs. Again, apologies for my likely horrible use of Python... But hey, it works! (Ish?) llvm-svn: 215530
* clang-format: Format long lists in columns if without bin-packing.Daniel Jasper2014-08-132-3/+12
| | | | | | | | | | | | | | | | After (even with BinPacking = false): const Aaaaaa aaaaa = { aaaaa, bbbbb, ccccc, ddddd, eeeee, ffffff, ggggg, hhhhhh, iiiiii, jjjjjj, kkkkkk, aaaaa, bbbbb, ccccc, ddddd, eeeee, ffffff, ggggg, hhhhhh, iiiiii, jjjjjj, kkkkkk, }; Before: <each element on its own line> This fixes http://llvm.org/PR20623. llvm-svn: 215529
* Fix formattingTobias Grosser2014-08-131-2/+1
| | | | llvm-svn: 215528
* clang-format: Understand #defines defining system includes.Daniel Jasper2014-08-132-2/+14
| | | | | | | | | | Before: #define MY_IMPORT < a / b > After: #define MY_IMPORT <a/b> llvm-svn: 215527
* AVX-512: Fixed a bug in shufflevector lowering.Elena Demikhovsky2014-08-132-1/+20
| | | | | | | PALIGNR instruction does not exist in AVX-512F set. Added a test. llvm-svn: 215526
* InstCombine: Combine (xor (or %a, %b) (xor %a, %b)) to (add %a, %b)Karthik Bhat2014-08-132-0/+23
| | | | | | | | | | | | | Correctness proof of the transform using CVC3- $ cat t.cvc A, B : BITVECTOR(32); QUERY BVXOR(A | B, BVXOR(A,B) ) = A & B; $ cvc3 t.cvc Valid. llvm-svn: 215524
* [NVPTX] Remove MemIntrinsicSDNode/MemSDNode duplicate checkingHal Finkel2014-08-131-7/+0
| | | | | | | | | | | As of r214452, isa<MemSDNode> will return true for nodes for which isa<MemIntrinsicSDNode> will return true (classof now respects the actual class hierarchy). So we no longer need to check for both MemIntrinsicSDNode and MemSDNode separately. No functionality change intended. llvm-svn: 215523
* Fix examples of "named metadata" (some of which isn't named).Nick Lewycky2014-08-131-2/+2
| | | | llvm-svn: 215522
* [shuffle] Tweak the shuffle fuzzer to support bigger seeds. I'mChandler Carruth2014-08-131-6/+6
| | | | | | currently using UUIDs to seed this in order to scan a bigger range. llvm-svn: 215521
* PR20634: add some more cases that can legitimately come after a struct ↵Richard Smith2014-08-134-4/+17
| | | | | | declaration to our list of special cases. llvm-svn: 215520
* [x86] Rewrite a core part of the new vector shuffle lowering to handleChandler Carruth2014-08-132-22/+141
| | | | | | | | | | | | | | | | | | | | one pesky test case correctly. This test case caused the old code to infloop occilating between solving the low-half and the high-half. The 'side balancing' part of single-input v8 shuffle lowering didn't handle the one pattern which can cause it to occilate. Fortunately the fuzz testing found this case. Unfortuately it was *terrible* to handle. I'm really sorry for the amount and density of the code here, I'd love suggestions on how to simplify it. I feel like there *must* be a simpler form here, but after a lot of days I've not found it. This is the only one I've found that even works. I've added the one pesky test case along with some nice comments explaining the core problem that we have to solve here. So far this has survived approximately 32k test cases. More strenuous fuzzing commencing. llvm-svn: 215519
* [modules] When performing a lookup into a namespace, ensure that any laterRichard Smith2014-08-1315-27/+82
| | | | | | | | | | redefinitions of that namespace have already been loaded. When writing out the names in a namespace, if we see a name that is locally declared and had imported declarations merged on top of it, export the local declaration as the lookup result, because it will be the most recent declaration of that entity in the redeclaration chain of an importer of the module. llvm-svn: 215518
* [PowerPC] Implement PPCTargetLowering::getTgtMemIntrinsicHal Finkel2014-08-137-5/+92
| | | | | | | | | | | | | | | | | This implements PPCTargetLowering::getTgtMemIntrinsic for Altivec load/store intrinsics. As with the construction of the MachineMemOperands for the intrinsic calls used for unaligned load/store lowering, the only slight complication is that we need to represent a larger memory range than the loaded/stored value-type size (because the address is rounded down to an aligned address, and we need to conservatively represent the entire possible range of the actual access). This required adding an extra size field to TargetLowering::IntrinsicInfo, and this was done in a way that required no modifications to other targets (the size defaults to the store size of the provided memory data type). This fixes test/CodeGen/PowerPC/unal-altivec-wint.ll (so it can be un-XFAILed). llvm-svn: 215512
* Fix classof for ISD::INTRINSIC_W_CHAIN and INTRINSIC_VOIDHal Finkel2014-08-133-4/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunately, our use of the SDNode class hierarchy for INTRINSIC_W_CHAIN and INTRINSIC_VOID nodes is somewhat broken right now. These nodes sometimes are used for memory intrinsics (those with MachineMemOperands), and sometimes not. When not, the nodes are not created as instances of MemIntrinsicSDNode, but rather created as some other subclass of SDNode using DAG::getNode. When they are memory intrinsics, they are created using DAG::getMemIntrinsicNode as instances of MemIntrinsicSDNode. MemIntrinsicSDNode is a subclass of MemSDNode, but prior to r214452, we had a non-self-consistent setup whereby MemIntrinsicSDNode::classof on INTRINSIC_W_CHAIN and INTRINSIC_VOID would return true but MemSDNode::classof on INTRINSIC_W_CHAIN and INTRINSIC_VOID would return false. In r214452, MemSDNode::classof was changed to return true for INTRINSIC_W_CHAIN and INTRINSIC_VOID, which is now self-consistent. The problem is that neither the pre-r214452 logic and the post-r214452 logic are really right. The truth is that not all INTRINSIC_W_CHAIN and INTRINSIC_VOID nodes are instances of MemIntrinsicSDNode (or MemSDNode for that matter), and the return value from classof needs to reflect that. This was broken before r214452 (because MemIntrinsicSDNode::classof always returned true), and was broken afterward (because MemSDNode::classof also always returned true), and will now be correct. The minimal solution is to grab one of the SubclassData bits (there is one left for MemIntrinsicSDNode nodes) and use it to store whether or not a particular INTRINSIC_W_CHAIN or INTRINSIC_VOID is really an instance of MemIntrinsicSDNode or not. Doing this allows both MemIntrinsicSDNode::classof and MemSDNode::classof to return the correct answer for the underlying object for both the memory-intrinsic and non-memory-intrinsic cases. This fixes the problem that r214452 created in the SelectionDAGDumper (thanks to Matt Arsenault for pointing it out). Because PowerPC does not implement getTgtMemIntrinsic, this change breaks test/CodeGen/PowerPC/unal-altivec-wint.ll. I've XFAILed it for now, and will fix it in a follow-up commit. llvm-svn: 215511
* gcc_esp_i386 and gcc_ebp_i386 had their values backwards forJason Molenda2014-08-131-2/+10
| | | | | | | | | i386 eh_frame register numbering, encoding a darwin-specific bug in the register numbering. Update the definitions to be the correct values, Darwin can use the register numbers from debugserver. Patch from Tong Shen. llvm-svn: 215488
* [AVX512] Verify the code generated for the intrinsic _mm512_broadcastsd_pdAdam Nemet2014-08-131-0/+18
| | | | llvm-svn: 215487
* [AVX512] Add intrinsics for FP scalar broadcastsAdam Nemet2014-08-132-0/+32
| | | | | | | | | | Similar approach to the set1 intrinsics is used: implement in terms of vector initializers and then ensure with an LLVM test that a broadcast is generated at the end. Part of <rdar://problem/17688758> llvm-svn: 215486
* [UBSan] Add returns-nonnull sanitizer.Alexey Samsonov2014-08-138-13/+86
| | | | | | | | | | | | | | | | | | | | Summary: This patch adds a runtime check verifying that functions annotated with "returns_nonnull" attribute do in fact return nonnull pointers. It is based on suggestion by Jakub Jelinek: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140623/223693.html. Test Plan: regression test suite Reviewers: rsmith Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4849 llvm-svn: 215485
* Add comment explaining the dwarf v. eh_frame register numbering usedJason Molenda2014-08-131-1/+6
| | | | | | on i386 darwin. llvm-svn: 215484
* Fix -Wsign-compare warningsDavid Blaikie2014-08-121-3/+3
| | | | llvm-svn: 215483
* [MSan] Disable coredump for 64-bit binaries.Alexey Samsonov2014-08-121-0/+1
| | | | llvm-svn: 215482
* [TSan] Share the code the setup code calling getrlim/setrlim with ↵Alexey Samsonov2014-08-126-51/+52
| | | | | | sanitizer_common llvm-svn: 215481
* Objective-C [qoi]. Patch to not do Fix-It for fixingFariborz Jahanian2014-08-122-3/+21
| | | | | | | | | a messaging expression except in the simple case of a unary selector. We cannot reliably provide such a fixit due to numerous reasons where a matching selector could not be found. rdar://15756038 llvm-svn: 215480
* [Sanitizer] Make disable_coredump a common flag and use it in TSanAlexey Samsonov2014-08-125-10/+8
| | | | llvm-svn: 215479
* APInt: Make self-move-assignment a no-op to fix stage3 clang-clReid Kleckner2014-08-122-2/+28
| | | | | | | | | | | | | | | | | | | | | | It's not clear what the semantics of a self-move should be. The consensus appears to be that a self-move should leave the object in a moved-from state, which is what our existing move assignment operator does. However, the MSVC 2013 STL will perform self-moves in some cases. In particular, when doing a std::stable_sort of an already sorted APSInt vector of an appropriate size, one of the merge steps will self-move half of the elements. We don't notice this when building with MSVC, because MSVC will not synthesize the move assignment operator for APSInt. Presumably MSVC does this because APInt, the base class, has user-declared special members that implicitly delete move special members. Instead, MSVC selects the copy-assign operator, which defends against self-assignment. Clang, on the other hand, selects the move-assign operator, and we get garbage APInts. llvm-svn: 215478
* Remove a condition that can never be true, as wittnessed by the assertAdrian Prantl2014-08-121-3/+2
| | | | | | above. llvm-svn: 215477
* Fix the \param comments to have the parameter name.Samuel Benzaquen2014-08-123-7/+11
| | | | | | | | | | | | Summary: This fixes the build break introduced in rL215472 Reviewers: pcc Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D4875 llvm-svn: 215476
* Fixed launching in shell on haswell enabled Macs to work more than once when ↵Greg Clayton2014-08-121-1/+3
| | | | | | | | | | | | | | | | you do: % lldb -x /bin/ls (lldb) r (lldb) r Prior to this fix the first time it would run /usr/bin/arch with "-arch x86_64" the first time and succeed, and fail the second when the target had updated its architecture to x86_64h. We can't specify x86_64h to /usr/bin/arch, it doesn't handle it. Also fixed it so /usr/bin/arch is only used for Apple triples. <rdar://problem/17951312> llvm-svn: 215475
OpenPOWER on IntegriCloud