This is the mail archive of the gcc@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]

Re: [tree-ssa] [RFC] loop versioning



On Jan 5, 2004, at 10:35 PM, Richard Henderson wrote:


Anyway, you should know that there are already routines to copy
statements and blocks.  So all of this code looks redundant.

tree_duplicate_bb () is more suitable to copy loop header. For other basic blocks inside loop, while duplicating a basic block I may not have corresponding edge available. Because it is possible that bb at other end of edge does not yet have corresponding duplicate bb. So what I do is, duplicate all basic blocks and then make edge for second loop by following edges of original loop. Plus there can be more than one incoming edges and tree_duplicate_bb() does not handle it.

As I understand tree_duplicate_bb() performs this operation

before
     ---- edge e1 ----> [bb1]

after
     --- edge e1 --+    [bb1]
                 |
                 +---> [bb2]

What I need to do for loop versioning is:

before
    ---- edge e1 ---> [bb1] ---- edge e2 --->
after
    ---- edge e1 ---> [bb1] ---- edge e2 --->
    ---- edge e21 ---> [bb21] ---- edge e22 --->


And comment on top of tree_duplicate_bb () says that it does not work over SSA. At the moment, I'm trying to make loop versioning work over SSA.

If you think, I should update tree_duplicate_bb () and related APIs
to satisfy these requirements then I'll follow that path.

Thank you,
-
Devang


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]