oota-llvm.git
9 years agoMake llvm/test/Object/archive-format.test CRLF-tolerant.
NAKAMURA Takumi [Tue, 3 Mar 2015 15:54:48 +0000 (15:54 +0000)]
Make llvm/test/Object/archive-format.test CRLF-tolerant.

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

9 years ago[X86][Haswell][SchedModel] Fix patterns for scalar FMA3 variants.
Michael Kuperstein [Tue, 3 Mar 2015 15:47:02 +0000 (15:47 +0000)]
[X86][Haswell][SchedModel] Fix patterns for scalar FMA3 variants.

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

9 years agoAVX-512: Moved patterns for masked load/store under avx_store, avx_load classes.
Elena Demikhovsky [Tue, 3 Mar 2015 15:03:35 +0000 (15:03 +0000)]
AVX-512: Moved patterns for masked load/store under avx_store, avx_load classes.
No functional changes.

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

9 years agoDuring PHI elimination, split critical edges that move copies out of loops.
Daniel Jasper [Tue, 3 Mar 2015 10:23:11 +0000 (10:23 +0000)]
During PHI elimination, split critical edges that move copies out of loops.

This prevents the behavior observed in llvm.org/PR22369. I am not sure
whether I am reading the code correctly, but the early exit based on
isLiveOutPastPHIs() seems to make the wrong assumption that
RegisterCoalescer won't be able to coalesce those copies later.

This change hides the new behavior behind -no-phi-elim-live-out-early-exit
as it currently breaks four tests:
 * Assertion in:
     CodeGen/Hexagon/hwloop-cleanup.ll
 * Worse code in:
     CodeGen/X86/coalescer-commute4.ll
     CodeGen/X86/phys_subreg_coalesce-2.ll
     CodeGen/X86/zlib-longest-match.ll
   The root cause here seems to be that the heuristic that determines
   the visitation order in RegisterCoalescer gets less lucky.

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

9 years agoAdd range iterators to Extract/InsertValueInst indices
Daniel Berlin [Tue, 3 Mar 2015 09:31:01 +0000 (09:31 +0000)]
Add range iterators to Extract/InsertValueInst indices

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

9 years agoSwitch up whitespace with better whitespace.
Nick Lewycky [Tue, 3 Mar 2015 07:59:45 +0000 (07:59 +0000)]
Switch up whitespace with better whitespace.

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

9 years agoRevert the non-cleanup part of r230769 because it introduced a non-determinism found...
Nick Lewycky [Tue, 3 Mar 2015 07:57:45 +0000 (07:57 +0000)]
Revert the non-cleanup part of r230769 because it introduced a non-determinism found only in the names of symbols.

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

9 years agoCleanup after r230934 per Dave's suggestions.
Owen Anderson [Tue, 3 Mar 2015 05:39:27 +0000 (05:39 +0000)]
Cleanup after r230934 per Dave's suggestions.

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

9 years ago[X86] Remove some unused code from disassembler.
Craig Topper [Tue, 3 Mar 2015 05:24:03 +0000 (05:24 +0000)]
[X86] Remove some unused code from disassembler.

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

9 years agoRevert "[ADT] fail-fast iterators for DenseMap"
Sanjoy Das [Tue, 3 Mar 2015 01:59:38 +0000 (01:59 +0000)]
Revert "[ADT] fail-fast iterators for DenseMap"

This reverts commit r231035.  It breaks clang.

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

9 years agoAdd explicit type to empty std::set initializer to fix the libc++ build.
Peter Collingbourne [Tue, 3 Mar 2015 01:39:13 +0000 (01:39 +0000)]
Add explicit type to empty std::set initializer to fix the libc++ build.

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

9 years ago[X86] Special-case 2x CMOV when custom-inserting.
Ahmed Bougacha [Tue, 3 Mar 2015 01:21:16 +0000 (01:21 +0000)]
[X86] Special-case 2x CMOV when custom-inserting.

This lets us avoid a few copies that are otherwise hard to get rid of.
The way this is done is, the custom-inserter looks at the following
instruction for another CMOV, and replaces both at the same time.
A previous version used a new CMOV2 opcode, but the custom inserter
is expected to be able to return a different basic block anyway, which
means it's OK - though far from ideal - to alter that block's contents.
Explicitly document that, in case it ever makes a difference.
Alternatives welcome!

Follow-up to r231045.

rdar://19767934
Closes http://reviews.llvm.org/D8019

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

9 years ago[X86] Combine (cmov (and/or (setcc) (setcc))) into (cmov (cmov)).
Ahmed Bougacha [Tue, 3 Mar 2015 01:09:14 +0000 (01:09 +0000)]
[X86] Combine (cmov (and/or (setcc) (setcc))) into (cmov (cmov)).

Fold and/or of setcc's to double CMOV:

