OSDN Git Service

android-x86/external-llvm.git
8 years agoIR: Use Optional instead of unique_ptr for Metadata map in ValueMap, NFC
Duncan P. N. Exon Smith [Tue, 19 Apr 2016 16:17:48 +0000 (16:17 +0000)]
IR: Use Optional instead of unique_ptr for Metadata map in ValueMap, NFC

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

8 years agoModuleLinker: Do not import linkonce/weak as "external_weak"
Mehdi Amini [Tue, 19 Apr 2016 16:11:05 +0000 (16:11 +0000)]
ModuleLinker: Do not import linkonce/weak as "external_weak"

Summary:
There is no reason to have a weak reference because the external
definition will be weak.

Reviewers: rafael

Subscribers: llvm-commits, tejohnson

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

From: Mehdi Amini <mehdi.amini@apple.com>

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

8 years agoIR: Use Optional instead of unique_ptr for debug info ODR type map, NFC
Duncan P. N. Exon Smith [Tue, 19 Apr 2016 16:06:50 +0000 (16:06 +0000)]
IR: Use Optional instead of unique_ptr for debug info ODR type map, NFC

Save a level of malloc indirection.

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

8 years agoEnable ODR uniquing of DITypes in more places
Teresa Johnson [Tue, 19 Apr 2016 15:48:30 +0000 (15:48 +0000)]
Enable ODR uniquing of DITypes in more places

Summary:
This is a follow-on to apply Duncan's new DIType ODR uniquing from
r266549 and r266713 in more places.

Enable enableDebugTypeODRUniquing() for ThinLTO backends invoked via
libLTO, similar to the way r266549 enabled this for ThinLTO backend
threads launched from gold-plugin.

Also enable enableDebugTypeODRUniquing in opt, similar to the way
r266549 enabled this for llvm-link (on by default, can be disabled with
new -disable-debug-info-type-map option), since we may perform ThinLTO
importing from opt.

Reviewers: dexonsmith, joker.eph

Subscribers: joker.eph, llvm-commits

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

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

8 years agoIR: getOrInsertODRUniquedType => DICompositeType::getODRType, NFC
Duncan P. N. Exon Smith [Tue, 19 Apr 2016 14:55:09 +0000 (14:55 +0000)]
IR: getOrInsertODRUniquedType => DICompositeType::getODRType, NFC

Lift the API for debug info ODR type uniquing up a layer.  Instead of
clients managing the map directly on the LLVMContext, add a static
method to DICompositeType called getODRType and handle the map in the
background.  Also adds DICompositeType::getODRTypeIfExists, so far just
for convenience in the unit tests.

This simplifies the logic in LLParser and BitcodeReader.  Because of
argument spam there are actually a few more lines of code now; I'll see
if I come up with a reasonable way to clean that up.

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

8 years agoIR: Require DICompositeType for ODR uniquing type map
Duncan P. N. Exon Smith [Tue, 19 Apr 2016 14:42:55 +0000 (14:42 +0000)]
IR: Require DICompositeType for ODR uniquing type map

Tighten up the API for debug info ODR type uniquing in LLVMContext.  The
only reason to allow other DIType subclasses is to make the unit tests
prettier :/.

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

8 years ago[InstCombine][X86] Added extra tests introduced for D17490
Simon Pilgrim [Tue, 19 Apr 2016 12:59:52 +0000 (12:59 +0000)]
[InstCombine][X86] Added extra tests introduced for D17490

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

8 years ago[InstCombine][X86] Regenerate SSE combine tests as part of setup for D17490
Simon Pilgrim [Tue, 19 Apr 2016 12:56:46 +0000 (12:56 +0000)]
[InstCombine][X86] Regenerate SSE combine tests as part of setup for D17490

Regenerated with utils/update_test_checks.py

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

8 years ago[X86][AVX2] Prefer VPERMQ/VPERMPD over VINSERTI128/VINSERTF128 for unary shuffles
Simon Pilgrim [Tue, 19 Apr 2016 12:26:40 +0000 (12:26 +0000)]
[X86][AVX2] Prefer VPERMQ/VPERMPD over VINSERTI128/VINSERTF128 for unary shuffles

Using VPERMQ/VPERMPD allows memory folding of the (repeated) input where VINSERTI128/VINSERTF128 can not.

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

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

8 years agoMinor improvement to debug output for Function Importer (NFC)
Mehdi Amini [Tue, 19 Apr 2016 09:21:30 +0000 (09:21 +0000)]
Minor improvement to debug output for Function Importer (NFC)

From: Mehdi Amini <mehdi.amini@apple.com>

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

8 years agoAdd a description for the PatchableFunction pass; NFC
Sanjoy Das [Tue, 19 Apr 2016 06:25:02 +0000 (06:25 +0000)]
Add a description for the PatchableFunction pass; NFC

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

8 years agoDisable the PatchableFunction pass for NVPTX & Wasm
Sanjoy Das [Tue, 19 Apr 2016 06:24:58 +0000 (06:24 +0000)]
Disable the PatchableFunction pass for NVPTX & Wasm

