r232533 - Add fveclib option.
Michael Zolotukhin
mzolotukhin at apple.com
Tue Mar 17 14:29:36 PDT 2015
> On Mar 17, 2015, at 2:27 PM, Filipe Cabecinhas <filcab at gmail.com> wrote:
>
> It might have been that the problem, yes. Looking at the included commits, there's a gap between the last llvm one this build had, and the last commit on clang.
>
> Right now the bot has updated some more times and is green. Sorry about the noise.
>
> Thanks!
Great, thank you!
Michael
>
> Filipe
>
> On Tue, Mar 17, 2015 at 2:10 PM, Michael Zolotukhin <mzolotukhin at apple.com <mailto:mzolotukhin at apple.com>> wrote:
> Hi Filipe,
>
> Could it be that clang repo is newer, than the llvm repo?
>
> From the error messages it looks like clang-repo has been updated, while the llvm-repo is missing one commit.
>
> Thanks,
> Michael
>
>> On Mar 17, 2015, at 1:43 PM, Filipe Cabecinhas <filcab at gmail.com <mailto:filcab at gmail.com>> wrote:
>>
>> Hi Michael,
>>
>> This breaks Windows, I guess you need to explicitly name the enum:
>> C:\Buildbot\Slave\builds\1.LLVM.Windows.Phase.4\clang.src\lib\CodeGen\BackendUtil.cpp(243): error C2039: 'addVectorizableFunctionsFromVecLib' : is not a member of 'llvm::TargetLibraryInfoImpl' [C:\Buildbot\Slave\builds\1.LLVM.Windows.Phase.4\llvm.obj\tools\clang\lib\CodeGen\clangCodeGen.vcxproj]
>> C:\Buildbot\Slave\builds\1.LLVM.Windows.Phase.4\llvm.src\include\llvm/Analysis/TargetLibraryInfo.h(38) : see declaration of 'llvm::TargetLibraryInfoImpl'
>> C:\Buildbot\Slave\builds\1.LLVM.Windows.Phase.4\clang.src\lib\CodeGen\BackendUtil.cpp(243): error C2039: 'Accelerate' : is not a member of 'llvm::TargetLibraryInfoImpl' [C:\Buildbot\Slave\builds\1.LLVM.Windows.Phase.4\llvm.obj\tools\clang\lib\CodeGen\clangCodeGen.vcxproj]
>> C:\Buildbot\Slave\builds\1.LLVM.Windows.Phase.4\llvm.src\include\llvm/Analysis/TargetLibraryInfo.h(38) : see declaration of 'llvm::TargetLibraryInfoImpl'
>> C:\Buildbot\Slave\builds\1.LLVM.Windows.Phase.4\clang.src\lib\CodeGen\BackendUtil.cpp(243): error C2065: 'Accelerate' : undeclared identifier [C:\Buildbot\Slave\builds\1.LLVM.Windows.Phase.4\llvm.obj\tools\clang\lib\CodeGen\clangCodeGen.vcxproj]
>>
>> Thanks,
>>
>> Filipe
>>
>> On Tue, Mar 17, 2015 at 1:03 PM, Michael Zolotukhin <mzolotukhin at apple.com <mailto:mzolotukhin at apple.com>> wrote:
>> Author: mzolotukhin
>> Date: Tue Mar 17 15:03:11 2015
>> New Revision: 232533
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=232533&view=rev <http://llvm.org/viewvc/llvm-project?rev=232533&view=rev>
>> Log:
>> Add fveclib option.
>>
>> Review: http://reviews.llvm.org/D8097 <http://reviews.llvm.org/D8097>
>>
>> Added:
>> cfe/trunk/test/Driver/fveclib.c
>> Modified:
>> cfe/trunk/include/clang/Driver/Options.td
>> cfe/trunk/include/clang/Frontend/CodeGenOptions.def
>> cfe/trunk/include/clang/Frontend/CodeGenOptions.h
>> cfe/trunk/lib/CodeGen/BackendUtil.cpp
>> cfe/trunk/lib/Driver/Tools.cpp
>> cfe/trunk/lib/Frontend/CompilerInvocation.cpp
>>
>> Modified: cfe/trunk/include/clang/Driver/Options.td
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=232533&r1=232532&r2=232533&view=diff <http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=232533&r1=232532&r2=232533&view=diff>
>> ==============================================================================
>> --- cfe/trunk/include/clang/Driver/Options.td (original)
>> +++ cfe/trunk/include/clang/Driver/Options.td Tue Mar 17 15:03:11 2015
>> @@ -756,6 +756,8 @@ def fno_exceptions : Flag<["-"], "fno-ex
>> def fno_gnu_keywords : Flag<["-"], "fno-gnu-keywords">, Group<f_Group>, Flags<[CC1Option]>;
>> def fno_inline_functions : Flag<["-"], "fno-inline-functions">, Group<f_clang_Group>, Flags<[CC1Option]>;
>> def fno_inline : Flag<["-"], "fno-inline">, Group<f_clang_Group>, Flags<[CC1Option]>;
>> +def fveclib : Joined<["-"], "fveclib=">, Group<f_Group>, Flags<[CC1Option]>,
>> + HelpText<"Use the given vector functions library">;
>> def fno_lax_vector_conversions : Flag<["-"], "fno-lax-vector-conversions">, Group<f_Group>,
>> HelpText<"Disallow implicit conversions between vectors with a different number of elements or different element types">, Flags<[CC1Option]>;
>> def fno_merge_all_constants : Flag<["-"], "fno-merge-all-constants">, Group<f_Group>,
>>
>> Modified: cfe/trunk/include/clang/Frontend/CodeGenOptions.def
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/CodeGenOptions.def?rev=232533&r1=232532&r2=232533&view=diff <http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/CodeGenOptions.def?rev=232533&r1=232532&r2=232533&view=diff>
>> ==============================================================================
>> --- cfe/trunk/include/clang/Frontend/CodeGenOptions.def (original)
>> +++ cfe/trunk/include/clang/Frontend/CodeGenOptions.def Tue Mar 17 15:03:11 2015
>> @@ -162,6 +162,9 @@ VALUE_CODEGENOPT(DwarfVersion, 3, 0)
>> /// The kind of inlining to perform.
>> ENUM_CODEGENOPT(Inlining, InliningMethod, 2, NoInlining)
>>
>> +// Vector functions library to use.
>> +ENUM_CODEGENOPT(VecLib, VectorLibrary, 1, NoLibrary)
>> +
>> /// The default TLS model to use.
>> ENUM_CODEGENOPT(DefaultTLSModel, TLSModel, 2, GeneralDynamicTLSModel)
>>
>>
>> Modified: cfe/trunk/include/clang/Frontend/CodeGenOptions.h
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/CodeGenOptions.h?rev=232533&r1=232532&r2=232533&view=diff <http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/CodeGenOptions.h?rev=232533&r1=232532&r2=232533&view=diff>
>> ==============================================================================
>> --- cfe/trunk/include/clang/Frontend/CodeGenOptions.h (original)
>> +++ cfe/trunk/include/clang/Frontend/CodeGenOptions.h Tue Mar 17 15:03:11 2015
>> @@ -46,6 +46,11 @@ public:
>> OnlyAlwaysInlining // Only run the always inlining pass.
>> };
>>
>> + enum VectorLibrary {
>> + NoLibrary, // Don't use any vector library.
>> + Accelerate // Use the Accelerate framework.
>> + };
>> +
>> enum ObjCDispatchMethodKind {
>> Legacy = 0,
>> NonLegacy = 1,
>>
>> Modified: cfe/trunk/lib/CodeGen/BackendUtil.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/BackendUtil.cpp?rev=232533&r1=232532&r2=232533&view=diff <http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/BackendUtil.cpp?rev=232533&r1=232532&r2=232533&view=diff>
>> ==============================================================================
>> --- cfe/trunk/lib/CodeGen/BackendUtil.cpp (original)
>> +++ cfe/trunk/lib/CodeGen/BackendUtil.cpp Tue Mar 17 15:03:11 2015
>> @@ -237,6 +237,14 @@ static TargetLibraryInfoImpl *createTLII
>> TargetLibraryInfoImpl *TLII = new TargetLibraryInfoImpl(TargetTriple);
>> if (!CodeGenOpts.SimplifyLibCalls)
>> TLII->disableAllFunctions();
>> +
>> + switch (CodeGenOpts.getVecLib()) {
>> + case CodeGenOptions::Accelerate:
>> + TLII->addVectorizableFunctionsFromVecLib(TargetLibraryInfoImpl::Accelerate);
>> + break;
>> + default:
>> + break;
>> + }
>> return TLII;
>> }
>>
>>
>> Modified: cfe/trunk/lib/Driver/Tools.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=232533&r1=232532&r2=232533&view=diff <http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=232533&r1=232532&r2=232533&view=diff>
>> ==============================================================================
>> --- cfe/trunk/lib/Driver/Tools.cpp (original)
>> +++ cfe/trunk/lib/Driver/Tools.cpp Tue Mar 17 15:03:11 2015
>> @@ -2864,6 +2864,8 @@ void Clang::ConstructJob(Compilation &C,
>> else
>> CmdArgs.push_back(Args.MakeArgString(getToolChain().getThreadModel()));
>>
>> + Args.AddLastArg(CmdArgs, options::OPT_fveclib);
>> +
>> if (!Args.hasFlag(options::OPT_fmerge_all_constants,
>> options::OPT_fno_merge_all_constants))
>> CmdArgs.push_back("-fno-merge-all-constants");
>>
>> Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=232533&r1=232532&r2=232533&view=diff <http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=232533&r1=232532&r2=232533&view=diff>
>> ==============================================================================
>> --- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
>> +++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Tue Mar 17 15:03:11 2015
>> @@ -367,6 +367,16 @@ static bool ParseCodeGenArgs(CodeGenOpti
>> Opts.setInlining(Args.hasArg(OPT_fno_inline_functions) ?
>> CodeGenOptions::OnlyAlwaysInlining : Opts.getInlining());
>>
>> + if (Arg *A = Args.getLastArg(OPT_fveclib)) {
>> + StringRef Name = A->getValue();
>> + if (Name == "Accelerate")
>> + Opts.setVecLib(CodeGenOptions::Accelerate);
>> + else if (Name == "none")
>> + Opts.setVecLib(CodeGenOptions::NoLibrary);
>> + else
>> + Diags.Report(diag::err_drv_invalid_value) << A->getAsString(Args) << Name;
>> + }
>> +
>> if (Args.hasArg(OPT_gline_tables_only)) {
>> Opts.setDebugInfo(CodeGenOptions::DebugLineTablesOnly);
>> } else if (Args.hasArg(OPT_g_Flag) || Args.hasArg(OPT_gdwarf_2) ||
>>
>> Added: cfe/trunk/test/Driver/fveclib.c
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/fveclib.c?rev=232533&view=auto <http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/fveclib.c?rev=232533&view=auto>
>> ==============================================================================
>> --- cfe/trunk/test/Driver/fveclib.c (added)
>> +++ cfe/trunk/test/Driver/fveclib.c Tue Mar 17 15:03:11 2015
>> @@ -0,0 +1,8 @@
>> +// RUN: %clang -### -c -fveclib=none %s 2>&1 | FileCheck -check-prefix CHECK-NOLIB %s
>> +// RUN: %clang -### -c -fveclib=Accelerate %s 2>&1 | FileCheck -check-prefix CHECK-ACCELERATE %s
>> +// RUN: not %clang -c -fveclib=something %s 2>&1 | FileCheck -check-prefix CHECK-INVALID %s
>> +
>> +// CHECK-NOLIB: "-fveclib=none"
>> +// CHECK-ACCELERATE: "-fveclib=Accelerate"
>> +
>> +// CHECK-INVALID: error: invalid value 'something' in '-fveclib=something'
>>
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu <mailto:cfe-commits at cs.uiuc.edu>
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits <http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150317/4fb81410/attachment.html>
More information about the cfe-commits
mailing list