OSDN Git Service

android-x86/external-llvm.git
8 years ago[NVPTX] Add intrinsics for shfl instructions.
Justin Lebar [Thu, 9 Jun 2016 20:04:08 +0000 (20:04 +0000)]
[NVPTX] Add intrinsics for shfl instructions.

Summary:
Currently clang emits these instructions via inline (volatile) asm in
the CUDA headers.  Switching to intrinsics will let the optimizer reason
across calls to these intrinsics.

Reviewers: tra

Subscribers: llvm-commits, jholewinski

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

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

8 years agoNFC cleanup of InitializePasses.h
Sanjoy Das [Thu, 9 Jun 2016 19:58:30 +0000 (19:58 +0000)]
NFC cleanup of InitializePasses.h

 - Alphabetically sort the initializeXXX calls (this was brought up in
   D21115)
 - Remove repeated function names from doxygen comments

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

8 years ago[NVPTX] Mark bar.sync intrinsic as convergent.
Justin Lebar [Thu, 9 Jun 2016 19:49:26 +0000 (19:49 +0000)]
[NVPTX] Mark bar.sync intrinsic as convergent.

Summary:
__syncthreads, which corresponds to bar.sync 0, is already convergent.
This makes the more general bar.sync n likewise convergent.

Reviewers: tra

Subscribers: llvm-commits, jholewinski

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

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

8 years ago[PM] Port LCSSA to the new PM.
Easwaran Raman [Thu, 9 Jun 2016 19:44:46 +0000 (19:44 +0000)]
[PM] Port LCSSA to the new PM.

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

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

8 years agoRevert "[lit] Use os.devnull instead of named temp files"
Vedant Kumar [Thu, 9 Jun 2016 19:36:48 +0000 (19:36 +0000)]
Revert "[lit] Use os.devnull instead of named temp files"

This reverts commit r272290. It breaks a test that depends on being able
to seek the /dev/null equivalent on Windows:

http://bb.pgr.jp/builders/ninja-clang-x64-mingw64-RA/builds/11360

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

8 years agoAMDGPU/SI: Fix 32-bit fdiv lowering
Wei Ding [Thu, 9 Jun 2016 19:17:15 +0000 (19:17 +0000)]
AMDGPU/SI: Fix 32-bit fdiv lowering

We were using the fast fdiv lowering for all division, implementation of
IEEE754 fdiv is added.

http://reviews.llvm.org/D20557

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

8 years ago[lit] Use os.devnull instead of named temp files
Vedant Kumar [Thu, 9 Jun 2016 18:38:41 +0000 (18:38 +0000)]
[lit] Use os.devnull instead of named temp files

Use os.devnull instead of tempfiles when substituting '/dev/null' on
Windows machines. This should make the bots just a bit speedier.

Thanks to Yunzhong Gao for testing this patch on Windows!

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

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

8 years ago[LV] Use vector phis for some secondary induction variables
Michael Kuperstein [Thu, 9 Jun 2016 18:03:15 +0000 (18:03 +0000)]
[LV] Use vector phis for some secondary induction variables

Previously, we materialized secondary vector IVs from the primary scalar IV,
by offseting the primary to match the correct start value, and then broadcasting
it - inside the loop body. Instead, we can use a real vector IV, like we do for
the primary.

This enables using vector IVs for secondary integer IVs whose type matches the
type of the primary.

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

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

8 years ago[CMake] Add LLVM_TOOLS_INSTALL_DIR to LLVMConfig.cmake
Chris Bieneman [Thu, 9 Jun 2016 17:22:02 +0000 (17:22 +0000)]
[CMake] Add LLVM_TOOLS_INSTALL_DIR to LLVMConfig.cmake

This is the more-correct fix to out-of-tree building. AddLLVM.cmake relies on this variable being set, so we should make sure it is set in LLVMConfig.cmake.

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

8 years agoAlso fix a typo. Need more coffee today.
Davide Italiano [Thu, 9 Jun 2016 17:06:01 +0000 (17:06 +0000)]
Also fix a typo. Need more coffee today.

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

8 years agoImprove r272262, check that __stack_chk_guard is used.
Davide Italiano [Thu, 9 Jun 2016 17:04:38 +0000 (17:04 +0000)]
Improve r272262, check that  __stack_chk_guard is used.

Thanks to Rafael for the suggestion.

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

8 years agoSelectionDAG: Implement expansion of {S,U}MIN/MAX in integer legalization
Jan Vesely [Thu, 9 Jun 2016 16:04:00 +0000 (16:04 +0000)]
SelectionDAG: Implement expansion of {S,U}MIN/MAX in integer legalization

Fixes {u,}long_{min,max,clamp} opencl piglit regressions on EG.

Reviewers: arsenm
Differential Revision: http://reviews.llvm.org/D17898

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

