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]

Re: Code motion around labels


    Presumably you're talking about gcse/lcm?  

No, I'm talking specifically about the code in find_and_verify_loops.

    The information you want to encode in the CFG is from what points are
    those labels reachable.  

No, not at all.  I think you miss the issue.

If I have two labels whose address is taken in static data, the most likely
purpose is that some "external" entity is going to be using those
labels to see if it is executing the code between them.  If we move any
code beyond the boundary of such a label, the wrong thing will happen.

This isn't a reachablity or code flow issue: it's a static matter of making
sure that the code between those labels stays there.  It's exactly the same
sort of condition we check to avoid moving code between exception regions:
we can't use the CFG for that.  You can view these labels as establishing
"external exception regions" of some sort.


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