[cfe-commits] [LLVMdev] [cfe-dev] OpenMP support in CLANG: A proposal

Mahesha HS mahesha.llvm at gmail.com
Fri Oct 26 05:25:49 PDT 2012


Hi Eli,

I have attached fourth patch (patch_4_openmp_parsing_part_1.patch)
along with this mail.  Note that, we are far away from complete OpenMP
*parsing* support. However, this patch includes support for basic
OpenMP parsing for *legal*  cases *without* support for *OpenMP
clauses* and *syntax error checking*. More than that, this patch gives
an idea of overall bigger picture of OpenMP parsing with the mention
of all the required *grammer rules* in comment lines.

My job is getting too complicated mainly because of all the patches
are sitting in my private directory, and I have to keep track of all
these before submitting a new patch :)

So, please help me in this regard if the already sent patches are in a
good shape to commit.


--
mahesha



On Wed, Oct 24, 2012 at 5:44 PM, Mahesha HS <mahesha.llvm at gmail.com> wrote:
> I am sorry, I had forgotten to attach *test cases* for revised patch
> 2. Please find the same attached in this mail.
>
> --
> mahesha
>
>
> On Wed, Oct 24, 2012 at 5:35 PM, Mahesha HS <mahesha.llvm at gmail.com> wrote:
>> Attached are the *revised* patches.
>>
>> In revised patch 1, which is related to 'fopenmp' support, -v is
>> replaced by -### as you suggested.
>>
>> Revised patch 2 is changed a bit. As you indicated too, I felt OpenMP
>> related stuffs are getting unnecessarily spreading across different
>> components. I thought of moving everything to Parser class. But, then
>> felt that Parser class looks very awkward with too many OpenMP
>> specific data members. So, I encapsulated all the OpenMP parsing
>> related stuffs within a separate class called "classs OpenMP".
>> However, I exposed this class to *only* Parser so that no other
>> components will be aware of it. Any future required additional OpenMP
>> parsing related flags can be neatly put inside this class so that
>> Parser class is not contaminated with them.
>>
>> In revised patch 3, I removed all global variables as you suggested,
>> and implemented simple *const* string tables using simple binary
>> search algorithm.
>>
>> --
>> mahesha
>>
>>
>> On Wed, Oct 24, 2012 at 4:25 AM, Eli Friedman <eli.friedman at gmail.com> wrote:
>>> On Tue, Oct 23, 2012 at 3:26 AM, Mahesha HS <mahesha.llvm at gmail.com> wrote:
>>>> Hi Eli,
>>>>
>>>> Attached (openmp-enum-data-structure-support.patch) is the patch no 3,
>>>> which implements the basic data structures required for OpenMP
>>>> parsing.  At this point, I could not attach any relevant test-case(s)
>>>> for this patch. However, when I submit the next patch which will be
>>>> related OpenMP parsing, I should be able to attach with it, the
>>>> relevant test-case(s) for the current patch.
>>>>
>>>> Is the (revised) patch no 2 (omp_pragma_registration_revised.patch),
>>>> which was sent along with my previous mail fine? Also, what about the
>>>> checking-in patch no 1 (fopenmp_option_support.patch) to trunk?
>>>
>>> Sorry about the delay; I replied to the previous email.
>>>
>>> +/// \brief DefaultMap - A StringMap which holds enum kinds associated
>>> +/// with different OpenMP *default clause kind* names.
>>> +DefaultOwningPtr DefaultMap;
>>>
>>> Global variables aren't allowed in clang libraries.  Probably the
>>> simplest thing to do would be to switch to a const table and use a
>>> binary search.
>>>
>>> -Eli
>>
>>
>>
>> --
>> mahesha
>
>
>
> --
> mahesha



-- 
mahesha
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch_4_openmp_parsing_part_1.patch
Type: application/octet-stream
Size: 27987 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121026/56b5fc21/attachment.obj>


More information about the cfe-commits mailing list