]> granicus.if.org Git - llvm/log
llvm
9 years agoDelay dominator updation while cloning loop.
Vikram TV [Sat, 11 Jun 2016 16:41:10 +0000 (16:41 +0000)]
Delay dominator updation while cloning loop.

Summary:
Dominator updation fails for a loop inserted with a new basicblock.

A block required by DT to set the IDom might not have been cloned yet. This is because there is no predefined ordering of loop blocks (except for the header block which should be the first block in the list).

The patch first creates DT nodes for the cloned blocks and then separately updates the DT in a follow-on loop.

Reviewers: anemet, dberlin

Subscribers: dberlin, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272479 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86][SSSE3] Added PSHUFB LUT implementation of BITREVERSE
Simon Pilgrim [Sat, 11 Jun 2016 15:44:13 +0000 (15:44 +0000)]
[X86][SSSE3] Added PSHUFB LUT implementation of BITREVERSE

PSHUFB can speed up BITREVERSE of byte vectors by performing LUT on the low/high nibbles separately and ORing the results. Wider integer vector types are already BSWAP'd beforehand so also make use of this approach.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272477 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoStrip trailing whitespace. NFCI.
Simon Pilgrim [Sat, 11 Jun 2016 14:34:10 +0000 (14:34 +0000)]
Strip trailing whitespace. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272476 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[AVX512] Re-generate v8i64 shuffle test now that we use pshufd for some cases.
Craig Topper [Sat, 11 Jun 2016 13:57:08 +0000 (13:57 +0000)]
[AVX512] Re-generate v8i64 shuffle test now that we use pshufd for some cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272474 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[AVX512] Lower v8i64 and v16i32 to pshufd when possible.
Craig Topper [Sat, 11 Jun 2016 13:43:21 +0000 (13:43 +0000)]
[AVX512] Lower v8i64 and v16i32 to pshufd when possible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272473 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86] Remove GCC builtin name from some intrinsics that are no longer used by clang...
Craig Topper [Sat, 11 Jun 2016 13:43:18 +0000 (13:43 +0000)]
[X86] Remove GCC builtin name from some intrinsics that are no longer used by clang. A future commit can remove the intrinsics entirely.

Some of these have been unused for a long time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272472 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86][SSE] Added PSLLDQ/PSRLDQ as a target shuffle type
Simon Pilgrim [Sat, 11 Jun 2016 13:38:28 +0000 (13:38 +0000)]
[X86][SSE] Added PSLLDQ/PSRLDQ as a target shuffle type

Ensure that PALIGNR/PSLLDQ/PSRLDQ are byte vectors so that they can be correctly decoded for target shuffle combining

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272471 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86][AVX2] Added PSLLDQ/PSRLDQ shuffle combining tests
Simon Pilgrim [Sat, 11 Jun 2016 13:18:21 +0000 (13:18 +0000)]
[X86][AVX2] Added PSLLDQ/PSRLDQ shuffle combining tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272469 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86][SSE] Use vXi8 return type for PSLLDQ/PSRLDQ instructions
Simon Pilgrim [Sat, 11 Jun 2016 12:54:37 +0000 (12:54 +0000)]
[X86][SSE] Use vXi8 return type for PSLLDQ/PSRLDQ instructions

These are byte shift instructions and it will make shuffle combining a lot more straightforward if we can assume a vXi8 vector of bytes so decoded shuffle masks match the return type's number of elements

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272468 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86][AVX512] Tidied up VSHUFF32x4/VSHUFF64x2/VSHUFI32x4/VSHUFI64x2 comment generation
Simon Pilgrim [Sat, 11 Jun 2016 11:18:38 +0000 (11:18 +0000)]
[X86][AVX512] Tidied up VSHUFF32x4/VSHUFF64x2/VSHUFI32x4/VSHUFI64x2 comment generation

Now matches other shuffles

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272464 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoTry a bit harder to remove the signed and unsigned comparison warning.
Chandler Carruth [Sat, 11 Jun 2016 09:13:00 +0000 (09:13 +0000)]
Try a bit harder to remove the signed and unsigned comparison warning.
Hopefully this time it actually works and stays away.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272463 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoUse a two-level cast through an intptr_t, and make them C-style casts.
Chandler Carruth [Sat, 11 Jun 2016 08:19:59 +0000 (08:19 +0000)]
Use a two-level cast through an intptr_t, and make them C-style casts.
This shouldn't have any functional difference, but it appears to be the
pattern used for other methods on DynamicLibrary, and it should avoid
the -Wpedantic warning on one of the build bots about the direct
reinterpret_cast.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272461 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd a using declaration so that the overrides don't hide some of the
Chandler Carruth [Sat, 11 Jun 2016 08:12:17 +0000 (08:12 +0000)]
Add a using declaration so that the overrides don't hide some of the
base class methods.

