- Jun 06, 2014
-
-
Iain Sandoe authored
r210177 added lld Makefiles, r210245 added automatic build when the source is present. This revision completes the set by adding the lld test and unittests to the check-all target. llvm-svn: 210318
-
Timur Iskhodzhanov authored
llvm-svn: 210317
-
Simon Atanasyan authored
llvm-svn: 210316
-
Dinesh Dwivedi authored
This patch can identify ABS(X) ==> (X >s 0) ? X : -X and (X >s -1) ? X : -X ABS(X) ==> (X <s 0) ? -X : X and (X <s 1) ? -X : X NABS(X) ==> (X >s 0) ? -X : X and (X >s -1) ? -X : X NABS(X) ==> (X <s 0) ? X : -X and (X <s 1) ? X : -X and can transform ABS(ABS(X)) -> ABS(X) NABS(NABS(X)) -> NABS(X) Differential Revision: http://reviews.llvm.org/D3658 llvm-svn: 210312
-
Alp Toker authored
The option check was being performed after config.h/llvm-config.h substitution, generating incorrect macro definitions. Fixes PR19614. llvm-svn: 210311
-
Karthik Bhat authored
If we have common uses on separate paths in the tree; process the one with greater common depth first. This makes sure that we do not assume we need to extract a load when it is actually going to be part of a vectorized tree. Review: http://reviews.llvm.org/D3800 llvm-svn: 210310
-
Alp Toker authored
clang's own CMake setup handles this as of r210308. The CMAKE_CROSSCOMPILING special-case will no longer be hard-coded. This was clearly site-specific to someone's local configuration and should be passed in at configure time if needed with e.g. -DLIBXML2_LIBRARIES=... (the libxml2 target I tried here doesn't even support liblzma so it's *way* off). llvm-svn: 210309
-
Alp Toker authored
These had no business in LLVM core. llvm-svn: 210307
-
Rafael Espindola authored
Alias with unnamed_addr were in a strange state. It is stored in GlobalValue, the language reference talks about "unnamed_addr aliases" but the verifier was rejecting them. It seems natural to allow unnamed_addr in aliases: * It is a property of how it is accessed, not of the data itself. * It is perfectly possible to write code that depends on the address of an alias. This patch then makes unname_addr legal for aliases. One side effect is that the syntax changes for a corner case: In globals, unnamed_addr is now printed before the address space. llvm-svn: 210302
-
Alexey Samsonov authored
llvm-svn: 210300
-
Alexey Samsonov authored
llvm-svn: 210299
-
Rafael Espindola authored
We extended the .section syntax to allow multiple sections with the same name but different comdats, but currently we don't make sure that the output section has that comdat symbol. That happens to work with the code llc produces currently because it looks like .section secName, "dr", one_only, "COMDATSym" .globl COMDATSym COMDATSym: .... but that is not very friendly to anyone coding in assembly or even to llc once we get comdat support in the IR. This patch changes the coff object writer to make sure the comdat symbol is output just after the section symbol, as required by the coff spec. llvm-svn: 210298
-
Bill Schmidt authored
Chandler correctly pointed out that I need an LLVM IR test for r210282, which modified the vperm -> shuffle transform for little endian PowerPC. This patch provides that test. llvm-svn: 210297
-
Eric Christopher authored
we can just pass in the values we already know and we're not caching the subtarget anymore. llvm-svn: 210292
-
Jingyue Wu authored
Most issues are on mishandling s/zext. Fixes: 1. When rebuilding new indices, s/zext should be distributed to sub-expressions. e.g., sext(a +nsw (b +nsw 5)) = sext(a) + sext(b) + 5 but not sext(a + b) + 5. This also affects the logic of recursively looking for a constant offset, we need to include s/zext into the context of the searching. 2. Function find should return the bitwidth of the constant offset instead of always sign-extending it to i64. 3. Stop shortcutting zext'ed GEP indices. LLVM conceptually sign-extends GEP indices to pointer-size before computing the address. Therefore, gep base, zext(a + b) != gep base, a + b Improvements: 1. Add an optimization for splitting sext(a + b): if a + b is proven non-negative (e.g., used as an index of an inbound GEP) and one of a, b is non-negative, sext(a + b) = sext(a) + sext(b) 2. Function Distributable checks whether both sext and zext can be distributed to operands of a binary operator. This helps us split zext(sext(a + b)) to zext(sext(a) + zext(sext(b)) when a + b does not signed or unsigned overflow. Refactoring: Merge some common logic of handling add/sub/or in find. Testing: Add many tests in split-gep.ll and split-gep-and-gvn.ll to verify the changes we made. llvm-svn: 210291
-
Eric Christopher authored
llvm-svn: 210290
-
- Jun 05, 2014
-
-
Eric Christopher authored
it's already on the subtarget. llvm-svn: 210289
-
Tom Roeder authored
llvm-svn: 210288
-
Rafael Espindola authored
I noticed that a proposed optimization would have prevented this. llvm-svn: 210287
-
Kevin Enderby authored
This is a first step in seeing if it is possible to make llvm-nm produce the same output as darwin's nm(1). Darwin's default format is bsd but its -m output prints the longer Mach-O specific details. For now I added the "-format darwin" to do this (whos name may need to change in the future). As there are other Mach-O specific flags to nm(1) which I'm hoping to add some how in the future. But I wanted to see if I could get the correct output for -m flag using llvm-nm and the libObject interfaces. I got this working but would love to hear what others think about this approach to getting object/format specific details printed with llvm-nm. llvm-svn: 210285
-
Bill Schmidt authored
As discussed in cfe commit r210279, the correct little-endian semantics for the vec_perm Altivec interfaces are implemented by reversing the order of the input vectors and complementing the permute control vector. This converts the desired permute from little endian element order into the big endian element order that the underlying PowerPC vperm instruction uses. This is represented with a ppc_altivec_vperm intrinsic function. The instruction combining pass contains code to convert a ppc_altivec_vperm intrinsic into a vector shuffle operation when the intrinsic has a permute control vector (mask) that is a constant. However, the vector shuffle operation assumes that vector elements are in natural order for their endianness, so for little endian code we will get the wrong result with the existing transformation. This patch reverses the semantic change to vec_perm that was performed in altivec.h by once again swapping the input operands and complementing the permute control vector, returning the element ordering to little endian. The correctness of this code is tested by the new perm.c test added in a previous patch, and by other tests in the test suite that fail without this patch. llvm-svn: 210282
-
Tom Roeder authored
llvm-svn: 210281
-
Tom Roeder authored
Add a new attribute called 'jumptable' that creates jump-instruction tables for functions marked with this attribute. It includes a pass that rewrites all indirect calls to jumptable functions to pass through these tables. This also adds backend support for generating the jump-instruction tables on ARM and X86. Note that since the jumptable attribute creates a second function pointer for a function, any function marked with jumptable must also be marked with unnamed_addr. llvm-svn: 210280
-
Yaron Keren authored
llvm-svn: 210273
-
Bill Schmidt authored
This is a preliminary patch for the PowerPC64LE support. In stage 1 of the vector support, we will support the VMX (Altivec) instruction set, but will not yet support the VSX instructions. This is merely a staging issue to provide functional vector support as soon as possible. llvm-svn: 210271
-
Evgeniy Stepanov authored
Now it should always point to the opening brace of the function (in -asan-coverage=1 mode). llvm-svn: 210266
-
Evgeniy Stepanov authored
llvm-svn: 210265
-
Ulrich Weigand authored
llvm-svn: 210264
-
Ulrich Weigand authored
When not optimizing, do not run the IfConverter pass, this makes debugging more difficult (and causes a testsuite failure in DebugInfo/unconditional-branch.ll). llvm-svn: 210263
-
Sasa Stankovic authored
* Move the instruction that changes sp outside of the branch delay slot. * Bundle-align the target of indirect branch. Differential Revision: http://llvm-reviews.chandlerc.com/D3928 llvm-svn: 210262
-
Sasa Stankovic authored
llvm-svn: 210261
-
Matheus Almeida authored
Mips2 is a 32-bit architecture. llvm-svn: 210254
-
Iain Sandoe authored
r210177 added Makefiles to the lld project. This revision enables the automatic build of lld when the sources are found in tools/lld. llvm-svn: 210245
-
Matt Arsenault authored
llvm-svn: 210244
-
Nick Lewycky authored
Fix coverage for files with global constructors again. Adds a testcase to the commit from r206671, as requested by David Blaikie. llvm-svn: 210239
-
David Blaikie authored
Revert r210221 again, due to a crash Richard Smith has provided involving self-hosting LLVM with libc++. Test case coming, once I reduce it. llvm-svn: 210236
-
David Blaikie authored
DebugInfo: Reuse existing LexicalScope to retrieve the scope's MDNode, rather than looking it up through the DebugLoc. No functional change intended, just streamlines the abstract variable lookup/construction to use a common entry point. llvm-svn: 210234
-
David Blaikie authored
DebugInfo: Roll argument insertion into variable insertion to ensure arguments are correctly handled in all cases. No functional change intended. llvm-svn: 210233
-
David Blaikie authored
Unused arguments were not being added to the argument list, but instead treated as arbitrary scope variables. This meant they weren't carefully added in the original argument order. In this particular example, though, it turns out the argument is only /mostly/ unused (well, actually it's entirely used, but in a specific way). It's a struct that, due to ABI reasons, is decomposed into chunks (exactly one chunk, since it has one member) and then passed. Since only one of those chunks is used (SROA, etc, kill the original reconstitution code) we don't have a location to describe the whole variable. In this particular case, since the struct consists of just the one int, once we have partial location information, this should have a location that describes the entire variable (since the piece is the entirety of the object). And at some point we'll need to describe the location of even /entirely/ unused arguments so that they can at least be printed on function entry. llvm-svn: 210231
-
Alexey Samsonov authored
llvm-svn: 210229
-