Commit Graph

124910 Commits

Author SHA1 Message Date
NAKAMURA Takumi
5b1522a8d1 Let llvm-lto installed. A few tests in clang/test are using it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254963 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 23:07:16 +00:00
Philip Reames
ba40ae0275 Remove debug output that snuck into 254957
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254960 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 22:43:56 +00:00
Philip Reames
0890b95b60 Reapply 254950 w/fix
254950 ended up being not NFC.  The previous code was overriding the flags for whether an instruction read or wrote memory using the target specific flags returned via TTI.  I'd missed this in my refactoring.  Since I mistakenly built only x86 and didn't notice the number of unsupported tests, I didn't catch that before the original checkin.

This raises an interesting issue though.  Given we have function attributes (i.e. readonly, readnone, argmemonly) which describe the aliasing of intrinsics, why does TTI have this information overriding the instruction definition at all?  I see no reason for this, but decided to preserve existing behavior for the moment.  The root issue might be that we don't have a "writeonly" attribute.

Original commit message:
[EarlyCSE] Simplify and invert ParseMemoryInst [NFCI]

Restructure ParseMemoryInst - which was introduced to abstract over target specific load and stores instructions - to just query the underlying instructions. In theory, this could be slightly slower than caching the results, but in practice, it's very unlikely to be measurable.

The simple query scheme makes it far easier to understand, and much easier to extend with new queries. Given I'm about to need to add new query types, doing the cleanup first seemed worthwhile.

Do we still believe the target specific intrinsic handling is worthwhile in EarlyCSE? It adds quite a bit of complexity and makes the code harder to read. Being able to delete the abstraction entirely would be wonderful.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254957 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 22:41:23 +00:00
Mehdi Amini
3ff1b160f8 Remove useless hack that avoids calling LLVMLinkInInterpreter()
This is supposed to force-link the Interpreter, by inserting a dead
call to LLVMLinkInInterpreter().
Since it is actually an empty function, there is no reason for the
call to be dead.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254956 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 22:27:19 +00:00
Philip Reames
1440f53307 Revert 254950
It's causing test failures on AArch64.  Due to a bad build config on my part, I apparently wasn't running the tests I thought I was.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254954 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 21:41:29 +00:00
Manman Ren
8d6e45b694 Update doc for C++ TLS calling convention.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254953 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 21:40:09 +00:00
Rafael Espindola
73036cee73 Simplify the error handling a bit. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254952 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 21:28:22 +00:00
Philip Reames
3f8a9448c5 [EarlyCSE] Simplify and invert ParseMemoryInst [NFCI]
Restructure ParseMemoryInst - which was introduced to abstract over target specific load and stores instructions - to just query the underlying instructions. In theory, this could be slightly slower than caching the results, but in practice, it's very unlikely to be measurable.

The simple query scheme makes it far easier to understand, and much easier to extend with new queries. Given I'm about to need to add new query types, doing the cleanup first seemed worthwhile.

Do we still believe the target specific intrinsic handling is worthwhile in EarlyCSE? It adds quite a bit of complexity and makes the code harder to read. Being able to delete the abstraction entirely would be wonderful.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254950 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 21:27:15 +00:00
Easwaran Raman
aa464aada4 Use updated threshold for indirect call bonus
When considering foo->bar inlining, if there is an indirect call in foo which gets resolved to a direct call (say baz), then we try to inline baz into bar with a threshold T and subtract max(T - Cost(bar->baz), 0) from Cost(foo->bar). This patch uses max(Threshold(bar->baz) - Cost(bar->baz)) instead, where Thresheld(bar->baz) could be different from T due to bonuses or subtractions. Threshold(bar->baz) - Cost(bar->baz) better represents the desirability of inlining baz into bar.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254945 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 21:21:20 +00:00
Kit Barton
4e2c148ec8 [PPC64] Convert bool literals to i32
Convert i1 values to i32 values if they should be allocated in GPRs instead of CRs.

Phabricator: http://reviews.llvm.org/D14064

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254942 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 20:50:29 +00:00
Simon Pilgrim
7d9752d1d3 Fix line endings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254939 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 20:36:00 +00:00
Teresa Johnson
a16511be95 Fix function return type in declaration (bot errors from r254926).
Try to fix bot build errors from r254926 by correcting the function
return type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254934 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 19:53:38 +00:00
Sanjay Patel
3317c77cea don't repeat function names in comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254930 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 19:31:34 +00:00
Sanjay Patel
322ee9e421 fix 'the the '; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254928 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 19:21:39 +00:00
Teresa Johnson
5d0d98f6ec [ThinLTO] Support for specifying function index from pass manager
Summary:
Add a field on the PassManagerBuilder that clang or gold can use to pass
down a pointer to the function index in memory to use for importing when
the ThinLTO backend is triggered. Add support to supply this to the
function import pass.

