Commit Graph

127293 Commits

Author SHA1 Message Date
Adrian Prantl
e56d199eb3 Relax assertion in ReplaceableMetadataImpl::replaceAllUsesWith().
There is a legitimate use-case in clang where we need to replace a
temporary placeholder node with the temporary node that may be a
forward declaration.

<rdar://problem/24493203>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259973 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-06 01:56:55 +00:00
David Blaikie
2060375d7c [llvm-dwp] Merge cu_index from DWPs
This is almost feature complete - just missing tu_index merging now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259971 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-06 01:15:26 +00:00
Lang Hames
8192ebb6c0 [Orc] Slightly improve the x86-64 resolver block machine code.
Replace leaq + movq of a pointer with a single movabsq.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259968 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-06 00:55:08 +00:00
Richard Smith
0f73f7ad3b llvm-bcanalyzer: Produce summary information for the BLOCKINFO block, it can be
a significant fraction of the file size (for files that otherwise have few
records). Also include an average size per record in the summary information.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259965 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-06 00:46:09 +00:00
George Burgess IV
04de74cc79 Add note of suboptimal behavior in MemorySSA. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259963 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-06 00:42:52 +00:00
Evandro Menezes
57346be4e2 [AArch64] Add the scheduling model for Exynos-M1
Summary:
Add the core scheduling model for the Samsung Exynos-M1 (ARMv8-A).


Reviewers: jmolloy, rengolin, christof, MinSeongKIM, t.p.northover

Subscribers: aemerson, rengolin, MatzeB

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259958 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-06 00:01:41 +00:00
Sanjoy Das
0ba13f53fe [StatepointLower] Use None instead of Optional<int>()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259956 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 23:40:04 +00:00
Eric Christopher
db58ab3208 Make the OCaml tests temporarily unsupported until they can be updated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259954 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 23:28:03 +00:00
Lang Hames
88ea047fdc [Orc] Fix a typo in the comments for the x86_64 resolver block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259953 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 23:27:48 +00:00
Xinliang David Li
412cc8ade2 Variable naming style fix /nfc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259952 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 23:24:42 +00:00
Richard Smith
8ed60ab661 Attempt#2 to work around MSVC rejects-valid.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259948 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 23:05:09 +00:00
Richard Smith
60858584f0 Attempt to work around an MSVC rejects-valid. Apparently it gets the access
check wrong when inheriting a member through two levels of private inheritance,
where the middle one is a class template specialization.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259943 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 22:48:19 +00:00
Richard Smith
2597d07f15 More workarounds for undefined behavior exposed when compiling in C++14 with
-fsized-deallocation. Disable sized deallocation for all objects derived from
TrailingObjects, as we expect the storage allocated for these objects to be
larger than the size of their dynamic type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259942 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 22:32:52 +00:00
Xinliang David Li
165b22a2ae [PGO] Speed up name tab reading
The change allows skipping duplicate strings
 early to avoid redundant md5 computation and
 string copying/swapping. 





git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259941 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 22:32:01 +00:00
Davide Italiano
b9f7c71bb9 [llvm-nm] Prefer empty() over size() == 0.
Thanks to David Blaikie for pointing this out!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259938 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 22:10:42 +00:00
Davide Italiano
48d378b115 [llvm-nm] Transform a switch() statement in a pair of if(s).
This is more uniform wrt what other tools do and makes the code
a little bit more readable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259937 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 22:07:09 +00:00
Davide Italiano
409c5545b1 [llvm-nm] Simplify code logic. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259917 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 21:10:48 +00:00
Hans Wennborg
a1b78524c8 CallAnalyzer::analyzeCall: change the condition back to "Cost < Threshold"
In r252595, I inadvertently changed the condition to "Cost <= Threshold",
which caused a significant size regression in Chrome. This commit rectifies
that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259915 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 20:32:42 +00:00
Jun Bum Lim
e1451a3ca9 [AArch64] Refactoring aarch64-ldst-opt. NCF.
Remove narrow load / store instructions from getMatchingPairOpcode(),
and add getMatchingWideOpcode().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259914 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 20:02:03 +00:00
Tom Stellard
25257d8bf4 TableGen: Add IsOptional field to AsmOperandClass
Summary:
This makes it possible to specify some operands as optional to the AsmMatcher.
Setting this field to true will prevent the AsmMatcher from emitting
'too few operands' errors when there are missing optional operands.

