comparison gen/optimizer.cpp @ 1172:b3887714b735

Small cleanup: remove mars.h #include
author Frits van Bommel <fvbommel wxs.nl>
date Sun, 29 Mar 2009 16:47:19 +0200
parents 461a85f0db31
children cc1efa23030a
comparison
equal deleted inserted replaced
1171:461a85f0db31 1172:b3887714b735
5 #include "llvm/Analysis/LoopPass.h" 5 #include "llvm/Analysis/LoopPass.h"
6 #include "llvm/Target/TargetData.h" 6 #include "llvm/Target/TargetData.h"
7 #include "llvm/Support/CommandLine.h" 7 #include "llvm/Support/CommandLine.h"
8 #include "llvm/Support/PassNameParser.h" 8 #include "llvm/Support/PassNameParser.h"
9 9
10 #include "root.h" // error() & fatal() 10 #include "root.h" // error()
11 #include "mars.h" // global flags
12 11
13 using namespace llvm; 12 using namespace llvm;
14 13
15 // Allow the user to specify specific optimizations to run. 14 // Allow the user to specify specific optimizations to run.
16 static cl::list<const PassInfo*, bool, PassNameParser> 15 static cl::list<const PassInfo*, bool, PassNameParser>
150 const char* arg = pass->getPassArgument(); // may return null 149 const char* arg = pass->getPassArgument(); // may return null
151 if (arg) 150 if (arg)
152 error("Can't create pass '-%s' (%s)", arg, pass->getPassName()); 151 error("Can't create pass '-%s' (%s)", arg, pass->getPassName());
153 else 152 else
154 error("Can't create pass (%s)", pass->getPassName()); 153 error("Can't create pass (%s)", pass->getPassName());
155 fatal(); 154 assert(0); // Should be unreachable; root.h:error() calls exit()
156 } 155 }
157 } 156 }
158 // insert -O<N> / -enable-inlining if specified at the end, 157 // insert -O<N> / -enable-inlining if specified at the end,
159 if (optimize) 158 if (optimize)
160 addPassesForOptLevel(pm); 159 addPassesForOptLevel(pm);