PatchableFunction requires AllVRegsAllocated that these targets don't
provide.

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

8 years agoCorrect IDF calculator for ReverseIDF
Daniel Berlin [Tue, 19 Apr 2016 06:13:28 +0000 (06:13 +0000)]
Correct IDF calculator for ReverseIDF

Summary:
Need to use predecessors for reverse graph, successors for forward graph.
succ_iterator/pred_iterator are not compatible, this patch is all the work necessary to work around that (which is what everywhere else does).  Not sure if there is a better way, so cc'ing some random folks to take a gander :)

Reviewers: dblaikie, qcolombet, echristo

Subscribers: llvm-commits

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

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

8 years ago[Orc] Disable RPC callST unit test until the S390 failures encountered during
Lang Hames [Tue, 19 Apr 2016 06:01:51 +0000 (06:01 +0000)]
[Orc] Disable RPC callST unit test until the S390 failures encountered during
http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/3459 can be
debugged/fixed.

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

8 years agoIntroduce a "patchable-function" function attribute
Sanjoy Das [Tue, 19 Apr 2016 05:24:47 +0000 (05:24 +0000)]
Introduce a "patchable-function" function attribute

Summary:
The `"patchable-function"` attribute can be used by an LLVM client to
influence LLVM's code generation in ways that makes the generated code
easily patchable at runtime (for instance, to redirect control).
Right now only one patchability scheme is supported,
`"prologue-short-redirect"`, but this can be expanded in the future.

Reviewers: joker.eph, rnk, echristo, dberris

Subscribers: joker.eph, echristo, mcrosier, llvm-commits

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

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

8 years agoIR: Rename API for enabling ODR uniquing of DITypes, NFC
Duncan P. N. Exon Smith [Tue, 19 Apr 2016 04:55:25 +0000 (04:55 +0000)]
IR: Rename API for enabling ODR uniquing of DITypes, NFC

As per David's review, rename everything in the new API for ODR type
uniquing of debug info.

    ensureDITypeMap  => enableDebugTypeODRUniquing
    destroyDITypeMap => disableDebugTypeODRUniquing
    hasDITypeMap     => isODRUniquingDebugTypes

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

8 years ago[ORC] Whitespace.
Lang Hames [Tue, 19 Apr 2016 04:44:21 +0000 (04:44 +0000)]
[ORC] Whitespace.

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

8 years ago[Orc] Tidy up some of the RPC primitives, add a unit-test for the callST
Lang Hames [Tue, 19 Apr 2016 04:43:09 +0000 (04:43 +0000)]
[Orc] Tidy up some of the RPC primitives, add a unit-test for the callST
(synchronous call) primitive.

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

8 years agoBitcodeWriter: Break recursion when enumerating Metadata, almost NFC
Duncan P. N. Exon Smith [Tue, 19 Apr 2016 03:46:51 +0000 (03:46 +0000)]
BitcodeWriter: Break recursion when enumerating Metadata, almost NFC

Use a worklist instead of recursing through MDNode operands in
ValueEnumerator.  The actual record output order has changed slightly,
but otherwise there's no functionality change.

I had to update test/Bitcode/metadata-function-blocks.ll.  I renumbered
nodes so they continue to match the implicit record ids.

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

8 years agovim: add swiftcc keyword
Saleem Abdulrasool [Tue, 19 Apr 2016 02:04:01 +0000 (02:04 +0000)]
vim: add swiftcc keyword

Update the syntax highlighting for SVN r265480.

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

8 years ago[lanai] Set boolean contentss to ZeroOrOneBooleanContent.
Jacques Pienaar [Tue, 19 Apr 2016 00:26:42 +0000 (00:26 +0000)]
[lanai] Set boolean contentss to ZeroOrOneBooleanContent.

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

8 years agoIncrease SmallVector size for ConstantUniqueMap::getHashValue() (NFC)
Mehdi Amini [Tue, 19 Apr 2016 00:17:55 +0000 (00:17 +0000)]
Increase SmallVector size for ConstantUniqueMap::getHashValue() (NFC)

This remove totally any malloc from this function on my
profile (from 155k before).

From: Mehdi Amini <mehdi.amini@apple.com>

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

8 years agoPort DemandedBits to the new pass manager.
Michael Kuperstein [Mon, 18 Apr 2016 23:55:01 +0000 (23:55 +0000)]
Port DemandedBits to the new pass manager.

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

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

8 years agoAdd missing #include, found by modules selfhost.
Richard Smith [Mon, 18 Apr 2016 23:27:25 +0000 (23:27 +0000)]
Add missing #include, found by modules selfhost.

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

8 years agoAdd missing header, found by modules selfhost.
Richard Smith [Mon, 18 Apr 2016 23:24:39 +0000 (23:24 +0000)]
Add missing header, found by modules selfhost.

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

8 years ago[libFuzzer] try to print correct time in seconds when reporting a timeout. Don't...
Kostya Serebryany [Mon, 18 Apr 2016 22:50:39 +0000 (22:50 +0000)]
[libFuzzer] try to print correct time in seconds when reporting a timeout. Don't report timeouts while still loading the corpus.

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

