Commit Graph

98780 Commits

Author SHA1 Message Date
Mark Lacey
efe6aa1adb Fix typo in assert message: s/load/store
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197846 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-21 00:00:49 +00:00
Yuchen Wu
5f2ddd6a0c BlockFrequencyInfo: Readded getEntryFreq.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197839 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-20 22:11:11 +00:00
Lang Hames
559e456504 ARM AnalyzeBranch should ignore DEBUG_VALUES while analyzing terminators.
Found by inspection by Julien Lerouge. Thanks Julian!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197833 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-20 20:27:51 +00:00
Timur Iskhodzhanov
93c53f4d24 clang-format a couple of mis-formatted functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197831 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-20 20:16:51 +00:00
Timur Iskhodzhanov
55b1086af2 Add the .secidx test I've forgotten to svn add in 197826
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197828 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-20 19:06:50 +00:00
Timur Iskhodzhanov
8aa3ff05c1 [COFF] Add support for the .secidx directive
Reviewed at http://llvm-reviews.chandlerc.com/D2445

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197826 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-20 18:15:00 +00:00
Artyom Skrobov
fc90ff9692 Resinstate the command line taking priority over CMakeLists in setting CMAKE_INSTALL_RPATH
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197825 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-20 18:13:12 +00:00
Roman Divacky
ed4678820b Implement initial-exec TLS for PPC32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197824 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-20 18:08:54 +00:00
Timur Iskhodzhanov
9413345f40 Fix yet another typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197821 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-20 17:52:31 +00:00
NAKAMURA Takumi
7c0eb96c8a llvm-config: Show OBJROOT rather than OBJROOT/BUILD_MODE in MakefileStyle.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197818 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-20 17:35:52 +00:00
NAKAMURA Takumi
247ea104f1 llvm-config: Use build_mode instead of LLVM_BUILDMODE. It should be equivalent in MakefileStyle.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197817 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-20 17:35:46 +00:00
Zoran Jovanovic
1ef2ca6994 Support for microMIPS FPU instructions 1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197815 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-20 15:44:08 +00:00
Rafael Espindola
2c6e51ffed Make this array const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197814 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-20 15:21:32 +00:00
Richard Sandiford
23c9710636 [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
2013-12-20 11:56:02 +00:00
Richard Sandiford
1fd4e55828 [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
2013-12-20 11:49:48 +00:00
Timur Iskhodzhanov
78a613731e Fix a typo in the docs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197798 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-20 10:32:12 +00:00
Kai Nacke
66732aeff2 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
2013-12-20 09:24:13 +00:00
Justin Bogner
bcb726dc8a 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
2013-12-20 08:21:30 +00:00
Justin Bogner
35c913b5b1 test: Make a branchweight test more specific
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197790 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-20 08:21:27 +00:00
Justin Bogner
a2323825cb 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
2013-12-20 08:21:24 +00:00
Saleem Abdulrasool
6692ce18e8 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
2013-12-20 07:21:16 +00:00
NAKAMURA Takumi
69475dd92b 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
2013-12-20 06:25:37 +00:00
Tom Stellard
37ee312f77 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
2013-12-20 05:11:55 +00:00
Eric Christopher
658537c710 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
2013-12-20 04:40:28 +00:00
Eric Christopher
c86696a22a This test requires object emission.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197781 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-20 04:34:50 +00:00
Eric Christopher
d1946f7afe 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
2013-12-20 04:34:22 +00:00
NAKAMURA Takumi
e9e7e2cc70 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
2013-12-20 04:20:23 +00:00
Eric Christopher
ff37ddf185 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
2013-12-20 04:16:18 +00:00
Dmitri Gribenko
e899f25163 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
2013-12-20 03:11:07 +00:00
Dmitri Gribenko
8d6a09de7d 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
2013-12-20 02:54:35 +00:00
Dmitri Gribenko
ea5893eb2d Correctly apply the default pointer size
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197770 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-20 02:46:23 +00:00
Eric Christopher
75a8b23e10 [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
2013-12-20 02:04:49 +00:00
Adrian Prantl
40bcde87f4 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
2013-12-20 00:37:18 +00:00
NAKAMURA Takumi
da031f7bd9 Makefile.ocaml: Tweak to use --system-libs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197758 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-20 00:36:59 +00:00
Alp Toker
baf8c08693 Fix documentation typos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197757 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-20 00:33:39 +00:00
Rafael Espindola
54317ec64a 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
2013-12-19 23:38:09 +00:00
Kevin Enderby
3121da3298 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
2013-12-19 23:16:14 +00:00
Rafael Espindola
b4fcab42ca 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
2013-12-19 23:13:58 +00:00
Rafael Espindola
b9df9e68e7 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
2013-12-19 23:03:03 +00:00
David Peixotto
a25701bc42 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
2013-12-19 22:41:56 +00:00
Kevin Enderby
ddc2347cc7 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
2013-12-19 22:24:09 +00:00
Kevin Enderby
86f49d5c01 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
2013-12-19 22:02:03 +00:00
Rafael Espindola
1191926a8a Update the links to the SPARC information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197719 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-19 20:54:33 +00:00
Hans Wennborg
837d6ed3ea 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
2013-12-19 20:32:44 +00:00
Kay Tiong Khoo
75c84130c1 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
2013-12-19 18:35:54 +00:00
Quentin Colombet
f847657767 [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
2013-12-19 18:32:04 +00:00
David Peixotto
3793977e90 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
2013-12-19 18:26:07 +00:00
Josh Magee
927ad4a9f6 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
2013-12-19 18:14:42 +00:00
David Peixotto
0fa193b086 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
2013-12-19 18:12:36 +00:00
David Peixotto
6075fa1e0e 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
2013-12-19 18:08:08 +00:00