From lattner at cs.uiuc.edu Mon Jan 20 00:12:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jan 20 00:12:01 2003 Subject: [llvm-commits] CVS: llvm/utils/NightlyTest.pl NightlyTestTemplate.html Message-ID: <200301200611.AAA20586@apoc.cs.uiuc.edu> Changes in directory llvm/utils: NightlyTest.pl added (r1.1) NightlyTestTemplate.html added (r1.1) --- Log message: Initial checkin of the nightly build scripts --- Diffs of the changes: From lattner at cs.uiuc.edu Mon Jan 20 00:20:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jan 20 00:20:01 2003 Subject: [llvm-commits] CVS: llvm/utils/Burg/be.c fe.h main.c plank.c Message-ID: <200301200619.AAA21686@apoc.cs.uiuc.edu> Changes in directory llvm/utils/Burg: be.c updated: 1.2 -> 1.3 fe.h updated: 1.2 -> 1.3 main.c updated: 1.1 -> 1.2 plank.c updated: 1.2 -> 1.3 --- Log message: Fix warnings --- Diffs of the changes: Index: llvm/utils/Burg/be.c diff -u llvm/utils/Burg/be.c:1.2 llvm/utils/Burg/be.c:1.3 --- llvm/utils/Burg/be.c:1.2 Sat Sep 21 21:40:40 2002 +++ llvm/utils/Burg/be.c Mon Jan 20 00:19:18 2003 @@ -1,4 +1,4 @@ -char rcsid_be[] = "$Id: be.c,v 1.2 2002/09/22 02:40:40 lattner Exp $"; +char rcsid_be[] = "$Id: be.c,v 1.3 2003/01/20 06:19:18 lattner Exp $"; #include #include @@ -688,14 +688,14 @@ fprintf(outfile, "\t"); if (pVector[i]) { Operator o; - NonTerminal t; + NonTerminal t1, t2; fprintf(outfile, "{"); fprintf(outfile, "%5d, %5d, %5d, %5d", pVector[i]->rule->lhs->num, (o = pVector[i]->rule->pat->op) ? o->num : 0, - (t = pVector[i]->rule->pat->children[0]) ? t->num : 0, - (t = pVector[i]->rule->pat->children[1]) ? t->num : 0 + (t1 = pVector[i]->rule->pat->children[0]) ? t1->num : 0, + (t2 = pVector[i]->rule->pat->children[1]) ? t2->num : 0 ); fprintf(outfile, "} /* "); printRule(pVector[i], "0"); Index: llvm/utils/Burg/fe.h diff -u llvm/utils/Burg/fe.h:1.2 llvm/utils/Burg/fe.h:1.3 --- llvm/utils/Burg/fe.h:1.2 Sat Sep 21 21:40:40 2002 +++ llvm/utils/Burg/fe.h Mon Jan 20 00:19:18 2003 @@ -1,4 +1,4 @@ -/* $Id: fe.h,v 1.2 2002/09/22 02:40:40 lattner Exp $ */ +/* $Id: fe.h,v 1.3 2003/01/20 06:19:18 lattner Exp $ */ struct binding { char *name; @@ -57,6 +57,11 @@ List elems; }; typedef struct strTable *StrTable; + +extern void doGrammarNts ARGS((void)); +void makeRuleDescArray ARGS((void)); +void makeDeltaCostArray ARGS((void)); +void makeStateStringArray ARGS((void)); extern StrTable newStrTable ARGS((void)); extern StrTableElement addString ARGS((StrTable, char *, int, int *)); Index: llvm/utils/Burg/main.c diff -u llvm/utils/Burg/main.c:1.1 llvm/utils/Burg/main.c:1.2 --- llvm/utils/Burg/main.c:1.1 Tue Sep 17 18:03:29 2002 +++ llvm/utils/Burg/main.c Mon Jan 20 00:19:18 2003 @@ -1,4 +1,4 @@ -char rcsid_main[] = "$Id: main.c,v 1.1 2002/09/17 23:03:29 lattner Exp $"; +char rcsid_main[] = "$Id: main.c,v 1.2 2003/01/20 06:19:18 lattner Exp $"; #include #include @@ -15,9 +15,9 @@ static char version[] = "BURG, Version 1.0"; -extern void main ARGS((int argc, char **argv)); +extern int main ARGS((int argc, char **argv)); -void +int main(argc, argv) int argc; char **argv; { int i; @@ -33,7 +33,7 @@ fprintf(stderr, "%s\n", version); break; case 'p': - needStr = &prefix; + needStr = (char**)&prefix; break; case 'o': needStr = &outFileName; Index: llvm/utils/Burg/plank.c diff -u llvm/utils/Burg/plank.c:1.2 llvm/utils/Burg/plank.c:1.3 --- llvm/utils/Burg/plank.c:1.2 Sat Sep 21 21:40:40 2002 +++ llvm/utils/Burg/plank.c Mon Jan 20 00:19:18 2003 @@ -1,4 +1,4 @@ -char rcsid_plank[] = "$Id: plank.c,v 1.2 2002/09/22 02:40:40 lattner Exp $"; +char rcsid_plank[] = "$Id: plank.c,v 1.3 2003/01/20 06:19:18 lattner Exp $"; #include #include @@ -232,7 +232,7 @@ for (i = 1; i < globalMap->count; i++) { sortedStates[i-1] = globalMap->set[i]; } - qsort(sortedStates, globalMap->count-1, sizeof(Item_Set), stateCompare); + qsort(sortedStates, globalMap->count-1, sizeof(Item_Set), (int(*)(const void *, const void *))stateCompare); previousOp = 0; for (i = 0; i < globalMap->count-1; i++) { sortedStates[i]->newNum = i; @@ -246,7 +246,7 @@ sortedRules = (RuleAST*) zalloc(max_ruleAST * sizeof(RuleAST)); count = 0; foreachList((ListFn) assignRules, ruleASTs); - qsort(sortedRules, max_ruleAST, sizeof(RuleAST), ruleCompare); + qsort(sortedRules, max_ruleAST, sizeof(RuleAST), (int(*)(const void *, const void *))ruleCompare); previousLHS = 0; base_counter = 0; for (i = 0; i < max_ruleAST; i++) { From lattner at cs.uiuc.edu Mon Jan 20 12:06:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jan 20 12:06:01 2003 Subject: [llvm-commits] CVS: llvm/utils/NightlyTest.pl NightlyTestTemplate.html Message-ID: <200301201805.MAA23856@apoc.cs.uiuc.edu> Changes in directory llvm/utils: NightlyTest.pl updated: 1.1 -> 1.2 NightlyTestTemplate.html updated: 1.1 -> 1.2 --- Log message: Add information about new warnings and warning changes --- Diffs of the changes: Index: llvm/utils/NightlyTest.pl diff -u llvm/utils/NightlyTest.pl:1.1 llvm/utils/NightlyTest.pl:1.2 --- llvm/utils/NightlyTest.pl:1.1 Mon Jan 20 00:11:03 2003 +++ llvm/utils/NightlyTest.pl Mon Jan 20 12:05:27 2003 @@ -11,6 +11,60 @@ # use POSIX qw(strftime); +my $HOME = $ENV{HOME}; +my $CVSRootDir = "/home/vadve/vadve/Research/DynOpt/CVSRepository"; +my $BuildDir = "$HOME/buildtest"; +my $WebDir = "$HOME/cvs/testresults-X86"; + +# Calculate the date prefix... + at TIME = localtime; +my $DATE = sprintf "%4d-%02d-%02d", $TIME[5]+1900, $TIME[4]+1, $TIME[3]; +my $DateString = strftime "%B %d, %Y", localtime; + +sub WriteFile { # (filename, contents) + open (FILE, ">$_[0]") or die "Could not open file '$_[0]' for writing!"; + print FILE $_[1]; + close FILE; +} + +sub GetRegex { # (Regex with ()'s, value) + $_[1] =~ /$_[0]/; + return $1; +} + +sub AddPreTag { # Add pre tags around nonempty list, or convert to "none" + $_ = shift; + if (length) { return "
  $_
"; } else { "none
"; } +} + +sub GetDir { + my $Suffix = shift; + opendir DH, $WebDir; + my @Result = reverse sort grep !/$DATE/, grep /[-0-9]+$Suffix/, readdir DH; + closedir DH; + return @Result; +} + +# DiffFiles - Diff the current version of the file against the last version of +# the file, reporting things added and removed. This is used to report, for +# example, added and removed warnings. This returns a pair (added, removed) +# +sub DiffFiles { + my $Suffix = shift; + my @Others = GetDir $Suffix; + if (@Others == 0) { # No other files? We added all entries... + return (`cat $WebDir/$DATE$Suffix`, ""); + } + # Diff the files now... + my @Diffs = split "\n", `diff $WebDir/$DATE$Suffix $WebDir/$Others[0]`; + my $Added = join "\n", grep /^/, @Diffs; + $Added =~ s/^< / /gm; + $Removed =~ s/^> / /gm; + return ($Added, $Removed); +} + + # Command line argument settings... my $NOCHECKOUT = 0; my $NOREMOVE = 0; @@ -29,12 +83,7 @@ print "Unknown option: $_ : ignoring!\n"; } -die "Must specify 0 or 4 options!" if (@ARGV != 0 and @ARGV != 4); - -my $HOME = $ENV{HOME}; -my $CVSRootDir = "/home/vadve/vadve/Research/DynOpt/CVSRepository"; -my $BuildDir = "$HOME/buildtest"; -my $WebDir = "$HOME/cvs/testresults-X86"; +die "Must specify 0 or 3 options!" if (@ARGV != 0 and @ARGV != 3); # FIXME: This should just be utils/... my $Template = "$HOME/llvm/utils/NightlyTestTemplate.html"; @@ -45,11 +94,6 @@ $WebDir = $ARGV[2]; } -# Calculate the date prefix... - at TIME = localtime; -my $DATE = sprintf "%4d-%02d-%02d", $TIME[5]+1900, $TIME[4]+1, $TIME[3]; -my $DateString = strftime "%B %d, %Y", localtime; - my $Prefix = "$WebDir/$DATE"; if (0) { @@ -77,11 +121,6 @@ my $TemplateContents = ; close(TEMPLATEFILE); -sub GetRegex { - $_[1] =~ /$_[0]/; - return $1; -} - # Get some static statistics about the current state of CVS my $CVSCheckoutTime = GetRegex "([0-9.]+)", `grep '^real' $Prefix-CVS-Log.txt`; my $NumFilesInCVS = `grep ^U $Prefix-CVS-Log.txt | wc -l` + 0; @@ -111,11 +150,6 @@ my $BuildTime = GetRegex "([0-9.]+)", `grep '^real' $Prefix-Build-Log.txt`; -sub AddPreTag { # Add pre tags around nonempty list, or convert to "none" - $_ = shift; - if (length) { return "
  $_
