diff options
| author | Gabor Greif <ggreif@gmail.com> | 2010-03-26 19:40:38 +0000 |
|---|---|---|
| committer | Gabor Greif <ggreif@gmail.com> | 2010-03-26 19:40:38 +0000 |
| commit | 853daf48486ccde48819e72bc83bd2ba7490b020 (patch) | |
| tree | 81c04e6b4017185e2396c82bac0fe6181a303cf4 /llvm/docs/ProgrammersManual.html | |
| parent | 37027c30ec526afe3bb571df6f8701bf0d322f22 (diff) | |
| download | bcm5719-llvm-853daf48486ccde48819e72bc83bd2ba7490b020.tar.gz bcm5719-llvm-853daf48486ccde48819e72bc83bd2ba7490b020.zip | |
some more tweaks
llvm-svn: 99643
Diffstat (limited to 'llvm/docs/ProgrammersManual.html')
| -rw-r--r-- | llvm/docs/ProgrammersManual.html | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/docs/ProgrammersManual.html b/llvm/docs/ProgrammersManual.html index d1865f13a79..f5c08786c44 100644 --- a/llvm/docs/ProgrammersManual.html +++ b/llvm/docs/ProgrammersManual.html @@ -1977,9 +1977,9 @@ for (Value::use_iterator i = F->use_begin(), e = F->use_end(); i != e; ++i </pre> </div> -Note that dereferencing a <tt>Value::use_iterator</tt> is not a very cheap +<p>Note that dereferencing a <tt>Value::use_iterator</tt> is not a very cheap operation. Instead of performing <tt>*i</tt> above several times, consider -doing it only once in the loop body and reusing its result. +doing it only once in the loop body and reusing its result.</p> <p>Alternatively, it's common to have an instance of the <a href="/doxygen/classllvm_1_1User.html">User Class</a> and need to know what @@ -2001,12 +2001,13 @@ for (User::op_iterator i = pi->op_begin(), e = pi->op_end(); i != e; ++i) </div> <p>Declaring objects as <tt>const</tt> is an important tool of enforcing -mutation free algorithms (such as analyses etc.). For this purpose above +mutation free algorithms (such as analyses, etc.). For this purpose above iterators come in constant flavors as <tt>Value::const_use_iterator</tt> and <tt>Value::const_op_iterator</tt>. They automatically arise when calling <tt>use/op_begin()</tt> on <tt>const Value*</tt>s or <tt>const User*</tt>s respectively. Upon dereferencing, they return -<tt>const Use*</tt>s. Otherwise the above patterns remain unchanged. +<tt>const Use*</tt>s. Otherwise the above patterns remain unchanged.</p> + </div> <!--_______________________________________________________________________--> |