8 years agoPDB/Raw/Hash.h: try to fix VS2013 build
Hans Wennborg [Thu, 9 Jun 2016 15:33:06 +0000 (15:33 +0000)]
PDB/Raw/Hash.h: try to fix VS2013 build

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

8 years agoReapply "[MBP] Reduce code size by running tail merging in MBP.""
Haicheng Wu [Thu, 9 Jun 2016 15:24:29 +0000 (15:24 +0000)]
Reapply "[MBP] Reduce code size by running tail merging in MBP.""

This reapplies commit r271930, r271915, r271923.  They hit a bug in
Thumb which is fixed in r272258 now.

The original message:

The code layout that TailMerging (inside BranchFolding) works on is not the
final layout optimized based on the branch probability. Generally, after
BlockPlacement, many new merging opportunities emerge.

This patch calls Tail Merging after MBP and calls MBP again if Tail Merging
merges anything.

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

8 years ago[SystemZ] Enable long displacement constraints for inline ASM operands
Ulrich Weigand [Thu, 9 Jun 2016 15:19:16 +0000 (15:19 +0000)]
[SystemZ] Enable long displacement constraints for inline ASM operands

This enables use of the 'S' constraint for inline ASM operands on
SystemZ, which allows for a memory reference with a signed 20-bit
immediate displacement. This patch includes corresponding documentation
and test case updates.

I've changed the 'T' constraint to match the new behavior for 'S', as
'T' also uses a long displacement (though index constraints are still
not implemented). I also changed 'm' to match the behavior for 'S' as
this will allow for a wider range of displacements for 'm', though
correct me if that's not the right decision.

Author: colpell
Differential Revision: http://reviews.llvm.org/D21097

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

8 years agoMove stackguard test to X86/ directory as it's not generic.
Davide Italiano [Thu, 9 Jun 2016 15:16:58 +0000 (15:16 +0000)]
Move stackguard test to X86/ directory as it's not generic.

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

8 years ago[CodeGen] Change getSDagStackGuard to get an internal sym.
Davide Italiano [Thu, 9 Jun 2016 14:23:38 +0000 (14:23 +0000)]
[CodeGen] Change getSDagStackGuard to get an internal sym.

Fixes a crash in the backend during an LTO build of rtld(1) in
FreeBSD.

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

8 years ago[mips][microMIPS] Implement BOVC, BNVC, EXT, INS and JALRC instructions
Hrvoje Varga [Thu, 9 Jun 2016 12:57:23 +0000 (12:57 +0000)]
[mips][microMIPS] Implement BOVC, BNVC, EXT, INS and JALRC instructions
Differential Revision: http://reviews.llvm.org/D11798

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

8 years ago[Thumb] A branch is not part of an IT block
James Molloy [Thu, 9 Jun 2016 11:51:29 +0000 (11:51 +0000)]
[Thumb] A branch is not part of an IT block

ReplaceTailWithBranchTo assumed that if an instruction is predicated, it must be part of an IT block. This is not correct for conditional branches.

No testcase as this was triggered by the reverted patch r272017 - test coverage will occur when that patch is re-reverted and there is no known way to trigger this in the meantime.

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

8 years ago[AVX512] Remove masked_move/blendm intrinsic from back-end.
Igor Breger [Thu, 9 Jun 2016 11:46:55 +0000 (11:46 +0000)]
[AVX512] Remove masked_move/blendm intrinsic from back-end.
This is complement patch to D21060.

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

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

8 years ago[mips][microMIPS] Add CodeGen support for SEL.*, SELEQZ, SELNEZ, SELEQZ.*, SELNEZ...
Zlatko Buljan [Thu, 9 Jun 2016 11:15:53 +0000 (11:15 +0000)]
[mips][microMIPS] Add CodeGen support for SEL.*, SELEQZ, SELNEZ, SELEQZ.*, SELNEZ.* and CMP.condn.fmt instructions
Differential Revision: http://reviews.llvm.org/D20862

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

8 years ago[AMDGPU] Disassembler: Support for sdwa instructions
Sam Kolton [Thu, 9 Jun 2016 11:04:45 +0000 (11:04 +0000)]
[AMDGPU] Disassembler: Support for sdwa instructions

Reviewers: vpykhtin, tstellarAMD

Subscribers: arsenm, kzhuravl

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

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

8 years ago[llc] Remove exit-on-error flag from MIR tests (PR27770)
Diana Picus [Thu, 9 Jun 2016 10:31:05 +0000 (10:31 +0000)]
[llc] Remove exit-on-error flag from MIR tests (PR27770)

This is made possible by removing an assert in llc that assumed
MIRParser::parseLLVMModule would exit on error. MIRParser's documentation states
that it returns null if a parsing error occurs, so there's no reason to assert.
We can instead just fall through to where the check for a module is performed
and exit if it is null.

This commit is part of the clean-up after r269655.

Fixes PR27770

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

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

