Commit Graph
2818 Commits
Author SHA1 Message Date
Ingo Wald d492af7bc0 64-bit gather/scatter, aligned load/store, i8 support 2012-09-17 03:39:02 +02:00
Matt Pharr 230a7b7374 Fix bug with floating-point constant zero vectors.
Issue #377.
2012-09-14 14:24:51 -07:00
Jean-Luc Duprat 4204a752f7 Merge branch 'master' of https://github.com/ispc/ispc 2012-09-14 14:12:49 -07:00
Jean-Luc Duprat 0e88d5f97f Fixed unaligned masked stores on KNC 2012-09-14 14:11:41 -07:00
Matt Pharr a13e7f2435 #define ISPC_FORCE_ALIGNED_MEMORY, if appropriate, in C++ output. 2012-09-14 13:53:12 -07:00
Matt Pharr be2108260e Add --opt=force-aligned-memory option.
This forces all vector loads/stores to be done assuming that the given
pointer is aligned to the vector size, thus allowing the use of sometimes
more-efficient instructions.  (If it isn't the case that the memory is
aligned, the program will fail!).
2012-09-14 13:49:45 -07:00
Matt Pharr 59b0a2b208 Mark __any(), __all(), and __none() as internal after they're linked in.
This fixes multiple symbol definition errors when compiling a single binary
for multiple ISA targets.
2012-09-14 13:32:42 -07:00
Matt Pharr 05a5a42a08 Don't force loads/stores from varying types to be unaligned.
These should always actually be aligned in memory.
2012-09-14 12:17:33 -07:00
Jean-Luc Duprat f0b0618484 Added the following mask tests: __any(), __all(), __none() for all supported targets.
This allows for more efficient code generation of KNC.
2012-09-14 11:06:18 -07:00
Ingo Wald 4ecdbe4bd9 two changes:
- exported structs now get protected with #ifdef/#define blocks (allows including multiple ispc-generated header fiels into the same c source
- when creating offload stubs, encountering a 'export' function for which we cannot produce a stub will only trigger a warning, not an error.
2012-09-08 16:09:04 +02:00
Matt Pharr 9e9f266e52 Add files inadvertently missed in c58d92d46b.
Truly fixes issue #363.
2012-09-07 13:27:07 -07:00
Matt Pharr 0ce67f37ac Use LLVM_VERSION env variable to get LLVM version with MSVC build.
Previously, it was set directly in the ispc.vcxproj file.