8 years ago[DWARF] Force a linkage_name on an inlined subprogram's abstract origin.
Paul Robinson [Mon, 18 Apr 2016 22:41:41 +0000 (22:41 +0000)]
[DWARF] Force a linkage_name on an inlined subprogram's abstract origin.

When we suppress linkage names, for a non-inlined subprogram the name
can still be found in the object-file symbol table, because we have
the code address of the subprogram.  This is not necessarily the case
for an inlined subprogram, so we still want to emit the linkage name
in the DWARF.  Put this on the abstract-origin DIE because it's common
to all inlined instances.

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

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

8 years agoRemove old DIBuilder::createFunction overload used only by dragonegg, which does...
Reid Kleckner [Mon, 18 Apr 2016 22:38:52 +0000 (22:38 +0000)]
Remove old DIBuilder::createFunction overload used only by dragonegg, which does not currently build

NFC

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

8 years agoAdd debugging to the cache pruning
Mehdi Amini [Mon, 18 Apr 2016 21:54:00 +0000 (21:54 +0000)]
Add debugging to the cache pruning

From: Mehdi Amini <mehdi.amini@apple.com>

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

8 years agoCachePruning: fix typo, we accumulate file size here, not time
Mehdi Amini [Mon, 18 Apr 2016 21:53:55 +0000 (21:53 +0000)]
CachePruning: fix typo, we accumulate file size here, not time

From: Mehdi Amini <mehdi.amini@apple.com>

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

8 years agoARM: use a pseudo-instruction for cmpxchg at -O0.
Tim Northover [Mon, 18 Apr 2016 21:48:55 +0000 (21:48 +0000)]
ARM: use a pseudo-instruction for cmpxchg at -O0.

The fast register-allocator cannot cope with inter-block dependencies without
spilling. This is fine for ldrex/strex loops coming from atomicrmw instructions
where any value produced within a block is dead by the end, but not for
cmpxchg. So we lower a cmpxchg at -O0 via a pseudo-inst that gets expanded
after regalloc.

Fortunately this is at -O0 so we don't have to care about performance. This
simplifies the various axes of expansion considerably: we assume a strong
seq_cst operation and ensure ordering via the always-present DMB instructions
rather than v8 acquire/release instructions.

Should fix the 32-bit part of PR25526.

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

8 years ago[libFuzzer] warn if the corpus is empty
Kostya Serebryany [Mon, 18 Apr 2016 21:14:11 +0000 (21:14 +0000)]
[libFuzzer] warn if the corpus is empty

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

8 years ago[X86][SSE] Test case for PR2585
Simon Pilgrim [Mon, 18 Apr 2016 21:07:49 +0000 (21:07 +0000)]
[X86][SSE] Test case for PR2585

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

8 years ago[Orc] Explicitly delete RPC::SequenceNumberManager's copy-constructor and
Lang Hames [Mon, 18 Apr 2016 20:56:22 +0000 (20:56 +0000)]
[Orc] Explicitly delete RPC::SequenceNumberManager's copy-constructor and
copy-assignment operator.

MSVC is trying to synthesize these and failing. Hopefully explicitly deleting
them will help.

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

8 years ago[Orc] Re-commit r266581 with fixes for MSVC, and format cleanups.
Lang Hames [Mon, 18 Apr 2016 19:55:43 +0000 (19:55 +0000)]
[Orc] Re-commit r266581 with fixes for MSVC, and format cleanups.

Fixes:

(1) Removes constexpr (unsupported in MSVC)
(2) Move constructors (remove explicitly defaulted ones)
(3) <future> - Add warning suppression for MSVC.

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

8 years ago[X86][AVX] Added extra memory folding tests for D19228
Simon Pilgrim [Mon, 18 Apr 2016 19:48:16 +0000 (19:48 +0000)]
[X86][AVX] Added extra memory folding tests for D19228

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

8 years agotry to make comments more meaningful; NFC
Sanjay Patel [Mon, 18 Apr 2016 19:11:57 +0000 (19:11 +0000)]
try to make comments more meaningful; NFC

Retry r266541 without the range-based-for-loop-change that was wrong.

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

8 years ago[ValueTracking] Correct lit test comments. NFC.
Chad Rosier [Mon, 18 Apr 2016 19:11:45 +0000 (19:11 +0000)]
[ValueTracking] Correct lit test comments. NFC.

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

8 years agoFix shared build of LLVMPasses.
Marcin Koscielnicki [Mon, 18 Apr 2016 19:04:19 +0000 (19:04 +0000)]
Fix shared build of LLVMPasses.

It's missing a dependency on Instrumentation (needed for
llvm::InstrProfiling::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&))

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

8 years ago[BPI] Consider deoptimize calls as "unreachable"
Sanjoy Das [Mon, 18 Apr 2016 19:01:28 +0000 (19:01 +0000)]
[BPI] Consider deoptimize calls as "unreachable"

Summary:
Calls to @llvm.experimental.deoptimize are expected to "never execute",
so optimize them as such.

