forked from OSchip/llvm-project
Great renaming part II: Sparc --> SparcV9 (also includes command-line options and Makefiles)
llvm-svn: 11827
This commit is contained in:
parent
94e95d2b3e
commit
068b4596d4
|
|
@ -29,12 +29,12 @@ namespace llvm {
|
||||||
TargetMachine *allocateCTargetMachine(const Module &M,
|
TargetMachine *allocateCTargetMachine(const Module &M,
|
||||||
IntrinsicLowering *IL = 0);
|
IntrinsicLowering *IL = 0);
|
||||||
|
|
||||||
// allocateSparcTargetMachine - Allocate and return a subclass of
|
// allocateSparcV9TargetMachine - Allocate and return a subclass of
|
||||||
// TargetMachine that implements the Sparc backend. This takes ownership of
|
// TargetMachine that implements the Sparc backend. This takes ownership of
|
||||||
// the IntrinsicLowering pointer, deleting it when the target machine is
|
// the IntrinsicLowering pointer, deleting it when the target machine is
|
||||||
// destroyed.
|
// destroyed.
|
||||||
//
|
//
|
||||||
TargetMachine *allocateSparcTargetMachine(const Module &M,
|
TargetMachine *allocateSparcV9TargetMachine(const Module &M,
|
||||||
IntrinsicLowering *IL = 0);
|
IntrinsicLowering *IL = 0);
|
||||||
|
|
||||||
// allocateX86TargetMachine - Allocate and return a subclass of TargetMachine
|
// allocateX86TargetMachine - Allocate and return a subclass of TargetMachine
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ using namespace llvm;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
enum ArchName { x86, Sparc };
|
enum ArchName { x86, SparcV9 };
|
||||||
|
|
||||||
#ifndef NO_JITS_ENABLED
|
#ifndef NO_JITS_ENABLED
|
||||||
cl::opt<ArchName>
|
cl::opt<ArchName>
|
||||||
|
|
@ -38,13 +38,13 @@ namespace {
|
||||||
clEnumVal(x86, " IA-32 (Pentium and above)"),
|
clEnumVal(x86, " IA-32 (Pentium and above)"),
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_SPARC_JIT
|
#ifdef ENABLE_SPARC_JIT
|
||||||
clEnumValN(Sparc, "sparc", " Sparc-V9"),
|
clEnumValN(Sparc, "sparcv9", " Sparc-V9"),
|
||||||
#endif
|
#endif
|
||||||
0),
|
0),
|
||||||
#if defined(ENABLE_X86_JIT)
|
#if defined(ENABLE_X86_JIT)
|
||||||
cl::init(x86)
|
cl::init(x86)
|
||||||
#elif defined(ENABLE_SPARC_JIT)
|
#elif defined(ENABLE_SPARC_JIT)
|
||||||
cl::init(Sparc)
|
cl::init(SparcV9)
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
#endif /* NO_JITS_ENABLED */
|
#endif /* NO_JITS_ENABLED */
|
||||||
|
|
@ -69,8 +69,8 @@ ExecutionEngine *JIT::create(ModuleProvider *MP, IntrinsicLowering *IL) {
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_SPARC_JIT
|
#ifdef ENABLE_SPARC_JIT
|
||||||
case Sparc:
|
case SparcV9:
|
||||||
TargetMachineAllocator = allocateSparcTargetMachine;
|
TargetMachineAllocator = allocateSparcV9TargetMachine;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
#
|
#
|
||||||
##===----------------------------------------------------------------------===##
|
##===----------------------------------------------------------------------===##
|
||||||
LEVEL = ../..
|
LEVEL = ../..
|
||||||
DIRS = CBackend X86 Sparc PowerPC
|
DIRS = CBackend X86 SparcV9 PowerPC
|
||||||
LIBRARYNAME = target
|
LIBRARYNAME = target
|
||||||
BUILD_ARCHIVE = 1
|
BUILD_ARCHIVE = 1
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#include "SparcInternals.h"
|
#include "SparcV9Internals.h"
|
||||||
#include "llvm/Constant.h"
|
#include "llvm/Constant.h"
|
||||||
#include "llvm/DerivedTypes.h"
|
#include "llvm/DerivedTypes.h"
|
||||||
#include "llvm/Function.h"
|
#include "llvm/Function.h"
|
||||||
|
|
|
||||||
|
|
@ -9,16 +9,16 @@
|
||||||
LEVEL = ../..
|
LEVEL = ../..
|
||||||
TOOLNAME = llc
|
TOOLNAME = llc
|
||||||
USEDLIBS = cwriter \
|
USEDLIBS = cwriter \
|
||||||
sparc \
|
sparcv9 \
|
||||||
x86 \
|
x86 \
|
||||||
powerpc \
|
powerpc \
|
||||||
selectiondag \
|
selectiondag \
|
||||||
regalloc \
|
sparcv9regalloc \
|
||||||
sched \
|
sched \
|
||||||
select \
|
sparcv9select \
|
||||||
codegen \
|
codegen \
|
||||||
target.a \
|
target.a \
|
||||||
livevar \
|
sparcv9livevar \
|
||||||
ipa.a \
|
ipa.a \
|
||||||
transforms.a \
|
transforms.a \
|
||||||
scalaropts.a \
|
scalaropts.a \
|
||||||
|
|
|
||||||
|
|
@ -37,12 +37,12 @@ OutputFilename("o", cl::desc("Output filename"), cl::value_desc("filename"));
|
||||||
|
|
||||||
static cl::opt<bool> Force("f", cl::desc("Overwrite output files"));
|
static cl::opt<bool> Force("f", cl::desc("Overwrite output files"));
|
||||||
|
|
||||||
enum ArchName { noarch, X86, Sparc, PowerPC, CBackend };
|
enum ArchName { noarch, X86, SparcV9, PowerPC, CBackend };
|
||||||
|
|
||||||
static cl::opt<ArchName>
|
static cl::opt<ArchName>
|
||||||
Arch("march", cl::desc("Architecture to generate assembly for:"), cl::Prefix,
|
Arch("march", cl::desc("Architecture to generate assembly for:"), cl::Prefix,
|
||||||
cl::values(clEnumValN(X86, "x86", " IA-32 (Pentium and above)"),
|
cl::values(clEnumValN(X86, "x86", " IA-32 (Pentium and above)"),
|
||||||
clEnumValN(Sparc, "sparc", " SPARC V9"),
|
clEnumValN(SparcV9, "sparcv9", " SPARC V9"),
|
||||||
clEnumValN(PowerPC, "powerpc", " PowerPC"),
|
clEnumValN(PowerPC, "powerpc", " PowerPC"),
|
||||||
clEnumValN(CBackend, "c", " C backend"),
|
clEnumValN(CBackend, "c", " C backend"),
|
||||||
0),
|
0),
|
||||||
|
|
@ -90,8 +90,8 @@ int main(int argc, char **argv) {
|
||||||
case X86:
|
case X86:
|
||||||
TargetMachineAllocator = allocateX86TargetMachine;
|
TargetMachineAllocator = allocateX86TargetMachine;
|
||||||
break;
|
break;
|
||||||
case Sparc:
|
case SparcV9:
|
||||||
TargetMachineAllocator = allocateSparcTargetMachine;
|
TargetMachineAllocator = allocateSparcV9TargetMachine;
|
||||||
break;
|
break;
|
||||||
case PowerPC:
|
case PowerPC:
|
||||||
TargetMachineAllocator = allocatePowerPCTargetMachine;
|
TargetMachineAllocator = allocatePowerPCTargetMachine;
|
||||||
|
|
@ -109,14 +109,14 @@ int main(int argc, char **argv) {
|
||||||
TargetMachineAllocator = allocatePowerPCTargetMachine;
|
TargetMachineAllocator = allocatePowerPCTargetMachine;
|
||||||
} else if (mod.getEndianness() == Module::BigEndian &&
|
} else if (mod.getEndianness() == Module::BigEndian &&
|
||||||
mod.getPointerSize() == Module::Pointer64) {
|
mod.getPointerSize() == Module::Pointer64) {
|
||||||
TargetMachineAllocator = allocateSparcTargetMachine;
|
TargetMachineAllocator = allocateSparcV9TargetMachine;
|
||||||
} else {
|
} else {
|
||||||
// If the module is target independent, favor a target which matches the
|
// If the module is target independent, favor a target which matches the
|
||||||
// current build system.
|
// current build system.
|
||||||
#if defined(i386) || defined(__i386__) || defined(__x86__)
|
#if defined(i386) || defined(__i386__) || defined(__x86__)
|
||||||
TargetMachineAllocator = allocateX86TargetMachine;
|
TargetMachineAllocator = allocateX86TargetMachine;
|
||||||
#elif defined(sparc) || defined(__sparc__) || defined(__sparcv9)
|
#elif defined(sparc) || defined(__sparc__) || defined(__sparcv9)
|
||||||
TargetMachineAllocator = allocateSparcTargetMachine;
|
TargetMachineAllocator = allocateSparcV9TargetMachine;
|
||||||
#elif defined(__POWERPC__) || defined(__ppc__) || defined(__APPLE__)
|
#elif defined(__POWERPC__) || defined(__ppc__) || defined(__APPLE__)
|
||||||
TargetMachineAllocator = allocatePowerPCTargetMachine;
|
TargetMachineAllocator = allocatePowerPCTargetMachine;
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
|
|
@ -40,10 +40,10 @@ endif
|
||||||
# What the Sparc JIT requires
|
# What the Sparc JIT requires
|
||||||
ifdef ENABLE_SPARC_JIT
|
ifdef ENABLE_SPARC_JIT
|
||||||
CPPFLAGS += -DENABLE_SPARC_JIT
|
CPPFLAGS += -DENABLE_SPARC_JIT
|
||||||
JITLIBS += sparc
|
JITLIBS += sparcv9
|
||||||
ARCHLIBS += sched livevar instrument.a profpaths \
|
ARCHLIBS += sched sparcv9livevar instrument.a profpaths \
|
||||||
bcwriter transforms.a ipo.a ipa.a datastructure.a regalloc \
|
bcwriter transforms.a ipo.a ipa.a datastructure.a \
|
||||||
select
|
sparcv9regalloc sparcv9select
|
||||||
endif
|
endif
|
||||||
|
|
||||||
USEDLIBS = lli-interpreter $(JITLIBS) $(ARCHLIBS) scalaropts analysis.a \
|
USEDLIBS = lli-interpreter $(JITLIBS) $(ARCHLIBS) scalaropts analysis.a \
|
||||||
|
|
|
||||||
|
|
@ -41,10 +41,10 @@ endif
|
||||||
# What the Sparc JIT requires
|
# What the Sparc JIT requires
|
||||||
ifdef ENABLE_SPARC_JIT
|
ifdef ENABLE_SPARC_JIT
|
||||||
CPPFLAGS += -DENABLE_SPARC_JIT
|
CPPFLAGS += -DENABLE_SPARC_JIT
|
||||||
JITLIBS += sparc
|
JITLIBS += sparcv9
|
||||||
ARCHLIBS += sched livevar instrument.a profpaths \
|
ARCHLIBS += sched sparcv9livevar instrument.a profpaths \
|
||||||
bcwriter transforms.a ipo.a ipa.a datastructure.a regalloc \
|
bcwriter transforms.a ipo.a ipa.a datastructure.a \
|
||||||
select
|
sparcv9regalloc sparcv9select
|
||||||
endif
|
endif
|
||||||
|
|
||||||
USEDLIBS = lli-interpreter $(JITLIBS) $(ARCHLIBS) scalaropts analysis.a \
|
USEDLIBS = lli-interpreter $(JITLIBS) $(ARCHLIBS) scalaropts analysis.a \
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue