//===----------------------------------------------------------------------===//
#include "SparcInternals.h"
-#include "llvm/Target/Sparc.h"
+#include "llvm/Target/TargetMachineImpls.h"
#include "llvm/Function.h"
#include "llvm/PassManager.h"
#include "llvm/Transforms/Scalar.h"
#define I(ENUM, OPCODESTRING, NUMOPERANDS, RESULTPOS, MAXIMM, IMMSE, \
NUMDELAYSLOTS, LATENCY, SCHEDCLASS, INSTFLAGS) \
{ OPCODESTRING, NUMOPERANDS, RESULTPOS, MAXIMM, IMMSE, \
- NUMDELAYSLOTS, LATENCY, SCHEDCLASS, INSTFLAGS },
+ NUMDELAYSLOTS, LATENCY, SCHEDCLASS, INSTFLAGS, 0 },
#include "SparcInstr.def"
};
//---------------------------------------------------------------------------
UltraSparc::UltraSparc()
- : TargetMachine("UltraSparc-Native"),
+ : TargetMachine("UltraSparc-Native", 4),
schedInfo(*this),
regInfo(*this),
frameInfo(*this),
cacheInfo(*this),
- optInfo(*this)
-{
- optSizeForSubWordData = 4;
- minMemOpWordSize = 8;
- maxAtomicMemOpWordSize = 8;
+ optInfo(*this) {
}
// addPassesToEmitAssembly - This method controls the entire code generation
// process for the ultra sparc.
//
-void UltraSparc::addPassesToEmitAssembly(PassManager &PM, std::ostream &Out)
+bool UltraSparc::addPassesToEmitAssembly(PassManager &PM, std::ostream &Out)
{
// Construct and initialize the MachineFunction object for this fn.
PM.add(createMachineCodeConstructionPass(*this));
if (!DisablePreSelect)
{
PM.add(createPreSelectionPass(*this));
- /* PM.add(createReassociatePass()); */
+ PM.add(createReassociatePass());
PM.add(createLICMPass());
PM.add(createGCSEPass());
}
// Emit bytecode to the assembly file into its special section next
PM.add(getEmitBytecodeToAsmPass(Out));
PM.add(getFunctionInfo(Out));
+ return false;
}