[LLVMdev] LLVM Instruction Scheduling Pass

Evan Cheng evan.cheng at apple.com
Tue Sep 2 01:24:51 PDT 2008


On Aug 30, 2008, at 2:27 AM, sanjiv gupta wrote:

> On Sat, 2008-08-30 at 00:17 -0700, Evan Cheng wrote:
>> On Aug 29, 2008, at 10:43 AM, sanjiv gupta wrote:
>>
>>> I have two instructions , both have flag dependency onto a common
>>> instruction. So this forms a closed loop. The instruction scheduler
>>> asserts saying that the common instruction is already inserted into
>>> FlaggedNodes list....etc.
>>
>> A flag value cannot be read by two nods. That's not legal.
>>
> I see.
> What's a good way to model instructions that depend on the side-effect
> of an earlier instruction?

Using flag is the right solution. But if you have multiple nodes that  
are dependent on the same flag, you'll have to linearize them. The  
first reader of the flag should produce a flag itself so the second  
reader can read that flag value instead.

Evan

>
>
>
> - Sanjiv
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list