https://sourceware.org/bugzilla/show_bug.cgi?id=22870
Alexandre Oliva <aoliva at sourceware dot org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aoliva at sourceware dot org --- Comment #4 from Alexandre Oliva <aoliva at sourceware dot org> --- IIRC it already does that; it only emits symbolic expressions when, at the time it sees the .loc directive, it can't yet determine whether . > .LVL(#-1) (IOW, have we advanced PC since the previous view in the same subsection?). If we can do more to resolve these early, we will certainly cut short the expression bloat and dep chain. Now, even if we can't determine that earlier, we could still do better. We multiply the negation of the above by (.LVU# + 1) (IOW, the successor to the previous view). If the multiplication could take a shortcut if one of the operands is found to be zero (it often will be, in this particular case) and resolve the result to zero (not necessarily for good, since relaxing might turn an align to nothing), we'd get much shorter evaluations overall. If optimizing multiplication is no good, maybe we could introduce a ternary operator for internal use, for use in this case? All that said, GCC will soon cut the chains short at function entry points, where it will force a view reset. This should shrink the chain lengths significantly, but I guess we can still use any of the suggested above to improve it so we only hit the O(2^n) case with small n. -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils