diff options
author | Chris Lattner <sabre@nondot.org> | 2005-03-15 04:54:21 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-03-15 04:54:21 +0000 |
commit | e4d5c441e04bdc00ccf1804744af670655123b07 (patch) | |
tree | be1bff1314e39651d7120d2d887b79b10dc2f24d /lib/Transforms/IPO/IPConstantPropagation.cpp | |
parent | 89cc2656ba070434dceeabe95cba0a95b988325b (diff) |
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!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20597 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/IPConstantPropagation.cpp')
-rw-r--r-- | lib/Transforms/IPO/IPConstantPropagation.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Transforms/IPO/IPConstantPropagation.cpp b/lib/Transforms/IPO/IPConstantPropagation.cpp index 65d507798b..16839edff7 100644 --- a/lib/Transforms/IPO/IPConstantPropagation.cpp +++ b/lib/Transforms/IPO/IPConstantPropagation.cpp @@ -69,10 +69,10 @@ bool IPCP::runOnModule(Module &M) { /// constant in for an argument, propagate that constant in as the argument. /// bool IPCP::PropagateConstantsIntoArguments(Function &F) { - if (F.aempty() || F.use_empty()) return false; // No arguments? Early exit. + if (F.arg_empty() || F.use_empty()) return false; // No arguments? Early exit. std::vector<std::pair<Constant*, bool> > ArgumentConstants; - ArgumentConstants.resize(F.asize()); + ArgumentConstants.resize(F.arg_size()); unsigned NumNonconstant = 0; @@ -87,7 +87,7 @@ bool IPCP::PropagateConstantsIntoArguments(Function &F) { // Check out all of the potentially constant arguments CallSite::arg_iterator AI = CS.arg_begin(); - Function::aiterator Arg = F.abegin(); + Function::arg_iterator Arg = F.arg_begin(); for (unsigned i = 0, e = ArgumentConstants.size(); i != e; ++i, ++AI, ++Arg) { if (*AI == &F) return false; // Passes the function into itself @@ -115,7 +115,7 @@ bool IPCP::PropagateConstantsIntoArguments(Function &F) { // If we got to this point, there is a constant argument! assert(NumNonconstant != ArgumentConstants.size()); - Function::aiterator AI = F.abegin(); + Function::arg_iterator AI = F.arg_begin(); bool MadeChange = false; for (unsigned i = 0, e = ArgumentConstants.size(); i != e; ++i, ++AI) // Do we have a constant argument!? |