oota-llvm.git
9 years ago[ARM] Do not generate invalid encoding for stack adjust, even if this is just
Quentin Colombet [Thu, 30 Apr 2015 18:52:49 +0000 (18:52 +0000)]
[ARM] Do not generate invalid encoding for stack adjust, even if this is just
temporary.

Because of that:
1. The machine verifier was complaining on such code.
2. The generate code worked just because the thumb reduction size pass fixed the
opcode.

rdar://problem/20749824

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

9 years agoAArch64: add BFC alias for the BFI/BFM instructions.
Tim Northover [Thu, 30 Apr 2015 18:28:58 +0000 (18:28 +0000)]
AArch64: add BFC alias for the BFI/BFM instructions.

Unlike 32-bit ARM, AArch64 can use wzr/xzr to implement this without the need
for a separate instruction.

rdar://18679590

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

9 years agoAdd a note about permitting default member initializers
Reid Kleckner [Thu, 30 Apr 2015 18:17:12 +0000 (18:17 +0000)]
Add a note about permitting default member initializers

Use them in WinEHPrepare so that we can spot any toolchain bugs that
come up.

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

9 years agoReinstate revisions r234755, r234759, r234760
Jan Vesely [Thu, 30 Apr 2015 17:15:56 +0000 (17:15 +0000)]
Reinstate revisions r234755, r234759, r234760

changes:
  Don't apply on hexagon and NVPTX since they no longer claim to support UADDO/USUBO
  Add location to getConstant
  Drop comment about the ops being turned into expand

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

9 years agoMove equality function for AliasAnalysis::Location from DenseMapInfo to Location...
Daniel Berlin [Thu, 30 Apr 2015 16:15:07 +0000 (16:15 +0000)]
Move equality function for AliasAnalysis::Location from DenseMapInfo to Location struct so it can be used in other types of maps

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

9 years agoWrite sections mostly in one pass.
Rafael Espindola [Thu, 30 Apr 2015 14:21:49 +0000 (14:21 +0000)]
Write sections mostly in one pass.

During ELF writing, there is no need to further relax the sections, so we
should not be creating fragments. This patch avoids doing so in all cases
but debug section compression (that is next).

Also, the ELF format is fairly simple to write. We can do a single pass over
the sections to write them out and compute the section header table.

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

9 years agoSilencing an "enumeral and non-enumeral type in conditional expression" warning;...
Aaron Ballman [Thu, 30 Apr 2015 14:03:12 +0000 (14:03 +0000)]
Silencing an "enumeral and non-enumeral type in conditional expression" warning; NFC.

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

9 years agoDon't check for offsets in tests where it is not relevant.
Rafael Espindola [Thu, 30 Apr 2015 13:57:06 +0000 (13:57 +0000)]
Don't check for offsets in tests where it is not relevant.

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

9 years agoFix private constructor for ScaledNumber.
Diego Novillo [Thu, 30 Apr 2015 13:22:48 +0000 (13:22 +0000)]
Fix private constructor for ScaledNumber.

Summary:
The private constructor for ScaledNumber was using uint64_t instead of
DigitsT. This was preventing instantiations of ScaledNumber with
anything other than uint64_t types.

In implementing the tests, I ran into another issue. Operators >>= and
<<= did not have variants for accepting other ScaledNumber as the shift
argument. This is expected by the SCALED_NUMBER_BOP.

It makes no sense to allow shifting a ScaledNumber by another
ScaledNumber, so the patch includes two new templates for shifting
ScaledNumbers.

Reviewers: dexonsmith

Subscribers: llvm-commits

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

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

9 years agoCheck the entire content of the comdat group.
Rafael Espindola [Thu, 30 Apr 2015 13:08:09 +0000 (13:08 +0000)]
Check the entire content of the comdat group.

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

9 years agoFix typo in comment. NFC.
Diego Novillo [Thu, 30 Apr 2015 12:27:51 +0000 (12:27 +0000)]
Fix typo in comment. NFC.

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

9 years ago[mips] Sorted instructions in mips64r6 disassembly tests. NFC.
Daniel Sanders [Thu, 30 Apr 2015 10:52:42 +0000 (10:52 +0000)]
[mips] Sorted instructions in mips64r6 disassembly tests. NFC.

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

