[LLVMdev] [PATCH] Before/After IR Dumps

Chris Lattner clattner at apple.com
Mon Mar 29 10:08:45 PDT 2010


On Mar 29, 2010, at 8:36 AM, David Greene wrote:

> On Friday 26 March 2010 18:19:07 Chris Lattner wrote:
> 
>>> Any additional feedback from anyone?
>> 
>> This is looking much better, thanks.  I'd still prefer using StringRef
>> instead of std::string here because it cleans up the interface, but I won't
>> insist.
> 
> Wouldn't using StringRef actually cause more constructors to be invoked 
> to manage the type conversions?

StringRef has a trivial inline constructor.  I'm not sure what you're worried about here.

> The alternative is to move all interfaces over to StringRef but I don't think
> that's in the scope of this patch.

As I said, I don't strongly care.

>> move the end of the anon namespace up.  It might also be better to just
>> make this take a list of strings, which would allow you to collapse these
>> to support -print-before=all and -print-after=all.
> 
> Interesting idea.  I'll think about it for a follow-on patch.

Sure.

>> Your patch doesn't include the file that defines
>> createMachineFunctionPrinterPass, but I assume it's fine.
> 
> Odd.  This was a patch generated from a clean upstream.  It built fine.  I'll
> see if maybe I missed something.

I think it's just missing from the patch you sent, maybe it didn't get svn added.

> 
>> After making these changes, please test the resultant patch against
>> mainline with just the patch applied and commit if it looks ok.  Thanks
>> David,
> 
> Will do.

Thanks!

-Chris



More information about the llvm-dev mailing list