llvm-project/llvm/lib/Target/Mips
Simon Atanasyan f46ba4f077 [mips] Use less registers to load address of TargetExternalSymbol
There is no pattern matched `add hi, (MipsLo texternalsym)`. As a result,
loading an address of 32-bit symbol requires two registers and one more
additional instruction:
```
addiu $1, $zero, %lo(foo)
lui   $2, %hi(foo)
addu  $25, $2, $1
```

This patch adds the missed pattern and enables generation more effective
set of instructions:
```
lui   $1, %hi(foo)
addiu $25, $1, %lo(foo)
```

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

llvm-svn: 370196
2019-08-28 12:35:53 +00:00
..
AsmParser [mips] Reduce number of instructions used for loading a global symbol's value 2019-08-23 13:36:24 +00:00
Disassembler Revert CMake: Make most target symbols hidden by default 2019-06-11 03:21:13 +00:00
MCTargetDesc [MC] Minor cleanup to MCFixup::Kind handling. NFC. 2019-08-23 01:00:55 +00:00
TargetInfo Revert CMake: Make most target symbols hidden by default 2019-06-11 03:21:13 +00:00
CMakeLists.txt [Mips] Move InstPrinter files to MCTargetDesc. NFC 2019-05-11 01:38:56 +00:00
LLVMBuild.txt [Mips] Move InstPrinter files to MCTargetDesc. NFC 2019-05-11 01:38:56 +00:00
MSA.txt
MicroMips32r6InstrFormats.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MicroMips32r6InstrInfo.td [mips] Fix JmpLink to texternalsym and tglobaladdr on mcroMIPS R6 2019-07-12 04:58:45 +00:00
MicroMipsDSPInstrFormats.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MicroMipsDSPInstrInfo.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MicroMipsInstrFPU.td [mips] Add more strict predicates to the RSQRT_S_MM and TAILCALL_MM 2019-06-18 17:00:08 +00:00
MicroMipsInstrFormats.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MicroMipsInstrInfo.td [mips] Add more strict predicates to the RSQRT_S_MM and TAILCALL_MM 2019-06-18 17:00:08 +00:00
MicroMipsSizeReduction.cpp Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVM 2019-08-15 19:22:08 +00:00
Mips.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips.td [mips] Support for +abs2008 attribute 2019-01-28 14:59:30 +00:00
Mips16FrameLowering.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips16FrameLowering.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips16HardFloat.cpp [opaque pointer types] Add a FunctionCallee wrapper type, and use it. 2019-02-01 02:28:03 +00:00
Mips16HardFloatInfo.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips16HardFloatInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips16ISelDAGToDAG.cpp Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVM 2019-08-15 19:22:08 +00:00
Mips16ISelDAGToDAG.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips16ISelLowering.cpp Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVM 2019-08-15 19:22:08 +00:00
Mips16ISelLowering.h [TargetLowering] Add MachineMemOperand::Flags to allowsMemoryAccess tests (PR42123) 2019-06-12 17:14:03 +00:00
Mips16InstrFormats.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips16InstrInfo.cpp Finish moving TargetRegisterInfo::isVirtualRegister() and friends to llvm::Register as started by r367614. NFC 2019-08-01 23:27:28 +00:00
Mips16InstrInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips16InstrInfo.td [mips] Add missing mips16 instructions to general scheduling definitions 2019-07-03 10:33:09 +00:00
Mips16RegisterInfo.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips16RegisterInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips32r6InstrFormats.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mips32r6InstrInfo.td [mips] Mark the `lwupc` instruction as MIPS64 R6 only 2019-06-19 22:08:06 +00:00
Mips64InstrInfo.td [mips] Use mult/mflo pattern on 64-bit targets prior to MIPS64 2019-07-17 08:11:40 +00:00
Mips64r6InstrInfo.td [mips] Mark the `lwupc` instruction as MIPS64 R6 only 2019-06-19 22:08:06 +00:00
MipsAnalyzeImmediate.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsAnalyzeImmediate.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsAsmPrinter.cpp Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVM 2019-08-15 19:22:08 +00:00
MipsAsmPrinter.h [AsmPrinter] refactor to remove remove AsmVariant. NFC 2019-04-10 16:38:43 +00:00
MipsBranchExpansion.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsCCState.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsCCState.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsCallLowering.cpp GlobalISel: pack various parameters for lowerCall into a struct. 2019-08-09 08:26:38 +00:00
MipsCallLowering.h GlobalISel: pack various parameters for lowerCall into a struct. 2019-08-09 08:26:38 +00:00
MipsCallingConv.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsCondMov.td [mips] Mark pseudo select instructions by the `hasNoSchedulingInfo` tag 2019-06-27 13:41:30 +00:00
MipsConstantIslandPass.cpp Simplify std::lower_bound with llvm::{bsearch,lower_bound}. NFC 2019-06-21 05:40:31 +00:00
MipsDSPInstrFormats.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsDSPInstrInfo.td [mips] Add missing schedinfo for MSA and ASE instructions 2019-07-01 13:21:05 +00:00
MipsDelaySlotFiller.cpp [mips] Use range-based `for` loops. NFC 2019-05-15 21:26:25 +00:00
MipsEVAInstrFormats.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsEVAInstrInfo.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsExpandPseudo.cpp Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVM 2019-08-15 19:22:08 +00:00
MipsFastISel.cpp Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVM 2019-08-15 19:22:08 +00:00
MipsFrameLowering.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsFrameLowering.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsISelDAGToDAG.cpp Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVM 2019-08-15 19:22:08 +00:00
MipsISelDAGToDAG.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsISelLowering.cpp [mips] clang-format the code. NFC 2019-08-26 22:40:28 +00:00
MipsISelLowering.h [mips] Support the "o" inline asm constraint 2019-07-17 08:11:15 +00:00
MipsInstrFPU.td [Mips] Add s.d instruction alias for Mips1 2019-06-12 17:52:05 +00:00
MipsInstrFormats.td [mips] Set the hasNoSchedulingInfo flag for the `MipsAsmPseudoInst` 2019-06-18 16:59:47 +00:00
MipsInstrInfo.cpp Implementation of asm-goto support in LLVM 2019-02-08 20:48:56 +00:00
MipsInstrInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsInstrInfo.td [mips] Use less registers to load address of TargetExternalSymbol 2019-08-28 12:35:53 +00:00
MipsInstructionSelector.cpp Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVM 2019-08-15 19:22:08 +00:00
MipsLegalizerInfo.cpp [MIPS GlobalISel] ClampScalar G_SHL, G_ASHR and G_LSHR 2019-08-27 14:41:44 +00:00
MipsLegalizerInfo.h [GlobalISel] Translate calls to memcpy et al to G_INTRINSIC_W_SIDE_EFFECTs and legalize later. 2019-07-19 00:24:45 +00:00
MipsMCInstLower.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsMCInstLower.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsMSAInstrFormats.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsMSAInstrInfo.td [mips] Add missing schedinfo for MSA and ASE instructions 2019-07-01 13:21:05 +00:00
MipsMTInstrFormats.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsMTInstrInfo.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsMachineFunction.cpp GlobalISel: Remove unsigned variant of SrcOp 2019-06-24 16:16:12 +00:00
MipsMachineFunction.h GlobalISel: Remove unsigned variant of SrcOp 2019-06-24 16:16:12 +00:00
MipsModuleISelDAGToDAG.cpp CodeGen: Remove pipeline dependencies on StackProtector; NFC 2018-07-13 00:08:38 +00:00
MipsOptimizePICCall.cpp Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVM 2019-08-15 19:22:08 +00:00
MipsOptionRecord.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsOs16.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsPreLegalizerCombiner.cpp [GlobalISel] Support for inlining memcpy, memset and memmove calls. 2019-07-24 22:17:31 +00:00
MipsRegisterBankInfo.cpp [MIPS GlobalISel] Select jump_table and brjt 2019-08-08 10:21:12 +00:00
MipsRegisterBankInfo.h [MIPS GlobalISel] Skip copies in addUseDef and addDefUses 2019-07-11 09:28:34 +00:00
MipsRegisterBanks.td [MIPS GlobalISel] Add floating point register bank 2019-03-25 11:30:46 +00:00
MipsRegisterInfo.cpp CodeGen: Introduce a class for registers 2019-06-24 15:50:29 +00:00
MipsRegisterInfo.h CodeGen: Introduce a class for registers 2019-06-24 15:50:29 +00:00
MipsRegisterInfo.td [mips] Extend range of register indexes accepted by cfcmsa/ctcmsa 2019-06-01 13:55:18 +00:00
MipsSEFrameLowering.cpp Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVM 2019-08-15 19:22:08 +00:00
MipsSEFrameLowering.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsSEISelDAGToDAG.cpp [mips] Support the "o" inline asm constraint 2019-07-17 08:11:15 +00:00
MipsSEISelDAGToDAG.h [mips] Move initGlobalBaseReg to MipsFunctionInfo. NFC 2019-05-31 08:15:28 +00:00
MipsSEISelLowering.cpp Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVM 2019-08-15 19:22:08 +00:00
MipsSEISelLowering.h [TargetLowering] Add MachineMemOperand::Flags to allowsMemoryAccess tests (PR42123) 2019-06-12 17:14:03 +00:00
MipsSEInstrInfo.cpp Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVM 2019-08-15 19:22:08 +00:00
MipsSEInstrInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsSERegisterInfo.cpp Apply llvm-prefer-register-over-unsigned from clang-tidy to LLVM 2019-08-15 19:22:08 +00:00
MipsSERegisterInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsSchedule.td Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsScheduleGeneric.td [mips] Fix JmpLink to texternalsym and tglobaladdr on mcroMIPS R6 2019-07-12 04:58:45 +00:00
MipsScheduleP5600.td [mips] Mark P5600 scheduling model as complete 2019-07-02 10:22:14 +00:00
MipsSubtarget.cpp [GlobalISel] Make the InstructionSelector instance non-const, allowing state to be maintained. 2019-08-13 06:26:59 +00:00
MipsSubtarget.h [GlobalISel] Make the InstructionSelector instance non-const, allowing state to be maintained. 2019-08-13 06:26:59 +00:00
MipsTargetMachine.cpp [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
MipsTargetMachine.h [Mips][CodeGen] Remove MachineFunction::setSubtarget. Change Mips to just copy the subtarget from the MachineFunction instead of recalculating it. 2019-04-24 06:48:31 +00:00
MipsTargetObjectFile.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsTargetObjectFile.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MipsTargetStreamer.h [mips] Make a couple of class methods plain static functions. NFC 2019-08-07 12:21:41 +00:00
Relocation.txt