(CMOV F, T, ((cc1 | cc2) != 0)) -> (CMOV (CMOV F, T, cc1), T, cc2)
(CMOV F, T, ((cc1 & cc2) != 0)) -> (CMOV (CMOV T, F, !cc1), F, !cc2)

When we can't use the CMOV instruction, it might increase branch
mispredicts.  When we can, or when there is no mispredict, this
improves throughput and reduces register pressure.

These can't be catched by generic combines, because the pattern can
appear when legalizing some instructions (such as fcmp une).

rdar://19767934
http://reviews.llvm.org/D7634

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

9 years agoFix cppeh breakage due to racing commits
Reid Kleckner [Tue, 3 Mar 2015 01:04:39 +0000 (01:04 +0000)]
Fix cppeh breakage due to racing commits

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

9 years agoLowerBitSets: Use byte arrays instead of bit sets to represent in-memory bit sets.
Peter Collingbourne [Tue, 3 Mar 2015 00:49:28 +0000 (00:49 +0000)]
LowerBitSets: Use byte arrays instead of bit sets to represent in-memory bit sets.

By loading from indexed offsets into a byte array and applying a mask, a
program can test bits from the bit set with a relatively short instruction
sequence. For example, suppose we have 15 bit sets to lay out:

A (16 bits), B (15 bits), C (14 bits), D (13 bits), E (12 bits),
F (11 bits), G (10 bits), H (9 bits), I (7 bits), J (6 bits), K (5 bits),
L (4 bits), M (3 bits), N (2 bits), O (1 bit)

These bits can be laid out in a 16-byte array like this:

      Byte Offset
    0123456789ABCDEF
Bit
  7 HHHHHHHHHIIIIIII
  6 GGGGGGGGGGJJJJJJ
  5 FFFFFFFFFFFKKKKK
  4 EEEEEEEEEEEELLLL
  3 DDDDDDDDDDDDDMMM
  2 CCCCCCCCCCCCCCNN
  1 BBBBBBBBBBBBBBBO
  0 AAAAAAAAAAAAAAAA

For example, to test bit X of A, we evaluate ((bits[X] & 1) != 0), or to
test bit X of I, we evaluate ((bits[9 + X] & 0x80) != 0). This can be done
in 1-2 machine instructions on x86, or 4-6 instructions on ARM.

This uses the LPT multiprocessor scheduling algorithm to lay out the bits
efficiently.

Saves ~450KB of instructions in a recent build of Chromium.

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

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

9 years agoRemap arguments and non-alloca values used by outlined C++ exception handlers.
Andrew Kaylor [Tue, 3 Mar 2015 00:41:03 +0000 (00:41 +0000)]
Remap arguments and non-alloca values used by outlined C++ exception handlers.

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

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

9 years agoLoopIdiom: Give globals for memset_pattern16 private linkage.
Benjamin Kramer [Tue, 3 Mar 2015 00:17:09 +0000 (00:17 +0000)]
LoopIdiom: Give globals for memset_pattern16 private linkage.

There's really no reason to have them have entries in the symbol table
anymore. Old versions of ld64 had some bugs in this area but those have
been fixed long ago.

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

9 years agoWinEH: Run opt -instnamer over some cppeh tests and update CHECKs
Reid Kleckner [Tue, 3 Mar 2015 00:05:35 +0000 (00:05 +0000)]
WinEH: Run opt -instnamer over some cppeh tests and update CHECKs

In the future, we should run the output of clang through instnamer to
make it easier to manually edit test cases.

No functionality change.

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

9 years ago[ADT] fail-fast iterators for DenseMap
Sanjoy Das [Mon, 2 Mar 2015 23:29:37 +0000 (23:29 +0000)]
[ADT] fail-fast iterators for DenseMap

Summary:
This patch is an attempt at making `DenseMapIterator`s "fail-fast".
Fail-fast iterators that have been invalidated due to insertion into
the host `DenseMap` deterministically trip an assert (in debug mode)
on access, instead of non-deterministically hitting memory corruption
issues.

Reviewers: dexonsmith, dberlin, ruiu, chandlerc

Reviewed By: chandlerc

Subscribers: yaron.keren, chandlerc, llvm-commits

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

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

9 years agoTLI: Factor out sanitizeFunctionName. NFC.
Michael Zolotukhin [Mon, 2 Mar 2015 23:24:40 +0000 (23:24 +0000)]
TLI: Factor out sanitizeFunctionName. NFC.

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

9 years agoIndexedMap: Document why SmallVector<T, 0> is preferable here.
Benjamin Kramer [Mon, 2 Mar 2015 22:20:22 +0000 (22:20 +0000)]
IndexedMap: Document why SmallVector<T, 0> is preferable here.

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

9 years agoRevert "Revert "For the dwarf expression code get the subtarget off of the current""
Adrian Prantl [Mon, 2 Mar 2015 22:02:36 +0000 (22:02 +0000)]
Revert "Revert "For the dwarf expression code get the subtarget off of the current""

This reapplies r230990 without modifications.

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