Reviewers: olista01, ab

Subscribers: nhaustov, arsenm, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259913 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 19:59:33 +00:00
Matt Arsenault
c0410c6002 AMDGPU: Account for LDS alignment
The current situation isn't great, because the amount of padding
requires is determined by the inverse order of the first encountered
use. We should eventually somehow sort these to minimize wasted space.

Another problem is the alignment of kernel arguments isn't
respected. The group_segment_alignment is always emitted as
the default 16, and typed arguments with higher alignments
or an explicitly set alignment are also ignored.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259912 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 19:47:29 +00:00
Matt Arsenault
d1d0a1a39d AMDGPU: Preserve alignments on new created globals
Also switch to internal linkage, and include the name of the function in
the name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259911 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 19:47:23 +00:00
Reid Kleckner
47b3c23517 [codeview] Dump a missing field and change its signedness
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259904 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 19:15:45 +00:00
Tom Stellard
d794d16bc1 AMDGPU: Remove some purely R600 functions from AMDGPUInstrInfo
Reviewers: arsenm

Subscribers: arsenm, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259900 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 18:44:57 +00:00
Tom Stellard
739e22cf9d AMDGPU: Fix ordering of CPU and FS parameters in TargetMachine constructors
Reviewers: arsenm

Subscribers: arsenm, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259897 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 18:29:17 +00:00
Reid Kleckner
2a628aaf86 Fix echo.ll test failing due to DOS line endings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259896 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 18:21:28 +00:00
Wei Mi
f2ca031646 Some stackslots are allocated to vregs which have no real reference.
LiveRangeEdit::eliminateDeadDef is used to remove dead define instructions
after rematerialization. To remove a VNI for a vreg from its LiveInterval,
LiveIntervals::removeVRegDefAt is used. However, after non-PHI VNIs are all
removed, PHI VNI are still left in the LiveInterval. Such unused vregs will
be kept in RegsToSpill[] at the end of InlineSpiller::reMaterializeAll and
spiller will allocate stackslot for them.

The fix is to get rid of unused reg by checking whether it has non-dbg
reference instead of whether it has non-empty interval.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259895 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 18:14:24 +00:00
Tom Stellard
35cb73cd06 AMDGPU/SI: Correctly initialize SIInsertWaits pass
Reviewers: arsenm

Subscribers: arsenm, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259894 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 17:42:38 +00:00
Dan Gohman
379844452a [WebAssembly] Update the select instructions' operand orders to match the spec.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259893 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 17:14:59 +00:00
Nemanja Ivanovic
9a3ee3636c Add the missing test case for PR26193
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259888 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 15:03:17 +00:00
Nemanja Ivanovic
591a727559 Fix for PR 26193
This is a simple fix for a PowerPC intrinsic that was incorrectly defined
(the return type was incorrect).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259886 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 14:50:29 +00:00
Benjamin Kramer
4ab360d3cc Move classes defined in a cpp file into an anonymous namespace.
No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259883 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 13:50:53 +00:00
Benjamin Kramer
2e1305361d Prefix external symbols in llvm-c-test.
This makes it less likely to clash with other stuff that might be linked
in by change, e.g. ncurses exposes an external function called simply
"echo", so linking ncurses statically into the binary explodes in funny
ways.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259882 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 13:31:14 +00:00
Renato Golin
78492103af Revert "[AArch64] Improve load/store optimizer to handle LDUR + LDR (take 3)."
This reverts commit r259812 as it broke AArch64 self-hosting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259881 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 12:14:30 +00:00
Dmitry Polukhin
f5861b08e7 [DebugInfo] Eliminate compilation warning about used variable LSDA
The waring was:
lib/DebugInfo/DWARF/DWARFDebugFrame.cpp:643:20: warning: variable ‘LSDA’ set but not used

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259877 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 09:24:34 +00:00
Michael Zolotukhin
60daf2aa3f [LoopUnrolling] Try harder to avoid rebuilding LCSSA when possible.
In r255133 (reapplied r253126) we started to avoid redundant
recomputation of LCSSA after loop-unrolling. This patch moves one step
further in this direction - now we can avoid it for much wider range of
loops, as we start to look at IR and try to figure out if the
transformation actually breaks LCSSA phis or makes it necessary to
insert new ones.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259869 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 02:17:36 +00:00
David Majnemer
7ddc547ea9 [MC] Add support for encoding CodeView variable definition ranges
CodeView, like most other debug formats, represents the live range of a
variable so that debuggers might print them out.