This was caught by GCC's -Woverloaded-virtual, not sure why it wasn't
caught by Clang's. =/

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272460 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoCompare to an unsigned literal to avoid a -Wsign-compare warning.
Chandler Carruth [Sat, 11 Jun 2016 08:02:01 +0000 (08:02 +0000)]
Compare to an unsigned literal to avoid a -Wsign-compare warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272459 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoUse const_cast to cast away constness. This silences a warning.
Chandler Carruth [Sat, 11 Jun 2016 08:01:57 +0000 (08:01 +0000)]
Use const_cast to cast away constness. This silences a warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272458 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDebugInfoPDBTests:MappedBlockStreamTest.TestWriteThenRead: Avoid assigning temporary...
NAKAMURA Takumi [Sat, 11 Jun 2016 06:37:28 +0000 (06:37 +0000)]
DebugInfoPDBTests:MappedBlockStreamTest.TestWriteThenRead: Avoid assigning temporary object to ArrayRef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272457 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[MCJIT] Update MCJIT and get the fibonacci example working again.
Lang Hames [Sat, 11 Jun 2016 05:47:04 +0000 (05:47 +0000)]
[MCJIT] Update MCJIT and get the fibonacci example working again.

MCJIT will now set the DataLayout on a module when it is added to the JIT,
rather than waiting until it is codegen'd, and the runFunction method will
finalize the module containing the function to be run before running it.

The fibonacci example has been updated to include and link against MCJIT.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272455 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[AVX512] Add support for lowering v32i16 shuffles with repeated lanes. This allows...
Craig Topper [Sat, 11 Jun 2016 03:27:42 +0000 (03:27 +0000)]
[AVX512] Add support for lowering v32i16 shuffles with repeated lanes. This allows us to create 512-bit PSHUFLW/PSHUFHW.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272450 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[AVX512] No need to check for BWI being enabled before lowering v32i16 and v64i8...
Craig Topper [Sat, 11 Jun 2016 03:27:37 +0000 (03:27 +0000)]
[AVX512] No need to check for BWI being enabled before lowering v32i16 and v64i8 shuffles. If we get this far the types are already legal which means BWI must be enabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272449 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoLiveIntervalAnalysis: findLastUseBefore() must ignore undef uses.
Matthias Braun [Sat, 11 Jun 2016 00:31:28 +0000 (00:31 +0000)]
LiveIntervalAnalysis: findLastUseBefore() must ignore undef uses.

undef uses are no real uses of a register and must be ignored by
findLastUseBefore() so that handleMove() does not produce invalid live
intervals in some cases.

This fixed http://llvm.org/PR28083

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272446 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[esan|cfrag] Handle complex GEP instr in the cfrag tool
Qin Zhao [Fri, 10 Jun 2016 22:28:55 +0000 (22:28 +0000)]
[esan|cfrag] Handle complex GEP instr in the cfrag tool

Summary:
Iterates all (except the first and the last) operands within each GEP
instruction for instrumentation.

Adds test struct_field_gep.ll.

Reviewers: aizatsky

Subscribers: vitalybuka, zhaoqin, kcc, eugenis, bruening, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272442 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoTry again to fix this endianness issue.
Zachary Turner [Fri, 10 Jun 2016 22:12:18 +0000 (22:12 +0000)]
Try again to fix this endianness issue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272440 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDon't try to rotate a loop more than once - we never do this anyway.
Michael Zolotukhin [Fri, 10 Jun 2016 22:03:56 +0000 (22:03 +0000)]
Don't try to rotate a loop more than once - we never do this anyway.

Summary:
I can't find a case where we can rotate a loop more than once, and it looks
like we never do this. To rotate a loop following conditions should be met:
1) its header should be exiting
2) its latch shouldn't be exiting

But after the first rotation the header becomes the new latch, so this
condition can never be true any longer.

Tested on with an assert on LNT testsuite and make check.

Reviewers: hfinkel, sanjoy

Subscribers: sebpop, sanjoy, llvm-commits, mzolotukhin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272439 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[pdb] Fix issues with pdb writing.
Zachary Turner [Fri, 10 Jun 2016 21:47:26 +0000 (21:47 +0000)]
[pdb] Fix issues with pdb writing.

This fixes an alignment issue by forcing all cached allocations
to be 8 byte aligned, and also fixes an issue arising on big
endian systems by writing ulittle32_t's instead of uint32_t's
in the test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272437 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMemorySSA: fix memory access local dominance function for live on entry
Sebastian Pop [Fri, 10 Jun 2016 21:36:41 +0000 (21:36 +0000)]
MemorySSA: fix memory access local dominance function for live on entry

A memory access defined on function entry cannot be locally dominated by another memory access.
The patch was split from http://reviews.llvm.org/D19338 which exposes the problem.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272436 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[STLExtras] Introduce and use llvm::count_if; NFC
Sanjoy Das [Fri, 10 Jun 2016 21:18:39 +0000 (21:18 +0000)]
[STLExtras] Introduce and use llvm::count_if; NFC