8 years ago[AVX512] Fix shuffle decode printing for several instructions with write masks. There...
Craig Topper [Thu, 9 Jun 2016 07:49:08 +0000 (07:49 +0000)]
[AVX512] Fix shuffle decode printing for several instructions with write masks. There are still more bugs here with UNPCK and PALIGN for sure. But these were the easiest ones to fix.

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

8 years ago[Thumb] Select a BIC instead of AND if the immediate can be encoded more optimally...
James Molloy [Thu, 9 Jun 2016 07:39:08 +0000 (07:39 +0000)]
[Thumb] Select a BIC instead of AND if the immediate can be encoded more optimally negated

If an immediate is only used in an AND node, it is possible that the immediate can be more optimally materialized when negated. If this is the case, we can negate the immediate and use a BIC instead;

  int i(int a) {
    return a & 0xfffffeec;
  }

Used to produce:
    ldr r1, [CONSTPOOL]
    ands r0, r1
  CONSTPOOL: 0xfffffeec

And now produces:
    movs    r1, #255
    adds    r1, #20  ; Less costly immediate generation
    bics    r0, r1

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

8 years ago[X86] Fix a test I failed to re-generate in r272249.
Craig Topper [Thu, 9 Jun 2016 07:10:34 +0000 (07:10 +0000)]
[X86] Fix a test I failed to re-generate in r272249.

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

8 years ago[X86] Bring consistent naming to the SSE/AVX and AVX512 PALIGNR instructions. Then...
Craig Topper [Thu, 9 Jun 2016 07:06:38 +0000 (07:06 +0000)]
[X86] Bring consistent naming to the SSE/AVX and AVX512 PALIGNR instructions. Then add shuffle decode printing for the EVEX forms which is made easier by having the naming structure more similar to other instructions.

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

8 years ago[X86] Fix bad comment in assert. NFC
Craig Topper [Thu, 9 Jun 2016 07:06:33 +0000 (07:06 +0000)]
[X86] Fix bad comment in assert. NFC

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

8 years agoRevert r272194 No need for it if loop Analysis Manager is used
Xinliang David Li [Thu, 9 Jun 2016 03:22:39 +0000 (03:22 +0000)]
Revert r272194 No need for it if loop Analysis Manager is used

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

8 years agotest: fix typo
Saleem Abdulrasool [Thu, 9 Jun 2016 03:14:32 +0000 (03:14 +0000)]
test: fix typo

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

8 years agoAArch64: support the `.arch` directive in the IAS
Saleem Abdulrasool [Thu, 9 Jun 2016 02:56:40 +0000 (02:56 +0000)]
AArch64: support the `.arch` directive in the IAS

Add support to the AArch64 IAS for the `.arch` directive.  This allows the
assembly input to use architectural functionality in part of a file.  This is
used in existing code like BoringSSL.

Resolves PR26016!

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

8 years ago[libFuzzer] add one more OOM test, which we currently don't handle very well
Kostya Serebryany [Thu, 9 Jun 2016 01:20:35 +0000 (01:20 +0000)]
[libFuzzer] add one more OOM test, which we currently don't handle very well

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

8 years ago[ThinLTO/gold] Enable summary-based internalization
Teresa Johnson [Thu, 9 Jun 2016 01:14:13 +0000 (01:14 +0000)]
[ThinLTO/gold] Enable summary-based internalization

Summary: Enable existing summary-based importing support in the gold-plugin.

Reviewers: mehdi_amini

Subscribers: llvm-commits, mehdi_amini

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

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

8 years agoMinor clean up in loopHasNoAbnormalExits; NFC
Sanjoy Das [Thu, 9 Jun 2016 01:14:03 +0000 (01:14 +0000)]
Minor clean up in loopHasNoAbnormalExits; NFC

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

8 years agoBe wary of abnormal exits from loop when exploiting UB
Sanjoy Das [Thu, 9 Jun 2016 01:13:59 +0000 (01:13 +0000)]
Be wary of abnormal exits from loop when exploiting UB

We can safely rely on a NoWrap add recurrence causing UB down the road
only if we know the loop does not have a exit expressed in a way that is
opaque to ScalarEvolution (e.g. by a function call that conditionally
calls exit(0)).

I believe with this change PR28012 is fixed.

Note: I had to change some llvm-lit tests in LoopReroll, since it looks
like they were depending on this incorrect behavior.

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

8 years agoFactor out a loopHasNoAbnormalExits; NFC
Sanjoy Das [Thu, 9 Jun 2016 01:13:54 +0000 (01:13 +0000)]
Factor out a loopHasNoAbnormalExits; NFC

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

8 years agoSearch for llvm-symbolizer binary in the same directory as argv[0], before
Richard Smith [Thu, 9 Jun 2016 00:53:21 +0000 (00:53 +0000)]
Search for llvm-symbolizer binary in the same directory as argv[0], before
looking for it along $PATH. This allows installs of LLVM tools outside of
$PATH to find the symbolizer and produce pretty backtraces if they crash.

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