9 years ago[mips][mips64r6] Sorted instructions in test. NFC.
Daniel Sanders [Thu, 30 Apr 2015 10:23:48 +0000 (10:23 +0000)]
[mips][mips64r6] Sorted instructions in test. NFC.

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

9 years ago[mips][msa] Rename main check prefix to 'ALL' in basic operations tests. NFC
Daniel Sanders [Thu, 30 Apr 2015 09:57:37 +0000 (09:57 +0000)]
[mips][msa] Rename main check prefix to 'ALL' in basic operations tests. NFC

Summary:
The majority of the checks are subtarget independent. The few that aren't
will be corrected shortly.

Reviewers: vkalintiris

Reviewed By: vkalintiris

Subscribers: llvm-commits

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

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

9 years ago[mips][msa] Use CHECK-LABEL where missing, and remove checks matching the .size direc...
Daniel Sanders [Thu, 30 Apr 2015 09:56:30 +0000 (09:56 +0000)]
[mips][msa] Use CHECK-LABEL where missing, and remove checks matching the .size directive. NFC.

Summary:

Reviewers: vkalintiris

Reviewed By: vkalintiris

Subscribers: llvm-commits

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

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

9 years ago[mips] Add missing signext attributes to MSA basic operations tests. NFC.
Daniel Sanders [Thu, 30 Apr 2015 09:24:09 +0000 (09:24 +0000)]
[mips] Add missing signext attributes to MSA basic operations tests. NFC.

Summary:
This doesn't make much difference to MIPS32, but it will simplify a
MIPS64r6 bugfix which will follow shortly by removing unnecessary
sign-extension of parameters.

Reviewers: vkalintiris

Reviewed By: vkalintiris

Subscribers: llvm-commits

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

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

9 years agoAdd convenient overloads for CreateInsertElement and CreateExtractElement methods...
Pawel Bylica [Thu, 30 Apr 2015 09:01:22 +0000 (09:01 +0000)]
Add convenient overloads for CreateInsertElement and CreateExtractElement methods in IRBuilder

Summary:
This pathc add convenient overloads for CreateInsertElement and CreateExtractElement methods in IRBuilder
where vector index can be uint64_t instead of Value*.

Test Plan: Unit test included.

Reviewers: majnemer

Reviewed By: majnemer

Subscribers: majnemer, llvm-commits

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

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

9 years agoSilence unused warning in non-assert builds.
Daniel Jasper [Thu, 30 Apr 2015 09:01:21 +0000 (09:01 +0000)]
Silence unused warning in non-assert builds.

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

9 years agoInline local variable to silence unused warning.
Daniel Jasper [Thu, 30 Apr 2015 08:51:13 +0000 (08:51 +0000)]
Inline local variable to silence unused warning.

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

9 years agoMasked gather and scatter - added DAGCombine visitors
Elena Demikhovsky [Thu, 30 Apr 2015 08:38:48 +0000 (08:38 +0000)]
Masked gather and scatter - added DAGCombine visitors
and AVX-512 instruction selection patterns.
All other patches, including tests will follow.

http://reviews.llvm.org/D7665

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

9 years ago[SSE] Fix for MUL v16i8 on pre-SSE41 targets (PR23369).
Simon Pilgrim [Thu, 30 Apr 2015 08:23:16 +0000 (08:23 +0000)]
[SSE] Fix for MUL v16i8 on pre-SSE41 targets (PR23369).

Sign extension of i8 to i16 was placing the unpacked bytes in the lower byte instead of the upper byte.

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

9 years ago[TableGen] Cleanup formatting by moving operators from beginning of line to end of...
Craig Topper [Thu, 30 Apr 2015 05:54:22 +0000 (05:54 +0000)]
[TableGen] Cleanup formatting by moving operators from beginning of line to end of previous line. NFC

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

9 years ago[TableGen] Used range-based for loop. NFC.
Craig Topper [Thu, 30 Apr 2015 05:54:20 +0000 (05:54 +0000)]
[TableGen] Used range-based for loop. NFC.

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

9 years ago[TableGen] Merge a variable assignment and a return to drop curly braces. Fold an...
Craig Topper [Thu, 30 Apr 2015 05:12:52 +0000 (05:12 +0000)]
[TableGen] Merge a variable assignment and a return to drop curly braces. Fold an assignment into an if. Use auto on the result of a couple dyn_casts. NFC

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

