SuccessChanges

Summary

  1. Merging r309523: ------------------------------------------------------------------------ r309523 | brad | 2017-07-30 14:13:59 -0700 (Sun, 30 Jul 2017) | 2 lines Also pass -pie back to the linker when linking on OpenBSD. ------------------------------------------------------------------------
  2. Merging r309744: ------------------------------------------------------------------------ r309744 | mstorsjo | 2017-08-01 14:13:54 -0700 (Tue, 01 Aug 2017) | 29 lines [AArch64] Rewrite stack frame handling for win64 vararg functions The previous attempt, which made do with a single offset in computeCalleeSaveRegisterPairs, wasn't quite enough. The previous attempt only worked as long as CombineSPBump == true (since the offset would be adjusted later in fixupCalleeSaveRestoreStackOffset). Instead include the size for the fixed stack area used for win64 varargs in calculations in emitPrologue/emitEpilogue. The stack consists of mainly three parts; - AFI->getLocalStackSize() - AFI->getCalleeSavedStackSize() - FixedObject Most of the places in the code which previously used the CSStackSize now use PrologueSaveSize instead, which is the sum of the latter two, while some cases which need exactly the middle one use AFI->getCalleeSavedStackSize() explicitly instead of a local variable. In addition to moving the offsetting into emitPrologue/emitEpilogue (which fixes functions with CombineSPBump == false), also set the frame pointer to point to the right location, where the frame pointer and link register actually are stored. In addition to the prologue/epilogue, this also requires changes to resolveFrameIndexReference. Add tests for a function that keeps a frame pointer and another one that uses a VLA. Differential Revision: https://reviews.llvm.org/D35919 ------------------------------------------------------------------------
  3. Merging r309555: ------------------------------------------------------------------------ r309555 | mstorsjo | 2017-07-31 04:18:41 -0700 (Mon, 31 Jul 2017) | 10 lines [llvm-dlltool] Write correct weak externals Previously, the created object files for the import library were broken. Write the symbol table before the string table. Simplify the code by using a separate variable Prefix instead of duplicating a few lines. Also update the coff-weak-exports to actually check that the generated weak symbols can be found as intended. Differential Revision: https://reviews.llvm.org/D36065 ------------------------------------------------------------------------
  4. Merging r309594: ------------------------------------------------------------------------ r309594 | majnemer | 2017-07-31 10:47:07 -0700 (Mon, 31 Jul 2017) | 4 lines [IPSCCP] Guard a user of getInitializer with hasDefinitiveInitializer We are not allowed to reason about an initializer value without first consulting hasDefinitiveInitializer. ------------------------------------------------------------------------
Revision 309844 by hans:
Merging r309523:
------------------------------------------------------------------------
r309523 | brad | 2017-07-30 14:13:59 -0700 (Sun, 30 Jul 2017) | 2 lines

Also pass -pie back to the linker when linking on OpenBSD.

------------------------------------------------------------------------
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/branches/release_50clang.src
The file was modified/cfe/branches/release_50/lib/Driver/ToolChains/OpenBSD.cppclang.src/lib/Driver/ToolChains/OpenBSD.cpp
The file was modified/cfe/branches/release_50/test/Driver/openbsd.cclang.src/test/Driver/openbsd.c
Revision 309843 by hans:
Merging r309744:
------------------------------------------------------------------------
r309744 | mstorsjo | 2017-08-01 14:13:54 -0700 (Tue, 01 Aug 2017) | 29 lines

[AArch64] Rewrite stack frame handling for win64 vararg functions

The previous attempt, which made do with a single offset in
computeCalleeSaveRegisterPairs, wasn't quite enough. The previous
attempt only worked as long as CombineSPBump == true (since the
offset would be adjusted later in fixupCalleeSaveRestoreStackOffset).

Instead include the size for the fixed stack area used for win64
varargs in calculations in emitPrologue/emitEpilogue. The stack
consists of mainly three parts;
- AFI->getLocalStackSize()
- AFI->getCalleeSavedStackSize()
- FixedObject

Most of the places in the code which previously used the CSStackSize
now use PrologueSaveSize instead, which is the sum of the latter
two, while some cases which need exactly the middle one use
AFI->getCalleeSavedStackSize() explicitly instead of a local variable.

In addition to moving the offsetting into emitPrologue/emitEpilogue
(which fixes functions with CombineSPBump == false), also set the
frame pointer to point to the right location, where the frame pointer
and link register actually are stored. In addition to the prologue/epilogue,
this also requires changes to resolveFrameIndexReference.

Add tests for a function that keeps a frame pointer and another one
that uses a VLA.

Differential Revision: https://reviews.llvm.org/D35919
------------------------------------------------------------------------
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/branches/release_50llvm.src
The file was modified/llvm/branches/release_50/lib/Target/AArch64/AArch64FrameLowering.cppllvm.src/lib/Target/AArch64/AArch64FrameLowering.cpp
The file was modified/llvm/branches/release_50/test/CodeGen/AArch64/aarch64_win64cc_vararg.llllvm.src/test/CodeGen/AArch64/aarch64_win64cc_vararg.ll
The file was modified/llvm/branches/release_50/test/CodeGen/AArch64/win64_vararg.llllvm.src/test/CodeGen/AArch64/win64_vararg.ll
Revision 309837 by hans:
Merging r309555:
------------------------------------------------------------------------
r309555 | mstorsjo | 2017-07-31 04:18:41 -0700 (Mon, 31 Jul 2017) | 10 lines

[llvm-dlltool] Write correct weak externals

Previously, the created object files for the import library were broken.
Write the symbol table before the string table. Simplify the code by
using a separate variable Prefix instead of duplicating a few lines.

Also update the coff-weak-exports to actually check that the generated
weak symbols can be found as intended.

Differential Revision: https://reviews.llvm.org/D36065
------------------------------------------------------------------------
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/branches/release_50llvm.src
The file was modified/llvm/branches/release_50/lib/Object/COFFImportFile.cppllvm.src/lib/Object/COFFImportFile.cpp
The file was modified/llvm/branches/release_50/test/DllTool/coff-weak-exports.defllvm.src/test/DllTool/coff-weak-exports.def
Revision 309827 by hans:
Merging r309594:
------------------------------------------------------------------------
r309594 | majnemer | 2017-07-31 10:47:07 -0700 (Mon, 31 Jul 2017) | 4 lines

[IPSCCP] Guard a user of getInitializer with hasDefinitiveInitializer

We are not allowed to reason about an initializer value without first
consulting hasDefinitiveInitializer.
------------------------------------------------------------------------
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/branches/release_50llvm.src
The file was modified/llvm/branches/release_50/lib/Transforms/Scalar/SCCP.cppllvm.src/lib/Transforms/Scalar/SCCP.cpp
The file was added/llvm/branches/release_50/test/Transforms/SCCP/definite-initializer.llllvm.src/test/Transforms/SCCP/definite-initializer.ll