9 years agoRefactor DebugLocDWARFExpression so it doesn't require access to the
Adrian Prantl [Mon, 2 Mar 2015 22:02:33 +0000 (22:02 +0000)]
Refactor DebugLocDWARFExpression so it doesn't require access to the
TargetRegisterInfo. DebugLocEntry now holds a buffer with the raw bytes
of the pre-calculated DWARF expression.

Ought to be NFC, but it does slightly alter the output format of the
textual assembly.

This reapplies 230930 without the assertion in DebugLocEntry::finalize()
because not all Machine registers can be lowered into DWARF register
numbers and floating point constants cannot be expressed.

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

9 years agocmake: Use MSVC atomics with clang-cl
Reid Kleckner [Mon, 2 Mar 2015 22:00:23 +0000 (22:00 +0000)]
cmake: Use MSVC atomics with clang-cl

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

9 years agoSupport: Use const pointers for reads.
Jan Vesely [Mon, 2 Mar 2015 21:50:28 +0000 (21:50 +0000)]
Support: Use const pointers for reads.

Fixes tons of const-cast warnings.

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Rui Ueyama <ruiu@google.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231021 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert some changes that were made to fix PR20680.
Sanjoy Das [Mon, 2 Mar 2015 21:41:07 +0000 (21:41 +0000)]
Revert some changes that were made to fix PR20680.

This re-lands change r230921.  r230921 was reverted because it broke a
clang test; a checkin fixing the clang test will be commited shortly.

Summary:
As far as I can tell, the real bug causing the issue was fixed in
r230533.  SCEVExpander should mark an increment operation as nuw or nsw
only if it can *prove* that the operation does not overflow.  There
shouldn't be any situation where we have to do something different
because of no-wrap flags generated by SCEVExpander.

Revert "IndVarSimplify: Allow LFTR to fire more often"

This reverts commit 1ade0f0faa98877b688e0b9da58e876052c1e04e (SVN: 222213).

Revert "IndVarSimplify: Don't let LFTR compare against a poison value"

This reverts commit c0f2b8b528d8a37b0a1522aae90af649d6357eb5 (SVN: 217102).

Reviewers: majnemer, atrick, spatel

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

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

9 years agolit: Add 'cd' support to the internal shell and port some tests
Reid Kleckner [Mon, 2 Mar 2015 21:33:18 +0000 (21:33 +0000)]
lit: Add 'cd' support to the internal shell and port some tests

The internal shell was already threading around a 'cwd' parameter. We
just have to make it mutable so that we can update it as the test script
executes.

If the shell ever grows support for environment variable substitution,
we could also implement support for export.

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

9 years agoUse read{16,32,64}{le,be}() instead of *reinterpret_cast<u{little,big}{16,32,64}_t>().
Rui Ueyama [Mon, 2 Mar 2015 21:19:12 +0000 (21:19 +0000)]
Use read{16,32,64}{le,be}() instead of *reinterpret_cast<u{little,big}{16,32,64}_t>().

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

9 years agoSmallVector: Allow initialization and assignment from initializer_list.
Benjamin Kramer [Mon, 2 Mar 2015 21:16:04 +0000 (21:16 +0000)]
SmallVector: Allow initialization and assignment from initializer_list.

Modeled after std::vector.

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

9 years agoTLI: Use lambda. NFC.
Michael Zolotukhin [Mon, 2 Mar 2015 20:50:08 +0000 (20:50 +0000)]
TLI: Use lambda. NFC.

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

9 years agoMake ToVectorTy static.
Michael Zolotukhin [Mon, 2 Mar 2015 20:43:24 +0000 (20:43 +0000)]
Make ToVectorTy static.

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

9 years agoFix a copy-paste bug.
Michael Zolotukhin [Mon, 2 Mar 2015 20:37:10 +0000 (20:37 +0000)]
Fix a copy-paste bug.

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

9 years agoRevert "Refactor DebugLocDWARFExpression so it doesn't require access to the"
Adrian Prantl [Mon, 2 Mar 2015 20:01:54 +0000 (20:01 +0000)]
Revert "Refactor DebugLocDWARFExpression so it doesn't require access to the"

This reverts commit 230975 to investigate buildbot breakage.

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

9 years agoRevert "For the dwarf expression code get the subtarget off of the current"
Adrian Prantl [Mon, 2 Mar 2015 20:01:47 +0000 (20:01 +0000)]
Revert "For the dwarf expression code get the subtarget off of the current"

This reverts commit 230990 because also reverting 230975.

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

9 years agoSupport: Add {read,write}{16,32,64}{le,be} functions.
Rui Ueyama [Mon, 2 Mar 2015 20:00:15 +0000 (20:00 +0000)]
Support: Add {read,write}{16,32,64}{le,be} functions.

Add convenient functions for endian-aware reads/writes.

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

