LLVM Instruction Scheduling Pass

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.

Where can I get more info about the LLVM Instr scheduling pass?

TIA,
- Sanjiv

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.

Where can I get more info about the LLVM Instr scheduling pass?

This is the right place to ask questions.

Evan

I see.
What's a good way to model instructions that depend on the side-effect
of an earlier instruction?

- Sanjiv

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