Reviewers: chandlerc

Subscribers: junbuml, mcrosier, llvm-commits

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

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

8 years agolli: avoid global variables, use a local unique_ptr instead
Mehdi Amini [Mon, 18 Apr 2016 18:52:39 +0000 (18:52 +0000)]
lli: avoid global variables, use a local unique_ptr instead

There was issue with order of destruction in some cases.

From: Mehdi Amini <mehdi.amini@apple.com>

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

8 years ago[libFuzzer] add fresh openssl trophies
Kostya Serebryany [Mon, 18 Apr 2016 18:41:25 +0000 (18:41 +0000)]
[libFuzzer] add fresh openssl trophies

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

8 years agoNFC: unify clang / LLVM atomic ordering
JF Bastien [Mon, 18 Apr 2016 18:01:43 +0000 (18:01 +0000)]
NFC: unify clang / LLVM atomic ordering

This makes the C11 / C++11 *ABI* atomic ordering accessible from LLVM,
as discussed in http://reviews.llvm.org/D18200#inline-151433

This re-applies r266573 which I had reverted in r266576.

Original review: http://reviews.llvm.org/D18875

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

8 years agoAdd missing new file for r266637
Xinliang David Li [Mon, 18 Apr 2016 17:54:25 +0000 (17:54 +0000)]
Add missing new file for r266637

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

8 years agoPort InstrProfiling pass to the new pass manager
Xinliang David Li [Mon, 18 Apr 2016 17:47:38 +0000 (17:47 +0000)]
Port InstrProfiling pass to the new pass manager

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

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

8 years ago[X86][AVX] Added zero+blend vs vperm2f128 optsize tests cases (PR22984)
Simon Pilgrim [Mon, 18 Apr 2016 17:14:04 +0000 (17:14 +0000)]
[X86][AVX] Added zero+blend vs vperm2f128 optsize tests cases (PR22984)

