[llvm] Implement *BasicBlockPass::createPrinterPass method

Chandler Carruth chandlerc at google.com
Fri Feb 8 13:38:00 PST 2013


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/b39c8ff4/attachment.html>


More information about the llvm-commits mailing list