Bring back -disable-fp-elim.

It was moved to llvm/CodeGen/CommandLineFlags.h.

GitHub: Fixes #502.
This commit is contained in:
David Nadlinger 2013-10-13 20:26:19 +02:00
parent d46d4ce4b1
commit 257da5afe5
6 changed files with 10 additions and 5 deletions

View file

@ -325,6 +325,10 @@ cl::opt<FloatABI::Type> mFloatABI("float-abi",
clEnumValN(FloatABI::Hard, "hard", "Hardware floating-point ABI and instructions"),
clEnumValEnd));
cl::opt<bool> disableFpElim("disable-fp-elim",
cl::desc("Disable frame pointer elimination optimization"),
cl::init(false));
static cl::opt<bool, true, FlagParser> asserts("asserts",
cl::desc("(*) Enable assertions"),
cl::value_desc("bool"),

View file

@ -61,6 +61,7 @@ namespace opts {
extern cl::opt<std::string> mTargetTriple;
extern cl::opt<llvm::Reloc::Model> mRelocModel;
extern cl::opt<llvm::CodeModel::Model> mCodeModel;
extern cl::opt<bool> disableFpElim;
extern cl::opt<FloatABI::Type> mFloatABI;
extern cl::opt<bool, true> singleObj;
extern cl::opt<bool> linkonceTemplates;

View file

@ -637,7 +637,7 @@ int main(int argc, char **argv)
gTargetMachine = createTargetMachine(mTargetTriple, mArch, mCPU, mAttrs,
bitness, mFloatABI, mRelocModel, mCodeModel, codeGenOptLevel(),
global.params.symdebug);
global.params.symdebug || disableFpElim);
{
llvm::Triple triple = llvm::Triple(gTargetMachine->getTargetTriple());

View file

@ -262,7 +262,7 @@ llvm::TargetMachine* createTargetMachine(
llvm::Reloc::Model relocModel,
llvm::CodeModel::Model codeModel,
llvm::CodeGenOpt::Level codeGenOptLevel,
bool genDebugInfo)
bool noFramePointerElim)
{
// Determine target triple. If the user didn't explicitly specify one, use
// the one set at LLVM configure time.
@ -362,7 +362,7 @@ llvm::TargetMachine* createTargetMachine(
}
llvm::TargetOptions targetOptions;
targetOptions.NoFramePointerElim = genDebugInfo;
targetOptions.NoFramePointerElim = noFramePointerElim;
switch (floatABI)
{

View file

@ -54,6 +54,6 @@ llvm::TargetMachine* createTargetMachine(
llvm::Reloc::Model relocModel,
llvm::CodeModel::Model codeModel,
llvm::CodeGenOpt::Level codeGenOptLevel,
bool genDebugInfo);
bool noFramePointerElim);
#endif // LDC_DRIVER_TARGET_H

@ -1 +1 @@
Subproject commit e996666c8511b473a80a736d2e504259f19041d8
Subproject commit ab51931e8ded2854717bcde45b3829432de44b72