[cfe-dev] [cfe-commits] r67438 - in /cfe/trunk/lib/CodeGen: CGExpr.cpp CodeGenModule.cpp CodeGenModule.h
sabre at nondot.org
Sat Mar 21 18:51:17 CDT 2009
On Mar 21, 2009, at 3:35 PM, Daniel Dunbar wrote:
> On 3/21/09, Chris Lattner <sabre at nondot.org> wrote:
>> Author: lattner
>> Date: Sat Mar 21 02:48:31 2009
>> New Revision: 67438
>> URL: http://llvm.org/viewvc/llvm-project?rev=67438&view=rev
>> simplify and comment some code better. Make BindRuntimeGlobals
>> more optimistic that it will work (optimizing for the common case).
> I may be missing something, but wouldn't this be cleaner if we just
> provided a Module method to return a reference to the entry for a
> name? This would avoiding the shuffling with names and only do one
We already have this through ValueSymbolTable. I added this comment,
though I don't really know if it is true:
/// Note that this map always lines up exactly with the contents of
/// IR symbol table, but this is quicker to query since it is doing
/// pointer lookups instead of full string lookups.
llvm::DenseMap<const char*, llvm::GlobalValue*> GlobalDeclMap;
I would also like to eliminate RuntimeGlobals at some point.
More information about the cfe-dev