1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/lib/Target/Mips
Shengchen Kan 88597bc560 [MC][Bugfix] Remove redundant parameter for relaxInstruction
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
2020-04-21 11:06:55 +08:00
..
AsmParser [mips] Implement .cpadd directive 2020-03-22 23:34:32 +03:00
Disassembler CMake: Make most target symbols hidden by default 2020-01-14 19:46:52 -08:00
MCTargetDesc [MC][Bugfix] Remove redundant parameter for relaxInstruction 2020-04-21 11:06:55 +08:00
TargetInfo CMake: Make most target symbols hidden by default 2020-01-14 19:46:52 -08:00
CMakeLists.txt
LLVMBuild.txt
MicroMips32r6InstrFormats.td
MicroMips32r6InstrInfo.td
MicroMipsDSPInstrFormats.td
MicroMipsDSPInstrInfo.td
MicroMipsInstrFormats.td
MicroMipsInstrFPU.td
MicroMipsInstrInfo.td [mips] Joint MipsMemSimmXXXAsmOperand into the single template class. NFC 2019-11-19 13:58:28 +03:00
MicroMipsSizeReduction.cpp [NFC] Silence compiler warning [-Wmissing-braces]. 2020-02-18 10:37:12 -08:00
Mips16FrameLowering.cpp ArrayRef'ize restoreCalleeSavedRegisters. NFCI. 2020-02-29 09:50:23 +01:00
Mips16FrameLowering.h ArrayRef'ize restoreCalleeSavedRegisters. NFCI. 2020-02-29 09:50:23 +01:00
Mips16HardFloat.cpp [AsmPrinter] De-capitalize all AsmPrinter::Emit* but EmitInstruction 2020-02-13 17:06:24 -08:00
Mips16HardFloatInfo.cpp
Mips16HardFloatInfo.h
Mips16InstrFormats.td
Mips16InstrInfo.cpp ArrayRef'ize spillCalleeSavedRegisters. NFCI. 2020-02-08 12:19:23 +01:00
Mips16InstrInfo.h [NFC] unsigned->Register in storeRegTo/loadRegFromStack 2020-02-03 14:22:16 +01:00
Mips16InstrInfo.td
Mips16ISelDAGToDAG.cpp
Mips16ISelDAGToDAG.h
Mips16ISelLowering.cpp [TargetLowering][ARM][Mips][WebAssembly] Remove the ordered FP compare from RunttimeLibcalls.def and all associated usages 2020-01-10 19:30:08 -08:00
Mips16ISelLowering.h
Mips16RegisterInfo.cpp CodeGen: More conversions to use Register 2020-04-07 18:54:36 -04:00
Mips16RegisterInfo.h CodeGen: More conversions to use Register 2020-04-07 18:54:36 -04:00
Mips32r6InstrFormats.td
Mips32r6InstrInfo.td [mips] Fix sc, scs, ll, lld instructions expanding 2019-11-27 00:43:25 +03:00
Mips64InstrInfo.td [mips] Implement sle/sleu pseudo instructions 2020-03-22 23:34:31 +03:00
Mips64r6InstrInfo.td [mips] Fix sc, scs, ll, lld instructions expanding 2019-11-27 00:43:25 +03:00
Mips.h
Mips.td [MIPS] Implement MIPS3D vector instructions 2020-03-17 17:17:51 +03:00
MipsAnalyzeImmediate.cpp
MipsAnalyzeImmediate.h
MipsAsmPrinter.cpp [MC] De-capitalize MCStreamer::Emit{Bundle,Addrsig}* etc 2020-02-15 09:11:48 -08:00
MipsAsmPrinter.h [AsmPrinter][MCStreamer] De-capitalize EmitInstruction and EmitCFI* 2020-02-13 22:08:55 -08:00
MipsBranchExpansion.cpp [Mips] Make MipsBranchExpansion aware of BBIT family of branch 2020-03-31 09:20:51 +02:00
MipsCallingConv.td
MipsCallLowering.cpp [Alignment][NFC] Transitionning more getMachineMemOperand call sites 2020-03-31 08:36:18 +00:00
MipsCallLowering.h
MipsCCState.cpp [ADT/STLExtras.h] - Add llvm::is_sorted wrapper and update callers. 2020-04-14 14:11:02 +03:00
MipsCCState.h
MipsCondMov.td
MipsConstantIslandPass.cpp [Alignment][NFC] Deprecate Align::None() 2020-01-24 12:53:58 +01:00
MipsDelaySlotFiller.cpp [NFC] Fix some spelling mistakes to test pushing to GH. 2020-02-04 11:07:31 +00:00
MipsDSPInstrFormats.td [TableGen] Support combining AssemblerPredicates with ORs 2020-03-13 17:13:51 +00:00
MipsDSPInstrInfo.td
MipsEVAInstrFormats.td
MipsEVAInstrInfo.td
MipsExpandPseudo.cpp [Mips] Fix gcc -Wunused-but-set-variable in -DLLVM_ENABLE_ASSERTIONS=Off builds after D71028 2019-12-13 16:41:08 -08:00
MipsFastISel.cpp [Alignment][NFC] Transitionning more getMachineMemOperand call sites 2020-03-31 08:36:18 +00:00
MipsFrameLowering.cpp
MipsFrameLowering.h
MipsInstrFormats.td [mips][NFC] Remove unused instruction formats 2020-01-28 13:30:59 +01:00
MipsInstrFPU.td [mips] Rename target feature Mips3D => HasMips3D. NFC 2020-03-22 23:34:31 +03:00
MipsInstrInfo.cpp [Alignment][NFC] Transitionning more getMachineMemOperand call sites 2020-03-31 08:36:18 +00:00
MipsInstrInfo.h [Mips] Make MipsBranchExpansion aware of BBIT family of branch 2020-03-31 09:20:51 +02:00
MipsInstrInfo.td [mips] Implement sne pseudo instruction 2020-03-22 23:34:31 +03:00
MipsInstructionSelector.cpp [Alignment][NFC] Transitionning more getMachineMemOperand call sites 2020-03-31 08:36:18 +00:00
MipsISelDAGToDAG.cpp [SelectionDag] Updated FoldConstantArithmetic method signature in preparation for merge with FoldConstantVectorArithmetic 2020-01-24 18:00:58 -05:00
MipsISelDAGToDAG.h
MipsISelLowering.cpp [SVE] Remove calls to getBitWidth from mips 2020-04-20 14:09:06 -07:00
MipsISelLowering.h CodeGen: Use Register in TargetLowering 2020-04-08 12:10:58 -04:00
MipsLegalizerInfo.cpp [Alignment][NFC] Transitionning more getMachineMemOperand call sites 2020-03-31 08:36:18 +00:00
MipsLegalizerInfo.h GlobalISel: Add observer argument to legalizeIntrinsic 2020-01-29 18:33:45 -05:00
MipsMachineFunction.cpp
MipsMachineFunction.h
MipsMCInstLower.cpp Allow negative offsets in MipsMCInstLower::LowerOperand 2019-12-04 11:30:00 +00:00
MipsMCInstLower.h Allow negative offsets in MipsMCInstLower::LowerOperand 2019-12-04 11:30:00 +00:00
MipsModuleISelDAGToDAG.cpp
MipsMSAInstrFormats.td
MipsMSAInstrInfo.td [Mips] Add intrinsics for 4-byte and 8-byte MSA loads/stores. 2020-02-11 11:47:30 +01:00
MipsMTInstrFormats.td
MipsMTInstrInfo.td
MipsOptimizePICCall.cpp
MipsOptionRecord.h
MipsOs16.cpp
MipsPfmCounters.td
MipsPreLegalizerCombiner.cpp [Alignment][NFC] MachineMemOperand::getAlign/getBaseAlign 2020-03-27 15:49:13 +00:00
MipsRegisterBankInfo.cpp [Alignment][NFC] MachineMemOperand::getAlign/getBaseAlign 2020-03-27 15:49:13 +00:00
MipsRegisterBankInfo.h [MIPS GlobalISel] RegBankSelect G_MERGE_VALUES and G_UNMERGE_VALUES 2020-02-19 10:09:52 +01:00
MipsRegisterBanks.td
MipsRegisterInfo.cpp [Alignment][NFC] Add DebugStr and operator* 2020-04-06 12:09:45 +00:00
MipsRegisterInfo.h [TargetRegisterInfo] Default trackLivenessAfterRegAlloc() to true 2020-01-19 14:20:37 -08:00
MipsRegisterInfo.td
MipsSchedule.td [MIPS] Implement MIPS3D vector instructions 2020-03-17 17:17:51 +03:00
MipsScheduleGeneric.td [MIPS] Implement MIPS3D vector instructions 2020-03-17 17:17:51 +03:00
MipsScheduleP5600.td [mips] Remove instructions related to "wired paired single" from the P5600 model. 2020-03-22 23:34:31 +03:00
MipsSEFrameLowering.cpp CodeGen: Use Register in TargetFrameLowering 2020-04-07 17:07:44 -04:00
MipsSEFrameLowering.h CodeGen: Use Register in TargetFrameLowering 2020-04-07 17:07:44 -04:00
MipsSEInstrInfo.cpp [Mips] Make MipsBranchExpansion aware of BBIT family of branch 2020-03-31 09:20:51 +02:00
MipsSEInstrInfo.h [Mips] Make MipsBranchExpansion aware of BBIT family of branch 2020-03-31 09:20:51 +02:00
MipsSEISelDAGToDAG.cpp [NFC] Fix unused var in release builds 2020-02-11 10:10:52 -08:00
MipsSEISelDAGToDAG.h
MipsSEISelLowering.cpp [SDAG] Add SDNode::values() = make_range(values_begin(), values_end()) 2020-02-26 12:07:38 -06:00
MipsSEISelLowering.h
MipsSERegisterInfo.cpp
MipsSERegisterInfo.h
MipsSubtarget.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
MipsSubtarget.h [mips] Rename target feature Mips3D => HasMips3D. NFC 2020-03-22 23:34:31 +03:00
MipsTargetMachine.cpp CMake: Make most target symbols hidden by default 2020-01-14 19:46:52 -08:00
MipsTargetMachine.h
MipsTargetObjectFile.cpp [X86] Reland D71360 Clean up UseInitArray initialization for X86ELFTargetObjectFile 2020-03-20 21:57:34 -07:00
MipsTargetObjectFile.h
MipsTargetStreamer.h [mips] Implement .cpadd directive 2020-03-22 23:34:32 +03:00
MSA.txt
Relocation.txt