aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-01-15 00:07:19 +0000
committerChris Lattner <sabre@nondot.org>2005-01-15 00:07:19 +0000
commit59615f0f85e2ac99e012cb81934d002faebd405a (patch)
treef3c47b60bca080468b5a2b2793e3a6d472a22490
parente1c6bfa3858dff000198b53929f85de129cb92df (diff)
Improve output precision.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19564 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--tools/bugpoint/Miscompilation.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/tools/bugpoint/Miscompilation.cpp b/tools/bugpoint/Miscompilation.cpp
index 33bfd502c0..b69cbd1200 100644
--- a/tools/bugpoint/Miscompilation.cpp
+++ b/tools/bugpoint/Miscompilation.cpp
@@ -25,6 +25,7 @@
#include "llvm/Transforms/Utils/Cloning.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FileUtilities.h"
+#include "llvm/Config/config.h" // for HAVE_LINK_R
using namespace llvm;
namespace llvm {
@@ -65,6 +66,11 @@ ReduceMiscompilingPasses::doTest(std::vector<const PassInfo*> &Prefix,
// Check to see if the finished program matches the reference output...
if (BD.diffProgram(BytecodeResult, "", true /*delete bytecode*/)) {
std::cout << " nope.\n";
+ if (Suffix.empty()) {
+ std::cerr << BD.getToolName() << ": I'm confused: the test fails when "
+ << "no passes are run, nondeterministic program?\n";
+ exit(1);
+ }
return KeepSuffix; // Miscompilation detected!
}
std::cout << " yup.\n"; // No miscompilation!
@@ -817,9 +823,13 @@ bool BugDriver::debugCodeGenerator() {
if (isExecutingJIT()) {
std::cout << " lli -load " << SharedObject << " " << TestModuleBC;
} else {
- std::cout << " llc " << TestModuleBC << " -o " << TestModuleBC << ".s\n";
+ std::cout << " llc -f " << TestModuleBC << " -o " << TestModuleBC<< ".s\n";
std::cout << " gcc " << SharedObject << " " << TestModuleBC
- << ".s -o " << TestModuleBC << ".exe -Wl,-R.\n";
+ << ".s -o " << TestModuleBC << ".exe";
+#if defined (HAVE_LINK_R)
+ std::cout << "-Wl,-R.";
+#endif
+ std::cout << "\n";
std::cout << " " << TestModuleBC << ".exe";
}
for (unsigned i=0, e = InputArgv.size(); i != e; ++i)