Author: ahatanak Date: Fri Jul 24 19:18:00 2015 New Revision: 243185 URL: http://llvm.org/viewvc/llvm-project?rev=243185&view=rev Log: [AArch64] Pass subtarget feature "+reserve-x18" instead of passing backend option "-aarch64-reserve-x18".
This change is needed since backend options do not make it to the backend when doing LTO and are not capable of changing the behavior of code-gen passes on a per-function basis. rdar://problem/21529937 Differential Revision: http://reviews.llvm.org/D11462 Modified: cfe/trunk/lib/Driver/Tools.cpp Modified: cfe/trunk/lib/Driver/Tools.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=243185&r1=243184&r2=243185&view=diff ============================================================================== --- cfe/trunk/lib/Driver/Tools.cpp (original) +++ cfe/trunk/lib/Driver/Tools.cpp Fri Jul 24 19:18:00 2015 @@ -919,11 +919,6 @@ void Clang::AddAArch64TargetArgs(const A 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 @@ static void getAArch64TargetFeatures(con 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, _______________________________________________ cfe-commits mailing list cfe-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits