<commit_before>#!/bin/sh
LD_LIBRARY_PATH=../lib/Assembly/Parser/Debug:../lib/Assembly/Writer/Debug:../lib/Analysis/Debug:../lib/VMCore/Debug:../lib/Bytecode/Writer/Debug:../lib/Bytecode/Reader/Debug:../lib/Optimizations/Debug
export LD_LIBRARY_PATH


../tools/as/as < $1 | ../tools/opt/opt -q -inline -dce -constprop -dce | ../tools/dis/dis | ../tools/as/as > $1.bc.1 || exit 1

# Should not be able to optimize further!
../tools/opt/opt -q -constprop -dce < $1.bc.1 > $1.bc.2 || exit 2

diff $1.bc.[12] || exit 3
rm $1.bc.[12]
<commit_msg>Put in test of SCCP.  Watch out though, because we need to sort the constant pool for the final check to work.  :(<commit_after>#!/bin/sh
LD_LIBRARY_PATH=../lib/Assembly/Parser/Debug:../lib/Assembly/Writer/Debug:../lib/Analysis/Debug:../lib/VMCore/Debug:../lib/Bytecode/Writer/Debug:../lib/Bytecode/Reader/Debug:../lib/Optimizations/Debug
export LD_LIBRARY_PATH


../tools/as/as < $1 | ../tools/opt/opt -q -inline -dce -constprop -dce | ../tools/dis/dis | ../tools/as/as > $1.bc.1 || exit 1

# Should not be able to optimize further!
../tools/opt/opt -q -constprop -dce < $1.bc.1 > $1.bc.2 || exit 2

diff $1.bc.[12] || exit 3

# Try out SCCP
../tools/as/as < $1 | ../tools/opt/opt -q -inline -dce -sccp -dce | ../tools/dis/dis | ../tools/as/as > $1.bc.3 || exit 1

# Should not be able to optimize further!
#../tools/opt/opt -q -sccp -dce < $1.bc.3 > $1.bc.4 || exit 2

#diff $1.bc.[34] || exit 3
rm $1.bc.[123]

{'fraction_non_alphanumeric': 0.21541637990364762, 'fraction_numerical': 0.031658637302133516, 'mean_word_length': 2.7091836734693877, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6693502', 'n_tokens_mistral': 612, 'n_tokens_neox': 573, 'n_words': 133}