Mihai Popa [Tue, 6 Aug 2013 16:07:46 +0000 (16:07 +0000)]
This corrects creation of operands for t2PLDW. It also removes the definition of t2PLDWpci,
as pldw does not have a literal variant (i.e. pc relative version)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187804
91177308-0d34-0410-b5e6-
96231b3b80d8
Mihai Popa [Tue, 6 Aug 2013 15:52:36 +0000 (15:52 +0000)]
Support APSR_nzcv as operand for Thumb2 mrc. Deprecate pre-UAL syntax (pc instead of apsr_nzcv)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187803
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Tue, 6 Aug 2013 14:13:34 +0000 (14:13 +0000)]
[NVPTX] Add missing patterns for i1 [s,u]int_to_fp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187800
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Tue, 6 Aug 2013 14:13:31 +0000 (14:13 +0000)]
[NVPTX] Fix bug in stack code generation causes by MC conversion
We do use a very small set of physical registers, so account for
them in the virtual register encoding between MachineInstr and MC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187799
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Tue, 6 Aug 2013 14:13:27 +0000 (14:13 +0000)]
[NVPTX] Start conversion to MC infrastructure
This change converts the NVPTX target to use the MC infrastructure
instead of directly emitting MachineInstr instances. This brings
the target more up-to-date with LLVM TOT, and should fix PR15175
and PR15958 (libNVPTXInstPrinter is empty) as a side-effect.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187798
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 6 Aug 2013 13:58:03 +0000 (13:58 +0000)]
ARM: implement allowTruncateForTailCall
Now that it's in place, it seems silly not to let ARM make use of the extra
tail call opportunities.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187795
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 6 Aug 2013 13:16:28 +0000 (13:16 +0000)]
Add a release not about llvm-ar.
Thanks to Bill Wendling for the reminder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187794
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 6 Aug 2013 12:50:45 +0000 (12:50 +0000)]
Remove oddly named libraries with "make uninstall-local"
Patch by Edward-san.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187793
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Tue, 6 Aug 2013 10:49:15 +0000 (10:49 +0000)]
Store compile unit corresponding to each chain of inlined debug info entries. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187792
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Tue, 6 Aug 2013 10:40:45 +0000 (10:40 +0000)]
LLVM Interpreter: fixed bug 16694
fix for: Bug 16694 - ExecutionEngine/test-interp-vec-loadstore.ll failing on powerpc-darwin8 (http://llvm.org/bugs/show_bug.cgi?id=16694)
The ExecutionEngine/test-interp-vec-loadstore.ll test has been failing on powerpc-darwin8 (on other platforms it passed)
the reason of fail was wrong output by printf. this output is checked by FileCheck, but on little-endian powerpc the output numeric data were printed inside out and FileCheck reported fail.
the printfs have been replaced by checking data inside test and numeric output has been replaced by the text output like : "int test passed, float test passed". The text output is checked by FileCheck.
the dependency on data layout has been removed.
done by Yuri Veselov (Intel)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187791
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Tue, 6 Aug 2013 10:32:39 +0000 (10:32 +0000)]
Add LLVM-style RTTI to DIContext/DWARFContext classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187790
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 6 Aug 2013 09:12:35 +0000 (09:12 +0000)]
Refactor isInTailCallPosition handling
This change came about primarily because of two issues in the existing code.
Niether of:
define i64 @test1(i64 %val) {
%in = trunc i64 %val to i32
tail call i32 @ret32(i32 returned %in)
ret i64 %val
}
define i64 @test2(i64 %val) {
tail call i32 @ret32(i32 returned undef)
ret i32 42
}
should be tail calls, and the function sameNoopInput is responsible. The main
problem is that it is completely symmetric in the "tail call" and "ret" value,
but in reality different things are allowed on each side.
For these cases:
1. Any truncation should lead to a larger value being generated by "tail call"
than needed by "ret".
2. Undef should only be allowed as a source for ret, not as a result of the
call.
Along the way I noticed that a mismatch between what this function treats as a
valid truncation and what the backends see can lead to invalid calls as well
(see x86-32 test case).
This patch refactors the code so that instead of being based primarily on
values which it recurses into when necessary, it starts by inspecting the type
and considers each fundamental slot that the backend will see in turn. For
example, given a pathological function that returned {{}, {{}, i32, {}}, i32}
we would consider each "real" i32 in turn, and ask if it passes through
unchanged. This is much closer to what the backend sees as a result of
ComputeValueVTs.
Aside from the bug fixes, this eliminates the recursion that's going on and, I
believe, makes the bulk of the code significantly easier to understand. The
trade-off is the nasty iterators needed to find the real types inside a
returned value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187787
91177308-0d34-0410-b5e6-
96231b3b80d8
Serge Pavlov [Tue, 6 Aug 2013 08:44:18 +0000 (08:44 +0000)]
Unbreak Debug build on Windows
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187786
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 6 Aug 2013 07:23:12 +0000 (07:23 +0000)]
Simplify vector lane handling math a bit. No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187783
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 6 Aug 2013 06:54:25 +0000 (06:54 +0000)]
Simplify math a little bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187781
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 6 Aug 2013 06:38:37 +0000 (06:38 +0000)]
Target/*/CMakeLists.txt: Add the dependency to CommonTableGen explicitly for each corresponding CodeGen.
Without explicit dependencies, both per-file action and in-CommonTableGen action could run in parallel.
It races to emit *.inc files simultaneously.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187780
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 6 Aug 2013 06:05:05 +0000 (06:05 +0000)]
Replace EVT with MVT in isHorizontalBinOp as it is only called with legal types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187779
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 6 Aug 2013 05:56:39 +0000 (05:56 +0000)]
AsmPrinter/CMakeLists.txt: Add explicit dependency to intrinsics_gen here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187778
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 6 Aug 2013 05:56:32 +0000 (05:56 +0000)]
Option/CMakeLists.txt: Don't use target_link_libraries. LLVMBuild knows dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187777
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 6 Aug 2013 05:41:22 +0000 (05:41 +0000)]
Put an llvm_unreachable at the end of getSplatIndex as its loop should never find all undef elements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187775
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 6 Aug 2013 05:07:37 +0000 (05:07 +0000)]
Check against >= 0 instead of != -1 in getSplatIndex because it generally compiles to better code and is equivalent for shuffle indices.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187774
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 6 Aug 2013 05:01:21 +0000 (05:01 +0000)]
Remove trailing whitespace and fix an 80-column violation. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187773
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 6 Aug 2013 04:12:40 +0000 (04:12 +0000)]
Simplify code slightly. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187771
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 6 Aug 2013 02:43:45 +0000 (02:43 +0000)]
Factor FlattenCFG out from SimplifyCFG
Patch by: Mei Ye
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187764
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 6 Aug 2013 01:38:27 +0000 (01:38 +0000)]
Allow 4 as a valid debug info version.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187763
91177308-0d34-0410-b5e6-
96231b3b80d8
Shuxin Yang [Tue, 6 Aug 2013 00:45:32 +0000 (00:45 +0000)]
Add some comment to LTOCodeGenerator class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187761
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 6 Aug 2013 00:16:21 +0000 (00:16 +0000)]
Fix missing -*- C++ -*-s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187758
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 5 Aug 2013 23:43:18 +0000 (23:43 +0000)]
FileCheckize some of the testcases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187756
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 5 Aug 2013 23:29:16 +0000 (23:29 +0000)]
Fix grammar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187755
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 5 Aug 2013 22:45:56 +0000 (22:45 +0000)]
R600/SI: Add missing test for r187749
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187754
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 5 Aug 2013 22:32:28 +0000 (22:32 +0000)]
Recommit previous cleanup with a fix for c++98 ambiguity.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187752
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 5 Aug 2013 22:22:07 +0000 (22:22 +0000)]
R600: Implement TargetLowering::getVectorIdxTy()
We use MVT::i32 for the vector index type, because we use 32-bit
operations to caculate offsets when dynamically indexing vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187749
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 5 Aug 2013 22:22:01 +0000 (22:22 +0000)]
TargetLowering: Add getVectorIdxTy() function v2
This virtual function can be implemented by targets to specify the type
to use for the index operand of INSERT_VECTOR_ELT, EXTRACT_VECTOR_ELT,
INSERT_SUBVECTOR, EXTRACT_SUBVECTOR. The default implementation returns
the result from TargetLowering::getPointerTy()
The previous code was using TargetLowering::getPointerTy() for vector
indices, because this is guaranteed to be legal on all targets. However,
using TargetLowering::getPointerTy() can be a problem for targets with
pointer sizes that differ across address spaces. On such targets,
when vectors need to be loaded or stored to an address space other than the
default 'zero' address space (which is the address space assumed by
TargetLowering::getPointerTy()), having an index that
is a different size than the pointer can lead to inefficient
pointer calculations, (e.g. 64-bit adds for a 32-bit address space).
There is no intended functionality change with this patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187748
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 5 Aug 2013 22:07:30 +0000 (22:07 +0000)]
Revert "Use existing builtin hashing functions to make this routine more"
This reverts commit r187745.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187747
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 5 Aug 2013 22:00:50 +0000 (22:00 +0000)]
Use existing builtin hashing functions to make this routine more
simple.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187745
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 5 Aug 2013 21:40:57 +0000 (21:40 +0000)]
Change parent hashing algorithm to be non-recursive and elaborate
greatly on many comments in the code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187742
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Mon, 5 Aug 2013 21:07:07 +0000 (21:07 +0000)]
[bugpoint] Allow the user to specify the path to opt on the commandline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187739
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Mon, 5 Aug 2013 17:48:04 +0000 (17:48 +0000)]
Introduce an optimisation for special case lists with large numbers of literal entries.
Our internal regex implementation does not cope with large numbers
of anchors very efficiently. Given a ~3600-entry special case list,
regex compilation can take on the order of seconds. This patch solves
the problem for the special case of patterns matching literal global
names (i.e. patterns with no regex metacharacters). Rather than
forming regexes from literal global name patterns, add them to
a StringSet which is checked before matching against the regex.
This reduces regex compilation time by an order of roughly thousands
when reading the aforementioned special case list, according to a
completely unscientific study.
No test cases. I figure that any new tests for this code should
check that regex metacharacters are properly recognised. However,
I could not find any documentation which documents the fact that the
syntax of global names in special case lists is based on regexes.
The extent to which regex syntax is supported in special case lists
should probably be decided on/documented before writing tests.
Differential Revision: http://llvm-reviews.chandlerc.com/D1150
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187732
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Mon, 5 Aug 2013 17:47:59 +0000 (17:47 +0000)]
Introduce Regex::isLiteralERE function.
This will be used to implement an optimisation for literal entries
in special case lists.
Differential Revision: http://llvm-reviews.chandlerc.com/D1278
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187731
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Mon, 5 Aug 2013 13:47:03 +0000 (13:47 +0000)]
Silencing an MSVC11 type conversion warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187727
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Mon, 5 Aug 2013 13:19:49 +0000 (13:19 +0000)]
80-cols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187725
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Mon, 5 Aug 2013 12:17:06 +0000 (12:17 +0000)]
LLVM Interpreter: This patch implements vector support for cast operations (zext, sext, uitofp, sitofp, trunc, fpext, fptosi, fptrunc, bitcast) and shift operations (shl, ashr, lshr) for integer and floating point data types.
Added tests.
Done by Yuri Veselov (mailto:Yuri.Veselov@intel.com).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187724
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Mon, 5 Aug 2013 11:23:46 +0000 (11:23 +0000)]
[SystemZ] Use BRCT and BRCTG to eliminate add-&-compare sequences
This patch just uses a peephole test for "add; compare; branch" sequences
within a single block. The IR optimizers already convert loops to
decrement-and-branch-on-nonzero form in some cases, so even this
simplistic test triggers many times during a clang bootstrap and
projects/test-suite run. It looks like there are still cases where we
need to more strongly prefer branches on nonzero though. E.g. I saw a
case where a loop that started out with a check for 0 ended up with a
check for -1. I'll try to look at that sometime.
I ended up adding the Reference class because MachineInstr::readsRegister()
doesn't check for subregisters (by design, as far as I could tell).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187723
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 5 Aug 2013 11:11:11 +0000 (11:11 +0000)]
Don't leak passes if added outside of the area determined by Started/Stopped flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187722
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Mon, 5 Aug 2013 11:07:38 +0000 (11:07 +0000)]
[SystemZ] Add definitions for BRCT and BRCTG
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187721
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Mon, 5 Aug 2013 11:03:20 +0000 (11:03 +0000)]
[SystemZ] Use LOAD AND TEST to eliminate comparisons against zero
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187720
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Mon, 5 Aug 2013 11:00:53 +0000 (11:00 +0000)]
[SystemZ] Add LOAD AND TEST instructions
Just the definitions and MC support. The next patch uses them for codegen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187719
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Mon, 5 Aug 2013 10:58:53 +0000 (10:58 +0000)]
[SystemZ] Split out comparison elimination into a separate pass
Perhaps predictably, doing comparison elimination on the fly during
SystemZLongBranch turned out to be a bad idea. The next patches make
use of LOAD AND TEST and BRANCH ON COUNT, both of which require
changes to earlier instructions.
No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187718
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Mon, 5 Aug 2013 08:52:21 +0000 (08:52 +0000)]
AVX-512 set: added mask operations, lowering BUILD_VECTOR for i1 vector types.
Added intrinsics and tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187717
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 5 Aug 2013 04:31:05 +0000 (04:31 +0000)]
Update the release notes about the status of the vectorizers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187714
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 5 Aug 2013 04:27:34 +0000 (04:27 +0000)]
Update the docs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187713
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Sun, 4 Aug 2013 23:56:53 +0000 (23:56 +0000)]
Add the saving of S2. This is needed for some of the floating point
helper functions. This can be optimized out later when the remaining
parts of the helper function work is moved into the Mips16HardFloat pass.
For now it forces us to use the 32 bit save/restore instructions instead
of the 16 bit ones.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187712
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Sun, 4 Aug 2013 23:55:24 +0000 (23:55 +0000)]
Remove "lto_on_osx" xfails, now that -rdynamic works on Darwin.
Note that this will require a recent version of the linker for Darwin
builds with LTO to pass these tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187711
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Sun, 4 Aug 2013 22:06:11 +0000 (22:06 +0000)]
Build with the $RDYNAMIC flag on Darwin as well as other platforms.
Part of <rdar://problem/
14620988>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187710
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 4 Aug 2013 12:05:16 +0000 (12:05 +0000)]
X86: Turn fp selects into mask operations.
double test(double a, double b, double c, double d) { return a<b ? c : d; }
before:
_test:
ucomisd %xmm0, %xmm1
ja LBB0_2
movaps %xmm3, %xmm2
LBB0_2:
movaps %xmm2, %xmm0
after:
_test:
cmpltsd %xmm1, %xmm0
andpd %xmm0, %xmm2
andnpd %xmm3, %xmm0
orpd %xmm2, %xmm0
Small speedup on Benchmarks/SmallPT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187706
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Sun, 4 Aug 2013 10:46:07 +0000 (10:46 +0000)]
AVX-512 set: added VEXTRACTPS instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187705
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Sun, 4 Aug 2013 10:00:45 +0000 (10:00 +0000)]
X86: specify CPU on new test to fix atom buildbot
Apparently Atoms use lea for stack adjustment, which we weren't
looking for.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187704
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Sun, 4 Aug 2013 09:35:57 +0000 (09:35 +0000)]
X86: correct tail return address calculation
Due to the weird and wondeful usual arithmetic conversions, some
calculations involving negative values were getting performed in
uint32_t and then promoted to int64_t, which is really not a good
idea.
Patch by Katsuhiro Ueno.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187703
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 4 Aug 2013 09:06:29 +0000 (09:06 +0000)]
AsmParser: Store MacroLikeBodies on the side so they don't get leaked.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187702
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Sun, 4 Aug 2013 01:13:25 +0000 (01:13 +0000)]
Clean up code for Mips16 large frame handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187701
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 3 Aug 2013 22:43:29 +0000 (22:43 +0000)]
PPCAsmParser: Stop leaking names.
Store them in a place that gets cleaned up properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187700
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 3 Aug 2013 22:18:45 +0000 (22:18 +0000)]
Unbreak llvm-rtdyld build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187699
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 3 Aug 2013 22:16:37 +0000 (22:16 +0000)]
MachObjectFile: Don't leak on error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187698
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 3 Aug 2013 22:16:31 +0000 (22:16 +0000)]
llvm-rtdyld: Don't leak memory managers.
Dyld never outlives MemMgr, just put both on the stack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187697
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 3 Aug 2013 22:16:24 +0000 (22:16 +0000)]
ARMAsmParser: Plug a leak.
Using an object to do the cleanup may look like overkill, but it's safer and nicer than putting deletes everywhere.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187696
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 3 Aug 2013 22:16:16 +0000 (22:16 +0000)]
Stop leaking register infos in the disassemblers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187695
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Sat, 3 Aug 2013 12:25:10 +0000 (12:25 +0000)]
Fix PPC64 64-bit GPR inline asm constraint matching
Internally, the PowerPC backend names the 32-bit GPRs R[0-9]+, and names the
64-bit parent GPRs X[0-9]+. When matching inline assembly constraints with
explicit register names, on PPC64 when an i64 MVT has been requested, we need
to follow gcc's convention of using r[0-9]+ to refer to the 64-bit (parent)
registers.
At some point, we'll probably want to arrange things so that the generic code
in TargetLowering uses the AsmName fields declared in *RegisterInfo.td in order
to match these inline asm register constraints. If we do that, this change can
be reverted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187693
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 3 Aug 2013 01:03:12 +0000 (01:03 +0000)]
Minor address space code simplification.
Remove assertion that the verifier should catch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187692
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 2 Aug 2013 22:51:11 +0000 (22:51 +0000)]
Regenerate with changes for -rdynamic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187687
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 2 Aug 2013 22:51:06 +0000 (22:51 +0000)]
Link with -rdynamic instead of -Wl,-export-dynamic.
Recent versions of the OS X linker support this but follow the existing
OS X linker convention of using an underscore in the option name, i.e.,
-export_dynamic. Rather than changing our configure scripts to check for
that alternate spelling, it is simpler to just use the compiler's -rdynamic
option and let it deal with translating that to the appropriate linker
option. One potential disadvantage of this approach is that the compiler
will typically ignore -rdynamic on platforms where it is not supported, so
the HAVE_LINK_EXPORT_DYNAMIC in config.h will not necessarily show whether
that option has any effect or not. I don't see any in-tree uses of that
macro, so I'm assuming it is OK.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187686
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Fri, 2 Aug 2013 22:34:30 +0000 (22:34 +0000)]
Add a AttributeSetImpl::dump function.
This is for the benefit of those of us with inferior debuggers which
do not permit member function calls on value types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187685
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Fri, 2 Aug 2013 22:29:40 +0000 (22:29 +0000)]
Make one of the AttributeSet ctors maintain the invariant that the
attribute list is ordered by index.
Differential Revision: http://llvm-reviews.chandlerc.com/D1265
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187682
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Fri, 2 Aug 2013 21:20:27 +0000 (21:20 +0000)]
Option parsing: recognize the special -- token
Everything that comes after -- should be treated as a filename. This
enables passing in filenames that would otherwise be conflated with
command-line options.
This is especially important for clang-cl which supports options
starting with /, which are easily conflatable with Unix-style
path names.
Differential Revision: http://llvm-reviews.chandlerc.com/D1274
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187675
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Fri, 2 Aug 2013 21:13:42 +0000 (21:13 +0000)]
Fix invalid function pointers in bugpoint ExtractLoops
The ExtractLoops function tries to reduce the failing test case by extracting
one or more loops from the misoptimized piece of the program. In doing this,
ExtractLoops must keep the MiscompiledFunctions vector up-to-date by ensuring
that the pointers refer to functions in the current failing program.
Unfortunately, this is not trivial because:
- ExtractLoops is iterative, and there are several early exits (and the
MiscompiledFunctions vector must be consistent with the current program at
every non-fatal exit point).
- Several of the utility functions used by ExtractLoops (such as
TestOptimizer, some of which are called through the TestFn callback
parameter, and Linker::LinkModules) delete their inputs upon success.
This change adds several updates of the MiscompiledFunctions vector at
different points. The first is after the initial call to TestMergedProgram
which checks that the loop-extracted program still works. The second is after
the call to TestFn (TestOptimizer, for example). This function will delete its
inputs (which is why the existing ExtractLoops logic cloned the inputs first).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187674
91177308-0d34-0410-b5e6-
96231b3b80d8
Joey Gouly [Fri, 2 Aug 2013 20:50:01 +0000 (20:50 +0000)]
Add a missing 'return' statement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187671
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 2 Aug 2013 19:23:33 +0000 (19:23 +0000)]
[mips] Expand vector truncating stores and extending loads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187667
91177308-0d34-0410-b5e6-
96231b3b80d8
Joey Gouly [Fri, 2 Aug 2013 19:18:12 +0000 (19:18 +0000)]
[ARMv8] Add an assembler warning for the deprecated 'setend' instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187666
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 2 Aug 2013 18:40:24 +0000 (18:40 +0000)]
SLPVectorizer: Fix PR16777. PHInodes may use multiple extracted values that come from different blocks.
Thanks Alexey Samsonov.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187663
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 2 Aug 2013 18:33:34 +0000 (18:33 +0000)]
Teach EmitGEPOffset about address spaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187662
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Fri, 2 Aug 2013 17:10:04 +0000 (17:10 +0000)]
Fixes ARM LNT bot from SLP change in O3
This patch fixes the multiple breakages on ARM test-suite after the SLP
vectorizer was introduced by default on O3. The problem was an illegal
vector type on ARMTTI::getCmpSelInstrCost() <3 x i1> which is not simple.
The guard protects this code from breaking (cause of the problems) but
doesn't fix the issue that is generating the odd vector in the first
place, which also needs to be investigated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187658
91177308-0d34-0410-b5e6-
96231b3b80d8
Carlo Kok [Fri, 2 Aug 2013 16:14:15 +0000 (16:14 +0000)]
Bugfix for making the DWARF debug strings and labels to code emitted as secrel32 instead of long opcodes (only for coff). This makes them debuggable with GDB (with fix for 64bits msvc)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187656
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 2 Aug 2013 11:32:50 +0000 (11:32 +0000)]
Fix handling of CHECK-DAG combined with CHECK-NOT
Patch by Daniel Sanders.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187651
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 2 Aug 2013 09:37:20 +0000 (09:37 +0000)]
Pacify GCC, which worries about falling off the end of the switch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187649
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Fri, 2 Aug 2013 08:06:43 +0000 (08:06 +0000)]
Fix dereferencing end iterator in SimplifyCFG. Patch by Ye Mei.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187646
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 2 Aug 2013 03:46:05 +0000 (03:46 +0000)]
Revert r187597, "Bugfix for making the DWARF debug strings and labels to code emitted as secrel32 instead of long opcodes (only for coff). This makes them debuggable with GDB."
It broke x86_64-win32 builder in llvm/test/DebugInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187642
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 2 Aug 2013 01:51:52 +0000 (01:51 +0000)]
Use @rpath for libraries rather than @executable_path on OSX.
Patch by Benjamin Scarlet!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187641
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 2 Aug 2013 00:49:44 +0000 (00:49 +0000)]
Temporarily revert "Debug Info Finder|Verifier: handle DbgLoc attached to
instructions." in an attempt to bring back some bots.
This reverts commit r187609.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187638
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 2 Aug 2013 00:10:44 +0000 (00:10 +0000)]
Teach InstructionSimplify about pointer address spaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187635
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Thu, 1 Aug 2013 23:14:16 +0000 (23:14 +0000)]
[mips] Make load/store accumulator pseudo instructions codeGenOnly. Also,
remove lines that are setting DecoderNamespace for pseudo atomic instructions.
No intended functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187632
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 1 Aug 2013 22:42:18 +0000 (22:42 +0000)]
Teach getOrEnforceKnownAlignment about address spaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187629
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 1 Aug 2013 22:41:58 +0000 (22:41 +0000)]
Move the optlevel check to the frontend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187628
91177308-0d34-0410-b5e6-
96231b3b80d8
Carlo Kok [Thu, 1 Aug 2013 22:15:34 +0000 (22:15 +0000)]
fix for LLVM debug info on llvm-mips-linux where the label name uses % instead of L as a prefix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187623
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 1 Aug 2013 21:42:05 +0000 (21:42 +0000)]
Use function attributes to indicate that we don't want to realign the stack.
Function attributes are the future! So just query whether we want to realign the
stack directly from the function instead of through a random target options
structure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187618
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 1 Aug 2013 21:36:02 +0000 (21:36 +0000)]
Expose that the unique file ID has a device and a file component.
The use of sd_dev and st_ino has reached libclang, so expose the two components
in UniqueID so that we can use it in clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187616
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Malea [Thu, 1 Aug 2013 21:18:16 +0000 (21:18 +0000)]
Fixed the Intel-syntax X86 disassembler to respect the (existing) option for hexadecimal immediates, to match AT&T syntax. This also brings a new option for C-vs-MASM-style hex.
Patch by Richard Mitton
Reviewed: http://llvm-reviews.chandlerc.com/D1243
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187614
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Thu, 1 Aug 2013 21:17:53 +0000 (21:17 +0000)]
Fix some issues with Mips16 floating when certain intrinsics are present.
This is actually an LLVM bug in the way it generates signatures for these
when soft float is enabled. For example, floor ends up having the signature
of int64(int64). The signature part is not the same as where the actual
parameter types are recorded, and those ARE of course int64(int64) when
soft float is enabled. (Yes, Mips16 hard float uses soft float but with
different runtime rounes but then has to interoperate with Mips32 using
normal floating point). This logic will eventually be moved to the
Mips16HardFloat pass so it's not worth sorting out these issues in LLVM
since nobody but Mips16 cares about these signatures, as far as I know,
and even I won't eventually either.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187613
91177308-0d34-0410-b5e6-
96231b3b80d8
Carlo Kok [Thu, 1 Aug 2013 20:53:57 +0000 (20:53 +0000)]
ARM/Hexagon testcases can't compile x86 only testcase. Reverting change to testcase & fixing check for all.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187610
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Thu, 1 Aug 2013 20:52:39 +0000 (20:52 +0000)]
Debug Info Finder|Verifier: handle DbgLoc attached to instructions.
Also remove checking of llvm.dbg.sp since it is not used in generating dwarf.
Current state of Finder:
DebugInfoFinder tries to list all debug info MDNodes used in a module. To
list debug info MDNodes used by an instruction, DebugInfoFinder provides
processDeclare, processValue and processLocation to handle DbgDeclareInst,
DbgValueInst and DbgLoc attached to instructions. processModule will go
through all DICompileUnits in llvm.dbg.cu and list debug info MDNodes
used by the CUs.
TODO:
1> Finder has a list of CUs, SPs, Types, Scopes and global variables. We
need to add a list of variables that are used by DbgDeclareInst and
DbgValueInst.
2> MDString fields should be null or isa<MDString> and MDNode fields should be
null or isa<MDNode>. We currently use empty string or int 0 to represent null.
3> Go though Verify functions and make sure that they check field types.
4> Clean up existing testing cases to remove llvm.dbg.sp and make sure each
testing case has a llvm.dbg.cu.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187609
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 1 Aug 2013 20:30:22 +0000 (20:30 +0000)]
DebugInfo: Emit definitions for types with no members.
The absence of members was a poor/incorrect proxy for "is definition".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187607
91177308-0d34-0410-b5e6-
96231b3b80d8
Carlo Kok [Thu, 1 Aug 2013 20:17:37 +0000 (20:17 +0000)]
change the inlinefnlocalvar testcase so it uses a triple that's not coff (doesn't seem to matter for the testcase itself, what it tests isn't triple specific), as coff has a slightly different way of emitting what it checks for.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187604
91177308-0d34-0410-b5e6-
96231b3b80d8