Move string pointer from being a static class member to just a static global in the one file its needed in.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186476 91177308-0d34-0410-b5e6-96231b3b80d8
llvm/test/CodeGen/X86/vec_setcc.ll: Add explicit -mtriple=x86_64-unknown-unknown to satisfy win32-targeted configuration.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186477 91177308-0d34-0410-b5e6-96231b3b80d8
PPC: Implement base pointer and stack realignment

This builds on some frame-lowering code that has existed since 2005 (r24224)
but was disabled in 2008 (r48188) because it needed base pointer support to
function correctly. This implementation follows the strategy suggested by Dale
Johannesen in r48188 where the following comment was added:

  This does not currently work, because the delta between old and new stack
  pointers is added to offsets that reference incoming parameters after the
  prolog is generated, and the code that does that doesn't handle a variable
  delta.  You don't want to do that anyway; a better approach is to reserve
  another register that retains to the incoming stack pointer, and reference
  parameters relative to that.

And now we do exactly that. If we don't need a frame pointer, then we use r31
as a base pointer. If we do need a frame pointer, then we use r30 as a base
pointer. The base pointer retains the value of the stack pointer before it was
decremented in the prologue. We then use the base pointer to resolve all
negative frame indicies. The basic scheme follows that for base pointers in the
X86 backend.

We use a base pointer when we need to dynamically realign the incoming stack
pointer. This currently applies only to static objects (dynamic allocas with
large alignments, and base-pointer support in SjLj lowering will come in future
commits).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186478 91177308-0d34-0410-b5e6-96231b3b80d8
SLPVectorizer: Accelerate the isConsecutive check by replacing the subtraction of the two values with a simple SCEV expression that adds the offset to one of the pointers that we compare.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186479 91177308-0d34-0410-b5e6-96231b3b80d8
raw_ostream.cpp: Introduce <fcntl.h> to let O_BINARY provided. Or, llvm::outs() would be set to O_TEXT by default.

llvm/test/Object/check_binary_output.ll is expected to pass on win32.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186480 91177308-0d34-0410-b5e6-96231b3b80d8
Make constant string pointer into an array to remove a pointer lookup for every access.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186482 91177308-0d34-0410-b5e6-96231b3b80d8
Don't fallback to copy + delete in rename.

Rename's documentation says "Files are renamed as if by POSIX rename()". and it
is used for atomically updating output files from a temporary. Having rename
fallback to a non atomic copy has the potential to hide bugs, like using
a temporary file in /tmp instead of a unique name next to the final destination.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186483 91177308-0d34-0410-b5e6-96231b3b80d8
Make a few more static string pointers constant.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186484 91177308-0d34-0410-b5e6-96231b3b80d8
Mark a method 'const' and another 'static'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186485 91177308-0d34-0410-b5e6-96231b3b80d8
Add simpler version of is_directory. It will be used in clang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186486 91177308-0d34-0410-b5e6-96231b3b80d8
PPC: Add CTR-register clobber to builtin setjmp

Because the builtin longjmp implementation uses a CTR-based indirect jump, when
the control flow arrives at the builtin setjmp call, the CTR register has
necessarily been clobbered. Correspondingly, this adds CTR to the list of
implicit definitions of the builtin setjmp pseudo instruction.

We don't need to add CTR to the implicit definitions of builtin longjmp
because, even though it does clobber the CTR register, the control flow cannot
return to inside the loop unless there is also a builtin setjmp call.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186488 91177308-0d34-0410-b5e6-96231b3b80d8
Fix ARMFastISel::ARMEmitIntExt shift emission

My patch 'r183551 - ARM FastISel integer sext/zext improvements' was incorrect when emitting ARM register-immediate ASR, LSL, LSR instructions: they are pseudo-instructions in ARMInstrInfo.td and I should have used MOVsi instead.

This is not an issue when code is generated through a .s file, but is an issue when generated straight to a .o (-filetype=obj).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186489 91177308-0d34-0410-b5e6-96231b3b80d8
Make x86 fast-isel correctly choose between aligned and unaligned operations for vector stores. Fixes PR16640.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186491 91177308-0d34-0410-b5e6-96231b3b80d8
llvm-symbolizer: be more careful with colons in file names

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186493 91177308-0d34-0410-b5e6-96231b3b80d8
LLVMSymbolize.cpp: Fix build. Triple::ArchType is not a namespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186494 91177308-0d34-0410-b5e6-96231b3b80d8
Teach x86 fast-isel to use AVX opcodes for vector stores when AVX is enabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186496 91177308-0d34-0410-b5e6-96231b3b80d8
Tweak the cmake interaction between CMAKE_BUILD_TYPE and LLVM_ENABLE_ASSERTIONS.
The issue is that CMAKE_BUILD_TYPE=RelWithDebInfo LLVM_ENABLE_ASSERTIONS=ON was
not building with assertions enabled.  (I was unable to find what in the LLVM
source tree was adding -DNDEBUG to the build line in this case, so decided that
it must be cmake itself that was adding it - this may depend on the cmake
version).  The fix treats any mode that is not Debug as being the same as
Release for this purpose (previously it was being assumed that cmake would only
add -DNDEBUG for Release and not for RelWithDebInfo or MinSizeRel).  If other
versions of cmake don't add -DNDEBUG for RelWithDebInfo then that's OK: with
this change you just get a useless but harmless -UNDEBUG or -DNDEBUG.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186499 91177308-0d34-0410-b5e6-96231b3b80d8
[XCore] Ensure implicit operands aren't lost on the return instruction.

Patch by Robert Lytton.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186500 91177308-0d34-0410-b5e6-96231b3b80d8
Ensure sys::getProcessTriple always uses a normalized triple.  Patch by
Thomas B. Jablin, from PR16636.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186501 91177308-0d34-0410-b5e6-96231b3b80d8
llvm-ar: doExtract(): Write extracted files with F_Binary. It should fix llvm/test/Object/extract.ll

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