9 years ago[InstCombine] Add new rule for MIN(MAX(~A, ~B), ~C) et. al.
Sanjoy Das [Thu, 30 Apr 2015 04:56:04 +0000 (04:56 +0000)]
[InstCombine] Add new rule for MIN(MAX(~A, ~B), ~C) et. al.

Summary:
Optimizing these well are especially interesting for IRCE since it
"clamps" values by generating this sort of pattern through SCEV
expressions.

Depends on D9352.

Reviewers: majnemer

Subscribers: llvm-commits

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

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

9 years ago[InstCombine] Add a new formula for SMIN.
Sanjoy Das [Thu, 30 Apr 2015 04:56:00 +0000 (04:56 +0000)]
[InstCombine] Add a new formula for SMIN.

Summary:
After this change `MatchSelectPattern` recognizes the following form
of SMIN:

  Y >s C ? ~Y : ~C == ~Y <s ~C ? ~Y : ~C = SMIN(~Y, ~C)

Reviewers: majnemer

Subscribers: llvm-commits

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

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

9 years agoDon't overflow GCTable
Filipe Cabecinhas [Thu, 30 Apr 2015 04:09:41 +0000 (04:09 +0000)]
Don't overflow GCTable

Summary: Bug found with AFL fuzz.

Reviewers: rafael, dexonsmith

Subscribers: llvm-commits

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

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

9 years agoSemantically revert r236031, which is not a good idea for in-order targets.
Owen Anderson [Thu, 30 Apr 2015 04:06:32 +0000 (04:06 +0000)]
Semantically revert r236031, which is not a good idea for in-order targets.

At the least it should be guarded by some kind of target hook.
It also introduced catastrophic compile time and code quality
regressions on some out of tree targets (test case still being
reduced/sanitized).

Sanjay agreed with reverting this patch until these issues can be
resolved.

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

9 years agoXFAIL test/CodeGen/Generic/MachineBranchProb.ll on Hexagon (PR23377)
Hans Wennborg [Thu, 30 Apr 2015 01:59:04 +0000 (01:59 +0000)]
XFAIL test/CodeGen/Generic/MachineBranchProb.ll on Hexagon (PR23377)

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

9 years agoMake sure Op->getType() is a PointerType before we cast<> it.
Filipe Cabecinhas [Thu, 30 Apr 2015 01:13:31 +0000 (01:13 +0000)]
Make sure Op->getType() is a PointerType before we cast<> it.

Bug found with AFL fuzz.

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

9 years agoSwitch lowering: use profile info to build weight-balanced binary search trees
Hans Wennborg [Thu, 30 Apr 2015 00:57:37 +0000 (00:57 +0000)]
Switch lowering: use profile info to build weight-balanced binary search trees

This will cause hot nodes to appear closer to the root.

The literature says building the tree like this makes it a near-optimal (in
terms of search time given key frequencies) binary search tree. In LLVM's case,
we can do up to 3 comparisons in each leaf node, so it might be better to opt
for lower tree height in some cases; that's something to look into in the
future.

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

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

9 years agoMake sure we don't resize(0) when we get a fwdref with Idx == UINT_MAX
Filipe Cabecinhas [Thu, 30 Apr 2015 00:52:42 +0000 (00:52 +0000)]
Make sure we don't resize(0) when we get a fwdref with Idx == UINT_MAX

Make it an error instead.

Bug found with AFL fuzz.

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

9 years agoStore relocations in a map from MCSectionELF.
Rafael Espindola [Thu, 30 Apr 2015 00:45:46 +0000 (00:45 +0000)]
Store relocations in a map from MCSectionELF.

Saves finding the MCSectionData just to do a map lookup.

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

9 years agoWrite relocations directly to the output stream. NFC.
Rafael Espindola [Thu, 30 Apr 2015 00:30:40 +0000 (00:30 +0000)]
Write relocations directly to the output stream. NFC.

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

9 years agoFlip r236172 testcase RUN option ordering for BSD sed(1). NFC.
Ahmed Bougacha [Thu, 30 Apr 2015 00:07:34 +0000 (00:07 +0000)]
Flip r236172 testcase RUN option ordering for BSD sed(1). NFC.

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