Reviewers: joker.eph, dexonsmith

Subscribers: davidxl, llvm-commits, joker.eph

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254926 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 19:21:11 +00:00
Sanjay Patel
fbee4fa427 remove redundant check: optForSize() includes a check for the minsize attribute; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254925 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 19:13:40 +00:00
Ron Lieberman
55aaa984cb [Hexagon] Adding v60 test, vasr in particular.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254923 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 18:52:39 +00:00
David Blaikie
f8a6223dd0 [llvm-dwp] Restructure inputs for test case so they're all grouped together
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254922 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 18:46:41 +00:00
Sanjay Patel
bd58adf18d Tighten checks so we can see existing codegen
The 2-element vector case shows a surprising bug: we failed to
eliminate ops on undefs, so there are 4 fmax calls even though
there can only be 2 valid elements in the inputs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254920 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 17:39:48 +00:00
Lang Hames
07b637e04d [Orc] Removing traces of takeOwnershipOfBuffers left after r251560.
Patch by Joshua Gerrard. Thanks Joshua!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254919 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 17:35:56 +00:00
Rafael Espindola
0178d23ade Link declaration lazily.
We already linked available_externally and linkonce lazily, this just
adds declarations to the list.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254917 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 16:31:41 +00:00
Rafael Espindola
7218e37dab Simplify test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254916 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 16:01:40 +00:00
Aaron Ballman
c4724f60d7 Silence all C4592 warnings with MSVC 2015 Update 1. This warning produces false positives that Microsoft says will be fixed in Update 2. Until this produces reliable diagnostics, it is safe to disable the diagnostic -- the compiler is not doing anything different than it previously did aside from issuing the diagnostic.
(Note, this silences at least one false positive in LLVM with FeatureBitset uses.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254915 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 15:44:34 +00:00
Teresa Johnson
fda49fdbc8 [ThinLTO] Support cloning of temporary DILocation metadata
This is needed to support linking of module-level metadata as a
postpass after function importing, where we will be leaving temporary
metadata on imported instructions until the postpass metadata import.

Also added unittest. Split from D14838.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254914 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 15:05:44 +00:00
Elena Demikhovsky
3b45f263c3 VX-512: Fixed a bug in FP logic operation lowering
FP logic instructions are supported in DQ extension on AVX-512 target.
I use integer operations instead.
Added tests.
I also enabled FABS in this patch in order to check ANDPS.
The operations are FOR, FXOR, FAND, FANDN.
The instructions, that supported for 512-bit vector under DQ are:
VORPS/PD, VXORPS/PD, VANDPS/PD, FANDNPS/PD.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254913 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 14:33:34 +00:00
Artyom Skrobov
fad998fc36 [ARM] Generate ABI_optimization_goals build attribute, as described in the ARM ARM.
Summary: This reverts r254234, and adds a simple fix for the annoying case of use-after-free.

Reviewers: rengolin

Subscribers: aemerson, llvm-commits, rengolin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254912 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 14:22:39 +00:00
Daniel Sanders
0284291aa1 [mips][ias] Removed DSP/DSPr2 instructions from base architecture valid-xfail.s's.
Summary:
valid-xfail.s is for instructions that should be valid in the given ISA but
incorrectly fail. DSP/DSPr2 instructions are correct to fail since DSP/DSPr2 is
not enabled.

Reviewers: vkalintiris

Subscribers: dsanders, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254911 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 14:12:44 +00:00
Elena Demikhovsky
b06ff9b1e1 AVX-512: Fixed masked load / store instruction selection for KNL.
Patterns were missing for KNL target for <8 x i32>, <8 x float> masked load/store.

This intrinsic comes with all legal types:
<8 x float> @llvm.masked.load.v8f32(<8 x float>* %addr, i32 align, <8 x i1> %mask, <8 x float> %passThru),
but still requires lowering, because VMASKMOVPS, VMASKMOVDQU32 work with 512-bit vectors only.

All data operands should be widened to 512-bit vector.
The mask operand should be widened to v16i1 with zeroes.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254909 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 13:39:24 +00:00
Igor Breger
eea645e49f AVX-512: implement kunpck intrinsics.
Differential Revision: http://reviews.llvm.org/D14821

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254908 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 13:25:18 +00:00
Rafael Espindola
35ecd26675 Change how the linker handles the old llvm.global_ctors.
Now instead of changing it to the new format and then linking, it just
handles the old format while copying it over.

The main differences are:

* There is no rauw in the source module.
* An old format input is always upgraded.

The first item helps with having a sane API that passes in a GV list to
the linker.

The second one is a small step in deprecating the old format.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254907 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 13:24:23 +00:00
Asaf Badouh
fbb911506e [avx512] rename gcc intrinsics to be align with gcc format
rename the gcc intrinsics suffix : _mask ->_round

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254905 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 13:14:14 +00:00
Marina Yatsina
5c239f408d [X86] Adding support for FWORD type for MS inline asm
Adding support for FWORD type for MS inline asm.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254904 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 13:09:20 +00:00
Bradley Smith
8205637a28 [ARM] Flag vcvt{t,b} with an f16 type specifier as part of the FP16 extension
Additionally correct the Cortex-R7 definition to allow the FP16 feature.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254900 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 10:54:36 +00:00
Simon Pilgrim
0239b7553b [X86][AVX] Added tests to load+broadcast non-zero'th vector elements
Baseline for an upcoming patch for PR23022

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254898 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 09:09:54 +00:00
Zlatko Buljan
01654c4941 [mips][microMIPS] Implement LH, LHE, LHU and LHUE instructions
Differential Revision: http://reviews.llvm.org/D9824


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254897 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 08:29:31 +00:00
Craig Topper
1632a3b152 Add uint8_t size to LegalizeTypeAction enum and use the enum type directly to remove some typecasts. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254895 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 06:31:41 +00:00
Craig Topper
260f72a264 Add uint8_t size to LegalizeAction enum so we can use the enum type directly and remove some casts. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254893 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 06:01:51 +00:00
Davide Italiano
0511c3bfdd [llvm-objdump/MachoDump] Make code much more concise.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254888 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 00:03:28 +00:00
Keno Fischer
41e546b231 [Verifier] Fix !dbg validation if Scope is the Subprogram
Summary:
We are inserting both Scope and SP into the Seen map and check whether
it was already there in which case we skip the validation (the idea
being that we already checked this Subprogram before). However,
if (Scope == SP) as MDNodes, then inserting the Scope, will trigger
the Seen check causing us to incorrectly not validate this !dbg
attachment. Fix this by not performing the SP Seen check if Scope == SP

Reviewers: pcc, dexonsmith, dblaikie

Subscribers: dblaikie, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254887 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-06 23:05:38 +00:00
Simon Pilgrim
3b8cbdadaf [X86][AVX] Tidied up BROADCASTPD/BROADCASTPS tests
Regenerate tests using update_llc_test_checks.py



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254886 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-06 20:12:19 +00:00
Lang Hames
1ecc6c0df2 [Orc] Rename IndirectStubsManagerBase to IndirectStubsManager.
No functional change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254885 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-06 19:44:45 +00:00
Dan Gohman
001f341707 [WebAssembly] Factor out a TypeToString function, since we need it in multiple places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254884 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-06 19:42:29 +00:00
Dan Gohman
577f887f75 [WebAssembly] Make tableswitch's 'default' operand explicit. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254883 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-06 19:34:57 +00:00
Dan Gohman
4693393907 [WebAssembly] Enable folding of offsets into global variable addresses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254882 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-06 19:33:32 +00:00
Dan Gohman
d749dbb6ec [WebAssembly] Tighten up some testcase regular expressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254881 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-06 19:31:44 +00:00
Dan Gohman
51b079cd28 [WebAssembly] Add some more ideas to README.txt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254880 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-06 19:29:54 +00:00
Sanjay Patel
180d5cb8e1 [x86] add missing maxnum/minnum tests for 256-bit vectors
Also, switch to x86-64 because once we can lower these to something
more reasonable, there will be less noise in the checks. And add
AVX runs because those will be different than SSE.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254879 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-06 18:05:12 +00:00
Rafael Espindola
e89ea49c12 Create llvm.global_ctors in the new format.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254878 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-06 16:18:25 +00:00
Marina Yatsina
1c73aa0b63 [X86] Add support for loopz, loopnz for Intel syntax
According to x86 spec, loopz and loopnz should be supported for Intel syntax, where loopz is equivalent to loope and loopnz is equivalent to loopne.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254877 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-06 15:31:47 +00:00
Asaf Badouh
023610af4f [X86][AVX512] add vmovss/sd missing encoding
Differential Revision: http://reviews.llvm.org/D14701



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254875 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-06 13:26:56 +00:00