[llvm-commits] [llvm] r109220 - /llvm/trunk/include/llvm/Use.h

Eric Christopher echristo at apple.com
Fri Jul 23 01:53:44 PDT 2010


On Jul 23, 2010, at 1:46 AM, Eric Christopher wrote:

> 
> On Jul 23, 2010, at 1:36 AM, Gabor Greif wrote:
> 
>> Author: ggreif
>> Date: Fri Jul 23 03:36:07 2010
>> New Revision: 109220
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=109220&view=rev
>> Log:
>> Simplifying use_iterators by dereferencing
>> is not a good idea. The codebase does not depend
>> in this any more, and it may introduce hidden
>> runtime cost. If you get compile errors, please
>> dereference your iterator before passing to cast<>
>> (and friends).
>> 
>> Also: please consider caching the result of
>> operator* and reusing that instead of dereferencing
>> many times.
> 
> Please revert this, you broke llvm-gcc and clang.

I"ve gone ahead and reverted it.

-eric



More information about the llvm-commits mailing list