#include "llvm/Target/TargetMachine.h"
#include "llvm/Type.h"
-#include "llvm/IntrinsicLowering.h"
+#include "llvm/CodeGen/IntrinsicLowering.h"
#include "Support/CommandLine.h"
using namespace llvm;
// Command-line options that tend to be useful on more than one back-end.
//
-namespace llvm {
+namespace llvm {
bool PrintMachineCode;
+ bool NoFramePointerElim;
};
namespace {
cl::opt<bool, true> PrintCode("print-machineinstrs",
cl::desc("Print generated machine code"),
cl::location(PrintMachineCode), cl::init(false));
+
+ cl::opt<bool, true>
+ DisableFPElim("disable-fp-elim",
+ cl::desc("Disable frame pointer elimination optimization"),
+ cl::location(NoFramePointerElim),
+ cl::init(false));
};
//---------------------------------------------------------------------------
delete IL;
}
-unsigned TargetMachine::findOptimalStorageSize(const Type *Ty) const {
- // All integer types smaller than ints promote to 4 byte integers.
- if (Ty->isIntegral() && Ty->getPrimitiveSize() < 4)
- return 4;
-
- return DataLayout.getTypeSize(Ty);
-}