Clang Slow to Optimize Dead Store Elimination

I have an Objective-C file that’s about 6000 lines long, which is nearly all a NSArray of 550 items, each of which is a NSDictionary with NSString/NSString and NSString/NSNumber key value pairs in literal syntax. This code takes about 0.4s to compile if optimizations are turned off. It takes about 8 minutes to compile if -O1 is turned on. It takes about 13 minutes to compile if “-fobjc-arc” option is given with -O1. The time-report indicates that Dead Store Elimination optimization is taking the majority of the time. Is it worth logging a bug or is that working as intended?

Chris Jung

Embedded Software Engineer
Network and Service Enablement
JDSU
(317) 614-8089

image001.jpg

Yes, that's a bug. Note that -O1 doesn't really exist, it is the same as
-O2.

Joerg

Please file a bug (with a reproducer). DSE really shouldn’t be anywhere near that slow. p.s. If you happen to have a performance profile handy, I’d be curious to know where the slowdown was. Philip