[polly] 5eb9acf - [Polly] Revert changes to isl Python code

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 13 04:12:46 PST 2025


Author: Nikita Popov
Date: 2025-01-13T13:11:39+01:00
New Revision: 5eb9acff2845f08741e70be4a5fc1d6afc644375

URL: https://github.com/llvm/llvm-project/commit/5eb9acff2845f08741e70be4a5fc1d6afc644375
DIFF: https://github.com/llvm/llvm-project/commit/5eb9acff2845f08741e70be4a5fc1d6afc644375.diff

LOG: [Polly] Revert changes to isl Python code

This partially reverts b605dab7a8352158ee0d399b8c3433f9a8b495a3,
dropping the changes to isl. This is an external library, so
we shouldn't modify it unless strictly necessary.

Added: 
    

Modified: 
    polly/lib/External/isl/interface/python.cc
    polly/lib/External/isl/libisl-gdb.py
    polly/lib/External/isl/python/isl.py.top

Removed: 
    


################################################################################
diff  --git a/polly/lib/External/isl/interface/python.cc b/polly/lib/External/isl/interface/python.cc
index b60bf315ca7034..e4a8288631297a 100644
--- a/polly/lib/External/isl/interface/python.cc
+++ b/polly/lib/External/isl/interface/python.cc
@@ -347,7 +347,7 @@ static void print_persistent_callback_failure_check(int indent,
 		printf(fmt, 0);
 		printf(", '%s') and ", callback_name.c_str());
 		printf(fmt, 0);
-		printf(".%s['exc_info'] is not None:\n", callback_name.c_str());
+		printf(".%s['exc_info'] != None:\n", callback_name.c_str());
 		print_indent(indent, "    exc_info = ");
 		printf(fmt, 0);
 		printf(".%s['exc_info'][0]\n", callback_name.c_str());

diff  --git a/polly/lib/External/isl/libisl-gdb.py b/polly/lib/External/isl/libisl-gdb.py
index bdd3949cf89c06..bf01bc583d15d8 100644
--- a/polly/lib/External/isl/libisl-gdb.py
+++ b/polly/lib/External/isl/libisl-gdb.py
@@ -70,7 +70,7 @@ def invoke(self, arg, from_tty):
         arg = gdb.parse_and_eval(arg)
         printer = str_lookup_function(arg)
 
-        if printer is None:
+        if printer == None:
             print("No isl printer for this type")
             return
 
@@ -90,7 +90,7 @@ def str_lookup_function(val):
     lookup_tag = val.type.target()
     regex = re.compile("^isl_(.*)$")
 
-    if lookup_tag is None:
+    if lookup_tag == None:
         return None
 
     m = regex.match(str(lookup_tag))

diff  --git a/polly/lib/External/isl/python/isl.py.top b/polly/lib/External/isl/python/isl.py.top
index 9dc47a1a832514..d041315d4e11db 100644
--- a/polly/lib/External/isl/python/isl.py.top
+++ b/polly/lib/External/isl/python/isl.py.top
@@ -3,7 +3,7 @@ from ctypes import *
 from ctypes.util import find_library
 
 isl_dyld_library_path = os.environ.get('ISL_DYLD_LIBRARY_PATH')
-if isl_dyld_library_path is not None:
+if isl_dyld_library_path != None:
     os.environ['DYLD_LIBRARY_PATH'] =  isl_dyld_library_path
 try:
     isl = cdll.LoadLibrary(isl_dlname)
@@ -29,7 +29,7 @@ class Context:
 
     @staticmethod
     def getDefaultInstance():
-        if Context.defaultInstance is None:
+        if Context.defaultInstance == None:
             Context.defaultInstance = Context()
         return Context.defaultInstance
 


        


More information about the llvm-commits mailing list