9 years agoChange x86 CMOVE_F to read it source, not write it.
Pete Cooper [Wed, 29 Apr 2015 23:51:33 +0000 (23:51 +0000)]
Change x86 CMOVE_F to read it source, not write it.

This was breaking sqlite with the machine verifier because operand 0 was a def according to tablegen, but didn't have the 'isDef' flag set.

Looking at the ISA, its clear that this operand is a source as writing to st(0) is implicit.  So move the operand to the correct place in the td file.

rdar://problem/20751584

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

9 years agoFix doxygen comment typo. NFC
Jonathan Roelofs [Wed, 29 Apr 2015 23:33:32 +0000 (23:33 +0000)]
Fix doxygen comment typo. NFC

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

9 years ago[opaque pointer type] Store the value type of an alloca
David Blaikie [Wed, 29 Apr 2015 23:00:35 +0000 (23:00 +0000)]
[opaque pointer type] Store the value type of an alloca

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

9 years ago[WinEH] Start EH preparation for 32-bit x86, it uses no arguments
Reid Kleckner [Wed, 29 Apr 2015 22:49:54 +0000 (22:49 +0000)]
[WinEH] Start EH preparation for 32-bit x86, it uses no arguments

32-bit x86 MSVC-style exceptions are functionaly similar to 64-bit, but
they take no arguments. Instead, they implicitly use the value of EBP
passed in by the caller as a pointer to the parent's frame. In LLVM, we
can represent this as llvm.frameaddress(1), and feed that into all of
our calls to llvm.framerecover.

The next steps are:
- Add an alloca to the fs:00 linked list of handlers
- Add something like llvm.sjlj.lsda or generalize it to store in the
  alloca
- Move state number calculation to WinEHPrepare, arrange for
  FunctionLoweringInfo to call it
- Use the state numbers to insert explicit loads and stores in the IR

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

9 years agogeneralize binop reassociation; NFC
Sanjay Patel [Wed, 29 Apr 2015 22:30:02 +0000 (22:30 +0000)]
generalize binop reassociation; NFC

Move the fold introduced in r236031:
http://reviews.llvm.org/rL236031

to its own helper function, so we can use it for other binops.

This is a preliminary step before partially solving:
https://llvm.org/bugs/show_bug.cgi?id=21768
https://llvm.org/bugs/show_bug.cgi?id=23116

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

9 years agoRun StatepointLowering.{cpp,h} through clang-format.
Pat Gavlin [Wed, 29 Apr 2015 21:52:45 +0000 (21:52 +0000)]
Run StatepointLowering.{cpp,h} through clang-format.

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

9 years ago[NFC] Updating FileCheck to reduce the std::vector interface used via cl::list.
Chris Bieneman [Wed, 29 Apr 2015 21:45:24 +0000 (21:45 +0000)]
[NFC] Updating FileCheck to reduce the std::vector interface used via cl::list.

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

9 years ago[NFC] Converting to range-based for.
Chris Bieneman [Wed, 29 Apr 2015 21:45:22 +0000 (21:45 +0000)]
[NFC] Converting to range-based for.

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

9 years ago[opaque pointer type] Pass GlobalAlias the actual pointer type rather than decomposin...
David Blaikie [Wed, 29 Apr 2015 21:22:39 +0000 (21:22 +0000)]
[opaque pointer type] Pass GlobalAlias the actual pointer type rather than decomposing it into pointee type + address space

Many of the callers already have the pointer type anyway, and for the
couple of callers that don't it's pretty easy to call PointerType::get
on the pointee type and address space.

This avoids LLParser from using PointerType::getElementType when parsing
GlobalAliases from IR.

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

9 years agoInline FragmentWriter into the only user.
Rafael Espindola [Wed, 29 Apr 2015 21:13:30 +0000 (21:13 +0000)]
Inline FragmentWriter into the only user.

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

9 years agoWrite the symbol table directly to the output file.
Rafael Espindola [Wed, 29 Apr 2015 21:09:32 +0000 (21:09 +0000)]
Write the symbol table directly to the output file.

There is no need to first accumulate it in fragments.

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

