1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-31 07:52:55 +01:00
llvm-mirror/test/CodeGen/Mips
Reed Kotler 9b753510a5 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.

llvm-svn: 179118
2013-04-09 19:46:01 +00:00
..
2008-06-05-Carry.ll
2008-07-03-SRet.ll
2008-07-06-fadd64.ll
2008-07-07-Float2Int.ll
2008-07-07-FPExtend.ll
2008-07-07-IntDoubleConvertions.ll
2008-07-15-InternalConstant.ll
2008-07-15-SmallSection.ll
2008-07-16-SignExtInReg.ll
2008-07-22-Cstpool.ll
2008-07-23-fpcmp.ll
2008-07-29-icmp.ll
2008-07-31-fcopysign.ll
2008-08-01-AsmInline.ll
2008-08-03-fabs64.ll
2008-08-03-ReturnDouble.ll
2008-08-04-Bitconvert.ll
2008-08-06-Alloca.ll
2008-08-07-CC.ll
2008-08-07-FPRound.ll
2008-08-08-bswap.ll
2008-08-08-ctlz.ll
2008-10-13-LegalizerBug.ll
2008-11-10-xint_to_fp.ll
2009-11-16-CstPoolLoad.ll
2010-07-20-Switch.ll [mips] Custom-legalize BR_JT. 2013-03-06 21:32:03 +00:00
2010-11-09-CountLeading.ll
2010-11-09-Mul.ll
2011-05-26-BranchKillsVreg.ll
2012-12-12-ExpandMemcpy.ll Fix a logic bug in inline expansion of memcpy / memset with an overlapping 2012-12-12 20:43:23 +00:00
addc.ll
addi.ll Add the 16 bit version of addiu. To the assembler, the 16 and 32 bit are the 2013-02-08 21:42:56 +00:00
addressing-mode.ll Initial implementation of MipsTargetLowering::isLegalAddressingMode. 2012-11-17 00:25:41 +00:00
align16.ll For Mips 16, add the optimization where the 16 bit form of addiu sp can be used 2013-02-13 20:28:27 +00:00
alloca16.ll fix most of remaining issues with large frames. 2012-12-20 04:07:42 +00:00
alloca.ll [mips] Print move instructions. 2013-03-04 22:25:01 +00:00
analyzebranch.ll
and1.ll
asm-large-immediate.ll
atomic.ll [mips] Fix bug in test case. Disable machine LICM to prevent instruction from 2012-11-02 21:46:42 +00:00
atomicops.ll Expand all atomic ops for mips16. 2012-10-29 16:16:54 +00:00
biggot.ll [mips] Generate big GOT code. 2012-11-21 20:40:38 +00:00
blockaddr.ll
br-jmp.ll Expand pseudos/macros for Selt. This is the last of the complex 2013-02-23 03:09:56 +00:00
brconeq.ll Add conditional branch instructions and their patterns. 2012-10-17 22:29:54 +00:00
brconeqk.ll Add conditional branch instructions and their patterns. 2012-10-17 22:29:54 +00:00
brconeqz.ll Add conditional branch instructions and their patterns. 2012-10-17 22:29:54 +00:00
brconge.ll Add conditional branch instructions and their patterns. 2012-10-17 22:29:54 +00:00
brcongt.ll Add conditional branch instructions and their patterns. 2012-10-17 22:29:54 +00:00
brconle.ll Add conditional branch instructions and their patterns. 2012-10-17 22:29:54 +00:00
brconlt.ll Add conditional branch instructions and their patterns. 2012-10-17 22:29:54 +00:00
brconne.ll Add conditional branch instructions and their patterns. 2012-10-17 22:29:54 +00:00
brconnek.ll Add conditional branch instructions and their patterns. 2012-10-17 22:29:54 +00:00
brconnez.ll Add conditional branch instructions and their patterns. 2012-10-17 22:29:54 +00:00
brdelayslot.ll [mips] Remove unused option. Fix 80-column violations. 2013-03-01 02:17:02 +00:00
brind.ll Implement brind operator for mips16. 2012-10-28 23:08:07 +00:00
bswap.ll
buildpairextractelementf64.ll
check-noat.ll [mips] Delete MipsFunctionInfo::EmitNOAT. Unconditionally print directive 2012-11-02 20:56:25 +00:00
cmov.ll [mips] Fix inefficient code generation. 2013-03-01 21:52:08 +00:00
constantfp0.ll
cprestore.ll
DbgValueOtherTargets.test Remove unnecessary leading comment characters in lit-only file 2013-03-18 22:08:16 +00:00
div_rem.ll Div, Rem int/unsigned int 2012-10-12 02:01:09 +00:00
div.ll Div, Rem int/unsigned int 2012-10-12 02:01:09 +00:00
divrem.ll
divu_remu.ll Div, Rem int/unsigned int 2012-10-12 02:01:09 +00:00
divu.ll Div, Rem int/unsigned int 2012-10-12 02:01:09 +00:00
double2int.ll
dsp-patterns.ll [mips] Add patterns for DSP indexed load instructions. 2013-03-30 02:14:45 +00:00
dsp-r1.ll MIPS DSP: add operands to make sure instruction strings are being matched. 2012-09-28 21:23:16 +00:00
dsp-r2.ll MIPS DSP: add operands to make sure instruction strings are being matched. 2012-09-28 21:23:16 +00:00
eh-dwarf-cfa.ll [mips] Custom-lower ISD::FRAME_TO_ARGS_OFFSET node. 2012-11-07 19:10:58 +00:00
eh-return32.ll [mips] Small update to the implementation of eh.return for Mips. 2013-04-02 23:02:07 +00:00
eh-return64.ll [mips] Small update to the implementation of eh.return for Mips. 2013-04-02 23:02:07 +00:00
eh.ll
ex2.ll Add test case for r170674 2012-12-21 00:55:10 +00:00
extins.ll
fabs.ll
fastcc.ll
fcopysign-f32-f64.ll
fcopysign.ll
fmadd1.ll
fneg.ll
fp16static.ll Make sure we call externals from libraries properly when -static. 2013-02-07 04:34:51 +00:00
fp-indexed-ls.ll
fp-spill-reload.ll
fpbr.ll
frame-address.ll [mips] Print move instructions. 2013-03-04 22:25:01 +00:00
frem.ll
global-address.ll
global-pointer-reg.ll
gpreg-lazy-binding.ll [mips] Print move instructions. 2013-03-04 22:25:01 +00:00
gprestore.ll
helloworld.ll Fix minor mips16 issues in directives for function prologue. Probably this does 2013-02-15 01:04:38 +00:00
hf16_1.ll The next phase of Mips16 hard float implementation. 2013-01-24 04:24:02 +00:00
i32k.ll implement large (>16 bit) constant loading. 2012-10-26 03:09:34 +00:00
i64arg.ll [mips] Print move instructions. 2013-03-04 22:25:01 +00:00
imm.ll
indirectcall.ll
init-array.ll
inlineasm64.ll
inlineasm_constraint.ll Mips specific inline assembler constraint 'R' 2013-03-04 21:33:15 +00:00
inlineasm-cnstrnt-bad-I-1.ll
inlineasm-cnstrnt-bad-J.ll
inlineasm-cnstrnt-bad-K.ll
inlineasm-cnstrnt-bad-L.ll
inlineasm-cnstrnt-bad-N.ll
inlineasm-cnstrnt-bad-O.ll
inlineasm-cnstrnt-bad-P.ll
inlineasm-cnstrnt-reg64.ll
inlineasm-cnstrnt-reg.ll
inlineasm-operand-code.ll
inlineasmmemop.ll
internalfunc.ll
jtstat.ll Test case hygiene. 2013-03-09 18:25:40 +00:00
largefr1.ll When Mips16 frames grow large, the immediate field may exceed the maximum 2013-02-08 03:57:41 +00:00
largeimm1.ll [mips] Use register number instead of name to print register $AT. 2012-11-02 21:26:03 +00:00
largeimmprinting.ll [mips] Stop reserving register AT and use register scavenger when a scratch 2012-11-03 00:05:43 +00:00
lb1.ll
lbu1.ll
lh1.ll
lhu1.ll
lit.local.cfg Include '.test' suffix in target specific lit configs that need it 2013-03-18 20:31:44 +00:00
llcarry.ll Implement carry for subtract/add for mips16 2012-10-26 04:46:26 +00:00
load-store-left-right.ll
longbranch.ll [mips] Use register number instead of name to print register $AT. 2012-11-02 21:26:03 +00:00
machineverifier.ll
madd-msub.ll [mips] Fix DSP instructions to have explicit accumulator register operands. 2013-03-30 01:58:00 +00:00
memcpy.ll
mips16_32_1.ll This patch enables llvm to switch between compiling for mips32/mips64 2013-04-09 19:46:01 +00:00
mips16_32_3.ll This patch enables llvm to switch between compiling for mips32/mips64 2013-04-09 19:46:01 +00:00
mips16_32_4.ll This patch enables llvm to switch between compiling for mips32/mips64 2013-04-09 19:46:01 +00:00
mips16_32_5.ll This patch enables llvm to switch between compiling for mips32/mips64 2013-04-09 19:46:01 +00:00
mips16_32_6.ll This patch enables llvm to switch between compiling for mips32/mips64 2013-04-09 19:46:01 +00:00
mips16_32_7.ll This patch enables llvm to switch between compiling for mips32/mips64 2013-04-09 19:46:01 +00:00
mips16_32_8.ll This patch enables llvm to switch between compiling for mips32/mips64 2013-04-09 19:46:01 +00:00
mips16_32_9.ll This patch enables llvm to switch between compiling for mips32/mips64 2013-04-09 19:46:01 +00:00
mips16_32_10.ll This patch enables llvm to switch between compiling for mips32/mips64 2013-04-09 19:46:01 +00:00
mips16ex.ll This patch is needed to make c++ exceptions work for mips16. 2012-12-16 04:00:45 +00:00
mips16fpe.ll This code implements most of mips16 hardfloat as it is done by gcc. 2012-12-15 00:20:05 +00:00
mips64-f128-call.ll [mips] Add a line which checks function name. Rename file. 2013-03-06 01:58:03 +00:00
mips64-f128.ll [mips] Fix MipsCC::analyzeReturn so that, in soft-float mode, fp128 gets 2013-03-05 22:54:59 +00:00
mips64-fp-indexed-ls.ll
mips64-libcall.ll Test case hygiene. 2013-03-09 18:25:40 +00:00
mips64-sret.ll [mips] Print move instructions. 2013-03-04 22:25:01 +00:00
mips64countleading.ll
mips64directive.ll
mips64ext.ll
mips64extins.ll
mips64fpimm0.ll
mips64fpldst.ll
mips64imm.ll
mips64instrs.ll
mips64intldst.ll
mips64lea.ll
mips64load-store-left-right.ll
mips64muldiv.ll
mips64shift.ll
mipslopat.ll
misha.ll Implement patterns for extloadi8 and extloadi16 2012-10-29 19:39:04 +00:00
mul.ll Patch for integer multiply, signed/unsigned, long/long long. 2012-10-05 18:27:54 +00:00
mulll.ll Patch for integer multiply, signed/unsigned, long/long long. 2012-10-05 18:27:54 +00:00
mulull.ll Patch for integer multiply, signed/unsigned, long/long long. 2012-10-05 18:27:54 +00:00
neg1.ll
not1.ll
null.ll Change mips16 delay slot jumps to non delay slot forms by default. 2012-10-30 00:54:49 +00:00
o32_cc_byval.ll [mips] Implement MipsRegisterInfo::getRegPressureLimit. 2013-01-22 21:34:25 +00:00
o32_cc_vararg.ll
o32_cc.ll
or1.ll
private.ll
ra-allocatable.ll
rdhwr-directives.ll
rem.ll Div, Rem int/unsigned int 2012-10-12 02:01:09 +00:00
remat-immed-load.ll [mips] Set flag isAsCheapAsAMove flag on instruction LUi. 2012-11-03 00:26:02 +00:00
remu.ll Div, Rem int/unsigned int 2012-10-12 02:01:09 +00:00
return_address.ll [mips] Print move instructions. 2013-03-04 22:25:01 +00:00
return-vector.ll Implement MipsTargetLowering::CanLowerReturn. 2012-10-10 01:27:09 +00:00
rotate.ll
sb1.ll
select.ll
selectcc.ll
seleq.ll Beginning of expanding all current mips16 macro/pseudo instruction sequences. 2013-02-18 00:59:04 +00:00
seleqk.ll Expand pseudos BteqzT8CmpiX16 and BtnezT8CmpiX16. 2013-02-19 00:20:58 +00:00
selgek.ll Expand mips16 SelT form pseudso/macros. 2013-02-22 05:10:51 +00:00
selgt.ll Expand pseudo/macro BteqzT8SltX16. 2013-02-18 04:04:26 +00:00
selle.ll Expand macro/pseudo instructions BtnezT8SltX16 and BtnezT8SltuX16. 2013-02-18 05:43:03 +00:00
selltk.ll Expand mips16 SelT form pseudso/macros. 2013-02-22 05:10:51 +00:00
selne.ll Expand mips16 SelT form pseudso/macros. 2013-02-22 05:10:51 +00:00
selnek.ll Expand pseudos BteqzT8CmpiX16 and BtnezT8CmpiX16. 2013-02-19 00:20:58 +00:00
selpat.ll Expand pseudos/macros for Selt. This is the last of the complex 2013-02-23 03:09:56 +00:00
selTBteqzCmpi.ll Expand mips16 SelT form pseudso/macros. 2013-02-22 05:10:51 +00:00
selTBtnezCmpi.ll Expand mips16 SelT form pseudso/macros. 2013-02-22 05:10:51 +00:00
selTBtnezSlti.ll Expand mips16 SelT form pseudso/macros. 2013-02-22 05:10:51 +00:00
seteq.ll Expand pseudos/macros: 2013-02-20 05:45:15 +00:00
seteqz.ll Expand pseudos/macros: 2013-02-20 05:45:15 +00:00
setge.ll Expand pseudos/macros: 2013-02-20 05:45:15 +00:00
setgek.ll Expand pseudos/macros: 2013-02-20 05:45:15 +00:00
setle.ll Expand pseudos/macros: 2013-02-20 05:45:15 +00:00
setlt.ll Expand pseudos/macros: 2013-02-20 05:45:15 +00:00
setltk.ll Expand pseudos/macros: 2013-02-20 05:45:15 +00:00
setne.ll Expand pseudos/macros: 2013-02-20 05:45:15 +00:00
setuge.ll Expand pseudos/macros: 2013-02-20 05:45:15 +00:00
setugt.ll Expand pseudos/macros: 2013-02-20 05:45:15 +00:00
setule.ll Expand pseudos/macros: 2013-02-20 05:45:15 +00:00
setult.ll Expand pseudos/macros: 2013-02-20 05:45:15 +00:00
setultk.ll Expand pseudos/macros: 2013-02-20 05:45:15 +00:00
sh1.ll
shift-parts.ll
sitofp-selectcc-opt.ll
sll1.ll
sll2.ll
small-section-reserve-gp.ll
sra1.ll
sra2.ll
srl1.ll
srl2.ll
stacksize.ll
stchar.ll This patch is for the implementation of mips16 complex pattern addr16. 2012-10-28 06:02:37 +00:00
stldst.ll checking test case for r164811. was an omission to not check this in. this was already approved 2012-10-01 21:35:06 +00:00
sub1.ll
sub2.ll
swzero.ll
tailcall.ll Test case for r167039. Check that tail-call optimization is disabled for 2012-10-31 17:25:23 +00:00
tls16_2.ll Implement MipsHi for mips16 2012-10-27 00:57:14 +00:00
tls16.ll implement mips16 tls global addr 2012-10-26 22:57:32 +00:00
tls-alias.ll
tls-models.ll
tls.ll [mips] Implement MipsRegisterInfo::getRegPressureLimit. 2013-01-22 21:34:25 +00:00
uitofp.ll
ul1.ll
unalignedload.ll
vector-load-store.ll
vector-setcc.ll [mips] MipsTargetLowering::getSetCCResultType should return a vector type if 2013-01-04 20:06:01 +00:00
weak.ll
xor1.ll
zeroreg.ll