8 years ago[codeview] Skip DIGlobalVariables with no variable
Reid Kleckner [Thu, 9 Jun 2016 00:29:00 +0000 (00:29 +0000)]
[codeview] Skip DIGlobalVariables with no variable

They have probably been discarded during optimization.

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

8 years ago[pdbdump-fuzzer] Try to fix build errors in fuzzer.
Zachary Turner [Thu, 9 Jun 2016 00:21:37 +0000 (00:21 +0000)]
[pdbdump-fuzzer] Try to fix build errors in fuzzer.

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

8 years ago[pdbdump] Verify part of TPI hash streams.
Rui Ueyama [Thu, 9 Jun 2016 00:10:19 +0000 (00:10 +0000)]
[pdbdump] Verify part of TPI hash streams.

TPI hash table contains a parallel array for the type records.
For each type record R, a hash value is calculated by `H(R) % NumBuckets`
where H is a hash function, and the result is stored to a bucket element.
H is TPI1::hashPrec function in microsoft-pdb repository.

Our hash function does not support all type record types yet.
Currently it supports only records for line number.
I'll extend it in a follow up patch.

The aim of verify the hash table is not only detect corrupted files.
It ensures that our understanding of how the hash values are calculated
is correct.

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

8 years ago[cpu-detection] Add missing break statements in outer switches
Alina Sbirlea [Thu, 9 Jun 2016 00:08:15 +0000 (00:08 +0000)]
[cpu-detection] Add missing break statements in outer switches

Summary:
Break on all switch cases for outer and inner switches.
No functionality changed.

Reviewers: llvm-commits, sanjoy

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

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

8 years ago[MIR] Check that generic virtual registers get a size.
Quentin Colombet [Wed, 8 Jun 2016 23:27:46 +0000 (23:27 +0000)]
[MIR] Check that generic virtual registers get a size.

Without that check it was possible to write test cases where the size
was not specified and we ended up with weird asserts down the road,
because the default value (1) would not make sense.

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

8 years agoFunction names should start with lowercase letters.
Rui Ueyama [Wed, 8 Jun 2016 23:15:09 +0000 (23:15 +0000)]
Function names should start with lowercase letters.

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

8 years ago[LoopSimplify] Preserve LCSSA when merging exit blocks.
Michael Zolotukhin [Wed, 8 Jun 2016 23:13:21 +0000 (23:13 +0000)]
[LoopSimplify] Preserve LCSSA when merging exit blocks.

Summary:
This fixes PR26682. Also add LCSSA as a preserved pass to LoopSimplify,
that looks correct to me and allows to write a test for the issue.

Reviewers: chandlerc, bogner, sanjoy

Subscribers: llvm-commits

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

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

8 years ago[PDB] Move PDB functions to a separate file.
Rui Ueyama [Wed, 8 Jun 2016 23:11:14 +0000 (23:11 +0000)]
[PDB] Move PDB functions to a separate file.

We are going to use the hash functions from TPI streams.

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

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

8 years ago[LoopUnroll] Check that DT is available before trying to verify it.
Michael Zolotukhin [Wed, 8 Jun 2016 22:49:59 +0000 (22:49 +0000)]
[LoopUnroll] Check that DT is available before trying to verify it.

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

8 years ago[CMake] Cleanup version check for 2.8.11
Chris Bieneman [Wed, 8 Jun 2016 22:48:12 +0000 (22:48 +0000)]
[CMake] Cleanup version check for 2.8.11

We are always greater than CMake 2.8.11, so we don't need this check.

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

8 years ago[CMake] Cleanup version check for 2.8.12
Chris Bieneman [Wed, 8 Jun 2016 22:48:01 +0000 (22:48 +0000)]
[CMake] Cleanup version check for 2.8.12

Since we're always greater than 2.8.12, we don't need this check anymore.

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

8 years ago[CMake] Cleanup version checks for CMake 3.0
Chris Bieneman [Wed, 8 Jun 2016 22:38:30 +0000 (22:38 +0000)]
[CMake] Cleanup version checks for CMake 3.0

This just removes some redundant checks and updates warning text.

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

8 years agocmake: Simplify add_lit_testsuites
Justin Bogner [Wed, 8 Jun 2016 22:36:37 +0000 (22:36 +0000)]
cmake: Simplify add_lit_testsuites

cmake 3.4 introduced LIST_DIRECTORIES to glob recurse, which can be
used to simplify this code greatly.

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

8 years ago[CMake] Cleanup uses of USES_TERMINAL
Chris Bieneman [Wed, 8 Jun 2016 22:19:25 +0000 (22:19 +0000)]
[CMake] Cleanup uses of USES_TERMINAL

Now that we are on CMake 3.4.3 we no longer need a version check around this.

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

