[llvm-commits] CVS: llvm/lib/Reoptimizer/Inst/lib/Phase1/Phase1.cpp

Joel Stanley jstanley at cs.uiuc.edu
Thu Jun 26 11:47:01 PDT 2003


Changes in directory llvm/lib/Reoptimizer/Inst/lib/Phase1:

Phase1.cpp updated: 1.27 -> 1.28

---
Log message:



---
Diffs of the changes:

Index: llvm/lib/Reoptimizer/Inst/lib/Phase1/Phase1.cpp
diff -u llvm/lib/Reoptimizer/Inst/lib/Phase1/Phase1.cpp:1.27 llvm/lib/Reoptimizer/Inst/lib/Phase1/Phase1.cpp:1.28
--- llvm/lib/Reoptimizer/Inst/lib/Phase1/Phase1.cpp:1.27	Tue Jun 24 10:39:53 2003
+++ llvm/lib/Reoptimizer/Inst/lib/Phase1/Phase1.cpp	Thu Jun 26 11:45:59 2003
@@ -194,8 +194,20 @@
     // be the pair of interval-declaration sigfuns.  TODO: Clean up this approach, and do
     // the same for point-site declarations.
 
-    Function* intervalStartDeclFunc = m_module->getNamedFunction("pp_declareIntervalStart");
-    Function* intervalEndDeclFunc = m_module->getNamedFunction("pp_declareIntervalEnd");
+    params.push_back(PointerType::get(Type::DoubleTy));
+    params.push_back(Type::UIntTy);
+    //Function* intervalStartDeclFunc = m_module->getNamedFunction("pp_declareIntervalStart");
+
+    Function* intervalStartDeclFunc =
+        m_module->getOrInsertFunction("pp_declareIntervalStart",
+                                      FunctionType::get(Type::VoidTy, params, false));
+        
+    params.clear();
+    params.push_back(Type::UIntTy);
+    params.push_back(PointerType::get(Type::DoubleTy));
+    Function* intervalEndDeclFunc =
+        m_module->getOrInsertFunction("pp_declareIntervalEnd",
+                                      FunctionType::get(Type::VoidTy, params, false));
 
     rpairs.push_back(std::make_pair(intervalStartDeclFunc, intervalEndDeclFunc));
 
@@ -272,6 +284,7 @@
     Function* startFunc = rpair.first;
     Function* endFunc = rpair.second;
 
+    assert(startFunc && endFunc && "Invalid start/end Function*'s");
     assert(startFunc->use_size() == endFunc->use_size() &&
            "Expect region functions to be used in pairs");
 





More information about the llvm-commits mailing list