[PATCH] Loop unswitching: support gswitch statements.

Martin Liška mliska@suse.cz
Thu Jan 6 16:35:34 GMT 2022


On 1/6/22 17:20, Andrew MacLeod wrote:
> So if you get a FALSE back, you cannot use any results because GORI is claiming that it cant figure something out... or there is nothing to figure out.   Most of rangers routines are implemented so that if they return FALSE, the result is meaningless.

All right, then it's my bad, sorry for the noise.

> 
> 
> what is IDX you are passing?  order_385?

Yep.

(gdb) p idx
$1 = <ssa_name 0x7ffff7733e10 383>


> 
> As a side note, theres a typo in the testcase:  .. Im not sure how that affects things, but :

Oh, yeah, that's typo :)

> 
>     defaut:
>              __builtin_unreachable ();
> 
> 
> default is misspelled...  maybe it thinks that some kind of runtime value?   I am surprised it even compiles.  maybe that is mucking up what GORI thiunks it can calculate?

But it does not affect anything. The bailout happens due to:

│      199    // Only process switches if it within the size limit.
│      200    if (EDGE_COUNT (e->src->succs) > (unsigned)m_max_edges)
│  >   201      return NULL;

Cheers,
Martin


More information about the Gcc-patches mailing list