diff options
Diffstat (limited to 'tools/llc/llc.cpp')
-rw-r--r-- | tools/llc/llc.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp index 4808f0e..c630331 100644 --- a/tools/llc/llc.cpp +++ b/tools/llc/llc.cpp @@ -100,6 +100,16 @@ cl::opt<bool> NoVerify("disable-verify", cl::Hidden, cl::desc("Do not verify input module")); +static cl::opt<bool> +DisableRedZone("disable-red-zone", + cl::desc("Do not emit code that uses the red zone."), + cl::init(false)); + +static cl::opt<bool> +NoImplicitFloats("no-implicit-float", + cl::desc("Don't generate implicit floating point instructions (x86-only)"), + cl::init(false)); + // GetFileNameRoot - Helper function to get the basename of a filename. static inline std::string GetFileNameRoot(const std::string &InputFilename) { @@ -336,8 +346,13 @@ int main(int argc, char **argv) { // Run our queue of passes all at once now, efficiently. // TODO: this could lazily stream functions out of the module. for (Module::iterator I = mod.begin(), E = mod.end(); I != E; ++I) - if (!I->isDeclaration()) + if (!I->isDeclaration()) { + if (DisableRedZone) + I->addFnAttr(Attribute::NoRedZone); + if (NoImplicitFloats) + I->addFnAttr(Attribute::NoImplicitFloat); Passes.run(*I); + } Passes.doFinalization(); } |