llvm-6502/lib/Target/Mips
Reed Kotler a430cb613b This patch enables llvm to switch between compiling for mips32/mips64
and mips16 on a per function basis.

Because this patch is somewhat involved I have provide an overview of the
key pieces of it.

The patch is written so as to not change the behavior of the non mixed
mode. We have tested this a lot but it is something new to switch subtargets
so we don't want any chance of regression in the mainline compiler until
we have more confidence in this.

Mips32/64 are very different from Mip16 as is the case of ARM vs Thumb1.
For that reason there are derived versions of the register info, frame info, 
instruction info and instruction selection classes.

Now we register three separate passes for instruction selection.
One which is used to switch subtargets (MipsModuleISelDAGToDAG.cpp) and then
one for each of the current subtargets (Mips16ISelDAGToDAG.cpp and
MipsSEISelDAGToDAG.cpp).

When the ModuleISel pass runs, it determines if there is a need to switch
subtargets and if so, the owning pointers in MipsTargetMachine are
appropriately changed.

When 16Isel or SEIsel is run, they will return immediately without doing
any work if the current subtarget mode does not apply to them.

In addition, MipsAsmPrinter needs to be reset on a function basis.

The pass BasicTargetTransformInfo is substituted with a null pass since the
pass is immutable and really needs to be a function pass for it to be
used with changing subtargets. This will be fixed in a follow on patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179118 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-09 19:46:01 +00:00
..
AsmParser
Disassembler [mips] Fix DSP instructions to have explicit accumulator register operands. 2013-03-30 01:58:00 +00:00
InstPrinter
MCTargetDesc
TargetInfo
CMakeLists.txt This patch enables llvm to switch between compiling for mips32/mips64 2013-04-09 19:46:01 +00:00
LLVMBuild.txt
Makefile
Mips16FrameLowering.cpp
Mips16FrameLowering.h [mips] Add parameter Alignment to MipsFrameLowering's constructor. 2013-03-29 01:51:04 +00:00
Mips16InstrFormats.td
Mips16InstrInfo.cpp [mips] Define overloaded versions of storeRegToStack and loadRegFromStack. 2013-03-29 02:14:12 +00:00
Mips16InstrInfo.h [mips] Define overloaded versions of storeRegToStack and loadRegFromStack. 2013-03-29 02:14:12 +00:00
Mips16InstrInfo.td [mips] Fix definitions of multiply, multiply-add/sub and divide instructions. 2013-03-30 01:36:35 +00:00
Mips16ISelDAGToDAG.cpp This patch enables llvm to switch between compiling for mips32/mips64 2013-04-09 19:46:01 +00:00
Mips16ISelDAGToDAG.h This patch enables llvm to switch between compiling for mips32/mips64 2013-04-09 19:46:01 +00:00
Mips16ISelLowering.cpp
Mips16ISelLowering.h
Mips16RegisterInfo.cpp [mips] Define a function which returns the GPR register class. 2013-03-29 19:17:42 +00:00
Mips16RegisterInfo.h [mips] Define a function which returns the GPR register class. 2013-03-29 19:17:42 +00:00
Mips64InstrInfo.td [mips] Fix definitions of multiply, multiply-add/sub and divide instructions. 2013-03-30 01:36:35 +00:00
Mips.h
Mips.td
MipsAnalyzeImmediate.cpp
MipsAnalyzeImmediate.h
MipsAsmPrinter.cpp This patch enables llvm to switch between compiling for mips32/mips64 2013-04-09 19:46:01 +00:00
MipsAsmPrinter.h
MipsCallingConv.td
MipsCodeEmitter.cpp [mips] Expand pseudo multiply/divide instructions in MipsCodeEmitter.cpp. 2013-04-02 22:53:58 +00:00
MipsCondMov.td
MipsConstantIslandPass.cpp This patch enables llvm to switch between compiling for mips32/mips64 2013-04-09 19:46:01 +00:00
MipsDelaySlotFiller.cpp
MipsDSPInstrFormats.td
MipsDSPInstrInfo.td [mips] Add patterns for DSP indexed load instructions. 2013-03-30 02:14:45 +00:00
MipsFrameLowering.cpp
MipsFrameLowering.h [mips] Add parameter Alignment to MipsFrameLowering's constructor. 2013-03-29 01:51:04 +00:00
MipsInstrFormats.td
MipsInstrFPU.td [mips] Define reg+imm load/store pattern templates. 2013-03-30 02:01:48 +00:00
MipsInstrInfo.cpp
MipsInstrInfo.h [mips] Define overloaded versions of storeRegToStack and loadRegFromStack. 2013-03-29 02:14:12 +00:00
MipsInstrInfo.td [mips] Add patterns for DSP indexed load instructions. 2013-03-30 02:14:45 +00:00
MipsISelDAGToDAG.cpp
MipsISelDAGToDAG.h
MipsISelLowering.cpp [mips] Fix DSP instructions to have explicit accumulator register operands. 2013-03-30 01:58:00 +00:00
MipsISelLowering.h [mips] Add mips-specific nodes which will be used to select multiply and divide 2013-03-30 01:14:04 +00:00
MipsJITInfo.cpp
MipsJITInfo.h
MipsLongBranch.cpp This patch enables llvm to switch between compiling for mips32/mips64 2013-04-09 19:46:01 +00:00
MipsMachineFunction.cpp
MipsMachineFunction.h
MipsMCInstLower.cpp
MipsMCInstLower.h
MipsModuleISelDAGToDAG.cpp This patch enables llvm to switch between compiling for mips32/mips64 2013-04-09 19:46:01 +00:00
MipsModuleISelDAGToDAG.h This patch enables llvm to switch between compiling for mips32/mips64 2013-04-09 19:46:01 +00:00
MipsRegisterInfo.cpp
MipsRegisterInfo.h [mips] Define a function which returns the GPR register class. 2013-03-29 19:17:42 +00:00
MipsRegisterInfo.td [mips] Change type of accumulator registers to Untyped. Add two more accumulator 2013-03-29 03:27:21 +00:00
MipsRelocations.h
MipsSchedule.td
MipsSEFrameLowering.cpp [mips] Expand pseudo load, store and copy instructions right before 2013-03-30 01:04:11 +00:00
MipsSEFrameLowering.h [mips] Add parameter Alignment to MipsFrameLowering's constructor. 2013-03-29 01:51:04 +00:00
MipsSEInstrInfo.cpp [mips] Small update to the implementation of eh.return for Mips. 2013-04-02 23:02:07 +00:00
MipsSEInstrInfo.h [mips] Define overloaded versions of storeRegToStack and loadRegFromStack. 2013-03-29 02:14:12 +00:00
MipsSEISelDAGToDAG.cpp This patch enables llvm to switch between compiling for mips32/mips64 2013-04-09 19:46:01 +00:00
MipsSEISelDAGToDAG.h This patch enables llvm to switch between compiling for mips32/mips64 2013-04-09 19:46:01 +00:00
MipsSEISelLowering.cpp This patch enables llvm to switch between compiling for mips32/mips64 2013-04-09 19:46:01 +00:00
MipsSEISelLowering.h [mips] Move the code which does dag-combine for multiply-add/sub nodes to 2013-03-30 01:42:24 +00:00
MipsSelectionDAGInfo.cpp
MipsSelectionDAGInfo.h
MipsSERegisterInfo.cpp [mips] Define a function which returns the GPR register class. 2013-03-29 19:17:42 +00:00
MipsSERegisterInfo.h [mips] Define a function which returns the GPR register class. 2013-03-29 19:17:42 +00:00
MipsSubtarget.cpp This patch enables llvm to switch between compiling for mips32/mips64 2013-04-09 19:46:01 +00:00
MipsSubtarget.h This patch enables llvm to switch between compiling for mips32/mips64 2013-04-09 19:46:01 +00:00
MipsTargetMachine.cpp This patch enables llvm to switch between compiling for mips32/mips64 2013-04-09 19:46:01 +00:00
MipsTargetMachine.h This patch enables llvm to switch between compiling for mips32/mips64 2013-04-09 19:46:01 +00:00
MipsTargetObjectFile.cpp
MipsTargetObjectFile.h