blob: af80e8b2b77d734a7b2fb47934ba26da6ef20f3b [file] [log] [blame]
Chris Lattner73a6bdd2002-11-20 22:28:10 +00001//===- BugDriver.h - Top-Level BugPoint class -------------------*- C++ -*-===//
Misha Brukman650ba8e2005-04-22 00:00:37 +00002//
John Criswell09344dc2003-10-20 17:47:21 +00003// The LLVM Compiler Infrastructure
4//
Chris Lattner345353d2007-12-29 20:44:31 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
Misha Brukman650ba8e2005-04-22 00:00:37 +00007//
John Criswell09344dc2003-10-20 17:47:21 +00008//===----------------------------------------------------------------------===//
Chris Lattner73a6bdd2002-11-20 22:28:10 +00009//
10// This class contains all of the shared state and information that is used by
11// the BugPoint tool to track down errors in optimizations. This class is the
12// main driver class that invokes all sub-functionality.
13//
14//===----------------------------------------------------------------------===//
15
Benjamin Kramera7c40ef2014-08-13 16:26:38 +000016#ifndef LLVM_TOOLS_BUGPOINT_BUGDRIVER_H
17#define LLVM_TOOLS_BUGPOINT_BUGDRIVER_H
Chris Lattner73a6bdd2002-11-20 22:28:10 +000018
Chandler Carrutha4ea2692014-03-04 11:26:31 +000019#include "llvm/IR/ValueMap.h"
Justin Bogner1c039152016-09-06 17:18:22 +000020#include "llvm/Support/Error.h"
Rafael Espindola229e38f2010-10-13 01:36:30 +000021#include "llvm/Transforms/Utils/ValueMapper.h"
Rafael Espindola28b351a2014-08-26 17:19:03 +000022#include <memory>
Chris Lattner73a6bdd2002-11-20 22:28:10 +000023#include <string>
Chandler Carruth4d88a1c2012-12-04 10:44:52 +000024#include <vector>
Misha Brukmand792c9b2003-07-24 18:17:43 +000025
Brian Gaeke960707c2003-11-11 22:41:34 +000026namespace llvm {
27
Dan Gohman956ae9d2009-04-22 15:57:18 +000028class Value;
Owen Anderson81781222010-07-20 08:26:15 +000029class PassInfo;
Chris Lattner73a6bdd2002-11-20 22:28:10 +000030class Module;
Bill Wendling3f833432006-10-25 18:36:14 +000031class GlobalVariable;
Chris Lattner73a6bdd2002-11-20 22:28:10 +000032class Function;
Chris Lattnera060b102004-05-11 21:54:13 +000033class BasicBlock;
Chris Lattnerd4e04742002-12-23 23:49:59 +000034class AbstractInterpreter;
Chris Lattner0eb5ce92003-01-23 02:48:33 +000035class Instruction;
Benjamin Kramer78c3bcb2009-08-11 17:45:13 +000036class LLVMContext;
Chris Lattner73a6bdd2002-11-20 22:28:10 +000037
Chris Lattner1d080f22003-04-24 22:24:58 +000038class DebugCrashes;
Chris Lattner16a41312003-04-24 17:02:17 +000039
Davide Italianoab256212015-10-14 20:29:54 +000040class CC;
Misha Brukman0fd31722003-07-24 21:59:10 +000041
Chris Lattnerd1e2aae2003-08-05 15:51:05 +000042extern bool DisableSimplifyCFG;
43
Chris Lattnerbeb01fa2005-08-02 02:16:17 +000044/// BugpointIsInterrupted - Set to true when the user presses ctrl-c.
45///
46extern bool BugpointIsInterrupted;
47
Chris Lattner73a6bdd2002-11-20 22:28:10 +000048class BugDriver {
Justin Bogner8d0a0812016-09-02 01:21:37 +000049 LLVMContext &Context;
Dan Gohman46ffffa2009-08-05 20:21:17 +000050 const char *ToolName; // argv[0] of bugpoint
Misha Brukman0fd31722003-07-24 21:59:10 +000051 std::string ReferenceOutputFile; // Name of `good' output file
Justin Bogner8d0a0812016-09-02 01:21:37 +000052 Module *Program; // The raw program, linked together
Rafael Espindola33e81a82010-08-08 03:55:08 +000053 std::vector<std::string> PassesToRun;
Justin Bogner8d0a0812016-09-02 01:21:37 +000054 AbstractInterpreter *Interpreter; // How to run the program
55 AbstractInterpreter *SafeInterpreter; // To generate reference output, etc.
Davide Italianoab256212015-10-14 20:29:54 +000056 CC *cc;
Patrick Jenkinsc46c0382006-08-15 16:40:49 +000057 bool run_find_bugs;
Chris Lattner20ec1652006-06-13 03:10:48 +000058 unsigned Timeout;
Anton Korobeynikovd01defe2007-02-16 19:11:07 +000059 unsigned MemoryLimit;
Jeffrey Yasskin71bd0f42010-03-19 00:09:28 +000060 bool UseValgrind;
Chris Lattner16a41312003-04-24 17:02:17 +000061
Chris Lattner1d080f22003-04-24 22:24:58 +000062 // FIXME: sort out public/private distinctions...
Chris Lattner327019b2004-02-18 21:24:48 +000063 friend class ReducePassList;
Misha Brukmand792c9b2003-07-24 18:17:43 +000064 friend class ReduceMisCodegenFunctions;
Misha Brukmand792c9b2003-07-24 18:17:43 +000065
Chris Lattner73a6bdd2002-11-20 22:28:10 +000066public:
Justin Bogner8d0a0812016-09-02 01:21:37 +000067 BugDriver(const char *toolname, bool find_bugs, unsigned timeout,
68 unsigned memlimit, bool use_valgrind, LLVMContext &ctxt);
Jeffrey Yasskina6eedc32010-03-22 05:23:37 +000069 ~BugDriver();
Chris Lattnerd4e04742002-12-23 23:49:59 +000070
Dan Gohman46ffffa2009-08-05 20:21:17 +000071 const char *getToolName() const { return ToolName; }
Chris Lattner73a6bdd2002-11-20 22:28:10 +000072
Justin Bogner8d0a0812016-09-02 01:21:37 +000073 LLVMContext &getContext() const { return Context; }
Owen Anderson6773d382009-07-01 16:58:40 +000074
Chris Lattner73a6bdd2002-11-20 22:28:10 +000075 // Set up methods... these methods are used to copy information about the
76 // command line arguments into instance variables of BugDriver.
77 //
78 bool addSources(const std::vector<std::string> &FileNames);
Benjamin Kramerc321e532016-06-08 19:09:22 +000079 void addPass(std::string p) { PassesToRun.push_back(std::move(p)); }
Rafael Espindola33e81a82010-08-08 03:55:08 +000080 void setPassesToRun(const std::vector<std::string> &PTR) {
Chris Lattner7d147ae2003-10-17 23:03:16 +000081 PassesToRun = PTR;
82 }
Justin Bogner8d0a0812016-09-02 01:21:37 +000083 const std::vector<std::string> &getPassesToRun() const { return PassesToRun; }
Chris Lattner73a6bdd2002-11-20 22:28:10 +000084
85 /// run - The top level method that is invoked after all of the instance
Reid Spencer842118c2005-12-22 20:02:55 +000086 /// variables are set up from command line arguments. The \p as_child argument
87 /// indicates whether the driver is to run in parent mode or child mode.
Chris Lattner73a6bdd2002-11-20 22:28:10 +000088 ///
Justin Bogner1c039152016-09-06 17:18:22 +000089 Error run();
Chris Lattner73a6bdd2002-11-20 22:28:10 +000090
Chris Lattneread1dff2004-02-18 21:02:04 +000091 /// debugOptimizerCrash - This method is called when some optimizer pass
92 /// crashes on input. It attempts to prune down the testcase to something
93 /// reasonable, and figure out exactly which pass is crashing.
Chris Lattner73a6bdd2002-11-20 22:28:10 +000094 ///
Justin Bogner1c039152016-09-06 17:18:22 +000095 Error debugOptimizerCrash(const std::string &ID = "passes");
Misha Brukman650ba8e2005-04-22 00:00:37 +000096
Chris Lattneread1dff2004-02-18 21:02:04 +000097 /// debugCodeGeneratorCrash - This method is called when the code generator
98 /// crashes on an input. It attempts to reduce the input as much as possible
99 /// while still causing the code generator to crash.
Justin Bogner1c039152016-09-06 17:18:22 +0000100 Error debugCodeGeneratorCrash();
Chris Lattner73a6bdd2002-11-20 22:28:10 +0000101
Chris Lattner73a6bdd2002-11-20 22:28:10 +0000102 /// debugMiscompilation - This method is used when the passes selected are not
103 /// crashing, but the generated output is semantically different from the
104 /// input.
Justin Bogner1c039152016-09-06 17:18:22 +0000105 Error debugMiscompilation();
Chris Lattner73a6bdd2002-11-20 22:28:10 +0000106
Chris Lattnerd4e04742002-12-23 23:49:59 +0000107 /// debugPassMiscompilation - This method is called when the specified pass
108 /// miscompiles Program as input. It tries to reduce the testcase to
109 /// something that smaller that still miscompiles the program.
110 /// ReferenceOutput contains the filename of the file containing the output we
111 /// are to match.
112 ///
Owen Anderson81781222010-07-20 08:26:15 +0000113 bool debugPassMiscompilation(const PassInfo *ThePass,
Jeff Cohen88e7b722005-04-22 04:13:13 +0000114 const std::string &ReferenceOutput);
Chris Lattnerd4e04742002-12-23 23:49:59 +0000115
Misha Brukmand792c9b2003-07-24 18:17:43 +0000116 /// compileSharedObject - This method creates a SharedObject from a given
Gabor Greif0e535c3c2007-07-04 21:55:50 +0000117 /// BitcodeFile for debugging a code generator.
Chris Lattnerf8a84db2003-10-14 21:09:11 +0000118 ///
Justin Bogner1c039152016-09-06 17:18:22 +0000119 Expected<std::string> compileSharedObject(const std::string &BitcodeFile);
Misha Brukmand792c9b2003-07-24 18:17:43 +0000120
121 /// debugCodeGenerator - This method narrows down a module to a function or
122 /// set of functions, using the CBE as a ``safe'' code generator for other
123 /// functions that are not under consideration.
Justin Bogner1c039152016-09-06 17:18:22 +0000124 Error debugCodeGenerator();
Misha Brukmand792c9b2003-07-24 18:17:43 +0000125
Misha Brukmaneacfd212003-07-28 20:59:16 +0000126 /// isExecutingJIT - Returns true if bugpoint is currently testing the JIT
127 ///
Misha Brukman539f9592003-07-28 19:16:14 +0000128 bool isExecutingJIT();
129
Chris Lattnerfd72bed2004-03-14 20:50:42 +0000130 Module *getProgram() const { return Program; }
131
132 /// swapProgramIn - Set the current module to the specified module, returning
133 /// the old one.
134 Module *swapProgramIn(Module *M) {
135 Module *OldProgram = Program;
136 Program = M;
137 return OldProgram;
138 }
Chris Lattner327019b2004-02-18 21:24:48 +0000139
Dan Gohman414cf502008-12-08 04:02:47 +0000140 AbstractInterpreter *switchToSafeInterpreter() {
Chris Lattnerbf791612004-04-05 22:58:16 +0000141 AbstractInterpreter *Old = Interpreter;
Justin Bogner8d0a0812016-09-02 01:21:37 +0000142 Interpreter = (AbstractInterpreter *)SafeInterpreter;
Chris Lattnerbf791612004-04-05 22:58:16 +0000143 return Old;
144 }
145
Justin Bogner8d0a0812016-09-02 01:21:37 +0000146 void switchToInterpreter(AbstractInterpreter *AI) { Interpreter = AI; }
Misha Brukman650ba8e2005-04-22 00:00:37 +0000147
Chris Lattner327019b2004-02-18 21:24:48 +0000148 /// setNewProgram - If we reduce or update the program somehow, call this
149 /// method to update bugdriver with it. This deletes the old module and sets
150 /// the specified one as the current program.
151 void setNewProgram(Module *M);
152
Justin Bogner1c039152016-09-06 17:18:22 +0000153 /// Try to compile the specified module. This is used for code generation
Nick Lewycky6ba630b2010-04-12 05:08:25 +0000154 /// crash testing.
Justin Bogner1c039152016-09-06 17:18:22 +0000155 Error compileProgram(Module *M) const;
Chris Lattner96d41dd2004-02-18 23:25:22 +0000156
Chris Lattner2fd76cf2004-02-18 21:35:28 +0000157 /// executeProgram - This method runs "Program", capturing the output of the
Nick Lewycky7c167952010-04-14 04:40:31 +0000158 /// program to a file. A recommended filename may be optionally specified.
Chris Lattner2fd76cf2004-02-18 21:35:28 +0000159 ///
Justin Bogner1c039152016-09-06 17:18:22 +0000160 Expected<std::string> executeProgram(const Module *Program,
161 std::string OutputFilename,
162 std::string Bitcode,
163 const std::string &SharedObjects,
164 AbstractInterpreter *AI) const;
Chris Lattner2fd76cf2004-02-18 21:35:28 +0000165
Dan Gohman414cf502008-12-08 04:02:47 +0000166 /// executeProgramSafely - Used to create reference output with the "safe"
Chris Lattner2fd76cf2004-02-18 21:35:28 +0000167 /// backend, if reference output is not provided. If there is a problem with
Nick Lewycky6ba630b2010-04-12 05:08:25 +0000168 /// the code generator (e.g., llc crashes), this will return false and set
169 /// Error.
Chris Lattner2fd76cf2004-02-18 21:35:28 +0000170 ///
Justin Bogner1c039152016-09-06 17:18:22 +0000171 Expected<std::string>
172 executeProgramSafely(const Module *Program,
173 const std::string &OutputFile) const;
Chris Lattner2fd76cf2004-02-18 21:35:28 +0000174
Patrick Jenkinsc46c0382006-08-15 16:40:49 +0000175 /// createReferenceFile - calls compileProgram and then records the output
Justin Bogner8d0a0812016-09-02 01:21:37 +0000176 /// into ReferenceOutputFile. Returns true if reference file created, false
Patrick Jenkinsc46c0382006-08-15 16:40:49 +0000177 /// otherwise. Note: initializeExecutionEnvironment should be called BEFORE
178 /// this function.
179 ///
Justin Bogner1c039152016-09-06 17:18:22 +0000180 Error createReferenceFile(Module *M, const std::string &Filename =
181 "bugpoint.reference.out-%%%%%%%");
Patrick Jenkinsc46c0382006-08-15 16:40:49 +0000182
Chris Lattner2fd76cf2004-02-18 21:35:28 +0000183 /// diffProgram - This method executes the specified module and diffs the
184 /// output against the file specified by ReferenceOutputFile. If the output
Nick Lewycky6ba630b2010-04-12 05:08:25 +0000185 /// is different, 1 is returned. If there is a problem with the code
186 /// generator (e.g., llc crashes), this will return -1 and set Error.
Chris Lattner2fd76cf2004-02-18 21:35:28 +0000187 ///
Justin Bogner1c039152016-09-06 17:18:22 +0000188 Expected<bool> diffProgram(const Module *Program,
189 const std::string &BitcodeFile = "",
190 const std::string &SharedObj = "",
191 bool RemoveBitcode = false) const;
Nick Lewycky6ba630b2010-04-12 05:08:25 +0000192
Rafael Espindola594994a2010-07-28 18:12:30 +0000193 /// EmitProgressBitcode - This function is used to output M to a file named
194 /// "bugpoint-ID.bc".
Chris Lattnerb943b6b2004-02-18 21:50:26 +0000195 ///
Rafael Espindola594994a2010-07-28 18:12:30 +0000196 void EmitProgressBitcode(const Module *M, const std::string &ID,
Rafael Espindola315190b2010-08-05 00:29:04 +0000197 bool NoFlyer = false) const;
Chris Lattnerb943b6b2004-02-18 21:50:26 +0000198
Rafael Espindola28b351a2014-08-26 17:19:03 +0000199 /// This method clones the current Program and deletes the specified
200 /// instruction from the cloned module. It then runs a series of cleanup
201 /// passes (ADCE and SimplifyCFG) to eliminate any code which depends on the
202 /// value. The modified module is then returned.
Chris Lattnerb943b6b2004-02-18 21:50:26 +0000203 ///
Rafael Espindola28b351a2014-08-26 17:19:03 +0000204 std::unique_ptr<Module> deleteInstructionFromProgram(const Instruction *I,
205 unsigned Simp);
Chris Lattnerb943b6b2004-02-18 21:50:26 +0000206
Rafael Espindola28b351a2014-08-26 17:19:03 +0000207 /// This method clones the current Program and performs a series of cleanups
208 /// intended to get rid of extra cruft on the module. If the
209 /// MayModifySemantics argument is true, then the cleanups is allowed to
Chris Lattnerb943b6b2004-02-18 21:50:26 +0000210 /// modify how the code behaves.
211 ///
Rafael Espindola28b351a2014-08-26 17:19:03 +0000212 std::unique_ptr<Module> performFinalCleanups(Module *M,
213 bool MayModifySemantics = false);
Chris Lattnerb943b6b2004-02-18 21:50:26 +0000214
Rafael Espindola28b351a2014-08-26 17:19:03 +0000215 /// Given a module, extract up to one loop from it into a new function. This
216 /// returns null if there are no extractable loops in the program or if the
217 /// loop extractor crashes.
218 std::unique_ptr<Module> extractLoop(Module *M);
Chris Lattner3fe96bc2004-03-14 20:02:07 +0000219
Rafael Espindola28b351a2014-08-26 17:19:03 +0000220 /// Extract all but the specified basic blocks into their own functions. The
221 /// only detail is that M is actually a module cloned from the one the BBs are
222 /// in, so some mapping needs to be performed. If this operation fails for
223 /// some reason (ie the implementation is buggy), this function should return
224 /// null, otherwise it returns a new Module.
225 std::unique_ptr<Module>
226 extractMappedBlocksFromModule(const std::vector<BasicBlock *> &BBs,
227 Module *M);
Chris Lattnera060b102004-05-11 21:54:13 +0000228
Rafael Espindola28b351a2014-08-26 17:19:03 +0000229 /// Carefully run the specified set of pass on the specified/ module,
230 /// returning the transformed module on success, or a null pointer on failure.
Rafael Espindola28b351a2014-08-26 17:19:03 +0000231 std::unique_ptr<Module> runPassesOn(Module *M,
232 const std::vector<std::string> &Passes,
Rafael Espindola28b351a2014-08-26 17:19:03 +0000233 unsigned NumExtraArgs = 0,
234 const char *const *ExtraArgs = nullptr);
Chris Lattner1a5c5402004-03-14 21:17:03 +0000235
Gabor Greif0e535c3c2007-07-04 21:55:50 +0000236 /// runPasses - Run the specified passes on Program, outputting a bitcode
Chris Lattner73a6bdd2002-11-20 22:28:10 +0000237 /// file and writting the filename into OutputFile if successful. If the
238 /// optimizations fail for some reason (optimizer crashes), return true,
Gabor Greif0e535c3c2007-07-04 21:55:50 +0000239 /// otherwise return false. If DeleteOutput is set to true, the bitcode is
Chris Lattner73a6bdd2002-11-20 22:28:10 +0000240 /// deleted on success, and the filename string is undefined. This prints to
Dan Gohmanee051522009-07-16 15:30:09 +0000241 /// outs() a single line message indicating whether compilation was successful
Nick Lewyckyc6243022007-11-14 06:47:06 +0000242 /// or failed, unless Quiet is set. ExtraArgs specifies additional arguments
243 /// to pass to the child bugpoint instance.
Chris Lattner73a6bdd2002-11-20 22:28:10 +0000244 ///
Justin Bogner8d0a0812016-09-02 01:21:37 +0000245 bool runPasses(Module *Program, const std::vector<std::string> &PassesToRun,
Chris Lattnerd4e04742002-12-23 23:49:59 +0000246 std::string &OutputFilename, bool DeleteOutput = false,
Nick Lewyckyc6243022007-11-14 06:47:06 +0000247 bool Quiet = false, unsigned NumExtraArgs = 0,
Justin Bogner8d0a0812016-09-02 01:21:37 +0000248 const char *const *ExtraArgs = nullptr) const;
Philip Reamese5b56022016-06-29 03:01:13 +0000249
250 /// runPasses - Just like the method above, but this just returns true or
251 /// false indicating whether or not the optimizer crashed on the specified
252 /// input (true = crashed). Does not produce any output.
253 ///
Justin Bogner8d0a0812016-09-02 01:21:37 +0000254 bool runPasses(Module *M, const std::vector<std::string> &PassesToRun) const {
Philip Reamese5b56022016-06-29 03:01:13 +0000255 std::string Filename;
256 return runPasses(M, PassesToRun, Filename, true);
257 }
Justin Bogner8d0a0812016-09-02 01:21:37 +0000258
Justin Bogner1c039152016-09-06 17:18:22 +0000259 /// Take the specified pass list and create different combinations of passes
260 /// to compile the program with. Compile the program with each set and mark
261 /// test to see if it compiled correctly. If the passes compiled correctly
262 /// output nothing and rearrange the passes into a new order. If the passes
263 /// did not compile correctly, output the command required to recreate the
264 /// failure.
265 Error runManyPasses(const std::vector<std::string> &AllPasses);
Chris Lattner95053a92004-04-05 22:01:48 +0000266
Chris Lattnerfd72bed2004-03-14 20:50:42 +0000267 /// writeProgramToFile - This writes the current "Program" to the named
Gabor Greif0e535c3c2007-07-04 21:55:50 +0000268 /// bitcode file. If an error occurs, true is returned.
Chris Lattnerfd72bed2004-03-14 20:50:42 +0000269 ///
Rafael Espindola594994a2010-07-28 18:12:30 +0000270 bool writeProgramToFile(const std::string &Filename, const Module *M) const;
Rafael Espindola302c0da2013-06-18 15:29:32 +0000271 bool writeProgramToFile(const std::string &Filename, int FD,
272 const Module *M) const;
Chris Lattner73a6bdd2002-11-20 22:28:10 +0000273
Chris Lattner95053a92004-04-05 22:01:48 +0000274private:
Chris Lattnerd4e04742002-12-23 23:49:59 +0000275 /// initializeExecutionEnvironment - This method is used to set up the
276 /// environment for executing LLVM programs.
277 ///
Justin Bogner1c039152016-09-06 17:18:22 +0000278 Error initializeExecutionEnvironment();
Chris Lattner73a6bdd2002-11-20 22:28:10 +0000279};
280
Rafael Espindola28b351a2014-08-26 17:19:03 +0000281/// Given a bitcode or assembly input filename, parse and return it, or return
282/// null if not possible.
Chris Lattnerfd72bed2004-03-14 20:50:42 +0000283///
Rafael Espindola28b351a2014-08-26 17:19:03 +0000284std::unique_ptr<Module> parseInputFile(StringRef InputFilename,
285 LLVMContext &ctxt);
Chris Lattnerfd72bed2004-03-14 20:50:42 +0000286
Chris Lattner16a41312003-04-24 17:02:17 +0000287/// getPassesString - Turn a list of passes into a string which indicates the
288/// command line options that must be passed to add the passes.
289///
Rafael Espindola33e81a82010-08-08 03:55:08 +0000290std::string getPassesString(const std::vector<std::string> &Passes);
Chris Lattner16a41312003-04-24 17:02:17 +0000291
Chris Lattnerfd72bed2004-03-14 20:50:42 +0000292/// PrintFunctionList - prints out list of problematic functions
293///
Justin Bogner8d0a0812016-09-02 01:21:37 +0000294void PrintFunctionList(const std::vector<Function *> &Funcs);
Chris Lattnerfd72bed2004-03-14 20:50:42 +0000295
Bill Wendling3f833432006-10-25 18:36:14 +0000296/// PrintGlobalVariableList - prints out list of problematic global variables
297///
Justin Bogner8d0a0812016-09-02 01:21:37 +0000298void PrintGlobalVariableList(const std::vector<GlobalVariable *> &GVs);
Bill Wendling3f833432006-10-25 18:36:14 +0000299
Hal Finkel28ad2b42015-11-26 19:23:49 +0000300// DeleteGlobalInitializer - "Remove" the global variable by deleting its
301// initializer, making it external.
302//
303void DeleteGlobalInitializer(GlobalVariable *GV);
304
Chris Lattner1d080f22003-04-24 22:24:58 +0000305// DeleteFunctionBody - "Remove" the function by deleting all of it's basic
306// blocks, making it external.
307//
308void DeleteFunctionBody(Function *F);
309
Rafael Espindola50102c22015-12-09 00:34:10 +0000310/// Given a module and a list of functions in the module, split the functions
311/// OUT of the specified module, and place them in the new module.
312std::unique_ptr<Module>
313SplitFunctionsOutOfModule(Module *M, const std::vector<Function *> &F,
314 ValueToValueMapTy &VMap);
Chris Lattner567543f2004-03-14 19:27:19 +0000315
Brian Gaeke960707c2003-11-11 22:41:34 +0000316} // End llvm namespace
317
Chris Lattner73a6bdd2002-11-20 22:28:10 +0000318#endif