(This is split out from was D21115)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272435 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[IRTranslator] Support the translation of or.
Quentin Colombet [Fri, 10 Jun 2016 20:50:35 +0000 (20:50 +0000)]
[IRTranslator] Support the translation of or.

Now or instructions get translated into G_OR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272433 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[IRTranslator] Rework the comments for the methods to translate.
Quentin Colombet [Fri, 10 Jun 2016 20:50:33 +0000 (20:50 +0000)]
[IRTranslator] Rework the comments for the methods to translate.

NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272432 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[IRTranslator] Refactor to expose a translateBinaryOp method.
Quentin Colombet [Fri, 10 Jun 2016 20:50:18 +0000 (20:50 +0000)]
[IRTranslator] Refactor to expose a translateBinaryOp method.

This method will be used for every binary operation.

NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272431 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[AArch64] Move comments closer to relevant check. NFC.
Chad Rosier [Fri, 10 Jun 2016 20:49:18 +0000 (20:49 +0000)]
[AArch64] Move comments closer to relevant check. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272430 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[AArch64] Refactor a check earlier. NFC.
Chad Rosier [Fri, 10 Jun 2016 20:47:14 +0000 (20:47 +0000)]
[AArch64] Refactor a check earlier. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272429 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[x86] enable bitcasted fabs/fneg transforms
Sanjay Patel [Fri, 10 Jun 2016 20:33:50 +0000 (20:33 +0000)]
[x86] enable bitcasted fabs/fneg transforms

The vector cases don't change because we already have folds in X86ISelLowering
to look through and remove bitcasts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272427 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[CodeGen] Fix PrologEpilogInserter to avoid duplicate allocation of SEH structs
Etienne Bergeron [Fri, 10 Jun 2016 20:24:38 +0000 (20:24 +0000)]
[CodeGen] Fix PrologEpilogInserter to avoid duplicate allocation of SEH structs

Summary:
When stack-protection is activated and WinEH exceptions is used,
the EHRegNode (exception handling registration) is allocated twice on the stack.

This was not breaking anything except loosing space on the stack.

```
D:\src\llvm\examples>llc exc2.ll  -debug-only=pei
alloc FI(0) at SP[-24]
alloc FI(1) at SP[-48]   <<-- Allocated
alloc FI(1) at SP[-72]   <<-- Allocated twice!?
alloc FI(2) at SP[-76]
alloc FI(4) at SP[-80]
alloc FI(3) at SP[-84]
```

Reviewers: rnk, majnemer

Subscribers: chrisha, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272426 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove a few gendered pronouns.
Nico Weber [Fri, 10 Jun 2016 20:06:03 +0000 (20:06 +0000)]
Remove a few gendered pronouns.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272422 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDisable MSan-hostile loop unswitching.
Evgeniy Stepanov [Fri, 10 Jun 2016 20:03:20 +0000 (20:03 +0000)]
Disable MSan-hostile loop unswitching.

Loop unswitching may cause MSan false positive when the unswitch
condition is not guaranteed to execute.

This is very similar to ASan and TSan special case in
llvm::isSafeToSpeculativelyExecute (they don't like speculative loads
and stores), but for branch instructions.

This is a workaround for PR28054.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272421 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMove isGuaranteedToExecute out of LICM.
Evgeniy Stepanov [Fri, 10 Jun 2016 20:03:17 +0000 (20:03 +0000)]
Move isGuaranteedToExecute out of LICM.

Also rename LICMSafetyInfo to LoopSafetyInfo.
Both will be used in LoopUnswitch in a separate change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272420 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[SystemZ] Support Compare and Traps
Zhan Jun Liau [Fri, 10 Jun 2016 19:58:10 +0000 (19:58 +0000)]
[SystemZ] Support Compare and Traps

Support and generate Compare and Traps like CRT, CIT, etc.

Support Trap as legal DAG opcodes and generate "j .+2" for them by default.
Add support for Conditional Traps and use the If Converter to convert them into
the corresponding compare and trap opcodes.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272419 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAMDGPU/SI: Don't use fixup_si_rodata for scratch rsrc relocations
Tom Stellard [Fri, 10 Jun 2016 19:26:38 +0000 (19:26 +0000)]
AMDGPU/SI: Don't use fixup_si_rodata for scratch rsrc relocations

Summary:
We need to set the fixup type to FK_Data_4 for the
SCRATCH_RSRC_DWORD[01] symbols, since these require absolute
relocations, and fixup_si_rodata is for relative relocations.

Reviewers: arsenm, kzhuravl

