diff options
author | Aaron Watry <awatry@gmail.com> | 2013-06-26 15:39:32 -0500 |
---|---|---|
committer | Aaron Watry <awatry@gmail.com> | 2013-06-26 15:39:32 -0500 |
commit | 67b83e165a273bac0fe20549adfe0ebbb5b1defb (patch) | |
tree | cdc4634cd453af4afd8ee4c0ae0ca7b6d3cd9fe0 | |
parent | 0444744a42bd5d15038da497f10463f3252718ee (diff) | |
parent | 4ab90369cbe2ef489df88726d9be223fb1847c6f (diff) |
Merge branch 'master' of http://llvm.org/git/libclc
Conflicts:
configure.py
generic/include/clc/clc.h
generic/lib/SOURCES
generic/lib/shared/clamp.inc
generic/lib/shared/vload.cl
generic/lib/shared/vstore.cl
r600/lib/SOURCES
utils/prepare-builtins.cpp
-rw-r--r-- | LICENSE.TXT | 4 | ||||
-rwxr-xr-x | configure.py | 17 | ||||
-rw-r--r-- | generic/lib/shared/clamp.inc | 6 | ||||
-rw-r--r-- | ptx/lib/OVERRIDES | 2 |
4 files changed, 15 insertions, 14 deletions
diff --git a/LICENSE.TXT b/LICENSE.TXT index e4df97b..30aab2f 100644 --- a/LICENSE.TXT +++ b/LICENSE.TXT @@ -11,7 +11,7 @@ Full text of the relevant licenses is included below. ============================================================================== -Copyright (c) 2011-2012 by the contributors listed in CREDITS.TXT +Copyright (c) 2011-2013 by the contributors listed in CREDITS.TXT All rights reserved. @@ -43,7 +43,7 @@ SOFTWARE. ============================================================================== -Copyright (c) 2011-2012 by the contributors listed in CREDITS.TXT +Copyright (c) 2011-2013 by the contributors listed in CREDITS.TXT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/configure.py b/configure.py index 347f3b3..79cc4df 100755 --- a/configure.py +++ b/configure.py @@ -61,7 +61,8 @@ def llvm_config(args): sys.exit(1) llvm_bindir = llvm_config(['--bindir']) -llvm_core_libs = llvm_config(['--ldflags', '--libs', 'core', 'bitreader', 'bitwriter']) +llvm_core_libs = llvm_config(['--libs', 'core', 'bitreader', 'bitwriter']) + ' ' + \ + llvm_config(['--ldflags']) llvm_cxxflags = llvm_config(['--cxxflags']) + ' -fno-exceptions -fno-rtti' llvm_clang = os.path.join(llvm_bindir, 'clang') @@ -74,10 +75,12 @@ available_targets = { {'gpu' : 'cypress', 'aliases' : ['hemlock']}, {'gpu' : 'barts', 'aliases' : ['turks', 'caicos']}, {'gpu' : 'cayman', 'aliases' : ['aruba']}, - {'gpu' : 'tahiti', 'aliases' : ['pitcairn', 'verde', 'oland']}]} + {'gpu' : 'tahiti', 'aliases' : ['pitcairn', 'verde', 'oland']}]}, + 'nvptx--nvidiacl' : { 'devices' : [{'gpu' : '', 'aliases' : []}] }, + 'nvptx64--nvidiacl' : { 'devices' : [{'gpu' : '', 'aliases' : []}] } } -default_targets = ['r600--'] +default_targets = ['nvptx--nvidiacl', 'nvptx64--nvidiacl', 'r600--'] targets = args if not targets: @@ -170,12 +173,8 @@ for target in targets: for src in open(subdir_list_file).readlines(): src = src.rstrip() - # Only add the base filename (e.g. Add get_global_id instead of - # get_global_id.cl) to sources_seen. - # This allows targets to overide generic .cl sources with .ll sources. - src_base = os.path.splitext(src)[0] - if src_base not in sources_seen: - sources_seen.add(src_base) + if src not in sources_seen: + sources_seen.add(src) obj = os.path.join(target, 'lib', src + obj_suffix + '.bc') objects.append(obj) src_file = os.path.join(libdir, src) diff --git a/generic/lib/shared/clamp.inc b/generic/lib/shared/clamp.inc index c1cd1aa..6f59f42 100644 --- a/generic/lib/shared/clamp.inc +++ b/generic/lib/shared/clamp.inc @@ -1,9 +1,9 @@ _CLC_OVERLOAD _CLC_DEF GENTYPE clamp(GENTYPE x, GENTYPE y, GENTYPE z) { - return min(max(x,y),z); + return (x > z ? z : (x < y ? y : x)); } #ifndef SCALAR _CLC_OVERLOAD _CLC_DEF GENTYPE clamp(GENTYPE x, SCALAR_GENTYPE y, SCALAR_GENTYPE z) { - return min(max(x,y),z); + return (x > (GENTYPE)z ? (GENTYPE)z : (x < (GENTYPE)y ? (GENTYPE)y : x)); } -#endif
\ No newline at end of file +#endif diff --git a/ptx/lib/OVERRIDES b/ptx/lib/OVERRIDES new file mode 100644 index 0000000..475162c --- /dev/null +++ b/ptx/lib/OVERRIDES @@ -0,0 +1,2 @@ +integer/add_sat_if.ll +integer/sub_sat_if.ll |