This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On 6/23/10 11:08 PM, Maxim Kuvyrkov wrote: ...This can be addressed with a walk over the dominator tree after we compute VBEout. Start with the root and descend in the tree keeping a bitset of expressions that should be alive up the tree. If current node
1. has a single successor, 2. has i'th expression set in VBEout, 3. the successor has i'th expression set in VBEout, 4. current node doesn't generate i'th expression, 5. i'th expression is not marked in the bitset as required up the tree,
than we can hoist i'th expression in the successor with the same result as in the current node and not unnecessarily extend live ranges. There maybe a couple more details to the above, but the problem should be easily fixable.
This is implemented as cleanup_code_hoist_vbeout() function. The solution it produces is OK from correctness point of view (it removes bits from VBEout), but, please, *check my reasoning* to make sure it doesn't remove from VBEout expressions it shouldn't.
There is a flaw in the implementation I posted yesterday. VBEout sets have to be cleaned up considering data both downward and upward the dominator tree; see new example and comments in compute_code_hoist_vbeinout.
This updated patch corrects the cleaning routine and adds several comments to annotate its actions.
Does this look OK?
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |