oota-llvm.git
10 years ago[llvm-readobj] Transform 'switch' with the only 'case' statement
Simon Atanasyan [Thu, 1 May 2014 11:57:40 +0000 (11:57 +0000)]
[llvm-readobj] Transform 'switch' with the only 'case' statement
to 'if' statement.

No functional changes,

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207748 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoCorrection to assert statemtent to allow 32-bit unsigned numbers with the top bit...
Richard Barton [Thu, 1 May 2014 11:37:44 +0000 (11:37 +0000)]
Correction to assert statemtent to allow 32-bit unsigned numbers with the top bit set.

This fixes an ARM assembler crash - regression test added.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207747 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRevert r205965, which essentially reverts r205018 for the second time.
Chandler Carruth [Thu, 1 May 2014 11:24:11 +0000 (11:24 +0000)]
Revert r205965, which essentially reverts r205018 for the second time.
=[

Turns out that this was the root cause of PR19621. We found a crasher
only recently (likely due to improvements elsewhere in the SLP
vectorizer) but the reduced test case failed all the way back to here.
I've confirmed that reverting this patch both fixes the reduced test
case in PR19621 and the actual source file that led to it, so it seems
to really be rooted here. I've replied to the commit thread with
discussion of my (feeble) attempts to debug this. Didn't make it very
far, so reverting now that we have a good test case so that things can
get back to healthy while the debugging carries on.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207746 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[llvm-readobj] Add support for Mips specific ELF header e_flags.
Simon Atanasyan [Thu, 1 May 2014 11:07:19 +0000 (11:07 +0000)]
[llvm-readobj] Add support for Mips specific ELF header e_flags.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207744 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[LCG] Fix a bad bug in the new fancy iterator scheme I added to support
Chandler Carruth [Thu, 1 May 2014 10:41:51 +0000 (10:41 +0000)]
[LCG] Fix a bad bug in the new fancy iterator scheme I added to support
removal. We can't just blindly increment (or decrement) the adapted
iterator when the value is null because doing so can walk past the end
(or beginning) and keep inspecting the value. The fix I've implemented
is to restrict this further to a forward iterator and add an end
iterator to the members (replacing a member that had become dead when
I switched to the adaptor base!) and using that to stop the iteration.

I'm not entirely pleased with this solution. I feel like forward
iteration is too restrictive. I wasn't even happy about bidirectional
iteration. It also makes the iterator objects larger and the iteration
loops more complex. However, I also don't really like the other
alternative that seems obvious: a sentinel node. I'm still hoping to
come up with a more elegant solution here, but this at least fixes the
MSan and Valgrind errors on this code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207743 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[ARM64] Conditionalize CPU specific system registers on subtarget features
Bradley Smith [Thu, 1 May 2014 10:25:36 +0000 (10:25 +0000)]
[ARM64] Conditionalize CPU specific system registers on subtarget features

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207742 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips] Move expansion of .cpsetup to target streamer.
Matheus Almeida [Thu, 1 May 2014 10:24:46 +0000 (10:24 +0000)]
[mips] Move expansion of .cpsetup to target streamer.

Summary:
There are two functional changes:
1) The directive is not expanded for the ASM->ASM code path.
2) If PIC is not set, there's no expansion for the ASM->OBJ code path (same behaviour as GAS).

Reviewers: dsanders

Reviewed By: dsanders

Differential Revision: http://reviews.llvm.org/D3482

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207741 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips] Removed two-operand alias for sllv, sr[al]v, rotrv, dsllv, dsr[al]v, and drotrv
Daniel Sanders [Thu, 1 May 2014 10:08:36 +0000 (10:08 +0000)]
[mips] Removed two-operand alias for sllv, sr[al]v, rotrv, dsllv, dsr[al]v, and drotrv

GAS doesn't actually accept these particular cases.

The mnemonic without the trailing 'v' still supports two-operand aliases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207740 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRecord the DWARF version in MCContext
Oliver Stannard [Thu, 1 May 2014 08:46:02 +0000 (08:46 +0000)]
Record the DWARF version in MCContext

Record the DWARF version in MCContext, and use it when
emitting the dwarf version into the debug info.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207739 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoARM: fix memory leak, simplify WoA stack probing
Saleem Abdulrasool [Thu, 1 May 2014 04:19:59 +0000 (04:19 +0000)]
ARM: fix memory leak, simplify WoA stack probing

This fixes the memory leak introduced with the initial addition of support for
WoA stack probing.  Now that the pseudo-instruction expansion can handle an
external symbol, use that to generate the load which simplifies the logic as
well as avoids the memory leak.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207737 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoARM: support expanding external symbols in 32-bit moves
Saleem Abdulrasool [Thu, 1 May 2014 04:19:56 +0000 (04:19 +0000)]
ARM: support expanding external symbols in 32-bit moves

