This mega patch converts us from using Function::a{iterator|begin|end} to
using Function::arg_{iterator|begin|end}.  Likewise Module::g* -> Module::global_*.

This patch is contributed by Gabor Greif, thanks!

llvm-svn: 20597
diff --git a/llvm/lib/CodeGen/IntrinsicLowering.cpp b/llvm/lib/CodeGen/IntrinsicLowering.cpp
index 0fe49ec..3633f96 100644
--- a/llvm/lib/CodeGen/IntrinsicLowering.cpp
+++ b/llvm/lib/CodeGen/IntrinsicLowering.cpp
@@ -87,28 +87,28 @@
       switch (I->getIntrinsicID()) {
       default: break;
       case Intrinsic::setjmp:
-        EnsureFunctionExists(M, "setjmp", I->abegin(), I->aend(), Type::IntTy);
+        EnsureFunctionExists(M, "setjmp", I->arg_begin(), I->arg_end(), Type::IntTy);
         break;
       case Intrinsic::longjmp:
-        EnsureFunctionExists(M, "longjmp", I->abegin(), I->aend(),Type::VoidTy);
+        EnsureFunctionExists(M, "longjmp", I->arg_begin(), I->arg_end(),Type::VoidTy);
         break;
       case Intrinsic::siglongjmp:
-        EnsureFunctionExists(M, "abort", I->aend(), I->aend(), Type::VoidTy);
+        EnsureFunctionExists(M, "abort", I->arg_end(), I->arg_end(), Type::VoidTy);
         break;
       case Intrinsic::memcpy:
-        EnsureFunctionExists(M, "memcpy", I->abegin(), --I->aend(),
-                             I->abegin()->getType());
+        EnsureFunctionExists(M, "memcpy", I->arg_begin(), --I->arg_end(),
+                             I->arg_begin()->getType());
         break;
       case Intrinsic::memmove:
-        EnsureFunctionExists(M, "memmove", I->abegin(), --I->aend(),
-                             I->abegin()->getType());
+        EnsureFunctionExists(M, "memmove", I->arg_begin(), --I->arg_end(),
+                             I->arg_begin()->getType());
         break;
       case Intrinsic::memset:
-        EnsureFunctionExists(M, "memset", I->abegin(), --I->aend(),
-                             I->abegin()->getType());
+        EnsureFunctionExists(M, "memset", I->arg_begin(), --I->arg_end(),
+                             I->arg_begin()->getType());
         break;
       case Intrinsic::isunordered:
-        EnsureFunctionExists(M, "isunordered", I->abegin(), I->aend(), Type::BoolTy);
+        EnsureFunctionExists(M, "isunordered", I->arg_begin(), I->arg_end(), Type::BoolTy);
         break;
       }
 
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 565a342..48574da 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -128,7 +128,7 @@
   // Initialize the mapping of values to registers.  This is only set up for
   // instruction values that are used outside of the block that defines
   // them.
-  for (Function::aiterator AI = Fn.abegin(), E = Fn.aend(); AI != E; ++AI)
+  for (Function::arg_iterator AI = Fn.arg_begin(), E = Fn.arg_end(); AI != E; ++AI)
     InitializeRegForValue(AI);
 
   Function::iterator BB = Fn.begin(), E = Fn.end();
@@ -881,7 +881,7 @@
     // anything special.
     if (OldRoot != SDL.DAG.getRoot()) {
       unsigned a = 0;
-      for (Function::aiterator AI = F.abegin(), E = F.aend(); AI != E; ++AI,++a)
+      for (Function::arg_iterator AI = F.arg_begin(), E = F.arg_end(); AI != E; ++AI,++a)
         if (!AI->use_empty()) {
           SDL.setValue(AI, Args[a]);
           SDOperand Copy = 
@@ -892,7 +892,7 @@
       // Otherwise, if any argument is only accessed in a single basic block,
       // emit that argument only to that basic block.
       unsigned a = 0;
-      for (Function::aiterator AI = F.abegin(), E = F.aend(); AI != E; ++AI,++a)
+      for (Function::arg_iterator AI = F.arg_begin(), E = F.arg_end(); AI != E; ++AI,++a)
         if (!AI->use_empty()) {
           if (BasicBlock *BBU = IsOnlyUsedInOneBasicBlock(AI)) {
             FuncInfo.BlockLocalArguments.insert(std::make_pair(BBU,