Commit Graph

96734 Commits

Author SHA1 Message Date
Elena Demikhovsky
55240a5ddb Fixed a bug in dynamic allocation memory on stack.
The alignment of allocated space was wrong, see Bugzila 17345.

Done by Zvi Rackover <zvi.rackover@intel.com>.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192573 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-14 07:26:51 +00:00
Craig Topper
f50045e90d Create classes to reduce the size of the tablegen entries for the CRC32 instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192568 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-14 05:19:58 +00:00
Craig Topper
c6f7c99809 Allow pinsrw/pinsrb/pextrb/pextrw/movmskps/movmskpd/pmovmskb/extractps instructions to parse either GR32 or GR64 without resorting to duplicating instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192567 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-14 04:55:01 +00:00
Craig Topper
8e121843c1 Add disassembler support for SSE4.1 register/register form of PEXTRW. There is a shorter encoding that was part of SSE2, but a memory form was added in SSE4.1. This is the register form of that encoding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192566 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-14 01:42:32 +00:00
Craig Topper
bae9f69d37 Mark MOVMSKPS/MOVMSKPD/VPINSRWrr64i as AsmParserOnly to remove them from the disassembler tables. Add PINSRWrr64i to complement the AVX version.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192565 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-14 01:21:22 +00:00
David Majnemer
bf80b3cead Windows: Fix a typo in an assert
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192564 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-14 01:17:32 +00:00
Craig Topper
eefca96792 Don't use 64-bit versions of MOVMSKPD in CodeGen. The instructions only produce a 1-bit result so we can just use SUBREG_TO_REG to extend the 32-bit versions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192562 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-14 00:24:33 +00:00
David Majnemer
9f27a47ff1 Windows: Don't bother with pinning Kernel32.dll
We don't delay load it so it shouldn't be going anywhere.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192561 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-14 00:06:58 +00:00
Will Dietz
4df7c5baa1 MC: Don't assume incoming StringRef's are null terminated.
This can happen when processing command line arguments, which
are often stored as std::string's and later turned into
StringRef's via std::string::data().  Unfortunately this
is not guaranteed to return a null-terminated string
until C++11, causing breakage on platforms that don't do this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192558 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-13 22:09:26 +00:00
Vincent Lejeune
cf1f4c7dd1 R600: improve dump of S_WAITCNT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192557 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-13 17:56:28 +00:00
Vincent Lejeune
36d96337f7 R600/SI: Add SinkingPass before ISel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192556 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-13 17:56:21 +00:00
Vincent Lejeune
6a809a8d29 R600/SI: Support byval arguments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192555 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-13 17:56:16 +00:00
Vincent Lejeune
f2b3a569ae R600: Use masked read sel for texture instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192554 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-13 17:56:10 +00:00
Vincent Lejeune
91ec4b0cac R600: fix swizzle export
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192553 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-13 17:56:04 +00:00
Vincent Lejeune
6639f066e1 R600: Clear the VPM bit of export instructions.
It makes apparently no change it to set this bit or not but the
docs recommand to left it cleared.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192552 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-13 17:55:57 +00:00
David Majnemer
00f31bac0b Windows: Use GetModuleHandleEx instead of LoadLibrary
We were using an anti-pattern of:
 - LoadLibrary
 - GetProcAddress
 - FreeLibrary

This is problematic because of several reasons:
 - We are holding on to pointers into a library we just unloaded.
 - Calling LoadLibrary results in an increase in the reference count of
   the library in question and any libraries that it depends on and
   so-on and so-forth.  This is none too quick.

