Commit Graph

129114 Commits

Author SHA1 Message Date
Justin Bogner
ce3a62bee8 FAQ: We require GCC 4.7 - nobody's asking about build failures with 3.3.2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264139 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-23 06:38:53 +00:00
Vedant Kumar
4b4e6ab6be [docs] Fix typo in ProgrammersManual.rst
Patch by Miod Vallat!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264138 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-23 05:18:50 +00:00
Valery Pykhtin
7c2672b778 [AMDGPU] Fix missing assembler predicates.
Differential Revision: http://reviews.llvm.org/D18351

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264137 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-23 04:27:26 +00:00
Lang Hames
3821992393 [Docs] Clarify boolean conversion for Error and Expected<T> in the Programmer's
Manual.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264135 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-23 03:18:16 +00:00
Sanjoy Das
ab71fdec0a Remove stale comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264131 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-23 02:28:35 +00:00
Sanjoy Das
613b7c3337 [StatepointLowering] Don't do two DenseMap lookups; nfci
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264130 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-23 02:24:15 +00:00
Sanjoy Das
df46390b38 [StatepointLowering] Minor NFC cleanups
- Use auto
 - Name variables in LLVM style
 - Use llvm::find instead of std::find
 - Blank lines between declarations

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264129 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-23 02:24:13 +00:00
Sanjoy Das
0479e1aad2 [StatepointLowering] Minor nfc refactoring
Now that StatepointLoweringInfo represents base pointers, derived
pointers and gc relocates as SmallVectors and not ArrayRefs, we no
longer need to allocate "backing storage" on stack in LowerStatepoint.
So elide the backing storage, and inline the trivial body of
getIncomingStatepointGCValues.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264128 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-23 02:24:10 +00:00
Sanjoy Das
5fb8106b47 [StatepointLowering] Schedule gc relocates before uniqueing them
Otherwise we can see an "unexpected" gc.relocate that we uniqued away.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264127 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-23 02:24:07 +00:00
Tom Stellard
835c01151e AMDGPU: Cache information about register pressure sets
We can statically decide whether or not a register pressure set is for
SGPRs or VGPRs, so we don't need to re-compute this information in
SIRegisterInfo::getRegPressureSetLimit().

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264126 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-23 01:53:22 +00:00
Junmo Park
1da710de1f Minor code cleanup. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264124 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-23 01:38:35 +00:00
Davide Italiano
11e71d65b2 [ModuleUtils] Use range-based loop. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264122 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-23 00:43:35 +00:00
Sean Silva
1495b908cb [docs] Use reST link.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264121 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-23 00:31:21 +00:00
Sean Silva
00b768bfef Bring back Makefile.sphinx
It is not part of autoconf and should not have been removed in r258861.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264120 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-23 00:30:57 +00:00
Sean Silva
806688c673 [docs] Clarify the sense of --compile-command
In retrospect, it seems "obvious" that the sense of the return code is
the same as if it crashed on "interesting" inputs. But that didn't stop
me from spending more time than I care to admit verifying this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264119 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-23 00:25:13 +00:00
Joerg Sonnenberger
c8740297ca Typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264110 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-22 22:24:52 +00:00
Justin Bogner
6d476e60b2 MC: Don't access the filesystem in MCContext's constructor
MCContext shouldn't be accessing the filesystem - that's a gross
layering violation and makes it awkward to use as a library or in a
daemon where it may not even be allowed filesystem access.

The CWD lookup here is normally redundant anyway, since the calling
context either also looks up the CWD or sets this to something more
specific. Here, we fix up the one caller that doesn't already set up a
debug compilation dir and make it clear that the responsibility for
such set up is in the users of MCContext.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264109 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-22 22:24:29 +00:00
Justin Lebar
f7ed584658 [NVVM] Remove noduplicate attribute from synchronizing intrinsics.
Summary:
I've completed my audit of all the code that looks at noduplicate and
added handling of convergent where appropriate, so we no longer need
noduplicate on these intrinsics.

Reviewers: jholewinski

Subscribers: llvm-commits, jholewinski

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264107 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-22 22:08:01 +00:00
Rafael Espindola
a8fd65832a Drop comdats from the dst module if they are not selected.
A really unfortunate design of llvm-link and related libraries is that
they operate one module at a time.

This means they can copy a GV to the destination module that should not
be there in the final result because a later bitcode file takes
precedence.

We already handled cases like a strong GV replacing a weak for example.

One case that is not currently handled is a comdat replacing another.
This doesn't happen in ELF, but with COFF largest selection kind it is
possible.

In "llvm-link a.ll b.ll" if the selected comdat was from a.ll,
everything will work and we will not copy the comdat from b.ll.

