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

Mahesha HS mahesha.llvm at gmail.com
Wed Oct 24 05:05:09 PDT 2012


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch_1_fopenmp_option_support.patch
Type: application/octet-stream
Size: 3089 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121024/cd00c2e3/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch_2_openmp_pragma_registration.patch
Type: application/octet-stream
Size: 12206 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121024/cd00c2e3/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch_3_openmp_enum_data_structure_support.patch
Type: application/octet-stream
Size: 9033 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121024/cd00c2e3/attachment-0002.obj>


More information about the cfe-commits mailing list