130675 Commits

Author SHA1 Message Date
Brendon Cahoon
4455a132ce [DependenceAnalysis] Refactor uses of getConstantPart. NFC.
Rather than checking for the SCEV type prior to calling
getContantPart, perform the checks in the function. This reduces
the number of places where the checks are needed.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266759 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-19 16:46:57 +00:00
Mehdi Amini
12cc10fde1 Fix Gold test after r266750 (ModuleLinker: Do not import linkonce/weak as "external_weak")
From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266752 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-19 16:21:37 +00:00
Duncan P. N. Exon Smith
64d3314d1a 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
2016-04-19 16:17:48 +00:00
Mehdi Amini
5c025fc0a6 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
2016-04-19 16:11:05 +00:00
Duncan P. N. Exon Smith
75cc051139 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
2016-04-19 16:06:50 +00:00
Teresa Johnson
9507885b18 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
2016-04-19 15:48:30 +00:00
Duncan P. N. Exon Smith
511eb032bb 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
2016-04-19 14:55:09 +00:00
Duncan P. N. Exon Smith
ef55fa5ba5 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
2016-04-19 14:42:55 +00:00
Simon Pilgrim
ee5f5d934b [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
2016-04-19 12:59:52 +00:00
Simon Pilgrim
153162f4b6 [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
2016-04-19 12:56:46 +00:00
Simon Pilgrim
580e952c7e [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
2016-04-19 12:26:40 +00:00
Mehdi Amini
82f54f86a5 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
2016-04-19 09:21:30 +00:00
Sanjoy Das
a1ff4a6198 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
2016-04-19 06:25:02 +00:00
Sanjoy Das
07f6d807bc 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
2016-04-19 06:24:58 +00:00
Daniel Berlin
4c8f9b3334 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
2016-04-19 06:13:28 +00:00
Lang Hames
3bf6fb9d27 [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
2016-04-19 06:01:51 +00:00
Sanjoy Das
151328540e 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
2016-04-19 05:24:47 +00:00
Duncan P. N. Exon Smith
2663f35684 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
2016-04-19 04:55:25 +00:00
Lang Hames
4576e07c30 [ORC] Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266712 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-19 04:44:21 +00:00
Lang Hames
ffdeef411b [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
2016-04-19 04:43:09 +00:00
Duncan P. N. Exon Smith
1372f53650 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
2016-04-19 03:46:51 +00:00
Saleem Abdulrasool
decc22f16d 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
2016-04-19 02:04:01 +00:00
Jacques Pienaar
1fe6695065 [lanai] Set boolean contentss to ZeroOrOneBooleanContent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266701 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-19 00:26:42 +00:00
Mehdi Amini
c3a95b9cae 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
2016-04-19 00:17:55 +00:00
Michael Kuperstein
3445cc7801 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
2016-04-18 23:55:01 +00:00
Richard Smith
19c0ba5178 Add missing #include, found by modules selfhost.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266697 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-18 23:27:25 +00:00
Richard Smith
d5d6cc9562 Add missing header, found by modules selfhost.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266696 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-18 23:24:39 +00:00
Kostya Serebryany
d3f038dc3e [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
2016-04-18 22:50:39 +00:00
Paul Robinson
2bb2fc9be7 [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
2016-04-18 22:41:41 +00:00
Reid Kleckner
4917541593 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
2016-04-18 22:38:52 +00:00
Mehdi Amini
0224d5ce63 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
2016-04-18 21:54:00 +00:00
Mehdi Amini
a2ea8f5e75 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
2016-04-18 21:53:55 +00:00
Tim Northover
97c0826552 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
2016-04-18 21:48:55 +00:00
Kostya Serebryany
37e715dc57 [libFuzzer] warn if the corpus is empty
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266670 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-18 21:14:11 +00:00
Simon Pilgrim
0162d62f31 [X86][SSE] Test case for PR2585
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266669 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-18 21:07:49 +00:00
Lang Hames
a6af3574e1 [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
2016-04-18 20:56:22 +00:00
Lang Hames
6320b788a2 [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
2016-04-18 19:55:43 +00:00
Simon Pilgrim
9fac7e29e8 [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
2016-04-18 19:48:16 +00:00
Sanjay Patel
dc8be91d13 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
2016-04-18 19:11:57 +00:00
Chad Rosier
093fece1f7 [ValueTracking] Correct lit test comments. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266657 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-18 19:11:45 +00:00
Marcin Koscielnicki
31068d57c7 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
2016-04-18 19:04:19 +00:00
Sanjoy Das
7f8cd41782 [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
2016-04-18 19:01:28 +00:00
Mehdi Amini
14e400843e 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
2016-04-18 18:52:39 +00:00
Kostya Serebryany
d8fa185e03 [libFuzzer] add fresh openssl trophies
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266649 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-18 18:41:25 +00:00
JF Bastien
1b711b23e2 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
2016-04-18 18:01:43 +00:00
Xinliang David Li
cc76a0c46e Add missing new file for r266637
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266639 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-18 17:54:25 +00:00
Xinliang David Li
6be977abce 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
2016-04-18 17:47:38 +00:00
Simon Pilgrim
ed7bef54d2 [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
2016-04-18 17:14:04 +00:00
Easwaran Raman
e9b1c6efef 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
2016-04-18 17:10:17 +00:00
JF Bastien
c6f7492fbb 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
2016-04-18 16:33:41 +00:00