9 years agotidy up; NFC
Sanjay Patel [Wed, 29 Apr 2015 21:01:41 +0000 (21:01 +0000)]
tidy up; NFC

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

9 years agoUse pwrite to write the number of sections.
Rafael Espindola [Wed, 29 Apr 2015 20:39:37 +0000 (20:39 +0000)]
Use pwrite to write the number of sections.

This avoids having to compute the number upfront, which will be used in the
next patch.

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

9 years agotoo much space again; NFC
Sanjay Patel [Wed, 29 Apr 2015 20:38:02 +0000 (20:38 +0000)]
too much space again; NFC

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

9 years agoWrite the string table directly to the output file.
Rafael Espindola [Wed, 29 Apr 2015 20:34:31 +0000 (20:34 +0000)]
Write the string table directly to the output file.

There is no need to accumulate it in fragments first.

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

9 years agotoo much space; NFC
Sanjay Patel [Wed, 29 Apr 2015 20:32:57 +0000 (20:32 +0000)]
too much space; NFC

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

9 years ago[Sparc] Really add sparcel architecture support.
Douglas Katzman [Wed, 29 Apr 2015 20:30:57 +0000 (20:30 +0000)]
[Sparc] Really add sparcel architecture support.

Mostly copy-and-paste from Sparc v8 architecture.

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

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

9 years agoWrite the section header string table directly to the output stream.
Rafael Espindola [Wed, 29 Apr 2015 20:25:24 +0000 (20:25 +0000)]
Write the section header string table directly to the output stream.

Instead of accumulating the content in a fragment first, just write it
to the output stream.

Also put it first in the section table, so that we never have to worry
about its index being >= SHN_LORESERVE.

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

9 years agoClean up docs references to './configure' in preparation for deprecating in-source...
Jonathan Roelofs [Wed, 29 Apr 2015 20:06:41 +0000 (20:06 +0000)]
Clean up docs references to './configure' in preparation for deprecating in-source builds

http://reviews.llvm.org/D8787

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

9 years ago[AArch64] Refactor out codes that depend on specific CS save sequence.
Manman Ren [Wed, 29 Apr 2015 20:03:38 +0000 (20:03 +0000)]
[AArch64] Refactor out codes that depend on specific CS save sequence.

No functionality change.

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

9 years agoAvoid a few const_cast.
Rafael Espindola [Wed, 29 Apr 2015 19:20:10 +0000 (19:20 +0000)]
Avoid a few const_cast.

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

9 years agoARM: mark branch-like instructions with correct flags.
Tim Northover [Wed, 29 Apr 2015 19:16:38 +0000 (19:16 +0000)]
ARM: mark branch-like instructions with correct flags.

There's probably no way to test BXJ, but if the compiler ever did emit it
during CodeGen it would have to be a block terminator so "isBranch" is
appropriate.

BLX is more tricky. Clearly a call, but it affects surprisingly little.

rdar://18719544

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

9 years agoNew architecture name - 'sparcel' for Sparc little-endian.
Douglas Katzman [Wed, 29 Apr 2015 19:15:08 +0000 (19:15 +0000)]
New architecture name - 'sparcel' for Sparc little-endian.

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

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

9 years agoMake Sparc assembler accept parenthesized constant expressions.
Douglas Katzman [Wed, 29 Apr 2015 18:48:29 +0000 (18:48 +0000)]
Make Sparc assembler accept parenthesized constant expressions.

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

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

9 years ago[mips][microMIPSr6] Implement MUL, MUH, MULU and MUHU instructions
Zoran Jovanovic [Wed, 29 Apr 2015 17:23:22 +0000 (17:23 +0000)]
[mips][microMIPSr6] Implement MUL, MUH, MULU and MUHU instructions
Differential Revision: http://reviews.llvm.org/D8894

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

9 years ago[WinEH] Fix minor bug in begincatch block splitting
Andrew Kaylor [Wed, 29 Apr 2015 17:21:26 +0000 (17:21 +0000)]
[WinEH] Fix minor bug in begincatch block splitting

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

9 years agoDisable failing TestDevNull test on Windows
Reid Kleckner [Wed, 29 Apr 2015 16:54:11 +0000 (16:54 +0000)]
Disable failing TestDevNull test on Windows

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