This enhances the expansion of the mov32imm pseudo-instruction to support an
external symbol reference.  This is motivated by a simplification of the stack
probe emission for Windows on ARM (and fixing a leak).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207736 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSpeculatively roll back r207724-r207726, which are code cleanup changes and
Richard Smith [Thu, 1 May 2014 00:46:58 +0000 (00:46 +0000)]
Speculatively roll back r207724-r207726, which are code cleanup changes and
appear to be breaking a bootstrapped build of compiler-rt.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207732 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoIf necessary for indirect encodings, emit stubs.
Joerg Sonnenberger [Thu, 1 May 2014 00:25:15 +0000 (00:25 +0000)]
If necessary for indirect encodings, emit stubs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207730 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoStart fixing pr19147.
Rafael Espindola [Thu, 1 May 2014 00:10:17 +0000 (00:10 +0000)]
Start fixing pr19147.

This makes the coff writer compute the correct symbol value for the test in
pr19147. The section is still incorrect, that will be fixed in a followup patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207728 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoLexicalScopes: Use unique_ptr to manage ownership of abstract LexicalScopes.
David Blaikie [Wed, 30 Apr 2014 23:46:27 +0000 (23:46 +0000)]
LexicalScopes: Use unique_ptr to manage ownership of abstract LexicalScopes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207726 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoForgotten reformatting.
David Blaikie [Wed, 30 Apr 2014 23:42:04 +0000 (23:42 +0000)]
Forgotten reformatting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207725 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoLexicalScopes: use unique_ptr to own LexicalScope objects.
David Blaikie [Wed, 30 Apr 2014 23:40:59 +0000 (23:40 +0000)]
LexicalScopes: use unique_ptr to own LexicalScope objects.

Ownership of abstract scopes coming soon.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207724 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd missing breaks.
Joerg Sonnenberger [Wed, 30 Apr 2014 23:36:24 +0000 (23:36 +0000)]
Add missing breaks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207723 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSwitch over getArch()'s result.
Joerg Sonnenberger [Wed, 30 Apr 2014 23:23:14 +0000 (23:23 +0000)]
Switch over getArch()'s result.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207721 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUse a single data structure to store all user variables in DwarfDebug
Alexey Samsonov [Wed, 30 Apr 2014 23:02:40 +0000 (23:02 +0000)]
Use a single data structure to store all user variables in DwarfDebug

Summary:
Get rid of UserVariables set, and turn DbgValues into MapVector
to get a fixed ordering, as suggested in review for http://reviews.llvm.org/D3573.

Test Plan: llvm regression tests

Reviewers: dblaikie

Reviewed By: dblaikie

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D3579

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207720 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRevert "Emit DW_AT_object_pointer once, on the declaration, for each function."
David Blaikie [Wed, 30 Apr 2014 22:58:19 +0000 (22:58 +0000)]
Revert "Emit DW_AT_object_pointer once, on the declaration, for each function."

