[llvm-commits] CVS: llvm/utils/NewNightlyTest.pl
Changes in directory llvm/utils: NewNightlyTest.pl updated: 1.59 -> 1.60 --- Log message: Trim the home directory from the dejagnu test --- Diffs of the changes: (+2 -3) NewNightlyTest.pl |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) Index: llvm/utils/NewNightlyTest.pl diff -u llvm/utils/NewNightlyTest.pl:1.59 llvm/utils/NewNightlyTest.pl:1.60 --- llvm/utils/NewNightlyTest.pl:1.59 Fri Sep 15 12:03:36 2006 +++ llvm/utils/NewNightlyTest.plWed Sep 20 04:20:22 2006 @@ -385,9 +385,8 @@ while ( ) { if ( length($_) > 1 ) { chomp($_); -if ( m/^PASS:/ || m/^XPASS:/ || - m/^FAIL:/ || m/^XFAIL:/) { -push(@lines, "$_"); +if ( m/^(PASS|XPASS|FAIL|XFAIL): .*\/llvm\/test\/(.*)$/ ) { +push(@lines, "$1: test/$2"); } } } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: nightlytest-serverside/NightlyTestAccept.php
Changes in directory nightlytest-serverside: NightlyTestAccept.php updated: 1.55 -> 1.56 --- Log message: Testing #1 --- Diffs of the changes: (+5 -5) NightlyTestAccept.php | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) Index: nightlytest-serverside/NightlyTestAccept.php diff -u nightlytest-serverside/NightlyTestAccept.php:1.55 nightlytest-serverside/NightlyTestAccept.php:1.56 --- nightlytest-serverside/NightlyTestAccept.php:1.55 Tue Sep 19 16:47:19 2006 +++ nightlytest-serverside/NightlyTestAccept.phpWed Sep 20 06:05:16 2006 @@ -727,19 +727,19 @@ * Adding test results pass/fail/xfail status to database * ***/ +print "$all_tests\n"; $ALL_TESTS = split("\n", $all_tests); foreach ($ALL_TESTS as $info) { $subpatterns = array(); if (preg_match("/(TEST-)?(XPASS|PASS|XFAIL|FAIL):\s(.+?)\s(.+)/", $info, $subpatterns)) { list($ignore1, $ignore2, $result, $measure, $program) = $subpatterns; +print "$program, $result, $measure, $night_id\n"; AddTests($program, $result, $measure, $night_id); - } else { -print "Unrecognized test: $info\n"; } } if ($print_debug) { - print "Dejagnu Tests Added\n"; + print "Program Tests Added\n"; } foreach ($DEJAGNUTESTS_RESULTS as $info) { @@ -965,8 +965,8 @@ chdir("$cwd/machines/$machine_id"); WriteFile("$db_date-Build-Log.txt", $build_log); -WriteFile("$db_date-O-files.txt", $o_file_size); -WriteFile("$db_date-A-files.txt", $a_file_size); +// WriteFile("$db_date-O-files.txt", $o_file_size); +// WriteFile("$db_date-A-files.txt", $a_file_size); $sentdata=""; foreach ($_GET as $key => $value) { ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: nightlytest-serverside/NightlyTestAccept.php
Changes in directory nightlytest-serverside: NightlyTestAccept.php updated: 1.56 -> 1.57 --- Log message: Testing #2 --- Diffs of the changes: (+0 -2) NightlyTestAccept.php |2 -- 1 files changed, 2 deletions(-) Index: nightlytest-serverside/NightlyTestAccept.php diff -u nightlytest-serverside/NightlyTestAccept.php:1.56 nightlytest-serverside/NightlyTestAccept.php:1.57 --- nightlytest-serverside/NightlyTestAccept.php:1.56 Wed Sep 20 06:05:16 2006 +++ nightlytest-serverside/NightlyTestAccept.phpWed Sep 20 06:09:02 2006 @@ -727,13 +727,11 @@ * Adding test results pass/fail/xfail status to database * ***/ -print "$all_tests\n"; $ALL_TESTS = split("\n", $all_tests); foreach ($ALL_TESTS as $info) { $subpatterns = array(); if (preg_match("/(TEST-)?(XPASS|PASS|XFAIL|FAIL):\s(.+?)\s(.+)/", $info, $subpatterns)) { list($ignore1, $ignore2, $result, $measure, $program) = $subpatterns; -print "$program, $result, $measure, $night_id\n"; AddTests($program, $result, $measure, $night_id); } } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: nightlytest-serverside/NightlyTestAccept.php
Changes in directory nightlytest-serverside: NightlyTestAccept.php updated: 1.57 -> 1.58 --- Log message: Make sure we use the exact machine for id --- Diffs of the changes: (+3 -9) NightlyTestAccept.php | 12 +++- 1 files changed, 3 insertions(+), 9 deletions(-) Index: nightlytest-serverside/NightlyTestAccept.php diff -u nightlytest-serverside/NightlyTestAccept.php:1.57 nightlytest-serverside/NightlyTestAccept.php:1.58 --- nightlytest-serverside/NightlyTestAccept.php:1.57 Wed Sep 20 06:09:02 2006 +++ nightlytest-serverside/NightlyTestAccept.phpWed Sep 20 06:31:36 2006 @@ -138,18 +138,13 @@ * ***/ function DoesMachineExist($uname, $hardware, $os, $name, $nickname, $gcc_version) { - $query = "SELECT * FROM machine WHERE uname=\"$uname\" AND nickname=\"$nickname\" AND gcc=\"$gcc_version\""; + $query = "SELECT * FROM machine WHERE uname=\"$uname\" AND hardware=\"$hardware\" AND os=\"$os\" AND nickname=\"$nickname\" AND gcc=\"$gcc_version\""; $machine_query = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_assoc($machine_query); mysql_free_result($machine_query); - if($row && - StringEqual($row['uname'], $uname) && - StringEqual($row['hardware'], $hardware) && - StringEqual($row['os'], $os) && - StringEqual($row['nickname'], $nickname) && - StringEqual($row['gcc'], $gcc_version)) { + if ($row) { return true; } @@ -190,8 +185,7 @@ * ***/ function GetMachineId($uname, $hardware, $os, $name, $nickname, $gcc_version) { - $query = "SELECT * FROM machine WHERE uname=\"$uname\" AND hardware=\"$hardware\" ". - "AND os=\"$os\" AND name=\"$name\" AND gcc=\"$gcc_version\""; + $query = "SELECT * FROM machine WHERE uname=\"$uname\" AND hardware=\"$hardware\" AND os=\"$os\" AND nickname=\"$nickname\" AND gcc=\"$gcc_version\""; $machine_query = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_assoc($machine_query); mysql_free_result($machine_query); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: nightlytest-serverside/SQLUtil.php
Changes in directory nightlytest-serverside: SQLUtil.php added (r1.1) --- Log message: Clean up test records --- Diffs of the changes: (+47 -0) SQLUtil.php | 47 +++ 1 files changed, 47 insertions(+) Index: nightlytest-serverside/SQLUtil.php diff -c /dev/null nightlytest-serverside/SQLUtil.php:1.1 *** /dev/null Wed Sep 20 06:57:35 2006 --- nightlytest-serverside/SQLUtil.php Wed Sep 20 06:57:25 2006 *** *** 0 --- 1,47 + + + + BODY + { + font-family: Arial, Helvetica, sans-serif; + font-size: 12px; + } + + + + + \n"; + print "NEW: $new\n"; + $count = $count + 1; + if ($count > 100) { + break; + } + } + } + + mysql_free_result($get_query); + } else { + $error = mysql_error(); + print "$error\n"; + } + + mysql_close($mysql_link); + + ?> + + + ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: nightlytest-serverside/SQLUtil.php
Changes in directory nightlytest-serverside: SQLUtil.php updated: 1.1 -> 1.2 --- Log message: Clean up test records #2 --- Diffs of the changes: (+5 -2) SQLUtil.php |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) Index: nightlytest-serverside/SQLUtil.php diff -u nightlytest-serverside/SQLUtil.php:1.1 nightlytest-serverside/SQLUtil.php:1.2 --- nightlytest-serverside/SQLUtil.php:1.1 Wed Sep 20 06:57:25 2006 +++ nightlytest-serverside/SQLUtil.php Wed Sep 20 07:05:38 2006 @@ -24,8 +24,11 @@ if (preg_match("/(.*)\/llvm\/test\/(.*)/", $old, $subpatterns)) { list($ignore, $before, $after) = $subpatterns; $new = "test/".$after; - print "OLD: $old\n"; - print "NEW: $new\n"; + $result = $row['result']; + $measure = $row['measure']; + $night = $row['night']; + $set_query = "UPDATE tests SET program=\"$new\" WHERE night=$night AND program=\"$old\" AND result=\"$result\" AND measure=\"$measure\""; + print "$set_query\n"; $count = $count + 1; if ($count > 100) { break; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: nightlytest-serverside/SQLUtil.php
Changes in directory nightlytest-serverside: SQLUtil.php updated: 1.2 -> 1.3 --- Log message: Clean up test records #3 --- Diffs of the changes: (+4 -7) SQLUtil.php | 11 --- 1 files changed, 4 insertions(+), 7 deletions(-) Index: nightlytest-serverside/SQLUtil.php diff -u nightlytest-serverside/SQLUtil.php:1.2 nightlytest-serverside/SQLUtil.php:1.3 --- nightlytest-serverside/SQLUtil.php:1.2 Wed Sep 20 07:05:38 2006 +++ nightlytest-serverside/SQLUtil.php Wed Sep 20 07:11:49 2006 @@ -17,7 +17,6 @@ $query = "SELECT * FROM tests"; if ($get_query = mysql_query($query)) { - $count = 0; while ($row = mysql_fetch_assoc($get_query)) { $old = $row['program']; $subpatterns = array(); @@ -27,12 +26,9 @@ $result = $row['result']; $measure = $row['measure']; $night = $row['night']; - $set_query = "UPDATE tests SET program=\"$new\" WHERE night=$night AND program=\"$old\" AND result=\"$result\" AND measure=\"$measure\""; - print "$set_query\n"; - $count = $count + 1; - if ($count > 100) { -break; - } + $query = "UPDATE tests SET program=\"$new\" WHERE night=$night AND program=\"$old\" AND result=\"$result\" AND measure=\"$measure\""; + $set_query = mysql_query($query); + mysql_free_result($set_query); } } @@ -41,6 +37,7 @@ $error = mysql_error(); print "$error\n"; } + print "DONE\n"; mysql_close($mysql_link); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: nightlytest-serverside/SQLUtil.php
Changes in directory nightlytest-serverside: SQLUtil.php updated: 1.3 -> 1.4 --- Log message: Clean up test records #4 --- Diffs of the changes: (+2 -3) SQLUtil.php |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) Index: nightlytest-serverside/SQLUtil.php diff -u nightlytest-serverside/SQLUtil.php:1.3 nightlytest-serverside/SQLUtil.php:1.4 --- nightlytest-serverside/SQLUtil.php:1.3 Wed Sep 20 07:11:49 2006 +++ nightlytest-serverside/SQLUtil.php Wed Sep 20 08:04:14 2006 @@ -15,7 +15,7 @@ $mysql_link = mysql_connect("127.0.0.1", "llvm", "ll2002vm") or die("Error: could not connect to database!\n"); mysql_select_db("nightlytestresults"); -$query = "SELECT * FROM tests"; +$query = "SELECT * FROM tests WHERE measure=\"dejagnu\""; if ($get_query = mysql_query($query)) { while ($row = mysql_fetch_assoc($get_query)) { $old = $row['program']; @@ -24,9 +24,8 @@ list($ignore, $before, $after) = $subpatterns; $new = "test/".$after; $result = $row['result']; - $measure = $row['measure']; $night = $row['night']; - $query = "UPDATE tests SET program=\"$new\" WHERE night=$night AND program=\"$old\" AND result=\"$result\" AND measure=\"$measure\""; + $query = "UPDATE tests SET program=\"$new\" WHERE night=$night AND program=\"$old\" AND result=\"$result\" AND measure=\"dejagnu\""; $set_query = mysql_query($query); mysql_free_result($set_query); } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: nightlytest-serverside/SQLUtil.php
Changes in directory nightlytest-serverside: SQLUtil.php updated: 1.4 -> 1.5 --- Log message: Clean up test records #5 --- Diffs of the changes: (+3 -0) SQLUtil.php |3 +++ 1 files changed, 3 insertions(+) Index: nightlytest-serverside/SQLUtil.php diff -u nightlytest-serverside/SQLUtil.php:1.4 nightlytest-serverside/SQLUtil.php:1.5 --- nightlytest-serverside/SQLUtil.php:1.4 Wed Sep 20 08:04:14 2006 +++ nightlytest-serverside/SQLUtil.php Wed Sep 20 08:08:38 2006 @@ -17,6 +17,7 @@ $query = "SELECT * FROM tests WHERE measure=\"dejagnu\""; if ($get_query = mysql_query($query)) { + $count = 1; while ($row = mysql_fetch_assoc($get_query)) { $old = $row['program']; $subpatterns = array(); @@ -29,6 +30,8 @@ $set_query = mysql_query($query); mysql_free_result($set_query); } +if (($count % 1000) == 0) print "Count = $count\n"; +$count++; } mysql_free_result($get_query); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: nightlytest-serverside/SQLUtil.php
Changes in directory nightlytest-serverside: SQLUtil.php updated: 1.5 -> 1.6 --- Log message: Clean up test records #6 --- Diffs of the changes: (+8 -7) SQLUtil.php | 15 --- 1 files changed, 8 insertions(+), 7 deletions(-) Index: nightlytest-serverside/SQLUtil.php diff -u nightlytest-serverside/SQLUtil.php:1.5 nightlytest-serverside/SQLUtil.php:1.6 --- nightlytest-serverside/SQLUtil.php:1.5 Wed Sep 20 08:08:38 2006 +++ nightlytest-serverside/SQLUtil.php Wed Sep 20 09:18:54 2006 @@ -20,18 +20,19 @@ $count = 1; while ($row = mysql_fetch_assoc($get_query)) { $old = $row['program']; -$subpatterns = array(); -if (preg_match("/(.*)\/llvm\/test\/(.*)/", $old, $subpatterns)) { - list($ignore, $before, $after) = $subpatterns; +$subpatterns = explode("/llvm/test/", $old, 2); +$new = $subpatterns[1]; +if (isset($new)) { $new = "test/".$after; $result = $row['result']; $night = $row['night']; $query = "UPDATE tests SET program=\"$new\" WHERE night=$night AND program=\"$old\" AND result=\"$result\" AND measure=\"dejagnu\""; - $set_query = mysql_query($query); - mysql_free_result($set_query); + print "$query\n"; +# $set_query = mysql_query($query); +# mysql_free_result($set_query); + $count = $count + 1; + if (($count % 100) == 0) break; } -if (($count % 1000) == 0) print "Count = $count\n"; -$count++; } mysql_free_result($get_query); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: nightlytest-serverside/SQLUtil.php
Changes in directory nightlytest-serverside: SQLUtil.php updated: 1.6 -> 1.7 --- Log message: Clean up test records #6 --- Diffs of the changes: (+3 -2) SQLUtil.php |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) Index: nightlytest-serverside/SQLUtil.php diff -u nightlytest-serverside/SQLUtil.php:1.6 nightlytest-serverside/SQLUtil.php:1.7 --- nightlytest-serverside/SQLUtil.php:1.6 Wed Sep 20 09:18:54 2006 +++ nightlytest-serverside/SQLUtil.php Wed Sep 20 09:20:47 2006 @@ -22,6 +22,7 @@ $old = $row['program']; $subpatterns = explode("/llvm/test/", $old, 2); $new = $subpatterns[1]; +print "$count: $new\n"; if (isset($new)) { $new = "test/".$after; $result = $row['result']; @@ -30,9 +31,9 @@ print "$query\n"; # $set_query = mysql_query($query); # mysql_free_result($set_query); - $count = $count + 1; - if (($count % 100) == 0) break; } +$count = $count + 1; +if (($count % 100) == 0) break; } mysql_free_result($get_query); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/Alpha/Readme.txt
Changes in directory llvm/lib/Target/Alpha: Readme.txt updated: 1.1 -> 1.2 --- Log message: Add Note --- Diffs of the changes: (+3 -0) Readme.txt |3 +++ 1 files changed, 3 insertions(+) Index: llvm/lib/Target/Alpha/Readme.txt diff -u llvm/lib/Target/Alpha/Readme.txt:1.1 llvm/lib/Target/Alpha/Readme.txt:1.2 --- llvm/lib/Target/Alpha/Readme.txt:1.1Sat Jun 3 19:25:51 2006 +++ llvm/lib/Target/Alpha/Readme.txtWed Sep 20 09:40:01 2006 @@ -1,4 +1,7 @@ %% +Fix cmovs with a constant on the wrong side + +%% Fix Ordered/Unordered FP stuff ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/Alpha/Readme.txt
Changes in directory llvm/lib/Target/Alpha: Readme.txt updated: 1.2 -> 1.3 --- Log message: clarify with test case --- Diffs of the changes: (+13 -0) Readme.txt | 13 + 1 files changed, 13 insertions(+) Index: llvm/lib/Target/Alpha/Readme.txt diff -u llvm/lib/Target/Alpha/Readme.txt:1.2 llvm/lib/Target/Alpha/Readme.txt:1.3 --- llvm/lib/Target/Alpha/Readme.txt:1.2Wed Sep 20 09:40:01 2006 +++ llvm/lib/Target/Alpha/Readme.txtWed Sep 20 09:48:00 2006 @@ -1,6 +1,19 @@ %% Fix cmovs with a constant on the wrong side +aka: +lda $0,10($31) +cmovlt $17,$0,$16 + +is bad for: + +long %cmov_lt2(long %a, long %c) { +entry: + %tmp.1 = setlt long %c, 0 + %retval = select bool %tmp.1, long 10, long %a + ret long %retval +} + %% Fix Ordered/Unordered FP stuff ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Regression/CodeGen/Alpha/cmov.ll
Changes in directory llvm/test/Regression/CodeGen/Alpha: cmov.ll updated: 1.1 -> 1.2 --- Log message: catch another constant --- Diffs of the changes: (+7 -1) cmov.ll |8 +++- 1 files changed, 7 insertions(+), 1 deletion(-) Index: llvm/test/Regression/CodeGen/Alpha/cmov.ll diff -u llvm/test/Regression/CodeGen/Alpha/cmov.ll:1.1 llvm/test/Regression/CodeGen/Alpha/cmov.ll:1.2 --- llvm/test/Regression/CodeGen/Alpha/cmov.ll:1.1 Wed Feb 1 13:36:52 2006 +++ llvm/test/Regression/CodeGen/Alpha/cmov.ll Wed Sep 20 10:04:55 2006 @@ -1,7 +1,7 @@ ; RUN: llvm-as < %s | llc -march=alpha | not grep cmovlt ; RUN: llvm-as < %s | llc -march=alpha | grep cmoveq -long %cmovlt_(long %a, long %c) { +long %cmov_lt(long %a, long %c) { entry: %tmp.1 = setlt long %c, 0 %retval = select bool %tmp.1, long %a, long 10 @@ -15,3 +15,9 @@ ret long %retval } +long %cmov_lt2(long %a, long %c) { +entry: + %tmp.1 = setgt long %c, 0 + %retval = select bool %tmp.1, long 10, long %a + ret long %retval +} ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: nightlytest-serverside/SQLUtil.php
Changes in directory nightlytest-serverside: SQLUtil.php updated: 1.7 -> 1.8 --- Log message: Clean up test records #7 --- Diffs of the changes: (+1 -1) SQLUtil.php |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: nightlytest-serverside/SQLUtil.php diff -u nightlytest-serverside/SQLUtil.php:1.7 nightlytest-serverside/SQLUtil.php:1.8 --- nightlytest-serverside/SQLUtil.php:1.7 Wed Sep 20 09:20:47 2006 +++ nightlytest-serverside/SQLUtil.php Wed Sep 20 10:00:11 2006 @@ -15,7 +15,7 @@ $mysql_link = mysql_connect("127.0.0.1", "llvm", "ll2002vm") or die("Error: could not connect to database!\n"); mysql_select_db("nightlytestresults"); -$query = "SELECT * FROM tests WHERE measure=\"dejagnu\""; +$query = "SELECT * FROM tests WHERE measure=\"dejagnu\" AND program LIKE \"%/llvm/test/%\""; if ($get_query = mysql_query($query)) { $count = 1; while ($row = mysql_fetch_assoc($get_query)) { ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaInstrInfo.td Readme.txt
Changes in directory llvm/lib/Target/Alpha: AlphaInstrInfo.td updated: 1.124 -> 1.125 Readme.txt updated: 1.3 -> 1.4 --- Log message: catch constants more often --- Diffs of the changes: (+14 -16) AlphaInstrInfo.td | 14 ++ Readme.txt| 16 2 files changed, 14 insertions(+), 16 deletions(-) Index: llvm/lib/Target/Alpha/AlphaInstrInfo.td diff -u llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.124 llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.125 --- llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.124 Mon Sep 18 13:01:03 2006 +++ llvm/lib/Target/Alpha/AlphaInstrInfo.td Wed Sep 20 10:05:49 2006 @@ -214,6 +214,20 @@ def : Pat<(select GPRC:$which, GPRC:$src1, immUExt8:$src2), (CMOVEQi GPRC:$src1, immUExt8:$src2, GPRC:$which)>; +//Invert sense when we can for constants: +def : Pat<(select (seteq GPRC:$RCOND, 0), immUExt8:$RFALSE, GPRC:$RTRUE), + (CMOVEQi GPRC:$RTRUE, immUExt8:$RFALSE, GPRC:$RCOND)>; +def : Pat<(select (setne GPRC:$RCOND, 0), immUExt8:$RFALSE, GPRC:$RTRUE), + (CMOVNEi GPRC:$RTRUE, immUExt8:$RFALSE, GPRC:$RCOND)>; +def : Pat<(select (setgt GPRC:$RCOND, 0), immUExt8:$RFALSE, GPRC:$RTRUE), + (CMOVGTi GPRC:$RTRUE, immUExt8:$RFALSE, GPRC:$RCOND)>; +def : Pat<(select (setge GPRC:$RCOND, 0), immUExt8:$RFALSE, GPRC:$RTRUE), + (CMOVGEi GPRC:$RTRUE, immUExt8:$RFALSE, GPRC:$RCOND)>; +def : Pat<(select (setlt GPRC:$RCOND, 0), immUExt8:$RFALSE, GPRC:$RTRUE), + (CMOVLTi GPRC:$RTRUE, immUExt8:$RFALSE, GPRC:$RCOND)>; +def : Pat<(select (setle GPRC:$RCOND, 0), immUExt8:$RFALSE, GPRC:$RTRUE), + (CMOVLEi GPRC:$RTRUE, immUExt8:$RFALSE, GPRC:$RCOND)>; + def ADDL : OForm< 0x10, 0x00, "addl $RA,$RB,$RC", [(set GPRC:$RC, (intop (add GPRC:$RA, GPRC:$RB)))], s_iadd>; Index: llvm/lib/Target/Alpha/Readme.txt diff -u llvm/lib/Target/Alpha/Readme.txt:1.3 llvm/lib/Target/Alpha/Readme.txt:1.4 --- llvm/lib/Target/Alpha/Readme.txt:1.3Wed Sep 20 09:48:00 2006 +++ llvm/lib/Target/Alpha/Readme.txtWed Sep 20 10:05:49 2006 @@ -1,20 +1,4 @@ %% -Fix cmovs with a constant on the wrong side - -aka: -lda $0,10($31) -cmovlt $17,$0,$16 - -is bad for: - -long %cmov_lt2(long %a, long %c) { -entry: - %tmp.1 = setlt long %c, 0 - %retval = select bool %tmp.1, long 10, long %a - ret long %retval -} - -%% Fix Ordered/Unordered FP stuff ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.514 -> 1.515 --- Log message: simplify --- Diffs of the changes: (+8 -12) InstructionCombining.cpp | 20 1 files changed, 8 insertions(+), 12 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.514 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.515 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.514 Tue Sep 19 23:44:59 2006 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Wed Sep 20 10:37:57 2006 @@ -1603,18 +1603,14 @@ CI = dyn_cast(RHS); Other = LHS; } -if (CI) { - const Type *UIntPtrTy = TD->getIntPtrType(); - const Type *SIntPtrTy = UIntPtrTy->getSignedVersion(); - if((CI->getType() == UIntPtrTy || CI->getType() == SIntPtrTy) -&& isa(CI->getOperand(0)->getType())) { - Instruction* I2 = new CastInst(CI->getOperand(0), -PointerType::get(Type::SByteTy), "ctg", &I); - WorkList.push_back(I2); - I2 = new GetElementPtrInst(I2, Other, "ctg", &I); - WorkList.push_back(I2); - return new CastInst(I2, CI->getType()); - } +if (CI && CI->getType()->isSized() && +(CI->getType()->getPrimitiveSize() == + TD->getIntPtrType()->getPrimitiveSize()) +&& isa(CI->getOperand(0)->getType())) { + Value* I2 = InsertCastBefore(CI->getOperand(0), + PointerType::get(Type::SByteTy), I); + I2 = InsertNewInstBefore(new GetElementPtrInst(I2, Other, "ctg2"), I); + return new CastInst(I2, CI->getType()); } } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: nightlytest-serverside/SQLUtil.php
Changes in directory nightlytest-serverside: SQLUtil.php updated: 1.8 -> 1.9 --- Log message: Clean up test records #9 --- Diffs of the changes: (+3 -3) SQLUtil.php |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: nightlytest-serverside/SQLUtil.php diff -u nightlytest-serverside/SQLUtil.php:1.8 nightlytest-serverside/SQLUtil.php:1.9 --- nightlytest-serverside/SQLUtil.php:1.8 Wed Sep 20 10:00:11 2006 +++ nightlytest-serverside/SQLUtil.php Wed Sep 20 11:31:32 2006 @@ -29,11 +29,11 @@ $night = $row['night']; $query = "UPDATE tests SET program=\"$new\" WHERE night=$night AND program=\"$old\" AND result=\"$result\" AND measure=\"dejagnu\""; print "$query\n"; -# $set_query = mysql_query($query); -# mysql_free_result($set_query); + $set_query = mysql_query($query); + mysql_free_result($set_query); } $count = $count + 1; -if (($count % 100) == 0) break; +if (($count % 1000) == 0) break; } mysql_free_result($get_query); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: nightlytest-serverside/SQLUtil.php
Changes in directory nightlytest-serverside: SQLUtil.php updated: 1.10 -> 1.11 --- Log message: Clean up test records #11 --- Diffs of the changes: (+3 -3) SQLUtil.php |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: nightlytest-serverside/SQLUtil.php diff -u nightlytest-serverside/SQLUtil.php:1.10 nightlytest-serverside/SQLUtil.php:1.11 --- nightlytest-serverside/SQLUtil.php:1.10 Wed Sep 20 11:44:06 2006 +++ nightlytest-serverside/SQLUtil.php Wed Sep 20 11:45:37 2006 @@ -15,20 +15,20 @@ $mysql_link = mysql_connect("127.0.0.1", "llvm", "ll2002vm") or die("Error: could not connect to database!\n"); mysql_select_db("nightlytestresults"); -$query = "SELECT * FROM tests WHERE measure=\"dejagnu\" AND program LIKE \"%%\""; +$query = "SELECT * FROM tests WHERE measure=\"dejagnu\" AND program LIKE \"%/llvm/test/%\""; if ($get_query = mysql_query($query)) { $count = 1; while ($row = mysql_fetch_assoc($get_query)) { $old = $row['program']; $subpatterns = explode("/llvm/test/", $old, 2); $after = $subpatterns[1]; -print "$count: $new\n"; +print "$count: $new\n"; if (isset($new)) { $new = "test/".$after; $result = $row['result']; $night = $row['night']; $query = "UPDATE tests SET program=\"$new\" WHERE night=$night AND program=\"$old\" AND result=\"$result\" AND measure=\"dejagnu\""; - print "$query\n"; + print "$query\n"; # $set_query = mysql_query($query); # mysql_free_result($set_query); } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: nightlytest-serverside/SQLUtil.php
Changes in directory nightlytest-serverside: SQLUtil.php updated: 1.11 -> 1.12 --- Log message: Clean up test records #12 --- Diffs of the changes: (+2 -2) SQLUtil.php |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: nightlytest-serverside/SQLUtil.php diff -u nightlytest-serverside/SQLUtil.php:1.11 nightlytest-serverside/SQLUtil.php:1.12 --- nightlytest-serverside/SQLUtil.php:1.11 Wed Sep 20 11:45:37 2006 +++ nightlytest-serverside/SQLUtil.php Wed Sep 20 11:49:28 2006 @@ -22,8 +22,8 @@ $old = $row['program']; $subpatterns = explode("/llvm/test/", $old, 2); $after = $subpatterns[1]; -print "$count: $new\n"; -if (isset($new)) { +print "$count: $after\n"; +if (isset($after)) { $new = "test/".$after; $result = $row['result']; $night = $row['night']; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: nightlytest-serverside/SQLUtil.php
Changes in directory nightlytest-serverside: SQLUtil.php updated: 1.9 -> 1.10 --- Log message: Clean up test records #10 --- Diffs of the changes: (+5 -5) SQLUtil.php | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) Index: nightlytest-serverside/SQLUtil.php diff -u nightlytest-serverside/SQLUtil.php:1.9 nightlytest-serverside/SQLUtil.php:1.10 --- nightlytest-serverside/SQLUtil.php:1.9 Wed Sep 20 11:31:32 2006 +++ nightlytest-serverside/SQLUtil.php Wed Sep 20 11:44:06 2006 @@ -15,13 +15,13 @@ $mysql_link = mysql_connect("127.0.0.1", "llvm", "ll2002vm") or die("Error: could not connect to database!\n"); mysql_select_db("nightlytestresults"); -$query = "SELECT * FROM tests WHERE measure=\"dejagnu\" AND program LIKE \"%/llvm/test/%\""; +$query = "SELECT * FROM tests WHERE measure=\"dejagnu\" AND program LIKE \"%%\""; if ($get_query = mysql_query($query)) { $count = 1; while ($row = mysql_fetch_assoc($get_query)) { $old = $row['program']; $subpatterns = explode("/llvm/test/", $old, 2); -$new = $subpatterns[1]; +$after = $subpatterns[1]; print "$count: $new\n"; if (isset($new)) { $new = "test/".$after; @@ -29,11 +29,11 @@ $night = $row['night']; $query = "UPDATE tests SET program=\"$new\" WHERE night=$night AND program=\"$old\" AND result=\"$result\" AND measure=\"dejagnu\""; print "$query\n"; - $set_query = mysql_query($query); - mysql_free_result($set_query); +# $set_query = mysql_query($query); +# mysql_free_result($set_query); } $count = $count + 1; -if (($count % 1000) == 0) break; +if (($count % 100) == 0) break; } mysql_free_result($get_query); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Regression/Transforms/PredicateSimplifier/2006-09-20-ResolveCycle.ll
Changes in directory llvm/test/Regression/Transforms/PredicateSimplifier: 2006-09-20-ResolveCycle.ll added (r1.1) --- Log message: Use a total ordering to compare instructions. Fixes infinite loop in resolve(). --- Diffs of the changes: (+28 -0) 2006-09-20-ResolveCycle.ll | 28 1 files changed, 28 insertions(+) Index: llvm/test/Regression/Transforms/PredicateSimplifier/2006-09-20-ResolveCycle.ll diff -c /dev/null llvm/test/Regression/Transforms/PredicateSimplifier/2006-09-20-ResolveCycle.ll:1.1 *** /dev/null Wed Sep 20 12:04:11 2006 --- llvm/test/Regression/Transforms/PredicateSimplifier/2006-09-20-ResolveCycle.ll Wed Sep 20 12:04:01 2006 *** *** 0 --- 1,28 + ; RUN: llvm-as < %s | opt -predsimplify -disable-output + + void %gs_image_next() { + entry: + %tmp = load uint* null ; [#uses=2] + br bool false, label %cond_next21, label %UnifiedReturnBlock + + cond_next21: ; preds = %entry + br bool false, label %cond_next42, label %UnifiedReturnBlock + + cond_next42: ; preds = %cond_next21 + br label %cond_true158 + + cond_next134: ; preds = %cond_true158 + %tmp1571 = seteq uint 0, %min ; [#uses=0] + ret void + + cond_true158: ; preds = %cond_true158, %cond_next42 + %tmp47 = sub uint %tmp, 0 ; [#uses=2] + %tmp49 = setle uint %tmp47, 0 ; [#uses=1] + %min = select bool %tmp49, uint %tmp47, uint 0 ; [#uses=2] + %tmp92 = add uint %min, 0 ; [#uses=1] + %tmp101 = seteq uint %tmp92, %tmp ; [#uses=1] + br bool %tmp101, label %cond_next134, label %cond_true158 + + UnifiedReturnBlock: ; preds = %cond_next21, %entry + ret void + } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
Changes in directory llvm/lib/Target/PowerPC: PPCAsmPrinter.cpp updated: 1.194 -> 1.195 --- Log message: Wrap some darwin'isms with isDarwin checks. --- Diffs of the changes: (+7 -4) PPCAsmPrinter.cpp | 11 +++ 1 files changed, 7 insertions(+), 4 deletions(-) Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp diff -u llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.194 llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.195 --- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.194 Thu Sep 7 17:06:40 2006 +++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp Wed Sep 20 12:07:15 2006 @@ -49,9 +49,11 @@ struct VISIBILITY_HIDDEN PPCAsmPrinter : public AsmPrinter { std::set FnStubs, GVStubs; +const PPCSubtarget &Subtarget; PPCAsmPrinter(std::ostream &O, TargetMachine &TM, const TargetAsmInfo *T) - : AsmPrinter(O, TM, T) {} + : AsmPrinter(O, TM, T), Subtarget(TM.getSubtarget()) { +} virtual const char *getPassName() const { return "PowerPC Assembly Printer"; @@ -248,7 +250,7 @@ DarwinAsmPrinter(std::ostream &O, PPCTargetMachine &TM, const TargetAsmInfo *T) : PPCAsmPrinter(O, TM, T), DW(O, this, T) { - bool isPPC64 = TM.getSubtargetImpl()->isPPC64(); + bool isPPC64 = Subtarget.isPPC64(); } virtual const char *getPassName() const { @@ -480,7 +482,7 @@ bool DarwinAsmPrinter::doInitialization(Module &M) { - if (TM.getSubtarget().isGigaProcessor()) + if (Subtarget.isGigaProcessor()) O << "\t.machine ppc970\n"; AsmPrinter::doInitialization(M); @@ -637,7 +639,8 @@ // implementation of multiple entry points). If this doesn't occur, the // linker can safely perform dead code stripping. Since LLVM never generates // code that does this, it is always safe to set. - O << "\t.subsections_via_symbols\n"; + if (Subtarget.isDarwin()) +O << "\t.subsections_via_symbols\n"; AsmPrinter::doFinalization(M); return false; // success ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp
Changes in directory llvm/lib/Transforms/Scalar: PredicateSimplifier.cpp updated: 1.11 -> 1.12 --- Log message: Use a total ordering to compare instructions. Fixes infinite loop in resolve(). --- Diffs of the changes: (+101 -87) PredicateSimplifier.cpp | 188 +--- 1 files changed, 101 insertions(+), 87 deletions(-) Index: llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp diff -u llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.11 llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.12 --- llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.11 Mon Sep 18 16:09:35 2006 +++ llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp Wed Sep 20 12:04:01 2006 @@ -49,60 +49,30 @@ Statistic<> NumInstruction("predsimplify", "Number of instructions removed"); - /// Returns true if V1 is a better choice than V2. Note that it is - /// not a total ordering. - struct compare { -bool operator()(Value *V1, Value *V2) const { - if (isa(V1)) { -if (!isa(V2)) { - return true; -} - } else if (isa(V1)) { -if (!isa(V2) && !isa(V2)) { - return true; -} - } - if (User *U = dyn_cast(V2)) { -for (User::const_op_iterator I = U->op_begin(), E = U->op_end(); - I != E; ++I) { - if (*I == V1) { -return true; - } -} - } - return false; -} - }; - - /// Used for choosing the canonical Value in a synonym set. - /// Leaves the better choice in V1. - static void order(Value *&V1, Value *&V2) { -static compare c; -if (c(V2, V1)) - std::swap(V1, V2); - } + class PropertySet; /// Similar to EquivalenceClasses, this stores the set of equivalent - /// types. Beyond EquivalenceClasses, it allows the user to specify - /// which element will act as leader through a StrictWeakOrdering - /// function. - template + /// types. Beyond EquivalenceClasses, it allows us to specify which + /// element will act as leader. + template class VISIBILITY_HIDDEN Synonyms { std::map mapping; std::vector leaders; -StrictWeak swo; +PropertySet *PS; public: typedef unsigned iterator; typedef const unsigned const_iterator; +Synonyms(PropertySet *PS) : PS(PS) {} + // Inspection bool empty() const { return leaders.empty(); } -unsigned countLeaders() const { +typename std::vector::size_type countLeaders() const { return leaders.size(); } @@ -151,50 +121,8 @@ /// Combine two sets referring to the same element, inserting the /// elements as needed. Returns a valid iterator iff two already /// existing disjoint synonym sets were combined. The iterator -/// points to the removed element. -iterator unionSets(ElemTy E1, ElemTy E2) { - if (swo(E2, E1)) std::swap(E1, E2); - - iterator I1 = findLeader(E1), - I2 = findLeader(E2); - - if (!I1 && !I2) { // neither entry is in yet -leaders.push_back(E1); -I1 = leaders.size(); -mapping[E1] = I1; -mapping[E2] = I1; -return 0; - } - - if (!I1 && I2) { -mapping[E1] = I2; -std::swap(getLeader(I2), E1); -return 0; - } - - if (I1 && !I2) { -mapping[E2] = I1; -return 0; - } - - if (I1 == I2) return 0; - - // This is the case where we have two sets, [%a1, %a2, %a3] and - // [%p1, %p2, %p3] and someone says that %a2 == %p3. We need to - // combine the two synsets. - - if (I1 > I2) --I1; - - for (std::map::iterator I = mapping.begin(), - E = mapping.end(); I != E; ++I) { -if (I->second == I2) I->second = I1; -else if (I->second > I2) --I->second; - } - - leaders.erase(leaders.begin() + I2 - 1); - - return I2; -} +/// points to the no longer existing element. +iterator unionSets(ElemTy E1, ElemTy E2); /// Returns an iterator pointing to the synonym set containing /// element e. If none exists, a new one is created and returned. @@ -212,13 +140,51 @@ /// Represents the set of equivalent Value*s and provides insertion /// and fast lookup. Also stores the set of inequality relationships. class PropertySet { +/// Returns true if V1 is a better choice than V2. Note that it is +/// not a total ordering. +bool compare(Value *V1, Value *V2) const { + if (isa(V1)) { +if (!isa(V2)) { + return true; +} + } else if (isa(V1)) { +if (!isa(V2) && !isa(V2)) { + return true; +} + } + if (Instruction *I1 = dyn_cast(V1)) { +if (Instruction *I2 = dyn_cast(V2)) { + BasicBlock *BB1 = I1->getParent(), + *BB2 = I2->getParent(); + if (BB1 == BB2) { +for (BasicBlock::const_iterator I = BB1->begin(), E = BB1->end(); + I != E; ++I) {
[llvm-commits] CVS: nightlytest-serverside/SQLUtil.php
Changes in directory nightlytest-serverside: SQLUtil.php updated: 1.12 -> 1.13 --- Log message: Clean up test records #13 --- Diffs of the changes: (+3 -4) SQLUtil.php |7 +++ 1 files changed, 3 insertions(+), 4 deletions(-) Index: nightlytest-serverside/SQLUtil.php diff -u nightlytest-serverside/SQLUtil.php:1.12 nightlytest-serverside/SQLUtil.php:1.13 --- nightlytest-serverside/SQLUtil.php:1.12 Wed Sep 20 11:49:28 2006 +++ nightlytest-serverside/SQLUtil.php Wed Sep 20 12:14:24 2006 @@ -28,12 +28,11 @@ $result = $row['result']; $night = $row['night']; $query = "UPDATE tests SET program=\"$new\" WHERE night=$night AND program=\"$old\" AND result=\"$result\" AND measure=\"dejagnu\""; - print "$query\n"; -# $set_query = mysql_query($query); -# mysql_free_result($set_query); + $set_query = mysql_query($query); + mysql_free_result($set_query); } $count = $count + 1; -if (($count % 100) == 0) break; +if (($count % 1000) == 0) break; } mysql_free_result($get_query); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC.h PPCAsmPrinter.cpp PPCTargetMachine.cpp
Changes in directory llvm/lib/Target/PowerPC: PPC.h updated: 1.33 -> 1.34 PPCAsmPrinter.cpp updated: 1.195 -> 1.196 PPCTargetMachine.cpp updated: 1.106 -> 1.107 --- Log message: The DarwinAsmPrinter need not check for isDarwin. createPPCAsmPrinterPass should create the right asmprinter subclass. --- Diffs of the changes: (+15 -14) PPC.h|4 ++-- PPCAsmPrinter.cpp| 23 --- PPCTargetMachine.cpp |2 +- 3 files changed, 15 insertions(+), 14 deletions(-) Index: llvm/lib/Target/PowerPC/PPC.h diff -u llvm/lib/Target/PowerPC/PPC.h:1.33 llvm/lib/Target/PowerPC/PPC.h:1.34 --- llvm/lib/Target/PowerPC/PPC.h:1.33 Wed Sep 6 13:34:40 2006 +++ llvm/lib/Target/PowerPC/PPC.h Wed Sep 20 12:12:19 2006 @@ -26,8 +26,8 @@ FunctionPass *createPPCBranchSelectionPass(); FunctionPass *createPPCISelDag(PPCTargetMachine &TM); -FunctionPass *createDarwinCodePrinterPass(std::ostream &OS, - PPCTargetMachine &TM); +FunctionPass *createPPCAsmPrinterPass(std::ostream &OS, + PPCTargetMachine &TM); FunctionPass *createPPCCodeEmitterPass(PPCTargetMachine &TM, MachineCodeEmitter &MCE); void addPPCMachOObjectWriterPass(FunctionPassManager &FPM, std::ostream &o, Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp diff -u llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.195 llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.196 --- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.195 Wed Sep 20 12:07:15 2006 +++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp Wed Sep 20 12:12:19 2006 @@ -270,15 +270,6 @@ }; } // end of anonymous namespace -/// createDarwinCodePrinterPass - Returns a pass that prints the PPC assembly -/// code for a MachineFunction to the given output stream, in a format that the -/// Darwin assembler can deal with. -/// -FunctionPass *llvm::createDarwinCodePrinterPass(std::ostream &o, -PPCTargetMachine &tm) { - return new DarwinAsmPrinter(o, tm, tm.getTargetAsmInfo()); -} - // Include the auto-generated portion of the assembly writer #include "PPCGenAsmWriter.inc" @@ -639,10 +630,20 @@ // implementation of multiple entry points). If this doesn't occur, the // linker can safely perform dead code stripping. Since LLVM never generates // code that does this, it is always safe to set. - if (Subtarget.isDarwin()) -O << "\t.subsections_via_symbols\n"; + O << "\t.subsections_via_symbols\n"; AsmPrinter::doFinalization(M); return false; // success } + + +/// createDarwinCodePrinterPass - Returns a pass that prints the PPC assembly +/// code for a MachineFunction to the given output stream, in a format that the +/// Darwin assembler can deal with. +/// +FunctionPass *llvm::createPPCAsmPrinterPass(std::ostream &o, +PPCTargetMachine &tm) { + return new DarwinAsmPrinter(o, tm, tm.getTargetAsmInfo()); +} + Index: llvm/lib/Target/PowerPC/PPCTargetMachine.cpp diff -u llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.106 llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.107 --- llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.106 Thu Sep 7 22:42:15 2006 +++ llvm/lib/Target/PowerPC/PPCTargetMachine.cppWed Sep 20 12:12:19 2006 @@ -122,7 +122,7 @@ bool PPCTargetMachine::addAssemblyEmitter(FunctionPassManager &PM, bool Fast, std::ostream &Out) { - PM.add(createDarwinCodePrinterPass(Out, *this)); + PM.add(createPPCAsmPrinterPass(Out, *this)); return false; } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: nightlytest-serverside/SQLUtil.php
Changes in directory nightlytest-serverside: SQLUtil.php updated: 1.13 -> 1.14 --- Log message: Clean up test records #14 --- Diffs of the changes: (+0 -1) SQLUtil.php |1 - 1 files changed, 1 deletion(-) Index: nightlytest-serverside/SQLUtil.php diff -u nightlytest-serverside/SQLUtil.php:1.13 nightlytest-serverside/SQLUtil.php:1.14 --- nightlytest-serverside/SQLUtil.php:1.13 Wed Sep 20 12:14:24 2006 +++ nightlytest-serverside/SQLUtil.php Wed Sep 20 13:05:35 2006 @@ -22,7 +22,6 @@ $old = $row['program']; $subpatterns = explode("/llvm/test/", $old, 2); $after = $subpatterns[1]; -print "$count: $after\n"; if (isset($after)) { $new = "test/".$after; $result = $row['result']; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: nightlytest-serverside/SQLQuery.php
Changes in directory nightlytest-serverside: SQLQuery.php updated: 1.8 -> 1.9 --- Log message: Allow multiple queries --- Diffs of the changes: (+1 -1) SQLQuery.php |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: nightlytest-serverside/SQLQuery.php diff -u nightlytest-serverside/SQLQuery.php:1.8 nightlytest-serverside/SQLQuery.php:1.9 --- nightlytest-serverside/SQLQuery.php:1.8 Tue Sep 19 12:52:13 2006 +++ nightlytest-serverside/SQLQuery.php Wed Sep 20 13:47:52 2006 @@ -41,7 +41,7 @@ if ($was_query) { $queries = split("\n", $queries); - $mysql_link = mysql_connect("127.0.0.1", $user, $password) or die("Error: could not connect to database!\n"); + $mysql_link = mysql_connect("127.0.0.1", $user, $password, false, CLIENT_MULTI_STATEMENTS) or die("Error: could not connect to database!\n"); mysql_select_db("nightlytestresults"); foreach ($queries as $query) { ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: nightlytest-serverside/SQLUtil.php
Changes in directory nightlytest-serverside: SQLUtil.php (r1.14) removed --- Log message: not needed --- Diffs of the changes: (+0 -0) 0 files changed ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: nightlytest-serverside/NightlyTestAccept.cgi
Changes in directory nightlytest-serverside: NightlyTestAccept.cgi (r1.58) removed --- Log message: force testers to switch --- Diffs of the changes: (+0 -0) 0 files changed ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaLLRP.cpp
Changes in directory llvm/lib/Target/Alpha: AlphaLLRP.cpp updated: 1.1 -> 1.2 --- Log message: Account for pseudo-ops correctly --- Diffs of the changes: (+51 -44) AlphaLLRP.cpp | 95 +++--- 1 files changed, 51 insertions(+), 44 deletions(-) Index: llvm/lib/Target/Alpha/AlphaLLRP.cpp diff -u llvm/lib/Target/Alpha/AlphaLLRP.cpp:1.1 llvm/lib/Target/Alpha/AlphaLLRP.cpp:1.2 --- llvm/lib/Target/Alpha/AlphaLLRP.cpp:1.1 Mon Sep 18 14:44:29 2006 +++ llvm/lib/Target/Alpha/AlphaLLRP.cpp Wed Sep 20 15:08:52 2006 @@ -58,7 +58,6 @@ case Alpha::LDQ: case Alpha::LDL: case Alpha::LDWU: case Alpha::LDBU: case Alpha::LDT: case Alpha::LDS: - case Alpha::STQ: case Alpha::STL: case Alpha::STW: case Alpha::STB: case Alpha::STT: case Alpha::STS: @@ -89,49 +88,57 @@ Changed = true; nopintro += 2; count += 2; } else if (prev[2] - && prev[2]->getOperand(2).getReg() == - MI->getOperand(2).getReg() - && prev[2]->getOperand(1).getImmedValue() == - MI->getOperand(1).getImmedValue()) { - prev[0] = prev[1] = prev[2] = 0; - BuildMI(MBB, MI, Alpha::BIS, 2, Alpha::R31).addReg(Alpha::R31) - .addReg(Alpha::R31); - BuildMI(MBB, MI, Alpha::BIS, 2, Alpha::R31).addReg(Alpha::R31) - .addReg(Alpha::R31); - BuildMI(MBB, MI, Alpha::BIS, 2, Alpha::R31).addReg(Alpha::R31) - .addReg(Alpha::R31); - Changed = true; nopintro += 3; - count += 3; - } - prev[0] = prev[1]; - prev[1] = prev[2]; - prev[2] = MI; - break; - } - //fall through - case Alpha::BR: - case Alpha::JMP: - ub = true; - //fall through - default: - prev[0] = prev[1]; - prev[1] = prev[2]; - prev[2] = 0; - break; - } - } - if (ub || AlignAll) { - //we can align stuff for free at this point - while (count % 4) { - BuildMI(MBB, MBB.end(), Alpha::BIS, 2, Alpha::R31) - .addReg(Alpha::R31).addReg(Alpha::R31); - ++count; - ++nopalign; - prev[0] = prev[1]; - prev[1] = prev[2]; - prev[2] = 0; - } - } + && prev[2]->getOperand(2).getReg() == + MI->getOperand(2).getReg() + && prev[2]->getOperand(1).getImmedValue() == + MI->getOperand(1).getImmedValue()) { + prev[0] = prev[1] = prev[2] = 0; + BuildMI(MBB, MI, Alpha::BIS, 2, Alpha::R31).addReg(Alpha::R31) +.addReg(Alpha::R31); + BuildMI(MBB, MI, Alpha::BIS, 2, Alpha::R31).addReg(Alpha::R31) +.addReg(Alpha::R31); + BuildMI(MBB, MI, Alpha::BIS, 2, Alpha::R31).addReg(Alpha::R31) +.addReg(Alpha::R31); + Changed = true; nopintro += 3; + count += 3; +} +prev[0] = prev[1]; +prev[1] = prev[2]; +prev[2] = MI; + break; + } + prev[0] = prev[1]; + prev[1] = prev[2]; + prev[2] = 0; + break; +case Alpha::ALTENT: +case Alpha::MEMLABEL: +case Alpha::PCLABEL: + --count; + break; +case Alpha::BR: +case Alpha::JMP: + ub = true; + //fall through +default: + prev[0] = prev[1]; + prev[1] = prev[2]; + prev[2] = 0; + break; +} + } + if (ub || AlignAll) { +//we can align stuff for free at this point +while (count % 4) { + BuildMI(MBB, MBB.end(), Alpha::BIS, 2, Alpha::R31) +.addReg(Alpha::R31).addReg(Alpha::R31); + ++count; + ++nopalign; + prev[0] = prev[1]; + prev[1] = prev[2]; + prev[2] = 0; +} + } } return Changed; } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/VMCore/AsmWriter.cpp
Changes in directory llvm/lib/VMCore: AsmWriter.cpp updated: 1.205 -> 1.206 --- Log message: Adding codegeneration for StdCall & FastCall calling conventions --- Diffs of the changes: (+9 -3) AsmWriter.cpp | 12 +--- 1 files changed, 9 insertions(+), 3 deletions(-) Index: llvm/lib/VMCore/AsmWriter.cpp diff -u llvm/lib/VMCore/AsmWriter.cpp:1.205 llvm/lib/VMCore/AsmWriter.cpp:1.206 --- llvm/lib/VMCore/AsmWriter.cpp:1.205 Thu Sep 14 13:23:27 2006 +++ llvm/lib/VMCore/AsmWriter.cpp Wed Sep 20 17:03:51 2006 @@ -967,9 +967,11 @@ // Print the calling convention. switch (F->getCallingConv()) { case CallingConv::C: break; // default - case CallingConv::CSRet: Out << "csretcc "; break; - case CallingConv::Fast: Out << "fastcc "; break; - case CallingConv::Cold: Out << "coldcc "; break; + case CallingConv::CSRet:Out << "csretcc "; break; + case CallingConv::Fast: Out << "fastcc "; break; + case CallingConv::Cold: Out << "coldcc "; break; + case CallingConv::X86_StdCall: Out << "x86_stdcallcc "; break; + case CallingConv::X86_FastCall: Out << "x86_fastcallcc "; break; default: Out << "cc" << F->getCallingConv() << " "; break; } @@ -1159,6 +1161,8 @@ case CallingConv::CSRet: Out << " csretcc"; break; case CallingConv::Fast: Out << " fastcc"; break; case CallingConv::Cold: Out << " coldcc"; break; +case CallingConv::X86_StdCall: Out << "x86_stdcallcc "; break; +case CallingConv::X86_FastCall: Out << "x86_fastcallcc "; break; default: Out << " cc" << CI->getCallingConv(); break; } @@ -1197,6 +1201,8 @@ case CallingConv::CSRet: Out << " csretcc"; break; case CallingConv::Fast: Out << " fastcc"; break; case CallingConv::Cold: Out << " coldcc"; break; +case CallingConv::X86_StdCall: Out << "x86_stdcallcc "; break; +case CallingConv::X86_FastCall: Out << "x86_fastcallcc "; break; default: Out << " cc" << II->getCallingConv(); break; } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp X86AsmPrinter.cpp X86AsmPrinter.h X86ISelLowering.cpp X86ISelLowering.h X86IntelAsmPrinter.cpp X86MachineFunctionInfo.h
Changes in directory llvm/lib/Target/X86: X86ATTAsmPrinter.cpp updated: 1.63 -> 1.64 X86AsmPrinter.cpp updated: 1.198 -> 1.199 X86AsmPrinter.h updated: 1.31 -> 1.32 X86ISelLowering.cpp updated: 1.261 -> 1.262 X86ISelLowering.h updated: 1.72 -> 1.73 X86IntelAsmPrinter.cpp updated: 1.56 -> 1.57 X86MachineFunctionInfo.h updated: 1.2 -> 1.3 --- Log message: Adding codegeneration for StdCall & FastCall calling conventions --- Diffs of the changes: (+771 -68) X86ATTAsmPrinter.cpp | 22 + X86AsmPrinter.cpp| 88 ++ X86AsmPrinter.h | 18 + X86ISelLowering.cpp | 621 +++ X86ISelLowering.h| 10 X86IntelAsmPrinter.cpp | 41 ++- X86MachineFunctionInfo.h | 39 ++ 7 files changed, 771 insertions(+), 68 deletions(-) Index: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp diff -u llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.63 llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.64 --- llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.63 Sun Sep 17 15:25:45 2006 +++ llvm/lib/Target/X86/X86ATTAsmPrinter.cppWed Sep 20 17:03:51 2006 @@ -15,8 +15,10 @@ #include "X86ATTAsmPrinter.h" #include "X86.h" +#include "X86MachineFunctionInfo.h" #include "X86TargetMachine.h" #include "X86TargetAsmInfo.h" +#include "llvm/CallingConv.h" #include "llvm/Module.h" #include "llvm/Support/Mangler.h" #include "llvm/Target/TargetAsmInfo.h" @@ -42,6 +44,16 @@ // Print out labels for the function. const Function *F = MF.getFunction(); + unsigned CC = F->getCallingConv(); + + // Populate function information map. Actually, We don't want to populate + // non-stdcall or non-fastcall functions' information right now. + if (CC == CallingConv::X86_StdCall || CC == CallingConv::X86_FastCall) { +FunctionInfoMap[F] = *(MF.getInfo()); + } + + X86SharedAsmPrinter::decorateName(CurrentFnName, F); + switch (F->getLinkage()) { default: assert(0 && "Unknown linkage type!"); case Function::InternalLinkage: // Symbols default to internal. @@ -182,11 +194,14 @@ bool isMemOp = Modifier && !strcmp(Modifier, "mem"); if (!isMemOp && !isCallOp) O << '$'; -GlobalValue *GV = MO.getGlobal(); +GlobalValue *GV = MO.getGlobal(); std::string Name = Mang->getValueName(GV); bool isExt = (GV->isExternal() || GV->hasWeakLinkage() || GV->hasLinkOnceLinkage()); + +X86SharedAsmPrinter::decorateName(Name, (Function*)GV); + if (X86PICStyle == PICStyle::Stub && TM.getRelocationModel() != Reloc::Static) { // Link-once, External, or Weakly-linked global variables need @@ -202,8 +217,6 @@ } } else { if (GV->hasDLLImportLinkage()) { - // FIXME: This should be fixed with full support of stdcall & fastcall - // CC's O << "__imp_"; } O << Name; @@ -213,12 +226,9 @@ O << "-\"L" << getFunctionNumber() << "$pb\""; } else { if (GV->hasDLLImportLinkage()) { -// FIXME: This should be fixed with full support of stdcall & fastcall -// CC's O << "__imp_"; } O << Name; - } int Offset = MO.getOffset(); Index: llvm/lib/Target/X86/X86AsmPrinter.cpp diff -u llvm/lib/Target/X86/X86AsmPrinter.cpp:1.198 llvm/lib/Target/X86/X86AsmPrinter.cpp:1.199 --- llvm/lib/Target/X86/X86AsmPrinter.cpp:1.198 Sun Sep 17 15:25:45 2006 +++ llvm/lib/Target/X86/X86AsmPrinter.cpp Wed Sep 20 17:03:51 2006 @@ -17,18 +17,106 @@ #include "X86AsmPrinter.h" #include "X86ATTAsmPrinter.h" #include "X86IntelAsmPrinter.h" +#include "X86MachineFunctionInfo.h" #include "X86Subtarget.h" +#include "llvm/ADT/StringExtras.h" +#include "llvm/CallingConv.h" #include "llvm/Constants.h" #include "llvm/Module.h" #include "llvm/Type.h" #include "llvm/Assembly/Writer.h" #include "llvm/Support/Mangler.h" #include "llvm/Target/TargetAsmInfo.h" + using namespace llvm; Statistic<> llvm::EmittedInsts("asm-printer", "Number of machine instrs printed"); +static X86FunctionInfo calculateFunctionInfo(const Function* F, + const TargetData* TD) +{ + X86FunctionInfo Info; + uint64_t size = 0; + + switch (F->getCallingConv()) { + case CallingConv::X86_StdCall: +Info.setDecorationStyle(StdCall); +break; + case CallingConv::X86_FastCall: +Info.setDecorationStyle(FastCall); +break; + default: +return Info; + } + + for (Function::const_arg_iterator AI = F->arg_begin(), +AE = F->arg_end(); + AI != AE; + ++AI) { +size += TD->getTypeSize(AI->getType()); + } + + // We're not supporting to huge arguments :) + Info.setBytesToPopOnReturn((unsigned int)size); + + return Info; +} + + +// Query FunctionInfoMap and use this information for various name decoration +void X86SharedAsmPrinter::
[llvm-commits] CVS: llvm/test/Regression/Transforms/PredicateSimplifier/2006-09-20-SetCC.ll
Changes in directory llvm/test/Regression/Transforms/PredicateSimplifier: 2006-09-20-SetCC.ll added (r1.1) --- Log message: Once we're down to "setcc type constant1, constant2", at least come up with the right answer. --- Diffs of the changes: (+54 -0) 2006-09-20-SetCC.ll | 54 1 files changed, 54 insertions(+) Index: llvm/test/Regression/Transforms/PredicateSimplifier/2006-09-20-SetCC.ll diff -c /dev/null llvm/test/Regression/Transforms/PredicateSimplifier/2006-09-20-SetCC.ll:1.1 *** /dev/null Wed Sep 20 18:02:34 2006 --- llvm/test/Regression/Transforms/PredicateSimplifier/2006-09-20-SetCC.ll Wed Sep 20 18:02:24 2006 *** *** 0 --- 1,54 + ; RUN: llvm-as < %s | opt -predsimplify | llvm-dis | grep br | grep bb8 | grep cond_true$ | grep false + + %str = external global [4 x sbyte]; <[4 x sbyte]*> [#uses=1] + + implementation ; Functions: + + declare int %sprintf(sbyte*, sbyte*, ...) + + int %main() { + entry: + br label %cond_true.outer + + cond_true.outer: ; preds = %cond_true.i, %entry + %i.0.0.ph = phi int [ 0, %entry ], [ %tmp5, %cond_true.i ] ; [#uses=1] + %j.0.0.ph = phi int [ 0, %entry ], [ %tmp312, %cond_true.i ] ; [#uses=2] + br label %cond_true + + cond_true:; preds = %return.i, %cond_true.outer + %indvar = phi uint [ 0, %cond_true.outer ], [ %indvar.next, %return.i ] ; [#uses=2] + %indvar = cast uint %indvar to int ; [#uses=1] + %i.0.0 = add int %indvar, %i.0.0.ph ; [#uses=3] + %savedstack = call sbyte* %llvm.stacksave( ); [#uses=2] + %tmp.i = seteq int %i.0.0, 0; [#uses=1] + %tmp5 = add int %i.0.0, 1 ; [#uses=3] + br bool %tmp.i, label %return.i, label %cond_true.i + + cond_true.i: ; preds = %cond_true + %tmp.i = alloca [1000 x sbyte] ; <[1000 x sbyte]*> [#uses=1] + %tmp.sub.i = getelementptr [1000 x sbyte]* %tmp.i, int 0, int 0 ; [#uses=2] + %tmp4.i = call int (sbyte*, sbyte*, ...)* %sprintf( sbyte* %tmp.sub.i, sbyte* getelementptr ([4 x sbyte]* %str, int 0, uint 0), int %i.0.0 ) ; [#uses=0] + %tmp.i = load sbyte* %tmp.sub.i ; [#uses=1] + %tmp7.i = cast sbyte %tmp.i to int ; [#uses=1] + call void %llvm.stackrestore( sbyte* %savedstack ) + %tmp312 = add int %tmp7.i, %j.0.0.ph; [#uses=2] + %tmp19 = setgt int %tmp5, ; [#uses=1] + br bool %tmp19, label %bb8, label %cond_true.outer + + return.i: ; preds = %cond_true + call void %llvm.stackrestore( sbyte* %savedstack ) + %tmp21 = setgt int %tmp5, ; [#uses=1] + %indvar.next = add uint %indvar, 1 ; [#uses=1] + br bool %tmp21, label %bb8, label %cond_true + + bb8: ; preds = %return.i, %cond_true.i + %j.0.1 = phi int [ %j.0.0.ph, %return.i ], [ %tmp312, %cond_true.i ] ; [#uses=1] + %tmp10 = call int (sbyte*, ...)* %printf( sbyte* getelementptr ([4 x sbyte]* %str, int 0, uint 0), int %j.0.1 ) ; [#uses=0] + ret int undef + } + + declare int %printf(sbyte*, ...) + + declare sbyte* %llvm.stacksave() + + declare void %llvm.stackrestore(sbyte*) ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp
Changes in directory llvm/lib/Transforms/Scalar: PredicateSimplifier.cpp updated: 1.12 -> 1.13 --- Log message: Once we're down to "setcc type constant1, constant2", at least come up with the right answer. --- Diffs of the changes: (+14 -18) PredicateSimplifier.cpp | 32 ++-- 1 files changed, 14 insertions(+), 18 deletions(-) Index: llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp diff -u llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.12 llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.13 --- llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.12 Wed Sep 20 12:04:01 2006 +++ llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp Wed Sep 20 18:02:24 2006 @@ -524,6 +524,9 @@ const PropertySet &KP) { // Attempt to resolve the SetCondInst to a boolean. + static ConstantBool *True = ConstantBool::True, + *False = ConstantBool::False; + Value *SCI0 = resolve(SCI->getOperand(0), KP), *SCI1 = resolve(SCI->getOperand(1), KP); @@ -536,10 +539,8 @@ if (NE != KP.Properties.end()) { switch (SCI->getOpcode()) { -case Instruction::SetEQ: - return ConstantBool::False; -case Instruction::SetNE: - return ConstantBool::True; +case Instruction::SetEQ: return False; +case Instruction::SetNE: return True; case Instruction::SetLE: case Instruction::SetGE: case Instruction::SetLT: @@ -553,25 +554,20 @@ return SCI; } + uint64_t I1 = CI1->getRawValue(), I2 = CI2->getRawValue(); switch(SCI->getOpcode()) { -case Instruction::SetLE: -case Instruction::SetGE: -case Instruction::SetEQ: - if (CI1->getRawValue() == CI2->getRawValue()) -return ConstantBool::True; - else -return ConstantBool::False; -case Instruction::SetLT: -case Instruction::SetGT: -case Instruction::SetNE: - if (CI1->getRawValue() == CI2->getRawValue()) -return ConstantBool::False; - else -return ConstantBool::True; +case Instruction::SetLE: if (I1 <= I2) return True; else return False; +case Instruction::SetGE: if (I1 >= I2) return True; else return False; +case Instruction::SetEQ: if (I1 == I2) return True; else return False; +case Instruction::SetLT: if (I1 < I2) return True; else return False; +case Instruction::SetGT: if (I1 > I2) return True; else return False; +case Instruction::SetNE: if (I1 != I2) return True; else return False; default: assert(0 && "Unknown opcode in SetContInst."); break; } + + return SCI; } Value *PredicateSimplifier::resolve(BinaryOperator *BO, ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/autoconf/configure.ac
Changes in directory llvm-test/autoconf: configure.ac updated: 1.37 -> 1.38 --- Log message: Adding HMMER as an external test. --- Diffs of the changes: (+1 -0) configure.ac |1 + 1 files changed, 1 insertion(+) Index: llvm-test/autoconf/configure.ac diff -u llvm-test/autoconf/configure.ac:1.37 llvm-test/autoconf/configure.ac:1.38 --- llvm-test/autoconf/configure.ac:1.37Fri Sep 1 19:04:00 2006 +++ llvm-test/autoconf/configure.ac Wed Sep 20 18:40:57 2006 @@ -79,6 +79,7 @@ EXTERNAL_BENCHMARK(fpgrowth,${LLVM_EXTERNALS}/fpgrowth) EXTERNAL_BENCHMARK(alp,${LLVM_EXTERNALS}/alp) EXTERNAL_BENCHMARK(nurbs,${LLVM_EXTERNALS}/nurbs) +EXTERNAL_BENCHMARK(hmmer,${LLVM_EXTERNALS}/hmmer) dnl Check that the paths of provided external benchmark dirs make sense if test -n "$SPEC2006_ROOT" ; then ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/configure Makefile.config.in
Changes in directory llvm-test: configure updated: 1.39 -> 1.40 Makefile.config.in updated: 1.23 -> 1.24 --- Log message: Adding HMMER as an external test. --- Diffs of the changes: (+82 -26) Makefile.config.in |4 ++ configure | 104 +++-- 2 files changed, 82 insertions(+), 26 deletions(-) Index: llvm-test/configure diff -u llvm-test/configure:1.39 llvm-test/configure:1.40 --- llvm-test/configure:1.39Sun Sep 3 15:38:14 2006 +++ llvm-test/configure Wed Sep 20 18:40:57 2006 @@ -812,6 +812,8 @@ USE_ALP NURBS_ROOT USE_NURBS +HMMER_ROOT +USE_HMMER DISABLE_LLC_DIFFS CXX CXXFLAGS @@ -1483,6 +1485,7 @@ --with-fpgrowth=DIR Use fpgrowth as a benchmark (srcs in DIR) --with-alp=DIR Use alp as a benchmark (srcs in DIR) --with-nurbs=DIRUse nurbs as a benchmark (srcs in DIR) + --with-hmmer=DIRUse hmmer as a benchmark (srcs in DIR) --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-pic try to use only PIC/non-PIC objects [default=use both] @@ -2555,6 +2558,53 @@ + +# Check whether --with-hmmer was given. +if test "${with_hmmer+set}" = set; then + withval=$with_hmmer; checkresult=$withval +else + checkresult=auto +fi + +{ echo "$as_me:$LINENO: checking for hmmer benchmark sources" >&5 +echo $ECHO_N "checking for hmmer benchmark sources... $ECHO_C" >&6; } +case "$checkresult" in +auto|yes) + defaultdir=${LLVM_EXTERNALS}/hmmer + if test -d "$defaultdir"; then +HMMER_ROOT=$defaultdir + +USE_HMMER=USE_HMMER=1 + +checkresult="yes, found in $defaultdir" + else +checkresult=no + fi + ;; +no) + + + checkresult=no + ;; +*) + if test -d "$checkresult" ; then +HMMER_ROOT="$checkresult" + +USE_HMMER=USE_HMMER=1 + +checkresult="yes, in $checkresult" + else + + +checkresult="no, not found in $checkresult" + fi + ;; +esac +{ echo "$as_me:$LINENO: result: $checkresult" >&5 +echo "${ECHO_T}$checkresult" >&6; } + + + if test -n "$SPEC2006_ROOT" ; then if test -d "$SPEC2006_ROOT" ; then if test `basename "$SPEC2006_ROOT"` != "benchspec"; then @@ -5334,7 +5384,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 5337 "configure"' > conftest.$ac_ext + echo '#line 5387 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -7499,11 +7549,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7502: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7552: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7506: \$? = $ac_status" >&5 + echo "$as_me:7556: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7767,11 +7817,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7770: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7820: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7774: \$? = $ac_status" >&5 + echo "$as_me:7824: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7871,11 +7921,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7874: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7924: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7878: \$? = $ac_status" >&5 + echo "$as_me:7928: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -10323,7 +10373,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:12844: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:12798: \$? = $ac_status" >&5 + echo "$as_me:12848: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -12895,11 +12945,11 @@ -e 's:.*FLAGS}\{0,1\} :&
[llvm-commits] CVS: llvm-test/External/HMMER/
Changes in directory llvm-test/External/HMMER: --- Log message: Directory /var/cvs/llvm/llvm-test/External/HMMER added to the repository --- Diffs of the changes: (+0 -0) 0 files changed ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/Makefile
Changes in directory llvm-test/External: Makefile updated: 1.23 -> 1.24 --- Log message: Adding HMMER as an external test. --- Diffs of the changes: (+5 -1) Makefile |6 +- 1 files changed, 5 insertions(+), 1 deletion(-) Index: llvm-test/External/Makefile diff -u llvm-test/External/Makefile:1.23 llvm-test/External/Makefile:1.24 --- llvm-test/External/Makefile:1.23Fri Apr 21 03:19:02 2006 +++ llvm-test/External/Makefile Wed Sep 20 18:43:34 2006 @@ -8,7 +8,7 @@ # # Create the list of directories to compile # -PARALLEL_DIRS := SPEC Povray Namd FPGrowth BoxedSim Nurbs +PARALLEL_DIRS := SPEC Povray Namd FPGrowth BoxedSim Nurbs HMMER ifndef USE_POVRAY PARALLEL_DIRS := $(filter-out Povray, $(PARALLEL_DIRS)) @@ -30,6 +30,10 @@ PARALLEL_DIRS := $(filter-out Nurbs, $(PARALLEL_DIRS)) endif +ifndef USE_HMMER +PARALLEL_DIRS := $(filter-out HMMER, $(PARALLEL_DIRS)) +endif + # Sparc can't handle Namd: infinite loop, cause unknown ifeq ($(ARCH),Sparc) PARALLEL_DIRS := $(filter-out Namd, $(PARALLEL_DIRS)) ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/HMMER/Makefile README
Changes in directory llvm-test/External/HMMER: Makefile added (r1.1) README added (r1.1) --- Log message: Adding HMMER as an external test. --- Diffs of the changes: (+18 -0) Makefile | 16 README |2 ++ 2 files changed, 18 insertions(+) Index: llvm-test/External/HMMER/Makefile diff -c /dev/null llvm-test/External/HMMER/Makefile:1.1 *** /dev/null Wed Sep 20 18:43:44 2006 --- llvm-test/External/HMMER/Makefile Wed Sep 20 18:43:34 2006 *** *** 0 --- 1,16 + LEVEL = ../.. + + include $(LEVEL)/Makefile.config + + PROG = hmmcalibrate + SourceDir := $(HMMER_ROOT) + + CPPFLAGS = -DSSE2 + + ifdef LARGE_PROBLEM_SIZE + RUN_OPTIONS = --fixed 400 --cpu 1 --num 20 $(HMMER_ROOT)/globin.hmm + else + RUN_OPTIONS = --fixed 400 --cpu 1 --num 8 $(HMMER_ROOT)/globin.hmm + endif + + include $(LEVEL)/MultiSource/Makefile.multisrc Index: llvm-test/External/HMMER/README diff -c /dev/null llvm-test/External/HMMER/README:1.1 *** /dev/null Wed Sep 20 18:43:50 2006 --- llvm-test/External/HMMER/README Wed Sep 20 18:43:34 2006 *** *** 0 --- 1,2 + HMMER - profile hidden Markov models for biological sequence analysis + http://hmmer.wustl.edu/ ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp
Changes in directory llvm/lib/Transforms/Scalar: PredicateSimplifier.cpp updated: 1.13 -> 1.14 --- Log message: Don't rewrite ConstantExpr::get. --- Diffs of the changes: (+19 -43) PredicateSimplifier.cpp | 62 ++-- 1 files changed, 19 insertions(+), 43 deletions(-) Index: llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp diff -u llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.13 llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.14 --- llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.13 Wed Sep 20 18:02:24 2006 +++ llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp Wed Sep 20 20:05:35 2006 @@ -524,66 +524,42 @@ const PropertySet &KP) { // Attempt to resolve the SetCondInst to a boolean. - static ConstantBool *True = ConstantBool::True, - *False = ConstantBool::False; - Value *SCI0 = resolve(SCI->getOperand(0), KP), *SCI1 = resolve(SCI->getOperand(1), KP); - ConstantIntegral *CI1 = dyn_cast(SCI0), - *CI2 = dyn_cast(SCI1); + PropertySet::ConstPropertyIterator NE = + KP.findProperty(PropertySet::NE, SCI0, SCI1); - if (!CI1 || !CI2) { -PropertySet::ConstPropertyIterator NE = -KP.findProperty(PropertySet::NE, SCI0, SCI1); - -if (NE != KP.Properties.end()) { - switch (SCI->getOpcode()) { -case Instruction::SetEQ: return False; -case Instruction::SetNE: return True; -case Instruction::SetLE: -case Instruction::SetGE: -case Instruction::SetLT: -case Instruction::SetGT: - break; -default: - assert(0 && "Unknown opcode in SetCondInst."); - break; - } + if (NE != KP.Properties.end()) { +switch (SCI->getOpcode()) { + case Instruction::SetEQ: return ConstantBool::False; + case Instruction::SetNE: return ConstantBool::True; + case Instruction::SetLE: + case Instruction::SetGE: + case Instruction::SetLT: + case Instruction::SetGT: +break; + default: +assert(0 && "Unknown opcode in SetCondInst."); +break; } -return SCI; } - - uint64_t I1 = CI1->getRawValue(), I2 = CI2->getRawValue(); - switch(SCI->getOpcode()) { -case Instruction::SetLE: if (I1 <= I2) return True; else return False; -case Instruction::SetGE: if (I1 >= I2) return True; else return False; -case Instruction::SetEQ: if (I1 == I2) return True; else return False; -case Instruction::SetLT: if (I1 < I2) return True; else return False; -case Instruction::SetGT: if (I1 > I2) return True; else return False; -case Instruction::SetNE: if (I1 != I2) return True; else return False; -default: - assert(0 && "Unknown opcode in SetContInst."); - break; - } - return SCI; } Value *PredicateSimplifier::resolve(BinaryOperator *BO, const PropertySet &KP) { - if (SetCondInst *SCI = dyn_cast(BO)) -return resolve(SCI, KP); - Value *lhs = resolve(BO->getOperand(0), KP), *rhs = resolve(BO->getOperand(1), KP); + ConstantIntegral *CI1 = dyn_cast(lhs); ConstantIntegral *CI2 = dyn_cast(rhs); - if (!CI1 || !CI2) return BO; + if (CI1 && CI2) return ConstantExpr::get(BO->getOpcode(), CI1, CI2); + + if (SetCondInst *SCI = dyn_cast(BO)) +return resolve(SCI, KP); - Value *V = ConstantExpr::get(BO->getOpcode(), CI1, CI2); - if (V) return V; return BO; } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp
Changes in directory llvm/lib/Target/X86: X86ISelLowering.cpp updated: 1.262 -> 1.263 --- Log message: Fix compile error. --- Diffs of the changes: (+4 -4) X86ISelLowering.cpp |8 1 files changed, 4 insertions(+), 4 deletions(-) Index: llvm/lib/Target/X86/X86ISelLowering.cpp diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.262 llvm/lib/Target/X86/X86ISelLowering.cpp:1.263 --- llvm/lib/Target/X86/X86ISelLowering.cpp:1.262 Wed Sep 20 17:03:51 2006 +++ llvm/lib/Target/X86/X86ISelLowering.cpp Wed Sep 20 21:08:31 2006 @@ -1564,13 +1564,13 @@ default: assert(0 && "Unknown value type!"); case MVT::i8: case MVT::i16: -case MVT::i32: +case MVT::i32: { unsigned MaxNumIntRegs = (isFastCall ? 2 : FASTCC_NUM_INT_ARGS_INREGS); if (NumIntRegs < MaxNumIntRegs) { ++NumIntRegs; break; } - // Fall through + } // Fall through case MVT::f32: NumBytes += 4; break; @@ -1618,7 +1618,7 @@ default: assert(0 && "Unexpected ValueType for argument!"); case MVT::i8: case MVT::i16: -case MVT::i32: +case MVT::i32: { unsigned MaxNumIntRegs = (isFastCall ? 2 : FASTCC_NUM_INT_ARGS_INREGS); if (NumIntRegs < MaxNumIntRegs) { RegsToPass.push_back( @@ -1627,7 +1627,7 @@ ++NumIntRegs; break; } - // Fall through + } // Fall through case MVT::f32: { SDOperand PtrOff = DAG.getConstant(ArgOffset, getPointerTy()); PtrOff = DAG.getNode(ISD::ADD, getPointerTy(), StackPtr, PtrOff); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Regression/Transforms/IndVarsSimplify/2006-09-20-LFTR-Crash.ll
Changes in directory llvm/test/Regression/Transforms/IndVarsSimplify: 2006-09-20-LFTR-Crash.ll added (r1.1) --- Log message: new testcase --- Diffs of the changes: (+46 -0) 2006-09-20-LFTR-Crash.ll | 46 ++ 1 files changed, 46 insertions(+) Index: llvm/test/Regression/Transforms/IndVarsSimplify/2006-09-20-LFTR-Crash.ll diff -c /dev/null llvm/test/Regression/Transforms/IndVarsSimplify/2006-09-20-LFTR-Crash.ll:1.1 *** /dev/null Thu Sep 21 00:11:11 2006 --- llvm/test/Regression/Transforms/IndVarsSimplify/2006-09-20-LFTR-Crash.ll Thu Sep 21 00:11:01 2006 *** *** 0 --- 1,46 + ; RUN: llvm-as < %s | opt -indvars -disable-output + + %struct.p7prior_s = type { int, int, [200 x float], [200 x [7 x float]], int, [200 x float], [200 x [20 x float]], int, [200 x float], [200 x [20 x float]] } + + implementation ; Functions: + + void %P7DefaultPrior() { + entry: + switch int 0, label %UnifiedReturnBlock [ +int 2, label %bb160 +int 3, label %bb + ] + + bb: ; preds = %entry + br bool false, label %cond_true.i, label %sre_malloc.exit + + cond_true.i: ; preds = %bb + unreachable + + sre_malloc.exit: ; preds = %bb + br label %cond_true + + cond_true:; preds = %cond_true66, %cond_true, %sre_malloc.exit + %tmp59 = phi int [ 1, %sre_malloc.exit ], [ %phitmp, %cond_true66 ], [ %tmp59, %cond_true ] ; [#uses=2] + %indvar245.0.ph = phi uint [ 0, %sre_malloc.exit ], [ %indvar.next246, %cond_true66 ], [ %indvar245.0.ph, %cond_true ] ; [#uses=2] + br bool false, label %bb57, label %cond_true + + bb57: ; preds = %cond_true + %tmp65 = setgt int 0, %tmp59; [#uses=1] + %indvar.next246 = add uint %indvar245.0.ph, 1 ; [#uses=2] + br bool %tmp65, label %cond_true66, label %bb69 + + cond_true66: ; preds = %bb57 + %q.1.0 = cast uint %indvar.next246 to int ; [#uses=1] + %phitmp = add int %q.1.0, 1 ; [#uses=1] + br label %cond_true + + bb69: ; preds = %bb57 + ret void + + bb160:; preds = %entry + ret void + + UnifiedReturnBlock: ; preds = %entry + ret void + } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
Changes in directory llvm/lib/Transforms/Scalar: IndVarSimplify.cpp updated: 1.94 -> 1.95 --- Log message: Fix Transforms/IndVarsSimplify/2006-09-20-LFTR-Crash.ll --- Diffs of the changes: (+22 -15) IndVarSimplify.cpp | 37 ++--- 1 files changed, 22 insertions(+), 15 deletions(-) Index: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp diff -u llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.94 llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.95 --- llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.94 Sun Aug 27 17:42:52 2006 +++ llvm/lib/Transforms/Scalar/IndVarSimplify.cpp Thu Sep 21 00:12:20 2006 @@ -86,8 +86,8 @@ void runOnLoop(Loop *L); void EliminatePointerRecurrence(PHINode *PN, BasicBlock *Preheader, std::set &DeadInsts); -void LinearFunctionTestReplace(Loop *L, SCEV *IterationCount, - SCEVExpander &RW); +Instruction *LinearFunctionTestReplace(Loop *L, SCEV *IterationCount, + SCEVExpander &RW); void RewriteLoopExitValues(Loop *L); void DeleteTriviallyDeadInstructions(std::set &Insts); @@ -209,13 +209,17 @@ /// variable. This pass is able to rewrite the exit tests of any loop where the /// SCEV analysis can determine a loop-invariant trip count of the loop, which /// is actually a much broader range than just linear tests. -void IndVarSimplify::LinearFunctionTestReplace(Loop *L, SCEV *IterationCount, - SCEVExpander &RW) { +/// +/// This method returns a "potentially dead" instruction whose computation chain +/// should be deleted when convenient. +Instruction *IndVarSimplify::LinearFunctionTestReplace(Loop *L, + SCEV *IterationCount, + SCEVExpander &RW) { // Find the exit block for the loop. We can currently only handle loops with // a single exit. std::vector ExitBlocks; L->getExitBlocks(ExitBlocks); - if (ExitBlocks.size() != 1) return; + if (ExitBlocks.size() != 1) return 0; BasicBlock *ExitBlock = ExitBlocks[0]; // Make sure there is only one predecessor block in the loop. @@ -226,19 +230,17 @@ if (ExitingBlock == 0) ExitingBlock = *PI; else -return; // Multiple exits from loop to this block. +return 0; // Multiple exits from loop to this block. } assert(ExitingBlock && "Loop info is broken"); if (!isa(ExitingBlock->getTerminator())) -return; // Can't rewrite non-branch yet +return 0; // Can't rewrite non-branch yet BranchInst *BI = cast(ExitingBlock->getTerminator()); assert(BI->isConditional() && "Must be conditional to be part of loop!"); - std::set InstructionsToDelete; - if (Instruction *Cond = dyn_cast(BI->getCondition())) -InstructionsToDelete.insert(Cond); - + Instruction *PotentiallyDeadInst = dyn_cast(BI->getCondition()); + // If the exiting block is not the same as the backedge block, we must compare // against the preincremented value, otherwise we prefer to compare against // the post-incremented value. @@ -279,8 +281,7 @@ BI->setCondition(Cond); ++NumLFTR; Changed = true; - - DeleteTriviallyDeadInstructions(InstructionsToDelete); + return PotentiallyDeadInst; } @@ -471,7 +472,12 @@ SCEVExpander Rewriter(*SE, *LI); Rewriter.getOrInsertCanonicalInductionVariable(L, IterationCount->getType()); - LinearFunctionTestReplace(L, IterationCount, Rewriter); + if (Instruction *I = LinearFunctionTestReplace(L, IterationCount, + Rewriter)) { +std::set InstructionsToDelete; +InstructionsToDelete.insert(I); +DeleteTriviallyDeadInstructions(InstructionsToDelete); + } } return; } @@ -498,7 +504,8 @@ Changed = true; if (!isa(IterationCount)) -LinearFunctionTestReplace(L, IterationCount, Rewriter); +if (Instruction *DI = LinearFunctionTestReplace(L, IterationCount,Rewriter)) + DeadInsts.insert(DI); // Now that we have a canonical induction variable, we can rewrite any // recurrences in terms of the induction variable. Start with the auxillary ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/X86/README.txt
Changes in directory llvm/lib/Target/X86: README.txt updated: 1.137 -> 1.138 --- Log message: Fit in 80-cols --- Diffs of the changes: (+10 -9) README.txt | 19 ++- 1 files changed, 10 insertions(+), 9 deletions(-) Index: llvm/lib/Target/X86/README.txt diff -u llvm/lib/Target/X86/README.txt:1.137 llvm/lib/Target/X86/README.txt:1.138 --- llvm/lib/Target/X86/README.txt:1.137Wed Sep 20 01:32:10 2006 +++ llvm/lib/Target/X86/README.txt Thu Sep 21 00:46:00 2006 @@ -544,9 +544,9 @@ br label %cond_true cond_true: ; preds = %cond_true, %entry -%x.0.0 = phi int [ 0, %entry ], [ %tmp9, %cond_true ] ; [#uses=3] -%t_addr.0.0 = phi int [ %t, %entry ], [ %tmp7, %cond_true ] ; [#uses=1] -%tmp2 = getelementptr int* %a, int %x.0.0 ; [#uses=1] +%x.0.0 = phi int [ 0, %entry ], [ %tmp9, %cond_true ] +%t_addr.0.0 = phi int [ %t, %entry ], [ %tmp7, %cond_true ] +%tmp2 = getelementptr int* %a, int %x.0.0 %tmp3 = load int* %tmp2 ; [#uses=1] %tmp5 = add int %t_addr.0.0, %x.0.0 ; [#uses=1] %tmp7 = add int %tmp5, %tmp3; [#uses=2] @@ -633,11 +633,12 @@ LBB1_2: #UnifiedReturnBlock ret -In the code above, the 'if' is turned into a 'switch' at the mid-level. It looks -like the 'lower to branches' mode could be improved a little here. In particular, -the fall-through to LBB1_3 doesn't need a branch. It would also be nice to -eliminate the redundant "cmp 6", maybe by lowering to a linear sequence of -compares if there are below a certain number of cases (instead of a binary sequence)? +In the code above, the 'if' is turned into a 'switch' at the mid-level. It +looks like the 'lower to branches' mode could be improved a little here. In +particular, the fall-through to LBB1_3 doesn't need a branch. It would also be +nice to eliminate the redundant "cmp 6", maybe by lowering to a linear sequence +of compares if there are below a certain number of cases (instead of a binary +sequence)? //===-===// @@ -645,7 +646,7 @@ int %test(ulong *%tmp) { %tmp = load ulong* %tmp ; [#uses=1] %tmp.mask = shr ulong %tmp, ubyte 50; [#uses=1] -%tmp.mask = cast ulong %tmp.mask to ubyte ; [#uses=1] +%tmp.mask = cast ulong %tmp.mask to ubyte %tmp2 = and ubyte %tmp.mask, 3 ; [#uses=1] %tmp2 = cast ubyte %tmp2 to int ; [#uses=1] ret int %tmp2 ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Changes in directory llvm/lib/CodeGen/SelectionDAG: DAGCombiner.cpp updated: 1.190 -> 1.191 --- Log message: Generalize (zext (truncate x)) and (sext (truncate x)) folding to work when the src/dst are not the same size. This catches things like "truncate 32-bit X to 8 bits, then zext to 16", which happens a bit on X86. --- Diffs of the changes: (+24 -9) DAGCombiner.cpp | 33 - 1 files changed, 24 insertions(+), 9 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.190 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.191 --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.190 Wed Sep 20 01:41:35 2006 +++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Thu Sep 21 01:00:20 2006 @@ -1766,12 +1766,18 @@ if (N0.getOpcode() == ISD::SIGN_EXTEND || N0.getOpcode() == ISD::ANY_EXTEND) return DAG.getNode(ISD::SIGN_EXTEND, VT, N0.getOperand(0)); - // fold (sext (truncate x)) -> (sextinreg x) iff x size == sext size. - if (N0.getOpcode() == ISD::TRUNCATE && N0.getOperand(0).getValueType() == VT&& - (!AfterLegalize || - TLI.isOperationLegal(ISD::SIGN_EXTEND_INREG, N0.getValueType( -return DAG.getNode(ISD::SIGN_EXTEND_INREG, VT, N0.getOperand(0), + // fold (sext (truncate x)) -> (sextinreg x). + if (N0.getOpcode() == ISD::TRUNCATE && + (!AfterLegalize || TLI.isOperationLegal(ISD::SIGN_EXTEND_INREG, VT))) { +SDOperand Op = N0.getOperand(0); +if (Op.getValueType() < VT) { + Op = DAG.getNode(ISD::ANY_EXTEND, VT, Op); +} else if (Op.getValueType() > VT) { + Op = DAG.getNode(ISD::TRUNCATE, VT, Op); +} +return DAG.getNode(ISD::SIGN_EXTEND_INREG, VT, Op, DAG.getValueType(N0.getValueType())); + } // fold (sext (load x)) -> (sext (truncate (sextload x))) if (N0.getOpcode() == ISD::LOAD && N0.hasOneUse() && @@ -1812,10 +1818,19 @@ // fold (zext (aext x)) -> (zext x) if (N0.getOpcode() == ISD::ZERO_EXTEND || N0.getOpcode() == ISD::ANY_EXTEND) return DAG.getNode(ISD::ZERO_EXTEND, VT, N0.getOperand(0)); - // fold (zext (truncate x)) -> (zextinreg x) iff x size == zext size. - if (N0.getOpcode() == ISD::TRUNCATE && N0.getOperand(0).getValueType() == VT&& - (!AfterLegalize || TLI.isOperationLegal(ISD::AND, N0.getValueType( -return DAG.getZeroExtendInReg(N0.getOperand(0), N0.getValueType()); + + // fold (zext (truncate x)) -> (and x, mask) + if (N0.getOpcode() == ISD::TRUNCATE && + (!AfterLegalize || TLI.isOperationLegal(ISD::AND, VT))) { +SDOperand Op = N0.getOperand(0); +if (Op.getValueType() < VT) { + Op = DAG.getNode(ISD::ANY_EXTEND, VT, Op); +} else if (Op.getValueType() > VT) { + Op = DAG.getNode(ISD::TRUNCATE, VT, Op); +} +return DAG.getZeroExtendInReg(Op, N0.getValueType()); + } + // fold (zext (load x)) -> (zext (truncate (zextload x))) if (N0.getOpcode() == ISD::LOAD && N0.hasOneUse() && (!AfterLegalize||TLI.isOperationLegal(ISD::ZEXTLOAD, N0.getValueType({ ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Changes in directory llvm/lib/CodeGen/SelectionDAG: DAGCombiner.cpp updated: 1.191 -> 1.192 --- Log message: Compile: int %test(ulong *%tmp) { %tmp = load ulong* %tmp ; [#uses=1] %tmp.mask = shr ulong %tmp, ubyte 50; [#uses=1] %tmp.mask = cast ulong %tmp.mask to ubyte %tmp2 = and ubyte %tmp.mask, 3 ; [#uses=1] %tmp2 = cast ubyte %tmp2 to int ; [#uses=1] ret int %tmp2 } to: _test: movl 4(%esp), %eax movl 4(%eax), %eax shrl $18, %eax andl $3, %eax ret instead of: _test: movl 4(%esp), %eax movl 4(%eax), %eax shrl $18, %eax # TRUNCATE movb %al, %al andb $3, %al movzbl %al, %eax ret --- Diffs of the changes: (+14 -0) DAGCombiner.cpp | 14 ++ 1 files changed, 14 insertions(+) Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.191 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.192 --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.191 Thu Sep 21 01:00:20 2006 +++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Thu Sep 21 01:14:31 2006 @@ -1831,6 +1831,20 @@ return DAG.getZeroExtendInReg(Op, N0.getValueType()); } + // fold (zext (and (trunc x), cst)) -> (and x, cst). + if (N0.getOpcode() == ISD::AND && + N0.getOperand(0).getOpcode() == ISD::TRUNCATE && + N0.getOperand(1).getOpcode() == ISD::Constant) { +SDOperand X = N0.getOperand(0).getOperand(0); +if (X.getValueType() < VT) { + X = DAG.getNode(ISD::ANY_EXTEND, VT, X); +} else if (X.getValueType() > VT) { + X = DAG.getNode(ISD::TRUNCATE, VT, X); +} +uint64_t Mask = cast(N0.getOperand(1))->getValue(); +return DAG.getNode(ISD::AND, VT, X, DAG.getConstant(Mask, VT)); + } + // fold (zext (load x)) -> (zext (truncate (zextload x))) if (N0.getOpcode() == ISD::LOAD && N0.hasOneUse() && (!AfterLegalize||TLI.isOperationLegal(ISD::ZEXTLOAD, N0.getValueType({ ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/X86/README.txt
Changes in directory llvm/lib/Target/X86: README.txt updated: 1.138 -> 1.139 --- Log message: implemented --- Diffs of the changes: (+0 -35) README.txt | 35 --- 1 files changed, 35 deletions(-) Index: llvm/lib/Target/X86/README.txt diff -u llvm/lib/Target/X86/README.txt:1.138 llvm/lib/Target/X86/README.txt:1.139 --- llvm/lib/Target/X86/README.txt:1.138Thu Sep 21 00:46:00 2006 +++ llvm/lib/Target/X86/README.txt Thu Sep 21 01:14:54 2006 @@ -642,41 +642,6 @@ //===-===// -Compile: -int %test(ulong *%tmp) { -%tmp = load ulong* %tmp ; [#uses=1] -%tmp.mask = shr ulong %tmp, ubyte 50; [#uses=1] -%tmp.mask = cast ulong %tmp.mask to ubyte -%tmp2 = and ubyte %tmp.mask, 3 ; [#uses=1] -%tmp2 = cast ubyte %tmp2 to int ; [#uses=1] -ret int %tmp2 -} - -to: - -_test: -movl 4(%esp), %eax -movl 4(%eax), %eax -shrl $18, %eax -andl $3, %eax -ret - -instead of: - -_test: -movl 4(%esp), %eax -movl 4(%eax), %eax -shrl $18, %eax -# TRUNCATE movb %al, %al -andb $3, %al -movzbl %al, %eax -ret - -This saves a movzbl, and saves a truncate if it doesn't get coallesced right. -This is a simple DAGCombine to propagate the zext through the and. - -//===-===// - GCC's ix86_expand_int_movcc function (in i386.c) has a ton of interesting simplifications for integer "x cmp y ? a : b". For example, instead of: ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Changes in directory llvm/lib/CodeGen/SelectionDAG: DAGCombiner.cpp updated: 1.192 -> 1.193 --- Log message: Check the right value type. This fixes 186.crafty on x86 --- Diffs of the changes: (+2 -1) DAGCombiner.cpp |3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.192 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.193 --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.192 Thu Sep 21 01:14:31 2006 +++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Thu Sep 21 01:17:39 2006 @@ -1768,7 +1768,8 @@ // fold (sext (truncate x)) -> (sextinreg x). if (N0.getOpcode() == ISD::TRUNCATE && - (!AfterLegalize || TLI.isOperationLegal(ISD::SIGN_EXTEND_INREG, VT))) { + (!AfterLegalize || TLI.isOperationLegal(ISD::SIGN_EXTEND_INREG, + N0.getValueType( { SDOperand Op = N0.getOperand(0); if (Op.getValueType() < VT) { Op = DAG.getNode(ISD::ANY_EXTEND, VT, Op); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Changes in directory llvm/lib/CodeGen/SelectionDAG: DAGCombiner.cpp updated: 1.193 -> 1.194 --- Log message: fold (aext (and (trunc x), cst)) -> (and x, cst). --- Diffs of the changes: (+15 -0) DAGCombiner.cpp | 15 +++ 1 files changed, 15 insertions(+) Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.193 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.194 --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.193 Thu Sep 21 01:17:39 2006 +++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Thu Sep 21 01:40:43 2006 @@ -1897,6 +1897,21 @@ return DAG.getNode(ISD::TRUNCATE, VT, TruncOp); return DAG.getNode(ISD::ANY_EXTEND, VT, TruncOp); } + + // fold (aext (and (trunc x), cst)) -> (and x, cst). + if (N0.getOpcode() == ISD::AND && + N0.getOperand(0).getOpcode() == ISD::TRUNCATE && + N0.getOperand(1).getOpcode() == ISD::Constant) { +SDOperand X = N0.getOperand(0).getOperand(0); +if (X.getValueType() < VT) { + X = DAG.getNode(ISD::ANY_EXTEND, VT, X); +} else if (X.getValueType() > VT) { + X = DAG.getNode(ISD::TRUNCATE, VT, X); +} +uint64_t Mask = cast(N0.getOperand(1))->getValue(); +return DAG.getNode(ISD::AND, VT, X, DAG.getConstant(Mask, VT)); + } + // fold (aext (load x)) -> (aext (truncate (extload x))) if (N0.getOpcode() == ISD::LOAD && N0.hasOneUse() && (!AfterLegalize||TLI.isOperationLegal(ISD::EXTLOAD, N0.getValueType( { ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/HMMER/Makefile
Changes in directory llvm-test/External/HMMER: Makefile updated: 1.1 -> 1.2 --- Log message: Set its random seed to a fixed number. --- Diffs of the changes: (+2 -2) Makefile |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm-test/External/HMMER/Makefile diff -u llvm-test/External/HMMER/Makefile:1.1 llvm-test/External/HMMER/Makefile:1.2 --- llvm-test/External/HMMER/Makefile:1.1 Wed Sep 20 18:43:34 2006 +++ llvm-test/External/HMMER/Makefile Thu Sep 21 01:58:22 2006 @@ -8,9 +8,9 @@ CPPFLAGS = -DSSE2 ifdef LARGE_PROBLEM_SIZE -RUN_OPTIONS = --fixed 400 --cpu 1 --num 20 $(HMMER_ROOT)/globin.hmm +RUN_OPTIONS = --fixed 400 --cpu 1 --num 20 --seed 1158818515 $(HMMER_ROOT)/globin.hmm else -RUN_OPTIONS = --fixed 400 --cpu 1 --num 8 $(HMMER_ROOT)/globin.hmm +RUN_OPTIONS = --fixed 400 --cpu 1 --num 8 --seed 1158818515 $(HMMER_ROOT)/globin.hmm endif include $(LEVEL)/MultiSource/Makefile.multisrc ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits