summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge duplicated cases. NFC.Rafael Espindola2016-04-151-8/+4
| | | | llvm-svn: 266459
* Revert "[Coverage] Prevent detection of false instantiations in case of ↵Igor Kudrin2016-04-157-102/+19
| | | | | | | | macro expansion." This reverts commit r266436 as it broke buildbot. llvm-svn: 266458
* [ELF] - Implemented basic location counter support.George Rimar2016-04-158-28/+280
| | | | | | | | | | | | | | This patch implements location counter support. It also separates assign addresses for sections to assignAddressesScript() if it scipt exists. Main testcase is test/ELF/linkerscript-locationcounter.s, It contains some work with location counter. It is basic now. Implemented location counter assignment and '+' operations. Patch by myself with LOTS of comments and design suggestions from Rui Ueyama. Differential revision: http://reviews.llvm.org/D18499 llvm-svn: 266457
* [ParallelCG] Add a new splitCodeGen() API which takes a TargetMachineFactory.Davide Italiano2016-04-152-21/+41
| | | | | | | | This is a recommit of r266390 with a fix that will allow tests to pass (hopefully). Before we got a StringRef to M->getTargetTriple() and right after we moved the Module so we were referencing a dangling object. llvm-svn: 266456
* [Release Notes] mention Clang-tidy misc-multiple-statement-macro check.Eugene Zelenko2016-04-151-1/+6
| | | | llvm-svn: 266455
* [SystemZ] Fix large tests broken by conditional returns.Marcin Koscielnicki2016-04-159-0/+27
| | | | | | | | These were broken by D17339. Differential Revision: http://reviews.llvm.org/D19158 llvm-svn: 266454
* [LLD] Remove unwanted --check-prefix=CHECK from unit tests. NFC.Mandeep Singh Grang2016-04-154-4/+4
| | | | | | | | | | | | | | | | | | | | | Summary: Removed unwanted --check-prefix=CHECK from the following unit tests: ELF/aarch64-gnu-ifunc.s ELF/gnu-ifunc-i386.s ELF/gnu-ifunc.s ELF/plt-i686.s Patch by: Mandeep Singh Grang (mgrang) Reviewers: rafael Subscribers: aemerson Projects: #lld Differential Revision: http://reviews.llvm.org/D19149 llvm-svn: 266453
* [InstCombine] Don't transform compares of calls to functions named fabs{f,l,}David Majnemer2016-04-152-30/+37
| | | | | | | | InstCombine wants to optimize compares of calls to fabs with zero. However, we didn't have the necessary legality checking to verify that the function call had the same behavior as fabs. llvm-svn: 266452
* [clang-tidy] Add new checker for suspicious sizeof expressionsEtienne Bergeron2016-04-158-1/+639
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This check is finding suspicious cases of sizeof expression. Sizeof expression is returning the size (in bytes) of a type or an expression. Programmers often abuse or misuse this expression. This checker is adding common set of patterns to detect some of these bad constructs. Some examples found by this checker: R/packages/ifultools/ifultools/src/fra_neig.c ``` /* free buffer memory */ (void) mutil_free( dist_buff, sizeof( ctr * sizeof( double ) ) ); (void) mutil_free( nidx_buff, sizeof( ctr * sizeof( sint32 ) ) ); ``` graphviz/v2_20_2/lib/common/utils.c ``` static Dtdisc_t mapDisc = { offsetof(item, p), sizeof(2 * sizeof(void *)), offsetof(item, link), (Dtmake_f) newItem, (Dtfree_f) freeItem, (Dtcompar_f) cmpItem, NIL(Dthash_f), NIL(Dtmemory_f), NIL(Dtevent_f) }; ``` mDNSResponder/mDNSShared/dnsextd.c ``` context = ( TCPContext* ) malloc( sizeof( TCPContext ) ); require_action( context, exit, err = mStatus_NoMemoryErr; LogErr( "AcceptTCPConnection", "malloc" ) ); mDNSPlatformMemZero( context, sizeof( sizeof( TCPContext ) ) ); context->d = self; ``` Reviewers: alexfh Subscribers: malcolm.parsons, Eugene.Zelenko, cfe-commits Differential Revision: http://reviews.llvm.org/D19014 llvm-svn: 266451
* [clang-tidy] Add checker for operations between integrals and pointersEtienne Bergeron2016-04-159-0/+248
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This check is finding suspicious operations involving pointers and integral types; which are most likely bugs. Examples: subversion/v1_6/subversion/libsvn_subr/utf.c ``` static const char * fuzzy_escape(const char *src, apr_size_t len, apr_pool_t *pool) { [...] while (src_orig < src_end) { if (! svn_ctype_isascii(*src_orig) || src_orig == '\0') // Should be *src_orig { ``` apache2/v2_2_23/modules/metadata/mod_headers.c ``` static char *parse_format_tag(apr_pool_t *p, format_tag *tag, const char **sa) { [...] tag->arg = '\0'; // ERROR: tag->arg has type char* /* grab the argument if there is one */ if (*s == '{') { ++s; tag->arg = ap_getword(p,&s,'}'); } ``` Reviewers: alexfh Subscribers: Eugene.Zelenko, cfe-commits Differential Revision: http://reviews.llvm.org/D19118 llvm-svn: 266450
* Fix testcase for MSVC targets where the output ordering is different.Adrian Prantl2016-04-151-2/+3
| | | | llvm-svn: 266449
* Fix test to require Asserts since it uses debug output.Geoff Berry2016-04-151-0/+1
| | | | llvm-svn: 266448
* Update testcase to new debug info metadata format.Adrian Prantl2016-04-151-4/+3
| | | | llvm-svn: 266447
* [PR27284] Reverse the ownership between DICompileUnit and DISubprogram.Adrian Prantl2016-04-15540-2300/+1766
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently each Function points to a DISubprogram and DISubprogram has a scope field. For member functions the scope is a DICompositeType. DIScopes point to the DICompileUnit to facilitate type uniquing. Distinct DISubprograms (with isDefinition: true) are not part of the type hierarchy and cannot be uniqued. This change removes the subprograms list from DICompileUnit and instead adds a pointer to the owning compile unit to distinct DISubprograms. This would make it easy for ThinLTO to strip unneeded DISubprograms and their transitively referenced debug info. Motivation ---------- Materializing DISubprograms is currently the most expensive operation when doing a ThinLTO build of clang. We want the DISubprogram to be stored in a separate Bitcode block (or the same block as the function body) so we can avoid having to expensively deserialize all DISubprograms together with the global metadata. If a function has been inlined into another subprogram we need to store a reference the block containing the inlined subprogram. Attached to https://llvm.org/bugs/show_bug.cgi?id=27284 is a python script that updates LLVM IR testcases to the new format. http://reviews.llvm.org/D19034 <rdar://problem/25256815> llvm-svn: 266446
* Update to match LLVM changes for PR27284.Adrian Prantl2016-04-1518-109/+105
| | | | | | | | | (Reverse the ownership between DICompileUnit and DISubprogram.) http://reviews.llvm.org/D19034 <rdar://problem/25256815> llvm-svn: 266445
* ASTMatchers.h: Fix formatting. [-Wdocumentation]NAKAMURA Takumi2016-04-151-3/+3
| | | | llvm-svn: 266444
* llvm/test/CodeGen/AArch64/arm64-csldst-mmo.ll requires +Asserts.NAKAMURA Takumi2016-04-151-0/+1
| | | | llvm-svn: 266443
* [SimplifyCFG] propagate branch metadata when creating select (PR27344)Sanjay Patel2016-04-152-3/+3
| | | | | | | | | | This is almost identical to: http://reviews.llvm.org/rL264527 This doesn't solve PR27344; it just allows the profile weights to survive. To solve the bug, we need to use the profile weights in the backend. llvm-svn: 266442
* lli.cpp: Appease some builders. There might be ownership issues between ↵NAKAMURA Takumi2016-04-151-1/+1
| | | | | | LLVMContext and ExecutionEngine. Investigating. llvm-svn: 266441
* Add an interesting GC testcase.Rafael Espindola2016-04-152-0/+32
| | | | | | | It shows that we correctly look at liveness based on the final symbol resolution. llvm-svn: 266440
* [AArch64] Add MMOs to callee-save load/store instructions.Geoff Berry2016-04-152-2/+38
| | | | | | | | | | | | | | Summary: Without MMOs, the callee-save load/store instructions were treated as volatile by the MI post-RA scheduler and AArch64LoadStoreOptimizer. Reviewers: t.p.northover, mcrosier Subscribers: aemerson, rengolin, mcrosier, llvm-commits Differential Revision: http://reviews.llvm.org/D17661 llvm-svn: 266439
* Fix typing on generated LXV2DX/STXV2DX instructionsNirav Dave2016-04-152-5/+49
| | | | | | | | | | | | | | | | | [PPC] Previously when casting generic loads to LXV2DX/ST instructions we would leave the original load return type in place allowing for an assertion failure when we merge two equivalent LXV2DX nodes with different types. This fixes PR27350. Reviewers: nemanjai Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D19133 llvm-svn: 266438
* [MachineScheduler]Add support for store clusteringJun Bum Lim2016-04-1510-66/+254
| | | | | | | | | | | | Perform store clustering just like load clustering. This change add StoreClusterMutation in machine-scheduler. To control StoreClusterMutation, added enableClusterStores() in TargetInstrInfo.h. This is enabled only on AArch64 for now. This change also add support for unscaled stores which were not handled in getMemOpBaseRegImmOfs(). llvm-svn: 266437
* [Coverage] Prevent detection of false instantiations in case of macro expansion.Igor Kudrin2016-04-157-19/+102
| | | | | | | | | | | | | The root of the problem was that findMainViewFileID(File, Function) could return some ID for any given file, even though that file was not the main file for that function. This patch ensures that the result of this function is conformed with the result of findMainViewFileID(Function). Differential Revision: http://reviews.llvm.org/D18787 llvm-svn: 266436
* [SimplifyCFG] add metadata to show failure to propagate (PR27344)Sanjay Patel2016-04-151-7/+10
| | | | llvm-svn: 266435
* [Coverage] Add support for making test data for more than one function.Igor Kudrin2016-04-151-83/+169
| | | | | | Differential Revision: http://reviews.llvm.org/D18758 llvm-svn: 266434
* AMDGPU/SI: Fix regression with no-return atomicsNicolai Haehnle2016-04-152-0/+10
| | | | | | | | | | | | | | | Summary: In the added test-case, the atomic instruction feeds into a non-machine CopyToReg node which hasn't been selected yet, so guard against non-machine opcodes here. Reviewers: arsenm, tstellarAMD Subscribers: arsenm, llvm-commits Differential Revision: http://reviews.llvm.org/D19043 llvm-svn: 266433
* Store a Symbol for EntrySym.Rafael Espindola2016-04-155-7/+10
| | | | | | This makes it impossible to forget to call repl on the SymbolBody. llvm-svn: 266432
* Revert r266415, it broke parsing SDK headers (PR27367).Nico Weber2016-04-1520-163/+48
| | | | llvm-svn: 266431
* prepare-builtins: Remove call to getGlobalContext()Tom Stellard2016-04-151-1/+1
| | | | | | | | This function has been removed from LLVM. Patch By: Laurent Carlier llvm-svn: 266430
* Add a testcase for symbol resolution with -r.Rafael Espindola2016-04-151-0/+14
| | | | llvm-svn: 266429
* Remove include duplicate. NFC.Alexey Bader2016-04-151-1/+0
| | | | llvm-svn: 266428
* Don't create relocations for absolute got entries.Rafael Espindola2016-04-152-7/+22
| | | | llvm-svn: 266427
* [TSAN] Make tsan tests more portable (take 3)Renato Golin2016-04-1551-73/+73
| | | | | | | | Some tests didn't merge stderr with stdout. Patch by Maxim Kuvyrkov. llvm-svn: 266426
* Don't create relocations for non preemptable absolute symbols.Rafael Espindola2016-04-153-1/+41
| | | | llvm-svn: 266425
* Two small related fixes.Rafael Espindola2016-04-153-3/+33
| | | | | | | * A hidden undefined is not preemptable. * It is always zero, so we don't need a dynamic reloc for it. llvm-svn: 266424
* Work around a linux libc bug causing a crash in TaskPoolPavel Labath2016-04-151-2/+3
| | | | | | | | | | | | | | | | | | Summary: Doing a pthread_detach while the thread is exiting can cause crashes or other mischief, so we make sure the thread stays around long enough. The performance impact of the added synchronization should be minimal, as the parent thread is already holding a mutex, so I am just making sure it holds it for a little while longer. It's possible the new thread will block on this mutex immediately after startup, but it should be unblocked really quickly and some blocking is unavoidable if we actually want to have this synchronization. Reviewers: tberghammer Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D19153 llvm-svn: 266423
* Fix usage of APInt.getRawData for big-endian systemsUlrich Weigand2016-04-157-290/+266
| | | | | | | | | | | | | Recommit modified version of r266311 including build bot regression fix. This differs from the original r266311 by: - Fixing Scalar::Promote to correctly zero- or sign-extend value depending on signedness of the *source* type, not the target type. - Omitting a few stand-alone fixes that were already committed separately. llvm-svn: 266422
* [ELF] Remove redundant empty line. NFCSimon Atanasyan2016-04-151-1/+0
| | | | llvm-svn: 266421
* Make Scalar::SChar return an explicit signed typeUlrich Weigand2016-04-152-2/+2
| | | | | | | | This is needed for platforms where the default "char" type is unsigned. Originally committed as part of (now reverted) r266311. llvm-svn: 266420
* Fix Scalar::MakeSigned for 128- and 256-bit types.Ulrich Weigand2016-04-151-2/+2
| | | | | | | | Obvious fix for incorrect result types of the operation. Originally committed as part of (now reverted) r266311. llvm-svn: 266419
* Fix Scalar::SetValueFromData for 128- and 256-bit typesUlrich Weigand2016-04-151-16/+16
| | | | | | | | Obvious fix for incorrect use of GetU64 offset pointer. Originally committed as part of (now reverted) r266311. llvm-svn: 266418
* Fix ABISysV_s390x::GetArgumentValuesUlrich Weigand2016-04-151-2/+1
| | | | | | | | This routine contained a stray "return false;" making part of the code never executed. Also, the stack offset where to find on-stack arguments was incorrect. llvm-svn: 266417
* Make destructor breakpoint location test more resilientPavel Labath2016-04-152-8/+43
| | | | | | | | | | | | | | | | | | | | | | Summary: The original breakpoint location test was failing for linux, because the compilers here tend to merge the full-object and subobject destructors even at -O0 (as a result, we are getting only 2 breakpoint locations, and not 4 as the test expected. The fixup in r266164 substantially weakened the test, as it now did not check whether both kinds of destructors were being found. Because of these contraints, I have altered the logic of the test. It sets the breakpoint by name, and then independently verifies that the breakpoint is set on the correct demangled symbol name (which is not very meaningful since both kinds of destructors demangle to the same name) *and* the correct symbol address (which is obtained by looking up the mangled symbol name). Reviewers: clayborg Subscribers: ovyalov, zturner, lldb-commits Differential Revision: http://reviews.llvm.org/D19052 llvm-svn: 266416
* [MSVC Compat] Implementation of __unaligned (MS extension) as a type qualifierAndrey Bokhanko2016-04-1520-48/+163
| | | | | | | | | | | This patch implements __unaligned as a type qualifier; before that, it was modeled as an attribute. Proper mangling of __unaligned is implemented as well. Some OpenCL code/tests are tangenially affected, as they relied on existing number and sizes of type qualifiers. Differential Revision: http://reviews.llvm.org/D18596 llvm-svn: 266415
* Use MVT instead of EVT to remove a bunch of unnecessary calls to getSimpleVT.Craig Topper2016-04-154-61/+58
| | | | llvm-svn: 266414
* Add a setOperationPromotedToType convenience method that sets an operation ↵Craig Topper2016-04-152-36/+25
| | | | | | to promoted and set the type in one call. Use it so save code in X86. llvm-svn: 266413
* [X86] AND, OR, and XOR of vectors are always legal no need to set them legal ↵Craig Topper2016-04-151-5/+0
| | | | | | explicitly. llvm-svn: 266412
* [Polly] Remove unwanted --check-prefix=CHECK from unit tests. NFC.Mandeep Singh Grang2016-04-152-2/+2
| | | | | | | | | | | | | | | | | Summary: Removed unwanted --check-prefix=CHECK from the following unit tests: DeadCodeElimination/dead_iteration_elimination.ll Isl/CodeGen/simple_vec_cast.ll Patch by: Mandeep Singh Grang (mgrang) Reviewers: jdoerfert, zinob, spop, grosser Projects: #polly Differential Revision: http://reviews.llvm.org/D19143 llvm-svn: 266411
* [X86] Combine an if and else block that had the same set of calls to ↵Craig Topper2016-04-151-47/+24
| | | | | | setOperationAction that only varied in Legal/Custom. Use the ternary operator on that argument instead. NFC llvm-svn: 266410
OpenPOWER on IntegriCloud