Subscribers: arsenm, kzhuravl, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272417 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMove CodeGen test from Generic to X86 specific directory
Mehdi Amini [Fri, 10 Jun 2016 19:14:01 +0000 (19:14 +0000)]
Move CodeGen test from Generic to X86 specific directory

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272416 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoInterprocedural Register Allocation (IPRA): add a Transformation Pass
Mehdi Amini [Fri, 10 Jun 2016 18:37:21 +0000 (18:37 +0000)]
Interprocedural Register Allocation (IPRA): add a Transformation Pass

Adds a MachineFunctionPass that scans the body to find calls, and
update the register mask with the one saved by the
RegUsageInfoCollector analysis in PhysicalRegisterUsageInfo.

Patch by Vivek Pandya <vivekvpandya@gmail.com>

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272414 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[x86] add test for PR28044
Sanjay Patel [Fri, 10 Jun 2016 18:05:55 +0000 (18:05 +0000)]
[x86] add test for PR28044

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272411 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd a period. NFC.
Chad Rosier [Fri, 10 Jun 2016 17:59:22 +0000 (17:59 +0000)]
Add a period. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272410 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix whitespace. NFC.
Chad Rosier [Fri, 10 Jun 2016 17:58:01 +0000 (17:58 +0000)]
Fix whitespace. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272409 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agotest: split test into two files
Saleem Abdulrasool [Fri, 10 Jun 2016 17:33:28 +0000 (17:33 +0000)]
test: split test into two files

Split up the test cases into two inputs as per post-commit review comments from
Renato.  NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272408 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86] Add costs for SSE zext/sext to v4i64 to TTI
Michael Kuperstein [Fri, 10 Jun 2016 17:01:05 +0000 (17:01 +0000)]
[X86] Add costs for SSE zext/sext to v4i64 to TTI

The costs are somewhat hand-wavy, but should be much closer to the truth
than what we get from BasicTTI.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272406 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoInterprocedural Register Allocation (IPRA) Analysis
Mehdi Amini [Fri, 10 Jun 2016 16:19:46 +0000 (16:19 +0000)]
Interprocedural Register Allocation (IPRA) Analysis

Add an option to enable the analysis of MachineFunction register
usage to extract the list of clobbered registers.

When enabled, the CodeGen order is changed to be bottom up on the Call
Graph.

The analysis is split in two parts, RegUsageInfoCollector is the
MachineFunction Pass that runs post-RA and collect the list of
clobbered registers to produce a register mask.

An immutable pass, RegisterUsageInfo, stores the RegMask produced by
RegUsageInfoCollector, and keep them available. A future tranformation
pass will use this information to update every call-sites after
instruction selection.

Patch by Vivek Pandya <vivekvpandya@gmail.com>

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272403 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[AArch64] Add preferred alignments for Exynos M1
Evandro Menezes [Fri, 10 Jun 2016 16:00:18 +0000 (16:00 +0000)]
[AArch64] Add preferred alignments for Exynos M1

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272400 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Hexagon] Remove incorrect offset scaling
Krzysztof Parzyszek [Fri, 10 Jun 2016 15:43:18 +0000 (15:43 +0000)]
[Hexagon] Remove incorrect offset scaling

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272399 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[x86] fix test attributes and autogenerate checks
Sanjay Patel [Fri, 10 Jun 2016 15:30:52 +0000 (15:30 +0000)]
[x86] fix test attributes and autogenerate checks

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272398 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[x86] add missing tests for fcmp ueq/one
Sanjay Patel [Fri, 10 Jun 2016 15:17:54 +0000 (15:17 +0000)]
[x86] add missing tests for fcmp ueq/one

Somehow, the codegen logic for these sequences has gone completely untested
until now (note the 2 compare instructions generated per test).

There's also an *Intel* AVX optimization opportunity exposed in these cases
and the existing tests. Intel's (but not AMD's) AVX spec shows that extra FP
predicates were added, so a single comparison should always be sufficient,
and operand commutation should never be necessary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272397 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[x86] regenerate checks
Sanjay Patel [Fri, 10 Jun 2016 14:48:50 +0000 (14:48 +0000)]
[x86] regenerate checks

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272396 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoReapply "[TTI] Refine default cost for interleaved load groups with gaps"
Matthew Simpson [Fri, 10 Jun 2016 14:33:30 +0000 (14:33 +0000)]
Reapply "[TTI] Refine default cost for interleaved load groups with gaps"

