1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00
llvm-mirror/test
Serge Pavlov b8ce9ec478 Add extra operand to CALLSEQ_START to keep frame part set up previously
Using arguments with attribute inalloca creates problems for verification
of machine representation. This attribute instructs the backend that the
argument is prepared in stack prior to  CALLSEQ_START..CALLSEQ_END
sequence (see http://llvm.org/docs/InAlloca.htm for details). Frame size
stored in CALLSEQ_START in this case does not count the size of this
argument. However CALLSEQ_END still keeps total frame size, as caller can
be responsible for cleanup of entire frame. So CALLSEQ_START and
CALLSEQ_END keep different frame size and the difference is treated by
MachineVerifier as stack error. Currently there is no way to distinguish
this case from actual errors.

This patch adds additional argument to CALLSEQ_START and its
target-specific counterparts to keep size of stack that is set up prior to
the call frame sequence. This argument allows MachineVerifier to calculate
actual frame size associated with frame setup instruction and correctly
process the case of inalloca arguments.

The changes made by the patch are:
- Frame setup instructions get the second mandatory argument. It
  affects all targets that use frame pseudo instructions and touched many
  files although the changes are uniform.
- Access to frame properties are implemented using special instructions
  rather than calls getOperand(N).getImm(). For X86 and ARM such
  replacement was made previously.
- Changes that reflect appearance of additional argument of frame setup
  instruction. These involve proper instruction initialization and
  methods that access instruction arguments.
- MachineVerifier retrieves frame size using method, which reports sum of
  frame parts initialized inside frame instruction pair and outside it.

The patch implements approach proposed by Quentin Colombet in
https://bugs.llvm.org/show_bug.cgi?id=27481#c1.
It fixes 9 tests failed with machine verifier enabled and listed
in PR27481.

Differential Revision: https://reviews.llvm.org/D32394

llvm-svn: 302527
2017-05-09 13:35:13 +00:00
..
Analysis [X86][AVX1] Improve 256-bit vector costs for integer unary intrinsics. 2017-05-07 20:58:55 +00:00
Assembler Support arbitrary address space pointers in masked gather/scatter intrinsics. 2017-05-03 12:28:54 +00:00
Bindings
Bitcode AMDGPU: Add AMDGPU_HS calling convention 2017-05-02 15:41:10 +00:00
BugPoint
CodeGen Add extra operand to CALLSEQ_START to keep frame part set up previously 2017-05-09 13:35:13 +00:00
DebugInfo Revert "Don't add DBG_VALUE instructions for static allocas in dbg.declare" 2017-05-09 01:57:44 +00:00
Examples
ExecutionEngine
Feature Replace hardcoded intrinsic list with speculatable attribute. 2017-05-03 02:26:10 +00:00
FileCheck
Instrumentation
Integer
JitListener
LibDriver
Linker Remap metadata attached to global variables. 2017-05-04 23:29:39 +00:00
LTO
MC [ARM] Clear the constant pool cache on explicit .ltorg directives 2017-05-08 10:26:24 +00:00
Object
ObjectYAML [WebAssembly] Add ObjectYAML support for wasm name section 2017-05-05 18:12:34 +00:00
Other [PM] Add ProfileSummaryAnalysis as a required pass in the new pipeline. 2017-05-04 16:58:45 +00:00
SymbolRewriter
TableGen
ThinLTO/X86
tools Quick fix to D32609, it seems .o files are not transferred in all cases. 2017-05-08 02:47:25 +00:00
Transforms Fix code section prefix for proper layout 2017-05-09 01:43:24 +00:00
Unit [Lit] Fix to prevent creation of "%SystemDrive%" directory on Windows. 2017-05-08 08:55:38 +00:00
Verifier Make it illegal for two Functions to point to the same DISubprogram 2017-05-08 21:17:08 +00:00
YAMLParser
.clang-format
CMakeLists.txt
lit.cfg
lit.site.cfg.in
TestRunner.sh