[llvm] r313947 - HexagonVectorLoopCarriedReuse.cpp: Apply LLVM_ATTRIBUTE_UNUSED. [-Wunused-function]

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 25 10:26:55 PDT 2017


Why are these functions unused? IF they're only used in assert or similar,
perhaps they should be in #ifndef NDEBUG?

On Thu, Sep 21, 2017 at 6:03 PM NAKAMURA Takumi via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: chapuni
> Date: Thu Sep 21 18:01:33 2017
> New Revision: 313947
>
> URL: http://llvm.org/viewvc/llvm-project?rev=313947&view=rev
> Log:
> HexagonVectorLoopCarriedReuse.cpp: Apply LLVM_ATTRIBUTE_UNUSED.
> [-Wunused-function]
>
> Modified:
>     llvm/trunk/lib/Target/Hexagon/HexagonVectorLoopCarriedReuse.cpp
>
> Modified: llvm/trunk/lib/Target/Hexagon/HexagonVectorLoopCarriedReuse.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonVectorLoopCarriedReuse.cpp?rev=313947&r1=313946&r2=313947&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/Hexagon/HexagonVectorLoopCarriedReuse.cpp
> (original)
> +++ llvm/trunk/lib/Target/Hexagon/HexagonVectorLoopCarriedReuse.cpp Thu
> Sep 21 18:01:33 2017
> @@ -183,6 +183,7 @@ namespace {
>     friend raw_ostream &operator<< (raw_ostream &OS, const DepChain &D);
>    };
>
> +  LLVM_ATTRIBUTE_UNUSED
>    raw_ostream &operator<<(raw_ostream &OS, const DepChain &D) {
>      const ChainOfDependences &CD = D.Chain;
>      int ChainSize = CD.size();
> @@ -206,6 +207,7 @@ namespace {
>      bool isDefined() { return Inst2Replace != nullptr; }
>    };
>    typedef struct ReuseValue ReuseValue;
> +  LLVM_ATTRIBUTE_UNUSED
>    raw_ostream &operator<<(raw_ostream &OS, const ReuseValue &RU) {
>      OS << "** ReuseValue ***\n";
>      OS << "Instruction to Replace: " << *(RU.Inst2Replace) << "\n";
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170925/a7fe783f/attachment.html>


More information about the llvm-commits mailing list