summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* RefreshCallGraph does not modify the SCC, adding "const" to make it clear (NFC)Mehdi Amini2016-08-081-3/+3
| | | | llvm-svn: 278037
* Fix linking of omp_foreign_thread_team_reuse test on FreeBSDDimitry Andric2016-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | | Summary: On FreeBSD, linking the misc_bugs/omp_foreign_thread_team_reuse.c test case fails with: /usr/local/bin/ld: /tmp/omp_foreign_thread_team_reuse-c5e71b.o: undefined reference to symbol 'pthread_create@@FBSD_1.0' This is because the program is linked without `-lpthread`. Since the %libomp-compile-and-run macro does not allow that option to be added to the compile command line, split it up and add the required `-lpthread` between %libomp-compile and %libomp-run. Reviewers: jlpeyton, hfinkel, Hahnfeld Subscribers: Hahnfeld, emaste, openmp-commits Differential Revision: https://reviews.llvm.org/D23084 llvm-svn: 278036
* [MemorySSA] Fix windows build breakage caused by r278028Geoff Berry2016-08-082-5/+12
| | | | | r278028: [MemorySSA] Ensure address stability of MemorySSA object. llvm-svn: 278035
* Re-add SystemZ SNaN testElliot Colp2016-08-081-0/+15
| | | | | | | The floating-point bug affecting ninja-x64-msvc-RA-centos6 is fixed (r277813) so this test should now pass llvm-svn: 278034
* [BuildingAJIT] Fix a couple of typos in the Chapter 3 draft.Lang Hames2016-08-081-6/+6
| | | | llvm-svn: 278033
* CMakeLists.txt cleanups: synchronize version with rest of LLVM, consistent ↵Eugene Zelenko2016-08-081-7/+6
| | | | | | | | spacing. Differential revision: https://reviews.llvm.org/D23091 llvm-svn: 278032
* [X86] Improve code size on X86 segment movesNirav Dave2016-08-083-2/+50
| | | | | | | | | | | | | | Moves of a value to a segment register from a 16-bit register is equivalent to one from it's corresponding 32-bit register. Match gas's behavior and rewrite instructions to the shorter of equivalent forms. Reviewers: rnk, ab Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D23166 llvm-svn: 278031
* CMakeLists.txt cleanups: synchronize version with rest of LLVM, consistent ↵Eugene Zelenko2016-08-081-5/+4
| | | | | | | | spacing. Differential revision: https://reviews.llvm.org/D23092 llvm-svn: 278030
* CMakeLists.txt cleanups: synchronize version and CMake minimum required ↵Eugene Zelenko2016-08-081-22/+21
| | | | | | | | version with rest of LLVM, consistent spacing. Differential revision: https://reviews.llvm.org/D23094 llvm-svn: 278029
* [MemorySSA] Ensure address stability of MemorySSA object.Geoff Berry2016-08-082-20/+17
| | | | | | | | | | | | | | | | | Summary: Ensure that the MemorySSA object never changes address when using the new pass manager since the walkers contained by MemorySSA cache pointers to it at construction time. This is achieved by wrapping the MemorySSAAnalysis result in a unique_ptr. Also add some asserts that check for this bug. Reviewers: george.burgess.iv, dberlin Subscribers: mcrosier, hfinkel, chandlerc, silvas, llvm-commits Differential Revision: https://reviews.llvm.org/D23171 llvm-svn: 278028
* [esan] Add iterator to esan's generic hashtableDerek Bruening2016-08-082-3/+179
| | | | | | | | | | | | Summary: Adds simple iterator support to the esan hashtable. Reviewers: aizatsky Subscribers: vitalybuka, zhaoqin, kcc, eugenis, llvm-commits, kubabrecka Differential Revision: https://reviews.llvm.org/D22682 llvm-svn: 278027
* [GPGPU] Create code to verify run-time conditionsTobias Grosser2016-08-082-1/+67
| | | | llvm-svn: 278026
* Fix compilation in 'asserts' modeTobias Grosser2016-08-081-1/+1
| | | | llvm-svn: 278025
* [esan] Add generic resizing hashtableDerek Bruening2016-08-082-0/+384
| | | | | | | | | | | | | | | | | | | | | | Summary: Adds a new, generic, resizing hashtable data structure for use by esan tools. No existing sanitizer hashtable is suitable for the use case for most esan tools: we need non-fixed-size tables, parameterized keys and payloads, and write access to payloads. The new hashtable uses either simple internal or external mutex locking and supports custom hash and comparision operators. The focus is on functionality, not performance, to catalyze creation of a variety of tools. We can optimize the more successful tools later. Adds tests of the data structure. Reviewers: aizatsky Subscribers: vitalybuka, zhaoqin, kcc, eugenis, llvm-commits, kubabrecka Differential Revision: https://reviews.llvm.org/D22681 llvm-svn: 278024
* [clang-tidy] enhance modernize-use-bool-literals to check ternary operatorKirill Bobyrev2016-08-083-16/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | modernize-use-bool-literals doesn't checks operands in ternary operator. For example: ``` c++ static int Value = 1; bool foo() { bool Result = Value == 1 ? 1 : 0; return Result; } bool boo() { return Value == 1 ? 1 : 0; } ``` This issue was reported in bug 28854. The patch fixes it. Reviewers: alexfh, aaron.ballman, Prazek Subscribers: Prazek, Eugene.Zelenko Differential Revision: https://reviews.llvm.org/D23243 llvm-svn: 278022
* [StreamExecutor] Add DeviceMemory and kernel arg packingJason Henline2016-08-084-0/+668
| | | | | | | | | | | | | | Summary: Add types for device memory and add the code that knows how to pack these device memory types if they are passed as arguments to kernel launches. Reviewers: jlebar, tra Subscribers: parallel_libs-commits Differential Revision: https://reviews.llvm.org/D23211 llvm-svn: 278021
* [analyzer] Change -analyze-function to accept qualified names.Artem Dergachev2016-08-085-49/+121
| | | | | | | | | | | | | | | Both -analyze-function and -analyzer-display-progress now share the same convention for naming functions, which allows discriminating between methods with the same name in different classes, C++ overloads, and also presents Objective-C instance and class methods in the convenient notation. This also allows looking up the name for the particular function you're trying to restrict analysis to in the -analyzer-display-progress output, in case it was not instantly obvious. Differential Revision: https://reviews.llvm.org/D22856 llvm-svn: 278018
* [IslNodeBuilder] Move run-time check generation to NodeBuilder [NFC]Tobias Grosser2016-08-083-22/+32
| | | | | | | This improves the structure of the code and allows us to reuse the runtime code generation in the PPCGCodeGeneration. llvm-svn: 278017
* [ARM] Command-line options for embedded position-independent codeOliver Stannard2016-08-085-1/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch (with the corresponding ARM backend patch) adds support for some new relocation models: * Read-only position independence (ROPI): Code and read-only data is accessed PC-relative. The offsets between all code and RO data sections are known at static link time. * Read-write position independence (RWPI): Read-write data is accessed relative to a static base register. The offsets between all writeable data sections are known at static link time. These two modes are independent (they specify how different objects should be addressed), so they can be used individually or together. These modes are intended for bare-metal systems or systems with small real-time operating systems. They are designed to avoid the need for a dynamic linker, the only initialisation required is setting the static base register to an appropriate value for RWPI code. There is one C construct not currently supported by these modes: global variables initialised to the address of another global variable or function, where that address is not known at static-link time. There are a few possible ways to solve this: * Disallow this, and require the user to write their own initialisation function if they need variables like this. * Emit dynamic initialisers for these variables in the compiler, called from the .init_array section (as is currently done for C++ dynamic initialisers). We have a patch to do this, described in my original RFC email (http://lists.llvm.org/pipermail/llvm-dev/2015-December/093022.html), but the feedback from that RFC thread was that this is not something that belongs in clang. * Use a small dynamic loader to fix up these variables, by adding the difference between the load and execution address of the relevant section. This would require linker co-operation to generate a table of addresses that need fixing up. Differential Revision: https://reviews.llvm.org/D23196 llvm-svn: 278016
* [ARM] Add support for embedded position-independent codeOliver Stannard2016-08-0816-21/+551
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for some new relocation models to the ARM backend: * Read-only position independence (ROPI): Code and read-only data is accessed PC-relative. The offsets between all code and RO data sections are known at static link time. This does not affect read-write data. * Read-write position independence (RWPI): Read-write data is accessed relative to the static base register (r9). The offsets between all writeable data sections are known at static link time. This does not affect read-only data. These two modes are independent (they specify how different objects should be addressed), so they can be used individually or together. They are otherwise the same as the "static" relocation model, and are not compatible with SysV-style PIC using a global offset table. These modes are normally used by bare-metal systems or systems with small real-time operating systems. They are designed to avoid the need for a dynamic linker, the only initialisation required is setting r9 to an appropriate value for RWPI code. I have only added support to SelectionDAG, not FastISel, because FastISel is currently disabled for bare-metal targets where these modes would be used. Differential Revision: https://reviews.llvm.org/D23195 llvm-svn: 278015
* [CodeGeneration] Do not set insert position redundantlyTobias Grosser2016-08-081-1/+0
| | | | | | | | There is no need to reset the position of the builder, as we can just continue to insert code at the current position of the IRBuilder, which happens to be precisely the location we reset the builder to. llvm-svn: 278014
* [IslNodeBuilder] Directly use the insert location of our BuilderTobias Grosser2016-08-081-1/+14
| | | | | | | | | ... instead of adding instructions at the end of the basic block the builder is currently at. This makes it easier to reason about where IR is generated, as with the IRBuilder there is just a single location that specificies where IR is generated. llvm-svn: 278013
* [SystemZ] Add support for the .insn directiveZhan Jun Liau2016-08-088-0/+657
| | | | | | | | | | | | | | | | | Summary: Add support for the .insn directive. .insn is an s390 specific directive that allows encoding of an instruction instead of using a mnemonic. The motivating case is some code in node.js that requires support for the .insn directive. Reviewers: koriakin, uweigand Subscribers: koriakin, llvm-commits Differential Revision: https://reviews.llvm.org/D21809 llvm-svn: 278012
* Revert r2277979.Nico Weber2016-08-081-1/+0
| | | | | | | | For some reason, MSVC2013's cl.exe crashes with fatal error C1001: An internal error has occurred in the compiler with this when compiling e.g. LoopDistribute.cpp. llvm-svn: 278011
* GVN-hoist: enable by defaultSebastian Pop2016-08-082-2/+3
| | | | llvm-svn: 278010
* [LVI] NFC. On the fast dest path use inverse predicate instead of inverse ↵Artur Pilipenko2016-08-081-4/+5
| | | | | | | | | | range result Gathering constantins from a condition on the false path ask makeAllowedICmpRegion about inverse predicate instead of inversing the resulting range. This change was separated from the review "[LVI] Make LVI smarter about comparisons with non-constants" (https://reviews.llvm.org/D23205#inline-198361) llvm-svn: 278009
* [LVI] NFC. Rename confusing local NegOffset to OffsetArtur Pilipenko2016-08-081-6/+6
| | | | | | NegOffset is not necessarily negative llvm-svn: 278008
* [LVI] NFC. Extract LHS, RHS, Predicate locals in getValueFromConditionArtur Pilipenko2016-08-081-11/+14
| | | | llvm-svn: 278007
* [analyzer] Command line option to show enabled checker list.Gabor Horvath2016-08-089-6/+76
| | | | | | | | | | | | This patch adds a command line option to list the checkers that were enabled by analyzer-checker and not disabled by -analyzer-disable-checker. It can be very useful to debug long command lines when it is not immediately apparent which checkers are turned on and which checkers are turned off. Differential Revision: https://reviews.llvm.org/D23060 llvm-svn: 278006
* Fix uninitialized field warnings in GDBRemoteRegisterContextPavel Labath2016-08-081-109/+111
| | | | | | | also take the opportunity to replace NULL with nullptr and add clang-format guards to prevent it from messing up the nice table there. llvm-svn: 278005
* Fixes calculateRangesAfterReplacements crash when Replacements is empty.Eric Liu2016-08-082-0/+9
| | | | | | | | | | Reviewers: klimek, djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D23264 llvm-svn: 278004
* kmp_gsupport: Fix library initialization with taskgroupJonas Hahnfeld2016-08-082-1/+17
| | | | | | Differential Revision: https://reviews.llvm.org/D23259 llvm-svn: 278003
* [AArch64] PR28877: Don't assume we're running after legalization when ↵Silviu Baranga2016-08-082-2/+33
| | | | | | | | | | | | | | | | | | | | | | | creating vcvtfp2fxs Summary: The DAG combine transformation that was generating the aarch64_neon_vcvtfp2fxs node was assuming that all inputs where legal and wasn't accounting that the input could be a v4f64 if we're trying to do the transformation before legalization. We now bail out in this case. All illegal types besides v4f64 were already rejected. Fixes https://llvm.org/bugs/show_bug.cgi?id=28877. Reviewers: jmolloy Subscribers: aemerson, rengolin, llvm-commits Differential Revision: https://reviews.llvm.org/D23261 llvm-svn: 278002
* Clean up linux/Ptrace.hPavel Labath2016-08-081-18/+9
| | | | | | | | This removes references to PT_XXX macros from the file, as they were not used anyway. It also changes the macro used to check for the definition of __ptrace_request, as there are other C libraries which do not define this type. llvm-svn: 278001
* Remove Android.hPavel Labath2016-08-088-48/+16
| | | | | | | It only contained a reimplementation of std::to_string, which I have replaced with usages of pre-existing llvm::to_string (also, injecting members into the std namespace is evil). llvm-svn: 278000
* Remove SYS_tgkill from Android.hPavel Labath2016-08-083-4/+1
| | | | | | instead, use __NR_tgkill directly, which seems to be the preferred form in the codebase anyway. llvm-svn: 277999
* Remove _isatty from Android.hPavel Labath2016-08-082-2/+1
| | | | | | it is just #defined to isatty anyway, which lldb already knows how to use. llvm-svn: 277997
* Mark tests with task dependencies as unsupported with GCCJonas Hahnfeld2016-08-082-0/+6
| | | | llvm-svn: 277996
* Re-commit r277988: [mips][ias] Fix all the hacks related to MIPS-specific ↵Daniel Sanders2016-08-0814-185/+289
| | | | | | | | | unary operators (%hi/%lo/%gp_rel/etc.). Hopefully with the MSVC builds fixed. I've added a missing '#include <tuple>' that gcc and clang don't seem to need. llvm-svn: 277995
* Fix Wdocumentation unknown parameter warningSimon Pilgrim2016-08-081-2/+0
| | | | llvm-svn: 277994
* [X86][SSE] Assert if the shuffle mask indices are not -1 or within a valid ↵Simon Pilgrim2016-08-081-8/+5
| | | | | | | | input range As discussed in post-review rL277959 llvm-svn: 277993
* Do not block on explicit task depending on proxy taskJonas Hahnfeld2016-08-083-10/+147
| | | | | | | | | | | | | | | | | | | | | | Consider the following code: int dep; #pragma omp target nowait depend(out: dep) { sleep(1); } #pragma omp task depend(in: dep) { printf("Task with dependency\n"); } printf("Doing some work...\n"); In its current state the runtime will block on the second task and not continue execution. Differential Revision: https://reviews.llvm.org/D23116 llvm-svn: 277992
* __kmp_free_task: Fix for serial explicit tasks producing proxy tasksJonas Hahnfeld2016-08-082-14/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | Consider the following code which may be executed by a serial team: int dep; #pragma omp target nowait depend(out: dep) { sleep(1); } #pragma omp task depend(in: dep) { #pragma omp target nowait { sleep(1); } } Here the explicit task may not be freed until the nested proxy task has finished. The current code hasn't considered this and called __kmp_free_task anyway which triggered an assert because of remaining incomplete children: KMP_DEBUG_ASSERT( TCR_4(taskdata->td_incomplete_child_tasks) == 0 ); Differential Revision: https://reviews.llvm.org/D23115 llvm-svn: 277991
* Revert r277988: [mips][ias] Fix all the hacks related to MIPS-specific unary ↵Daniel Sanders2016-08-0814-287/+185
| | | | | | | | operators (%hi/%lo/%gp_rel/etc.). It seems that MSVC doesn't like std::tie(). llvm-svn: 277990
* [analyzer] Model base to derived casts more precisely.Gabor Horvath2016-08-085-6/+46
| | | | | | | | | | | | | | Dynamic casts are handled relatively well by the static analyzer. BaseToDerived casts however are treated conservatively. This can cause some false positives with the NewDeleteLeaks checker. This patch alters the behavior of BaseToDerived casts. In case a dynamic cast would succeed use the same semantics. Otherwise fall back to the conservative approach. Differential Revision: https://reviews.llvm.org/D23014 llvm-svn: 277989
* [mips][ias] Fix all the hacks related to MIPS-specific unary operators ↵Daniel Sanders2016-08-0814-185/+287
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (%hi/%lo/%gp_rel/etc.). Summary: They are now lexed as a single token on targets where MCAsmInfo::HasMipsExpressions is true and then parsed in a similar way to the '~' operator as part of MCExpr::parseExpression. As a result: * expressions and immediates no longer have different parsing rules. The difference is now solely down to whether evaluateAsAbsolute() succeeds. * %hi(%neg(%gp_rel(x))) are no longer parsed as a single operator and decomposed into the three MipsMCExpr nodes. They are parsed directly as three MipsMCExpr nodes. * parseMemOperand no longer needs to eat all the surrounding parenthesis to get at the outermost operator to make this work * %hi(%neg(%gp_rel(x))) and %lo(%neg(%gp_rel(x))) are no longer the only 3-in-1 relocs that parse for N64. They're still the only combinations that are permitted in relocatable expressions though. Fixing that should be a later patch. * We no longer need to list all the tokens that can occur as the first token of an expression or immediate. test/MC/Mips/expr1.s: This change also prevents the incorrect lowering of %lo(2*4)+foo to %lo(8+foo) which is not an equivalent expression (the difference is whether foo is truncated to 16-bit or not) and the test has been updated to account for the macro expansion the correct expression requires. Reviewers: sdardis Subscribers: dsanders, sdardis, llvm-commits Differential Revision: https://reviews.llvm.org/D23110 llvm-svn: 277988
* [SelectionDAG] Refactor visitInlineAsm a bit. NFCI.Diana Picus2016-08-081-151/+198
| | | | | | This shaves off ~100 lines from visitInlineAsm. llvm-svn: 277987
* [ELF] - Linkerscript: do not define _edata,_end,_etext if SECTIONS is used.George Rimar2016-08-083-46/+24
| | | | | | | | | | | | | | I faced that when tried to link FreeBSD kernel. It was "duplicate symbol: _edata in (internal) and (internal)" error. _data was a shared symbol that came from hack.so. At first it was replaced with DefinedRegular by the code disabled in this patch and later when script tried to define the same symbol - the error was shown. In the same situation (as given in testcase) ld defines them as UND. gold defines as ABS with zero value. Patch just disables any operations of creating these symbols if script do layout. Differential revision: https://reviews.llvm.org/D23206 llvm-svn: 277986
* Fix two bugs for musl-libc on ARMDiana Picus2016-08-082-2/+23
| | | | | | | | | | | | | | | Bug 1: triples like armv7-pc-linux-musl use the wrong linker name ld-musl-armv7.so.1; the right name should be ld-musl-arm.so.1, disregarding the subarch field. Bug 2: when compiler option -mhard-float is used, we should use the "hardfloat" linker, no matter whether the triple itself mentions "hardfloat". Patch by Lei Zhang! Differential Revision: https://reviews.llvm.org/D22904 llvm-svn: 277985
* Add some comments linking back to PR28400.Sean Silva2016-08-084-0/+12
| | | | | | Thanks to Mehdi for the suggestion! llvm-svn: 277984
OpenPOWER on IntegriCloud