Add a test case for r212596

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212828 91177308-0d34-0410-b5e6-96231b3b80d8
R600/SI: fix shadow mapping for 1D and 2D array textures

It was conflicting with def TEX_SHADOW_ARRAY, which also handles them.

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212829 91177308-0d34-0410-b5e6-96231b3b80d8
R600/SI: add sample and image intrinsics exposing all instruction fields

We need the intrinsics with offsets, so why not just add them all.
The R128 parameter will also be useful for reducing SGPR usage.
GL_ARB_image_load_store also adds some image GLSL modifiers like "coherent",
so Mesa will probably translate those to slc, glc, etc.

When LLVM 3.5 is released, I'll switch Mesa to these new intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212830 91177308-0d34-0410-b5e6-96231b3b80d8
R600/SI: Use i32 vectors for resources and samplers

This affects new intrinsics only.

What surprises me is that v32i8 still works.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212831 91177308-0d34-0410-b5e6-96231b3b80d8
[PowerPC] Fix invalid displacement created by LocalStackAlloc

This commit fixes a bug in PPCRegisterInfo::isFrameOffsetLegal that
could result in the LocalStackAlloc pass creating an MI instruction
out-of-range displacement:
        %vreg17<def> = LD 33184, %vreg31; mem:LD8[%g](align=32)
        %G8RC:%vreg17 G8RC_and_G8RC_NOX0:%vreg31
(In final assembler output the top bits are stripped off, resulting
in a negative offset loading from below the stack pointer.)

Common code expects the isFrameOffsetLegal routine to verify whether
adding a given offset to the offset already present in the instruction
results in a valid displacement.  However, on PowerPC the routine
did not take the already present instruction offset into account.

This commit fixes isFrameOffsetLegal to add the instruction offset,
and updates a local caller (needsFrameBaseReg) to no longer add the
instruction offset itself before calling isFrameOffsetLegal.

Reviewed by Hal Finkel.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212832 91177308-0d34-0410-b5e6-96231b3b80d8
[MC] Constify MCELF::GetVisibility and MCELF::getOther

These two routines didn't take a "const MCSymbolData &SD"
like the other MCELF::Get routines for some reason ...



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212834 91177308-0d34-0410-b5e6-96231b3b80d8
Simplify the raw_svector_ostream tweak from r212816

The memcpy() and overlap helps didn't help much with timings, so clean up the change.

The difference at this point is that we now leave growth of the storage buffer
up to SmallVector's implementation:

 -   OS.reserve(OS.capacity() * 2);
 +   OS.reserve(OS.size() + 64);

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212837 91177308-0d34-0410-b5e6-96231b3b80d8
Add the "-s" flag to llvm-nm for Mach-O files that prints symbols only in
the specified section.  This is same functionality as darwin’s nm(1) "-s" flag.

There is one FIXME in the code and I’m all ears to anyone that can help me
with that.  This option takes exactly two strings and should be allowed
anywhere on the command line.  Such that "llvm-nm -s __TEXT __text foo.o"
would work. But that does not as the CommandLine Library does not have a
way to make this work as far as I can tell.  For now the "-s __TEXT __text"
has to be last on the command line.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212842 91177308-0d34-0410-b5e6-96231b3b80d8
[FastISel] Breakout intrinsic lowering into a separate function and add a target-hook.

Create a separate helper function for target-independent intrinsic lowering. Also
add an target-hook that allows to directly call into a target-sepcific intrinsic
lowering method. Currently the implementation is opt-in and doesn't affect
existing target implementations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212843 91177308-0d34-0410-b5e6-96231b3b80d8
[FastISel] Make isInTailCallPosition independent of SelectionDAG.

Break out the arguemnts required from SelectionDAG, so that this function can
also be used by FastISel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212844 91177308-0d34-0410-b5e6-96231b3b80d8
Move the API and implementation of clang::driver::getARMCPUForMArch() to llvm::Triple::getARMCPUForArch().

Suggested by Eric Christopher.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212846 91177308-0d34-0410-b5e6-96231b3b80d8
When we sink an instruction, this can open up opportunity for the operands to be sunk - add them to the worklist

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212847 91177308-0d34-0410-b5e6-96231b3b80d8
[FastISel] Add basic infrastructure to support a target-independent call lowering hook in FastISel. WIP

The infrastructure mimics the call lowering we have already in place for
SelectionDAG, but with limitations. For example structure return demotion and
non-simple types are not supported (yet).

Currently every backend has its own implementation and duplicated code for call
lowering. There is also no specified interface that could be called from
target-independent code. The target-hook is opt-in and doesn't affect current
implementations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212848 91177308-0d34-0410-b5e6-96231b3b80d8
[FastISel] Add target-independent patchpoint intrinsic support. WIP.

This implements the target-independent lowering for the patchpoint
intrinsic. Targets have to implement the FastLowerCall
hook to support this intrinsic.

Related to <rdar://problem/17427052>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212849 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] Introduce a struct representing the layout of metadata entry in llvm.asan.globals.

No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212850 91177308-0d34-0410-b5e6-96231b3b80d8
[FastISel][X86] Implement the FastLowerIntrinsicCall hook.

Rename X86VisitIntrinsicCall -> FastLowerIntrinsicCall, which effectively
implements the target hook.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212851 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "[FastISel][X86] Implement the FastLowerIntrinsicCall hook."

This reverts commit r212851, because it broke the memset lowering.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212855 91177308-0d34-0410-b5e6-96231b3b80d8
[RuntimeDyld] Add GOT support for AArch64 to RuntimeDyldMachO.

Test cases to follow once RuntimeDyldChecker supports introspection of stubs.

Fixes <rdar://problem/17648000>



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212859 91177308-0d34-0410-b5e6-96231b3b80d8
BFI: Mark the end of namespaces

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212861 91177308-0d34-0410-b5e6-96231b3b80d8
Avoid a warning from MSVC on "*/" in this code by inserting a space

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