[PATCH] D11462: [AArch64] Pass subtarget feature "+reserve-x18"
Eric Christopher
echristo at gmail.com
Thu Jul 23 10:07:03 PDT 2015
Do we accept the inverse option here? (If not, why not?) If so, this will
add it in places it isn't supposed to go.
-eric
On Thu, Jul 23, 2015, 8:07 AM Akira Hatanaka <ahatanak at gmail.com> wrote:
> ahatanak created this revision.
> ahatanak added reviewers: echristo, dexonsmith.
> ahatanak added a subscriber: cfe-commits.
> Herald added subscribers: rengolin, aemerson.
>
> This patch changes clang driver to pass subtarget feature "+reserve-x18"
> instead of passing backend option "-aarch64-reserve-x18". This is needed
> since backend options do not make it to the backend when doing LTO.
>
> http://reviews.llvm.org/D11462
>
> Files:
> lib/Driver/Tools.cpp
> test/Driver/aarch64-fixed-x18.c
>
> Index: test/Driver/aarch64-fixed-x18.c
> ===================================================================
> --- test/Driver/aarch64-fixed-x18.c
> +++ test/Driver/aarch64-fixed-x18.c
> @@ -1,4 +1,4 @@
> // RUN: %clang -target aarch64-none-gnu -ffixed-x18 -### %s 2> %t
> // RUN: FileCheck --check-prefix=CHECK-FIXED-X18 < %t %s
>
> -// CHECK-FIXED-X18: "-backend-option" "-aarch64-reserve-x18"
> +// CHECK-FIXED-X18: "-target-feature" "+reserve-x18"
> Index: lib/Driver/Tools.cpp
> ===================================================================
> --- lib/Driver/Tools.cpp
> +++ lib/Driver/Tools.cpp
> @@ -919,11 +919,6 @@
> else
> CmdArgs.push_back("-aarch64-global-merge=true");
> }
> -
> - if (Args.hasArg(options::OPT_ffixed_x18)) {
> - CmdArgs.push_back("-backend-option");
> - CmdArgs.push_back("-aarch64-reserve-x18");
> - }
> }
>
> // Get CPU and ABI names. They are not independent
> @@ -1971,6 +1966,9 @@
> else
> Features.push_back("-crc");
> }
> +
> + if (Args.hasArg(options::OPT_ffixed_x18))
> + Features.push_back("+reserve-x18");
> }
>
> static void getTargetFeatures(const Driver &D, const llvm::Triple &Triple,
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150723/c4a6549d/attachment.html>
More information about the cfe-commits
mailing list