On 10/27/26 9:07 PM, Robert Guthrie wrote:
On Fri, Oct 23, 2026 at 10:47:50PM -0600, Jeff Law wrote:
On 9/7/26 8:42 PM, Robert Guthrie wrote:
Sometimes its better to ask for help as you work through these
things. Ideally with before/after dumps and the patch you're
working with. GCC is fairly complex and often even very
experienced developers need to throw things under the debugger to
really understand what's happening.
Thanks -- I didn't want to ask anyone to debug my stuff, and
anyways it took a bit of time but was straightforward. Most of the
debugging
has just been me resolving my misunderstandings about what certain
functions
do or variables are for, which is helpful for me.
Well, we do all get busy, as you've no doubt noticed. Once you hit
mid Sept most of us hunker down to get ready for Cauldron, then spend
time digging out of all the missed work when we get back.
could become
beqz t1, L2
...
.L1:
mv a0, t0
.L2:
ret
where once the linear sequence is determined I look for sequential
rets and rewrite, presumably in cfgrtl mode.
I did _try_ to do this, but it was both less obvious where to put it,
and much harder to figure out how to do correctly.
I can't recall what my last attempt was -- I remember being unsure
which invariants I had to maintain at that stage
and getting some invalid insn stream errors.
I may give this another shot based on what you've said and see if I
can do it this way, rather than the previous way
(though if there is no natural place to put it, I will probably give
it a rest: at least I have had fun exploring!)
Yea, something like that. The complexity here will be you're going to
have to adjust the CFG so that the L1 block doesn't have the
return/barrier and is outgoing edge reaches the L2 block as a fallthru.
But I think that's the form you're basically looking for.
Jeff