We should be trying to use vperm2f128 instead of zero+blend (if we're only the user of zero?) when optsize is enabled.

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

8 years agoRevert r266488.
Easwaran Raman [Mon, 18 Apr 2016 17:10:17 +0000 (17:10 +0000)]
Revert r266488.

This goes with r266477 which has been  reverted.

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

8 years agoLanai: fix debug build
JF Bastien [Mon, 18 Apr 2016 16:33:41 +0000 (16:33 +0000)]
Lanai: fix debug build

There's currently no raw_ostream &operator<<(SimpleValueType); provided by LLVM. It could be added by refactoring utils/TableGen/CodeGenTarget.cpp:getEnumName, but that's much more work than fixing the build.

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

8 years ago[AMDGPU] Add insert nops pass based on subtarget features instead of cl::opt
Konstantin Zhuravlyov [Mon, 18 Apr 2016 16:28:23 +0000 (16:28 +0000)]
[AMDGPU] Add insert nops pass based on subtarget features instead of cl::opt
Also,
- Skip pass if machine module does not have debug info
- Minor comment changes
- Added test

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

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

8 years ago[X86][AVX] Renamed vperm2f128 test to make it quicker to review
Simon Pilgrim [Mon, 18 Apr 2016 16:08:19 +0000 (16:08 +0000)]
[X86][AVX] Renamed vperm2f128 test to make it quicker to review

missed one the first time round...

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

8 years ago[X86][AVX] Renamed vperm2f128 tests to make it quicker to review
Simon Pilgrim [Mon, 18 Apr 2016 15:37:45 +0000 (15:37 +0000)]
[X86][AVX] Renamed vperm2f128 tests to make it quicker to review

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

8 years agoReapply "[Coverage] Prevent detection of false instantiations in case of macro expans...
Igor Kudrin [Mon, 18 Apr 2016 15:36:30 +0000 (15:36 +0000)]
Reapply "[Coverage] Prevent detection of false instantiations in case of macro expansion."

The root of the problem was that findMainViewFileID(File, Function)
could return some ID for any given file, even though that file
was not the main file for that function.

This patch ensures that the result of this function is conformed
with the result of findMainViewFileID(Function).

This commit reapplies r266436, which was reverted by r266458,
with the .covmapping file serialized in v1 format.

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

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

8 years agoRevert "Replace the use of MaxFunctionCount module flag"
Eric Liu [Mon, 18 Apr 2016 15:31:11 +0000 (15:31 +0000)]
Revert "Replace the use of MaxFunctionCount module flag"

This reverts commit r266477.

This commit introduces cyclic dependency. This commit has "Analysis" depend on "ProfileData",
while "ProfileData" depends on "Object", which depends on "BitCode", which
depends on "Analysis".

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

8 years ago[AMDGPU][llvm-mc] s_setreg* - Fix order of operands
Artem Tamazov [Mon, 18 Apr 2016 14:54:26 +0000 (14:54 +0000)]
[AMDGPU][llvm-mc] s_setreg* - Fix order of operands

Order should match the sp3 syntax, where destination (simm16 denoting the hwreg) is coming first.

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

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

8 years agoSilence some "initialized but unused" warnings from MSVC -- the function being called...
Aaron Ballman [Mon, 18 Apr 2016 14:47:19 +0000 (14:47 +0000)]
Silence some "initialized but unused" warnings from MSVC -- the function being called is a static function, so there's no need for an instance variable. NFC.

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

8 years agoRevert 266581 (and follow-up 266588), it doesn't build on Windows.
Nico Weber [Mon, 18 Apr 2016 13:57:08 +0000 (13:57 +0000)]
Revert 266581 (and follow-up 266588), it doesn't build on Windows.

Three problems:
1. <future> can't be easily used.  If you must use it, see
   include/Support/ThreadPool.h for how.
2. constexpr problems, even after 266588.
3. Move assignment operators can't be defaulted in MSVC2013.

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

8 years agoUnbreak building unit tests on Windows after r266595.
Nico Weber [Mon, 18 Apr 2016 13:54:50 +0000 (13:54 +0000)]
Unbreak building unit tests on Windows after r266595.

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

8 years agoUnbreak building LLVMTarget on Windows after r266595.
Nico Weber [Mon, 18 Apr 2016 13:38:58 +0000 (13:38 +0000)]
Unbreak building LLVMTarget on Windows after r266595.

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

8 years agoUnbreak building llvm-pdbdump on Windows after r266595.
Nico Weber [Mon, 18 Apr 2016 13:31:31 +0000 (13:31 +0000)]
Unbreak building llvm-pdbdump on Windows after r266595.

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

8 years ago[mips][ias] Prevent double-filling of delay slots by generating '.set noreorder'...
Daniel Sanders [Mon, 18 Apr 2016 12:35:36 +0000 (12:35 +0000)]
[mips][ias] Prevent double-filling of delay slots by generating '.set noreorder' regions.

Summary:
When clang is given -save-temps or -via-file-asm, any inline assembly in
the source is parsed twice. Once by the compiler, and again by the
assembler. We must take care to ensure that this doesn't lead to
double-filling delay slots.

Reviewers: sdardis, vkalintiris

Subscribers: dsanders, sdardis, llvm-commits

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

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

8 years agoInclude SmallVector.h header in lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPri...
Eric Liu [Mon, 18 Apr 2016 12:21:59 +0000 (12:21 +0000)]
Include SmallVector.h header in lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.h

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

8 years ago[ARM] AArch32 v8 NEON is still not IEEE-754 compliant
Renato Golin [Mon, 18 Apr 2016 12:06:47 +0000 (12:06 +0000)]
[ARM] AArch32 v8 NEON is still not IEEE-754 compliant

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

8 years ago[mips][ias] Stream macro expansions to output instead of buffering them. NFC.
Daniel Sanders [Mon, 18 Apr 2016 12:06:15 +0000 (12:06 +0000)]
[mips][ias] Stream macro expansions to output instead of buffering them. NFC.

Summary:
This will allows us to eliminate some magic numbers from the offset operand of
branch instructions in favour of symbols and makes it possible to avoid
double-filling delay slots when clang is given -save-temps.

parseDirectiveCpRestore() is calling isIntegratedAssemblerRequired() for the
moment since correctly pushing the generation of these instructions into the
ELF target streamer is tricky enough to warrant a separate patch.

Reviewers: sdardis, vkalintiris

Subscribers: dsanders, llvm-commits, sdardis

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

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

8 years ago[PowerPC] add comment to test
Strahinja Petrovic [Mon, 18 Apr 2016 11:52:14 +0000 (11:52 +0000)]
[PowerPC] add comment to test

Added comment in test for soft-float operations on ppc architecture.
Test commit.

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

8 years ago[NFC] Header cleanup
Mehdi Amini [Mon, 18 Apr 2016 09:17:29 +0000 (09:17 +0000)]
[NFC] Header cleanup

Removed some unused headers, replaced some headers with forward class declarations.

Found using simple scripts like this one:
clear && ack --cpp -l '#include "llvm/ADT/IndexedMap.h"' | xargs grep -L 'IndexedMap[<]' | xargs grep -n --color=auto 'IndexedMap'

Patch by Eugene Kosov <claprix@yandex.ru>

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

From: Mehdi Amini <mehdi.amini@apple.com>

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

8 years ago[Orc] Tweak some of the new RPC code to silence a warning (extraneous ';') and
Lang Hames [Mon, 18 Apr 2016 05:22:32 +0000 (05:22 +0000)]
[Orc] Tweak some of the new RPC code to silence a warning (extraneous ';') and
MSVC errors related to constexpr.

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

8 years agoBitcodeWriter: WorkList => Worklist, NFC
Duncan P. N. Exon Smith [Mon, 18 Apr 2016 01:24:58 +0000 (01:24 +0000)]
BitcodeWriter: WorkList => Worklist, NFC

I have no idea how I chose two different spellings in the space of a
couple of weeks, but now I can't remember what to use where.  Choose
"Worklist".

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

8 years ago[ORC] Generalize the ORC RPC utils to support RPC function return values and
Lang Hames [Mon, 18 Apr 2016 01:06:49 +0000 (01:06 +0000)]
[ORC] Generalize the ORC RPC utils to support RPC function return values and
asynchronous call/handle. Also updates the ORC remote JIT API to use the new
scheme.

The previous version of the RPC tools only supported void functions, and
required the user to manually call a paired function to return results. This
patch replaces the Procedure typedef (which only supported void functions) with
the Function typedef which supports return values, e.g.:

  Function<FooId, int32_t(std::string)> Foo;

The RPC primitives and channel operations are also expanded. RPC channels must
support four new operations: startSendMessage, endSendMessage,
startRecieveMessage and endRecieveMessage, to handle channel locking. In
addition, serialization support for tuples to RPCChannels is added to enable
multiple return values.

The RPC primitives are expanded from callAppend, call, expect and handle, to:

appendCallAsync - Make an asynchronous call to the given function.

callAsync - The same as appendCallAsync, but calls send on the channel when
            done.

callSTHandling - Blocking call for single-threaded code. Wraps a call to
                 callAsync then waits on the result, using a user-supplied
                 handler to handle any callbacks from the remote.

callST - The same as callSTHandling, except that it doesn't handle
         callbacks - it expects the result to be the first return.

expect and handle - as before.

handleResponse - Handle a response from the remote.

waitForResult - Wait for the response with the given sequence number to arrive.

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

8 years agoLinker: Share a single Metadata map for the lifetime of IRMover
Duncan P. N. Exon Smith [Sun, 17 Apr 2016 23:30:31 +0000 (23:30 +0000)]
Linker: Share a single Metadata map for the lifetime of IRMover

Cache the result of mapping metadata nodes between instances of IRLinker
(i.e., for the lifetime of IRMover).  There shouldn't be any real
functional change here, but this should give a major speedup.  I had
loaned this to Mehdi when he tested performance of r266446, and the two
patches together gave a 10x speedup in metadata mapping.

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

8 years ago[X86] Be explicit about calls to setOperationAction for AVX2 and AVX512 rather than...
Craig Topper [Sun, 17 Apr 2016 22:49:46 +0000 (22:49 +0000)]
[X86] Be explicit about calls to setOperationAction for AVX2 and AVX512 rather than just looping over all vector types and conditinally matching them. NFC

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

8 years agoRevert "NFC: unify clang / LLVM atomic ordering"
JF Bastien [Sun, 17 Apr 2016 21:29:01 +0000 (21:29 +0000)]
Revert "NFC: unify clang / LLVM atomic ordering"

This reverts commit 537951f2f16d6a8542571c7722fcbae07d4e62c2.

Causes an assert in:
  test/Transforms/AtomicExpand/SPARC/libcalls.ll
  (Ordering2 != AtomicOrdering::NotAtomic && "expect atomic MO")

Bot:
  http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check/21724/testReport/junit/LLVM/Transforms_AtomicExpand_SPARC/libcalls_ll/

I'm not getting this assert on my local debug build, but I'll revert
just to be sure.

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

8 years agoNFC: unify clang / LLVM atomic ordering
JF Bastien [Sun, 17 Apr 2016 21:00:57 +0000 (21:00 +0000)]
NFC: unify clang / LLVM atomic ordering

Summary: This makes the C11 / C++11 *ABI* atomic ordering accessible from LLVM, as discussed in http://reviews.llvm.org/D18200#inline-151433

Reviewers: jyknight, reames

Subscribers: llvm-commits

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

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

8 years agoWhen building with LLVM_ENABLE_MODULES, put the module cache into the build
Richard Smith [Sun, 17 Apr 2016 20:58:01 +0000 (20:58 +0000)]
When building with LLVM_ENABLE_MODULES, put the module cache into the build
directory. This is important for build bots to avoid filling up /tmp.

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

8 years agoTransforms: Try harder to fix bootstrap after r266565
Duncan P. N. Exon Smith [Sun, 17 Apr 2016 20:11:09 +0000 (20:11 +0000)]
Transforms: Try harder to fix bootstrap after r266565

This catches two nullptr insertions into the ValueMap I missed in
r266567.  I missed CloneFunction becuase it never calls RemapInstruction
directly.  Here's one of the still-failing bots:
  http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/11496

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

8 years agoLinker: Don't double-schedule appending variables
Duncan P. N. Exon Smith [Sun, 17 Apr 2016 19:40:20 +0000 (19:40 +0000)]
Linker: Don't double-schedule appending variables

Add an assertion to ValueMapper that prevents double-scheduling of
GlobalValues to remap, and fix the one place it happened.  There are
tons of tests that fail with this assertion in place and without the
code change, so I'm not adding another.

Although it looks related, r266563 was, indeed, removing dead code.
AFAICT, this cross-file double-scheduling started in r266510 when the
cross-file recursion was removed.

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

8 years ago[ParallelCG] SmallVector<char> -> SmallString.
Davide Italiano [Sun, 17 Apr 2016 19:38:57 +0000 (19:38 +0000)]
[ParallelCG] SmallVector<char> -> SmallString.

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

8 years agoTransforms: Fix bootstrap after r266565
Duncan P. N. Exon Smith [Sun, 17 Apr 2016 19:26:49 +0000 (19:26 +0000)]
Transforms: Fix bootstrap after r266565

Apparently there isn't test coverage for all of these.  I'd appreciate
if someone with could reproduce and send me something to reduce, but for
now I've just looked for users of RemapInstruction and MapValue and
ensured they don't accidentally insert nullptr.  Here is one of the
bootstraps that caught:

  http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/11494

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

8 years agoFix a use after move.
Rafael Espindola [Sun, 17 Apr 2016 18:56:49 +0000 (18:56 +0000)]
Fix a use after move.

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

8 years agoValueMapper: Don't allow explicit null mappings of Values, NFC
Duncan P. N. Exon Smith [Sun, 17 Apr 2016 18:53:24 +0000 (18:53 +0000)]
ValueMapper: Don't allow explicit null mappings of Values, NFC

As a follow-up to r123058, assert that there are no null mappings in the
ValueMap instead of just ignoring them when they are there.  There were
a couple of accidental insertions in CloneFunction so I cleaned those up
(caught by testcases).

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

8 years agoKeep only the splitCodegen version that takes a factory.
Rafael Espindola [Sun, 17 Apr 2016 18:42:27 +0000 (18:42 +0000)]
Keep only the splitCodegen version that takes a factory.

This makes it much easier to see that all created TargetMachines are
equivalent.

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

8 years agoIRMover: Remove dead code, NFC
Duncan P. N. Exon Smith [Sun, 17 Apr 2016 18:21:47 +0000 (18:21 +0000)]
IRMover: Remove dead code, NFC

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

8 years agoDeclare MVT::SimpleValueType as an int8_t sized enum. This removes 400 bytes from...
Craig Topper [Sun, 17 Apr 2016 17:37:33 +0000 (17:37 +0000)]
Declare MVT::SimpleValueType as an int8_t sized enum. This removes 400 bytes from TargetLoweringBase and probably other places.

This required changing several places to print VT enums as strings instead of raw ints since the proper method to use to print became ambiguous. This is probably an improvement anyway.

This also appears to save ~8K from an x86 self host build of llc.

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

8 years ago[X86][SSE] Added 16i8 -> 8i64 sext test
Simon Pilgrim [Sun, 17 Apr 2016 15:10:42 +0000 (15:10 +0000)]
[X86][SSE] Added 16i8 -> 8i64 sext test

Shows poor codegen for AVX2

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

8 years ago[X86] Added TODO comment for target shuffle mask decoding of bitcasted masks
Simon Pilgrim [Sun, 17 Apr 2016 11:34:18 +0000 (11:34 +0000)]
[X86] Added TODO comment for target shuffle mask decoding of bitcasted masks

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

8 years ago[X86] Remove unneeded variables
Asaf Badouh [Sun, 17 Apr 2016 08:28:40 +0000 (08:28 +0000)]
[X86] Remove unneeded variables

no functional change.
ExtraLoad and WrapperKind are been used only if (OpFlags == X86II::MO_GOTPCREL).

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

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

8 years ago[AVX512] ISD::MUL v2i64/v4i64 should only be legal if DQI and VLX features are enabled.
Craig Topper [Sun, 17 Apr 2016 07:25:39 +0000 (07:25 +0000)]
[AVX512] ISD::MUL v2i64/v4i64 should only be legal if DQI and VLX features are enabled.

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

8 years agoIR: Fix type-refs in testcase from r266548
Duncan P. N. Exon Smith [Sun, 17 Apr 2016 06:42:30 +0000 (06:42 +0000)]
IR: Fix type-refs in testcase from r266548

There's a hole in the verifier right now: if a module has no compile
units, it never checks that all the string-based DITypeRefs get
resolved.  As a result, this testcase didn't fail the verifier, even
there were references to `!"has-uuid"` instead of `!"uuid"` (the former
was a composite type's 'name:' field, the latter its 'identifier:'
field).

I'm currently working on removing string-based type refs entirely, and
this testcase started failing (because the upgrade script can't resolve
the type refs).  Rather than fixing the (about-to-be-removed) hole in
the verifier, I'm just going to fix the test so that my upgrade script
handles it.

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

8 years agoIR: Use getRawScope() when verifying
Duncan P. N. Exon Smith [Sun, 17 Apr 2016 05:41:09 +0000 (05:41 +0000)]
IR: Use getRawScope() when verifying

Fix a couple of places in the Verifier that call `getScope()` instead of
`getRawScope()`.  Both DIDerivedType::getScope and
DICompositeType::getScope return a DITypeRef right now (which wraps a
Metadata*) so I don't think there's currently an observable bug.  I
found this because a future commit that will change them to cast to
DIScope*.

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

8 years agoFix a typo in rL265762
Sanjoy Das [Sun, 17 Apr 2016 04:30:43 +0000 (04:30 +0000)]
Fix a typo in rL265762

I accidentally replaced `mayBeOverridden` with `!isInterposable`.
Remove the negation and add a test case that would've caught this.

Many thanks to HÃ¥kan Hjort for spotting this!

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

8 years agoRevert "use range loop, try to make comments more meaningful; NFCI"
Duncan P. N. Exon Smith [Sun, 17 Apr 2016 03:59:37 +0000 (03:59 +0000)]
Revert "use range loop, try to make comments more meaningful; NFCI"

This reverts commit r266541 since it introduces a use-after-free:
  http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap/builds/11471

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

8 years agoIR: Use an explicit map for debug info type uniquing
Duncan P. N. Exon Smith [Sun, 17 Apr 2016 03:58:21 +0000 (03:58 +0000)]
IR: Use an explicit map for debug info type uniquing

Rather than relying on the structural equivalence of DICompositeType to
merge type definitions, use an explicit map on the LLVMContext that
LLParser and BitcodeReader consult when constructing new nodes.
Each non-forward-declaration DICompositeType with a non-empty
'identifier:' field is stored/loaded from the type map, and the first
definiton will "win".

This map is opt-in: clients that expect ODR types from different modules
to be merged must call LLVMContext::ensureDITypeMap.

  - Clients that just happen to load more than one Module in the same
    LLVMContext won't magically merge types.

  - Clients (like LTO) that want to continue to merge types based on ODR
    identifiers should opt-in immediately.

I have updated LTOCodeGenerator.cpp, the two "linking" spots in
gold-plugin.cpp, and llvm-link (unless -disable-debug-info-type-map) to
set this.

With this in place, it will be straightforward to remove the DITypeRef
concept (i.e., referencing types by their 'identifier:' string rather
than pointing at them directly).

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

8 years agoIR: Use ODR to unique DICompositeType members
Duncan P. N. Exon Smith [Sun, 17 Apr 2016 02:30:20 +0000 (02:30 +0000)]
IR: Use ODR to unique DICompositeType members

Merge members that are describing the same member of the same ODR type,
even if other bits differ.  If the file or line differ, we don't care;
if anything else differs, it's an ODR violation (and we still don't
really care).