9 years agoRemove useless .debug_macinfo section setup.
Paul Robinson [Mon, 2 Mar 2015 19:52:42 +0000 (19:52 +0000)]
Remove useless .debug_macinfo section setup.

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

9 years agoChange SystemZ large tests to use the existing long_tests property
David Blaikie [Mon, 2 Mar 2015 19:34:11 +0000 (19:34 +0000)]
Change SystemZ large tests to use the existing long_tests property

(this is already used in Clang for a couple of tests)

Reviewers: uweigand

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

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

9 years ago[PerformanceTips] Document various items folks have suggested
Philip Reames [Mon, 2 Mar 2015 19:19:04 +0000 (19:19 +0000)]
[PerformanceTips] Document various items folks have suggested

This could stand to be expanded - patches welcome! - but let's at least write them down so they don't get forgotten.

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

9 years agoAdd r230655 back with a fix.
Rafael Espindola [Mon, 2 Mar 2015 19:08:03 +0000 (19:08 +0000)]
Add r230655 back with a fix.

The issue is that now we have a diag handler during optimizations
and get forward every optimization remark, flooding stdout.

The same filtering should probably be done with or without a
custom handler, but for now just ignore remarks.

Original message:

gold-plugin: "Upgrade" debug info and handle its warnings.

The gold plugin never calls MaterializeModule, so any old debug info
was not deleted and could cause crashes.

Now that it is being "upgraded", the plugin also has to handle warnings
and create Modules with a nice id (it shows in the warning).

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

9 years agoFor the dwarf expression code get the subtarget off of the current
Eric Christopher [Mon, 2 Mar 2015 19:01:47 +0000 (19:01 +0000)]
For the dwarf expression code get the subtarget off of the current
MachineFunction.

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

9 years agoRestore LLVMLinkModules C API until it is properly deprecated.
Juergen Ributzka [Mon, 2 Mar 2015 18:59:38 +0000 (18:59 +0000)]
Restore LLVMLinkModules C API until it is properly deprecated.

Add the enum "LLVMLinkerMode" back for backwards-compatibility and add the
linker mode parameter back to the "LLVMLinkModules" function. The paramter is
ignored and has no effect.

Patch provided by: Filip Pizlo
Reviewed by: Rafael and Sean

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

9 years agoR600: Use c++11 style for loop
Jan Vesely [Mon, 2 Mar 2015 18:56:52 +0000 (18:56 +0000)]
R600: Use c++11 style for loop

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <tom@stellard.net>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230987 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert r230979, should apply to all X86 ELF.
Paul Robinson [Mon, 2 Mar 2015 18:50:18 +0000 (18:50 +0000)]
Revert r230979, should apply to all X86 ELF.

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

9 years agoMaking the SO version major.minor instead of just major because ABI and API change...
Chris Bieneman [Mon, 2 Mar 2015 17:50:13 +0000 (17:50 +0000)]
Making the SO version major.minor instead of just major because ABI and API change between minor versions.

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

9 years ago[PS4] Correct relocation for DWARF TLS references.
Paul Robinson [Mon, 2 Mar 2015 17:44:52 +0000 (17:44 +0000)]
[PS4] Correct relocation for DWARF TLS references.

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

9 years agoexport.sh: Make sure umask is not too restrictive (PR22742)
Hans Wennborg [Mon, 2 Mar 2015 17:30:42 +0000 (17:30 +0000)]
export.sh: Make sure umask is not too restrictive (PR22742)

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

9 years agoDetect malformed YAML sequence in yaml::Input::beginSequence()
Justin Bogner [Mon, 2 Mar 2015 17:26:43 +0000 (17:26 +0000)]
Detect malformed YAML sequence in yaml::Input::beginSequence()

When reading a yaml::SequenceTraits object, YAMLIO does not report an
error if the yaml item is not a sequence. Instead, YAMLIO reads an
empty sequence. For example:

---
seq:
    foo: 1
    bar: 2
...

If `seq` is a SequenceTraits object, then reading the above yaml will
yield `seq` as an empty sequence.

Fix this to report an error for the above mapping ("not a sequence")

Patch by William Fisher. Thanks!

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

9 years agoRefactor DebugLocDWARFExpression so it doesn't require access to the
Adrian Prantl [Mon, 2 Mar 2015 17:21:06 +0000 (17:21 +0000)]
Refactor DebugLocDWARFExpression so it doesn't require access to the
TargetRegisterInfo. DebugLocEntry now holds a buffer with the raw bytes
of the pre-calculated DWARF expression.

Ought to be NFC, but it does slightly alter the output format of the
textual assembly.

This reapplies 230930 with a relaxed assertion in DebugLocEntry::finalize()
that allows for empty DWARF expressions for constant FP values.

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

9 years agoAccidentaly inverted the condition again. Sorry.
Benjamin Kramer [Mon, 2 Mar 2015 16:45:08 +0000 (16:45 +0000)]
Accidentaly inverted the condition again. Sorry.

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