Breaks GDB buildbot
(http://lab.llvm.org:8011/builders/clang-x86_64-ubuntu-gdb-75/builds/14517)

GCC emits DW_AT_object_pointer /everywhere/ (declaration, abstract
definition, inlined subroutine), but it looks like GCC relies on it
being somewhere other than the declaration, at least. I'll experiment
further & can hopefully still remove it from the inlined_subroutine.

This reverts commit r207705.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207719 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoPrepare support of Itanium ABI on ARM as opposed to EHABI by
Joerg Sonnenberger [Wed, 30 Apr 2014 22:43:13 +0000 (22:43 +0000)]
Prepare support of Itanium ABI on ARM as opposed to EHABI by
conditionally emitting .fnstart and friends only for EHABI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207718 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDebugInfo: Omit DW_AT_artificial on DW_TAG_formal_parameters in DW_TAG_inlined_subrou...
David Blaikie [Wed, 30 Apr 2014 22:41:33 +0000 (22:41 +0000)]
DebugInfo: Omit DW_AT_artificial on DW_TAG_formal_parameters in DW_TAG_inlined_subroutines.

They just don't need to be there - they're inherited from the abstract
definition. In theory I would like them to be inherited from the
declaration, but the DWARF standard doesn't quite say that... we can
probably do it anyway but I'm less confident about that so I'll leave it
for a separate commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207717 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRestore condition incorrectly changed in r96289 to the older state.
Joerg Sonnenberger [Wed, 30 Apr 2014 22:40:27 +0000 (22:40 +0000)]
Restore condition incorrectly changed in r96289 to the older state.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207716 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoConvert more loops to range-based equivalents
Alexey Samsonov [Wed, 30 Apr 2014 22:17:38 +0000 (22:17 +0000)]
Convert more loops to range-based equivalents

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207714 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoPatch for function cloning to inline all blocks whose address is taken
Gerolf Hoflehner [Wed, 30 Apr 2014 22:05:02 +0000 (22:05 +0000)]
Patch for function cloning to inline all blocks whose address is taken

Not all address taken blocks get inlined. The reason is
that a blocks new address is known only when it is cloned. But e.g.
a branch instruction in a different block could need that address earlier
while it gets cloned. The solution is to collect the set of all
blocks that can potentially get inlined and compute a new block address
up front. Then clone and cleanup.

rdar://16427209

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207713 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoProvide a version of getSymbolOffset that returns false on error.
Rafael Espindola [Wed, 30 Apr 2014 21:51:13 +0000 (21:51 +0000)]
Provide a version of getSymbolOffset that returns false on error.

This simplifies ELFObjectWriter::SymbolValue a bit more. This new version
will also be used in the COFF writer to fix pr19147.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207711 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSlightly simplify code in DwarfDebug::beginFunction
Alexey Samsonov [Wed, 30 Apr 2014 21:44:17 +0000 (21:44 +0000)]
Slightly simplify code in DwarfDebug::beginFunction

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207710 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMove logic for calculating DBG_VALUE history map into separate file/class.
Alexey Samsonov [Wed, 30 Apr 2014 21:34:11 +0000 (21:34 +0000)]
Move logic for calculating DBG_VALUE history map into separate file/class.

Summary: No functionality change.

Test Plan: llvm regression test suite.

Reviewers: dblaikie

Reviewed By: dblaikie

Subscribers: echristo, llvm-commits

Differential Revision: http://reviews.llvm.org/D3573

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207708 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMove a testcase from ELF to ARM64, incorrectly placed in r207627.
James Molloy [Wed, 30 Apr 2014 21:31:11 +0000 (21:31 +0000)]
Move a testcase from ELF to ARM64, incorrectly placed in r207627.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207706 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoEmit DW_AT_object_pointer once, on the declaration, for each function.
David Blaikie [Wed, 30 Apr 2014 21:29:41 +0000 (21:29 +0000)]
Emit DW_AT_object_pointer once, on the declaration, for each function.

This effectively reverts r164326, but adds some comments and
justification and ensures we /don't/ emit the DW_AT_object_pointer on
the (abstract and concrete) definitions. (while still preserving it on
standalone definitions involving ObjC Blocks)

This does increase the size of member function declarations from 7 to 11
bytes, unfortunately, but still seems like the Right Thing to do so that
callers that see only the declaration still have the information about
the object pointer. That said, I don't know what, if any, DWARF
consumers don't have a heuristic to guess this in the case of normal
C++ member functions - perhaps we can remove it entirely.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207705 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDon't expect to find fpcmp and PerfectShuffle when running lit tests
Alexey Samsonov [Wed, 30 Apr 2014 21:26:35 +0000 (21:26 +0000)]
Don't expect to find fpcmp and PerfectShuffle when running lit tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207704 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRemove unused field hash_state::seed.
Jay Foad [Wed, 30 Apr 2014 21:12:17 +0000 (21:12 +0000)]
Remove unused field hash_state::seed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207703 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[ARM64] Prevent bit extraction to be adjusted by following shift
Weiming Zhao [Wed, 30 Apr 2014 21:07:24 +0000 (21:07 +0000)]
[ARM64] Prevent bit extraction to be adjusted by following shift

For pattern like ((x >> C1) & Mask) << C2, DAG combiner may convert it
into (x >> (C1-C2)) & (Mask << C2), which makes pattern matching of ubfx
more difficult.
For example:
Given
  %shr = lshr i64 %x, 4
  %and = and i64 %shr, 15
  %arrayidx = getelementptr inbounds [8 x [64 x i64]]* @arr, i64 0, %i64 2, i64 %and
  %0 = load i64* %arrayidx
With current shift folding, it takes 3 instrs to compute base address:
  lsr x8, x0, #1
  and x8, x8, #0x78
  add x8, x9, x8

If using ubfx, it only needs 2 instrs:
  ubfx  x8, x0, #4, #4
  add x8, x9, x8, lsl #3

This fixes bug 19589

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207702 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix the clang-cl self-host build by defining ~DwarfDebug out of line
Reid Kleckner [Wed, 30 Apr 2014 20:34:31 +0000 (20:34 +0000)]
Fix the clang-cl self-host build by defining ~DwarfDebug out of line

DwarfDebug.h has a SmallVector member containing a unique_ptr of an
incomplete type.  MSVC doesn't have key functions, so the vtable and
dtor are emitted in AsmPrinter.cpp, where DwarfDebug's ctor is called.
AsmPrinter.cpp include DwarfUnit.h and doesn't get a complete definition
of DwarfTypeUnit.  We could fix the problem by including DwarfUnit.h in
DwarfDebug.h, but that would increase header bloat.  Instead, define
~DwarfDebug out of line.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207701 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd a testcase for r207627.
James Molloy [Wed, 30 Apr 2014 20:06:26 +0000 (20:06 +0000)]
Add a testcase for r207627.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207697 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUse the new StringTableBuilder in yaml2elf
Hans Wennborg [Wed, 30 Apr 2014 19:38:09 +0000 (19:38 +0000)]
Use the new StringTableBuilder in yaml2elf

http://reviews.llvm.org/D3574

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207694 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRevert r207571 - Add slp vectorization to LTO passes
Yi Jiang [Wed, 30 Apr 2014 19:27:24 +0000 (19:27 +0000)]
Revert r207571 - Add slp vectorization to LTO passes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207693 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[X86] Never hoist the shift value of a shift instruction.
Michael Zolotukhin [Wed, 30 Apr 2014 19:17:32 +0000 (19:17 +0000)]
[X86] Never hoist the shift value of a shift instruction.

There is no need to check if we want to hoist the immediate value of an
shift instruction. Simply return TCC_Free right away.

This change is like r206101, but for X86.

rdar://problem/16190769

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207692 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoConvert several loops over MachineFunction basic blocks to range-based loops
Alexey Samsonov [Wed, 30 Apr 2014 18:29:51 +0000 (18:29 +0000)]
Convert several loops over MachineFunction basic blocks to range-based loops

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207683 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[IPO/MergeFunctions] changes so it doesn't try to bitcast a struct return type but...
Carlo Kok [Wed, 30 Apr 2014 17:53:04 +0000 (17:53 +0000)]
[IPO/MergeFunctions] changes so it doesn't try to bitcast a struct return type but instead recreates it with insert/extract value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207679 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoIR: Conservatively verify inalloca arguments
David Majnemer [Wed, 30 Apr 2014 17:22:00 +0000 (17:22 +0000)]
IR: Conservatively verify inalloca arguments

Summary: Try to spot obvious mismatches with inalloca use.

Reviewers: rnk

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D3572

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207676 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSimplify ELFObjectWriter::SymbolValue.
Rafael Espindola [Wed, 30 Apr 2014 16:59:35 +0000 (16:59 +0000)]
Simplify ELFObjectWriter::SymbolValue.

It now defers all offset computation to getSymbolOffset.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207674 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips] Add instruction alias (negu).
Matheus Almeida [Wed, 30 Apr 2014 16:53:49 +0000 (16:53 +0000)]
[mips] Add instruction alias (negu).

