Changes in directory llvm/lib/CodeGen:

IntrinsicLowering.cpp updated: 1.36 -> 1.37
---
Log message:

Add "support" for the llvm.stacksave/stackrestore intrinsics, this is
used by the C backend.


---
Diffs of the changes:  (+15 -2)

 IntrinsicLowering.cpp |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)


Index: llvm/lib/CodeGen/IntrinsicLowering.cpp
diff -u llvm/lib/CodeGen/IntrinsicLowering.cpp:1.36 
llvm/lib/CodeGen/IntrinsicLowering.cpp:1.37
--- llvm/lib/CodeGen/IntrinsicLowering.cpp:1.36 Fri Nov 11 10:46:18 2005
+++ llvm/lib/CodeGen/IntrinsicLowering.cpp      Thu Jan 12 20:22:08 2006
@@ -248,6 +248,19 @@
     break;
   }
 
+  case Intrinsic::stacksave:
+  case Intrinsic::stackrestore: {
+    static bool Warned = false;
+    if (!Warned)
+      std::cerr << "WARNING: this target does not support the llvm.stack"
+       << (Callee->getIntrinsicID() == Intrinsic::stacksave ?
+           "save" : "restore") << " intrinsic.\n";
+    Warned = true;
+    if (Callee->getIntrinsicID() == Intrinsic::stacksave)
+      CI->replaceAllUsesWith(Constant::getNullValue(CI->getType()));
+    break;
+  }
+    
   case Intrinsic::returnaddress:
   case Intrinsic::frameaddress:
     std::cerr << "WARNING: this target does not support the llvm."
@@ -263,8 +276,8 @@
   case Intrinsic::pcmarker:
     break;    // Simply strip out pcmarker on unsupported architectures
   case Intrinsic::readcyclecounter: {
-    std::cerr << "WARNING: this target does not support the 
llvm.readcyclecounter"
-              << " intrinsic.  It is being lowered to a constant 0\n";
+    std::cerr << "WARNING: this target does not support the llvm.readcyclecoun"
+              << "ter intrinsic.  It is being lowered to a constant 0\n";
     CI->replaceAllUsesWith(ConstantUInt::get(Type::ULongTy, 0));
     break;
   }



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to