ARM: provide diagnostics on more writeback LDM/STM instructions

The set of circumstances where the writeback register is allowed to be in the
list of registers is rather baroque, but I think this implements them all on
the assembly parsing side.

For disassembly, we still warn about an ARM-mode LDM even if the architecture
revision is < v7 (the required architecture information isn't available). It's
a silly instruction anyway, so hopefully no-one will mind.

rdar://problem/15223374

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193185 91177308-0d34-0410-b5e6-96231b3b80d8
llvm-cov: fix a typo and rename a variable.

Rename Size to EndPos, which makes more sense because the variable
stores the last location of the blocks.

Patch by Yuchen Wu!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193189 91177308-0d34-0410-b5e6-96231b3b80d8
llvm-cov: Use uint32_t for loop variables to be more consistent.

The loop bounds here are uint32_t variables, so it makes sense for the
loop variables to have the same type.

Patch by Yuchen Wu!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193192 91177308-0d34-0410-b5e6-96231b3b80d8
DIEHashing: Provide an assert for unreachable functionality regarding friends.

Since (as of r190716) Clang no longer emits debug info for C++ friend
declarations (and it seems GCC never has/does, which was the motivation
for the Clang change), there's no actual reachable case for implementing
the part of DWARF 4, Section 7.27 part 5 that pertains to friends.

Leave an assert here so that if/when we do have a client producing
friends and using type units, we can fill in the gap and add appropriate
(unit and feature) tests.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193194 91177308-0d34-0410-b5e6-96231b3b80d8
Debug Info: code clean up.

Remove unnecessary creation of LexicalScope in collectDeadVariables.
The created LexicialScope was only used to get isAbstractScope, which
should be false from the creation:
"new LexicalScope(NULL, DIDescriptor(SP), NULL, false);".

We can also remove a DenseMap that holds the created LexicalScopes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193196 91177308-0d34-0410-b5e6-96231b3b80d8
R600/SI: Don't assert on SCC usage

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193198 91177308-0d34-0410-b5e6-96231b3b80d8
[X86][FastISel] Add a comment to help understanding changes made in r192636.

<rdar://problem/15192473>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193199 91177308-0d34-0410-b5e6-96231b3b80d8
MC: Support multiple sections with the same name in the same comdat group

Code review by Eric Christopher and Rafael Espindola.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193209 91177308-0d34-0410-b5e6-96231b3b80d8
R600/SI: Use S_LOAD_DWORD instructions for v8i32 and v16i32

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193212 91177308-0d34-0410-b5e6-96231b3b80d8
R600/SI: Add support for i64 bitwise or

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193213 91177308-0d34-0410-b5e6-96231b3b80d8
SelectionDAG: Pass along the original argument/element type in ISD::InputArg

For some targets, it is useful to be able to look at the original
type of an argument without having to dig through the original IR.

This also fixes a bug in SelectionDAGBuilder where InputArg.PartOffset
was not taking into account the offset of structure elements.

Patch by: Justin Holewinski

Tom Stellard:
  - Changed the type of ArgVT to EVT, so it can store non-simple types
    like v3i32.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193214 91177308-0d34-0410-b5e6-96231b3b80d8
R600: Fix handling of vector kernel arguments

The SelectionDAGBuilder was promoting vector kernel arguments to legal
types, but this won't work for R600 and SI since kernel arguments are
stored in memory and can't be promoted.  In order to handle vector
arguments correctly we need to look at the original types from the LLVM IR
function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193215 91177308-0d34-0410-b5e6-96231b3b80d8
R600/SI: fix MIMG writemask adjustement

This fixes piglit:
- shaders/glsl-fs-texture2d-masked
- shaders/glsl-fs-texture2d-masked-4

Patch by: Marek Olšák

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193222 91177308-0d34-0410-b5e6-96231b3b80d8
Test commit. Added whitespace in GCOV.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193224 91177308-0d34-0410-b5e6-96231b3b80d8
R600/SI: Replace ffs(x) - 1 with countTrailingZeros(x)

ffs(x) broke the mingw buildbot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193225 91177308-0d34-0410-b5e6-96231b3b80d8
Add llvm-c-test tool for testing llvm-c

This provides rudimentary testing of the llvm-c api.

The following commands are implemented:

  * --module-dump
    Read bytecode from stdin - print ir

  * --module-list-functions
    Read bytecode from stdin - list summary of functions

  * --module-list-globals
    Read bytecode from stdin - list summary of globals

  * --targets-list
    List available targets

  * --object-list-sections
    Read object file from stdin - list sections

  * --object-list-symbols
    Read object file from stdin - list symbols (like nm)

  * --disassemble
    Read lines of triple, hex ascii machine code from stdin - print disassembly

  * --calc
    Read lines of name, rpn from stdin - print generated module ir

Differential-Revision: http://llvm-reviews.chandlerc.com/D1776



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193233 91177308-0d34-0410-b5e6-96231b3b80d8
Fix check for supported targets in llvm-c lit.local.cfg



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193235 91177308-0d34-0410-b5e6-96231b3b80d8
Make ARM hint ranges consistent, and add tests for these ranges

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193238 91177308-0d34-0410-b5e6-96231b3b80d8
[mips][msa] Added support for matching fexp2 from normal IR (i.e. not intrinsics)



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