diff options
author | Andrew Savonichev <andrew.savonichev@intel.com> | 2018-11-07 18:34:19 +0000 |
---|---|---|
committer | Andrew Savonichev <andrew.savonichev@intel.com> | 2018-11-07 18:34:19 +0000 |
commit | 3b12b7e702b2647593f234e8b06757ba19fec663 (patch) | |
tree | 3bd5a6b0f9a2f3bb7ed3464bc3cc64c213457e70 /clang/lib/Sema/SemaInit.cpp | |
parent | d47d188b6ff1800c126f97f9759267219ceaf9fd (diff) | |
download | bcm5719-llvm-3b12b7e702b2647593f234e8b06757ba19fec663.tar.gz bcm5719-llvm-3b12b7e702b2647593f234e8b06757ba19fec663.zip |
Revert r346326 [OpenCL] Add support of cl_intel_device_side_avc_motion_estimation
This patch breaks Index/opencl-types.cl LIT test:
Script:
--
: 'RUN: at line 1'; stage1/bin/c-index-test -test-print-type llvm/tools/clang/test/Index/opencl-types.cl -cl-std=CL2.0 | stage1/bin/FileCheck llvm/tools/clang/test/Index/opencl-types.cl
--
Command Output (stderr):
--
llvm/tools/clang/test/Index/opencl-types.cl:3:26: warning: unsupported OpenCL extension 'cl_khr_fp16' - ignoring [-Wignored-pragmas]
llvm/tools/clang/test/Index/opencl-types.cl:4:26: warning: unsupported OpenCL extension 'cl_khr_fp64' - ignoring [-Wignored-pragmas]
llvm/tools/clang/test/Index/opencl-types.cl:8:9: error: use of type 'double' requires cl_khr_fp64 extension to be enabled
llvm/tools/clang/test/Index/opencl-types.cl:11:8: error: declaring variable of type 'half' is not allowed
llvm/tools/clang/test/Index/opencl-types.cl:15:3: error: use of type 'double' requires cl_khr_fp64 extension to be enabled
llvm/tools/clang/test/Index/opencl-types.cl:16:3: error: use of type 'double4' (vector of 4 'double' values) requires cl_khr_fp64 extension to be enabled
llvm/tools/clang/test/Index/opencl-types.cl:26:26: warning: unsupported OpenCL extension 'cl_khr_gl_msaa_sharing' - ignoring [-Wignored-pragmas]
llvm/tools/clang/test/Index/opencl-types.cl:35:44: error: use of type '__read_only image2d_msaa_t' requires cl_khr_gl_msaa_sharing extension to be enabled
llvm/tools/clang/test/Index/opencl-types.cl:36:49: error: use of type '__read_only image2d_array_msaa_t' requires cl_khr_gl_msaa_sharing extension to be enabled
llvm/tools/clang/test/Index/opencl-types.cl:37:49: error: use of type '__read_only image2d_msaa_depth_t' requires cl_khr_gl_msaa_sharing extension to be enabled
llvm/tools/clang/test/Index/opencl-types.cl:38:54: error: use of type '__read_only image2d_array_msaa_depth_t' requires cl_khr_gl_msaa_sharing extension to be enabled
llvm-svn: 346338
Diffstat (limited to 'clang/lib/Sema/SemaInit.cpp')
-rw-r--r-- | clang/lib/Sema/SemaInit.cpp | 35 |
1 files changed, 4 insertions, 31 deletions
diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp index 11a1f8509a1..1e4d12d20cd 100644 --- a/clang/lib/Sema/SemaInit.cpp +++ b/clang/lib/Sema/SemaInit.cpp @@ -1192,10 +1192,6 @@ void InitListChecker::CheckListElementTypes(const InitializedEntity &Entity, if (!VerifyOnly) SemaRef.Diag(IList->getBeginLoc(), diag::err_init_objc_class) << DeclType; hadError = true; - } else if (DeclType->isOCLIntelSubgroupAVCType()) { - // Checks for scalar type are sufficient for these types too. - CheckScalarType(Entity, IList, DeclType, Index, StructuredList, - StructuredIndex); } else { if (!VerifyOnly) SemaRef.Diag(IList->getBeginLoc(), diag::err_illegal_initializer_type) @@ -5256,11 +5252,6 @@ static bool TryOCLSamplerInitialization(Sema &S, return true; } -static bool IsZeroInitializer(Expr *Initializer, Sema &S) { - return Initializer->isIntegerConstantExpr(S.getASTContext()) && - (Initializer->EvaluateKnownConstInt(S.getASTContext()) == 0); -} - static bool TryOCLZeroOpaqueTypeInitialization(Sema &S, InitializationSequence &Sequence, QualType DestType, @@ -5277,23 +5268,8 @@ static bool TryOCLZeroOpaqueTypeInitialization(Sema &S, // event should be zero. // if (DestType->isEventT() || DestType->isQueueT()) { - if (!IsZeroInitializer(Initializer, S)) - return false; - - Sequence.AddOCLZeroOpaqueTypeStep(DestType); - return true; - } - - // We should allow zero initialization for all types defined in the - // cl_intel_device_side_avc_motion_estimation extension, except - // intel_sub_group_avc_mce_payload_t and intel_sub_group_avc_mce_result_t. - if (S.getOpenCLOptions().isEnabled( - "cl_intel_device_side_avc_motion_estimation") && - DestType->isOCLIntelSubgroupAVCType()) { - if (DestType->isOCLIntelSubgroupAVCMcePayloadType() || - DestType->isOCLIntelSubgroupAVCMceResultType()) - return false; - if (!IsZeroInitializer(Initializer, S)) + if (!Initializer->isIntegerConstantExpr(S.getASTContext()) || + (Initializer->EvaluateKnownConstInt(S.getASTContext()) != 0)) return false; Sequence.AddOCLZeroOpaqueTypeStep(DestType); @@ -8050,9 +8026,7 @@ InitializationSequence::Perform(Sema &S, // defined in SPIR spec v1.2 and also opencl-c.h unsigned AddressingMode = (0x0E & SamplerValue) >> 1; unsigned FilterMode = (0x30 & SamplerValue) >> 4; - if (FilterMode != 1 && FilterMode != 2 && - !S.getOpenCLOptions().isEnabled( - "cl_intel_device_side_avc_motion_estimation")) + if (FilterMode != 1 && FilterMode != 2) S.Diag(Kind.getLocation(), diag::warn_sampler_initializer_invalid_bits) << "Filter Mode"; @@ -8069,8 +8043,7 @@ InitializationSequence::Perform(Sema &S, break; } case SK_OCLZeroOpaqueType: { - assert((Step->Type->isEventT() || Step->Type->isQueueT() || - Step->Type->isOCLIntelSubgroupAVCType()) && + assert((Step->Type->isEventT() || Step->Type->isQueueT()) && "Wrong type for initialization of OpenCL opaque type."); CurInit = S.ImpCastExprToType(CurInit.get(), Step->Type, |