They use a variety of records to represent how a particular variable
might be available (in a register, in a frame pointer, etc.) along with
a set of ranges where this debug information is relevant.

However, the format only allows us to use ranges which are limited to a
maximum of 0xF000 in size.  This means that we need to split our debug
information into chunks of 0xF000.

Because the layout of code is not known until *very* late, we must use a
new fragment to record the information we need until we can know
*exactly* what the range is.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259868 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 01:55:49 +00:00
Joseph Tremoulet
419c3d8a2f [RS4GC] Pass DenseMap by reference, NFC
Summary:
Passing the rematerialized values map to insertRematerializationStores by
value looks to be a simple oversight; update it to pass by reference.


Reviewers: reames, sanjoy

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259867 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 01:42:52 +00:00
Amaury Sechet
5386703726 Add various binary operations in the LLVM C API echo test
Summary: This diff increase the tested surface of the C API.

Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259863 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 01:27:11 +00:00
Adam Nemet
a8e75884ec [LoopLoadElim] Don't allow versioning when optForSize
This was requested in the review of D16300.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259861 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 01:14:05 +00:00
Adam Nemet
2107b401f7 Fix typo in comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259860 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 01:14:00 +00:00
Matt Arsenault
4b9655d7ac Fix printing of f16 machine operands
Only single and double FP immediates are correctly printed by
MachineInstr::print() during debug output. Half float type goes to
APFloat::convertToDouble() and hits assertion it is not a double
semantics. This diff prints half machine operands correctly.

This cannot currently be hit by any in-tree target.

Patch by Stanislav Mekhanoshin

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259857 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 00:50:18 +00:00
Easwaran Raman
99c3bc5b64 Fix build breakage introduced by r259846.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259855 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 00:45:02 +00:00
George Burgess IV
8114867d8b Add a test for MemorySSA. NFC.
We don't currently have many tests that deal with operations on multiple
local MemoryLocations. This new test helps out a bit in that regard.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259854 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 00:42:02 +00:00
Amaury Sechet
12e138e326 Add Support to llvm-c-test dependancies
Summary: As per title. It is required and don't get linked in in some builds.

Reviewers: chapuni, joker.eph

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259853 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 00:19:50 +00:00
Xinliang David Li
51000e37d1 Function name change /NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259851 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-04 23:59:09 +00:00
Easwaran Raman
4bf45e8313 Refactor profile summary support code. NFC.
Summary computation is not just for instrumented profiling and so I have moved
the ProfileSummary class to ProfileCommon.h (named so to allow code unrelated
to summary but common to instrumented and sampled profiling to be placed there)

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259846 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-04 23:34:31 +00:00
Amaury Sechet
88242800f7 Improve testing for the C API
Summary:
This basically add an echo test case in C. The support is limited right now, but full support would just be too much to review at once.

The echo test case simply get a module as input and try to output the same exact module. This allow to check the both reading and writing API are working as expected.

I want to improve this test over time to support more and more of the API, in order to improve coverage (coverage is quite poor right now).

Test Plan: Run the test.

Reviewers: chandlerc, bogner

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259844 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-04 23:26:19 +00:00
Nemanja Ivanovic
e0a5f73cd5 Fix for PR 26356
Using the load immediate only when the immediate (whether signed or unsigned)
can fit in a 16-bit signed field. Namely, from -32768 to 32767 for signed and
0 to 65535 for unsigned. This patch also ensures that we sign-extend under the
right conditions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259840 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-04 23:14:42 +00:00
Evandro Menezes
cb8e306b6b Fix typo and test commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259839 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-04 23:07:57 +00:00