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

2017-02-27 Thread David Blaikie via cfe-commits
On Thu, Feb 23, 2017 at 4:08 PM David L. Jones via Phabricator via
cfe-commits  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@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2017-02-23 Thread Richard Smith via Phabricator via cfe-commits
rsmith accepted this revision.
rsmith added a comment.
This revision is now accepted and ready to land.

It might make sense to move the *Arch.cpp files to a subdirectory of 
lib/Driver, but otherwise this looks good.


https://reviews.llvm.org/D30315



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits