56 Commits

Author SHA1 Message Date
Dmitry Babokin
fb7b38ab59 Adding SKX target to Windows build. 2016-07-06 11:56:53 +03:00
Dmitry Babokin
988e506b1c Adding ispc_version.h to VS project 2016-02-02 15:51:38 +03:00
Dmitry Babokin
e7b411f5e9 Fixing Windows build with 3.8:
- Removing LLVMipa.lib
 - Adding LLVMIRReader.lib
 - Adding -DNDEBUG to release build
2016-01-27 14:13:15 +03:00
Dmitry Babokin
c82cfc7f4a Fixing build warnings on Windows 2016-01-27 11:55:31 +03:00
thebusytypist
e23821f282 Fix unresolved symbol in Win32 Debug build.
Add an additional dependency LLVMProfileData.lib.
2015-11-20 16:48:54 -08:00
Dmitry Babokin
c986ffad4f Adding knl target to build. 2015-05-26 15:34:49 +03:00
Andrey Guskov
522d80bd2c Windows build fix 2015-03-11 15:58:36 +03:00
Dmitry Babokin
481224bbcd Adding missing dependency for LLVM 3.6 (Windows specific problem) and fixing end-of-lines in ispc.vcxproj 2014-10-13 19:31:11 +04:00
Andrey Guskov
22b7f548ad made ISPC + LLVM-trunk compile on Windows 2014-08-13 15:46:56 +04:00
Anton Mitrokhin
d0c9b7c9b5 wiped out all LLVM 3.1 support 2014-08-01 14:54:08 +04:00
Ilia Filippov
b1bf08c0d9 removing winstuff 2014-04-02 13:01:25 +04:00
Dmitry Babokin
681898ed1e Add VS2012 as a default toolchain on Windows 2014-02-19 14:39:14 +04:00
Dmitry Babokin
e172d7f1a9 Update build messages (Windows) 2013-12-01 16:18:06 +04:00
Dmitry Babokin
3bc4788acb Fix errors with VS2013 2013-12-01 04:40:23 +04:00
Dmitry Babokin
1bd5b704c6 Adding support for build on Windows for avx1.1-i64x4 and avx2-i64x4 2013-10-18 14:23:03 +04:00
Dmitry Babokin
ce99b17616 Fix for Windows buils to include new target: avx-i64x4 2013-09-14 02:00:23 +04:00
Matt Pharr
42f31aed69 Another attempt at fixing the Windows build (added sse4-8/sse4-16 targets). 2013-08-14 11:02:45 -07:00
Matt Pharr
ed017c42f1 Fix ispc.vcxproj for Windows builds 2013-08-11 07:47:20 -07:00
Matt Pharr
4766467271 Revert ispc.vcxproj to version from top-of-tree. 2013-08-10 11:23:39 -07:00
Matt Pharr
cd9afe946c Merge branch 'master' into arm
Conflicts:
	Makefile
	builtins.cpp
	ispc.cpp
	ispc.h
	ispc.vcxproj
	opt.cpp
2013-08-06 17:39:21 -07:00
Dmitry Babokin
dff7735af9 Fix for Windows build and making NEON target optional 2013-08-02 19:24:34 -07:00
Matt Pharr
ab3b633733 Add 8-bit and 16-bit specialized NEON targets.
Like SSE4-8 and SSE4-16, these use 8-bit and 16-bit values for mask
elements, respectively, and thus should generate the best code when used
for computation with datatypes of those sizes.
2013-07-30 08:44:16 -07:00
Matt Pharr
d7b0c5794e Add support for ARM NEON targets.
Initial support for ARM NEON on Cortex-A9 and A15 CPUs.  All but ~10 tests
pass, and all examples compile and run correctly.  Most of the examples
show a ~2x speedup on a single A15 core versus scalar code.

Current open issues/TODOs
- Code quality looks decent, but hasn't been carefully examined.  Known
  issues/opportunities for improvement include:
  - fp32 vector divide is done as a series of scalar divides rather than
    a vector divide (which I believe exists, but I may be mistaken.)
    This is particularly harmful to examples/rt, which only runs ~1.5x
    faster with ispc, likely due to long chains of scalar divides.
  - The compiler isn't generating a vmin.f32 for e.g. the final scalar
    min in reduce_min(); instead it's generating a compare and then a
    select instruction (and similarly elsewhere).
  - There are some additional FIXMEs in builtins/target-neon.ll that
    include both a few pieces of missing functionality (e.g. rounding
    doubles) as well as places that deserve attention for possible
    code quality improvements.

- Currently only the "cortex-a9" and "cortex-15" CPU targets are
  supported; LLVM supports many other ARM CPUs and ispc should provide
  access to all of the ones that have NEON support (and aren't too
  obscure.)

- ~5 of the reduce-* tests hit an assertion inside LLVM (unfortunately
   only when the compiler runs on an ARM host, though).

- The Windows build hasn't been tested (though I've tried to update
  ispc.vcxproj appropriately).  It may just work, but will more likely
  have various small issues.)

