[SystemZ] Handle extensions in RxSBG optimizations

The input to an RxSBG operation can be narrower as long as the upper bits
are don't care.  This fixes a FIXME added in r192783.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192790 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] Optimize accesses to global arrays with constant index

Summary:
Given a global array G[N], which is declared in this CU and has static initializer
avoid instrumenting accesses like G[i], where 'i' is a constant and 0<=i<N.
Also add a bit of stats.

This eliminates ~1% of instrumentations on SPEC2006
and also partially helps when asan is being run together with coverage.

Reviewers: samsonov

Reviewed By: samsonov

CC: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192794 91177308-0d34-0410-b5e6-96231b3b80d8
DAGCombiner: Don't fold xor into not if getNOT would introduce an illegal constant.

This happens e.g. with <2 x i64> -1 on x86_32. It cannot be generated directly
because i64 is illegal. It would be nice if getNOT would handle this
transparently, but I don't see a way to generate a legal constant there right
now. Fixes PR17487.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192795 91177308-0d34-0410-b5e6-96231b3b80d8
Add more documentation about the TargetStreamer interface.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192796 91177308-0d34-0410-b5e6-96231b3b80d8
SLPVectorizer: Don't vectorize volatile memory operations

radar://15231682

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192799 91177308-0d34-0410-b5e6-96231b3b80d8
[AArch64] Add support for NEON scalar signed saturating accumulated of unsigned
value and unsigned saturating accumulate of signed value instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192800 91177308-0d34-0410-b5e6-96231b3b80d8
Assert on duplicate registration. Don't depend on function pointer equality.

Before this patch we would assert when building llvm as multiple shared
libraries (cmake's BUILD_SHARED_LIBS). The problem was the line

if (T.AsmStreamerCtorFn == Target::createDefaultAsmStreamer)

which returns false because of -fvisibility-inlines-hidden. It is easy
to fix just this one case, but I decided to try to also make the
registration more strict. It looks like the old logic for ignoring
followup registration was just a temporary hack that outlived its
usefulness.

This patch converts the ifs to asserts, fixes the few cases that were
registering twice and makes sure all the asserts compare with null.

Thanks for Joerg for reporting the problem and reviewing the patch.

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

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192806 91177308-0d34-0410-b5e6-96231b3b80d8
Adding oprofile support for MCJIT.

Patch by Dmitry Stogov



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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192810 91177308-0d34-0410-b5e6-96231b3b80d8
R600: Remove some dead code from the AMDILCFGStructurizer

Reviewed-by: Vincent Lejeune<vljn at ovi.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192812 91177308-0d34-0410-b5e6-96231b3b80d8
R600: Fix a crash in the AMDILCFGStructurizer

We were calling llvm_unreachable() when failing to optimize the
branch into if case.  However, it is still possible for us
to structurize the CFG by duplicating blocks even if this optimization
fails.

Reviewed-by: Vincent Lejeune<vljn at ovi.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192813 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "SLPVectorizer: Don't vectorize volatile memory operations"

This speculatively reverts commit 192799. It might have broken a linux buildbot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192816 91177308-0d34-0410-b5e6-96231b3b80d8
SLPVectorizer: Don't vectorize volatile memory operations

radar://15231682

Reapply r192799,
  http://lab.llvm.org:8011/builders/lldb-x86_64-debian-clang/builds/8226
showed that the bot is still broken even with this out.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192820 91177308-0d34-0410-b5e6-96231b3b80d8
[llvm-c] Add LLVMPrintModuleToString.

Like LLVMDumpModule but returns the string (that needs to be freed
with LLVMDisposeMessage) instead of printing it to stderr.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192821 91177308-0d34-0410-b5e6-96231b3b80d8
Fix MCDataAtom never calling remap when adding data.

This patch fixes a small mistake in MCDataAtom::addData() where it doesn't ever
call remap():

-  if (Data.size() > Begin - End - 1)
+  if (Data.size() > End + 1 - Begin)
     remap(Begin, End + 1);

This is currently not visible because of another bug is the disassembler, so
the patch includes a unit test.

Patch by Stephen Checkoway.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192823 91177308-0d34-0410-b5e6-96231b3b80d8
After PostRA scheduling, don't set kill flags on undef operands.

This should fix the ATOM buildbot failing on break-avx-dep.ll.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192824 91177308-0d34-0410-b5e6-96231b3b80d8
Remove an outdated statement.

Aliases now have their own section where we document which linkages they can
have.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192825 91177308-0d34-0410-b5e6-96231b3b80d8
Create an atom with just the data that failed to disassemble.

Patch by Stephen Checkoway.

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