1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
llvm-mirror/lib/Target/Mips
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
..
AsmParser [mips] Fix 64bit slt/sltu/nor with immediates 2017-02-28 15:55:23 +00:00
Disassembler [Mips] Fix for decoding DINS instruction - disassembler 2017-03-23 13:19:04 +00:00
InstPrinter Revert "[mips] Fix c.<cc>.<fmt> instruction definition." 2016-09-09 11:06:01 +00:00
MCTargetDesc [mips] Emit R_MICROMIPS_TLS_GOTTPREL relocation for %gottprel in case of microMIPS 2017-04-30 04:27:23 +00:00
TargetInfo Move the global variables representing each Target behind accessor function 2016-10-09 23:00:34 +00:00
CMakeLists.txt [mips][microMIPS] Adding code size reduction pass for MicroMIPS 2017-04-27 13:10:48 +00:00
LLVMBuild.txt
MicroMips32r6InstrFormats.td [mips][microMIPS] Implement LDC1, SDC1, LDC2, SDC2, LWC1, SWC1, LWC2 and SWC2 instructions and add CodeGen support 2016-07-11 07:41:56 +00:00
MicroMips32r6InstrInfo.td [mips] seb, seh instruction aliases 2016-11-22 19:17:23 +00:00
MicroMips64r6InstrFormats.td [mips][microMIPS] Implement DBITSWAP, DLSA and LWUPC and add tests for AUI instructions 2016-09-08 07:41:43 +00:00
MicroMips64r6InstrInfo.td [mips] Recommit: "N64 static relocation model support" 2017-01-27 11:36:52 +00:00
MicroMipsDSPInstrFormats.td [mips][microMIPS][DSP] Implement BALIGN, BITREV, BPOSGE32, CMP*, CMPGDU*, CMPGU* and CMPU* instructions 2016-05-17 09:32:58 +00:00
MicroMipsDSPInstrInfo.td [mips][microMIPS][DSP] Implement BALIGN, BITREV, BPOSGE32, CMP*, CMPGDU*, CMPGU* and CMPU* instructions 2016-05-17 09:32:58 +00:00
MicroMipsInstrFormats.td [mips] Correct c.cond.fmt instruction definition. 2017-01-16 13:55:58 +00:00
MicroMipsInstrFPU.td [mips] Correct c.cond.fmt instruction definition. 2017-01-16 13:55:58 +00:00
MicroMipsInstrInfo.td [mips][ias] Further relax operands of certain assembly instructions 2017-02-23 12:40:58 +00:00
MicroMipsSizeReduction.cpp [mips][microMIPS] Adding code size reduction pass for MicroMIPS 2017-04-27 13:10:48 +00:00
Mips16FrameLowering.cpp Move FrameInstructions from MachineModuleInfo to MachineFunction 2016-11-30 23:48:42 +00:00
Mips16FrameLowering.h
Mips16HardFloat.cpp Re-land r301697 "[IR] Make add/remove Attributes use AttrBuilder instead of AttributeList" 2017-05-02 22:07:37 +00:00
Mips16HardFloatInfo.cpp
Mips16HardFloatInfo.h
Mips16InstrFormats.td
Mips16InstrInfo.cpp Use StringRef instead of raw pointers in MCAsmInfo/MCInstrInfo APIs (NFC) 2016-10-01 06:46:33 +00:00
Mips16InstrInfo.h CodeGen: Use MachineInstr& in TargetInstrInfo, NFC 2016-06-30 00:01:54 +00:00
Mips16InstrInfo.td [mips] Correct mips16 return instructions definitions 2017-02-14 21:53:23 +00:00
Mips16ISelDAGToDAG.cpp [mips] Preparatory work for a generic scheduler 2016-08-24 13:00:47 +00:00
Mips16ISelDAGToDAG.h [mips] SelectionDAGISel subclasses now follow the optimization level. 2016-07-14 13:25:22 +00:00
Mips16ISelLowering.cpp CodeGen: Use MachineInstr& in TargetLowering, NFC 2016-06-30 22:52:52 +00:00
Mips16ISelLowering.h CodeGen: Use MachineInstr& in TargetLowering, NFC 2016-06-30 22:52:52 +00:00
Mips16RegisterInfo.cpp MachineFunction: Return reference for getFrameInfo(); NFC 2016-07-28 18:40:00 +00:00
Mips16RegisterInfo.h
Mips32r6InstrFormats.td [mips] Add IAS support for dvp, evp 2016-10-13 12:12:56 +00:00
Mips32r6InstrInfo.td [mips] divide macro instruction cleanup. 2017-02-13 16:06:48 +00:00
Mips64InstrInfo.td [Mips] Add support to match more patterns for DEXT and CINS 2017-03-15 13:10:08 +00:00
Mips64r6InstrInfo.td [mips] Fix aui/daui/dahi/dati for MIPSR6 2016-10-14 09:31:42 +00:00
Mips.h [mips][microMIPS] Adding code size reduction pass for MicroMIPS 2017-04-27 13:10:48 +00:00
Mips.td [mips] Recommit: "N64 static relocation model support" 2017-01-27 11:36:52 +00:00
MipsAnalyzeImmediate.cpp
MipsAnalyzeImmediate.h
MipsAsmPrinter.cpp [mips][XRay] Use the base version of emitXRayTable 2017-05-04 11:03:50 +00:00
MipsAsmPrinter.h [LLVM][XRAY][MIPS] Support xray on mips/mipsel/mips64/mips64el 2017-02-15 10:48:11 +00:00
MipsCallingConv.td Revert "[SelectionDAG] Enable target specific vector scalarization of calls and returns" 2017-04-07 17:25:05 +00:00
MipsCCState.cpp [mips] Rework a portion of MipsCC interface. (NFC) 2017-04-26 11:10:38 +00:00
MipsCCState.h [mips] Rework a portion of MipsCC interface. (NFC) 2017-04-26 11:10:38 +00:00
MipsCondMov.td Revert "[mips] Fix c.<cc>.<fmt> instruction definition." 2016-09-09 11:06:01 +00:00
MipsConstantIslandPass.cpp [Mips] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-01-30 23:21:32 +00:00
MipsDelaySlotFiller.cpp [Mips] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-01 01:22:51 +00:00
MipsDSPInstrFormats.td [mips][microMIPS] Implement APPEND, BPOSGE32C, MODSUB, MULSA.W.PH and MULSAQ_S.W.PH instructions 2016-05-13 11:32:53 +00:00
MipsDSPInstrInfo.td [mips] MIPS32/64 itineraries 2016-06-14 09:35:29 +00:00
MipsEVAInstrFormats.td [mips] Add IAS support for dvp, evp 2016-10-13 12:12:56 +00:00
MipsEVAInstrInfo.td [mips] MIPS32/64 itineraries 2016-06-14 09:35:29 +00:00
MipsFastISel.cpp Add extra operand to CALLSEQ_START to keep frame part set up previously 2017-05-09 13:35:13 +00:00
MipsFrameLowering.cpp Move size and alignment information of regclass to TargetRegisterInfo 2017-04-24 18:55:33 +00:00
MipsFrameLowering.h Change eliminateCallFramePseudoInstr() to return an iterator 2016-03-31 18:33:38 +00:00
MipsHazardSchedule.cpp [mips] Deal with empty blocks in the mips hazard scheduler 2017-04-04 11:28:53 +00:00
MipsInstrFormats.td [mips] Correct c.cond.fmt instruction definition. 2017-01-16 13:55:58 +00:00
MipsInstrFPU.td [mips] Correct c.cond.fmt instruction definition. 2017-01-16 13:55:58 +00:00
MipsInstrInfo.cpp [mips][msa] Prevent output operand from commuting for dpadd_[su].df ins 2017-03-31 14:31:55 +00:00
MipsInstrInfo.h [mips][msa] Prevent output operand from commuting for dpadd_[su].df ins 2017-03-31 14:31:55 +00:00
MipsInstrInfo.td Add extra operand to CALLSEQ_START to keep frame part set up previously 2017-05-09 13:35:13 +00:00
MipsISelDAGToDAG.cpp [mips] Clang generates unaligned offset for MSA instruction st.d 2016-08-01 06:46:20 +00:00
MipsISelDAGToDAG.h Use StringRef in Pass/PassManager APIs (NFC) 2016-10-01 02:56:57 +00:00
MipsISelLowering.cpp Add extra operand to CALLSEQ_START to keep frame part set up previously 2017-05-09 13:35:13 +00:00
MipsISelLowering.h Revert "[SelectionDAG] Enable target specific vector scalarization of calls and returns" 2017-04-07 17:25:05 +00:00
MipsLongBranch.cpp [Mips] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-01 01:22:51 +00:00
MipsMachineFunction.cpp [mips] Fix test mips64fpldst.ll with machine verifier enabled 2017-04-26 11:40:12 +00:00
MipsMachineFunction.h [Mips] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-01-30 23:21:32 +00:00
MipsMCInstLower.cpp [mips] Use MipsMCExpr instead of MCSymbolRefExpr for all relocations. 2016-05-03 13:35:44 +00:00
MipsMCInstLower.h [mips] Use MipsMCExpr instead of MCSymbolRefExpr for all relocations. 2016-05-03 13:35:44 +00:00
MipsModuleISelDAGToDAG.cpp Use StringRef in Pass/PassManager APIs (NFC) 2016-10-01 02:56:57 +00:00
MipsMSAInstrFormats.td
MipsMSAInstrInfo.td [mips][msa] Mask vectors holding shift amounts 2017-04-20 13:26:46 +00:00
MipsOptimizePICCall.cpp Move value type list from TargetRegisterClass to TargetRegisterInfo 2017-04-24 19:51:12 +00:00
MipsOptionRecord.h [Mips] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-01 01:22:51 +00:00
MipsOs16.cpp Remove getArgumentList() in favor of arg_begin(), args(), etc 2017-03-16 22:59:15 +00:00
MipsRegisterInfo.cpp Revert "[SelectionDAG] Enable target specific vector scalarization of calls and returns" 2017-04-07 17:25:05 +00:00
MipsRegisterInfo.h [mips][micromips] Make getPointerRegClass() result depend on the instruction. 2016-05-09 13:38:25 +00:00
MipsRegisterInfo.td [mips] divide macro instruction cleanup. 2017-02-13 16:06:48 +00:00
MipsSchedule.td Recommit: "[mips] Add rsqrt, recip for MIPS" 2016-10-05 16:11:01 +00:00
MipsScheduleGeneric.td Recommit: "[mips] Add rsqrt, recip for MIPS" 2016-10-05 16:11:01 +00:00
MipsScheduleP5600.td Recommit: "[mips] Add rsqrt, recip for MIPS" 2016-10-05 16:11:01 +00:00
MipsSEFrameLowering.cpp Move size and alignment information of regclass to TargetRegisterInfo 2017-04-24 18:55:33 +00:00
MipsSEFrameLowering.h [Mips] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-01 01:22:51 +00:00
MipsSEInstrInfo.cpp Move value type list from TargetRegisterClass to TargetRegisterInfo 2017-04-24 19:51:12 +00:00
MipsSEInstrInfo.h Revert "[mips] Fix c.<cc>.<fmt> instruction definition." 2016-09-09 11:06:01 +00:00
MipsSEISelDAGToDAG.cpp [mips][msa] Fix generation of bm(n)zi and bins[lr]i instructions 2017-04-07 13:31:36 +00:00
MipsSEISelDAGToDAG.h [LLC][MIPS] Fix crash after enabling LLVM_ENABLE_EXPENSIVE_CHECKS 2017-01-04 09:34:37 +00:00
MipsSEISelLowering.cpp [mips][msa] Mask vectors holding shift amounts 2017-04-20 13:26:46 +00:00
MipsSEISelLowering.h [mips][msa] Implement f16 support 2016-11-18 16:17:44 +00:00
MipsSERegisterInfo.cpp MachineFunction: Return reference for getFrameInfo(); NFC 2016-07-28 18:40:00 +00:00
MipsSERegisterInfo.h
MipsSubtarget.cpp [mips] Recommit: "N64 static relocation model support" 2017-01-27 11:36:52 +00:00
MipsSubtarget.h [LLVM][XRAY][MIPS] Support xray on mips/mipsel/mips64/mips64el 2017-02-15 10:48:11 +00:00
MipsTargetMachine.cpp [mips][microMIPS] Adding code size reduction pass for MicroMIPS 2017-04-27 13:10:48 +00:00
MipsTargetMachine.h [Mips] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-01 01:22:51 +00:00
MipsTargetObjectFile.cpp [mips] Fix debug information for __thread variable 2017-01-20 17:53:30 +00:00
MipsTargetObjectFile.h [mips] Fix debug information for __thread variable 2017-01-20 17:53:30 +00:00
MipsTargetStreamer.h Move instances of std::function. 2016-06-12 16:13:55 +00:00
MSA.txt Revert: r286868 - Test commit 2016-11-14 19:10:56 +00:00
Relocation.txt [Mips] Document Mips Backend Relocation Principles 2017-04-21 14:49:27 +00:00