9 years agoAvoid assertion in MSVC 2013 debug builds.
Benjamin Kramer [Mon, 2 Mar 2015 16:42:56 +0000 (16:42 +0000)]
Avoid assertion in MSVC 2013 debug builds.

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

9 years agoAsmWriter: Only print one space after the load type
Benjamin Kramer [Mon, 2 Mar 2015 15:24:41 +0000 (15:24 +0000)]
AsmWriter: Only print one space after the load type

Before: %x = load i32,  i32* %i
After:  %x = load i32, i32* %i

Purely cosmetic, so no new test case.

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

9 years agoSLPVectorizer: Rewrite ArrayRef slice compare to be more idiomatic.
Benjamin Kramer [Mon, 2 Mar 2015 15:24:36 +0000 (15:24 +0000)]
SLPVectorizer: Rewrite ArrayRef slice compare to be more idiomatic.

NFC intended.

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

9 years agoTblGen: Remove copy of SmallVector::operator==. NFC intended.
Benjamin Kramer [Mon, 2 Mar 2015 15:24:30 +0000 (15:24 +0000)]
TblGen: Remove copy of SmallVector::operator==. NFC intended.

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

9 years agoAVX-512: Add assembly parser support for Rounding mode
Elena Demikhovsky [Mon, 2 Mar 2015 15:00:34 +0000 (15:00 +0000)]
AVX-512: Add assembly parser support for Rounding mode
By Asaf Badouh <asaf.badouh@intel.com>

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

9 years agoNVPTX: Remove dead code.
Benjamin Kramer [Mon, 2 Mar 2015 13:16:28 +0000 (13:16 +0000)]
NVPTX: Remove dead code.

Fun fact: This file was never referenced since the initial checkin of
the NVPTX backend.

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

9 years ago[mips] Optimize conditional moves where RHS is zero.
Vasileios Kalintiris [Mon, 2 Mar 2015 12:47:32 +0000 (12:47 +0000)]
[mips] Optimize conditional moves where RHS is zero.

Summary:
When the RHS of a conditional move node is zero, we can utilize the $zero
register by inverting the conditional move instruction and by swapping the
order of its True/False operands.

Reviewers: dsanders

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

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

9 years agoAVX-512: Simplified MOV patterns, no functional changes.
Elena Demikhovsky [Mon, 2 Mar 2015 12:46:21 +0000 (12:46 +0000)]
AVX-512: Simplified MOV patterns, no functional changes.

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

9 years agobindings/go: expose DIBuilder::createReplaceableCompositeType
Andrew Wilkins [Mon, 2 Mar 2015 12:27:04 +0000 (12:27 +0000)]
bindings/go: expose DIBuilder::createReplaceableCompositeType

Summary:
We extend the DIBuilder type, adding a method for creating
replaceable composite types. This is necessary for creating
debug info describing self-referential types.

Reviewers: pcc

Reviewed By: pcc

Subscribers: axw, llvm-commits

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

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

9 years agoSimplify code. NFC.
Benjamin Kramer [Mon, 2 Mar 2015 11:57:04 +0000 (11:57 +0000)]
Simplify code. NFC.

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

9 years agoTeach the verifier to enforce that the alignment argument of memory intrinsics must...
Owen Anderson [Mon, 2 Mar 2015 09:35:06 +0000 (09:35 +0000)]
Teach the verifier to enforce that the alignment argument of memory intrinsics must be a power of 2.

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

9 years agoTeach DataLayout that alignments on basic types must be powers of two.
Owen Anderson [Mon, 2 Mar 2015 09:35:03 +0000 (09:35 +0000)]
Teach DataLayout that alignments on basic types must be powers of two.

Fixes assertion failures/crashes on bad datalayout specifications.

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

9 years agoTeach DataLayout that ABI alignments for non-aggregate types must be non-zero.
Owen Anderson [Mon, 2 Mar 2015 09:34:59 +0000 (09:34 +0000)]
Teach DataLayout that ABI alignments for non-aggregate types must be non-zero.

This manifested as assertions and/or crashes in later phases of optimization,
depending on the build configuration.

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

9 years agoTeach DataLayout that pointer ABI and preferred alignments are required to be powers...
Owen Anderson [Mon, 2 Mar 2015 06:33:51 +0000 (06:33 +0000)]
Teach DataLayout that pointer ABI and preferred alignments are required to be powers of two.

Previously this resulted in asserts and/or crashes (depending on build configuration) at various phases in the optimizer.

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

9 years agoTeach DataLayout that zero-byte pointer sizes don't make sense.
Owen Anderson [Mon, 2 Mar 2015 06:00:02 +0000 (06:00 +0000)]
Teach DataLayout that zero-byte pointer sizes don't make sense.

Previously this would result in assertion failures or simply crashes
at various points in the optimizer when trying to create types of zero
bit width.

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

