diff options
author | Reed Kotler <rkotler@mips.com> | 2013-10-27 21:57:36 +0000 |
---|---|---|
committer | Reed Kotler <rkotler@mips.com> | 2013-10-27 21:57:36 +0000 |
commit | 91ae9829a9b5718ffaf594b59d789a0e9e2aa0d3 (patch) | |
tree | ba7aa61543abba5140bde59dc9f145f89841cb4c /llvm/lib/Target/Mips/MipsSubtarget.cpp | |
parent | 31bd72fb22924a8743455dad4c281918a9c49e16 (diff) | |
download | bcm5719-llvm-91ae9829a9b5718ffaf594b59d789a0e9e2aa0d3.tar.gz bcm5719-llvm-91ae9829a9b5718ffaf594b59d789a0e9e2aa0d3.zip |
Make first substantial checkin of my port of ARM constant islands code to Mips.
Before I just ported the shell of the pass. I've tried to keep everything
nearly identical to the ARM version. I think it will be very easy to eventually
merge these two and create a new more general pass that other targets can
use. I have some improvements I would like to make to allow pools to
be shared across functions and some other things. When I'm all done we
can think about making a more general pass. More to be ported but the
basic mechanism works now almost as good as gcc mips16.
llvm-svn: 193509
Diffstat (limited to 'llvm/lib/Target/Mips/MipsSubtarget.cpp')
-rw-r--r-- | llvm/lib/Target/Mips/MipsSubtarget.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/Target/Mips/MipsSubtarget.cpp b/llvm/lib/Target/Mips/MipsSubtarget.cpp index 3a122706aa2..0a81072b085 100644 --- a/llvm/lib/Target/Mips/MipsSubtarget.cpp +++ b/llvm/lib/Target/Mips/MipsSubtarget.cpp @@ -53,6 +53,12 @@ Mips16HardFloat("mips16-hard-float", cl::NotHidden, cl::desc("MIPS: mips16 hard float enable."), cl::init(false)); +static cl::opt<bool> +Mips16ConstantIslands( + "mips16-constant-islands", cl::Hidden, + cl::desc("MIPS: mips16 constant islands enable. experimental feature"), + cl::init(false)); + void MipsSubtarget::anchor() { } MipsSubtarget::MipsSubtarget(const std::string &TT, const std::string &CPU, @@ -163,3 +169,8 @@ void MipsSubtarget::resetSubtarget(MachineFunction *MF) { bool MipsSubtarget::mipsSEUsesSoftFloat() const { return TM->Options.UseSoftFloat && !InMips16HardFloat; } + +bool MipsSubtarget::useConstantIslands() { + DEBUG(dbgs() << "use constant islands " << Mips16ConstantIslands << "\n"); + return Mips16ConstantIslands; +} |