[llvm] Implement *BasicBlockPass::createPrinterPass method

Sergei Larin slarin at codeaurora.org
Fri Feb 8 14:21:01 PST 2013


Chandler,

 

  Thanks for the quick review. Please see if this is better. Thanks again.

 

Sergei

 

---

Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation

 

From: Chandler Carruth [mailto:chandlerc at google.com] 
Sent: Friday, February 08, 2013 3:38 PM
To: Sergei Larin
Cc: Commit Messages and Patches for LLVM
Subject: Re: [llvm] Implement *BasicBlockPass::createPrinterPass method

 

LGTM with one tweak:

 

+  /// createPrintBBPass - Create and return a pass that writes the

+  /// BB to the specified raw_ostream.

+  BasicBlockPass *createPrintBBPass(raw_ostream *OS,

+                                    bool DeleteStream=false,

+                                    const std::string &Banner = ""); 

 } // End llvm namespace

 

In the expected "public" interface, I would expand BB to BasicBlock. So, 'createPrintBasicBlockPass'.

 

I'm fine with the internal class name being 'PrintBBPass' or whatever is convenient to type. =]

 

On Fri, Feb 8, 2013 at 1:16 PM, Sergei Larin <slarin at codeaurora.org> wrote:

Hello everyone,

  I am not precisely sure who owns this code (lib/IR/Pass.cpp ...sorry...),
and I am not sure why to this moment we did not have
BasicBlockPass::createPrinterPass() defined, but I got a nasty surprise when
trying to combine -mllvm -print-after-all with -mllvm -vectorize for
clang...

   The implementation seemed straightforward, so I just decided to do it and
then ask for background later. So... If it is as harmless as I think it is,
please review and OK the patch. If it should not be done for some reason, or
should be implemented differently, please let me know.

Thanks a lot.

Sergei Larin

---
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by
The Linux Foundation


_______________________________________________
llvm-commits mailing list
llvm-commits at cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130208/06b34ed8/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: print_bb_pass.patch
Type: application/octet-stream
Size: 5018 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130208/06b34ed8/attachment.obj>


More information about the llvm-commits mailing list