- Apr 16, 2016
-
-
George Rimar authored
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
-
Davide Italiano authored
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
-
Eugene Zelenko authored
llvm-svn: 266455
-
Marcin Koscielnicki authored
These were broken by D17339. Differential Revision: http://reviews.llvm.org/D19158 llvm-svn: 266454
-
Mandeep Singh Grang authored
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 -
David Majnemer authored
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
-
Etienne Bergeron authored
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 -
Etienne Bergeron authored
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 -
Adrian Prantl authored
llvm-svn: 266449
-
Geoff Berry authored
llvm-svn: 266448
-
Adrian Prantl authored
llvm-svn: 266447
-
- Apr 15, 2016
-
-
Adrian Prantl authored
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
-
Adrian Prantl authored
(Reverse the ownership between DICompileUnit and DISubprogram.) http://reviews.llvm.org/D19034 <rdar://problem/25256815> llvm-svn: 266445
-
NAKAMURA Takumi authored
llvm-svn: 266444
-
NAKAMURA Takumi authored
llvm-svn: 266443
-
Sanjay Patel authored
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
-
NAKAMURA Takumi authored
lli.cpp: Appease some builders. There might be ownership issues between LLVMContext and ExecutionEngine. Investigating. llvm-svn: 266441
-
Rafael Espindola authored
It shows that we correctly look at liveness based on the final symbol resolution. llvm-svn: 266440
-
Geoff Berry authored
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
-
Nirav Dave authored
[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
-
Jun Bum Lim authored
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
-
Igor Kudrin authored
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
-
Sanjay Patel authored
llvm-svn: 266435
-
Igor Kudrin authored
Differential Revision: http://reviews.llvm.org/D18758 llvm-svn: 266434
-
Nicolai Haehnle authored
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
-
Rafael Espindola authored
This makes it impossible to forget to call repl on the SymbolBody. llvm-svn: 266432
-
Nico Weber authored
llvm-svn: 266431
-
Tom Stellard authored
This function has been removed from LLVM. Patch By: Laurent Carlier llvm-svn: 266430
-
Rafael Espindola authored
llvm-svn: 266429
-
Alexey Bader authored
llvm-svn: 266428
-
Rafael Espindola authored
llvm-svn: 266427
-
Renato Golin authored
Some tests didn't merge stderr with stdout. Patch by Maxim Kuvyrkov. llvm-svn: 266426
-
Rafael Espindola authored
llvm-svn: 266425
-
Rafael Espindola authored
* A hidden undefined is not preemptable. * It is always zero, so we don't need a dynamic reloc for it. llvm-svn: 266424
-
Pavel Labath authored
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
-
Ulrich Weigand authored
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
-
Simon Atanasyan authored
llvm-svn: 266421
-
Ulrich Weigand authored
This is needed for platforms where the default "char" type is unsigned. Originally committed as part of (now reverted) r266311. llvm-svn: 266420
-
Ulrich Weigand authored
Obvious fix for incorrect result types of the operation. Originally committed as part of (now reverted) r266311. llvm-svn: 266419
-
Ulrich Weigand authored
Obvious fix for incorrect use of GetU64 offset pointer. Originally committed as part of (now reverted) r266311. llvm-svn: 266418
-