Skip to content

GVNHoist: Split Parent when profitable to do so. #91665

Open
@hiraditya

Description

@hiraditya

GVNHoist currently bails out unless a value is fully anticipable at a dominator. It may be profitable to split the parents and create a common dominator for all the basic blocks that have a fully anticipable value. e.g.,

graph TD;
    BB -->BB1[BB1:\n I1:VN]
    BB -->BB2[BB2:\n I2:VN]
    BB -->BB3[BB3:\n]  
Loading

If only BB1 and BB2 has v(for an instruction I). it might be profitable to create a common predecessor for BB1,BB2 and hoist I there.

graph TD;
    BB -->BB0[BB0:\n I1:VN]
    BB0 -->BB1[BB1:\n]
    BB0 -->BB2[BB2:\n]
    BB -->BB3[BB3:\n]
Loading

Metadata

Metadata

Assignees

Labels

llvm:GVNGVN and NewGVN stages (Global value numbering)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions