Daniel Berlin - Re: [patch, 4.1.2, 4.2.1, 4.3] Fix a bug in pointer dependency test (original) (raw)
This is the mail archive of the gcc-patches@gcc.gnu.orgmailing list for the GCC project.
Hello,
--- 193,211 ---- if (!tag_b) return false; } ! bal1 = BITMAP_ALLOC (NULL); ! bitmap_set_bit (bal1, DECL_UID (tag_a)); ! if (MTAG_P (tag_a) && MTAG_ALIASES (tag_a)) ! bitmap_ior_into (bal1, MTAG_ALIASES (tag_a)); ! ! bal2 = BITMAP_ALLOC (NULL); ! bitmap_set_bit (bal2, DECL_UID (tag_b)); ! if (MTAG_P (tag_b) && MTAG_ALIASES (tag_b)) ! bitmap_ior_into (bal2, MTAG_ALIASES (tag_b)); ! *aliased = bitmap_intersect_p (bal1, bal2); ! ! BITMAP_FREE (bal1); ! BITMAP_FREE (bal2); return true; }
Why are you allocating two temporary bitmaps and copying bitmaps into them just to do:
*aliased = false; if (tag_a == tag_b || (MTAG_P (tag_a) && MTAG_P (tag_b) && bitmap_intersect_p (MTAG_ALIASES (tag_a), MTAG_ALIASES (tag_b))) *aliased = true; return true;
This code is not equivalent, but