8 years ago[RegBankSelect] Print out the actual mapping of the operands.
Quentin Colombet [Wed, 8 Jun 2016 21:55:30 +0000 (21:55 +0000)]
[RegBankSelect] Print out the actual mapping of the operands.

This improves the debuggability of the pass.

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

8 years ago[RegBankSelect] Remove a debug print of a potentially dead instruction.
Quentin Colombet [Wed, 8 Jun 2016 21:55:29 +0000 (21:55 +0000)]
[RegBankSelect] Remove a debug print of a potentially dead instruction.

For complex rewrittings, which do not occur currently, the related
machine instruction may have been deleted in the process. Therefore, do
not try to print it after the mapping is applied.

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

8 years ago[RegisterBankInfo] Avoid code duplication in OperandsMapper for the computation of...
Quentin Colombet [Wed, 8 Jun 2016 21:55:26 +0000 (21:55 +0000)]
[RegisterBankInfo] Avoid code duplication in OperandsMapper for the computation of the end of range.

Refactor the code so that we do not compute in two different places the
end iterator for the range of new virtual registers for a given operand.
Although this refactoring was intended as NFC, this is not the case
because it actually fixes a bug where we were returning a range off by 1
(too long). Right now, this could not result in an actual bug because we
were accessing this range via the BreakDown size of the related operand.

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

8 years ago[RegisterBankInfo] Add dump/print methods for OperandsMapper.
Quentin Colombet [Wed, 8 Jun 2016 21:55:23 +0000 (21:55 +0000)]
[RegisterBankInfo] Add dump/print methods for OperandsMapper.

Improve debuggability of the OperandsMapper helper class.

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

8 years ago[SLPVectorizer] Handle GEP with differing constant index types
Michael Zolotukhin [Wed, 8 Jun 2016 21:55:16 +0000 (21:55 +0000)]
[SLPVectorizer] Handle GEP with differing constant index types

Summary:
This fixes PR27617.

Bug description: The SLPVectorizer asserts on encountering GEPs with different index types, such as i8 and i64.

The patch includes a simple relaxation of the assert to allow constants being of different types, along with a regression test that will provoke the unrelaxed assert.

Reviewers: nadav, mzolotukhin

Subscribers: JesperAntonsson, llvm-commits, mzolotukhin

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

Patch by Jesper Antonsson!

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

8 years ago[PM] Add missing caching of GlobalsAA to EarlyCSE.
Davide Italiano [Wed, 8 Jun 2016 21:31:55 +0000 (21:31 +0000)]
[PM] Add missing caching of GlobalsAA to EarlyCSE.

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

8 years agoRevive http://reviews.llvm.org/D12778 to handle forward-hot-prob and backward-hot...
Dehao Chen [Wed, 8 Jun 2016 21:30:12 +0000 (21:30 +0000)]
Revive reviews.llvm.org/D12778 to handle forward-hot-prob and backward-hot-prob consistently.

Summary:
Consider the following diamond CFG:

 A
/ \
B C
 \/
 D

Suppose A->B and A->C have probabilities 81% and 19%. In block-placement, A->B is called a hot edge and the final placement should be ABDC. However, the current implementation outputs ABCD. This is because when choosing the next block of B, it checks if Freq(C->D) > Freq(B->D) * 20%, which is true (if Freq(A) = 100, then Freq(B->D) = 81, Freq(C->D) = 19, and 19 > 81*20%=16.2). Actually, we should use 25% instead of 20% as the probability here, so that we have 19 < 81*25%=20.25, and the desired ABDC layout will be generated.

Reviewers: djasper, davidxl

Subscribers: llvm-commits

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

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

8 years ago[CMake] Fixing a typo
Chris Bieneman [Wed, 8 Jun 2016 21:22:03 +0000 (21:22 +0000)]
[CMake] Fixing a typo

This was called out on the list a long time ago and just got pointed out to me again. Need to fix it before I forget.

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

8 years ago[CMake] Support overriding binary install directory
Chris Bieneman [Wed, 8 Jun 2016 21:19:26 +0000 (21:19 +0000)]
[CMake] Support overriding binary install directory

This patch adds a new option LLVM_TOOLS_INSTALL_DIR which allows customizing the location executables and symlinks get installed to. This adds the functionality provided by autoconf's --bindir flag.

This patch is based on patches from and collaboration with Tony Kelman, and replaces http://reviews.llvm.org/D20934.

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

8 years ago[InstCombine] move fold of select of add/sub to helper function; NFCI
Sanjay Patel [Wed, 8 Jun 2016 21:10:01 +0000 (21:10 +0000)]
[InstCombine] move fold of select of add/sub to helper function; NFCI

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

8 years ago[DebugInfo] Add calling convention support for DWARF and CodeView
Reid Kleckner [Wed, 8 Jun 2016 20:34:29 +0000 (20:34 +0000)]
[DebugInfo] Add calling convention support for DWARF and CodeView