9 years agoTemporarily relax a check in the debug info verifier.
Adrian Prantl [Wed, 29 Apr 2015 16:52:17 +0000 (16:52 +0000)]
Temporarily relax a check in the debug info verifier.
The clang frontend helps out GDB by emitting the members of local anonymous
unions as artificial local variables with shared storage. When SROA splits
the storage for artificial local variables that are smaller than the entire
union, the overhang piece will be outside of the allotted space for the
variable and this check fails.

rdar://problem/20730771

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

9 years ago[X86] Avoid mangling frameescape labels
Reid Kleckner [Wed, 29 Apr 2015 16:46:01 +0000 (16:46 +0000)]
[X86] Avoid mangling frameescape labels

x86 Windows uses the '_' prefix for all global symbols, and this was
mistakenly being applied to frameescape labels, which are not externally
visible global symbols. They use the private global prefix 'L'.

The *right* way to fix this is probably to stop masquerading this label
as an ExternalSymbol and create a new SDNode type. These labels are not
"external", and we know they will be resolved by assembly time. Having a
custom SDNode type would allow us to do better X86 address mode
matching, so it's probably worth doing eventually.

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

9 years agoIR: Give 'DI' prefix to debug info metadata
Duncan P. N. Exon Smith [Wed, 29 Apr 2015 16:38:44 +0000 (16:38 +0000)]
IR: Give 'DI' prefix to debug info metadata

Finish off PR23080 by renaming the debug info IR constructs from `MD*`
to `DI*`.  The last of the `DIDescriptor` classes were deleted in
r235356, and the last of the related typedefs removed in r235413, so
this has all baked for about a week.

Note: If you have out-of-tree code (like a frontend), I recommend that
you get everything compiling and tests passing with the *previous*
commit before updating to this one.  It'll be easier to keep track of
what code is using the `DIDescriptor` hierarchy and what you've already
updated, and I think you're extremely unlikely to insert bugs.  YMMV of
course.