For DISubprogram declarations, this looks at the LinkageName and Scope.
For DW_TAG_member instances of DIDerivedType, this looks at the Name and
Scope.  In both cases, we know that the Scope follows ODR rules if it
has a non-empty identifier.

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

8 years ago[Target] Reduce size of the LoadExtActions array in TargetLoweringBase by half. Savin...
Craig Topper [Sun, 17 Apr 2016 01:34:37 +0000 (01:34 +0000)]
[Target] Reduce size of the LoadExtActions array in TargetLoweringBase by half. Saving ~18K bytes from the array.

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

8 years ago[Target] Remove checks for Simple VTs before calling routines that can handle Extende...
Craig Topper [Sun, 17 Apr 2016 01:34:35 +0000 (01:34 +0000)]
[Target] Remove checks for Simple VTs before calling routines that can handle Extended VTs too. NFC

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

8 years ago[Target] Fix an assertion that should have been updated when the code below it was...
Craig Topper [Sun, 17 Apr 2016 01:34:32 +0000 (01:34 +0000)]
[Target] Fix an assertion that should have been updated when the code below it was changed in r251033.

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

8 years agoLangRef: Removed some outdated text about DIDerivedType
Duncan P. N. Exon Smith [Sun, 17 Apr 2016 00:45:00 +0000 (00:45 +0000)]
LangRef: Removed some outdated text about DIDerivedType

