This is an archive of the discontinued LLVM Phabricator instance.

[FIX] Teach RegionGenerator to respect and update dominance
ClosedPublic

Authored by jdoerfert on Feb 27 2015, 9:37 AM.

Details

Summary
When we generate code for a whole region we have to respect dominance
and update it too.
The first is achieved with multiple "BBMap"s. Each copied block in the
region gets its own map. It is initialized only with values mapped in
the immediate dominator block, if this block is in the region and was
therefor already copied. This way no values defined in a block that
doesn't dominate the current one will be used.
To update dominance information we check if the immediate dominator of
the original block we want to copy is in the region. If so we set the
immediate dominator of the current block to the copy of the immediate
dominator of the original block.

Diff Detail

Event Timeline

jdoerfert updated this revision to Diff 20858.Feb 27 2015, 9:37 AM
jdoerfert retitled this revision from to [FIX] Teach RegionGenerator to respect and update dominance.
jdoerfert updated this object.
jdoerfert added subscribers: Restricted Project, Unknown Object (MLST).
grosser accepted this revision.Feb 27 2015, 9:50 AM
grosser edited edge metadata.

LGTM

lib/CodeGen/BlockGenerators.cpp
115

This seems unrelated.

This revision is now accepted and ready to land.Feb 27 2015, 9:50 AM
jdoerfert closed this revision.Mar 1 2015, 8:50 AM