[LLVMdev] Fwd: LLVM IR Branchs

Rafael Baldiati Parizi parizi.computacao at gmail.com
Mon Sep 5 18:20:59 PDT 2011


Ok!  I do understand.
Thanks by help!

2011/9/5 Justin Holewinski <justin.holewinski at gmail.com>

> On Mon, Sep 5, 2011 at 8:37 PM, Rafael Baldiati Parizi <
> parizi.computacao at gmail.com> wrote:
>
>> Yes, that's how I'm doing now ... create a new block where the execution
>> flow will continue after the shift, following the basics of basic blocks.
>> But, I want to find a way to reduce the number of block of my code.
>
>
> Why do you want to reduce the number of LLVM IR blocks?  Just because LLVM
> IR does not have fall-through branches does not mean that the generated code
> will not have them.  As mentioned before, this is just a level of
> abstraction used in the LLVM IR.
>
>
>>
>>
>> 2011/9/5 Nick Lewycky <nicholas at mxc.ca>
>>
>>> Rafael Baldiati Parizi wrote:
>>>
>>>> I have two values and I want see if them are equals. Then, I would a
>>>> instruction like
>>>> if Value1 != Value2, error
>>>> without create a new block, continuing the execution in the same block,
>>>> forcing the LLI to execute this.
>>>>
>>>
>>> You can not. The definition of a "basic block" is a sequence of
>>> instructions with a single entry and a single exit. You can not insert
>>> multiple exits within a basic block.
>>>
>>> I realize that this restriction feels arbitrary, but there's a vast
>>> amount of research and practical experience in compiler design built around
>>> the notion of basic blocks making up a control flow graph.
>>>
>>> Nick
>>>
>>>  2011/9/5 Eli Friedman <eli.friedman at gmail.com
>>>> <mailto:eli.friedman at gmail.com**>>
>>>>
>>>>
>>>>    On Mon, Sep 5, 2011 at 4:47 PM, Rafael Baldiati Parizi
>>>>    <parizi.computacao at gmail.com <mailto:parizi.computacao@**gmail.com<parizi.computacao at gmail.com>
>>>> >>
>>>>
>>>>    wrote:
>>>>     > Hello,
>>>>     > I would know how can I make a branch in llvm ir without a label of
>>>>     > destination?
>>>>     > For example:
>>>>     > br i1 %1, label %bb,  NO LABEL HERE
>>>>
>>>>    What are you trying to do?
>>>>
>>>>    -Eli
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> */Rafael Parizi/*
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> ______________________________**_________________
>>>> LLVM Developers mailing list
>>>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>>>> http://lists.cs.uiuc.edu/**mailman/listinfo/llvmdev<http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev>
>>>>
>>>
>>>
>>
>>
>> --
>> *Rafael Parizi*
>>
>>
>>
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>
>>
>
>
> --
>
> Thanks,
>
> Justin Holewinski
>
>


-- 
*Rafael Parizi*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110905/d82d1a52/attachment.html>


More information about the llvm-dev mailing list