mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21428 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
//===- BugDriver.cpp - Top-Level BugPoint class implementation ------------===//
|
||||
//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file was developed by the LLVM research group and is distributed under
|
||||
// the University of Illinois Open Source License. See LICENSE.TXT for details.
|
||||
//
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This class contains all of the shared state and information that is used by
|
||||
@@ -35,7 +35,7 @@ namespace {
|
||||
// otherwise the raw input run through an interpreter is used as the reference
|
||||
// source.
|
||||
//
|
||||
cl::opt<std::string>
|
||||
cl::opt<std::string>
|
||||
OutputFile("output", cl::desc("Specify a reference program output "
|
||||
"(for miscompilation detection)"));
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
//===- BugDriver.h - Top-Level BugPoint class -------------------*- C++ -*-===//
|
||||
//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file was developed by the LLVM research group and is distributed under
|
||||
// the University of Illinois Open Source License. See LICENSE.TXT for details.
|
||||
//
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This class contains all of the shared state and information that is used by
|
||||
@@ -76,7 +76,7 @@ public:
|
||||
/// reasonable, and figure out exactly which pass is crashing.
|
||||
///
|
||||
bool debugOptimizerCrash();
|
||||
|
||||
|
||||
/// debugCodeGeneratorCrash - This method is called when the code generator
|
||||
/// crashes on an input. It attempts to reduce the input as much as possible
|
||||
/// while still causing the code generator to crash.
|
||||
@@ -139,7 +139,7 @@ public:
|
||||
void switchToInterpreter(AbstractInterpreter *AI) {
|
||||
Interpreter = AI;
|
||||
}
|
||||
|
||||
|
||||
/// setNewProgram - If we reduce or update the program somehow, call this
|
||||
/// method to update bugdriver with it. This deletes the old module and sets
|
||||
/// the specified one as the current program.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
//===- CrashDebugger.cpp - Debug compilation crashes ----------------------===//
|
||||
//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file was developed by the LLVM research group and is distributed under
|
||||
// the University of Illinois Open Source License. See LICENSE.TXT for details.
|
||||
//
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This file defines the bugpoint internals that narrow down compilation crashes
|
||||
@@ -36,7 +36,7 @@ namespace llvm {
|
||||
BugDriver &BD;
|
||||
public:
|
||||
ReducePassList(BugDriver &bd) : BD(bd) {}
|
||||
|
||||
|
||||
// doTest - Return true iff running the "removed" passes succeeds, and
|
||||
// running the "Kept" passes fail when run on the output of the "removed"
|
||||
// passes. If we return true, we update the current module of bugpoint.
|
||||
@@ -72,7 +72,7 @@ ReducePassList::doTest(std::vector<const PassInfo*> &Prefix,
|
||||
|
||||
std::cout << "Checking to see if these passes crash: "
|
||||
<< getPassesString(Suffix) << ": ";
|
||||
|
||||
|
||||
if (BD.runPasses(Suffix)) {
|
||||
delete OrigProgram; // The suffix crashes alone...
|
||||
return KeepSuffix;
|
||||
@@ -94,7 +94,7 @@ namespace llvm {
|
||||
ReduceCrashingFunctions(BugDriver &bd,
|
||||
bool (*testFn)(BugDriver &, Module *))
|
||||
: BD(bd), TestFn(testFn) {}
|
||||
|
||||
|
||||
virtual TestResult doTest(std::vector<Function*> &Prefix,
|
||||
std::vector<Function*> &Kept) {
|
||||
if (!Kept.empty() && TestFuncs(Kept))
|
||||
@@ -103,7 +103,7 @@ namespace llvm {
|
||||
return KeepPrefix;
|
||||
return NoFailure;
|
||||
}
|
||||
|
||||
|
||||
bool TestFuncs(std::vector<Function*> &Prefix);
|
||||
};
|
||||
}
|
||||
@@ -111,11 +111,11 @@ namespace llvm {
|
||||
bool ReduceCrashingFunctions::TestFuncs(std::vector<Function*> &Funcs) {
|
||||
// Clone the program to try hacking it apart...
|
||||
Module *M = CloneModule(BD.getProgram());
|
||||
|
||||
|
||||
// Convert list to set for fast lookup...
|
||||
std::set<Function*> Functions;
|
||||
for (unsigned i = 0, e = Funcs.size(); i != e; ++i) {
|
||||
Function *CMF = M->getFunction(Funcs[i]->getName(),
|
||||
Function *CMF = M->getFunction(Funcs[i]->getName(),
|
||||
Funcs[i]->getFunctionType());
|
||||
assert(CMF && "Function not in module?!");
|
||||
Functions.insert(CMF);
|
||||
@@ -157,7 +157,7 @@ namespace {
|
||||
public:
|
||||
ReduceCrashingBlocks(BugDriver &bd, bool (*testFn)(BugDriver &, Module *))
|
||||
: BD(bd), TestFn(testFn) {}
|
||||
|
||||
|
||||
virtual TestResult doTest(std::vector<const BasicBlock*> &Prefix,
|
||||
std::vector<const BasicBlock*> &Kept) {
|
||||
if (!Kept.empty() && TestBlocks(Kept))
|
||||
@@ -166,7 +166,7 @@ namespace {
|
||||
return KeepPrefix;
|
||||
return NoFailure;
|
||||
}
|
||||
|
||||
|
||||
bool TestBlocks(std::vector<const BasicBlock*> &Prefix);
|
||||
};
|
||||
}
|
||||
@@ -174,7 +174,7 @@ namespace {
|
||||
bool ReduceCrashingBlocks::TestBlocks(std::vector<const BasicBlock*> &BBs) {
|
||||
// Clone the program to try hacking it apart...
|
||||
Module *M = CloneModule(BD.getProgram());
|
||||
|
||||
|
||||
// Convert list to set for fast lookup...
|
||||
std::set<BasicBlock*> Blocks;
|
||||
for (unsigned i = 0, e = BBs.size(); i != e; ++i) {
|
||||
@@ -214,7 +214,7 @@ bool ReduceCrashingBlocks::TestBlocks(std::vector<const BasicBlock*> &BBs) {
|
||||
|
||||
// Delete the old terminator instruction...
|
||||
BB->getInstList().pop_back();
|
||||
|
||||
|
||||
// Add a new return instruction of the appropriate type...
|
||||
const Type *RetTy = BB->getParent()->getReturnType();
|
||||
new ReturnInst(RetTy == Type::VoidTy ? 0 :
|
||||
@@ -274,7 +274,7 @@ static bool DebugACrash(BugDriver &BD, bool (*TestFn)(BugDriver &, Module *)) {
|
||||
I->setLinkage(GlobalValue::ExternalLinkage);
|
||||
DeletedInit = true;
|
||||
}
|
||||
|
||||
|
||||
if (!DeletedInit) {
|
||||
delete M; // No change made...
|
||||
} else {
|
||||
@@ -290,7 +290,7 @@ static bool DebugACrash(BugDriver &BD, bool (*TestFn)(BugDriver &, Module *)) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Now try to reduce the number of functions in the module to something small.
|
||||
std::vector<Function*> Functions;
|
||||
for (Module::iterator I = BD.getProgram()->begin(),
|
||||
@@ -343,7 +343,7 @@ static bool DebugACrash(BugDriver &BD, bool (*TestFn)(BugDriver &, Module *)) {
|
||||
//
|
||||
unsigned InstructionsToSkipBeforeDeleting = 0;
|
||||
TryAgain:
|
||||
|
||||
|
||||
// Loop over all of the (non-terminator) instructions remaining in the
|
||||
// function, attempting to delete them.
|
||||
unsigned CurInstructionNum = 0;
|
||||
@@ -359,7 +359,7 @@ static bool DebugACrash(BugDriver &BD, bool (*TestFn)(BugDriver &, Module *)) {
|
||||
} else {
|
||||
std::cout << "Checking instruction '" << I->getName() << "': ";
|
||||
Module *M = BD.deleteInstructionFromProgram(I, Simplification);
|
||||
|
||||
|
||||
// Find out if the pass still crashes on this pass...
|
||||
if (TestFn(BD, M)) {
|
||||
// Yup, it does, we delete the old module, and continue trying
|
||||
@@ -369,7 +369,7 @@ static bool DebugACrash(BugDriver &BD, bool (*TestFn)(BugDriver &, Module *)) {
|
||||
InstructionsToSkipBeforeDeleting = CurInstructionNum;
|
||||
goto TryAgain; // I wish I had a multi-level break here!
|
||||
}
|
||||
|
||||
|
||||
// This pass didn't crash without this instruction, try the next
|
||||
// one.
|
||||
delete M;
|
||||
@@ -379,14 +379,14 @@ static bool DebugACrash(BugDriver &BD, bool (*TestFn)(BugDriver &, Module *)) {
|
||||
InstructionsToSkipBeforeDeleting = 0;
|
||||
goto TryAgain;
|
||||
}
|
||||
|
||||
|
||||
} while (Simplification);
|
||||
|
||||
// Try to clean up the testcase by running funcresolve and globaldce...
|
||||
std::cout << "\n*** Attempting to perform final cleanups: ";
|
||||
Module *M = CloneModule(BD.getProgram());
|
||||
M = BD.performFinalCleanups(M, true);
|
||||
|
||||
|
||||
// Find out if the pass still crashes on the cleaned up program...
|
||||
if (TestFn(BD, M)) {
|
||||
BD.setNewProgram(M); // Yup, it does, keep the reduced version...
|
||||
@@ -398,7 +398,7 @@ static bool DebugACrash(BugDriver &BD, bool (*TestFn)(BugDriver &, Module *)) {
|
||||
if (AnyReduction)
|
||||
BD.EmitProgressBytecode("reduced-simplified");
|
||||
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool TestForOptimizerCrash(BugDriver &BD, Module *M) {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
//===- ExecutionDriver.cpp - Allow execution of LLVM program --------------===//
|
||||
//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file was developed by the LLVM research group and is distributed under
|
||||
// the University of Illinois Open Source License. See LICENSE.TXT for details.
|
||||
//
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This file contains code used to execute the program utilizing one of the
|
||||
@@ -276,7 +276,7 @@ std::string BugDriver::compileSharedObject(const std::string &BytecodeFile) {
|
||||
#endif
|
||||
|
||||
std::string SharedObjectFile;
|
||||
if (gcc->MakeSharedObject(OutputCFile.toString(), GCC::CFile,
|
||||
if (gcc->MakeSharedObject(OutputCFile.toString(), GCC::CFile,
|
||||
SharedObjectFile))
|
||||
exit(1);
|
||||
|
||||
@@ -303,7 +303,7 @@ bool BugDriver::diffProgram(const std::string &BytecodeFile,
|
||||
// If we're checking the program exit code, assume anything nonzero is bad.
|
||||
if (CheckProgramExitCode && ProgramExitedNonzero) {
|
||||
Output.destroyFile();
|
||||
if (RemoveBytecode)
|
||||
if (RemoveBytecode)
|
||||
sys::Path(BytecodeFile).destroyFile();
|
||||
return true;
|
||||
}
|
||||
@@ -319,7 +319,7 @@ bool BugDriver::diffProgram(const std::string &BytecodeFile,
|
||||
}
|
||||
FilesDifferent = true;
|
||||
}
|
||||
|
||||
|
||||
// Remove the generated output.
|
||||
Output.destroyFile();
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
//===- ExtractFunction.cpp - Extract a function from Program --------------===//
|
||||
//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file was developed by the LLVM research group and is distributed under
|
||||
// the University of Illinois Open Source License. See LICENSE.TXT for details.
|
||||
//
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This file implements several methods that are used to extract functions,
|
||||
@@ -104,7 +104,7 @@ Module *BugDriver::performFinalCleanups(Module *M, bool MayModifySemantics) {
|
||||
// Make all functions external, so GlobalDCE doesn't delete them...
|
||||
for (Module::iterator I = M->begin(), E = M->end(); I != E; ++I)
|
||||
I->setLinkage(GlobalValue::ExternalLinkage);
|
||||
|
||||
|
||||
std::vector<const PassInfo*> CleanupPasses;
|
||||
CleanupPasses.push_back(getPI(createFunctionResolvingPass()));
|
||||
CleanupPasses.push_back(getPI(createGlobalDCEPass()));
|
||||
@@ -155,7 +155,7 @@ Module *BugDriver::ExtractLoop(Module *M) {
|
||||
for (unsigned i = 0, e = M->size(); i != e; ++i)
|
||||
++MI;
|
||||
}
|
||||
|
||||
|
||||
return NewM;
|
||||
}
|
||||
|
||||
@@ -251,7 +251,7 @@ bool BlockExtractorPass::runOnModule(Module &M) {
|
||||
|
||||
for (unsigned i = 0, e = BlocksToExtract.size(); i != e; ++i)
|
||||
ExtractBasicBlock(BlocksToExtract[i]);
|
||||
|
||||
|
||||
return !BlocksToExtract.empty();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
//===- ListReducer.h - Trim down list while retaining property --*- C++ -*-===//
|
||||
//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file was developed by the LLVM research group and is distributed under
|
||||
// the University of Illinois Open Source License. See LICENSE.TXT for details.
|
||||
//
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This class is to be used as a base class for operations that want to zero in
|
||||
@@ -48,7 +48,7 @@ struct ListReducer {
|
||||
case KeepPrefix:
|
||||
if (TheList.size() == 1) // we are done, it's the base case and it fails
|
||||
return true;
|
||||
else
|
||||
else
|
||||
break; // there's definitely an error, but we need to narrow it down
|
||||
|
||||
case KeepSuffix:
|
||||
@@ -107,7 +107,7 @@ struct ListReducer {
|
||||
Changed = true;
|
||||
}
|
||||
}
|
||||
// This can take a long time if left uncontrolled. For now, don't
|
||||
// This can take a long time if left uncontrolled. For now, don't
|
||||
// iterate.
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
//===- Miscompilation.cpp - Debug program miscompilations -----------------===//
|
||||
//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file was developed by the LLVM research group and is distributed under
|
||||
// the University of Illinois Open Source License. See LICENSE.TXT for details.
|
||||
//
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This file implements optimizer and code generation miscompilation debugging
|
||||
@@ -37,7 +37,7 @@ namespace {
|
||||
BugDriver &BD;
|
||||
public:
|
||||
ReduceMiscompilingPasses(BugDriver &bd) : BD(bd) {}
|
||||
|
||||
|
||||
virtual TestResult doTest(std::vector<const PassInfo*> &Prefix,
|
||||
std::vector<const PassInfo*> &Suffix);
|
||||
};
|
||||
@@ -56,7 +56,7 @@ ReduceMiscompilingPasses::doTest(std::vector<const PassInfo*> &Prefix,
|
||||
|
||||
std::string BytecodeResult;
|
||||
if (BD.runPasses(Suffix, BytecodeResult, false/*delete*/, true/*quiet*/)) {
|
||||
std::cerr << " Error running this sequence of passes"
|
||||
std::cerr << " Error running this sequence of passes"
|
||||
<< " on the input program!\n";
|
||||
BD.setPassesToRun(Suffix);
|
||||
BD.EmitProgressBytecode("pass-error", false);
|
||||
@@ -89,7 +89,7 @@ ReduceMiscompilingPasses::doTest(std::vector<const PassInfo*> &Prefix,
|
||||
// prefix passes, then discard the prefix passes.
|
||||
//
|
||||
if (BD.runPasses(Prefix, BytecodeResult, false/*delete*/, true/*quiet*/)) {
|
||||
std::cerr << " Error running this sequence of passes"
|
||||
std::cerr << " Error running this sequence of passes"
|
||||
<< " on the input program!\n";
|
||||
BD.setPassesToRun(Prefix);
|
||||
BD.EmitProgressBytecode("pass-error", false);
|
||||
@@ -118,14 +118,14 @@ ReduceMiscompilingPasses::doTest(std::vector<const PassInfo*> &Prefix,
|
||||
// Don't check if there are no passes in the suffix.
|
||||
if (Suffix.empty())
|
||||
return NoFailure;
|
||||
|
||||
|
||||
std::cout << "Checking to see if '" << getPassesString(Suffix)
|
||||
<< "' passes compile correctly after the '"
|
||||
<< getPassesString(Prefix) << "' passes: ";
|
||||
|
||||
Module *OriginalInput = BD.swapProgramIn(PrefixOutput);
|
||||
if (BD.runPasses(Suffix, BytecodeResult, false/*delete*/, true/*quiet*/)) {
|
||||
std::cerr << " Error running this sequence of passes"
|
||||
std::cerr << " Error running this sequence of passes"
|
||||
<< " on the input program!\n";
|
||||
BD.setPassesToRun(Suffix);
|
||||
BD.EmitProgressBytecode("pass-error", false);
|
||||
@@ -153,7 +153,7 @@ namespace {
|
||||
ReduceMiscompilingFunctions(BugDriver &bd,
|
||||
bool (*F)(BugDriver &, Module *, Module *))
|
||||
: BD(bd), TestFn(F) {}
|
||||
|
||||
|
||||
virtual TestResult doTest(std::vector<Function*> &Prefix,
|
||||
std::vector<Function*> &Suffix) {
|
||||
if (!Suffix.empty() && TestFuncs(Suffix))
|
||||
@@ -162,7 +162,7 @@ namespace {
|
||||
return KeepPrefix;
|
||||
return NoFailure;
|
||||
}
|
||||
|
||||
|
||||
bool TestFuncs(const std::vector<Function*> &Prefix);
|
||||
};
|
||||
}
|
||||
@@ -280,7 +280,7 @@ static bool ExtractLoops(BugDriver &BD,
|
||||
return MadeChange;
|
||||
}
|
||||
BD.switchToInterpreter(AI);
|
||||
|
||||
|
||||
std::cout << " Testing after loop extraction:\n";
|
||||
// Clone modules, the tester function will free them.
|
||||
Module *TOLEBackup = CloneModule(ToOptimizeLoopExtracted);
|
||||
@@ -343,7 +343,7 @@ namespace {
|
||||
bool (*F)(BugDriver &, Module *, Module *),
|
||||
const std::vector<Function*> &Fns)
|
||||
: BD(bd), TestFn(F), FunctionsBeingTested(Fns) {}
|
||||
|
||||
|
||||
virtual TestResult doTest(std::vector<BasicBlock*> &Prefix,
|
||||
std::vector<BasicBlock*> &Suffix) {
|
||||
if (!Suffix.empty() && TestFuncs(Suffix))
|
||||
@@ -352,7 +352,7 @@ namespace {
|
||||
return KeepPrefix;
|
||||
return NoFailure;
|
||||
}
|
||||
|
||||
|
||||
bool TestFuncs(const std::vector<BasicBlock*> &Prefix);
|
||||
};
|
||||
}
|
||||
@@ -506,7 +506,7 @@ DebugAMiscompilation(BugDriver &BD,
|
||||
|
||||
// Do the reduction...
|
||||
ReduceMiscompilingFunctions(BD, TestFn).reduceList(MiscompiledFunctions);
|
||||
|
||||
|
||||
std::cout << "\n*** The following function"
|
||||
<< (MiscompiledFunctions.size() == 1 ? " is" : "s are")
|
||||
<< " being miscompiled: ";
|
||||
@@ -525,7 +525,7 @@ DebugAMiscompilation(BugDriver &BD,
|
||||
|
||||
// Do the reduction...
|
||||
ReduceMiscompilingFunctions(BD, TestFn).reduceList(MiscompiledFunctions);
|
||||
|
||||
|
||||
std::cout << "\n*** The following function"
|
||||
<< (MiscompiledFunctions.size() == 1 ? " is" : "s are")
|
||||
<< " being miscompiled: ";
|
||||
@@ -586,7 +586,7 @@ bool BugDriver::debugMiscompilation() {
|
||||
ToNotOptimize = swapProgramIn(ToNotOptimize);
|
||||
EmitProgressBytecode("tonotoptimize", true);
|
||||
setNewProgram(ToNotOptimize); // Delete hacked module.
|
||||
|
||||
|
||||
std::cout << " Portion that is input to optimizer: ";
|
||||
ToOptimize = swapProgramIn(ToOptimize);
|
||||
EmitProgressBytecode("tooptimize");
|
||||
@@ -614,12 +614,12 @@ static void CleanupAndPrepareModules(BugDriver &BD, Module *&Test,
|
||||
// Rename it
|
||||
oldMain->setName("llvm_bugpoint_old_main");
|
||||
// Create a NEW `main' function with same type in the test module.
|
||||
Function *newMain = new Function(oldMain->getFunctionType(),
|
||||
Function *newMain = new Function(oldMain->getFunctionType(),
|
||||
GlobalValue::ExternalLinkage,
|
||||
"main", Test);
|
||||
// Create an `oldmain' prototype in the test module, which will
|
||||
// corresponds to the real main function in the same module.
|
||||
Function *oldMainProto = new Function(oldMain->getFunctionType(),
|
||||
Function *oldMainProto = new Function(oldMain->getFunctionType(),
|
||||
GlobalValue::ExternalLinkage,
|
||||
oldMain->getName(), Test);
|
||||
// Set up and remember the argument list for the main function.
|
||||
@@ -634,7 +634,7 @@ static void CleanupAndPrepareModules(BugDriver &BD, Module *&Test,
|
||||
// Call the old main function and return its result
|
||||
BasicBlock *BB = new BasicBlock("entry", newMain);
|
||||
CallInst *call = new CallInst(oldMainProto, args, "", BB);
|
||||
|
||||
|
||||
// If the type of old function wasn't void, return value of call
|
||||
new ReturnInst(call, BB);
|
||||
}
|
||||
@@ -643,14 +643,14 @@ static void CleanupAndPrepareModules(BugDriver &BD, Module *&Test,
|
||||
// module cannot directly reference any functions defined in the test
|
||||
// module. Instead, we use a JIT API call to dynamically resolve the
|
||||
// symbol.
|
||||
|
||||
|
||||
// Add the resolver to the Safe module.
|
||||
// Prototype: void *getPointerToNamedFunction(const char* Name)
|
||||
Function *resolverFunc =
|
||||
Function *resolverFunc =
|
||||
Safe->getOrInsertFunction("getPointerToNamedFunction",
|
||||
PointerType::get(Type::SByteTy),
|
||||
PointerType::get(Type::SByteTy), 0);
|
||||
|
||||
|
||||
// Use the function we just added to get addresses of functions we need.
|
||||
for (Module::iterator F = Safe->begin(), E = Safe->end(); F != E; ++F) {
|
||||
if (F->isExternal() && !F->use_empty() && &*F != resolverFunc &&
|
||||
@@ -663,7 +663,7 @@ static void CleanupAndPrepareModules(BugDriver &BD, Module *&Test,
|
||||
Constant *InitArray = ConstantArray::get(F->getName());
|
||||
GlobalVariable *funcName =
|
||||
new GlobalVariable(InitArray->getType(), true /*isConstant*/,
|
||||
GlobalValue::InternalLinkage, InitArray,
|
||||
GlobalValue::InternalLinkage, InitArray,
|
||||
F->getName() + "_name", Safe);
|
||||
|
||||
// 2. Use `GetElementPtr *funcName, 0, 0' to convert the string to an
|
||||
@@ -690,7 +690,7 @@ static void CleanupAndPrepareModules(BugDriver &BD, Module *&Test,
|
||||
// Resolve the call to function F via the JIT API:
|
||||
//
|
||||
// call resolver(GetElementPtr...)
|
||||
CallInst *resolve = new CallInst(resolverFunc, ResolverArgs,
|
||||
CallInst *resolve = new CallInst(resolverFunc, ResolverArgs,
|
||||
"resolver");
|
||||
Header->getInstList().push_back(resolve);
|
||||
// cast the result from the resolver to correctly-typed function
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
//===- OptimizerDriver.cpp - Allow BugPoint to run passes safely ----------===//
|
||||
//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file was developed by the LLVM research group and is distributed under
|
||||
// the University of Illinois Open Source License. See LICENSE.TXT for details.
|
||||
//
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This file defines an interface that allows bugpoint to run various passes
|
||||
@@ -195,7 +195,7 @@ Module *BugDriver::runPassesOn(Module *M,
|
||||
std::string BytecodeResult;
|
||||
if (runPasses(Passes, BytecodeResult, false/*delete*/, true/*quiet*/)) {
|
||||
if (AutoDebugCrashes) {
|
||||
std::cerr << " Error running this sequence of passes"
|
||||
std::cerr << " Error running this sequence of passes"
|
||||
<< " on the input program!\n";
|
||||
delete OldProgram;
|
||||
EmitProgressBytecode("pass-error", false);
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
//===- TestPasses.cpp - "buggy" passes used to test bugpoint --------------===//
|
||||
//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file was developed by the LLVM research group and is distributed under
|
||||
// the University of Illinois Open Source License. See LICENSE.TXT for details.
|
||||
//
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This file contains "buggy" passes that are used to test bugpoint, to check
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
//===- bugpoint.cpp - The LLVM Bugpoint utility ---------------------------===//
|
||||
//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file was developed by the LLVM research group and is distributed under
|
||||
// the University of Illinois Open Source License. See LICENSE.TXT for details.
|
||||
//
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This program is an automated compiler debugger tool. It is used to narrow
|
||||
|
||||
Reference in New Issue
Block a user