Lines Matching +full:on +full:- +full:module
1 //===- BugDriver.h - Top-Level BugPoint class -------------------*- C++ -*-===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
11 // main driver class that invokes all sub-functionality.
13 //===----------------------------------------------------------------------===//
28 class Module;
40 /// BugpointIsInterrupted - Set to true when the user presses ctrl-c.
48 std::unique_ptr<Module> Program; // The raw program, linked together
81 /// run - The top level method that is invoked after all of the instance
87 /// debugOptimizerCrash - This method is called when some optimizer pass
88 /// crashes on input. It attempts to prune down the testcase to something
93 /// debugCodeGeneratorCrash - This method is called when the code generator
94 /// crashes on an input. It attempts to reduce the input as much as possible
98 /// debugMiscompilation - This method is used when the passes selected are not
103 /// compileSharedObject - This method creates a SharedObject from a given
108 /// debugCodeGenerator - This method narrows down a module to a function or
113 /// isExecutingJIT - Returns true if bugpoint is currently testing the JIT
117 Module &getProgram() const { return *Program; }
119 /// Set the current module to the specified module, returning the old one.
120 std::unique_ptr<Module> swapProgramIn(std::unique_ptr<Module> M);
131 /// bugdriver with it. This deletes the old module and sets the specified one
133 void setNewProgram(std::unique_ptr<Module> M);
135 /// Try to compile the specified module. This is used for code generation
137 Error compileProgram(Module &M) const;
141 Expected<std::string> executeProgram(const Module &Program,
151 executeProgramSafely(const Module &Program,
157 Error createReferenceFile(Module &M, const std::string &Filename =
158 "bugpoint.reference.out-%%%%%%%");
160 /// This method executes the specified module and diffs the output against the
163 /// crashes), this will return -1 and set Error.
164 Expected<bool> diffProgram(const Module &Program,
169 /// This function is used to output M to a file named "bugpoint-ID.bc".
170 void EmitProgressBitcode(const Module &M, const std::string &ID,
174 /// instruction from the cloned module. It then runs a series of cleanup
175 /// passes (ADCE and SimplifyCFG) to eliminate any code which depends on the
176 /// value. The modified module is then returned.
178 std::unique_ptr<Module> deleteInstructionFromProgram(const Instruction *I,
182 /// intended to get rid of extra cruft on the module. If the
186 std::unique_ptr<Module> performFinalCleanups(std::unique_ptr<Module> M,
189 /// Given a module, extract up to one loop from it into a new function. This
192 std::unique_ptr<Module> extractLoop(Module *M);
195 /// only detail is that M is actually a module cloned from the one the BBs are
198 /// null, otherwise it returns a new Module.
199 std::unique_ptr<Module>
201 Module *M);
203 /// Carefully run the specified set of pass on the specified/ module,
204 /// returning the transformed module on success, or a null pointer on failure.
205 std::unique_ptr<Module> runPassesOn(Module *M,
209 /// runPasses - Run the specified passes on Program, outputting a bitcode
213 /// deleted on success, and the filename string is undefined. This prints to
218 bool runPasses(Module &Program, const std::vector<std::string> &PassesToRun,
223 /// runPasses - Just like the method above, but this just returns true or
224 /// false indicating whether or not the optimizer crashed on the specified
227 bool runPasses(Module &M, const std::vector<std::string> &PassesToRun) const {
242 bool writeProgramToFile(const std::string &Filename, const Module &M) const;
244 const Module &M) const;
245 bool writeProgramToFile(int FD, const Module &M) const;
248 /// initializeExecutionEnvironment - This method is used to set up the
262 std::unique_ptr<Module> parseInputFile(StringRef InputFilename,
265 /// getPassesString - Turn a list of passes into a string which indicates the
270 /// PrintFunctionList - prints out list of problematic functions
274 /// PrintGlobalVariableList - prints out list of problematic global variables
278 // DeleteGlobalInitializer - "Remove" the global variable by deleting its
283 // DeleteFunctionBody - "Remove" the function by deleting all of it's basic
288 /// Given a module and a list of functions in the module, split the functions
289 /// OUT of the specified module, and place them in the new module.
290 std::unique_ptr<Module>
291 SplitFunctionsOutOfModule(Module *M, const std::vector<Function *> &F,