----------------------------------------
> From: tho...@codesourcery.com
> To: hiradi...@msn.com
> CC: richard.guent...@gmail.com; tbsau...@tbsaunde.org; gcc@gcc.gnu.org; 
> prathamesh.kulka...@linaro.org
> Subject: RE: Proposal for adding splay_tree_find (to find elements without 
> updating the nodes).
> Date: Tue, 31 Mar 2015 09:09:24 +0200
>
> Hi!
>
> On Mon, 30 Mar 2015 22:28:41 +0000, Aditya K <hiradi...@msn.com> wrote:
>> So I have modified the patch to use hash_map instead of std::map. The patch 
>> is attached.
>>
>> However, I got one regression after that.
>>
>> # Comparing directories
>> ## Dir1=../build-pristine/: 11 sum files
>> ## Dir2=../build-test/: 11 sum files
>>
>> # Comparing 11 common sum files
>> ## /bin/sh ../contrib/compare_tests /tmp/gxx-sum1.29214 /tmp/gxx-sum2.29214
>> Tests that now fail, but worked before:
>>
>> c-c++-common/goacc/loop-private-1.c -std=c++98 scan-tree-dump-times gimple 
>> "#pragma acc loop collapse\\(2\\) private\\(j\\) private\\(i\\)" 1
>> c-c++-common/goacc/loop-private-1.c scan-tree-dump-times gimple "#pragma acc 
>> loop collapse\\(2\\) private\\(j\\) private\\(i\\)" 1
>>
>> ## Differences found:
>> # 1 differences in 11 common sum files found
>>
>>
>> The error is due to mis-comparison because of reordering of private(i) 
>> private(j).
>>
>> I wanted to know if the order of the private flags matter.
>
> It doesn't matter. (I have not reviewed the proposed changes/patches
> themselves.)
>

Previously, I replaced splay_tree with std::map, and there were no regressions. 
I'm thinking this was because, std::map provides iterators to traverse the 
elements in a deterministic order (the sorted order) but
hash_map iterators may not have that order.

Thanks,
-Aditya

>
> Grüße,
> Thomas
                                          

Reply via email to