[FastISel][AArch64] Refactor float zero materialization. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216403 91177308-0d34-0410-b5e6-96231b3b80d8
Refactor argument serialization logic when executing process. NFC.

This patch refactors the argument serialization logic used in the Execute
function, used to launch new Windows processes. There is a critical step that
joins char** arguments into a single string, building the command line used to
launch the new process, and the readability of this code is improved if this
part is refactored in its own helper function.

Patch by Rafael Auler!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216411 91177308-0d34-0410-b5e6-96231b3b80d8
[MCJIT] Dump section memory both before and after relocations are applied.

Also switch section memory dump format from 8 to 16 columns.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216413 91177308-0d34-0410-b5e6-96231b3b80d8
Fix bug in llvm::sys::argumentsFitWithinSystemLimits().

This patch fixes a subtle bug in the UNIX implementation of
llvm::sys::argumentsFitWithinSystemLimits() regarding the misuse of a static
variable. This bug causes our cached number that stores the system command line
maximum length to be halved after each call to the function. With a sufficient
number of calls to this function, it will eventually report any given command
line string to be over system limits.

Patch by Rafael Auler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216415 91177308-0d34-0410-b5e6-96231b3b80d8
[MCJIT][SystemZ] Use a simpler expression for indirect relocation offsets.

The expressions 'Reloc.Addend - Addend' and 'Reloc.Offset' should always be
equal in this context. The latter is prefered - we want to remove the
RelocationValueRef::Addend field in the future.





git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216418 91177308-0d34-0410-b5e6-96231b3b80d8
ArgPromotion: Don't touch variadic functions

Adding, removing, or changing non-pack parameters can change the ABI
classification of pack parameters. Clang and other frontends encode the
classification in the IR of the call site, but the callee side
determines it dynamically based on the number of registers consumed so
far. Changing the prototype affects the number of registers consumed
would break such code.

Dead argument elimination performs a similar task and already has a
similar check to avoid this problem.

Patch by Thomas Jablin!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216421 91177308-0d34-0410-b5e6-96231b3b80d8
Fix Path unittests on Windows after raw_fd_ostream changes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216422 91177308-0d34-0410-b5e6-96231b3b80d8
Declare that musttail calls in variadic functions forward the ellipsis

Summary:
There is no functionality change here except in the way we assemble and
dump musttail calls in variadic functions. There's really no need to
separate out the bits for musttail and "is forwarding varargs" on call
instructions. A musttail call by definition has to forward the ellipsis
or it would fail verification.

Reviewers: chandlerc, nlewycky

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D4892

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216423 91177308-0d34-0410-b5e6-96231b3b80d8
fix typos in comments


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216424 91177308-0d34-0410-b5e6-96231b3b80d8
musttail: Don't eliminate varargs packs if there is a forwarding call

Also clean up and beef up this grep test for the feature.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216425 91177308-0d34-0410-b5e6-96231b3b80d8
CodeGen/LiveVariables: use vector::assign()

Address review comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216426 91177308-0d34-0410-b5e6-96231b3b80d8
ExecutionEngine: address review comments

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216427 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "Support/Path: remove raw delete"

This reverts commit r216360.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216428 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "Support/APFloat: unique_ptr-ify temp arrays"

This reverts commit rr216359.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216429 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "NVPTX: remove another raw delete call"

This reverts commit r216364.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216430 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "Analysis: unique_ptr-ify DependenceAnalysis::collectCoeffInfo"

This reverts commit r216358.

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

Address review comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216432 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "AArch64: use std::vector for temp array"

This reverts commit r216365.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216433 91177308-0d34-0410-b5e6-96231b3b80d8
AArch64: use std::fill instead of memset

Followup based on review.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216436 91177308-0d34-0410-b5e6-96231b3b80d8
InstSimplify: Simplify trivial pointer expressions like b + (e - b)

consider:
long long *f(long long *b, long long *e) {
  return b + (e - b);
}

we would lower this to something like:
define i64* @f(i64* %b, i64* %e) {
  %1 = ptrtoint i64* %e to i64
  %2 = ptrtoint i64* %b to i64
  %3 = sub i64 %1, %2
  %4 = ashr exact i64 %3, 3
  %5 = getelementptr inbounds i64* %b, i64 %4
  ret i64* %5
}

This should fold away to just 'e'.

N.B.  This adds m_SpecificInt as a convenient way to match against a
particular 64-bit integer when using LLVM's match interface.

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