Displaying 2 results from an estimated 2 matches for "tmp_var".
Did you mean:
tmp_val
2010 Apr 06
2
[LLVMdev] Get the loop trip count variable
...lue)
...
for (int i=0; i<num; i++)
of course, this may have some side effects. If the trip count is a
function call, and I need to rewrite the loop header to avoid calling
the function twice. For example, if the loop header is:
for (int i=0; i<foo(a,b,c); i++)
then I should rewrite it as:
tmp_var = foo(a,b,c);
dumpInfo(...)
for (int i=0; i<tmp_var; i++)
{
...
tmp_var=foo(a,b,c);
}
This looks quite complicated!
Does anyone has any ideal about how easy to insert some basic blocks
and to rewrite the loop header in LLVM?
Cheers,
Zheng
On 6 April 2010 17:27, Zakk <zakk0610 at...
2010 Apr 06
0
[LLVMdev] Get the loop trip count variable
...; of course, this may have some side effects. If the trip count is a
> function call, and I need to rewrite the loop header to avoid calling
> the function twice. For example, if the loop header is:
>
> for (int i=0; i<foo(a,b,c); i++)
>
> then I should rewrite it as:
>
> tmp_var = foo(a,b,c);
> dumpInfo(...)
>
> for (int i=0; i<tmp_var; i++)
> {
> ...
> tmp_var=foo(a,b,c);
> }
>
> This looks quite complicated!
>
> Does anyone has any ideal about how easy to insert some basic blocks
> and to rewrite the loop header in LLVM?
>
&...