* [PATCH][cilkplus branch] Add __cilk builtin keyword
@ 2011-09-07 19:24 Iyer, Balaji V
2011-09-07 21:55 ` H.J. Lu
0 siblings, 1 reply; 4+ messages in thread
From: Iyer, Balaji V @ 2011-09-07 19:24 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 146 bytes --]
Hello Everyone,
This patch should add the built-in __cilk keyword and set it to 200 in the GCC cilkplus branch.
Thanks,
Balaji V. Iyer.
[-- Attachment #2: __cilk_keyword_patch --]
[-- Type: application/octet-stream, Size: 1924 bytes --]
diff --git a/gcc/ChangeLog.cilk b/gcc/ChangeLog.cilk
index 28ffb46..58bcca0 100644
--- a/gcc/ChangeLog.cilk
+++ b/gcc/ChangeLog.cilk
@@ -1,3 +1,8 @@
+2011-09-06 Balaji V. Iyer <balaji.v.iyer@intel.com>
+
+ * cppbuiltin.c (define_builtin_macros_for_compliation_flags): Added
+ the __cilk keyword and set it to 200.
+
2011-08-08 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-parser.c (c_parse_init): Added if statement to check if flag_enable_cilk is
diff --git a/gcc/cppbuiltin.c b/gcc/cppbuiltin.c
index cf7d2ff..b229c45 100644
--- a/gcc/cppbuiltin.c
+++ b/gcc/cppbuiltin.c
@@ -97,6 +97,10 @@ define_builtin_macros_for_compilation_flags (cpp_reader *pfile)
cpp_define_formatted (pfile, "__FINITE_MATH_ONLY__=%d",
flag_finite_math_only);
+
+ if (flag_enable_cilk)
+ cpp_define_formatted(pfile, "__cilk=%d", 200);
+
}
diff --git a/gcc/testsuite/ChangeLog.cilk b/gcc/testsuite/ChangeLog.cilk
index e45add2..15dd882 100644
--- a/gcc/testsuite/ChangeLog.cilk
+++ b/gcc/testsuite/ChangeLog.cilk
@@ -1,3 +1,8 @@
+2011-09-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
+
+ * gcc.dg/cilk-plus/test__cilk.c: New
+ * g++.dg/cilk-plus/test__cilk.cpp: New
+
2011-09-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
* gcc.dg/cilk-plus/cilk_plus.exp: Added -I
diff --git a/gcc/testsuite/g++.dg/cilk-plus/test__cilk.cpp b/gcc/testsuite/g++.dg/cilk-plus/test__cilk.cpp
new file mode 100644
index 0000000..982ed2d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cilk-plus/test__cilk.cpp
@@ -0,0 +1,7 @@
+#include <stdio.h>
+
+int main (void)
+{
+ printf ("__cilk = %d\n", __cilk);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/cilk-plus/test__cilk.c b/gcc/testsuite/gcc.dg/cilk-plus/test__cilk.c
new file mode 100644
index 0000000..982ed2d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cilk-plus/test__cilk.c
@@ -0,0 +1,7 @@
+#include <stdio.h>
+
+int main (void)
+{
+ printf ("__cilk = %d\n", __cilk);
+ return 0;
+}
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH][cilkplus branch] Add __cilk builtin keyword
2011-09-07 19:24 [PATCH][cilkplus branch] Add __cilk builtin keyword Iyer, Balaji V
@ 2011-09-07 21:55 ` H.J. Lu
2011-09-07 22:01 ` Iyer, Balaji V
0 siblings, 1 reply; 4+ messages in thread
From: H.J. Lu @ 2011-09-07 21:55 UTC (permalink / raw)
To: Iyer, Balaji V; +Cc: gcc-patches
On Wed, Sep 7, 2011 at 11:12 AM, Iyer, Balaji V <balaji.v.iyer@intel.com> wrote:
> Hello Everyone,
> This patch should add the built-in __cilk keyword and set it to 200 in the GCC cilkplus branch.
>
> Thanks,
>
+
+ if (flag_enable_cilk)
+ cpp_define_formatted(pfile, "__cilk=%d", 200);
+ <<< Extra line
+2011-09-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
+
+ * gcc.dg/cilk-plus/test__cilk.c: New<<<<Missing '.'
+ * g++.dg/cilk-plus/test__cilk.cpp: New<<<< Missing '.'
+
--
H.J.
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH][cilkplus branch] Add __cilk builtin keyword
2011-09-07 21:55 ` H.J. Lu
@ 2011-09-07 22:01 ` Iyer, Balaji V
2011-09-07 22:22 ` H.J. Lu
0 siblings, 1 reply; 4+ messages in thread
From: Iyer, Balaji V @ 2011-09-07 22:01 UTC (permalink / raw)
To: H.J. Lu; +Cc: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 853 bytes --]
Fixed the changes you mentioned. Here is an upated patch.
Thanks,
Balaji V. Iyer.
________________________________________
From: H.J. Lu [hjl.tools@gmail.com]
Sent: Wednesday, September 07, 2011 5:26 PM
To: Iyer, Balaji V
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH][cilkplus branch] Add __cilk builtin keyword
On Wed, Sep 7, 2011 at 11:12 AM, Iyer, Balaji V <balaji.v.iyer@intel.com> wrote:
> Hello Everyone,
> This patch should add the built-in __cilk keyword and set it to 200 in the GCC cilkplus branch.
>
> Thanks,
>
+
+ if (flag_enable_cilk)
+ cpp_define_formatted(pfile, "__cilk=%d", 200);
+ <<< Extra line
+2011-09-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
+
+ * gcc.dg/cilk-plus/test__cilk.c: New<<<<Missing '.'
+ * g++.dg/cilk-plus/test__cilk.cpp: New<<<< Missing '.'
+
--
H.J.
[-- Attachment #2: __cilk_keyword_patch --]
[-- Type: application/octet-stream, Size: 1923 bytes --]
diff --git a/gcc/ChangeLog.cilk b/gcc/ChangeLog.cilk
index 28ffb46..58bcca0 100644
--- a/gcc/ChangeLog.cilk
+++ b/gcc/ChangeLog.cilk
@@ -1,3 +1,8 @@
+2011-09-06 Balaji V. Iyer <balaji.v.iyer@intel.com>
+
+ * cppbuiltin.c (define_builtin_macros_for_compliation_flags): Added
+ the __cilk keyword and set it to 200.
+
2011-08-08 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-parser.c (c_parse_init): Added if statement to check if flag_enable_cilk is
diff --git a/gcc/cppbuiltin.c b/gcc/cppbuiltin.c
index cf7d2ff..921a405 100644
--- a/gcc/cppbuiltin.c
+++ b/gcc/cppbuiltin.c
@@ -97,6 +97,9 @@ define_builtin_macros_for_compilation_flags (cpp_reader *pfile)
cpp_define_formatted (pfile, "__FINITE_MATH_ONLY__=%d",
flag_finite_math_only);
+
+ if (flag_enable_cilk)
+ cpp_define_formatted(pfile, "__cilk=%d", 200);
}
diff --git a/gcc/testsuite/ChangeLog.cilk b/gcc/testsuite/ChangeLog.cilk
index e45add2..b23bff4 100644
--- a/gcc/testsuite/ChangeLog.cilk
+++ b/gcc/testsuite/ChangeLog.cilk
@@ -1,3 +1,8 @@
+2011-09-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
+
+ * gcc.dg/cilk-plus/test__cilk.c: New.
+ * g++.dg/cilk-plus/test__cilk.cpp: New.
+
2011-09-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
* gcc.dg/cilk-plus/cilk_plus.exp: Added -I
diff --git a/gcc/testsuite/g++.dg/cilk-plus/test__cilk.cpp b/gcc/testsuite/g++.dg/cilk-plus/test__cilk.cpp
new file mode 100644
index 0000000..982ed2d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cilk-plus/test__cilk.cpp
@@ -0,0 +1,7 @@
+#include <stdio.h>
+
+int main (void)
+{
+ printf ("__cilk = %d\n", __cilk);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/cilk-plus/test__cilk.c b/gcc/testsuite/gcc.dg/cilk-plus/test__cilk.c
new file mode 100644
index 0000000..982ed2d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cilk-plus/test__cilk.c
@@ -0,0 +1,7 @@
+#include <stdio.h>
+
+int main (void)
+{
+ printf ("__cilk = %d\n", __cilk);
+ return 0;
+}
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH][cilkplus branch] Add __cilk builtin keyword
2011-09-07 22:01 ` Iyer, Balaji V
@ 2011-09-07 22:22 ` H.J. Lu
0 siblings, 0 replies; 4+ messages in thread
From: H.J. Lu @ 2011-09-07 22:22 UTC (permalink / raw)
To: Iyer, Balaji V; +Cc: gcc-patches
On Wed, Sep 7, 2011 at 2:32 PM, Iyer, Balaji V <balaji.v.iyer@intel.com> wrote:
> Fixed the changes you mentioned. Here is an upated patch.
>
I checked it into cilkplus branch.
--
H.J.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-09-07 22:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-07 19:24 [PATCH][cilkplus branch] Add __cilk builtin keyword Iyer, Balaji V
2011-09-07 21:55 ` H.J. Lu
2011-09-07 22:01 ` Iyer, Balaji V
2011-09-07 22:22 ` H.J. Lu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).