Back to *this* commit: I did this using the rename-md-di-nodes.sh
upgrade script I've attached to PR23080 (both code and testcases) and
filtered through clang-format-diff.py.  I edited the tests for
test/Assembler/invalid-generic-debug-node-*.ll by hand since the columns
were off-by-three.  It should work on your out-of-tree testcases (and
code, if you've followed the advice in the previous paragraph).

Some of the tests are in badly named files now (e.g.,
test/Assembler/invalid-mdcompositetype-missing-tag.ll should be
'dicompositetype'); I'll come back and move the files in a follow-up
commit.

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

9 years agoCodeGen: Default overflow operations to expand so we don't have to assume targets...
Jan Vesely [Wed, 29 Apr 2015 16:30:46 +0000 (16:30 +0000)]
CodeGen: Default overflow operations to expand so we don't have to assume targets are lying

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: ab
Differential Revision: http://reviews.llvm.org/D9265

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

9 years ago[mips][microMIPSr6] Implement SUB and SUBU instructions
Zoran Jovanovic [Wed, 29 Apr 2015 16:22:46 +0000 (16:22 +0000)]
[mips][microMIPSr6] Implement SUB and SUBU instructions
Differential Revision: http://reviews.llvm.org/D8764

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

9 years ago[mips][microMIPSr6] Implement ADD, ADDU and ADDIU instructions
Zoran Jovanovic [Wed, 29 Apr 2015 15:11:07 +0000 (15:11 +0000)]
[mips][microMIPSr6] Implement ADD, ADDU and ADDIU instructions
Differential Revision: http://reviews.llvm.org/D8704

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

9 years agoSparc: Prefer reg+reg address encoding when only one register used.
James Y Knight [Wed, 29 Apr 2015 14:54:44 +0000 (14:54 +0000)]
Sparc: Prefer reg+reg address encoding when only one register used.

Reg+%g0 is preferred to Reg+imm0 by the manual, and is what GCC produces.

Futhermore, reg+imm is invalid for the (not yet supported) "alternate
address space" instructions.

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

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

9 years agoRelax assert to avoid spurious failures with /dev/null.
Rafael Espindola [Wed, 29 Apr 2015 14:53:25 +0000 (14:53 +0000)]
Relax assert to avoid spurious failures with /dev/null.

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

9 years agoMips fast-isel - handle functions which return i8 or i6 .
Vasileios Kalintiris [Wed, 29 Apr 2015 14:17:14 +0000 (14:17 +0000)]
Mips fast-isel - handle functions which return i8 or i6 .

Summary: Allow Mips fast-isel to handle functions which return i8/i16 signed/unsigned.

Test Plan:
Make check tests are forthcoming.
Already passes test-suite at O0/O2 for Mips 32 r1/r2

Reviewers: dsanders, rkotler

Subscribers: llvm-commits, rfuhler

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

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

9 years agoDon't constrain the section order in tests that don't depend on it.
Rafael Espindola [Wed, 29 Apr 2015 13:55:07 +0000 (13:55 +0000)]
Don't constrain the section order in tests that don't depend on it.

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

9 years ago[mips] Correct 128-bit shifts on 64-bit targets.
Daniel Sanders [Wed, 29 Apr 2015 12:28:58 +0000 (12:28 +0000)]
[mips] Correct 128-bit shifts on 64-bit targets.

Summary:
The existing code was correct for 32-bit GPR's but not 64-bit GPR's. It now
accounts for both cases.

Reviewers: vkalintiris

Reviewed By: vkalintiris

Subscribers: llvm-commits, mohit.bhakkad, sagar

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

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

9 years ago[mips] [IAS] Inline assemble-time shifting out of createLShiftOri. NFC.
Toma Tabacu [Wed, 29 Apr 2015 10:19:56 +0000 (10:19 +0000)]
[mips] [IAS] Inline assemble-time shifting out of createLShiftOri. NFC.

Summary:
Do the assemble-time shifts from createLShiftOri at the source, which groups all the shifting together, closer to the main logic path, and
store the results in concisely-named variables to improve code clarity.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

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

9 years agofixed 80-chars; NFC
Elena Demikhovsky [Wed, 29 Apr 2015 08:49:57 +0000 (08:49 +0000)]
fixed 80-chars; NFC

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

9 years agoFixed masked gather/scatter switch-case
Elena Demikhovsky [Wed, 29 Apr 2015 08:38:53 +0000 (08:38 +0000)]
Fixed masked gather/scatter switch-case

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

9 years ago[TableGen] Use range-based for loops. NFC.
Craig Topper [Wed, 29 Apr 2015 07:13:14 +0000 (07:13 +0000)]
[TableGen] Use range-based for loops. NFC.

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

9 years ago[TableGen] Fold a couple dyn_casts into the ifs that check their results. NFC
Craig Topper [Wed, 29 Apr 2015 07:13:12 +0000 (07:13 +0000)]
[TableGen] Fold a couple dyn_casts into the ifs that check their results. NFC

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

9 years ago[TableGen] Replace some dyn_casts followed by an assert with just a regular cast...
Craig Topper [Wed, 29 Apr 2015 07:13:05 +0000 (07:13 +0000)]
[TableGen] Replace some dyn_casts followed by an assert with just a regular cast which asserts internally. NFC

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

9 years agofixed comments, blanks, nullptr; NFC
Elena Demikhovsky [Wed, 29 Apr 2015 06:49:50 +0000 (06:49 +0000)]
fixed comments, blanks, nullptr; NFC

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

9 years ago[TableGen] Use range-based for loops. NFC
Craig Topper [Wed, 29 Apr 2015 04:43:36 +0000 (04:43 +0000)]
[TableGen] Use range-based for loops. NFC

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

9 years agoDrop Dragonegg from the release export script
Hans Wennborg [Wed, 29 Apr 2015 02:36:43 +0000 (02:36 +0000)]
Drop Dragonegg from the release export script

Follow-up to r236077.

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

9 years agoUse an "early return" idiom for the error case. NFC
Filipe Cabecinhas [Wed, 29 Apr 2015 02:36:08 +0000 (02:36 +0000)]
Use an "early return" idiom for the error case. NFC

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

9 years agoCheck that we have a valid PointerType element type before calling get()
Filipe Cabecinhas [Wed, 29 Apr 2015 02:27:28 +0000 (02:27 +0000)]
Check that we have a valid PointerType element type before calling get()

Same as r236073 but for PointerType.

Bug found with AFL fuzz.

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

9 years agoUse the ArrayType member function for array element types.
Filipe Cabecinhas [Wed, 29 Apr 2015 02:27:21 +0000 (02:27 +0000)]
Use the ArrayType member function for array element types.

ArrayType and StructType accept the same types, so no test.

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

9 years agoDrop Dragonegg support from the release script
Hans Wennborg [Wed, 29 Apr 2015 02:14:26 +0000 (02:14 +0000)]
Drop Dragonegg support from the release script

It doesn't have a maintainer and none of the release testers test it,
so I don't think it should be part of the release.

http://reviews.llvm.org/D9331

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

9 years agoTurn an assert into report_fatal_error since it's reachable based on user input
Filipe Cabecinhas [Wed, 29 Apr 2015 01:58:31 +0000 (01:58 +0000)]
Turn an assert into report_fatal_error since it's reachable based on user input

Bug found with AFL fuzz.

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

9 years ago[Orc] It's not valid to pass a null resolver to addModuleSet. Use a no-op
Lang Hames [Wed, 29 Apr 2015 01:33:35 +0000 (01:33 +0000)]
[Orc] It's not valid to pass a null resolver to addModuleSet. Use a no-op
resolver with a diagnostic instread.

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

9 years agoMake sure that isValidElementType(Type) before calling {Array,Struct}Type::get(Type)
Filipe Cabecinhas [Wed, 29 Apr 2015 01:27:01 +0000 (01:27 +0000)]
Make sure that isValidElementType(Type) before calling {Array,Struct}Type::get(Type)

Bug found with AFL fuzz.

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

9 years agoRegisterCoalescer: hide terminal rule option by default
Matthias Braun [Tue, 28 Apr 2015 23:55:11 +0000 (23:55 +0000)]
RegisterCoalescer: hide terminal rule option by default

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

9 years agotest-release.sh: Drop some unused command-line options.
Hans Wennborg [Tue, 28 Apr 2015 23:37:41 +0000 (23:37 +0000)]
test-release.sh: Drop some unused command-line options.

These haven't done anything since before r142165.

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

9 years agoMap directly from signature symbol to group index. NFC.
Rafael Espindola [Tue, 28 Apr 2015 22:59:58 +0000 (22:59 +0000)]
Map directly from signature symbol to group index. NFC.

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

9 years agoReuse a lookup in an assert.
Eric Christopher [Tue, 28 Apr 2015 22:38:35 +0000 (22:38 +0000)]
Reuse a lookup in an assert.

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

9 years agoRemove redundant temporary std::vector.
Rafael Espindola [Tue, 28 Apr 2015 22:26:19 +0000 (22:26 +0000)]
Remove redundant temporary std::vector.

New sections are added to the end of the list, so the RelSections array was
redundant.

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

9 years agoARM: fix peephole optimisation of TST
Tim Northover [Tue, 28 Apr 2015 22:03:55 +0000 (22:03 +0000)]
ARM: fix peephole optimisation of TST

We were trying to look through COPY instructions, but only to the next
instruction in a BB and incorrectly anyway. The cases where that would actually
be a good idea are rare enough (and not even tested!) that it's not worth
trying to get right.

rdar://20721342

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

9 years agoAvoid one more walk over all sections. NFC.
Rafael Espindola [Tue, 28 Apr 2015 22:03:22 +0000 (22:03 +0000)]
Avoid one more walk over all sections. NFC.

Set the group section index as they are created.

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

9 years agoStyle updates
Andrew Kaylor [Tue, 28 Apr 2015 22:01:51 +0000 (22:01 +0000)]
Style updates

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

9 years agoUse a range loop. NFC.
Rafael Espindola [Tue, 28 Apr 2015 21:58:05 +0000 (21:58 +0000)]
Use a range loop. NFC.

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

9 years ago[WinEH] Split blocks at calls to llvm.eh.begincatch
Andrew Kaylor [Tue, 28 Apr 2015 21:54:14 +0000 (21:54 +0000)]
[WinEH] Split blocks at calls to llvm.eh.begincatch

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

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

9 years agoAvoid an extra walk over the sections just to assign sections to groups.
Rafael Espindola [Tue, 28 Apr 2015 21:52:33 +0000 (21:52 +0000)]
Avoid an extra walk over the sections just to assign sections to groups.

Assign the sections in the same pass we compute the index.

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