Zoran Jovanovic [Fri, 20 Dec 2013 15:44:08 +0000 (15:44 +0000)]
Support for microMIPS FPU instructions 1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197815
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 20 Dec 2013 15:21:32 +0000 (15:21 +0000)]
Make this array const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197814
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Fri, 20 Dec 2013 11:56:02 +0000 (11:56 +0000)]
[SystemZ] Optimize comparisons with truncated extended loads
If the extension of a loaded value is compared against zero and used in
other arithmetic, InstCombine will change the comparison to use the
unextended load. It's also possible that the comparison could be against
the unextended load from the outset.
In DAG form this becomes a truncation of an extending load. We want to
strip the truncation if possible so that we can use load-and-test instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197804
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Fri, 20 Dec 2013 11:49:48 +0000 (11:49 +0000)]
[SystemZ] Extend RISBG optimization
The handling of ANY_EXTEND and ZERO_EXTEND was too strict. In this context
we can treat ZERO_EXTEND in much the same way as an AND and then also handle
outermost ZERO_EXTENDs.
I couldn't find a test that benefited from the ANY_EXTEND change, but it's
more obvious to write it this way once SIGN_EXTEND and ZERO_EXTEND are
handled differently.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197802
91177308-0d34-0410-b5e6-
96231b3b80d8
Timur Iskhodzhanov [Fri, 20 Dec 2013 10:32:12 +0000 (10:32 +0000)]
Fix a typo in the docs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197798
91177308-0d34-0410-b5e6-
96231b3b80d8
Kai Nacke [Fri, 20 Dec 2013 09:24:13 +0000 (09:24 +0000)]
Add support for krait cpu in llvm::sys::getHostCPUName()
Recently, support for krait cpu was added. This commit extends getHostCPUName()
to return krait as cpu for the APQ8064 (a Krait 300).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197792
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Fri, 20 Dec 2013 08:21:30 +0000 (08:21 +0000)]
Transforms: Don't create bad weights when eliminating dead cases
If we happen to eliminate every case in a switch that has branch
weights, we currently try to create metadata for the one remaining
branch, triggering an assert. Instead, we need to check that the
metadata we're trying to create is sensible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197791
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Fri, 20 Dec 2013 08:21:27 +0000 (08:21 +0000)]
test: Make a branchweight test more specific
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197790
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Fri, 20 Dec 2013 08:21:24 +0000 (08:21 +0000)]
test: Prefer CHECK-LABEL to CHECK in branchweight tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197789
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Fri, 20 Dec 2013 07:21:16 +0000 (07:21 +0000)]
ARM IAS: add support for the .pool directive
The .pool directive is an alias for the .ltorg directive used to create a
literal pool. Simply treat .pool as if .ltorg was passed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197787
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 20 Dec 2013 06:25:37 +0000 (06:25 +0000)]
Install three utils, "FileCheck", "count", and "not", for now to appease llvmlab dragonegg builder.
Since r197684, "install/bin/llvm-config --obj-root" hasn't shown the build tree. The builder was finding utils in the build tree, from the installed tree.
I will revert this after dragonegg builder would be tweaked not to use installed llvm-config.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197786
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 20 Dec 2013 05:11:55 +0000 (05:11 +0000)]
R600: Allow ftrunc
v2: Add ftrunc->TRUNC pattern instead of replacing int_AMDGPU_trunc
v3: move ftrunc pattern next to TRUNC definition, it's available since R600
Patch By: Jan Vesely
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197783
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 20 Dec 2013 04:40:28 +0000 (04:40 +0000)]
Remove extra check line that's failing on windows and not necessary at
the moment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197782
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 20 Dec 2013 04:34:50 +0000 (04:34 +0000)]
This test requires object emission.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197781
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 20 Dec 2013 04:34:22 +0000 (04:34 +0000)]
Ranges in the .debug_range section need to have begin and end labels,
assert that this is so.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197780
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 20 Dec 2013 04:20:23 +0000 (04:20 +0000)]
Makefile.unittest: cleanup may fail. Add '-' in the action.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197777
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 20 Dec 2013 04:16:18 +0000 (04:16 +0000)]
Add support for a CU to output a set of ranges for the CU. This is useful
when you want to have the full list of addresses for a particular CU or
when you have multiple modules linked together and can't depend upon the
ordering of a single CU for begin/end ranges.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197776
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Fri, 20 Dec 2013 03:11:07 +0000 (03:11 +0000)]
Remove the AnyPointerSize and AnyEndianness enumerators, which were left from
LLVM's early days. Today LLVM IR is always target-specific.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197772
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Fri, 20 Dec 2013 02:54:35 +0000 (02:54 +0000)]
When parsing data layout string looking for endianness, use the correct default
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197771
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Fri, 20 Dec 2013 02:46:23 +0000 (02:46 +0000)]
Correctly apply the default pointer size
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197770
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 20 Dec 2013 02:04:49 +0000 (02:04 +0000)]
[x86] Rename In32BitMode predicate to Not64BitMode
That's what it actually means, and with 16-bit support it's going to be
a little more relevant since in a few corner cases we may actually want
to distinguish between 16-bit and 32-bit mode (for example the bare 'push'
aliases to pushw/pushl etc.)
Patch by David Woodhouse
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197768
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Fri, 20 Dec 2013 00:37:18 +0000 (00:37 +0000)]
move test back into the parent directory and add a REQUIRES: obj emission.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197759
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 20 Dec 2013 00:36:59 +0000 (00:36 +0000)]
Makefile.ocaml: Tweak to use --system-libs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197758
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Fri, 20 Dec 2013 00:33:39 +0000 (00:33 +0000)]
Fix documentation typos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197757
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 19 Dec 2013 23:38:09 +0000 (23:38 +0000)]
Update the ML test to expect the new string format of getStringRepresentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197750
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Thu, 19 Dec 2013 23:16:14 +0000 (23:16 +0000)]
Un-revert: the buildbot failure in LLVM on lld-x86_64-win7 had me with
this commit as the only one on the Blamelist so I quickly reverted this.
However it was actually Nick's change who has since fixed that issue.
Original commit message:
Changed the X86 assembler for intel syntax to work with directional labels.
The X86 assembler as a separate code to parser the intel assembly syntax
in X86AsmParser::ParseIntelOperand(). This did not parse directional labels.
And if something like 1f was used as a branch target it would get an
"Unexpected token" error.
The fix starts in X86AsmParser::ParseIntelExpression() in the case for
AsmToken::Integer, it needs to grab the IntVal from the current token
then look for a 'b' or 'f' following an Integer. Then it basically needs to
do what is done in AsmParser::parsePrimaryExpr() for directional
labels. It saves the MCExpr it creates in the IntelExprStateMachine
in the Sym field.
When it returns to X86AsmParser::ParseIntelOperand() it looks
for a non-zero Sym field in the IntelExprStateMachine and if
set it creates a memory operand not an immediate operand
it would normally do for the Integer.
rdar://
14961158
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197744
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 19 Dec 2013 23:13:58 +0000 (23:13 +0000)]
Use $ORIGIN when setting rpath.
This matches what the configure build does.
Patch by Jan Vesely.
Fixes pr14189.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197743
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 19 Dec 2013 23:03:03 +0000 (23:03 +0000)]
Change getStringRepresentation to skip defaults.
I have a pending change for clang to use getStringRepresentation to check
that its DataLayout is in sync with llvm's.
getStringRepresentation is not called from llvm itself, so far it is mostly
a debugging aid, so the shorter strings are an independent improvement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197740
91177308-0d34-0410-b5e6-
96231b3b80d8
David Peixotto [Thu, 19 Dec 2013 22:41:56 +0000 (22:41 +0000)]
Ensure deterministic when printing ARM assembler constant pools
We dump any non-empty assembler constant pools after a successful
parse of an assembly file that uses the ldr pseudo opcode. These
per-section constant pools should be output in a deterministic order
to ensure that we always generate the same output when printing the
output with an AsmStreamer.
This patch changes the map data struture used to associate a section
with its constant pool to a MapVector to ensure deterministic
output. Because this map type does not support deletion, we now
check that the constant pool is not empty before dumping its entries
and clear the entries after emitting them with the streamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197735
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Thu, 19 Dec 2013 22:24:09 +0000 (22:24 +0000)]
Revert my change to the X86 assembler for intel syntax to work with
directional labels. Because it doesn't work for windows :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197731
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Thu, 19 Dec 2013 22:02:03 +0000 (22:02 +0000)]
Changed the X86 assembler for intel syntax to work with directional labels.
The X86 assembler has a separate code to parser the intel assembly syntax
in X86AsmParser::ParseIntelOperand(). This did not parse directional labels.
And if something like 1f was used as a branch target it would get an
"Unexpected token" error.
The fix starts in X86AsmParser::ParseIntelExpression() in the case for
AsmToken::Integer, it needs to grab the IntVal from the current token
then look for a 'b' or 'f' following the Integer. Then it basically needs to
do what is done in AsmParser::parsePrimaryExpr() for directional
labels. It saves the MCExpr it creates in the IntelExprStateMachine
in the Sym field.
When it returns to X86AsmParser::ParseIntelOperand() it looks
for a non-zero Sym field in the IntelExprStateMachine and if
set it creates a memory operand not an immediate operand
it would normally do for the Integer.
rdar://
14961158
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197728
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 19 Dec 2013 20:54:33 +0000 (20:54 +0000)]
Update the links to the SPARC information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197719
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 19 Dec 2013 20:32:44 +0000 (20:32 +0000)]
Make sys::ThreadLocal<> zero-initialized on non-thread builds (PR18205)
According to the docs, ThreadLocal<>::get() should return NULL
if no object has been set. This patch makes that the case also for non-thread
builds and adds a very basic unit test to check it.
(This was causing PR18205 because PrettyStackTraceHead didn't get zero-
initialized and we'd crash trying to read past the end of that list. We didn't
notice this so much on Linux since we'd crash after printing all the entries,
but on Mac we print into a SmallString, and would crash before printing that.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197718
91177308-0d34-0410-b5e6-
96231b3b80d8
Kay Tiong Khoo [Thu, 19 Dec 2013 18:35:54 +0000 (18:35 +0000)]
Stay classy (and legal) LLVM. Remove links to 3rd party SMT solver whose links may not be permanent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197713
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Thu, 19 Dec 2013 18:32:04 +0000 (18:32 +0000)]
[X86][fast-isel] Fix select lowering.
The condition in selects is supposed to be i1.
Make sure we are just reading the less significant bit
of the 8 bits width value to match this constraint.
<rdar://problem/
15651765>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197712
91177308-0d34-0410-b5e6-
96231b3b80d8
David Peixotto [Thu, 19 Dec 2013 18:26:07 +0000 (18:26 +0000)]
Implement the .ltorg directive for ARM assembly
This directive will write out the assembler-maintained constant
pool for the current section. These constant pools are created to
support the ldr-pseudo instruction (e.g. ldr r0, =val).
The directive can be used by the programmer to place the constant
pool in a location that can be reached by a pc-relative offset in
the ldr instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197711
91177308-0d34-0410-b5e6-
96231b3b80d8
Josh Magee [Thu, 19 Dec 2013 18:14:42 +0000 (18:14 +0000)]
Unbreak ARM buildbots after r197653 by forcing the target triple on this test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197709
91177308-0d34-0410-b5e6-
96231b3b80d8
David Peixotto [Thu, 19 Dec 2013 18:12:36 +0000 (18:12 +0000)]
Implement the ldr-pseudo opcode for ARM assembly
The ldr-pseudo opcode is a convenience for loading 32-bit constants.
It is converted into a pc-relative load from a constant pool. For
example,
ldr r0, =0x10001
ldr r1, =bar
will generate this output in the final assembly
ldr r0, .Ltmp0
ldr r1, .Ltmp1
...
.Ltmp0: .long 0x10001
.Ltmp1: .long bar
Sketch of the LDR pseudo implementation:
Keep a map from Section => ConstantPool
When parsing ldr r0, =val
parse val as an MCExpr
get ConstantPool for current Section
Label = CreateTempSymbol()
remember val in ConstantPool at next free slot
add operand to ldr that is MCSymbolRef of Label
On finishParse() callback
Write out all non-empty constant pools
for each Entry in ConstantPool
Emit Entry.Label
Emit Entry.Value
Possible improvements to be added in a later patch:
1. Does not convert load of small constants to mov
(e.g. ldr r0, =0x1 => mov r0, 0x1)
2. Does reuse constant pool entries for same constant
The implementation was tested for ARM, Thumb1, and Thumb2 targets on
linux and darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197708
91177308-0d34-0410-b5e6-
96231b3b80d8
David Peixotto [Thu, 19 Dec 2013 18:08:08 +0000 (18:08 +0000)]
Add a finishParse() callback to the targer asm parser
This callback is invoked when the parse has finished successfuly. It
will be used to write out ARM constant pools to implement the ldr
pseudo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197706
91177308-0d34-0410-b5e6-
96231b3b80d8
Kay Tiong Khoo [Thu, 19 Dec 2013 18:07:17 +0000 (18:07 +0000)]
Improved fix for PR17827 (instcombine of shift/and/compare).
This change fixes the case of arithmetic shift right - do not attempt to fold that case.
This change also relaxes the conditions when attempting to fold the logical shift right and shift left cases.
No additional IR-level test cases included at this time. See http://llvm.org/bugs/show_bug.cgi?id=17827 for proofs that these are correct transformations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197705
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 19 Dec 2013 17:11:08 +0000 (17:11 +0000)]
Revert r197682, "[CMake] Introduce LIT in add_lit_target."
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197703
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Thu, 19 Dec 2013 17:09:05 +0000 (17:09 +0000)]
Move testcase to the appropriate X86 subdirectory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197701
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 19 Dec 2013 16:51:03 +0000 (16:51 +0000)]
Small simplification, p0 is the same as p.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197699
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Thu, 19 Dec 2013 16:25:00 +0000 (16:25 +0000)]
Support for microMIPS control instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197696
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 19 Dec 2013 16:23:59 +0000 (16:23 +0000)]
Long doubles are required to be aligned to 128 bits and svr4 32 bits.
Clang was already getting this right.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197694
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 19 Dec 2013 16:13:01 +0000 (16:13 +0000)]
Add a disassembler to the PowerPC backend
The tests for the disassembler were adapted from the encoder tests, and for the
most part, the output from the disassembler matches that encoder-test inputs.
There are some places where more-informative mnemonics could be produced
(notably for the branch instructions), and those cases are noted in the tests
with FIXMEs.
Future work includes:
- Generating more-informative mnemonics when possible (this may also be done
in the printer).
- Remove the dependence on positional "numbered" operand-to-variable mapping
(for both encoding and decoding).
- Internally using 64-bit instruction variants in 64-bit mode (if this turns
out to matter).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197693
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Thu, 19 Dec 2013 16:12:56 +0000 (16:12 +0000)]
Support for microMIPS LL and SC instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197692
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 19 Dec 2013 16:12:53 +0000 (16:12 +0000)]
Add support for positionally-encoded operands to FixedLenDecoderEmitter
Unfortunately, the PowerPC instruction definitions make heavy use of the
positional operand encoding heuristic to map operands onto bitfield variables
in the instruction definitions. Changing this to use name-based mapping is not
trivial, however, because additional infrastructure needs to be designed to
handle mapping of complex operands (with multiple suboperands) onto multiple
bitfield variables.
In the mean time, this adds support for positionally encoded operands to
FixedLenDecoderEmitter, so that we can generate a disassembler for the PowerPC
backend. To prevent an accidental reliance on this feature, and to prevent an
undesirable interaction with existing disassemblers, a backend must opt-in to
this support by setting the new decodePositionallyEncodedOperands
instruction-set bit to true.
When enabled, this iterates the variables that contribute to the instruction
encoding, just as the encoder does, and emulates the procedure the encoder uses
to map "numbered" operands to variables. The bit range for each variable is
also determined as the encoder determines them. This map is then consulted
during the decoder-generator's loop over operands to decode, allowing the
decoder to understand both position-based and name-based operand-to-variable
mappings.
As noted in the comment on the decodePositionallyEncodedOperands definition,
this support should be removed once it is no longer needed. There should be no
change to existing disassemblers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197691
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 19 Dec 2013 16:06:33 +0000 (16:06 +0000)]
Add a triple so that this passes on OS X.
I am surprised I am the first one to notice this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197689
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Thu, 19 Dec 2013 16:02:32 +0000 (16:02 +0000)]
Support for microMIPS TLS relocations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197685
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 19 Dec 2013 16:02:28 +0000 (16:02 +0000)]
llvm-config: Don't show build tree with --obj-root for installed llvm-config. Show $(prefix) instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197684
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 19 Dec 2013 16:02:23 +0000 (16:02 +0000)]
llvm-config: Show build root instead of parent path in build tree with --obj-root for CMake multiconfig.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197683
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 19 Dec 2013 16:02:17 +0000 (16:02 +0000)]
[CMake] Introduce LIT in add_lit_target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197682
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 19 Dec 2013 14:58:22 +0000 (14:58 +0000)]
Add support for PointerLikeRegClass to FixedLenDecoderEmitter
This is more prep for adding the PowerPC disassembler. FixedLenDecoderEmitter
should recognize PointerLikeRegClass operands as register types, and generate
register-like decoding calls instead of treating them like immediates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197680
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Thu, 19 Dec 2013 14:37:03 +0000 (14:37 +0000)]
[dfsan] Simplify code after r197677.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197679
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Thu, 19 Dec 2013 13:29:56 +0000 (13:29 +0000)]
Add an explicit insert point argument to SplitBlockAndInsertIfThen.
Currently SplitBlockAndInsertIfThen requires that branch condition is an
Instruction itself, which is very inconvenient, because it is sometimes an
Operator, or even a Constant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197677
91177308-0d34-0410-b5e6-
96231b3b80d8
Timur Iskhodzhanov [Thu, 19 Dec 2013 11:37:14 +0000 (11:37 +0000)]
Teach the llvm-readobj COFF dumper to dump debug line tables from object files
Reviewed at http://llvm-reviews.chandlerc.com/D2425
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197674
91177308-0d34-0410-b5e6-
96231b3b80d8
Timur Iskhodzhanov [Thu, 19 Dec 2013 11:30:21 +0000 (11:30 +0000)]
Remove the COFF files with Z7 debug info from the repo
Rationale: going to land D2425 shortly.
I'll re-land these COFF files along with D2425 to simplify the SVN history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197673
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 19 Dec 2013 10:41:12 +0000 (10:41 +0000)]
Add REQUIRES:asserts to 3 tests in llvm/test/CodeGen/R600 added in r192212.
They are failing in assertions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197669
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 19 Dec 2013 08:46:36 +0000 (08:46 +0000)]
llvm-config: Introduce --system-libs to print SYSTEM_LIBS, and deprecate SYSTEM_LIBS in --ldflags.
Although --system-libs is expected to use after --libs, it can be used alone.
$ bin/llvm-config --ldflags
-L/path/to/llvm/objroot/lib
$ bin/llvm-config --libs object
-lLLVMObject -lLLVMSupport
$ bin/llvm-config --system-libs
(Blank line. "all" is assumed but nothing is printed.)
-lrt -ldl -ltinfo -lpthread -lz
$ bin/llvm-config --ldflags --libs --system-libs object
-L/path/to/llvm/objroot/lib
-lLLVMObject -lLLVMSupport
-lrt -ldl -ltinfo -lpthread -lz
It is reimplementation of r197380, and workaround for PR3347 and PR8449.
FIXME: Each LLVM component may have its dependent system libs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197664
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 19 Dec 2013 08:46:28 +0000 (08:46 +0000)]
GCOV.cpp: Fix format strings, %lf. Don't use %lf to double.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197663
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 19 Dec 2013 07:09:28 +0000 (07:09 +0000)]
Introduce clean-ups in llvm/unittests/Makefile.unittest, to sweep stray *Tests.
Stray *Tests might stay after reverting.
FIXME: Could we apply this feature to clang/unittests?
FIXME: Implement this feature to CMake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197661
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 19 Dec 2013 05:32:55 +0000 (05:32 +0000)]
R600/SI: Make private pointers be 32-bit.
Different sized address spaces should theoretically work
most of the time now, and since 64-bit add is currently
disabled, using more 32-bit pointers fixes some cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197659
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 19 Dec 2013 05:32:44 +0000 (05:32 +0000)]
Fix missing C++ mode comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197658
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Thu, 19 Dec 2013 05:17:58 +0000 (05:17 +0000)]
ARM IAS: support .inst directive
This adds support for the .inst directive. This is an ARM specific directive to
indicate an instruction encoded as a constant expression. The major difference
between .word, .short, or .byte and .inst is that the latter will be
disassembled as an instruction since it does not get flagged as data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197657
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 19 Dec 2013 03:44:13 +0000 (03:44 +0000)]
No point in having a "#if 0"ed unittest.
It is also not clear what the value of the test was. The API is used from
existing tools and can (and is) tested with lit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197654
91177308-0d34-0410-b5e6-
96231b3b80d8
Josh Magee [Thu, 19 Dec 2013 03:17:11 +0000 (03:17 +0000)]
[stackprotector] Use analysis from the StackProtector pass for stack layout in PEI a nd LocalStackSlot passes.
This changes the MachineFrameInfo API to use the new SSPLayoutKind information
produced by the StackProtector pass (instead of a boolean flag) and updates a
few pass dependencies (to preserve the SSP analysis).
The stack layout follows the same approach used prior to this change - i.e.,
only LargeArray stack objects will be placed near the canary and everything
else will be laid out normally. After this change, structures containing large
arrays will also be placed near the canary - a case previously missed by the
old implementation.
Out of tree targets will need to update their usage of
MachineFrameInfo::CreateStackObject to remove the MayNeedSP argument.
The next patch will implement the rules for sspstrong and sspreq. The end goal
is to support ssp-strong stack layout rules.
WIP.
Differential Revision: http://llvm-reviews.chandlerc.com/D2158
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197653
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Thu, 19 Dec 2013 02:35:26 +0000 (02:35 +0000)]
Fix a buffer overrun detected by AddressSanitizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197647
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 19 Dec 2013 02:21:16 +0000 (02:21 +0000)]
Add stack alignment information for Sparc.
This matches the data in clang which was added by Jakob Stoklund Olesen in
r179596.
Thanks for erikjv on irc for pointing me to the relevant documents:
http://sparc.com/standards/64.psabi.1.35.ps.Z
page 25: Every stack frame must be 16-byte aligned.
http://sparc.com/standards/psABI3rd.pdf
page 3-10: Although the architecture requires only word alignment, software convention and the operating system require every stack frame to be doubleword aligned.
I tried to add a test, but it looks like sparc doesn't implement dynamic stack
realignment. This will be tested in clang shortly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197646
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 19 Dec 2013 02:14:12 +0000 (02:14 +0000)]
Begin adding docs and IR-level support for the inalloca attribute
The inalloca attribute is designed to support passing C++ objects by
value in the Microsoft C++ ABI. It behaves the same as byval, except
that it always implies that the argument is in memory and that the bytes
are never copied. This attribute allows the caller to take the address
of an outgoing argument's memory and execute arbitrary code to store
into it.
This patch adds basic IR support, docs, and verification. It does not
attempt to implement any lowering or fix any possibly broken transforms.
When this patch lands, a complete description of this feature should
appear at http://llvm.org/docs/InAlloca.html .
Differential Revision: http://llvm-reviews.chandlerc.com/D2173
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197645
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Thu, 19 Dec 2013 01:41:16 +0000 (01:41 +0000)]
add source in comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197642
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 19 Dec 2013 00:44:37 +0000 (00:44 +0000)]
Synchronize the NaCl DataLayout strings with the ones in clang.
Patch by Derek Schuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197640
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Thu, 19 Dec 2013 00:43:08 +0000 (00:43 +0000)]
Make cosmetic changes as part of Mips internal post commit review of
patch r196331.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197638
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 19 Dec 2013 00:41:08 +0000 (00:41 +0000)]
ArchiveFileDescriptorTests: Fix CMake build. Each unit test is expected to have suffix "*Tests" for lit gtest runner to seek one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197636
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 19 Dec 2013 00:41:03 +0000 (00:41 +0000)]
ArchiveFileDescriptorTests: Resurrect part of r197600, but make it invalidated, to appease buildbots.
Please revert this several hours later ;)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197635
91177308-0d34-0410-b5e6-
96231b3b80d8
Yuchen Wu [Thu, 19 Dec 2013 00:29:25 +0000 (00:29 +0000)]
llvm-cov: Added -f option for function summaries.
Similar to the file summaries, the function summaries output line,
branching and call statistics. The file summaries have been moved
outside the initial loop so that all of the function summaries can be
outputted before file summaries.
Also updated test cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197633
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Wed, 18 Dec 2013 23:57:48 +0000 (23:57 +0000)]
Fix a problem with mips16 stubs when calls are transformed during
tail call optimization. Some more work may be needed for indirect
calls but this patch fixes the current regression in Prolangc++/trees.
S2 optimization as part of the general cleanup and optimization
of prolog and epilog was not saving S2 in this case and needed to.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197630
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 18 Dec 2013 23:04:37 +0000 (23:04 +0000)]
Revert "Add -mcpu=z10 to SystemZ tests."
This reverts commit r197466.
The MachineCSE fix that required the -mcpu flag has been disabled
until more work can be done to fix downstream issues. Adding -mcpu
wasn't the right workaround anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197624
91177308-0d34-0410-b5e6-
96231b3b80d8
Weiming Zhao [Wed, 18 Dec 2013 22:25:17 +0000 (22:25 +0000)]
[aarch32] fix bug 18268: Incorrect condition of vsel
Given vsel_cc, op1, op2, since vsel has no LE/LT, to generate vsel for
such selection, it needs to inverse cc and swap op1 and op2. To inverse
cc, both L/G and E bits should be flipped.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197615
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Wed, 18 Dec 2013 21:48:19 +0000 (21:48 +0000)]
Debug info: Implement (rvalue) reference qualifiers for C++11 non-static
member functions. Paired commit with CFE.
rdar://problem/
15356637
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197613
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Wed, 18 Dec 2013 21:48:14 +0000 (21:48 +0000)]
Pull in a couple of new constants from the upcoming DWARF 5 standard.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197611
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Wed, 18 Dec 2013 21:48:11 +0000 (21:48 +0000)]
formatting
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197610
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 18 Dec 2013 21:29:44 +0000 (21:29 +0000)]
Correctly handle the degenerated triple "thumb".
Fixes a crash in llc where some parts think the target is thumb and others think
it is ARM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197607
91177308-0d34-0410-b5e6-
96231b3b80d8
Yuchen Wu [Wed, 18 Dec 2013 21:12:51 +0000 (21:12 +0000)]
llvm-cov: Print coverage summary to STDOUT.
File summaries will now be optionally outputted which will give line,
branching and call coverage info. Unfortunately, clang's current
instrumentation does not give enough information to deduce function
calls, something that gcc is able to do. Thus, no calls are always
outputted to be consistent with gcov output.
Also updated tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197606
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 18 Dec 2013 19:25:51 +0000 (19:25 +0000)]
Revert r197600 while I sort out why it's failing on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197602
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 18 Dec 2013 19:20:29 +0000 (19:20 +0000)]
Add a unit test for loading an object file via a file descriptor. Patch by Pete Cooper.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197600
91177308-0d34-0410-b5e6-
96231b3b80d8
Yuchen Wu [Wed, 18 Dec 2013 18:46:25 +0000 (18:46 +0000)]
llvm-cov: s/(.*)Executed/\1Exec/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197595
91177308-0d34-0410-b5e6-
96231b3b80d8
Yuchen Wu [Wed, 18 Dec 2013 18:40:15 +0000 (18:40 +0000)]
llvm-cov: Added -c option for branch counts.
This will cause llvm-cov to output branch counts instead of branch
probabilities. -b must be enabled.
Also updated tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197594
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Wed, 18 Dec 2013 17:50:33 +0000 (17:50 +0000)]
[CMake] Don't put every project's tblgen executable in the LLVM bin directory.
This changes Clang standalone builds so that clang-tblgen lives in
clang/build/bin instead of llvm/build/bin, and so that with the Xcode
generator it's in clang/build/bin/Debug instead of llvm/build/bin/Debug/Debug/.
Yes, really.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197590
91177308-0d34-0410-b5e6-
96231b3b80d8
Matheus Almeida [Wed, 18 Dec 2013 17:31:21 +0000 (17:31 +0000)]
[mips][msa] Update format of RUN lines for every MSA MC test.
1. The arch directive now appears before the cpu directive
2. Long run lines were split across multiple lines
No functional changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197588
91177308-0d34-0410-b5e6-
96231b3b80d8
Logan Chien [Wed, 18 Dec 2013 17:23:15 +0000 (17:23 +0000)]
[arm] Rename Tag_VFP_arch to Tag_FP_arch.
According to "Addenda to ABI for ARM architecture", Tag_FP_arch is the
new name for the equivalent Tag_VFP_arch. This commit renames
Tag_VFP_arch to Tag_FP_arch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197587
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 18 Dec 2013 16:21:16 +0000 (16:21 +0000)]
Revert r197380, "llvm-config: Print SYSTEM_LIBS with --libs, instead of --ldflags."
I will introduce another flag, like --system-libs, later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197583
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 18 Dec 2013 15:57:58 +0000 (15:57 +0000)]
[CMake] Prune LLVM_TOOLS_BINARY_DIR in LLVMConfig.cmake, since it always points build directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197581
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 18 Dec 2013 15:06:25 +0000 (15:06 +0000)]
Fix f64 and f128 for ppc-darwin.
This patch adds -f64:32:64 to 32 bit ppc darwin since a f64 inside a
structure are only 32 bit aligned.
The patch also drop -f128:64:128 from all ppc darwin, since f128 is
128 bit aligned.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197574
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 18 Dec 2013 14:35:37 +0000 (14:35 +0000)]
One ppc32-darwin, a i64 inside a structure can have 32 bit alignment.
Thanks for Iain Sandoe for testing this with the original gcc.
Clang was already getting this right.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197572
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 18 Dec 2013 14:18:36 +0000 (14:18 +0000)]
ARM: update comment to match reality
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197570
91177308-0d34-0410-b5e6-
96231b3b80d8
Matheus Almeida [Wed, 18 Dec 2013 11:06:13 +0000 (11:06 +0000)]
[mips][msa] Remove unneeded triple directive in MSA MC tests.
No functional changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197559
91177308-0d34-0410-b5e6-
96231b3b80d8
Tobias Grosser [Wed, 18 Dec 2013 10:12:06 +0000 (10:12 +0000)]
DiagnosticInfo: Add missing namespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197556
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 18 Dec 2013 09:58:06 +0000 (09:58 +0000)]
ARM: force soft-float ABI for tests depending on it.
This should fix the ARM bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197555
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 18 Dec 2013 09:27:33 +0000 (09:27 +0000)]
ARM: set default float ABI based on triple.
Clang sets the float-abi target option manually, but no longer
annotates each function with its ABI. This can lead to confusing
mistmatch between "clang -emit-llvm | llc" and normal clang
invocations.
Besides which, gnueabihf actually *is* hard-float. Defaulting to soft
was just perverse.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197554
91177308-0d34-0410-b5e6-
96231b3b80d8