9 years agoTeach the LLParser to fail gracefully when it encounters an invalid label name.
Owen Anderson [Mon, 2 Mar 2015 05:25:09 +0000 (05:25 +0000)]
Teach the LLParser to fail gracefully when it encounters an invalid label name.

Previous it would either assert in +Asserts, or crash in -Asserts. Found by fuzzing LLParser.

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

9 years agoFix a crash in the LL parser where it failed to validate that the pointer operand...
Owen Anderson [Mon, 2 Mar 2015 05:25:06 +0000 (05:25 +0000)]
Fix a crash in the LL parser where it failed to validate that the pointer operand of a GEP was valid.

This manifested as an assertion failure in +Asserts builds, and a hard crash in -Asserts builds.  Found by fuzzing the LL parser.

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

9 years ago[llvm-pdbdump] Many minor fixes and improvements
Zachary Turner [Mon, 2 Mar 2015 04:39:56 +0000 (04:39 +0000)]
[llvm-pdbdump] Many minor fixes and improvements

A short list of some of the improvements:

1) Now supports -all command line argument, which implies many
   other command line arguments to simplify usage.
2) Now supports -no-compiler-generated command line argument to
   exclude compiler generated types.
3) Prints base class list.
4) -class-definitions implies -types.
5) Proper display of bitfields.
6) Can now distinguish between struct/class/interface/union.

And a few other minor tweaks.

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

9 years agoRevert r230930, it caused PR22747.
Nico Weber [Mon, 2 Mar 2015 04:37:11 +0000 (04:37 +0000)]
Revert r230930, it caused PR22747.

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

9 years ago[X86] There are only 8 mask registers. Fail disassembly if instruction tries to refer...
Craig Topper [Mon, 2 Mar 2015 03:33:11 +0000 (03:33 +0000)]
[X86] There are only 8 mask registers. Fail disassembly if instruction tries to reference more.

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

9 years agoRefactor DebugLocDWARFExpression so it doesn't require access to the
Adrian Prantl [Mon, 2 Mar 2015 02:38:18 +0000 (02:38 +0000)]
Refactor DebugLocDWARFExpression so it doesn't require access to the
TargetRegisterInfo. DebugLocEntry now holds a buffer with the raw bytes
of the pre-calculated DWARF expression.

Ought to be NFC, but it does slightly alter the output format of the
textual assembly.

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

9 years agoRevert r230921, "Revert some changes that were made to fix PR20680.", for now.
NAKAMURA Takumi [Mon, 2 Mar 2015 01:14:03 +0000 (01:14 +0000)]
Revert r230921, "Revert some changes that were made to fix PR20680.", for now.

It caused a failure on clang/test/Misc/backend-optimization-failure.cpp .

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

9 years agoAdd another missing header that used to be included transitively.
Benjamin Kramer [Mon, 2 Mar 2015 01:08:07 +0000 (01:08 +0000)]
Add another missing header that used to be included transitively.

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

9 years agollvm/examples: Add missing include according to r230907.
NAKAMURA Takumi [Mon, 2 Mar 2015 01:04:34 +0000 (01:04 +0000)]
llvm/examples: Add missing include according to r230907.

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

9 years ago[X86] Fix diassembler crash on AVX512 cmpps/cmppd with immediate that doesn't fit...
Craig Topper [Mon, 2 Mar 2015 00:22:29 +0000 (00:22 +0000)]
[X86] Fix diassembler crash on AVX512 cmpps/cmppd with immediate that doesn't fit in 5-bits. Fixes PR22743.

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

9 years ago[AArch64] fix an invalid-iterator-use bug.
Sanjoy Das [Mon, 2 Mar 2015 00:17:18 +0000 (00:17 +0000)]
[AArch64] fix an invalid-iterator-use bug.

Summary:
In AArch64PromoteConstant::appendAndTransferDominatedUses,
`InsertPts[NewPt]` invalidates IPI.  Therefore, `InsertPts[NewPt] =
std::move(IPI->second)` is not legal.

This was caught by running `make check` with
http://reviews.llvm.org/D7931.

Reviewers: t.p.northover, grosbach, bkramer

Reviewed By: bkramer

Subscribers: aemerson, llvm-commits

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

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

9 years agoFix a really bad typo in my last commit.
Benjamin Kramer [Sun, 1 Mar 2015 23:56:19 +0000 (23:56 +0000)]
Fix a really bad typo in my last commit.

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

9 years agoRevert some changes that were made to fix PR20680.
Sanjoy Das [Sun, 1 Mar 2015 23:36:26 +0000 (23:36 +0000)]
Revert some changes that were made to fix PR20680.

Summary:
As far as I can tell, the real bug causing the issue was fixed in
r230533.  SCEVExpander should mark an increment operation as nuw or nsw
only if it can *prove* that the operation does not overflow.  There
shouldn't be any situation where we have to do something different
because of no-wrap flags generated by SCEVExpander.

Revert "IndVarSimplify: Allow LFTR to fire more often"