- Anything related to 64-bit ARM has seen no attention.
2013-07-19 23:07:24 -07:00
Ilia Filippov
cba1b3cedd additional libraries for LLVM_3_4 build 2013-06-25 12:22:53 +04:00
Ilia Filippov
12c4512932 adding two additional libraries for LLVM_3_4 build 2013-06-25 12:22:53 +04:00
Dmitry Babokin
1a40f936df Windows build cleanup: moving generated lex.cc and parse.cc to build dir 2013-05-24 10:29:01 +04:00
Dmitry Babokin
6f0e5fd402 Adding RUNTIME define to gen-bitcode-* files generation command 2013-05-24 10:29:01 +04:00
Dmitry Babokin
66ec43739a Moving temporary files to Debug/Release folder on Windows 2013-05-24 10:29:01 +04:00
Dmitry Babokin
44f9d1ed78 Fix for CYGWIN build warnings (Windows stlye slash, instead of Unix style) 2013-05-24 10:29:01 +04:00
Dmitry Babokin
c6d479b8ad Enabling 32/64 bit version library build on Windows 2013-05-24 10:29:00 +04:00
Dmitry Babokin
80e2f4e342 Removing redundant Debug/Release records in VS proj file - they are unified 2013-05-24 10:29:00 +04:00
Dmitry Babokin
7497e86902 Adding Windows support for aligned memory allocation on Windows 2013-04-26 22:07:30 +02:00
Dmitry Babokin
6b8741dbd7 Removing 4244 warning and cleanup of linked libraries list 2013-04-23 15:21:33 +02: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
8276e912fd Switch to LLVM 3.1 for default for MSVC builds. Also fixes issue #374 2012-08-31 05:58:39 -07:00
Matt Pharr
6c7df4cb6b Add initial support for "avx1.1" targets for Ivy Bridge.
So far, only the use of the float/half conversion instructions distinguishes
this from the "avx1" target.

Partial work on issue #263.
2012-06-08 15:55:00 -07:00
Matt Pharr
449d956966 Add support for generic-64 target. 2012-05-25 11:57:28 -07:00
Matt Pharr
d99bd279e8 Add generic-32 target. 2012-05-03 11:11:06 -07:00
Matt Pharr
f6cd01f7cf Windows build support for scalar target. 2012-01-29 13:48:01 -08:00
Matt Pharr
58a0b4a20d Add separate set of builtins for AVX2.
(i.e., stop just reusing the ones for AVX1).

For now the only difference is that the int/uint min/max
functions call the new intrinsic for that.  Once gather is
available from LLVM, that will go here as well.
2012-01-13 14:40:01 -08:00
Matt Pharr
8938e14442 Add support for emitting ~generic vectorized C++ code.
The compiler now supports an --emit-c++ option, which generates generic
vector C++ code.  To actually compile this code, the user must provide
C++ code that implements a variety of types and operations (e.g. adding
two floating-point vector values together, comparing them, etc).

There are two examples of this required code in examples/intrinsics:
generic-16.h is a "generic" 16-wide implementation that does all required
with scalar math; it's useful for demonstrating the requirements of the
implementation.  Then, sse4.h shows a simple implementation of a SSE4
target that maps the emitted function calls to SSE intrinsics.

When using these example implementations with the ispc test suite,
all but one or two tests pass with gcc and clang on Linux and OSX.
There are currently ~10 failures with icc on Linux, and ~50 failures with
MSVC 2010.  (To be fixed in coming days.)

Performance varies: when running the examples through the sse4.h
target, some have the same performance as when compiled with --target=sse4
from ispc directly (options), while noise is 12% slower, rt is 26%
slower, and aobench is 2.2x slower.  The details of this haven't yet been
carefully investigated, but will be in coming days as well.

Issue #92.
2012-01-04 12:59:03 -08:00
Matt Pharr
1d9201fe3d Add "generic" 4, 8, and 16-wide targets.
When used, these targets end up with calls to undefined functions for all
of the various special vector stuff ispc needs to compile ispc programs
(masked store, gather, min/max, sqrt, etc.).

These targets are not yet useful for anything, but are a step toward
having an option to C++ code with calls out to intrinsics.

Reorganized the directory structure a bit and put the LLVM bitcode used
to define target-specific stuff (as well as some generic built-ins stuff)
into a builtins/ directory.

Note that for building on Windows, it's now necessary to set a LLVM_VERSION
environment variable (with values like LLVM_2_9, LLVM_3_0, LLVM_3_1svn, etc.)
2011-12-19 13:46:50 -08:00
Matt Pharr
286c23426e Add "double-wide" sse2-x2 target.
i.e. run 8 program instances together, along the lines of the double-pumped
sse4-x2 target.
2011-10-11 15:17:31 -07:00
Matt Pharr
6b4459d402 Windows: fix some compiler warnings during build 2011-10-09 07:40:17 -07:00
Matt Pharr
f9c67ff806 Explicit representation of ASTs for all the functions in a compile unit.
Added AST and Function classes.
Now, we parse the whole file and build up the AST for all of the
  functions in the Module before we emit IR for the functions (vs. before,
  when we generated IR along the way as we parsed the source file.)
2011-10-06 15:35:27 -07:00
Matt Pharr
06975bc7ab Add support for compiling to multiple targets.
If a flag along the lines of "--target=sse4,avx-x2" is provided on the command-line,
then the program will be compiled for each of the given targets, with a separate
output file generated for each one.  Further, an output file with dispatch functions
that check the current system's CPU and then chooses the best available variant
is also created.

Issue #11.
2011-10-04 16:01:55 -07:00
Matt Pharr
cf73286938 More small Windows build fixes. Also switch to LLVM 3.0 libs 2011-09-26 16:07:23 -07:00
Matt Pharr
5e31d7b6d0 Windows build: use LLVM_INSTALL_DIR to find clang.exe 2011-09-26 16:04:50 -07:00
Matt Pharr
7756265503 Add double-pumped AVX target (i.e., run 16-wide). Not yet tested. 2011-08-20 11:28:22 +01:00
Matt Pharr
04c93043d6 Target handling fixes.
Set the Module's target appropriately when it's first created.
Compile separate 32 and 64 bit versions of the builtins-c bitcocde
  and load the appropriate one based on the target we're compiling
  for.
2011-08-15 16:03:50 +01:00