| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
llvm-svn: 266459
|
|
|
|
|
|
|
|
| |
macro expansion."
This reverts commit r266436 as it broke buildbot.
llvm-svn: 266458
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 266455
|
|
|
|
|
|
|
|
| |
These were broken by D17339.
Differential Revision: http://reviews.llvm.org/D19158
llvm-svn: 266454
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 266449
|
|
|
|
| |
llvm-svn: 266448
|
|
|
|
| |
llvm-svn: 266447
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
(Reverse the ownership between DICompileUnit and DISubprogram.)
http://reviews.llvm.org/D19034
<rdar://problem/25256815>
llvm-svn: 266445
|
|
|
|
| |
llvm-svn: 266444
|
|
|
|
| |
llvm-svn: 266443
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
LLVMContext and ExecutionEngine. Investigating.
llvm-svn: 266441
|
|
|
|
|
|
|
| |
It shows that we correctly look at liveness based on the final symbol
resolution.
llvm-svn: 266440
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 266435
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D18758
llvm-svn: 266434
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
This makes it impossible to forget to call repl on the SymbolBody.
llvm-svn: 266432
|
|
|
|
| |
llvm-svn: 266431
|
|
|
|
|
|
|
|
| |
This function has been removed from LLVM.
Patch By: Laurent Carlier
llvm-svn: 266430
|
|
|
|
| |
llvm-svn: 266429
|
|
|
|
| |
llvm-svn: 266428
|
|
|
|
| |
llvm-svn: 266427
|
|
|
|
|
|
|
|
| |
Some tests didn't merge stderr with stdout.
Patch by Maxim Kuvyrkov.
llvm-svn: 266426
|
|
|
|
| |
llvm-svn: 266425
|
|
|
|
|
|
|
| |
* A hidden undefined is not preemptable.
* It is always zero, so we don't need a dynamic reloc for it.
llvm-svn: 266424
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 266421
|
|
|
|
|
|
|
|
| |
This is needed for platforms where the default "char" type is unsigned.
Originally committed as part of (now reverted) r266311.
llvm-svn: 266420
|
|
|
|
|
|
|
|
| |
Obvious fix for incorrect result types of the operation.
Originally committed as part of (now reverted) r266311.
llvm-svn: 266419
|
|
|
|
|
|
|
|
| |
Obvious fix for incorrect use of GetU64 offset pointer.
Originally committed as part of (now reverted) r266311.
llvm-svn: 266418
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 266414
|
|
|
|
|
|
| |
to promoted and set the type in one call. Use it so save code in X86.
llvm-svn: 266413
|
|
|
|
|
|
| |
explicitly.
llvm-svn: 266412
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
setOperationAction that only varied in Legal/Custom. Use the ternary operator on that argument instead. NFC
llvm-svn: 266410
|