Instead, use GetModuleHandleEx with GET_MODULE_HANDLE_EX_FLAG_PIN.  This
is done because because we didn't bring the reference for the library
into existence and therefor shouldn't count on it being around later.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192550 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-13 10:34:21 +00:00
Will Dietz
833a29c296 TargetLowering: Don't index into empty string.
(This is triggered by current lit tests)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192549 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-13 03:08:49 +00:00
Will Dietz
6dd7893e8c yaml2coff/elf: Touchup for compatibility.
* std::string::append(int, int) can be ambiguous.
* std::vector<>::data() is a C++11 feature, use ArrayRef abstraction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192542 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-12 21:29:16 +00:00
Arnold Schwaighofer
24732c3363 SLPVectorizer: Sort PHINodes based on their opcode
Before this patch we relied on the order of phi nodes when we looked for phi
nodes of the same type. This could prevent vectorization of cases where there
was a phi node of a second type in between phi nodes of some type.

This is important for vectorization of an internal graphics kernel. On the test
suite + external on x86_64 (and on a run on armv7s) it showed no impact on
either performance or compile time.

radar://15024459

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192537 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-12 18:56:27 +00:00
Tobias Grosser
fe82a3e360 LoopVectorize: Add missing INITIALIZE_PASS_DEPENDENCY macros
Contributed-by:  Peter Zotov  <whitequark@whitequark.org>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192536 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-12 18:29:15 +00:00
Benjamin Kramer
18de809b0c Force a CPU on test so it doesn't depend on microarchitectural scheduling decisions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192532 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-12 11:17:12 +00:00
Bill Wendling
d36e6444aa Update so that it uses the `-V' command line option and supports Python 3.x.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192527 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-12 08:42:59 +00:00
Craig Topper
017d8a3e23 Remove more filters from the disassembler. Mark some AVX512 instructions as CodeGenOnly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192525 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-12 05:41:08 +00:00
Tom Stellard
f931867317 R600: Store disassembly in a special ELF section when feature +DumpCode is enabled.
Patch by: Jay Cornwall

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192523 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-12 05:02:51 +00:00
Craig Topper
c429b5cca1 Mark some more instructions as CodeGenOnly. Remove filters from the disassembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192522 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-12 04:46:18 +00:00
Reed Kotler
7f0125ba19 For Mips16, start to consolidate all forms of 32 bit literal loading so that
they can be better handled and optimized in the Mips16 constant island code.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192520 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-12 02:19:08 +00:00
Will Dietz
e3ba15c794 Add missing #include's to cctype when using isdigit/alpha/etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192519 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-12 00:55:57 +00:00
Manman Ren
87b110ac24 Debug Info: remove form from function addDIEEntry.
The form must be a reference form in addDIEEntry. Which reference form to
use will be decided by the callee.

No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192517 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-11 23:58:05 +00:00
Andrew Kaylor
4bad07fbec Fixing problems in lli's RemoteMemoryManager.
This fixes a problem from a previous check-in where a return value was omitted.

Previously the remote/stubs-remote.ll and remote/stubs-sm-pic.ll tests were reporting passes, but they should have been failing.  Those tests attempt to link against an external symbol and remote symbol resolution is not supported.  The old RemoteMemoryManager implementation resulted in local symbols being used for resolution and the child process crashed but the test didn't notice.  With this check-in remote symbol resolution fails, and so the test (correctly) fails.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192514 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-11 22:47:10 +00:00
Andrew Kaylor
528f6d787b Adding multiple object support to MCJIT EH frame handling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192504 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-11 21:25:48 +00:00
Matt Arsenault
b19b474de9 R600: Add scalar i32 add test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192501 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-11 21:03:41 +00:00
Matt Arsenault
2ad612a9e7 Use CHECK-LABEL
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192500 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-11 21:03:39 +00:00
Matt Arsenault
e1bd218334 Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192499 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-11 21:03:36 +00:00
Benjamin Kramer
4c5956cefb fConversion: Attempt #2 at fixing the MSVC build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192492 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-11 19:49:09 +00:00
Benjamin Kramer
ae6fa27a0c IfConversion: Try to unbreak the MSVC build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192487 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-11 19:39:48 +00:00
Benjamin Kramer
5af763cb2a Mips: Disassemble sign-extended 64 bit immediates properly.
This doesn't change the meaning of the output, but makes look right. PR17539.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192483 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-11 19:05:08 +00:00
Matthias Braun
8573384010 Remove kill flags after if conversion if necessary
When if converting something like:
true:
   ... = R0<kill>

false:
   ... = R0<kill>

then the instructions of the true block must not have a <kill> flag
anymore, as the instruction of the false block follow and do still read
the R0 value.
Specifically this patch determines the set of register live-in in the
false block (possibly after simulating the liveness changes of the
duplicated instructions). Each of these live-in registers mustn't be
killed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192482 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-11 19:04:37 +00:00
Matthias Braun
da74817c50 Introduce ad hoc liveness tracking utility: LiveRegUnits
Contains a set of live register (units) and code to move forward and
backward in the schedule while updating the live set.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192481 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-11 19:04:35 +00:00
Quentin Colombet
8c15b60ffe [DAGCombiner] Load slicing test case: attempt to really fix the buildbots (used sse4.2 instead of avx!).
<rdar://problem/14477220>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192480 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-11 18:54:49 +00:00
Renato Golin
f02062f889 Add warning about CHECK-DAG with variable definition
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192479 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-11 18:50:22 +00:00
Manman Ren
47cbe033f6 Debug Info Testing Case: check for the name of a structure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192478 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-11 18:50:00 +00:00
Stephen Lin
e5f740cc4f Really fix CHECK-LABEL and CHECK-DAG interaction. This actually just restores the initial implementation that was in r186162 but got lost in some subsequent refactoring. More explicit variable names and comments are present now to hopefully prevent repeat regression, as well as another test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192477 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-11 18:38:36 +00:00
Quentin Colombet
83f743a4d5 [DAGCombiner] Reapply load slicing (192471) with a test that explicitly set sse4.2 support.
This should fix the buildbots.

Original commit message:
[DAGCombiner] Slice a big load in two loads when the element are next to each
other in memory and the target has paired load and performs post-isel loads
combining.

E.g., this optimization will transform something like this:
a = load i64* addr
b = trunc i64 a to i32
c = lshr i64 a, 32
d = trunc i64 c to i32

into:
b = load i32* addr1
d = load i32* addr2
Where addr1 = addr2 +/- sizeof(i32), if the target supports paired load and
performs post-isel loads combining.

One should overload TargetLowering::hasPairedLoad to provide this information.
The default is false.

<rdar://problem/14477220>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192476 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-11 18:29:42 +00:00
Quentin Colombet
4351741a3b [DAGCombiner] Revert load slicing (r192471), until I figure out why it fails on ubuntu.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192474 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-11 18:17:17 +00:00
Matthias Braun
1dfe206062 Revert "Tests: Be less dependent on a specific schedule/regalloc"
This reverts r192454

Apparently FileCheck isn't as smart as I though and does not enforce a
topological order between variable defs+uses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192472 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-11 18:09:19 +00:00
Quentin Colombet
c34693f6ef [DAGCombiner] Slice a big load in two loads when the element are next to each
other in memory and the target has paired load and performs post-isel loads
combining.

E.g., this optimization will transform something like this:
 a = load i64* addr
 b = trunc i64 a to i32
 c = lshr i64 a, 32
 d = trunc i64 c to i32

into:
 b = load i32* addr1
 d = load i32* addr2
Where addr1 = addr2 +/- sizeof(i32), if the target supports paired load and
performs post-isel loads combining.

One should overload TargetLowering::hasPairedLoad to provide this information.
The default is false.

<rdar://problem/14477220>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192471 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-11 18:01:14 +00:00
Rafael Espindola
563c182839 Fix handling of CHECK-DAG inside of CHECK-LABEL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192463 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-11 16:48:02 +00:00
Renato Golin
de2aa60843 Better info when debugging vectorizer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192460 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-11 16:14:39 +00:00
Amara Emerson
fc3dc102e0 [ARM] Fix FP ABI attributes with no VFP enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192458 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-11 16:03:43 +00:00
Matthias Braun
d2f8df50fb fix typo in comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192455 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-11 15:40:14 +00:00