XCore target: fix handling of unsized global arrays in large code model

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198609 91177308-0d34-0410-b5e6-96231b3b80d8
XCore target: Refactor the loading of constants into a register

This common functionality will be used to lower FRAME_TO_ARGS_OFFSET.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198610 91177308-0d34-0410-b5e6-96231b3b80d8
XCore target: Refactor LR handling

We also narrow the liveness of FP & LR during the prologue to
reflect the actual usage of the registers.
I have been unable to construct a test to prove the previous live
range was too large.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198611 91177308-0d34-0410-b5e6-96231b3b80d8
XCore target: Optimise entsp / retsp selection

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198612 91177308-0d34-0410-b5e6-96231b3b80d8
XCore target: Lower RETURNADDR

Only handles a depth of zero (the same as FRAMEADDR)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198613 91177308-0d34-0410-b5e6-96231b3b80d8
XCore target: Lower FRAME_TO_ARGS_OFFSET

This requires a knowledge of the stack size which is not known until
the frame is complete, hence the need for the XCoreFTAOElim pass
which lowers the XCoreISD::FRAME_TO_ARGS_OFFSET instrution into its
final form.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198614 91177308-0d34-0410-b5e6-96231b3b80d8
XCore target: Lower EH_RETURN

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198615 91177308-0d34-0410-b5e6-96231b3b80d8
XCore Target: correct callee save register spilling when callsUnwindInit is true.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198616 91177308-0d34-0410-b5e6-96231b3b80d8
ARM MachO: sort out isTargetDarwin/isTargetIOS/... checks.

The ARM backend has been using most of the MachO related subtarget
checks almost interchangeably, and since the only target it's had to
run on has been IOS (which is all three of MachO, Darwin and IOS) it's
worked out OK so far.

But we'd like to support embedded targets under the "*-*-none-macho"
triple, which means everything starts falling apart and inconsistent
behaviours emerge.

This patch should pick a reasonably sensible set of behaviours for the
new triple (and any others that come along, with luck). Some choices
were debatable (notably FP == r7 or r11), but we can revisit those
later when deficiencies become apparent.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198624 91177308-0d34-0410-b5e6-96231b3b80d8
Introduce a cmake LLVM_ENABLE_LIBCXX build parameter to compile using libc++ instead of the system default 

Summary:
This parameter is required to build C++11 projects (like lld or lldb) on OS X as the default STL does not provide c++ classes.


CC: llvm-commits, triton

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198625 91177308-0d34-0410-b5e6-96231b3b80d8
Reapply r198478 "Fix PR18361: Invalidate LoopDispositions after LoopSimplify hoists things."

Now with a fix for PR18384: ValueHandleBase::ValueIsDeleted.

We need to invalidate SCEV's loop info when we delete a block, even if no values are hoisted.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198631 91177308-0d34-0410-b5e6-96231b3b80d8
Fix c++ mode comments

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198632 91177308-0d34-0410-b5e6-96231b3b80d8
Improve documentation of the 'a' specifier and the '<abi>:<pref>' align pair.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198636 91177308-0d34-0410-b5e6-96231b3b80d8
For the 'C' disassembler API, add a new ReferenceType for the
SymbolLookUp() call back to return a demangled C++ name to
be used as a comment.

For example darwin's otool(1) program the uses the llvm
disassembler now can produce disassembly like:

callq   __ZNK4llvm6Target20createMCDisassemblerERKNS_15MCSubtargetInfoE ## llvm::Target::createMCDisassembler(llvm::MCSubtargetInfo const&) const

Also fix a bug in LLVMDisasmInstruction() that was not flushing
the raw_svector_ostream for the disassembled instruction string
before copying it to the output buffer that was causing truncation
of the output.

rdar://10173828


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