[Libclc-dev] [PATCH v2] require LLVM >=3.7 and bump version to 0.2.0
Jeroen Ketema via Libclc-dev
libclc-dev at lists.llvm.org
Fri Aug 7 01:32:47 PDT 2015
Committed. Thanks for the patch!
Jeroen
> On 07 Aug 2015, at 09:20, Serge Martin <edb+libclc at sigluy.net> wrote:
>
> On Friday 07 August 2015 00:37:17 Jeroen Ketema wrote:
>> Do you have commit rights, or do you need either me or Tom to commit this?
>>
>
> I don't have commit access, I need someone to push it for me.
> Thanks
>
>> Jeroen
>>
>>> On 31 Jul 2015, at 08:59, Jeroen Ketema <j.ketema at imperial.ac.uk> wrote:
>>>
>>>
>>> LGTM
>>>
>>>> On 30 Jul 2015, at 11:54, EdB <edb+libclc at sigluy.net> wrote:
>>>>
>>>> ---
>>>> configure.py | 11 ++++++-----
>>>> generic/lib/LLVM3.6/subnormal_helper_func.ll | 8 --------
>>>> generic/lib/SOURCES_LLVM3.6 | 1 -
>>>> utils/prepare-builtins.cpp | 16 ++--------------
>>>> 4 files changed, 8 insertions(+), 28 deletions(-)
>>>> delete mode 100644 generic/lib/LLVM3.6/subnormal_helper_func.ll
>>>> delete mode 100644 generic/lib/SOURCES_LLVM3.6
>>>>
>>>> diff --git a/configure.py b/configure.py
>>>> index 1072ca8..287f87f 100755
>>>> --- a/configure.py
>>>> +++ b/configure.py
>>>>
>>>> @@ -5,7 +5,7 @@ def c_compiler_rule(b, name, description, compiler,
> flags):
>>>> b.rule(name, command, description + " $out", depfile="$out.d")
>>>>
>>>> version_major = 0;
>>>> -version_minor = 1;
>>>> +version_minor = 2;
>>>> version_patch = 0;
>>>>
>>>> from optparse import OptionParser
>>>>
>>>> @@ -66,12 +66,13 @@ def llvm_config(args):
>>>> sys.exit(1)
>>>>
>>>> llvm_version = string.split(string.replace(llvm_config(['--version']),
>>>> 'svn', ''), '.') -if (int(llvm_version[0]) != 3 and int(llvm_version[1])
>>>> != 6):
>>>> - print "libclc requires LLVM 3.6"
>>>> - sys.exit(1)
>>>> -
>>>> +llvm_int_version = int(llvm_version[0]) * 100 + int(llvm_version[1]) *
>>>> 10
>>>> llvm_string_version = 'LLVM' + llvm_version[0] + '.' + llvm_version[1]
>>>>
>>>> +if llvm_int_version < 370:
>>>> + print "libclc requires LLVM >= 3.7"
>>>> + sys.exit(1)
>>>> +
>>>> llvm_system_libs = llvm_config(['--system-libs'])
>>>> llvm_bindir = llvm_config(['--bindir'])
>>>> llvm_core_libs = llvm_config(['--libs', 'core', 'bitreader',
>>>> 'bitwriter']) + ' ' + \ diff --git
>>>> a/generic/lib/LLVM3.6/subnormal_helper_func.ll
>>>> b/generic/lib/LLVM3.6/subnormal_helper_func.ll deleted file mode 100644
>>>> index 0e9764b..0000000
>>>> --- a/generic/lib/LLVM3.6/subnormal_helper_func.ll
>>>> +++ /dev/null
>>>> @@ -1,8 +0,0 @@
>>>> - at __CLC_SUBNORMAL_DISABLE = external global i1
>>>> -
>>>> -define i1 @__clc_subnormals_disabled() #0 {
>>>> - %disable = load i1* @__CLC_SUBNORMAL_DISABLE
>>>> - ret i1 %disable
>>>> -}
>>>> -
>>>> -attributes #0 = { alwaysinline }
>>>> diff --git a/generic/lib/SOURCES_LLVM3.6 b/generic/lib/SOURCES_LLVM3.6
>>>> deleted file mode 100644
>>>> index ee09f01..0000000
>>>> --- a/generic/lib/SOURCES_LLVM3.6
>>>> +++ /dev/null
>>>> @@ -1 +0,0 @@
>>>> -subnormal_helper_func.ll
>>>> diff --git a/utils/prepare-builtins.cpp b/utils/prepare-builtins.cpp
>>>> index e439ad1..a7b0db5 100644
>>>> --- a/utils/prepare-builtins.cpp
>>>> +++ b/utils/prepare-builtins.cpp
>>>> @@ -14,10 +14,6 @@
>>>>
>>>> #include <system_error>
>>>>
>>>> -#define LLVM_360 \
>>>> - (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR == 6)
>>>> -
>>>> -
>>>> using namespace llvm;
>>>>
>>>> static cl::opt<std::string>
>>>> @@ -43,20 +39,12 @@ int main(int argc, char **argv) {
>>>>
>>>> if (std::error_code ec = BufferOrErr.getError())
>>>>
>>>> ErrorMessage = ec.message();
>>>>
>>>> else {
>>>>
>>>> -#if LLVM_360
>>>> - ErrorOr<Module *>
>>>> -#else
>>>> - ErrorOr<std::unique_ptr<Module>>
>>>> -#endif
>>>> - ModuleOrErr =
>>>> + ErrorOr<std::unique_ptr<Module>> ModuleOrErr =
>>>>
>>>> parseBitcodeFile(BufferPtr.get()->getMemBufferRef(), Context);
>>>>
>>>> if (std::error_code ec = ModuleOrErr.getError())
>>>>
>>>> ErrorMessage = ec.message();
>>>>
>>>> -#if LLVM_360
>>>> - M = ModuleOrErr.get();
>>>> -#else
>>>> +
>>>>
>>>> M = ModuleOrErr.get().release();
>>>>
>>>> -#endif
>>>>
>>>> }
>>>>
>>>> }
>
More information about the Libclc-dev
mailing list