[llvm-commits] [llvm] r86049 - in /llvm/trunk: include/llvm/CodeGen/SlotIndexes.h lib/CodeGen/SlotIndexes.cpp
Chris Lattner
clattner at apple.com
Wed Nov 4 14:44:49 PST 2009
On Nov 4, 2009, at 1:24 PM, Lang Hames wrote:
> Author: lhames
> Date: Wed Nov 4 15:24:15 2009
> New Revision: 86049
>
> URL: http://llvm.org/viewvc/llvm-project?rev=86049&view=rev
> Log:
> Handle empty/tombstone keys for LiveIndex more cleanly. Check for
> index sanity when constructing index list entries.
Hi Lang,
> +++ llvm/trunk/lib/CodeGen/SlotIndexes.cpp Wed Nov 4 15:24:15 2009
> @@ -16,8 +16,8 @@
>
> using namespace llvm;
>
> -std::auto_ptr<IndexListEntry> SlotIndex::emptyKeyPtr(0),
> - SlotIndex::tombstoneKeyPtr(0);
> +std::auto_ptr<IndexListEntry> IndexListEntry::emptyKeyEntry,
> + IndexListEntry::tombstoneKeyEntry;
Why are you using global variables (with static ctors/dtors in
particular) for this? This does not appear to be thread safe. Can
these be made instance variables of the class?
-Chris
More information about the llvm-commits
mailing list