Related articles |
---|
Basic blocks and compilers plfriko@yahoo.de (Christian Christmann) (2006-01-07) |
Re: Basic blocks and compilers gneuner2@comcast.net (George Neuner) (2006-01-09) |
Re: Basic blocks and compilers FireMeteor.Guo@gmail.com (FireMeteor.Guo@gmail.com) (2006-01-09) |
Re: Basic blocks and compilers momchil.velikov@gmail.com (2006-01-09) |
Re: Basic blocks and compilers DrDiettrich@compuserve.de (Hans-Peter Diettrich) (2006-01-09) |
Re: Basic blocks and compilers bonzini@gnu.org (Paolo Bonzini) (2006-01-09) |
Re: Basic blocks and compilers kenrose@tfb.com (Ken Rose) (2006-01-09) |
Re: Basic blocks and compilers stephen.clarke@earthling.net (Stephen Clarke) (2006-01-09) |
Re: Basic blocks and compilers lars@bearnip.com (2006-01-09) |
From: | Ken Rose <kenrose@tfb.com> |
Newsgroups: | comp.compilers |
Date: | 9 Jan 2006 23:50:11 -0500 |
Organization: | Posted via Supernews, http://www.supernews.com |
References: | 06-01-009 |
Keywords: | analysis |
Posted-Date: | 09 Jan 2006 23:50:11 EST |
Christian Christmann wrote:
> jlt %d15, %d0, .L5
> j .L3
> I don't understand why the compiler
> 1) is not spliting basic block .L2 into two blocks where
> the second block just contains the instruction "j .L3".
> I though that each re-direction of the control flow imposes the
> creation of a new basic block (like .L4 and .L3). The instuction
> "jlt %d15, %d0, .L5" can possibly direct the program flow to .L5 and
> thus, in my opinion, the basic block should end here.
I'm not familiar with the tricore's instruction set, but this looks like
it really wanted to generate "jge" and perhaps it doesn't exist, or,
more likely, the conditional branch has a very short range and so the
compiler needs to use the longer-range unconditional branch to reach the
target. In either of these cases, the code would be the result of
instruction selection, which takes place after gcc is done with any
thoughts of blocks.
> 2) splits block .L5 and .L4? There are no
> calls to label .L4, so, according to my understanding, all instructions
> of blocks .L5 and .L4 should be held in one block.
Yeah, that does seem to be an unneeded label. There was probably some
reason for it, but it's very hard to guess, particularly without the
source code.
> Might these two points be bugs or do the authors of the tricore-gcc
> have a different definition of basic blocks?
Probably neither. Extra labels do no harm, and the two jumps are
probably caused by one of the mechanisms I mentioned.
- ken
Return to the
comp.compilers page.
Search the
comp.compilers archives again.