[llvm-commits] [llvm] r97759 - /llvm/trunk/lib/CodeGen/PseudoSourceValue.cpp
Chris Lattner
clattner at apple.com
Thu Mar 4 17:06:23 PST 2010
On Mar 4, 2010, at 4:55 PM, Jeffrey Yasskin wrote:
>>>
>>> PseudoSourceValue::getFixedStack lets the user pass in an arbitrary
>>> int. It could be that these tend to be dense, allowing us to use a
>>> vector for FSValues instead of the map, but the vector would still
>>> have to be growable to accommodate larger integers than it's seen yet,
>>> which would still require a lock. Since I don't know how this is used,
>>> I just rearranged it instead of trying to change the data structure or
>>> move it into the Context.
>>
>> Ah, I see. Dan, what do you think? a lock + std::map seems expensive.
>
> Another way to avoid the lock would be to contextify this. It probably
> wouldn't be that hard; just require an extra parameter everywhere it's
> used.
I think that is a much better solution :), though I don't know how hot this really is.
More information about the llvm-commits
mailing list