Displaying 3 results from an estimated 3 matches for "goto_l1".
Did you mean:
goto_l2
2008 Aug 12
0
[LLVMdev] Eliminating gotos
On Aug 11, 2008, at 2:02 PM, Benedict Gaster wrote:
> We would like to develop a code generator using LLVM for a target
> language that does not support conditional branches and in fact only
> supports structured control flow, eg. If and while.
What's the difference between an "if" and a conditional branch?
> As far as I can tell that the problem with doing this in
2008 Aug 11
3
[LLVMdev] Eliminating gotos
We would like to develop a code generator using LLVM for a target language
that does not support conditional branches and in fact only supports
structured control flow, eg. If and while. As far as I can tell that the
problem with doing this in LLVM today, is that it does not support these
high-level constructs and instead all control flow is implemented as
branches.
It is ³fairly²
2008 Aug 12
4
[LLVMdev] Eliminating gotos
...or example, consider the following
irreducible loop (taken directly from the paper):
if(x) goto L2;
L1:
stmt_1;
L2:
stmt_2;
if(y) goto L1;
Using the algorithm described for goto elimination this can be re-written
as:
goto_L2 = x;
do {
if (!goto_L2) {
goto_L1 = 0;
stmt_1;
}
goto_L2=0;
stmt_2;
goto_L1=y;
} while (goto_L1);
In this case there is additional code for condition variables and the loop
itself but there is no duplication of stmt_1 or stmt_2.
>> --Owen
-------------- next part -------------...