Summary:
Now DISubroutineType has a 'cc' field which should be a DW_CC_ enum.  If
it is present and non-zero, the backend will emit it as a
DW_AT_calling_convention attribute. On the CodeView side, we translate
it to the appropriate enum for the LF_PROCEDURE record.

I added a new LLVM vendor specific enum to the list of DWARF calling
conventions. DWARF does not appear to attempt to standardize these, so I
assume it's OK to do this until we coordinate with GCC on how to emit
vectorcall convention functions.

Reviewers: dexonsmith, majnemer, aaboud, amccarth

Subscribers: mehdi_amini, llvm-commits

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

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

8 years ago[InstCombine] fix outdated comment, simplify logic; NFCI
Sanjay Patel [Wed, 8 Jun 2016 20:31:52 +0000 (20:31 +0000)]
[InstCombine] fix outdated comment, simplify logic; NFCI

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

8 years agoThe patch set unroll disable pragma when unroll
Evgeny Stupachenko [Wed, 8 Jun 2016 20:21:24 +0000 (20:21 +0000)]
The patch set unroll disable pragma when unroll
with user specified count has been applied.

Summary:
Previously SetLoopAlreadyUnrolled() set the disable pragma only if
there was some loop metadata.
Now it set the pragma in all cases. This helps to prevent multiple
unroll when -unroll-count=N is given.

Reviewers: mzolotukhin

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

From: Evgeny Stupachenko <evstupac@gmail.com>

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

8 years ago[PM] Refector LoopAccessInfo analysis code
Xinliang David Li [Wed, 8 Jun 2016 20:15:37 +0000 (20:15 +0000)]
[PM] Refector LoopAccessInfo analysis code

This is the preparation patch to port the analysis to new PM

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

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

8 years ago[InstCombine] reduce indent; NFC
Sanjay Patel [Wed, 8 Jun 2016 20:09:04 +0000 (20:09 +0000)]
[InstCombine] reduce indent; NFC

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

8 years ago[MemCpyOpt] Do not exchange llvm.lifetime.start and llvm.memcpy
Tim Shen [Wed, 8 Jun 2016 19:42:32 +0000 (19:42 +0000)]
[MemCpyOpt] Do not exchange llvm.lifetime.start and llvm.memcpy

Reviewers: iteratee

Subscribers: llvm-commits

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

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

8 years ago[InstCombine] use copyIRFlags() ; NFCI
Sanjay Patel [Wed, 8 Jun 2016 19:33:52 +0000 (19:33 +0000)]
[InstCombine] use copyIRFlags() ; NFCI

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

8 years agoApply most suggestions of clang-tidy's performance-unnecessary-value-param
Benjamin Kramer [Wed, 8 Jun 2016 19:09:22 +0000 (19:09 +0000)]
Apply most suggestions of clang-tidy's performance-unnecessary-value-param

Avoids unnecessary copies. All changes audited & pass tests with asan.
No functional change intended.

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

8 years agoGenerate codeview for array type metadata.
Adrian McCarthy [Wed, 8 Jun 2016 18:22:59 +0000 (18:22 +0000)]
Generate codeview for array type metadata.

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

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

8 years ago[CodeView] Remove manual expansion of the default copy ctor.
Benjamin Kramer [Wed, 8 Jun 2016 18:19:38 +0000 (18:19 +0000)]
[CodeView] Remove manual expansion of the default copy ctor.

It provides nothing over the default one but makes the class not
trivially copyable. No functionality change intended.

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

8 years agoAttempt #2 to appease the buildbots.
George Burgess IV [Wed, 8 Jun 2016 17:56:35 +0000 (17:56 +0000)]
Attempt #2 to appease the buildbots.

MSVC calls the copy ctor on StratifiedSets for some reason. So,
undelete it.

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

8 years ago[codeview] Avoid emitting an empty file checksum table
Reid Kleckner [Wed, 8 Jun 2016 17:50:29 +0000 (17:50 +0000)]
[codeview] Avoid emitting an empty file checksum table

Again, the Microsoft linker does not like empty substreams.

We still emit an empty string table if CodeView is enabled, but that
doesn't cause problems because it always contains at least one null
byte.

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

8 years ago[SCEV] Break out of loop if there is no more work to do
Sanjoy Das [Wed, 8 Jun 2016 17:48:46 +0000 (17:48 +0000)]
[SCEV] Break out of loop if there is no more work to do

This is NFC as far as externally visible behavior is concerned, but will
keep us from spinning in the worklist traversal algorithm unnecessarily.

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

8 years ago[SCEV] Track no-abnormal-exits instead of no-throw calls
Sanjoy Das [Wed, 8 Jun 2016 17:48:42 +0000 (17:48 +0000)]
[SCEV] Track no-abnormal-exits instead of no-throw calls

Absence of may-unwind calls is not enough to guarantee that a
UB-generating use of an add-rec poison in the loop latch will actually
cause UB.  We also need to guard against calls that terminate the thread
or infinite loop themselves.