Summary: negu $reg is equivalent to negu $reg, $reg.

Reviewers: dsanders

Reviewed By: dsanders

Differential Revision: http://reviews.llvm.org/D3510

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207673 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips] Add instruction alias (sltu).
Matheus Almeida [Wed, 30 Apr 2014 16:29:56 +0000 (16:29 +0000)]
[mips] Add instruction alias (sltu).

Summary:
The pattern sltu $r1, $r2, $imm is found in handwritten assembly which
is just a shorthand version of sltui $r1, $r2, $imm.

Reviewers: dsanders

Reviewed By: dsanders

Differential Revision: http://reviews.llvm.org/D3508

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207671 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoELFObjectWriter: deduplicate suffices in strtab
Hans Wennborg [Wed, 30 Apr 2014 16:25:02 +0000 (16:25 +0000)]
ELFObjectWriter: deduplicate suffices in strtab

We already do this for shstrtab, so might as well do it for strtab. This
extracts the string table building code into a separate class. The idea
is to use it for other object formats too.

I mostly wanted to do this for the general principle, but it does save a
little bit on object file size. I tried this on a clang bootstrap and
saved 0.54% on the sum of object file sizes (1.14 MB out of 212 MB for
a release build).

Differential Revision: http://reviews.llvm.org/D3533

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207670 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoARM64: print fp immediates without using scientific notation.
Tim Northover [Wed, 30 Apr 2014 16:13:34 +0000 (16:13 +0000)]
ARM64: print fp immediates without using scientific notation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207669 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAArch64/ARM64: implement remaining TLS relocations (purely MC).
Tim Northover [Wed, 30 Apr 2014 16:13:26 +0000 (16:13 +0000)]
AArch64/ARM64: implement remaining TLS relocations (purely MC).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207668 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAArch64/ARM64: add specific diagnostic for MRS/MSR and enable tests.
Tim Northover [Wed, 30 Apr 2014 16:13:20 +0000 (16:13 +0000)]
AArch64/ARM64: add specific diagnostic for MRS/MSR and enable tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207667 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAArch64/ARM64: accept and print floating-point immediate 0 as "#0.0"
Tim Northover [Wed, 30 Apr 2014 16:13:07 +0000 (16:13 +0000)]
AArch64/ARM64: accept and print floating-point immediate 0 as "#0.0"

It's been decided that in the future, the floating-point immediate in
instructions like "fcmeq v0.2s, v1.2s, #0.0" will be canonically "0.0", which
has been implemented on AArch64 already but not ARM64.

This fixes that issue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207666 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoIR: Alloca clones should remember inalloca state
David Majnemer [Wed, 30 Apr 2014 16:12:21 +0000 (16:12 +0000)]
IR: Alloca clones should remember inalloca state

Pretty straightforward, we weren't propagating whether or not an
AllocaInst had 'inalloca' marked on it when it came time to clone it.

The inliner exposed this bug.  A reduced testcase is forthcoming.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207665 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips] Add instruction alias (dsll and dsrl).
Matheus Almeida [Wed, 30 Apr 2014 16:00:49 +0000 (16:00 +0000)]
[mips] Add instruction alias (dsll and dsrl).

Summary:
The pattern dsll/dsrl $rd, $rt, $rs is found in handwritten assembly which
is just a shorthand version of dsllv/dsrlv $rd, $rt, $rs.

Reviewers: dsanders

Reviewed By: dsanders

