Matt Arsenault [Wed, 30 Oct 2013 23:30:05 +0000 (23:30 +0000)]
Fix CodeGen for unaligned loads with address spaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193721
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 30 Oct 2013 22:54:58 +0000 (22:54 +0000)]
Teach scalarrepl about address spaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193720
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 30 Oct 2013 22:37:51 +0000 (22:37 +0000)]
Add calls to doInitialization() and doFinalization() in verifyFunction()
The function verifyFunction() in lib/IR/Verifier.cpp misses some
calls. It creates a temporary FunctionPassManager that will run a
single Verifier pass. Unfortunately, FunctionPassManager is no
PassManager and does not call doInitialization() and doFinalization()
by itself. Verifier does important tasks in doInitialization() such as
collecting type information used to check DebugInfo metadata and
doFinalization() does some additional checks. Therefore these checks
were missed and debug info couldn't be verified at all, it just
crashed if the function had some.
verifyFunction() is currently not used in llvm unless -debug option is
enabled, and in unittests/IR/VerifierTest.cpp
VerifierTest had to be changed to create the function in a module from
which the type debug info can be collected.
Patch by Michael Kruse.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193719
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 30 Oct 2013 22:08:11 +0000 (22:08 +0000)]
Produce .weak_def_can_be_hidden for some linkonce_odr values
With this patch llvm produces a weak_def_can_be_hidden for linkonce_odr
if they are also unnamed_addr or don't have their address taken.
There is not a lot of documentation about .weak_def_can_be_hidden, but
from the old discussion about linkonce_odr_auto_hide and the name of
the directive this looks correct: these symbols can be hidden.
Testing this with the ld64 in Xcode 5 linking clang reduces the number of
exported symbols from 21053 to 19049.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193718
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 30 Oct 2013 20:42:41 +0000 (20:42 +0000)]
DebugInfo: Push header handling down into CompileUnit
This is a preliminary step to handling type units by abstracting over
all (type or compile) units.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193714
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Wed, 30 Oct 2013 20:41:45 +0000 (20:41 +0000)]
[Mips] Add more SHF_MIPS_xxx ELF section flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193713
91177308-0d34-0410-b5e6-
96231b3b80d8
Will Dietz [Wed, 30 Oct 2013 20:27:17 +0000 (20:27 +0000)]
Add DebugInfo testcase for high_pc encoded as constant, fixed in r193555.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193711
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 30 Oct 2013 19:05:41 +0000 (19:05 +0000)]
Fix GVN creating bitcast between address spaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193710
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Roeder [Wed, 30 Oct 2013 18:47:25 +0000 (18:47 +0000)]
This commit adds some (but not all) of the x86-64 relocations that are not
currently supported in the ELF object writer, along with a simple test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193709
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Wed, 30 Oct 2013 18:32:26 +0000 (18:32 +0000)]
Add {start,end}with_lower methods to StringRef.
startswith_lower is ocassionally useful and I think worth adding.
endwith_lower is added for completeness.
Differential Revision: http://llvm-reviews.chandlerc.com/D2041
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193706
91177308-0d34-0410-b5e6-
96231b3b80d8
Artyom Skrobov [Wed, 30 Oct 2013 18:10:09 +0000 (18:10 +0000)]
[ARM] NEON instructions were erroneously decoded from certain invalid encodings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193705
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Wed, 30 Oct 2013 17:22:05 +0000 (17:22 +0000)]
R600: Custom lower f32 = uint_to_fp i64
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193701
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 30 Oct 2013 17:14:24 +0000 (17:14 +0000)]
DwarfDebug: Change Abbreviations member from pointer to reference
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193699
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 30 Oct 2013 17:09:32 +0000 (17:09 +0000)]
fix RST reference in Writing an LLVM Pass
Currently, instead of showing up as link, it is rendered as
...of FunctionPass <writing-an-llvm-pass-FunctionPass>. The...
PR17733. Patch by Tay Ray Chuan!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193698
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Wed, 30 Oct 2013 16:10:10 +0000 (16:10 +0000)]
Add #include of raw_ostream.h to MipsSEISelLowering.cpp
Fixing this Windows build error:
..\lib\Target\Mips\MipsSEISelLowering.cpp(997) : error C2027: use of undefined type 'llvm::raw_ostream'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193696
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 30 Oct 2013 15:45:42 +0000 (15:45 +0000)]
[mips][msa] Correct definition of bins[lr] and CHECK-DAG-ize related tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193695
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Wed, 30 Oct 2013 15:36:50 +0000 (15:36 +0000)]
make ConstantRange::signExtend() optimal
the case [x, INT_MIN) was not handled optimally
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193694
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 30 Oct 2013 15:20:38 +0000 (15:20 +0000)]
[mips][msa] Added support for matching bmnz, bmnzi, bmz, and bmzi from normal IR (i.e. not intrinsics)
Also corrected the definition of the intrinsics for these instructions (the
result register is also the first operand), and added intrinsics for bsel and
bseli to clang (they already existed in the backend).
These four operations are mostly equivalent to bsel, and bseli (the difference
is which operand is tied to the result). As a result some of the tests changed
as described below.
bitwise.ll:
- bsel.v test adapted so that the mask is unknown at compile-time. This stops
it emitting bmnzi.b instead of the intended bsel.v.
- The bseli.b test now tests the right thing. Namely the case when one of the
values is an uimm8, rather than when the condition is a uimm8 (which is
covered by bmnzi.b)
compare.ll:
- bsel.v tests now (correctly) emits bmnz.v instead of bsel.v because this
is the same operation (see MSA.txt).
i8.ll
- CHECK-DAG-ized test.
- bmzi.b test now (correctly) emits equivalent bmnzi.b with swapped operands
because this is the same operation (see MSA.txt).
- bseli.b still emits bseli.b though because the immediate makes it
distinguishable from bmnzi.b.
vec.ll:
- CHECK-DAG-ized test.
- bmz.v tests now (correctly) emits bmnz.v with swapped operands (see
MSA.txt).
- bsel.v tests now (correctly) emits bmnz.v with swapped operands (see
MSA.txt).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193693
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 30 Oct 2013 15:19:37 +0000 (15:19 +0000)]
[AArch64] Add support for NEON scalar floating-point compare instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193691
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron McInally [Wed, 30 Oct 2013 15:19:10 +0000 (15:19 +0000)]
Refactor the AVX512 intrinsics. Cluster the intrinsics into the appropriate vector extension class within the .td file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193690
91177308-0d34-0410-b5e6-
96231b3b80d8
Howard Hinnant [Wed, 30 Oct 2013 15:10:54 +0000 (15:10 +0000)]
Rehash but don't grow when full of tombstones.
This problem was found and fixed by José Fonseca in March 2011 for
SmallPtrSet, committed r128566. But as far as I can tell, all other
llvm hash tables retain the same problem: the bucket count can grow
without bound while size() remains near constant by repeated
insert/erase cycles that tend to fill the container with tombstones.
Here is a demo that has been reduced to a trivial case:
int
main()
{
llvm::DenseSet<unsigned> d;
for (unsigned i = 0; i < 0xFFFFFFF; ++i)
{
d.insert(i);
d.erase(i);
}
}
While the container size() never grows above 1, the bucket count grows
like this:
nb = 64
nb = 128
nb = 256
nb = 512
nb = 1024
nb = 2048
nb = 4096
nb = 8192
nb = 16384
nb = 32768
nb = 65536
nb = 131072
nb = 262144
nb = 524288
nb =
1048576
nb =
2097152
nb =
4194304
nb =
8388608
nb =
16777216
nb =
33554432
nb =
67108864
nb =
134217728
nb =
268435456
The above program currently consumes a few GB ram. This patch brings
the memory consumption down by several orders of magnitude, and keeps
the bucket count at 64 for the above test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193689
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 30 Oct 2013 14:45:14 +0000 (14:45 +0000)]
[mips][msa] Added support for matching bins[lr]i.[bhwd] from normal IR (i.e. not intrinsics)
This required correcting the definition of the bins[lr]i intrinsics because
the result is also the first operand.
It also required removing the (arbitrary) check for 32-bit immediates in
MipsSEDAGToDAGISel::selectVSplat().
Currently using binsli.d with 2 bits set in the mask doesn't select binsli.d
because the constant is legalized into a ConstantPool. Similar things can
happen with binsri.d with more than 10 bits set in the mask. The resulting
code when this happens is correct but not optimal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193687
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 30 Oct 2013 13:51:01 +0000 (13:51 +0000)]
[mips][msa] Combine binsri-like DAG of AND and OR into equivalent VSELECT
(or (and $a, $mask), (and $b, $inverse_mask)) => (vselect $mask, $a, $b).
where $mask is a constant splat. This allows bitwise operations to make use
of bsel.
It's also a stepping stone towards matching bins[lr], and bins[lr]i from
normal IR.
Two sets of similar tests have been added in this commit. The bsel_* functions
test the case where binsri cannot be used. The binsr_*_i functions will
start to use the binsri instruction in the next commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193682
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 30 Oct 2013 13:31:27 +0000 (13:31 +0000)]
[mips] MipsSETargetLowering now reports DAGCombiner changes when using -debug-only=mips-isel
No test since -debug output is intended for developers and not end-users.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193681
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 30 Oct 2013 13:07:44 +0000 (13:07 +0000)]
[mips][msa] Added support for matching splat.[bhw] from normal IR (i.e. not intrinsics)
splat.d is implemented but this subtest is currently disabled. This is because
it is difficult to match the appropriate IR on MIPS32. There is a patch under
review that should help with this so I hope to enable the subtest soon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193680
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Wed, 30 Oct 2013 06:36:19 +0000 (06:36 +0000)]
Revert "SelectionDAG: Teach the legalizer to split SETCC if VSELECT needs splitting too."
Now Hexagon and SystemZ are not happy with it :-(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193677
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Wed, 30 Oct 2013 05:48:18 +0000 (05:48 +0000)]
SelectionDAG: Teach the legalizer to split SETCC if VSELECT needs splitting too.
The Type Legalizer recognizes that VSELECT needs to be split, because the type
is to wide for the given target. The same does not always apply to SETCC,
because less space is required to encode the result of a comparison. As a result
VSELECT is split and SETCC is unrolled into scalar comparisons.
This commit fixes the issue by checking for VSELECT-SETCC patterns in the DAG
Combiner. If a matching pattern is found, then the result mask of SETCC is
promoted to the expected vector mask type for the given target. This mask has
usually the same size as the VSELECT return type (except for Intel KNL). Now the
type legalizer will split both VSELECT and SETCC.
This allows the following X86 DAG Combine code to sucessfully detect the MIN/MAX
pattern. This fixes PR16695, PR17002, and <rdar://problem/
14594431>.
Reviewed by Nadav
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193676
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 30 Oct 2013 04:03:03 +0000 (04:03 +0000)]
Reformat Makefile. No other changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193675
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 30 Oct 2013 02:29:43 +0000 (02:29 +0000)]
[mips] Compute stack alignment on the fly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193673
91177308-0d34-0410-b5e6-
96231b3b80d8
Josh Magee [Wed, 30 Oct 2013 02:25:14 +0000 (02:25 +0000)]
Reformat code with clang-format.
Differential Revision: http://llvm-reviews.chandlerc.com/D2057
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193672
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 30 Oct 2013 00:49:39 +0000 (00:49 +0000)]
StackProtector.h: Fix trailing comments for doxygen. [-Wdocumentation]
s!//<!///<!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193669
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 30 Oct 2013 00:49:33 +0000 (00:49 +0000)]
Trailing whitespace in a comment line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193668
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Tue, 29 Oct 2013 23:14:15 +0000 (23:14 +0000)]
Debug Info: code clean up.
Use EmitLabelOffsetDifference for handling on darwin platform when
non-darwin platforms use EmitLabelPlusOffset.
Also fix a bug in EmitLabelOffsetDifference where the size is hard-coded
to 4 even though Size is passed in as an argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193660
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Tue, 29 Oct 2013 22:57:10 +0000 (22:57 +0000)]
Debug Info: support for DW_FORM_ref_addr.
To support ref_addr, we calculate the section offset of a DIE (i.e. offset
of a DIE from beginning of the debug info section). The Offset field in DIE
is currently CU-relative. To calculate the section offset, we add a
DebugInfoOffset field in CompileUnit to store the offset of a CU from beginning
of the debug info section. We set the value in DwarfUnits::computeSizeAndOffset
for each CompileUnit.
A helper function DIE::getCompileUnit is added to return the CU DIE that
the input DIE belongs to. We also add a map CUDieMap in DwarfDebug to help
finding the CU for a given CU DIE.
For a cross-referenced DIE, we first find the CU DIE it belongs to with
getCompileUnit, then we use CUDieMap to get the corresponding CU for the CU DIE.
Adding the section offset of the CU with the CU-relative offset of a DIE gives
us the seciton offset of the DIE.
We correctly emit ref_addr with relocation using EmitLabelPlusOffset when
doesDwarfUseRelocationsAcrossSections is true.
This commit handles the emission of DW_FORM_ref_addr when we have an attribute
with FORM_ref_addr. A follow-on patch will start using ref_addr when adding a
DIEEntry. This commit will be tested and verified in the follow-on patch.
Reviewed off-list by Eric, Thanks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193658
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Tue, 29 Oct 2013 22:49:29 +0000 (22:49 +0000)]
Debug Info: instead of calling addToContextOwner which constructs the context
after the DIE creation, we construct the context first.
Ensure that we create the context before we create a type so that we can add
the newly created type to the parent. Remove last use of addToContextOwner
now that it's not needed.
We use createAndAddDIE to wrap around "new DIE(". Now all shareable DIEs
should be added to their parents right after the creation.
Reviewed off-list by Eric, Thanks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193657
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Tue, 29 Oct 2013 22:27:32 +0000 (22:27 +0000)]
Struct byval cleanup: add helper functions to reduce code duplication.
Helper functions are added:
emitPostLd: emit a post-increment load operation with given size.
emitPostSt: emit a post-increment store operation with given size.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193656
91177308-0d34-0410-b5e6-
96231b3b80d8
Josh Magee [Tue, 29 Oct 2013 21:16:16 +0000 (21:16 +0000)]
[stackprotector] Update the StackProtector pass to perform datalayout analysis.
This modifies the pass to classify every SSP-triggering AllocaInst according to
an SSPLayoutKind (LargeArray, SmallArray, AddrOf). This analysis is collected
by the pass and made available for use, but no other pass uses it yet.
The next patch will make use of this analysis in PEI and StackSlot
passes. The end goal is to support ssp-strong stack layout rules.
WIP.
Differential Revision: http://llvm-reviews.chandlerc.com/D1789
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193653
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 29 Oct 2013 21:04:19 +0000 (21:04 +0000)]
Update comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193651
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 29 Oct 2013 20:59:29 +0000 (20:59 +0000)]
Workaround MSVC 32-bit miscompile of getCondCodeAction.
Use 32-bit types for the array instead of 64. This should
generally be better anyway.
In optimized + assert builds, I saw a failure when a
cond code / type combination that is never set was loading
a non-zero value and hitting the != Promote assert.
It turns out when loading the 64-bit value to do the shift,
the assembly loads the 2 32-bit halves from non-consecutive
addresses. The address the second half of the loaded uint64_t
doesn't include the offset of the array in the struct. Instead
of being offset + 4, it's just + 4.
I'm not entirely sure why this wasn't observed before.
setCondCodeAction isn't heavily used by the in-tree targets,
and not with the higher valued vector SimpleValueTypes. Only
PPC is using one of the > 32 valued types, and that is probably
never used by anyone on a 32-bit MSVC compiled host.
I ran into this when upgrading LLVM versions, so I guess the
value loaded from the nonsense address happened to work out
before.
No test since I'm not really sure if / how it can be reproduced
with the current in tree targets, and it's not supposed to change
anything.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193650
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Tue, 29 Oct 2013 20:40:52 +0000 (20:40 +0000)]
Removing a switch statement that contains only a default label. This resolves an MSVC warning. No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193649
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 29 Oct 2013 19:29:03 +0000 (19:29 +0000)]
[mips] Align the stack to 16-bytes for mfp64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193641
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 29 Oct 2013 18:31:14 +0000 (18:31 +0000)]
Remove declared but not implemented function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193637
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 29 Oct 2013 17:53:27 +0000 (17:53 +0000)]
Fix common typos in the docs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193632
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 29 Oct 2013 17:28:26 +0000 (17:28 +0000)]
Move getSymbol to TargetLoweringObjectFile.
This allows constructing a Mangler with just a TargetMachine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193630
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Tue, 29 Oct 2013 17:27:14 +0000 (17:27 +0000)]
Debug Info: clean up testing case.
Add a tag before the name attribute for readability. Use CHECK-NEXT
instead of CHECK-NOT followed by a CHECK. Add new lines to separate checking
of different DIEs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193629
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 29 Oct 2013 17:07:16 +0000 (17:07 +0000)]
Add a helper getSymbol to AsmPrinter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193627
91177308-0d34-0410-b5e6-
96231b3b80d8
Weiming Zhao [Tue, 29 Oct 2013 17:01:29 +0000 (17:01 +0000)]
add test cases for frameaddr and returnaddr for aarch64
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193626
91177308-0d34-0410-b5e6-
96231b3b80d8
Weiming Zhao [Tue, 29 Oct 2013 17:00:25 +0000 (17:00 +0000)]
[AArch64] Implement FrameAddr and ReturnAddr
Fixes PR17690
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193625
91177308-0d34-0410-b5e6-
96231b3b80d8
Amara Emerson [Tue, 29 Oct 2013 16:54:52 +0000 (16:54 +0000)]
[ARM] Make sure HasCRC is initialized to false in Subtarget.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193624
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Tue, 29 Oct 2013 16:38:59 +0000 (16:38 +0000)]
Support for microMIPS jump instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193623
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 29 Oct 2013 16:37:28 +0000 (16:37 +0000)]
R600/SI: Add compute support for CI v2
v2:
- Fix LDS size calculation
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193621
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 29 Oct 2013 16:37:20 +0000 (16:37 +0000)]
R600: Expand vector FSQRT ops
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193620
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Tue, 29 Oct 2013 16:32:19 +0000 (16:32 +0000)]
DWARF parser: propery handle DW_FORM_ref_sig8 and fix Windows build.
Based on D2050 by Timur Iskhodzhanov.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193619
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 29 Oct 2013 16:24:21 +0000 (16:24 +0000)]
The asm printer has a mangler. Use it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193618
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 29 Oct 2013 16:18:15 +0000 (16:18 +0000)]
The AsmPrinter has a Mangler. Use it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193617
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 29 Oct 2013 16:11:22 +0000 (16:11 +0000)]
The asm printer has a mangler. Don't keep a second pointer to it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193616
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 29 Oct 2013 14:25:43 +0000 (14:25 +0000)]
Support names like llvm-ar-3.4 and llvm-ranlib-3.4.
They are used in some packages. For example:
http://packages.ubuntu.com/saucy/i386/llvm-3.4/filelist
This fixes pr17721.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193612
91177308-0d34-0410-b5e6-
96231b3b80d8
Bernard Ogden [Tue, 29 Oct 2013 14:16:09 +0000 (14:16 +0000)]
Test cleanup for v8 instructions
Add some missing tests, factor out a test not specific to v8 into
its own file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193611
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 29 Oct 2013 13:44:11 +0000 (13:44 +0000)]
Clarify that GlobalVariables definitions must have an initializer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193609
91177308-0d34-0410-b5e6-
96231b3b80d8
Timur Iskhodzhanov [Tue, 29 Oct 2013 12:13:22 +0000 (12:13 +0000)]
Quick-fix DebugInfo build on Windows
MSVC can't comprehend
template<typename T, size_t N>
ArrayRef<T> makeArrayRef(const T (&Arr)[N]) {
return ArrayRef<T>(Arr);
}
if Arr is
static const uint8_t sizes[];
declared in a templated and defined a few lines later.
I'll send a proper fix (i.e. get rid of unnecessary templates) for review soon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193604
91177308-0d34-0410-b5e6-
96231b3b80d8
Bernard Ogden [Tue, 29 Oct 2013 09:47:35 +0000 (09:47 +0000)]
ARM: Add subtarget feature for CRC
Adds a subtarget feature for the CRC instructions (optional in v8-A) to the ARM (32-bit) backend.
Differential Revision: http://llvm-reviews.chandlerc.com/D2036
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193599
91177308-0d34-0410-b5e6-
96231b3b80d8
Anders Waldenborg [Tue, 29 Oct 2013 09:37:28 +0000 (09:37 +0000)]
Fix misapplied patch in r193597
Sorry Peter Zotov, entirely my fault.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193598
91177308-0d34-0410-b5e6-
96231b3b80d8
Anders Waldenborg [Tue, 29 Oct 2013 09:02:02 +0000 (09:02 +0000)]
llvm-c: Make LLVM{Get,Set}Alignment work on {Load,Store}Inst too
Patch by Peter Zotov
Differential Revision: http://llvm-reviews.chandlerc.com/D1910
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193597
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 29 Oct 2013 08:22:33 +0000 (08:22 +0000)]
AArch64: add 'a' inline asm operand modifier
This is used in the Linux kernel, and effectively just means "print an
address".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193593
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Tue, 29 Oct 2013 05:49:41 +0000 (05:49 +0000)]
Debug Info: instead of calling addToContextOwner which constructs the context
after the DIE creation, we construct the context first.
This touches creation of namespaces and global variables. The purpose is to
handle all DIE creations similarly: constructs the context first, then creates
the DIE and immediately adds the DIE to its parent.
We use createAndAddDIE to wrap around "new DIE(".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193589
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 29 Oct 2013 02:46:00 +0000 (02:46 +0000)]
Add llvm/test/Transforms/SLPVectorizer/ARM/lit.local.cfg. Tests there require ARM in targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193580
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Tue, 29 Oct 2013 02:35:28 +0000 (02:35 +0000)]
Fix "existant" typos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193579
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 29 Oct 2013 01:44:23 +0000 (01:44 +0000)]
Clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193576
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 29 Oct 2013 01:43:05 +0000 (01:43 +0000)]
DWARFFormValue.cpp: Appease gcc to give explicit constructors.
error: conversion from `const uint8_t*' to non-scalar type `llvm::ArrayRef<unsigned char>' requested
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193575
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Tue, 29 Oct 2013 01:33:57 +0000 (01:33 +0000)]
ARM cost model: Unaligned vectorized double stores are expensive
Updated a test case that assumed that <2 x double> would vectorize to use
<4 x float>.
radar://
15338229
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193574
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Tue, 29 Oct 2013 01:33:53 +0000 (01:33 +0000)]
ARM cost model: Account for zero cost scalar SROA instructions
By vectorizing a series of srl, or, ... instructions we have obfuscated the
intention so much that the backend does not know how to fold this code away.
radar://
15336950
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193573
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Tue, 29 Oct 2013 01:33:50 +0000 (01:33 +0000)]
SLPVectorizer: Use vector type for vectorized memory operations
No test case, because with the current cost model we don't see a difference.
An upcoming ARM memory cost model change will expose and test this bug.
radar://
15332579
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193572
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Tue, 29 Oct 2013 01:33:14 +0000 (01:33 +0000)]
Cleaning up comments in lli
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193571
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Tue, 29 Oct 2013 01:29:56 +0000 (01:29 +0000)]
Adding a workaround for __main linking with remote lli and Cygwin/MinGW
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193570
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Tue, 29 Oct 2013 01:06:17 +0000 (01:06 +0000)]
Move the STT_FILE symbols out of the normal symbol table processing for
ELF. They can overlap with the other symbols, e.g. if a source file
"foo.c" contains a function "foo" with a static variable "c".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193569
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Tue, 29 Oct 2013 01:03:01 +0000 (01:03 +0000)]
Debug Info: use createAndAddDIE to wrap around "new DIE" in DwarfDebug.
This commit ensures DIEs are constructed within a compile unit and
immediately added to their parents.
Reviewed off-list by Eric.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193568
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Tue, 29 Oct 2013 00:58:04 +0000 (00:58 +0000)]
Debug Info: use createAndAddDIE for newly-created Subprogram DIEs.
More patches will be submitted to convert "new DIE(" to use createAddAndDIE in
DwarfCompileUnit.cpp. This will simplify implementation of addDIEEntry where
we have to decide between ref4 and ref_addr, because DIEs that can be shared
across CU will be added to a CU already.
Reviewed off-list by Eric.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193567
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Tue, 29 Oct 2013 00:53:03 +0000 (00:53 +0000)]
Debug Info: add a helper function createAndAddDIE.
It wraps around "new DIE(" and handles the bookkeeping part of the newly-created
DIE. It adds the DIE to its parent, and calls insertDIE if necessary. It makes
sure that bookkeeping is done at the earliest time and we should not see
parentless DIEs if all constructions of DIEs go through this helper function.
Later on, we can use an allocator for DIE allocation, and will only need to
change createAndAddDIE instead of modifying all the "new DIE(".
Reviewed off-list by Eric.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193566
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Mon, 28 Oct 2013 23:58:58 +0000 (23:58 +0000)]
Merge DWARFDIE::extractFast and DWARFDIE::extract into one function.
Complicated CU-DIE-specific logic in the latter was never used,
and it makes sense to have safety checks for broken dwarf in the former.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193563
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Mon, 28 Oct 2013 23:51:03 +0000 (23:51 +0000)]
Renaming MCJIT .ir files to .ll and moving them to Inputs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193562
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Mon, 28 Oct 2013 23:41:49 +0000 (23:41 +0000)]
DWARF parser: Use ArrayRef to represent form sizes and simplify DWARFDIE::extractFast() interface. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193560
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Mon, 28 Oct 2013 23:37:49 +0000 (23:37 +0000)]
lit: add missing substitutions for recently added tools
llvm-mcmarkup, obj2yaml and yaml2obj were missing from the substitutions list,
causing the test suite to fail in a sandboxed environment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193559
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Mon, 28 Oct 2013 23:37:45 +0000 (23:37 +0000)]
Quote potential shell expansions found in tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193558
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Mon, 28 Oct 2013 23:15:15 +0000 (23:15 +0000)]
DWARF parser: since DWARF4, DW_AT_high_pc may be a constant representing function size
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193555
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Mon, 28 Oct 2013 23:01:48 +0000 (23:01 +0000)]
DebugInfo: Introduce the notion of "form classes"
Summary:
Use DWARF4 table of form classes to fetch attributes from DIE
in a more consistent way. This shouldn't change the functionality and
serves as a refactoring for upcoming change: DW_AT_high_pc has different
semantics depending on its form class.
Reviewers: dblaikie, echristo
Reviewed By: echristo
CC: echristo, llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1961
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193553
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Mon, 28 Oct 2013 22:51:25 +0000 (22:51 +0000)]
Fix the lli --extra-module value_desc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193552
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Mon, 28 Oct 2013 22:42:54 +0000 (22:42 +0000)]
Add a few tests for StringRef::{start,end}with.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193550
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 28 Oct 2013 22:17:19 +0000 (22:17 +0000)]
Convert another llc -filetype=obj test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193548
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 28 Oct 2013 22:11:47 +0000 (22:11 +0000)]
Convert another llc -filetype=obj test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193547
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 28 Oct 2013 22:05:05 +0000 (22:05 +0000)]
Convert another llc -filetype=obj test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193546
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Mon, 28 Oct 2013 21:58:15 +0000 (21:58 +0000)]
Standardizing lli's extra module command line option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193544
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 28 Oct 2013 21:43:54 +0000 (21:43 +0000)]
Remove stray '_'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193543
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 28 Oct 2013 21:43:11 +0000 (21:43 +0000)]
Use the correct reference. Spotted by Sean Silva.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193542
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 28 Oct 2013 21:22:23 +0000 (21:22 +0000)]
Remove 2.4 from the list of supported Python versions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193541
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Mon, 28 Oct 2013 21:21:36 +0000 (21:21 +0000)]
[mips] Simplify LowerFormalArguments using getRegClassFor.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193540
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 28 Oct 2013 21:12:15 +0000 (21:12 +0000)]
Convert another llc -filetype=obj test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193539
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 28 Oct 2013 21:06:12 +0000 (21:06 +0000)]
Convert another llc -filetype=obj test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193538
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 28 Oct 2013 20:59:41 +0000 (20:59 +0000)]
Convert another llc -filetype=obj test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193537
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 28 Oct 2013 20:54:33 +0000 (20:54 +0000)]
Convert another llc -filetype=obj test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193536
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 28 Oct 2013 20:51:11 +0000 (20:51 +0000)]
Return early from getUnconditionalBranchTargetOpValue if the branch target is
an MCExpr, in order to avoid writing an encoded zero value in the immediate
field.
When getUnconditionalBranchTargetOpValue is called with an MCExpr target, we
don't know what the final immediate field value should be. We shouldn't
explicitly set the immediate field to an encoded zero value as zero is encoded
with a non-zero bit pattern. This leads to bits being set that pollute the
final immediate value. The nature of the encoding is such that the polluted
bits only affect very large immediate values, explaining why this hasn't
caused problems earlier.
Fixes <rdar://problem/
15155975>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193535
91177308-0d34-0410-b5e6-
96231b3b80d8