This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[cilkplus] misc cleanups for <#pragma simd> implementation


Hi Balaji.

This is a patch against, the [cilkplus] branch (not the [cilkplus-merge] branch). I have taken the liberty to start cleaning up the <#pragma simd> stuff on your development branch, while the array notation patchset is being reviewed by Joseph.

Herein lies a potpourri of fixes, refactoring, and cleanups. They should all be pretty obvious.

There are two main functional changes:

1. I removed setting of flag_vectorize in the front-end. This is certainly not going to fly. Instead, I am issuing an error when <#pragma simd> is used without -ftree-vectorize. For testing I have added the appropriate flag when tests are running at lower optimization levels.

2. I noticed some of the errors wrt <#pragma simd> were pointing to the wrong place. I have saved the location_t of the original #pragma and saved this in the global pragma simd table. This makes errors more meaningful.

I have added various FIXME notes throughout for things I plan to tackle next. If you prefer me not adding such notes, I can remove them, but rest assured, I'll work on them shortly.

I have renamed the {compile,errors,execute}.exp files to something less ambiguous. As explained before, this makes it easier to test individual components, ala "make check-gcc RUNTESTFLAGS=foo.exp".

There are no regressions with this patch, but I noticed all the tests in gcc.dg/cilk-plus/pragma_simd_tests/execute/ were failing before my patch:

	/usr/bin/ld: cannot find -lcilkrts
	collect2: error: ld returned 1 exit status
	compiler exited with status 1

I don't see a -L in the command line, but I didn't bother to look into it. It was broken before ;-).

Finally, building the toolchain seems to automagically regenerate the following files:

	#       modified:   ../../../libcilkrts/Makefile.in
	#       modified:   ../../../libcilkrts/aclocal.m4
	#       modified:   ../../../libcilkrts/configure

Is this on purpose? Should I check in the modified files? FWIW, I am *not* including these modified files into this patch.

Oh, one more thing... assuming you are keeping a merged set of ChangeLog entries for eventual merging, I am only including changelog entries for new code I am touching. I assume, there are already entries for code you have already touched.

OK to commit to cilkplus branch?

Attachment: curr
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]