Differential Revision: http://reviews.llvm.org/D3486

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207664 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix a use of uninitialized memory in SmallVector's move-assignment operator.
Douglas Gregor [Wed, 30 Apr 2014 15:49:06 +0000 (15:49 +0000)]
Fix a use of uninitialized memory in SmallVector's move-assignment operator.

When we were moving from a larger vector to a smaller one but didn't
need to re-allocate, we would move-assign over uninitialized memory in
the target, then move-construct that same data again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207663 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRelax the test a bit.
Rafael Espindola [Wed, 30 Apr 2014 15:32:21 +0000 (15:32 +0000)]
Relax the test a bit.

It is not relevant where the symbol and section names are stored, just their
values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207662 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600/SI: Use VALU instructions for copying i1 values
Tom Stellard [Wed, 30 Apr 2014 15:31:33 +0000 (15:31 +0000)]
R600/SI: Use VALU instructions for copying i1 values

We can't use SALU instructions for this since they ignore the EXEC mask
and are always executed.

This fixes several OpenCV tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207661 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600/SI: Teach moveToVALU how to handle some SMRD instructions
Tom Stellard [Wed, 30 Apr 2014 15:31:29 +0000 (15:31 +0000)]
R600/SI: Teach moveToVALU how to handle some SMRD instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207660 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[ARM64][fast-isel] Fast-isel doesn't know how to handle f128.
Chad Rosier [Wed, 30 Apr 2014 15:29:57 +0000 (15:29 +0000)]
[ARM64][fast-isel] Fast-isel doesn't know how to handle f128.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207659 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRename the test, it is testing the symver directive.
Rafael Espindola [Wed, 30 Apr 2014 15:27:44 +0000 (15:27 +0000)]
Rename the test, it is testing the symver directive.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207658 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips] Add instruction alias (sll and srl).
Matheus Almeida [Wed, 30 Apr 2014 15:23:04 +0000 (15:23 +0000)]
[mips] Add instruction alias (sll and srl).

Summary:
The pattern sll/srl $rd, $rt, $rs is found in handwritten assembly which
is just a shorthand version of sllv/srlv $rd, $rt, $rs.

Reviewers: dsanders

Reviewed By: dsanders

Differential Revision: http://reviews.llvm.org/D3483

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207657 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips] Fix MipsLongBranch pass to work when the offset from the branch to the
Sasa Stankovic [Wed, 30 Apr 2014 15:06:25 +0000 (15:06 +0000)]
[mips] Fix MipsLongBranch pass to work when the offset from the branch to the
target cannot be determined accurately. This is the case for NaCl where the
sandboxing instructions are added in MC layer, after the MipsLongBranch pass.
It is also the case when the code has inline assembly. Instead of calculating
offset in the MipsLongBranch pass, use %hi(sym1 - sym2) and %lo(sym1 - sym2)
expressions that are resolved during the fixup.

This patch also deletes microMIPS test file test/CodeGen/Mips/micromips-long-branch.ll
and implements microMIPS CHECKs in a much simpler way in a file
test/CodeGen/Mips/longbranch.ll, together with MIPS32 and MIPS64.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207656 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips] Update tests with encoding information for slt, slti, sltiu and sltu.
Matheus Almeida [Wed, 30 Apr 2014 14:52:57 +0000 (14:52 +0000)]
[mips] Update tests with encoding information for slt, slti, sltiu and sltu.

Summary:
Also renamed non-portable register names (e.g. $t2) so that we don't end up
with a different encoding for what appears to be an equivalent instruction.

Reviewers: dsanders

Reviewed By: dsanders

Differential Revision: http://reviews.llvm.org/D3505

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207655 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600: Remove unused function AMDGPUSubtarget::getDefaultSize()
Tom Stellard [Wed, 30 Apr 2014 14:20:53 +0000 (14:20 +0000)]
R600: Remove unused function AMDGPUSubtarget::getDefaultSize()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207654 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[asan] Disable asm instrumentation on unsupported platforms.
Evgeniy Stepanov [Wed, 30 Apr 2014 14:04:31 +0000 (14:04 +0000)]
[asan] Disable asm instrumentation on unsupported platforms.

Only emit calls to compiler-rt asm routines on platforms where they are
present (currently limited to linux i386/x86_64).

Patch by Yuri Gorshenin.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207651 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoARM64: enable AArch64's basic-a64-instructions test
Tim Northover [Wed, 30 Apr 2014 13:37:10 +0000 (13:37 +0000)]
ARM64: enable AArch64's basic-a64-instructions test

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207650 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoARM64: print lsr instead of lsrv for variable shifts (etc)
Tim Northover [Wed, 30 Apr 2014 13:37:07 +0000 (13:37 +0000)]
ARM64: print lsr instead of lsrv for variable shifts (etc)

The canonical syntax for shifts by a variable amount does not end with 'v', but
that syntax should be supported as an alias (presumably for legacy reasons).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207649 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoARM64: use 32-bit operations for uxtb & uxth
Tim Northover [Wed, 30 Apr 2014 13:37:02 +0000 (13:37 +0000)]
ARM64: use 32-bit operations for uxtb & uxth

