mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
88597bc560
Summary: Before this patch, `relaxInstruction` takes three arguments, the first argument refers to the instruction before relaxation and the third argument is the output instruction after relaxation. There are two quite strange things: 1) The first argument's type is `const MCInst &`, the third argument's type is `MCInst &`, but they may be aliased to the same variable 2) The backends of ARM, AMDGPU, RISC-V, Hexagon assume that the third argument is a fresh uninitialized `MCInst` even if `relaxInstruction` may be called like `relaxInstruction(Relaxed, STI, Relaxed)` in a loop. In this patch, we drop the thrid argument, and let `relaxInstruction` directly modify the given instruction. Also, this patch fixes the bug https://bugs.llvm.org/show_bug.cgi?id=45580, which is introduced by D77851, and breaks the assumption of ARM, AMDGPU, RISC-V, Hexagon. Reviewers: Razer6, MaskRay, jyknight, asb, luismarques, enderby, rtaylor, colinl, bcain Reviewed By: Razer6, MaskRay, bcain Subscribers: bcain, nickdesaulniers, nathanchance, wuzish, annita.zhang, arsenm, dschuff, jyknight, dylanmckay, sdardis, nemanjai, jvesely, nhaehnle, tpr, sbc100, jgravelle-google, kristof.beyls, hiraditya, aheejin, kbarton, fedor.sergeev, asb, rbar, johnrusso, simoncook, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, Jim, lenary, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, kerbowa, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D78364 |
||
---|---|---|
.. | ||
AsmParser | ||
Disassembler | ||
MCTargetDesc | ||
TargetInfo | ||
CMakeLists.txt | ||
LLVMBuild.txt | ||
MicroMips32r6InstrFormats.td | ||
MicroMips32r6InstrInfo.td | ||
MicroMipsDSPInstrFormats.td | ||
MicroMipsDSPInstrInfo.td | ||
MicroMipsInstrFormats.td | ||
MicroMipsInstrFPU.td | ||
MicroMipsInstrInfo.td | ||
MicroMipsSizeReduction.cpp | ||
Mips16FrameLowering.cpp | ||
Mips16FrameLowering.h | ||
Mips16HardFloat.cpp | ||
Mips16HardFloatInfo.cpp | ||
Mips16HardFloatInfo.h | ||
Mips16InstrFormats.td | ||
Mips16InstrInfo.cpp | ||
Mips16InstrInfo.h | ||
Mips16InstrInfo.td | ||
Mips16ISelDAGToDAG.cpp | ||
Mips16ISelDAGToDAG.h | ||
Mips16ISelLowering.cpp | ||
Mips16ISelLowering.h | ||
Mips16RegisterInfo.cpp | ||
Mips16RegisterInfo.h | ||
Mips32r6InstrFormats.td | ||
Mips32r6InstrInfo.td | ||
Mips64InstrInfo.td | ||
Mips64r6InstrInfo.td | ||
Mips.h | ||
Mips.td | ||
MipsAnalyzeImmediate.cpp | ||
MipsAnalyzeImmediate.h | ||
MipsAsmPrinter.cpp | ||
MipsAsmPrinter.h | ||
MipsBranchExpansion.cpp | ||
MipsCallingConv.td | ||
MipsCallLowering.cpp | ||
MipsCallLowering.h | ||
MipsCCState.cpp | ||
MipsCCState.h | ||
MipsCondMov.td | ||
MipsConstantIslandPass.cpp | ||
MipsDelaySlotFiller.cpp | ||
MipsDSPInstrFormats.td | ||
MipsDSPInstrInfo.td | ||
MipsEVAInstrFormats.td | ||
MipsEVAInstrInfo.td | ||
MipsExpandPseudo.cpp | ||
MipsFastISel.cpp | ||
MipsFrameLowering.cpp | ||
MipsFrameLowering.h | ||
MipsInstrFormats.td | ||
MipsInstrFPU.td | ||
MipsInstrInfo.cpp | ||
MipsInstrInfo.h | ||
MipsInstrInfo.td | ||
MipsInstructionSelector.cpp | ||
MipsISelDAGToDAG.cpp | ||
MipsISelDAGToDAG.h | ||
MipsISelLowering.cpp | ||
MipsISelLowering.h | ||
MipsLegalizerInfo.cpp | ||
MipsLegalizerInfo.h | ||
MipsMachineFunction.cpp | ||
MipsMachineFunction.h | ||
MipsMCInstLower.cpp | ||
MipsMCInstLower.h | ||
MipsModuleISelDAGToDAG.cpp | ||
MipsMSAInstrFormats.td | ||
MipsMSAInstrInfo.td | ||
MipsMTInstrFormats.td | ||
MipsMTInstrInfo.td | ||
MipsOptimizePICCall.cpp | ||
MipsOptionRecord.h | ||
MipsOs16.cpp | ||
MipsPfmCounters.td | ||
MipsPreLegalizerCombiner.cpp | ||
MipsRegisterBankInfo.cpp | ||
MipsRegisterBankInfo.h | ||
MipsRegisterBanks.td | ||
MipsRegisterInfo.cpp | ||
MipsRegisterInfo.h | ||
MipsRegisterInfo.td | ||
MipsSchedule.td | ||
MipsScheduleGeneric.td | ||
MipsScheduleP5600.td | ||
MipsSEFrameLowering.cpp | ||
MipsSEFrameLowering.h | ||
MipsSEInstrInfo.cpp | ||
MipsSEInstrInfo.h | ||
MipsSEISelDAGToDAG.cpp | ||
MipsSEISelDAGToDAG.h | ||
MipsSEISelLowering.cpp | ||
MipsSEISelLowering.h | ||
MipsSERegisterInfo.cpp | ||
MipsSERegisterInfo.h | ||
MipsSubtarget.cpp | ||
MipsSubtarget.h | ||
MipsTargetMachine.cpp | ||
MipsTargetMachine.h | ||
MipsTargetObjectFile.cpp | ||
MipsTargetObjectFile.h | ||
MipsTargetStreamer.h | ||
MSA.txt | ||
Relocation.txt |