[LLVMdev] FP emulation (continued)

Roman Levenstein romixlev at yahoo.com
Wed Nov 29 11:17:55 PST 2006


Hi,

>> have not found any easy way to do it yet. For post-RA pass it is
>> very easy and supported, but for pre-RA or post-code-selection - it 
>> is non obvious.
> 
> I suggest a third approach:
[snip]
> 3. Write a machine function pass that runs before the RA that
> translates these instructions into libcalls or other integer ops.  
> This would lower the f64 pseudo regs into 2x i32 pseudo regs.  The 
> real RA should never see the bogus f64 regs.

Thanks, this is a good idea. 

But I cannot figure out how to make a machine function pass run
_BEFORE_ the RA. I guess I'm missing something very obvious. 

How do I enforce that a certain machine function pass runs before RA
(LLVM Linear Scan RA in my case)??? I tried to add the RA pass as a
requirement in the getAnalysisUsage() of my machine function pass, but
this does not work, since RA is not registered as a usual pass and uses
a special RA registry instead. Should my machine function pass be
explicitly added to the getAnalysisUsage() of the Linear Scan RA pass?
This would work probably, but it is not too nice, since it would change
the existing LLVM pass in a target-specific way. 

  And BTW, it seems to me that currently new RA passes are not allowed
to derive from the existing ones. If it is correct, why so? Wouldn't it
be nice?

-Roman



 
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com



More information about the llvm-dev mailing list