But if we run "llvm-link b.ll a.ll", we fail to delete the already
copied comdat from b.ll. This patch fixes that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264103 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-22 21:35:47 +00:00
George Burgess IV
58cad7988f Keep CodeGenPrepare from preserving the domtree.
CGP modifies the domtree in some cases, so saying that it preserves the
domtree is a lie. We'll be able to selectively preserve it with the new
pass manager.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264099 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-22 21:25:08 +00:00
Matthias Braun
a31e891389 Revert "Support arbitrary addrspace pointers in masked load/store intrinsics"
This commit broke LTO builds. Reverting it to unbreak the bots while the
issue is investigated. See also:

http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160321/341002.html

This reverts r263158

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264088 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-22 20:24:34 +00:00
Simon Pilgrim
e74069e335 [X86][AVX] Added AVX1 tests for 256-bit vector idiv-by-constant
Prep work based on feedback for D18307 

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264086 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-22 20:10:49 +00:00
Simon Pilgrim
4ec7162ead [SelectionDAG] Ensure constant folded legalized vector element types are compatible with the BUILD_VECTOR type
Found during fuzz testing - 32-bit x86 targets were legalizing a <2 x i1> compare result to <2 x i32> when <2 x i64> was expected.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264085 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-22 19:59:53 +00:00
Tim Northover
7561ec8b4b CodeGen: check return types match when emitting tail call to builtin.
We were just completely ignoring the types when determining whether we could
safely emit a libcall as a tail call. This is clearly wrong.

Theoretically, we could dig deeper looking for incidental matches (much like
the generic code in Analysis.cpp does), but it's probably not worth it for the
few libcalls that exist.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264084 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-22 19:14:38 +00:00
Sanjoy Das
e6f4276ebb Remove unnecessary branch from test
(Addresses post commit review by Reid Kleckner)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264083 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-22 18:45:41 +00:00
Adam Nemet
0645f68799 [LoopVersioning] Relax an assert for LCSSA PHIs
When you have multiple LCSSA (single-operand) PHIs that are converted
into two-operand PHIs due to versioning, only assert that the PHI
currently being converted has a single operand.  I.e. we don't want to
check PHIs that were converted earlier in the loop.

Fixes PR27023.

Thanks to Karl-Johan Karlsson for the minimized testcase!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264081 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-22 18:38:15 +00:00
Sanjoy Das
340dafa6bd Allow lowering call sites with both funclets and deopt state
Lowering funclets is a no-op, so we can just go ahead and lower the
deopt state.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264078 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-22 18:10:39 +00:00
Dan Gohman
35d7235fd8 [WebAssembly] Implement the rotate instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264076 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-22 18:01:49 +00:00
Sanjoy Das
0a4f1f9b9d Add a hasOperandBundlesOtherThan helper, and use it; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264072 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-22 17:51:25 +00:00
Simon Pilgrim
67edb4c4ef [X86][SSE] Reapplied: Simplify vector LOAD + EXTEND on pre-SSE41 hardware
Improve vector extension of vectors on hardware without dedicated VSEXT/VZEXT instructions.

We already convert these to SIGN_EXTEND_VECTOR_INREG/ZERO_EXTEND_VECTOR_INREG but can further improve this by using the legalizer instead of prematurely splitting into legal vectors in the combine as this only properly helps for lowering to VSEXT/VZEXT.

Removes a lot of unnecessary any_extend + mask pattern - (Fix for PR25718).

Reapplied with a fix for PR26953 (missing vector widening legalization).

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264062 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-22 16:22:08 +00:00
Vedant Kumar
a9e82b41a3 [unittests] clang-format a line, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264059 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-22 15:14:18 +00:00
Daniel Sanders
36aa21137b [mips] Make simm6 consistent with the rest. NFC.
Summary:

Reviewers: vkalintiris