Testing will be enabled shortly with basic-a64-instructions.s

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207648 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAArch64/ARM64: allow smaller granule relocations on MOVZ/MOVN
Tim Northover [Wed, 30 Apr 2014 13:36:59 +0000 (13:36 +0000)]
AArch64/ARM64: allow smaller granule relocations on MOVZ/MOVN

Testing will be enabled shortly with basic-a64-instructions.s

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207647 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAArch64/ARM64: copy support for bCC instead of b.CC across.
Tim Northover [Wed, 30 Apr 2014 13:36:56 +0000 (13:36 +0000)]
AArch64/ARM64: copy support for bCC instead of b.CC across.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207646 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAArch64/ARM64: expunge CPSR from the sources
Tim Northover [Wed, 30 Apr 2014 13:14:14 +0000 (13:14 +0000)]
AArch64/ARM64: expunge CPSR from the sources

AArch64 does not have a CPSR register in the same way that AArch32 does. Most
of its compiler-relevant roles have been taken over by the more specific NZCV
register (representing just the flags set by normal instructions).

Its system control functions still remain, but are now under the
pseudo-register referred to as "PSTATE". They're accessed via various MRS & MSR
instructions described in the reference manual.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207645 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAArch64/ARM64: use HS instead of CS & LO instead of CC.
Tim Northover [Wed, 30 Apr 2014 13:14:03 +0000 (13:14 +0000)]
AArch64/ARM64: use HS instead of CS & LO instead of CC.

On instructions using the NZCV register, a couple of conditions have dual
representations: HS/CS and LO/CC (meaning unsigned-higher-or-same/carry-set and
unsigned-lower/carry-clear). The first of these is more descriptive in most
circumstances, so we should print it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207644 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoGrammar fix.
Rafael Espindola [Wed, 30 Apr 2014 12:42:22 +0000 (12:42 +0000)]
Grammar fix.

Thanks to Saleem Abdulrasool for noticing it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207643 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips][msa] Fix vector insertions where the index is variable
Daniel Sanders [Wed, 30 Apr 2014 12:09:32 +0000 (12:09 +0000)]
[mips][msa] Fix vector insertions where the index is variable

Summary:
This isn't supported directly so we rotate the vector by the desired number of
elements, insert to element zero, then rotate back.

The i64 case generates rather poor code on MIPS32. There is an obvious
optimisation to be made in future (do both insert.w's inside a shared
rotate/unrotate sequence) but for now it's sufficient to select valid code
instead of aborting.

Depends on D3536

Reviewers: matheusalmeida

Reviewed By: matheusalmeida

Differential Revision: http://reviews.llvm.org/D3537

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207640 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoARM64: accept ELF-relocated load/store insts without a #.
Tim Northover [Wed, 30 Apr 2014 12:00:20 +0000 (12:00 +0000)]
ARM64: accept ELF-relocated load/store insts without a #.

E.g. we print "ldr x0, [x0, :lo12:symbol]" so we need to accept that syntax
too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207639 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoARM64: remove duplication by templating InstPrinter methods
Tim Northover [Wed, 30 Apr 2014 11:43:36 +0000 (11:43 +0000)]
ARM64: remove duplication by templating InstPrinter methods

No functional change, so no tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207638 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips] Add support for .cpload.
Matheus Almeida [Wed, 30 Apr 2014 11:28:42 +0000 (11:28 +0000)]
[mips] Add support for .cpload.

Summary:
This directive is used for setting up $gp in the beginning of a function.
It expands to three instructions if PIC is enabled:
lui   $gp, %hi(_gp_disp)
addui $gp, $gp, %lo(_gp_disp)
addu  $gp, $gp, $reg

_gp_disp is a special symbol that the linker sets to the distance between
the lui instruction and the context pointer (_gp).

Reviewers: dsanders

Reviewed By: dsanders

Differential Revision: http://reviews.llvm.org/D3480

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207637 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[mips] Emit all three relocation operations for each relocation entry on Mips64 big...
Matheus Almeida [Wed, 30 Apr 2014 11:21:10 +0000 (11:21 +0000)]
[mips] Emit all three relocation operations for each relocation entry on Mips64 big-endian systems.

Summary:
The N64 ABI allows up to three operations to be specified per relocation record
independently of the endianness.

Reviewers: dsanders

Reviewed By: dsanders

Differential Revision: http://reviews.llvm.org/D3529

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207636 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoARM64: use hex immediates for movz/movk instructions
Tim Northover [Wed, 30 Apr 2014 11:19:40 +0000 (11:19 +0000)]
ARM64: use hex immediates for movz/movk instructions

Since these are mostly used in "lsl #16", "lsl #32", "lsl #48" combinations to
piece together an immediate in 16-bit chunks, hex is probably the most
appropriate format.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207635 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoARM64: hexify printing various immediate operands
Tim Northover [Wed, 30 Apr 2014 11:19:28 +0000 (11:19 +0000)]
ARM64: hexify printing various immediate operands

This is mostly aimed at the NEON logical operations and MOVI/MVNI (since they
accept weird shifts which are more naturally understandable in hex notation).

