[msan] Fast path optimization for wrap-indirect-calls feature of MemorySanitizer.

Indirect call wrapping helps MSanDR (dynamic instrumentation companion tool
for MSan) to catch all cases where execution leaves a compiler-instrumented
module by allowing the tool to rewrite targets of indirect calls.

This change is an optimization that skips wrapping for calls when target is
inside the current module. This relies on the linker providing symbols at the
begin and end of the module code (or code + data, does not really matter).
Gold linker provides such symbols by default. GNU (BFD) linker needs a link
flag: -Wl,--defsym=__executable_start=0.

More info:
https://code.google.com/p/memory-sanitizer/wiki/MSanDR#Native_exec


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194697 91177308-0d34-0410-b5e6-96231b3b80d8
[msan] Use CHECK-DAG instead of CHECK where order of instructions does not matter.

This may fix hexagon-elf bots.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194700 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] Poor man's coverage that works with ASan

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194701 91177308-0d34-0410-b5e6-96231b3b80d8
Error if we see an alias to a declaration.

In ELF and COFF an alias is just another offset in a section. There is no way
to represent an alias to something in another file.

In MachO, the spec has the N_INDR type which should allow for exactly that, but
is not currently implemented. Given that it is specified but not implemented,
we error in codegen to avoid miscompiling but don't reject aliases to
declarations in the verifier to leave the option open of implementing it.

In the past we have used alias to declarations as a way of implementing
weakref, which is why it exists in some old tests which this patch updates.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194705 91177308-0d34-0410-b5e6-96231b3b80d8
llvm-cov.test: Remove XFAIL:arm. Seems this is passing since my tweaks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194712 91177308-0d34-0410-b5e6-96231b3b80d8
Add a triple and switch test to FileCheck.

On windows we don't print .weak for function definitions, so count was only
finding 1 'weak'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194713 91177308-0d34-0410-b5e6-96231b3b80d8
ARM: produce friendly error for invalid inline asm

We used to perform an invalid operation on an MVT and crash, which wasn't much
fun.

Patch by Oliver Stannard.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194714 91177308-0d34-0410-b5e6-96231b3b80d8
Fix regular expression to work with multiple-digit version numbers


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194719 91177308-0d34-0410-b5e6-96231b3b80d8
Typos.  (Test commit.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194720 91177308-0d34-0410-b5e6-96231b3b80d8
Remove unnecessary 'else' after return.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194724 91177308-0d34-0410-b5e6-96231b3b80d8
DwarfCompileUnit::getOrCreateContext: Return the compile unit DIE rather than null.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194728 91177308-0d34-0410-b5e6-96231b3b80d8
[AArch64] Remove redundant Neon_immAllOnes/Neon_immAllZeros leaf patterns.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194733 91177308-0d34-0410-b5e6-96231b3b80d8
Recognize 0x0000 as a COFF file magic.

Summary:
Some machine-type-neutral object files containing only undefined symbols
actually do exist in the Windows standard library. Need to recognize them
as COFF files.

Reviewers: Bigcheese

CC: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194734 91177308-0d34-0410-b5e6-96231b3b80d8
DebugInfo: Simplify/narrow null-check for getOrCreateType

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194737 91177308-0d34-0410-b5e6-96231b3b80d8
R600/SI: Specify S_ADDK/S_MULK set SCC and are commutable

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194738 91177308-0d34-0410-b5e6-96231b3b80d8
Add #include raw_ostream.h in lib/Target/R600/SIFixSGPRCopies.cpp

This was casuing my release+asserts build on Windows to fail.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194748 91177308-0d34-0410-b5e6-96231b3b80d8
R600/SI: Remove redundant legalizeOperands call

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194749 91177308-0d34-0410-b5e6-96231b3b80d8
When folding memory operands, preserve existing MachineMemOperands.

This comes into play with patchpoint, which can fold multiple
operands. Since the patchpoint is already treated as a call, the
machine mem operands won't affect anything, and there's nothing to
test. But we still want to do the right thing here to be sure that our
MIs obey the rules.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194750 91177308-0d34-0410-b5e6-96231b3b80d8
R600/SI: Add processor type for Hawaii

Patch by: Alex Deucher

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

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