This reverts commit 1ade0f0faa98877b688e0b9da58e876052c1e04e (SVN: 222213).

Revert "IndVarSimplify: Don't let LFTR compare against a poison value"

This reverts commit c0f2b8b528d8a37b0a1522aae90af649d6357eb5 (SVN: 217102).

Reviewers: majnemer, atrick, spatel

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

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

9 years agoArrayRef: Put back std::equal for operator== with a check for the empty ArrayRefs
Benjamin Kramer [Sun, 1 Mar 2015 23:35:20 +0000 (23:35 +0000)]
ArrayRef: Put back std::equal for operator== with a check for the empty ArrayRefs

This has the nice property of compiling down to memcmp when feasible. An empty
ArrayRef can have a nullptr in its Data field. I didn't find anything in the
standard speaking against std::equal(nullptr, nullptr, nullptr) begin valid but
MSVC asserts. The way libstdc++ lowers std::equal down to memcmp also makes
invoking std::equal with a nullptr undefined behavior so checking is the only
way to be safe.

The extra check doesn't cost us perf either because we're essentially peeling
the loop header away from the rotated loop.

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

9 years agoAnother missing include for MSVC.
Benjamin Kramer [Sun, 1 Mar 2015 22:34:04 +0000 (22:34 +0000)]
Another missing include for MSVC.

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

9 years agostd::function is part of <functional>, not <utility>
Benjamin Kramer [Sun, 1 Mar 2015 21:49:21 +0000 (21:49 +0000)]
std::function is part of <functional>, not <utility>

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

9 years agoAdd another missing include for MSVC.
Benjamin Kramer [Sun, 1 Mar 2015 21:47:46 +0000 (21:47 +0000)]
Add another missing include for MSVC.

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

9 years agoX86: Replace variadic function with init list. NFC.
Benjamin Kramer [Sun, 1 Mar 2015 21:47:40 +0000 (21:47 +0000)]
X86: Replace variadic function with init list. NFC.

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

9 years agoAdd missing includes. make_unique proliferated everywhere.
Benjamin Kramer [Sun, 1 Mar 2015 21:28:53 +0000 (21:28 +0000)]
Add missing includes. make_unique proliferated everywhere.

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

9 years ago[PBQP] Address post-commit style comment for r230904. NFC.
Arnaud A. de Grandmaison [Sun, 1 Mar 2015 21:22:50 +0000 (21:22 +0000)]
[PBQP] Address post-commit style comment for r230904. NFC.

Thanks David !

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

9 years agoArrayRef: Remove the equals helper with many arguments.
Benjamin Kramer [Sun, 1 Mar 2015 21:05:05 +0000 (21:05 +0000)]
ArrayRef: Remove the equals helper with many arguments.

With initializer lists there is a really neat idiomatic way to write
this, 'ArrayRef.equals({1, 2, 3, 4, 5})'. Remove the equal method which
always had a hard limit on the number of arguments. I considered
rewriting it with variadic templates but that's not really a good fit
for a function with homogeneous arguments.

'ArrayRef == {1, 2, 3, 4, 5}' would've been even more awesome, but C++11
doesn't allow init lists with binary operators.

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

9 years ago[PBQP] Do not add an edge between nodes with totally disjoint allowed registers
Arnaud A. de Grandmaison [Sun, 1 Mar 2015 20:39:34 +0000 (20:39 +0000)]
[PBQP] Do not add an edge between nodes with totally disjoint allowed registers

Such edges are zero matrix, and they bring no additional info to the
allocation problem, apart from contributing to nodes' degree. Removing
those edges is expected to improve allocation time.

Tune the spill cost comparison, as this gives better average performances
now that the nodes' degrees has changed.

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

9 years agoMake VTs and UnicodeCharSet ctors constexpr if the compiler supports it.
Benjamin Kramer [Sun, 1 Mar 2015 18:10:07 +0000 (18:10 +0000)]
Make VTs and UnicodeCharSet ctors constexpr if the compiler supports it.

There are static variables of this around that we really want to go
into a read-only segment. Sadly compilers are not smart enough to figure
that out without constexpr.

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

9 years agoMake some non-constant static variables non-static or fully const.
Benjamin Kramer [Sun, 1 Mar 2015 18:09:56 +0000 (18:09 +0000)]
Make some non-constant static variables non-static or fully const.

Otherwise we have to emit thread-safe initialization for them. NFC.

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

9 years agoReverted 230471 - gather scatter handling in table gen.
Elena Demikhovsky [Sun, 1 Mar 2015 08:23:41 +0000 (08:23 +0000)]
Reverted 230471 - gather scatter handling in table gen.

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

9 years agoAVX-512: Added mask and rounding mode for scalar arithmetics
Elena Demikhovsky [Sun, 1 Mar 2015 07:44:04 +0000 (07:44 +0000)]
AVX-512: Added mask and rounding mode for scalar arithmetics
Added more tests for scalar instructions to destinguish between AVX and AVX-512 forms.

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