This partially addresses PR28012.

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

8 years agoTeach isGuarantdToTransferExecToSuccessor about debug info intrinsics
Sanjoy Das [Wed, 8 Jun 2016 17:48:36 +0000 (17:48 +0000)]
Teach isGuarantdToTransferExecToSuccessor about debug info intrinsics

Calls to `@llvm.dbg.*` can be assumed to terminate.

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

8 years agoFix a bug in SCEV's poison value propagation
Sanjoy Das [Wed, 8 Jun 2016 17:48:31 +0000 (17:48 +0000)]
Fix a bug in SCEV's poison value propagation

The worklist algorithm introduced in rL271151 didn't check to see if the
direct users of the post-inc add recurrence propagates poison.  This
change fixes the problem and makes the code structure more obvious.

Note for release managers: correctness wise, this bug wasn't a
regression introduced by rL271151 -- the behavior of SCEV around
post-inc add recurrences was strictly improved (in terms of correctness)
in rL271151.

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

8 years ago[RegBankSelect] Silence an unused variable warning in release mode.
Quentin Colombet [Wed, 8 Jun 2016 17:39:47 +0000 (17:39 +0000)]
[RegBankSelect] Silence an unused variable warning in release mode.

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

8 years ago[RegBankSelect] Comment on how we could improve repairing with copies.
Quentin Colombet [Wed, 8 Jun 2016 17:39:43 +0000 (17:39 +0000)]
[RegBankSelect] Comment on how we could improve repairing with copies.

When repairing with a copy, instead of accounting for the cost of that
copy and actually inserting it, we may be able to use an alternative
source for the register to repair and just use it.

Make sure this is documented, so that we consider that opportunity at
some point.

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

8 years ago[pdb] Fix build errors in PDB unit tests.
Zachary Turner [Wed, 8 Jun 2016 17:32:25 +0000 (17:32 +0000)]
[pdb] Fix build errors in PDB unit tests.

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

8 years agoTry to appease buildbots.
George Burgess IV [Wed, 8 Jun 2016 17:27:14 +0000 (17:27 +0000)]
Try to appease buildbots.

r272064 apparently made them angry. This undoes some changes made in
r272064 (defaulting move ctors) to make them happy again.

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

8 years ago[pdb] Handle stream index errors better.
Zachary Turner [Wed, 8 Jun 2016 17:26:39 +0000 (17:26 +0000)]
[pdb] Handle stream index errors better.

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

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

8 years agoRemove a patch .rej file.
Rui Ueyama [Wed, 8 Jun 2016 16:54:31 +0000 (16:54 +0000)]
Remove a patch .rej file.

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

8 years ago[AArch64][RegisterBankInfo] G_OR are fine on either GPR or FPR.
Quentin Colombet [Wed, 8 Jun 2016 16:53:32 +0000 (16:53 +0000)]
[AArch64][RegisterBankInfo] G_OR are fine on either GPR or FPR.

Teach AArch64RegisterBankInfo that G_OR can be mapped on either GPR or
FPR for 64-bit or 32-bit values.

Add test cases demonstrating how this information is used to coalesce a
computation on a single register bank.

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

8 years ago[RegBankSelect] Use RegisterBankInfo applyMapping method.
Quentin Colombet [Wed, 8 Jun 2016 16:45:04 +0000 (16:45 +0000)]
[RegBankSelect] Use RegisterBankInfo applyMapping method.

The RegBankSelect pass can now rely on the target to do the remapping of
the instructions.

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

8 years ago[ProfileData] Update llvm's copy of InstrProfData.inc
Vedant Kumar [Wed, 8 Jun 2016 16:39:32 +0000 (16:39 +0000)]
[ProfileData] Update llvm's copy of InstrProfData.inc

The new version of the header introduces the INSTR_PROF_VISIBILITY
macro. See http://reviews.llvm.org/D21116 for more details.

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

8 years ago[RegisterBankInfo] Implement the method to apply a mapping.
Quentin Colombet [Wed, 8 Jun 2016 16:39:21 +0000 (16:39 +0000)]
[RegisterBankInfo] Implement the method to apply a mapping.

Now, the target will be able to provide its how implementation to remap
an instruction. This open the way to crazier optimizations, but to
beginning with, we will be able to handle something else than the
default mapping.

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

8 years ago[RegBankSelect] Use the OperandMapper class to hold remap information.
Quentin Colombet [Wed, 8 Jun 2016 16:30:55 +0000 (16:30 +0000)]
[RegBankSelect] Use the OperandMapper class to hold remap information.

Now that we have an entity that hold the remap information the
rewritting should be easier to do.

No functional changes.

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

8 years ago[RegBankSelect] Use const_iterator instead of iterator for repairReg.
Quentin Colombet [Wed, 8 Jun 2016 16:24:55 +0000 (16:24 +0000)]
[RegBankSelect] Use const_iterator instead of iterator for repairReg.

