[llvm-commits] CVS: llvm/tools/bugpoint/ExecutionDriver.cpp

Chris Lattner lattner at cs.uiuc.edu
Sat Jan 22 19:45:41 PST 2005



Changes in directory llvm/tools/bugpoint:

ExecutionDriver.cpp updated: 1.52 -> 1.53
---
Log message:

Add support for fp tolerances


---
Diffs of the changes:  (+11 -3)

 ExecutionDriver.cpp |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)


Index: llvm/tools/bugpoint/ExecutionDriver.cpp
diff -u llvm/tools/bugpoint/ExecutionDriver.cpp:1.52 llvm/tools/bugpoint/ExecutionDriver.cpp:1.53
--- llvm/tools/bugpoint/ExecutionDriver.cpp:1.52	Sat Jan 22 21:31:39 2005
+++ llvm/tools/bugpoint/ExecutionDriver.cpp	Sat Jan 22 21:45:26 2005
@@ -29,6 +29,13 @@
     AutoPick, RunLLI, RunJIT, RunLLC, RunCBE
   };
 
+  cl::opt<double>
+  AbsTolerance("abs-tolerance", cl::desc("Absolute error tolerated"),
+               cl::init(0.0));
+  cl::opt<double>
+  RelTolerance("rel-tolerance", cl::desc("Relative error tolerated"),
+               cl::init(0.0));
+
   cl::opt<OutputType>
   InterpreterSel(cl::desc("Specify how LLVM code should be executed:"),
                  cl::values(clEnumValN(AutoPick, "auto", "Use best guess"),
@@ -303,9 +310,10 @@
 
   std::string Error;
   bool FilesDifferent = false;
-  if (DiffFilesWithTolerance(ReferenceOutputFile, Output.toString(), 0, 0,
-                             &Error)) {
-    if (!Error.empty()) {
+  if (int Diff = DiffFilesWithTolerance(sys::Path(ReferenceOutputFile),
+                                        sys::Path(Output.toString()),
+                                        AbsTolerance, RelTolerance, &Error)) {
+    if (Diff == 2) {
       std::cerr << "While diffing output: " << Error << '\n';
       exit(1);
     }






More information about the llvm-commits mailing list