Fix whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128631 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Michael J. Spencer
2011-03-31 13:06:39 +00:00
parent c9c08fb3a7
commit 56584fcbfd
3 changed files with 24 additions and 24 deletions

View File

@ -22,7 +22,7 @@ namespace llvm {
/// DiffFilesWithTolerance - Compare the two files specified, returning 0 if /// DiffFilesWithTolerance - Compare the two files specified, returning 0 if
/// the files match, 1 if they are different, and 2 if there is a file error. /// the files match, 1 if they are different, and 2 if there is a file error.
/// This function allows you to specify an absolete and relative FP error that /// This function allows you to specify an absolute and relative FP error that
/// is allowed to exist. If you specify a string to fill in for the error /// is allowed to exist. If you specify a string to fill in for the error
/// option, it will set the string to an error message if an error occurs, or /// option, it will set the string to an error message if an error occurs, or
/// if the files are different. /// if the files are different.

View File

@ -71,7 +71,7 @@ BugDriver::BugDriver(const char *toolname, bool find_bugs,
LLVMContext& ctxt) LLVMContext& ctxt)
: Context(ctxt), ToolName(toolname), ReferenceOutputFile(OutputFile), : Context(ctxt), ToolName(toolname), ReferenceOutputFile(OutputFile),
Program(0), Interpreter(0), SafeInterpreter(0), gcc(0), Program(0), Interpreter(0), SafeInterpreter(0), gcc(0),
run_find_bugs(find_bugs), Timeout(timeout), run_find_bugs(find_bugs), Timeout(timeout),
MemoryLimit(memlimit), UseValgrind(use_valgrind) {} MemoryLimit(memlimit), UseValgrind(use_valgrind) {}
BugDriver::~BugDriver() { BugDriver::~BugDriver() {
@ -97,7 +97,7 @@ Module *llvm::ParseInputFile(const std::string &Filename,
if (TheTriple.getTriple().empty()) if (TheTriple.getTriple().empty())
TheTriple.setTriple(sys::getHostTriple()); TheTriple.setTriple(sys::getHostTriple());
TargetTriple.setTriple(TheTriple.getTriple()); TargetTriple.setTriple(TheTriple.getTriple());
} }
@ -118,7 +118,7 @@ bool BugDriver::addSources(const std::vector<std::string> &Filenames) {
// Load the first input file. // Load the first input file.
Program = ParseInputFile(Filenames[0], Context); Program = ParseInputFile(Filenames[0], Context);
if (Program == 0) return true; if (Program == 0) return true;
outs() << "Read input file : '" << Filenames[0] << "'\n"; outs() << "Read input file : '" << Filenames[0] << "'\n";
for (unsigned i = 1, e = Filenames.size(); i != e; ++i) { for (unsigned i = 1, e = Filenames.size(); i != e; ++i) {
@ -152,12 +152,12 @@ bool BugDriver::run(std::string &ErrMsg) {
return runManyPasses(PassesToRun, ErrMsg); return runManyPasses(PassesToRun, ErrMsg);
} }
// If we're not running as a child, the first thing that we must do is // If we're not running as a child, the first thing that we must do is
// determine what the problem is. Does the optimization series crash the // determine what the problem is. Does the optimization series crash the
// compiler, or does it produce illegal code? We make the top-level // compiler, or does it produce illegal code? We make the top-level
// decision by trying to run all of the passes on the the input program, // decision by trying to run all of the passes on the the input program,
// which should generate a bitcode file. If it does generate a bitcode // which should generate a bitcode file. If it does generate a bitcode
// file, then we know the compiler didn't crash, so try to diagnose a // file, then we know the compiler didn't crash, so try to diagnose a
// miscompilation. // miscompilation.
if (!PassesToRun.empty()) { if (!PassesToRun.empty()) {
outs() << "Running selected passes on program to test for crash: "; outs() << "Running selected passes on program to test for crash: ";
@ -197,7 +197,7 @@ bool BugDriver::run(std::string &ErrMsg) {
FileRemover RemoverInstance(ROF.str(), CreatedOutput && !SaveTemps); FileRemover RemoverInstance(ROF.str(), CreatedOutput && !SaveTemps);
// Diff the output of the raw program against the reference output. If it // Diff the output of the raw program against the reference output. If it
// matches, then we assume there is a miscompilation bug and try to // matches, then we assume there is a miscompilation bug and try to
// diagnose it. // diagnose it.
outs() << "*** Checking the code generator...\n"; outs() << "*** Checking the code generator...\n";
bool Diff = diffProgram(Program, "", "", false, &Error); bool Diff = diffProgram(Program, "", "", false, &Error);

View File

@ -34,12 +34,12 @@ namespace llvm {
} }
namespace { namespace {
static llvm::cl::opt<bool> static llvm::cl::opt<bool>
DisableLoopExtraction("disable-loop-extraction", DisableLoopExtraction("disable-loop-extraction",
cl::desc("Don't extract loops when searching for miscompilations"), cl::desc("Don't extract loops when searching for miscompilations"),
cl::init(false)); cl::init(false));
static llvm::cl::opt<bool> static llvm::cl::opt<bool>
DisableBlockExtraction("disable-block-extraction", DisableBlockExtraction("disable-block-extraction",
cl::desc("Don't extract blocks when searching for miscompilations"), cl::desc("Don't extract blocks when searching for miscompilations"),
cl::init(false)); cl::init(false));
@ -75,7 +75,7 @@ ReduceMiscompilingPasses::doTest(std::vector<std::string> &Prefix,
BD.EmitProgressBitcode(BD.getProgram(), "pass-error", false); BD.EmitProgressBitcode(BD.getProgram(), "pass-error", false);
exit(BD.debugOptimizerCrash()); exit(BD.debugOptimizerCrash());
} }
// Check to see if the finished program matches the reference output... // Check to see if the finished program matches the reference output...
bool Diff = BD.diffProgram(BD.getProgram(), BitcodeResult, "", bool Diff = BD.diffProgram(BD.getProgram(), BitcodeResult, "",
true /*delete bitcode*/, &Error); true /*delete bitcode*/, &Error);
@ -309,7 +309,7 @@ static bool ExtractLoops(BugDriver &BD,
bool MadeChange = false; bool MadeChange = false;
while (1) { while (1) {
if (BugpointIsInterrupted) return MadeChange; if (BugpointIsInterrupted) return MadeChange;
ValueToValueMapTy VMap; ValueToValueMapTy VMap;
Module *ToNotOptimize = CloneModule(BD.getProgram(), VMap); Module *ToNotOptimize = CloneModule(BD.getProgram(), VMap);
Module *ToOptimize = SplitFunctionsOutOfModule(ToNotOptimize, Module *ToOptimize = SplitFunctionsOutOfModule(ToNotOptimize,
@ -354,7 +354,7 @@ static bool ExtractLoops(BugDriver &BD,
BD.writeProgramToFile(OutputPrefix + "-loop-extract-fail-to-le.bc", BD.writeProgramToFile(OutputPrefix + "-loop-extract-fail-to-le.bc",
ToOptimizeLoopExtracted); ToOptimizeLoopExtracted);
errs() << "Please submit the " errs() << "Please submit the "
<< OutputPrefix << "-loop-extract-fail-*.bc files.\n"; << OutputPrefix << "-loop-extract-fail-*.bc files.\n";
delete ToOptimize; delete ToOptimize;
delete ToNotOptimize; delete ToNotOptimize;
@ -409,9 +409,9 @@ static bool ExtractLoops(BugDriver &BD,
MiscompiledFunctions.clear(); MiscompiledFunctions.clear();
for (unsigned i = 0, e = MisCompFunctions.size(); i != e; ++i) { for (unsigned i = 0, e = MisCompFunctions.size(); i != e; ++i) {
Function *NewF = ToNotOptimize->getFunction(MisCompFunctions[i].first); Function *NewF = ToNotOptimize->getFunction(MisCompFunctions[i].first);
assert(NewF && "Function not found??"); assert(NewF && "Function not found??");
assert(NewF->getFunctionType() == MisCompFunctions[i].second && assert(NewF->getFunctionType() == MisCompFunctions[i].second &&
"found wrong function type?"); "found wrong function type?");
MiscompiledFunctions.push_back(NewF); MiscompiledFunctions.push_back(NewF);
} }
@ -523,7 +523,7 @@ static bool ExtractBlocks(BugDriver &BD,
std::vector<Function*> &MiscompiledFunctions, std::vector<Function*> &MiscompiledFunctions,
std::string &Error) { std::string &Error) {
if (BugpointIsInterrupted) return false; if (BugpointIsInterrupted) return false;
std::vector<BasicBlock*> Blocks; std::vector<BasicBlock*> Blocks;
for (unsigned i = 0, e = MiscompiledFunctions.size(); i != e; ++i) for (unsigned i = 0, e = MiscompiledFunctions.size(); i != e; ++i)
for (Function::iterator I = MiscompiledFunctions[i]->begin(), for (Function::iterator I = MiscompiledFunctions[i]->begin(),
@ -593,7 +593,7 @@ static bool ExtractBlocks(BugDriver &BD,
for (unsigned i = 0, e = MisCompFunctions.size(); i != e; ++i) { for (unsigned i = 0, e = MisCompFunctions.size(); i != e; ++i) {
Function *NewF = ProgClone->getFunction(MisCompFunctions[i].first); Function *NewF = ProgClone->getFunction(MisCompFunctions[i].first);
assert(NewF && "Function not found??"); assert(NewF && "Function not found??");
assert(NewF->getFunctionType() == MisCompFunctions[i].second && assert(NewF->getFunctionType() == MisCompFunctions[i].second &&
"Function has wrong type??"); "Function has wrong type??");
MiscompiledFunctions.push_back(NewF); MiscompiledFunctions.push_back(NewF);
} }
@ -731,7 +731,7 @@ void BugDriver::debugMiscompilation(std::string *Error) {
<< getPassesString(getPassesToRun()) << '\n'; << getPassesString(getPassesToRun()) << '\n';
EmitProgressBitcode(Program, "passinput"); EmitProgressBitcode(Program, "passinput");
std::vector<Function *> MiscompiledFunctions = std::vector<Function *> MiscompiledFunctions =
DebugAMiscompilation(*this, TestOptimizer, *Error); DebugAMiscompilation(*this, TestOptimizer, *Error);
if (!Error->empty()) if (!Error->empty())
return; return;
@ -845,7 +845,7 @@ static void CleanupAndPrepareModules(BugDriver &BD, Module *&Test,
// Create a new global to hold the cached function pointer. // Create a new global to hold the cached function pointer.
Constant *NullPtr = ConstantPointerNull::get(F->getType()); Constant *NullPtr = ConstantPointerNull::get(F->getType());
GlobalVariable *Cache = GlobalVariable *Cache =
new GlobalVariable(*F->getParent(), F->getType(), new GlobalVariable(*F->getParent(), F->getType(),
false, GlobalValue::InternalLinkage, false, GlobalValue::InternalLinkage,
NullPtr,F->getName()+".fpcache"); NullPtr,F->getName()+".fpcache");