This reapplies commit r272385 with a fix. The build was failing when compiled
with gcc, but not with clang. With the fix, we now get the data layout from the
current TTI implementation, which will hopefully solve the issue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272395 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoTest commit
Roman Shirokiy [Fri, 10 Jun 2016 13:12:48 +0000 (13:12 +0000)]
Test commit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272393 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86][SSE] Added target shuffle combine tests for byte shift/rotates (PSLLDQ/PSRLDQ...
Simon Pilgrim [Fri, 10 Jun 2016 13:03:22 +0000 (13:03 +0000)]
[X86][SSE] Added target shuffle combine tests for byte shift/rotates (PSLLDQ/PSRLDQ/PALIGNR)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272392 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert "[TTI] Refine default cost for interleaved load groups with gaps"
Matthew Simpson [Fri, 10 Jun 2016 12:41:33 +0000 (12:41 +0000)]
Revert "[TTI] Refine default cost for interleaved load groups with gaps"

This reverts commit r272385. This commit broke the build. I'm temporarily
reverting to investigate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272391 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[TTI] Refine default cost for interleaved load groups with gaps
Matthew Simpson [Fri, 10 Jun 2016 11:27:51 +0000 (11:27 +0000)]
[TTI] Refine default cost for interleaved load groups with gaps

This patch refines the default cost for interleaved load groups having gaps. If
a load group has gaps, the legalized instructions corresponding to the unused
elements will be dead. Thus, we don't need to account for them in the cost
model. Instead, we only need to account for the fraction of legalized loads
that will actually be used.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272385 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[AMDGPU] AsmParser: Support for sext() modifier in SDWA. Some code cleaning in AMDGPU...
Sam Kolton [Fri, 10 Jun 2016 09:57:59 +0000 (09:57 +0000)]
[AMDGPU] AsmParser: Support for sext() modifier in SDWA. Some code cleaning in AMDGPUOperand.

Summary:
sext() modifier is supported in SDWA instructions only for integer operands. Spec is unclear should integer operands support abs and neg modifiers with sext - for now they are not supported.
Renamed InputModsWithNoDefault to FloatInputMods. Added SextInputMods for operands that support sext() modifier.
Added AMDGPUOperand::Modifier struct to handle register and immediate modifiers.
Code cleaning in AMDGPUOperand class: organize method in groups (render-, predicate-methods...).

Reviewers: vpykhtin, artem.tamazov, tstellarAMD

Subscribers: arsenm, kzhuravl

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272384 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86][AVX512] Added VPSLLDQ/VPSRLDQ memory fold tests
Simon Pilgrim [Fri, 10 Jun 2016 09:56:20 +0000 (09:56 +0000)]
[X86][AVX512] Added VPSLLDQ/VPSRLDQ memory fold tests