Issue #371.
2012-09-06 06:04:32 -07:00
Matt Pharr ddcd0a49ec Fix bugs with handling of 'continue' statements in foreach_* loops. 2012-09-05 10:16:58 -07:00
Matt Pharr 63b8fac852 Improve naming of temporary variable in IR 2012-09-05 10:13:45 -07:00
Matt Pharr def8d7850b Fix crasher with malformed programs 2012-09-05 08:43:46 -07:00
Jean-Luc Duprat 0442efc856 Merge branch 'master' of https://github.com/ispc/ispc 2012-09-04 11:00:03 -07:00
Jean-Luc Duprat f928bbb53c Updated usage of Initial Many Core Instructions (Intel® IMCI) instructions. 2012-09-04 10:57:25 -07:00
Jean-Luc Duprat 1ab7500dbb Updated user's guide to comply with Intel® Xeon Phi™ brand usage guidelines 2012-09-04 10:53:01 -07:00
Matt Pharr c58d92d46b Issue error if a vector-typed parameter is used in an exported function.
Issue #363.
2012-08-31 06:59:58 -07:00
Matt Pharr 8276e912fd Switch to LLVM 3.1 for default for MSVC builds. Also fixes issue #374 2012-08-31 05:58:39 -07:00
Jean-Luc Duprat e0490d0df5 Minor fixes needed for building on windows. 2012-08-30 10:56:13 -07:00
Jean-Luc Duprat 11db466a88 Implement the KNC prefetch API so that ISPC prefetch_*() stdlib functions may be used. 2012-08-30 10:24:31 -07:00
Matt Pharr caaee0b666 Fix crash when using launch with non-task-qualified function 2012-08-29 09:06:47 -07:00
Matt Pharr f2f470f369 Merge pull request #369 from jduprat/master
Task system updates
2012-08-28 14:01:37 -07:00
Jean-Luc Duprat 09bb36f58c Updated the task system in the example directory to support:
Cilk (cilk_for), OpenMP (#pragma omp parallel for), TBB(tbb::task_group and tbb::parallel_for)
as well as a new pthreads-based model that fully subscribes the machine (good for KNC).
With major contributions from Ingo Wald and James Brodman.
2012-08-28 11:13:12 -07:00
Matt Pharr 21719df6fd remove assert that hit with fast-math if user defined their own functions named rcp() 2012-08-21 16:39:36 -07:00
Matt Pharr 39329809dd fix crash with malformed program 2012-08-21 16:35:31 -07:00
Matt Pharr 44797e2925 remove incorrect assert 2012-08-21 16:27:49 -07:00
Jean-Luc Duprat c8f373d119 Merge branch 'master' of https://github.com/ispc/ispc 2012-08-15 17:42:00 -07:00
Jean-Luc Duprat 8a22c63889 knc2x.h
Introduced knc2x.h which supprts 2x interleaved code generation for KNC (use the target generic-32).
This implementation is even more experimental and incomplete than knc.h but is useful already (mandelbrot works for example)

knc.h:
Switch to new intrinsic names _mm512_set_1to16_epi32() -> _mm512_set1_epi32(), etc...
Fix the declaration of the unspecialized template for __smear_*(), __setzero_*(), __undef_*()
Specifically mark _mm512_undefined_*() a few vectors in __load<>()
Fixed implementations of some implementations of __smear_*(), __setzero_*(), __undef_*() to remove unecessary dependent instructions.
Implemented ISPC reductions by simply calling existing intrinsic reductions, which are slightly more efficient than our precendent implementation.  Also added reductions for double types.
2012-08-15 17:41:10 -07:00
Matt Pharr 1a4434d314 Fix build with LLVM top-of-tree 2012-08-11 09:28:48 -07:00
Jean-Luc Duprat 165a13b13e knc.h:
vec16_i64 improved with the addition of the following: __extract_element(), insert_element(), __sub(), __mul(),
		   __sdiv(), __udiv(), __and(), __or(), __xor(), __shl(), __lshr(), __ashr(), __select()
	Fixed a bug in the __mul(__vec16_i64, __vec16_i32) implementation
	Constructors are all explicitly inlined, copy constructor and operator=() explicitly provided
	Load and stores for __vec16_i64 and __vec16_d use aligned instructions when possible
	__rotate_i32() now has a vector implementation
	Added several reductions: __reduce_add_i32(), __reduce_min_i32(), __reduce_max_i32(),
	       __reduce_add_f(), __reduce_min_f(), __reduce_max_f()
2012-08-10 12:20:10 -07:00
Matt Pharr 43364b2d69 Loosen tolerances to test passes with FMA on AVX2 2012-08-10 06:52:14 -07:00
Matt Pharr 6eaecd20d5 Mark __{get,set}_system_isa builtins as "internal" functions.
This ensures that they have static linkage, which in turn lets one
have multiple object files compiled to multiple targets without having
those cause link errors.

Issue #355.
2012-08-09 16:12:07 -07:00
Matt Pharr c80bfeacf6 Fix crashes when input program tried to access undefined struct types.
(This in particular would happen when there was an error in the body of a struct
definition and we were left with an UndefinedStructType and then later tried to
do loads/stores from/to it.)

Issue #356.
2012-08-09 14:59:29 -07:00
Matt Pharr 2a19cc1758 Fix cases where we were trying to type cast instead of type convert.
Also, removed erroneous checks about the type of the test expression
in DoStmt and ForStmt.

These together were preventing conversion of pointer types to boolean
values, so things like "while (ptr)" would improperly not compile.

Issue #346.
2012-08-03 12:47:53 -07:00
Matt Pharr 8f5189f606 Type convert arrays in select expressions to pointers to the first element.
Fixes issue #345.
2012-08-03 11:53:59 -07:00
Matt Pharr 49dde7c6f2 Fix bug in declaration of double-precision sqrt intrinsic for AVX targets.
This was preventing sqrts of uniform double values from being compiled
properly.

Issue #344.
2012-08-03 11:43:31 -07:00
Matt Pharr 765a0d8896 Use puts() rather than printf() for printing assertion failure strings.
This way, we don't lose '%'s in the assertion strings.

Issue #342.
2012-08-03 11:31:38 -07:00
Matt Pharr 19d8f2e258 Generate FMA instructions with AVX2 (when possible).
Issue #320.
2012-08-03 10:43:41 -07:00
Matt Pharr e6aec96e05 Fix build with LLVM top-of-tree 2012-08-03 09:59:41 -07:00
Jean-Luc Duprat a2d42c3242 KNC: all masked_load_*() and masked_store_*() functions need to do unaligned accesses 2012-08-01 14:37:25 -07:00
Jean-Luc Duprat 52836aae87 Minor documentation clarrification on the impact of ICC -fp-model except option. 2012-08-01 10:24:35 -07:00
Matt Pharr bda566d6a7 Fix incorrect assertion 2012-08-01 08:11:32 -07:00
Jean-Luc Duprat 63ed90b0fd docs/build.sh runs rst2html rather than rst2html.py
Explicitly documented that fact that ICC needs the -mmic flag to compile for KNC.
Updated ISPC User Guide with details on ICC compiler options that impact FP performance in generated code.
2012-07-30 11:47:25 -07:00
Matt Pharr 0bb4d282e2 Add sys/types.h include for linux/osx. 2012-07-23 08:32:41 -07:00
Matt Pharr ae89a65dad Fix bug that caused unterminated basic blocks.
Issue #339.
2012-07-23 08:24:18 -07:00
Matt Pharr e9fe9f5043 Add cpu strings for Ivy Bridge and HSW.
Default to avx2 ISA for HSW CPUs.
2012-07-23 08:24:18 -07:00
Matt Pharr ce8dc5927c Fix bug in FunctionEmitContext::MatchIntegerTypes
Cause of issue #329.
2012-07-20 10:05:17 -07:00
Matt Pharr f6989cce38 Disallow native output with generic targets, C++ output with non-generic targets.
Also wrote FAQs about why this is the way it is.
Issue #334.
2012-07-20 09:55:50 -07:00