"; } else { "none
"; } -} - # Get warnings from the build my @Warn = split "\n", `grep -E 'warning:|Entering dir' $Prefix-Build-Log.txt`; my @Warnings; @@ -132,7 +166,13 @@ } } my $WarningsList = AddPreTag join "\n ", @Warnings; +my $WarningsFile = join "\n", @Warnings; $WarningsFile =~ s/:[0-9]+:/::/g; +# Emit the warnings file, so we can diff... +WriteFile "$WebDir/$DATE-Warnings.txt", $WarningsFile . "\n"; +my ($WarningsAdded, $WarningsRemoved) = DiffFiles "-Warnings.txt"; +$WarningsAdded = AddPreTag $WarningsAdded; +$WarningsRemoved = AddPreTag $WarningsRemoved; # Get some statistics about CVS commits over the current day... @CVSHistory = split "\n", `cvs history -D '1 day ago' -a -xAMROCGUW`; @@ -174,11 +214,7 @@ my $RemovedFilesList = AddPreTag join "\n ", keys %RemovedFiles; # Get a list of the previous days that we can link to... -system "rm -f $WebDir/$DATE.html"; # Don't relist self if regenerating... -opendir DH, $WebDir; -my @PrevDays = - map {s/.html//; $_} reverse sort grep /[-0-9]+.html/, readdir DH; -closedir DH; +my @PrevDays = map {s/.html//; $_} GetDir ".html"; splice @PrevDays, 20; # Trim down list to something reasonable... @@ -210,13 +246,15 @@ print "Previous Days =\n $PrevDaysList\n"; } -# Output the file... +# +# Output the files... +# + +# Main HTML file... chdir $WebDir or die "Could not change into web directory!"; my $Output; eval "\$Output = <$DATE.html") or die "Cannot open output file!"; -print OUTFILE $Output; -close(OUTFILE); +WriteFile "$DATE.html", $Output; # Change the index.html symlink... system "ln -sf $DATE.html index.html"; @@ -229,9 +267,7 @@ close FILE; } push @Records, "$DATE: $Val"; - open FILE, ">$Filename" or die "Couldn't open data file $Filename"; - print FILE (join "\n", @Records), "\n"; - close FILE; + WriteFile $Filename, (join "\n", @Records) . "\n"; return @Records; } Index: llvm/utils/NightlyTestTemplate.html diff -u llvm/utils/NightlyTestTemplate.html:1.1 llvm/utils/NightlyTestTemplate.html:1.2 --- llvm/utils/NightlyTestTemplate.html:1.1 Mon Jan 20 00:11:03 2003 +++ llvm/utils/NightlyTestTemplate.html Mon Jan 20 12:05:27 2003 @@ -1,3 +1,4 @@ + LLVM Test Results for $DateString @@ -73,6 +74,12 @@
  • Added Files: $AddedFilesList
  • Modified Files: $ModifiedFilesList
  • Removed Files: $RemovedFilesList +

    + +

    Changes to Warnings:

    +
      +
    • Warnings Added: $WarningsAdded +
    • Warnings Removed: $WarningsRemoved

    Changes in the test suite:

    From lattner at cs.uiuc.edu Mon Jan 20 13:19:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jan 20 13:19:01 2003 Subject: [llvm-commits] CVS: llvm/utils/NightlyTest.pl Message-ID: <200301201918.NAA24253@apoc.cs.uiuc.edu> Changes in directory llvm/utils: NightlyTest.pl updated: 1.2 -> 1.3 --- Log message: Fix indentation code, simplify a bit --- Diffs of the changes: Index: llvm/utils/NightlyTest.pl diff -u llvm/utils/NightlyTest.pl:1.2 llvm/utils/NightlyTest.pl:1.3 --- llvm/utils/NightlyTest.pl:1.2 Mon Jan 20 12:05:27 2003 +++ llvm/utils/NightlyTest.pl Mon Jan 20 13:18:44 2003 @@ -34,7 +34,7 @@ sub AddPreTag { # Add pre tags around nonempty list, or convert to "none" $_ = shift; - if (length) { return "
      $_
    "; } else { "none
    "; } + if (length) { return "
      $_
    "; } else { "none
    "; } } sub GetDir { @@ -59,8 +59,8 @@ my @Diffs = split "\n", `diff $WebDir/$DATE$Suffix $WebDir/$Others[0]`; my $Added = join "\n", grep /^/, @Diffs; - $Added =~ s/^< / /gm; - $Removed =~ s/^> / /gm; + $Added =~ s/^< //gm; + $Removed =~ s/^> //gm; return ($Added, $Removed); } @@ -165,8 +165,9 @@ push @Warnings, "$CurDir/$Warning"; # Add directory to warning... } } -my $WarningsList = AddPreTag join "\n ", @Warnings; -my $WarningsFile = join "\n", @Warnings; $WarningsFile =~ s/:[0-9]+:/::/g; +my $WarningsFile = join "\n", @Warnings; +my $WarningsList = AddPreTag $WarningsFile; +$WarningsFile =~ s/:[0-9]+:/::/g; # Emit the warnings file, so we can diff... WriteFile "$WebDir/$DATE-Warnings.txt", $WarningsFile . "\n"; @@ -207,11 +208,11 @@ } } -my $UserCommitList = join "\n ", keys %UsersCommitted; -my $UserUpdateList = join "\n ", keys %UsersUpdated; -my $AddedFilesList = AddPreTag join "\n ", keys %AddedFiles; -my $ModifiedFilesList = AddPreTag join "\n ", keys %ModifiedFiles; -my $RemovedFilesList = AddPreTag join "\n ", keys %RemovedFiles; +my $UserCommitList = join "\n", keys %UsersCommitted; +my $UserUpdateList = join "\n", keys %UsersUpdated; +my $AddedFilesList = AddPreTag join "\n", keys %AddedFiles; +my $ModifiedFilesList = AddPreTag join "\n", keys %ModifiedFiles; +my $RemovedFilesList = AddPreTag join "\n", keys %RemovedFiles; # Get a list of the previous days that we can link to... my @PrevDays = map {s/.html//; $_} GetDir ".html"; From lattner at cs.uiuc.edu Tue Jan 21 09:22:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jan 21 09:22:01 2003 Subject: [llvm-commits] CVS: llvm/tools/lli/Makefile Message-ID: <200301211521.JAA32681@apoc.cs.uiuc.edu> Changes in directory llvm/tools/lli: Makefile updated: 1.20 -> 1.21 --- Log message: Fix race condition in Makefile --- Diffs of the changes: Index: llvm/tools/lli/Makefile diff -u llvm/tools/lli/Makefile:1.20 llvm/tools/lli/Makefile:1.21 --- llvm/tools/lli/Makefile:1.20 Sun Jan 12 18:58:18 2003 +++ llvm/tools/lli/Makefile Tue Jan 21 09:20:50 2003 @@ -1,6 +1,6 @@ LEVEL = ../.. TOOLNAME = lli -PARALLEL_DIRS = Interpreter JIT +DIRS = Interpreter JIT JITLIBS = lli-jit codegen x86 USEDLIBS = lli-interpreter $(JITLIBS) bcreader vmcore analysis.a support.a target.a From lattner at cs.uiuc.edu Tue Jan 21 09:40:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jan 21 09:40:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/TEST.jit.Makefile Message-ID: <200301211539.JAA00581@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs: TEST.jit.Makefile updated: 1.1 -> 1.2 --- Log message: Include directory in the program name --- Diffs of the changes: Index: llvm/test/Programs/TEST.jit.Makefile diff -u llvm/test/Programs/TEST.jit.Makefile:1.1 llvm/test/Programs/TEST.jit.Makefile:1.2 --- llvm/test/Programs/TEST.jit.Makefile:1.1 Fri Jan 17 17:25:24 2003 +++ llvm/test/Programs/TEST.jit.Makefile Tue Jan 21 09:39:15 2003 @@ -7,6 +7,9 @@ ##===----------------------------------------------------------------------===## JIT_OPTS = -stats -time-passes +CURDIR := $(shell cd .; pwd) +PROGDIR := $(shell cd $(LEVEL)/test/Programs; pwd)/ +RELDIR := $(subst $(PROGDIR),,$(CURDIR)) $(PROGRAMS_TO_TEST:%=Output/%.$(TEST).report.txt): \ Output/%.$(TEST).report.txt: Output/%.lib.bc $(LANALYZE) @@ -15,7 +18,7 @@ $(PROGRAMS_TO_TEST:%=test.$(TEST).%): \ test.$(TEST).%: Output/%.$(TEST).report.txt @echo "---------------------------------------------------------------" - @echo ">>> ========= '$*' Program" + @echo ">>> ========= '$(RELDIR)/$*' Program" @echo "---------------------------------------------------------------" @cat $< From lattner at cs.uiuc.edu Tue Jan 21 10:25:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jan 21 10:25:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/Makefile.programs Message-ID: <200301211624.KAA01623@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs: Makefile.programs updated: 1.31 -> 1.32 --- Log message: Change to make compatible with other changes --- Diffs of the changes: Index: llvm/test/Programs/Makefile.programs diff -u llvm/test/Programs/Makefile.programs:1.31 llvm/test/Programs/Makefile.programs:1.32 --- llvm/test/Programs/Makefile.programs:1.31 Sun Jan 19 12:15:41 2003 +++ llvm/test/Programs/Makefile.programs Tue Jan 21 10:24:11 2003 @@ -238,8 +238,8 @@ # AVAILABLE_TESTS - Compute the set of tests available for user help # -TEST_FILES = $(filter-out %~, $(wildcard $(PROGDIR)/Makefile.TEST.*)) -AVAILABLE_TESTS = $(subst $(PROGDIR)/Makefile.TEST.,,$(TEST_FILES)) +TEST_FILES = $(filter-out %~, $(wildcard $(PROGDIR)/TEST.*.Makefile)) +AVAILABLE_TESTS = $(TEST_FILES:$(PROGDIR)/TEST.%.Makefile=%) # If they just say 'make test' then we print out an error telling the user to # specify a TEST= option. From lattner at cs.uiuc.edu Tue Jan 21 10:25:03 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jan 21 10:25:03 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/GenerateReport.pl Makefile Message-ID: <200301211624.KAA01639@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs: GenerateReport.pl updated: 1.4 -> 1.5 Makefile updated: 1.8 -> 1.9 --- Log message: Implement generation of HTML reports --- Diffs of the changes: Index: llvm/test/Programs/GenerateReport.pl diff -u llvm/test/Programs/GenerateReport.pl:1.4 llvm/test/Programs/GenerateReport.pl:1.5 --- llvm/test/Programs/GenerateReport.pl:1.4 Fri Jan 17 16:52:15 2003 +++ llvm/test/Programs/GenerateReport.pl Tue Jan 21 10:24:42 2003 @@ -1,4 +1,31 @@ #!/usr/dcs/software/supported/bin/perl -w +# +# Program: GenerateReport.pl +# +# Synopsis: Summarize a big log file into a table of values, commonly used for +# testing. This can generate either a plaintext table or HTML table +# depending on whether the -html option is specified. +# +# This script reads a report description file to specify the fields +# and descriptions for the columns of interest. In reads the raw log +# input from stdin and writes the table to stdout. +# +# Syntax: GenerateReport.pl [-html] < Input > Output +# + +# Default values for arguments +$HTML = 0; + +# Parse arguments... +while ($_ = $ARGV[0], /^[-+]/) { + shift; + last if /^--$/; # Stop processing arguments on -- + + # List command line options here... + if (/^-html$/) { $HTML = 1; next; } + + print "Unknown option: $_ : ignoring!\n"; +} # # Parameters which may be overriden by the report description file. @@ -86,7 +113,7 @@ @Values = reverse @Values if ($SortReverse); # -# Add the header for the report to the table after sorting... +# Condense the header into an easier to access array... # my @Header; for $Row (@Fields) { @@ -96,29 +123,61 @@ push @Header, "|"; } } -unshift @Values, [@Header]; -# -# Figure out how wide each field should be... -# -my @FieldWidths = (0) x scalar(@Fields); -foreach $Value (@Values) { - for ($i = 0; $i < @$Value-1; $i++) { - if (length($$Value[$i]) > $FieldWidths[$i]) { - $FieldWidths[$i] = length($$Value[$i]) +if ($HTML) { + sub printCell { + my $Str = shift; + if ($Str eq '|') { + print ""; + } else { + print "
    $Str
    \n"; + }; ""; + } + + print "\n"; + print "\n"; + map { $_ = "$_" if $_ ne "|"; printCell $_ } @Header; + print "\n"; + print "" x @Header; + print "\n"; + my $RowCount = 0; + foreach $Row (@Values) { + if (++$RowCount <= 2) { + print "\n"; + } else { + print "\n"; + $RowCount = 0 if ($RowCount > 3); + } + map { printCell $_ } @$Row; + print "\n\n"; + } + print "\n
    \n"; +} else { + # Add the header for the report to the table after sorting... + unshift @Values, [@Header]; + + # + # Figure out how wide each field should be... + # + my @FieldWidths = (0) x scalar(@Fields); + foreach $Value (@Values) { + for ($i = 0; $i < @$Value-1; $i++) { + if (length($$Value[$i]) > $FieldWidths[$i]) { + $FieldWidths[$i] = length($$Value[$i]) + } } } -} -# -# Print out the table now... -# -foreach $Value (@Values) { - for ($i = 0; $i < @$Value-1; $i++) { - printf "%-$FieldWidths[$i]s ", $$Value[$i]; - } + # + # Print out the table now... + # + foreach $Value (@Values) { + for ($i = 0; $i < @$Value-1; $i++) { + printf "%-$FieldWidths[$i]s ", $$Value[$i]; + } - # Print the assertion message if existant... - print "$$Value[@$Value-1]\n"; + # Print the assertion message if existant... + print "$$Value[@$Value-1]\n"; + } } Index: llvm/test/Programs/Makefile diff -u llvm/test/Programs/Makefile:1.8 llvm/test/Programs/Makefile:1.9 --- llvm/test/Programs/Makefile:1.8 Fri Jan 17 16:58:49 2003 +++ llvm/test/Programs/Makefile Tue Jan 21 10:24:42 2003 @@ -28,6 +28,7 @@ gmake TEST=$(TEST) 2>&1 | tee $@ report: report.$(TEST).raw.out + ./GenerateReport.pl -html TEST.$(TEST).report < $< > report.$(TEST).html ./GenerateReport.pl TEST.$(TEST).report < $< | tee report.$(TEST).txt clean:: From lattner at cs.uiuc.edu Tue Jan 21 10:34:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jan 21 10:34:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/TEST.jit.Makefile Message-ID: <200301211633.KAA01727@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs: TEST.jit.Makefile updated: 1.2 -> 1.3 --- Log message: Fix some serious cut-and-pasteo's --- Diffs of the changes: Index: llvm/test/Programs/TEST.jit.Makefile diff -u llvm/test/Programs/TEST.jit.Makefile:1.2 llvm/test/Programs/TEST.jit.Makefile:1.3 --- llvm/test/Programs/TEST.jit.Makefile:1.2 Tue Jan 21 09:39:15 2003 +++ llvm/test/Programs/TEST.jit.Makefile Tue Jan 21 10:33:08 2003 @@ -12,7 +12,7 @@ RELDIR := $(subst $(PROGDIR),,$(CURDIR)) $(PROGRAMS_TO_TEST:%=Output/%.$(TEST).report.txt): \ -Output/%.$(TEST).report.txt: Output/%.lib.bc $(LANALYZE) +Output/%.$(TEST).report.txt: Output/%.llvm.bc $(LLI) -(time -p $(LLI) -force-interpreter=false $(JIT_OPTS) $< > /dev/null) > $@ 2>&1 $(PROGRAMS_TO_TEST:%=test.$(TEST).%): \ @@ -24,4 +24,4 @@ # Define REPORT_DEPENDENCIES so that the report is regenerated if lli changes # -REPORT_DEPENDENCIES := $(DUMMYLIB) $(LLI) +REPORT_DEPENDENCIES := $(LLI) From lattner at cs.uiuc.edu Tue Jan 21 14:14:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jan 21 14:14:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Writer/WriteInst.cpp Message-ID: <200301212014.OAA02832@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Writer: WriteInst.cpp updated: 1.26 -> 1.27 --- Log message: Don't keep track of # big vs #small instructions seperately --- Diffs of the changes: Index: llvm/lib/Bytecode/Writer/WriteInst.cpp diff -u llvm/lib/Bytecode/Writer/WriteInst.cpp:1.26 llvm/lib/Bytecode/Writer/WriteInst.cpp:1.27 --- llvm/lib/Bytecode/Writer/WriteInst.cpp:1.26 Tue Oct 1 17:38:32 2002 +++ llvm/lib/Bytecode/Writer/WriteInst.cpp Tue Jan 21 14:13:49 2003 @@ -18,9 +18,7 @@ #include static Statistic<> -NumOversized("bytecodewriter", "Number of oversized instructions"); -static Statistic<> -NumNormal("bytecodewriter", "Number of normal instructions"); +NumInstrs("bytecodewriter", "Number of instructions"); typedef unsigned char uchar; @@ -52,7 +50,6 @@ } align32(Out); // We must maintain correct alignment! - ++NumOversized; } @@ -102,7 +99,6 @@ output_vbr((unsigned)Slot, Out); } align32(Out); // We must maintain correct alignment! - ++NumOversized; } @@ -124,7 +120,6 @@ unsigned Bits = 1 | (Opcode << 2) | (Type << 8) | (Slots[0] << 20); // cerr << "1 " << IType << " " << Type << " " << Slots[0] << endl; output(Bits, Out); - ++NumNormal; } @@ -149,7 +144,6 @@ // cerr << "2 " << IType << " " << Type << " " << Slots[0] << " " // << Slots[1] << endl; output(Bits, Out); - ++NumNormal; } @@ -175,7 +169,6 @@ //cerr << "3 " << IType << " " << Type << " " << Slots[0] << " " // << Slots[1] << " " << Slots[2] << endl; output(Bits, Out); - ++NumNormal; } void BytecodeWriter::processInstruction(const Instruction &I) { @@ -245,6 +238,8 @@ return; } } + + ++NumInstrs; // Decide which instruction encoding to use. This is determined primarily by // the number of operands, and secondarily by whether or not the max operand From lattner at cs.uiuc.edu Tue Jan 21 15:32:00 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jan 21 15:32:00 2003 Subject: [llvm-commits] CVS: llvm/test/Makefile.tests Message-ID: <200301212131.PAA06441@apoc.cs.uiuc.edu> Changes in directory llvm/test: Makefile.tests updated: 1.52 -> 1.53 --- Log message: -ENABLE_STATS also enables timing --- Diffs of the changes: Index: llvm/test/Makefile.tests diff -u llvm/test/Makefile.tests:1.52 llvm/test/Makefile.tests:1.53 --- llvm/test/Makefile.tests:1.52 Thu Jan 16 14:26:29 2003 +++ llvm/test/Makefile.tests Tue Jan 21 15:31:29 2003 @@ -15,10 +15,10 @@ include ${LEVEL}/Makefile.common -# Specify ENABLE_STATS on the command line to enable -stats output from gccas -# and gccld. +# Specify ENABLE_STATS on the command line to enable -stats and -time-passes +# output from gccas and gccld. ifdef ENABLE_STATS -STATS = -stats +STATS = -stats -time-passes endif From lattner at cs.uiuc.edu Tue Jan 21 15:33:00 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jan 21 15:33:00 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/Makefile.programs Message-ID: <200301212132.PAA06460@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs: Makefile.programs updated: 1.32 -> 1.33 --- Log message: Unify building processes between multisrc and singlesrc makefiles --- Diffs of the changes: Index: llvm/test/Programs/Makefile.programs diff -u llvm/test/Programs/Makefile.programs:1.32 llvm/test/Programs/Makefile.programs:1.33 --- llvm/test/Programs/Makefile.programs:1.32 Tue Jan 21 10:24:11 2003 +++ llvm/test/Programs/Makefile.programs Tue Jan 21 15:31:59 2003 @@ -44,6 +44,7 @@ .PRECIOUS: Output/%.llvm Output/%.native Output/%.llc Output/%.llc.s .PRECIOUS: Output/%.cbe Output/%.cbe.c Output/%.llvm.bc +.PRECIOUS: Output/%.linked.bc PROGDIR = $(LEVEL)/test/Programs @@ -61,7 +62,8 @@ # correctly, this script has no effect, otherwise it will do things like print a # stack trace of a core dump. It always returns "successful" so that tests will # continue to be run. -RUNSAFELY = $(PROGDIR)/RunSafely.sh +ULIMIT := ulimit -t 30 +RUNSAFELY = $(ULIMIT); $(PROGDIR)/RunSafely.sh # # Targets to build for the default target... @@ -141,6 +143,21 @@ all:: $(LLIDIFFS) endif +# Given a version of the entire program linked together into a single unit of +# raw output from the C frontend, optimize it. +Output/%.linked.bc: Output/%.linked.rll $(LGCCAS) + $(LGCCAS) $(STATS) $< -o $@ + +# Rule to produce final program bytecode file from linked, optimized, bytecode. +ifndef USE_PRECOMPILED_BYTECODE + +# Link the program to the libraries it uses, then perform postlink +# optimization... +Output/%.llvm Output/%.llvm.bc: Output/%.linked.bc + $(LGCCLD) $(STATS) $< -lgcc -lc $(LIBS) -o Output/$*.llvm + +endif + # # Rules to compile the program for the C Back End # @@ -162,23 +179,25 @@ ifndef USE_PRECOMPILED_BYTECODE $(PROGRAMS_TO_TEST:%=Output/%.out-nat): \ Output/%.out-nat: Output/%.native - $(RUNSAFELY) $< > $@ $(RUN_OPTIONS) + -$(RUNSAFELY) $< > $@ $(RUN_OPTIONS) endif LLI_OPTS := -q -abort-on-exception -force-interpreter=true +JIT_OPTS := -force-interpreter=false + $(PROGRAMS_TO_TEST:%=Output/%.out-lli): \ Output/%.out-lli: Output/%.llvm.bc $(LLI) - $(RUNSAFELY) $(LLI) $(LLI_OPTS) $< > $@ $(RUN_OPTIONS) + -$(RUNSAFELY) $(LLI) $(LLI_OPTS) $< > $@ $(RUN_OPTIONS) $(PROGRAMS_TO_TEST:%=Output/%.out-jit): \ Output/%.out-jit: Output/%.llvm.bc $(LLI) - $(RUNSAFELY) $(LLI) -force-interpreter=false $< > $@ $(RUN_OPTIONS) + -$(RUNSAFELY) $(LLI) $(JIT_OPTS) $< > $@ $(RUN_OPTIONS) $(PROGRAMS_TO_TEST:%=Output/%.out-llc): \ Output/%.out-llc: Output/%.llc - $(RUNSAFELY) $< > $@ $(RUN_OPTIONS) + -$(RUNSAFELY) $< > $@ $(RUN_OPTIONS) $(PROGRAMS_TO_TEST:%=Output/%.out-cbe): \ Output/%.out-cbe: Output/%.cbe - $(RUNSAFELY) $< > $@ $(RUN_OPTIONS) + -$(RUNSAFELY) $< > $@ $(RUN_OPTIONS) # # Rules to diff test output... From lattner at cs.uiuc.edu Tue Jan 21 15:33:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jan 21 15:33:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/MultiSource/Makefile.multisrc Message-ID: <200301212132.PAA06467@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs/MultiSource: Makefile.multisrc updated: 1.21 -> 1.22 --- Log message: Unify building processes between multisrc and singlesrc makefiles --- Diffs of the changes: Index: llvm/test/Programs/MultiSource/Makefile.multisrc diff -u llvm/test/Programs/MultiSource/Makefile.multisrc:1.21 llvm/test/Programs/MultiSource/Makefile.multisrc:1.22 --- llvm/test/Programs/MultiSource/Makefile.multisrc:1.21 Fri Jan 17 11:48:00 2003 +++ llvm/test/Programs/MultiSource/Makefile.multisrc Tue Jan 21 15:32:01 2003 @@ -29,8 +29,7 @@ NObjs := $(sort $(addsuffix .o, $(basename $(Source)))) NObjects := $(addprefix Output/,$(NObjs)) -.PRECIOUS: $(LObjects) $(NObjects) Output/%.linked.bc -.PRECIOUS: Output/%.linked.rbc Output/%.linked.rll +.PRECIOUS: $(LObjects) $(NObjects) Output/%.linked.rll Output/%.o: %.c Output/.dir $(CC) $(CPPFLAGS) -O $(CFLAGS) -c $< -o $@ @@ -42,26 +41,11 @@ $(LAS) -f $< -o $@ -# Output/*.linked.bc is all of the bytecode files of the program linked together +# Output/*.linked.ll is all of the bytecode files of the program linked together # without any libraries linked in... # -Output/%.linked.rbc: $(LObjects) - $(LLINK) -f $(LObjects) | opt -funcresolve > $@ - -Output/%.linked.rll: Output/%.linked.rbc $(LDIS) - $(LDIS) -f $< -o $@ - -Output/%.linked.bc: Output/%.linked.rll $(LGCCAS) - $(LGCCAS) $(STATS) $< -o $@ - -ifndef USE_PRECOMPILED_BYTECODE - -# Link the program to the libraries it uses, then perform postlink -# optimization... -Output/%.llvm Output/%.llvm.bc: Output/%.linked.bc - $(LGCCLD) $(STATS) $< -lgcc -lc $(LIBS) -o Output/$*.llvm - -endif +Output/%.linked.rll: $(LObjects) $(LLINK) $(LOPT) $(LDIS) + $(LLINK) -f $(LObjects) | $(LOPT) -funcresolve | $(LDIS) > $@ Output/%.native: $(NObjects) $(CC) -o $@ $(NObjects) $(LDFLAGS) $(CFLAGS) From lattner at cs.uiuc.edu Tue Jan 21 15:33:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jan 21 15:33:02 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/SingleSource/Makefile.singlesrc Message-ID: <200301212132.PAA06474@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs/SingleSource: Makefile.singlesrc updated: 1.14 -> 1.15 --- Log message: Unify building processes between multisrc and singlesrc makefiles --- Diffs of the changes: Index: llvm/test/Programs/SingleSource/Makefile.singlesrc diff -u llvm/test/Programs/SingleSource/Makefile.singlesrc:1.14 llvm/test/Programs/SingleSource/Makefile.singlesrc:1.15 --- llvm/test/Programs/SingleSource/Makefile.singlesrc:1.14 Fri Jan 17 11:48:06 2003 +++ llvm/test/Programs/SingleSource/Makefile.singlesrc Tue Jan 21 15:32:03 2003 @@ -1,5 +1,4 @@ -##-----------------------------------------------------------*-Makefile-*- -# test/Programs/SingleSource/Makefile +##===- test/Programs/SingleSource/Makefile -----------------*- Makefile -*-===## # # This makefile builds all of the C programs in this directory in three # different configurations: @@ -15,22 +14,16 @@ # # IDEA: This could be specified in the start of the .c file, in a comment block # -##------------------------------------------------------------------------ +##===----------------------------------------------------------------------===## PROGRAMS_TO_TEST = $(Source:.c=) include $(LEVEL)/test/Programs/Makefile.programs +.PRECIOUS: Output/%.linked.rll + +Output/%.linked.rll: Output/%.ll + cp -f $< $@ # FIXME: LIBS should be specified, not hardcoded to -lm Output/%.native: %.c Output/.dir $(CC) $(CFLAGS) $< -lm -o $@ - -ifndef USE_PRECOMPILED_BYTECODE - -# Since this is just a single source program, the linked version of the program -# is the same as the unlinked version... -# -# FIXME: LIBS should be specified, not hardcoded to -lc -lm -Output/%.llvm Output/%.llvm.bc: Output/%.bc - $(LGCCLD) $(STATS) $< -lgcc -lc -lm -o Output/$*.llvm -endif From lattner at cs.uiuc.edu Tue Jan 21 16:32:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jan 21 16:32:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/GenerateReport.pl Message-ID: <200301212231.QAA19779@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs: GenerateReport.pl updated: 1.5 -> 1.6 --- Log message: HTML reports don't get assertions --- Diffs of the changes: Index: llvm/test/Programs/GenerateReport.pl diff -u llvm/test/Programs/GenerateReport.pl:1.5 llvm/test/Programs/GenerateReport.pl:1.6 --- llvm/test/Programs/GenerateReport.pl:1.5 Tue Jan 21 10:24:42 2003 +++ llvm/test/Programs/GenerateReport.pl Tue Jan 21 16:31:30 2003 @@ -102,7 +102,7 @@ # If an assertion failure occured, print it out. $Assert = sprintf "\n\t\t\t%s", (grep /Assertion/, (split "\n", $Record)); } - push @RowValues, $Assert; + push @RowValues, $Assert if (!$HTML); push @Values, [@RowValues]; } From lattner at cs.uiuc.edu Tue Jan 21 16:33:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jan 21 16:33:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/TEST.nightly.Makefile TEST.nightly.report Message-ID: <200301212232.QAA19812@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs: TEST.nightly.Makefile added (r1.1) TEST.nightly.report added (r1.1) --- Log message: Initial checkin of nightly testing framework --- Diffs of the changes: From lattner at cs.uiuc.edu Tue Jan 21 16:33:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jan 21 16:33:02 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/Makefile Message-ID: <200301212232.QAA19972@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs: Makefile updated: 1.9 -> 1.10 --- Log message: Breakup report generation --- Diffs of the changes: Index: llvm/test/Programs/Makefile diff -u llvm/test/Programs/Makefile:1.9 llvm/test/Programs/Makefile:1.10 --- llvm/test/Programs/Makefile:1.9 Tue Jan 21 10:24:42 2003 +++ llvm/test/Programs/Makefile Tue Jan 21 16:31:18 2003 @@ -27,9 +27,15 @@ report.$(TEST).raw.out: $(REPORT_DEPENDENCIES) gmake TEST=$(TEST) 2>&1 | tee $@ -report: report.$(TEST).raw.out - ./GenerateReport.pl -html TEST.$(TEST).report < $< > report.$(TEST).html - ./GenerateReport.pl TEST.$(TEST).report < $< | tee report.$(TEST).txt + +report.$(TEST).txt: report.$(TEST).raw.out + ./GenerateReport.pl TEST.$(TEST).report < $< > $@ + +report.$(TEST).html: report.$(TEST).raw.out + ./GenerateReport.pl -html TEST.$(TEST).report < $< > $@ + +report: report.$(TEST).txt + @cat report.$(TEST).txt clean:: rm -f report.*.raw.out report.*.txt From lattner at cs.uiuc.edu Tue Jan 21 16:50:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jan 21 16:50:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/TEST.nightly.Makefile Message-ID: <200301212249.QAA23978@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs: TEST.nightly.Makefile updated: 1.1 -> 1.2 --- Log message: Fix bug --- Diffs of the changes: Index: llvm/test/Programs/TEST.nightly.Makefile diff -u llvm/test/Programs/TEST.nightly.Makefile:1.1 llvm/test/Programs/TEST.nightly.Makefile:1.2 --- llvm/test/Programs/TEST.nightly.Makefile:1.1 Tue Jan 21 16:32:02 2003 +++ llvm/test/Programs/TEST.nightly.Makefile Tue Jan 21 16:49:28 2003 @@ -49,6 +49,7 @@ # LLI tests $(PROGRAMS_TO_TEST:%=Output/%.nightly.lli.report.txt): \ Output/%.nightly.lli.report.txt: Output/%.llvm.bc Output/%.diff-lli $(LLI) + @echo > $@ # Make sure something ends up in the file... @if test -e Output/$*.diff-lli; then \ ($(ULIMIT); time -p $(LLI) -stats $(LLI_OPTS) $< $(RUN_OPTIONS)) >$@ 2>&1;\ echo "TEST-RESULT-lli-diffmatch: YES" >> $@;\ @@ -63,6 +64,7 @@ # JIT tests $(PROGRAMS_TO_TEST:%=Output/%.nightly.jit.report.txt): \ Output/%.nightly.jit.report.txt: Output/%.llvm.bc Output/%.diff-jit $(LLI) + @echo > $@ # Make sure something ends up in the file... @if test -e Output/$*.diff-jit; then \ ($(ULIMIT); time -p $(LLI) $(JIT_OPTS) $(TIMEOPT) $< $(RUN_OPTIONS)) > $@ 2>&1;\ echo "TEST-RESULT-jit-diffmatch: YES" >> $@;\ From lattner at cs.uiuc.edu Tue Jan 21 17:09:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jan 21 17:09:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/TEST.nightly.report Message-ID: <200301212308.RAA31203@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs: TEST.nightly.report updated: 1.1 -> 1.2 --- Log message: Fix bugs --- Diffs of the changes: Index: llvm/test/Programs/TEST.nightly.report diff -u llvm/test/Programs/TEST.nightly.report:1.1 llvm/test/Programs/TEST.nightly.report:1.2 --- llvm/test/Programs/TEST.nightly.report:1.1 Tue Jan 21 16:32:02 2003 +++ llvm/test/Programs/TEST.nightly.report Tue Jan 21 17:07:57 2003 @@ -7,7 +7,7 @@ # Sort by program name $SortCol = 0; -my $WallTimeRE = '[^(]+\\(([0-9.]+) wall clock'; +my $WallTimeRE = '[A-Za-z0-9.: ]+\\(([0-9.]+) wall clock'; # These are the columns for the report. The first entry is the header for the # column, the second is the regex to use to match the value. Empty list create From lattner at cs.uiuc.edu Wed Jan 22 09:24:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jan 22 09:24:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/DiffOutput.sh Message-ID: <200301221523.JAA18578@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs: DiffOutput.sh updated: 1.3 -> 1.4 --- Log message: Make this work on linux when /usr/dcs/... isn't in the path --- Diffs of the changes: Index: llvm/test/Programs/DiffOutput.sh diff -u llvm/test/Programs/DiffOutput.sh:1.3 llvm/test/Programs/DiffOutput.sh:1.4 --- llvm/test/Programs/DiffOutput.sh:1.3 Thu Apr 4 13:27:22 2002 +++ llvm/test/Programs/DiffOutput.sh Wed Jan 22 09:23:04 2003 @@ -11,8 +11,16 @@ # DIFFOUTPUT - The output filename to make DIFFOUTPUT=Output/$2.diff-$1 +# Find gnu diff +if which gdiff +then + DIFF=gdiff +else + DIFF=diff +fi + # Diff the two files. -gdiff -u Output/$2.out-nat Output/$2.out-$1 > $DIFFOUTPUT || ( +$DIFF -u Output/$2.out-nat Output/$2.out-$1 > $DIFFOUTPUT || ( # They are different! echo "******************** TEST '$2' FAILED! ********************" echo "Execution Context Diff:" From lattner at cs.uiuc.edu Wed Jan 22 09:42:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jan 22 09:42:01 2003 Subject: [llvm-commits] CVS: llvm/tools/lli/Makefile Message-ID: <200301221541.JAA21316@apoc.cs.uiuc.edu> Changes in directory llvm/tools/lli: Makefile updated: 1.21 -> 1.22 --- Log message: Fix didn't fix the race condition in the makefiles --- Diffs of the changes: Index: llvm/tools/lli/Makefile diff -u llvm/tools/lli/Makefile:1.21 llvm/tools/lli/Makefile:1.22 --- llvm/tools/lli/Makefile:1.21 Tue Jan 21 09:20:50 2003 +++ llvm/tools/lli/Makefile Wed Jan 22 09:41:10 2003 @@ -1,6 +1,6 @@ LEVEL = ../.. TOOLNAME = lli -DIRS = Interpreter JIT +PARALLEL_DIRS = Interpreter JIT JITLIBS = lli-jit codegen x86 USEDLIBS = lli-interpreter $(JITLIBS) bcreader vmcore analysis.a support.a target.a From lattner at cs.uiuc.edu Wed Jan 22 10:14:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jan 22 10:14:01 2003 Subject: [llvm-commits] CVS: llvm/utils/NightlyTestTemplate.html Message-ID: <200301221613.KAA21984@apoc.cs.uiuc.edu> Changes in directory llvm/utils: NightlyTestTemplate.html updated: 1.2 -> 1.3 --- Log message: Add support for program tests --- Diffs of the changes: Index: llvm/utils/NightlyTestTemplate.html diff -u llvm/utils/NightlyTestTemplate.html:1.2 llvm/utils/NightlyTestTemplate.html:1.3 --- llvm/utils/NightlyTestTemplate.html:1.2 Mon Jan 20 12:05:27 2003 +++ llvm/utils/NightlyTestTemplate.html Wed Jan 22 10:13:10 2003 @@ -12,7 +12,7 @@
    Sections:
    -
    +
    Overview
    Changes
    Trends
    @@ -51,6 +51,7 @@ Number of lines of code: $LOC
  • Compilation Log
      + $BuildError Time to build CVS tree: $BuildTime seconds
      Number of object files compiled: $NumObjects
      Number of libraries linked: $NumLibraries
      @@ -112,7 +113,48 @@ Program Tests
  • -Not yet implemented

    +This section tests LLVM on a variety of programs in the test suite. This +includes benchmark suites like the Olden, ptrdist, and SPEC benchmarks as well +as a few random programs with test inputs. This section is meant to track how +stable LLVM is as a whole. The columns of the tables are:

    + +

      +
    1. Program - The name of the program for that row +
    2. GCCAS - Time to run LLVM optimizers on the program +
    3. Bytecode - The size of the bytecode for the program +
    4. Instrs - The number of LLVM instructions in the + compiled bytecode +
    5. LLC - Does the program compile with the Sparc Backend? Note + that this justs tests to see if the backend runs successfully, not if the + generated code works. +
    6. CBE - Does the program compile with the C Backend? Note + that this justs tests to see if the code generated compiles, not if it + works. +
    7. LLI - How long does the program take to execute in + LLI's interpreter (note that this is capped to 30s). +
    8. DynInstrs - How many dynamic instructions are executed + by the interpreter, if it finishes. +
    9. JIT - How long does the program take to execute in the + Just In Time compiler (again, capped to 30s). +
    10. MachCode - The number of bytes of machine code + generated by the JIT. +
    11. CompTime - The amount of time spent in the JIT itself, + instead of executing the program. +

    + +A complete log of testing is available for +further analysis. + +

    Programs/MultiSource

    + +
    +
    +$ProgramsTable +
    + +

    Programs/SingleSource

    + +

    @@ -191,14 +193,23 @@ @@ -298,7 +315,13 @@

    Other useful information:

    From lattner at cs.uiuc.edu Wed Jan 22 15:13:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jan 22 15:13:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/GenerateReport.pl Message-ID: <200301222112.PAA00584@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs: GenerateReport.pl updated: 1.6 -> 1.7 --- Log message: Add grid lines to table --- Diffs of the changes: Index: llvm/test/Programs/GenerateReport.pl diff -u llvm/test/Programs/GenerateReport.pl:1.6 llvm/test/Programs/GenerateReport.pl:1.7 --- llvm/test/Programs/GenerateReport.pl:1.6 Tue Jan 21 16:31:30 2003 +++ llvm/test/Programs/GenerateReport.pl Wed Jan 22 15:11:58 2003 @@ -133,22 +133,29 @@ print "\n"; }; ""; } + sub printLine { + print "
    From lattner at cs.uiuc.edu Wed Jan 22 10:14:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jan 22 10:14:02 2003 Subject: [llvm-commits] CVS: llvm/Makefile.common Message-ID: <200301221613.KAA21996@apoc.cs.uiuc.edu> Changes in directory llvm: Makefile.common updated: 1.73 -> 1.74 --- Log message: Fix lli build problem with parallel makes --- Diffs of the changes: Index: llvm/Makefile.common diff -u llvm/Makefile.common:1.73 llvm/Makefile.common:1.74 --- llvm/Makefile.common:1.73 Thu Jan 16 16:44:19 2003 +++ llvm/Makefile.common Wed Jan 22 10:13:31 2003 @@ -230,7 +230,6 @@ %/.makeall %/.makeinstall %/.makeclean %/.maketest: $(VERB) cd $(@D); $(MAKE) $(subst $(@D)/.make,,$@) - endif #--------------------------------------------------------- @@ -396,19 +395,25 @@ USED_LIB_PATHS_P := $(addprefix $(LIBPROFILE)/, $(STATICUSEDLIBS)) LINK_OPTS := $(TOOLLINKOPTS) $(PLATFORMLINKOPTS) + +# Tell make that we need to rebuild subdirectories before we can link the tool. +# This affects things like LLI which has library subdirectories. +$(USED_LIB_PATHS_G) $(USED_LIB_PATHS_O) $(USED_LIB_PATHS_P): \ + $(addsuffix /.makeall, $(PARALLEL_DIRS)) + all:: $(TOOLEXENAMES) clean:: $(VERB) rm -f $(TOOLEXENAMES) -$(TOOLEXENAME_G): $(ObjectsG) $(USED_LIB_PATHS_G) $(BUILD_ROOT_TOP)/tools/Debug/.dir +$(TOOLEXENAME_G): $(ObjectsG) $(USED_LIB_PATHS_G) $(TOOLDEBUG)/.dir @echo ======= Linking $(TOOLNAME) debug executable $(WARN_MSG) ======= $(VERB) $(LinkG) -o $@ $(ObjectsG) $(USED_LIBS_OPTIONS_G) $(LINK_OPTS) -$(TOOLEXENAME_O): $(ObjectsO) $(USED_LIB_PATHS_O) $(BUILD_ROOT_TOP)/tools/Release/.dir +$(TOOLEXENAME_O): $(ObjectsO) $(USED_LIB_PATHS_O) $(TOOLRELEASE)/.dir @echo ======= Linking $(TOOLNAME) release executable ======= $(VERB) $(LinkO) -o $@ $(ObjectsO) $(USED_LIBS_OPTIONS_O) $(LINK_OPTS) -$(TOOLEXENAME_P): $(ObjectsP) $(USED_LIB_PATHS_P) $(BUILD_ROOT_TOP)/tools/Profile/.dir +$(TOOLEXENAME_P): $(ObjectsP) $(USED_LIB_PATHS_P) $(TOOLPROFILE)/.dir @echo ======= Linking $(TOOLNAME) profile executable ======= $(VERB) $(LinkP) -o $@ $(ObjectsP) $(USED_LIBS_OPTIONS_P) $(LINK_OPTS) From lattner at cs.uiuc.edu Wed Jan 22 10:15:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jan 22 10:15:01 2003 Subject: [llvm-commits] CVS: llvm/utils/NightlyTest.pl Message-ID: <200301221614.KAA22007@apoc.cs.uiuc.edu> Changes in directory llvm/utils: NightlyTest.pl updated: 1.3 -> 1.4 --- Log message: Implement program tests, and test for compile time problems --- Diffs of the changes: Index: llvm/utils/NightlyTest.pl diff -u llvm/utils/NightlyTest.pl:1.3 llvm/utils/NightlyTest.pl:1.4 --- llvm/utils/NightlyTest.pl:1.3 Mon Jan 20 13:18:44 2003 +++ llvm/utils/NightlyTest.pl Wed Jan 22 10:14:05 2003 @@ -21,6 +21,17 @@ my $DATE = sprintf "%4d-%02d-%02d", $TIME[5]+1900, $TIME[4]+1, $TIME[3]; my $DateString = strftime "%B %d, %Y", localtime; +sub ReadFile { + if (open (FILE, $_[0])) { + my $Ret = ; + close FILE; + return $Ret; + } else { + print "Could not open file '$_[0]' for reading!"; + return ""; + } +} + sub WriteFile { # (filename, contents) open (FILE, ">$_[0]") or die "Could not open file '$_[0]' for writing!"; print FILE $_[1]; @@ -68,6 +79,7 @@ # Command line argument settings... my $NOCHECKOUT = 0; my $NOREMOVE = 0; +my $NOTEST = 0; my $MAKEOPTS = ""; # Parse arguments... @@ -78,6 +90,7 @@ # List command line options here... if (/^-nocheckout$/) { $NOCHECKOUT = 1; next; } if (/^-noremove$/) { $NOREMOVE = 1; next; } + if (/^-notest$/) { $NOTEST = 1; next; } if (/^-parallel$/) { $MAKEOPTS = "-j2 -l3.0"; next; } print "Unknown option: $_ : ignoring!\n"; @@ -103,13 +116,19 @@ print "Prefix = $Prefix\n"; } + +# # Create the CVS repository directory +# if (!$NOCHECKOUT) { mkdir $BuildDir or die "Could not create CVS checkout directory!"; } chdir $BuildDir or die "Could not change to CVS checkout directory!"; + +# # Check out the llvm tree, saving CVS messages to the cvs log... +# system "(time -p cvs -d $CVSRootDir co llvm) > $Prefix-CVS-Log.txt 2>&1" if (!$NOCHECKOUT); @@ -117,17 +136,20 @@ # Read in the HTML template file... undef $/; -open (TEMPLATEFILE, $Template) or die "Could not open file 'llvm/$Template'!"; -my $TemplateContents = ; -close(TEMPLATEFILE); +my $TemplateContents = ReadFile $Template; + +# # Get some static statistics about the current state of CVS +# my $CVSCheckoutTime = GetRegex "([0-9.]+)", `grep '^real' $Prefix-CVS-Log.txt`; my $NumFilesInCVS = `grep ^U $Prefix-CVS-Log.txt | wc -l` + 0; my $NumDirsInCVS = `grep '^cvs checkout' $Prefix-CVS-Log.txt | wc -l` + 0; $LOC = GetRegex "([0-9]+) +total", `wc -l \`utils/getsrcs.sh\` | grep total`; +# # Build the entire tree, saving build messages to the build log +# if (!$NOCHECKOUT) { # Change the Makefile.config to build into the local directory... rename "Makefile.config", "Makefile.config.orig"; @@ -142,15 +164,25 @@ system "(time -p gmake $MAKEOPTS) > $Prefix-Build-Log.txt 2>&1"; } + +# # Get some statistics about the build... +# my @Linked = split '\n', `grep Linking $Prefix-Build-Log.txt`; my $NumExecutables = scalar(grep(/executable/, @Linked)); my $NumLibraries = scalar(grep(!/executable/, @Linked)); my $NumObjects = `grep '^Compiling' $Prefix-Build-Log.txt | wc -l` + 0; my $BuildTime = GetRegex "([0-9.]+)", `grep '^real' $Prefix-Build-Log.txt`; +my $BuildError = ""; +if (`grep '^gmake: .*Error' $Prefix-Build-Log.txt | wc -l` + 0) { + $BuildError = "

    Build error: compilation " + . "aborted

    "; +} +# # Get warnings from the build +# my @Warn = split "\n", `grep -E 'warning:|Entering dir' $Prefix-Build-Log.txt`; my @Warnings; my $CurDir = ""; @@ -175,7 +207,10 @@ $WarningsAdded = AddPreTag $WarningsAdded; $WarningsRemoved = AddPreTag $WarningsRemoved; + +# # Get some statistics about CVS commits over the current day... +# @CVSHistory = split "\n", `cvs history -D '1 day ago' -a -xAMROCGUW`; #print join "\n", @CVSHistory; print "\n"; @@ -214,7 +249,20 @@ my $ModifiedFilesList = AddPreTag join "\n", keys %ModifiedFiles; my $RemovedFilesList = AddPreTag join "\n", keys %RemovedFiles; +# +# Run the nightly programs tests... +# +chdir "test/Programs" or die "Could not change into programs testdir!"; + +# Run the programs tests... creating a report.nightly.html file +system "gmake $MAKEOPTS report.nightly.html TEST=nightly " + . "> $Prefix-ProgramTest.txt 2>&1" if (!$NOTEST); + +my $ProgramsTable = ReadFile "report.nightly.html"; + +# # Get a list of the previous days that we can link to... +# my @PrevDays = map {s/.html//; $_} GetDir ".html"; splice @PrevDays, 20; # Trim down list to something reasonable... @@ -222,12 +270,17 @@ my $PrevDaysList = # Format list for sidebar join "\n ", map { "$_
    " } @PrevDays; + # # Remove the cvs tree... # +chdir $WebDir or die "Could not change into web directory!"; system "rm -rf $BuildDir" if (!$NOCHECKOUT and !$NOREMOVE); + +# # Print out information... +# if (0) { print "DateString: $DateString\n"; print "CVS Checkout: $CVSCheckoutTime seconds\n"; @@ -247,12 +300,12 @@ print "Previous Days =\n $PrevDaysList\n"; } + # # Output the files... # # Main HTML file... -chdir $WebDir or die "Could not change into web directory!"; my $Output; eval "\$Output = < Changes in directory llvm/test/Programs: TEST.nightly.Makefile updated: 1.2 -> 1.3 --- Log message: Add test success/failure indicators --- Diffs of the changes: Index: llvm/test/Programs/TEST.nightly.Makefile diff -u llvm/test/Programs/TEST.nightly.Makefile:1.2 llvm/test/Programs/TEST.nightly.Makefile:1.3 --- llvm/test/Programs/TEST.nightly.Makefile:1.2 Tue Jan 21 16:49:28 2003 +++ llvm/test/Programs/TEST.nightly.Makefile Wed Jan 22 13:47:03 2003 @@ -17,48 +17,59 @@ # Compilation tests $(PROGRAMS_TO_TEST:%=Output/%.nightly.compile.report.txt): \ Output/%.nightly.compile.report.txt: Output/%.llvm.bc $(LGCCAS) - @echo "" > $@ - -$(LGCCAS) Output/$*.linked.rll -o /dev/null $(TIMEOPT) >> $@ 2>&1 - @echo -n "TEST-RESULT-compile: " >> $@ - @-grep "Total Execution Time" $@ >> $@ - @echo >> $@ - @echo -n "TEST-RESULT-compile: " >> $@ - @-grep "Number of bytecode bytes written" $@ >> $@ - @echo >> $@ - @echo -n "TEST-RESULT-compile: " >> $@ - @-grep "Number of instructions" $@ >> $@ - @echo >> $@ + @echo '$(LGCCAS) Output/$*.linked.rll -o /dev/null $(TIMEOPT) > $@ 2>&1' + @-if ($(LGCCAS) Output/$*.linked.rll -o /dev/null $(TIMEOPT) > $@ 2>&1)\ + ;then \ + echo "TEST-PASS: compile $(RELDIR)/$*" >> $@;\ + echo -n "TEST-RESULT-compile: " >> $@;\ + grep "Total Execution Time" $@ >> $@;\ + echo >> $@;\ + echo -n "TEST-RESULT-compile: " >> $@;\ + grep "Number of bytecode bytes written" $@ >> $@;\ + echo >> $@;\ + echo -n "TEST-RESULT-compile: " >> $@;\ + grep "Number of instructions" $@ >> $@;\ + echo >> $@;\ + else \ + echo "TEST-FAIL: compile $(RELDIR)/$*" >> $@;\ + fi # LLC tests $(PROGRAMS_TO_TEST:%=Output/%.nightly.llc.report.txt): \ Output/%.nightly.llc.report.txt: Output/%.llvm.bc $(LLC) - -(time -p $(LLC) -f $(TIMEOPT) Output/$*.llvm.bc -o /dev/null) > $@ 2>&1 - @echo -n "TEST-RESULT-llc: " >> $@ - @-grep "Total Execution Time" $@ >> $@ - @echo >> $@ - @echo -n "TEST-RESULT-llc: " >> $@ - @-grep "^real" $@ >> $@ - @echo >> $@ + @echo 'time -p $(LLC) -f $(TIMEOPT) $< -o /dev/null) > $@ 2>&1' + @-if (time -p $(LLC) -f $(TIMEOPT) $< -o /dev/null) > $@ 2>&1; then \ + echo "TEST-PASS: llc $(RELDIR)/$*" >> $@;\ + echo -n "TEST-RESULT-llc: " >> $@;\ + grep "Total Execution Time" $@ >> $@;\ + echo >> $@;\ + echo -n "TEST-RESULT-llc: " >> $@;\ + grep "^real" $@ >> $@;\ + echo >> $@;\ + else \ + echo "TEST-FAIL: llc $(RELDIR)/$*" >> $@;\ + fi # CBE tests $(PROGRAMS_TO_TEST:%=Output/%.nightly.cbe.report.txt): \ Output/%.nightly.cbe.report.txt: Output/%.llvm.bc $(LDIS) - -(gmake Output/$*.cbe) > $@ 2>&1 + -($(MAKE) Output/$*.cbe) > $@ 2>&1 @if test -f Output/$*.cbe; then echo "TEST-RESULT-cbe: YES" >> $@; fi\ # LLI tests $(PROGRAMS_TO_TEST:%=Output/%.nightly.lli.report.txt): \ Output/%.nightly.lli.report.txt: Output/%.llvm.bc Output/%.diff-lli $(LLI) - @echo > $@ # Make sure something ends up in the file... @if test -e Output/$*.diff-lli; then \ ($(ULIMIT); time -p $(LLI) -stats $(LLI_OPTS) $< $(RUN_OPTIONS)) >$@ 2>&1;\ - echo "TEST-RESULT-lli-diffmatch: YES" >> $@;\ + echo "TEST-PASS: lli $(RELDIR)/$*" >> $@;\ echo -n "TEST-RESULT-lli-time: " >> $@;\ grep "^real" $@ >> $@;\ echo >> $@;\ echo -n "TEST-RESULT-lli-dyninst: " >> $@;\ grep "Number of dynamic inst" $@ >> $@;\ echo >> $@;\ + else \ + echo "TEST-FAIL: lli $(RELDIR)/$*" >> $@;\ fi # JIT tests @@ -67,7 +78,7 @@ @echo > $@ # Make sure something ends up in the file... @if test -e Output/$*.diff-jit; then \ ($(ULIMIT); time -p $(LLI) $(JIT_OPTS) $(TIMEOPT) $< $(RUN_OPTIONS)) > $@ 2>&1;\ - echo "TEST-RESULT-jit-diffmatch: YES" >> $@;\ + echo "TEST-PASS: jit $(RELDIR)/$*" >> $@;\ echo -n "TEST-RESULT-jit-time: " >> $@;\ grep "^real" $@ >> $@;\ echo >> $@;\ @@ -77,6 +88,8 @@ echo -n "TEST-RESULT-jit-machcode: " >> $@;\ grep "bytes of machine code compiled" $@ >> $@;\ echo >> $@;\ + else \ + echo "TEST-FAIL: jit $(RELDIR)/$*" >> $@;\ fi # Overall tests: just run subordinate tests From lattner at cs.uiuc.edu Wed Jan 22 14:37:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jan 22 14:37:01 2003 Subject: [llvm-commits] CVS: llvm/utils/NightlyTest.pl NightlyTestTemplate.html Message-ID: <200301222036.OAA32728@apoc.cs.uiuc.edu> Changes in directory llvm/utils: NightlyTest.pl updated: 1.4 -> 1.5 NightlyTestTemplate.html updated: 1.3 -> 1.4 --- Log message: Implement "new/removed/broken/fixed" tests --- Diffs of the changes: Index: llvm/utils/NightlyTest.pl diff -u llvm/utils/NightlyTest.pl:1.4 llvm/utils/NightlyTest.pl:1.5 --- llvm/utils/NightlyTest.pl:1.4 Wed Jan 22 10:14:05 2003 +++ llvm/utils/NightlyTest.pl Wed Jan 22 14:35:59 2003 @@ -39,7 +39,7 @@ } sub GetRegex { # (Regex with ()'s, value) - $_[1] =~ /$_[0]/; + $_[1] =~ /$_[0]/m; return $1; } @@ -134,6 +134,8 @@ chdir "llvm" or die "Could not change into llvm directory!"; +system "cvs up -P -d > /dev/null 2>&1" if (!$NOCHECKOUT); + # Read in the HTML template file... undef $/; my $TemplateContents = ReadFile $Template; @@ -172,7 +174,10 @@ my $NumExecutables = scalar(grep(/executable/, @Linked)); my $NumLibraries = scalar(grep(!/executable/, @Linked)); my $NumObjects = `grep '^Compiling' $Prefix-Build-Log.txt | wc -l` + 0; -my $BuildTime = GetRegex "([0-9.]+)", `grep '^real' $Prefix-Build-Log.txt`; +my $BuildTimeU = GetRegex "([0-9.]+)", `grep '^user' $Prefix-Build-Log.txt`; +my $BuildTimeS = GetRegex "([0-9.]+)", `grep '^sys' $Prefix-Build-Log.txt`; +my $BuildWallTime = GetRegex "([0-9.]+)", `grep '^real' $Prefix-Build-Log.txt`; +my $BuildTime = $BuildTimeU+$BuildTimeS; # BuildTime = User+System my $BuildError = ""; if (`grep '^gmake: .*Error' $Prefix-Build-Log.txt | wc -l` + 0) { $BuildError = "

    Build error: compilation " @@ -219,27 +224,35 @@ my (%AddedFiles, %ModifiedFiles, %RemovedFiles, %UsersCommitted, %UsersUpdated); +my $DateRE = "[-:0-9 ]+\\+[0-9]+"; + # Loop over every record from the CVS history, filling in the hashes. foreach $File (@CVSHistory) { my ($Type, $Date, $UID, $Rev, $Filename); - if ($File =~ /([AMR]) ([-:0-9 ]+\+[0-9]+) ([^ ]+) ([0-9.]+) +([^ ]+) +([^ ]+)/) { + if ($File =~ /([AMRUGC])\s($DateRE)\s([^\s]+)\s+([0-9.]+)\s+([^\s]+)\s+([^\s]+)/) { + ($Type, $Date, $UID, $Rev, $Filename) = ($1, $2, $3, $4, "$6/$5"); + } elsif ($File =~ /([W])\s($DateRE)\s([^\s]+) +([^\s]+)\s+([^\s]+)/) { ($Type, $Date, $UID, $Rev, $Filename) = ($1, $2, $3, $4, "$6/$5"); - } elsif ($File =~ /([OCGUW]) ([-:0-9 ]+\+[0-9]+) ([^ ]+)/) { - ($Type, $Date, $UID, $Rev, $Filename) = ($1, $2, $3, "", ""); + } elsif ($File =~ /([O]) ($DateRE) ([^ ]+) +([^\s]+)/) { + ($Type, $Date, $UID, $Rev, $Filename) = ($1, $2, $3, "", "$4/"); + } else { + print "UNMATCHABLE: $File\n"; } - #print "Ty = $Type Date = '$Date' UID=$UID Rev=$Rev File = '$Filename'\n"; + # print "$File\nTy = $Type Date = '$Date' UID=$UID Rev=$Rev File = '$Filename'\n"; - if ($Type eq 'M') { # Modified - $ModifiedFiles{$Filename} = 1; - $UsersCommitted{$UID} = 1; - } elsif ($Type eq 'A') { # Added - $AddedFiles{$Filename} = 1; - $UsersCommitted{$UID} = 1; - } elsif ($Type eq 'R') { # Removed - $RemovedFiles{$Filename} = 1; - $UsersCommitted{$UID} = 1; - } else { - $UsersUpdated{$UID} = 1; + if ($Filename =~ /^llvm/) { + if ($Type eq 'M') { # Modified + $ModifiedFiles{$Filename} = 1; + $UsersCommitted{$UID} = 1; + } elsif ($Type eq 'A') { # Added + $AddedFiles{$Filename} = 1; + $UsersCommitted{$UID} = 1; + } elsif ($Type eq 'R') { # Removed + $RemovedFiles{$Filename} = 1; + $UsersCommitted{$UID} = 1; + } else { + $UsersUpdated{$UID} = 1; + } } } @@ -259,6 +272,43 @@ . "> $Prefix-ProgramTest.txt 2>&1" if (!$NOTEST); my $ProgramsTable = ReadFile "report.nightly.html"; + +# +# Create a list of the tests which were run... +# +system "grep -E 'TEST-(PASS|FAIL)' < $Prefix-ProgramTest.txt " + . "| sort --key=3 > $Prefix-Tests.txt"; + +my ($RTestsAdded, $RTestsRemoved) = DiffFiles "-Tests.txt"; + +my @RawTestsAddedArray = split '\n', $RTestsAdded; +my @RawTestsRemovedArray = split '\n', $RTestsRemoved; + +my %OldTests = map {GetRegex('TEST-....: (.+)', $_)=>$_} @RawTestsRemovedArray; +my %NewTests = map {GetRegex('TEST-....: (.+)', $_)=>$_} @RawTestsAddedArray; + +my ($TestsAdded, $TestsRemoved, $TestsFixed, $TestsBroken) = ("","","",""); + +foreach $Test (keys %NewTests) { + if (!exists $OldTests{$Test}) { # TestAdded if in New but not old + $TestsAdded = "$TestsAdded$Test\n"; + } else { + if ($OldTests{$Test} =~ /TEST-PASS/) { # Was the old one a pass? + $TestsBroken = "$TestsBroken$Test\n"; # New one must be a failure + } else { + $TestsFixed = "$TestsFixed$Test\n"; # No, new one is a pass. + } + } +} +foreach $Test (keys %OldTests) { # TestRemoved if in Old but not New + $TestsRemoved = "$TestsRemoved$Test\n" if (!exists $NewTests{$Test}); +} + +$TestsAdded = AddPreTag $TestsAdded; +$TestsRemoved = AddPreTag $TestsRemoved; +$TestsFixed = AddPreTag $TestsFixed; +$TestsBroken = AddPreTag $TestsBroken; + # # Get a list of the previous days that we can link to... Index: llvm/utils/NightlyTestTemplate.html diff -u llvm/utils/NightlyTestTemplate.html:1.3 llvm/utils/NightlyTestTemplate.html:1.4 --- llvm/utils/NightlyTestTemplate.html:1.3 Wed Jan 22 10:13:10 2003 +++ llvm/utils/NightlyTestTemplate.html Wed Jan 22 14:35:59 2003 @@ -52,7 +52,8 @@
  • Compilation Log
      $BuildError - Time to build CVS tree: $BuildTime seconds
      + Time to build CVS tree: $BuildTime seconds + ($BuildWallTime seconds wall time)
      Number of object files compiled: $NumObjects
      Number of libraries linked: $NumLibraries
      Number of executables linked: $NumExecutables
      @@ -85,10 +86,10 @@

      Changes in the test suite:

        -
      • New Tests: ... -
      • Removed Tests: ... -
      • Newly passing tests: ... -
      • Newly failing tests: ... +
      • New Tests: $TestsAdded +
      • Removed Tests: $TestsRemoved +
      • Newly passing tests: $TestsFixed +
      • Newly failing tests: $TestsBroken


      From lattner at cs.uiuc.edu Wed Jan 22 14:53:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jan 22 14:53:01 2003 Subject: [llvm-commits] CVS: llvm/www/www-index.html Message-ID: <200301222052.OAA03055@tank.cs.uiuc.edu> Changes in directory llvm/www: www-index.html updated: 1.11 -> 1.12 --- Log message: * Add misha&brian as contributors * Add info about test framework --- Diffs of the changes: Index: llvm/www/www-index.html diff -u llvm/www/www-index.html:1.11 llvm/www/www-index.html:1.12 --- llvm/www/www-index.html:1.11 Sat Dec 14 22:23:41 2002 +++ llvm/www/www-index.html Wed Jan 22 14:51:49 2003 @@ -161,8 +161,8 @@
  • - The following people have contributed to the LLVM - project:
    - + + + + + + + + href="pubs/2002-12-LattnerMSThesis.pdf">Master's + Thesis to the publications list. - + + - + + - + + - + + - + + - + + - + + - - + + +
    Dec 14th, 2002 -Jan 22nd, 2003-Implemented a new + automated nightly testing + framework.
    Dec 14th, 2002- Added Chris Lattner's Master's Thesis to the - publications list.
    Oct 28th, 2002 -Oct 28th, 2002- A new mailing @@ -206,7 +217,8 @@ submissions.
    Sep 5th, 2002 -Sep 5th, 2002- An initial draft of the LLVM @@ -214,7 +226,8 @@ evolve, but it is at least started now.
    Sep 3rd, 2002 -Sep 3rd, 2002- A new LLVM @@ -223,35 +236,39 @@ about major changes to the LLVM source-base.
    Aug 8th, 2002 -Aug 8th, 2002- Published the Writing An LLVM Pass document.
    Jul 24th, 2002 -Jul 24th, 2002- Published the LLVM Getting Started Guide.
    Jul 1st, 2002 -Jul 1st, 2002- Finished providing initial information about LLVM, we now consider the site to have "gone public".
    Jun 28th, 2002 -Jun 28th, 2002- Added The LLVM Instruction Set and Compilation Strategy document.
    Jun 13th, 2002 -Web page first - published.

    Jun 13th, 2002-Web page first published.

    $Str
    \n"; + } print "\n"; print "\n"; - map { $_ = "$_" if $_ ne "|"; printCell $_ } @Header; + map { + print ""; + $_ = "$_" + if $_ ne "|"; printCell $_ + } @Header; + print ""; print "\n"; - print "" x @Header; + print "" x (2*@Header+1); print "\n"; my $RowCount = 0; foreach $Row (@Values) { - if (++$RowCount <= 2) { - print "\n"; - } else { - print "\n"; - $RowCount = 0 if ($RowCount > 3); - } - map { printCell $_ } @$Row; + my $IsWhite; + $IsWhite = ++$RowCount <= 2; + print "\n"; + $RowCount = 0 if ($RowCount > 3); + map { printLine($IsWhite); printCell $_ } @$Row; + printLine($IsWhite); print "\n\n"; } print "\n
    \n"; @@ -167,7 +174,6 @@ } } } - # # Print out the table now... From lattner at cs.uiuc.edu Wed Jan 22 16:01:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jan 22 16:01:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructure.cpp Message-ID: <200301222200.QAA03401@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: DataStructure.cpp updated: 1.72 -> 1.73 --- Log message: Fix analysis of the Burg program --- Diffs of the changes: Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.72 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.73 --- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.72 Fri Dec 6 15:15:21 2002 +++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Wed Jan 22 16:00:24 2003 @@ -448,7 +448,7 @@ // Make all of the outgoing links of *NH now be outgoing links of // this. This can cause recursive merging! // - for (unsigned i = 0; i < NSize; i += DS::PointerSize) { + for (unsigned i = 0; i < NH.getNode()->getSize(); i += DS::PointerSize) { DSNodeHandle &Link = NH.getNode()->getLink(i); if (Link.getNode()) { // Compute the offset into the current node at which to From lattner at cs.uiuc.edu Wed Jan 22 16:15:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jan 22 16:15:01 2003 Subject: [llvm-commits] CVS: llvm/tools/gccas/Makefile Message-ID: <200301222214.QAA04351@apoc.cs.uiuc.edu> Changes in directory llvm/tools/gccas: Makefile updated: 1.14 -> 1.15 --- Log message: link with static versions of some libs to avoid having to pull in all of ipo/ipa and datastructure at all --- Diffs of the changes: Index: llvm/tools/gccas/Makefile diff -u llvm/tools/gccas/Makefile:1.14 llvm/tools/gccas/Makefile:1.15 --- llvm/tools/gccas/Makefile:1.14 Fri Oct 25 16:17:34 2002 +++ llvm/tools/gccas/Makefile Wed Jan 22 16:14:04 2003 @@ -1,7 +1,7 @@ LEVEL = ../.. TOOLNAME = gccas -USEDLIBS = asmparser bcwriter transforms ipo scalaropts analysis \ - target.a transformutils ipa datastructure vmcore support.a +USEDLIBS = asmparser bcwriter transforms ipo.a ipa.a scalaropts analysis.a \ + target.a transformutils vmcore support.a include $(LEVEL)/Makefile.common From lattner at cs.uiuc.edu Wed Jan 22 17:25:00 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jan 22 17:25:00 2003 Subject: [llvm-commits] CVS: llvm/tools/bugpoint/OptimizerDriver.cpp Message-ID: <200301222324.RAA04973@apoc.cs.uiuc.edu> Changes in directory llvm/tools/bugpoint: OptimizerDriver.cpp updated: 1.2 -> 1.3 --- Log message: Allow creating of passes like levelraise which use a targetdata ctor --- Diffs of the changes: Index: llvm/tools/bugpoint/OptimizerDriver.cpp diff -u llvm/tools/bugpoint/OptimizerDriver.cpp:1.2 llvm/tools/bugpoint/OptimizerDriver.cpp:1.3 --- llvm/tools/bugpoint/OptimizerDriver.cpp:1.2 Mon Dec 23 17:49:59 2002 +++ llvm/tools/bugpoint/OptimizerDriver.cpp Wed Jan 22 17:24:11 2003 @@ -13,6 +13,7 @@ #include "llvm/PassManager.h" #include "llvm/Analysis/Verifier.h" #include "llvm/Bytecode/WriteBytecodePass.h" +#include "llvm/Target/TargetData.h" #include #include #include @@ -60,6 +61,8 @@ std::cout << " " << Filename << " -" << Pass->getPassArgument() << "\n"; } +/// FIXME: This should be parameterizable!! +static TargetData TD("bugpoint target"); static void RunChild(Module *Program,const std::vector &Passes, const std::string &OutFilename) { @@ -73,6 +76,8 @@ for (unsigned i = 0, e = Passes.size(); i != e; ++i) { if (Passes[i]->getNormalCtor()) PM.add(Passes[i]->getNormalCtor()()); + else if (Passes[i]->getDataCtor()) + PM.add(Passes[i]->getDataCtor()(TD)); // Provide dummy target data... else std::cerr << "Cannot create pass yet: " << Passes[i]->getPassName() << "\n"; From lattner at cs.uiuc.edu Wed Jan 22 20:12:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jan 22 20:12:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/ADCE/2003-01-22-PredecessorProblem.ll Message-ID: <200301230211.UAA08223@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/ADCE: 2003-01-22-PredecessorProblem.ll added (r1.1) --- Log message: New testcase reduced from 197.parser by bugpoint --- Diffs of the changes: From lattner at cs.uiuc.edu Wed Jan 22 20:13:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jan 22 20:13:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/ADCE.cpp Message-ID: <200301230212.UAA08248@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: ADCE.cpp updated: 1.48 -> 1.49 --- Log message: Fix bug: ADCE/2003-01-22-PredecessorProblem.ll --- Diffs of the changes: Index: llvm/lib/Transforms/Scalar/ADCE.cpp diff -u llvm/lib/Transforms/Scalar/ADCE.cpp:1.48 llvm/lib/Transforms/Scalar/ADCE.cpp:1.49 --- llvm/lib/Transforms/Scalar/ADCE.cpp:1.48 Tue Oct 1 17:38:40 2002 +++ llvm/lib/Transforms/Scalar/ADCE.cpp Wed Jan 22 20:12:18 2003 @@ -331,10 +331,17 @@ } } - // Loop over all of the basic blocks in the function, dropping references of - // the dead basic blocks + // We make changes if there are any dead blocks in the function... + if (unsigned NumDeadBlocks = Func->size() - AliveBlocks.size()) { + MadeChanges = true; + NumBlockRemoved += NumDeadBlocks; + } + + // Loop over all of the basic blocks in the function, removing control flow + // edges to live blocks (also eliminating any entries in PHI functions in + // referenced blocks). // - for (Function::iterator BB = Func->begin(), E = Func->end(); BB != E; ++BB) { + for (Function::iterator BB = Func->begin(), E = Func->end(); BB != E; ++BB) if (!AliveBlocks.count(BB)) { // Remove all outgoing edges from this basic block and convert the // terminator into a return instruction. @@ -354,12 +361,16 @@ BB->getInstList().push_back(new ReturnInst(RetTy != Type::VoidTy ? Constant::getNullValue(RetTy) : 0)); } + } + + // Loop over all of the basic blocks in the function, dropping references of + // the dead basic blocks. We must do this after the previous step to avoid + // dropping references to PHIs which still have entries... + // + for (Function::iterator BB = Func->begin(), E = Func->end(); BB != E; ++BB) + if (!AliveBlocks.count(BB)) BB->dropAllReferences(); - ++NumBlockRemoved; - MadeChanges = true; - } - } // Now loop through all of the blocks and delete the dead ones. We can safely // do this now because we know that there are no references to dead blocks From lattner at cs.uiuc.edu Wed Jan 22 20:39:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jan 22 20:39:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/LevelRaise/2003-01-22-GEPProblem.ll Message-ID: <200301230239.UAA11272@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/LevelRaise: 2003-01-22-GEPProblem.ll added (r1.1) --- Log message: ; Testcase reduced from 197.parser by bugpoint --- Diffs of the changes: From lattner at cs.uiuc.edu Wed Jan 22 20:40:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jan 22 20:40:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/TransformInternals.cpp Message-ID: <200301230239.UAA11290@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms: TransformInternals.cpp updated: 1.31 -> 1.32 --- Log message: Fix bug: LevelRaise/2003-01-22-GEPProblem.ll --- Diffs of the changes: Index: llvm/lib/Transforms/TransformInternals.cpp diff -u llvm/lib/Transforms/TransformInternals.cpp:1.31 llvm/lib/Transforms/TransformInternals.cpp:1.32 --- llvm/lib/Transforms/TransformInternals.cpp:1.31 Wed Oct 2 13:53:14 2002 +++ llvm/lib/Transforms/TransformInternals.cpp Wed Jan 22 20:39:10 2003 @@ -120,7 +120,7 @@ Offset -= ActualOffset; } else { const Type *ElTy = cast(CompTy)->getElementType(); - if (!ElTy->isSized()) + if (!ElTy->isSized() || (isa(CompTy) && !Indices.empty())) return 0; // Type is unreasonable... escape! unsigned ElSize = TD.getTypeSize(ElTy); int64_t ElSizeS = ElSize; From lattner at cs.uiuc.edu Wed Jan 22 20:49:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jan 22 20:49:01 2003 Subject: [llvm-commits] CVS: llvm/tools/bugpoint/BugDriver.h CrashDebugger.cpp ExtractFunction.cpp Message-ID: <200301230248.UAA11427@apoc.cs.uiuc.edu> Changes in directory llvm/tools/bugpoint: BugDriver.h updated: 1.2 -> 1.3 CrashDebugger.cpp updated: 1.2 -> 1.3 ExtractFunction.cpp updated: 1.1 -> 1.2 --- Log message: Make bugpoint *much* more powerful, giving it the capability to delete instructions out of a large function to reduce it. --- Diffs of the changes: Index: llvm/tools/bugpoint/BugDriver.h diff -u llvm/tools/bugpoint/BugDriver.h:1.2 llvm/tools/bugpoint/BugDriver.h:1.3 --- llvm/tools/bugpoint/BugDriver.h:1.2 Mon Dec 23 17:49:59 2002 +++ llvm/tools/bugpoint/BugDriver.h Wed Jan 22 20:48:33 2003 @@ -15,6 +15,7 @@ class Module; class Function; class AbstractInterpreter; +class Instruction; class BugDriver { const std::string ToolName; // Name of bugpoint @@ -116,6 +117,13 @@ /// copy, which it returns. /// Module *extractFunctionFromModule(Function *F) const; + + /// deleteInstructionFromProgram - This method clones the current Program and + /// deletes the specified instruction from the cloned module. It then runs a + /// series of cleanup passes (ADCE and SimplifyCFG) to eliminate any code + /// which depends on the value. The modified module is then returned. + /// + Module *deleteInstructionFromProgram(Instruction *I, unsigned Simp) const; /// initializeExecutionEnvironment - This method is used to set up the /// environment for executing LLVM programs. Index: llvm/tools/bugpoint/CrashDebugger.cpp diff -u llvm/tools/bugpoint/CrashDebugger.cpp:1.2 llvm/tools/bugpoint/CrashDebugger.cpp:1.3 --- llvm/tools/bugpoint/CrashDebugger.cpp:1.2 Mon Dec 23 17:49:59 2002 +++ llvm/tools/bugpoint/CrashDebugger.cpp Wed Jan 22 20:48:33 2003 @@ -114,18 +114,63 @@ delete Program; Program = M; } - } - if (CountFunctions(Program) > 1) { - std::cout << "\n*** Couldn't reduce testcase to one function.\n" - << " Attempting to remove individual functions.\n"; - std::cout << "XXX Individual function removal unimplemented!\n"; + if (CountFunctions(Program) > 1) { + std::cout << "\n*** Couldn't reduce testcase to one function.\n" + << " Attempting to remove individual functions.\n"; + std::cout << "XXX Individual function removal unimplemented!\n"; + } } - // Now that we have deleted the functions that are unneccesary for the - // program, try to remove instructions and basic blocks that are not neccesary - // to cause the crash. - // + // FIXME: This should attempt to delete entire basic blocks at a time to speed + // up convergence... + + unsigned Simplification = 4; + do { + --Simplification; + std::cout << "\n*** Attempting to reduce testcase by deleting instruc" + << "tions: Simplification Level #" << Simplification << "\n"; + + // Now that we have deleted the functions that are unneccesary for the + // program, try to remove instructions that are not neccesary to cause the + // crash. To do this, we loop through all of the instructions in the + // remaining functions, deleting them (replacing any values produced with + // nulls), and then running ADCE and SimplifyCFG. If the transformed input + // still triggers failure, keep deleting until we cannot trigger failure + // anymore. + // + TryAgain: + + // Loop over all of the (non-terminator) instructions remaining in the + // function, attempting to delete them. + for (Module::iterator FI = Program->begin(), E = Program->end(); + FI != E; ++FI) + if (!FI->isExternal()) { + for (Function::iterator BI = FI->begin(), E = FI->end(); BI != E; ++BI) + for (BasicBlock::iterator I = BI->begin(), E = --BI->end(); + I != E; ++I) { + Module *M = deleteInstructionFromProgram(I, Simplification); + + // Make the function the current program... + std::swap(Program, M); + + // Find out if the pass still crashes on this pass... + std::cout << "Checking instruction '" << I->getName() << "': "; + if (runPass(Pass)) { + // Yup, it does, we delete the old module, and continue trying to + // reduce the testcase... + EmitProgressBytecode(Pass, "reduced-" + I->getName()); + delete M; + goto TryAgain; // I wish I had a multi-level break here! + } + + // This pass didn't crash without this instruction, try the next + // one. + delete Program; + Program = M; + } + } + } while (Simplification); return false; } Index: llvm/tools/bugpoint/ExtractFunction.cpp diff -u llvm/tools/bugpoint/ExtractFunction.cpp:1.1 llvm/tools/bugpoint/ExtractFunction.cpp:1.2 --- llvm/tools/bugpoint/ExtractFunction.cpp:1.1 Wed Nov 20 16:28:10 2002 +++ llvm/tools/bugpoint/ExtractFunction.cpp Wed Jan 22 20:48:33 2003 @@ -9,7 +9,10 @@ #include "llvm/Module.h" #include "llvm/PassManager.h" #include "llvm/Transforms/IPO.h" +#include "llvm/Transforms/Scalar.h" #include "llvm/Transforms/Utils/Cloning.h" +#include "llvm/Type.h" +#include "llvm/Constant.h" /// extractFunctionFromModule - This method is used to extract the specified /// (non-external) function from the current program, slim down the module, and @@ -19,16 +22,62 @@ Module *Result = CloneModule(Program); // Translate from the old module to the new copied module... - F = Result->getFunction(F->getName(), F->getFunctionType()); + Module::iterator RFI = Result->begin(); // Get iterator to corresponding fn + std::advance(RFI, std::distance(Program->begin(), Module::iterator(F))); // In addition to just parsing the input from GCC, we also want to spiff it up // a little bit. Do this now. // PassManager Passes; - Passes.add(createFunctionExtractionPass(F)); // Extract the function + Passes.add(createFunctionExtractionPass(RFI)); // Extract the function Passes.add(createGlobalDCEPass()); // Delete unreachable globals Passes.add(createFunctionResolvingPass()); // Delete prototypes Passes.add(createDeadTypeEliminationPass()); // Remove dead types... + Passes.run(*Result); + return Result; +} + + +/// deleteInstructionFromProgram - This method clones the current Program and +/// deletes the specified instruction from the cloned module. It then runs a +/// series of cleanup passes (ADCE and SimplifyCFG) to eliminate any code which +/// depends on the value. The modified module is then returned. +/// +Module *BugDriver::deleteInstructionFromProgram(Instruction *I, + unsigned Simplification) const { + Module *Result = CloneModule(Program); + + BasicBlock *PBB = I->getParent(); + Function *PF = PBB->getParent(); + + Module::iterator RFI = Result->begin(); // Get iterator to corresponding fn + std::advance(RFI, std::distance(Program->begin(), Module::iterator(PF))); + + Function::iterator RBI = RFI->begin(); // Get iterator to corresponding BB + std::advance(RBI, std::distance(PF->begin(), Function::iterator(PBB))); + + BasicBlock::iterator RI = RBI->begin(); // Get iterator to corresponding inst + std::advance(RI, std::distance(PBB->begin(), BasicBlock::iterator(I))); + I = RI; // Got the corresponding instruction! + + // If this instruction produces a value, replace any users with null values + if (I->getType() != Type::VoidTy) + I->replaceAllUsesWith(Constant::getNullValue(I->getType())); + + // Remove the instruction from the program. + I->getParent()->getInstList().erase(I); + + // In addition to just parsing the input from GCC, we also want to spiff it up + // a little bit. Do this now. + // + PassManager Passes; + if (Simplification > 2) + Passes.add(createAggressiveDCEPass()); // Remove dead code... + //Passes.add(createInstructionCombiningPass()); + if (Simplification > 1) + Passes.add(createDeadCodeEliminationPass()); + if (Simplification) + Passes.add(createCFGSimplificationPass()); // Delete dead control flow Passes.run(*Result); return Result; } From lattner at cs.uiuc.edu Wed Jan 22 21:53:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jan 22 21:53:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/Makefile.programs Message-ID: <200301230352.VAA17449@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs: Makefile.programs updated: 1.33 -> 1.34 --- Log message: The bytecode repository should contain raw llvm files, not preoptimized llvm files --- Diffs of the changes: Index: llvm/test/Programs/Makefile.programs diff -u llvm/test/Programs/Makefile.programs:1.33 llvm/test/Programs/Makefile.programs:1.34 --- llvm/test/Programs/Makefile.programs:1.33 Tue Jan 21 15:31:59 2003 +++ llvm/test/Programs/Makefile.programs Wed Jan 22 21:52:00 2003 @@ -145,18 +145,19 @@ # Given a version of the entire program linked together into a single unit of # raw output from the C frontend, optimize it. +$(PROGRAMS_TO_TEST:%=Output/%.linked.bc): \ Output/%.linked.bc: Output/%.linked.rll $(LGCCAS) $(LGCCAS) $(STATS) $< -o $@ # Rule to produce final program bytecode file from linked, optimized, bytecode. -ifndef USE_PRECOMPILED_BYTECODE - # Link the program to the libraries it uses, then perform postlink # optimization... -Output/%.llvm Output/%.llvm.bc: Output/%.linked.bc +$(PROGRAMS_TO_TEST:%=Output/%.llvm.bc): \ +Output/%.llvm.bc: Output/%.linked.bc + $(LGCCLD) $(STATS) $< -lgcc -lc $(LIBS) -o Output/$*.llvm +$(PROGRAMS_TO_TEST:%=Output/%.llvm): \ +Output/%.llvm: Output/%.linked.bc $(LGCCLD) $(STATS) $< -lgcc -lc $(LIBS) -o Output/$*.llvm - -endif # # Rules to compile the program for the C Back End @@ -238,9 +239,9 @@ Output/%.out-nat: $(SRCDIR)/%.reference_output Output/.dir cp $< $@ -# To make a bytecode file up-to-date, just copy it over. -$(PROGRAMS_TO_TEST:%=Output/%.llvm.bc): \ -Output/%.llvm.bc: $(SRCDIR)/%.bc Output/.dir +# To make a raw bytecode file up-to-date, just copy it over. +$(PROGRAMS_TO_TEST:%=Output/%.linked.rll): \ +Output/%.linked.rll: $(SRCDIR)/%.linked.rll Output/.dir cp $< $@ endif From lattner at cs.uiuc.edu Wed Jan 22 21:53:04 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jan 22 21:53:04 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/MultiSource/Makefile.multisrc Message-ID: <200301230352.VAA17456@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs/MultiSource: Makefile.multisrc updated: 1.22 -> 1.23 --- Log message: The bytecode repository should contain raw llvm files, not preoptimized llvm files --- Diffs of the changes: Index: llvm/test/Programs/MultiSource/Makefile.multisrc diff -u llvm/test/Programs/MultiSource/Makefile.multisrc:1.22 llvm/test/Programs/MultiSource/Makefile.multisrc:1.23 --- llvm/test/Programs/MultiSource/Makefile.multisrc:1.22 Tue Jan 21 15:32:01 2003 +++ llvm/test/Programs/MultiSource/Makefile.multisrc Wed Jan 22 21:52:02 2003 @@ -41,11 +41,15 @@ $(LAS) -f $< -o $@ +ifndef USE_PRECOMPILED_BYTECODE + # Output/*.linked.ll is all of the bytecode files of the program linked together # without any libraries linked in... # Output/%.linked.rll: $(LObjects) $(LLINK) $(LOPT) $(LDIS) $(LLINK) -f $(LObjects) | $(LOPT) -funcresolve | $(LDIS) > $@ + +endif Output/%.native: $(NObjects) $(CC) -o $@ $(NObjects) $(LDFLAGS) $(CFLAGS) From lattner at cs.uiuc.edu Wed Jan 22 21:53:05 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jan 22 21:53:05 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/SingleSource/Makefile.singlesrc Message-ID: <200301230352.VAA17463@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs/SingleSource: Makefile.singlesrc updated: 1.15 -> 1.16 --- Log message: The bytecode repository should contain raw llvm files, not preoptimized llvm files --- Diffs of the changes: Index: llvm/test/Programs/SingleSource/Makefile.singlesrc diff -u llvm/test/Programs/SingleSource/Makefile.singlesrc:1.15 llvm/test/Programs/SingleSource/Makefile.singlesrc:1.16 --- llvm/test/Programs/SingleSource/Makefile.singlesrc:1.15 Tue Jan 21 15:32:03 2003 +++ llvm/test/Programs/SingleSource/Makefile.singlesrc Wed Jan 22 21:52:03 2003 @@ -21,8 +21,10 @@ include $(LEVEL)/test/Programs/Makefile.programs .PRECIOUS: Output/%.linked.rll +ifndef USE_PRECOMPILED_BYTECODE Output/%.linked.rll: Output/%.ll cp -f $< $@ +endif # FIXME: LIBS should be specified, not hardcoded to -lm Output/%.native: %.c Output/.dir From lattner at cs.uiuc.edu Thu Jan 23 10:34:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Jan 23 10:34:01 2003 Subject: [llvm-commits] CVS: llvm/Makefile.common Message-ID: <200301231633.KAA04648@apoc.cs.uiuc.edu> Changes in directory llvm: Makefile.common updated: 1.74 -> 1.75 --- Log message: Fix problem with flex scanners and huge token sizes --- Diffs of the changes: Index: llvm/Makefile.common diff -u llvm/Makefile.common:1.74 llvm/Makefile.common:1.75 --- llvm/Makefile.common:1.74 Wed Jan 22 10:13:31 2003 +++ llvm/Makefile.common Thu Jan 23 10:33:10 2003 @@ -467,8 +467,17 @@ # Create a .cpp source file from a flex input file... this uses sed to cut down # on the warnings emited by GCC... +# +# The last line is a gross hack to work around flex aparently not being able to +# resize the buffer on a large token input. Currently, for uninitialized string +# buffers in LLVM we can generate very long tokens, so this is a hack around it. +# FIXME. (f.e. char Buffer[10000]; ) +# %.cpp: %.l - flex -t $< | sed '/^find_rule/d' | sed 's/void yyunput/inline void yyunput/' | sed 's/void \*yy_flex_realloc/inline void *yy_flex_realloc/' > $@ + flex -t $< | sed '/^find_rule/d' | \ + sed 's/void yyunput/inline void yyunput/' | \ + sed 's/void \*yy_flex_realloc/inline void *yy_flex_realloc/' | \ + sed 's/#define YY_BUF_SIZE 16384/#define YY_BUF_SIZE (16384*64)/' > $@ # Rule for building the bison parsers... From lattner at cs.uiuc.edu Thu Jan 23 10:52:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Jan 23 10:52:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/LLC/Makefile Message-ID: <200301231651.KAA15065@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/LLC: Makefile updated: 1.4 -> 1.5 --- Log message: * Only run LLVM tests so that testing is not stopped. * This directory should only contain LLVM tests anyway --- Diffs of the changes: Index: llvm/test/Regression/LLC/Makefile diff -u llvm/test/Regression/LLC/Makefile:1.4 llvm/test/Regression/LLC/Makefile:1.5 --- llvm/test/Regression/LLC/Makefile:1.4 Mon Sep 23 09:23:15 2002 +++ llvm/test/Regression/LLC/Makefile Thu Jan 23 10:51:24 2003 @@ -3,7 +3,7 @@ # This directory contains regression tests for the LLVM sparc backend. # LEVEL = ../../.. -include $(LEVEL)/test/Programs/SingleSource/Makefile.singlesrc +include $(LEVEL)/test/Makefile.tests # Only .ll tests here. C tests are run via Makefile.singlesrc above. # From lattner at cs.uiuc.edu Thu Jan 23 10:52:03 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Jan 23 10:52:03 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/CBackend/Makefile Message-ID: <200301231651.KAA15199@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/CBackend: Makefile updated: 1.5 -> 1.6 --- Log message: Dont' stop the build --- Diffs of the changes: Index: llvm/test/Regression/CBackend/Makefile diff -u llvm/test/Regression/CBackend/Makefile:1.5 llvm/test/Regression/CBackend/Makefile:1.6 --- llvm/test/Regression/CBackend/Makefile:1.5 Thu Oct 31 12:23:09 2002 +++ llvm/test/Regression/CBackend/Makefile Thu Jan 23 10:51:47 2003 @@ -15,9 +15,9 @@ Output/%.to: Output/%.c - $(CC) -c $< -o $@ #|| \ + $(CC) -c $< -o $@ || \ (rm -f $@; $(FAILURE) $@ ) Output/%.c: %.ll Output/.dir $(LAS) $(LDIS) - $(LAS) < $< | $(LDIS) -c > $@ #|| \ + $(LAS) < $< | $(LDIS) -c > $@ || \ (rm -f $@; $(FAILURE) $@ ) From lattner at cs.uiuc.edu Thu Jan 23 10:53:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Jan 23 10:53:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Assembler/2002-07-08-HugePerformanceProblem.llx Message-ID: <200301231652.KAA15210@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Assembler: 2002-07-08-HugePerformanceProblem.llx updated: 1.1 -> 1.2 --- Log message: Limit the amount of time the test will run --- Diffs of the changes: Index: llvm/test/Regression/Assembler/2002-07-08-HugePerformanceProblem.llx diff -u llvm/test/Regression/Assembler/2002-07-08-HugePerformanceProblem.llx:1.1 llvm/test/Regression/Assembler/2002-07-08-HugePerformanceProblem.llx:1.2 --- llvm/test/Regression/Assembler/2002-07-08-HugePerformanceProblem.llx:1.1 Tue Jul 9 14:58:06 2002 +++ llvm/test/Regression/Assembler/2002-07-08-HugePerformanceProblem.llx Thu Jan 23 10:52:04 2003 @@ -1,6 +1,8 @@ ; This file takes about 48 __MINUTES__ to assemble using as. This is WAY too ; long. The type resolution code needs to be sped up a lot. +; RUN: ulimit -t 20; as < %s + %ALL_INTERSECTIONS_METHOD = type int (%OBJECT*, %RAY*, %ISTACK*)* %BBOX = type { %BBOX_VECT, %BBOX_VECT } %BBOX_TREE = type { short, short, %BBOX, %BBOX_TREE** } From lattner at cs.uiuc.edu Thu Jan 23 13:32:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Jan 23 13:32:01 2003 Subject: [llvm-commits] CVS: llvm/utils/NightlyTest.pl Message-ID: <200301231931.NAA17391@apoc.cs.uiuc.edu> Changes in directory llvm/utils: NightlyTest.pl updated: 1.5 -> 1.6 --- Log message: Compress large logs --- Diffs of the changes: Index: llvm/utils/NightlyTest.pl diff -u llvm/utils/NightlyTest.pl:1.5 llvm/utils/NightlyTest.pl:1.6 --- llvm/utils/NightlyTest.pl:1.5 Wed Jan 22 14:35:59 2003 +++ llvm/utils/NightlyTest.pl Thu Jan 23 13:31:28 2003 @@ -268,8 +268,12 @@ chdir "test/Programs" or die "Could not change into programs testdir!"; # Run the programs tests... creating a report.nightly.html file -system "gmake $MAKEOPTS report.nightly.html TEST=nightly " - . "> $Prefix-ProgramTest.txt 2>&1" if (!$NOTEST); +if (!$NOTEST) { + system "gmake $MAKEOPTS report.nightly.html TEST=nightly " + . "> $Prefix-ProgramTest.txt 2>&1"; +} else { + system "gunzip $Prefix-ProgramTest.txt.gz"; +} my $ProgramsTable = ReadFile "report.nightly.html"; @@ -278,6 +282,9 @@ # system "grep -E 'TEST-(PASS|FAIL)' < $Prefix-ProgramTest.txt " . "| sort --key=3 > $Prefix-Tests.txt"; + +# Compress the test output +system "gzip $Prefix-ProgramTest.txt"; my ($RTestsAdded, $RTestsRemoved) = DiffFiles "-Tests.txt"; From lattner at cs.uiuc.edu Thu Jan 23 13:52:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Jan 23 13:52:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/LiveVar/Makefile loops.ll loops.out phiuse.ll phiuse.out Message-ID: <200301231951.NAA17653@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/LiveVar: Makefile (r1.1) removed loops.ll (r1.1) removed loops.out (r1.1) removed phiuse.ll (r1.1) removed phiuse.out (r1.1) removed --- Log message: Remove testcases that never could have worked anyway (they print out pointer values) --- Diffs of the changes: From lattner at cs.uiuc.edu Thu Jan 23 13:53:00 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Jan 23 13:53:00 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Linker/2002-08-20-ConstantExpr.ll Message-ID: <200301231952.NAA17828@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Linker: 2002-08-20-ConstantExpr.ll updated: 1.1 -> 1.2 --- Log message: Fix broken testcase --- Diffs of the changes: Index: llvm/test/Regression/Linker/2002-08-20-ConstantExpr.ll diff -u llvm/test/Regression/Linker/2002-08-20-ConstantExpr.ll:1.1 llvm/test/Regression/Linker/2002-08-20-ConstantExpr.ll:1.2 --- llvm/test/Regression/Linker/2002-08-20-ConstantExpr.ll:1.1 Tue Aug 20 14:29:20 2002 +++ llvm/test/Regression/Linker/2002-08-20-ConstantExpr.ll Thu Jan 23 13:52:48 2003 @@ -5,5 +5,5 @@ ; RUN: link Output/%s.LinkTest.bc Output/%s.bc %work = global int 4 -%test = global int* getelementptr( int* %work, uint 1) +%test = global int* getelementptr( int* %work, long 1) From lattner at cs.uiuc.edu Thu Jan 23 13:55:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Jan 23 13:55:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Makefile Message-ID: <200301231954.NAA18329@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression: Makefile updated: 1.7 -> 1.8 --- Log message: Add linker tests --- Diffs of the changes: Index: llvm/test/Regression/Makefile diff -u llvm/test/Regression/Makefile:1.7 llvm/test/Regression/Makefile:1.8 --- llvm/test/Regression/Makefile:1.7 Wed Nov 20 16:30:50 2002 +++ llvm/test/Regression/Makefile Thu Jan 23 13:54:40 2003 @@ -6,6 +6,7 @@ # for testing. Every time a bug is fixed, a testcase should be added to this # testsuite. # -LEVEL = ../.. -DIRS = Assembler BugPoint CFrontend CBackend LLC Other Transforms Verifier +LEVEL = ../.. +DIRS = Assembler BugPoint CBackend CFrontend Jello \ + LLC Linker Other Transforms Verifier include $(LEVEL)/Makefile.common From lattner at cs.uiuc.edu Thu Jan 23 15:18:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Jan 23 15:18:01 2003 Subject: [llvm-commits] CVS: llvm/www/docs/HistoricalNotes/2003-01-23-CygwinNotes.txt Message-ID: <200301232117.PAA21716@apoc.cs.uiuc.edu> Changes in directory llvm/www/docs/HistoricalNotes: 2003-01-23-CygwinNotes.txt added (r1.1) --- Log message: Add notes about LLVM and CygWin from Brian Gaeke --- Diffs of the changes: From lattner at cs.uiuc.edu Thu Jan 23 15:32:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Jan 23 15:32:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/Local.cpp Message-ID: <200301232131.PAA23605@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: Local.cpp updated: 1.40 -> 1.41 --- Log message: Slight efficiency improvement --- Diffs of the changes: Index: llvm/lib/Analysis/DataStructure/Local.cpp diff -u llvm/lib/Analysis/DataStructure/Local.cpp:1.40 llvm/lib/Analysis/DataStructure/Local.cpp:1.41 --- llvm/lib/Analysis/DataStructure/Local.cpp:1.40 Fri Dec 6 15:17:10 2002 +++ llvm/lib/Analysis/DataStructure/Local.cpp Thu Jan 23 15:31:16 2003 @@ -393,11 +393,8 @@ } void GraphBuilder::visitFreeInst(FreeInst &FI) { - DSNodeHandle Dest = getValueDest(*FI.getOperand(0)); - if (Dest.getNode() == 0) return; - // Mark that the node is written to... - Dest.getNode()->NodeType |= DSNode::Modified; + getValueDest(*FI.getOperand(0)).getNode()->NodeType |= DSNode::Modified; } /// Handle casts... From lattner at cs.uiuc.edu Thu Jan 23 16:06:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Jan 23 16:06:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp DataStructure.cpp Local.cpp Steensgaard.cpp TopDownClosure.cpp Message-ID: <200301232205.QAA27485@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: BottomUpClosure.cpp updated: 1.46 -> 1.47 DataStructure.cpp updated: 1.73 -> 1.74 Local.cpp updated: 1.41 -> 1.42 Steensgaard.cpp updated: 1.14 -> 1.15 TopDownClosure.cpp updated: 1.31 -> 1.32 --- Log message: * Eliminate boolean arguments in favor of using enums * T-D pass now eliminates unreachable globals --- Diffs of the changes: Index: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp diff -u llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.46 llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.47 --- llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.46 Wed Nov 27 11:41:13 2002 +++ llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp Thu Jan 23 16:05:33 2003 @@ -364,8 +364,8 @@ // Recompute the Incomplete markers. If there are any function calls left // now that are complete, we must loop! Graph.maskIncompleteMarkers(); - Graph.markIncompleteNodes(); - Graph.removeDeadNodes(); + Graph.markIncompleteNodes(DSGraph::MarkFormalArgs); + Graph.removeDeadNodes(DSGraph::KeepUnreachableGlobals); DEBUG(std::cerr << " [BU] Done inlining: " << F.getName() << " [" << Graph.getGraphSize() << "+" << Graph.getAuxFunctionCalls().size() @@ -440,8 +440,8 @@ // Recompute the Incomplete markers. If there are any function calls left // now that are complete, we must loop! Graph.maskIncompleteMarkers(); - Graph.markIncompleteNodes(); - Graph.removeDeadNodes(); + Graph.markIncompleteNodes(DSGraph::MarkFormalArgs); + Graph.removeDeadNodes(DSGraph::KeepUnreachableGlobals); DEBUG(std::cerr << " [BU] Done Non-SCC inlining: " << F.getName() << " [" << Graph.getGraphSize() << "+" << Graph.getAuxFunctionCalls().size() @@ -535,8 +535,8 @@ // Recompute the Incomplete markers. If there are any function calls left // now that are complete, we must loop! Graph.maskIncompleteMarkers(); - Graph.markIncompleteNodes(); - Graph.removeDeadNodes(); + Graph.markIncompleteNodes(DSGraph::MarkFormalArgs); + Graph.removeDeadNodes(DSGraph::KeepUnreachableGlobals); DEBUG(std::cerr << " [BU] Done inlining: " << F.getName() << " [" << Graph.getGraphSize() << "+" << Graph.getAuxFunctionCalls().size() Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.73 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.74 --- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.73 Wed Jan 22 16:00:24 2003 +++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Thu Jan 23 16:05:33 2003 @@ -785,9 +785,9 @@ // scope of current analysis may have modified it), the 'Incomplete' flag is // added to the NodeType. // -void DSGraph::markIncompleteNodes(bool markFormalArgs) { +void DSGraph::markIncompleteNodes(unsigned Flags) { // Mark any incoming arguments as incomplete... - if (markFormalArgs && Func) + if ((Flags & DSGraph::MarkFormalArgs) && Func) for (Function::aiterator I = Func->abegin(), E = Func->aend(); I != E; ++I) if (isPointerType(I->getType()) && ScalarMap.find(I) != ScalarMap.end()) markIncompleteNode(ScalarMap[I].getNode()); @@ -1010,7 +1010,7 @@ // from the caller's graph entirely. This is only appropriate to use when // inlining graphs. // -void DSGraph::removeDeadNodes() { +void DSGraph::removeDeadNodes(unsigned Flags) { // Reduce the amount of work we have to do... removeTriviallyDeadNodes(); @@ -1023,10 +1023,11 @@ // Mark all nodes reachable by (non-global) scalar nodes as alive... for (std::map::iterator I = ScalarMap.begin(), E = ScalarMap.end(); I != E; ++I) - // if (!isa(I->first)) // Don't mark globals! + if (!(Flags & DSGraph::RemoveUnreachableGlobals) || + !isa(I->first)) // Don't mark globals! markAlive(I->second.getNode(), Alive); - // else // Keep track of global nodes - // GlobalNodes.push_back(std::make_pair(I->first, I->second.getNode())); + else // Keep track of global nodes + GlobalNodes.push_back(std::make_pair(I->first, I->second.getNode())); // The return value is alive as well... markAlive(RetNode.getNode(), Alive); Index: llvm/lib/Analysis/DataStructure/Local.cpp diff -u llvm/lib/Analysis/DataStructure/Local.cpp:1.41 llvm/lib/Analysis/DataStructure/Local.cpp:1.42 --- llvm/lib/Analysis/DataStructure/Local.cpp:1.41 Thu Jan 23 15:31:16 2003 +++ llvm/lib/Analysis/DataStructure/Local.cpp Thu Jan 23 16:05:33 2003 @@ -136,10 +136,10 @@ #ifndef NDEBUG Timer::addPeakMemoryMeasurement(); #endif - markIncompleteNodes(); + markIncompleteNodes(DSGraph::MarkFormalArgs); // Remove any nodes made dead due to merging... - removeDeadNodes(); + removeDeadNodes(DSGraph::KeepUnreachableGlobals); } Index: llvm/lib/Analysis/DataStructure/Steensgaard.cpp diff -u llvm/lib/Analysis/DataStructure/Steensgaard.cpp:1.14 llvm/lib/Analysis/DataStructure/Steensgaard.cpp:1.15 --- llvm/lib/Analysis/DataStructure/Steensgaard.cpp:1.14 Wed Dec 11 23:34:10 2002 +++ llvm/lib/Analysis/DataStructure/Steensgaard.cpp Thu Jan 23 16:05:33 2003 @@ -196,10 +196,10 @@ // Update the "incomplete" markers on the nodes, ignoring unknownness due to // incoming arguments... ResultGraph->maskIncompleteMarkers(); - ResultGraph->markIncompleteNodes(false); + ResultGraph->markIncompleteNodes(DSGraph::IgnoreFormalArgs); // Remove any nodes that are dead after all of the merging we have done... - ResultGraph->removeDeadNodes(); + ResultGraph->removeDeadNodes(DSGraph::KeepUnreachableGlobals); DEBUG(print(std::cerr, &M)); return false; Index: llvm/lib/Analysis/DataStructure/TopDownClosure.cpp diff -u llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.31 llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.32 --- llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.31 Wed Nov 27 11:41:13 2002 +++ llvm/lib/Analysis/DataStructure/TopDownClosure.cpp Thu Jan 23 16:05:33 2003 @@ -186,9 +186,10 @@ // Recompute the Incomplete markers and eliminate unreachable nodes. CG.maskIncompleteMarkers(); - CG.markIncompleteNodes(/*markFormals*/ !F.hasInternalLinkage() + CG.markIncompleteNodes(F.hasInternalLinkage() ? DSGraph::IgnoreFormalArgs: + DSGraph::MarkFormalArgs /*&& FIXME: NEED TO CHECK IF ALL CALLERS FOUND!*/); - CG.removeDeadNodes(); + CG.removeDeadNodes(DSGraph::RemoveUnreachableGlobals); } DEBUG(std::cerr << " [TD] Done inlining into callees for: " << F.getName() From lattner at cs.uiuc.edu Thu Jan 23 16:07:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Jan 23 16:07:01 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/DSGraph.h Message-ID: <200301232206.QAA27510@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: DSGraph.h updated: 1.39 -> 1.40 --- Log message: * Eliminate boolean arguments in favor of using enums --- Diffs of the changes: Index: llvm/include/llvm/Analysis/DSGraph.h diff -u llvm/include/llvm/Analysis/DSGraph.h:1.39 llvm/include/llvm/Analysis/DSGraph.h:1.40 --- llvm/include/llvm/Analysis/DSGraph.h:1.39 Wed Nov 27 11:39:37 2002 +++ llvm/include/llvm/Analysis/DSGraph.h Thu Jan 23 16:06:22 2003 @@ -137,15 +137,20 @@ // the scope of current analysis may have modified it), the 'Incomplete' flag // is added to the NodeType. // - void markIncompleteNodes(bool markFormalArgs = true); + enum MarkIncompleteFlags { + MarkFormalArgs = 1, IgnoreFormalArgs = 0, + }; + void markIncompleteNodes(unsigned Flags); - // removeDeadNodes - Use a more powerful reachability analysis to eliminate - // subgraphs that are unreachable. This often occurs because the data - // structure doesn't "escape" into it's caller, and thus should be eliminated - // from the caller's graph entirely. This is only appropriate to use when - // inlining graphs. + // removeDeadNodes - Use a reachability analysis to eliminate subgraphs that + // are unreachable. This often occurs because the data structure doesn't + // "escape" into it's caller, and thus should be eliminated from the caller's + // graph entirely. This is only appropriate to use when inlining graphs. // - void removeDeadNodes(); + enum RemoveDeadNodesFlags { + RemoveUnreachableGlobals = 1, KeepUnreachableGlobals = 0, + }; + void removeDeadNodes(unsigned Flags); // CloneFlags enum - Bits that may be passed into the cloneInto method to // specify how to clone the function graph. From lattner at cs.uiuc.edu Thu Jan 23 16:07:04 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Jan 23 16:07:04 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/IPA/IPModRef.cpp Message-ID: <200301232206.QAA27519@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/IPA: IPModRef.cpp updated: 1.11 -> 1.12 --- Log message: * Eliminate boolean arguments in favor of using enums --- Diffs of the changes: Index: llvm/lib/Analysis/IPA/IPModRef.cpp diff -u llvm/lib/Analysis/IPA/IPModRef.cpp:1.11 llvm/lib/Analysis/IPA/IPModRef.cpp:1.12 --- llvm/lib/Analysis/IPA/IPModRef.cpp:1.11 Wed Nov 27 11:37:46 2002 +++ llvm/lib/Analysis/IPA/IPModRef.cpp Thu Jan 23 16:06:33 2003 @@ -175,7 +175,7 @@ assert(0 && "See error message"); // Remove dead nodes aggressively to match the caller's original graph. - Result->removeDeadNodes(); + Result->removeDeadNodes(DSGraph::KeepUnreachableGlobals); // Step #4: Return the clone + the mapping (by ref) return Result; @@ -393,7 +393,7 @@ // The memory for this graph clone will be freed by FunctionModRefInfo. DSGraph* funcTDGraph = new DSGraph(getAnalysis().getDSGraph(func)); - funcTDGraph->removeDeadNodes(); + funcTDGraph->removeDeadNodes(DSGraph::KeepUnreachableGlobals); funcInfo = new FunctionModRefInfo(func, *this, funcTDGraph); //auto-insert funcInfo->computeModRef(func); // computes the mod/ref info From lattner at cs.uiuc.edu Fri Jan 24 10:29:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Jan 24 10:29:01 2003 Subject: [llvm-commits] CVS: llvm/utils/NightlyTest.pl Message-ID: <200301241628.KAA20497@apoc.cs.uiuc.edu> Changes in directory llvm/utils: NightlyTest.pl updated: 1.6 -> 1.7 --- Log message: Make sure the files get sorted correctly --- Diffs of the changes: Index: llvm/utils/NightlyTest.pl diff -u llvm/utils/NightlyTest.pl:1.6 llvm/utils/NightlyTest.pl:1.7 --- llvm/utils/NightlyTest.pl:1.6 Thu Jan 23 13:31:28 2003 +++ llvm/utils/NightlyTest.pl Fri Jan 24 10:28:25 2003 @@ -281,7 +281,7 @@ # Create a list of the tests which were run... # system "grep -E 'TEST-(PASS|FAIL)' < $Prefix-ProgramTest.txt " - . "| sort --key=3 > $Prefix-Tests.txt"; + . "| sort > $Prefix-Tests.txt"; # Compress the test output system "gzip $Prefix-ProgramTest.txt"; From lattner at cs.uiuc.edu Fri Jan 24 14:14:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Jan 24 14:14:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/IPO/PoolAllocate.cpp Message-ID: <200301242013.OAA21142@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/IPO: PoolAllocate.cpp updated: 1.44 -> 1.45 --- Log message: Disable construction of pool allocator --- Diffs of the changes: Index: llvm/lib/Transforms/IPO/PoolAllocate.cpp diff -u llvm/lib/Transforms/IPO/PoolAllocate.cpp:1.44 llvm/lib/Transforms/IPO/PoolAllocate.cpp:1.45 --- llvm/lib/Transforms/IPO/PoolAllocate.cpp:1.44 Tue Nov 19 14:08:24 2002 +++ llvm/lib/Transforms/IPO/PoolAllocate.cpp Fri Jan 24 14:13:20 2003 @@ -6,9 +6,7 @@ // //===----------------------------------------------------------------------===// -#if 1 -#include "llvm/Pass.h" -#else +#if 0 #include "llvm/Transforms/IPO.h" #include "llvm/Transforms/Utils/Cloning.h" #include "llvm/Analysis/DataStructure.h" @@ -1749,7 +1747,6 @@ DS = 0; return false; } -#endif // createPoolAllocatePass - Global function to access the functionality of this // pass... @@ -1759,3 +1756,4 @@ return 0; //return new PoolAllocate(); } +#endif