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: [CFG] what are class 3 edges ?


Sunzir Deepur wrote:
> 
> ok, that's one example where class 3 edges are created, but why is that ?
> they obviously do not represent a legit flow of code.
> e.g.
> if(condition) {
>     BB1
> }
> else {
>    BB2
> }
> 
> here i get (besides the obvious edges) a class 3 edge between BB1 to BB2.
> 
> why ? there is no way there will be flow from BB1 to BB2. so why to create
> those edges in the first place ?

I can't tell with so few details, but it might happen in some specific
cases and under some optimization algorithms that an 'if' will be
changed into a 'switch' (e.g. if your 'condition' is a chain of and/or).

Regards
-- 
Emmanuel Fleury

Men are born ignorant, not stupid. They are made stupid by education.
  -- Bertrand Russel (A History of Western Philosophy, 1945)


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