The repairing code has no reason to change the source or destination of
the registers.

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

8 years ago[RegisterBankInfo] Introduce OperandsMapper class.
Quentin Colombet [Wed, 8 Jun 2016 16:18:13 +0000 (16:18 +0000)]
[RegisterBankInfo] Introduce OperandsMapper class.

This helper class is used to encapsulate the necessary information
to remap an instruction.

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

8 years ago[Target] Introduce a generic opcode for bitwise OR: G_OR.
Quentin Colombet [Wed, 8 Jun 2016 16:12:19 +0000 (16:12 +0000)]
[Target] Introduce a generic opcode for bitwise OR: G_OR.

This G_OR is used in GlobalISel to represent bitwise OR.

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

8 years ago[RegBankSelect] Introduce a command line option to override the running mode.
Quentin Colombet [Wed, 8 Jun 2016 15:49:23 +0000 (15:49 +0000)]
[RegBankSelect] Introduce a command line option to override the running mode.

When the command line option is set, it overrides any thing that the
target may have set. The rationale is that we get what we asked for.

Options are respectively regbankselect-fast and regbankselect-greedy for
fast and greedy mode.

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

8 years ago[RegBankSelect] Explain what it would take to support non-copy
Quentin Colombet [Wed, 8 Jun 2016 15:40:32 +0000 (15:40 +0000)]
[RegBankSelect] Explain what it would take to support non-copy
repairing.

Copies are easy because we repair only when there is a mismatch. For
non-copy repairing, i.e., cases that involves breaking down or gathering
up the value, one of the operand may not have a register bank yet. Thus,
derivate a cost from that, requires more work.

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

8 years ago[ARM] MSR instructions implicitly set CPSR
Oliver Stannard [Wed, 8 Jun 2016 15:26:34 +0000 (15:26 +0000)]
[ARM] MSR instructions implicitly set CPSR

The MSR instructions can write to the CPSR, but we did not model this
fact, so we could emit them in the middle of IT blocks, changing the
condition flags for later instructions in the block.

The tests use two calls to llvm.write_register.i32 because it is valid
to use these instructions at the end of an IT block, which if conversion
does do in some cases. With two calls, the first clobbers the flags, so
a branch has to be used to make the second one conditional.

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

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

8 years ago[lit] Ensure we get bytes when reading redirected output files.
Daniel Dunbar [Wed, 8 Jun 2016 14:41:44 +0000 (14:41 +0000)]
[lit] Ensure we get bytes when reading redirected output files.

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

8 years agoSupport: correct AArch64 TargetParser implementation
Saleem Abdulrasool [Wed, 8 Jun 2016 14:30:00 +0000 (14:30 +0000)]
Support: correct AArch64 TargetParser implementation

The architecture enumeration is shared across ARM and AArch64.  However, the
data is not.  The code incorrectly would index into the array using the
architecture index which was offset by the ARMv7 architecture enumeration.  We
do not have a marker for indicating the architectural family to which the
enumeration belongs so we cannot be clever about offsetting the index (at least
it is not immediately apparent to me).  Instead, fall back to the tried-and-true
method of slowly iterating the array (its not a large array, so the impact of
this is not too high).

Because of the incorrect indexing, if we were lucky, we would crash, but usually
we would return an invalid StringRef.  We did not have any tests for the AArch64
target parser previously;.  Extend the previous tests I had added for ARM to
cover AArch64 for ensuring that we return expected StringRefs.

Take the opportunity to change some iterator types to references.

This work is needed to support parsing `.arch name` directives in the AArch64
target asm parser.

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

8 years ago[PM] LoopSimplify. Remove unneeded pass dependencies. NFCI.
Davide Italiano [Wed, 8 Jun 2016 13:56:59 +0000 (13:56 +0000)]
[PM] LoopSimplify. Remove unneeded pass dependencies. NFCI.

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

8 years ago[PM/SimplifyCFG] Preserve GlobalsAA even if the IR is mutated.
Davide Italiano [Wed, 8 Jun 2016 13:32:23 +0000 (13:32 +0000)]
[PM/SimplifyCFG] Preserve GlobalsAA even if the IR is mutated.

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

8 years ago[mips] Add a proper file header in MipsFastISel.cpp
Vasileios Kalintiris [Wed, 8 Jun 2016 13:13:15 +0000 (13:13 +0000)]
[mips] Add a proper file header in MipsFastISel.cpp

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

8 years ago[Hexagon] Modify HexagonExpandCondsets to handle subregisters
Krzysztof Parzyszek [Wed, 8 Jun 2016 12:31:16 +0000 (12:31 +0000)]
[Hexagon] Modify HexagonExpandCondsets to handle subregisters

Also, switch to using functions from LiveIntervalAnalysis to update
live intervals, instead of performing the updates manually.

Re-committing r272045.

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