Subscribers: dsanders, llvm-commits

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264057 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-22 14:50:22 +00:00
Daniel Sanders
7dc891bfa4 [mips] Range check simm7.
Summary:
Also renamed li_simm7 to li16_imm since it's not a simm7 and has an unusual
encoding (it's a uimm7 except that 0x7f represents -1).

Reviewers: vkalintiris

Subscribers: dsanders, llvm-commits

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264056 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-22 14:40:00 +00:00
Daniel Sanders
149ab53180 [mips] Range check simm5.
Summary:
We can't check the error message for this one because there's another lw/sw
available that covers a larger range. We therefore check the transition
between the two sizes.

Reviewers: vkalintiris

Subscribers: llvm-commits, dsanders

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264054 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-22 14:29:53 +00:00
Daniel Sanders
c0e5ca9c1c [mips] Range check vsplat_uimm[1234568].
Summary:

Reviewers: vkalintiris

Subscribers: dsanders, llvm-commits

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264053 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-22 14:17:41 +00:00
Daniel Sanders
e3f4c39d8d [mips] Range check uimm4_ptr, remove uimm6_ptr, and use correctly sized immediates in MSA copy/insert.
Reviewers: vkalintiris

Subscribers: dsanders, llvm-commits

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264052 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-22 13:58:53 +00:00
Zinovy Nis
047a636bab [PATCH] Force LoopReroll to reset the loop trip count value after reroll.
It's a bug fix. 
For rerolled loops SE trip count remains unchanged. It leads to incorrect work of the next passes.
My patch just resets SE info for rerolled loop forcing SE to re-evaluate it next time it requested.
I also added a verifier call in the exisitng test to be sure no invalid SE data remain. Without my fix this test would fail with -verify-scev.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264051 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-22 13:50:57 +00:00
Marina Yatsina
02b7dd6f82 [ELF][gcc compatibility]: support section names with special characters (e.g. "/")
Adding support for section names with special characters in them (e.g. "/").
GCC successfully compiles such section names.
This also fixes PR24520.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264038 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-22 11:23:15 +00:00
Mehdi Amini
d4501fffa8 Fix unittests: resize() -> reserve()
From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264029 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-22 07:35:51 +00:00
Mehdi Amini
ba3fe48d48 Rename DenseMap::resize() into DenseMap::reserve() (NFC)
This is more coherent with usual containers.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264026 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-22 07:20:00 +00:00
Junmo Park
f04d589b26 Minor code cleanup. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264024 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-22 04:37:32 +00:00
Sanjoy Das
2576216f6c Appease the windows buildbots
The guess is that the stdout/stderr ordering may differ between windows
/ unix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264019 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-22 02:11:57 +00:00
Sanjoy Das
1ceb821951 Add "first class" lowering for deopt operand bundles
Summary:
After this change, deopt operand bundles can be lowered directly by
SelectionDAG into STATEPOINT instructions (which are then lowered to a
call or sequence of nop, with an associated __llvm_stackmaps entry0.
This obviates the need to round-trip deoptimization state through
gc.statepoint via RewriteStatepointsForGC.

Reviewers: reames, atrick, majnemer, JosephTremoulet, pgavlin

Subscribers: sanjoy, mcrosier, majnemer, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264015 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-22 00:59:13 +00:00
Mike Aizatsky
668a12461d [sancov] do not instrument nodes that are full pre-dominators
Summary:
Without tree pruning clang has 2,667,552 points.
Wiht only dominators pruning: 1,515,586.
With both dominators & predominators pruning: 1,340,534.

Resubmit of r262103.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264003 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-21 23:08:16 +00:00
Justin Lebar
9dd6a5392f [CUDA] Add documentation explaining how to detect clang vs nvcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264002 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-21 23:05:15 +00:00
Nicolai Haehnle
3f4c92194f AMDGPU: Fix dangling references introduced by r263982
Fixes Valgrind errors on the test cases that were reported as failing
by buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264000 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-21 22:54:02 +00:00
Simon Pilgrim
752e5f9178 [InstCombine] Ensure all undef operands are handled before binary instruction constant folding
As noted in PR18355, this patch makes it clear that all cases with undef operands have been handled before further constant folding is attempted.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263994 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-21 22:15:50 +00:00
Duncan P. N. Exon Smith
814be6ba00 Fix -Wdocumentation warnings from r263853
Thanks to chapuni for catching this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263993 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-21 22:13:44 +00:00
George Burgess IV
127a8ddf85 [MemorySSA] Consider def-only BBs for live-in calculations.
If we have a BB with only MemoryDefs, live-in calculations will ignore
it. This means we get results like this:

define void @foo(i8* %p) {
  ; 1 = MemoryDef(liveOnEntry)
  store i8 0, i8* %p
  br i1 undef, label %if.then, label %if.end

if.then:
  ; 2 = MemoryDef(1)
  store i8 1, i8* %p
  br label %if.end

if.end:
  ; 3 = MemoryDef(1)
  store i8 2, i8* %p
  ret void
}

...When there should be a MemoryPhi in the `if.end` BB.

This patch fixes that behavior.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263991 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-21 21:25:39 +00:00
Krzysztof Parzyszek
4a0d91478f Remove leftover options from multiline.ll
I added -march=hexagon to force using Hexagon target when testing
locally, and I forgot to take it out.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263990 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-21 21:25:01 +00:00