[LLVMdev] MachineSink and EFLAGS

Bill Wendling wendling at apple.com
Thu Jun 2 12:58:49 PDT 2011


On Jun 2, 2011, at 3:53 AM, Galanov, Sergey wrote:

> Hi Bill.
> 
> Thank you very much! Now I see my understanding was incorrect :) A dependence from a single physreg-defining instruction (like CMP or TEST) is allowed to be shared in several instructions unless that register is not clobbered (and this is what we have with CMOV_FR64). Wouldn't it be safe then to not set the live-in flag in EmitLoweredSelect for instructions which are marked as defining EFLAGS (like the integer pseudo cmovs)?
> 
Hi Sergey,

I'm not certain what that would buy us. If I understand your suggestion correctly, not setting the EFLAGS as live-in to a basic block would mean that we'd have to execute the instruction to reset the EFLAGS register, right? That would mean more code, longer live ranges, etc.

-bw





More information about the llvm-dev mailing list