summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llc/llc.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-06-04 22:05:33 +0000
committerDevang Patel <dpatel@apple.com>2009-06-04 22:05:33 +0000
commit72a4d2fec138ad6d2becbc69c6d034246a056d09 (patch)
tree1e42d37917b679d82ae7be7c460349294cbbb971 /llvm/tools/llc/llc.cpp
parentbeca75273ac25e7b38281c100afcf4f2c1b7ef51 (diff)
downloadbcm5719-llvm-72a4d2fec138ad6d2becbc69c6d034246a056d09.tar.gz
bcm5719-llvm-72a4d2fec138ad6d2becbc69c6d034246a056d09.zip
Add new function attribute - noredzone.
Update code generator to use this attribute and remove DisableRedZone target option. Update llc to set this attribute when -disable-red-zone command line option is used. llvm-svn: 72894
Diffstat (limited to 'llvm/tools/llc/llc.cpp')
-rw-r--r--llvm/tools/llc/llc.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/llvm/tools/llc/llc.cpp b/llvm/tools/llc/llc.cpp
index 4808f0e529c..a2474729dd2 100644
--- a/llvm/tools/llc/llc.cpp
+++ b/llvm/tools/llc/llc.cpp
@@ -100,6 +100,11 @@ 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));
+
// GetFileNameRoot - Helper function to get the basename of a filename.
static inline std::string
GetFileNameRoot(const std::string &InputFilename) {
@@ -336,8 +341,11 @@ 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);
Passes.run(*I);
+ }
Passes.doFinalization();
}
OpenPOWER on IntegriCloud