1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
Go to file
James Y Knight af99ad073e [Sparc] Support user-specified stack object overalignment.
Note: I do not implement a base pointer, so it's still impossible to
have dynamic realignment AND dynamic alloca in the same function.

This also moves the code for determining the frame index reference
into getFrameIndexReference, where it belongs, instead of inline in
eliminateFrameIndex.

[Begin long-winded screed]

Now, stack realignment for Sparc is actually a silly thing to support,
because the Sparc ABI has no need for it -- unlike the situation on
x86, the stack is ALWAYS aligned to the required alignment for the CPU
instructions: 8 bytes on sparcv8, and 16 bytes on sparcv9.

However, LLVM unfortunately implements user-specified overalignment
using stack realignment support, so for now, I'm going to go along
with that tradition. GCC instead treats objects which have alignment
specification greater than the maximum CPU-required alignment for the
target as a separate block of stack memory, with their own virtual
base pointer (which gets aligned). Doing it that way avoids needing to
implement per-target support for stack realignment, except for the
targets which *actually* have an ABI-specified stack alignment which
is too small for the CPU's requirements.

Further unfortunately in LLVM, the default canRealignStack for all
targets effectively returns true, despite that implementing that is
something a target needs to do specifically. So, the previous behavior
on Sparc was to silently ignore the user's specified stack
alignment. Ugh.

Yet MORE unfortunate, if a target actually does return false from
canRealignStack, that also causes the user-specified alignment to be
*silently ignored*, rather than emitting an error.

(I started looking into fixing that last, but it broke a bunch of
tests, because LLVM actually *depends* on having it silently ignored:
some architectures (e.g. non-linux i386) have smaller stack alignment
than spilled-register alignment. But, the fact that a register needs
spilling is not known until within the register allocator. And by that
point, the decision to not reserve the frame pointer has been frozen
in place. And without a frame pointer, stack realignment is not
possible. So, canRealignStack() returns false, and
needsStackRealignment() then returns false, assuming everyone can just
go on their merry way assuming the alignment requirements were
probably just suggestions after-all. Sigh...)

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

llvm-svn: 245668
2015-08-21 04:17:56 +00:00
autoconf Add an exposed variable for which c++ compiler we're using for our 2015-08-17 22:46:26 +00:00
bindings [PM/AA] Remove the last relics of the separate IPA library from LLVM, 2015-08-18 17:51:53 +00:00
cmake [cmake] Start adding support for LLVM_USE_SANITIZER=Address on Windows 2015-08-14 16:48:34 +00:00
docs [Kaleidoscope] More inter-chapter diff reduction. 2015-08-19 18:32:58 +00:00
examples [CMake] Kaleidoscope-Ch2: Don't pass -Wno-unused-private-field unconditionally. 2015-08-19 22:55:16 +00:00
include TransformUtils: Introduce module splitter. 2015-08-21 02:48:20 +00:00
lib [Sparc] Support user-specified stack object overalignment. 2015-08-21 04:17:56 +00:00
projects build: make libunwind a proper project 2015-04-25 01:47:39 +00:00
resources In MSVC builds embed a VERSIONINFO resource in our exe and DLL files. 2015-06-12 15:58:29 +00:00
test [Sparc] Support user-specified stack object overalignment. 2015-08-21 04:17:56 +00:00
tools TransformUtils: Introduce module splitter. 2015-08-21 02:48:20 +00:00
unittests Allow Optionals to be compared to None 2015-08-19 23:07:27 +00:00
utils Fix three typos in comments; "easilly" -> "easily". 2015-08-18 22:41:58 +00:00
.arcconfig Updated phabricator server. 2014-04-07 03:57:04 +00:00
.clang-format Test commit. 2014-03-02 13:08:46 +00:00
.clang-tidy Enable display of compiler diagnostics in clang-tidy by default. 2014-10-29 17:29:38 +00:00
.gitignore Minor updates to gitignore so that symlinks are ignored in the projects dir. 2015-07-07 20:24:58 +00:00
CMakeLists.txt [lit] Don't disable the lit progress bar by default with MSVC 2015-08-11 21:24:59 +00:00
CODE_OWNERS.TXT Add myself as the InstCombine owner. 2015-08-12 22:30:45 +00:00
configure Add an exposed variable for which c++ compiler we're using for our 2015-08-17 22:46:26 +00:00
CREDITS.TXT [WebAssembly] Initial WebAssembly backend 2015-06-29 23:51:55 +00:00
LICENSE.TXT Update for a new year. 2015-03-12 01:25:29 +00:00
llvm.spec.in [Sparc] Implement i64 load/store support for 32-bit sparc. 2015-08-10 19:11:39 +00:00
LLVMBuild.txt
Makefile [configure/make] Propagate names of build host tools when making BuildTools 2014-03-25 21:45:41 +00:00
Makefile.common
Makefile.config.in We're actually -Wmissing-field-initializers clean thanks to the cmake 2015-08-07 16:44:47 +00:00
Makefile.rules We're actually -Wmissing-field-initializers clean thanks to the cmake 2015-08-07 16:44:47 +00:00
README.txt Revert test commit at revision 233535. 2015-03-30 12:39:03 +00:00

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you're writing a package for LLVM, see docs/Packaging.rst for our
suggestions.