[LLVMdev] Choosing Alias Analysis

Devang Patel dpatel at apple.com
Mon Aug 13 10:19:01 PDT 2007


On Aug 10, 2007, at 4:15 PM, David Greene wrote:

> On Friday 10 August 2007 17:55, David Greene wrote:
>> On Friday 10 August 2007 15:12, David Greene wrote:
>>> Perhaps an easier way is to just expose the -simple-register- 
>>> coalescing
>>> and -conservative-register-coalescing options to the user, but I  
>>> don't
>>> know how to do that on an individual pass bases.  opt just jams  
>>> then all
>>> in with PassNameParser.  PassNameParser.h makes reference to a
>>> FilteredPassNameParser that sounds closer to what I want but I  
>>> can't find
>>> the code for that anywhere.
>>
>> I found a fairly elegant way to do this.  I implemented what I  
>> imagine
>> FilteredPassNameParser would be.  If all goes well I'll post a  
>> patch for
>> discussion.
>
> And here it is.  It seems to work well.  Should I commit it?

Is this the complete patch ?

As I understand you want to add llvm-gcc command line option, - 
register-coalescing=<value> where value is either simple or  
conservative or whatever.

In this case you need to get this through llvm-gcc's (i.e. GCC's)  
command line options processing. So, why not take advantage of GCC's  
command line processing setup ? See how -Wformat or Wnormalized or  
other command line option are handled (start from c.opt). Once llvm- 
gcc has processed your new command line option all you need to do in  
llvm-backend.cpp is insert opt level option in llvm_initialize_backend 
(). See how --dsiable-fp-elim is inserted in the pipeline.

-
Devang



More information about the llvm-dev mailing list