Also changes BRK/HINT etc, which is probably a neutral change, but easier than
the alternative.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207634 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoARM64: print canonical syntax for add/sub (imm) instructions.
Tim Northover [Wed, 30 Apr 2014 11:19:15 +0000 (11:19 +0000)]
ARM64: print canonical syntax for add/sub (imm) instructions.

Since these instructions only accept a 12-bit immediate, possibly shifted left
by 12, the canonical syntax used by the architecture reference manual is "#N {,
lsl #12 }". We should accept an immediate that has already been shifted, (e.g.

Also, print a comment giving the full addend since it can be helpful.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207633 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[LCG] Add the really, *really* boring edge insertion case: adding an
Chandler Carruth [Wed, 30 Apr 2014 10:48:36 +0000 (10:48 +0000)]
[LCG] Add the really, *really* boring edge insertion case: adding an
edge entirely within an existing SCC. Shockingly, making the connected
component more connected is ... a total snooze fest. =]

Anyways, its wired up, and I even added a test case to make sure it
pretty much sorta works. =D

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207631 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix multiline comment warning.
Evgeniy Stepanov [Wed, 30 Apr 2014 10:29:06 +0000 (10:29 +0000)]
Fix multiline comment warning.

../unittests/Analysis/LazyCallGraphTest.cpp:45:1: warning: multi-line comment [-Wcomment]
 //        /  \
 ^

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207629 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[ARM64] Simplify if condition.
James Molloy [Wed, 30 Apr 2014 10:15:50 +0000 (10:15 +0000)]
[ARM64] Simplify if condition.

v2f32 and v4f32 were missed out of these conditions, so this is also
a bugfix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207628 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[ARM64] Fix stupid copy-pasto in ARM64MCAsmInfo.cpp - aarch64_be -> arm64_be
James Molloy [Wed, 30 Apr 2014 10:15:46 +0000 (10:15 +0000)]
[ARM64] Fix stupid copy-pasto in ARM64MCAsmInfo.cpp - aarch64_be -> arm64_be

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207627 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[ARM64] Try and make the ELF MCJIT *slightly* less broken for ARM64.
James Molloy [Wed, 30 Apr 2014 10:15:41 +0000 (10:15 +0000)]
[ARM64] Try and make the ELF MCJIT *slightly* less broken for ARM64.

A bunch of switch cases were missing, not just for ARM64 but also for
AArch64_BE. I've fixed all those, but there's zero testing as
ExecutionEngine tests are disabled when crosscompiling and I don't
have a native platform available to test on.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207626 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[ARM64] Ensure arm64_be is dealt with when emitting debug info.
James Molloy [Wed, 30 Apr 2014 10:15:35 +0000 (10:15 +0000)]
[ARM64] Ensure arm64_be is dealt with when emitting debug info.

