Related articles |
---|
[25 earlier articles] |
Re: Using C as a back end kst@cts.com (Keith Thompson) (2000-11-01) |
Re: Using C as a back end rhyde@cs.ucr.edu (Randall Hyde) (2000-11-01) |
Re: Using C as a back end rhyde@cs.ucr.edu (Randall Hyde) (2000-11-01) |
Re: Using C as a back end vbdis@aol.com (2000-11-04) |
Re: Using C as a back end joachim_d@gmx.de (Joachim Durchholz) (2000-11-04) |
Re: Using C as a back end thp@roam-thp2.cs.ucr.edu (Tom Payne) (2000-11-04) |
Re: Using C as a back end gneuner@dyn.com (2000-11-04) |
Re: Using C as a back end fjh@cs.mu.OZ.AU (2000-11-05) |
Re: Using C as a back end freitag@alancoxonachip.com (Andi Kleen) (2000-11-05) |
Re: Using C as a back end christl@rosalind.fmi.uni-passau.de (2000-11-05) |
From: | gneuner@dyn.com (George Neuner) |
Newsgroups: | comp.compilers |
Date: | 4 Nov 2000 01:46:29 -0500 |
Organization: | Dynamic ReSolutions, Inc. |
References: | 00-10-148 00-10-174 00-10-182 |
Keywords: | C, optimize |
Posted-Date: | 04 Nov 2000 01:46:28 EST |
On 23 Oct 2000 21:59:42 -0400, sjmeyer@www.tdl.com (Steve Meyer)
wrote:
>But it turns out most statements in Verilog are independent so
>optimizer does not really need to look for basic blocks across Verilog
>statement boundaries. Is there a way to tell C compiler optimizer
>about this property? I have tried surrouding C statements with extra
>level block ({}) with no declarations but it does ont seem to help.
>Breaking long sections into multiple procedures seems to be even worse
>because there are many context C variables needed in Verilog execution
>so procudural call over head slows down exection speed.
Curly braces are only scoping clues. Blocks end whenever there is a
branch in the code - you might try tricking the compiler by something
like the following:
A: <code for verilog statement>
goto B;
B: <code for verilog statement>
goto C:
C: ...
It looks stupid, but the compiler might take the hint. Hopefully the
useless jumps would be eliminated by the optimizer.
Another way would be to bundle all the state variables into a
structure and generate a separate, one parameter function for each
verilog statement which explicitly tail calls the next function. Also
sounds stupid, but GCC will *sometimes* understand this and optimize
the function calls away.
Your mileage may vary.
George Neuner
Dynamic Resolutions, Inc.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.