summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [Mips] Do not detect a used MIPS toolchain. Build a path suffix for FSFSimon Atanasyan2013-11-262-51/+47
| | | | | | | toolchain first and check the path existence. If the path does not exist build and check a path suffix for Code Sourcery toolchain. llvm-svn: 195751
* [Mips] Call findMIPSABIDirSuffix() for MIPS targets only.Simon Atanasyan2013-11-261-4/+2
| | | | llvm-svn: 195750
* Implement a bunch of custom glibc wrappers & corresponding testsLorenzo Martignoni2013-11-264-88/+925
| | | | llvm-svn: 195749
* [PM] Remove four extraneous 'typename's that Clang (in C++11 mode) isChandler Carruth2013-11-261-4/+4
| | | | | | | | happy with but GCC complains about. I'm assuming both compilers are correct and these are optional in C++11 because I'm too tired to read the standard. ;] llvm-svn: 195748
* [PM] Factor the overwhelming majority of the interface boiler plate outChandler Carruth2013-11-262-166/+143
| | | | | | | | | | | | | | of the two analysis managers into a CRTP base class that can be shared and re-used in building any analysis manager. This will in turn simplify adding yet another analysis manager to the system. The base class provides all of the interface sugar for the analysis manager delegating the functionality back through DerivedT methods which operate on simple pass IDs. It also provides the pass registration, storage, and lookup system which is common across the various formulations of analysis managers. llvm-svn: 195747
* [SystemZ] Fix incorrect use of RISBG for a zero-extended right shiftRichard Sandiford2013-11-262-19/+22
| | | | | | | | | We would wrongly transform the testcase into the equivalent of an AND with 1. The problem was that, when testing whether the shifted-in bits of the right shift were significant, we used the width of the final zero-extended result rather than the width of the shifted value. llvm-svn: 195731
* Fix crash in getStringSplit.Alexander Kornienko2013-11-263-7/+19
| | | | | | | | | | | | | | | | Summary: getStringSplit used to crash, when trying to split a long string literal containing both printable and unprintable multi-byte UTF-8 characters. Reviewers: djasper, klimek Reviewed By: djasper CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D2268 llvm-svn: 195728
* CMake : optionaly enable LLVM to be compiled with -std=c++11 (default: off)Arnaud A. de Grandmaison2013-11-263-0/+8
| | | | | | | | | | In some case, it may be required to build LLVM in C++11 mode, as some the subprojects (like lldb) requires it. This mimics the autoconf behaviour. However, given the discussions on the switch to C++11 of the codebase, this behaviour should evolve to default to C++11 with some checks of the compiler capabilities. llvm-svn: 195727
* [ASan] Use ExitProcess rather than _exit on Windows to avoid calling global ↵Timur Iskhodzhanov2013-11-261-2/+2
| | | | | | dtors etc llvm-svn: 195723
* [PM] Split the CallGraph out from the ModulePass which creates theChandler Carruth2013-11-2617-121/+234
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CallGraph. This makes the CallGraph a totally generic analysis object that is the container for the graph data structure and the primary interface for querying and manipulating it. The pass logic is separated into its own class. For compatibility reasons, the pass provides wrapper methods for most of the methods on CallGraph -- they all just forward. This will allow the new pass manager infrastructure to provide its own analysis pass that constructs the same CallGraph object and makes it available. The idea is that in the new pass manager, the analysis pass's 'run' method returns a concrete analysis 'result'. Here, that result is a 'CallGraph'. The 'run' method will typically do only minimal work, deferring much of the work into the implementation of the result object in order to be lazy about computing things, but when (like DomTree) there is *some* up-front computation, the analysis does it prior to handing the result back to the querying pass. I know some of this is fairly ugly. I'm happy to change it around if folks can suggest a cleaner interim state, but there is going to be some amount of unavoidable ugliness during the transition period. The good thing is that this is very limited and will naturally go away when the old pass infrastructure goes away. It won't hang around to bother us later. Next up is the initial new-PM-style call graph analysis. =] llvm-svn: 195722
* [PM] Reformat some code with clang-format as I'm going to be editting asChandler Carruth2013-11-261-21/+12
| | | | | | | part of generalizing the call graph infrastructure for the new pass manager. llvm-svn: 195718
* [PM] Add a really simple trait to the DOTGraphTraitsPass class templatesChandler Carruth2013-11-261-20/+36
| | | | | | | | | | that lets the analysis and graph types be separate and the graph computed from the analysis through some arbitrary user-supplied code. This will allow a call graph to an independent entity from the pass which creates it which is necessary for the new pass manager. llvm-svn: 195717
* Refactored the implementation of AArch64 NEON instruction ZIP, UZPKevin Qin2013-11-264-328/+240
| | | | | | | and TRN. Fix a bug when mixed use of vget_high_u8() and vuzp_u8(). llvm-svn: 195716
* [PM] Re-format this code with clang-format before making substantialChandler Carruth2013-11-261-8/+8
| | | | | | | | | | | | | | | changes to it. No functionality changed. You may wonder why on earth touching this code is involved in the pass manager work as indicated by my lovely '[PM]' tag? Let me tell you a story. <redacted> Yea, it's too long of a story. Let us say that there are yaks, many of them. I am busy shaving them as fast as I can. llvm-svn: 195715
* Remove some unused localsAlp Toker2013-11-262-3/+1
| | | | llvm-svn: 195714
* [AArch64]Implement 128 bit register copy with NEON.Kevin Qin2013-11-262-17/+22
| | | | llvm-svn: 195713
* StackMap: Implement support for DirectMemRefOp.Andrew Trick2013-11-267-20/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A Direct stack map location records the address of frame index. This address is itself the value that the runtime requested. This differs from IndirectMemRefOp locations, which refer to a stack locations from which the requested values must be loaded. Direct locations can directly communicate the address if an alloca, while IndirectMemRefOp handle register spills. For example: entry: %a = alloca i64... llvm.experimental.stackmap(i32 <ID>, i32 <shadowBytes>, i64* %a) Since both the alloca and stackmap intrinsic are in the entry block, and the intrinsic takes the address of the alloca, the runtime can assume that LLVM will not substitute alloca with any intervening value. This must be verified by the runtime by checking that the stack map's location is a Direct location type. The runtime can then determine the alloca's relative location on the stack immediately after compilation, or at any time thereafter. This differs from Register and Indirect locations, because the runtime can only read the values in those locations when execution reaches the instruction address of the stack map. llvm-svn: 195712
* whitespaceAndrew Trick2013-11-261-5/+5
| | | | llvm-svn: 195711
* Unbreak -fms-extensions with GNU libc headersAlp Toker2013-11-264-4/+35
| | | | | | | | | | | | | GNU libc uses '__uptr' as a member name in C mode, conflicting with the eponymous MSVC pointer modifier keyword. Detect and mark the token as an identifier when these specific conditions are met. __uptr will continue to work as a keyword for the remainder of the translation unit. Fixes PR17824. llvm-svn: 195710
* [PM] Make the (really awesome) file comment here available as part ofChandler Carruth2013-11-261-40/+41
| | | | | | the Doxygen. llvm-svn: 195709
* [PM] Reformat this file with clang-format. Mostly fixes inconsistentChandler Carruth2013-11-261-32/+29
| | | | | | | | spacing around the '*' in pointer types. Will let me use clang-format on subsequent changes without introducing any noise. No functionality changed. llvm-svn: 195708
* Add decorator for FreeBSD failing test due to pr18061Ed Maste2013-11-261-1/+1
| | | | | | | | | | The test code locks mutexes from one thread and unlocks them from a different one, which is not valid (it's either undefined behaviour or is required to return an error). See http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_mutex_lock.html llvm-svn: 195707
* DebugInfo: Update test case due to dumper improvements in r195698David Blaikie2013-11-261-1/+1
| | | | | | | | | | The dumper was only dumping one pubtypes set and it was /always/ dumping one pubtypes set even when there were zero sets. Now that the dumper correctly dumps zero, one, or many sets, we can update this test case to test for the absolute absence of a set rather than a bogus/accidental zero-valued set. llvm-svn: 195706
* Lift self-copy protection up to the header file and add self-moveChandler Carruth2013-11-262-4/+7
| | | | | | | | | | | | protection to the same layer. This is in line with Howard's advice on how best to handle self-move assignment as he explained on SO[1]. It also ensures that implementing swap with move assignment continues to work in the case of self-swap. [1]: http://stackoverflow.com/questions/9322174/move-assignment-operator-and-if-this-rhs llvm-svn: 195705
* Fix a self-memcpy which only breaks under Valgrind's memcpyChandler Carruth2013-11-261-0/+3
| | | | | | | implementation. Silliness, but it'll be a trivial performance optimization. This should clear up a failure on the vg_leak bot. llvm-svn: 195704
* Fix buildbot.Richard Smith2013-11-261-1/+1
| | | | llvm-svn: 195703
* [PM] Sink a trailing comment to be a doxygen comment.Chandler Carruth2013-11-261-1/+3
| | | | llvm-svn: 195702
* [PM] Rename the 'Mod' member to the more idiomatic 'M'. No functionalityChandler Carruth2013-11-262-5/+5
| | | | | | changed. llvm-svn: 195701
* DebugInfo: Remove CompileUnit::constructTypeDIEImpl now that it's just a ↵David Blaikie2013-11-262-15/+2
| | | | | | | | | simple wrapper again. r195698 moved the type unit checking up into getOrCreateTypeDIE so remove the redundant check and fold the functions back together again. llvm-svn: 195700
* [PM] Clean up a bunch of comments, modernize the doxygen, nuke someChandler Carruth2013-11-261-83/+86
| | | | | | | whitespace, and a couple of argument name fixes before I start hacking on this code. No functionality changed here. llvm-svn: 195699
* DebugInfo: Avoid emitting pubtype entries for type DIEs that just indirect ↵David Blaikie2013-11-263-59/+75
| | | | | | to a type unit. llvm-svn: 195698
* Add an intrinsic for the SSE2 PAUSE instruction.Cameron McInally2013-11-263-1/+12
| | | | llvm-svn: 195697
* DebugInfo: Pubtypes: Coelesce pubtype registration with accelerator type ↵David Blaikie2013-11-263-49/+13
| | | | | | | | | | registration. It might be possible to eventually use one data structure, but I haven't looked at the exact criteria used for accelerator tables and pubtypes to see if there's good reason for the differences between the two or not. llvm-svn: 195696
* build-libc-list.py: Replace --{,usr,gcc}lib with flags for specific libraries.Peter Collingbourne2013-11-251-12/+23
| | | | | | | This should allow us to cope with newer versions of GCC (and more esoteric directory layouts). llvm-svn: 195695
* Don't use T as template argument, it is part of the applicationJoerg Sonnenberger2013-11-252-2/+2
| | | | | | namespace. llvm-svn: 195693
* [PECOFF] Skip sections with LNK_INFO.Rui Ueyama2013-11-251-2/+3
| | | | | | | | According to the PE/COFF spec, a section with IMAGE_SCN_LNK_INFO should only appear in an object file, and not allowed in an executable. So I believe treating it as the same way as IMAGE_SCN_LNK_INFO is the right thing. llvm-svn: 195692
* Add the test case that I missed when committing r195528. Doh!Chandler Carruth2013-11-251-0/+60
| | | | llvm-svn: 195691
* Clang format VS plugin: update build prerequisites in the READMEHans Wennborg2013-11-251-1/+2
| | | | llvm-svn: 195690
* [PECOFF] String pointed by StringRef is not always NUL-terminated.Rui Ueyama2013-11-251-1/+2
| | | | | | | In order not to overrun a StringRef and copy the trailing garbage, we need to set the maximum length to be copied by strncpy. llvm-svn: 195688
* PR18044: Reject declarations of enumtype::X early to avoid an assertion inRichard Smith2013-11-252-1/+15
| | | | | | downstream code. llvm-svn: 195687
* Fix compile warningsEd Maste2013-11-251-2/+2
| | | | llvm-svn: 195685
* Do the string comparison in the constructor instead of once per nop.Rafael Espindola2013-11-251-6/+9
| | | | | | Thanks to Roman Divacky for the suggestion. llvm-svn: 195684
* Remove unused variableEd Maste2013-11-251-2/+0
| | | | llvm-svn: 195683
* Use -triple to fix the test on non-ELF hosts.Rafael Espindola2013-11-251-16/+16
| | | | llvm-svn: 195682
* Correct a standalone debug file pathEd Maste2013-11-251-4/+4
| | | | | | | | | | | | For a file /bin/ls with a .gnu_debuglink entry of "ls.debug" the path should be /usr/lib/debug/bin/ls.debug, not /usr/lib/debug/bin/ls. ref: https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html llvm.org/pr17903 http://llvm-reviews.chandlerc.com/D2169 llvm-svn: 195681
* Don't use nopl in cpus that don't support it.Rafael Espindola2013-11-252-3/+30
| | | | | | | | | | | | | | | Patch by Mikulas Patocka. I added the test. I checked that for cpu names that gas knows about, it also doesn't generate nopl. The modified cpus: i686 - there are i686-class CPUs that don't have nopl: Via c3, Transmeta Crusoe, Microsoft VirtualBox - see https://bbs.archlinux.org/viewtopic.php?pid=775414 k6, k6-2, k6-3, winchip-c6, winchip2 - these are 586-class CPUs via c3 c3-2 - see https://bugs.archlinux.org/task/19733 as a proof that Via c3 and c3-Nehemiah don't have nopl llvm-svn: 195679
* ARM integrated assembler generates incorrect nop opcodeDavid Peixotto2013-11-253-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes a bug in the assembler that was causing bad code to be emitted. When switching modes in an assembly file (e.g. arm to thumb mode) we would always emit the opcode from the original mode. Consider this small example: $ cat align.s .code 16 foo: add r0, r0 .align 3 add r0, r0 $ llvm-mc -triple armv7-none-linux align.s -filetype=obj -o t.o $ llvm-objdump -triple thumbv7 -d t.o Disassembly of section .text: foo: 0: 00 44 add r0, r0 2: 00 f0 20 e3 blx #4195904 6: 00 00 movs r0, r0 8: 00 44 add r0, r0 This shows that we have actually emitted an arm nop (e320f000) instead of a thumb nop. Unfortunately, this encodes to a thumb branch which causes bad things to happen when compiling assembly code with align directives. The fix is to notify the ARMAsmBackend when we switch mode. The MCMachOStreamer was already doing this correctly. This patch makes the same change for the MCElfStreamer. There is still a bug in the way nops are emitted for alignment because the MCAlignment fragment does not store the correct mode. The ARMAsmBackend will emit nops for the last mode it knew about. In the example above, we still generate an arm nop if we add a `.code 32` to the end of the file. PR18019 llvm-svn: 195677
* Make the integrated assembler the default for cygwin/mingw too.Rafael Espindola2013-11-254-13/+18
| | | | | | | The integrated assembler was already the default for win32. It is now able to handle a clang bootstrap on mingw, so make it the default. llvm-svn: 195676
* Making type_tag_for_datatype consistent with its declared subject from ↵Aaron Ballman2013-11-252-2/+8
| | | | | | | | Attr.td. Also updated the related testcase. Reviewed by Dmitri Gribenko. llvm-svn: 195675
* Fix test failure on targets where size_t is unsigned int.Richard Smith2013-11-251-1/+1
| | | | llvm-svn: 195673
OpenPOWER on IntegriCloud