oota-llvm.git
9 years agoUpdate to r237520 - swap order of CHECK-NEXT lines.
James Molloy [Sat, 16 May 2015 13:26:25 +0000 (13:26 +0000)]
Update to r237520 - swap order of CHECK-NEXT lines.

... I'd copied the check-next lines from a previous test so they were
slightly wrong, and had managed to test the wrong source tree. D'oh!

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

9 years agoReapply r237453 with a fix for the test timeouts.
James Molloy [Sat, 16 May 2015 13:10:45 +0000 (13:10 +0000)]
Reapply r237453 with a fix for the test timeouts.

The test timeouts were due to instcombine fighting itself. Regression test added.
Original log message:

Canonicalize min/max expressions correctly.

This patch introduces a canonical form for min/max idioms where one operand
is extended or truncated. This often happens when the other operand is a
constant. For example:

  %1 = icmp slt i32 %a, i32 0
    %2 = sext i32 %a to i64
      %3 = select i1 %1, i64 %2, i64 0

Would now be canonicalized into:

  %1 = icmp slt i32 %a, i32 0
    %2 = select i1 %1, i32 %a, i32 0
      %3 = sext i32 %2 to i64

This builds upon a patch posted by David Majenemer
(https://www.marc.info/?l=llvm-commits&m=143008038714141&w=2). That pass
passively stopped instcombine from ruining canonical patterns. This
patch additionally actively makes instcombine canonicalize too.

Canonicalization of expressions involving a change in type from int->fp
or fp->int are not yet implemented.

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

9 years ago[x86] Distinguish the 'o', 'v', 'X', and 'i' inline assembly memory constraints.
Daniel Sanders [Sat, 16 May 2015 12:09:54 +0000 (12:09 +0000)]
[x86] Distinguish the 'o', 'v', 'X', and 'i' inline assembly memory constraints.

Summary:
But still handle them the same way since I don't know how they differ on
this target.

Of these, 'o' and 'v' are not tested but were already implemented.

I'm not sure why 'i' is required for X86 since it's supposed to be an
immediate constraint rather than a memory constraint. A test asserts
without it so I've included it for now.

No functional change intended.

Reviewers: nadav

Subscribers: llvm-commits

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

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

9 years agoImprove check on git-svnrevert, better error message
Renato Golin [Sat, 16 May 2015 10:23:48 +0000 (10:23 +0000)]
Improve check on git-svnrevert, better error message

When the commit is not in the tree at all, find-rev returns 0
and prints an empty string. We need to catch that problem too,
when trying to revert.

Adding a list of possible problems, so that you can easily and
quickly correct without having to edit the script again.

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

9 years ago[TableGen] Change 'car' to 'head' and 'cdr' to 'tail' in assert comments. These were...
Craig Topper [Sat, 16 May 2015 05:42:13 +0000 (05:42 +0000)]
[TableGen] Change 'car' to 'head' and 'cdr' to 'tail' in assert comments. These were the old names for these operations long ago. NFC

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

9 years ago[TableGen] Remove !! that I can't really explain why I wrote. Also remove some unnece...
Craig Topper [Sat, 16 May 2015 05:42:11 +0000 (05:42 +0000)]
[TableGen] Remove !! that I can't really explain why I wrote. Also remove some unnecessary curly braces from the same area.

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

9 years agoCorrect indentation. NFC
Craig Topper [Sat, 16 May 2015 05:42:08 +0000 (05:42 +0000)]
Correct indentation. NFC

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

9 years ago[TableGen] Restructure a loop to make it exit early instead of skipping a portion...
Craig Topper [Sat, 16 May 2015 05:42:03 +0000 (05:42 +0000)]
[TableGen] Restructure a loop to make it exit early instead of skipping a portion of the body based on what will also be the terminating condition. NFC

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

9 years agoMachineSink: Collect registers before clearing their killflags.
Matthias Braun [Sat, 16 May 2015 03:11:07 +0000 (03:11 +0000)]
MachineSink: Collect registers before clearing their killflags.

Currently whenever we sink any instruction, we do clearKillFlags for
every use of every use operand for that instruction, apparently there
are a lot of duplication, therefore compile time penalties.

This patch collect all the interested registers first, do clearKillFlags
for it all together at once at the end, so we only need to do
clearKillFlags once for one register, duplication is avoided.

Patch by Lawrence Hu!

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

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

9 years ago[MemCpyOpt] Turn memcpy from just-memset'd source into memset.
Ahmed Bougacha [Sat, 16 May 2015 01:32:26 +0000 (01:32 +0000)]
[MemCpyOpt] Turn memcpy from just-memset'd source into memset.

There's no point in copying around constants, so, when all else fails,
we can still transform memcpy of memset into two independent memsets.

To quote the example, we can turn:
  memset(dst1, c, dst1_size);
  memcpy(dst2, dst1, dst2_size);
into:
  memset(dst1, c, dst1_size);
  memset(dst2, c, dst2_size);
When dst2_size <= dst1_size.

Like r235232 for copy constructors, this can occur in move constructors.

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

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

9 years ago[MemCpyOpt] Remove dead argument. NFC.
Ahmed Bougacha [Sat, 16 May 2015 01:23:47 +0000 (01:23 +0000)]
[MemCpyOpt] Remove dead argument. NFC.

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

9 years agoMC: Use MCSymbol in RelAndSymbol, NFC
Duncan P. N. Exon Smith [Sat, 16 May 2015 01:14:19 +0000 (01:14 +0000)]
MC: Use MCSymbol in RelAndSymbol, NFC

Switch from `MCSymbolData` to `MCSymbol`.

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

9 years agoRemove dead code in testcase. NFC.
Ahmed Bougacha [Sat, 16 May 2015 01:10:40 +0000 (01:10 +0000)]
Remove dead code in testcase. NFC.

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

9 years ago[PPC64] Add vector pack/unpack support from ISA 2.07
Bill Schmidt [Sat, 16 May 2015 01:02:12 +0000 (01:02 +0000)]
[PPC64] Add vector pack/unpack support from ISA 2.07

This patch adds support for the following new instructions in the
Power ISA 2.07:

  vpksdss
  vpksdus
  vpkudus
  vpkudum
  vupkhsw
  vupklsw

These instructions are available through the vec_packs, vec_packsu,
vec_unpackh, and vec_unpackl built-in interfaces.  These are
lane-sensitive instructions, so the built-ins have different
implementations for big- and little-endian, and the instructions must
be marked as killing the vector swap optimization for now.

The first three instructions perform saturating pack operations.  The
fourth performs a modulo pack operation, which means it can be
represented with a vector shuffle, and conversely the appropriate
vector shuffles may cause this instruction to be generated.  The other
instructions are only generated via built-in support for now.

Appropriate tests have been added.

There is a companion patch to clang for the rest of this support.

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

9 years agoMC: Use MCSymbol in MCObject::IsSymbolRefDifferenceFullyResolvedImpl()
Duncan P. N. Exon Smith [Sat, 16 May 2015 01:01:55 +0000 (01:01 +0000)]
MC: Use MCSymbol in MCObject::IsSymbolRefDifferenceFullyResolvedImpl()

Transition one API from `MCSymbolData` to `MCSymbol`.  The function
needs both, and the backpointer from `MCSymbolData` to `MCSymbol` is
going away.

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

9 years agoMC: Change MCFragment::Atom to an MCSymbol, NFC
Duncan P. N. Exon Smith [Sat, 16 May 2015 00:48:58 +0000 (00:48 +0000)]
MC: Change MCFragment::Atom to an MCSymbol, NFC

Change `MCFragment::Atom` from an `MCSymbolData` to an `MCSymbol`,
moving in the direction of removing the back-pointer.

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

9 years agoMC: Change MCAssembler::Symbols to store MCSymbol, NFC
Duncan P. N. Exon Smith [Sat, 16 May 2015 00:35:24 +0000 (00:35 +0000)]
MC: Change MCAssembler::Symbols to store MCSymbol, NFC

Instead of storing a list of the `MCSymbolData` in use, store the
`MCSymbol`s.  Churning in the direction of removing the back pointer
from `MCSymbolData`.

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

9 years ago[BitcodeReader] Don't allow INSERTVAL/EXTRACTVAL with 0 indices
Filipe Cabecinhas [Sat, 16 May 2015 00:33:12 +0000 (00:33 +0000)]
[BitcodeReader] Don't allow INSERTVAL/EXTRACTVAL with 0 indices

This would trigger an assertion later.

Bug found with AFL fuzz.

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

9 years agoMC: Merge MCSymbol and MCSymbolData
Duncan P. N. Exon Smith [Sat, 16 May 2015 00:03:06 +0000 (00:03 +0000)]
MC: Merge MCSymbol and MCSymbolData

Turn `MCSymbolData` into a field inside of `MCSymbol`.  Keep all the old
API alive for now, so that consumers can be updated in a later commit.
This means we still temporarily need the back pointer from
`MCSymbolData` to `MCSymbol`, but I'll remove it in a follow-up.

This optimizes for object emission over assembly emission.  By removing
the `DenseMap` in `MCAssembler`, llc memory usage drops from around 1040
MB to 1001 MB (3.8%).

(I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`;
see r236629 for details.)

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

9 years agoMC: Move MCSymbolData to MCSymbol.h, NFC
Duncan P. N. Exon Smith [Sat, 16 May 2015 00:03:00 +0000 (00:03 +0000)]
MC: Move MCSymbolData to MCSymbol.h, NFC

Prepare for always including symbol data in MCSymbol.

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

9 years agoRemove redundant checks. NFC
Filipe Cabecinhas [Fri, 15 May 2015 23:57:13 +0000 (23:57 +0000)]
Remove redundant checks. NFC

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

9 years agoMC: Change MCAssembler::Symbols to a vector
Duncan P. N. Exon Smith [Fri, 15 May 2015 22:56:01 +0000 (22:56 +0000)]
MC: Change MCAssembler::Symbols to a vector

Instead of an intrusive double-linked linked list, use a
`std::vector<>`.  This saves a pointer per symbol and simplifies
`MCSymbolData`.  Otherwise, no functionality change here.

While I measured a memory drop from around 1047MB to 1040MB (0.6%) --
and this is a decent cleanup in its own right -- it's primarily a
preparation patch for merging `MCSymbol` and `MCSymbolData`.  I'll post
an updated patch for that to the list in a moment.

(I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`;
see r236629 for details.)

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

9 years agoMC: Reduce MCAssembler::Symbols API exposure, NFC
Duncan P. N. Exon Smith [Fri, 15 May 2015 22:33:34 +0000 (22:33 +0000)]
MC: Reduce MCAssembler::Symbols API exposure, NFC

Stop exposing the storage for `MCAssembler::Symbols`, and have
`MCAssembler` add symbols directly to its list instead of using a hook
in `MCSymbolData`.  This opens up room for a follow-up commit to switch
from a linked list to a vector.

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

9 years agoRemove MCAssembler.h include from MCStreamer.h and fix users of MCStreamer.h
Pete Cooper [Fri, 15 May 2015 22:19:42 +0000 (22:19 +0000)]
Remove MCAssembler.h include from MCStreamer.h and fix users of MCStreamer.h

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

9 years agoRemove 3 includes from MCInstrDesc.h and explicitly include them where needed
Pete Cooper [Fri, 15 May 2015 21:58:42 +0000 (21:58 +0000)]
Remove 3 includes from MCInstrDesc.h and explicitly include them where needed

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

9 years agoMove some methods to a new MCInstrDesc.cpp file to allow includes to be trimmed....
Pete Cooper [Fri, 15 May 2015 21:29:43 +0000 (21:29 +0000)]
Move some methods to a new MCInstrDesc.cpp file to allow includes to be trimmed.  NFC.

MCInstrDesc.h includes things like MCInst.h which i can now remove after this.  That will be a future commit.

Reviewed by Jim Grosbach.

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

9 years ago[RuntimeDyld] Use isInt to assert that a relocation didn't overflow
David Majnemer [Fri, 15 May 2015 20:32:25 +0000 (20:32 +0000)]
[RuntimeDyld] Use isInt to assert that a relocation didn't overflow

isInt is a little easier to read, let's use that more consistently.
Incidentally, this also silences a warning for shifting a negative
number.

This fixes PR23532.

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

9 years ago[X86] Use a better sentinel offset for the FrameAddr index
David Majnemer [Fri, 15 May 2015 20:08:27 +0000 (20:08 +0000)]
[X86] Use a better sentinel offset for the FrameAddr index

Other pieces of CodeGen want to negate frame object offsets to account
for architectures where the stack grows down.  Our object is a pseudo
object so it's offset doesn't matter.  However, we shouldn't choose an
offset which results in undefined behavior if you negate it.

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

9 years agoMC: MCCodeGenInfo naming update. NFC.
Jim Grosbach [Fri, 15 May 2015 19:13:31 +0000 (19:13 +0000)]
MC: MCCodeGenInfo naming update. NFC.

s/InitMCCodeGenInfo/initMCCodeGenInfo/

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

9 years agoMC: clang-format. NFC.
Jim Grosbach [Fri, 15 May 2015 19:13:20 +0000 (19:13 +0000)]
MC: clang-format. NFC.

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

9 years agoMC: Update MCCodeEmitter naming. NFC.
Jim Grosbach [Fri, 15 May 2015 19:13:16 +0000 (19:13 +0000)]
MC: Update MCCodeEmitter naming. NFC.

s/EncodeInstruction/encodeInstruction/

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

9 years agoMC: Update MCFixup naming. NFC.
Jim Grosbach [Fri, 15 May 2015 19:13:05 +0000 (19:13 +0000)]
MC: Update MCFixup naming. NFC.

s/MCFixup::Create/MCFixup::create/

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

9 years ago[NFC] remove an extra new line
Jingyue Wu [Fri, 15 May 2015 18:32:21 +0000 (18:32 +0000)]
[NFC] remove an extra new line

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

9 years agoWhile in GlobalValue fix the function(s) that don't follow the
Eric Christopher [Fri, 15 May 2015 18:20:14 +0000 (18:20 +0000)]
While in GlobalValue fix the function(s) that don't follow the
naming convention and update users.

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

9 years agoAdd a speculative execution pass
Jingyue Wu [Fri, 15 May 2015 17:54:48 +0000 (17:54 +0000)]
Add a speculative execution pass

Summary:
This is a pass for speculative execution of instructions for simple if-then (triangle) control flow. It's aimed at GPUs, but could perhaps be used in other contexts. Enabling this pass gives us a 1.0% geomean improvement on Google benchmark suites, with one benchmark improving 33%.

Credit goes to Jingyue Wu for writing an earlier version of this pass.

Patched by Bjarke Roune.

Test Plan:
This patch adds a set of tests in test/Transforms/SpeculativeExecution/spec.ll
The pass is controlled by a flag which defaults to having the pass not run.

Reviewers: eliben, dberlin, meheff, jingyue, hfinkel

Reviewed By: jingyue, hfinkel

Subscribers: majnemer, jholewinski, llvm-commits

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

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

9 years agoRevert "Canonicalize min/max expressions correctly."
James Molloy [Fri, 15 May 2015 17:45:09 +0000 (17:45 +0000)]
Revert "Canonicalize min/max expressions correctly."

This reverts r237453 - it was causing timeouts on some bots. Reverting
while I investigate (it's probably InstCombine fighting itself...)

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

9 years ago[SDAGBuilder] Make the AArch64 builder happier.
James Molloy [Fri, 15 May 2015 17:41:29 +0000 (17:41 +0000)]
[SDAGBuilder] Make the AArch64 builder happier.

I intended this loop to only unwrap SplitVector actions, but it
was more broad than that, such as unwrapping WidenVector actions,
which makes operations seem legal when they're not.

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

9 years ago[SLSR] handle (B | i) * S
Jingyue Wu [Fri, 15 May 2015 17:07:48 +0000 (17:07 +0000)]
[SLSR] handle (B | i) * S

Summary:
Consider (B | i) * S as (B + i) * S if B and i have no bits set in
common.

Test Plan: @or in slsr-mul.ll

Reviewers: broune, meheff

Subscribers: llvm-commits

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

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

9 years agoMark SMIN/SMAX/UMIN/UMAX nodes as legal and add patterns for them.
James Molloy [Fri, 15 May 2015 16:15:57 +0000 (16:15 +0000)]
Mark SMIN/SMAX/UMIN/UMAX nodes as legal and add patterns for them.

The new [SU]{MIN,MAX} SDNodes can be lowered directly to instructions for
most NEON datatypes - the big exclusion being v2i64.

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

9 years agoCanonicalize min/max expressions correctly.
James Molloy [Fri, 15 May 2015 16:10:59 +0000 (16:10 +0000)]
Canonicalize min/max expressions correctly.

This patch introduces a canonical form for min/max idioms where one operand
is extended or truncated. This often happens when the other operand is a
constant. For example:

  %1 = icmp slt i32 %a, i32 0
  %2 = sext i32 %a to i64
  %3 = select i1 %1, i64 %2, i64 0

Would now be canonicalized into:

  %1 = icmp slt i32 %a, i32 0
  %2 = select i1 %1, i32 %a, i32 0
  %3 = sext i32 %2 to i64

This builds upon a patch posted by David Majenemer
(https://www.marc.info/?l=llvm-commits&m=143008038714141&w=2). That pass
passively stopped instcombine from ruining canonical patterns. This
patch additionally actively makes instcombine canonicalize too.

Canonicalization of expressions involving a change in type from int->fp
or fp->int are not yet implemented.

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

9 years agoAllow min/max detection to see through casts.
James Molloy [Fri, 15 May 2015 16:04:50 +0000 (16:04 +0000)]
Allow min/max detection to see through casts.

This teaches the min/max idiom detector in ValueTracking to see through
casts such as SExt/ZExt/Trunc. SCEV can already do this, so we're bringing
non-SCEV analyses up to the same level.

The returned LHS/RHS will not match the type of the original SelectInst
any more, so a CastOp is returned too to inform the caller how to
convert to the SelectInst's type.

No in-tree users yet; this will be used by InstCombine in a followup.

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

9 years ago[llvm-readobj] Teach llvm-readobj to print PT_MIPS_ABIFLAGS program header
Simon Atanasyan [Fri, 15 May 2015 15:59:22 +0000 (15:59 +0000)]
[llvm-readobj] Teach llvm-readobj to print PT_MIPS_ABIFLAGS program header

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

9 years agoNFC - Test case invokes llc on a file rather than redirected from a file.
Nemanja Ivanovic [Fri, 15 May 2015 15:29:53 +0000 (15:29 +0000)]
NFC - Test case invokes llc on a file rather than redirected from a file.

This has caused some local failures. Updating the test case to be more
like the majority of the similar test cases.
Committing on behalf of Hubert Tong (hstong@ca.ibm.com).

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

9 years ago[xcore] Only support the 'm' inline assembly memory constraint. NFC.
Daniel Sanders [Fri, 15 May 2015 12:32:16 +0000 (12:32 +0000)]
[xcore] Only support the 'm' inline assembly memory constraint. NFC.

Summary:
XCore doesn't seem to have any additional constraints. Therefore remove
the target hook.

No functional change intended.

Reviewers: friedgold

Reviewed By: friedgold

Subscribers: friedgold, llvm-commits

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

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

9 years ago[DependenceAnalysis] Fix for PR21585: collectUpperBound triggers asserts
James Molloy [Fri, 15 May 2015 12:17:22 +0000 (12:17 +0000)]
[DependenceAnalysis] Fix for PR21585: collectUpperBound triggers asserts

collectUpperBound hits an assertion when the back edge count is wider then the desired type.

If that happens, truncate the backedge count.

Patch by Philip Pfaffe!

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

9 years ago[mips] [IAS] Fix expansion of negative 32-bit immediates for LI/DLI.
Toma Tabacu [Fri, 15 May 2015 09:42:11 +0000 (09:42 +0000)]
[mips] [IAS] Fix expansion of negative 32-bit immediates for LI/DLI.

Summary:
To maintain compatibility with GAS, we need to stop treating negative 32-bit immediates as 64-bit values when expanding LI/DLI.
This currently happens because of sign extension.

To do this we need to choose the 32-bit value expansion for values which use their upper 33 bits only for sign extension (i.e. no 0's, only 1's).

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

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

9 years agoAdd SDNodes for umin, umax, smin and smax.
James Molloy [Fri, 15 May 2015 09:03:15 +0000 (09:03 +0000)]
Add SDNodes for umin, umax, smin and smax.

This adds new SDNodes for signed/unsigned min/max. These nodes are built from
select/icmp pairs matched at SDAGBuilder stage.

This patch adds the nodes, as well as legalization support and sets them to
be "expand" for all targets.

NFC for now; this will be tested when I switch AArch64 to using these new
nodes.

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

9 years agoDoxygen: Enable autobrief feature and update coding standards.
Matthias Braun [Fri, 15 May 2015 03:34:01 +0000 (03:34 +0000)]
Doxygen: Enable autobrief feature and update coding standards.

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

9 years ago[PlaceSafepoints] Fix a bug that came in with rL236672.
Sanjoy Das [Fri, 15 May 2015 00:26:21 +0000 (00:26 +0000)]
[PlaceSafepoints] Fix a bug that came in with rL236672.

Transfer the calling convention from the invoke being replaced by
PlaceStatepoints to the new invoke to gc.statepoint created.  Add a test
case that would have caught this issue.

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

9 years ago[PlaceSafepoints] Fix a bug that came in with rL236672.
Sanjoy Das [Fri, 15 May 2015 00:26:15 +0000 (00:26 +0000)]
[PlaceSafepoints] Fix a bug that came in with rL236672.

rL236672 would generate all invoke statepoints with deopt args set to a
list containing the single element "0", instead of an empty list.

Also add a test case that would have caught this.

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

9 years agoStop resetting SanitizeAddress in TargetMachine::resetTargetOptions. NFC.
Akira Hatanaka [Fri, 15 May 2015 00:20:44 +0000 (00:20 +0000)]
Stop resetting SanitizeAddress in TargetMachine::resetTargetOptions. NFC.

Instead of doing that, create a temporary copy of MCTargetOptions and reset its
SanitizeAddress field based on the function's attribute every time an InlineAsm
instruction is emitted in AsmPrinter::EmitInlineAsm.

This is part of the work to remove TargetMachine::resetTargetOptions (the FIXME
added to TargetMachine.cpp in r236009 explains why this function has to be
removed).

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

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

9 years agoFix the check strings in a test case committed in r212455.
Akira Hatanaka [Fri, 15 May 2015 00:12:26 +0000 (00:12 +0000)]
Fix the check strings in a test case committed in r212455.

The access size (8, in this case) was missing in the function name that was
being checked.

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

9 years agodocs: Fix up some .rst formatting
Justin Bogner [Thu, 14 May 2015 23:56:58 +0000 (23:56 +0000)]
docs: Fix up some .rst formatting

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

9 years agoMC: Avoid some UB caused by left shifting a negative value. NFC
Justin Bogner [Thu, 14 May 2015 23:54:49 +0000 (23:54 +0000)]
MC: Avoid some UB caused by left shifting a negative value. NFC

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

9 years ago[ValueTracking] refactor: extract method haveNoCommonBitsSet
Jingyue Wu [Thu, 14 May 2015 23:53:19 +0000 (23:53 +0000)]
[ValueTracking] refactor: extract method haveNoCommonBitsSet

Summary:
Extract method haveNoCommonBitsSet so that we don't have to duplicate this logic in
InstCombine and SeparateConstOffsetFromGEP.

This patch also makes SeparateConstOffsetFromGEP more precise by passing
DominatorTree to computeKnownBits.

Test Plan: value-tracking-domtree.ll that tests ValueTracking indeed leverages dominating conditions

Reviewers: broune, meheff, majnemer

Reviewed By: majnemer

Subscribers: jholewinski, llvm-commits

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

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

9 years agoAdd a missing piece of existing practice to the developer policy. This may need furth...
Nick Lewycky [Thu, 14 May 2015 23:21:33 +0000 (23:21 +0000)]
Add a missing piece of existing practice to the developer policy. This may need further refinement, but I think is roughly correct.

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

9 years agoYAML: Add support for literal block scalar I/O.
Alex Lorenz [Thu, 14 May 2015 23:08:22 +0000 (23:08 +0000)]
YAML: Add support for literal block scalar I/O.

This commit gives the users of the YAML Traits I/O library
the ability to serialize scalars using the YAML literal block
scalar notation by allowing them to implement a specialization
of the `BlockScalarTraits` struct for their custom types.

Reviewers: Duncan P. N. Exon Smith

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

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

9 years ago80-col fixups.
Eric Christopher [Thu, 14 May 2015 23:07:13 +0000 (23:07 +0000)]
80-col fixups.

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

9 years ago[lib/Fuzzer] Add SHA1 implementation from public domain.
Kostya Serebryany [Thu, 14 May 2015 22:41:49 +0000 (22:41 +0000)]
[lib/Fuzzer] Add SHA1 implementation from public domain.

Summary:
This adds a SHA1 implementation taken from public domain code.
The change is trivial, but as it involves third-party code I'd like
a second pair of eyes before commit.

LibFuzzer can not use SHA1 from openssl because openssl may not be available
and because we may be fuzzing openssl itself.
Using sha1sum via a pipe is too slow.

Test Plan: n/a

Reviewers: chandlerc

Reviewed By: chandlerc

Subscribers: majnemer, llvm-commits

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

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

9 years agoReflow comments and remove one that predated the enum being in
Eric Christopher [Thu, 14 May 2015 22:29:46 +0000 (22:29 +0000)]
Reflow comments and remove one that predated the enum being in
the current file.

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

9 years agoRemove setting FloatABIType from the X86 port, nothing uses it.
Eric Christopher [Thu, 14 May 2015 22:26:54 +0000 (22:26 +0000)]
Remove setting FloatABIType from the X86 port, nothing uses it.

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

9 years agoAdd another InstCombine pass after LoopUnroll.
Wei Mi [Thu, 14 May 2015 22:02:54 +0000 (22:02 +0000)]
Add another InstCombine pass after LoopUnroll.

This is to cleanup some redundency generated by LoopUnroll pass. Such redundency may not be cleaned up by existing passes after LoopUnroll.

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

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

9 years agoDon't rely on implicit pointerness of 'auto'.
Davide Italiano [Thu, 14 May 2015 21:52:12 +0000 (21:52 +0000)]
Don't rely on implicit pointerness of 'auto'.

This ends up being a copy. Pointy hat to me.
Reported by: dexonsmith, dblaikie

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

9 years agoFix memory leak introduced in r237314.
Alex Lorenz [Thu, 14 May 2015 20:46:12 +0000 (20:46 +0000)]
Fix memory leak introduced in r237314.

The commit r237314 that implements YAML block parsing
introduced a leak that was caught by the ASAN linux buildbot.
YAML Parser stores its tokens in an ilist, and allocates
tokens using a BumpPtrAllocator, but doesn't call the
destructor for the allocated tokens. R237314 added an
std::string field to a Token which leaked as the Token's
destructor wasn't called. This commit fixes this leak
by calling the Token's destructor when a Token is being
removed from an ilist of tokens.

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

9 years ago[Hexagon] Generate hardware loop for a vectorized loop
Brendon Cahoon [Thu, 14 May 2015 20:36:19 +0000 (20:36 +0000)]
[Hexagon] Generate hardware loop for a vectorized loop

The induction variable in the vectorized loop wasn't
recognized properly, so a hardware loop wasn't generated.

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

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

9 years agoTurn effective assert(0) into llvm_unreachable
Matthias Braun [Thu, 14 May 2015 18:33:29 +0000 (18:33 +0000)]
Turn effective assert(0) into llvm_unreachable

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

9 years agoUpdate obsolete comments, fix typo, delete trailing space.
Douglas Katzman [Thu, 14 May 2015 18:07:04 +0000 (18:07 +0000)]
Update obsolete comments, fix typo, delete trailing space.

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

9 years ago[ConstantFolding] Fix wrong folding of intrinsic 'convert.from.fp16'.
Andrea Di Biagio [Thu, 14 May 2015 18:01:48 +0000 (18:01 +0000)]
[ConstantFolding] Fix wrong folding of intrinsic 'convert.from.fp16'.

Function 'ConstantFoldScalarCall' (in ConstantFolding.cpp) works under the
wrong assumption that a call to 'convert.from.fp16' returns a value of
type 'float'.
However, intrinsic 'convert.from.fp16' can be overloaded; for example, we
can call 'convert.from.fp16.f64' to convert from half to double; etc.

Before this patch, the following example would have triggered an assertion
failure in opt (with -constprop):

```
define double @foo() {
entry:
  %0 = call double @llvm.convert.from.fp16.f64(i16 0)
  ret double %0
}
```

This patch fixes the problem in ConstantFolding.cpp. When folding a call to
convert.from.fp16, we perform a different kind of conversion based on the call
return type.

Added test 'Transform/ConstProp/convert-from-fp16.ll'.

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

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

9 years agoTargetSchedule: factor out common code; NFC
Matthias Braun [Thu, 14 May 2015 18:01:13 +0000 (18:01 +0000)]
TargetSchedule: factor out common code; NFC

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

9 years agoRemove MCInstrItineraries includes in parts that don't use them anymore
Matthias Braun [Thu, 14 May 2015 18:01:11 +0000 (18:01 +0000)]
Remove MCInstrItineraries includes in parts that don't use them anymore

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

9 years ago[Hexagon] Remove dead constant assignment in hardware loop pass
Brendon Cahoon [Thu, 14 May 2015 17:31:40 +0000 (17:31 +0000)]
[Hexagon] Remove dead constant assignment in hardware loop pass

After converting a loop to a hardware loop, the pass should remove
any unnecessary instructions from the old compare-and-branch
code. This patch removes a dead constant assignment that was
used in the compare instruction.

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

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

9 years agoEnable solid lzma compression for cpack, decreases setup size by ~30%
Ismail Donmez [Thu, 14 May 2015 17:07:41 +0000 (17:07 +0000)]
Enable solid lzma compression for cpack, decreases setup size by ~30%

Reviewed by Hans Wennborg

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

9 years agoReflow long lines of some LLVMBuild files
Douglas Katzman [Thu, 14 May 2015 15:38:27 +0000 (15:38 +0000)]
Reflow long lines of some LLVMBuild files

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

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

9 years ago[mips] [IAS] Enforce .set nomacro.
Toma Tabacu [Thu, 14 May 2015 14:51:32 +0000 (14:51 +0000)]
[mips] [IAS] Enforce .set nomacro.

Summary: When used, ".set nomacro" causes warning messages to be reported when we expand pseudo-instructions to multiple machine instructions.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

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

9 years ago[Hexagon] Check for underflow/wrap in hardware loop pass
Brendon Cahoon [Thu, 14 May 2015 14:15:08 +0000 (14:15 +0000)]
[Hexagon] Check for underflow/wrap in hardware loop pass

If the loop trip count may underflow or wrap, the compiler should
not generate a hardware loop since the trip count will be
incorrect.

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

9 years ago[mips] [IAS] Emit .set macro/nomacro.
Toma Tabacu [Thu, 14 May 2015 13:42:10 +0000 (13:42 +0000)]
[mips] [IAS] Emit .set macro/nomacro.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

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

9 years ago[mips] Do not place users of $ra in the delay slot of call instructions.
Vasileios Kalintiris [Thu, 14 May 2015 13:17:56 +0000 (13:17 +0000)]
[mips] Do not place users of $ra in the delay slot of call instructions.

Summary:
When we are trying to fill the delay slot of a call instruction, we must avoid
filler instructions that use the $ra register. This fixes the test
MultiSource/Applications/JM/lencod when we enable the forward delay slot filler.

Reviewers: dsanders

Subscribers: llvm-commits

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

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

9 years agoRe-apply r237247 - [AArch64] Codegen VMAX/VMIN for safe math cases
Artyom Skrobov [Thu, 14 May 2015 12:59:46 +0000 (12:59 +0000)]
Re-apply r237247 - [AArch64] Codegen VMAX/VMIN for safe math cases

No longer breaks SPEC2000/2006

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

9 years agoAttempt to fix MSVC bots
Adam Nemet [Thu, 14 May 2015 12:33:32 +0000 (12:33 +0000)]
Attempt to fix MSVC bots

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

9 years agoNew Loop Distribution pass
Adam Nemet [Thu, 14 May 2015 12:05:18 +0000 (12:05 +0000)]
New Loop Distribution pass

Summary:
This implements the initial version as was proposed earlier this year
(http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-January/080462.html).
Since then Loop Access Analysis was split out from the Loop Vectorizer
and was made into a separate analysis pass.  Loop Distribution becomes
the second user of this analysis.

The pass is off by default and can be enabled
with -enable-loop-distribution.  There is currently no notion of
profitability; if there is a loop with dependence cycles, the pass will
try to split them off from other memory operations into a separate loop.

I decided to remove the control-dependence calculation from this first
version.  This and the issues with the PDT are actively discussed so it
probably makes sense to treat it separately.  Right now I just mark all
terminator instruction required which keeps identical CFGs for each
distributed loop.  This seems to be working pretty well for 456.hmmer
where even though there is an empty if-then block in the distributed
loop initially, it gets completely removed.

The pass keeps DominatorTree and LoopInfo updated.  I've tested this
with -loop-distribute-verify with the testsuite where we distribute ~90
loops.  SimplifyLoop is violated in some cases and I have a FIXME
covering this.

Reviewers: hfinkel, nadav, aschwaighofer

Reviewed By: aschwaighofer

Subscribers: llvm-commits

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

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

9 years agoFixed some typos and broken links in source level debugging docs.
Michael Kuperstein [Thu, 14 May 2015 10:58:59 +0000 (10:58 +0000)]
Fixed some typos and broken links in source level debugging docs.

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

9 years ago[mips] [IAS] Warn when LA is used with a 64-bit symbol.
Toma Tabacu [Thu, 14 May 2015 10:53:40 +0000 (10:53 +0000)]
[mips] [IAS] Warn when LA is used with a 64-bit symbol.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

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

9 years ago[mips] [IAS] Give expandLoadAddressSym() more specific arguments. NFC.
Toma Tabacu [Thu, 14 May 2015 10:02:58 +0000 (10:02 +0000)]
[mips] [IAS] Give expandLoadAddressSym() more specific arguments. NFC.

Summary:
If we only pass the necessary operands, we don't have to determine the position of the symbol operand when entering expandLoadAddressSym().
This simplifies the expandLoadAddressSym() code.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

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

9 years ago[AArch64] Slight naming changes and comments for AArch64NamedImmMapper
Vladimir Sukharev [Thu, 14 May 2015 09:50:14 +0000 (09:50 +0000)]
[AArch64] Slight naming changes and comments for AArch64NamedImmMapper

Reviewers: echristo

Subscribers: llvm-commits

Follow-up to: http://reviews.llvm.org/D8496#158595

Relates to: http://reviews.llvm.org/rL235089

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

9 years agoAVX-512: Added i1 type handling for calling conventions.
Elena Demikhovsky [Thu, 14 May 2015 09:04:45 +0000 (09:04 +0000)]
AVX-512: Added i1 type handling for calling conventions.
i1 type is a legal type on AVX-512 and can be passed as parameter or return value.
i1 is promoted to i8 on return and to i32 for call arguments (i8 is also promoted to i32 here).
The result code is similar to the previous X86 targets, where i1 is allways promoted to i8.

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

9 years agoTableGen: Avoid undefined behaviour by doing this shift in int64
Justin Bogner [Thu, 14 May 2015 06:47:02 +0000 (06:47 +0000)]
TableGen: Avoid undefined behaviour by doing this shift in int64

Found by ubsan. This was taking a bool and left shifting by 32 - the
result is 64 bit, so we should really do the math in a type it fits
in.

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

9 years ago[TableGen] Remove an unnecessary outer 'if' around 3 separate inner ifs. No functiona...
Craig Topper [Thu, 14 May 2015 05:54:02 +0000 (05:54 +0000)]
[TableGen] Remove an unnecessary outer 'if' around 3 separate inner ifs. No functional change intended.

The outer if had 3 separate conditions ORed together and then the inner ifs detected which of the three conditions it was by using only a portion of the specific condition. Just put the whole condition in each inner if and remove the outer if.

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

9 years ago[TableGen] Simplify some code. NFC
Craig Topper [Thu, 14 May 2015 05:53:59 +0000 (05:53 +0000)]
[TableGen] Simplify some code. NFC

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

9 years ago[TableGen] Remove ListInit::size() in favor of getSize() which does the same thing...
Craig Topper [Thu, 14 May 2015 05:53:56 +0000 (05:53 +0000)]
[TableGen] Remove ListInit::size() in favor of getSize() which does the same thing and is already used in most places. NFC.

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

9 years ago[TableGen] Replace some calls to ListInit::getSize() with ListInit::empty() if it...
Craig Topper [Thu, 14 May 2015 05:53:53 +0000 (05:53 +0000)]
[TableGen] Replace some calls to ListInit::getSize() with ListInit::empty() if it was just comparing to 0. NFC.

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

9 years agocmake: Use -fno-sanitize-recover=all - the old spelling is deprecated
Justin Bogner [Thu, 14 May 2015 04:52:57 +0000 (04:52 +0000)]
cmake: Use -fno-sanitize-recover=all - the old spelling is deprecated

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

9 years agoDon't omit the constant when computing a cross-section relative relocation.
Andy Ayers [Thu, 14 May 2015 01:10:41 +0000 (01:10 +0000)]
Don't omit the constant when computing a cross-section relative relocation.

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

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

9 years ago[CodeGen] Use standard -not gnueabi- naming for f16 libcalls on Darwin.
Ahmed Bougacha [Thu, 14 May 2015 01:00:51 +0000 (01:00 +0000)]
[CodeGen] Use standard -not gnueabi- naming for f16 libcalls on Darwin.

Other targets probably should as well.  Since r237161, compiler-rt has
both, but I don't see why anything other than gnueabi would use a
gnueabi naming scheme.

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

9 years agoRevert r237046. See the testcase on the thread where r237046 was committed.
Nick Lewycky [Wed, 13 May 2015 23:41:47 +0000 (23:41 +0000)]
Revert r237046. See the testcase on the thread where r237046 was committed.

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

9 years agoYAML: Implement block scalar parsing.
Alex Lorenz [Wed, 13 May 2015 23:10:51 +0000 (23:10 +0000)]
YAML: Implement block scalar parsing.

This commit implements the parsing of YAML block scalars.
Some code existed for it before, but it couldn't parse block
scalars.

This commit adds a new yaml node type to represent the block
scalar values.

This commit also deletes the 'spec-09-27' and 'spec-09-28' tests
as they are identical to the test file 'spec-09-26'.

This commit introduces 3 new utility functions to the YAML scanner
class: `skip_s_space`, `advanceWhile` and `consumeLineBreakIfPresent`.

Reviewers: Duncan P. N. Exon Smith

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

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

9 years ago[opaque pointer type] Use the value type of the GlobalVariable rather than accessing...
David Blaikie [Wed, 13 May 2015 22:55:01 +0000 (22:55 +0000)]
[opaque pointer type] Use the value type of the GlobalVariable rather than accessing it through the pointee's type

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

9 years ago[opaque pointer type] Use GlobalVariable::getValueType rather than accessing it throu...
David Blaikie [Wed, 13 May 2015 22:54:54 +0000 (22:54 +0000)]
[opaque pointer type] Use GlobalVariable::getValueType rather than accessing it through the GV's pointee type

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

9 years ago[X86] Fix PR23271 - RIP-relative decoding bug in disassembler.
Douglas Katzman [Wed, 13 May 2015 22:44:52 +0000 (22:44 +0000)]
[X86] Fix PR23271 - RIP-relative decoding bug in disassembler.

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

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

9 years agoConstruct ArrayRef<const T*> from vector<T>
Pete Cooper [Wed, 13 May 2015 22:43:09 +0000 (22:43 +0000)]
Construct ArrayRef<const T*> from vector<T>

ArrayRef already has a SFINAE constructor which can construct ArrayRef<const T*> from ArrayRef<T*>.

This adds methods to do the same directly from SmallVector and std::vector.  This avoids an intermediate step through the use of makeArrayRef.

Also update the users of this in LICM and SROA to remove the now unnecessary makeArrayRef call.

Reviewed by David Blaikie.

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

9 years ago[lib/Fuzzer] update docs about test corpuses in git
Kostya Serebryany [Wed, 13 May 2015 22:42:28 +0000 (22:42 +0000)]
[lib/Fuzzer] update docs about test corpuses in git

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