Add the first backend support for on demand subtarget creation
authorEric Christopher <echristo@gmail.com>
Fri, 26 Sep 2014 01:44:08 +0000 (01:44 +0000)
committerEric Christopher <echristo@gmail.com>
Fri, 26 Sep 2014 01:44:08 +0000 (01:44 +0000)
commit55a90ab4ef8db0c23127f297b49a0ea3ed8e0421
treede98f62d1a496930f40ef7cb1b10a6b6f44f66fe
parent792f33430575996fbb6e42ccd364667fd810c540
Add the first backend support for on demand subtarget creation
based on the Function. This is currently used to implement
mips16 support in the mips backend via the existing module
pass resetting the subtarget.

Things to note:

a) This involved running resetTargetOptions before creating a
new subtarget so that code generation options like soft-float
could be recognized when creating the new subtarget. This is
to deal with initialization code in isel lowering that only
paid attention to the initial value.

b) Many of the existing testcases weren't using the soft-float
feature correctly. I've corrected these based on the check
values assuming that was the desired behavior.

c) The mips port now pays attention to the target-cpu and
target-features strings when generating code for a particular
function. I've removed these from one function where the
requested cpu and features didn't match the check lines in
the testcase.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218492 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Mips/MipsTargetMachine.cpp
lib/Target/Mips/MipsTargetMachine.h
test/CodeGen/Mips/fp16instrinsmc.ll
test/CodeGen/Mips/hfptrcall.ll
test/CodeGen/Mips/nomips16.ll
test/CodeGen/Mips/seleq.ll