File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -242,6 +242,17 @@ bool BBState::isTrackingMemLocation(unsigned bit) {
242
242
243
243
void BBState::initialize (const BBState &Succ) { WriteSetOut = Succ.WriteSetIn ; }
244
244
245
+ // / Intersect is very frequently performed, so it is important to make it as
246
+ // / cheap as possible.
247
+ // /
248
+ // / To do so, we canonicalize MemLocations, i.e. traced back to the underlying
249
+ // / object. Therefore, no need to do a O(N^2) comparison to figure out what is
250
+ // / dead along all successors.
251
+ // /
252
+ // / NOTE: Canonicalizing does not solve the problem entirely. i.e. it is still
253
+ // / possible that 2 MemLocations with different bases that happen to be the
254
+ // / same object and field. In such case, we would miss a dead store
255
+ // / opportunity. But this happens less often with canonicalization.
245
256
void BBState::intersect (const BBState &Succ) { WriteSetOut &= Succ.WriteSetIn ; }
246
257
247
258
// ===----------------------------------------------------------------------===//
You can’t perform that action at this time.
0 commit comments