9 years ago[llvm-pdbdump] Fix GCC build.
Zachary Turner [Sun, 1 Mar 2015 06:59:57 +0000 (06:59 +0000)]
[llvm-pdbdump] Fix GCC build.

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

9 years ago[llvm-pdbdump] Clean up method signatures.
Zachary Turner [Sun, 1 Mar 2015 06:51:29 +0000 (06:51 +0000)]
[llvm-pdbdump] Clean up method signatures.

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

9 years ago[llvm-pdbdump] Add regex-based filtering.
Zachary Turner [Sun, 1 Mar 2015 06:49:49 +0000 (06:49 +0000)]
[llvm-pdbdump] Add regex-based filtering.

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

9 years agoRevert r230655, "gold-plugin: "Upgrade" debug info and handle its warnings."
NAKAMURA Takumi [Sun, 1 Mar 2015 04:16:28 +0000 (04:16 +0000)]
Revert r230655, "gold-plugin: "Upgrade" debug info and handle its warnings."

It emits *millions of warnings* during selfhosting LTO build, to choke the buildbot with gigbytes of log.

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

9 years agoavoid infinite looping when folding vector multiplies of constants (PR22698)
Sanjay Patel [Sun, 1 Mar 2015 00:09:35 +0000 (00:09 +0000)]
avoid infinite looping when folding vector multiplies of constants (PR22698)

We were missing a check for the following fold in DAGCombiner:

// fold (fmul (fmul x, c1), c2) -> (fmul x, (fmul c1, c2))

If 'x' is also a constant, then we shouldn't do anything. Otherwise, we could end up swapping the operands back and forth forever.

This should fix:
http://llvm.org/bugs/show_bug.cgi?id=22698

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

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

9 years agofixed to test only the feature, not the feature and a CPU
Sanjay Patel [Sun, 1 Mar 2015 00:02:03 +0000 (00:02 +0000)]
fixed to test only the feature, not the feature and a CPU

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

9 years agoDebugInfo: Convert DW_OP_piece => DW_OP_bit_piece
Duncan P. N. Exon Smith [Sat, 28 Feb 2015 23:57:16 +0000 (23:57 +0000)]
DebugInfo: Convert DW_OP_piece => DW_OP_bit_piece

r228631 stopped using `DW_OP_piece` inside `DIExpression`s in the IR,
but it apparently missed updating these testcases.  Caught by verifier
checks for `MDExpression` while working on moving the new hierarchy into
place.

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

9 years agomake the tested feature (SSE2) explicit
Sanjay Patel [Sat, 28 Feb 2015 23:55:24 +0000 (23:55 +0000)]
make the tested feature (SSE2) explicit

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

9 years agoDebugInfo: Fix invalid file reference in CodeGen/X86/unknown-location.ll
Duncan P. N. Exon Smith [Sat, 28 Feb 2015 23:52:24 +0000 (23:52 +0000)]
DebugInfo: Fix invalid file reference in CodeGen/X86/unknown-location.ll

There are two types of files in the old (current) debug info schema.

    !0 = !{!"some/filename", !"/path/to/dir"}
    !1 = !{!"0x29", !0} ; [ DW_TAG_file_type ]

!1 has a wrapper class called `DIFile` which inherits from `DIScope` and
is referenced in 'scope' fields.

!0 is called a "file node", and debug info nodes with a 'file' field
point at one of these directly -- although they're built in `DIBuilder`
by sending in a `DIFile` and reaching into it.

In the new hierarchy, I unified these nodes as `MDFile` (which `DIFile`
is a lightweight wrapper for) in r230057.  Moving the new hierarchy into
place (and upgrading testcases) caused CodeGen/X86/unknown-location.ll
to start failing -- apparently "0x29" was previously showing up in the
linetable as a filename, causing:

    .loc 2 4 3

(where 2 points at filename "0x29") instead of:

    .loc 1 4 3

(where 1 points at the actual filename).

Change the testcase to use the old schema correctly.

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

9 years agoDebugInfo: Use TempMDNode in DIDescriptor::replaceAllUsesWith()
Duncan P. N. Exon Smith [Sat, 28 Feb 2015 23:48:02 +0000 (23:48 +0000)]
DebugInfo: Use TempMDNode in DIDescriptor::replaceAllUsesWith()

Start using `TempMDNode` in `DIDescriptor::replaceAllUsesWith()`
(effectively `std::unique_ptr<MDNode, MDNode::deleteTemporary>`).

Besides making ownership more explicit, this prepares for when
`DIDescriptor` refers to nodes that are *not* `MDTuple`.  The old logic
for "replacing" a node with itself used `MDNode::get()` to return a new
(uniqued) `MDTuple`, while the new logic just defers to
`MDNode::replaceWithUniqued()` (which also typically saves an allocation
and RAUW traffic by mutating the temporary in place).

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