[PATCH] D53023: Prototype OpenCL BIFs using Tablegen

2018-12-11 Thread Nicola Zaghen via Phabricator via cfe-commits
Nicola added a comment.

This looks quite useful, thanks for taking time to do it! I can help verifying 
some of the tablegen'd builtins with internal tests too, if you decide to 
pursue this further.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D53023/new/

https://reviews.llvm.org/D53023



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


[PATCH] D60763: Prototype OpenCL BIFs using Tablegen

2019-04-25 Thread Nicola Zaghen via Phabricator via cfe-commits
Nicola added inline comments.



Comment at: clang/include/clang/Basic/OpenCLBuiltins.td:140-144
+class RoundingModes {
+  list Modes = !if(!or(_Ty1.HasRounding, _Ty2.HasRounding),
+  ["", "_rte", "_rtz", "_rtp", "_rtn"],
+  [""]);
+}

I think the CL standard (1.2, section 6.2.3.2) specifies that RoundingModes 
should be available on all convert_ functions, not only selectively based on 
types: "Conversions may have an optional rounding mode modifier described in 
table 6.6. "



Comment at: clang/include/clang/Basic/OpenCLBuiltins.td:211-212
+  def float_t   : Type<"float", QualType<"field", "FloatTy">>;
+  def double_t  : Type<"double", QualType<"field", "DoubleTy">>;
+  def half_t: Type<"half", QualType<"field", "HalfTy">>;
+}

Can half and double types and builtins be made dependent on extensions or 
configurable? The half datatype needs the cl_khr_fp16 extension, while double 
needs CL_DEVICE_DOUBLE_FP_CONFIG or cl_khr_fp64


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60763/new/

https://reviews.llvm.org/D60763



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


[PATCH] D60763: Prototype OpenCL BIFs using Tablegen

2019-06-04 Thread Nicola Zaghen via Phabricator via cfe-commits
Nicola added a comment.

A bit late to the review, but I've noticed a couple of issues with some of the 
implemented builtins:

- The fmin/fmax builtins are defined twice for scalar types, does this create 
problems in overload resolution when using them?
- The convert_ builtins don't have support for half types (which is present in 
the opencl-c.h header. Is that intended?


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60763/new/

https://reviews.llvm.org/D60763



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


[PATCH] D53023: Prototype OpenCL BIFs using Tablegen

2019-01-02 Thread Nicola Zaghen via Phabricator via cfe-commits
Nicola added a comment.

Since this review is just for a prototype, I'll leave some feedback after 
having played with it for a bit.
It seems to be quite trivial to add new builtins and fix existing ones 
(conversion builtins sat/rounding modes). One builtin that might have a small 
issue is the as_type builtin in which source and destination type need to have 
the same bitwidth. To get that to work I ended up patching TableGen to add !mul 
support for it (and set VectorSize to 1 for scalars).


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D53023/new/

https://reviews.llvm.org/D53023



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


[PATCH] D68328: Fix occurrences that size and range of pointers are assumed to be the same.

2019-12-12 Thread Nicola Zaghen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rG5f6208778ff9: [DataLayout] Fix occurrences that size and 
range of pointers are assumed to be… (authored by Nicola).
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Changed prior to commit:
  https://reviews.llvm.org/D68328?vs=231658&id=233541#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68328/new/

https://reviews.llvm.org/D68328

Files:
  clang/lib/CodeGen/CGExprScalar.cpp
  llvm/include/llvm/Analysis/PtrUseVisitor.h
  llvm/include/llvm/Analysis/Utils/Local.h
  llvm/lib/Analysis/ConstantFolding.cpp
  llvm/lib/Analysis/InlineCost.cpp
  llvm/lib/Analysis/InstructionSimplify.cpp
  llvm/lib/Analysis/Loads.cpp
  llvm/lib/Analysis/MemoryBuiltins.cpp
  llvm/lib/Analysis/ScalarEvolution.cpp
  llvm/lib/Analysis/ScalarEvolutionExpander.cpp
  llvm/lib/Analysis/ValueTracking.cpp
  llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  llvm/lib/IR/DataLayout.cpp
  llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
  llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
  llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
  llvm/lib/Transforms/Utils/Local.cpp
  llvm/test/Transforms/InstCombine/builtin-object-size-custom-dl.ll
  llvm/test/Transforms/InstCombine/gep-custom-dl.ll
  llvm/test/Transforms/InstCombine/icmp-custom-dl.ll
  llvm/test/Transforms/InstCombine/stdio-custom-dl.ll
  llvm/test/Transforms/PhaseOrdering/scev-custom-dl.ll
  llvm/test/Transforms/SimplifyCFG/switch_create-custom-dl.ll

