Commit Graph

75170 Commits

Author SHA1 Message Date
Colin LeMahieu
786e40311e [Hexagon] Adding doubleregs for control registers. Renaming control register class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224598 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-19 18:56:10 +00:00
Frederic Riss
7e5492d27d [DebugInfo] Move all DWARF headers to the public include directory.
dsymutil needs access to DWARF specific inforamtion, the small DIContext
wrapper isn't sufficient. Other DWARF consumers might want to use it too
(I'm looking at you lldb).

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224594 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-19 18:26:33 +00:00
Tilmann Scheller
409585877a [BBVectorize] Remove two more redundant assignments.
Found by the Clang static analyzer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224590 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-19 17:21:38 +00:00
Tilmann Scheller
14ef1a43c2 [BBVectorize] Remove redundant assignment.
Found by the Clang static analyzer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224589 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-19 17:13:12 +00:00
Bruno Cardoso Lopes
06833ca7c1 Reapply: [InstCombine] Fix visitSwitchInst to use right operand types for sub cstexpr
The visitSwitchInst generates SUB constant expressions to recompute the
switch condition. When truncating the condition to a smaller type, SUB
expressions should use the previous type (before trunc) for both
operands. Also, fix code to also return the modified switch when only
the truncation is performed.

This fixes an assertion crash.

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

rdar://problem/19191835

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224588 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-19 17:12:35 +00:00
Tilmann Scheller
b8b0b8f0a8 [LoopVectorize] Remove redundant assignment.
Found by the Clang static analyzer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224587 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-19 17:02:31 +00:00
Tilmann Scheller
bf32d17425 [ARM] Remove dead assignment.
Found by the Clang static analyzer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224586 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-19 16:57:33 +00:00
Sanjay Patel
7c5fa50875 use -0.0 when creating an fneg instruction
Backends recognize (-0.0 - X) as the canonical form for fneg
and produce better code. Eg, ppc64 with 0.0:

   lis r2, ha16(LCPI0_0)
   lfs f0, lo16(LCPI0_0)(r2)
   fsubs f1, f0, f1
   blr

vs. -0.0:

   fneg f1, f1
   blr

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224583 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-19 16:44:08 +00:00
Bruno Cardoso Lopes
01b07d541b Revert "[InstCombine] Fix visitSwitchInst to use right operand types for sub cstexpr"
Reverts commit r224574 to appease buildbots:

The visitSwitchInst generates SUB constant expressions to recompute the
switch condition. When truncating the condition to a smaller type, SUB
expressions should use the previous type (before trunc) for both
operands. This fixes an assertion crash.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224576 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-19 14:36:24 +00:00
Bruno Cardoso Lopes
cba407d019 [InstCombine] Fix visitSwitchInst to use right operand types for sub cstexpr
The visitSwitchInst generates SUB constant expressions to recompute the
switch condition. When truncating the condition to a smaller type, SUB
expressions should use the previous type (before trunc) for both
operands. This fixes an assertion crash.

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

rdar://problem/19191835

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224574 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-19 14:23:15 +00:00
Tilmann Scheller
6500a9867f Remove redundant assignment.
Found with the Clang static analyzer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224570 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-19 11:29:34 +00:00
Duncan P. N. Exon Smith
33ed2ef4ff Rename MapValue(Metadata*) to MapMetadata()
Instead of reusing the name `MapValue()` when mapping `Metadata`, use
`MapMetadata()`.  The old name doesn't make much sense after the
`Metadata`/`Value` split.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224566 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-19 06:06:18 +00:00
Juergen Ributzka
15067a64a9 [Object] Don't crash on empty export lists.
Summary: This fixes the exports iterator if the export list is empty.

Reviewers: Bigcheese, kledzik

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224563 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-19 02:31:01 +00:00
Matthias Braun
94dfce45bf RegisterCoalescer: rewrite eliminateUndefCopy().
This also fixes problems with undef copies of subregisters. I can't
attach a testcase for that as none of the targets in trunk has
subregister liveness tracking enabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224560 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-19 01:39:46 +00:00
Colin LeMahieu
128eb8312a [Hexagon] Adding loop0/1 sp0/1/2loop0 instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224556 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-19 00:06:53 +00:00
Adrian Prantl
7a6f0084e2 Explain why LLVM is emitting a DW_AT_containing_type inside of a class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224555 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-19 00:01:20 +00:00
David Majnemer
73059bd1f1 ConstantFold: Shifting undef by zero results in undef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224553 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-18 23:54:43 +00:00
Colin LeMahieu
a9dd3713d0 Reverting 224550, was not ready for commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224552 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-18 23:36:15 +00:00
Colin LeMahieu
7e9a77a2aa [Hexagon] Adding loop0/1 sp0/1/2loop0 instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224550 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-18 23:27:51 +00:00
Kevin Enderby
604a34e086 Add printing the LC_SUB_UMBRELLA load command with llvm-objdump’s -private-headers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224548 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-18 23:13:26 +00:00
Roman Divacky
4be95036e7 Instead of explicitely comparing both lowercase and uppercase variants.
.lower() the Name and compare only the lowecase. Removing 81 compares/lines of
code. This changes the accepted string to be mixed lower/upper case but it
should be ok.

Discussed with Jim Grosbach.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224547 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-18 23:12:34 +00:00
Sanjay Patel
82a4ce31b2 fix formatting; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224542 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-18 21:11:09 +00:00
Matthias Braun
b82636bb80 LiveIntervalAnalysis: Cleanup computeDeadValues
- This also fixes a bug introduced in r223880 where values were not
  correctly marked as Dead anymore.
- Cleanup computeDeadValues(): split up SubRange code variant, simplify
  arguments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224538 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-18 19:58:52 +00:00
Kevin Enderby
a42da31d2c Add printing the LC_SUB_FRAMEWORK load command with llvm-objdump’s -private-headers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224534 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-18 19:24:35 +00:00
Juergen Ributzka
1fe03a49d6 Add missing implementation of 'sys::path::is_other' to the support library.
The header claims that this function exists, but the linker wasn't too happy
about it not being in the library.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224527 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-18 18:19:47 +00:00
Jozef Kolek
c9ae6ee7a0 [mips][microMIPS] Fix bugs related to atomic SC/LL instructions
Fix bugs related to atomic microMIPS SC/LL instructions: While expanding atomic
operations the mips32r2 encoding was emitted instead of microMIPS.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224524 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-18 16:39:29 +00:00
Saleem Abdulrasool
3299448769 ARM: fix an off-by-one in the register list access
Fix an off-by-one access introduced in 224502 for push.w and pop.w with single
register operands.  Add test cases for both scenarios.

Thanks to Asiri Rathnayake for pointing out the failure!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224521 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-18 16:16:53 +00:00
Robert Khasanov
d25d7bb372 [AVX512] Enable FP arithmetic lowering for AVX512VL subsets.
Added RegOp2MemOpTable4 to transform 4th operand from register to memory in merge-masked versions of instructions. 
Added lowering tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224516 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-18 12:28:22 +00:00
Viktor Kutuzov
e22e2b8798 [Msan] Generalize instrumentation code to support FreeBSD mapping
Differential Revision: http://reviews.llvm.org/D6666


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224514 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-18 12:12:59 +00:00
Yaron Keren
80237c1148 Fix Visual C++ error "'llvm::make_unique' : ambiguous call to overloaded function".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224506 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-18 10:03:35 +00:00
Saleem Abdulrasool
9c1911b105 ARM: improve instruction validation for thumb mode
The ARM Architecture Reference Manual states the following:
  LDM{,IA,DB}:
    The SP cannot be in the list.
    The PC can be in the list.
    If the PC is in the list:
      • the LR must not be in the list
      • the instruction must be either outside any IT block, or the last
        instruction in an IT block.
  POP:
    The PC can be in the list.
    If the PC is in the list:
      • the LR must not be in the list
      • the instruction must be either outside any IT block, or the last
        instruction in an IT block.
  PUSH:
    The SP and PC can be in the list in ARM instructions, but not in Thumb
    instructions.
  STM:{,IA,DB}:
    The SP and PC can be in the list in ARM instructions, but not in Thumb
    instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224502 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-18 05:24:38 +00:00
Chandler Carruth
9ac193609f [SROA] Cleanup - remove the use of std::mem_fun_ref nonsense and use
a lambda now that we have them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224500 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-18 05:19:47 +00:00
Rafael Espindola
d15bca6859 Modernize the getStreamedBitcodeModule interface a bit. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224499 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-18 05:08:43 +00:00
Craig Topper
633948975c [PowerPC] Use MCPhysReg for tables of registers. Const-correct the tables. Only put the anonymous namespace around classes. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224498 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-18 05:02:14 +00:00
Craig Topper
539998ec8d [X86] Use correct opsize on indirect call and jump aliases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224497 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-18 05:02:12 +00:00
Craig Topper
4ae31b7e7d [X86] Don't use PS prefix on LDMXCSR/STMXCSR.
Near as I can tell prefixes are ignored on these instructions except for a comment in the Intel docs about 0xf3. Binutils disassembler seems to ignore prefixes on these instructions. Our disassembler still doesn't distinguish PS and "no prefix" well enough for this to make a functional change, but it helps with experiments I'm doing on a potential new disassembler table builder.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224496 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-18 05:02:10 +00:00
Craig Topper
c1dd90797f [X86] Remove unnecessary 'In64BitMode' predicate for instructions that already indicate use of REX.W.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224495 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-18 05:02:08 +00:00
Justin Hibbits
d2c6da0f4a Add a corresponding '@LOCAL' parse to match r224415.
Pointed out by Jim Grosbach.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224494 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-18 03:06:37 +00:00
Eric Christopher
c559ba7251 Add a new string member to the TargetOptions struct for the name
of the abi we should be using. For targets that don't use the
option there's no change, otherwise this allows external users
to set the ABI via string and avoid some of the -backend-option
pain in clang.

Use this option to move the ABI for the ARM port from the
Subtarget to the TargetMachine and update the testcases
accordingly since it's no longer valid to set via -mattr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224492 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-18 02:20:58 +00:00
Eric Christopher
360cbd4839 Model ARM backend ABI selection after the front end code doing the
same. This will change the "bare metal" ABI from APCS to AAPCS.

The only difference between the front and back end code is that
the code for Triple::GNU was added for environment. That will migrate
to the front end shortly.

Tests updated with the ABI they were originally testing in the case
of bare metal (e.g. -mtriple armv7) or with a -gnu for arm-linux
triples.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224489 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-18 02:08:45 +00:00
Duncan P. N. Exon Smith
ee40b16641 Reapply "Linker: Drop superseded subprograms"
This reverts commit r224416, reapplying r224389.  The buildbots hadn't
recovered after my revert, waiting until David reverted a couple of his
commits.  It looks like it was just bad timing (where we were both
modifying code related to the same assertion).  Trying again...

Here's the original text:

    When a function gets replaced by `ModuleLinker`, drop superseded
    subprograms.  This ensures that the "first" subprogram pointing at a
    function is the same one that `!dbg` references point at.

    This is a stop-gap fix for PR21910.  Notably, this fixes Release+Asserts
    bootstraps that are currently asserting out in
    `LexicalScopes::initialize()` due to the explicit instantiations in
    `lib/IR/Dominators.cpp` eventually getting replaced by -argpromotion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224487 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-18 01:05:33 +00:00
Kevin Enderby
1025e9e9d6 Add printing the LC_LINKER_OPTION load command with llvm-objdump’s -private-headers.
Also corrected the name of the load command to not end in an ’S’ as well as corrected
the name of the MachO::linker_option_command struct and other places that had the
word option as plural which did not match the Mac OS X headers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224485 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-18 00:53:40 +00:00
Duncan P. N. Exon Smith
a582f1f396 IR: Handle self-referencing DICompositeTypes in DIBuilder
Add API to DIBuilder to handle self-referencing `DICompositeType`s.

Self-references aren't expected in the debug info graph, and we take
advantage of that by only calling `resolveCycles()` on nodes that were
once forward declarations (otherwise, DIBuilder needs an expensive
tracking reference to every unresolved node it creates, which in cyclic
graphs is *all of them*).

However, clang seems to create self-referencing `DICompositeType`s.  Add
API to manage this safely.  The paired commit to clang will include the
regression test.

I'll make the `DICompositeType` API `private` in a follow-up to prevent
misuse (I've separated that to prevent build failures from missing the
clang commit).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224482 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-18 00:46:16 +00:00
Duncan P. N. Exon Smith
657f8c831a LTO: Lazy-load LTOModule in local contexts
Start lazy-loading `LTOModule`s that own their contexts.  These can only
really be used for parsing symbols, so its unnecessary to ever
materialize their functions.

I looked into using `IRObjectFile::create()` and optionally calling
`materializAllPermanently()` afterwards, but this turned out to be
awkward.

  - The default target triple and data layout logic needs to happen
    *before* the call to `IRObjectFile::IRObjectFile()`, but after
    `Module` was created.

  - I tried passing a lambda in to do the module initialization, but
    this seemed to require threading the error message from
    `TargetRegistry::lookupTarget()` through `std::error_code`.

  - I also looked at setting `errMsg` directly from within the lambda,
    but this didn't look any better.

(I guess there's a reason we weren't already using that function.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224466 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-17 22:05:42 +00:00
Kostya Serebryany
1c97c5e8bd [sanitizer] allow -fsanitize-coverage=N w/ -fsanitize=leak, llvm part
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224463 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-17 21:50:04 +00:00
Matthias Braun
a1a68905b5 RegisterCoalescer: Fix stripCopies() picking up main range instead of subregister range
This fixes a problem where stripCopies() would switch to values in the
main liverange when it crossed a copy instruction. However when joining
subranges we need to stay in the respective subregister ranges.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224461 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-17 21:25:20 +00:00
Matt Arsenault
aa14ffddcf R600/SI: Fix f64 inline immediates
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224458 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-17 21:04:08 +00:00
Colin LeMahieu
648facfff4 [Hexagon] Reconfiguring register alternate names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224455 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-17 20:35:11 +00:00
Will Schmidt
0a91afabd5 Enable the P8Model entry
This was missed last time around, for the P8 Instruction Scheduling
changes (223257). This will hook the P8Model entry in so those
changes will actually be used.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224452 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-17 19:56:29 +00:00
Matthias Braun
cd56c19f3c ExecutionDepsFix: Correctly handle wide registers.
The ExecutionDepsFix previously mapped each register to 1 or zero
registers of the register class it was called with and therefore
simulating liveness for.  This was problematic for cases involving wider
registers like Q0 on ARM where ExecutionDepsFix gets invoked for the Dxx
registers. In these cases the wide register would get mapped to the last
matching D register, while it should have been all matching D registers.
This commit changes the AliasMap to use a SmallVector to map registers
to potentially multiple destination regclass registers. This is required
to avoid regressions with subregister liveness tracking enabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224447 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-17 19:13:47 +00:00