This text is also incorrect (much like r266540).  It looks like I missed
updating some of what I moved from SourceLevelDebugging.rst in r232566.

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

8 years agoLinker: Clarify test/Linker/type-unique-odr-a.ll, NFC
Duncan P. N. Exon Smith [Sun, 17 Apr 2016 00:26:17 +0000 (00:26 +0000)]
Linker: Clarify test/Linker/type-unique-odr-a.ll, NFC

Split up the long RUN and clarify the CHECK lines:

  - Explicitly confirm there are no other subprograms inside of "A".

  - Remove checks for "bar" and "baz", which were just implicitly
    checking that there were no other subprograms inside of "A".

This prepares for adding a RUN line which links the two files in the
opposite direction.

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

8 years agoIR: Add a configuration point for MDNodeInfo::isEqual, NFC
Duncan P. N. Exon Smith [Sat, 16 Apr 2016 23:42:04 +0000 (23:42 +0000)]
IR: Add a configuration point for MDNodeInfo::isEqual, NFC

This commit has no functionality change, but it adds a configuration
point for MDNodeInfo::isEqual to allow custom uniquing of subclasses of
MDNode, minimizing the diff of a follow-up.

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

8 years agouse range loop, try to make comments more meaningful; NFCI
Sanjay Patel [Sat, 16 Apr 2016 23:26:16 +0000 (23:26 +0000)]
use range loop, try to make comments more meaningful; NFCI

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

8 years agoLangRef: Fix some bugs in debug info descriptions
Duncan P. N. Exon Smith [Sat, 16 Apr 2016 22:46:47 +0000 (22:46 +0000)]
LangRef: Fix some bugs in debug info descriptions

Fix descriptions of DICompositeType and DIDerivedType.

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