[cfe-commits] r89437 - /cfe/trunk/lib/Analysis/GRExprEngine.cpp
Ted Kremenek
kremenek at apple.com
Thu Nov 19 19:30:50 PST 2009
As far as correctness is concerned, the entire check is unnecessary. That early return is entirely for performance.
Although I haven't measured the performance impact, I imagine we're going to need an assortment of small hacks like that to improve performance. It probably doesn't matter such much in the case where we are using RegionStore, where we should know the location most of the time, but there are many cases where we still don't. I think we should revert it, but also add a comment.
On Nov 19, 2009, at 7:13 PM, Zhongxing Xu wrote:
> Oh, shall I revert it? I just think it's less orthogonal.
>
> 2009/11/20 Ted Kremenek <kremenek at apple.com>:
>> Hi Zhongxing,
>>
>> That was a slight performance tweak. Basically there is no need to run Checkers on that location if it is unknown.
>>
>> On Nov 19, 2009, at 5:56 PM, Zhongxing Xu wrote:
>>
>>> Author: zhongxingxu
>>> Date: Thu Nov 19 19:56:48 2009
>>> New Revision: 89437
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=89437&view=rev
>>> Log:
>>> It's unnecessary to check for unknown at this point.
>>>
>>> Modified:
>>> cfe/trunk/lib/Analysis/GRExprEngine.cpp
>>>
>>> Modified: cfe/trunk/lib/Analysis/GRExprEngine.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/GRExprEngine.cpp?rev=89437&r1=89436&r2=89437&view=diff
>>>
>>> ==============================================================================
>>> --- cfe/trunk/lib/Analysis/GRExprEngine.cpp (original)
>>> +++ cfe/trunk/lib/Analysis/GRExprEngine.cpp Thu Nov 19 19:56:48 2009
>>> @@ -1278,8 +1278,7 @@
>>> ExplodedNode* Pred,
>>> const GRState* state, SVal location,
>>> const void *tag, bool isLoad) {
>>> -
>>> - if (location.isUnknown() || Checkers.empty()) {
>>> + if (Checkers.empty()) {
>>> Dst.Add(Pred);
>>> return;
>>> }
>>>
>>>
>>> _______________________________________________
>>> cfe-commits mailing list
>>> cfe-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>
>>
More information about the cfe-commits
mailing list