[PATCH] D30315: [Driver] Move architecture-specific free helper functions to their own files.

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 27 08:30:03 PST 2017


On Thu, Feb 23, 2017 at 4:08 PM David L. Jones via Phabricator via
cfe-commits <cfe-commits at lists.llvm.org> wrote:

> dlj created this revision.
> Herald added subscribers: mgorny, nemanjai, jyknight, dschuff, srhines,
> danalbert, aemerson.
> Herald added a reviewer: javed.absar.
>
> This patch moves helper functions that are CPU-specific out of Driver.cpp
> and to
> separate implementation files. The new files are named for the
> architecture,
> e.g. ARMArch.cpp.
>

I'm guessing it's probably obvious - but some explanation for the
motivation for the move might be handy. (I'm guessing something like
allowing these pieces to be compiled only when the architecture support is
compiled (in the same way that LLVM targets can be opted in/out, etc)?)


>
> The next step after this will be to move OS-specific code, which I expect
> will
> include many of the tool implementations, to similarly separate files.
>
> Some CPU-specific functions are not being moved just yet. In cases where
> the
> only caller is the platform-specific tools, I plan to move them together.
> An
> example is Hexagon, where the only caller of the architecture-specific
> functions
> are the tools themselves. (I'm happy to revise this choice, it just seems
> like
> less churn to me.)
>
> This does mean that some functions which were previously static are now
> exposed
> through the library header Driver.h.
>
>
> https://reviews.llvm.org/D30315
>
> Files:
>   lib/Driver/AArch64Arch.cpp
>   lib/Driver/ARMArch.cpp
>   lib/Driver/CMakeLists.txt
>   lib/Driver/MipsArch.cpp
>   lib/Driver/PPCArch.cpp
>   lib/Driver/SparcArch.cpp
>   lib/Driver/SystemZArch.cpp
>   lib/Driver/Tools.cpp
>   lib/Driver/Tools.h
>   lib/Driver/X86Arch.cpp
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170227/81fc9190/attachment-0001.html>


More information about the cfe-commits mailing list