8000 gh-114265: remove i_loc_propagated, jump threading does not consider line numbers anymore by iritkatriel · Pull Request #114535 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-114265: remove i_loc_propagated, jump threading does not consider line numbers anymore #114535

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 25, 2024

Conversation

iritkatriel
Copy link
Member
@iritkatriel iritkatriel commented Jan 24, 2024

This simplifies jump threading: instead of trying to figure out whether the new and old jumps have the same line numbers, it replaces the first jump by a NOP and adds another instruction after it for the threaded jump (with the target's line number). The NOP will be removed later if it's not necessary.

After this we don't need i_loc_propagated anymore.

expected_insts = [
('LOAD_NAME', 0, 10),
('NOP', 0, 4),
(op2, 0, 5),
(op, 0, 5),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The expected output was wrong here (and there was a bug) - in the case of 'JUMP' --> 'JUMP_NO_INTERRUPT' we were previously ending up with 'JUMP_NO_INTERRUPT', but we want it to be 'JUMP'.

Copy link
Member
@brandtbucher brandtbucher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvement.

@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot wasm32-wasi 3.x has failed when building commit 0315941.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/1046/builds/4087) and take a look at the build logs.
  4. Check if the failure is related to this commit (0315941) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/1046/builds/4087

Summary of the results of the build (if available):

Click to see traceback logs
remote: Enumerating objects: 7, done.        
remote: Counting objects:  14% (1/7)        
remote: Counting objects:  28% (2/7)        
remote: Counting objects:  42% (3/7)        
remote: Counting objects:  57% (4/7)        
remote: Counting objects:  71% (5/7)        
remote: Counting objects:  85% (6/7)        
remote: Counting objects: 100% (7/7)        
remote: Counting objects: 100% (7/7), done.        
remote: Compressing objects:  14% (1/7)        
remote: Compressing objects:  28% (2/7)        
remote: Compressing objects:  42% (3/7)        
remote: Compressing objects:  57% (4/7)        
remote: Compressing objects:  71% (5/7)        
remote: Compressing objects:  85% (6/7)        
remote: Compressing objects: 100% (7/7)        
remote: Compressing objects: 100% (7/7), done.        
remote: Total 7 (delta 0), reused 1 (delta 0), pack-reused 0        
From https://github.com/python/cpython
 * branch                  main       -> FETCH_HEAD
Previous HEAD position was ea3cd0498c gh-114312: Collect stats for unlikely events (GH-114493)
HEAD is now at 0315941441 gh-114265: remove i_loc_propagated, jump threading does not consider line numbers anymore (#114535)
Switched to and reset branch 'main'

configure: WARNING: using cross tools not prefixed with host triplet

In file included from ../../Modules/md5module.c:46:
In file included from ../../Modules/_hacl/Hacl_Hash_MD5.h:34:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:130:11: warning: 'htole32' macro redefined [-Wmacro-redefined]
#  define htole32(x) (x)
          ^
/opt/wasi-sdk-16.0/bin/../share/wasi-sysroot/include/endian.h:43:9: note: previous definition is here
#define htole32(x) (uint32_t)(x)
        ^
In file included from ../../Modules/md5module.c:46:
In file included from ../../Modules/_hacl/Hacl_Hash_MD5.h:34:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:131:11: warning: 'le32toh' macro redefined [-Wmacro-redefined]
#  define le32toh(x) (x)
          ^
/opt/wasi-sdk-16.0/bin/../share/wasi-sysroot/include/endian.h:44:9: note: previous definition is here
#define le32toh(x) (uint32_t)(x)
        ^
In file included from ../../Modules/md5module.c:46:
In file included from ../../Modules/_hacl/Hacl_Hash_MD5.h:34:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:132:11: warning: 'htobe32' macro redefined [-Wmacro-redefined]
#  define htobe32(x)                                                           \
          ^
/opt/wasi-sdk-16.0/bin/../share/wasi-sysroot/include/endian.h:37:9: note: previous definition is here
#define htobe32(x) __bswap32(x)
        ^
In file included from ../../Modules/md5module.c:46:
In file included from ../../Modules/_hacl/Hacl_Hash_MD5.h:34:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:138:11: warning: 'be32toh' macro redefined [-Wmacro-redefined]
#  define be32toh(x) (htobe32((x)))
          ^
/opt/wasi-sdk-16.0/bin/../share/wasi-sysroot/include/endian.h:38:9: note: previous definition is here
#define be32toh(x) __bswap32(x)
        ^
In file included from ../../Modules/md5module.c:46:
In file included from ../../Modules/_hacl/Hacl_Hash_MD5.h:34:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:140:11: warning: 'htole64' macro redefined [-Wmacro-redefined]
#  define htole64(x) (x)
          ^
/opt/wasi-sdk-16.0/bin/../share/wasi-sysroot/include/endian.h:45:9: note: previous definition is here
#define htole64(x) (uint64_t)(x)
        ^
In file included from ../../Modules/md5module.c:46:
In file included from ../../Modules/_hacl/Hacl_Hash_MD5.h:34:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:141:11: warning: 'le64toh' macro redefined [-Wmacro-redefined]
#  define le64toh(x) (x)
          ^
/opt/wasi-sdk-16.0/bin/../share/wasi-sysroot/include/endian.h:46:9: note: previous definition is here
#define le64toh(x) (uint64_t)(x)
        ^
In file included from ../../Modules/md5module.c:46:
In file included from ../../Modules/_hacl/Hacl_Hash_MD5.h:34:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:142:11: warning: 'htobe64' macro redefined [-Wmacro-redefined]
#  define htobe64(x)                                                           \
          ^
/opt/wasi-sdk-16.0/bin/../share/wasi-sysroot/include/endian.h:39:9: note: previous definition is here
#define htobe64(x) __bswap64(x)
        ^
In file included from ../../Modules/md5module.c:46:
In file included from ../../Modules/_hacl/Hacl_Hash_MD5.h:34:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:149:11: warning: 'be64toh' macro redefined [-Wmacro-redefined]
#  define be64toh(x) (htobe64((x)))
          ^
/opt/wasi-sdk-16.0/bin/../share/wasi-sysroot/include/endian.h:40:9: note: previous definition is here
#define be64toh(x) __bswap64(x)
        ^
8 warnings generated.
In file included from ../../Modules/sha1module.c:47:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA1.h:34:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:130:11: warning: 'htole32' macro redefined [-Wmacro-redefined]
#  define htole32(x) (x)
          ^
/opt/wasi-sdk-16.0/bin/../share/wasi-sysroot/include/endian.h:43:9: note: previous definition is here
#define htole32(x) (uint32_t)(x)
        ^
In file included from ../../Modules/sha1module.c:47:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA1.h:34:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:131:11: warning: 'le32toh' macro redefined [-Wmacro-redefined]
#  define le32toh(x) (x)
          ^
/opt/wasi-sdk-16.0/bin/../share/wasi-sysroot/include/endian.h:44:9: note: previous definition is here
#define le32toh(x) (uint32_t)(x)
        ^
In file included from ../../Modules/sha1module.c:47:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA1.h:34:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:132:11: warning: 'htobe32' macro redefined [-Wmacro-redefined]
#  define htobe32(x)                                                           \
          ^
/opt/wasi-sdk-16.0/bin/../share/wasi-sysroot/include/endian.h:37:9: note: previous definition is here
#define htobe32(x) __bswap32(x)
        ^
In file included from ../../Modules/sha1module.c:47:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA1.h:34:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:138:11: warning: 'be32toh' macro redefined [-Wmacro-redefined]
#  define be32toh(x) (htobe32((x)))
          ^
/opt/wasi-sdk-16.0/bin/../share/wasi-sysroot/include/endian.h:38:9: note: previous definition is here
#define be32toh(x) __bswap32(x)
        ^
In file included from ../../Modules/sha1module.c:47:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA1.h:34:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:140:11: warning: 'htole64' macro redefined [-Wmacro-redefined]
#  define htole64(x) (x)
          ^
/opt/wasi-sdk-16.0/bin/../share/wasi-sysroot/include/endian.h:45:9: note: previous definition is here
#define htole64(x) (uint64_t)(x)
        ^
In file included from ../../Modules/sha1module.c:47:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA1.h:34:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:141:11: warning: 'le64toh' macro redefined [-Wmacro-redefined]
#  define le64toh(x) (x)
          ^
/opt/wasi-sdk-16.0/bin/../share/wasi-sysroot/include/endian.h:46:9: note: previous definition is here
#define le64toh(x) (uint64_t)(x)
        ^
In file included from ../../Modules/sha1module.c:47:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA1.h:34:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:142:11: warning: 'htobe64' macro redefined [-Wmacro-redefined]
#  define htobe64(x)                                                           \
          ^
/opt/wasi-sdk-16.0/bin/../share/wasi-sysroot/include/endian.h:39:9: note: previous definition is here
#define htobe64(x) __bswap64(x)
        ^
In file included from ../../Modules/sha1module.c:47:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA1.h:34:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:149:11: warning: 'be64toh' macro redefined [-Wmacro-redefined]
#  define be64toh(x) (htobe64((x)))
          ^
/opt/wasi-sdk-16.0/bin/../share/wasi-sysroot/include/endian.h:40:9: note: previous definition is here
#define be64toh(x) __bswap64(x)
        ^
8 warnings generated.
In file included from ../../Modules/sha3module.c:59:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA3.h:34:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:130:11: warning: 'htole32' macro redefined [-Wmacro-redefined]
#  define htole32(x) (x)
          ^
/opt/wasi-sdk-16.0/bin/../share/wasi-sysroot/include/endian.h:43:9: note: previous definition is here
#define htole32(x) (uint32_t)(x)
        ^
In file included from ../../Modules/sha3module.c:59:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA3.h:34:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:131:11: warning: 'le32toh' macro redefined [-Wmacro-redefined]
#  define le32toh(x) (x)
          ^
/opt/wasi-sdk-16.0/bin/../share/wasi-sysroot/include/endian.h:44:9: note: previous definition is here
#define le32toh(x) (uint32_t)(x)
        ^
In file included from ../../Modules/sha3module.c:59:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA3.h:34:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:132:11: warning: 'htobe32' macro redefined [-Wmacro-redefined]
#  define htobe32(x)                                                           \
          ^
/opt/wasi-sdk-16.0/bin/../share/wasi-sysroot/include/endian.h:37:9: note: previous definition is here
#define htobe32(x) __bswap32(x)
        ^
In file included from ../../Modules/sha3module.c:59:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA3.h:34:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:138:11: warning: 'be32toh' macro redefined [-Wmacro-redefined]
#  define be32toh(x) (htobe32((x)))
          ^
/opt/wasi-sdk-16.0/bin/../share/wasi-sysroot/include/endian.h:38:9: note: previous definition is here
#define be32toh(x) __bswap32(x)
        ^
In file included from ../../Modules/sha3module.c:59:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA3.h:34:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:140:11: warning: 'htole64' macro redefined [-Wmacro-redefined]
#  define htole64(x) (x)
          ^
/opt/wasi-sdk-16.0/bin/../share/wasi-sysroot/include/endian.h:45:9: note: previous definition is here
#define htole64(x) (uint64_t)(x)
        ^
In file included from ../../Modules/sha3module.c:59:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA3.h:34:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:141:11: warning: 'le64toh' macro redefined [-Wmacro-redefined]
#  define le64toh(x) (x)
          ^
/opt/wasi-sdk-16.0/bin/../share/wasi-sysroot/include/endian.h:46:9: note: previous definition is here
#define le64toh(x) (uint64_t)(x)
        ^
In file included from ../../Modules/sha3module.c:59:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA3.h:34:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:142:11: warning: 'htobe64' macro redefined [-Wmacro-redefined]
#  define htobe64(x)                                                           \
          ^
/opt/wasi-sdk-16.0/bin/../share/wasi-sysroot/include/endian.h:39:9: note: previous definition is here
#define htobe64(x) __bswap64(x)
        ^
In file included from ../../Modules/sha3module.c:59:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA3.h:34:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:149:11: warning: 'be64toh' macro redefined [-Wmacro-redefined]
#  define be64toh(x) (htobe64((x)))
          ^
/opt/wasi-sdk-16.0/bin/../share/wasi-sysroot/include/endian.h:40:9: note: previous definition is here
#define be64toh(x) __bswap64(x)
        ^
8 warnings generated.
../../Modules/expat/xmlparse.c:7703:11: warning: format specifies type 'int' but the argument has type 'ptrdiff_t' (aka 'long') [-Wformat]
          bytesMore, (account == XML_ACCOUNT_DIRECT) ? "DIR" : "EXP",
          ^~~~~~~~~
1 warning generated.
../../Modules/_testinternalcapi/test_critical_sections.c:142:1: warning: unused function 'thread_critical_sections' [-Wunused-function]
thread_critical_sections(void *arg)
^
1 warning generated.
../../Modules/posixmodule.c:7718:13: warning: unused function 'warn_about_fork_with_threads' [-Wunused-function]
static void warn_about_fork_with_threads(const char* name) {
            ^
1 warning generated.
In file included from ../../Modules/sha2module.c:48:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA2.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:130:11: warning: 'htole32' macro redefined [-Wmacro-redefined]
#  define htole32(x) (x)
          ^
/opt/wasi-sdk-16.0/bin/../share/wasi-sysroot/include/endian.h:43:9: note: previous definition is here
#define htole32(x) (uint32_t)(x)
        ^
In file included from ../../Modules/sha2module.c:48:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA2.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:131:11: warning: 'le32toh' macro redefined [-Wmacro-redefined]
#  define le32toh(x) (x)
          ^
/opt/wasi-sdk-16.0/bin/../share/wasi-sysroot/include/endian.h:44:9: note: previous definition is here
#define le32toh(x) (uint32_t)(x)
        ^
In file included from ../../Modules/sha2module.c:48:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA2.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:132:11: warning: 'htobe32' macro redefined [-Wmacro-redefined]
#  define htobe32(x)                                                           \
          ^
/opt/wasi-sdk-16.0/bin/../share/wasi-sysroot/include/endian.h:37:9: note: previous definition is here
#define htobe32(x) __bswap32(x)
        ^
In file included from ../../Modules/sha2module.c:48:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA2.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:138:11: warning: 'be32toh' macro redefined [-Wmacro-redefined]
#  define be32toh(x) (htobe32((x)))
          ^
/opt/wasi-sdk-16.0/bin/../share/wasi-sysroot/include/endian.h:38:9: note: previous definition is here
#define be32toh(x) __bswap32(x)
        ^
In file included from ../../Modules/sha2module.c:48:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA2.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:140:11: warning: 'htole64' macro redefined [-Wmacro-redefined]
#  define htole64(x) (x)
          ^
/opt/wasi-sdk-16.0/bin/../share/wasi-sysroot/include/endian.h:45:9: note: previous definition is here
#define htole64(x) (uint64_t)(x)
        ^
In file included from ../../Modules/sha2module.c:48:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA2.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:141:11: warning: 'le64toh' macro redefined [-Wmacro-redefined]
#  define le64toh(x) (x)
          ^
/opt/wasi-sdk-16.0/bin/../share/wasi-sysroot/include/endian.h:46:9: note: previous definition is here
#define le64toh(x) (uint64_t)(x)
        ^
In file included from ../../Modules/sha2module.c:48:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA2.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:142:11: warning: 'htobe64' macro redefined [-Wmacro-redefined]
#  define htobe64(x)                                                           \
          ^
/opt/wasi-sdk-16.0/bin/../share/wasi-sysroot/include/endian.h:39:9: note: previous definition is here
#define htobe64(x) __bswap64(x)
        ^
In file included from ../../Modules/sha2module.c:48:
In file included from ../../Modules/_hacl/Hacl_Hash_SHA2.h:35:
In file included from ../../Modules/_hacl/include/krml/types.h:12:
../../Modules/_hacl/include/krml/lowstar_endianness.h:149:11: warning: 'be64toh' macro redefined [-Wmacro-redefined]
#  define be64toh(x) (htobe64((x)))
          ^
/opt/wasi-sdk-16.0/bin/../share/wasi-sysroot/include/endian.h:40:9: note: previous definition is here
#define be64toh(x) __bswap64(x)
        ^
8 warnings generated.

make: *** No rule to make target 'pythoninfo'.  Stop.

make: *** No rule to make target 'buildbottest'.  Stop.

Cannot open file '/home/buildbot/buildarea/3.x.bcannon-wasi.wasi.debug/build/build/wasm32-wasi/test-results.xml' for upload

aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0