Index: llvm/test/Transforms/SimplifyCFG/switch_create-custom-dl.ll
===
--- llvm/test/Transforms/SimplifyCFG/switch_create-custom-dl.ll
+++ llvm/test/Transforms/SimplifyCFG/switch_create-custom-dl.ll
@@ -33,10 +33,10 @@
 
 define void @test1_ptr(i32* %V) {
 ; CHECK-LABEL: @test1_ptr(
-; CHECK-NEXT:[[MAGICPTR:%.*]] = ptrtoint i32* [[V:%.*]] to i32
-; CHECK-NEXT:switch i32 [[MAGICPTR]], label [[F:%.*]] [
-; CHECK-NEXT:i32 17, label [[T:%.*]]
-; CHECK-NEXT:i32 4, label [[T]]
+; CHECK-NEXT:[[MAGICPTR:%.*]] = ptrtoint i32* [[V:%.*]] to i40
+; CHECK-NEXT:switch i40 [[MAGICPTR]], label [[F:%.*]] [
+; CHECK-NEXT:i40 17, label [[T:%.*]]
+; CHECK-NEXT:i40 4, label [[T]]
 ; CHECK-NEXT:]
 ; CHECK:   T:
 ; CHECK-NEXT:call void @foo1()
@@ -59,10 +59,10 @@
 
 define void @test1_ptr_as1(i32 addrspace(1)* %V) {
 ; CHECK-LABEL: @test1_ptr_as1(
-; CHECK-NEXT:[[MAGICPTR:%.*]] = ptrtoint i32 addrspace(1)* [[V:%.*]] to i32
-; CHECK-NEXT:switch i32 [[MAGICPTR]], label [[F:%.*]] [
-; CHECK-NEXT:i32 17, label [[T:%.*]]
-; CHECK-NEXT:i32 4, label [[T]]
+; CHECK-NEXT:[[MAGICPTR:%.*]] = ptrtoint i32 addrspace(1)* [[V:%.*]] to i40
+; CHECK-NEXT:switch i40 [[MAGICPTR]], label [[F:%.*]] [
+; CHECK-NEXT:i40 17, label [[T:%.*]]
+; CHECK-NEXT:i40 4, label [[T]]
 ; CHECK-NEXT:]
 ; CHECK:   T:
 ; CHECK-NEXT:call void @foo1()
Index: llvm/test/Transforms/PhaseOrdering/scev-custom-dl.ll
===
--- llvm/test/Transforms/PhaseOrdering/scev-custom-dl.ll
+++ llvm/test/Transforms/PhaseOrdering/scev-custom-dl.ll
@@ -65,3 +65,73 @@
 for.end:  ; preds = %for.cond
   ret void
 }
+
+@array = weak global [101 x i32] zeroinitializer, align 32		; <[100 x i32]*> [#uses=1]
+
+; CHECK: Loop %bb: backedge-taken count is 100
+
+define void @test_range_ref1a(i32 %x) {
+entry:
+	br label %bb
+
+bb:		; preds = %bb, %entry
+	%i.01.0 = phi i32 [ 100, %entry ], [ %tmp4, %bb ]		;  [#uses=2]
+	%tmp1 = getelementptr [101 x i32], [101 x i32]* @array, i32 0, i32 %i.01.0		;  [#uses=1]
+	store i32 %x, i32* %tmp1
+	%tmp4 = add i32 %i.01.0, -1		;  [#uses=2]
+	%tmp7 = icmp sgt i32 %tmp4, -1		;  [#uses=1]
+	br i1 %tmp7, label %bb, label %return
+
+return:		; preds = %bb
+	ret void
+}
+
+define i32 @test_loop_idiom_recogize(i32 %x, i32 %y, i32* %lam, i32* %alp) nounwind {
+bb1.thread:
+	br label %bb1
+
+bb1:		; preds = %bb1, %bb1.thread
+	%indvar = phi i32 [ 0, %bb1.thread ], [ %indvar.next, %bb1 ]		;  [#uses=4]
+	%i.0.reg2mem.0 = sub i32 255, %indvar		;  [#uses=2]
+	%0 = getelementptr i32, i32* %alp, i32 %i.0.reg2mem.0		;  [#uses=1]
+	%1 = load i32, i32* %0, align 4		;  [#uses=1]
+	%2 = getelementptr i32, i32* %lam, i32 %i.0.reg2mem.0		;  [#uses=1]
+	store i32 %1, i32* %2, align 4
+	%3 = sub i32 254, %indvar		;  [#uses=1]
+	%4 = icmp slt i32 %3, 0		;  [#uses=1]
+	%indvar.next = add i32 %indvar, 1		;  [#uses=1]
+	br i1 %4, label %bb2, label %bb1
+
+bb2:		; preds = %bb1
+	%tmp10 = mul i32 %indvar, %x		;  [#uses=1]
+	%z.0.reg2mem.0 = add i32 %tmp10, %y		;  [#uses=1]
+	%5 = add i32 %z.0.reg2mem.0, %x		;  [#uses=1]
+	ret i32 %5
+}
+
+declare void @use(i1)
+
+declare void @llvm.experimental.guard(i1, ...)
+
+; This tests getRangeRef acts as intended with different idx size.
+; CHECK: max backe

[PATCH] D68328: Fix occurrences that size and range of pointers are assumed to be the same.

2019-12-12 Thread Nicola Zaghen via Phabricator via cfe-commits
Nicola added a comment.

Reverted in f798eb21eca97dc44ed40da52ece22780fb74230 
 as it was 
causing failures in 
http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-debian/builds/443/steps/test-check-all/logs/stdio
 and other bots.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68328/new/

https://reviews.llvm.org/D68328



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


[PATCH] D71476: [OpenCL] Add builtin function extension handling

2019-12-17 Thread Nicola Zaghen via Phabricator via cfe-commits
Nicola accepted this revision.
Nicola added a comment.

Just a minor comment, can you address it before you submit? Thanks!




Comment at: clang/lib/Sema/OpenCLBuiltins.td:1095
 // OpenCL v2.0 s9.17.3: Additions to section 6.13.1: Work-Item Functions
+def FuncExtKhrSubgroups : FunctionExtension<"cl_khr_subgroups">;
 let MinVersion = CL20 in {

Should this be moved together with the other extensions defined above? It might 
make the file easier to navigate if all the extensions are in the same place 
(or all close to where they are used)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71476/new/

https://reviews.llvm.org/D71476



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


[PATCH] D44975: Change DEBUG() macro to LLVM_DEBUG()

2018-03-28 Thread Nicola Zaghen via Phabricator via cfe-commits
Nicola created this revision.
Herald added subscribers: cfe-commits, javed.absar, klimek.

The DEBUG() macro is too generic so it might clash with other projects.
This is going to be deprecated and replaced by LLVM_DEBUG() as soon as 
https://reviews.llvm.org/D43624 is submitted.

This is the command I used to do the replacement and formatting:
git grep -l 'DEBUG' | xargs sed -i 's/\bDEBUG\s\?(/LLVM_DEBUG(/g'
git diff -U0 master | ../clang/tools/clang-format/clang-format-diff.py -i -p1 
-style LLVM

I avoided replacing the clang-format strings that used DEBUG() as a macro.


Repository:
  rC Clang

https://reviews.llvm.org/D44975

Files:
  lib/AST/ExprConstant.cpp
  lib/Analysis/BodyFarm.cpp
  lib/CodeGen/ObjectFilePCHContainerOperations.cpp
  lib/Format/BreakableToken.cpp
  lib/Format/ContinuationIndenter.cpp
  lib/Format/Format.cpp
  lib/Format/SortJavaScriptImports.cpp
  lib/Format/TokenAnalyzer.cpp
  lib/Format/TokenAnnotator.cpp
  lib/Format/UnwrappedLineFormatter.cpp
  lib/Format/UnwrappedLineParser.cpp
  lib/Format/UsingDeclarationsSorter.cpp
  lib/StaticAnalyzer/Core/CallEvent.cpp
  lib/StaticAnalyzer/Core/MemRegion.cpp
  lib/Tooling/Tooling.cpp
  unittests/Format/FormatTest.cpp
  unittests/Format/FormatTestComments.cpp
  unittests/Format/FormatTestJS.cpp
  unittests/Format/FormatTestJava.cpp
  unittests/Format/FormatTestObjC.cpp
  unittests/Format/FormatTestProto.cpp
  unittests/Format/FormatTestRawStrings.cpp
  unittests/Format/FormatTestSelective.cpp
  unittests/Format/FormatTestTextProto.cpp
  unittests/Format/NamespaceEndCommentsFixerTest.cpp
  unittests/Format/UsingDeclarationsSorterTest.cpp
  unittests/libclang/LibclangTest.cpp

Index: unittests/libclang/LibclangTest.cpp
===
--- unittests/libclang/LibclangTest.cpp
+++ unittests/libclang/LibclangTest.cpp
@@ -466,15 +466,17 @@
 unsigned NumDiagnostics = clang_getNumDiagnostics(ClangTU);
 for (unsigned i = 0; i < NumDiagnostics; ++i) {
   auto Diag = clang_getDiagnostic(ClangTU, i);
-  DEBUG(llvm::dbgs() << clang_getCString(clang_formatDiagnostic(
-  Diag, clang_defaultDiagnosticDisplayOptions())) << "\n");
+  LLVM_DEBUG(llvm::dbgs()
+ << clang_getCString(clang_formatDiagnostic(
+Diag, clang_defaultDiagnosticDisplayOptions()))
+ << "\n");
   clang_disposeDiagnostic(Diag);
 }
   }
   bool ReparseTU(unsigned num_unsaved_files, CXUnsavedFile* unsaved_files) {
 if (clang_reparseTranslationUnit(ClangTU, num_unsaved_files, unsaved_files,
  clang_defaultReparseOptions(ClangTU))) {
-  DEBUG(llvm::dbgs() << "Reparse failed\n");
+  LLVM_DEBUG(llvm::dbgs() << "Reparse failed\n");
   return false;
 }
 DisplayDiagnostics();
Index: unittests/Format/UsingDeclarationsSorterTest.cpp
===
--- unittests/Format/UsingDeclarationsSorterTest.cpp
+++ unittests/Format/UsingDeclarationsSorterTest.cpp
@@ -23,13 +23,13 @@
   std::string sortUsingDeclarations(llvm::StringRef Code,
 const std::vector &Ranges,
 const FormatStyle &Style = getLLVMStyle()) {
-DEBUG(llvm::errs() << "---\n");
-DEBUG(llvm::errs() << Code << "\n\n");
+LLVM_DEBUG(llvm::errs() << "---\n");
+LLVM_DEBUG(llvm::errs() << Code << "\n\n");
 tooling::Replacements Replaces =
 clang::format::sortUsingDeclarations(Style, Code, Ranges, "");
 auto Result = applyAllReplacements(Code, Replaces);
 EXPECT_TRUE(static_cast(Result));
-DEBUG(llvm::errs() << "\n" << *Result << "\n\n");
+LLVM_DEBUG(llvm::errs() << "\n" << *Result << "\n\n");
 return *Result;
   }
 
Index: unittests/Format/NamespaceEndCommentsFixerTest.cpp
===
--- unittests/Format/NamespaceEndCommentsFixerTest.cpp
+++ unittests/Format/NamespaceEndCommentsFixerTest.cpp
@@ -25,13 +25,13 @@
   fixNamespaceEndComments(llvm::StringRef Code,
   const std::vector &Ranges,
   const FormatStyle &Style = getLLVMStyle()) {
-DEBUG(llvm::errs() << "---\n");
-DEBUG(llvm::errs() << Code << "\n\n");
+LLVM_DEBUG(llvm::errs() << "---\n");
+LLVM_DEBUG(llvm::errs() << Code << "\n\n");
 tooling::Replacements Replaces =
 clang::format::fixNamespaceEndComments(Style, Code, Ranges, "");
 auto Result = applyAllReplacements(Code, Replaces);
 EXPECT_TRUE(static_cast(Result));
-DEBUG(llvm::errs() << "\n" << *Result << "\n\n");
+LLVM_DEBUG(llvm::errs() << "\n" << *Result << "\n\n");
 return *Result;
   }
 
Index: unittests/Format/FormatTestTextProto.cpp
===
--- unittests/Format/FormatTestTextProto.cpp
+++ unittests/Format/FormatTestTextProto.cpp
@@ -21,13 +21,13 @@
 protec

[PATCH] D44976: Change DEBUG() macro to LLVM_DEBUG() in clang-tools-extra

2018-03-28 Thread Nicola Zaghen via Phabricator via cfe-commits
Nicola created this revision.
Herald added subscribers: cfe-commits, ioeric.

The DEBUG() macro is too generic so it might clash with other projects.
This is going to be deprecated and replaced by LLVM_DEBUG() as soon as 
https://reviews.llvm.org/D43624 is submitted.

This is the command I used to do the replacement and formatting:
git grep -l 'DEBUG' | xargs sed -i 's/\bDEBUG\s\?(/LLVM_DEBUG(/g'
git diff -U0 master | ../clang/tools/clang-format/clang-format-diff.py -i -p1 
-style LLVM


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D44976

Files:
  clang-move/ClangMove.cpp
  clang-move/HelperDeclRefGraph.cpp
  clang-tidy/ClangTidyOptions.cpp
  clang-tidy/readability/IdentifierNamingCheck.cpp
  include-fixer/IncludeFixer.cpp
  include-fixer/SymbolIndexManager.cpp

Index: include-fixer/SymbolIndexManager.cpp
===
--- include-fixer/SymbolIndexManager.cpp
+++ include-fixer/SymbolIndexManager.cpp
@@ -97,8 +97,8 @@
   Symbols.insert(Symbols.end(), Res.begin(), Res.end());
 }
 
-DEBUG(llvm::dbgs() << "Searching " << Names.back() << "... got "
-   << Symbols.size() << " results...\n");
+LLVM_DEBUG(llvm::dbgs() << "Searching " << Names.back() << "... got "
+<< Symbols.size() << " results...\n");
 
 for (auto &SymAndSig : Symbols) {
   const SymbolInfo &Symbol = SymAndSig.Symbol;
Index: include-fixer/IncludeFixer.cpp
===
--- include-fixer/IncludeFixer.cpp
+++ include-fixer/IncludeFixer.cpp
@@ -156,7 +156,8 @@
   clang::ASTContext &context = CI->getASTContext();
   std::string QueryString = QualType(T->getUnqualifiedDesugaredType(), 0)
 .getAsString(context.getPrintingPolicy());
-  DEBUG(llvm::dbgs() << "Query missing complete type '" << QueryString << "'");
+  LLVM_DEBUG(llvm::dbgs() << "Query missing complete type '" << QueryString
+  << "'");
   // Pass an empty range here since we don't add qualifier in this case.
   std::vector MatchedSymbols =
   query(QueryString, "", tooling::Range());
@@ -276,7 +277,8 @@
 SymbolRange = CreateToolingRange(Typo.getLoc());
   }
 
-  DEBUG(llvm::dbgs() << "TypoScopeQualifiers: " << TypoScopeString << "\n");
+  LLVM_DEBUG(llvm::dbgs() << "TypoScopeQualifiers: " << TypoScopeString
+  << "\n");
   std::vector MatchedSymbols =
   query(QueryString, TypoScopeString, SymbolRange);
 
@@ -357,12 +359,12 @@
 return {};
   }
 
-  DEBUG(llvm::dbgs() << "Looking up '" << Query << "' at ");
-  DEBUG(CI->getSourceManager()
-.getLocForStartOfFile(CI->getSourceManager().getMainFileID())
-.getLocWithOffset(Range.getOffset())
-.print(llvm::dbgs(), CI->getSourceManager()));
-  DEBUG(llvm::dbgs() << " ...");
+  LLVM_DEBUG(llvm::dbgs() << "Looking up '" << Query << "' at ");
+  LLVM_DEBUG(CI->getSourceManager()
+ .getLocForStartOfFile(CI->getSourceManager().getMainFileID())
+ .getLocWithOffset(Range.getOffset())
+ .print(llvm::dbgs(), CI->getSourceManager()));
+  LLVM_DEBUG(llvm::dbgs() << " ...");
   llvm::StringRef FileName = CI->getSourceManager().getFilename(
   CI->getSourceManager().getLocForStartOfFile(
   CI->getSourceManager().getMainFileID()));
@@ -390,8 +392,8 @@
   if (MatchedSymbols.empty())
 MatchedSymbols =
 SymbolIndexMgr.search(Query, /*IsNestedSearch=*/true, FileName);
-  DEBUG(llvm::dbgs() << "Having found " << MatchedSymbols.size()
- << " symbols\n");
+  LLVM_DEBUG(llvm::dbgs() << "Having found " << MatchedSymbols.size()
+  << " symbols\n");
   // We store a copy of MatchedSymbols in a place where it's globally reachable.
   // This is used by the standalone version of the tool.
   this->MatchedSymbols = MatchedSymbols;
Index: clang-tidy/readability/IdentifierNamingCheck.cpp
===
--- clang-tidy/readability/IdentifierNamingCheck.cpp
+++ clang-tidy/readability/IdentifierNamingCheck.cpp
@@ -836,10 +836,10 @@
 std::string Fixup = fixupWithStyle(Name, Style);
 if (StringRef(Fixup).equals(Name)) {
   if (!IgnoreFailedSplit) {
-DEBUG(llvm::dbgs()
-  << Decl->getLocStart().printToString(*Result.SourceManager)
-  << llvm::format(": unable to split words for %s '%s'\n",
-  KindName.c_str(), Name.str().c_str()));
+LLVM_DEBUG(llvm::dbgs()
+   << Decl->getLocStart().printToString(*Result.SourceManager)
+   << llvm::format(": unable to split words for %s '%s'\n",
+   KindName.c_str(), Name.str().c_str()));
   }
 } else {
   NamingCheckFailure &Failure = NamingCheckFailures[NamingCheckId(
@@ -873,10 +873,10 @@
   std::strin

[PATCH] D44976: Change DEBUG() macro to LLVM_DEBUG() in clang-tools-extra

2018-04-04 Thread Nicola Zaghen via Phabricator via cfe-commits
Nicola added a comment.

Ping? I'm not sure who to add as reviewers as it's generic change.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D44976



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


[PATCH] D44975: Change DEBUG() macro to LLVM_DEBUG()

2018-04-04 Thread Nicola Zaghen via Phabricator via cfe-commits
Nicola added a comment.

Ping? I'm not sure who to add as reviewers as it's generic change.


Repository:
  rC Clang

https://reviews.llvm.org/D44975



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


[PATCH] D29764: [OpenCL] Blocks cannot capture/reference another block

2017-02-10 Thread Nicola Zaghen via Phabricator via cfe-commits
Nicola added a comment.

Looking at "Example 4" in the standard it looks like this should also be 
illegal.

  int (^block1)(void) = ^int {return 1;};
  int foo() { return block1(); }
  
  __kernel void k(global int *z)
  {
   int (^block2)(void) = ^int {
return foo(); // expected-error {{cannot refer to a block inside block}}
   }; 
  }

Unless I missed something it's not erroring in this case.


https://reviews.llvm.org/D29764



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