This is a partial port of r204816 (cpirker "Elf support for MC-JIT
runtime dynamic linker") from AArch64 to ARM64.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207625 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoraw_ostream::operator<<(StringRef): Avoid potential overflow in pointer arithmetic.
NAKAMURA Takumi [Wed, 30 Apr 2014 09:33:50 +0000 (09:33 +0000)]
raw_ostream::operator<<(StringRef): Avoid potential overflow in pointer arithmetic.

(OutBufCur + Size) might overflow if Size were large. For example on i686-linux,

  OutBufCur: 0xFFFDF27D
  OutBufEnd: 0xFFFDF370
  Size:      0x0002BF20 (180,000)

It caused flaky error in MC/COFF/section-name-encoding.s.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207621 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoARM64: make sure FastISel uses a GPR64 source in 64-bit extensions.
Tim Northover [Wed, 30 Apr 2014 09:32:01 +0000 (09:32 +0000)]
ARM64: make sure FastISel uses a GPR64 source in 64-bit extensions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207620 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[LCG] Actually test the *basic* edge removal bits (IE, the non-SCC
Chandler Carruth [Wed, 30 Apr 2014 07:45:27 +0000 (07:45 +0000)]
[LCG] Actually test the *basic* edge removal bits (IE, the non-SCC
bits), and discover that it's totally broken. Yay tests. Boo bug. Fix
the basic edge removal so that it works by nulling out the removed edges
rather than actually removing them. This leaves the indices valid in the
map from callee to index, and preserves some of the locality for
iterating over edges. The iterator is made bidirectional to reflect that
it now has to skip over null entries, and the skipping logic is layered
onto it.

As future work, I would like to track essentially the "load factor" of
the edge list, and when it falls below a threshold do a compaction.

An alternative I considered (and continue to consider) is storing the
callees in a doubly linked list where each element of the list is in
a set (which is essentially the classical linked-hash-table
datastructure). The problem with that approach is that either you need
to heap allocate the linked list nodes and use pointers to them, or use
a bucket hash table (with even *more* linked list pointer overhead!),
etc. It's pretty easy to get 5x overhead for values that are just
pointers. So far, I think punching holes in the vector, and periodic
compaction is likely to be much more efficient overall in the space/time
tradeoff.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207619 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd a <tuple> include to more files that aren't getting it transitively on MSVC.
Benjamin Kramer [Wed, 30 Apr 2014 07:21:01 +0000 (07:21 +0000)]
Add a <tuple> include to more files that aren't getting it transitively on MSVC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207617 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUse makeArrayRef insted of calling ArrayRef<T> constructor directly. I introduced...
Craig Topper [Wed, 30 Apr 2014 07:17:30 +0000 (07:17 +0000)]
Use makeArrayRef insted of calling ArrayRef<T> constructor directly. I introduced most of these recently.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207616 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoARM: support stack probe emission for Windows on ARM
Saleem Abdulrasool [Wed, 30 Apr 2014 07:05:07 +0000 (07:05 +0000)]
ARM: support stack probe emission for Windows on ARM

This introduces the stack lowering emission of the stack probe function for
Windows on ARM. The stack on Windows on ARM is a dynamically paged stack where
any page allocation which crosses a page boundary of the following guard page
will cause a page fault. This page fault must be handled by the kernel to
ensure that the page is faulted in. If this does not occur and a write access
any memory beyond that, the page fault will go unserviced, resulting in an
abnormal program termination.

The watermark for the stack probe appears to be at 4080 bytes (for
accommodating the stack guard canaries and stack alignment) when SSP is
enabled.  Otherwise, the stack probe is emitted on the page size boundary of
4096 bytes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207615 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoConstantHoisting.cpp: Add <tuple> for std::tie, since r207593 removed FileSystem...
NAKAMURA Takumi [Wed, 30 Apr 2014 06:44:50 +0000 (06:44 +0000)]
ConstantHoisting.cpp: Add <tuple> for std::tie, since r207593 removed FileSystem.h, it includes <tuple>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207614 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoARM: print COFF function header for Windows on ARM
Saleem Abdulrasool [Wed, 30 Apr 2014 06:14:25 +0000 (06:14 +0000)]
ARM: print COFF function header for Windows on ARM

Emit the COFF header when printing out the function.  This is important as the
header contains two important pieces of information: the storage class for the
symbol and the symbol type information.  This bit of information is required for
the linker to correctly identify the type of symbol that it is dealing with.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207613 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[C++11] Use 'nullptr' in tablegen output files.
Craig Topper [Wed, 30 Apr 2014 05:53:35 +0000 (05:53 +0000)]
[C++11] Use 'nullptr' in tablegen output files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207611 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDe-virtualize or remove some methods that have no overrides nor override anything...
Craig Topper [Wed, 30 Apr 2014 05:53:27 +0000 (05:53 +0000)]
De-virtualize or remove some methods that have no overrides nor override anything. In some cases remove all together if there are no callers either.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207610 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoARM: move llvm_unreachable use
Saleem Abdulrasool [Wed, 30 Apr 2014 05:12:41 +0000 (05:12 +0000)]
ARM: move llvm_unreachable use

When building with -Werror=covered-switch-default (as on the buildbots), the
build would fail since all cases are covered by the switch.  Move the
llvm_unreachable to the end of the function as an annotation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207609 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoARM: partially handle 32-bit relocations for WoA
Saleem Abdulrasool [Wed, 30 Apr 2014 04:54:58 +0000 (04:54 +0000)]
ARM: partially handle 32-bit relocations for WoA

IMAGE_REL_ARM_MOV32T relocations require that the movw/movt pair-wise
relocation is not split up and reordered. When expanding the mov32imm
pseudo-instruction, create a bundle if the machine operand is referencing an
address.  This helps ensure that the relocatable address load is not reordered
by subsequent passes.

Unfortunately, this only partially handles the case as the Constant Island Pass
occurs after the instructions are unbundled and does not properly handle
bundles.  That is a more fundamental issue with the pass itself and beyond the
scope of this change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207608 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSimplify getSymbolOffset.
Rafael Espindola [Wed, 30 Apr 2014 03:06:06 +0000 (03:06 +0000)]
Simplify getSymbolOffset.

We can now use EvaluateAsValue to make it non recursive and remove some code
duplication.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207604 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[ADT] Provide some helpful static_asserts for using operations of the
Chandler Carruth [Wed, 30 Apr 2014 00:49:32 +0000 (00:49 +0000)]
[ADT] Provide some helpful static_asserts for using operations of the
wrong iterator category. These aren't comprehensive, but they have
caught the common cases for me and produce much nicer errors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207601 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[DWARF parser] Cleanup code in DWARFDebugLine.
Alexey Samsonov [Wed, 30 Apr 2014 00:09:19 +0000 (00:09 +0000)]
[DWARF parser] Cleanup code in DWARFDebugLine.

Streamline parsing and dumping line tables:
Prefer composition to multiple inheritance in DWARFDebugLine::ParsingState.
Get rid of the weird concept of "DumpingState" structure.

was:
  DWARFDebugLine::DumpingState state(OS);
  DWARFDebugLine::parseStatementTable(..., state);
now:
  DWARFDebugLine::LineTable LineTable;
  LineTable.parse(...);
  LineTable.dump(OS);

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207599 91177308-0d34-0410-b5e6-96231b3b80d8