#!/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]


#!/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]


Put in test of SCCP. Watch out though, because we need to sort the constant pool for the final check to work. :(
Put in test of SCCP.  Watch out though, because we need to sort the
constant pool for the final check to work.  :(


git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@93 91177308-0d34-0410-b5e6-96231b3b80d8
