Author: Fraser Cormack
Date: 2025-03-24T11:10:07Z
New Revision: 63b5692bacd941f1b6b9010b70db4bcc327469b9

URL: 
https://github.com/llvm/llvm-project/commit/63b5692bacd941f1b6b9010b70db4bcc327469b9
DIFF: 
https://github.com/llvm/llvm-project/commit/63b5692bacd941f1b6b9010b70db4bcc327469b9.diff

LOG: [libclc] Relicense gen_convert.py (#132213)

Similar to work done in 82912fd6, this commit re-licenses both the
gen_convert.py script and the file it generates.

It previously possessed an MIT license, with three additional individual
copyrights. The file it generated was similar, but to only two of the
three individuals. LLVM's policy is not to accept contributions that
include in-source copyright notices [1]. I'm not aware whether the
individuals concerned signed the re-licensing agreement or not.

It takes the opportunity to update the description(s) in the header
files, since the previous comments were out of date.

[1]
https://llvm.org/docs/DeveloperPolicy.html#embedded-copyright-or-contributed-by-statements

Added: 
    

Modified: 
    libclc/generic/lib/gen_convert.py

Removed: 
    


################################################################################
diff  --git a/libclc/generic/lib/gen_convert.py 
b/libclc/generic/lib/gen_convert.py
index 3359102224060..b8c7050095fc8 100644
--- a/libclc/generic/lib/gen_convert.py
+++ b/libclc/generic/lib/gen_convert.py
@@ -1,34 +1,27 @@
-# OpenCL built-in library: type conversion functions
+##===----------------------------------------------------------------------===##
 #
-# Copyright (c) 2013 Victor Oliveira <victormath...@gmail.com>
-# Copyright (c) 2013 Jesse Towner <jessetow...@lavabit.com>
-# Copyright (c) 2024 Romaric Jodin <rjo...@chromium.org>
+# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+# See https://llvm.org/LICENSE.txt for license information.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 #
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
+##===----------------------------------------------------------------------===##
 #
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-# This script generates the file convert_type.cl, which contains all of the
+# This script generates OpenCL type conversion builtins, which are all of the
 # OpenCL functions in the form:
 #
-# convert_<destTypen><_sat><_roundingMode>(<sourceTypen>)
+#   <prefix>convert_<destTypen><_sat><_roundingMode>(<sourceTypen>)
+#
+# The internal "CLC" versions of these builtins, with the <prefix> '__clc_'
+# contain the actual implementations. These are generated by passing the
+# '--clc' flag to the script.
+#
+# The OpenCL builtins, without any prefix, forward on to the CLC versions.
+#
+##===----------------------------------------------------------------------===##
 
 import argparse
 from sys import stderr
+from os import path
 
 parser = argparse.ArgumentParser()
 parser.add_argument(
@@ -196,34 +189,19 @@ def conditional_guard(src, dst):
     )
 
 print(
-    f"""/* !!!! AUTOGENERATED FILE generated by convert_type.py !!!!!
-
-   DON'T CHANGE THIS FILE. MAKE YOUR CHANGES TO convert_type.py AND RUN:
-   $ ./generate-conversion-type-cl.sh
-
-   OpenCL type conversion functions
-
-   Copyright (c) 2013 Victor Oliveira <victormath...@gmail.com>
-   Copyright (c) 2013 Jesse Towner <jessetow...@lavabit.com>
-
-   Permission is hereby granted, free of charge, to any person obtaining a copy
-   of this software and associated documentation files (the "Software"), to 
deal
-   in the Software without restriction, including without limitation the rights
-   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-   copies of the Software, and to permit persons to whom the Software is
-   furnished to do so, subject to the following conditions:
-
-   The above copyright notice and this permission notice shall be included in
-   all copies or substantial portions of the Software.
-
-   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
FROM,
-   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-   THE SOFTWARE.
-*/
+    
f"""//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM 
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// Automatically generated from {path.basename(__file__)}, do not edit!
+//
+// OpenCL type conversion functions
+//
+//===----------------------------------------------------------------------===//
 
 {nl.join(['#include ' + f for f in includes])}
 #include <clc/clc_convert.h>


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to