Bug 174762 - B3 should have a reusable EffectsSet data structure
Summary: B3 should have a reusable EffectsSet data structure
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 174750
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-23 13:12 PDT by Filip Pizlo
Modified: 2017-07-23 13:13 PDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2017-07-23 13:12:54 PDT
Currently there are a couple places (eliminateCommonSubexpressions and hoistLoopInvariantValues) that both construct a data structure that tracks the set of effects.  When we are just tracking heap ranges, then a RangeSet<> will do.  But sometimes we want to track that and the other things (control dependence, side exiting, things done to local state, etc).  We basically want a version of Effects that tracks the set of effects: so the same boolean fields, but RangeSet<HeapRange> for reads/writes.

This would make some code a bit less yucky and a considerably less error-prone.  It ought to be perf neutral, too (it just means flipping a handful more booleans).