Memory operand is new for AVX512 (SSE/AVX2 didn't support it).

Also dropped the 'mask' from the tests (VPSLLDQ/VPSRLDQ don't support masked operations).

Regenerated VPALIGNR test now that the shuffle comments work

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272383 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix stale name in comment.
Sean Silva [Fri, 10 Jun 2016 08:48:49 +0000 (08:48 +0000)]
Fix stale name in comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272382 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agotest commit: remove trailing whitespaces in README.txt
Roger Ferrer Ibanez [Fri, 10 Jun 2016 08:19:58 +0000 (08:19 +0000)]
test commit: remove trailing whitespaces in README.txt

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272380 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoBug fix remove another illegal char from prof symbol name
Xinliang David Li [Fri, 10 Jun 2016 06:32:26 +0000 (06:32 +0000)]
Bug fix remove another illegal char from prof symbol name

End-end test with no integrated assembly should be added
at some point (not done now because some bots are not properly configured to
support -no-integrated-as)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272376 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[LibFuzzer] Fix some unit test crashes on OSX.
Dan Liew [Fri, 10 Jun 2016 05:33:07 +0000 (05:33 +0000)]
[LibFuzzer] Fix some unit test crashes on OSX.

This fixes the following unit tests:

FuzzerDictionary.ParseOneDictionaryEntry
FuzzerDictionary.ParseDictionaryFile

The issue appears to be mixing non-ASan-ified code (LibFuzzer) and
ASan-ified code (the unittest) as the tests would pass fine if
everything was built with ASan enabled.

I believe the issue is that different implementations of std::vector<>
are being used in LibFuzzer and outside LibFuzzer (in the unittests).
For Libcxx (I've not seen the issue manifest for libstdc++) we can disable
the ASanified std::vector<> by definining the ``_LIBCPP_HAS_NO_ASAN`` macro.
Doing this fixes the tests on OSX.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272374 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd missing include for r272369
Craig Topper [Fri, 10 Jun 2016 05:19:42 +0000 (05:19 +0000)]
Add missing include for r272369

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272373 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[AVX512] Add shuffle comment printing for masked VPERMPD/VPERMQ.
Craig Topper [Fri, 10 Jun 2016 05:12:40 +0000 (05:12 +0000)]
[AVX512] Add shuffle comment printing for masked VPERMPD/VPERMQ.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272371 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMake PDBFile take a StreamInterface instead of a MemBuffer.
Zachary Turner [Fri, 10 Jun 2016 05:10:19 +0000 (05:10 +0000)]
Make PDBFile take a StreamInterface instead of a MemBuffer.

This is the next step towards being able to write PDBs.
MemoryBuffer is immutable, and StreamInterface is our replacement
which can be any combination of read-only, read-write, or write-only
depending on the particular implementation.

The one place where we were creating a PDBFile (in RawSession) is
updated to subclass ByteStream with a simple adapter that holds
a MemoryBuffer, and initializes the superclass with the buffer's
array, so that all the functionality of ByteStream works
transparently.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272370 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd support for writing through StreamInterface.
Zachary Turner [Fri, 10 Jun 2016 05:09:12 +0000 (05:09 +0000)]
Add support for writing through StreamInterface.

This adds method and tests for writing to a PDB stream.  With
this, even a PDB stream which is discontiguous can be treated
as a sequential stream of bytes for the purposes of writing.

Reviewed By: ruiu
Differential Revision: http://reviews.llvm.org/D21157

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272369 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[AVX512] Fix shuffle comment printing to handle the masked versions of some shuffles...
Craig Topper [Fri, 10 Jun 2016 04:48:05 +0000 (04:48 +0000)]
[AVX512] Fix shuffle comment printing to handle the masked versions of some shuffles. Previously we were printing the mask operands as the register names.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272367 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[lit] Only gather redirected files for command failures.
Daniel Dunbar [Fri, 10 Jun 2016 04:17:30 +0000 (04:17 +0000)]
[lit] Only gather redirected files for command failures.

 - The intended use of this was just in diagnostics, so we shouldn't pay the
   cost of reading these all the time.

 - This will avoid including the full output of each command in tests which
   fail, but the most important use case for this was to gather the output of
   the specific command which failed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272365 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAMDGPU: Fix trailing whitespace
Matt Arsenault [Fri, 10 Jun 2016 02:18:02 +0000 (02:18 +0000)]
AMDGPU: Fix trailing whitespace

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272364 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[esan|cfrag] Add the struct field offset array in StructInfo
Qin Zhao [Fri, 10 Jun 2016 02:10:06 +0000 (02:10 +0000)]
[esan|cfrag] Add the struct field offset array in StructInfo

Summary:
Adds the struct field offset array in struct StructInfo.

Updates test struct_field_count_basic.ll.

Reviewers: aizatsky

Subscribers: llvm-commits, bruening, eugenis, kcc, zhaoqin, vitalybuka

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272362 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[LiveRangeEdit] Add a test case for r272314.
Quentin Colombet [Fri, 10 Jun 2016 01:57:48 +0000 (01:57 +0000)]
[LiveRangeEdit] Add a test case for r272314.

The test case is not great espicially because it is still cumbersome to
run the regalloc pass with run-pass. (We miss a bunch of initiliazier to
be properly implemented.)

Related to llvm.org/PR27983

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272360 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd null checks before using a pointer.
Richard Trieu [Fri, 10 Jun 2016 01:42:05 +0000 (01:42 +0000)]
Add null checks before using a pointer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272359 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[llc] Do not create the pass config several times for run-pass.
Quentin Colombet [Fri, 10 Jun 2016 01:12:06 +0000 (01:12 +0000)]
[llc] Do not create the pass config several times for run-pass.

Thanks to Matthias Braun for spotting this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272358 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[llc] Add support for several run-pass options.
Quentin Colombet [Fri, 10 Jun 2016 00:52:10 +0000 (00:52 +0000)]
[llc] Add support for several run-pass options.

Previously we could run only one machine pass with the run-pass option.
With that patch, we can now specify several passes with several run-pass
options (or just one option with a list of comma separated passes) and
llc will build the related pipeline.
This is great to test the interaction of two passes that are not
necessarily next to each other in the pipeline, or play with pass
ordering.
Now, we should be at parity with opt for the flexibility of running
passes.

Note: I also moved the run pass option from CommandFlags.h to llc.cpp
because, really, this is needed only there!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272356 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[esan|cfrag] Disable load/store instrumentation for cfrag
Qin Zhao [Fri, 10 Jun 2016 00:48:53 +0000 (00:48 +0000)]
[esan|cfrag] Disable load/store instrumentation for cfrag

Summary:
Adds ClInstrumentFastpath option to control fastpath instrumentation.

Avoids the load/store instrumentation for the cache fragmentation tool.

Renames cache_frag_basic.ll to working_set_slow.ll for slowpath
instrumentation test.

Adds the __esan_init check in struct_field_count_basic.ll.

Reviewers: aizatsky

Subscribers: llvm-commits, bruening, eugenis, kcc, zhaoqin, vitalybuka

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272355 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoUpdate call site attribute documentation
Matt Arsenault [Fri, 10 Jun 2016 00:36:57 +0000 (00:36 +0000)]
Update call site attribute documentation

convergent is also accepted.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272353 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agodocs: Add AMDGPU relocation information
Tom Stellard [Fri, 10 Jun 2016 00:31:13 +0000 (00:31 +0000)]
docs: Add AMDGPU relocation information

Summary:
This documents the various relocation types that are supported by the
Radeon Open Compute (ROC) runtime (which is essentially the dynamic
linker for AMDGPU).

Only R_AMDGPU_32 is not currently supported by the ROC runtime, but
it will usually be resolved at link time by lld.

Patch by: Konstantin Zhuravlyov

Reviewers: kzhuravl, rafael

Subscribers: rafael, arsenm, llvm-commits, kzhuravl

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272352 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAMDGPU: v_cndmask_b32 does not def vcc
Matt Arsenault [Fri, 10 Jun 2016 00:18:41 +0000 (00:18 +0000)]
AMDGPU: v_cndmask_b32 does not def vcc

Fixes verifier errors after SIShrinkInstructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272351 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAMDGPU/SI: Make sure to emit TargetConstant nodes when matching ds_*permute
Tom Stellard [Fri, 10 Jun 2016 00:01:04 +0000 (00:01 +0000)]
AMDGPU/SI: Make sure to emit TargetConstant nodes when matching ds_*permute

Summary:
This fixes a bug with ds_*permute instructions where if it was passed a
constant address, then the offset operand would get assigned a register
operand instead of an immediate.

Reviewers: scchan, arsenm

Subscribers: arsenm, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272349 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[CMake] Removing fallback code for CMake versions before 3.1
Chris Bieneman [Thu, 9 Jun 2016 23:53:22 +0000 (23:53 +0000)]
[CMake] Removing fallback code for CMake versions before 3.1

This code is dead code now. Out with the old, in with the new!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272347 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAMDGPU/SI: Use common topological sort algorithm in SIScheduleDAGMI
Tom Stellard [Thu, 9 Jun 2016 23:48:02 +0000 (23:48 +0000)]
AMDGPU/SI: Use common topological sort algorithm in SIScheduleDAGMI

Reviewers: arsenm, axeldavy

Subscribers: MatzeB, arsenm, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272346 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAMDGPU: Fix flat atomics
Matt Arsenault [Thu, 9 Jun 2016 23:42:54 +0000 (23:42 +0000)]
AMDGPU: Fix flat atomics

The flat atomics could already be selected, but only
when using flat instructions for global memory. Add
patterns for flat addresses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272345 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAMDGPU: Fix i64 global cmpxchg
Matt Arsenault [Thu, 9 Jun 2016 23:42:48 +0000 (23:42 +0000)]
AMDGPU: Fix i64 global cmpxchg

This was using extract_subreg sub0 to extract the low register
of the result instead of sub0_sub1, producing an invalid copy.

There doesn't seem to be a way to use the compound subreg indices
in tablegen since those are generated, so manually select it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272344 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAMDGPU: Fix missing and broken check lines in atomic tests
Matt Arsenault [Thu, 9 Jun 2016 23:42:44 +0000 (23:42 +0000)]
AMDGPU: Fix missing and broken check lines in atomic tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272343 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMake sure that not interesting allocas are not instrumented.
Vitaly Buka [Thu, 9 Jun 2016 23:31:59 +0000 (23:31 +0000)]
Make sure that not interesting allocas are not instrumented.

Summary:
We failed to unpoison uninteresting allocas on return as unpoisoning is part of
main instrumentation which skips such allocas.

Added check -asan-instrument-allocas for dynamic allocas. If instrumentation of
dynamic allocas is disabled it will not will not be unpoisoned.

PR27453

Reviewers: kcc, eugenis

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272341 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoCodeGen: Allow verifier to run after MachineBlockPlacement
Matt Arsenault [Thu, 9 Jun 2016 23:31:55 +0000 (23:31 +0000)]
CodeGen: Allow verifier to run after MachineBlockPlacement

No tests break with this enabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272340 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd aliases for mfvrsave/mtvrsave.
Eric Christopher [Thu, 9 Jun 2016 23:27:48 +0000 (23:27 +0000)]
Add aliases for mfvrsave/mtvrsave.

Update a test as we're now going to emit it for easier reading of
generated assembly as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272339 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAMDGPU: Run verifer after insert waits pass
Matt Arsenault [Thu, 9 Jun 2016 23:19:14 +0000 (23:19 +0000)]
AMDGPU: Run verifer after insert waits pass

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272338 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAMDGPU: Remove incorrect assertion
Matt Arsenault [Thu, 9 Jun 2016 23:19:08 +0000 (23:19 +0000)]
AMDGPU: Remove incorrect assertion

I'm still not sure under what circumstances the offset here is non-0,
but private memory is not limited to 27-bits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272337 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAMDGPU: Properly initialize SIShrinkInstructions
Matt Arsenault [Thu, 9 Jun 2016 23:18:47 +0000 (23:18 +0000)]
AMDGPU: Properly initialize SIShrinkInstructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272336 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[CFLAA] Handle global/arg attrs more sanely.
George Burgess IV [Thu, 9 Jun 2016 23:15:04 +0000 (23:15 +0000)]
[CFLAA] Handle global/arg attrs more sanely.

Prior to this patch, we used argument/global stratified attributes in
order to note that a value could have come from either dereferencing a
global/arg, or from the assignment from a global/arg.

Now, AttrUnknown is placed on sets when we see a dereference, instead of
the global/arg attributes. This allows us to be more aggressive in the
future when we see global/arg attributes without AttrUnknown.

Patch by Jia Chen.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272335 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoUnpoison stack memory in use-after-return + use-after-scope mode
Vitaly Buka [Thu, 9 Jun 2016 23:05:35 +0000 (23:05 +0000)]
Unpoison stack memory in use-after-return + use-after-scope mode

Summary:
We still want to unpoison full stack even in use-after-return as it can be disabled at runtime.

PR27453

Reviewers: eugenis, kcc

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272334 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoReapply 272328 and 272329 as a single patch.
Alina Sbirlea [Thu, 9 Jun 2016 23:04:15 +0000 (23:04 +0000)]
Reapply 272328 and 272329 as a single patch.

[cpu-detection] [amdfam10] Return barcelona, and amdfam10 for all other
subtypes. Address Bug 28067.

Along with the refactoring of Host.cpp, getHostCPUName() was modified to
return more precise types for CPUs in amdfam10.
However, callers of getHostCPUName() do string matching on type, so this
cannot be modified.
Currently there is support in the x86 backend for barcelona.
For all other subtypes the assumed return value is amdfam10.

Fix: getHostCPUName() returns barcelona subtype and amdfam10 for all
others. This can be extended further when support for the other subtypes
is added.

Differential revision: http://reviews.llvm.org/D21193

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272333 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert 272328 and 272329 to recommit as a single patch.
Alina Sbirlea [Thu, 9 Jun 2016 23:04:05 +0000 (23:04 +0000)]
Revert 272328 and 272329 to recommit as a single patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272332 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoKeep barcelona subtype for amdfam10
Alina Sbirlea [Thu, 9 Jun 2016 22:47:36 +0000 (22:47 +0000)]
Keep barcelona subtype for amdfam10

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272329 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[cpu-detection] Return amdfam10 for all subtypes. Address Bug 28067.
Alina Sbirlea [Thu, 9 Jun 2016 22:47:12 +0000 (22:47 +0000)]
[cpu-detection] Return amdfam10 for all subtypes. Address Bug 28067.

Summary: Remove architecture subtype from the string returned by getHostCPUName(). String matching done on type.

Reviewers: llvm-commits, echristo

Subscribers: mehdi_amini

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272328 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[CMake] Cleanup ExternalProject usage of CMake 3.x features
Chris Bieneman [Thu, 9 Jun 2016 22:41:36 +0000 (22:41 +0000)]
[CMake] Cleanup ExternalProject usage of CMake 3.x features

All the ExternalProject features in use here are supported by CMake 3.4.3, so we don't need these version checks anymore.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272327 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoUse ProfileSummaryInfo in inline cost analysis.
Easwaran Raman [Thu, 9 Jun 2016 22:23:21 +0000 (22:23 +0000)]
Use ProfileSummaryInfo in inline cost analysis.

Instead of directly using MaxFunctionCount and function entry count to determine callee hotness, use the isHotFunction/isColdFunction methods provided by ProfileSummaryInfo.

Differential revision: http://reviews.llvm.org/D21045

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272321 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86][AVX512] Added avx512 VPSLLDQ/VPSRLDQ instruction comments
Simon Pilgrim [Thu, 9 Jun 2016 22:03:15 +0000 (22:03 +0000)]
[X86][AVX512] Added avx512 VPSLLDQ/VPSRLDQ instruction comments

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272319 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[LiveRangeEdit] Fix a crash in eliminateDeadDef.
Quentin Colombet [Thu, 9 Jun 2016 21:34:31 +0000 (21:34 +0000)]
[LiveRangeEdit] Fix a crash in eliminateDeadDef.

When we delete a live-range, we check if that live-range is the origin of others
to keep it around for rematerialization. For that we check that the instruction
we are about to remove is the same as the definition of the VNI of the original
live-range.
If this is the case, we just shrink the live-range to an empty one.

Now, when we try to delete one of the children of such live-range (product of
splitting), we do the same check.
However, now the original live-range is empty and there is no way we can
access the VNI to check its definition, and we crash.

When we cannot get the VNI for the original live-range, that means we are not in
the presence of the original definition. Thus, this check does not need to happen
in that case and the crash is sloved!

This bug was introduced in r266162 | wmi | 2016-04-12 20:08:27. It affects every
target that uses the greedy register allocator.
To happen, we need to delete both a the original instruction and its split
products, in that order. This is likely to happen when rematerialization comes
into play.

Trying to produce a more robust test case. Will follow in a coming commit.

This fixes llvm.org/PR27983.

rdar://problem/26651519

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272314 91177308-0d34-0410-b5e6-96231b3b80d8