[llvm] r246720 - IR: Remove a redundant function. NFC
Daniel Berlin via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 16 15:36:51 PDT 2015
I would like to revert this.
These functions are in fact, quite different.
:)
For example, memoryssa uses the assembly annotation writer to print
out the on-the-side virtual operands at the beginning of basic blocks
so we can use them in tests.
See, e.g, http://reviews.llvm.org/D7864's memoryssaprinter.cpp
There is no way to do this with "module slot tracker" version of
Value.h's print, at all.
(Now, it's my fault for not getting memoryssa in early enough for this
to be noticed, but i'd still like to revert this commit since it will
in fact, be used).
On Wed, Sep 2, 2015 at 3:28 PM, Justin Bogner via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> Author: bogner
> Date: Wed Sep 2 17:28:47 2015
> New Revision: 246720
>
> URL: http://llvm.org/viewvc/llvm-project?rev=246720&view=rev
> Log:
> IR: Remove a redundant function. NFC
>
> Function::print isn't interestingly different from Value::print. Just
> let the only caller (in PrintCallGraphPass) call the Value version.
>
> Modified:
> llvm/trunk/include/llvm/IR/Function.h
> llvm/trunk/lib/IR/AsmWriter.cpp
>
> Modified: llvm/trunk/include/llvm/IR/Function.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Function.h?rev=246720&r1=246719&r2=246720&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/IR/Function.h (original)
> +++ llvm/trunk/include/llvm/IR/Function.h Wed Sep 2 17:28:47 2015
> @@ -524,10 +524,6 @@ public:
> Constant *getPrologueData() const;
> void setPrologueData(Constant *PrologueData);
>
> - /// Print the function to an output stream with an optional
> - /// AssemblyAnnotationWriter.
> - void print(raw_ostream &OS, AssemblyAnnotationWriter *AAW = nullptr) const;
> -
> /// viewCFG - This function is meant for use from the debugger. You can just
> /// say 'call F->viewCFG()' and a ghostview window should pop up from the
> /// program, displaying the CFG of the current function with the code for each
>
> Modified: llvm/trunk/lib/IR/AsmWriter.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/AsmWriter.cpp?rev=246720&r1=246719&r2=246720&view=diff
> ==============================================================================
> --- llvm/trunk/lib/IR/AsmWriter.cpp (original)
> +++ llvm/trunk/lib/IR/AsmWriter.cpp Wed Sep 2 17:28:47 2015
> @@ -3199,13 +3199,6 @@ void AssemblyWriter::printUseLists(const
> // External Interface declarations
> //===----------------------------------------------------------------------===//
>
> -void Function::print(raw_ostream &ROS, AssemblyAnnotationWriter *AAW) const {
> - SlotTracker SlotTable(this->getParent());
> - formatted_raw_ostream OS(ROS);
> - AssemblyWriter W(OS, SlotTable, this->getParent(), AAW);
> - W.printFunction(this);
> -}
> -
> void Module::print(raw_ostream &ROS, AssemblyAnnotationWriter *AAW,
> bool ShouldPreserveUseListOrder) const {
> SlotTracker SlotTable(this);
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list