From lattner at cs.uiuc.edu Mon Sep 15 00:06:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Sep 15 00:06:02 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Transforms/IPO.h Message-ID: <200309150505.AAA13775@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Transforms: IPO.h updated: 1.20 -> 1.21 --- Log message: Add prototype for the lowersetjmp pass --- Diffs of the changes: Index: llvm/include/llvm/Transforms/IPO.h diff -u llvm/include/llvm/Transforms/IPO.h:1.20 llvm/include/llvm/Transforms/IPO.h:1.21 --- llvm/include/llvm/Transforms/IPO.h:1.20 Sun Aug 31 22:14:00 2003 +++ llvm/include/llvm/Transforms/IPO.h Mon Sep 15 00:05:23 2003 @@ -12,6 +12,13 @@ class Function; //===----------------------------------------------------------------------===// +// createLowerSetJmpPass - This function lowers the setjmp/longjmp intrinsics to +// invoke/unwind instructions. This should really be part of the C/C++ +// front-end, but it's so much easier to write transformations in LLVM proper. +// +Pass* createLowerSetJmpPass(); + +//===----------------------------------------------------------------------===// // createConstantMergePass - This function returns a new pass that merges // duplicate global constants together into a single constant that is shared. // This is useful because some passes (ie TraceValues) insert a lot of string From gaeke at cs.uiuc.edu Mon Sep 15 00:28:02 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Mon Sep 15 00:28:02 2003 Subject: [llvm-commits] CVS: reopt/tools/Makefile Message-ID: <200309150527.AAA24583@zion.cs.uiuc.edu> Changes in directory reopt/tools: Makefile updated: 1.1 -> 1.2 --- Log message: mkexcl can currently only be linked on Sparc. --- Diffs of the changes: Index: reopt/tools/Makefile diff -u reopt/tools/Makefile:1.1 reopt/tools/Makefile:1.2 --- reopt/tools/Makefile:1.1 Thu Aug 21 14:41:00 2003 +++ reopt/tools/Makefile Mon Sep 15 00:27:32 2003 @@ -1,6 +1,9 @@ LEVEL := .. -PARALLEL_DIRS := mkexcl +DIRS := +ifeq ($(ARCH),Sparc) +DIRS := $(DIRS) mkexcl +endif include $(LEVEL)/Makefile.common From gaeke at cs.uiuc.edu Mon Sep 15 00:29:01 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Mon Sep 15 00:29:01 2003 Subject: [llvm-commits] CVS: reopt/include/reopt/Inst/ElfReader.h Message-ID: <200309150528.AAA24599@zion.cs.uiuc.edu> Changes in directory reopt/include/reopt/Inst: ElfReader.h updated: 1.8 -> 1.9 --- Log message: Include Support/DataTypes.h for uint64_t --- Diffs of the changes: Index: reopt/include/reopt/Inst/ElfReader.h diff -u reopt/include/reopt/Inst/ElfReader.h:1.8 reopt/include/reopt/Inst/ElfReader.h:1.9 --- reopt/include/reopt/Inst/ElfReader.h:1.8 Sun May 4 15:05:45 2003 +++ reopt/include/reopt/Inst/ElfReader.h Mon Sep 15 00:28:00 2003 @@ -10,6 +10,7 @@ #ifndef _INCLUDED_ELFREADER_H #define _INCLUDED_ELFREADER_H +#include "Support/DataTypes.h" #include class ElfReader From gaeke at cs.uiuc.edu Mon Sep 15 00:29:03 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Mon Sep 15 00:29:03 2003 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.h Message-ID: <200309150528.AAA24617@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/RegAlloc: LiveRangeInfo.h updated: 1.18 -> 1.19 --- Log message: Fix typos in comments. --- Diffs of the changes: Index: llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.h diff -u llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.h:1.18 llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.h:1.19 --- llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.h:1.18 Tue Jul 29 14:38:22 2003 +++ llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.h Mon Sep 15 00:28:42 2003 @@ -1,7 +1,7 @@ //===-- LiveRangeInfo.h - Track all LiveRanges for a Function ----*- C++ -*-==// // // This file contains the class LiveRangeInfo which constructs and keeps -// the LiveRangMap which contains all the live ranges used in a method. +// the LiveRangeMap which contains all the live ranges used in a method. // // Assumptions: // @@ -36,7 +36,7 @@ //---------------------------------------------------------------------------- // Class LiveRangeInfo // -// Constructs and keeps the LiveRangMap which contains all the live +// Constructs and keeps the LiveRangeMap which contains all the live // ranges used in a method. Also contain methods to coalesce live ranges. //---------------------------------------------------------------------------- From lattner at cs.uiuc.edu Mon Sep 15 00:44:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Sep 15 00:44:02 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/IPO/LowerSetJmp.cpp Message-ID: <200309150543.AAA14348@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/IPO: LowerSetJmp.cpp updated: 1.1 -> 1.2 --- Log message: Minor cleanups, give credit, remove code that should not be necessary, and was a "major hack" :) --- Diffs of the changes: Index: llvm/lib/Transforms/IPO/LowerSetJmp.cpp diff -u llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.1 llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.2 --- llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.1 Sun Sep 14 23:56:27 2003 +++ llvm/lib/Transforms/IPO/LowerSetJmp.cpp Mon Sep 15 00:43:05 2003 @@ -1,7 +1,7 @@ //===- LowerSetJmp.cpp - Code pertaining to lowering set/long jumps -------===// // // This file implements the lowering of setjmp and longjmp to use the -// LLVM invoke instruction as necessary. +// LLVM invoke and unwind instructions as necessary. // // Lowering of longjmp is fairly trivial. We replace the call with a // call to the LLVM library function "__llvm_sjljeh_throw_longjmp()". @@ -17,6 +17,8 @@ // original except block being executed if it isn't a longjmp except // that is handled by that function. // +// This pass was contributed to LLVM by Bill Wendling. +// //===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===// @@ -218,10 +220,8 @@ { std::string SJLJEh("__llvm_sjljeh"); - if (Name.size() > SJLJEh.size()) { - std::string N(Name.begin(), Name.begin() + SJLJEh.size()); - return N != SJLJEh; - } + if (Name.size() > SJLJEh.size()) + return std::string(Name.begin(), Name.begin() + SJLJEh.size()) != SJLJEh; return true; } @@ -353,29 +353,6 @@ ConstantUInt::get(Type::UIntTy, SetJmpIDMap[Func]++), 0), "", Inst); - - // FIXME: This is a nasty piece of code. We want the jump buffer to - // dominate all uses. However, we're doing unnatural things to the CFG - // which cause this dominance to be lost. The only way to guarantee we - // get it back is to place where the jump buffer is being allocated - // into the entry block. That's what this code does. The alloca for the - // jump buffer is followed by a getelementptr call. - if (GetElementPtrInst* GEP = dyn_cast(Inst->getOperand(1))) - if (GEP->use_size() > 1) { - if (AllocaInst* AI = dyn_cast(GEP->getPointerOperand())) { - BasicBlock& Entry = Func->getEntryNode(); - BasicBlock::InstListType& EntryIL = Entry.getInstList(); - - Instruction* NewAI = AI->clone(); - Instruction* NewGEP = GEP->clone(); - NewAI->setName(AI->getName()); - NewGEP->setName(GEP->getName()); - EntryIL.push_front(NewGEP); - EntryIL.push_front(NewAI); - GEP->replaceAllUsesWith(NewGEP); - AI->replaceAllUsesWith(NewAI); - } - } // Change the setjmp call into a branch statement. We'll remove the // setjmp call in a little bit. No worries. From vadve at cs.uiuc.edu Mon Sep 15 06:19:03 2003 From: vadve at cs.uiuc.edu (Vikram Adve) Date: Mon Sep 15 06:19:03 2003 Subject: [llvm-commits] CVS: llvm/utils/makellvm Message-ID: <200309151118.GAA09034@psmith.cs.uiuc.edu> Changes in directory llvm/utils: makellvm updated: 1.8 -> 1.9 --- Log message: Really use a search path as described in the log message for the last version (instead of 2 fixed choices). --- Diffs of the changes: Index: llvm/utils/makellvm diff -u llvm/utils/makellvm:1.8 llvm/utils/makellvm:1.9 --- llvm/utils/makellvm:1.8 Sun Sep 14 18:44:31 2003 +++ llvm/utils/makellvm Mon Sep 15 06:18:36 2003 @@ -8,6 +8,11 @@ set GMAKE_OPTS = "" set DEBUG = 0 +## Search path for automatically finding the obj-root to use. +## Note: The src root directory ${LLVMDIR} will be prepended to this path later. +## +set OBJROOTDIRLIST = ( "/localhome/$USER/llvm" ) + set doit = 1 unset options_done while ( !( $?options_done ) && ($#argv > 0)) @@ -20,7 +25,12 @@ case -n : set doit = 0; shift argv; breaksw case -obj : - set OBJROOT = $argv[1]; shift argv; shift argv; breaksw + set OBJROOT = $argv[2]; shift argv; shift argv + if (! -d "$OBJROOT") then + echo "FATAL: Illegal obj-root directory ${OBJROOT}" + exit 1 + endif + breaksw case -d : set doit = 0; set DEBUG = 1; shift argv; breaksw case -* : @@ -79,22 +89,41 @@ exit 1 endif +## Try to determine the obj-root directory automatically if not specified +## +set OBJROOTDIRLIST = ( ${LLVMDIR} $OBJROOTDIRLIST ) ## add src dir if ($?OBJROOT == 0) then - ## Check if source root is obj-root by looking for Makefile.config there - if (-f ${LLVMDIR}/Makefile.config) then - set OBJROOT = ${LLVMDIR} - set BUILDROOT = . - else ## Otherwise assume a default location for OBJROOT - set OBJROOT = "/localhome/$USER/llvm" - set SRCROOT = `sh -c "cd $LLVMDIR; pwd | sed 's/\//\\\//g'"` - set CURSRCDIR = `echo $cwd | sed -e "s/${SRCROOT}//"` - set BUILDROOT = ${OBJROOT}/${CURSRCDIR} - unset SRCROOT CURSRCDIR + ## Try to determine object root directory by looking for Makefile.config + foreach objdir ( $OBJROOTDIRLIST ) + if (-f "${objdir}/Makefile.config") then + set OBJROOT = ${objdir} + break + endif + end + if ($?OBJROOT == 0) then + echo "FATAL: Could not choose an obj-root directory from these choices:" + echo " ${OBJROOTDIRLIST}." + echo " You can specify it explicitly using '-obj obj-root'." + exit 1 endif echo "Using OBJ-ROOT = ${OBJROOT} (specify '-obj obj-root' to override)." endif +if (${OBJROOT} == ${LLVMDIR}) then + # run make in the source directory itself + set BUILDROOT = . +else + # run make in the in the obj-root tree, in the directory for $cwd + set SRCROOT = `sh -c "cd $LLVMDIR; pwd | sed 's/\//\\\//g'"` + set CURSRCDIR = `echo $cwd | sed -e "s/${SRCROOT}//"` + set BUILDROOT = ${OBJROOT}/${CURSRCDIR} + unset SRCROOT CURSRCDIR +endif if ($DEBUG) then echo "DEBUG: BUILDROOT = $BUILDROOT" +endif +if (! -d $BUILDROOT) then + echo "FATAL: Invalid build directory: ${BUILDROOT}" + exit 1 endif cd $BUILDROOT From criswell at cs.uiuc.edu Mon Sep 15 09:26:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 09:26:01 2003 Subject: [llvm-commits] CVS: llvm/configure Message-ID: <200309151425.JAA04698@choi.cs.uiuc.edu> Changes in directory llvm: configure updated: 1.22 -> 1.23 --- Log message: Re-generated for recent changes. --- Diffs of the changes: Index: llvm/configure diff -u llvm/configure:1.22 llvm/configure:1.23 --- llvm/configure:1.22 Fri Sep 12 22:29:53 2003 +++ llvm/configure Mon Sep 15 09:25:08 2003 @@ -3464,6 +3464,11 @@ { (exit 1); exit 1; }; } fi +cat >>confdefs.h <<\_ACEOF +#define CC "$CC" +_ACEOF + + echo "$as_me:$LINENO: checking for GNU make" >&5 echo $ECHO_N "checking for GNU make... $ECHO_C" >&6 if test "${_cv_gnu_make_command+set}" = set; then @@ -4386,7 +4391,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 4386 "configure"' > conftest.$ac_ext + echo '#line 4394 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5227,7 +5232,7 @@ # Provide some information about the compiler. -echo "$as_me:5227:" \ +echo "$as_me:5235:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -6236,11 +6241,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6236: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6244: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6240: \$? = $ac_status" >&5 + echo "$as_me:6248: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6468,11 +6473,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6468: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6476: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6472: \$? = $ac_status" >&5 + echo "$as_me:6480: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6535,11 +6540,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6535: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6543: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:6539: \$? = $ac_status" >&5 + echo "$as_me:6547: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8547,7 +8552,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:10789: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:10785: \$? = $ac_status" >&5 + echo "$as_me:10793: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -10848,11 +10853,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:10848: $lt_compile\"" >&5) + (eval echo "\"\$as_me:10856: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:10852: \$? = $ac_status" >&5 + echo "$as_me:10860: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12091,7 +12096,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:13019: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13015: \$? = $ac_status" >&5 + echo "$as_me:13023: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -13078,11 +13083,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13078: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13086: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13082: \$? = $ac_status" >&5 + echo "$as_me:13090: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15022,11 +15027,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15022: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15030: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15026: \$? = $ac_status" >&5 + echo "$as_me:15034: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -15254,11 +15259,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15254: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15262: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15258: \$? = $ac_status" >&5 + echo "$as_me:15266: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -15321,11 +15326,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15321: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15329: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15325: \$? = $ac_status" >&5 + echo "$as_me:15333: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17333,7 +17338,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext < Changes in directory llvm/tools/as: Makefile (r1.10) removed as.cpp (r1.20) removed --- Log message: `as' is no longer an LLVM tool. --- Diffs of the changes: From brukman at cs.uiuc.edu Mon Sep 15 09:45:04 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Sep 15 09:45:04 2003 Subject: [llvm-commits] CVS: llvm/tools/dis/Makefile dis.cpp Message-ID: <200309151444.JAA25343@zion.cs.uiuc.edu> Changes in directory llvm/tools/dis: Makefile (r1.10) removed dis.cpp (r1.31) removed --- Log message: `dis' is no longer an LLVM tool. --- Diffs of the changes: From brukman at cs.uiuc.edu Mon Sep 15 09:46:02 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Sep 15 09:46:02 2003 Subject: [llvm-commits] CVS: llvm/tools/Makefile Message-ID: <200309151445.JAA25354@zion.cs.uiuc.edu> Changes in directory llvm/tools: Makefile updated: 1.21 -> 1.22 --- Log message: Stop building `as' and `dis' as they have been removed. --- Diffs of the changes: Index: llvm/tools/Makefile diff -u llvm/tools/Makefile:1.21 llvm/tools/Makefile:1.22 --- llvm/tools/Makefile:1.21 Fri Sep 12 22:23:46 2003 +++ llvm/tools/Makefile Mon Sep 15 09:45:00 2003 @@ -1,5 +1,5 @@ LEVEL := .. -PARALLEL_DIRS := as llvm-as dis llvm-dis opt gccas llc link lli gccld \ +PARALLEL_DIRS := llvm-as llvm-dis opt gccas llc link lli gccld \ analyze extract bugpoint llvm-ar include $(LEVEL)/Makefile.common From lattner at cs.uiuc.edu Mon Sep 15 10:07:04 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Sep 15 10:07:04 2003 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/crtend/exported_symbol_list.lst Makefile Message-ID: <200309151506.KAA18164@apoc.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/crtend: exported_symbol_list.lst added (r1.1) Makefile updated: 1.3 -> 1.4 --- Log message: Move the exception handling runtime stuff into this directory --- Diffs of the changes: Index: llvm/runtime/GCCLibraries/crtend/exported_symbol_list.lst diff -c /dev/null llvm/runtime/GCCLibraries/crtend/exported_symbol_list.lst:1.1 *** /dev/null Mon Sep 15 10:06:49 2003 --- llvm/runtime/GCCLibraries/crtend/exported_symbol_list.lst Mon Sep 15 10:06:39 2003 *************** *** 0 **** --- 1,29 ---- + __main + llvm.global_ctors + llvm.global_dtors + + __llvm_eh_has_uncaught_exception + __llvm_eh_current_uncaught_exception_type + __llvm_eh_add_uncaught_exception + __llvm_eh_get_uncaught_exception + __llvm_eh_pop_from_uncaught_stack + + __llvm_cxxeh_allocate_exception + __llvm_cxxeh_free_exception + __llvm_cxxeh_throw + __llvm_cxxeh_call_terminate + __llvm_cxxeh_current_uncaught_exception_isa + __llvm_cxxeh_begin_catch + __llvm_cxxeh_begin_catch_if_isa + __llvm_cxxeh_end_catch + __llvm_cxxeh_rethrow + __llvm_cxxeh_get_last_caught + __llvm_cxxeh_check_eh_spec + + __llvm_sjljeh_throw_longjmp + __llvm_sjljeh_init_setjmpmap + __llvm_sjljeh_destroy_setjmpmap + __llvm_sjljeh_add_setjmp_to_map + __llvm_sjljeh_is_longjmp_exception + __llvm_sjljeh_get_longjmp_value + __llvm_sjljeh_try_catching_longjmp_exception Index: llvm/runtime/GCCLibraries/crtend/Makefile diff -u llvm/runtime/GCCLibraries/crtend/Makefile:1.3 llvm/runtime/GCCLibraries/crtend/Makefile:1.4 --- llvm/runtime/GCCLibraries/crtend/Makefile:1.3 Thu Aug 14 21:20:03 2003 +++ llvm/runtime/GCCLibraries/crtend/Makefile Mon Sep 15 10:06:39 2003 @@ -3,9 +3,9 @@ DONT_BUILD_RELINKED=1 LIBRARYNAME=crtend -Source = crtend.c listend.ll +Source = $(wildcard *.cpp) $(wildcard *.c) listend.ll -EXPORTED_SYMBOL_LIST = __main,llvm.global_ctors,llvm.global_dtors +EXPORTED_SYMBOL_FILE = exported_symbol_list.lst include $(LEVEL)/Makefile.common @@ -14,4 +14,5 @@ @cp $< $@ install:: $(LLVMGCCDIR)/bytecode-libs/crtend.o - @rm $(LLVMGCCDIR)/bytecode-libs/libcrtend.bc \ No newline at end of file + @rm $(LLVMGCCDIR)/bytecode-libs/libcrtend.bc + From lattner at cs.uiuc.edu Mon Sep 15 10:08:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Sep 15 10:08:01 2003 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200309151507.KAA18175@apoc.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.138 -> 1.139 --- Log message: Allow specifying a file with symbols to export --- Diffs of the changes: Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.138 llvm/Makefile.rules:1.139 --- llvm/Makefile.rules:1.138 Sun Sep 14 20:12:04 2003 +++ llvm/Makefile.rules Mon Sep 15 10:06:54 2003 @@ -469,7 +469,11 @@ ifdef EXPORTED_SYMBOL_LIST LinkBCLib += -Xlinker -internalize-public-api-list=$(EXPORTED_SYMBOL_LIST) else + ifdef EXPORTED_SYMBOL_FILE +LinkBCLib += -Xlinker -internalize-public-api-file=$(EXPORTED_SYMBOL_FILE) + else LinkBCLib += -Xlinker -disable-internalize + endif endif From lattner at cs.uiuc.edu Mon Sep 15 10:08:04 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Sep 15 10:08:04 2003 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/libexception/C++-Exception.cpp C++-Exception.h Exception.cpp Exception.h SJLJ-Exception.cpp SJLJ-Exception.h Message-ID: <200309151507.KAA18189@apoc.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/libexception: C++-Exception.cpp (r1.8) removed C++-Exception.h (r1.8) removed Exception.cpp (r1.1) removed Exception.h (r1.7) removed SJLJ-Exception.cpp (r1.2) removed SJLJ-Exception.h (r1.3) removed --- Log message: Remove dead library, it is now folded into crtend --- Diffs of the changes: From lattner at cs.uiuc.edu Mon Sep 15 10:08:05 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Sep 15 10:08:05 2003 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/libexception/Makefile Message-ID: <200309151507.KAA18201@apoc.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/libexception: Makefile (r1.2) removed --- Log message: Whoops, remove makefile too --- Diffs of the changes: From lattner at cs.uiuc.edu Mon Sep 15 10:12:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Sep 15 10:12:02 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/SingleSource/UnitTests/SetjmpLongjmp/Makefile Message-ID: <200309151511.KAA19376@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs/SingleSource/UnitTests/SetjmpLongjmp: Makefile updated: 1.2 -> 1.3 --- Log message: libexception no longer exists --- Diffs of the changes: Index: llvm/test/Programs/SingleSource/UnitTests/SetjmpLongjmp/Makefile diff -u llvm/test/Programs/SingleSource/UnitTests/SetjmpLongjmp/Makefile:1.2 llvm/test/Programs/SingleSource/UnitTests/SetjmpLongjmp/Makefile:1.3 --- llvm/test/Programs/SingleSource/UnitTests/SetjmpLongjmp/Makefile:1.2 Thu Sep 11 14:29:03 2003 +++ llvm/test/Programs/SingleSource/UnitTests/SetjmpLongjmp/Makefile Mon Sep 15 10:11:46 2003 @@ -1,7 +1,6 @@ # Programs/SingleSource/UnitTests/SetjmpLongjmp/Makefile LEVEL = ../../../../.. -LIBS += -lexception include $(LEVEL)/test/Programs/SingleSource/Makefile.singlesrc From lattner at cs.uiuc.edu Mon Sep 15 10:21:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Sep 15 10:21:02 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/SingleSource/CustomChecked/Makefile Message-ID: <200309151520.KAA32751@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs/SingleSource/CustomChecked: Makefile updated: 1.6 -> 1.7 --- Log message: libexception no longer exists --- Diffs of the changes: Index: llvm/test/Programs/SingleSource/CustomChecked/Makefile diff -u llvm/test/Programs/SingleSource/CustomChecked/Makefile:1.6 llvm/test/Programs/SingleSource/CustomChecked/Makefile:1.7 --- llvm/test/Programs/SingleSource/CustomChecked/Makefile:1.6 Tue Sep 9 15:57:02 2003 +++ llvm/test/Programs/SingleSource/CustomChecked/Makefile Mon Sep 15 10:20:29 2003 @@ -6,7 +6,7 @@ include $(LEVEL)/test/Programs/SingleSource/Makefile.singlesrc -LIBS += -lsupc++ -lexception +LIBS += -lsupc++ LLI_RUN := $(addsuffix .run-lli, $(PREFIXED_PROGRAMS_TO_TEST)) JIT_RUN := $(addsuffix .run-jit, $(PREFIXED_PROGRAMS_TO_TEST)) From lattner at cs.uiuc.edu Mon Sep 15 10:30:03 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Sep 15 10:30:03 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/ADCE/2003-09-15-InfLoopCrash.ll Message-ID: <200309151529.KAA02496@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/ADCE: 2003-09-15-InfLoopCrash.ll added (r1.1) --- Log message: new testcase that crashes opt --- Diffs of the changes: Index: llvm/test/Regression/Transforms/ADCE/2003-09-15-InfLoopCrash.ll diff -c /dev/null llvm/test/Regression/Transforms/ADCE/2003-09-15-InfLoopCrash.ll:1.1 *** /dev/null Mon Sep 15 10:29:21 2003 --- llvm/test/Regression/Transforms/ADCE/2003-09-15-InfLoopCrash.ll Mon Sep 15 10:29:11 2003 *************** *** 0 **** --- 1,8 ---- + ; RUN: llvm-as < %s | opt -adce -disable-output + + int %main() { + br label %loop + + loop: + br label %loop + } From lattner at cs.uiuc.edu Mon Sep 15 10:48:03 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Sep 15 10:48:03 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/PostDominators.h Message-ID: <200309151547.KAA04390@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: PostDominators.h updated: 1.2 -> 1.3 --- Log message: Do not segfault when the post-dominator tree is empty (ie, there are no return or unwind instructions in the function) --- Diffs of the changes: Index: llvm/include/llvm/Analysis/PostDominators.h diff -u llvm/include/llvm/Analysis/PostDominators.h:1.2 llvm/include/llvm/Analysis/PostDominators.h:1.3 --- llvm/include/llvm/Analysis/PostDominators.h:1.2 Wed Sep 10 15:36:51 2003 +++ llvm/include/llvm/Analysis/PostDominators.h Mon Sep 15 10:47:40 2003 @@ -88,7 +88,8 @@ Frontiers.clear(); PostDominatorTree &DT = getAnalysis(); Roots = DT.getRoots(); - calculate(DT, DT.getRootNode()); + if (const DominatorTree::Node *Root = DT.getRootNode()) + calculate(DT, Root); return false; } From lattner at cs.uiuc.edu Mon Sep 15 11:48:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Sep 15 11:48:01 2003 Subject: [llvm-commits] CVS: llvm/lib/CWriter/Writer.cpp Message-ID: <200309151647.LAA10952@apoc.cs.uiuc.edu> Changes in directory llvm/lib/CWriter: Writer.cpp updated: 1.125 -> 1.126 --- Log message: Fix problems with programs that prototype printf to something unusual --- Diffs of the changes: Index: llvm/lib/CWriter/Writer.cpp diff -u llvm/lib/CWriter/Writer.cpp:1.125 llvm/lib/CWriter/Writer.cpp:1.126 --- llvm/lib/CWriter/Writer.cpp:1.125 Thu Sep 11 17:33:18 2003 +++ llvm/lib/CWriter/Writer.cpp Mon Sep 15 11:47:12 2003 @@ -987,8 +987,10 @@ // instruction is found. In this context, we code generated the invoke // instruction to add an entry to the top of the jmpbuf_list. Thus, here we // just have to longjmp to the specified handler. - Out << " if (__llvm_jmpbuf_list == 0) { /* llvm.unwind */\n" - << " printf(\"throw found with no handler!\\n\"); abort();\n" + Out << " if (__llvm_jmpbuf_list == 0) { /* unwind */\n" + << " extern write();\n" + << " ((void (*)(int, void*, unsigned))write)(2,\n" + << " \"throw found with no handler!\\n\", 31); abort();\n" << " }\n" << " longjmp(__llvm_jmpbuf_list->buf, 1);\n"; emittedInvoke = true; From criswell at cs.uiuc.edu Mon Sep 15 12:05:02 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 12:05:02 2003 Subject: [llvm-commits] CVS: llvm/configure Message-ID: <200309151704.MAA13945@choi.cs.uiuc.edu> Changes in directory llvm: configure updated: 1.23 -> 1.24 --- Log message: Added code that verifies that the source directory has not been configured already. This should help prevent strange errors from happening, but will make re-configuring the source directory more difficult when it is shared with the object directory. --- Diffs of the changes: Index: llvm/configure diff -u llvm/configure:1.23 llvm/configure:1.24 --- llvm/configure:1.23 Mon Sep 15 09:25:08 2003 +++ llvm/configure Mon Sep 15 12:04:03 2003 @@ -1509,6 +1509,14 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. +if test -f ${srcdir}/include/Config/config.h +then + { { echo "$as_me:$LINENO: error: Already configured in ${srcdir}" >&5 +echo "$as_me: error: Already configured in ${srcdir}" >&2;} + { (exit 1); exit 1; }; } +fi + + ac_config_headers="$ac_config_headers include/Config/config.h" ac_config_commands="$ac_config_commands Makefile" @@ -3464,11 +3472,6 @@ { (exit 1); exit 1; }; } fi -cat >>confdefs.h <<\_ACEOF -#define CC "$CC" -_ACEOF - - echo "$as_me:$LINENO: checking for GNU make" >&5 echo $ECHO_N "checking for GNU make... $ECHO_C" >&6 if test "${_cv_gnu_make_command+set}" = set; then @@ -4391,7 +4394,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 4394 "configure"' > conftest.$ac_ext + echo '#line 4397 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5232,7 +5235,7 @@ # Provide some information about the compiler. -echo "$as_me:5235:" \ +echo "$as_me:5238:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -6241,11 +6244,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6244: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6247: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6248: \$? = $ac_status" >&5 + echo "$as_me:6251: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6473,11 +6476,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6476: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6479: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6480: \$? = $ac_status" >&5 + echo "$as_me:6483: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6540,11 +6543,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6543: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6546: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:6547: \$? = $ac_status" >&5 + echo "$as_me:6550: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8552,7 +8555,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:10792: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:10793: \$? = $ac_status" >&5 + echo "$as_me:10796: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -10853,11 +10856,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:10856: $lt_compile\"" >&5) + (eval echo "\"\$as_me:10859: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:10860: \$? = $ac_status" >&5 + echo "$as_me:10863: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12096,7 +12099,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:13022: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13023: \$? = $ac_status" >&5 + echo "$as_me:13026: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -13083,11 +13086,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13086: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13089: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13090: \$? = $ac_status" >&5 + echo "$as_me:13093: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15027,11 +15030,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15030: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15033: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15034: \$? = $ac_status" >&5 + echo "$as_me:15037: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -15259,11 +15262,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15262: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15265: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15266: \$? = $ac_status" >&5 + echo "$as_me:15269: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -15326,11 +15329,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15329: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15332: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15333: \$? = $ac_status" >&5 + echo "$as_me:15336: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17338,7 +17341,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext < Changes in directory llvm/autoconf: configure.ac updated: 1.15 -> 1.16 --- Log message: Added code that verifies that the source directory has not been configured already. This should help prevent strange errors from happening, but will make re-configuring the source directory more difficult when it is shared with the object directory. --- Diffs of the changes: Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.15 llvm/autoconf/configure.ac:1.16 --- llvm/autoconf/configure.ac:1.15 Fri Sep 12 21:35:56 2003 +++ llvm/autoconf/configure.ac Mon Sep 15 12:04:06 2003 @@ -20,6 +20,13 @@ dnl Place all of the extra autoconf files into the config subdirectory AC_CONFIG_AUX_DIR([autoconf]) +dnl Quit if the source directory has already been configured. +if test -f ${srcdir}/include/Config/config.h +then + AC_MSG_ERROR([Already configured in ${srcdir}]) +fi + + dnl Configure a header file AC_CONFIG_HEADERS(include/Config/config.h) AC_CONFIG_MAKEFILE(Makefile) From criswell at cs.uiuc.edu Mon Sep 15 12:20:03 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 12:20:03 2003 Subject: [llvm-commits] CVS: llvm/configure Message-ID: <200309151719.MAA23043@choi.cs.uiuc.edu> Changes in directory llvm: configure updated: 1.24 -> 1.25 --- Log message: Modified the checks slightly so that one can re-configure LLVM without having to do a "make distclean" when building in the source directory. --- Diffs of the changes: Index: llvm/configure diff -u llvm/configure:1.24 llvm/configure:1.25 --- llvm/configure:1.24 Mon Sep 15 12:04:03 2003 +++ llvm/configure Mon Sep 15 12:19:36 2003 @@ -1509,14 +1509,16 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. -if test -f ${srcdir}/include/Config/config.h +if test ${srcdir} != "." then - { { echo "$as_me:$LINENO: error: Already configured in ${srcdir}" >&5 + if test -f ${srcdir}/include/Config/config.h + then + { { echo "$as_me:$LINENO: error: Already configured in ${srcdir}" >&5 echo "$as_me: error: Already configured in ${srcdir}" >&2;} { (exit 1); exit 1; }; } + fi fi - ac_config_headers="$ac_config_headers include/Config/config.h" ac_config_commands="$ac_config_commands Makefile" @@ -4394,7 +4396,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 4397 "configure"' > conftest.$ac_ext + echo '#line 4399 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5235,7 +5237,7 @@ # Provide some information about the compiler. -echo "$as_me:5238:" \ +echo "$as_me:5240:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -6244,11 +6246,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6247: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6249: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6251: \$? = $ac_status" >&5 + echo "$as_me:6253: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6476,11 +6478,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6479: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6481: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6483: \$? = $ac_status" >&5 + echo "$as_me:6485: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6543,11 +6545,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6546: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6548: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:6550: \$? = $ac_status" >&5 + echo "$as_me:6552: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8555,7 +8557,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:10794: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:10796: \$? = $ac_status" >&5 + echo "$as_me:10798: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -10856,11 +10858,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:10859: $lt_compile\"" >&5) + (eval echo "\"\$as_me:10861: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:10863: \$? = $ac_status" >&5 + echo "$as_me:10865: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12099,7 +12101,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:13024: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13026: \$? = $ac_status" >&5 + echo "$as_me:13028: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -13086,11 +13088,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13089: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13091: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13093: \$? = $ac_status" >&5 + echo "$as_me:13095: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15030,11 +15032,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15033: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15035: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15037: \$? = $ac_status" >&5 + echo "$as_me:15039: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -15262,11 +15264,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15265: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15267: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15269: \$? = $ac_status" >&5 + echo "$as_me:15271: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -15329,11 +15331,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15332: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15334: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15336: \$? = $ac_status" >&5 + echo "$as_me:15338: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17341,7 +17343,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext < Changes in directory llvm/autoconf: configure.ac updated: 1.16 -> 1.17 --- Log message: Modified the checks slightly so that one can re-configure LLVM without having to do a "make distclean" when building in the source directory. --- Diffs of the changes: Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.16 llvm/autoconf/configure.ac:1.17 --- llvm/autoconf/configure.ac:1.16 Mon Sep 15 12:04:06 2003 +++ llvm/autoconf/configure.ac Mon Sep 15 12:19:42 2003 @@ -21,11 +21,14 @@ AC_CONFIG_AUX_DIR([autoconf]) dnl Quit if the source directory has already been configured. -if test -f ${srcdir}/include/Config/config.h +dnl NOTE: This relies upon undocumented autoconf behavior. +if test ${srcdir} != "." then - AC_MSG_ERROR([Already configured in ${srcdir}]) + if test -f ${srcdir}/include/Config/config.h + then + AC_MSG_ERROR([Already configured in ${srcdir}]) + fi fi - dnl Configure a header file AC_CONFIG_HEADERS(include/Config/config.h) From brukman at cs.uiuc.edu Mon Sep 15 13:33:03 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Sep 15 13:33:03 2003 Subject: [llvm-commits] CVS: llvm/tools/llvm-link/ Message-ID: <200309151832.NAA27385@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-link: --- Log message: Directory /home/vadve/vadve/Research/DynOpt/CVSRepository/llvm/tools/llvm-link added to the repository --- Diffs of the changes: From brukman at cs.uiuc.edu Mon Sep 15 13:35:02 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Sep 15 13:35:02 2003 Subject: [llvm-commits] CVS: llvm/tools/llvm-link/Makefile llvm-link.cpp Message-ID: <200309151834.NAA27443@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-link: Makefile updated: 1.5 -> 1.6 llvm-link.cpp updated: 1.27 -> 1.28 --- Log message: `link' is being renamed to `llvm-link'. --- Diffs of the changes: Index: llvm/tools/llvm-link/Makefile diff -u llvm/tools/llvm-link/Makefile:1.5 llvm/tools/llvm-link/Makefile:1.6 --- llvm/tools/llvm-link/Makefile:1.5 Tue Jul 23 12:50:56 2002 +++ llvm/tools/llvm-link/Makefile Mon Sep 15 13:34:34 2003 @@ -1,6 +1,6 @@ LEVEL = ../.. -TOOLNAME = link +TOOLNAME = llvm-link USEDLIBS = bcreader bcwriter transformutils.a vmcore support.a include $(LEVEL)/Makefile.common Index: llvm/tools/llvm-link/llvm-link.cpp diff -u llvm/tools/llvm-link/llvm-link.cpp:1.27 llvm/tools/llvm-link/llvm-link.cpp:1.28 --- llvm/tools/llvm-link/llvm-link.cpp:1.27 Thu Aug 28 11:25:34 2003 +++ llvm/tools/llvm-link/llvm-link.cpp Mon Sep 15 13:34:34 2003 @@ -2,7 +2,7 @@ // LLVM 'LINK' UTILITY // // This utility may be invoked in the following manner: -// link a.bc b.bc c.bc -o x.bc +// llvm-link a.bc b.bc c.bc -o x.bc // //===----------------------------------------------------------------------===// @@ -72,7 +72,7 @@ if (FoundAFile) std::cerr << "Bytecode file '" << FN << "' corrupt! " - << "Use 'link -v ...' for more info.\n"; + << "Use 'llvm-link -v ...' for more info.\n"; else std::cerr << "Could not locate bytecode file: '" << FN << "'\n"; return std::auto_ptr(); From lattner at cs.uiuc.edu Mon Sep 15 14:21:04 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Sep 15 14:21:04 2003 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/crtend/Makefile Message-ID: <200309151920.OAA12113@apoc.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/crtend: Makefile updated: 1.4 -> 1.5 --- Log message: Fix building into a different obj directory --- Diffs of the changes: Index: llvm/runtime/GCCLibraries/crtend/Makefile diff -u llvm/runtime/GCCLibraries/crtend/Makefile:1.4 llvm/runtime/GCCLibraries/crtend/Makefile:1.5 --- llvm/runtime/GCCLibraries/crtend/Makefile:1.4 Mon Sep 15 10:06:39 2003 +++ llvm/runtime/GCCLibraries/crtend/Makefile Mon Sep 15 14:20:11 2003 @@ -3,7 +3,7 @@ DONT_BUILD_RELINKED=1 LIBRARYNAME=crtend -Source = $(wildcard *.cpp) $(wildcard *.c) listend.ll +Source = $(notdir $(wildcard $(SourceDir)/*.cpp $(SourceDir)/*.c)) listend.ll EXPORTED_SYMBOL_FILE = exported_symbol_list.lst From lattner at cs.uiuc.edu Mon Sep 15 14:23:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Sep 15 14:23:02 2003 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/crtend/Makefile Message-ID: <200309151922.OAA12150@apoc.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/crtend: Makefile updated: 1.5 -> 1.6 --- Log message: Fix building outside the srcdir, again --- Diffs of the changes: Index: llvm/runtime/GCCLibraries/crtend/Makefile diff -u llvm/runtime/GCCLibraries/crtend/Makefile:1.5 llvm/runtime/GCCLibraries/crtend/Makefile:1.6 --- llvm/runtime/GCCLibraries/crtend/Makefile:1.5 Mon Sep 15 14:20:11 2003 +++ llvm/runtime/GCCLibraries/crtend/Makefile Mon Sep 15 14:22:36 2003 @@ -5,7 +5,7 @@ Source = $(notdir $(wildcard $(SourceDir)/*.cpp $(SourceDir)/*.c)) listend.ll -EXPORTED_SYMBOL_FILE = exported_symbol_list.lst +EXPORTED_SYMBOL_FILE = $(SourceDir)/exported_symbol_list.lst include $(LEVEL)/Makefile.common From brukman at cs.uiuc.edu Mon Sep 15 14:42:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Sep 15 14:42:01 2003 Subject: [llvm-commits] CVS: llvm/test/QMTestDB/QMTest/llvm.py Message-ID: <200309151941.OAA20916@zion.cs.uiuc.edu> Changes in directory llvm/test/QMTestDB/QMTest: llvm.py updated: 1.4 -> 1.5 --- Log message: Renamed `as' and `dis' to have the `llvm-' prefix. --- Diffs of the changes: Index: llvm/test/QMTestDB/QMTest/llvm.py diff -u llvm/test/QMTestDB/QMTest/llvm.py:1.4 llvm/test/QMTestDB/QMTest/llvm.py:1.5 --- llvm/test/QMTestDB/QMTest/llvm.py:1.4 Sat Sep 6 10:14:12 2003 +++ llvm/test/QMTestDB/QMTest/llvm.py Mon Sep 15 14:41:09 2003 @@ -23,7 +23,7 @@ # # Description: # This class verifies that a specified LLVM assembly file can be -# assembled into bytecode using the LLVM as utility. +# assembled into bytecode using the `llvm-as' utility. # ############################################################################## class AssembleTest(qm.test.test.Test): @@ -66,7 +66,7 @@ # # Construct the pathnames to the various utilities. # - as = buildroot + '/tools/Debug/as' + as = buildroot + '/tools/Debug/llvm-as' # # Assume we will succeed @@ -141,7 +141,7 @@ # # Construct the pathnames to the various utilities. # - dis = buildroot + '/tools/Debug/dis' + dis = buildroot + '/tools/Debug/llvm-dis' # # Use the LLVM assembler to assemble the program. From brukman at cs.uiuc.edu Mon Sep 15 14:52:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Sep 15 14:52:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Makefile Message-ID: <200309151951.OAA08760@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression: Makefile updated: 1.9 -> 1.10 --- Log message: Cleaned up Makefile. --- Diffs of the changes: Index: llvm/test/Regression/Makefile diff -u llvm/test/Regression/Makefile:1.9 llvm/test/Regression/Makefile:1.10 --- llvm/test/Regression/Makefile:1.9 Mon May 12 18:22:41 2003 +++ llvm/test/Regression/Makefile Mon Sep 15 14:51:31 2003 @@ -8,6 +8,5 @@ # LEVEL = ../.. DIRS = Assembler BugPoint CBackend CFrontend C++Frontend \ - Jello \ - LLC Linker Other Analysis Transforms Verifier + Jello LLC Linker Other Analysis Transforms Verifier include $(LEVEL)/Makefile.common From brukman at cs.uiuc.edu Mon Sep 15 14:59:02 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Sep 15 14:59:02 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Analysis/DSGraph/2003-06-29-NodeCollapsing.ll buglobals.ll constantize.ll gcsetest.ll incompletenode.ll mustalias.ll Message-ID: <200309151958.OAA08999@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Analysis/DSGraph: 2003-06-29-NodeCollapsing.ll updated: 1.1 -> 1.2 buglobals.ll updated: 1.1 -> 1.2 constantize.ll updated: 1.1 -> 1.2 gcsetest.ll updated: 1.5 -> 1.6 incompletenode.ll updated: 1.2 -> 1.3 mustalias.ll updated: 1.2 -> 1.3 --- Log message: Renamed `as' => `llvm-as', `dis' => `llvm-dis'. --- Diffs of the changes: Index: llvm/test/Regression/Analysis/DSGraph/2003-06-29-NodeCollapsing.ll diff -u llvm/test/Regression/Analysis/DSGraph/2003-06-29-NodeCollapsing.ll:1.1 llvm/test/Regression/Analysis/DSGraph/2003-06-29-NodeCollapsing.ll:1.2 --- llvm/test/Regression/Analysis/DSGraph/2003-06-29-NodeCollapsing.ll:1.1 Sun Jun 29 12:18:59 2003 +++ llvm/test/Regression/Analysis/DSGraph/2003-06-29-NodeCollapsing.ll Mon Sep 15 14:58:02 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -no-aa -ds-aa -load-vn -gcse | dis | not grep load +; RUN: llvm-as < %s | opt -no-aa -ds-aa -load-vn -gcse | llvm-dis | not grep load %T = type { int*, int* } int %main() { Index: llvm/test/Regression/Analysis/DSGraph/buglobals.ll diff -u llvm/test/Regression/Analysis/DSGraph/buglobals.ll:1.1 llvm/test/Regression/Analysis/DSGraph/buglobals.ll:1.2 --- llvm/test/Regression/Analysis/DSGraph/buglobals.ll:1.1 Sat Jun 28 16:54:24 2003 +++ llvm/test/Regression/Analysis/DSGraph/buglobals.ll Mon Sep 15 14:58:02 2003 @@ -1,7 +1,7 @@ ; This tests to make sure that G ends up in the globals graph of the BU pass. ; If it is not, then %G will get converted to a 'constant' from a 'global' ; -; RUN: as < %s | opt -ds-opt -globaldce | dis | grep %G +; RUN: llvm-as < %s | opt -ds-opt -globaldce | llvm-dis | grep %G %G = internal global int 0 ; [#uses=2] Index: llvm/test/Regression/Analysis/DSGraph/constantize.ll diff -u llvm/test/Regression/Analysis/DSGraph/constantize.ll:1.1 llvm/test/Regression/Analysis/DSGraph/constantize.ll:1.2 --- llvm/test/Regression/Analysis/DSGraph/constantize.ll:1.1 Sat Jun 28 16:56:22 2003 +++ llvm/test/Regression/Analysis/DSGraph/constantize.ll Mon Sep 15 14:58:02 2003 @@ -1,6 +1,6 @@ ; Make sure that the ds-opt pass is constantizing globals ; -; RUN: as < %s | opt -ds-opt | dis | grep %G | grep constant +; RUN: llvm-as < %s | opt -ds-opt | llvm-dis | grep %G | grep constant %G = internal global int 0 ; [#uses=2] Index: llvm/test/Regression/Analysis/DSGraph/gcsetest.ll diff -u llvm/test/Regression/Analysis/DSGraph/gcsetest.ll:1.5 llvm/test/Regression/Analysis/DSGraph/gcsetest.ll:1.6 --- llvm/test/Regression/Analysis/DSGraph/gcsetest.ll:1.5 Sat Jun 28 18:49:06 2003 +++ llvm/test/Regression/Analysis/DSGraph/gcsetest.ll Mon Sep 15 14:58:02 2003 @@ -1,7 +1,7 @@ ; Test that GCSE uses ds-aa to do alias analysis, which is capable of ; disambiguating some cases. -; RUN: as < %s | opt -no-aa -ds-aa -load-vn -gcse -instcombine -dce | dis | not grep ELIM +; RUN: llvm-as < %s | opt -no-aa -ds-aa -load-vn -gcse -instcombine -dce | llvm-dis | not grep ELIM %intpair = type {int*, int*} implementation Index: llvm/test/Regression/Analysis/DSGraph/incompletenode.ll diff -u llvm/test/Regression/Analysis/DSGraph/incompletenode.ll:1.2 llvm/test/Regression/Analysis/DSGraph/incompletenode.ll:1.3 --- llvm/test/Regression/Analysis/DSGraph/incompletenode.ll:1.2 Sat Jun 28 20:09:07 2003 +++ llvm/test/Regression/Analysis/DSGraph/incompletenode.ll Mon Sep 15 14:58:02 2003 @@ -1,7 +1,7 @@ ; This test was failing because the globals X and Y are marked incomplete ; in the TD graph for %test -; RUN: as < %s | opt -no-aa -ds-aa -load-vn -gcse -instcombine | dis | not grep seteq +; RUN: llvm-as < %s | opt -no-aa -ds-aa -load-vn -gcse -instcombine | llvm-dis | not grep seteq %X = internal global int 20 %Y = internal global int* null Index: llvm/test/Regression/Analysis/DSGraph/mustalias.ll diff -u llvm/test/Regression/Analysis/DSGraph/mustalias.ll:1.2 llvm/test/Regression/Analysis/DSGraph/mustalias.ll:1.3 --- llvm/test/Regression/Analysis/DSGraph/mustalias.ll:1.2 Sat Jun 28 19:57:34 2003 +++ llvm/test/Regression/Analysis/DSGraph/mustalias.ll Mon Sep 15 14:58:02 2003 @@ -1,6 +1,6 @@ ; Test that ds-aa is returning must-alias information when it can. -; RUN: as < %s | opt -no-aa -ds-aa -load-vn -gcse | dis | not grep load +; RUN: llvm-as < %s | opt -no-aa -ds-aa -load-vn -gcse | llvm-dis | not grep load %X = internal global int 20 From brukman at cs.uiuc.edu Mon Sep 15 15:02:02 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Sep 15 15:02:02 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Assembler/2002-04-07-HexFloatConstants.llx 2002-04-07-InfConstant.llx 2002-04-29-NameBinding.llx 2002-07-08-HugePerformanceProblem.llx 2002-07-14-InternalLossage.llx 2002-07-14-OpaqueType.llx 2002-07-25-ParserAssertionFailure.llx 2002-07-25-QuoteInString.llx 2002-07-25-ReturnPtrFunction.llx 2002-07-31-SlashInString.llx 2002-08-16-ConstExprInlined.llx 2002-08-19-BytecodeReader.llx 2002-10-13-ConstantEncodingProblem.llx 2003-05-03-BytecodeReaderProblem.llx 2003-05-12-MinIntProblem.llx 2003-05-15-AssemblerProblem.llx 2003-05-21-MalformedShiftCrash.llx 2003-05-21-MalformedStructCrash.llx 2003-06-17-InvokeDisassemble.llx 2003-08-20-ConstantExprGEP-Fold.llx 2003-08-21-ConstantExprCast-Fold.llx ConstantExprFoldCast.llx Message-ID: <200309152001.PAA09109@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Assembler: 2002-04-07-HexFloatConstants.llx updated: 1.2 -> 1.3 2002-04-07-InfConstant.llx updated: 1.1 -> 1.2 2002-04-29-NameBinding.llx updated: 1.3 -> 1.4 2002-07-08-HugePerformanceProblem.llx updated: 1.2 -> 1.3 2002-07-14-InternalLossage.llx updated: 1.1 -> 1.2 2002-07-14-OpaqueType.llx updated: 1.1 -> 1.2 2002-07-25-ParserAssertionFailure.llx updated: 1.1 -> 1.2 2002-07-25-QuoteInString.llx updated: 1.1 -> 1.2 2002-07-25-ReturnPtrFunction.llx updated: 1.1 -> 1.2 2002-07-31-SlashInString.llx updated: 1.1 -> 1.2 2002-08-16-ConstExprInlined.llx updated: 1.1 -> 1.2 2002-08-19-BytecodeReader.llx updated: 1.1 -> 1.2 2002-10-13-ConstantEncodingProblem.llx updated: 1.3 -> 1.4 2003-05-03-BytecodeReaderProblem.llx updated: 1.1 -> 1.2 2003-05-12-MinIntProblem.llx updated: 1.1 -> 1.2 2003-05-15-AssemblerProblem.llx updated: 1.2 -> 1.3 2003-05-21-MalformedShiftCrash.llx updated: 1.1 -> 1.2 2003-05-21-MalformedStructCrash.llx updated: 1.2 -> 1.3 2003-06-17-InvokeDisassemble.llx updated: 1.1 -> 1.2 2003-08-20-ConstantExprGEP-Fold.llx updated: 1.1 -> 1.2 2003-08-21-ConstantExprCast-Fold.llx updated: 1.1 -> 1.2 ConstantExprFoldCast.llx updated: 1.3 -> 1.4 --- Log message: Renamed `as' => `llvm-as', `dis' => `llvm-dis'. --- Diffs of the changes: Index: llvm/test/Regression/Assembler/2002-04-07-HexFloatConstants.llx diff -u llvm/test/Regression/Assembler/2002-04-07-HexFloatConstants.llx:1.2 llvm/test/Regression/Assembler/2002-04-07-HexFloatConstants.llx:1.3 --- llvm/test/Regression/Assembler/2002-04-07-HexFloatConstants.llx:1.2 Sat Sep 6 10:14:44 2003 +++ llvm/test/Regression/Assembler/2002-04-07-HexFloatConstants.llx Mon Sep 15 15:01:21 2003 @@ -5,8 +5,8 @@ ; of the bug that was causing the Olden Health benchmark to output incorrect ; results! ; -; RUN: as < %s | opt -constprop | dis > s1 && \ -; RUN: as < %s | dis | as | opt -constprop | dis > s2 && \ +; RUN: llvm-as < %s | opt -constprop | llvm-dis > s1 && \ +; RUN: llvm-as < %s | llvm-dis | llvm-as | opt -constprop | llvm-dis > s2 && \ ; RUN: diff s1 s2 implementation Index: llvm/test/Regression/Assembler/2002-04-07-InfConstant.llx diff -u llvm/test/Regression/Assembler/2002-04-07-InfConstant.llx:1.1 llvm/test/Regression/Assembler/2002-04-07-InfConstant.llx:1.2 --- llvm/test/Regression/Assembler/2002-04-07-InfConstant.llx:1.1 Sun Apr 7 01:58:25 2002 +++ llvm/test/Regression/Assembler/2002-04-07-InfConstant.llx Mon Sep 15 15:01:21 2003 @@ -1,6 +1,6 @@ ; The output formater prints out 1.0e100 as Inf! ; -; RUN: as < %s | dis | as | dis +; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis implementation Index: llvm/test/Regression/Assembler/2002-04-29-NameBinding.llx diff -u llvm/test/Regression/Assembler/2002-04-29-NameBinding.llx:1.3 llvm/test/Regression/Assembler/2002-04-29-NameBinding.llx:1.4 --- llvm/test/Regression/Assembler/2002-04-29-NameBinding.llx:1.3 Sat Jun 28 18:32:03 2003 +++ llvm/test/Regression/Assembler/2002-04-29-NameBinding.llx Mon Sep 15 15:01:21 2003 @@ -4,7 +4,7 @@ ; Check by running globaldce, which will remove the constant if there are ; no references to it! ; -; RUN: as < %s | opt -globaldce | dis | not grep constant +; RUN: llvm-as < %s | opt -globaldce | llvm-dis | not grep constant ; %v1 = internal constant int 5 Index: llvm/test/Regression/Assembler/2002-07-08-HugePerformanceProblem.llx diff -u llvm/test/Regression/Assembler/2002-07-08-HugePerformanceProblem.llx:1.2 llvm/test/Regression/Assembler/2002-07-08-HugePerformanceProblem.llx:1.3 --- llvm/test/Regression/Assembler/2002-07-08-HugePerformanceProblem.llx:1.2 Thu Jan 23 10:52:04 2003 +++ llvm/test/Regression/Assembler/2002-07-08-HugePerformanceProblem.llx Mon Sep 15 15:01:21 2003 @@ -1,7 +1,7 @@ ; 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 +; RUN: ulimit -t 20; llvm-as < %s %ALL_INTERSECTIONS_METHOD = type int (%OBJECT*, %RAY*, %ISTACK*)* %BBOX = type { %BBOX_VECT, %BBOX_VECT } Index: llvm/test/Regression/Assembler/2002-07-14-InternalLossage.llx diff -u llvm/test/Regression/Assembler/2002-07-14-InternalLossage.llx:1.1 llvm/test/Regression/Assembler/2002-07-14-InternalLossage.llx:1.2 --- llvm/test/Regression/Assembler/2002-07-14-InternalLossage.llx:1.1 Sun Jul 14 17:30:45 2002 +++ llvm/test/Regression/Assembler/2002-07-14-InternalLossage.llx Mon Sep 15 15:01:21 2003 @@ -1,6 +1,6 @@ ; Test to make sure that the 'internal' tag is not lost! ; -; RUN: as < %s | dis | grep internal +; RUN: llvm-as < %s | llvm-dis | grep internal declare void %foo() implementation Index: llvm/test/Regression/Assembler/2002-07-14-OpaqueType.llx diff -u llvm/test/Regression/Assembler/2002-07-14-OpaqueType.llx:1.1 llvm/test/Regression/Assembler/2002-07-14-OpaqueType.llx:1.2 --- llvm/test/Regression/Assembler/2002-07-14-OpaqueType.llx:1.1 Sun Jul 14 18:25:14 2002 +++ llvm/test/Regression/Assembler/2002-07-14-OpaqueType.llx Mon Sep 15 15:01:21 2003 @@ -1,5 +1,5 @@ ; Test that opaque types are preserved correctly -; RUN: as < %s | dis | as | dis +; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis ; %Ty = type opaque Index: llvm/test/Regression/Assembler/2002-07-25-ParserAssertionFailure.llx diff -u llvm/test/Regression/Assembler/2002-07-25-ParserAssertionFailure.llx:1.1 llvm/test/Regression/Assembler/2002-07-25-ParserAssertionFailure.llx:1.2 --- llvm/test/Regression/Assembler/2002-07-25-ParserAssertionFailure.llx:1.1 Thu Jul 25 15:52:34 2002 +++ llvm/test/Regression/Assembler/2002-07-25-ParserAssertionFailure.llx Mon Sep 15 15:01:21 2003 @@ -1,6 +1,6 @@ ; Make sure we don't get an assertion failure, even though this is a parse ; error -; RUN: as < %s 2>&1 | grep 'No arguments' +; RUN: llvm-as < %s 2>&1 | grep 'No arguments' %ty = type void (int) Index: llvm/test/Regression/Assembler/2002-07-25-QuoteInString.llx diff -u llvm/test/Regression/Assembler/2002-07-25-QuoteInString.llx:1.1 llvm/test/Regression/Assembler/2002-07-25-QuoteInString.llx:1.2 --- llvm/test/Regression/Assembler/2002-07-25-QuoteInString.llx:1.1 Thu Jul 25 15:27:31 2002 +++ llvm/test/Regression/Assembler/2002-07-25-QuoteInString.llx Mon Sep 15 15:01:21 2003 @@ -1,5 +1,5 @@ ; Test double quotes in strings work correctly! -; RUN: as < %s | dis | as | dis +; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis ; %str = internal global [6 x sbyte] c"\22foo\22\00" Index: llvm/test/Regression/Assembler/2002-07-25-ReturnPtrFunction.llx diff -u llvm/test/Regression/Assembler/2002-07-25-ReturnPtrFunction.llx:1.1 llvm/test/Regression/Assembler/2002-07-25-ReturnPtrFunction.llx:1.2 --- llvm/test/Regression/Assembler/2002-07-25-ReturnPtrFunction.llx:1.1 Thu Jul 25 15:57:21 2002 +++ llvm/test/Regression/Assembler/2002-07-25-ReturnPtrFunction.llx Mon Sep 15 15:01:21 2003 @@ -1,7 +1,7 @@ ; Test that returning a pointer to a function causes the disassembler to print ; the right thing. ; -; RUN: as < %s | dis | as +; RUN: llvm-as < %s | llvm-dis | llvm-as %ty = type void (int) Index: llvm/test/Regression/Assembler/2002-07-31-SlashInString.llx diff -u llvm/test/Regression/Assembler/2002-07-31-SlashInString.llx:1.1 llvm/test/Regression/Assembler/2002-07-31-SlashInString.llx:1.2 --- llvm/test/Regression/Assembler/2002-07-31-SlashInString.llx:1.1 Wed Jul 31 18:54:29 2002 +++ llvm/test/Regression/Assembler/2002-07-31-SlashInString.llx Mon Sep 15 15:01:21 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | dis | as +; RUN: llvm-as < %s | llvm-dis | llvm-as ; Make sure that \\ works in a string initializer %Slashtest = internal global [8 x sbyte] c"\5Cbegin{\00" Index: llvm/test/Regression/Assembler/2002-08-16-ConstExprInlined.llx diff -u llvm/test/Regression/Assembler/2002-08-16-ConstExprInlined.llx:1.1 llvm/test/Regression/Assembler/2002-08-16-ConstExprInlined.llx:1.2 --- llvm/test/Regression/Assembler/2002-08-16-ConstExprInlined.llx:1.1 Fri Aug 16 11:54:52 2002 +++ llvm/test/Regression/Assembler/2002-08-16-ConstExprInlined.llx Mon Sep 15 15:01:21 2003 @@ -8,7 +8,7 @@ ; reader should NEVER produce a program "successfully" with placeholders still ; around! -; RUN: as < %s | dis | as +; RUN: llvm-as < %s | llvm-dis | llvm-as %.LC0 = internal global [4 x sbyte] c"foo\00" ; <[4 x sbyte]*> [#uses=1] Index: llvm/test/Regression/Assembler/2002-08-19-BytecodeReader.llx diff -u llvm/test/Regression/Assembler/2002-08-19-BytecodeReader.llx:1.1 llvm/test/Regression/Assembler/2002-08-19-BytecodeReader.llx:1.2 --- llvm/test/Regression/Assembler/2002-08-19-BytecodeReader.llx:1.1 Mon Aug 19 11:14:10 2002 +++ llvm/test/Regression/Assembler/2002-08-19-BytecodeReader.llx Mon Sep 15 15:01:21 2003 @@ -1,7 +1,7 @@ ; Testcase that seems to break the bytecode reader. This comes from the ; "crafty" spec benchmark. ; -; RUN: as < %s | opt -instcombine | dis | as +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | llvm-as %CHESS_POSITION = type { uint, int } Index: llvm/test/Regression/Assembler/2002-10-13-ConstantEncodingProblem.llx diff -u llvm/test/Regression/Assembler/2002-10-13-ConstantEncodingProblem.llx:1.3 llvm/test/Regression/Assembler/2002-10-13-ConstantEncodingProblem.llx:1.4 --- llvm/test/Regression/Assembler/2002-10-13-ConstantEncodingProblem.llx:1.3 Sun Oct 13 16:51:55 2002 +++ llvm/test/Regression/Assembler/2002-10-13-ConstantEncodingProblem.llx Mon Sep 15 15:01:21 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | dis +; RUN: llvm-as < %s | llvm-dis %Domain = type { %Domain**, %Domain* } Index: llvm/test/Regression/Assembler/2003-05-03-BytecodeReaderProblem.llx diff -u llvm/test/Regression/Assembler/2003-05-03-BytecodeReaderProblem.llx:1.1 llvm/test/Regression/Assembler/2003-05-03-BytecodeReaderProblem.llx:1.2 --- llvm/test/Regression/Assembler/2003-05-03-BytecodeReaderProblem.llx:1.1 Sat May 3 13:55:29 2003 +++ llvm/test/Regression/Assembler/2003-05-03-BytecodeReaderProblem.llx Mon Sep 15 15:01:21 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | dis +; RUN: llvm-as < %s | llvm-dis void %test() { %tmp.123 = cast long cast ([5 x { ubyte, sbyte }]* getelementptr ([30 x [5 x { ubyte, sbyte }]]* null, long 0, long 0) to long) to int Index: llvm/test/Regression/Assembler/2003-05-12-MinIntProblem.llx diff -u llvm/test/Regression/Assembler/2003-05-12-MinIntProblem.llx:1.1 llvm/test/Regression/Assembler/2003-05-12-MinIntProblem.llx:1.2 --- llvm/test/Regression/Assembler/2003-05-12-MinIntProblem.llx:1.1 Mon May 12 10:06:20 2003 +++ llvm/test/Regression/Assembler/2003-05-12-MinIntProblem.llx Mon Sep 15 15:01:21 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | dis | grep -- -2147483648 +; RUN: llvm-as < %s | llvm-dis | grep -- -2147483648 int %foo() { ret int -2147483648 Index: llvm/test/Regression/Assembler/2003-05-15-AssemblerProblem.llx diff -u llvm/test/Regression/Assembler/2003-05-15-AssemblerProblem.llx:1.2 llvm/test/Regression/Assembler/2003-05-15-AssemblerProblem.llx:1.3 --- llvm/test/Regression/Assembler/2003-05-15-AssemblerProblem.llx:1.2 Thu May 15 14:38:39 2003 +++ llvm/test/Regression/Assembler/2003-05-15-AssemblerProblem.llx Mon Sep 15 15:01:21 2003 @@ -1,7 +1,7 @@ ; This bug was caused by two CPR's existing for the same global variable, ; colliding in the Module level CPR map. -; RUN: as < %s -o /dev/null -f +; RUN: llvm-as < %s -o /dev/null -f void %test() { call void (...)* cast (void (short*, int)* %AddString to void (...)*)(short* null, int 0) Index: llvm/test/Regression/Assembler/2003-05-21-MalformedShiftCrash.llx diff -u llvm/test/Regression/Assembler/2003-05-21-MalformedShiftCrash.llx:1.1 llvm/test/Regression/Assembler/2003-05-21-MalformedShiftCrash.llx:1.2 --- llvm/test/Regression/Assembler/2003-05-21-MalformedShiftCrash.llx:1.1 Wed May 21 12:46:02 2003 +++ llvm/test/Regression/Assembler/2003-05-21-MalformedShiftCrash.llx Mon Sep 15 15:01:21 2003 @@ -1,4 +1,4 @@ ; Found by inspection of the code -; RUN: as < %s 2>&1 | grep "Shift constant expression" +; RUN: llvm-as < %s 2>&1 | grep "Shift constant expression" global int shr (float 1.0, ubyte 2) Index: llvm/test/Regression/Assembler/2003-05-21-MalformedStructCrash.llx diff -u llvm/test/Regression/Assembler/2003-05-21-MalformedStructCrash.llx:1.2 llvm/test/Regression/Assembler/2003-05-21-MalformedStructCrash.llx:1.3 --- llvm/test/Regression/Assembler/2003-05-21-MalformedStructCrash.llx:1.2 Wed May 21 11:05:47 2003 +++ llvm/test/Regression/Assembler/2003-05-21-MalformedStructCrash.llx Mon Sep 15 15:01:21 2003 @@ -1,4 +1,4 @@ ; Found by inspection of the code -; RUN: as < %s 2>&1 | grep "Illegal" +; RUN: llvm-as < %s 2>&1 | grep "Illegal" global {} { int 7, float 1.0, int 7, int 8 } Index: llvm/test/Regression/Assembler/2003-06-17-InvokeDisassemble.llx diff -u llvm/test/Regression/Assembler/2003-06-17-InvokeDisassemble.llx:1.1 llvm/test/Regression/Assembler/2003-06-17-InvokeDisassemble.llx:1.2 --- llvm/test/Regression/Assembler/2003-06-17-InvokeDisassemble.llx:1.1 Tue Jun 17 08:21:13 2003 +++ llvm/test/Regression/Assembler/2003-06-17-InvokeDisassemble.llx Mon Sep 15 15:01:21 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | dis +; RUN: llvm-as < %s | llvm-dis void %test() { invoke void %test() to label %Next except label %Next Next: Index: llvm/test/Regression/Assembler/2003-08-20-ConstantExprGEP-Fold.llx diff -u llvm/test/Regression/Assembler/2003-08-20-ConstantExprGEP-Fold.llx:1.1 llvm/test/Regression/Assembler/2003-08-20-ConstantExprGEP-Fold.llx:1.2 --- llvm/test/Regression/Assembler/2003-08-20-ConstantExprGEP-Fold.llx:1.1 Wed Aug 20 11:11:05 2003 +++ llvm/test/Regression/Assembler/2003-08-20-ConstantExprGEP-Fold.llx Mon Sep 15 15:01:21 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -instcombine -simplifycfg | dis | not grep br +; RUN: llvm-as < %s | opt -instcombine -simplifycfg | llvm-dis | not grep br %.str_1 = internal constant [6 x sbyte] c"_Bool\00" ; <[6 x sbyte]*> [#uses=1] Index: llvm/test/Regression/Assembler/2003-08-21-ConstantExprCast-Fold.llx diff -u llvm/test/Regression/Assembler/2003-08-21-ConstantExprCast-Fold.llx:1.1 llvm/test/Regression/Assembler/2003-08-21-ConstantExprCast-Fold.llx:1.2 --- llvm/test/Regression/Assembler/2003-08-21-ConstantExprCast-Fold.llx:1.1 Thu Aug 21 14:37:46 2003 +++ llvm/test/Regression/Assembler/2003-08-21-ConstantExprCast-Fold.llx Mon Sep 15 15:01:21 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | dis | not grep getelementptr +; RUN: llvm-as < %s | llvm-dis | not grep getelementptr %A = external global { float } ; <{ float }*> [#uses=1] global int* cast (float* getelementptr ({ float }* %A, long 0, ubyte 0) to int*) Index: llvm/test/Regression/Assembler/ConstantExprFoldCast.llx diff -u llvm/test/Regression/Assembler/ConstantExprFoldCast.llx:1.3 llvm/test/Regression/Assembler/ConstantExprFoldCast.llx:1.4 --- llvm/test/Regression/Assembler/ConstantExprFoldCast.llx:1.3 Sat Jun 28 18:32:03 2003 +++ llvm/test/Regression/Assembler/ConstantExprFoldCast.llx Mon Sep 15 15:01:21 2003 @@ -1,6 +1,6 @@ ; This test checks to make sure that constant exprs fold in some simple situations -; RUN: as < %s | dis | not grep cast +; RUN: llvm-as < %s | llvm-dis | not grep cast %A = global int* cast (sbyte* null to int*) ; Cast null -> fold %B = global int** cast (int** %A to int**) ; Cast to same type -> fold From brukman at cs.uiuc.edu Mon Sep 15 15:03:00 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Sep 15 15:03:00 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/CBackend/2003-06-23-PromotedExprs.llx 2003-06-28-LinkOnceGlobalVars.llx Message-ID: <200309152002.PAA09131@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CBackend: 2003-06-23-PromotedExprs.llx updated: 1.2 -> 1.3 2003-06-28-LinkOnceGlobalVars.llx updated: 1.1 -> 1.2 --- Log message: Renamed `as' => `llvm-as', `dis' => `llvm-dis'. --- Diffs of the changes: Index: llvm/test/Regression/CBackend/2003-06-23-PromotedExprs.llx diff -u llvm/test/Regression/CBackend/2003-06-23-PromotedExprs.llx:1.2 llvm/test/Regression/CBackend/2003-06-23-PromotedExprs.llx:1.3 --- llvm/test/Regression/CBackend/2003-06-23-PromotedExprs.llx:1.2 Sat Sep 6 10:14:47 2003 +++ llvm/test/Regression/CBackend/2003-06-23-PromotedExprs.llx Mon Sep 15 15:01:52 2003 @@ -1,5 +1,5 @@ -; RUN: as < %s | dis -c > f1.cbe.c +; RUN: llvm-as < %s | llvm-dis -c > f1.cbe.c ; RUN: gcc -B/usr/bin/ f1.cbe.c -o f1.cbe ; RUN: ./f1.cbe Index: llvm/test/Regression/CBackend/2003-06-28-LinkOnceGlobalVars.llx diff -u llvm/test/Regression/CBackend/2003-06-28-LinkOnceGlobalVars.llx:1.1 llvm/test/Regression/CBackend/2003-06-28-LinkOnceGlobalVars.llx:1.2 --- llvm/test/Regression/CBackend/2003-06-28-LinkOnceGlobalVars.llx:1.1 Sat Jun 28 12:07:23 2003 +++ llvm/test/Regression/CBackend/2003-06-28-LinkOnceGlobalVars.llx Mon Sep 15 15:01:53 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | dis -c | grep common | grep X +; RUN: llvm-as < %s | llvm-dis -c | grep common | grep X %X = linkonce global int 5 From brukman at cs.uiuc.edu Mon Sep 15 15:04:00 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Sep 15 15:04:00 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Jello/2002-12-23-LocalRAProblem.llx 2002-12-23-SubProblem.llx 2003-01-04-PhiTest.llx 2003-05-06-LivenessClobber.llx 2003-05-07-ArgumentTest.llx 2003-08-03-CallArgLiveRanges.llx 2003-08-04-PhysRegLiveFailure.llx 2003-08-23-DeadBlockTest.llx Message-ID: <200309152003.PAA09167@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Jello: 2002-12-23-LocalRAProblem.llx updated: 1.2 -> 1.3 2002-12-23-SubProblem.llx updated: 1.2 -> 1.3 2003-01-04-PhiTest.llx updated: 1.1 -> 1.2 2003-05-06-LivenessClobber.llx updated: 1.2 -> 1.3 2003-05-07-ArgumentTest.llx updated: 1.1 -> 1.2 2003-08-03-CallArgLiveRanges.llx updated: 1.1 -> 1.2 2003-08-04-PhysRegLiveFailure.llx updated: 1.1 -> 1.2 2003-08-23-DeadBlockTest.llx updated: 1.1 -> 1.2 --- Log message: Renamed `as' => `llvm-as', `dis' => `llvm-dis'. --- Diffs of the changes: Index: llvm/test/Regression/Jello/2002-12-23-LocalRAProblem.llx diff -u llvm/test/Regression/Jello/2002-12-23-LocalRAProblem.llx:1.2 llvm/test/Regression/Jello/2002-12-23-LocalRAProblem.llx:1.3 --- llvm/test/Regression/Jello/2002-12-23-LocalRAProblem.llx:1.2 Wed Feb 26 13:56:27 2003 +++ llvm/test/Regression/Jello/2002-12-23-LocalRAProblem.llx Mon Sep 15 15:02:53 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | lli -force-interpreter=false -disable-local-ra=false +; RUN: llvm-as < %s | lli -force-interpreter=false -disable-local-ra=false ;-print-machineinstrs int %main() { Index: llvm/test/Regression/Jello/2002-12-23-SubProblem.llx diff -u llvm/test/Regression/Jello/2002-12-23-SubProblem.llx:1.2 llvm/test/Regression/Jello/2002-12-23-SubProblem.llx:1.3 --- llvm/test/Regression/Jello/2002-12-23-SubProblem.llx:1.2 Wed Feb 26 13:56:27 2003 +++ llvm/test/Regression/Jello/2002-12-23-SubProblem.llx Mon Sep 15 15:02:53 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | lli -force-interpreter=false -disable-local-ra +; RUN: llvm-as < %s | lli -force-interpreter=false -disable-local-ra int %main(int %B) { ;%B = add int 0, 1 Index: llvm/test/Regression/Jello/2003-01-04-PhiTest.llx diff -u llvm/test/Regression/Jello/2003-01-04-PhiTest.llx:1.1 llvm/test/Regression/Jello/2003-01-04-PhiTest.llx:1.2 --- llvm/test/Regression/Jello/2003-01-04-PhiTest.llx:1.1 Mon Jan 13 14:02:16 2003 +++ llvm/test/Regression/Jello/2003-01-04-PhiTest.llx Mon Sep 15 15:02:53 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | lli -force-interpreter=false +; RUN: llvm-as < %s | lli -force-interpreter=false int %main() { br label %Loop Index: llvm/test/Regression/Jello/2003-05-06-LivenessClobber.llx diff -u llvm/test/Regression/Jello/2003-05-06-LivenessClobber.llx:1.2 llvm/test/Regression/Jello/2003-05-06-LivenessClobber.llx:1.3 --- llvm/test/Regression/Jello/2003-05-06-LivenessClobber.llx:1.2 Sat Jun 28 17:53:07 2003 +++ llvm/test/Regression/Jello/2003-05-06-LivenessClobber.llx Mon Sep 15 15:02:53 2003 @@ -1,6 +1,6 @@ ; This testcase shoudl return with an exit code of 1. ; -; RUN: as < %s | not lli -force-interpreter=false +; RUN: llvm-as < %s | not lli -force-interpreter=false target endian = little target pointersize = 32 Index: llvm/test/Regression/Jello/2003-05-07-ArgumentTest.llx diff -u llvm/test/Regression/Jello/2003-05-07-ArgumentTest.llx:1.1 llvm/test/Regression/Jello/2003-05-07-ArgumentTest.llx:1.2 --- llvm/test/Regression/Jello/2003-05-07-ArgumentTest.llx:1.1 Wed May 7 15:23:32 2003 +++ llvm/test/Regression/Jello/2003-05-07-ArgumentTest.llx Mon Sep 15 15:02:53 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | lli -force-interpreter=false - test +; RUN: llvm-as < %s | lli -force-interpreter=false - test target endian = little target pointersize = 32 Index: llvm/test/Regression/Jello/2003-08-03-CallArgLiveRanges.llx diff -u llvm/test/Regression/Jello/2003-08-03-CallArgLiveRanges.llx:1.1 llvm/test/Regression/Jello/2003-08-03-CallArgLiveRanges.llx:1.2 --- llvm/test/Regression/Jello/2003-08-03-CallArgLiveRanges.llx:1.1 Sun Aug 3 21:11:05 2003 +++ llvm/test/Regression/Jello/2003-08-03-CallArgLiveRanges.llx Mon Sep 15 15:02:53 2003 @@ -3,7 +3,7 @@ ; it makes a ton of annoying overlapping live ranges. This code should not ; cause spills! ; -; RUN: as < %s | lli -stats 2>&1 | not grep spilled +; RUN: llvm-as < %s | lli -stats 2>&1 | not grep spilled target endian = little target pointersize = 32 Index: llvm/test/Regression/Jello/2003-08-04-PhysRegLiveFailure.llx diff -u llvm/test/Regression/Jello/2003-08-04-PhysRegLiveFailure.llx:1.1 llvm/test/Regression/Jello/2003-08-04-PhysRegLiveFailure.llx:1.2 --- llvm/test/Regression/Jello/2003-08-04-PhysRegLiveFailure.llx:1.1 Mon Aug 4 18:28:44 2003 +++ llvm/test/Regression/Jello/2003-08-04-PhysRegLiveFailure.llx Mon Sep 15 15:02:53 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | llc -march=x86 +; RUN: llvm-as < %s | llc -march=x86 target endian = big ; We need the byteswaps for this test! target pointersize = 64 Index: llvm/test/Regression/Jello/2003-08-23-DeadBlockTest.llx diff -u llvm/test/Regression/Jello/2003-08-23-DeadBlockTest.llx:1.1 llvm/test/Regression/Jello/2003-08-23-DeadBlockTest.llx:1.2 --- llvm/test/Regression/Jello/2003-08-23-DeadBlockTest.llx:1.1 Sat Aug 23 19:21:50 2003 +++ llvm/test/Regression/Jello/2003-08-23-DeadBlockTest.llx Mon Sep 15 15:02:53 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | llc -march=x86 +; RUN: llvm-as < %s | llc -march=x86 implementation From brukman at cs.uiuc.edu Mon Sep 15 15:05:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Sep 15 15:05:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Linker/2002-07-17-GlobalFail.ll 2002-07-17-LinkTest2.ll 2002-08-20-ConstantExpr.ll 2003-01-30-LinkerRename.ll 2003-01-30-LinkerTypeRename.ll 2003-04-21-Linkage.ll 2003-04-23-LinkOnceLost.ll 2003-04-26-NullPtrLinkProblem.ll 2003-05-15-TypeProblem.ll 2003-05-31-LinkerRename.ll 2003-06-02-TypeResolveProblem.ll 2003-06-02-TypeResolveProblem2.ll 2003-08-20-OpaqueTypeResolve.ll 2003-08-23-GlobalVarLinking.ll 2003-08-23-RecursiveOpaqueTypeResolve.ll 2003-08-24-InheritPtrSize.ll 2003-08-28-TypeResolvesGlobal.ll 2003-08-28-TypeResolvesGlobal2.ll 2003-08-28-TypeResolvesGlobal3.ll AppendingLinkage.ll AppendingLinkage2.ll LinkOnce.ll testlink1.ll Message-ID: <200309152004.PAA09363@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Linker: 2002-07-17-GlobalFail.ll updated: 1.2 -> 1.3 2002-07-17-LinkTest2.ll updated: 1.3 -> 1.4 2002-08-20-ConstantExpr.ll updated: 1.3 -> 1.4 2003-01-30-LinkerRename.ll updated: 1.2 -> 1.3 2003-01-30-LinkerTypeRename.ll updated: 1.2 -> 1.3 2003-04-21-Linkage.ll updated: 1.2 -> 1.3 2003-04-23-LinkOnceLost.ll updated: 1.2 -> 1.3 2003-04-26-NullPtrLinkProblem.ll updated: 1.2 -> 1.3 2003-05-15-TypeProblem.ll updated: 1.2 -> 1.3 2003-05-31-LinkerRename.ll updated: 1.4 -> 1.5 2003-06-02-TypeResolveProblem.ll updated: 1.2 -> 1.3 2003-06-02-TypeResolveProblem2.ll updated: 1.2 -> 1.3 2003-08-20-OpaqueTypeResolve.ll updated: 1.1 -> 1.2 2003-08-23-GlobalVarLinking.ll updated: 1.2 -> 1.3 2003-08-23-RecursiveOpaqueTypeResolve.ll updated: 1.2 -> 1.3 2003-08-24-InheritPtrSize.ll updated: 1.1 -> 1.2 2003-08-28-TypeResolvesGlobal.ll updated: 1.1 -> 1.2 2003-08-28-TypeResolvesGlobal2.ll updated: 1.1 -> 1.2 2003-08-28-TypeResolvesGlobal3.ll updated: 1.1 -> 1.2 AppendingLinkage.ll updated: 1.3 -> 1.4 AppendingLinkage2.ll updated: 1.2 -> 1.3 LinkOnce.ll updated: 1.2 -> 1.3 testlink1.ll updated: 1.9 -> 1.10 --- Log message: Renamed `as' => `llvm-as', `dis' => `llvm-dis', `link' => `llvm-link'. --- Diffs of the changes: Index: llvm/test/Regression/Linker/2002-07-17-GlobalFail.ll diff -u llvm/test/Regression/Linker/2002-07-17-GlobalFail.ll:1.2 llvm/test/Regression/Linker/2002-07-17-GlobalFail.ll:1.3 --- llvm/test/Regression/Linker/2002-07-17-GlobalFail.ll:1.2 Sat Sep 6 10:15:03 2003 +++ llvm/test/Regression/Linker/2002-07-17-GlobalFail.ll Mon Sep 15 15:04:28 2003 @@ -1,6 +1,6 @@ -; RUN: as < %s > %t.bc -; RUN: echo | as > %t.tmp.bc -; RUN: link %t.tmp.bc %t.bc +; RUN: llvm-as < %s > %t.bc +; RUN: echo | llvm-as > %t.tmp.bc +; RUN: llvm-link %t.tmp.bc %t.bc %X = constant int 5 %Y = internal global [2 x int*] [ int* %X, int * %X] Index: llvm/test/Regression/Linker/2002-07-17-LinkTest2.ll diff -u llvm/test/Regression/Linker/2002-07-17-LinkTest2.ll:1.3 llvm/test/Regression/Linker/2002-07-17-LinkTest2.ll:1.4 --- llvm/test/Regression/Linker/2002-07-17-LinkTest2.ll:1.3 Sat Sep 6 10:15:03 2003 +++ llvm/test/Regression/Linker/2002-07-17-LinkTest2.ll Mon Sep 15 15:04:28 2003 @@ -1,8 +1,8 @@ ; This fails linking when it is linked with an empty file as the first object file -; RUN: as > %t1.bc < /dev/null -; RUN: as < %s > %t2.bc -; RUN: link %t[12].bc +; RUN: llvm-as > %t1.bc < /dev/null +; RUN: llvm-as < %s > %t2.bc +; RUN: llvm-link %t[12].bc %work = global int (int, int)* %zip Index: llvm/test/Regression/Linker/2002-08-20-ConstantExpr.ll diff -u llvm/test/Regression/Linker/2002-08-20-ConstantExpr.ll:1.3 llvm/test/Regression/Linker/2002-08-20-ConstantExpr.ll:1.4 --- llvm/test/Regression/Linker/2002-08-20-ConstantExpr.ll:1.3 Sat Sep 6 10:15:03 2003 +++ llvm/test/Regression/Linker/2002-08-20-ConstantExpr.ll Mon Sep 15 15:04:28 2003 @@ -1,8 +1,8 @@ ; This fails linking when it is linked with an empty file as the first object file -; RUN: as > %t.LinkTest.bc < /dev/null -; RUN: as < %s > %t.bc -; RUN: link %t.LinkTest.bc %t.bc +; RUN: llvm-as > %t.LinkTest.bc < /dev/null +; RUN: llvm-as < %s > %t.bc +; RUN: llvm-link %t.LinkTest.bc %t.bc %work = global int 4 %test = global int* getelementptr( int* %work, long 1) Index: llvm/test/Regression/Linker/2003-01-30-LinkerRename.ll diff -u llvm/test/Regression/Linker/2003-01-30-LinkerRename.ll:1.2 llvm/test/Regression/Linker/2003-01-30-LinkerRename.ll:1.3 --- llvm/test/Regression/Linker/2003-01-30-LinkerRename.ll:1.2 Sat Sep 6 10:15:03 2003 +++ llvm/test/Regression/Linker/2003-01-30-LinkerRename.ll Mon Sep 15 15:04:28 2003 @@ -1,9 +1,9 @@ ; This fails because the linker renames the external symbol not the internal ; one... -; RUN: echo "implementation internal int %foo() { ret int 7 }" | as > %t.1.bc -; RUN: as < %s > %t.2.bc -; RUN: link %t.[12].bc | dis | grep '%foo()' | grep -v internal +; RUN: echo "implementation internal int %foo() { ret int 7 }" | llvm-as > %t.1.bc +; RUN: llvm-as < %s > %t.2.bc +; RUN: llvm-link %t.[12].bc | llvm-dis | grep '%foo()' | grep -v internal implementation int %foo() { ret int 0 } Index: llvm/test/Regression/Linker/2003-01-30-LinkerTypeRename.ll diff -u llvm/test/Regression/Linker/2003-01-30-LinkerTypeRename.ll:1.2 llvm/test/Regression/Linker/2003-01-30-LinkerTypeRename.ll:1.3 --- llvm/test/Regression/Linker/2003-01-30-LinkerTypeRename.ll:1.2 Sat Sep 6 10:15:03 2003 +++ llvm/test/Regression/Linker/2003-01-30-LinkerTypeRename.ll Mon Sep 15 15:04:28 2003 @@ -1,9 +1,9 @@ ; This fails because the linker renames the non-opaque type not the opaque ; one... -; RUN: echo "%Ty = type opaque" | as > %t.1.bc -; RUN: as < %s > %t.2.bc -; RUN: link %t.[12].bc | dis | grep '%Ty ' | grep -v opaque +; RUN: echo "%Ty = type opaque" | llvm-as > %t.1.bc +; RUN: llvm-as < %s > %t.2.bc +; RUN: llvm-link %t.[12].bc | llvm-dis | grep '%Ty ' | grep -v opaque %Ty = type int Index: llvm/test/Regression/Linker/2003-04-21-Linkage.ll diff -u llvm/test/Regression/Linker/2003-04-21-Linkage.ll:1.2 llvm/test/Regression/Linker/2003-04-21-Linkage.ll:1.3 --- llvm/test/Regression/Linker/2003-04-21-Linkage.ll:1.2 Sat Sep 6 10:15:03 2003 +++ llvm/test/Regression/Linker/2003-04-21-Linkage.ll Mon Sep 15 15:04:28 2003 @@ -1,6 +1,6 @@ -; RUN: echo "%X = linkonce global int 5 implementation linkonce int %foo() { ret int 7 }" | as > %t.1.bc -; RUN: as < %s > %t.2.bc -; RUN: link %t.[12].bc +; RUN: echo "%X = linkonce global int 5 implementation linkonce int %foo() { ret int 7 }" | llvm-as > %t.1.bc +; RUN: llvm-as < %s > %t.2.bc +; RUN: llvm-link %t.[12].bc %X = external global int implementation Index: llvm/test/Regression/Linker/2003-04-23-LinkOnceLost.ll diff -u llvm/test/Regression/Linker/2003-04-23-LinkOnceLost.ll:1.2 llvm/test/Regression/Linker/2003-04-23-LinkOnceLost.ll:1.3 --- llvm/test/Regression/Linker/2003-04-23-LinkOnceLost.ll:1.2 Sat Sep 6 10:15:03 2003 +++ llvm/test/Regression/Linker/2003-04-23-LinkOnceLost.ll Mon Sep 15 15:04:28 2003 @@ -1,8 +1,8 @@ ; This fails because the linker renames the non-opaque type not the opaque ; one... -; RUN: echo "implementation linkonce void %foo() { ret void } " | as > %t.2.bc -; RUN: as < %s > %t.1.bc -; RUN: link %t.[12].bc | dis | grep foo | grep linkonce +; RUN: echo "implementation linkonce void %foo() { ret void } " | llvm-as > %t.2.bc +; RUN: llvm-as < %s > %t.1.bc +; RUN: llvm-link %t.[12].bc | llvm-dis | grep foo | grep linkonce declare void %foo() Index: llvm/test/Regression/Linker/2003-04-26-NullPtrLinkProblem.ll diff -u llvm/test/Regression/Linker/2003-04-26-NullPtrLinkProblem.ll:1.2 llvm/test/Regression/Linker/2003-04-26-NullPtrLinkProblem.ll:1.3 --- llvm/test/Regression/Linker/2003-04-26-NullPtrLinkProblem.ll:1.2 Sat Sep 6 10:15:03 2003 +++ llvm/test/Regression/Linker/2003-04-26-NullPtrLinkProblem.ll Mon Sep 15 15:04:28 2003 @@ -1,9 +1,9 @@ ; This one fails because the LLVM runtime is allowing two null pointers of ; the same type to be created! -; RUN: echo "%T = type int" | as > %t.2.bc -; RUN: as < %s > %t.1.bc -; RUN: link %t.[12].bc +; RUN: echo "%T = type int" | llvm-as > %t.2.bc +; RUN: llvm-as < %s > %t.1.bc +; RUN: llvm-link %t.[12].bc %T = type opaque Index: llvm/test/Regression/Linker/2003-05-15-TypeProblem.ll diff -u llvm/test/Regression/Linker/2003-05-15-TypeProblem.ll:1.2 llvm/test/Regression/Linker/2003-05-15-TypeProblem.ll:1.3 --- llvm/test/Regression/Linker/2003-05-15-TypeProblem.ll:1.2 Sat Sep 6 10:15:03 2003 +++ llvm/test/Regression/Linker/2003-05-15-TypeProblem.ll Mon Sep 15 15:04:28 2003 @@ -1,9 +1,9 @@ ; This one fails because the LLVM runtime is allowing two null pointers of ; the same type to be created! -; RUN: echo "%S = type { %T*} %T = type opaque" | as > %t.2.bc -; RUN: as < %s > %t.1.bc -; RUN: link %t.[12].bc +; RUN: echo "%S = type { %T*} %T = type opaque" | llvm-as > %t.2.bc +; RUN: llvm-as < %s > %t.1.bc +; RUN: llvm-link %t.[12].bc %S = type { %T* } %T = type int Index: llvm/test/Regression/Linker/2003-05-31-LinkerRename.ll diff -u llvm/test/Regression/Linker/2003-05-31-LinkerRename.ll:1.4 llvm/test/Regression/Linker/2003-05-31-LinkerRename.ll:1.5 --- llvm/test/Regression/Linker/2003-05-31-LinkerRename.ll:1.4 Sat Sep 6 10:15:03 2003 +++ llvm/test/Regression/Linker/2003-05-31-LinkerRename.ll Mon Sep 15 15:04:28 2003 @@ -1,11 +1,11 @@ -; The funcresolve pass will (intentionally) link an _internal_ function body with an +; The funcresolve pass will (intentionally) llvm-link an _internal_ function body with an ; external declaration. Because of this, if we LINK an internal function body into ; a program that already has an external declaration for the function name, we must ; rename the internal function to something that does not conflict. -; RUN: echo "implementation internal int %foo() { ret int 7 }" | as > %t.1.bc -; RUN: as < %s > %t.2.bc -; RUN: link %t.[12].bc | dis | grep 'internal' | not grep '%foo(' +; RUN: echo "implementation internal int %foo() { ret int 7 }" | llvm-as > %t.1.bc +; RUN: llvm-as < %s > %t.2.bc +; RUN: llvm-link %t.[12].bc | llvm-dis | grep 'internal' | not grep '%foo(' implementation declare int %foo() Index: llvm/test/Regression/Linker/2003-06-02-TypeResolveProblem.ll diff -u llvm/test/Regression/Linker/2003-06-02-TypeResolveProblem.ll:1.2 llvm/test/Regression/Linker/2003-06-02-TypeResolveProblem.ll:1.3 --- llvm/test/Regression/Linker/2003-06-02-TypeResolveProblem.ll:1.2 Sat Sep 6 10:15:03 2003 +++ llvm/test/Regression/Linker/2003-06-02-TypeResolveProblem.ll Mon Sep 15 15:04:28 2003 @@ -1,6 +1,6 @@ -; RUN: echo "%T = type opaque" | as > %t.2.bc -; RUN: as < %s > %t.1.bc -; RUN: link %t.[12].bc +; RUN: echo "%T = type opaque" | llvm-as > %t.2.bc +; RUN: llvm-as < %s > %t.1.bc +; RUN: llvm-link %t.[12].bc %T = type opaque %a = constant { %T* } { %T* null } Index: llvm/test/Regression/Linker/2003-06-02-TypeResolveProblem2.ll diff -u llvm/test/Regression/Linker/2003-06-02-TypeResolveProblem2.ll:1.2 llvm/test/Regression/Linker/2003-06-02-TypeResolveProblem2.ll:1.3 --- llvm/test/Regression/Linker/2003-06-02-TypeResolveProblem2.ll:1.2 Sat Sep 6 10:15:03 2003 +++ llvm/test/Regression/Linker/2003-06-02-TypeResolveProblem2.ll Mon Sep 15 15:04:28 2003 @@ -1,6 +1,6 @@ -; RUN: echo "%T = type int" | as > %t.1.bc -; RUN: as < %s > %t.2.bc -; RUN: link %t.[12].bc +; RUN: echo "%T = type int" | llvm-as > %t.1.bc +; RUN: llvm-as < %s > %t.2.bc +; RUN: llvm-link %t.[12].bc %T = type opaque Index: llvm/test/Regression/Linker/2003-08-20-OpaqueTypeResolve.ll diff -u llvm/test/Regression/Linker/2003-08-20-OpaqueTypeResolve.ll:1.1 llvm/test/Regression/Linker/2003-08-20-OpaqueTypeResolve.ll:1.2 --- llvm/test/Regression/Linker/2003-08-20-OpaqueTypeResolve.ll:1.1 Wed Aug 20 14:22:28 2003 +++ llvm/test/Regression/Linker/2003-08-20-OpaqueTypeResolve.ll Mon Sep 15 15:04:28 2003 @@ -1,7 +1,7 @@ -; RUN: as < %s > Output/%s.out1.bc -; RUN: echo "%S = type { int, int* }" | as > Output/%s.out2.bc -; RUN: link Output/%s.out[12].bc +; RUN: llvm-as < %s > Output/%s.out1.bc +; RUN: echo "%S = type { int, int* }" | llvm-as > Output/%s.out2.bc +; RUN: llvm-link Output/%s.out[12].bc %T = type opaque %S = type { int, %T* } Index: llvm/test/Regression/Linker/2003-08-23-GlobalVarLinking.ll diff -u llvm/test/Regression/Linker/2003-08-23-GlobalVarLinking.ll:1.2 llvm/test/Regression/Linker/2003-08-23-GlobalVarLinking.ll:1.3 --- llvm/test/Regression/Linker/2003-08-23-GlobalVarLinking.ll:1.2 Sat Aug 23 15:30:29 2003 +++ llvm/test/Regression/Linker/2003-08-23-GlobalVarLinking.ll Mon Sep 15 15:04:28 2003 @@ -1,6 +1,6 @@ -; RUN: as < %s > Output/%s.out1.bc -; RUN: echo "%S = external global { int, opaque* } declare void %F(opaque*)" | as > Output/%s.out2.bc -; RUN: link Output/%s.out[12].bc | dis | not grep opaque +; RUN: llvm-as < %s > Output/%s.out1.bc +; RUN: echo "%S = external global { int, opaque* } declare void %F(opaque*)" | llvm-as > Output/%s.out2.bc +; RUN: llvm-link Output/%s.out[12].bc | llvm-dis | not grep opaque ; After linking this testcase, there should be no opaque types left. The two ; S's should cause the opaque type to be resolved to 'int'. Index: llvm/test/Regression/Linker/2003-08-23-RecursiveOpaqueTypeResolve.ll diff -u llvm/test/Regression/Linker/2003-08-23-RecursiveOpaqueTypeResolve.ll:1.2 llvm/test/Regression/Linker/2003-08-23-RecursiveOpaqueTypeResolve.ll:1.3 --- llvm/test/Regression/Linker/2003-08-23-RecursiveOpaqueTypeResolve.ll:1.2 Mon Aug 25 12:29:40 2003 +++ llvm/test/Regression/Linker/2003-08-23-RecursiveOpaqueTypeResolve.ll Mon Sep 15 15:04:28 2003 @@ -1,8 +1,8 @@ ; It's a bad idea to go recursively traipsing through types without a safety ; net. -; RUN: as < %s > Output/%s.out1.bc -; RUN: echo "%S = type { %S*, int* }" | as > Output/%s.out2.bc -; RUN: link Output/%s.out[12].bc +; RUN: llvm-as < %s > Output/%s.out1.bc +; RUN: echo "%S = type { %S*, int* }" | llvm-as > Output/%s.out2.bc +; RUN: llvm-link Output/%s.out[12].bc %S = type { %S*, opaque* } Index: llvm/test/Regression/Linker/2003-08-24-InheritPtrSize.ll diff -u llvm/test/Regression/Linker/2003-08-24-InheritPtrSize.ll:1.1 llvm/test/Regression/Linker/2003-08-24-InheritPtrSize.ll:1.2 --- llvm/test/Regression/Linker/2003-08-24-InheritPtrSize.ll:1.1 Sun Aug 24 14:23:31 2003 +++ llvm/test/Regression/Linker/2003-08-24-InheritPtrSize.ll Mon Sep 15 15:04:28 2003 @@ -1,9 +1,9 @@ ; Linking these a module with a specified pointer size to one without a ; specified pointer size should not cause a warning! -; RUN: as < %s > Output/%s.out1.bc -; RUN: echo "" | as > Output/%s.out2.bc -; RUN: link Output/%s.out[12].bc 2>&1 | not grep WARNING +; RUN: llvm-as < %s > Output/%s.out1.bc +; RUN: echo "" | llvm-as > Output/%s.out2.bc +; RUN: llvm-link Output/%s.out[12].bc 2>&1 | not grep WARNING target pointersize = 64 Index: llvm/test/Regression/Linker/2003-08-28-TypeResolvesGlobal.ll diff -u llvm/test/Regression/Linker/2003-08-28-TypeResolvesGlobal.ll:1.1 llvm/test/Regression/Linker/2003-08-28-TypeResolvesGlobal.ll:1.2 --- llvm/test/Regression/Linker/2003-08-28-TypeResolvesGlobal.ll:1.1 Thu Aug 28 23:40:34 2003 +++ llvm/test/Regression/Linker/2003-08-28-TypeResolvesGlobal.ll Mon Sep 15 15:04:28 2003 @@ -1,6 +1,6 @@ -; RUN: as < %s > Output/%s.out1.bc -; RUN: echo "%S = type int" | as > Output/%s.out2.bc -; RUN: link Output/%s.out[21].bc +; RUN: llvm-as < %s > Output/%s.out1.bc +; RUN: echo "%S = type int" | llvm-as > Output/%s.out2.bc +; RUN: llvm-link Output/%s.out[21].bc %S = type opaque Index: llvm/test/Regression/Linker/2003-08-28-TypeResolvesGlobal2.ll diff -u llvm/test/Regression/Linker/2003-08-28-TypeResolvesGlobal2.ll:1.1 llvm/test/Regression/Linker/2003-08-28-TypeResolvesGlobal2.ll:1.2 --- llvm/test/Regression/Linker/2003-08-28-TypeResolvesGlobal2.ll:1.1 Thu Aug 28 23:54:23 2003 +++ llvm/test/Regression/Linker/2003-08-28-TypeResolvesGlobal2.ll Mon Sep 15 15:04:28 2003 @@ -1,6 +1,6 @@ -; RUN: as < %s > Output/%s.out1.bc -; RUN: echo "%S = type int" | as > Output/%s.out2.bc -; RUN: link Output/%s.out[21].bc +; RUN: llvm-as < %s > Output/%s.out1.bc +; RUN: echo "%S = type int" | llvm-as > Output/%s.out2.bc +; RUN: llvm-link Output/%s.out[21].bc %S = type opaque Index: llvm/test/Regression/Linker/2003-08-28-TypeResolvesGlobal3.ll diff -u llvm/test/Regression/Linker/2003-08-28-TypeResolvesGlobal3.ll:1.1 llvm/test/Regression/Linker/2003-08-28-TypeResolvesGlobal3.ll:1.2 --- llvm/test/Regression/Linker/2003-08-28-TypeResolvesGlobal3.ll:1.1 Fri Aug 29 00:29:38 2003 +++ llvm/test/Regression/Linker/2003-08-28-TypeResolvesGlobal3.ll Mon Sep 15 15:04:28 2003 @@ -1,6 +1,6 @@ -; RUN: as < %s > Output/%s.out1.bc -; RUN: echo "%S = type int" | as > Output/%s.out2.bc -; RUN: link Output/%s.out[21].bc +; RUN: llvm-as < %s > Output/%s.out1.bc +; RUN: echo "%S = type int" | llvm-as > Output/%s.out2.bc +; RUN: llvm-link Output/%s.out[21].bc %S = type opaque Index: llvm/test/Regression/Linker/AppendingLinkage.ll diff -u llvm/test/Regression/Linker/AppendingLinkage.ll:1.3 llvm/test/Regression/Linker/AppendingLinkage.ll:1.4 --- llvm/test/Regression/Linker/AppendingLinkage.ll:1.3 Sat Sep 6 10:15:03 2003 +++ llvm/test/Regression/Linker/AppendingLinkage.ll Mon Sep 15 15:04:28 2003 @@ -1,8 +1,8 @@ ; Test that appending linkage works correctly. -; RUN: echo "%X = appending global [1x int] [int 8]" | as > %t.2.bc -; RUN: as < %s > %t.1.bc -; RUN: link %t.[12].bc | dis | grep 7 | grep 4 | grep 8 +; RUN: echo "%X = appending global [1x int] [int 8]" | llvm-as > %t.2.bc +; RUN: llvm-as < %s > %t.1.bc +; RUN: llvm-link %t.[12].bc | llvm-dis | grep 7 | grep 4 | grep 8 %X = appending global [2 x int] [int 7, int 4] Index: llvm/test/Regression/Linker/AppendingLinkage2.ll diff -u llvm/test/Regression/Linker/AppendingLinkage2.ll:1.2 llvm/test/Regression/Linker/AppendingLinkage2.ll:1.3 --- llvm/test/Regression/Linker/AppendingLinkage2.ll:1.2 Sat Sep 6 10:15:03 2003 +++ llvm/test/Regression/Linker/AppendingLinkage2.ll Mon Sep 15 15:04:28 2003 @@ -1,7 +1,7 @@ ; Test that appending linkage works correctly when arrays are the same size. -; RUN: echo "%X = appending global [1x int] [int 8]" | as > %t.2.bc -; RUN: as < %s > %t.1.bc -; RUN: link %t.[12].bc | dis | grep 7 | grep 8 +; RUN: echo "%X = appending global [1x int] [int 8]" | llvm-as > %t.2.bc +; RUN: llvm-as < %s > %t.1.bc +; RUN: llvm-link %t.[12].bc | llvm-dis | grep 7 | grep 8 %X = appending global [1 x int] [int 7] Index: llvm/test/Regression/Linker/LinkOnce.ll diff -u llvm/test/Regression/Linker/LinkOnce.ll:1.2 llvm/test/Regression/Linker/LinkOnce.ll:1.3 --- llvm/test/Regression/Linker/LinkOnce.ll:1.2 Sat Sep 6 10:15:03 2003 +++ llvm/test/Regression/Linker/LinkOnce.ll Mon Sep 15 15:04:28 2003 @@ -1,8 +1,8 @@ ; This fails because the linker renames the non-opaque type not the opaque ; one... -; RUN: echo "%X = linkonce global int 8" | as > %t.2.bc -; RUN: as < %s > %t.1.bc -; RUN: link %t.[12].bc | dis +; RUN: echo "%X = linkonce global int 8" | llvm-as > %t.2.bc +; RUN: llvm-as < %s > %t.1.bc +; RUN: llvm-link %t.[12].bc | llvm-dis %X = linkonce global int 7 Index: llvm/test/Regression/Linker/testlink1.ll diff -u llvm/test/Regression/Linker/testlink1.ll:1.9 llvm/test/Regression/Linker/testlink1.ll:1.10 --- llvm/test/Regression/Linker/testlink1.ll:1.9 Sat Sep 6 10:15:04 2003 +++ llvm/test/Regression/Linker/testlink1.ll Mon Sep 15 15:04:28 2003 @@ -1,6 +1,6 @@ -; RUN: as < %s > %t.bc -; RUN: as < `dirname %s`/testlink2.ll > %t2.bc -; RUN: link %t.bc %t2.bc +; RUN: llvm-as < %s > %t.bc +; RUN: llvm-as < `dirname %s`/testlink2.ll > %t2.bc +; RUN: llvm-link %t.bc %t2.bc %MyVar = external global int %MyIntList = global { \2 *, int } { { \2, int }* null, int 17 } From criswell at cs.uiuc.edu Mon Sep 15 15:13:02 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:13:02 2003 Subject: [llvm-commits] CVS: llvm/configure Message-ID: <200309152012.PAA00759@choi.cs.uiuc.edu> Changes in directory llvm: configure updated: 1.25 -> 1.26 --- Log message: Removed llvm/tools/as, llvm/tools/dis, and runtime/GCCLibraries/libexception. --- Diffs of the changes: Index: llvm/configure diff -u llvm/configure:1.25 llvm/configure:1.26 --- llvm/configure:1.25 Mon Sep 15 12:19:36 2003 +++ llvm/configure Mon Sep 15 15:12:47 2003 @@ -1638,9 +1638,6 @@ ac_config_commands="$ac_config_commands runtime/GCCLibraries/libcurses/Makefile" - ac_config_commands="$ac_config_commands runtime/GCCLibraries/libexception/Makefile" - - ac_config_commands="$ac_config_commands runtime/GCCLibraries/libg/Makefile" @@ -1956,15 +1953,9 @@ ac_config_commands="$ac_config_commands tools/analyze/Makefile" - ac_config_commands="$ac_config_commands tools/as/Makefile" - - ac_config_commands="$ac_config_commands tools/bugpoint/Makefile" - ac_config_commands="$ac_config_commands tools/dis/Makefile" - - ac_config_commands="$ac_config_commands tools/extract/Makefile" @@ -4396,7 +4387,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 4399 "configure"' > conftest.$ac_ext + echo '#line 4390 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5237,7 +5228,7 @@ # Provide some information about the compiler. -echo "$as_me:5240:" \ +echo "$as_me:5231:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -6246,11 +6237,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6249: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6240: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6253: \$? = $ac_status" >&5 + echo "$as_me:6244: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6478,11 +6469,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6481: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6472: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6485: \$? = $ac_status" >&5 + echo "$as_me:6476: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6545,11 +6536,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6548: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6539: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:6552: \$? = $ac_status" >&5 + echo "$as_me:6543: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8557,7 +8548,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:10785: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:10798: \$? = $ac_status" >&5 + echo "$as_me:10789: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -10858,11 +10849,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:10861: $lt_compile\"" >&5) + (eval echo "\"\$as_me:10852: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:10865: \$? = $ac_status" >&5 + echo "$as_me:10856: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12101,7 +12092,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:13015: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13028: \$? = $ac_status" >&5 + echo "$as_me:13019: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -13088,11 +13079,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13091: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13082: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13095: \$? = $ac_status" >&5 + echo "$as_me:13086: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15032,11 +15023,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15035: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15026: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15039: \$? = $ac_status" >&5 + echo "$as_me:15030: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -15264,11 +15255,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15267: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15258: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15271: \$? = $ac_status" >&5 + echo "$as_me:15262: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -15331,11 +15322,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15334: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15325: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15338: \$? = $ac_status" >&5 + echo "$as_me:15329: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17343,7 +17334,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext < Changes in directory llvm/autoconf: configure.ac updated: 1.17 -> 1.18 --- Log message: Removed llvm/tools/as, llvm/tools/dis, and runtime/GCCLibraries/libexception. --- Diffs of the changes: Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.17 llvm/autoconf/configure.ac:1.18 --- llvm/autoconf/configure.ac:1.17 Mon Sep 15 12:19:42 2003 +++ llvm/autoconf/configure.ac Mon Sep 15 15:12:48 2003 @@ -71,7 +71,6 @@ AC_CONFIG_MAKEFILE(runtime/GCCLibraries/crtend/Makefile) AC_CONFIG_MAKEFILE(runtime/GCCLibraries/libc/Makefile) AC_CONFIG_MAKEFILE(runtime/GCCLibraries/libcurses/Makefile) -AC_CONFIG_MAKEFILE(runtime/GCCLibraries/libexception/Makefile) AC_CONFIG_MAKEFILE(runtime/GCCLibraries/libg/Makefile) AC_CONFIG_MAKEFILE(runtime/GCCLibraries/libgcc/Makefile) AC_CONFIG_MAKEFILE(runtime/GCCLibraries/libm/Makefile) @@ -177,9 +176,7 @@ AC_CONFIG_MAKEFILE(test/Programs/SingleSource/UnitTests/SetjmpLongjmp/Makefile) AC_CONFIG_MAKEFILE(tools/Makefile) AC_CONFIG_MAKEFILE(tools/analyze/Makefile) -AC_CONFIG_MAKEFILE(tools/as/Makefile) AC_CONFIG_MAKEFILE(tools/bugpoint/Makefile) -AC_CONFIG_MAKEFILE(tools/dis/Makefile) AC_CONFIG_MAKEFILE(tools/extract/Makefile) AC_CONFIG_MAKEFILE(tools/gccas/Makefile) AC_CONFIG_MAKEFILE(tools/gccld/Makefile) From criswell at cs.uiuc.edu Mon Sep 15 15:27:36 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:27:36 2003 Subject: [llvm-commits] CVS: llvm/test/Feature/Makefile Message-ID: <200309152018.PAA00818@choi.cs.uiuc.edu> Changes in directory llvm/test/Feature: Makefile (r1.9) removed --- Log message: Removing Makefile. The QMTest program now handles the running of these tests. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:28:02 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:28:02 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Makefile Message-ID: <200309152019.PAA00859@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression: Makefile (r1.10) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:28:05 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:28:05 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Analysis/Makefile Message-ID: <200309152019.PAA00868@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Analysis: Makefile (r1.3) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:28:08 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:28:08 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Analysis/DSGraph/Makefile Message-ID: <200309152019.PAA00876@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Analysis/DSGraph: Makefile (r1.4) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:28:11 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:28:11 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Analysis/Dominators/Makefile Message-ID: <200309152019.PAA00884@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Analysis/Dominators: Makefile (r1.1) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:28:14 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:28:14 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Analysis/LoopInfo/Makefile Message-ID: <200309152019.PAA00902@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Analysis/LoopInfo: Makefile (r1.2) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:28:16 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:28:16 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Assembler/Makefile Message-ID: <200309152019.PAA00910@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Assembler: Makefile (r1.4) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:28:19 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:28:19 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/BugPoint/Makefile Message-ID: <200309152019.PAA00919@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/BugPoint: Makefile (r1.3) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:28:22 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:28:22 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/C++Frontend/Makefile Message-ID: <200309152019.PAA00930@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/C++Frontend: Makefile (r1.3) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:28:24 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:28:24 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/C++Frontend/CompileFail/Makefile Message-ID: <200309152019.PAA00938@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/C++Frontend/CompileFail: Makefile (r1.1) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:28:27 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:28:27 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/C++Frontend/EH/Makefile Message-ID: <200309152019.PAA00946@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/C++Frontend/EH: Makefile (r1.2) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:28:29 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:28:29 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/CBackend/Makefile Message-ID: <200309152019.PAA00955@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/CBackend: Makefile (r1.8) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:28:32 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:28:32 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/CFrontend/Makefile Message-ID: <200309152019.PAA00963@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/CFrontend: Makefile (r1.5) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:28:34 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:28:34 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Jello/Makefile Message-ID: <200309152019.PAA00971@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Jello: Makefile (r1.6) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:28:37 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:28:37 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/LLC/Makefile Message-ID: <200309152019.PAA00979@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/LLC: Makefile (r1.6) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:28:40 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:28:40 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Linker/Makefile Message-ID: <200309152020.PAA00990@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Linker: Makefile (r1.2) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:28:43 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:28:43 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Other/Makefile Message-ID: <200309152020.PAA00998@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Other: Makefile (r1.2) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:28:45 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:28:45 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Reoptimizer/inst/Makefile Message-ID: <200309152020.PAA01007@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Reoptimizer/inst: Makefile (r1.6) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:28:48 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:28:48 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Reoptimizer/llub/Makefile Message-ID: <200309152020.PAA01015@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Reoptimizer/llub: Makefile (r1.1) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:28:51 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:28:51 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Reoptimizer/ticm/Makefile Message-ID: <200309152020.PAA01023@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Reoptimizer/ticm: Makefile (r1.1) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:28:53 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:28:53 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/TableGen/Makefile Message-ID: <200309152020.PAA01031@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/TableGen: Makefile (r1.1) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:28:56 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:28:56 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/Makefile Message-ID: <200309152020.PAA01039@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms: Makefile (r1.27) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:28:59 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:28:59 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/ADCE/Makefile Message-ID: <200309152020.PAA01050@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/ADCE: Makefile (r1.1) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:29:02 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:29:02 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/BasicAA/Makefile Message-ID: <200309152020.PAA01055@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/BasicAA: Makefile (r1.1) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:29:05 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:29:05 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/ConstProp/Makefile Message-ID: <200309152020.PAA01060@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/ConstProp: Makefile (r1.1) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:29:08 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:29:08 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/ConstantMerge/Makefile Message-ID: <200309152020.PAA01066@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/ConstantMerge: Makefile (r1.1) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:29:10 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:29:10 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/CorrelatedExprs/Makefile Message-ID: <200309152020.PAA01075@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/CorrelatedExprs: Makefile (r1.1) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:29:13 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:29:13 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/DSAnalysis/Makefile Message-ID: <200309152020.PAA01083@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/DSAnalysis: Makefile (r1.4) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:29:16 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:29:16 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/DeadArgElim/Makefile Message-ID: <200309152020.PAA01091@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/DeadArgElim: Makefile (r1.1) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:29:20 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:29:20 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/DecomposeMultiDimRefs/Makefile Message-ID: <200309152020.PAA01099@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/DecomposeMultiDimRefs: Makefile (r1.2) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:29:22 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:29:22 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/FunctionResolve/Makefile Message-ID: <200309152020.PAA01105@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/FunctionResolve: Makefile (r1.1) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:29:25 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:29:25 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/GCSE/Makefile Message-ID: <200309152020.PAA01111@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/GCSE: Makefile (r1.1) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:29:28 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:29:28 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/GlobalDCE/Makefile Message-ID: <200309152020.PAA01127@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/GlobalDCE: Makefile (r1.1) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:29:31 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:29:31 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/IndVarsSimplify/Makefile Message-ID: <200309152020.PAA01135@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/IndVarsSimplify: Makefile (r1.1) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:29:34 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:29:34 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/Inline/Makefile Message-ID: <200309152020.PAA01141@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/Inline: Makefile (r1.2) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:29:37 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:29:37 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/InstCombine/Makefile Message-ID: <200309152020.PAA01146@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/InstCombine: Makefile (r1.1) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:29:40 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:29:40 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/LICM/Makefile Message-ID: <200309152020.PAA01152@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/LICM: Makefile (r1.1) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:29:43 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:29:43 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/LevelRaise/Makefile Message-ID: <200309152020.PAA01157@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/LevelRaise: Makefile (r1.2) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:29:46 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:29:46 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/LoopPreheaders/Makefile Message-ID: <200309152020.PAA01175@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/LoopPreheaders: Makefile (r1.1) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:29:49 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:29:49 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/LowerSetJmp/Makefile Message-ID: <200309152020.PAA01180@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/LowerSetJmp: Makefile (r1.1) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:29:52 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:29:52 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/LowerSwitch/Makefile Message-ID: <200309152020.PAA01186@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/LowerSwitch: Makefile (r1.1) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:29:55 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:29:55 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/Mem2Reg/Makefile Message-ID: <200309152020.PAA01191@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/Mem2Reg: Makefile (r1.1) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:29:59 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:29:59 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/PRE/Makefile Message-ID: <200309152020.PAA01213@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/PRE: Makefile (r1.1) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:30:02 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:30:02 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/PiNodeInserter/Makefile Message-ID: <200309152020.PAA01219@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/PiNodeInserter: Makefile (r1.1) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:30:06 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:30:06 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/ProfilePaths/Makefile Message-ID: <200309152020.PAA01231@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/ProfilePaths: Makefile (r1.1) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:30:09 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:30:09 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/PruneEH/Makefile Message-ID: <200309152020.PAA01236@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/PruneEH: Makefile (r1.1) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:30:13 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:30:13 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/Reassociate/Makefile Message-ID: <200309152021.PAA01242@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/Reassociate: Makefile (r1.1) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:30:16 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:30:16 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/SCCP/Makefile Message-ID: <200309152021.PAA01247@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/SCCP: Makefile (r1.1) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:30:20 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:30:20 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/ScalarRepl/Makefile Message-ID: <200309152021.PAA01252@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/ScalarRepl: Makefile (r1.1) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:30:24 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:30:24 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/SimplifyCFG/Makefile Message-ID: <200309152021.PAA01283@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/SimplifyCFG: Makefile (r1.1) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:30:27 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:30:27 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/TailDup/Makefile Message-ID: <200309152021.PAA01288@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/TailDup: Makefile (r1.1) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 15:30:31 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 15:30:31 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Verifier/Makefile Message-ID: <200309152021.PAA01294@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Verifier: Makefile (r1.1) removed --- Log message: Removing Makefiles. Regression tests are now run by QMTest. --- Diffs of the changes: From criswell at cs.uiuc.edu Mon Sep 15 16:55:02 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 16:55:02 2003 Subject: [llvm-commits] CVS: llvm/test/Makefile Message-ID: <200309152154.QAA14088@choi.cs.uiuc.edu> Changes in directory llvm/test: Makefile updated: 1.38 -> 1.39 --- Log message: QMTest test and resource classes are always register before running the tests. This ensures that any python bytecode generated by another platform is replaced with new pythong bytecode before the tests begin. Perferably, a better method will be implemented in the next few weeks. --- Diffs of the changes: Index: llvm/test/Makefile diff -u llvm/test/Makefile:1.38 llvm/test/Makefile:1.39 --- llvm/test/Makefile:1.38 Mon Sep 8 16:25:35 2003 +++ llvm/test/Makefile Mon Sep 15 16:54:49 2003 @@ -52,11 +52,13 @@ ${MKDIR} $(LLVM_OBJ_ROOT)/test/tmp # -# Register the python code with QMTest +# Right now, QMTest compiles the python test classes and put them into the +# source tree. Since Python bytecode is *not* cross-platform compatible (I +# think), we'll regenerate every time. # -register:: $(LLVM_SRC_ROOT)/test/QMTestDB/QMTest/llvm.pyo - -$(LLVM_SRC_ROOT)/test/QMTestDB/QMTest/llvm.pyo: $(LLVM_SRC_ROOT)/test/QMTestDB/QMTest/llvm.py +# Simultaneous builds won't work, but shared source trees will. +# +register: $(QMTEST) register test llvm.TestAsmDisasm $(QMTEST) register test llvm.AssembleTest $(QMTEST) register test llvm.ConvertToCTest From criswell at cs.uiuc.edu Mon Sep 15 17:15:05 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 17:15:05 2003 Subject: [llvm-commits] CVS: llvm/test/QMTestDB/QMTest/llvm.py Message-ID: <200309152214.RAA02407@choi.cs.uiuc.edu> Changes in directory llvm/test/QMTestDB/QMTest: llvm.py updated: 1.5 -> 1.6 --- Log message: Changed all references of as and dis to llvm-as and llvm-dis. Modified the code to use utilities in the Release and Profile directories, depending upon the current build type. --- Diffs of the changes: Index: llvm/test/QMTestDB/QMTest/llvm.py diff -u llvm/test/QMTestDB/QMTest/llvm.py:1.5 llvm/test/QMTestDB/QMTest/llvm.py:1.6 --- llvm/test/QMTestDB/QMTest/llvm.py:1.5 Mon Sep 15 14:41:09 2003 +++ llvm/test/QMTestDB/QMTest/llvm.py Mon Sep 15 17:14:20 2003 @@ -56,6 +56,7 @@ srcroot=context['srcroot'] buildroot=context['buildroot'] tmpdir=context['tmpdir'] + buildtype=context['buildtype'] # # Construct the pathname of the source file and object file. @@ -66,7 +67,7 @@ # # Construct the pathnames to the various utilities. # - as = buildroot + '/tools/Debug/llvm-as' + as = buildroot + '/tools/' + buildtype + '/llvm-as' # # Assume we will succeed @@ -141,7 +142,7 @@ # # Construct the pathnames to the various utilities. # - dis = buildroot + '/tools/Debug/llvm-dis' + dis = buildroot + '/tools/' + context['buildtype'] + '/llvm-dis' # # Use the LLVM assembler to assemble the program. @@ -215,8 +216,8 @@ # Construct the pathnames to the various utilities. # cc = context['cc'] - as = buildroot + '/tools/' + context['buildtype'] + '/as' - dis = buildroot + '/tools/' + context['buildtype'] + '/dis' + as = buildroot + '/tools/' + context['buildtype'] + '/llvm-as' + dis = buildroot + '/tools/' + context['buildtype'] + '/llvm-dis' # # Construct the command to generate the C source and object @@ -305,7 +306,7 @@ # # Construct the pathnames to the various utilities. # - llc = buildroot + '/tools/Debug/llc' + llc = buildroot + '/tools/' + context['buildtype'] + '/llc' # # Use the LLVM assembler to assemble the program. @@ -376,7 +377,7 @@ # # Construct the pathnames to the various utilities. # - llc = buildroot + '/tools/Debug/llc' + llc = buildroot + '/tools/' + context['buildtype'] + '/llc' # # Use the LLVM assembler to assemble the program. @@ -415,8 +416,8 @@ # # LLVM Utilities # - as='as' - dis='dis' + as='llvm-as' + dis='llvm-dis' opt='opt' # @@ -445,9 +446,9 @@ # # Construct the pathnames to the various utilities. # - self.as = buildroot + '/tools/Debug/as' - self.dis = buildroot + '/tools/Debug/dis' - self.opt = buildroot + '/tools/Debug/opt' + self.as = buildroot + '/tools/' + context['buildtype'] + '/llvm-as' + self.dis = buildroot + '/tools/' + context['buildtype'] + '/llvm-dis' + self.opt = buildroot + '/tools/' + context['buildtype'] + '/opt' # # Run the optimizer. @@ -581,8 +582,8 @@ # # Determine the path to the assembler and disassembler # - as = buildroot + '/tools/Debug/as' - dis = buildroot + '/tools/Debug/dis' + as = buildroot + '/tools/' + context['buildtype'] + '/llvm-as' + dis = buildroot + '/tools/' + context['buildtype'] + '/llvm-dis' # # Find the name of the file to assemble. @@ -684,7 +685,7 @@ # # Construct the pathnames to the various utilities. # - as = buildroot + '/tools/Debug/as' + as = buildroot + '/tools/' + context['buildtype'] + '/llvm-as' # # Use the LLVM assembler to assemble the program. @@ -746,7 +747,7 @@ # # Construct the pathnames to the various utilities. # - lli = buildroot + '/tools/Debug/lli -force-interpreter=false ' + lli = buildroot + '/tools/' + context['buildtype'] + '/lli -force-interpreter=false ' # # Execute the program. @@ -804,7 +805,7 @@ # # Construct the pathnames to the various utilities. # - anal = buildroot + '/tools/Debug/analyze -tddatastructure' + anal = buildroot + '/tools/' + context['buildtype'] + '/analyze -tddatastructure' # # Use the LLVM assembler to assemble the program. @@ -977,7 +978,7 @@ # Construct the pathnames to the various utilities. # cc = context['llvmgcc'] - as = buildroot + '/tools/' + context['buildtype'] + '/as' + as = buildroot + '/tools/' + context['buildtype'] + '/llvm-as' # # Construct the command to generate the LLVM assembly and byte @@ -1154,7 +1155,7 @@ # # Find the pathname of the assembler. # - as = self.buildroot + '/tools/Debug/as' + as = self.buildroot + '/tools/' + context['buildtype'] + '/llvm-as' # # Use the LLVM assembler to create the bytecode file. From lattner at cs.uiuc.edu Mon Sep 15 17:18:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Sep 15 17:18:02 2003 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200309152217.RAA14198@apoc.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.139 -> 1.140 --- Log message: Put llvm .bc files into the BytecodeObj subdirectory instead of the Bytecode subdirectory. This prevents the 'make clean' rule from removing lib/Bytecode --- Diffs of the changes: Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.139 llvm/Makefile.rules:1.140 --- llvm/Makefile.rules:1.139 Mon Sep 15 10:06:54 2003 +++ llvm/Makefile.rules Mon Sep 15 17:17:02 2003 @@ -356,7 +356,7 @@ ObjectsO := $(addprefix $(BUILD_OBJ_DIR)/Release/,$(Objs)) ObjectsP := $(addprefix $(BUILD_OBJ_DIR)/Profile/,$(Objs)) ObjectsG := $(addprefix $(BUILD_OBJ_DIR)/Debug/,$(Objs)) -ObjectsBC := $(addprefix $(BUILD_OBJ_DIR)/Bytecode/,$(addsuffix .bc, $(Srcs))) +ObjectsBC := $(addprefix $(BUILD_OBJ_DIR)/BytecodeObj/,$(addsuffix .bc, $(Srcs))) # # The real objects underlying the libtool objects @@ -642,7 +642,7 @@ #--------------------------------------------------------- -.PRECIOUS: $(BUILD_OBJ_DIR)/Depend/.dir $(BUILD_OBJ_DIR)/Bytecode/.dir +.PRECIOUS: $(BUILD_OBJ_DIR)/Depend/.dir $(BUILD_OBJ_DIR)/BytecodeObj/.dir .PRECIOUS: $(BUILD_OBJ_DIR)/Debug/.dir $(BUILD_OBJ_DIR)/Release/.dir # Create .lo files in the ObjectFiles directory from the .cpp and .c files... @@ -670,15 +670,15 @@ @echo "Compiling $<" $(VERB) $(CompileCG) $< -o $@ -$(BUILD_OBJ_DIR)/Bytecode/%.bc: %.cpp $(BUILD_OBJ_DIR)/Bytecode/.dir $(LCC1XX) +$(BUILD_OBJ_DIR)/BytecodeObj/%.bc: %.cpp $(BUILD_OBJ_DIR)/BytecodeObj/.dir $(LCC1XX) @echo "Compiling $< to bytecode" $(VERB) $(LLVMGXX) $(CompileWarnings) $(CPPFLAGS) -c $< -o $@ -$(BUILD_OBJ_DIR)/Bytecode/%.bc: %.c $(BUILD_OBJ_DIR)/Bytecode/.dir $(LCC1) +$(BUILD_OBJ_DIR)/BytecodeObj/%.bc: %.c $(BUILD_OBJ_DIR)/BytecodeObj/.dir $(LCC1) @echo "Compiling $< to bytecode" $(VERB) $(LLVMGCC) $(CompileWarnings) $(CPPFLAGS) -c $< -o $@ -$(BUILD_OBJ_DIR)/Bytecode/%.bc: %.ll $(BUILD_OBJ_DIR)/Bytecode/.dir $(LLVMAS) +$(BUILD_OBJ_DIR)/BytecodeObj/%.bc: %.ll $(BUILD_OBJ_DIR)/BytecodeObj/.dir $(LLVMAS) @echo "Compiling $< to bytecode" $(VERB) $(LLVMAS) $< -f -o $@ @@ -748,7 +748,7 @@ clean:: $(VERB) $(RM) -rf $(BUILD_OBJ_DIR)/Debug $(BUILD_OBJ_DIR)/Release $(VERB) $(RM) -rf $(BUILD_OBJ_DIR)/Profile $(BUILD_OBJ_DIR)/Depend - $(VERB) $(RM) -rf $(BUILD_OBJ_DIR)/Bytecode + $(VERB) $(RM) -rf $(BUILD_OBJ_DIR)/BytecodeObj $(VERB) $(RM) -f core core.[0-9][0-9]* *.o *.d *.so *~ *.flc $(VERB) $(RM) -f $(LEX_OUTPUT) $(YACC_OUTPUT) From lattner at cs.uiuc.edu Mon Sep 15 17:22:07 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Sep 15 17:22:07 2003 Subject: [llvm-commits] CVS: llvm/www/pubs/2003-04-29-DataStructureAnalysisTR.html Message-ID: <200309152221.RAA01499@tank.cs.uiuc.edu> Changes in directory llvm/www/pubs: 2003-04-29-DataStructureAnalysisTR.html updated: 1.1 -> 1.2 --- Log message: Add note about update --- Diffs of the changes: Index: llvm/www/pubs/2003-04-29-DataStructureAnalysisTR.html diff -u llvm/www/pubs/2003-04-29-DataStructureAnalysisTR.html:1.1 llvm/www/pubs/2003-04-29-DataStructureAnalysisTR.html:1.2 --- llvm/www/pubs/2003-04-29-DataStructureAnalysisTR.html:1.1 Sun May 11 16:35:25 2003 +++ llvm/www/pubs/2003-04-29-DataStructureAnalysisTR.html Mon Sep 15 17:20:56 2003 @@ -40,6 +40,11 @@ Technical Report #UIUCDCS-R-2003-2340, Computer Science Dept., Univ. of Illinois, Apr. 2003. +

Update:

+
    + This document was updated on September 15, 2003 to be more clear and precise. +
+

Download:

  • Data Structure Analysis: An Efficient Context-Sensitive Heap Analysis (PS) From criswell at cs.uiuc.edu Mon Sep 15 21:13:02 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 21:13:02 2003 Subject: [llvm-commits] CVS: llvm/configure Message-ID: <200309160212.VAA28408@choi.cs.uiuc.edu> Changes in directory llvm: configure updated: 1.26 -> 1.27 --- Log message: Have the configure script put llvm.py into the object root. The QMTest program can then use that as the location for loading test and resource class, thus compiling the Python code into the object root as desired. --- Diffs of the changes: Index: llvm/configure diff -u llvm/configure:1.26 llvm/configure:1.27 --- llvm/configure:1.26 Mon Sep 15 15:12:47 2003 +++ llvm/configure Mon Sep 15 21:12:37 2003 @@ -1674,6 +1674,9 @@ ac_config_commands="$ac_config_commands test/Makefile.tests" + ac_config_commands="$ac_config_commands test/QMTestDB/QMTest/llvm.py" + + ac_config_commands="$ac_config_commands test/Programs/Makefile" @@ -4387,7 +4390,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 4390 "configure"' > conftest.$ac_ext + echo '#line 4393 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5228,7 +5231,7 @@ # Provide some information about the compiler. -echo "$as_me:5231:" \ +echo "$as_me:5234:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -6237,11 +6240,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6240: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6243: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6244: \$? = $ac_status" >&5 + echo "$as_me:6247: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6469,11 +6472,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6472: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6475: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6476: \$? = $ac_status" >&5 + echo "$as_me:6479: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6536,11 +6539,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6539: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6542: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:6543: \$? = $ac_status" >&5 + echo "$as_me:6546: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8548,7 +8551,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:10788: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:10789: \$? = $ac_status" >&5 + echo "$as_me:10792: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -10849,11 +10852,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:10852: $lt_compile\"" >&5) + (eval echo "\"\$as_me:10855: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:10856: \$? = $ac_status" >&5 + echo "$as_me:10859: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12092,7 +12095,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:13018: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13019: \$? = $ac_status" >&5 + echo "$as_me:13022: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -13079,11 +13082,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13082: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13085: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13086: \$? = $ac_status" >&5 + echo "$as_me:13089: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15023,11 +15026,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15026: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15029: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15030: \$? = $ac_status" >&5 + echo "$as_me:15033: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -15255,11 +15258,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15258: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15261: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15262: \$? = $ac_status" >&5 + echo "$as_me:15265: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -15322,11 +15325,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15325: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15328: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15329: \$? = $ac_status" >&5 + echo "$as_me:15332: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17334,7 +17337,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext < Changes in directory llvm/autoconf: configure.ac updated: 1.18 -> 1.19 --- Log message: Have the configure script put llvm.py into the object root. The QMTest program can then use that as the location for loading test and resource class, thus compiling the Python code into the object root as desired. --- Diffs of the changes: Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.18 llvm/autoconf/configure.ac:1.19 --- llvm/autoconf/configure.ac:1.18 Mon Sep 15 15:12:48 2003 +++ llvm/autoconf/configure.ac Mon Sep 15 21:12:45 2003 @@ -83,6 +83,7 @@ AC_CONFIG_MAKEFILE(runtime/libtrace/Makefile) AC_CONFIG_MAKEFILE(test/Makefile) AC_CONFIG_MAKEFILE(test/Makefile.tests) +AC_CONFIG_MAKEFILE(test/QMTestDB/QMTest/llvm.py) AC_CONFIG_MAKEFILE(test/Programs/Makefile) AC_CONFIG_MAKEFILE(test/Programs/Makefile.programs) AC_CONFIG_MAKEFILE(test/Programs/TEST.aa.Makefile) From criswell at cs.uiuc.edu Mon Sep 15 22:00:02 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Sep 15 22:00:02 2003 Subject: [llvm-commits] CVS: llvm/test/Makefile Message-ID: <200309160259.VAA29719@choi.cs.uiuc.edu> Changes in directory llvm/test: Makefile updated: 1.39 -> 1.40 --- Log message: Allow multiple object trees to use the source tree tests at once by using a QMTEST_CLASS_PATH local to the object tree. Add the gui target to start the QMTest gui (saves writing a few lines of documentation too). :) --- Diffs of the changes: Index: llvm/test/Makefile diff -u llvm/test/Makefile:1.39 llvm/test/Makefile:1.40 --- llvm/test/Makefile:1.39 Mon Sep 15 16:54:49 2003 +++ llvm/test/Makefile Mon Sep 15 21:59:26 2003 @@ -15,6 +15,7 @@ # QMTest option specifying the location of the QMTest database. QMDB= -D $(LLVM_SRC_ROOT)/test/QMTestDB +QMCLASSES=$(LLVM_OBJ_ROOT)/test/QMTestDB/QMTest # # This is configuration information used by the test suite. In QM Test, it's @@ -33,7 +34,7 @@ # # Location of the QMTest program. # -QMTEST= qmtest $(QMDB) +QMTEST= QMTEST_CLASS_PATH=$(QMCLASSES) qmtest $(QMDB) # @@ -72,4 +73,10 @@ $(QMTEST) register test llvm.AnalyzeTest $(QMTEST) register test llvm.CTest $(QMTEST) register resource llvm.BytecodeResource + +# +# Start up the QMTest GUI +# +gui:: + $(QMTEST) gui --no-browser --daemon From vadve at cs.uiuc.edu Tue Sep 16 00:56:02 2003 From: vadve at cs.uiuc.edu (Vikram Adve) Date: Tue Sep 16 00:56:02 2003 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp Message-ID: <200309160555.AAA19750@psmith.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/InstrSched: InstrScheduling.cpp updated: 1.57 -> 1.58 --- Log message: Add flag to control whether or not delay slots are filled during instruction scheduling (this is off by default). --- Diffs of the changes: Index: llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp diff -u llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp:1.57 llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp:1.58 --- llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp:1.57 Mon Aug 25 17:42:20 2003 +++ llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp Tue Sep 16 00:55:15 2003 @@ -17,6 +17,9 @@ SchedDebugLevel_t SchedDebugLevel; +static cl::opt EnableFillingDelaySlots("sched-fill-delay-slots", + cl::desc("Fill branch delay slots during local scheduling")); + static cl::opt SDL_opt("dsched", cl::Hidden, cl::location(SchedDebugLevel), cl::desc("enable instruction scheduling debugging information"), @@ -1255,7 +1258,8 @@ std::vector delayNodeVec; const MachineInstr* brInstr = NULL; - if (termInstr->getOpcode() != Instruction::Ret) + if (EnableFillingDelaySlots && + termInstr->getOpcode() != Instruction::Ret) { // To find instructions that need delay slots without searching the full // machine code, we assume that the only delayed instructions are CALLs @@ -1285,6 +1289,8 @@ // Also mark delay slots for other delayed instructions to hold NOPs. // Simply passing in an empty delayNodeVec will have this effect. + // If brInstr is not handled above (EnableFillingDelaySlots == false), + // brInstr will be NULL so this will handle the branch instrs. as well. // delayNodeVec.clear(); for (unsigned i=0; i < MBB.size(); ++i) From vadve at cs.uiuc.edu Tue Sep 16 00:57:02 2003 From: vadve at cs.uiuc.edu (Vikram Adve) Date: Tue Sep 16 00:57:02 2003 Subject: [llvm-commits] CVS: llvm/lib/Target/Sparc/SparcInstrSelection.cpp Message-ID: <200309160556.AAA19763@psmith.cs.uiuc.edu> Changes in directory llvm/lib/Target/Sparc: SparcInstrSelection.cpp updated: 1.117 -> 1.118 --- Log message: Fix longjmp case so that, along with the call to abort(), we also generate the appropriate CallArgsDescriptor and tmp. virtual regs. --- Diffs of the changes: Index: llvm/lib/Target/Sparc/SparcInstrSelection.cpp diff -u llvm/lib/Target/Sparc/SparcInstrSelection.cpp:1.117 llvm/lib/Target/Sparc/SparcInstrSelection.cpp:1.118 --- llvm/lib/Target/Sparc/SparcInstrSelection.cpp:1.117 Mon Aug 18 11:06:09 2003 +++ llvm/lib/Target/Sparc/SparcInstrSelection.cpp Tue Sep 16 00:56:22 2003 @@ -1446,8 +1446,28 @@ case LLVMIntrinsic::longjmp: { // call abort() Module* M = callInstr.getParent()->getParent()->getParent(); - Function *F = M->getNamedFunction("abort"); - mvec.push_back(BuildMI(V9::CALL, 1).addReg(F)); + const FunctionType *voidvoidFuncTy = + FunctionType::get(Type::VoidTy, std::vector(), false); + Function *F = M->getOrInsertFunction("abort", voidvoidFuncTy); + assert(F && "Unable to get or create `abort' function declaration"); + + // Create hidden virtual register for return address with type void* + TmpInstruction* retAddrReg = + new TmpInstruction(MachineCodeForInstruction::get(&callInstr), + PointerType::get(Type::VoidTy), &callInstr); + + // Use a descriptor to pass information about call arguments + // to the register allocator. This descriptor will be "owned" + // and freed automatically when the MachineCodeForInstruction + // object for the callInstr goes away. + CallArgsDescriptor* argDesc = + new CallArgsDescriptor(&callInstr, retAddrReg, false, false); + + MachineInstr* callMI = BuildMI(V9::CALL, 1).addPCDisp(F); + callMI->addImplicitRef(retAddrReg, /*isDef*/ true); + + mvec.push_back(callMI); + mvec.push_back(BuildMI(V9::NOP, 0)); return true; } From criswell at cs.uiuc.edu Tue Sep 16 09:59:04 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Tue Sep 16 09:59:04 2003 Subject: [llvm-commits] CVS: llvm/test/QMTestDB/QMTest/llvm.py Message-ID: <200309161457.JAA06456@choi.cs.uiuc.edu> Changes in directory llvm/test/QMTestDB/QMTest: llvm.py updated: 1.6 -> 1.7 --- Log message: Modified the calls to setrlimit() to make Solaris happy. --- Diffs of the changes: Index: llvm/test/QMTestDB/QMTest/llvm.py diff -u llvm/test/QMTestDB/QMTest/llvm.py:1.6 llvm/test/QMTestDB/QMTest/llvm.py:1.7 --- llvm/test/QMTestDB/QMTest/llvm.py:1.6 Mon Sep 15 17:14:20 2003 +++ llvm/test/QMTestDB/QMTest/llvm.py Tue Sep 16 09:57:49 2003 @@ -48,7 +48,8 @@ # # Set the core dump size # - resource.setrlimit (resource.RLIMIT_CORE, (context['coresize'],-1)) + coresize=int(context['coresize']) + resource.setrlimit (resource.RLIMIT_CORE, (coresize,coresize)) # # Fetch the source and build root directories from the context. @@ -124,7 +125,8 @@ # # Set the core dump size # - resource.setrlimit (resource.RLIMIT_CORE, (context['coresize'],-1)) + coresize=int(context['coresize']) + resource.setrlimit (resource.RLIMIT_CORE, (coresize,coresize)) # # Fetch the source and build root directories from the context. @@ -196,7 +198,8 @@ # # Set the core dump size # - resource.setrlimit (resource.RLIMIT_CORE, (context['coresize'],-1)) + coresize=int(context['coresize']) + resource.setrlimit (resource.RLIMIT_CORE, (coresize,coresize)) # # Fetch the source and build root directories from the context. @@ -288,7 +291,8 @@ # # Set the core dump size # - resource.setrlimit (resource.RLIMIT_CORE, (context['coresize'],-1)) + coresize=int(context['coresize']) + resource.setrlimit (resource.RLIMIT_CORE, (coresize,coresize)) # # Fetch the source and build root directories from the context. @@ -359,7 +363,8 @@ # # Set the core dump size # - resource.setrlimit (resource.RLIMIT_CORE, (context['coresize'],-1)) + coresize=int(context['coresize']) + resource.setrlimit (resource.RLIMIT_CORE, (coresize,coresize)) # # Fetch the source and build root directories from the context. @@ -430,7 +435,8 @@ # # Set the core dump size # - resource.setrlimit (resource.RLIMIT_CORE, (context['coresize'],-1)) + coresize=int(context['coresize']) + resource.setrlimit (resource.RLIMIT_CORE, (coresize,coresize)) # # Fetch the source and build root directories from the context. @@ -570,7 +576,8 @@ # # Set the core dump size # - resource.setrlimit (resource.RLIMIT_CORE, (context['coresize'],-1)) + coresize=int(context['coresize']) + resource.setrlimit (resource.RLIMIT_CORE, (coresize,coresize)) # # Determine where the build directory is located. @@ -668,7 +675,8 @@ # # Set the core dump size # - resource.setrlimit (resource.RLIMIT_CORE, (context['coresize'],-1)) + coresize=int(context['coresize']) + resource.setrlimit (resource.RLIMIT_CORE, (coresize,coresize)) # # Fetch the source and build root directories from the context. @@ -730,7 +738,8 @@ # # Set the core dump size # - resource.setrlimit (resource.RLIMIT_CORE, (context['coresize'],-1)) + coresize=int(context['coresize']) + resource.setrlimit (resource.RLIMIT_CORE, (coresize,coresize)) # # Fetch the source and build root directories from the context. @@ -788,7 +797,8 @@ # # Set the core dump size # - resource.setrlimit (resource.RLIMIT_CORE, (context['coresize'],-1)) + coresize=int(context['coresize']) + resource.setrlimit (resource.RLIMIT_CORE, (coresize,coresize)) # # Fetch the source and build root directories from the context. @@ -846,7 +856,7 @@ # # Set the core dump size # - coresize=context['coresize'] + coresize=int(context['coresize']) resource.setrlimit (resource.RLIMIT_CORE, (coresize,coresize)) # @@ -958,7 +968,8 @@ # # Set the core dump size # - resource.setrlimit (resource.RLIMIT_CORE, (context['coresize'],-1)) + coresize=int(context['coresize']) + resource.setrlimit (resource.RLIMIT_CORE, (coresize,coresize)) # # Fetch the source and build root directories from the context. @@ -1052,7 +1063,8 @@ # # Set the core dump size # - resource.setrlimit (resource.RLIMIT_CORE, (context['coresize'],-1)) + coresize=int(context['coresize']) + resource.setrlimit (resource.RLIMIT_CORE, (coresize,coresize)) # # Determine the pathnames to the source code and object code. @@ -1137,7 +1149,8 @@ # # Set the core dump size # - resource.setrlimit (resource.RLIMIT_CORE, (context['coresize'],-1)) + coresize=int(context['coresize']) + resource.setrlimit (resource.RLIMIT_CORE, (coresize,coresize)) # # Determine the pathnames to the source code and object code. From brukman at cs.uiuc.edu Tue Sep 16 10:22:02 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue Sep 16 10:22:02 2003 Subject: [llvm-commits] CVS: llvm/tools/link/Makefile link.cpp Message-ID: <200309161521.KAA27046@zion.cs.uiuc.edu> Changes in directory llvm/tools/link: Makefile (r1.5) removed link.cpp (r1.27) removed --- Log message: `link' has become `llvm-link'. --- Diffs of the changes: From brukman at cs.uiuc.edu Tue Sep 16 10:23:02 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue Sep 16 10:23:02 2003 Subject: [llvm-commits] CVS: llvm/tools/Makefile Message-ID: <200309161522.KAA27070@zion.cs.uiuc.edu> Changes in directory llvm/tools: Makefile updated: 1.22 -> 1.23 --- Log message: `link' is now `llvm-link'. --- Diffs of the changes: Index: llvm/tools/Makefile diff -u llvm/tools/Makefile:1.22 llvm/tools/Makefile:1.23 --- llvm/tools/Makefile:1.22 Mon Sep 15 09:45:00 2003 +++ llvm/tools/Makefile Tue Sep 16 10:21:52 2003 @@ -1,5 +1,5 @@ LEVEL := .. -PARALLEL_DIRS := llvm-as llvm-dis opt gccas llc link lli gccld \ +PARALLEL_DIRS := llvm-as llvm-dis opt gccas llc llvm-link lli gccld \ analyze extract bugpoint llvm-ar include $(LEVEL)/Makefile.common From brukman at cs.uiuc.edu Tue Sep 16 10:24:09 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue Sep 16 10:24:09 2003 Subject: [llvm-commits] CVS: llvm/autoconf/configure.ac Message-ID: <200309161523.KAA27483@zion.cs.uiuc.edu> Changes in directory llvm/autoconf: configure.ac updated: 1.19 -> 1.20 --- Log message: `link' is now `llvm-link'. Also alphabetized the tools for easy reference. --- Diffs of the changes: Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.19 llvm/autoconf/configure.ac:1.20 --- llvm/autoconf/configure.ac:1.19 Mon Sep 15 21:12:45 2003 +++ llvm/autoconf/configure.ac Tue Sep 16 10:22:55 2003 @@ -181,14 +181,14 @@ AC_CONFIG_MAKEFILE(tools/extract/Makefile) AC_CONFIG_MAKEFILE(tools/gccas/Makefile) AC_CONFIG_MAKEFILE(tools/gccld/Makefile) -AC_CONFIG_MAKEFILE(tools/link/Makefile) AC_CONFIG_MAKEFILE(tools/llc/Makefile) -AC_CONFIG_MAKEFILE(tools/lli/Makefile) -AC_CONFIG_MAKEFILE(tools/opt/Makefile) AC_CONFIG_MAKEFILE(tools/llee/Makefile) -AC_CONFIG_MAKEFILE(tools/llvm-as/Makefile) +AC_CONFIG_MAKEFILE(tools/lli/Makefile) AC_CONFIG_MAKEFILE(tools/llvm-ar/Makefile) +AC_CONFIG_MAKEFILE(tools/llvm-as/Makefile) AC_CONFIG_MAKEFILE(tools/llvm-dis/Makefile) +AC_CONFIG_MAKEFILE(tools/llvm-link/Makefile) +AC_CONFIG_MAKEFILE(tools/opt/Makefile) AC_CONFIG_MAKEFILE(utils/Makefile) AC_CONFIG_MAKEFILE(utils/Burg/Makefile) AC_CONFIG_MAKEFILE(utils/Burg/Doc/Makefile) From brukman at cs.uiuc.edu Tue Sep 16 10:26:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue Sep 16 10:26:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/ADCE/2002-01-31-UseStuckAround.ll 2002-05-22-PHITest.ll 2002-05-23-ZeroArgPHITest.ll 2002-05-28-Crash-distilled.ll 2002-05-28-Crash.ll 2002-07-17-AssertionFailure.ll 2002-07-17-PHIAssertion.ll 2003-01-22-PredecessorProblem.ll 2003-04-25-PHIPostDominateProblem.ll 2003-06-11-InvalidCFG.ll 2003-06-24-BadSuccessor.ll 2003-06-24-BasicFunctionality.ll 2003-09-10-UnwindInstFail.ll adcetest.ll basictest.ll basictest1.ll basictest2.ll Message-ID: <200309161525.KAA27589@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/ADCE: 2002-01-31-UseStuckAround.ll updated: 1.1 -> 1.2 2002-05-22-PHITest.ll updated: 1.1 -> 1.2 2002-05-23-ZeroArgPHITest.ll updated: 1.3 -> 1.4 2002-05-28-Crash-distilled.ll updated: 1.1 -> 1.2 2002-05-28-Crash.ll updated: 1.3 -> 1.4 2002-07-17-AssertionFailure.ll updated: 1.2 -> 1.3 2002-07-17-PHIAssertion.ll updated: 1.4 -> 1.5 2003-01-22-PredecessorProblem.ll updated: 1.1 -> 1.2 2003-04-25-PHIPostDominateProblem.ll updated: 1.1 -> 1.2 2003-06-11-InvalidCFG.ll updated: 1.1 -> 1.2 2003-06-24-BadSuccessor.ll updated: 1.1 -> 1.2 2003-06-24-BasicFunctionality.ll updated: 1.2 -> 1.3 2003-09-10-UnwindInstFail.ll updated: 1.1 -> 1.2 adcetest.ll updated: 1.3 -> 1.4 basictest.ll updated: 1.1 -> 1.2 basictest1.ll updated: 1.3 -> 1.4 basictest2.ll updated: 1.3 -> 1.4 --- Log message: Renamed `as' => `llvm-as', `dis' => `llvm-dis', `link' => `llvm-link'. --- Diffs of the changes: Index: llvm/test/Regression/Transforms/ADCE/2002-01-31-UseStuckAround.ll diff -u llvm/test/Regression/Transforms/ADCE/2002-01-31-UseStuckAround.ll:1.1 llvm/test/Regression/Transforms/ADCE/2002-01-31-UseStuckAround.ll:1.2 --- llvm/test/Regression/Transforms/ADCE/2002-01-31-UseStuckAround.ll:1.1 Tue May 7 15:51:58 2002 +++ llvm/test/Regression/Transforms/ADCE/2002-01-31-UseStuckAround.ll Tue Sep 16 10:25:48 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -adce +; RUN: llvm-as < %s | opt -adce implementation Index: llvm/test/Regression/Transforms/ADCE/2002-05-22-PHITest.ll diff -u llvm/test/Regression/Transforms/ADCE/2002-05-22-PHITest.ll:1.1 llvm/test/Regression/Transforms/ADCE/2002-05-22-PHITest.ll:1.2 --- llvm/test/Regression/Transforms/ADCE/2002-05-22-PHITest.ll:1.1 Wed May 22 15:46:30 2002 +++ llvm/test/Regression/Transforms/ADCE/2002-05-22-PHITest.ll Tue Sep 16 10:25:48 2003 @@ -1,6 +1,6 @@ ; It is illegal to remove BB1 because it will mess up the PHI node! ; -; RUN: as < %s | opt -adce | dis | grep BB1 +; RUN: llvm-as < %s | opt -adce | llvm-dis | grep BB1 int "test"(bool %C, int %A, int %B) { Index: llvm/test/Regression/Transforms/ADCE/2002-05-23-ZeroArgPHITest.ll diff -u llvm/test/Regression/Transforms/ADCE/2002-05-23-ZeroArgPHITest.ll:1.3 llvm/test/Regression/Transforms/ADCE/2002-05-23-ZeroArgPHITest.ll:1.4 --- llvm/test/Regression/Transforms/ADCE/2002-05-23-ZeroArgPHITest.ll:1.3 Tue Jun 24 16:51:03 2003 +++ llvm/test/Regression/Transforms/ADCE/2002-05-23-ZeroArgPHITest.ll Tue Sep 16 10:25:48 2003 @@ -4,7 +4,7 @@ ; removed even though there were uses still around. Now the uses are filled ; in with a dummy value before the PHI is deleted. ; -; RUN: as < %s | opt -adce +; RUN: llvm-as < %s | opt -adce %node_t = type { double*, %node_t*, %node_t**, double**, double*, int, int } Index: llvm/test/Regression/Transforms/ADCE/2002-05-28-Crash-distilled.ll diff -u llvm/test/Regression/Transforms/ADCE/2002-05-28-Crash-distilled.ll:1.1 llvm/test/Regression/Transforms/ADCE/2002-05-28-Crash-distilled.ll:1.2 --- llvm/test/Regression/Transforms/ADCE/2002-05-28-Crash-distilled.ll:1.1 Tue May 28 16:29:28 2002 +++ llvm/test/Regression/Transforms/ADCE/2002-05-28-Crash-distilled.ll Tue Sep 16 10:25:48 2003 @@ -1,6 +1,6 @@ ; This testcase is a distilled form of: 2002-05-28-Crash.ll -; RUN: as < %s | opt -adce +; RUN: llvm-as < %s | opt -adce float "test"(int %i) { %F = cast int %i to float ; This BB is not dead Index: llvm/test/Regression/Transforms/ADCE/2002-05-28-Crash.ll diff -u llvm/test/Regression/Transforms/ADCE/2002-05-28-Crash.ll:1.3 llvm/test/Regression/Transforms/ADCE/2002-05-28-Crash.ll:1.4 --- llvm/test/Regression/Transforms/ADCE/2002-05-28-Crash.ll:1.3 Tue Jun 24 16:23:50 2003 +++ llvm/test/Regression/Transforms/ADCE/2002-05-28-Crash.ll Tue Sep 16 10:25:48 2003 @@ -11,7 +11,7 @@ ; return !s; ;} ; -; RUN: as < %s | opt -adce +; RUN: llvm-as < %s | opt -adce implementation ; Functions: Index: llvm/test/Regression/Transforms/ADCE/2002-07-17-AssertionFailure.ll diff -u llvm/test/Regression/Transforms/ADCE/2002-07-17-AssertionFailure.ll:1.2 llvm/test/Regression/Transforms/ADCE/2002-07-17-AssertionFailure.ll:1.3 --- llvm/test/Regression/Transforms/ADCE/2002-07-17-AssertionFailure.ll:1.2 Mon Jul 29 19:10:05 2002 +++ llvm/test/Regression/Transforms/ADCE/2002-07-17-AssertionFailure.ll Tue Sep 16 10:25:48 2003 @@ -3,7 +3,7 @@ ; block in this function, it would work fine, but that would be the part we ; have to fix now, wouldn't it.... ; -; RUN: as < %s | opt -adce +; RUN: llvm-as < %s | opt -adce void %foo(sbyte* %reg5481) { %cast611 = cast sbyte* %reg5481 to sbyte** ; [#uses=1] Index: llvm/test/Regression/Transforms/ADCE/2002-07-17-PHIAssertion.ll diff -u llvm/test/Regression/Transforms/ADCE/2002-07-17-PHIAssertion.ll:1.4 llvm/test/Regression/Transforms/ADCE/2002-07-17-PHIAssertion.ll:1.5 --- llvm/test/Regression/Transforms/ADCE/2002-07-17-PHIAssertion.ll:1.4 Tue Oct 15 16:10:53 2002 +++ llvm/test/Regression/Transforms/ADCE/2002-07-17-PHIAssertion.ll Tue Sep 16 10:25:48 2003 @@ -1,6 +1,6 @@ ; This testcase was extracted from the gzip SPEC benchmark ; -; RUN: as < %s | opt -adce +; RUN: llvm-as < %s | opt -adce %bk = external global uint ; [#uses=2] %hufts = external global uint ; [#uses=1] Index: llvm/test/Regression/Transforms/ADCE/2003-01-22-PredecessorProblem.ll diff -u llvm/test/Regression/Transforms/ADCE/2003-01-22-PredecessorProblem.ll:1.1 llvm/test/Regression/Transforms/ADCE/2003-01-22-PredecessorProblem.ll:1.2 --- llvm/test/Regression/Transforms/ADCE/2003-01-22-PredecessorProblem.ll:1.1 Wed Jan 22 20:11:29 2003 +++ llvm/test/Regression/Transforms/ADCE/2003-01-22-PredecessorProblem.ll Tue Sep 16 10:25:48 2003 @@ -1,5 +1,5 @@ ; Testcase reduced from 197.parser by bugpoint -; RUN: as < %s | opt -adce +; RUN: llvm-as < %s | opt -adce implementation ; Functions: void %conjunction_prune() { Index: llvm/test/Regression/Transforms/ADCE/2003-04-25-PHIPostDominateProblem.ll diff -u llvm/test/Regression/Transforms/ADCE/2003-04-25-PHIPostDominateProblem.ll:1.1 llvm/test/Regression/Transforms/ADCE/2003-04-25-PHIPostDominateProblem.ll:1.2 --- llvm/test/Regression/Transforms/ADCE/2003-04-25-PHIPostDominateProblem.ll:1.1 Fri Apr 25 17:53:12 2003 +++ llvm/test/Regression/Transforms/ADCE/2003-04-25-PHIPostDominateProblem.ll Tue Sep 16 10:25:48 2003 @@ -2,7 +2,7 @@ ; entries for it's postdominator. But I think this can only happen when the ; PHI node is dead, so we just avoid patching up dead PHI nodes. -; RUN: as < %s | opt -adce +; RUN: llvm-as < %s | opt -adce target endian = little target pointersize = 32 Index: llvm/test/Regression/Transforms/ADCE/2003-06-11-InvalidCFG.ll diff -u llvm/test/Regression/Transforms/ADCE/2003-06-11-InvalidCFG.ll:1.1 llvm/test/Regression/Transforms/ADCE/2003-06-11-InvalidCFG.ll:1.2 --- llvm/test/Regression/Transforms/ADCE/2003-06-11-InvalidCFG.ll:1.1 Mon Jun 16 07:05:38 2003 +++ llvm/test/Regression/Transforms/ADCE/2003-06-11-InvalidCFG.ll Tue Sep 16 10:25:48 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -adce -disable-output +; RUN: llvm-as < %s | opt -adce -disable-output %G = external global int* implementation ; Functions: Index: llvm/test/Regression/Transforms/ADCE/2003-06-24-BadSuccessor.ll diff -u llvm/test/Regression/Transforms/ADCE/2003-06-24-BadSuccessor.ll:1.1 llvm/test/Regression/Transforms/ADCE/2003-06-24-BadSuccessor.ll:1.2 --- llvm/test/Regression/Transforms/ADCE/2003-06-24-BadSuccessor.ll:1.1 Tue Jun 24 17:58:05 2003 +++ llvm/test/Regression/Transforms/ADCE/2003-06-24-BadSuccessor.ll Tue Sep 16 10:25:48 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -adce -disable-output +; RUN: llvm-as < %s | opt -adce -disable-output target endian = little target pointersize = 32 Index: llvm/test/Regression/Transforms/ADCE/2003-06-24-BasicFunctionality.ll diff -u llvm/test/Regression/Transforms/ADCE/2003-06-24-BasicFunctionality.ll:1.2 llvm/test/Regression/Transforms/ADCE/2003-06-24-BasicFunctionality.ll:1.3 --- llvm/test/Regression/Transforms/ADCE/2003-06-24-BasicFunctionality.ll:1.2 Sat Jun 28 18:23:15 2003 +++ llvm/test/Regression/Transforms/ADCE/2003-06-24-BasicFunctionality.ll Tue Sep 16 10:25:48 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -adce -simplifycfg | dis | not grep then: +; RUN: llvm-as < %s | opt -adce -simplifycfg | llvm-dis | not grep then: void %dead_test8(int* %data.1, int %idx.1) { entry: ; No predecessors! Index: llvm/test/Regression/Transforms/ADCE/2003-09-10-UnwindInstFail.ll diff -u llvm/test/Regression/Transforms/ADCE/2003-09-10-UnwindInstFail.ll:1.1 llvm/test/Regression/Transforms/ADCE/2003-09-10-UnwindInstFail.ll:1.2 --- llvm/test/Regression/Transforms/ADCE/2003-09-10-UnwindInstFail.ll:1.1 Wed Sep 10 10:33:33 2003 +++ llvm/test/Regression/Transforms/ADCE/2003-09-10-UnwindInstFail.ll Tue Sep 16 10:25:48 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -adce -disable-output +; RUN: llvm-as < %s | opt -adce -disable-output implementation ; Functions: Index: llvm/test/Regression/Transforms/ADCE/adcetest.ll diff -u llvm/test/Regression/Transforms/ADCE/adcetest.ll:1.3 llvm/test/Regression/Transforms/ADCE/adcetest.ll:1.4 --- llvm/test/Regression/Transforms/ADCE/adcetest.ll:1.3 Sat Jun 28 18:23:15 2003 +++ llvm/test/Regression/Transforms/ADCE/adcetest.ll Tue Sep 16 10:25:48 2003 @@ -1,7 +1,7 @@ ; This is the test case taken from Appel's book that illustrates a hard case ; that SCCP gets right, and when followed by ADCE, is completely eliminated ; -; RUN: as < %s | opt -sccp -adce -simplifycfg | dis | not grep br +; RUN: llvm-as < %s | opt -sccp -adce -simplifycfg | llvm-dis | not grep br int "test function"(int %i0, int %j0) { BB1: Index: llvm/test/Regression/Transforms/ADCE/basictest.ll diff -u llvm/test/Regression/Transforms/ADCE/basictest.ll:1.1 llvm/test/Regression/Transforms/ADCE/basictest.ll:1.2 --- llvm/test/Regression/Transforms/ADCE/basictest.ll:1.1 Wed May 22 14:22:44 2002 +++ llvm/test/Regression/Transforms/ADCE/basictest.ll Tue Sep 16 10:25:48 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -adce -simplifycfg | dis +; RUN: llvm-as < %s | opt -adce -simplifycfg | llvm-dis int "Test"(int %A, int %B) { BB1: Index: llvm/test/Regression/Transforms/ADCE/basictest1.ll diff -u llvm/test/Regression/Transforms/ADCE/basictest1.ll:1.3 llvm/test/Regression/Transforms/ADCE/basictest1.ll:1.4 --- llvm/test/Regression/Transforms/ADCE/basictest1.ll:1.3 Tue Jun 24 16:21:31 2003 +++ llvm/test/Regression/Transforms/ADCE/basictest1.ll Tue Sep 16 10:25:48 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -adce -simplifycfg | dis +; RUN: llvm-as < %s | opt -adce -simplifycfg | llvm-dis %FILE = type { int, ubyte*, ubyte*, ubyte, ubyte, uint, uint, uint } %spec_fd_t = type { int, int, int, ubyte* } Index: llvm/test/Regression/Transforms/ADCE/basictest2.ll diff -u llvm/test/Regression/Transforms/ADCE/basictest2.ll:1.3 llvm/test/Regression/Transforms/ADCE/basictest2.ll:1.4 --- llvm/test/Regression/Transforms/ADCE/basictest2.ll:1.3 Tue Jun 24 16:21:31 2003 +++ llvm/test/Regression/Transforms/ADCE/basictest2.ll Tue Sep 16 10:25:49 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -adce -simplifycfg | dis +; RUN: llvm-as < %s | opt -adce -simplifycfg | llvm-dis %FILE = type { int, ubyte*, ubyte*, ubyte, ubyte, uint, uint, uint } %spec_fd_t = type { int, int, int, ubyte* } From brukman at cs.uiuc.edu Tue Sep 16 10:26:06 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue Sep 16 10:26:06 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Other/2002-02-24-InlineBrokePHINodes.ll 2002-03-11-ConstPropCrash.ll Message-ID: <200309161525.KAA27538@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Other: 2002-02-24-InlineBrokePHINodes.ll updated: 1.2 -> 1.3 2002-03-11-ConstPropCrash.ll updated: 1.1 -> 1.2 --- Log message: Renamed `as' => `llvm-as', `dis' => `llvm-dis', `link' => `llvm-link'. --- Diffs of the changes: Index: llvm/test/Regression/Other/2002-02-24-InlineBrokePHINodes.ll diff -u llvm/test/Regression/Other/2002-02-24-InlineBrokePHINodes.ll:1.2 llvm/test/Regression/Other/2002-02-24-InlineBrokePHINodes.ll:1.3 --- llvm/test/Regression/Other/2002-02-24-InlineBrokePHINodes.ll:1.2 Fri Aug 2 11:39:18 2002 +++ llvm/test/Regression/Other/2002-02-24-InlineBrokePHINodes.ll Tue Sep 16 10:25:15 2003 @@ -1,7 +1,7 @@ ; Inlining used to break PHI nodes. This tests that they are correctly updated ; when a node is split around the call instruction. The verifier caught the error. ; -; RUN: as < %s | opt -inline +; RUN: llvm-as < %s | opt -inline ; implementation Index: llvm/test/Regression/Other/2002-03-11-ConstPropCrash.ll diff -u llvm/test/Regression/Other/2002-03-11-ConstPropCrash.ll:1.1 llvm/test/Regression/Other/2002-03-11-ConstPropCrash.ll:1.2 --- llvm/test/Regression/Other/2002-03-11-ConstPropCrash.ll:1.1 Mon Mar 11 16:09:43 2002 +++ llvm/test/Regression/Other/2002-03-11-ConstPropCrash.ll Tue Sep 16 10:25:15 2003 @@ -5,7 +5,7 @@ ; ; Fixed by adding new arguments to ConstantFoldTerminator ; -; RUN: as < %s | opt -constprop +; RUN: llvm-as < %s | opt -constprop implementation From brukman at cs.uiuc.edu Tue Sep 16 10:27:02 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue Sep 16 10:27:02 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/BasicAA/2003-02-26-AccessSizeTest.ll 2003-03-04-GEPCrash.ll 2003-04-22-GEPProblem.ll 2003-04-25-GEPCrash.ll 2003-05-21-GEP-Problem.ll 2003-06-01-AliasCrash.ll 2003-07-03-BasicAACrash.ll featuretest.ll gcsetest.ll licmtest.ll Message-ID: <200309161526.KAA27629@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/BasicAA: 2003-02-26-AccessSizeTest.ll updated: 1.1 -> 1.2 2003-03-04-GEPCrash.ll updated: 1.1 -> 1.2 2003-04-22-GEPProblem.ll updated: 1.1 -> 1.2 2003-04-25-GEPCrash.ll updated: 1.1 -> 1.2 2003-05-21-GEP-Problem.ll updated: 1.2 -> 1.3 2003-06-01-AliasCrash.ll updated: 1.2 -> 1.3 2003-07-03-BasicAACrash.ll updated: 1.1 -> 1.2 featuretest.ll updated: 1.8 -> 1.9 gcsetest.ll updated: 1.4 -> 1.5 licmtest.ll updated: 1.7 -> 1.8 --- Log message: Renamed `as' => `llvm-as', `dis' => `llvm-dis', `link' => `llvm-link'. --- Diffs of the changes: Index: llvm/test/Regression/Transforms/BasicAA/2003-02-26-AccessSizeTest.ll diff -u llvm/test/Regression/Transforms/BasicAA/2003-02-26-AccessSizeTest.ll:1.1 llvm/test/Regression/Transforms/BasicAA/2003-02-26-AccessSizeTest.ll:1.2 --- llvm/test/Regression/Transforms/BasicAA/2003-02-26-AccessSizeTest.ll:1.1 Wed Feb 26 15:39:52 2003 +++ llvm/test/Regression/Transforms/BasicAA/2003-02-26-AccessSizeTest.ll Tue Sep 16 10:26:24 2003 @@ -2,7 +2,7 @@ ; is performed. It is not legal to delete the second load instruction because ; the value computed by the first load instruction is changed by the store. -; RUN: as < %s | opt -load-vn -gcse -instcombine | dis | grep DONOTREMOVE +; RUN: llvm-as < %s | opt -load-vn -gcse -instcombine | llvm-dis | grep DONOTREMOVE int %test() { %A = alloca int Index: llvm/test/Regression/Transforms/BasicAA/2003-03-04-GEPCrash.ll diff -u llvm/test/Regression/Transforms/BasicAA/2003-03-04-GEPCrash.ll:1.1 llvm/test/Regression/Transforms/BasicAA/2003-03-04-GEPCrash.ll:1.2 --- llvm/test/Regression/Transforms/BasicAA/2003-03-04-GEPCrash.ll:1.1 Tue Mar 4 10:33:52 2003 +++ llvm/test/Regression/Transforms/BasicAA/2003-03-04-GEPCrash.ll Tue Sep 16 10:26:24 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -basicaa -aa-eval -disable-output +; RUN: llvm-as < %s | opt -basicaa -aa-eval -disable-output ; Test for a bug in BasicAA which caused a crash when querying equality of P1&P2 void %test({[2 x int],[2 x int]}* %A, long %X, long %Y) { %P1 = getelementptr {[2 x int],[2 x int]}* %A, long 0, ubyte 0, long %X Index: llvm/test/Regression/Transforms/BasicAA/2003-04-22-GEPProblem.ll diff -u llvm/test/Regression/Transforms/BasicAA/2003-04-22-GEPProblem.ll:1.1 llvm/test/Regression/Transforms/BasicAA/2003-04-22-GEPProblem.ll:1.2 --- llvm/test/Regression/Transforms/BasicAA/2003-04-22-GEPProblem.ll:1.1 Tue Apr 22 17:00:15 2003 +++ llvm/test/Regression/Transforms/BasicAA/2003-04-22-GEPProblem.ll Tue Sep 16 10:26:24 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -load-vn -gcse -instcombine | dis | grep sub +; RUN: llvm-as < %s | opt -load-vn -gcse -instcombine | llvm-dis | grep sub ; BasicAA was incorrectly concluding that P1 and P2 didn't conflict! Index: llvm/test/Regression/Transforms/BasicAA/2003-04-25-GEPCrash.ll diff -u llvm/test/Regression/Transforms/BasicAA/2003-04-25-GEPCrash.ll:1.1 llvm/test/Regression/Transforms/BasicAA/2003-04-25-GEPCrash.ll:1.2 --- llvm/test/Regression/Transforms/BasicAA/2003-04-25-GEPCrash.ll:1.1 Fri Apr 25 12:59:02 2003 +++ llvm/test/Regression/Transforms/BasicAA/2003-04-25-GEPCrash.ll Tue Sep 16 10:26:24 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -basicaa -aa-eval -disable-output +; RUN: llvm-as < %s | opt -basicaa -aa-eval -disable-output ; Test for a bug in BasicAA which caused a crash when querying equality of P1&P2 void %test([17 x ushort]* %mask_bits) { %P1 = getelementptr [17 x ushort]* %mask_bits, long 0, long 0 Index: llvm/test/Regression/Transforms/BasicAA/2003-05-21-GEP-Problem.ll diff -u llvm/test/Regression/Transforms/BasicAA/2003-05-21-GEP-Problem.ll:1.2 llvm/test/Regression/Transforms/BasicAA/2003-05-21-GEP-Problem.ll:1.3 --- llvm/test/Regression/Transforms/BasicAA/2003-05-21-GEP-Problem.ll:1.2 Wed May 21 14:55:10 2003 +++ llvm/test/Regression/Transforms/BasicAA/2003-05-21-GEP-Problem.ll Tue Sep 16 10:26:24 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -licm -disable-output +; RUN: llvm-as < %s | opt -licm -disable-output %struct..apr_array_header_t = type { int*, int, int, int, sbyte* } %struct..apr_table_t = type { %struct..apr_array_header_t, uint, [32 x int], [32 x int] } Index: llvm/test/Regression/Transforms/BasicAA/2003-06-01-AliasCrash.ll diff -u llvm/test/Regression/Transforms/BasicAA/2003-06-01-AliasCrash.ll:1.2 llvm/test/Regression/Transforms/BasicAA/2003-06-01-AliasCrash.ll:1.3 --- llvm/test/Regression/Transforms/BasicAA/2003-06-01-AliasCrash.ll:1.2 Mon Jun 2 00:42:16 2003 +++ llvm/test/Regression/Transforms/BasicAA/2003-06-01-AliasCrash.ll Tue Sep 16 10:26:24 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -basicaa -aa-eval -disable-output +; RUN: llvm-as < %s | opt -basicaa -aa-eval -disable-output int %MTConcat([3 x int]* %a.1) { %tmp.961 = getelementptr [3 x int]* %a.1, long 0, long 4 Index: llvm/test/Regression/Transforms/BasicAA/2003-07-03-BasicAACrash.ll diff -u llvm/test/Regression/Transforms/BasicAA/2003-07-03-BasicAACrash.ll:1.1 llvm/test/Regression/Transforms/BasicAA/2003-07-03-BasicAACrash.ll:1.2 --- llvm/test/Regression/Transforms/BasicAA/2003-07-03-BasicAACrash.ll:1.1 Thu Jul 3 01:29:15 2003 +++ llvm/test/Regression/Transforms/BasicAA/2003-07-03-BasicAACrash.ll Tue Sep 16 10:26:24 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -basicaa -aa-eval -disable-output +; RUN: llvm-as < %s | opt -basicaa -aa-eval -disable-output %struct..RefPoint = type { int, { uint, ushort, ushort } } %struct..RefRect = type { %struct..RefPoint, %struct..RefPoint } Index: llvm/test/Regression/Transforms/BasicAA/featuretest.ll diff -u llvm/test/Regression/Transforms/BasicAA/featuretest.ll:1.8 llvm/test/Regression/Transforms/BasicAA/featuretest.ll:1.9 --- llvm/test/Regression/Transforms/BasicAA/featuretest.ll:1.8 Sat Jun 28 18:23:16 2003 +++ llvm/test/Regression/Transforms/BasicAA/featuretest.ll Tue Sep 16 10:26:24 2003 @@ -1,7 +1,7 @@ ; This testcase tests for various features the basicaa test should be able to ; determine, as noted in the comments. -; RUN: as < %s | opt -basicaa -load-vn -gcse -instcombine -dce | dis | not grep REMOVE +; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine -dce | llvm-dis | not grep REMOVE %Global = external global { int } Index: llvm/test/Regression/Transforms/BasicAA/gcsetest.ll diff -u llvm/test/Regression/Transforms/BasicAA/gcsetest.ll:1.4 llvm/test/Regression/Transforms/BasicAA/gcsetest.ll:1.5 --- llvm/test/Regression/Transforms/BasicAA/gcsetest.ll:1.4 Sat Jun 28 18:23:16 2003 +++ llvm/test/Regression/Transforms/BasicAA/gcsetest.ll Tue Sep 16 10:26:24 2003 @@ -2,7 +2,7 @@ ; disambiguating some obvious cases. All loads should be removable in ; this testcase. -; RUN: as < %s | opt -basicaa -load-vn -gcse -instcombine -dce | dis | not grep load +; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine -dce | llvm-dis | not grep load %A = global int 7 %B = global int 8 Index: llvm/test/Regression/Transforms/BasicAA/licmtest.ll diff -u llvm/test/Regression/Transforms/BasicAA/licmtest.ll:1.7 llvm/test/Regression/Transforms/BasicAA/licmtest.ll:1.8 --- llvm/test/Regression/Transforms/BasicAA/licmtest.ll:1.7 Sat Jun 28 18:23:16 2003 +++ llvm/test/Regression/Transforms/BasicAA/licmtest.ll Tue Sep 16 10:26:24 2003 @@ -3,7 +3,7 @@ ; two pointers, then the load should be hoisted, and the store sunk. Thus ; the loop becomes empty and can be deleted by ADCE. -; RUN: as < %s | opt -basicaa -licm --adce | dis | not grep Loop +; RUN: llvm-as < %s | opt -basicaa -licm --adce | llvm-dis | not grep Loop %A = global int 7 %B = global int 8 From brukman at cs.uiuc.edu Tue Sep 16 10:30:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue Sep 16 10:30:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/ConstProp/2002-05-03-DivideByZeroException.ll 2002-05-03-NotOperator.ll 2002-09-03-SetCC-Bools.ll 2003-05-12-DivideError.ll basictest.ll logicaltest.ll nottest.ll phi.ll remtest.ll Message-ID: <200309161529.KAA27843@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/ConstProp: 2002-05-03-DivideByZeroException.ll updated: 1.1 -> 1.2 2002-05-03-NotOperator.ll updated: 1.3 -> 1.4 2002-09-03-SetCC-Bools.ll updated: 1.2 -> 1.3 2003-05-12-DivideError.ll updated: 1.1 -> 1.2 basictest.ll updated: 1.3 -> 1.4 logicaltest.ll updated: 1.2 -> 1.3 nottest.ll updated: 1.4 -> 1.5 phi.ll updated: 1.2 -> 1.3 remtest.ll updated: 1.4 -> 1.5 --- Log message: Renamed `as' => `llvm-as', `dis' => `llvm-dis', `link' => `llvm-link'. --- Diffs of the changes: Index: llvm/test/Regression/Transforms/ConstProp/2002-05-03-DivideByZeroException.ll diff -u llvm/test/Regression/Transforms/ConstProp/2002-05-03-DivideByZeroException.ll:1.1 llvm/test/Regression/Transforms/ConstProp/2002-05-03-DivideByZeroException.ll:1.2 --- llvm/test/Regression/Transforms/ConstProp/2002-05-03-DivideByZeroException.ll:1.1 Fri May 3 15:25:40 2002 +++ llvm/test/Regression/Transforms/ConstProp/2002-05-03-DivideByZeroException.ll Tue Sep 16 10:29:18 2003 @@ -1,6 +1,6 @@ ; Make sure that the constant propogator doesn't divide by zero! ; -; RUN: as < %s | opt -constprop +; RUN: llvm-as < %s | opt -constprop ; int "test"() { Index: llvm/test/Regression/Transforms/ConstProp/2002-05-03-NotOperator.ll diff -u llvm/test/Regression/Transforms/ConstProp/2002-05-03-NotOperator.ll:1.3 llvm/test/Regression/Transforms/ConstProp/2002-05-03-NotOperator.ll:1.4 --- llvm/test/Regression/Transforms/ConstProp/2002-05-03-NotOperator.ll:1.3 Sat Jun 28 18:23:17 2003 +++ llvm/test/Regression/Transforms/ConstProp/2002-05-03-NotOperator.ll Tue Sep 16 10:29:18 2003 @@ -4,7 +4,7 @@ ; Fix #2: The unary not instruction now no longer exists. Change to xor. -; RUN: as < %s | opt -constprop | dis | not grep 'int 0' +; RUN: llvm-as < %s | opt -constprop | llvm-dis | not grep 'int 0' int "test1"() { %R = xor int 123, -1 Index: llvm/test/Regression/Transforms/ConstProp/2002-09-03-SetCC-Bools.ll diff -u llvm/test/Regression/Transforms/ConstProp/2002-09-03-SetCC-Bools.ll:1.2 llvm/test/Regression/Transforms/ConstProp/2002-09-03-SetCC-Bools.ll:1.3 --- llvm/test/Regression/Transforms/ConstProp/2002-09-03-SetCC-Bools.ll:1.2 Sat Jun 28 18:23:17 2003 +++ llvm/test/Regression/Transforms/ConstProp/2002-09-03-SetCC-Bools.ll Tue Sep 16 10:29:18 2003 @@ -1,6 +1,6 @@ ; SetCC on boolean values was not implemented! -; RUN: as < %s | opt -constprop -die | dis | not grep 'set' +; RUN: llvm-as < %s | opt -constprop -die | llvm-dis | not grep 'set' bool "test1"() { %A = setle bool true, false Index: llvm/test/Regression/Transforms/ConstProp/2003-05-12-DivideError.ll diff -u llvm/test/Regression/Transforms/ConstProp/2003-05-12-DivideError.ll:1.1 llvm/test/Regression/Transforms/ConstProp/2003-05-12-DivideError.ll:1.2 --- llvm/test/Regression/Transforms/ConstProp/2003-05-12-DivideError.ll:1.1 Mon May 12 10:18:53 2003 +++ llvm/test/Regression/Transforms/ConstProp/2003-05-12-DivideError.ll Tue Sep 16 10:29:18 2003 @@ -1,6 +1,6 @@ ; Make sure that the constant propagator doesn't cause a sigfpe ; -; RUN: as < %s | opt -constprop +; RUN: llvm-as < %s | opt -constprop ; int "test"() { Index: llvm/test/Regression/Transforms/ConstProp/basictest.ll diff -u llvm/test/Regression/Transforms/ConstProp/basictest.ll:1.3 llvm/test/Regression/Transforms/ConstProp/basictest.ll:1.4 --- llvm/test/Regression/Transforms/ConstProp/basictest.ll:1.3 Sat Jun 28 18:23:17 2003 +++ llvm/test/Regression/Transforms/ConstProp/basictest.ll Tue Sep 16 10:29:18 2003 @@ -1,7 +1,7 @@ ; This is a basic sanity check for constant propogation. The add instruction ; should be eliminated. -; RUN: as < %s | opt -constprop -die | dis | not grep add +; RUN: llvm-as < %s | opt -constprop -die | llvm-dis | not grep add int %test(bool %B) { br bool %B, label %BB1, label %BB2 Index: llvm/test/Regression/Transforms/ConstProp/logicaltest.ll diff -u llvm/test/Regression/Transforms/ConstProp/logicaltest.ll:1.2 llvm/test/Regression/Transforms/ConstProp/logicaltest.ll:1.3 --- llvm/test/Regression/Transforms/ConstProp/logicaltest.ll:1.2 Sat Jun 28 18:23:17 2003 +++ llvm/test/Regression/Transforms/ConstProp/logicaltest.ll Tue Sep 16 10:29:18 2003 @@ -1,6 +1,6 @@ ; Ensure constant propogation of logical instructions is working correctly. -; RUN: as < %s | opt -constprop -die | dis | not ggrep -E 'and|or|xor' +; RUN: llvm-as < %s | opt -constprop -die | llvm-dis | not ggrep -E 'and|or|xor' int "test1"() { %R = and int 4,1234 ret int %R } Index: llvm/test/Regression/Transforms/ConstProp/nottest.ll diff -u llvm/test/Regression/Transforms/ConstProp/nottest.ll:1.4 llvm/test/Regression/Transforms/ConstProp/nottest.ll:1.5 --- llvm/test/Regression/Transforms/ConstProp/nottest.ll:1.4 Sat Jun 28 18:23:17 2003 +++ llvm/test/Regression/Transforms/ConstProp/nottest.ll Tue Sep 16 10:29:18 2003 @@ -1,6 +1,6 @@ ; Ensure constant propogation of 'not' instructions is working correctly. -; RUN: as < %s | opt -constprop -die | dis | not grep xor +; RUN: llvm-as < %s | opt -constprop -die | llvm-dis | not grep xor int "test1"() { %R = xor int 4, -1 Index: llvm/test/Regression/Transforms/ConstProp/phi.ll diff -u llvm/test/Regression/Transforms/ConstProp/phi.ll:1.2 llvm/test/Regression/Transforms/ConstProp/phi.ll:1.3 --- llvm/test/Regression/Transforms/ConstProp/phi.ll:1.2 Sat Jun 28 18:23:17 2003 +++ llvm/test/Regression/Transforms/ConstProp/phi.ll Tue Sep 16 10:29:18 2003 @@ -1,7 +1,7 @@ ; This is a basic sanity check for constant propogation. The add instruction ; should be eliminated. -; RUN: as < %s | opt -constprop -die | dis | not grep phi +; RUN: llvm-as < %s | opt -constprop -die | llvm-dis | not grep phi int %test(bool %B) { BB0: Index: llvm/test/Regression/Transforms/ConstProp/remtest.ll diff -u llvm/test/Regression/Transforms/ConstProp/remtest.ll:1.4 llvm/test/Regression/Transforms/ConstProp/remtest.ll:1.5 --- llvm/test/Regression/Transforms/ConstProp/remtest.ll:1.4 Sat Jun 28 18:23:17 2003 +++ llvm/test/Regression/Transforms/ConstProp/remtest.ll Tue Sep 16 10:29:18 2003 @@ -1,6 +1,6 @@ ; Ensure constant propagation of remainder instructions is working correctly. -; RUN: as < %s | opt -constprop -die | dis | not grep rem +; RUN: llvm-as < %s | opt -constprop -die | llvm-dis | not grep rem int %test1() { %R = rem int 4, 3 From brukman at cs.uiuc.edu Tue Sep 16 10:30:06 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue Sep 16 10:30:06 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/Reassociate/2002-05-15-AgressiveSubMove.ll 2002-05-15-MissedTree.ll 2002-05-15-SubReassociate.ll 2002-05-15-SubReassociate2.ll 2002-07-09-DominanceProblem.ll 2003-08-12-InfiniteLoop.ll basictest.ll basictest2.ll looptest.ll otherops.ll subtest.ll Message-ID: <200309161529.KAA27818@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/Reassociate: 2002-05-15-AgressiveSubMove.ll updated: 1.3 -> 1.4 2002-05-15-MissedTree.ll updated: 1.2 -> 1.3 2002-05-15-SubReassociate.ll updated: 1.3 -> 1.4 2002-05-15-SubReassociate2.ll updated: 1.2 -> 1.3 2002-07-09-DominanceProblem.ll updated: 1.2 -> 1.3 2003-08-12-InfiniteLoop.ll updated: 1.1 -> 1.2 basictest.ll updated: 1.2 -> 1.3 basictest2.ll updated: 1.2 -> 1.3 looptest.ll updated: 1.3 -> 1.4 otherops.ll updated: 1.2 -> 1.3 subtest.ll updated: 1.3 -> 1.4 --- Log message: Renamed `as' => `llvm-as', `dis' => `llvm-dis', `link' => `llvm-link'. --- Diffs of the changes: Index: llvm/test/Regression/Transforms/Reassociate/2002-05-15-AgressiveSubMove.ll diff -u llvm/test/Regression/Transforms/Reassociate/2002-05-15-AgressiveSubMove.ll:1.3 llvm/test/Regression/Transforms/Reassociate/2002-05-15-AgressiveSubMove.ll:1.4 --- llvm/test/Regression/Transforms/Reassociate/2002-05-15-AgressiveSubMove.ll:1.3 Sat Jun 28 18:23:31 2003 +++ llvm/test/Regression/Transforms/Reassociate/2002-05-15-AgressiveSubMove.ll Tue Sep 16 10:29:47 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -reassociate -instcombine -constprop -dce | dis | not grep add +; RUN: llvm-as < %s | opt -reassociate -instcombine -constprop -dce | llvm-dis | not grep add int %test(int %A) { %X = add int %A, 1 Index: llvm/test/Regression/Transforms/Reassociate/2002-05-15-MissedTree.ll diff -u llvm/test/Regression/Transforms/Reassociate/2002-05-15-MissedTree.ll:1.2 llvm/test/Regression/Transforms/Reassociate/2002-05-15-MissedTree.ll:1.3 --- llvm/test/Regression/Transforms/Reassociate/2002-05-15-MissedTree.ll:1.2 Sat Jun 28 18:23:31 2003 +++ llvm/test/Regression/Transforms/Reassociate/2002-05-15-MissedTree.ll Tue Sep 16 10:29:47 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -reassociate -instcombine -constprop -die | dis | not grep 5 +; RUN: llvm-as < %s | opt -reassociate -instcombine -constprop -die | llvm-dis | not grep 5 int %test(int %A, int %B) { %W = add int %B, -5 Index: llvm/test/Regression/Transforms/Reassociate/2002-05-15-SubReassociate.ll diff -u llvm/test/Regression/Transforms/Reassociate/2002-05-15-SubReassociate.ll:1.3 llvm/test/Regression/Transforms/Reassociate/2002-05-15-SubReassociate.ll:1.4 --- llvm/test/Regression/Transforms/Reassociate/2002-05-15-SubReassociate.ll:1.3 Sat Jun 28 18:23:31 2003 +++ llvm/test/Regression/Transforms/Reassociate/2002-05-15-SubReassociate.ll Tue Sep 16 10:29:48 2003 @@ -1,6 +1,6 @@ ; With sub reassociation, constant folding can eliminate all of the constants. ; -; RUN: as < %s | opt -reassociate -constprop -instcombine -dce | dis | not grep add +; RUN: llvm-as < %s | opt -reassociate -constprop -instcombine -dce | llvm-dis | not grep add int %test(int %A, int %B) { %W = add int 5, %B Index: llvm/test/Regression/Transforms/Reassociate/2002-05-15-SubReassociate2.ll diff -u llvm/test/Regression/Transforms/Reassociate/2002-05-15-SubReassociate2.ll:1.2 llvm/test/Regression/Transforms/Reassociate/2002-05-15-SubReassociate2.ll:1.3 --- llvm/test/Regression/Transforms/Reassociate/2002-05-15-SubReassociate2.ll:1.2 Sat Jun 28 18:23:31 2003 +++ llvm/test/Regression/Transforms/Reassociate/2002-05-15-SubReassociate2.ll Tue Sep 16 10:29:48 2003 @@ -1,6 +1,6 @@ ; With sub reassociation, constant folding can eliminate the two 12 constants. ; -; RUN: as < %s | opt -reassociate -constprop -dce | dis | not grep 12 +; RUN: llvm-as < %s | opt -reassociate -constprop -dce | llvm-dis | not grep 12 int "test"(int %A, int %B, int %C, int %D) { %M = add int %A, 12 Index: llvm/test/Regression/Transforms/Reassociate/2002-07-09-DominanceProblem.ll diff -u llvm/test/Regression/Transforms/Reassociate/2002-07-09-DominanceProblem.ll:1.2 llvm/test/Regression/Transforms/Reassociate/2002-07-09-DominanceProblem.ll:1.3 --- llvm/test/Regression/Transforms/Reassociate/2002-07-09-DominanceProblem.ll:1.2 Thu Aug 1 17:26:32 2002 +++ llvm/test/Regression/Transforms/Reassociate/2002-07-09-DominanceProblem.ll Tue Sep 16 10:29:48 2003 @@ -1,6 +1,6 @@ ; The reassociate pass is not preserving dominance properties correctly ; -; RUN: as < %s | opt -reassociate +; RUN: llvm-as < %s | opt -reassociate int %compute_dist(int %i, int %j) { %reg119 = sub int %j, %i Index: llvm/test/Regression/Transforms/Reassociate/2003-08-12-InfiniteLoop.ll diff -u llvm/test/Regression/Transforms/Reassociate/2003-08-12-InfiniteLoop.ll:1.1 llvm/test/Regression/Transforms/Reassociate/2003-08-12-InfiniteLoop.ll:1.2 --- llvm/test/Regression/Transforms/Reassociate/2003-08-12-InfiniteLoop.ll:1.1 Tue Aug 12 16:35:55 2003 +++ llvm/test/Regression/Transforms/Reassociate/2003-08-12-InfiniteLoop.ll Tue Sep 16 10:29:48 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -reassociate -disable-output +; RUN: llvm-as < %s | opt -reassociate -disable-output implementation ; Functions: Index: llvm/test/Regression/Transforms/Reassociate/basictest.ll diff -u llvm/test/Regression/Transforms/Reassociate/basictest.ll:1.2 llvm/test/Regression/Transforms/Reassociate/basictest.ll:1.3 --- llvm/test/Regression/Transforms/Reassociate/basictest.ll:1.2 Sat Jun 28 18:23:31 2003 +++ llvm/test/Regression/Transforms/Reassociate/basictest.ll Tue Sep 16 10:29:48 2003 @@ -1,6 +1,6 @@ ; With reassociation, constant folding can eliminate the 12 and -12 constants. ; -; RUN: as < %s | opt -reassociate -constprop -instcombine -die | dis | not grep add +; RUN: llvm-as < %s | opt -reassociate -constprop -instcombine -die | llvm-dis | not grep add int %test(int %arg) { %tmp1 = sub int -12, %arg Index: llvm/test/Regression/Transforms/Reassociate/basictest2.ll diff -u llvm/test/Regression/Transforms/Reassociate/basictest2.ll:1.2 llvm/test/Regression/Transforms/Reassociate/basictest2.ll:1.3 --- llvm/test/Regression/Transforms/Reassociate/basictest2.ll:1.2 Sat Jun 28 18:23:31 2003 +++ llvm/test/Regression/Transforms/Reassociate/basictest2.ll Tue Sep 16 10:29:48 2003 @@ -1,6 +1,6 @@ ; With reassociation, constant folding can eliminate the +/- 30 constants. ; -; RUN: as < %s | opt -reassociate -constprop -instcombine -die | dis | not grep 30 +; RUN: llvm-as < %s | opt -reassociate -constprop -instcombine -die | llvm-dis | not grep 30 int "test"(int %reg109, int %reg1111) { %reg115 = add int %reg109, -30 ; [#uses=1] Index: llvm/test/Regression/Transforms/Reassociate/looptest.ll diff -u llvm/test/Regression/Transforms/Reassociate/looptest.ll:1.3 llvm/test/Regression/Transforms/Reassociate/looptest.ll:1.4 --- llvm/test/Regression/Transforms/Reassociate/looptest.ll:1.3 Sat Jun 28 18:23:31 2003 +++ llvm/test/Regression/Transforms/Reassociate/looptest.ll Tue Sep 16 10:29:48 2003 @@ -12,7 +12,7 @@ ; In this case, we want to reassociate the specified expr so that i+j can be ; hoisted out of the inner most loop. ; -; RUN: as < %s | opt -reassociate | dis | grep 115 | not grep 117 +; RUN: llvm-as < %s | opt -reassociate | llvm-dis | grep 115 | not grep 117 %.LC0 = internal global [4 x sbyte] c"%d\0A\00" ; <[4 x sbyte]*> [#uses=1] Index: llvm/test/Regression/Transforms/Reassociate/otherops.ll diff -u llvm/test/Regression/Transforms/Reassociate/otherops.ll:1.2 llvm/test/Regression/Transforms/Reassociate/otherops.ll:1.3 --- llvm/test/Regression/Transforms/Reassociate/otherops.ll:1.2 Sat Jun 28 18:23:31 2003 +++ llvm/test/Regression/Transforms/Reassociate/otherops.ll Tue Sep 16 10:29:48 2003 @@ -1,6 +1,6 @@ ; Reassociation should apply to Add, Mul, And, Or, & Xor ; -; RUN: as < %s | opt -reassociate -constprop -instcombine -die | dis | not grep 12 +; RUN: llvm-as < %s | opt -reassociate -constprop -instcombine -die | llvm-dis | not grep 12 int "test_mul"(int %arg) { %tmp1 = mul int 12, %arg Index: llvm/test/Regression/Transforms/Reassociate/subtest.ll diff -u llvm/test/Regression/Transforms/Reassociate/subtest.ll:1.3 llvm/test/Regression/Transforms/Reassociate/subtest.ll:1.4 --- llvm/test/Regression/Transforms/Reassociate/subtest.ll:1.3 Sat Jun 28 18:23:31 2003 +++ llvm/test/Regression/Transforms/Reassociate/subtest.ll Tue Sep 16 10:29:48 2003 @@ -1,6 +1,6 @@ ; With sub reassociation, constant folding can eliminate the 12 and -12 constants. ; -; RUN: as < %s | opt -reassociate -constprop -instcombine -die | dis | not grep 12 +; RUN: llvm-as < %s | opt -reassociate -constprop -instcombine -die | llvm-dis | not grep 12 int "test"(int %A, int %B) { %X = add int -12, %A From brukman at cs.uiuc.edu Tue Sep 16 10:30:10 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue Sep 16 10:30:10 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/PruneEH/recursivetest.llx simpletest.llx Message-ID: <200309161529.KAA27790@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/PruneEH: recursivetest.llx updated: 1.1 -> 1.2 simpletest.llx updated: 1.1 -> 1.2 --- Log message: Renamed `as' => `llvm-as', `dis' => `llvm-dis', `link' => `llvm-link'. --- Diffs of the changes: Index: llvm/test/Regression/Transforms/PruneEH/recursivetest.llx diff -u llvm/test/Regression/Transforms/PruneEH/recursivetest.llx:1.1 llvm/test/Regression/Transforms/PruneEH/recursivetest.llx:1.2 --- llvm/test/Regression/Transforms/PruneEH/recursivetest.llx:1.1 Sat Aug 30 21:38:46 2003 +++ llvm/test/Regression/Transforms/PruneEH/recursivetest.llx Tue Sep 16 10:29:46 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -prune-eh | dis | not grep invoke +; RUN: llvm-as < %s | opt -prune-eh | llvm-dis | not grep invoke implementation Index: llvm/test/Regression/Transforms/PruneEH/simpletest.llx diff -u llvm/test/Regression/Transforms/PruneEH/simpletest.llx:1.1 llvm/test/Regression/Transforms/PruneEH/simpletest.llx:1.2 --- llvm/test/Regression/Transforms/PruneEH/simpletest.llx:1.1 Sat Aug 30 21:38:46 2003 +++ llvm/test/Regression/Transforms/PruneEH/simpletest.llx Tue Sep 16 10:29:46 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -prune-eh | dis | not grep invoke +; RUN: llvm-as < %s | opt -prune-eh | llvm-dis | not grep invoke implementation From brukman at cs.uiuc.edu Tue Sep 16 10:30:14 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue Sep 16 10:30:14 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/ProfilePaths/2002-05-22-CastCrash.ll Message-ID: <200309161529.KAA27774@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/ProfilePaths: 2002-05-22-CastCrash.ll updated: 1.1 -> 1.2 --- Log message: Renamed `as' => `llvm-as', `dis' => `llvm-dis', `link' => `llvm-link'. --- Diffs of the changes: Index: llvm/test/Regression/Transforms/ProfilePaths/2002-05-22-CastCrash.ll diff -u llvm/test/Regression/Transforms/ProfilePaths/2002-05-22-CastCrash.ll:1.1 llvm/test/Regression/Transforms/ProfilePaths/2002-05-22-CastCrash.ll:1.2 --- llvm/test/Regression/Transforms/ProfilePaths/2002-05-22-CastCrash.ll:1.1 Wed May 22 17:02:14 2002 +++ llvm/test/Regression/Transforms/ProfilePaths/2002-05-22-CastCrash.ll Tue Sep 16 10:29:45 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -paths +; RUN: llvm-as < %s | opt -paths ; %globalCrc = uninitialized global uint ; [#uses=1] From brukman at cs.uiuc.edu Tue Sep 16 10:30:18 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue Sep 16 10:30:18 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/PiNodeInserter/substitutetest.ll Message-ID: <200309161529.KAA27767@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/PiNodeInserter: substitutetest.ll updated: 1.2 -> 1.3 --- Log message: Renamed `as' => `llvm-as', `dis' => `llvm-dis', `link' => `llvm-link'. --- Diffs of the changes: Index: llvm/test/Regression/Transforms/PiNodeInserter/substitutetest.ll diff -u llvm/test/Regression/Transforms/PiNodeInserter/substitutetest.ll:1.2 llvm/test/Regression/Transforms/PiNodeInserter/substitutetest.ll:1.3 --- llvm/test/Regression/Transforms/PiNodeInserter/substitutetest.ll:1.2 Sat Jun 28 18:23:29 2003 +++ llvm/test/Regression/Transforms/PiNodeInserter/substitutetest.ll Tue Sep 16 10:29:44 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -pinodes -instcombine -die | dis | not grep add +; RUN: llvm-as < %s | opt -pinodes -instcombine -die | llvm-dis | not grep add int "test"(int %i, int %j) { %c = seteq int %i, 0 From brukman at cs.uiuc.edu Tue Sep 16 10:31:02 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue Sep 16 10:31:02 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/PRE/basictest.ll Message-ID: <200309161530.KAA28299@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/PRE: basictest.ll updated: 1.1 -> 1.2 --- Log message: Renamed `as' => `llvm-as', `dis' => `llvm-dis', `link' => `llvm-link'. --- Diffs of the changes: Index: llvm/test/Regression/Transforms/PRE/basictest.ll diff -u llvm/test/Regression/Transforms/PRE/basictest.ll:1.1 llvm/test/Regression/Transforms/PRE/basictest.ll:1.2 --- llvm/test/Regression/Transforms/PRE/basictest.ll:1.1 Mon Mar 31 15:19:23 2003 +++ llvm/test/Regression/Transforms/PRE/basictest.ll Tue Sep 16 10:29:43 2003 @@ -1,7 +1,7 @@ ; Basic testcases - these are only tested by inspection, but illustrate the ; basic cases PRE can handle. ; -; RUN: as < %s | opt -pre -disable-output +; RUN: llvm-as < %s | opt -pre -disable-output declare void %use(int) declare int %get() From brukman at cs.uiuc.edu Tue Sep 16 10:31:06 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue Sep 16 10:31:06 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/LowerSwitch/2003-05-01-PHIProblem.ll 2003-08-23-EmptySwitch.ll Message-ID: <200309161530.KAA28275@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/LowerSwitch: 2003-05-01-PHIProblem.ll updated: 1.2 -> 1.3 2003-08-23-EmptySwitch.ll updated: 1.1 -> 1.2 --- Log message: Renamed `as' => `llvm-as', `dis' => `llvm-dis', `link' => `llvm-link'. --- Diffs of the changes: Index: llvm/test/Regression/Transforms/LowerSwitch/2003-05-01-PHIProblem.ll diff -u llvm/test/Regression/Transforms/LowerSwitch/2003-05-01-PHIProblem.ll:1.2 llvm/test/Regression/Transforms/LowerSwitch/2003-05-01-PHIProblem.ll:1.3 --- llvm/test/Regression/Transforms/LowerSwitch/2003-05-01-PHIProblem.ll:1.2 Thu May 1 16:38:57 2003 +++ llvm/test/Regression/Transforms/LowerSwitch/2003-05-01-PHIProblem.ll Tue Sep 16 10:29:40 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -lowerswitch +; RUN: llvm-as < %s | opt -lowerswitch void %child(int %ct.1) { entry: ; No predecessors! Index: llvm/test/Regression/Transforms/LowerSwitch/2003-08-23-EmptySwitch.ll diff -u llvm/test/Regression/Transforms/LowerSwitch/2003-08-23-EmptySwitch.ll:1.1 llvm/test/Regression/Transforms/LowerSwitch/2003-08-23-EmptySwitch.ll:1.2 --- llvm/test/Regression/Transforms/LowerSwitch/2003-08-23-EmptySwitch.ll:1.1 Sat Aug 23 17:43:42 2003 +++ llvm/test/Regression/Transforms/LowerSwitch/2003-08-23-EmptySwitch.ll Tue Sep 16 10:29:40 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -lowerswitch +; RUN: llvm-as < %s | opt -lowerswitch void %test() { switch uint 0, label %Next [] From brukman at cs.uiuc.edu Tue Sep 16 10:31:10 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue Sep 16 10:31:10 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/Mem2Reg/2002-03-28-UninitializedVal.ll 2002-05-01-ShouldNotPromoteThisAlloca.ll 2003-04-10-DFNotFound.ll 2003-04-18-DeadBlockProblem.ll 2003-04-24-MultipleIdenticalSuccessors.ll 2003-06-26-IterativePromote.ll DifferingTypes.ll PromoteMemToRegister.ll Message-ID: <200309161530.KAA28294@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/Mem2Reg: 2002-03-28-UninitializedVal.ll updated: 1.1 -> 1.2 2002-05-01-ShouldNotPromoteThisAlloca.ll updated: 1.1 -> 1.2 2003-04-10-DFNotFound.ll updated: 1.1 -> 1.2 2003-04-18-DeadBlockProblem.ll updated: 1.1 -> 1.2 2003-04-24-MultipleIdenticalSuccessors.ll updated: 1.1 -> 1.2 2003-06-26-IterativePromote.ll updated: 1.2 -> 1.3 DifferingTypes.ll updated: 1.2 -> 1.3 PromoteMemToRegister.ll updated: 1.2 -> 1.3 --- Log message: Renamed `as' => `llvm-as', `dis' => `llvm-dis', `link' => `llvm-link'. --- Diffs of the changes: Index: llvm/test/Regression/Transforms/Mem2Reg/2002-03-28-UninitializedVal.ll diff -u llvm/test/Regression/Transforms/Mem2Reg/2002-03-28-UninitializedVal.ll:1.1 llvm/test/Regression/Transforms/Mem2Reg/2002-03-28-UninitializedVal.ll:1.2 --- llvm/test/Regression/Transforms/Mem2Reg/2002-03-28-UninitializedVal.ll:1.1 Thu Mar 28 12:21:05 2002 +++ llvm/test/Regression/Transforms/Mem2Reg/2002-03-28-UninitializedVal.ll Tue Sep 16 10:29:41 2003 @@ -1,6 +1,6 @@ ; Uninitialized values are not handled correctly. ; -; RUN: as < %s | opt -mem2reg +; RUN: llvm-as < %s | opt -mem2reg ; implementation Index: llvm/test/Regression/Transforms/Mem2Reg/2002-05-01-ShouldNotPromoteThisAlloca.ll diff -u llvm/test/Regression/Transforms/Mem2Reg/2002-05-01-ShouldNotPromoteThisAlloca.ll:1.1 llvm/test/Regression/Transforms/Mem2Reg/2002-05-01-ShouldNotPromoteThisAlloca.ll:1.2 --- llvm/test/Regression/Transforms/Mem2Reg/2002-05-01-ShouldNotPromoteThisAlloca.ll:1.1 Wed May 1 10:33:12 2002 +++ llvm/test/Regression/Transforms/Mem2Reg/2002-05-01-ShouldNotPromoteThisAlloca.ll Tue Sep 16 10:29:41 2003 @@ -1,7 +1,7 @@ ; This input caused the mem2reg pass to die because it was trying to promote ; the %r alloca, even though it is invalid to do so in this case! ; -; RUN: as < %s | opt -mem2reg +; RUN: llvm-as < %s | opt -mem2reg implementation Index: llvm/test/Regression/Transforms/Mem2Reg/2003-04-10-DFNotFound.ll diff -u llvm/test/Regression/Transforms/Mem2Reg/2003-04-10-DFNotFound.ll:1.1 llvm/test/Regression/Transforms/Mem2Reg/2003-04-10-DFNotFound.ll:1.2 --- llvm/test/Regression/Transforms/Mem2Reg/2003-04-10-DFNotFound.ll:1.1 Thu Apr 10 14:21:07 2003 +++ llvm/test/Regression/Transforms/Mem2Reg/2003-04-10-DFNotFound.ll Tue Sep 16 10:29:41 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -mem2reg +; RUN: llvm-as < %s | opt -mem2reg implementation ; Functions: Index: llvm/test/Regression/Transforms/Mem2Reg/2003-04-18-DeadBlockProblem.ll diff -u llvm/test/Regression/Transforms/Mem2Reg/2003-04-18-DeadBlockProblem.ll:1.1 llvm/test/Regression/Transforms/Mem2Reg/2003-04-18-DeadBlockProblem.ll:1.2 --- llvm/test/Regression/Transforms/Mem2Reg/2003-04-18-DeadBlockProblem.ll:1.1 Fri Apr 18 14:22:39 2003 +++ llvm/test/Regression/Transforms/Mem2Reg/2003-04-18-DeadBlockProblem.ll Tue Sep 16 10:29:41 2003 @@ -1,5 +1,5 @@ ; This testcases makes sure that mem2reg can handle unreachable blocks. -; RUN: as < %s | opt -mem2reg +; RUN: llvm-as < %s | opt -mem2reg int %test() { %X = alloca int Index: llvm/test/Regression/Transforms/Mem2Reg/2003-04-24-MultipleIdenticalSuccessors.ll diff -u llvm/test/Regression/Transforms/Mem2Reg/2003-04-24-MultipleIdenticalSuccessors.ll:1.1 llvm/test/Regression/Transforms/Mem2Reg/2003-04-24-MultipleIdenticalSuccessors.ll:1.2 --- llvm/test/Regression/Transforms/Mem2Reg/2003-04-24-MultipleIdenticalSuccessors.ll:1.1 Thu Apr 24 19:46:14 2003 +++ llvm/test/Regression/Transforms/Mem2Reg/2003-04-24-MultipleIdenticalSuccessors.ll Tue Sep 16 10:29:41 2003 @@ -1,7 +1,7 @@ ; Mem2reg used to only add one incoming value to a PHI node, even if it had ; multiple incoming edges from a block. ; -; RUN: as < %s | opt -mem2reg -disable-output +; RUN: llvm-as < %s | opt -mem2reg -disable-output int %test(bool %c1, bool %c2) { %X = alloca int Index: llvm/test/Regression/Transforms/Mem2Reg/2003-06-26-IterativePromote.ll diff -u llvm/test/Regression/Transforms/Mem2Reg/2003-06-26-IterativePromote.ll:1.2 llvm/test/Regression/Transforms/Mem2Reg/2003-06-26-IterativePromote.ll:1.3 --- llvm/test/Regression/Transforms/Mem2Reg/2003-06-26-IterativePromote.ll:1.2 Sat Jun 28 18:23:26 2003 +++ llvm/test/Regression/Transforms/Mem2Reg/2003-06-26-IterativePromote.ll Tue Sep 16 10:29:41 2003 @@ -1,5 +1,5 @@ ; Promoting some values allows promotion of other values. -; RUN: as < %s | opt -mem2reg | dis | not grep alloca +; RUN: llvm-as < %s | opt -mem2reg | llvm-dis | not grep alloca int %test2() { %result = alloca int ; ty=int* Index: llvm/test/Regression/Transforms/Mem2Reg/DifferingTypes.ll diff -u llvm/test/Regression/Transforms/Mem2Reg/DifferingTypes.ll:1.2 llvm/test/Regression/Transforms/Mem2Reg/DifferingTypes.ll:1.3 --- llvm/test/Regression/Transforms/Mem2Reg/DifferingTypes.ll:1.2 Sat Jun 28 18:23:26 2003 +++ llvm/test/Regression/Transforms/Mem2Reg/DifferingTypes.ll Tue Sep 16 10:29:41 2003 @@ -2,7 +2,7 @@ ; generated code should perform the appropriate masking operations required ; depending on the endianness of the target... -; RUN: as < %s | opt -mem2reg | dis | not grep 'alloca' +; RUN: llvm-as < %s | opt -mem2reg | llvm-dis | not grep 'alloca' implementation Index: llvm/test/Regression/Transforms/Mem2Reg/PromoteMemToRegister.ll diff -u llvm/test/Regression/Transforms/Mem2Reg/PromoteMemToRegister.ll:1.2 llvm/test/Regression/Transforms/Mem2Reg/PromoteMemToRegister.ll:1.3 --- llvm/test/Regression/Transforms/Mem2Reg/PromoteMemToRegister.ll:1.2 Sat Jun 28 18:23:26 2003 +++ llvm/test/Regression/Transforms/Mem2Reg/PromoteMemToRegister.ll Tue Sep 16 10:29:41 2003 @@ -1,5 +1,5 @@ ; Simple sanity check testcase. Both alloca's should be eliminated. -; RUN: as < %s | opt -mem2reg | dis | not grep 'alloca' +; RUN: llvm-as < %s | opt -mem2reg | llvm-dis | not grep 'alloca' implementation From brukman at cs.uiuc.edu Tue Sep 16 10:31:15 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue Sep 16 10:31:15 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/LowerSetJmp/simpletest.ll Message-ID: <200309161530.KAA28266@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/LowerSetJmp: simpletest.ll updated: 1.1 -> 1.2 --- Log message: Renamed `as' => `llvm-as', `dis' => `llvm-dis', `link' => `llvm-link'. --- Diffs of the changes: Index: llvm/test/Regression/Transforms/LowerSetJmp/simpletest.ll diff -u llvm/test/Regression/Transforms/LowerSetJmp/simpletest.ll:1.1 llvm/test/Regression/Transforms/LowerSetJmp/simpletest.ll:1.2 --- llvm/test/Regression/Transforms/LowerSetJmp/simpletest.ll:1.1 Sat May 17 17:18:33 2003 +++ llvm/test/Regression/Transforms/LowerSetJmp/simpletest.ll Tue Sep 16 10:29:39 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -lowersetjmp | dis | grep invoke +; RUN: llvm-as < %s | opt -lowersetjmp | llvm-dis | grep invoke %JmpBuf = type int %.str_1 = internal constant [13 x sbyte] c"returned %d\0A\00" From brukman at cs.uiuc.edu Tue Sep 16 10:31:19 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue Sep 16 10:31:19 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/LoopPreheaders/2003-04-25-AssertFail.ll 2003-05-12-PreheaderExitOfChild.ll 2003-08-15-PreheadersFail.ll basictest.ll hardertest.ll Message-ID: <200309161530.KAA28261@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/LoopPreheaders: 2003-04-25-AssertFail.ll updated: 1.2 -> 1.3 2003-05-12-PreheaderExitOfChild.ll updated: 1.1 -> 1.2 2003-08-15-PreheadersFail.ll updated: 1.2 -> 1.3 basictest.ll updated: 1.1 -> 1.2 hardertest.ll updated: 1.1 -> 1.2 --- Log message: Renamed `as' => `llvm-as', `dis' => `llvm-dis', `link' => `llvm-link'. --- Diffs of the changes: Index: llvm/test/Regression/Transforms/LoopPreheaders/2003-04-25-AssertFail.ll diff -u llvm/test/Regression/Transforms/LoopPreheaders/2003-04-25-AssertFail.ll:1.2 llvm/test/Regression/Transforms/LoopPreheaders/2003-04-25-AssertFail.ll:1.3 --- llvm/test/Regression/Transforms/LoopPreheaders/2003-04-25-AssertFail.ll:1.2 Sat Apr 26 14:33:51 2003 +++ llvm/test/Regression/Transforms/LoopPreheaders/2003-04-25-AssertFail.ll Tue Sep 16 10:29:38 2003 @@ -1,7 +1,7 @@ ; This testcase exposed a problem with the loop identification pass (LoopInfo). ; Basically, it was incorrectly calculating the loop nesting information. ; -; RUN: as < %s | opt -preheaders +; RUN: llvm-as < %s | opt -preheaders implementation ; Functions: Index: llvm/test/Regression/Transforms/LoopPreheaders/2003-05-12-PreheaderExitOfChild.ll diff -u llvm/test/Regression/Transforms/LoopPreheaders/2003-05-12-PreheaderExitOfChild.ll:1.1 llvm/test/Regression/Transforms/LoopPreheaders/2003-05-12-PreheaderExitOfChild.ll:1.2 --- llvm/test/Regression/Transforms/LoopPreheaders/2003-05-12-PreheaderExitOfChild.ll:1.1 Mon May 12 16:57:41 2003 +++ llvm/test/Regression/Transforms/LoopPreheaders/2003-05-12-PreheaderExitOfChild.ll Tue Sep 16 10:29:38 2003 @@ -2,7 +2,7 @@ ; inserted for the "fail" loop, but the exit block of a loop is not updated ; to be the preheader instead of the exit loop itself. -; RUN: as < %s | opt -preheaders +; RUN: llvm-as < %s | opt -preheaders int %re_match_2() { br label %loopentry.1 Index: llvm/test/Regression/Transforms/LoopPreheaders/2003-08-15-PreheadersFail.ll diff -u llvm/test/Regression/Transforms/LoopPreheaders/2003-08-15-PreheadersFail.ll:1.2 llvm/test/Regression/Transforms/LoopPreheaders/2003-08-15-PreheadersFail.ll:1.3 --- llvm/test/Regression/Transforms/LoopPreheaders/2003-08-15-PreheadersFail.ll:1.2 Sat Aug 16 15:56:35 2003 +++ llvm/test/Regression/Transforms/LoopPreheaders/2003-08-15-PreheadersFail.ll Tue Sep 16 10:29:38 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -tailduplicate -instcombine -simplifycfg -licm -disable-output +; RUN: llvm-as < %s | opt -tailduplicate -instcombine -simplifycfg -licm -disable-output target endian = little target pointersize = 32 Index: llvm/test/Regression/Transforms/LoopPreheaders/basictest.ll diff -u llvm/test/Regression/Transforms/LoopPreheaders/basictest.ll:1.1 llvm/test/Regression/Transforms/LoopPreheaders/basictest.ll:1.2 --- llvm/test/Regression/Transforms/LoopPreheaders/basictest.ll:1.1 Thu Sep 26 14:50:11 2002 +++ llvm/test/Regression/Transforms/LoopPreheaders/basictest.ll Tue Sep 16 10:29:38 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -preheaders +; RUN: llvm-as < %s | opt -preheaders implementation Index: llvm/test/Regression/Transforms/LoopPreheaders/hardertest.ll diff -u llvm/test/Regression/Transforms/LoopPreheaders/hardertest.ll:1.1 llvm/test/Regression/Transforms/LoopPreheaders/hardertest.ll:1.2 --- llvm/test/Regression/Transforms/LoopPreheaders/hardertest.ll:1.1 Thu Sep 26 14:50:11 2002 +++ llvm/test/Regression/Transforms/LoopPreheaders/hardertest.ll Tue Sep 16 10:29:38 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -preheaders +; RUN: llvm-as < %s | opt -preheaders void %foo(bool %C) { br bool %C, label %T, label %F From brukman at cs.uiuc.edu Tue Sep 16 10:31:23 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue Sep 16 10:31:23 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/LICM/2003-02-26-LoopExitNotDominated.ll 2003-02-27-NestedLoopExitBlocks.ll 2003-02-27-PreheaderExitNodeUpdate.ll 2003-02-27-PreheaderProblem.ll 2003-02-27-StoreSinkPHIs.ll 2003-02-28-PromoteDifferentType.ll 2003-05-02-LoadHoist.ll 2003-08-04-TrappingInstHoist.ll 2003-08-04-TrappingInstOkHoist.ll basictest.ll no-preheader-test.ll scalar_promote.ll Message-ID: <200309161530.KAA28179@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/LICM: 2003-02-26-LoopExitNotDominated.ll updated: 1.1 -> 1.2 2003-02-27-NestedLoopExitBlocks.ll updated: 1.1 -> 1.2 2003-02-27-PreheaderExitNodeUpdate.ll updated: 1.1 -> 1.2 2003-02-27-PreheaderProblem.ll updated: 1.2 -> 1.3 2003-02-27-StoreSinkPHIs.ll updated: 1.1 -> 1.2 2003-02-28-PromoteDifferentType.ll updated: 1.2 -> 1.3 2003-05-02-LoadHoist.ll updated: 1.2 -> 1.3 2003-08-04-TrappingInstHoist.ll updated: 1.1 -> 1.2 2003-08-04-TrappingInstOkHoist.ll updated: 1.1 -> 1.2 basictest.ll updated: 1.1 -> 1.2 no-preheader-test.ll updated: 1.1 -> 1.2 scalar_promote.ll updated: 1.2 -> 1.3 --- Log message: Renamed `as' => `llvm-as', `dis' => `llvm-dis', `link' => `llvm-link'. --- Diffs of the changes: Index: llvm/test/Regression/Transforms/LICM/2003-02-26-LoopExitNotDominated.ll diff -u llvm/test/Regression/Transforms/LICM/2003-02-26-LoopExitNotDominated.ll:1.1 llvm/test/Regression/Transforms/LICM/2003-02-26-LoopExitNotDominated.ll:1.2 --- llvm/test/Regression/Transforms/LICM/2003-02-26-LoopExitNotDominated.ll:1.1 Wed Feb 26 17:16:44 2003 +++ llvm/test/Regression/Transforms/LICM/2003-02-26-LoopExitNotDominated.ll Tue Sep 16 10:29:35 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -basicaa -licm -disable-output +; RUN: llvm-as < %s | opt -basicaa -licm -disable-output ;%MoveArray = external global [64 x ulong] Index: llvm/test/Regression/Transforms/LICM/2003-02-27-NestedLoopExitBlocks.ll diff -u llvm/test/Regression/Transforms/LICM/2003-02-27-NestedLoopExitBlocks.ll:1.1 llvm/test/Regression/Transforms/LICM/2003-02-27-NestedLoopExitBlocks.ll:1.2 --- llvm/test/Regression/Transforms/LICM/2003-02-27-NestedLoopExitBlocks.ll:1.1 Thu Feb 27 20:55:26 2003 +++ llvm/test/Regression/Transforms/LICM/2003-02-27-NestedLoopExitBlocks.ll Tue Sep 16 10:29:35 2003 @@ -1,6 +1,6 @@ ; Exit blocks need to be updated for all nested loops... -; RUN: as < %s | opt -preheaders +; RUN: llvm-as < %s | opt -preheaders implementation ; Functions: Index: llvm/test/Regression/Transforms/LICM/2003-02-27-PreheaderExitNodeUpdate.ll diff -u llvm/test/Regression/Transforms/LICM/2003-02-27-PreheaderExitNodeUpdate.ll:1.1 llvm/test/Regression/Transforms/LICM/2003-02-27-PreheaderExitNodeUpdate.ll:1.2 --- llvm/test/Regression/Transforms/LICM/2003-02-27-PreheaderExitNodeUpdate.ll:1.1 Thu Feb 27 16:34:31 2003 +++ llvm/test/Regression/Transforms/LICM/2003-02-27-PreheaderExitNodeUpdate.ll Tue Sep 16 10:29:35 2003 @@ -1,7 +1,7 @@ ; This testcase fails because preheader insertion is not updating exit node ; information for loops. -; RUN: as < %s | opt -licm +; RUN: llvm-as < %s | opt -licm int %main(int %argc, sbyte** %argv) { bb0: ; No predecessors! Index: llvm/test/Regression/Transforms/LICM/2003-02-27-PreheaderProblem.ll diff -u llvm/test/Regression/Transforms/LICM/2003-02-27-PreheaderProblem.ll:1.2 llvm/test/Regression/Transforms/LICM/2003-02-27-PreheaderProblem.ll:1.3 --- llvm/test/Regression/Transforms/LICM/2003-02-27-PreheaderProblem.ll:1.2 Sat Jun 28 18:23:25 2003 +++ llvm/test/Regression/Transforms/LICM/2003-02-27-PreheaderProblem.ll Tue Sep 16 10:29:35 2003 @@ -3,7 +3,7 @@ ; happens because preheader insertion doesn't insert a preheader for this ; case... bad. -; RUN: as < %s | opt -licm -adce -simplifycfg | dis | not grep 'br ' +; RUN: llvm-as < %s | opt -licm -adce -simplifycfg | llvm-dis | not grep 'br ' int %main(int %argc) { br label %bb5 Index: llvm/test/Regression/Transforms/LICM/2003-02-27-StoreSinkPHIs.ll diff -u llvm/test/Regression/Transforms/LICM/2003-02-27-StoreSinkPHIs.ll:1.1 llvm/test/Regression/Transforms/LICM/2003-02-27-StoreSinkPHIs.ll:1.2 --- llvm/test/Regression/Transforms/LICM/2003-02-27-StoreSinkPHIs.ll:1.1 Thu Feb 27 15:59:31 2003 +++ llvm/test/Regression/Transforms/LICM/2003-02-27-StoreSinkPHIs.ll Tue Sep 16 10:29:35 2003 @@ -1,6 +1,6 @@ ; LICM is adding stores before phi nodes. bad. -; RUN: as < %s | opt -licm +; RUN: llvm-as < %s | opt -licm bool %test(bool %c) { br bool %c, label %Loop, label %Out Index: llvm/test/Regression/Transforms/LICM/2003-02-28-PromoteDifferentType.ll diff -u llvm/test/Regression/Transforms/LICM/2003-02-28-PromoteDifferentType.ll:1.2 llvm/test/Regression/Transforms/LICM/2003-02-28-PromoteDifferentType.ll:1.3 --- llvm/test/Regression/Transforms/LICM/2003-02-28-PromoteDifferentType.ll:1.2 Fri Feb 28 13:21:27 2003 +++ llvm/test/Regression/Transforms/LICM/2003-02-28-PromoteDifferentType.ll Tue Sep 16 10:29:35 2003 @@ -1,6 +1,6 @@ ; Test that hoisting is disabled for pointers of different types... ; -; RUN: as < %s | opt -licm +; RUN: llvm-as < %s | opt -licm void %test(int* %P) { br label %Loop Index: llvm/test/Regression/Transforms/LICM/2003-05-02-LoadHoist.ll diff -u llvm/test/Regression/Transforms/LICM/2003-05-02-LoadHoist.ll:1.2 llvm/test/Regression/Transforms/LICM/2003-05-02-LoadHoist.ll:1.3 --- llvm/test/Regression/Transforms/LICM/2003-05-02-LoadHoist.ll:1.2 Tue Jul 1 15:31:45 2003 +++ llvm/test/Regression/Transforms/LICM/2003-05-02-LoadHoist.ll Tue Sep 16 10:29:35 2003 @@ -3,7 +3,7 @@ ; loaded from. Basically if the load gets hoisted, the subtract gets turned ; into a constant zero. ; -; RUN: as < %s | opt -licm -load-vn -gcse -instcombine | dis | grep load +; RUN: llvm-as < %s | opt -licm -load-vn -gcse -instcombine | llvm-dis | grep load %X = global int 7 declare void %foo() Index: llvm/test/Regression/Transforms/LICM/2003-08-04-TrappingInstHoist.ll diff -u llvm/test/Regression/Transforms/LICM/2003-08-04-TrappingInstHoist.ll:1.1 llvm/test/Regression/Transforms/LICM/2003-08-04-TrappingInstHoist.ll:1.2 --- llvm/test/Regression/Transforms/LICM/2003-08-04-TrappingInstHoist.ll:1.1 Tue Aug 5 13:52:42 2003 +++ llvm/test/Regression/Transforms/LICM/2003-08-04-TrappingInstHoist.ll Tue Sep 16 10:29:35 2003 @@ -1,7 +1,7 @@ ; This testcase tests for a problem where LICM hoists ; potentially trapping instructions when they are not guaranteed to execute. ; -; RUN: as < %s | opt -licm | dis | grep -C 2 "IfUnEqual" | grep div +; RUN: llvm-as < %s | opt -licm | llvm-dis | grep -C 2 "IfUnEqual" | grep div %X = global int 0 declare void %foo() Index: llvm/test/Regression/Transforms/LICM/2003-08-04-TrappingInstOkHoist.ll diff -u llvm/test/Regression/Transforms/LICM/2003-08-04-TrappingInstOkHoist.ll:1.1 llvm/test/Regression/Transforms/LICM/2003-08-04-TrappingInstOkHoist.ll:1.2 --- llvm/test/Regression/Transforms/LICM/2003-08-04-TrappingInstOkHoist.ll:1.1 Tue Aug 5 13:52:42 2003 +++ llvm/test/Regression/Transforms/LICM/2003-08-04-TrappingInstOkHoist.ll Tue Sep 16 10:29:35 2003 @@ -1,7 +1,7 @@ ; This testcase tests to make sure a trapping instruction is hoisted when ; it is guaranteed to execute. ; -; RUN: as < %s | opt -licm | dis | grep -C 2 "test" | grep div +; RUN: llvm-as < %s | opt -licm | llvm-dis | grep -C 2 "test" | grep div %X = global int 0 declare void %foo() Index: llvm/test/Regression/Transforms/LICM/basictest.ll diff -u llvm/test/Regression/Transforms/LICM/basictest.ll:1.1 llvm/test/Regression/Transforms/LICM/basictest.ll:1.2 --- llvm/test/Regression/Transforms/LICM/basictest.ll:1.1 Fri May 10 17:27:49 2002 +++ llvm/test/Regression/Transforms/LICM/basictest.ll Tue Sep 16 10:29:35 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -licm | dis +; RUN: llvm-as < %s | opt -licm | llvm-dis void "testfunc"(int %i) { Index: llvm/test/Regression/Transforms/LICM/no-preheader-test.ll diff -u llvm/test/Regression/Transforms/LICM/no-preheader-test.ll:1.1 llvm/test/Regression/Transforms/LICM/no-preheader-test.ll:1.2 --- llvm/test/Regression/Transforms/LICM/no-preheader-test.ll:1.1 Fri May 10 17:43:26 2002 +++ llvm/test/Regression/Transforms/LICM/no-preheader-test.ll Tue Sep 16 10:29:35 2003 @@ -1,5 +1,5 @@ ; Test that LICM works when there is not a loop-preheader -; RUN: as < %s | opt -licm | dis +; RUN: llvm-as < %s | opt -licm | llvm-dis void "testfunc"(int %i, bool %ifcond) { br bool %ifcond, label %Then, label %Else Index: llvm/test/Regression/Transforms/LICM/scalar_promote.ll diff -u llvm/test/Regression/Transforms/LICM/scalar_promote.ll:1.2 llvm/test/Regression/Transforms/LICM/scalar_promote.ll:1.3 --- llvm/test/Regression/Transforms/LICM/scalar_promote.ll:1.2 Sun Feb 23 21:52:04 2003 +++ llvm/test/Regression/Transforms/LICM/scalar_promote.ll Tue Sep 16 10:29:35 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -licm -stats 2>&1 | grep "memory locations promoted to register" +; RUN: llvm-as < %s | opt -licm -stats 2>&1 | grep "memory locations promoted to register" %X = global int 7 From brukman at cs.uiuc.edu Tue Sep 16 10:31:28 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue Sep 16 10:31:28 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/Inline/alloca_test.ll basictest.ll cfg_preserve_test.ll inline_dce.ll invoke_test-1.ll invoke_test-2.ll invoke_test-3.ll Message-ID: <200309161530.KAA28079@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/Inline: alloca_test.ll updated: 1.1 -> 1.2 basictest.ll updated: 1.2 -> 1.3 cfg_preserve_test.ll updated: 1.1 -> 1.2 inline_dce.ll updated: 1.1 -> 1.2 invoke_test-1.ll updated: 1.2 -> 1.3 invoke_test-2.ll updated: 1.2 -> 1.3 invoke_test-3.ll updated: 1.3 -> 1.4 --- Log message: Renamed `as' => `llvm-as', `dis' => `llvm-dis', `link' => `llvm-link'. --- Diffs of the changes: Index: llvm/test/Regression/Transforms/Inline/alloca_test.ll diff -u llvm/test/Regression/Transforms/Inline/alloca_test.ll:1.1 llvm/test/Regression/Transforms/Inline/alloca_test.ll:1.2 --- llvm/test/Regression/Transforms/Inline/alloca_test.ll:1.1 Thu May 29 10:16:10 2003 +++ llvm/test/Regression/Transforms/Inline/alloca_test.ll Tue Sep 16 10:29:32 2003 @@ -1,7 +1,7 @@ ; This test ensures that alloca instructions in the entry block for an inlined ; function are moved to the top of the function they are inlined into. ; -; RUN: as < %s | opt -inline | dis | grep -C 1 alloca | grep Entry: +; RUN: llvm-as < %s | opt -inline | llvm-dis | grep -C 1 alloca | grep Entry: int %func(int %i) { %X = alloca int Index: llvm/test/Regression/Transforms/Inline/basictest.ll diff -u llvm/test/Regression/Transforms/Inline/basictest.ll:1.2 llvm/test/Regression/Transforms/Inline/basictest.ll:1.3 --- llvm/test/Regression/Transforms/Inline/basictest.ll:1.2 Thu May 29 10:16:10 2003 +++ llvm/test/Regression/Transforms/Inline/basictest.ll Tue Sep 16 10:29:32 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -inline -disable-output -print +; RUN: llvm-as < %s | opt -inline -disable-output -print int %func(int %i) { ret int %i Index: llvm/test/Regression/Transforms/Inline/cfg_preserve_test.ll diff -u llvm/test/Regression/Transforms/Inline/cfg_preserve_test.ll:1.1 llvm/test/Regression/Transforms/Inline/cfg_preserve_test.ll:1.2 --- llvm/test/Regression/Transforms/Inline/cfg_preserve_test.ll:1.1 Sat Aug 23 23:06:04 2003 +++ llvm/test/Regression/Transforms/Inline/cfg_preserve_test.ll Tue Sep 16 10:29:32 2003 @@ -1,6 +1,6 @@ ; This test ensures that inlining an "empty" function does not destroy the CFG ; -; RUN: as < %s | opt -inline | dis | not grep br +; RUN: llvm-as < %s | opt -inline | llvm-dis | not grep br int %func(int %i) { ret int %i Index: llvm/test/Regression/Transforms/Inline/inline_dce.ll diff -u llvm/test/Regression/Transforms/Inline/inline_dce.ll:1.1 llvm/test/Regression/Transforms/Inline/inline_dce.ll:1.2 --- llvm/test/Regression/Transforms/Inline/inline_dce.ll:1.1 Sun Aug 24 00:02:26 2003 +++ llvm/test/Regression/Transforms/Inline/inline_dce.ll Tue Sep 16 10:29:32 2003 @@ -1,7 +1,7 @@ ; This checks to ensure that the inline pass deletes functions if they get ; inlined into all of their callers. -; RUN: as < %s | opt -inline | dis | not grep %reallysmall +; RUN: llvm-as < %s | opt -inline | llvm-dis | not grep %reallysmall implementation Index: llvm/test/Regression/Transforms/Inline/invoke_test-1.ll diff -u llvm/test/Regression/Transforms/Inline/invoke_test-1.ll:1.2 llvm/test/Regression/Transforms/Inline/invoke_test-1.ll:1.3 --- llvm/test/Regression/Transforms/Inline/invoke_test-1.ll:1.2 Sun Aug 24 07:16:58 2003 +++ llvm/test/Regression/Transforms/Inline/invoke_test-1.ll Tue Sep 16 10:29:32 2003 @@ -1,7 +1,7 @@ ; Test that we can inline a simple function, turning the calls in it into invoke ; instructions -; RUN: as < %s | opt -inline | dis | not grep 'call[^e]' +; RUN: llvm-as < %s | opt -inline | llvm-dis | not grep 'call[^e]' declare void %might_throw() Index: llvm/test/Regression/Transforms/Inline/invoke_test-2.ll diff -u llvm/test/Regression/Transforms/Inline/invoke_test-2.ll:1.2 llvm/test/Regression/Transforms/Inline/invoke_test-2.ll:1.3 --- llvm/test/Regression/Transforms/Inline/invoke_test-2.ll:1.2 Sun Aug 24 07:16:58 2003 +++ llvm/test/Regression/Transforms/Inline/invoke_test-2.ll Tue Sep 16 10:29:32 2003 @@ -1,7 +1,7 @@ ; Test that if an invoked function is inlined, and if that function cannot ; throw, that the dead handler is now unreachable. -; RUN: as < %s | opt -inline -simplifycfg | dis | not grep UnreachableExceptionHandler +; RUN: llvm-as < %s | opt -inline -simplifycfg | llvm-dis | not grep UnreachableExceptionHandler declare void %might_throw() Index: llvm/test/Regression/Transforms/Inline/invoke_test-3.ll diff -u llvm/test/Regression/Transforms/Inline/invoke_test-3.ll:1.3 llvm/test/Regression/Transforms/Inline/invoke_test-3.ll:1.4 --- llvm/test/Regression/Transforms/Inline/invoke_test-3.ll:1.3 Sun Aug 24 07:53:20 2003 +++ llvm/test/Regression/Transforms/Inline/invoke_test-3.ll Tue Sep 16 10:29:32 2003 @@ -1,7 +1,7 @@ ; Test that any rethrown exceptions in an inlined function are automatically ; turned into branches to the invoke destination. -; RUN: as < %s | opt -inline | dis | not grep 'call void %llvm.unwind' +; RUN: llvm-as < %s | opt -inline | llvm-dis | not grep 'call void %llvm.unwind' declare void %might_throw() declare void %llvm.unwind() From brukman at cs.uiuc.edu Tue Sep 16 10:31:32 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue Sep 16 10:31:32 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/LevelRaise/2002-02-11-ArrayShape.ll 2002-02-14-BadAssertion.ll 2002-03-11-Calls.ll 2002-03-14-ConvertableToGEPHang.ll 2002-03-20-BadCodegen.ll 2002-03-20-Crash.ll 2002-03-21-MissedRaise.ll 2002-03-21-MissedRaise2.ll 2002-03-21-MissedRaise3.ll 2002-04-09-MissedRaise.ll 2002-04-16-MissedRaise.ll 2002-05-02-BadCastElimination.ll 2002-05-02-MissedRaise.ll 2002-05-10-LoadPeephole.ll 2002-05-23-MissedRaise.ll 2002-07-16-MissedRaise.ll 2002-07-16-RaiseCrash.ll 2002-07-16-RaiseCrash2.ll 2002-07-16-SourceAndDestCrash.ll 2002-07-18-MissedAllocaRaise.ll 2002-07-31-AssertionFailure.ll 2002-09-10-PointerAdds.ll 2002-10-02-SignExtensionProblem.ll 2002-10-08-VarArgCall.ll 2002-10-08-VarArgCallInfLoop.ll 2002-11-13-PointerFunction.ll 2003-01-22-GEPProblem.ll 2003-01-30-ShiftCrash.ll 2003-02-13-CallRaise.ll 2003-05-01-CallCast.ll 2003-06-07-EmptyArrayTest.ll 2003-06-25-ExprAnalysis.ll Message-ID: <200309161530.KAA28248@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/LevelRaise: 2002-02-11-ArrayShape.ll updated: 1.3 -> 1.4 2002-02-14-BadAssertion.ll updated: 1.2 -> 1.3 2002-03-11-Calls.ll updated: 1.1 -> 1.2 2002-03-14-ConvertableToGEPHang.ll updated: 1.4 -> 1.5 2002-03-20-BadCodegen.ll updated: 1.2 -> 1.3 2002-03-20-Crash.ll updated: 1.5 -> 1.6 2002-03-21-MissedRaise.ll updated: 1.3 -> 1.4 2002-03-21-MissedRaise2.ll updated: 1.4 -> 1.5 2002-03-21-MissedRaise3.ll updated: 1.2 -> 1.3 2002-04-09-MissedRaise.ll updated: 1.2 -> 1.3 2002-04-16-MissedRaise.ll updated: 1.2 -> 1.3 2002-05-02-BadCastElimination.ll updated: 1.1 -> 1.2 2002-05-02-MissedRaise.ll updated: 1.3 -> 1.4 2002-05-10-LoadPeephole.ll updated: 1.2 -> 1.3 2002-05-23-MissedRaise.ll updated: 1.4 -> 1.5 2002-07-16-MissedRaise.ll updated: 1.3 -> 1.4 2002-07-16-RaiseCrash.ll updated: 1.4 -> 1.5 2002-07-16-RaiseCrash2.ll updated: 1.2 -> 1.3 2002-07-16-SourceAndDestCrash.ll updated: 1.1 -> 1.2 2002-07-18-MissedAllocaRaise.ll updated: 1.2 -> 1.3 2002-07-31-AssertionFailure.ll updated: 1.3 -> 1.4 2002-09-10-PointerAdds.ll updated: 1.1 -> 1.2 2002-10-02-SignExtensionProblem.ll updated: 1.2 -> 1.3 2002-10-08-VarArgCall.ll updated: 1.2 -> 1.3 2002-10-08-VarArgCallInfLoop.ll updated: 1.1 -> 1.2 2002-11-13-PointerFunction.ll updated: 1.2 -> 1.3 2003-01-22-GEPProblem.ll updated: 1.1 -> 1.2 2003-01-30-ShiftCrash.ll updated: 1.1 -> 1.2 2003-02-13-CallRaise.ll updated: 1.1 -> 1.2 2003-05-01-CallCast.ll updated: 1.2 -> 1.3 2003-06-07-EmptyArrayTest.ll updated: 1.1 -> 1.2 2003-06-25-ExprAnalysis.ll updated: 1.2 -> 1.3 --- Log message: Renamed `as' => `llvm-as', `dis' => `llvm-dis', `link' => `llvm-link'. --- Diffs of the changes: Index: llvm/test/Regression/Transforms/LevelRaise/2002-02-11-ArrayShape.ll diff -u llvm/test/Regression/Transforms/LevelRaise/2002-02-11-ArrayShape.ll:1.3 llvm/test/Regression/Transforms/LevelRaise/2002-02-11-ArrayShape.ll:1.4 --- llvm/test/Regression/Transforms/LevelRaise/2002-02-11-ArrayShape.ll:1.3 Sat Jun 28 18:02:04 2003 +++ llvm/test/Regression/Transforms/LevelRaise/2002-02-11-ArrayShape.ll Tue Sep 16 10:29:36 2003 @@ -17,7 +17,7 @@ ; The fix is to have the -raise pass correctly convert it to the second ; equivelent form. ; -; RUN: as < %s | opt -q -raise > Output/%s.raised.bc +; RUN: llvm-as < %s | opt -q -raise > Output/%s.raised.bc ; RUN: lli -force-interpreter -array-checks -abort-on-exception < Output/%s.raised.bc ; Index: llvm/test/Regression/Transforms/LevelRaise/2002-02-14-BadAssertion.ll diff -u llvm/test/Regression/Transforms/LevelRaise/2002-02-14-BadAssertion.ll:1.2 llvm/test/Regression/Transforms/LevelRaise/2002-02-14-BadAssertion.ll:1.3 --- llvm/test/Regression/Transforms/LevelRaise/2002-02-14-BadAssertion.ll:1.2 Mon Nov 4 00:09:46 2002 +++ llvm/test/Regression/Transforms/LevelRaise/2002-02-14-BadAssertion.ll Tue Sep 16 10:29:36 2003 @@ -1,6 +1,6 @@ ; An invalid assertion killed the level raiser. Fixed. ; -; RUN: as < %s | opt -raise +; RUN: llvm-as < %s | opt -raise implementation Index: llvm/test/Regression/Transforms/LevelRaise/2002-03-11-Calls.ll diff -u llvm/test/Regression/Transforms/LevelRaise/2002-03-11-Calls.ll:1.1 llvm/test/Regression/Transforms/LevelRaise/2002-03-11-Calls.ll:1.2 --- llvm/test/Regression/Transforms/LevelRaise/2002-03-11-Calls.ll:1.1 Mon Mar 11 11:25:50 2002 +++ llvm/test/Regression/Transforms/LevelRaise/2002-03-11-Calls.ll Tue Sep 16 10:29:36 2003 @@ -2,7 +2,7 @@ ; method pointer type into a call. In doing so, it would have to change the ; types of the arguments to the call, but broke doing so. ; -; RUN: as < %s | opt -raise +; RUN: llvm-as < %s | opt -raise implementation Index: llvm/test/Regression/Transforms/LevelRaise/2002-03-14-ConvertableToGEPHang.ll diff -u llvm/test/Regression/Transforms/LevelRaise/2002-03-14-ConvertableToGEPHang.ll:1.4 llvm/test/Regression/Transforms/LevelRaise/2002-03-14-ConvertableToGEPHang.ll:1.5 --- llvm/test/Regression/Transforms/LevelRaise/2002-03-14-ConvertableToGEPHang.ll:1.4 Mon Nov 4 00:09:46 2002 +++ llvm/test/Regression/Transforms/LevelRaise/2002-03-14-ConvertableToGEPHang.ll Tue Sep 16 10:29:36 2003 @@ -2,7 +2,7 @@ ; Note that this code is actually miscompiled from the input source, but despite ; that, level raise should not hang! ; -; RUN: as < %s | opt -raise +; RUN: llvm-as < %s | opt -raise %Disjunct = type { \2 *, short, sbyte, sbyte *, { short, short, sbyte, sbyte, \2, sbyte * } *, { short, short, sbyte, sbyte, \2, sbyte * } * } %chosen_disjuncts = uninitialized global %Disjunct * * ; <%Disjunct * * *> [#uses=1] Index: llvm/test/Regression/Transforms/LevelRaise/2002-03-20-BadCodegen.ll diff -u llvm/test/Regression/Transforms/LevelRaise/2002-03-20-BadCodegen.ll:1.2 llvm/test/Regression/Transforms/LevelRaise/2002-03-20-BadCodegen.ll:1.3 --- llvm/test/Regression/Transforms/LevelRaise/2002-03-20-BadCodegen.ll:1.2 Wed May 14 13:37:03 2003 +++ llvm/test/Regression/Transforms/LevelRaise/2002-03-20-BadCodegen.ll Tue Sep 16 10:29:36 2003 @@ -2,7 +2,7 @@ ; getelementptr instruction... with a bad level raise pass, this code ; will segfault on execution. ; -; RUN: as < %s | opt -raise |lli -abort-on-exception +; RUN: llvm-as < %s | opt -raise |lli -abort-on-exception %Village = type { [4 x \3 *], \2 *, { \2 *, { int, int, int, \5 * } *, \2 * }, { int, int, int, { \2 *, { int, int, int, \6 * } *, \2 * }, { \2 *, { int, int, int, \6 * } *, \2 * }, { \2 *, { int, int, int, \6 * } *, \2 * }, { \2 *, { int, int, int, \6 * } *, \2 * } }, int, int } Index: llvm/test/Regression/Transforms/LevelRaise/2002-03-20-Crash.ll diff -u llvm/test/Regression/Transforms/LevelRaise/2002-03-20-Crash.ll:1.5 llvm/test/Regression/Transforms/LevelRaise/2002-03-20-Crash.ll:1.6 --- llvm/test/Regression/Transforms/LevelRaise/2002-03-20-Crash.ll:1.5 Mon Nov 4 00:09:46 2002 +++ llvm/test/Regression/Transforms/LevelRaise/2002-03-20-Crash.ll Tue Sep 16 10:29:36 2003 @@ -1,7 +1,7 @@ ; Level raise is making an incorrect transformation, which causes incorrect ; bytecode to be generated. ; -; RUN: as < %s | opt -raise | dis +; RUN: llvm-as < %s | opt -raise | llvm-dis ; %Village = type { [4 x \3 *], \2 *, { \2 *, { int, int, int, \5 * } *, \2 * }, { int, int, int, { \2 *, { int, int, int, \6 * } *, \2 * }, { \2 *, { int, int, int, \6 * } *, \2 * }, { \2 *, { int, int, int, \6 * } *, \2 * }, { \2 *, { int, int, int, \6 * } *, \2 * } }, int, int } Index: llvm/test/Regression/Transforms/LevelRaise/2002-03-21-MissedRaise.ll diff -u llvm/test/Regression/Transforms/LevelRaise/2002-03-21-MissedRaise.ll:1.3 llvm/test/Regression/Transforms/LevelRaise/2002-03-21-MissedRaise.ll:1.4 --- llvm/test/Regression/Transforms/LevelRaise/2002-03-21-MissedRaise.ll:1.3 Sat Jun 28 18:02:51 2003 +++ llvm/test/Regression/Transforms/LevelRaise/2002-03-21-MissedRaise.ll Tue Sep 16 10:29:36 2003 @@ -2,7 +2,7 @@ ; successful, all cast instructions should be eliminated from this testcase. ; -; RUN: as < %s | opt -raise | dis | not grep cast +; RUN: llvm-as < %s | opt -raise | llvm-dis | not grep cast %Hash = type { { uint, sbyte *, \2 } * *, int (uint) *, int } * %hash = type { { uint, sbyte *, \2 } * *, int (uint) *, int } Index: llvm/test/Regression/Transforms/LevelRaise/2002-03-21-MissedRaise2.ll diff -u llvm/test/Regression/Transforms/LevelRaise/2002-03-21-MissedRaise2.ll:1.4 llvm/test/Regression/Transforms/LevelRaise/2002-03-21-MissedRaise2.ll:1.5 --- llvm/test/Regression/Transforms/LevelRaise/2002-03-21-MissedRaise2.ll:1.4 Sat Jun 28 18:02:51 2003 +++ llvm/test/Regression/Transforms/LevelRaise/2002-03-21-MissedRaise2.ll Tue Sep 16 10:29:36 2003 @@ -3,7 +3,7 @@ ; prevented reg115 from being able to change. ; -; RUN: as < %s | opt -raise | dis | grep '= cast' | not grep \* +; RUN: llvm-as < %s | opt -raise | llvm-dis | grep '= cast' | not grep \* %Hash = type { { uint, sbyte *, \2 } * *, int (uint) *, int } * %HashEntry = type { uint, sbyte *, \2 } * Index: llvm/test/Regression/Transforms/LevelRaise/2002-03-21-MissedRaise3.ll diff -u llvm/test/Regression/Transforms/LevelRaise/2002-03-21-MissedRaise3.ll:1.2 llvm/test/Regression/Transforms/LevelRaise/2002-03-21-MissedRaise3.ll:1.3 --- llvm/test/Regression/Transforms/LevelRaise/2002-03-21-MissedRaise3.ll:1.2 Sat Jun 28 18:02:20 2003 +++ llvm/test/Regression/Transforms/LevelRaise/2002-03-21-MissedRaise3.ll Tue Sep 16 10:29:36 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -raise | dis | grep '= cast' | not grep \* +; RUN: llvm-as < %s | opt -raise | llvm-dis | grep '= cast' | not grep \* %Hash = type { { uint, sbyte *, \2 } * *, int (uint) *, int } * %HashEntry = type { uint, sbyte *, \2 } * Index: llvm/test/Regression/Transforms/LevelRaise/2002-04-09-MissedRaise.ll diff -u llvm/test/Regression/Transforms/LevelRaise/2002-04-09-MissedRaise.ll:1.2 llvm/test/Regression/Transforms/LevelRaise/2002-04-09-MissedRaise.ll:1.3 --- llvm/test/Regression/Transforms/LevelRaise/2002-04-09-MissedRaise.ll:1.2 Sat Jun 28 18:02:20 2003 +++ llvm/test/Regression/Transforms/LevelRaise/2002-04-09-MissedRaise.ll Tue Sep 16 10:29:36 2003 @@ -8,7 +8,7 @@ ; x[j*i-12] = j; ; } -; RUN: as < %s | opt -raise | dis | grep ' cast ' | not grep '*' +; RUN: llvm-as < %s | opt -raise | llvm-dis | grep ' cast ' | not grep '*' implementation Index: llvm/test/Regression/Transforms/LevelRaise/2002-04-16-MissedRaise.ll diff -u llvm/test/Regression/Transforms/LevelRaise/2002-04-16-MissedRaise.ll:1.2 llvm/test/Regression/Transforms/LevelRaise/2002-04-16-MissedRaise.ll:1.3 --- llvm/test/Regression/Transforms/LevelRaise/2002-04-16-MissedRaise.ll:1.2 Sat Jun 28 18:02:20 2003 +++ llvm/test/Regression/Transforms/LevelRaise/2002-04-16-MissedRaise.ll Tue Sep 16 10:29:36 2003 @@ -5,7 +5,7 @@ ; return (int*)malloc(i+j); ; } -; RUN: as < %s | opt -raise | dis | grep ' cast ' | not grep '*' +; RUN: llvm-as < %s | opt -raise | llvm-dis | grep ' cast ' | not grep '*' implementation Index: llvm/test/Regression/Transforms/LevelRaise/2002-05-02-BadCastElimination.ll diff -u llvm/test/Regression/Transforms/LevelRaise/2002-05-02-BadCastElimination.ll:1.1 llvm/test/Regression/Transforms/LevelRaise/2002-05-02-BadCastElimination.ll:1.2 --- llvm/test/Regression/Transforms/LevelRaise/2002-05-02-BadCastElimination.ll:1.1 Thu May 2 11:16:39 2002 +++ llvm/test/Regression/Transforms/LevelRaise/2002-05-02-BadCastElimination.ll Tue Sep 16 10:29:36 2003 @@ -3,7 +3,7 @@ ; to a 32 bit version of the number with all upper 16 bits clear (ushort->uint ; involves no sign extension). Optimizing this to a single cast is invalid! ; -; RUN: as < %s | opt -raise -q | lli -abort-on-exception +; RUN: llvm-as < %s | opt -raise -q | lli -abort-on-exception ; implementation Index: llvm/test/Regression/Transforms/LevelRaise/2002-05-02-MissedRaise.ll diff -u llvm/test/Regression/Transforms/LevelRaise/2002-05-02-MissedRaise.ll:1.3 llvm/test/Regression/Transforms/LevelRaise/2002-05-02-MissedRaise.ll:1.4 --- llvm/test/Regression/Transforms/LevelRaise/2002-05-02-MissedRaise.ll:1.3 Sat Jun 28 18:02:20 2003 +++ llvm/test/Regression/Transforms/LevelRaise/2002-05-02-MissedRaise.ll Tue Sep 16 10:29:36 2003 @@ -1,6 +1,6 @@ ; This testcase is not level raised properly... ; -; RUN: as < %s | opt -raise | dis | grep ' cast ' | not grep '*' +; RUN: llvm-as < %s | opt -raise | llvm-dis | grep ' cast ' | not grep '*' %List = type { int, %List* } Index: llvm/test/Regression/Transforms/LevelRaise/2002-05-10-LoadPeephole.ll diff -u llvm/test/Regression/Transforms/LevelRaise/2002-05-10-LoadPeephole.ll:1.2 llvm/test/Regression/Transforms/LevelRaise/2002-05-10-LoadPeephole.ll:1.3 --- llvm/test/Regression/Transforms/LevelRaise/2002-05-10-LoadPeephole.ll:1.2 Sat Jun 28 18:02:20 2003 +++ llvm/test/Regression/Transforms/LevelRaise/2002-05-10-LoadPeephole.ll Tue Sep 16 10:29:36 2003 @@ -1,7 +1,7 @@ ; This testcase should have the cast propogated through the load ; just like a store does... ; -; RUN: as < %s | opt -raise | dis | grep ' cast ' | not grep '*' +; RUN: llvm-as < %s | opt -raise | llvm-dis | grep ' cast ' | not grep '*' int "test"(uint * %Ptr) { %P2 = cast uint *%Ptr to int * Index: llvm/test/Regression/Transforms/LevelRaise/2002-05-23-MissedRaise.ll diff -u llvm/test/Regression/Transforms/LevelRaise/2002-05-23-MissedRaise.ll:1.4 llvm/test/Regression/Transforms/LevelRaise/2002-05-23-MissedRaise.ll:1.5 --- llvm/test/Regression/Transforms/LevelRaise/2002-05-23-MissedRaise.ll:1.4 Sat Jun 28 18:02:20 2003 +++ llvm/test/Regression/Transforms/LevelRaise/2002-05-23-MissedRaise.ll Tue Sep 16 10:29:36 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -raise | dis | grep '= cast' | not grep \* +; RUN: llvm-as < %s | opt -raise | llvm-dis | grep '= cast' | not grep \* %FILE = type { int, ubyte*, ubyte*, ubyte, ubyte, uint, uint, uint } Index: llvm/test/Regression/Transforms/LevelRaise/2002-07-16-MissedRaise.ll diff -u llvm/test/Regression/Transforms/LevelRaise/2002-07-16-MissedRaise.ll:1.3 llvm/test/Regression/Transforms/LevelRaise/2002-07-16-MissedRaise.ll:1.4 --- llvm/test/Regression/Transforms/LevelRaise/2002-07-16-MissedRaise.ll:1.3 Sat Jun 28 18:02:20 2003 +++ llvm/test/Regression/Transforms/LevelRaise/2002-07-16-MissedRaise.ll Tue Sep 16 10:29:36 2003 @@ -5,7 +5,7 @@ ; This could be fixed by making all stores add themselves to a list, and check ; their arguments are consistent AFTER all other values are propogated. -; RUN: as < %s | opt -raise | dis | not grep '= cast' +; RUN: llvm-as < %s | opt -raise | llvm-dis | not grep '= cast' %Tree = type %struct.tree* %struct.tree = type { int, double, double, %Tree, %Tree, %Tree, %Tree } Index: llvm/test/Regression/Transforms/LevelRaise/2002-07-16-RaiseCrash.ll diff -u llvm/test/Regression/Transforms/LevelRaise/2002-07-16-RaiseCrash.ll:1.4 llvm/test/Regression/Transforms/LevelRaise/2002-07-16-RaiseCrash.ll:1.5 --- llvm/test/Regression/Transforms/LevelRaise/2002-07-16-RaiseCrash.ll:1.4 Mon Nov 4 00:09:46 2002 +++ llvm/test/Regression/Transforms/LevelRaise/2002-07-16-RaiseCrash.ll Tue Sep 16 10:29:37 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -raise +; RUN: llvm-as < %s | opt -raise %Tree = type %struct.tree* %struct.tree = type { int, double, double, %Tree, %Tree, %Tree, %Tree } Index: llvm/test/Regression/Transforms/LevelRaise/2002-07-16-RaiseCrash2.ll diff -u llvm/test/Regression/Transforms/LevelRaise/2002-07-16-RaiseCrash2.ll:1.2 llvm/test/Regression/Transforms/LevelRaise/2002-07-16-RaiseCrash2.ll:1.3 --- llvm/test/Regression/Transforms/LevelRaise/2002-07-16-RaiseCrash2.ll:1.2 Tue Sep 10 15:04:19 2002 +++ llvm/test/Regression/Transforms/LevelRaise/2002-07-16-RaiseCrash2.ll Tue Sep 16 10:29:37 2003 @@ -1,6 +1,6 @@ ; This crashes raise, with an cast<> failure -; RUN: as < %s | opt -raise +; RUN: llvm-as < %s | opt -raise implementation sbyte* %test(int* %ptr) { Index: llvm/test/Regression/Transforms/LevelRaise/2002-07-16-SourceAndDestCrash.ll diff -u llvm/test/Regression/Transforms/LevelRaise/2002-07-16-SourceAndDestCrash.ll:1.1 llvm/test/Regression/Transforms/LevelRaise/2002-07-16-SourceAndDestCrash.ll:1.2 --- llvm/test/Regression/Transforms/LevelRaise/2002-07-16-SourceAndDestCrash.ll:1.1 Tue Jul 16 21:36:02 2002 +++ llvm/test/Regression/Transforms/LevelRaise/2002-07-16-SourceAndDestCrash.ll Tue Sep 16 10:29:37 2003 @@ -2,7 +2,7 @@ ; because both the source and the destination of the %Y cast are converted ; to a new type, which causes massive problems. -; RUN: as < %s | opt -raise -raise-start-inst=W +; RUN: llvm-as < %s | opt -raise -raise-start-inst=W int **%test(sbyte **%S) { BB0: Index: llvm/test/Regression/Transforms/LevelRaise/2002-07-18-MissedAllocaRaise.ll diff -u llvm/test/Regression/Transforms/LevelRaise/2002-07-18-MissedAllocaRaise.ll:1.2 llvm/test/Regression/Transforms/LevelRaise/2002-07-18-MissedAllocaRaise.ll:1.3 --- llvm/test/Regression/Transforms/LevelRaise/2002-07-18-MissedAllocaRaise.ll:1.2 Sat Jun 28 18:02:20 2003 +++ llvm/test/Regression/Transforms/LevelRaise/2002-07-18-MissedAllocaRaise.ll Tue Sep 16 10:29:37 2003 @@ -1,6 +1,6 @@ ; Looks like we don't raise alloca's like we do mallocs ; -; RUN: as < %s | opt -raise | dis | grep '= cast' | not grep \* +; RUN: llvm-as < %s | opt -raise | llvm-dis | grep '= cast' | not grep \* implementation ; Functions: Index: llvm/test/Regression/Transforms/LevelRaise/2002-07-31-AssertionFailure.ll diff -u llvm/test/Regression/Transforms/LevelRaise/2002-07-31-AssertionFailure.ll:1.3 llvm/test/Regression/Transforms/LevelRaise/2002-07-31-AssertionFailure.ll:1.4 --- llvm/test/Regression/Transforms/LevelRaise/2002-07-31-AssertionFailure.ll:1.3 Mon Nov 4 00:09:46 2002 +++ llvm/test/Regression/Transforms/LevelRaise/2002-07-31-AssertionFailure.ll Tue Sep 16 10:29:37 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -raise -raise-start-inst=cast271 +; RUN: llvm-as < %s | opt -raise -raise-start-inst=cast271 %CON_list = type { %CON_list*, %CON_node* } %CON_node = type { %DIS_list*, %DIS_list*, int } Index: llvm/test/Regression/Transforms/LevelRaise/2002-09-10-PointerAdds.ll diff -u llvm/test/Regression/Transforms/LevelRaise/2002-09-10-PointerAdds.ll:1.1 llvm/test/Regression/Transforms/LevelRaise/2002-09-10-PointerAdds.ll:1.2 --- llvm/test/Regression/Transforms/LevelRaise/2002-09-10-PointerAdds.ll:1.1 Tue Sep 10 14:41:57 2002 +++ llvm/test/Regression/Transforms/LevelRaise/2002-09-10-PointerAdds.ll Tue Sep 16 10:29:37 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -raise +; RUN: llvm-as < %s | opt -raise int* %test(int* %P, int* %Q) { %P = cast int* %P to ulong Index: llvm/test/Regression/Transforms/LevelRaise/2002-10-02-SignExtensionProblem.ll diff -u llvm/test/Regression/Transforms/LevelRaise/2002-10-02-SignExtensionProblem.ll:1.2 llvm/test/Regression/Transforms/LevelRaise/2002-10-02-SignExtensionProblem.ll:1.3 --- llvm/test/Regression/Transforms/LevelRaise/2002-10-02-SignExtensionProblem.ll:1.2 Sat Jun 28 18:02:20 2003 +++ llvm/test/Regression/Transforms/LevelRaise/2002-10-02-SignExtensionProblem.ll Tue Sep 16 10:29:37 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -raise | dis | grep -v uint | not grep 4294967295 +; RUN: llvm-as < %s | opt -raise | llvm-dis | grep -v uint | not grep 4294967295 %length_code = uninitialized global [256 x ubyte] Index: llvm/test/Regression/Transforms/LevelRaise/2002-10-08-VarArgCall.ll diff -u llvm/test/Regression/Transforms/LevelRaise/2002-10-08-VarArgCall.ll:1.2 llvm/test/Regression/Transforms/LevelRaise/2002-10-08-VarArgCall.ll:1.3 --- llvm/test/Regression/Transforms/LevelRaise/2002-10-08-VarArgCall.ll:1.2 Sat Jun 28 18:02:20 2003 +++ llvm/test/Regression/Transforms/LevelRaise/2002-10-08-VarArgCall.ll Tue Sep 16 10:29:37 2003 @@ -1,4 +1,4 @@ -; RUN: as < %s | opt -raise | dis | grep call | not grep '\.\.\.' +; RUN: llvm-as < %s | opt -raise | llvm-dis | grep call | not grep '\.\.\.' implementation Index: llvm/test/Regression/Transforms/LevelRaise/2002-10-08-VarArgCallInfLoop.ll diff -u llvm/test/Regression/Transforms/LevelRaise/2002-10-08-VarArgCallInfLoop.ll:1.1 llvm/test/Regression/Transforms/LevelRaise/2002-10-08-VarArgCallInfLoop.ll:1.2 --- llvm/test/Regression/Transforms/LevelRaise/2002-10-08-VarArgCallInfLoop.ll:1.1 Tue Oct 8 19:09:59 2002 +++ llvm/test/Regression/Transforms/LevelRaise/2002-10-08-VarArgCallInfLoop.ll Tue Sep 16 10:29:37 2003 @@ -1,6 +1,6 @@ ; Due to a recent change, this testcase now sends the raise pass into an infinite loop ; -; RUN: as < %s | opt -raise +; RUN: llvm-as < %s | opt -raise implementation Index: llvm/test/Regression/Transforms/LevelRaise/2002-11-13-PointerFunction.ll diff -u llvm/test/Regression/Transforms/LevelRaise/2002-11-13-PointerFunction.ll:1.2 llvm/test/Regression/Transforms/LevelRaise/2002-11-13-PointerFunction.ll:1.3 --- llvm/test/Regression/Transforms/LevelRaise/2002-11-13-PointerFunction.ll:1.2 Sat Jun 28 18:02:20 2003 +++ llvm/test/Regression/Transforms/LevelRaise/2002-11-13-PointerFunction.ll Tue Sep 16 10:29:37 2003 @@ -1,6 +1,6 @@ ; This testcase should be able to eliminate at least one of the casts. ; -; RUN: as < %s | opt -raise | dis | not grep 'REMOVE' +; RUN: llvm-as < %s | opt -raise | llvm-dis | not grep 'REMOVE' int %foo(sbyte * %PF) { %UPF = cast sbyte* %PF to uint()* Index: llvm/test/Regression/Transforms/LevelRaise/2003-01-22-GEPProblem.ll diff -u llvm/test/Regression/Transforms/LevelRaise/2003-01-22-GEPProblem.ll:1.1 llvm/test/Regression/Transforms/LevelRaise/2003-01-22-GEPProblem.ll:1.2 --- llvm/test/Regression/Transforms/LevelRaise/2003-01-22-GEPProblem.ll:1.1 Wed Jan 22 20:38:50 2003 +++ llvm/test/Regression/Transforms/LevelRaise/2003-01-22-GEPProblem.ll Tue Sep 16 10:29:37 2003 @@ -1,5 +1,5 @@ ; Testcase reduced from 197.parser by bugpoint -; RUN: as < %s | opt -raise -raise-start-inst=cast455 > /dev/null +; RUN: llvm-as < %s | opt -raise -raise-start-inst=cast455 > /dev/null void %conjunction_prune() { ;
Index: llvm/www/docs/CommandGuide/index.html diff -u llvm/www/docs/CommandGuide/index.html:1.2 llvm/www/docs/CommandGuide/index.html:1.3 --- llvm/www/docs/CommandGuide/index.html:1.2 Thu Sep 11 15:23:51 2003 +++ llvm/www/docs/CommandGuide/index.html Wed Sep 17 09:11:24 2003 @@ -41,7 +41,7 @@ Optimize an LLVM bytecode file.

-

link +
llvm-link
Link several LLVM bytecode files together into one LLVM bytecode file. From lattner at cs.uiuc.edu Wed Sep 17 10:01:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Sep 17 10:01:01 2003 Subject: [llvm-commits] CVS: llvm/www/docs/CommandGuide/analyze.html Message-ID: <200309171500.KAA08158@tank.cs.uiuc.edu> Changes in directory llvm/www/docs/CommandGuide: analyze.html updated: 1.3 -> 1.4 --- Log message: fix misspelling analyse -> analyze --- Diffs of the changes: Index: llvm/www/docs/CommandGuide/analyze.html diff -u llvm/www/docs/CommandGuide/analyze.html:1.3 llvm/www/docs/CommandGuide/analyze.html:1.4 --- llvm/www/docs/CommandGuide/analyze.html:1.3 Wed Sep 17 09:11:24 2003 +++ llvm/www/docs/CommandGuide/analyze.html Wed Sep 17 10:00:45 2003 @@ -62,9 +62,9 @@ the analyze program after being loaded.

After being loaded, additional command line options are made available - for running the passes made available by plugin.so. Use analyse -load - <plugin.so> -help to see the new list of available analysis - passes. + for running the passes made available by plugin.so. Use 'analyze + -load <plugin.so> -help' to see the new list of available + analysis passes.

From criswell at cs.uiuc.edu Wed Sep 17 10:15:04 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Wed Sep 17 10:15:04 2003 Subject: [llvm-commits] CVS: llvm/include/Support/SystemUtils.h Message-ID: <200309171514.KAA02383@choi.cs.uiuc.edu> Changes in directory llvm/include/Support: SystemUtils.h updated: 1.3 -> 1.4 --- Log message: Added the ExecWait() function. --- Diffs of the changes: Index: llvm/include/Support/SystemUtils.h diff -u llvm/include/Support/SystemUtils.h:1.3 llvm/include/Support/SystemUtils.h:1.4 --- llvm/include/Support/SystemUtils.h:1.3 Thu Aug 7 16:33:32 2003 +++ llvm/include/Support/SystemUtils.h Wed Sep 17 10:14:25 2003 @@ -34,4 +34,12 @@ const std::string &StdOutFile = "", const std::string &StdErrFile = ""); +/// +/// Function: ExecWait() +/// +/// Description: +/// Execute a program with the given arguments and environment and +/// wait for it to terminate. +/// +int ExecWait (char ** argv, char ** envp); #endif From criswell at cs.uiuc.edu Wed Sep 17 10:15:11 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Wed Sep 17 10:15:11 2003 Subject: [llvm-commits] CVS: llvm/lib/Support/SystemUtils.cpp Message-ID: <200309171514.KAA02368@choi.cs.uiuc.edu> Changes in directory llvm/lib/Support: SystemUtils.cpp updated: 1.13 -> 1.14 --- Log message: Added the ExecWait() function. It executes a program with the specified arguments and environment. Perhaps it should be merged with the RunProgramWithTimeout function, but I'd want to allow it to inherit the parent process's stdin and stdout. I'll save that for a rainy day... --- Diffs of the changes: Index: llvm/lib/Support/SystemUtils.cpp diff -u llvm/lib/Support/SystemUtils.cpp:1.13 llvm/lib/Support/SystemUtils.cpp:1.14 --- llvm/lib/Support/SystemUtils.cpp:1.13 Tue Sep 16 10:31:46 2003 +++ llvm/lib/Support/SystemUtils.cpp Wed Sep 17 10:13:59 2003 @@ -156,3 +156,101 @@ } return Status; } + + +// +// Function: ExecWait () +// +// Description: +// This function executes a program with the specified arguments and +// environment. It then waits for the progarm to termiante and then returns +// to the caller. +// +// Inputs: +// argv - The arguments to the program as an array of C strings. The first +// argument should be the name of the program to execute, and the +// last argument should be a pointer to NULL. +// +// envp - The environment passes to the program as an array of C strings in +// the form of "name=value" pairs. The last element should be a +// pointer to NULL. +// +// Outputs: +// None. +// +// Return value: +// 0 - No errors. +// 1 - The program could not be executed. +// 1 - The program returned a non-zero exit status. +// 1 - The program terminated abnormally. +// +// Notes: +// The program will inherit the stdin, stdout, and stderr file descriptors +// as well as other various configuration settings (umask). +// +// This function should not print anything to stdout/stderr on its own. It is +// a generic library function. The caller or executed program should report +// errors in the way it sees fit. +// +int +ExecWait (char ** argv, char **envp) +{ + // Child process ID + register int child; + + // Status from child process when it exits + int status; + + // + // Because UNIX is sometimes less than convenient, we need to use + // FindExecutable() to find the full pathname to the file to execute. + // + // This is becausse execvp() doesn't use PATH, and we want to look for + // programs in the LLVM binary directory first anyway. + // + std::string Program = FindExecutable (argv[0], ""); + if (Program.empty()) + { + return 1; + } + + // + // Create a child process. + // + switch (child=fork()) + { + case -1: + return 1; + break; + + case 0: + execve (Program.c_str(), argv, envp); + return 1; + break; + + default: + break; + } + + // + // Parent process: Wait for the child process to termiante. + // + if ((wait (&status)) == -1) + { + return 1; + } + + // + // If the program exited normally with a zero exit status, return success! + // + if (WIFEXITED (status) && (WEXITSTATUS(status) == 0)) + { + return 0; + } + + // + // Otherwise, return failure. + // + return 1; +} + From criswell at cs.uiuc.edu Wed Sep 17 10:22:02 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Wed Sep 17 10:22:02 2003 Subject: [llvm-commits] CVS: llvm/tools/gccld/gccld.cpp Message-ID: <200309171521.KAA02647@choi.cs.uiuc.edu> Changes in directory llvm/tools/gccld: gccld.cpp updated: 1.46 -> 1.47 --- Log message: Removed the use of the environ variable and instead use the environment array passed into main(). This may (or may not) be more portable, but it looks nicer. Added functions to copy the environment array and modify the copy, thus preserving the environment. Switched from using system() to using ExecWait(). The code now removes the assembly file generated when using the -native option. Fixed the remove_env() function: The previous revision truncated the environment variable list. This version just zaps the variable as intended. --- Diffs of the changes: Index: llvm/tools/gccld/gccld.cpp diff -u llvm/tools/gccld/gccld.cpp:1.46 llvm/tools/gccld/gccld.cpp:1.47 --- llvm/tools/gccld/gccld.cpp:1.46 Tue Sep 16 16:27:35 2003 +++ llvm/tools/gccld/gccld.cpp Wed Sep 17 10:20:51 2003 @@ -22,6 +22,7 @@ #include "llvm/Transforms/IPO.h" #include "llvm/Transforms/Scalar.h" #include "Support/FileUtilities.h" +#include "Support/SystemUtils.h" #include "Support/CommandLine.h" #include "Support/Signals.h" #include "Config/unistd.h" @@ -30,9 +31,6 @@ #include #include -// This is the environment given to the program. -extern char ** environ; - namespace { cl::list InputFilenames(cl::Positional, cl::desc(""), @@ -320,6 +318,80 @@ } // +// +// Function: copy_env() +// +// Description: +// This function takes an array of environment variables and makes a +// copy of it. This copy can then be manipulated any way the caller likes +// without affecting the process's real environment. +// +// Inputs: +// envp - An array of C strings containing an environment. +// +// Outputs: +// None. +// +// Return value: +// NULL - An error occurred. +// Otherwise, a pointer to a new array of C strings is returned. Every string +// in the array is a duplicate of the one in the original array (i.e. we do +// not copy the char *'s from one array to another). +// +static char ** +copy_env (char ** envp) +{ + // The new environment list + char ** newenv; + + // The number of entries in the old environment list + int entries; + + // + // Count the number of entries in the old list; + // + for (entries = 0; envp[entries] != NULL; entries++) + { + ; + } + + // + // Add one more entry for the NULL pointer that ends the list. + // + ++entries; + + // + // If there are no entries at all, just return NULL. + // + if (entries == 0) + { + return NULL; + } + + // + // Allocate a new environment list. + // + if ((newenv = new (char *) [entries]) == NULL) + { + return NULL; + } + + // + // Make a copy of the list. Don't forget the NULL that ends the list. + // + entries = 0; + while (envp[entries] != NULL) + { + newenv[entries] = strdup (envp[entries]); + ++entries; + } + newenv[entries] = NULL; + + return newenv; +} + + +// // Function: remove_env() // // Description: @@ -371,7 +443,7 @@ // if (!strcmp (name, envp[index])) { - envp[index] = NULL; + *envp[index] = '\0'; } else { @@ -383,7 +455,7 @@ } -int main(int argc, char **argv) { +int main(int argc, char **argv, char ** envp) { cl::ParseCommandLineOptions(argc, argv, " llvm linker for GCC\n"); std::string ErrorMessage; @@ -509,26 +581,39 @@ // if (Native) { - // Name of the output assembly file - std::string AssemblyFile = OutputFilename + ".s"; - - // Name of the command to execute - std::string cmd; - // - // Create an executable file from the bytecode file. + // Remove these environment variables from the environment of the + // programs that we will execute. It appears that GCC sets these + // environment variables so that the programs it uses can configure + // themselves identically. + // + // However, when we invoke GCC below, we want it to use its normal + // configuration. Hence, we must sanitize it's environment. // - remove_env ("LIBRARY_PATH", environ); - remove_env ("COLLECT_GCC_OPTIONS", environ); - remove_env ("GCC_EXEC_PREFIX", environ); - remove_env ("COMPILER_PATH", environ); - remove_env ("COLLECT_GCC", environ); + char ** clean_env = copy_env (envp); + if (clean_env == NULL) + { + return PrintAndReturn (argv[0], "Failed to duplicate environment"); + } + remove_env ("LIBRARY_PATH", clean_env); + remove_env ("COLLECT_GCC_OPTIONS", clean_env); + remove_env ("GCC_EXEC_PREFIX", clean_env); + remove_env ("COMPILER_PATH", clean_env); + remove_env ("COLLECT_GCC", clean_env); // // Run LLC to convert the bytecode file into assembly code. // - cmd = "llc -f -o " + AssemblyFile + " " + RealBytecodeOutput; - if ((system (cmd.c_str())) == -1) + char * cmd[8]; + std::string AssemblyFile = OutputFilename + ".s"; + + cmd[0] = (char *) "llc"; + cmd[1] = (char *) "-f"; + cmd[2] = (char *) "-o"; + cmd[3] = (char *) AssemblyFile.c_str(); + cmd[4] = (char *) RealBytecodeOutput.c_str(); + cmd[5] = (char *) NULL; + if ((ExecWait (cmd, clean_env)) == -1) { return PrintAndReturn (argv[0], "Failed to compile bytecode"); } @@ -541,10 +626,24 @@ // and linker because we don't know where to put the _start symbol. // GCC mysteriously knows how to do it. // - cmd = "gcc -o " + OutputFilename + " " + AssemblyFile; - if ((system (cmd.c_str())) == -1) + cmd[0] = (char *) "gcc"; + cmd[1] = (char *) "-o"; + cmd[2] = (char *) OutputFilename.c_str(); + cmd[3] = (char *) AssemblyFile.c_str(); + cmd[4] = (char *) NULL; + if ((ExecWait (cmd, clean_env)) == -1) { return PrintAndReturn (argv[0], "Failed to link native code file"); + } + + // + // The assembly file is no longer needed. Remove it, but do not exit + // if we fail to unlink it. + // + if (((access (AssemblyFile.c_str(), F_OK)) != -1) && + ((unlink (AssemblyFile.c_str())) == -1)) + { + std::cerr << "Warning: Failed to unlink " << AssemblyFile << "\n"; } } else From lattner at cs.uiuc.edu Wed Sep 17 12:27:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Sep 17 12:27:01 2003 Subject: [llvm-commits] CVS: llvm/lib/ExecutionEngine/Interpreter/Execution.cpp ExecutionAnnotations.h Interpreter.h Message-ID: <200309171726.MAA27881@apoc.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine/Interpreter: Execution.cpp updated: 1.97 -> 1.98 ExecutionAnnotations.h updated: 1.11 -> 1.12 Interpreter.h updated: 1.42 -> 1.43 --- Log message: Change FunctionInfo from being an annotation put on Functions to be something which is mapped from functions. --- Diffs of the changes: Index: llvm/lib/ExecutionEngine/Interpreter/Execution.cpp diff -u llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.97 llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.98 --- llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.97 Fri Sep 5 13:55:03 2003 +++ llvm/lib/ExecutionEngine/Interpreter/Execution.cpp Wed Sep 17 12:26:22 2003 @@ -120,8 +120,6 @@ void Interpreter::initializeExecutionEngine() { TheEE = this; - AnnotationManager::registerAnnotationFactory(FunctionInfoAID, - &FunctionInfo::Create); initializeSignalHandlers(); } @@ -899,7 +897,7 @@ // Dispatch and Execution Code //===----------------------------------------------------------------------===// -FunctionInfo::FunctionInfo(Function *F) : Annotation(FunctionInfoAID) { +FunctionInfo::FunctionInfo(Function *F) { // Assign slot numbers to the function arguments... for (Function::const_aiterator AI = F->abegin(), E = F->aend(); AI != E; ++AI) AI->addAnnotation(new SlotNumber(getValueSlot(AI))); @@ -959,11 +957,12 @@ // the function. Also calculate the number of values for each type slot // active. // - FunctionInfo *FuncInfo = - (FunctionInfo*)F->getOrCreateAnnotation(FunctionInfoAID); - ECStack.push_back(ExecutionContext()); // Make a new stack frame... + FunctionInfo *&FuncInfo = FunctionInfoMap[F]; + if (!FuncInfo) FuncInfo = new FunctionInfo(F); - ExecutionContext &StackFrame = ECStack.back(); // Fill it in... + // Make a new stack frame... and fill it in. + ECStack.push_back(ExecutionContext()); + ExecutionContext &StackFrame = ECStack.back(); StackFrame.CurFunction = F; StackFrame.CurBB = F->begin(); StackFrame.CurInst = StackFrame.CurBB->begin(); Index: llvm/lib/ExecutionEngine/Interpreter/ExecutionAnnotations.h diff -u llvm/lib/ExecutionEngine/Interpreter/ExecutionAnnotations.h:1.11 llvm/lib/ExecutionEngine/Interpreter/ExecutionAnnotations.h:1.12 --- llvm/lib/ExecutionEngine/Interpreter/ExecutionAnnotations.h:1.11 Thu Sep 4 18:15:40 2003 +++ llvm/lib/ExecutionEngine/Interpreter/ExecutionAnnotations.h Wed Sep 17 12:26:22 2003 @@ -15,23 +15,9 @@ // information about the function, including the number of types present in the // function, and the number of values for each type. // -// This annotation object is created on demand, and attaches other annotation -// objects to the instructions in the function when it's created. -// -static AnnotationID FunctionInfoAID( - AnnotationManager::getID("Interpreter::FunctionInfo")); - -struct FunctionInfo : public Annotation { +struct FunctionInfo { FunctionInfo(Function *F); std::vector NumPlaneElements; - - // Create - Factory function to allow FunctionInfo annotations to be - // created on demand. - // - static Annotation *Create(AnnotationID AID, const Annotable *O, void *) { - assert(AID == FunctionInfoAID); - return new FunctionInfo(cast((Value*)O)); - } private: unsigned getValueSlot(const Value *V); Index: llvm/lib/ExecutionEngine/Interpreter/Interpreter.h diff -u llvm/lib/ExecutionEngine/Interpreter/Interpreter.h:1.42 llvm/lib/ExecutionEngine/Interpreter/Interpreter.h:1.43 --- llvm/lib/ExecutionEngine/Interpreter/Interpreter.h:1.42 Fri Sep 5 15:08:10 2003 +++ llvm/lib/ExecutionEngine/Interpreter/Interpreter.h Wed Sep 17 12:26:22 2003 @@ -82,6 +82,8 @@ // AtExitHandlers - List of functions to call when the program exits, // registered with the atexit() library function. std::vector AtExitHandlers; + + std::map FunctionInfoMap; public: Interpreter(Module *M, bool isLittleEndian, bool isLongPointer, bool TraceMode); From brukman at cs.uiuc.edu Wed Sep 17 13:15:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed Sep 17 13:15:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/Makefile.programs Message-ID: <200309171814.NAA30100@zion.cs.uiuc.edu> Changes in directory llvm/test/Programs: Makefile.programs updated: 1.92 -> 1.93 --- Log message: Forward the options passed on the make command line to recursive sub-makes, thus enabling running `make ENABLE_OPTIMIZED=1' correctly, for example. --- Diffs of the changes: Index: llvm/test/Programs/Makefile.programs diff -u llvm/test/Programs/Makefile.programs:1.92 llvm/test/Programs/Makefile.programs:1.93 --- llvm/test/Programs/Makefile.programs:1.92 Thu Sep 11 13:04:23 2003 +++ llvm/test/Programs/Makefile.programs Wed Sep 17 13:14:25 2003 @@ -448,7 +448,7 @@ GENERATEREPORT := $(LEVEL)/test/Programs/GenerateReport.pl report.$(TEST).raw.out: $(REPORT_DEPENDENCIES) $(TestMakefile) - gmake TEST=$(TEST) 2>&1 | tee $@ + gmake MAKEFLAGS=$(MAKEFLAGS) TEST=$(TEST) 2>&1 | tee $@ ifneq ($(TestReport),) report.$(TEST).txt: report.$(TEST).raw.out $(TestReport) $(GENERATEREPORT) From brukman at cs.uiuc.edu Wed Sep 17 13:21:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed Sep 17 13:21:01 2003 Subject: [llvm-commits] CVS: llvm/utils/Burg/Makefile Message-ID: <200309171820.NAA31040@zion.cs.uiuc.edu> Changes in directory llvm/utils/Burg: Makefile updated: 1.19 -> 1.20 --- Log message: Fix the flag on `rm' to properly do a recursive deletion. --- Diffs of the changes: Index: llvm/utils/Burg/Makefile diff -u llvm/utils/Burg/Makefile:1.19 llvm/utils/Burg/Makefile:1.20 --- llvm/utils/Burg/Makefile:1.19 Tue Sep 9 15:57:03 2003 +++ llvm/utils/Burg/Makefile Wed Sep 17 13:20:35 2003 @@ -10,7 +10,7 @@ $(SourceDir)/lex.c: gram.tab.h clean:: - rm -ff gram.tab.h gram.tab.c core* *.aux *.log *.dvi sample sample.c tmp + rm -rf gram.tab.h gram.tab.c core* *.aux *.log *.dvi sample sample.c tmp #$(BUILD_OBJ_DIR)/Release/lex.o $(BUILD_OBJ_DIR)/Profile/lex.o $(BUILD_OBJ_DIR)/Debug/lex.o: gram.tab.h From brukman at cs.uiuc.edu Wed Sep 17 13:22:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed Sep 17 13:22:01 2003 Subject: [llvm-commits] CVS: llvm/utils/TableGen/CodeEmitterGen.cpp Message-ID: <200309171821.NAA31079@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: CodeEmitterGen.cpp updated: 1.26 -> 1.27 --- Log message: Do not put DEBUG() guard around error condition; this must *always* be printed. --- Diffs of the changes: Index: llvm/utils/TableGen/CodeEmitterGen.cpp diff -u llvm/utils/TableGen/CodeEmitterGen.cpp:1.26 llvm/utils/TableGen/CodeEmitterGen.cpp:1.27 --- llvm/utils/TableGen/CodeEmitterGen.cpp:1.26 Wed Aug 6 11:28:49 2003 +++ llvm/utils/TableGen/CodeEmitterGen.cpp Wed Sep 17 13:21:48 2003 @@ -209,7 +209,7 @@ } o << " default:\n" - << " DEBUG(std::cerr << \"Not supported instr: \" << MI << \"\\n\");\n" + << " std::cerr << \"Not supported instr: \" << MI << \"\\n\";\n" << " abort();\n" << " }\n" << " return Value;\n" From brukman at cs.uiuc.edu Wed Sep 17 13:53:01 2003 From: brukman at cs.uiuc.edu (Michael Brukman) Date: Wed Sep 17 13:53:01 2003 Subject: [llvm-commits] CVS: llvm/www/docs/HowToSubmitABug.html Message-ID: <200309171851.NAA02574@tank.cs.uiuc.edu> Changes in directory llvm/www/docs: HowToSubmitABug.html updated: 1.4 -> 1.5 --- Log message: Added sections about debugging mis-compilations and incorrect code generation. --- Diffs of the changes: Index: llvm/www/docs/HowToSubmitABug.html diff -u llvm/www/docs/HowToSubmitABug.html:1.4 llvm/www/docs/HowToSubmitABug.html:1.5 --- llvm/www/docs/HowToSubmitABug.html:1.4 Sun Aug 24 12:30:55 2003 +++ llvm/www/docs/HowToSubmitABug.html Wed Sep 17 13:51:47 2003 @@ -20,8 +20,10 @@

  • Bugs in LLVM passes
  • Miscompilations +
  • Incorrect code generation (JIT and LLC) -

    Written by Chris Lattner

    +

    Written by Chris Lattner and + Misha Brukman

    @@ -138,7 +140,7 @@ the full list of objects linked). Then run:

    -  as < /dev/null > null.bc
    +  llvm-as < /dev/null > null.bc
       gccld -debug-pass=Arguments null.bc
     

    @@ -180,13 +182,80 @@
    -Miscompilations +Miscompilations

      -Fortunately we haven't had too many miscompilations. Because of this, this -section is a TODO. Basically, use bugpoint to track down the problem.

      +A miscompilation occurs when a pass does not correctly transform a program, thus +producing errors that are only noticed during execution. This is different from +producing invalid LLVM code (i.e., code not in SSA form, using values before +defining them, etc.) which the verifier will check for after a pass finishes its +run.

      +To debug a miscompilation, you should choose which program you wish to run the +output through, e.g. C backend, the JIT, or LLC, and a selection of passes, one +of which may be causing the error, and run, for example: + +

      +  bugpoint -run-cbe -mode=compile [... optimization passes ...] file-to-test.bc
      +
      + +bugpoint will try to narrow down your list of passes to the one pass +that causes an error, and simplify the bytecode file as much as it can to assist +you. It will print a message letting you know how to reproduce the resulting +error. + + +
    +
    +Incorrect code generation +
      + + +Similarly to debugging incorrect compilation by mis-behaving passes, you can +debug incorrect code generation by either LLC or the JIT, using +bugpoint. The process bugpoint follows in this case is to try +to narrow the code down to a function that is miscompiled by one or the other +method, but since for correctness, the entire program must be run, +bugpoint will compile the code it deems to not be affected with the C +Backend, and then link in the shared object it generates.

      + +To debug the JIT: +

      +  bugpoint -run-jit -mode=codegen -output=[correct output file] [bytecodefile]
      +
      + +Similarly, to debug the LLC, one would run: +
      +  bugpoint -run-llc -mode=codegen -output=[correct output file] [bytecodefile]
      +
      + +At the end of a successful bugpoint run, you will be presented +with two bytecode files: a safe file which can be compiled with the C +backend and the test file which either LLC or the JIT +mis-codegenerates, and thus causes the error.

      + +To reproduce the error that bugpoint found, it is sufficient to do the +following: + +

        +
      1. Regenerate the shared object from the safe bytecode file:
        +
        +  llvm-dis -c safe.bc -o safe.c
        + gcc -shared safe.c -o safe.so +
      2. +
      3. If debugging LLC, compile test bytecode native and link with the shared object:
        +
        +  llc test.bc -o test.s -f
        + gcc test.s safe.so -o test.llc
        + ./test.llc [program options] +
      4. +

        + If debugging the JIT, load the shared object and supply the test bytecode:
        +

        +  lli -load=safe.so test.bc [program options]
        +
        +
    @@ -196,6 +265,6 @@
    Chris Lattner
    -Last modified: Fri May 23 09:48:53 CDT 2003 +Last modified: Wed Sep 17 13:49:15 CDT 2003 From criswell at cs.uiuc.edu Wed Sep 17 14:03:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Wed Sep 17 14:03:01 2003 Subject: [llvm-commits] CVS: llvm/include/Support/SystemUtils.h Message-ID: <200309171902.OAA08621@choi.cs.uiuc.edu> Changes in directory llvm/include/Support: SystemUtils.h updated: 1.4 -> 1.5 --- Log message: In ExecWait(), made the child process exit if it can't execve() the new program. Added the use of const (which compiles and is hopefully correct). Added comments. --- Diffs of the changes: Index: llvm/include/Support/SystemUtils.h diff -u llvm/include/Support/SystemUtils.h:1.4 llvm/include/Support/SystemUtils.h:1.5 --- llvm/include/Support/SystemUtils.h:1.4 Wed Sep 17 10:14:25 2003 +++ llvm/include/Support/SystemUtils.h Wed Sep 17 14:02:49 2003 @@ -41,5 +41,5 @@ /// Execute a program with the given arguments and environment and /// wait for it to terminate. /// -int ExecWait (char ** argv, char ** envp); +int ExecWait (const char * const argv[], const char * const envp[]); #endif From criswell at cs.uiuc.edu Wed Sep 17 14:03:08 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Wed Sep 17 14:03:08 2003 Subject: [llvm-commits] CVS: llvm/lib/Support/SystemUtils.cpp Message-ID: <200309171902.OAA08614@choi.cs.uiuc.edu> Changes in directory llvm/lib/Support: SystemUtils.cpp updated: 1.14 -> 1.15 --- Log message: In ExecWait(), made the child process exit if it can't execve() the new program. Added the use of const (which compiles and is hopefully correct). Added comments. --- Diffs of the changes: Index: llvm/lib/Support/SystemUtils.cpp diff -u llvm/lib/Support/SystemUtils.cpp:1.14 llvm/lib/Support/SystemUtils.cpp:1.15 --- llvm/lib/Support/SystemUtils.cpp:1.14 Wed Sep 17 10:13:59 2003 +++ llvm/lib/Support/SystemUtils.cpp Wed Sep 17 14:02:48 2003 @@ -192,8 +192,10 @@ // a generic library function. The caller or executed program should report // errors in the way it sees fit. // +// This function does not use $PATH to find programs. +// int -ExecWait (char ** argv, char **envp) +ExecWait (const char * const old_argv[], const char * const old_envp[]) { // Child process ID register int child; @@ -202,32 +204,40 @@ int status; // - // Because UNIX is sometimes less than convenient, we need to use - // FindExecutable() to find the full pathname to the file to execute. + // Create local versions of the parameters that can be passed into execve() + // without creating const problems. // - // This is becausse execvp() doesn't use PATH, and we want to look for - // programs in the LLVM binary directory first anyway. - // - std::string Program = FindExecutable (argv[0], ""); - if (Program.empty()) - { - return 1; - } + char ** const argv = (char ** const) old_argv; + char ** const envp = (char ** const) old_envp; // // Create a child process. // switch (child=fork()) { + // + // An error occured: Return to the caller. + // case -1: return 1; break; + // + // Child process: Execute the program. + // case 0: - execve (Program.c_str(), argv, envp); - return 1; + execve (argv[0], argv, envp); + + // + // If the execve() failed, we should exit and let the parent pick up + // our non-zero exit status. + // + exit (1); break; + // + // Parent process: Break out of the switch to do our processing. + // default: break; } From criswell at cs.uiuc.edu Wed Sep 17 14:05:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Wed Sep 17 14:05:01 2003 Subject: [llvm-commits] CVS: llvm/tools/gccld/gccld.cpp Message-ID: <200309171904.OAA08636@choi.cs.uiuc.edu> Changes in directory llvm/tools/gccld: gccld.cpp updated: 1.47 -> 1.48 --- Log message: Added the use of the const keyword. Have gccld find the path to llc and gcc instead of having the library do it. --- Diffs of the changes: Index: llvm/tools/gccld/gccld.cpp diff -u llvm/tools/gccld/gccld.cpp:1.47 llvm/tools/gccld/gccld.cpp:1.48 --- llvm/tools/gccld/gccld.cpp:1.47 Wed Sep 17 10:20:51 2003 +++ llvm/tools/gccld/gccld.cpp Wed Sep 17 14:04:22 2003 @@ -339,7 +339,7 @@ // not copy the char *'s from one array to another). // static char ** -copy_env (char ** envp) +copy_env (char ** const envp) { // The new environment list char ** newenv; @@ -414,7 +414,7 @@ // undocumented if they do exist). // static void -remove_env (const char * name, char ** envp) +remove_env (const char * name, char ** const envp) { // Pointer for scanning arrays register char * p; @@ -602,17 +602,32 @@ remove_env ("COLLECT_GCC", clean_env); // + // Determine the locations of the llc and gcc programs. + // + std::string llc=FindExecutable ("llc", argv[0]); + std::string gcc=FindExecutable ("gcc", argv[0]); + if (llc.empty()) + { + return PrintAndReturn (argv[0], "Failed to find llc"); + } + + if (gcc.empty()) + { + return PrintAndReturn (argv[0], "Failed to find gcc"); + } + + // // Run LLC to convert the bytecode file into assembly code. // - char * cmd[8]; + const char * cmd[8]; std::string AssemblyFile = OutputFilename + ".s"; - cmd[0] = (char *) "llc"; - cmd[1] = (char *) "-f"; - cmd[2] = (char *) "-o"; - cmd[3] = (char *) AssemblyFile.c_str(); - cmd[4] = (char *) RealBytecodeOutput.c_str(); - cmd[5] = (char *) NULL; + cmd[0] = llc.c_str(); + cmd[1] = "-f"; + cmd[2] = "-o"; + cmd[3] = AssemblyFile.c_str(); + cmd[4] = RealBytecodeOutput.c_str(); + cmd[5] = NULL; if ((ExecWait (cmd, clean_env)) == -1) { return PrintAndReturn (argv[0], "Failed to compile bytecode"); @@ -626,11 +641,11 @@ // and linker because we don't know where to put the _start symbol. // GCC mysteriously knows how to do it. // - cmd[0] = (char *) "gcc"; - cmd[1] = (char *) "-o"; - cmd[2] = (char *) OutputFilename.c_str(); - cmd[3] = (char *) AssemblyFile.c_str(); - cmd[4] = (char *) NULL; + cmd[0] = gcc.c_str(); + cmd[1] = "-o"; + cmd[2] = OutputFilename.c_str(); + cmd[3] = AssemblyFile.c_str(); + cmd[4] = NULL; if ((ExecWait (cmd, clean_env)) == -1) { return PrintAndReturn (argv[0], "Failed to link native code file"); From criswell at cs.uiuc.edu Wed Sep 17 14:15:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Wed Sep 17 14:15:01 2003 Subject: [llvm-commits] CVS: llvm/tools/gccld/gccld.cpp Message-ID: <200309171914.OAA09207@choi.cs.uiuc.edu> Changes in directory llvm/tools/gccld: gccld.cpp updated: 1.48 -> 1.49 --- Log message: Replaced the call to strdup() with a new operator followed by a strcpy(). This should prevent calls to the new oerator and malloc. --- Diffs of the changes: Index: llvm/tools/gccld/gccld.cpp diff -u llvm/tools/gccld/gccld.cpp:1.48 llvm/tools/gccld/gccld.cpp:1.49 --- llvm/tools/gccld/gccld.cpp:1.48 Wed Sep 17 14:04:22 2003 +++ llvm/tools/gccld/gccld.cpp Wed Sep 17 14:14:41 2003 @@ -382,7 +382,8 @@ entries = 0; while (envp[entries] != NULL) { - newenv[entries] = strdup (envp[entries]); + newenv[entries] = new char[strlen (envp[entries]) + 1]; + strcpy (newenv[entries], envp[entries]); ++entries; } newenv[entries] = NULL; From brukman at cs.uiuc.edu Wed Sep 17 16:34:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed Sep 17 16:34:01 2003 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp Message-ID: <200309172133.QAA04884@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/InstrSched: InstrScheduling.cpp updated: 1.58 -> 1.59 --- Log message: Fixed spelling. --- Diffs of the changes: Index: llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp diff -u llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp:1.58 llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp:1.59 --- llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp:1.58 Tue Sep 16 00:55:15 2003 +++ llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp Wed Sep 17 16:33:36 2003 @@ -1060,7 +1060,7 @@ if (! S.getInstrInfo().hasOperandInterlock(node->getOpCode())) return false; - // Finally, if the instruction preceeds the branch, we make sure the + // Finally, if the instruction precedes the branch, we make sure the // instruction can be reordered relative to the branch. We simply check // if the instr. has only 1 outgoing edge, viz., a CD edge to the branch. // @@ -1092,7 +1092,7 @@ bool nodeIsPredecessor) { if (nodeIsPredecessor) { - // If node is in the same basic block (i.e., preceeds brNode), + // If node is in the same basic block (i.e., precedes brNode), // remove it and all its incident edges from the graph. Make sure we // add dummy edges for pred/succ nodes that become entry/exit nodes. graph->eraseIncidentEdges(node, /*addDummyEdges*/ true); From brukman at cs.uiuc.edu Wed Sep 17 16:34:08 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed Sep 17 16:34:08 2003 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/MachineInstr.cpp Message-ID: <200309172133.QAA04858@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: MachineInstr.cpp updated: 1.78 -> 1.79 --- Log message: Fixed spelling. --- Diffs of the changes: Index: llvm/lib/CodeGen/MachineInstr.cpp diff -u llvm/lib/CodeGen/MachineInstr.cpp:1.78 llvm/lib/CodeGen/MachineInstr.cpp:1.79 --- llvm/lib/CodeGen/MachineInstr.cpp:1.78 Thu Aug 7 10:01:48 2003 +++ llvm/lib/CodeGen/MachineInstr.cpp Wed Sep 17 16:32:50 2003 @@ -127,7 +127,7 @@ } -// Subsitute all occurrences of Value* oldVal with newVal in all operands +// Substitute all occurrences of Value* oldVal with newVal in all operands // and all implicit refs. // If defsOnly == true, substitute defs only. unsigned @@ -140,7 +140,7 @@ unsigned numSubst = 0; - // Subsitute operands + // Substitute operands for (MachineInstr::val_op_iterator O = begin(), E = end(); O != E; ++O) if (*O == oldVal) if (!defsOnly || @@ -153,7 +153,7 @@ else someArgsWereIgnored = true; - // Subsitute implicit refs + // Substitute implicit refs for (unsigned i=0, N=getNumImplicitRefs(); i < N; ++i) if (getImplicitRef(i) == oldVal) if (!defsOnly || @@ -301,7 +301,7 @@ OS << ""; } - // code for printing implict references + // code for printing implicit references if (getNumImplicitRefs()) { OS << "\tImplicitRefs: "; for(unsigned i = 0, e = getNumImplicitRefs(); i != e; ++i) { @@ -330,7 +330,7 @@ os << ""; } - // code for printing implict references + // code for printing implicit references unsigned NumOfImpRefs = MI.getNumImplicitRefs(); if (NumOfImpRefs > 0) { os << "\tImplicit: "; From brukman at cs.uiuc.edu Wed Sep 17 16:35:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed Sep 17 16:35:01 2003 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/InstrSelection/InstrForest.cpp InstrSelection.cpp Message-ID: <200309172134.QAA04906@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/InstrSelection: InstrForest.cpp updated: 1.44 -> 1.45 InstrSelection.cpp updated: 1.61 -> 1.62 --- Log message: Fixed spelling. --- Diffs of the changes: Index: llvm/lib/CodeGen/InstrSelection/InstrForest.cpp diff -u llvm/lib/CodeGen/InstrSelection/InstrForest.cpp:1.44 llvm/lib/CodeGen/InstrSelection/InstrForest.cpp:1.45 --- llvm/lib/CodeGen/InstrSelection/InstrForest.cpp:1.44 Mon Jun 30 16:58:44 2003 +++ llvm/lib/CodeGen/InstrSelection/InstrForest.cpp Wed Sep 17 16:34:23 2003 @@ -4,7 +4,7 @@ // tree if one or more of them might be potentially combined into a single // complex instruction in the target machine. // Since this grouping is completely machine-independent, we do it as -// aggressive as possible to exploit any possible taret instructions. +// aggressive as possible to exploit any possible target instructions. // In particular, we group two instructions O and I if: // (1) Instruction O computes an operand used by instruction I, // and (2) O and I are part of the same basic block, Index: llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp diff -u llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp:1.61 llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp:1.62 --- llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp:1.61 Thu Aug 21 17:10:08 2003 +++ llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp Wed Sep 17 16:34:23 2003 @@ -81,7 +81,7 @@ { mcfi.addTemp(this); - Operands.push_back(Use(s1, this)); // s1 must be nonnull + Operands.push_back(Use(s1, this)); // s1 must be non-null if (s2) { Operands.push_back(Use(s2, this)); } @@ -239,7 +239,7 @@ MachineFunction &MF = MachineFunction::get(BB->getParent()); // FIXME: if PHI instructions existed in the machine code, this would be - // unnecesary. + // unnecessary. MachineBasicBlock *MBB = 0; for (MachineFunction::iterator I = MF.begin(), E = MF.end(); I != E; ++I) if (I->getBasicBlock() == BB) { @@ -342,7 +342,7 @@ } } - // Finally, do any postprocessing on this node after its children + // Finally, do any post-processing on this node after its children // have been translated // if (treeRoot->opLabel != VRegListOp) From lattner at cs.uiuc.edu Wed Sep 17 17:03:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Sep 17 17:03:02 2003 Subject: [llvm-commits] CVS: llvm/utils/NightlyTestTemplate.html Message-ID: <200309172203.RAA08770@neo.cs.uiuc.edu> Changes in directory llvm/utils: NightlyTestTemplate.html updated: 1.18 -> 1.19 --- Log message: Document new column --- Diffs of the changes: Index: llvm/utils/NightlyTestTemplate.html diff -u llvm/utils/NightlyTestTemplate.html:1.18 llvm/utils/NightlyTestTemplate.html:1.19 --- llvm/utils/NightlyTestTemplate.html:1.18 Thu Aug 21 10:55:26 2003 +++ llvm/utils/NightlyTestTemplate.html Wed Sep 17 17:02:49 2003 @@ -157,6 +157,8 @@ and actually running the program.
  • GCC/LLC - The speed-up of the LLC output vs the native GCC output: greater than 1 is a speedup, less than 1 is a slowdown. +
  • GCC/CBE - The speed-up of the CBE output vs the native + GCC output: greater than 1 is a speedup, less than 1 is a slowdown.

    A complete log of testing From lattner at cs.uiuc.edu Wed Sep 17 17:04:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Sep 17 17:04:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/TEST.nightly.report Message-ID: <200309172203.RAA08781@neo.cs.uiuc.edu> Changes in directory llvm/test/Programs: TEST.nightly.report updated: 1.16 -> 1.17 --- Log message: Add new GCC/CBE column --- Diffs of the changes: Index: llvm/test/Programs/TEST.nightly.report diff -u llvm/test/Programs/TEST.nightly.report:1.16 llvm/test/Programs/TEST.nightly.report:1.17 --- llvm/test/Programs/TEST.nightly.report:1.16 Fri Aug 29 11:13:20 2003 +++ llvm/test/Programs/TEST.nightly.report Wed Sep 17 17:03:10 2003 @@ -28,6 +28,16 @@ } } +sub GCCCBERatio { + my ($Cols, $Col) = @_; + if ($Cols->[$Col-4] ne "*" and $Cols->[$Col-5] ne "*" and + $Cols->[$Col-4] != "0") { + return sprintf("%3.2f", $Cols->[$Col-5]/$Cols->[$Col-4]); + } else { + return "n/a"; + } +} + # 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 # separators, and closures may be put in for custom processing. @@ -48,4 +58,5 @@ ["LLC" , 'TEST-RESULT-llc-time: real\s*([.0-9m:]+)', \&FormatTime], ["JIT" , 'TEST-RESULT-jit-time: real\s*([.0-9m:]+)', \&FormatTime], ["GCC/LLC" , \&GCCLLCRatio] + ["GCC/CBE" , \&GCCCBERatio] ); From lattner at cs.uiuc.edu Thu Sep 18 09:24:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Sep 18 09:24:02 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/Makefile.programs Message-ID: <200309181423.JAA03640@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs: Makefile.programs updated: 1.93 -> 1.94 --- Log message: unbreak the nightly tester --- Diffs of the changes: Index: llvm/test/Programs/Makefile.programs diff -u llvm/test/Programs/Makefile.programs:1.93 llvm/test/Programs/Makefile.programs:1.94 --- llvm/test/Programs/Makefile.programs:1.93 Wed Sep 17 13:14:25 2003 +++ llvm/test/Programs/Makefile.programs Thu Sep 18 09:23:12 2003 @@ -448,7 +448,7 @@ GENERATEREPORT := $(LEVEL)/test/Programs/GenerateReport.pl report.$(TEST).raw.out: $(REPORT_DEPENDENCIES) $(TestMakefile) - gmake MAKEFLAGS=$(MAKEFLAGS) TEST=$(TEST) 2>&1 | tee $@ + gmake TEST=$(TEST) 2>&1 | tee $@ ifneq ($(TestReport),) report.$(TEST).txt: report.$(TEST).raw.out $(TestReport) $(GENERATEREPORT) From lattner at cs.uiuc.edu Thu Sep 18 10:28:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Sep 18 10:28:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/TEST.nightly.report Message-ID: <200309181527.KAA10453@neo.cs.uiuc.edu> Changes in directory llvm/test/Programs: TEST.nightly.report updated: 1.17 -> 1.18 --- Log message: Ugh, fix nightly tester redux --- Diffs of the changes: Index: llvm/test/Programs/TEST.nightly.report diff -u llvm/test/Programs/TEST.nightly.report:1.17 llvm/test/Programs/TEST.nightly.report:1.18 --- llvm/test/Programs/TEST.nightly.report:1.17 Wed Sep 17 17:03:10 2003 +++ llvm/test/Programs/TEST.nightly.report Thu Sep 18 10:27:11 2003 @@ -57,6 +57,6 @@ ["CBE" , 'TEST-RESULT-cbe-time: real\s*([.0-9m:]+)', \&FormatTime], ["LLC" , 'TEST-RESULT-llc-time: real\s*([.0-9m:]+)', \&FormatTime], ["JIT" , 'TEST-RESULT-jit-time: real\s*([.0-9m:]+)', \&FormatTime], - ["GCC/LLC" , \&GCCLLCRatio] + ["GCC/LLC" , \&GCCLLCRatio], ["GCC/CBE" , \&GCCCBERatio] ); From brukman at cs.uiuc.edu Thu Sep 18 11:17:02 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Thu Sep 18 11:17:02 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/ModuleProvider.h Message-ID: <200309181616.LAA02719@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: ModuleProvider.h added (r1.1) --- Log message: Abstract interface for module providers, e.g. streaming bytecode reader. --- Diffs of the changes: Index: llvm/include/llvm/ModuleProvider.h diff -c /dev/null llvm/include/llvm/ModuleProvider.h:1.1 *** /dev/null Thu Sep 18 11:16:43 2003 --- llvm/include/llvm/ModuleProvider.h Thu Sep 18 11:16:32 2003 *************** *** 0 **** --- 1,40 ---- + //===-- llvm/ModuleProvider.h - Interface for module providers --*- C++ -*-===// + // + // Abstract interface for providing a module. + // + //===----------------------------------------------------------------------===// + + #ifndef MODULEPROVIDER_H + #define MODULEPROVIDER_H + + class Function; + class Module; + + class AbstractModuleProvider { + Module *M; + + protected: + AbstractModuleProvider(); + + public: + virtual ~AbstractModuleProvider(); + + /// getModule - returns the module this provider is encapsulating + /// + Module* getModule() { return M; } + + /// materializeFunction - make sure the given function is fully read. + /// + virtual void materializeFunction(Function *F) = 0; + + /// materializeModule - make sure the entire Module has been completely read. + /// + void materializeModule(); + + /// releaseModule - no longer delete the Module* when provider is destroyed. + /// + Module* releaseModule() { Module *tempM = M; M = 0; return tempM; } + + }; + + #endif From brukman at cs.uiuc.edu Thu Sep 18 11:18:02 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Thu Sep 18 11:18:02 2003 Subject: [llvm-commits] CVS: llvm/lib/VMCore/ModuleProvider.cpp Message-ID: <200309181617.LAA02763@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: ModuleProvider.cpp added (r1.1) --- Log message: Minimal implementation of the abstract ModuleProvider interface. --- Diffs of the changes: Index: llvm/lib/VMCore/ModuleProvider.cpp diff -c /dev/null llvm/lib/VMCore/ModuleProvider.cpp:1.1 *** /dev/null Thu Sep 18 11:17:16 2003 --- llvm/lib/VMCore/ModuleProvider.cpp Thu Sep 18 11:17:06 2003 *************** *** 0 **** --- 1,28 ---- + //===-- ModuleProvider.cpp - Base implementation for module providers -----===// + // + // Minimal implementation of the abstract interface for providing a module. + // + //===----------------------------------------------------------------------===// + + #include "llvm/ModuleProvider.h" + #include "llvm/Module.h" + + /// ctor - always have a valid Module + /// + AbstractModuleProvider::AbstractModuleProvider() { + M = new Module(""); + } + + /// dtor - when we leave, we take our Module with us + /// + AbstractModuleProvider::~AbstractModuleProvider() { + delete M; + } + + /// materializeFunction - make sure the given function is fully read. + /// + void AbstractModuleProvider::materializeModule() { + for (Module::iterator i = M->begin(), e = M->end(); i != e; ++i) { + materializeFunction(i); + } + } From criswell at cs.uiuc.edu Thu Sep 18 11:23:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu Sep 18 11:23:01 2003 Subject: [llvm-commits] CVS: llvm/tools/gccld/gencode.cpp util.cpp util.h gccld.cpp Message-ID: <200309181622.LAA27493@choi.cs.uiuc.edu> Changes in directory llvm/tools/gccld: gencode.cpp added (r1.1) util.cpp added (r1.1) util.h added (r1.1) gccld.cpp updated: 1.49 -> 1.50 --- Log message: Refactored gccld into three C++ source files. Added code ignore bytecode link failures when generating native code. Moved native code and bytecode generation out of the main() function. --- Diffs of the changes: Index: llvm/tools/gccld/gencode.cpp diff -c /dev/null llvm/tools/gccld/gencode.cpp:1.1 *** /dev/null Thu Sep 18 11:22:37 2003 --- llvm/tools/gccld/gencode.cpp Thu Sep 18 11:22:26 2003 *************** *** 0 **** --- 1,228 ---- + //===- genexec.cpp - Functions for generating executable files ------------===// + // + // This file contains functions for generating executable files once linking + // has finished. This includes generating a shell script to run the JIT or + // a native executable derived from the bytecode. + // + //===----------------------------------------------------------------------===// + + #include "llvm/Transforms/Utils/Linker.h" + #include "llvm/Transforms/IPO.h" + #include "llvm/Transforms/Scalar.h" + #include "llvm/Target/TargetData.h" + #include "llvm/Module.h" + #include "llvm/PassManager.h" + #include "llvm/Bytecode/WriteBytecodePass.h" + #include "Support/SystemUtils.h" + #include "util.h" + + #include + #include + #include + + // + // Function: GenerateBytecode () + // + // Description: + // This function generates a bytecode file from the specified module. + // + // Inputs: + // M - The module for which bytecode should be generated. + // Strip - Flags whether symbols should be stripped from the output. + // Internalize - Flags whether all symbols should be marked internal. + // Out - Pointer to file stream to which to write the output. + // + // Outputs: + // None. + // + // Return value: + // 0 - No error. + // 1 - Error. + // + int + GenerateBytecode (Module * M, + bool Strip, + bool Internalize, + std::ofstream * Out) + { + // In addition to just linking the input from GCC, we also want to spiff it up + // a little bit. Do this now. + PassManager Passes; + + // Add an appropriate TargetData instance for this module... + Passes.add(new TargetData("gccld", M)); + + // Linking modules together can lead to duplicated global constants, only keep + // one copy of each constant... + // + Passes.add(createConstantMergePass()); + + // If the -s command line option was specified, strip the symbols out of the + // resulting program to make it smaller. -s is a GCC option that we are + // supporting. + // + if (Strip) + Passes.add(createSymbolStrippingPass()); + + // Often if the programmer does not specify proper prototypes for the + // functions they are calling, they end up calling a vararg version of the + // function that does not get a body filled in (the real function has typed + // arguments). This pass merges the two functions. + // + Passes.add(createFunctionResolvingPass()); + + if (Internalize) { + // Now that composite has been compiled, scan through the module, looking + // for a main function. If main is defined, mark all other functions + // internal. + // + Passes.add(createInternalizePass()); + } + + // Remove unused arguments from functions... + // + Passes.add(createDeadArgEliminationPass()); + + // The FuncResolve pass may leave cruft around if functions were prototyped + // differently than they were defined. Remove this cruft. + // + Passes.add(createInstructionCombiningPass()); + + // Delete basic blocks, which optimization passes may have killed... + // + Passes.add(createCFGSimplificationPass()); + + // Now that we have optimized the program, discard unreachable functions... + // + Passes.add(createGlobalDCEPass()); + + // Add the pass that writes bytecode to the output file... + Passes.add(new WriteBytecodePass(Out)); + + // Run our queue of passes all at once now, efficiently. + Passes.run(*M); + + return 0; + } + + // + // Function: generate_assembly () + // + // Description: + // This function generates a native assembly language source file from the + // specified bytecode file. + // + // Inputs: + // InputFilename - The name of the output bytecode file. + // OutputFilename - The name of the file to generate. + // llc - The pathname to use for LLC. + // envp - The environment to use when running LLC. + // + // Outputs: + // None. + // + // Return value: + // 0 - Success + // 1 - Failure + // + int + generate_assembly (std::string OutputFilename, + std::string InputFilename, + std::string llc, + char ** const envp) + { + // + // Run LLC to convert the bytecode file into assembly code. + // + const char * cmd[8]; + + cmd[0] = llc.c_str(); + cmd[1] = "-f"; + cmd[2] = "-o"; + cmd[3] = OutputFilename.c_str(); + cmd[4] = InputFilename.c_str(); + cmd[5] = NULL; + if ((ExecWait (cmd, envp)) == -1) + { + return 1; + } + + return 0; + } + + // + // Function: generate_native () + // + // Description: + // This function generates a native assembly language source file from the + // specified assembly source file. + // + // Inputs: + // InputFilename - The name of the output bytecode file. + // OutputFilename - The name of the file to generate. + // Libraries - The list of libraries with which to link. + // gcc - The pathname to use for GGC. + // envp - A copy of the process's current environment. + // + // Outputs: + // None. + // + // Return value: + // 0 - Success + // 1 - Failure + // + int + generate_native (std::string OutputFilename, + std::string InputFilename, + std::vector Libraries, + std::string gcc, + char ** const envp) + { + // + // Remove these environment variables from the environment of the + // programs that we will execute. It appears that GCC sets these + // environment variables so that the programs it uses can configure + // themselves identically. + // + // However, when we invoke GCC below, we want it to use its normal + // configuration. Hence, we must sanitize it's environment. + // + char ** clean_env = copy_env (envp); + if (clean_env == NULL) + { + return 1; + } + remove_env ("LIBRARY_PATH", clean_env); + remove_env ("COLLECT_GCC_OPTIONS", clean_env); + remove_env ("GCC_EXEC_PREFIX", clean_env); + remove_env ("COMPILER_PATH", clean_env); + remove_env ("COLLECT_GCC", clean_env); + + const char * cmd[8 + Libraries.size()]; + + // + // Run GCC to assemble and link the program into native code. + // + // Note: + // We can't just assemble and link the file with the system assembler + // and linker because we don't know where to put the _start symbol. + // GCC mysteriously knows how to do it. + // + unsigned int index=0; + cmd[index++] = gcc.c_str(); + cmd[index++] = "-o"; + cmd[index++] = OutputFilename.c_str(); + cmd[index++] = InputFilename.c_str(); + for (; (index - 4) < Libraries.size(); index++) + { + Libraries[index - 4] = "-l" + Libraries[index - 4]; + cmd[index] = Libraries[index-4].c_str(); + } + cmd[index++] = NULL; + if ((ExecWait (cmd, clean_env)) == -1) + { + return 1; + } + + return 0; + } Index: llvm/tools/gccld/util.cpp diff -c /dev/null llvm/tools/gccld/util.cpp:1.1 *** /dev/null Thu Sep 18 11:22:37 2003 --- llvm/tools/gccld/util.cpp Thu Sep 18 11:22:26 2003 *************** *** 0 **** --- 1,287 ---- + //===- util.cpp - Utility functions ---------------------------------------===// + // + // This file contains utility functions for gccld. It essentially holds + // anything from the original gccld.cpp source that was either incidental + // or not inlined. + // + //===----------------------------------------------------------------------===// + + #include "llvm/Module.h" + #include "Config/string.h" + + #include + #include + #include + + // + // Function: PrintAndReturn () + // + // Description: + // Prints a message (usually error message) to standard error (stderr) and + // returns a value usable for an exit status. + // + // Inputs: + // progname - The name of the program (i.e. argv[0]). + // Message - The message to print to standard error. + // Extra - Extra information to print between the program name and thei + // message. It is optional. + // + // Outputs: + // None. + // + // Return value: + // Returns a value that can be used as the exit status (i.e. for exit()). + // + int + PrintAndReturn (const char *progname, + const std::string &Message, + const std::string &Extra = "") + { + std::cerr << progname << Extra << ": " << Message << "\n"; + return 1; + } + + // + // Function: IsArchive () + // + // Description: + // Determine if the specified file is an ar archive. It determines this by + // checking the magic string at the beginning of the file. + // + // Inputs: + // filename - A C++ string containing the name of the file. + // + // Outputs: + // None. + // + // Return value: + // TRUE - The file is an archive. + // FALSE - The file is not an archive. + // + bool + IsArchive (const std::string &filename) + { + std::string ArchiveMagic("!\012"); + char buf[1 + ArchiveMagic.size()]; + + std::ifstream f(filename.c_str()); + f.read(buf, ArchiveMagic.size()); + buf[ArchiveMagic.size()] = '\0'; + return ArchiveMagic == buf; + } + + // + // Function: GetAllDefinedSymbols () + // + // Description: + // Find all of the defined symbols in the specified module. + // + // Inputs: + // M - The module in which to find defined symbols. + // + // Outputs: + // DefinedSymbols - A set of C++ strings that will contain the name of all + // defined symbols. + // + // Return value: + // None. + // + void + GetAllDefinedSymbols (Module *M, std::set &DefinedSymbols) + { + for (Module::iterator I = M->begin(), E = M->end(); I != E; ++I) + if (I->hasName() && !I->isExternal() && !I->hasInternalLinkage()) + DefinedSymbols.insert(I->getName()); + for (Module::giterator I = M->gbegin(), E = M->gend(); I != E; ++I) + if (I->hasName() && !I->isExternal() && !I->hasInternalLinkage()) + DefinedSymbols.insert(I->getName()); + } + + // + // Function: GetAllUndefinedSymbols () + // + // Description: + // This calculates the set of undefined symbols that still exist in an LLVM + // module. This is a bit tricky because there may be two symbols with the + // same name but different LLVM types that will be resolved to each other but + // aren't currently (thus we need to treat it as resolved). + // + // Inputs: + // M - The module in which to find undefined symbols. + // + // Outputs: + // UndefinedSymbols - A set of C++ strings containing the name of all + // undefined symbols. + // + // Return value: + // None. + // + void + GetAllUndefinedSymbols(Module *M, std::set &UndefinedSymbols) + { + std::set DefinedSymbols; + UndefinedSymbols.clear(); // Start out empty + + for (Module::iterator I = M->begin(), E = M->end(); I != E; ++I) + if (I->hasName()) { + if (I->isExternal()) + UndefinedSymbols.insert(I->getName()); + else if (!I->hasInternalLinkage()) + DefinedSymbols.insert(I->getName()); + } + for (Module::giterator I = M->gbegin(), E = M->gend(); I != E; ++I) + if (I->hasName()) { + if (I->isExternal()) + UndefinedSymbols.insert(I->getName()); + else if (!I->hasInternalLinkage()) + DefinedSymbols.insert(I->getName()); + } + + // Prune out any defined symbols from the undefined symbols set... + for (std::set::iterator I = UndefinedSymbols.begin(); + I != UndefinedSymbols.end(); ) + if (DefinedSymbols.count(*I)) + UndefinedSymbols.erase(I++); // This symbol really is defined! + else + ++I; // Keep this symbol in the undefined symbols list + } + + // + // + // Function: copy_env() + // + // Description: + // This function takes an array of environment variables and makes a + // copy of it. This copy can then be manipulated any way the caller likes + // without affecting the process's real environment. + // + // Inputs: + // envp - An array of C strings containing an environment. + // + // Outputs: + // None. + // + // Return value: + // NULL - An error occurred. + // + // Otherwise, a pointer to a new array of C strings is returned. Every string + // in the array is a duplicate of the one in the original array (i.e. we do + // not copy the char *'s from one array to another). + // + char ** + copy_env (char ** const envp) + { + // The new environment list + char ** newenv; + + // The number of entries in the old environment list + int entries; + + // + // Count the number of entries in the old list; + // + for (entries = 0; envp[entries] != NULL; entries++) + { + ; + } + + // + // Add one more entry for the NULL pointer that ends the list. + // + ++entries; + + // + // If there are no entries at all, just return NULL. + // + if (entries == 0) + { + return NULL; + } + + // + // Allocate a new environment list. + // + if ((newenv = new (char *) [entries]) == NULL) + { + return NULL; + } + + // + // Make a copy of the list. Don't forget the NULL that ends the list. + // + entries = 0; + while (envp[entries] != NULL) + { + newenv[entries] = new char[strlen (envp[entries]) + 1]; + strcpy (newenv[entries], envp[entries]); + ++entries; + } + newenv[entries] = NULL; + + return newenv; + } + + + // + // Function: remove_env() + // + // Description: + // Remove the specified environment variable from the environment array. + // + // Inputs: + // name - The name of the variable to remove. It cannot be NULL. + // envp - The array of environment variables. It cannot be NULL. + // + // Outputs: + // envp - The pointer to the specified variable name is removed. + // + // Return value: + // None. + // + // Notes: + // This is mainly done because functions to remove items from the environment + // are not available across all platforms. In particular, Solaris does not + // seem to have an unsetenv() function or a setenv() function (or they are + // undocumented if they do exist). + // + void + remove_env (const char * name, char ** const envp) + { + // Pointer for scanning arrays + register char * p; + + // Index for selecting elements of the environment array + register int index; + + for (index=0; envp[index] != NULL; index++) + { + // + // Find the first equals sign in the array and make it an EOS character. + // + p = strchr (envp[index], '='); + if (p == NULL) + { + continue; + } + else + { + *p = '\0'; + } + + // + // Compare the two strings. If they are equal, zap this string. + // Otherwise, restore it. + // + if (!strcmp (name, envp[index])) + { + *envp[index] = '\0'; + } + else + { + *p = '='; + } + } + + return; + } + Index: llvm/tools/gccld/util.h diff -c /dev/null llvm/tools/gccld/util.h:1.1 *** /dev/null Thu Sep 18 11:22:37 2003 --- llvm/tools/gccld/util.h Thu Sep 18 11:22:26 2003 *************** *** 0 **** --- 1,31 ---- + //===- util.h - Utility functions header file -----------------------------===// + // + // This file contains function prototypes for the functions in util.cpp. + // + //===----------------------------------------------------------------------===// + + #include "llvm/Module.h" + + #include + #include + + extern int + PrintAndReturn (const char *progname, + const std::string &Message, + const std::string &Extra = ""); + + extern bool + IsArchive (const std::string &filename); + + extern void + GetAllDefinedSymbols (Module *M, std::set &DefinedSymbols); + + extern void + GetAllUndefinedSymbols(Module *M, std::set &UndefinedSymbols); + + extern char ** + copy_env (char ** const envp); + + extern void + remove_env (const char * name, char ** const envp); + Index: llvm/tools/gccld/gccld.cpp diff -u llvm/tools/gccld/gccld.cpp:1.49 llvm/tools/gccld/gccld.cpp:1.50 --- llvm/tools/gccld/gccld.cpp:1.49 Wed Sep 17 14:14:41 2003 +++ llvm/tools/gccld/gccld.cpp Thu Sep 18 11:22:26 2003 @@ -26,11 +26,34 @@ #include "Support/CommandLine.h" #include "Support/Signals.h" #include "Config/unistd.h" +#include "util.h" + #include #include #include #include +// +// External function prototypes +// +extern int +GenerateBytecode (Module * M, + bool Strip, + bool Internalize, + std::ofstream * Out); + +extern int +generate_assembly (std::string OutputFilename, + std::string InputFilename, + std::string llc, + char ** const envp); +extern int +generate_native (std::string OutputFilename, + std::string InputFilename, + std::vector Libraries, + std::string gcc, + char ** const envp); + namespace { cl::list InputFilenames(cl::Positional, cl::desc(""), @@ -68,7 +91,7 @@ cl::opt Native("native", cl::desc("Generate a native binary instead of a shell script")); - // Compatibility options that are ignored, but support by LD + // Compatibility options that are ignored but supported by LD cl::opt CO3("soname", cl::Hidden, cl::desc("Compatibility option: ignored")); cl::opt @@ -125,18 +148,6 @@ return M.release(); } -// IsArchive - Returns true iff FILENAME appears to be the name of an ar -// archive file. It determines this by checking the magic string at the -// beginning of the file. -static bool IsArchive(const std::string &filename) { - std::string ArchiveMagic("!\012"); - char buf[1 + ArchiveMagic.size()]; - std::ifstream f(filename.c_str()); - f.read(buf, ArchiveMagic.size()); - buf[ArchiveMagic.size()] = '\0'; - return ArchiveMagic == buf; -} - // LoadLibraryExactName - This looks for a file with a known name and tries to // load it, similarly to LoadLibraryFromDirectory(). static inline bool LoadLibraryExactName(const std::string &FileName, @@ -203,50 +214,6 @@ return true; } -static void GetAllDefinedSymbols(Module *M, - std::set &DefinedSymbols) { - for (Module::iterator I = M->begin(), E = M->end(); I != E; ++I) - if (I->hasName() && !I->isExternal() && !I->hasInternalLinkage()) - DefinedSymbols.insert(I->getName()); - for (Module::giterator I = M->gbegin(), E = M->gend(); I != E; ++I) - if (I->hasName() && !I->isExternal() && !I->hasInternalLinkage()) - DefinedSymbols.insert(I->getName()); -} - -// GetAllUndefinedSymbols - This calculates the set of undefined symbols that -// still exist in an LLVM module. This is a bit tricky because there may be two -// symbols with the same name, but different LLVM types that will be resolved to -// each other, but aren't currently (thus we need to treat it as resolved). -// -static void GetAllUndefinedSymbols(Module *M, - std::set &UndefinedSymbols) { - std::set DefinedSymbols; - UndefinedSymbols.clear(); // Start out empty - - for (Module::iterator I = M->begin(), E = M->end(); I != E; ++I) - if (I->hasName()) { - if (I->isExternal()) - UndefinedSymbols.insert(I->getName()); - else if (!I->hasInternalLinkage()) - DefinedSymbols.insert(I->getName()); - } - for (Module::giterator I = M->gbegin(), E = M->gend(); I != E; ++I) - if (I->hasName()) { - if (I->isExternal()) - UndefinedSymbols.insert(I->getName()); - else if (!I->hasInternalLinkage()) - DefinedSymbols.insert(I->getName()); - } - - // Prune out any defined symbols from the undefined symbols set... - for (std::set::iterator I = UndefinedSymbols.begin(); - I != UndefinedSymbols.end(); ) - if (DefinedSymbols.count(*I)) - UndefinedSymbols.erase(I++); // This symbol really is defined! - else - ++I; // Keep this symbol in the undefined symbols list -} - static bool LinkLibrary(Module *M, const std::string &LibName, bool search, std::string &ErrorMessage) { @@ -311,152 +278,10 @@ return false; } -static int PrintAndReturn(const char *progname, const std::string &Message, - const std::string &Extra = "") { - std::cerr << progname << Extra << ": " << Message << "\n"; - return 1; -} - -// -// -// Function: copy_env() -// -// Description: -// This function takes an array of environment variables and makes a -// copy of it. This copy can then be manipulated any way the caller likes -// without affecting the process's real environment. -// -// Inputs: -// envp - An array of C strings containing an environment. -// -// Outputs: -// None. -// -// Return value: -// NULL - An error occurred. -// Otherwise, a pointer to a new array of C strings is returned. Every string -// in the array is a duplicate of the one in the original array (i.e. we do -// not copy the char *'s from one array to another). -// -static char ** -copy_env (char ** const envp) -{ - // The new environment list - char ** newenv; - - // The number of entries in the old environment list - int entries; - - // - // Count the number of entries in the old list; - // - for (entries = 0; envp[entries] != NULL; entries++) - { - ; - } - - // - // Add one more entry for the NULL pointer that ends the list. - // - ++entries; - - // - // If there are no entries at all, just return NULL. - // - if (entries == 0) - { - return NULL; - } - - // - // Allocate a new environment list. - // - if ((newenv = new (char *) [entries]) == NULL) - { - return NULL; - } - - // - // Make a copy of the list. Don't forget the NULL that ends the list. - // - entries = 0; - while (envp[entries] != NULL) - { - newenv[entries] = new char[strlen (envp[entries]) + 1]; - strcpy (newenv[entries], envp[entries]); - ++entries; - } - newenv[entries] = NULL; - - return newenv; -} - -// -// Function: remove_env() -// -// Description: -// Remove the specified environment variable from the environment array. -// -// Inputs: -// name - The name of the variable to remove. It cannot be NULL. -// envp - The array of environment variables. It cannot be NULL. -// -// Outputs: -// envp - The pointer to the specified variable name is removed. -// -// Return value: -// None. -// -// Notes: -// This is mainly done because functions to remove items from the environment -// are not available across all platforms. In particular, Solaris does not -// seem to have an unsetenv() function or a setenv() function (or they are -// undocumented if they do exist). -// -static void -remove_env (const char * name, char ** const envp) +int +main(int argc, char **argv, char ** envp) { - // Pointer for scanning arrays - register char * p; - - // Index for selecting elements of the environment array - register int index; - - for (index=0; envp[index] != NULL; index++) - { - // - // Find the first equals sign in the array and make it an EOS character. - // - p = strchr (envp[index], '='); - if (p == NULL) - { - continue; - } - else - { - *p = '\0'; - } - - // - // Compare the two strings. If they are equal, zap this string. - // Otherwise, restore it. - // - if (!strcmp (name, envp[index])) - { - *envp[index] = '\0'; - } - else - { - *p = '='; - } - } - - return; -} - - -int main(int argc, char **argv, char ** envp) { cl::ParseCommandLineOptions(argc, argv, " llvm linker for GCC\n"); std::string ErrorMessage; @@ -502,77 +327,44 @@ for (unsigned i = 0; i != Libraries.size(); ++i) { if (Verbose) std::cerr << "Linking in library: -l" << Libraries[i] << "\n"; if (LinkLibrary(Composite.get(), Libraries[i], true, ErrorMessage)) - return PrintAndReturn(argv[0], ErrorMessage); - } - - // In addition to just linking the input from GCC, we also want to spiff it up - // a little bit. Do this now. - // - PassManager Passes; - - // Add an appropriate TargetData instance for this module... - Passes.add(new TargetData("gccld", Composite.get())); - - // Linking modules together can lead to duplicated global constants, only keep - // one copy of each constant... - // - Passes.add(createConstantMergePass()); - - // If the -s command line option was specified, strip the symbols out of the - // resulting program to make it smaller. -s is a GCC option that we are - // supporting. - // - if (Strip) - Passes.add(createSymbolStrippingPass()); - - // Often if the programmer does not specify proper prototypes for the - // functions they are calling, they end up calling a vararg version of the - // function that does not get a body filled in (the real function has typed - // arguments). This pass merges the two functions. - // - Passes.add(createFunctionResolvingPass()); - - if (!NoInternalize) { - // Now that composite has been compiled, scan through the module, looking - // for a main function. If main is defined, mark all other functions - // internal. - // - Passes.add(createInternalizePass()); + if (!Native) + return PrintAndReturn(argv[0], ErrorMessage); } - // Remove unused arguments from functions... - // - Passes.add(createDeadArgEliminationPass()); - - // The FuncResolve pass may leave cruft around if functions were prototyped - // differently than they were defined. Remove this cruft. // - Passes.add(createInstructionCombiningPass()); - - // Delete basic blocks, which optimization passes may have killed... - // - Passes.add(createCFGSimplificationPass()); - - // Now that we have optimized the program, discard unreachable functions... + // Create the output file. // - Passes.add(createGlobalDCEPass()); - - // Add the pass that writes bytecode to the output file... std::string RealBytecodeOutput = OutputFilename; if (!LinkAsLibrary) RealBytecodeOutput += ".bc"; std::ofstream Out(RealBytecodeOutput.c_str()); if (!Out.good()) return PrintAndReturn(argv[0], "error opening '" + RealBytecodeOutput + "' for writing!"); - Passes.add(new WriteBytecodePass(&Out)); // Write bytecode to file... - // Make sure that the Out file gets unlink'd from the disk if we get a SIGINT + // + // Ensure that the bytecode file gets removed from the disk if we get a + // SIGINT signal. + // RemoveFileOnSignal(RealBytecodeOutput); - // Run our queue of passes all at once now, efficiently. - Passes.run(*Composite.get()); + // + // Generate the bytecode file. + // + if (GenerateBytecode (Composite.get(), Strip, !NoInternalize, &Out)) + { + Out.close(); + return PrintAndReturn(argv[0], "error generating bytcode"); + } + + // + // Close the bytecode file. + // Out.close(); + // + // If we are not linking a library, generate either a native executable + // or a JIT shell script, depending upon what the user wants. + // if (!LinkAsLibrary) { // // If the user wants to generate a native executable, compile it from the @@ -582,25 +374,14 @@ // if (Native) { + // Name of the Assembly Language output file + std::string AssemblyFile = OutputFilename + ".s"; + // - // Remove these environment variables from the environment of the - // programs that we will execute. It appears that GCC sets these - // environment variables so that the programs it uses can configure - // themselves identically. - // - // However, when we invoke GCC below, we want it to use its normal - // configuration. Hence, we must sanitize it's environment. + // Mark the output files for removal if we get an interrupt. // - char ** clean_env = copy_env (envp); - if (clean_env == NULL) - { - return PrintAndReturn (argv[0], "Failed to duplicate environment"); - } - remove_env ("LIBRARY_PATH", clean_env); - remove_env ("COLLECT_GCC_OPTIONS", clean_env); - remove_env ("GCC_EXEC_PREFIX", clean_env); - remove_env ("COMPILER_PATH", clean_env); - remove_env ("COLLECT_GCC", clean_env); + RemoveFileOnSignal (AssemblyFile); + RemoveFileOnSignal (OutputFilename); // // Determine the locations of the llc and gcc programs. @@ -618,49 +399,15 @@ } // - // Run LLC to convert the bytecode file into assembly code. - // - const char * cmd[8]; - std::string AssemblyFile = OutputFilename + ".s"; - - cmd[0] = llc.c_str(); - cmd[1] = "-f"; - cmd[2] = "-o"; - cmd[3] = AssemblyFile.c_str(); - cmd[4] = RealBytecodeOutput.c_str(); - cmd[5] = NULL; - if ((ExecWait (cmd, clean_env)) == -1) - { - return PrintAndReturn (argv[0], "Failed to compile bytecode"); - } - - // - // Run GCC to assemble and link the program into native code. - // - // Note: - // We can't just assemble and link the file with the system assembler - // and linker because we don't know where to put the _start symbol. - // GCC mysteriously knows how to do it. + // Generate an assembly language file for the bytecode. // - cmd[0] = gcc.c_str(); - cmd[1] = "-o"; - cmd[2] = OutputFilename.c_str(); - cmd[3] = AssemblyFile.c_str(); - cmd[4] = NULL; - if ((ExecWait (cmd, clean_env)) == -1) - { - return PrintAndReturn (argv[0], "Failed to link native code file"); - } + generate_assembly (AssemblyFile, RealBytecodeOutput, llc, envp); + generate_native (OutputFilename, AssemblyFile, Libraries, gcc, envp); // - // The assembly file is no longer needed. Remove it, but do not exit - // if we fail to unlink it. + // Remove the assembly language file. // - if (((access (AssemblyFile.c_str(), F_OK)) != -1) && - ((unlink (AssemblyFile.c_str())) == -1)) - { - std::cerr << "Warning: Failed to unlink " << AssemblyFile << "\n"; - } + removeFile (AssemblyFile); } else { From gaeke at cs.uiuc.edu Thu Sep 18 12:38:01 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Thu Sep 18 12:38:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Target/Sparc/FunctionInfo.cpp Message-ID: <200309181737.MAA15650@tank.cs.uiuc.edu> Changes in directory llvm/lib/Target/Sparc: FunctionInfo.cpp (r1.5) removed --- Log message: Removed; this has been incorporated into MappingInfo. --- Diffs of the changes: From gaeke at cs.uiuc.edu Thu Sep 18 12:38:08 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Thu Sep 18 12:38:08 2003 Subject: [llvm-commits] CVS: llvm/lib/Target/Sparc/EmitBytecodeToAssembly.cpp Message-ID: <200309181737.MAA15695@tank.cs.uiuc.edu> Changes in directory llvm/lib/Target/Sparc: EmitBytecodeToAssembly.cpp updated: 1.8 -> 1.9 --- Log message: Make the symbol prologue/epilogue stuff redundant with MappingInfo, in preparation for refactoring. Rename the pass creator fn to mimic the other creator fn names. --- Diffs of the changes: Index: llvm/lib/Target/Sparc/EmitBytecodeToAssembly.cpp diff -u llvm/lib/Target/Sparc/EmitBytecodeToAssembly.cpp:1.8 llvm/lib/Target/Sparc/EmitBytecodeToAssembly.cpp:1.9 --- llvm/lib/Target/Sparc/EmitBytecodeToAssembly.cpp:1.8 Thu Jul 25 12:22:48 2002 +++ llvm/lib/Target/Sparc/EmitBytecodeToAssembly.cpp Thu Sep 18 12:37:14 2003 @@ -55,6 +55,28 @@ } }; + static void writePrologue (std::ostream &Out, const std::string &comment, + const std::string &symName) { + // Prologue: + // Output a comment describing the object. + Out << "!" << comment << "\n"; + // Switch the current section to .rodata in the assembly output: + Out << "\t.section \".rodata\"\n\t.align 8\n"; + // Output a global symbol naming the object: + Out << "\t.global " << symName << "\n"; + Out << "\t.type " << symName << ",#object\n"; + Out << symName << ":\n"; + } + + static void writeEpilogue (std::ostream &Out, const std::string &symName) { + // Epilogue: + // Output a local symbol marking the end of the object: + Out << ".end_" << symName << ":\n"; + // Output size directive giving the size of the object: + Out << "\t.size " << symName << ", .end_" << symName << "-" << symName + << "\n"; + } + // SparcBytecodeWriter - Write bytecode out to a stream that is sparc'ified class SparcBytecodeWriter : public Pass { std::ostream &Out; @@ -64,34 +86,23 @@ const char *getPassName() const { return "Emit Bytecode to Sparc Assembly";} virtual bool run(Module &M) { - // Write bytecode out to the sparc assembly stream - - - Out << "\n\n!LLVM BYTECODE OUTPUT\n\t.section \".rodata\"\n\t.align 8\n"; - Out << "\t.global LLVMBytecode\n\t.type LLVMBytecode,#object\n"; - Out << "LLVMBytecode:\n"; - //changed --anand, to get the size of bytecode + // Write an object containing the bytecode to the SPARC assembly stream + writePrologue (Out, "LLVM BYTECODE OUTPUT", "LLVMBytecode"); osparcasmstream OS(Out); WriteBytecodeToFile(&M, OS); + writeEpilogue (Out, "LLVMBytecode"); - - Out << ".end_LLVMBytecode:\n"; - Out << "\t.size LLVMBytecode, .end_LLVMBytecode-LLVMBytecode\n\n"; - - - Out <<"\n\n!LLVM BYTECODE Length\n"; - Out <<"\t.section \".data\",#alloc,#write\n"; - Out <<"\t.global llvm_length\n"; - Out <<"\t.align 4\n"; - Out <<"\t.type llvm_length,#object\n"; - Out <<"\t.size llvm_length,4\n"; - Out <<"llvm_length:\n"; + // Write an object containing its length as an integer to the + // SPARC assembly stream + writePrologue (Out, "LLVM BYTECODE LENGTH", "llvm_length"); Out <<"\t.word\t.end_LLVMBytecode-LLVMBytecode\n"; + writeEpilogue (Out, "llvm_length"); + return false; } }; } // end anonymous namespace -Pass *UltraSparc::getEmitBytecodeToAsmPass(std::ostream &Out) { +Pass *UltraSparc::getBytecodeAsmPrinterPass(std::ostream &Out) { return new SparcBytecodeWriter(Out); } From gaeke at cs.uiuc.edu Thu Sep 18 12:38:14 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Thu Sep 18 12:38:14 2003 Subject: [llvm-commits] CVS: llvm/lib/Target/Sparc/Sparc.cpp SparcInternals.h Message-ID: <200309181737.MAA15707@tank.cs.uiuc.edu> Changes in directory llvm/lib/Target/Sparc: Sparc.cpp updated: 1.80 -> 1.81 SparcInternals.h updated: 1.100 -> 1.101 --- Log message: Fix a typo in Sparc.cpp. Update names of some pass creator fns in addPassesToEmitAssembly(). FunctionInfo is gone. --- Diffs of the changes: Index: llvm/lib/Target/Sparc/Sparc.cpp diff -u llvm/lib/Target/Sparc/Sparc.cpp:1.80 llvm/lib/Target/Sparc/Sparc.cpp:1.81 --- llvm/lib/Target/Sparc/Sparc.cpp:1.80 Mon Sep 1 15:40:59 2003 +++ llvm/lib/Target/Sparc/Sparc.cpp Thu Sep 18 12:37:46 2003 @@ -180,7 +180,7 @@ // If LLVM dumping after transformations is requested, add it to the pipeline if (DumpInput) - PM.add(new PrintFunctionPass("Input code to instsr. selection:\n", + PM.add(new PrintFunctionPass("Input code to instr. selection:\n", &std::cerr)); PM.add(createInstructionSelectionPass(*this)); @@ -196,7 +196,7 @@ PM.add(createPeepholeOptsPass(*this)); if (EmitMappingInfo) - PM.add(getMappingInfoCollector(Out)); + PM.add(getMappingInfoAsmPrinterPass(Out)); // Output assembly language to the .s file. Assembly emission is split into // two parts: Function output and Global value output. This is because @@ -211,10 +211,8 @@ PM.add(getModuleAsmPrinterPass(Out)); // Emit bytecode to the assembly file into its special section next - if (EmitMappingInfo) { - PM.add(getEmitBytecodeToAsmPass(Out)); - PM.add(getFunctionInfo(Out)); - } + if (EmitMappingInfo) + PM.add(getBytecodeAsmPrinterPass(Out)); return false; } Index: llvm/lib/Target/Sparc/SparcInternals.h diff -u llvm/lib/Target/Sparc/SparcInternals.h:1.100 llvm/lib/Target/Sparc/SparcInternals.h:1.101 --- llvm/lib/Target/Sparc/SparcInternals.h:1.100 Mon Sep 1 15:40:59 2003 +++ llvm/lib/Target/Sparc/SparcInternals.h Thu Sep 18 12:37:46 2003 @@ -687,10 +687,8 @@ // getModuleAsmPrinterPass - Writes generated machine code to assembly file. Pass* getModuleAsmPrinterPass(std::ostream &Out); - // getEmitBytecodeToAsmPass - Emits final LLVM bytecode to assembly file. - Pass* getEmitBytecodeToAsmPass(std::ostream &Out); + // getBytecodeAsmPrinterPass - Emits final LLVM bytecode to assembly file. + Pass* getBytecodeAsmPrinterPass(std::ostream &Out); }; - -Pass *getFunctionInfo(std::ostream &out); #endif From gaeke at cs.uiuc.edu Thu Sep 18 12:39:02 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Thu Sep 18 12:39:02 2003 Subject: [llvm-commits] CVS: llvm/lib/Target/Sparc/MappingInfo.h Message-ID: <200309181738.MAA15774@tank.cs.uiuc.edu> Changes in directory llvm/lib/Target/Sparc: MappingInfo.h updated: 1.3 -> 1.4 --- Log message: Rename the pass creator fn to mimic the other creator fn names. --- Diffs of the changes: Index: llvm/lib/Target/Sparc/MappingInfo.h diff -u llvm/lib/Target/Sparc/MappingInfo.h:1.3 llvm/lib/Target/Sparc/MappingInfo.h:1.4 --- llvm/lib/Target/Sparc/MappingInfo.h:1.3 Tue Aug 12 21:38:16 2003 +++ llvm/lib/Target/Sparc/MappingInfo.h Thu Sep 18 12:37:35 2003 @@ -13,7 +13,7 @@ #include class Pass; -Pass *getMappingInfoCollector(std::ostream &out); +Pass *getMappingInfoAsmPrinterPass(std::ostream &out); class MappingInfo { struct byteVector : public std::vector { From gaeke at cs.uiuc.edu Thu Sep 18 12:39:08 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Thu Sep 18 12:39:08 2003 Subject: [llvm-commits] CVS: llvm/lib/Target/Sparc/MappingInfo.cpp Message-ID: <200309181738.MAA15719@tank.cs.uiuc.edu> Changes in directory llvm/lib/Target/Sparc: MappingInfo.cpp updated: 1.11 -> 1.12 --- Log message: Fix (and properly doxygenify) some comments. Incorporate functionality of FunctionInfo pass as doFinalization method. Rename pass to match names of other passes like it. Rename the pass creator fn to mimic the other creator fn names. Include StringExtras for utostr(). Make symbol prologue/epilogue stuff redundant with EmitBytecodeToAssembly, in preparation for refactoring. --- Diffs of the changes: Index: llvm/lib/Target/Sparc/MappingInfo.cpp diff -u llvm/lib/Target/Sparc/MappingInfo.cpp:1.11 llvm/lib/Target/Sparc/MappingInfo.cpp:1.12 --- llvm/lib/Target/Sparc/MappingInfo.cpp:1.11 Tue Aug 12 21:38:16 2003 +++ llvm/lib/Target/Sparc/MappingInfo.cpp Thu Sep 18 12:37:25 2003 @@ -1,6 +1,6 @@ //===- MappingInfo.cpp - create LLVM info and output to .s file ---------===// // -// This file contains a FunctionPass called MappingInfo, +// This file contains a FunctionPass called MappingInfoAsmPrinter, // which creates two maps: one between LLVM Instructions and MachineInstrs // (the "LLVM I TO MI MAP"), and another between MachineBasicBlocks and // MachineInstrs (the "BB TO MI MAP"). @@ -40,12 +40,13 @@ #include "llvm/Module.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineCodeForInstruction.h" +#include "Support/StringExtras.h" namespace { - class MappingInfoCollector : public FunctionPass { + class MappingInfoAsmPrinter : public FunctionPass { std::ostream &Out; public: - MappingInfoCollector(std::ostream &out) : Out(out){} + MappingInfoAsmPrinter(std::ostream &out) : Out(out){} const char *getPassName () const { return "Instr. Mapping Info Collector"; } bool runOnFunction(Function &FI); typedef std::map InstructionKey; @@ -60,20 +61,23 @@ void writeNumber(unsigned X); void selectOutputMap (MappingInfo &m) { currentOutputMap = &m; } void outByte (unsigned char b) { currentOutputMap->outByte (b); } + bool doFinalization (Module &M); }; } -/// getMappingInfoCollector -- Static factory method: returns a new -/// MappingInfoCollector Pass object, which uses OUT as its -/// output stream for assembly output. -Pass *getMappingInfoCollector(std::ostream &out){ - return (new MappingInfoCollector(out)); +/// getMappingInfoAsmPrinterPass - Static factory method: returns a new +/// MappingInfoAsmPrinter Pass object, which uses OUT as its output +/// stream for assembly output. +/// +Pass *getMappingInfoAsmPrinterPass(std::ostream &out){ + return (new MappingInfoAsmPrinter(out)); } -/// runOnFunction -- Builds up the maps for the given function FI and then +/// runOnFunction - Builds up the maps for the given function FI and then /// writes them out as assembly code to the current output stream OUT. /// This is an entry point to the pass, called by the PassManager. -bool MappingInfoCollector::runOnFunction(Function &FI) { +/// +bool MappingInfoAsmPrinter::runOnFunction(Function &FI) { unsigned num = Fkey[&FI]; // Function number for the current function. // Create objects to hold the maps. @@ -91,10 +95,11 @@ return false; } -/// writeNumber -- Write out the number X as a sequence of .byte +/// writeNumber - Write out the number X as a sequence of .byte /// directives to the current output stream Out. This method performs a /// run-length encoding of the unsigned integers X that are output. -void MappingInfoCollector::writeNumber(unsigned X) { +/// +void MappingInfoAsmPrinter::writeNumber(unsigned X) { unsigned i=0; do { unsigned tmp = X & 127; @@ -105,13 +110,14 @@ } while(X); } -/// doInitialization -- Assign a number to each Function, as follows: +/// doInitialization - Assign a number to each Function, as follows: /// Functions are numbered starting at 0 at the begin() of each Module. /// Functions which are External (and thus have 0 basic blocks) are not /// inserted into the maps, and are not assigned a number. The side-effect /// of this method is to fill in Fkey to contain the mapping from Functions /// to numbers. (This method is called automatically by the PassManager.) -bool MappingInfoCollector::doInitialization(Module &M) { +/// +bool MappingInfoAsmPrinter::doInitialization(Module &M) { unsigned i = 0; for (Module::iterator FI = M.begin(), FE = M.end(); FI != FE; ++FI) { if (FI->isExternal()) continue; @@ -130,7 +136,8 @@ /// KEY with the mapping of MachineBasicBlocks to numbers. KEY /// is keyed on MachineInstrs, so each MachineBasicBlock is represented /// therein by its first MachineInstr. -void MappingInfoCollector::create_BB_to_MInumber_Key(Function &FI, +/// +void MappingInfoAsmPrinter::create_BB_to_MInumber_Key(Function &FI, InstructionKey &key) { unsigned i = 0; MachineFunction &MF = MachineFunction::get(&FI); @@ -142,14 +149,15 @@ } } -/// create_MI_to_number_Key -- Assign a number to each MachineInstr +/// create_MI_to_number_Key - Assign a number to each MachineInstr /// in the given Function with respect to its enclosing MachineBasicBlock, as /// follows: Numberings start at 0 in each MachineBasicBlock. MachineInstrs /// are numbered from begin() to end() in their MachineBasicBlock. Each /// MachineInstr is numbered, then the numbering is incremented by 1. The /// side-effect of this method is to fill in the parameter KEY /// with the mapping from MachineInstrs to numbers. -void MappingInfoCollector::create_MI_to_number_Key(Function &FI, +/// +void MappingInfoAsmPrinter::create_MI_to_number_Key(Function &FI, InstructionKey &key) { MachineFunction &MF = MachineFunction::get(&FI); for (MachineFunction::iterator BI=MF.begin(), BE=MF.end(); BI != BE; ++BI) { @@ -162,9 +170,10 @@ } } -/// buildBBMIMap -- Build the BB TO MI MAP for the function FI, +/// buildBBMIMap - Build the BB TO MI MAP for the function FI, /// and save it into the parameter MAP. -void MappingInfoCollector::buildBBMIMap(Function &FI, MappingInfo &Map) { +/// +void MappingInfoAsmPrinter::buildBBMIMap(Function &FI, MappingInfo &Map) { unsigned bb = 0; // First build temporary table used to write out the map. @@ -182,9 +191,10 @@ } } -/// buildLMIMap -- Build the LLVM I TO MI MAP for the function FI, +/// buildLMIMap - Build the LLVM I TO MI MAP for the function FI, /// and save it into the parameter MAP. -void MappingInfoCollector::buildLMIMap(Function &FI, MappingInfo &Map) { +/// +void MappingInfoAsmPrinter::buildLMIMap(Function &FI, MappingInfo &Map) { unsigned bb = 0; // First build temporary table used to write out the map. InstructionKey MIkey; @@ -214,28 +224,65 @@ Out << ".byte " << (int)*i << "\n"; } -void MappingInfo::dumpAssembly (std::ostream &Out) { +static void writePrologue (std::ostream &Out, const std::string &comment, + const std::string &symName) { // Prologue: - // Output a comment describing the map. + // Output a comment describing the object. Out << "!" << comment << "\n"; // Switch the current section to .rodata in the assembly output: Out << "\t.section \".rodata\"\n\t.align 8\n"; - // Output a global symbol naming the map: - Out << "\t.global " << symbolPrefix << functionNumber << "\n"; - Out << "\t.type " << symbolPrefix << functionNumber << ",#object\n"; - Out << symbolPrefix << functionNumber << ":\n"; - // Output a word containing the length of the map: - Out << "\t.word .end_" << symbolPrefix << functionNumber << "-" - << symbolPrefix << functionNumber << "\n"; + // Output a global symbol naming the object: + Out << "\t.global " << symName << "\n"; + Out << "\t.type " << symName << ",#object\n"; + Out << symName << ":\n"; +} + +static void writeEpilogue (std::ostream &Out, const std::string &symName) { + // Epilogue: + // Output a local symbol marking the end of the object: + Out << ".end_" << symName << ":\n"; + // Output size directive giving the size of the object: + Out << "\t.size " << symName << ", .end_" << symName << "-" << symName + << "\n"; +} - // Output the map data itself: +void MappingInfo::dumpAssembly (std::ostream &Out) { + const std::string &name (symbolPrefix + utostr (functionNumber)); + writePrologue (Out, comment, name); + // The LMIMap and BBMIMap are supposed to start with a length word: + Out << "\t.word .end_" << name << "-" << name << "\n"; bytes.dumpAssembly (Out); + writeEpilogue (Out, name); +} - // Epilogue: - // Output a local symbol marking the end of the map: - Out << ".end_" << symbolPrefix << functionNumber << ":\n"; - // Output size directive giving the size of the map: - Out << "\t.size " << symbolPrefix << functionNumber << ", .end_" - << symbolPrefix << functionNumber << "-" << symbolPrefix - << functionNumber << "\n\n"; +/// doFinalization - This method writes out two tables, named +/// FunctionBB and FunctionLI, which map Function numbers (as in +/// doInitialization) to the BBMIMap and LMIMap tables. (This used to +/// be the "FunctionInfo" pass.) +/// +bool MappingInfoAsmPrinter::doFinalization (Module &M) { + unsigned f; + + writePrologue(Out, "FUNCTION TO BB MAP", "FunctionBB"); + f=0; + for(Module::iterator FI = M.begin (), FE = M.end (); FE != FI; ++FI) { + if (FI->isExternal ()) + continue; + Out << "\t.xword BBMIMap" << f << "\n"; + ++f; + } + writeEpilogue(Out, "FunctionBB"); + + writePrologue(Out, "FUNCTION TO LI MAP", "FunctionLI"); + f=0; + for(Module::iterator FI = M.begin (), FE = M.end (); FE != FI; ++FI) { + if (FI->isExternal ()) + continue; + Out << "\t.xword LMIMap" << f << "\n"; + ++f; + } + writeEpilogue(Out, "FunctionLI"); + + return false; } + From criswell at cs.uiuc.edu Thu Sep 18 13:38:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu Sep 18 13:38:01 2003 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200309181837.NAA28023@choi.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.140 -> 1.141 --- Log message: Changed the empty rule for .h files. The rule needs an empty command so that Make actually uses it to "regenerate" header files that have been moved/removed. --- Diffs of the changes: Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.140 llvm/Makefile.rules:1.141 --- llvm/Makefile.rules:1.140 Mon Sep 15 17:17:02 2003 +++ llvm/Makefile.rules Thu Sep 18 13:37:08 2003 @@ -742,7 +742,7 @@ # which they can be "generated." This allows make to ignore them and # reproduce the dependency lists. # -%.h:: +%.h:: ; # 'make clean' nukes the tree clean:: From lattner at cs.uiuc.edu Thu Sep 18 15:28:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Sep 18 15:28:02 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/SingleSource/UnitTests/2003-09-18-BitFieldTest.c Message-ID: <200309182027.PAA09536@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs/SingleSource/UnitTests: 2003-09-18-BitFieldTest.c added (r1.1) --- Log message: New testcase, which the CFE botches --- Diffs of the changes: Index: llvm/test/Programs/SingleSource/UnitTests/2003-09-18-BitFieldTest.c diff -c /dev/null llvm/test/Programs/SingleSource/UnitTests/2003-09-18-BitFieldTest.c:1.1 *** /dev/null Thu Sep 18 15:27:19 2003 --- llvm/test/Programs/SingleSource/UnitTests/2003-09-18-BitFieldTest.c Thu Sep 18 15:27:08 2003 *************** *** 0 **** --- 1,20 ---- + #include + + struct rtx_def { + unsigned int jump : 1; + unsigned int call : 1; + }; + + void i2(struct rtx_def *d) { + d->jump = 0; + } + + int main() { + struct rtx_def D; + D.call = 1; + i2(&D); + printf("%d %d\n", D.jump, D.call); + return 0; + } + + From lattner at cs.uiuc.edu Fri Sep 19 00:23:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Sep 19 00:23:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/CFrontend/2003-09-18-BitfieldTests.c Message-ID: <200309190522.AAA22259@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/CFrontend: 2003-09-18-BitfieldTests.c added (r1.1) --- Log message: a bitfield stress test to exercise various parts of the front-end. --- Diffs of the changes: Index: llvm/test/Regression/CFrontend/2003-09-18-BitfieldTests.c diff -c /dev/null llvm/test/Regression/CFrontend/2003-09-18-BitfieldTests.c:1.1 *** /dev/null Fri Sep 19 00:22:20 2003 --- llvm/test/Regression/CFrontend/2003-09-18-BitfieldTests.c Fri Sep 19 00:22:10 2003 *************** *** 0 **** --- 1,28 ---- + + typedef struct BF { + int A : 1; + char B; + int C : 13; + } BF; + + char *test1(BF *b) { + return &b->B; // Must be able to address non-bitfield + } + + void test2(BF *b) { // Increment and decrement operators + b->A++; + --b->C; + } + + void test3(BF *b) { + b->C = 12345; // Store + } + + int test4(BF *b) { + return b->C; // Load + } + + void test5(BF *b, int i) { // array ref + b[i].C = 12345; + } + From lattner at cs.uiuc.edu Fri Sep 19 10:34:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Sep 19 10:34:02 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/InstCombine/add.ll Message-ID: <200309191533.KAA02074@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/InstCombine: add.ll updated: 1.14 -> 1.15 --- Log message: New testcases --- Diffs of the changes: Index: llvm/test/Regression/Transforms/InstCombine/add.ll diff -u llvm/test/Regression/Transforms/InstCombine/add.ll:1.14 llvm/test/Regression/Transforms/InstCombine/add.ll:1.15 --- llvm/test/Regression/Transforms/InstCombine/add.ll:1.14 Tue Sep 16 10:29:33 2003 +++ llvm/test/Regression/Transforms/InstCombine/add.ll Fri Sep 19 10:33:46 2003 @@ -93,3 +93,15 @@ ret uint %tmp.8 } +ubyte %test15(ubyte %A) { + %B = add ubyte %A, 192 ; Does not effect result + %C = and ubyte %B, 16 ; Only one bit set + ret ubyte %C +} + +ubyte %test16(ubyte %A) { + %B = add ubyte %A, 16 ; Turn this into a XOR + %C = and ubyte %B, 16 ; Only one bit set + ret ubyte %C +} + From lattner at cs.uiuc.edu Fri Sep 19 10:36:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Sep 19 10:36:02 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200309191535.KAA02221@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.119 -> 1.120 --- Log message: Implement InstCombine/add.ll:test(15|16) --- Diffs of the changes: Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.119 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.120 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.119 Thu Sep 11 17:24:54 2003 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Fri Sep 19 10:35:42 2003 @@ -764,6 +764,43 @@ return BinaryOperator::create(Instruction::And, Or, RHS); } } + } else if (Op0I->getOpcode() == Instruction::Add && + Op0I->use_size() == 1) { + // Adding a one to a single bit bit-field should be turned into an XOR + // of the bit. First thing to check is to see if this AND is with a + // single bit constant. + unsigned long long AndRHS = cast(RHS)->getRawValue(); + + // Clear bits that are not part of the constant. + AndRHS &= (1ULL << RHS->getType()->getPrimitiveSize()*8)-1; + + // If there is only one bit set... + if ((AndRHS & (AndRHS-1)) == 0) { + // Ok, at this point, we know that we are masking the result of the + // ADD down to exactly one bit. If the constant we are adding has + // no bits set below this bit, then we can eliminate the ADD. + unsigned long long AddRHS = cast(Op0CI)->getRawValue(); + + // Check to see if any bits below the one bit set in AndRHS are set. + if ((AddRHS & (AndRHS-1)) == 0) { + // If not, the only thing that can effect the output of the AND is + // the bit specified by AndRHS. If that bit is set, the effect of + // the XOR is to toggle the bit. If it is clear, then the ADD has + // no effect. + if ((AddRHS & AndRHS) == 0) { // Bit is not set, noop + I.setOperand(0, Op0I->getOperand(0)); + return &I; + } else { + std::string Name = Op0I->getName(); Op0I->setName(""); + // Pull the XOR out of the AND. + Instruction *NewAnd = + BinaryOperator::create(Instruction::And, Op0I->getOperand(0), + RHS, Name); + InsertNewInstBefore(NewAnd, I); + return BinaryOperator::create(Instruction::Xor, NewAnd, RHS); + } + } + } } } } From lattner at cs.uiuc.edu Fri Sep 19 12:18:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Sep 19 12:18:02 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200309191717.MAA11648@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.120 -> 1.121 --- Log message: pull a large nested conditional out into its own function --- Diffs of the changes: Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.120 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.121 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.120 Fri Sep 19 10:35:42 2003 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Fri Sep 19 12:17:26 2003 @@ -135,6 +135,9 @@ // SimplifyCommutative - This performs a few simplifications for commutative // operators... bool SimplifyCommutative(BinaryOperator &I); + + Instruction *OptAndOp(Instruction *Op, ConstantIntegral *OpRHS, + ConstantIntegral *AndRHS, BinaryOperator &TheAnd); }; RegisterOpt X("instcombine", "Combine redundant instructions"); @@ -716,6 +719,89 @@ }; +// OptAndOp - This handles expressions of the form ((val OP C1) & C2). Where +// the Op parameter is 'OP', OpRHS is 'C1', and AndRHS is 'C2'. Op is +// guaranteed to be either a shift instruction or a binary operator. +Instruction *InstCombiner::OptAndOp(Instruction *Op, + ConstantIntegral *OpRHS, + ConstantIntegral *AndRHS, + BinaryOperator &TheAnd) { + Value *X = Op->getOperand(0); + switch (Op->getOpcode()) { + case Instruction::Xor: + if ((*AndRHS & *OpRHS)->isNullValue()) { + // (X ^ C1) & C2 --> (X & C2) iff (C1&C2) == 0 + return BinaryOperator::create(Instruction::And, X, AndRHS); + } else if (Op->use_size() == 1) { + // (X ^ C1) & C2 --> (X & C2) ^ (C1&C2) + std::string OpName = Op->getName(); Op->setName(""); + Instruction *And = BinaryOperator::create(Instruction::And, + X, AndRHS, OpName); + InsertNewInstBefore(And, TheAnd); + return BinaryOperator::create(Instruction::Xor, And, *AndRHS & *OpRHS); + } + break; + case Instruction::Or: + // (X | C1) & C2 --> X & C2 iff C1 & C1 == 0 + if ((*AndRHS & *OpRHS)->isNullValue()) + return BinaryOperator::create(Instruction::And, X, AndRHS); + else { + Constant *Together = *AndRHS & *OpRHS; + if (Together == AndRHS) // (X | C) & C --> C + return ReplaceInstUsesWith(TheAnd, AndRHS); + + if (Op->use_size() == 1 && Together != OpRHS) { + // (X | C1) & C2 --> (X | (C1&C2)) & C2 + std::string Op0Name = Op->getName(); Op->setName(""); + Instruction *Or = BinaryOperator::create(Instruction::Or, X, + Together, Op0Name); + InsertNewInstBefore(Or, TheAnd); + return BinaryOperator::create(Instruction::And, Or, AndRHS); + } + } + break; + case Instruction::Add: + if (Op->use_size() == 1) { + // Adding a one to a single bit bit-field should be turned into an XOR + // of the bit. First thing to check is to see if this AND is with a + // single bit constant. + unsigned long long AndRHSV = cast(AndRHS)->getRawValue(); + + // Clear bits that are not part of the constant. + AndRHSV &= (1ULL << AndRHS->getType()->getPrimitiveSize()*8)-1; + + // If there is only one bit set... + if ((AndRHSV & (AndRHSV-1)) == 0) { + // Ok, at this point, we know that we are masking the result of the + // ADD down to exactly one bit. If the constant we are adding has + // no bits set below this bit, then we can eliminate the ADD. + unsigned long long AddRHS = cast(OpRHS)->getRawValue(); + + // Check to see if any bits below the one bit set in AndRHSV are set. + if ((AddRHS & (AndRHSV-1)) == 0) { + // If not, the only thing that can effect the output of the AND is + // the bit specified by AndRHSV. If that bit is set, the effect of + // the XOR is to toggle the bit. If it is clear, then the ADD has + // no effect. + if ((AddRHS & AndRHSV) == 0) { // Bit is not set, noop + TheAnd.setOperand(0, X); + return &TheAnd; + } else { + std::string Name = Op->getName(); Op->setName(""); + // Pull the XOR out of the AND. + Instruction *NewAnd = + BinaryOperator::create(Instruction::And, X, AndRHS, Name); + InsertNewInstBefore(NewAnd, TheAnd); + return BinaryOperator::create(Instruction::Xor, NewAnd, AndRHS); + } + } + } + } + break; + } + return 0; +} + Instruction *InstCombiner::visitAnd(BinaryOperator &I) { bool Changed = SimplifyCommutative(I); @@ -730,78 +816,13 @@ if (RHS->isAllOnesValue()) return ReplaceInstUsesWith(I, Op0); - if (BinaryOperator *Op0I = dyn_cast(Op0)) { + // Optimize a variety of ((val OP C1) & C2) combinations... + if (isa(Op0) || isa(Op0)) { + Instruction *Op0I = cast(Op0); Value *X = Op0I->getOperand(0); if (ConstantInt *Op0CI = dyn_cast(Op0I->getOperand(1))) - if (Op0I->getOpcode() == Instruction::Xor) { - if ((*RHS & *Op0CI)->isNullValue()) { - // (X ^ C1) & C2 --> (X & C2) iff (C1&C2) == 0 - return BinaryOperator::create(Instruction::And, X, RHS); - } else if (isOnlyUse(Op0)) { - // (X ^ C1) & C2 --> (X & C2) ^ (C1&C2) - std::string Op0Name = Op0I->getName(); Op0I->setName(""); - Instruction *And = BinaryOperator::create(Instruction::And, - X, RHS, Op0Name); - InsertNewInstBefore(And, I); - return BinaryOperator::create(Instruction::Xor, And, *RHS & *Op0CI); - } - } else if (Op0I->getOpcode() == Instruction::Or) { - // (X | C1) & C2 --> X & C2 iff C1 & C1 == 0 - if ((*RHS & *Op0CI)->isNullValue()) - return BinaryOperator::create(Instruction::And, X, RHS); - - Constant *Together = *RHS & *Op0CI; - if (Together == RHS) // (X | C) & C --> C - return ReplaceInstUsesWith(I, RHS); - - if (isOnlyUse(Op0)) { - if (Together != Op0CI) { - // (X | C1) & C2 --> (X | (C1&C2)) & C2 - std::string Op0Name = Op0I->getName(); Op0I->setName(""); - Instruction *Or = BinaryOperator::create(Instruction::Or, X, - Together, Op0Name); - InsertNewInstBefore(Or, I); - return BinaryOperator::create(Instruction::And, Or, RHS); - } - } - } else if (Op0I->getOpcode() == Instruction::Add && - Op0I->use_size() == 1) { - // Adding a one to a single bit bit-field should be turned into an XOR - // of the bit. First thing to check is to see if this AND is with a - // single bit constant. - unsigned long long AndRHS = cast(RHS)->getRawValue(); - - // Clear bits that are not part of the constant. - AndRHS &= (1ULL << RHS->getType()->getPrimitiveSize()*8)-1; - - // If there is only one bit set... - if ((AndRHS & (AndRHS-1)) == 0) { - // Ok, at this point, we know that we are masking the result of the - // ADD down to exactly one bit. If the constant we are adding has - // no bits set below this bit, then we can eliminate the ADD. - unsigned long long AddRHS = cast(Op0CI)->getRawValue(); - - // Check to see if any bits below the one bit set in AndRHS are set. - if ((AddRHS & (AndRHS-1)) == 0) { - // If not, the only thing that can effect the output of the AND is - // the bit specified by AndRHS. If that bit is set, the effect of - // the XOR is to toggle the bit. If it is clear, then the ADD has - // no effect. - if ((AddRHS & AndRHS) == 0) { // Bit is not set, noop - I.setOperand(0, Op0I->getOperand(0)); - return &I; - } else { - std::string Name = Op0I->getName(); Op0I->setName(""); - // Pull the XOR out of the AND. - Instruction *NewAnd = - BinaryOperator::create(Instruction::And, Op0I->getOperand(0), - RHS, Name); - InsertNewInstBefore(NewAnd, I); - return BinaryOperator::create(Instruction::Xor, NewAnd, RHS); - } - } - } - } + if (Instruction *Res = OptAndOp(Op0I, Op0CI, RHS, I)) + return Res; } } From lattner at cs.uiuc.edu Fri Sep 19 14:05:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Sep 19 14:05:02 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/InstCombine/and.ll Message-ID: <200309191904.OAA14934@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/InstCombine: and.ll updated: 1.17 -> 1.18 --- Log message: Two new tests for shifts followed by ands --- Diffs of the changes: Index: llvm/test/Regression/Transforms/InstCombine/and.ll diff -u llvm/test/Regression/Transforms/InstCombine/and.ll:1.17 llvm/test/Regression/Transforms/InstCombine/and.ll:1.18 --- llvm/test/Regression/Transforms/InstCombine/and.ll:1.17 Tue Sep 16 10:29:34 2003 +++ llvm/test/Regression/Transforms/InstCombine/and.ll Fri Sep 19 14:04:43 2003 @@ -93,3 +93,15 @@ %C = setne ubyte %B, 0 ret bool %C } + +ubyte %test15(ubyte %A) { + %B = shr ubyte %A, ubyte 7 + %C = and ubyte %B, 2 ; Always equals zero + ret ubyte %C +} + +ubyte %test16(ubyte %A) { + %B = shl ubyte %A, ubyte 2 + %C = and ubyte %B, 3 + ret ubyte %C +} From lattner at cs.uiuc.edu Fri Sep 19 14:06:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Sep 19 14:06:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200309191905.OAA14943@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.121 -> 1.122 --- Log message: Implement InstCombine/and.ll:test(15|16) --- Diffs of the changes: Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.121 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.122 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.121 Fri Sep 19 12:17:26 2003 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Fri Sep 19 14:05:02 2003 @@ -798,6 +798,33 @@ } } break; + + case Instruction::Shl: { + // We know that the AND will not produce any of the bits shifted in, so if + // the anded constant includes them, clear them now! + // + Constant *AllOne = ConstantIntegral::getAllOnesValue(AndRHS->getType()); + Constant *CI = *AndRHS & *(*AllOne << *OpRHS); + if (CI != AndRHS) { + TheAnd.setOperand(1, CI); + return &TheAnd; + } + break; + } + case Instruction::Shr: + // We know that the AND will not produce any of the bits shifted in, so if + // the anded constant includes them, clear them now! This only applies to + // unsigned shifts, because a signed shr may bring in set bits! + // + if (AndRHS->getType()->isUnsigned()) { + Constant *AllOne = ConstantIntegral::getAllOnesValue(AndRHS->getType()); + Constant *CI = *AndRHS & *(*AllOne >> *OpRHS); + if (CI != AndRHS) { + TheAnd.setOperand(1, CI); + return &TheAnd; + } + } + break; } return 0; } From lattner at cs.uiuc.edu Fri Sep 19 14:32:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Sep 19 14:32:01 2003 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Function.cpp Message-ID: <200309191931.OAA15233@apoc.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Function.cpp updated: 1.50 -> 1.51 --- Log message: Reject "llvm." as a function name --- Diffs of the changes: Index: llvm/lib/VMCore/Function.cpp diff -u llvm/lib/VMCore/Function.cpp:1.50 llvm/lib/VMCore/Function.cpp:1.51 --- llvm/lib/VMCore/Function.cpp:1.50 Tue Sep 16 23:58:59 2003 +++ llvm/lib/VMCore/Function.cpp Fri Sep 19 14:31:41 2003 @@ -158,9 +158,11 @@ /// llvm/Intrinsics.h. /// unsigned Function::getIntrinsicID() const { - if (getName().size() <= 5 || getName()[4] != '.' || getName()[0] != 'l' || + if (getName().size() < 5 || getName()[4] != '.' || getName()[0] != 'l' || getName()[1] != 'l' || getName()[2] != 'v' || getName()[3] != 'm') return 0; // All intrinsics start with 'llvm.' + + assert(getName().size() != 5 && "'llvm.' is an invalid intrinsic name!"); // a table of all Alpha intrinsic functions struct { From criswell at cs.uiuc.edu Fri Sep 19 15:25:02 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Sep 19 15:25:02 2003 Subject: [llvm-commits] CVS: llvm/tools/gccld/gccld.h Message-ID: <200309192024.PAA14324@choi.cs.uiuc.edu> Changes in directory llvm/tools/gccld: gccld.h added (r1.1) --- Log message: New header file for gccld. --- Diffs of the changes: Index: llvm/tools/gccld/gccld.h diff -c /dev/null llvm/tools/gccld/gccld.h:1.1 *** /dev/null Fri Sep 19 15:24:50 2003 --- llvm/tools/gccld/gccld.h Fri Sep 19 15:24:40 2003 *************** *** 0 **** --- 1,64 ---- + //===- util.h - Utility functions header file -----------------------------===// + // + // This file contains function prototypes for the functions in util.cpp. + // + //===----------------------------------------------------------------------===// + + #include "llvm/Module.h" + + #include + #include + #include + + int + PrintAndReturn (const char *progname, + const std::string &Message, + const std::string &Extra = ""); + + void + GetAllDefinedSymbols (Module *M, std::set &DefinedSymbols); + + void + GetAllUndefinedSymbols(Module *M, std::set &UndefinedSymbols); + + char ** + CopyEnv (char ** const envp); + + void + RemoveEnv (const char * name, char ** const envp); + + int + GenerateBytecode (Module * M, + bool Strip, + bool Internalize, + std::ostream * Out); + + int + GenerateAssembly (const std::string & OutputFilename, + const std::string & InputFilename, + const std::string & llc, + char ** const envp); + int + GenerateNative (const std::string & OutputFilename, + const std::string & InputFilename, + const std::vector & Libraries, + const std::vector & LibPaths, + const std::string & gcc, + char ** const envp); + + std::auto_ptr + LoadObject (const std::string & FN, std::string &OutErrorMessage); + + bool + LinkLibraries (const char * progname, + Module * HeadModule, + const std::vector & Libraries, + const std::vector & LibPaths, + bool Verbose, + bool Native); + bool + LinkFiles (const char * progname, + Module * HeadModule, + const std::vector & Files, + bool Verbose); + From criswell at cs.uiuc.edu Fri Sep 19 15:26:03 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Sep 19 15:26:03 2003 Subject: [llvm-commits] CVS: llvm/tools/gccld/linker.cpp gccld.cpp gencode.cpp util.cpp util.h Message-ID: <200309192025.PAA14530@choi.cs.uiuc.edu> Changes in directory llvm/tools/gccld: linker.cpp added (r1.1) gccld.cpp updated: 1.50 -> 1.51 gencode.cpp updated: 1.1 -> 1.2 util.cpp (r1.1) removed util.h (r1.1) removed --- Log message: Removed linking functionality from gccld.cpp and moved it to linker.cpp. Renamed functions that were all lower-case. Moved functions from util.cpp into linker.cpp or gccld.cpp. Removed util.h and created gccld.h. Refactored the linker functionality in linker.cpp so that it is easier to follow, easier to modify, and it's library/object file search behavior is easier to understand and document. Added code to include library paths when doing native linking, but this causes problems and is currently #ifdef'd out. --- Diffs of the changes: Index: llvm/tools/gccld/linker.cpp diff -c /dev/null llvm/tools/gccld/linker.cpp:1.1 *** /dev/null Fri Sep 19 15:25:04 2003 --- llvm/tools/gccld/linker.cpp Fri Sep 19 15:24:23 2003 *************** *** 0 **** --- 1,601 ---- + //===- gccld.cpp - LLVM 'ld' compatible linker ----------------------------===// + // + // This utility is intended to be compatible with GCC, and follows standard + // system 'ld' conventions. As such, the default output file is ./a.out. + // Additionally, this program outputs a shell script that is used to invoke LLI + // to execute the program. In this manner, the generated executable (a.out for + // example), is directly executable, whereas the bytecode file actually lives in + // the a.out.bc file generated by this program. Also, Force is on by default. + // + // Note that if someone (or a script) deletes the executable program generated, + // the .bc file will be left around. Considering that this is a temporary hack, + // I'm not too worried about this. + // + //===----------------------------------------------------------------------===// + + #include "llvm/Transforms/Utils/Linker.h" + #include "llvm/Module.h" + #include "llvm/PassManager.h" + #include "llvm/Bytecode/Reader.h" + #include "llvm/Bytecode/WriteBytecodePass.h" + #include "llvm/Target/TargetData.h" + #include "llvm/Transforms/IPO.h" + #include "llvm/Transforms/Scalar.h" + #include "Support/FileUtilities.h" + #include "Support/SystemUtils.h" + #include "Support/CommandLine.h" + #include "Support/Signals.h" + #include "Config/stdlib.h" + #include "gccld.h" + + #include + #include + #include + #include + + // + // Function: FileExists () + // + // Description: + // Determine if the specified filename exists and is readable. + // + // Inputs: + // FN - The name of the file. + // + // Outputs: + // None. + // + // Return Value: + // TRUE - The file exists and is readable. + // FALSE - The file does not exist or is unreadable. + // + static inline bool + FileExists(const std::string &FN) + { + return access(FN.c_str(), R_OK | F_OK) != -1; + } + + // + // Function: IsArchive () + // + // Description: + // Determine if the specified file is an ar archive. It determines this by + // checking the magic string at the beginning of the file. + // + // Inputs: + // filename - A C++ string containing the name of the file. + // + // Outputs: + // None. + // + // Return value: + // TRUE - The file is an archive. + // FALSE - The file is not an archive. + // + static inline bool + IsArchive (const std::string &filename) + { + std::string ArchiveMagic("!\012"); + char buf[1 + ArchiveMagic.size()]; + + std::ifstream f(filename.c_str()); + f.read(buf, ArchiveMagic.size()); + buf[ArchiveMagic.size()] = '\0'; + return ArchiveMagic == buf; + } + + // + // Function: FindLib () + // + // Description: + // This function locates a particular library. It will prepend and append + // various directories, prefixes, and suffixes until it can find the library. + // + // Inputs: + // Filename - Name of the file to find. + // Paths - List of directories to search. + // + // Outputs: + // None. + // + // Return value: + // The name of the file is returned. + // If the file is not found, an empty string is returned. + // + static std::string + FindLib (const std::string & Filename, const std::vector & Paths) + { + // + // Determine if the pathname can be found as it stands. + // + if (FileExists (Filename)) + { + return Filename; + } + + // + // If that doesn't work, convert the name into a library name. + // + std::string LibName = "lib" + Filename; + + // + // Iterate over the directories in Paths to see if we can find the library + // there. + // + for (unsigned Index = 0; Index != Paths.size(); ++Index) + { + std::string Directory = Paths[Index] + "/"; + + if (FileExists (Directory + LibName + ".bc")) + { + return Directory + LibName + ".bc"; + } + + if (FileExists (Directory + LibName + ".so")) + { + return Directory + LibName + ".so"; + } + + if (FileExists (Directory + LibName + ".a")) + { + return Directory + LibName + ".a"; + } + } + + // + // One last hope: Check LLVM_LIB_SEARCH_PATH. + // + char *SearchPath = getenv("LLVM_LIB_SEARCH_PATH"); + if (SearchPath == NULL) + { + return std::string(); + } + + LibName = std::string(SearchPath) + "/" + LibName; + if (FileExists (LibName)) + { + return LibName; + } + + return std::string(); + } + + // + // Function: GetAllDefinedSymbols () + // + // Description: + // Find all of the defined symbols in the specified module. + // + // Inputs: + // M - The module in which to find defined symbols. + // + // Outputs: + // DefinedSymbols - A set of C++ strings that will contain the name of all + // defined symbols. + // + // Return value: + // None. + // + void + GetAllDefinedSymbols (Module *M, std::set &DefinedSymbols) + { + for (Module::iterator I = M->begin(), E = M->end(); I != E; ++I) + if (I->hasName() && !I->isExternal() && !I->hasInternalLinkage()) + DefinedSymbols.insert(I->getName()); + for (Module::giterator I = M->gbegin(), E = M->gend(); I != E; ++I) + if (I->hasName() && !I->isExternal() && !I->hasInternalLinkage()) + DefinedSymbols.insert(I->getName()); + } + + // + // Function: GetAllUndefinedSymbols () + // + // Description: + // This calculates the set of undefined symbols that still exist in an LLVM + // module. This is a bit tricky because there may be two symbols with the + // same name but different LLVM types that will be resolved to each other but + // aren't currently (thus we need to treat it as resolved). + // + // Inputs: + // M - The module in which to find undefined symbols. + // + // Outputs: + // UndefinedSymbols - A set of C++ strings containing the name of all + // undefined symbols. + // + // Return value: + // None. + // + void + GetAllUndefinedSymbols(Module *M, std::set &UndefinedSymbols) + { + std::set DefinedSymbols; + UndefinedSymbols.clear(); // Start out empty + + for (Module::iterator I = M->begin(), E = M->end(); I != E; ++I) + if (I->hasName()) { + if (I->isExternal()) + UndefinedSymbols.insert(I->getName()); + else if (!I->hasInternalLinkage()) + DefinedSymbols.insert(I->getName()); + } + for (Module::giterator I = M->gbegin(), E = M->gend(); I != E; ++I) + if (I->hasName()) { + if (I->isExternal()) + UndefinedSymbols.insert(I->getName()); + else if (!I->hasInternalLinkage()) + DefinedSymbols.insert(I->getName()); + } + + // Prune out any defined symbols from the undefined symbols set... + for (std::set::iterator I = UndefinedSymbols.begin(); + I != UndefinedSymbols.end(); ) + if (DefinedSymbols.count(*I)) + UndefinedSymbols.erase(I++); // This symbol really is defined! + else + ++I; // Keep this symbol in the undefined symbols list + } + + + // + // Function: LoadObject () + // + // Description: + // Read the specified bytecode object file. + // + // Inputs: + // FN - The name of the file to load. + // + // Outputs: + // OutErrorMessage - The error message to give back to the caller. + // + // Return Value: + // A pointer to a module represening the bytecode file is returned. + // If an error occurs, the pointer is 0. + // + std::auto_ptr + LoadObject (const std::string & FN, std::string &OutErrorMessage) + { + std::string ErrorMessage; + Module *Result = ParseBytecodeFile(FN, &ErrorMessage); + if (Result) return std::auto_ptr(Result); + + OutErrorMessage = "Bytecode file '" + FN + "' corrupt!"; + if (ErrorMessage.size()) OutErrorMessage += ": " + ErrorMessage; + return std::auto_ptr(); + } + + // + // Function: LinkInArchive () + // + // Description: + // This function will open an archive library and link in all objects which + // provide symbols that are currently undefined. + // + // Inputs: + // M - The module in which to link the archives. + // Filename - The pathname of the archive. + // Verbose - Flags whether verbose messages should be printed. + // + // Outputs: + // ErrorMessage - A C++ string detailing what error occurred, if any. + // + // Return Value: + // TRUE - An error occurred. + // FALSE - No errors. + // + static bool + LinkInArchive (Module * M, + const std::string & Filename, + std::string & ErrorMessage, + bool Verbose) + { + // + // Find all of the symbols currently undefined in the bytecode program. + // If all the symbols are defined, the program is complete, and there is + // no reason to link in any archive files. + // + std::set UndefinedSymbols; + GetAllUndefinedSymbols (M, UndefinedSymbols); + if (UndefinedSymbols.empty()) + { + if (Verbose) std::cerr << " No symbols undefined, don't link library!\n"; + return false; // No need to link anything in! + } + + // + // Load in the archive objects. + // + if (Verbose) std::cerr << " Loading '" << Filename << "'\n"; + std::vector Objects; + if (ReadArchiveFile (Filename, Objects, &ErrorMessage)) + { + return true; + } + + // + // Figure out which symbols are defined by all of the modules in the archive. + // + std::vector > DefinedSymbols; + DefinedSymbols.resize (Objects.size()); + for (unsigned i = 0; i != Objects.size(); ++i) + { + GetAllDefinedSymbols(Objects[i], DefinedSymbols[i]); + } + + // While we are linking in object files, loop. + bool Linked = true; + while (Linked) + { + Linked = false; + + for (unsigned i = 0; i != Objects.size(); ++i) { + // Consider whether we need to link in this module... we only need to + // link it in if it defines some symbol which is so far undefined. + // + const std::set &DefSymbols = DefinedSymbols[i]; + + bool ObjectRequired = false; + for (std::set::iterator I = UndefinedSymbols.begin(), + E = UndefinedSymbols.end(); I != E; ++I) + if (DefSymbols.count(*I)) { + if (Verbose) + std::cerr << " Found object providing symbol '" << *I << "'...\n"; + ObjectRequired = true; + break; + } + + // We DO need to link this object into the program... + if (ObjectRequired) { + if (LinkModules(M, Objects[i], &ErrorMessage)) + return true; // Couldn't link in the right object file... + + // Since we have linked in this object, delete it from the list of + // objects to consider in this archive file. + std::swap(Objects[i], Objects.back()); + std::swap(DefinedSymbols[i], DefinedSymbols.back()); + Objects.pop_back(); + DefinedSymbols.pop_back(); + --i; // Do not skip an entry + + // The undefined symbols set should have shrunk. + GetAllUndefinedSymbols(M, UndefinedSymbols); + Linked = true; // We have linked something in! + } + } + } + + return false; + } + + // + // Function: LinkInFile () + // + // Description: + // This function will open an archive library and link in all objects which + // provide symbols that are currently undefined. + // + // Inputs: + // HeadModule - The module in which to link the archives. + // Filename - The pathname of the archive. + // Verbose - Flags whether verbose messages should be printed. + // + // Outputs: + // ErrorMessage - A C++ string detailing what error occurred, if any. + // + // Return Value: + // TRUE - An error occurred. + // FALSE - No errors. + // + static bool + LinkInFile (Module * HeadModule, + const std::string & Filename, + std::string & ErrorMessage, + bool Verbose) + { + std::auto_ptr M(LoadObject(Filename, ErrorMessage)); + if (M.get() == 0) + { + return true; + } + + if (Verbose) std::cerr << "Linking in '" << Filename << "'\n"; + + return (LinkModules (HeadModule, M.get(), &ErrorMessage)); + } + + // + // Function: LinkFiles () + // + // Description: + // This function takes a module and a list of files and links them all + // together. It locates the file either in the current directory, as it's + // absolute or relative pathname, or as a file somewhere in + // LLVM_LIB_SEARCH_PATH. + // + // Inputs: + // progname - The name of the program (infamous argv[0]). + // HeadModule - The module under which all files will be linked. + // Files - A vector of C++ strings indicating the LLVM bytecode filenames + // to be linked. The names can refer to a mixture of pure LLVM + // bytecode files and archive (ar) formatted files. + // Verbose - Flags whether verbose output should be printed while linking. + // + // Outputs: + // HeadModule - The module will have the specified LLVM bytecode files linked + // in. + // + // Return value: + // FALSE - No errors. + // TRUE - Some error occurred. + // + bool + LinkFiles (const char * progname, + Module * HeadModule, + const std::vector & Files, + bool Verbose) + { + // String in which to receive error messages. + std::string ErrorMessage; + + // Full pathname of the file + std::string Pathname; + + // Get the library search path from the environment + char *SearchPath = getenv("LLVM_LIB_SEARCH_PATH"); + + for (unsigned i = 1; i < Files.size(); ++i) + { + // + // Determine where this file lives. + // + if (FileExists (Files[i])) + { + Pathname = Files[i]; + } + else + { + if (SearchPath == NULL) + { + std::cerr << "Cannot find " << Files[i]; + return true; + } + + Pathname = std::string(SearchPath)+"/"+Files[i]; + if (!FileExists (Pathname)) + { + std::cerr << "Cannot find " << Files[i]; + return true; + } + } + + // + // A user may specify an ar archive without -l, perhaps because it + // is not installed as a library. Detect that and link the library. + // + if (IsArchive(Pathname)) + { + if (Verbose) + { + std::cerr << "Linking archive '" << Files[i] << "'\n"; + } + + if (LinkInArchive (HeadModule, Pathname, ErrorMessage, Verbose)) + { + PrintAndReturn(progname, ErrorMessage, + ": Error linking in '" + Files[i] + "'"); + return true; + } + } + else + { + if (Verbose) + { + std::cerr << "Linking file '" << Files[i] << "'\n"; + } + + if (LinkInFile (HeadModule, Pathname, ErrorMessage, Verbose)) + { + PrintAndReturn(progname, ErrorMessage, + ": error linking in '" + Files[i] + "'"); + return true; + } + } + } + + return false; + } + + // + // Function: LinkLibraries () + // + // Description: + // This function takes the specified library files and links them into the + // main bytecode object file. + // + // Inputs: + // progname - The name of the program (infamous argv[0]). + // HeadModule - The module into which all necessary libraries will be linked. + // Libraries - The list of libraries to link into the module. + // LibPaths - The list of library paths in which to find libraries. + // Verbose - Flags whether verbose messages should be printed. + // Native - Flags whether native code is being generated. + // + // Outputs: + // HeadModule - The module will have all necessary libraries linked in. + // + // Return value: + // FALSE - No error. + // TRUE - Error. + // + bool + LinkLibraries (const char * progname, + Module * HeadModule, + const std::vector & Libraries, + const std::vector & LibPaths, + bool Verbose, + bool Native) + { + // String in which to receive error messages. + std::string ErrorMessage; + + for (unsigned i = 1; i < Libraries.size(); ++i) + { + // + // Determine where this library lives. + // + std::string Pathname = FindLib (Libraries[i], LibPaths); + if (Pathname.empty()) + { + // + // If the pathname does not exist, then continue to the next one if + // we're doing a native link and give an error if we're doing a bytecode + // link. + // + if (Native) + { + continue; + } + else + { + PrintAndReturn (progname, "Cannot find " + Libraries[i]); + return true; + } + } + + // + // A user may specify an ar archive without -l, perhaps because it + // is not installed as a library. Detect that and link the library. + // + if (IsArchive(Pathname)) + { + if (Verbose) + { + std::cerr << "Linking archive '" << Libraries[i] << "'\n"; + } + + if (LinkInArchive (HeadModule, Pathname, ErrorMessage, Verbose)) + { + PrintAndReturn(progname, ErrorMessage, + ": Error linking in '" + Libraries[i] + "'"); + return true; + } + } + else + { + if (Verbose) + { + std::cerr << "Linking file '" << Libraries[i] << "'\n"; + } + + if (LinkInFile (HeadModule, Pathname, ErrorMessage, Verbose)) + { + PrintAndReturn(progname, ErrorMessage, + ": error linking in '" + Libraries[i] + "'"); + return true; + } + } + } + + return false; + } Index: llvm/tools/gccld/gccld.cpp diff -u llvm/tools/gccld/gccld.cpp:1.50 llvm/tools/gccld/gccld.cpp:1.51 --- llvm/tools/gccld/gccld.cpp:1.50 Thu Sep 18 11:22:26 2003 +++ llvm/tools/gccld/gccld.cpp Fri Sep 19 15:24:23 2003 @@ -26,34 +26,13 @@ #include "Support/CommandLine.h" #include "Support/Signals.h" #include "Config/unistd.h" -#include "util.h" +#include "gccld.h" #include #include #include #include -// -// External function prototypes -// -extern int -GenerateBytecode (Module * M, - bool Strip, - bool Internalize, - std::ofstream * Out); - -extern int -generate_assembly (std::string OutputFilename, - std::string InputFilename, - std::string llc, - char ** const envp); -extern int -generate_native (std::string OutputFilename, - std::string InputFilename, - std::vector Libraries, - std::string gcc, - char ** const envp); - namespace { cl::list InputFilenames(cl::Positional, cl::desc(""), @@ -102,180 +81,172 @@ CO6("r", cl::Hidden, cl::desc("Compatibility option: ignored")); } -// FileExists - Return true if the specified string is an openable file... -static inline bool FileExists(const std::string &FN) { - return access(FN.c_str(), F_OK) != -1; +// +// Function: PrintAndReturn () +// +// Description: +// Prints a message (usually error message) to standard error (stderr) and +// returns a value usable for an exit status. +// +// Inputs: +// progname - The name of the program (i.e. argv[0]). +// Message - The message to print to standard error. +// Extra - Extra information to print between the program name and thei +// message. It is optional. +// +// Outputs: +// None. +// +// Return value: +// Returns a value that can be used as the exit status (i.e. for exit()). +// +int +PrintAndReturn (const char *progname, + const std::string &Message, + const std::string &Extra) +{ + std::cerr << progname << Extra << ": " << Message << "\n"; + return 1; } -// LoadObject - Read the specified "object file", which should not search the -// library path to find it. -static inline std::auto_ptr LoadObject(std::string FN, - std::string &OutErrorMessage) { - if (Verbose) std::cerr << "Loading '" << FN << "'\n"; - if (!FileExists(FN)) { - // Attempt to load from the LLVM_LIB_SEARCH_PATH directory... if we would - // otherwise fail. This is used to locate objects like crtend.o. - // - char *SearchPath = getenv("LLVM_LIB_SEARCH_PATH"); - if (SearchPath && FileExists(std::string(SearchPath)+"/"+FN)) - FN = std::string(SearchPath)+"/"+FN; - else { - OutErrorMessage = "could not find input file '" + FN + "'!"; - return std::auto_ptr(); - } - } +// +// +// Function: CopyEnv() +// +// Description: +// This function takes an array of environment variables and makes a +// copy of it. This copy can then be manipulated any way the caller likes +// without affecting the process's real environment. +// +// Inputs: +// envp - An array of C strings containing an environment. +// +// Outputs: +// None. +// +// Return value: +// NULL - An error occurred. +// +// Otherwise, a pointer to a new array of C strings is returned. Every string +// in the array is a duplicate of the one in the original array (i.e. we do +// not copy the char *'s from one array to another). +// +char ** +CopyEnv (char ** const envp) +{ + // The new environment list + char ** newenv; - std::string ErrorMessage; - Module *Result = ParseBytecodeFile(FN, &ErrorMessage); - if (Result) return std::auto_ptr(Result); + // The number of entries in the old environment list + int entries; - OutErrorMessage = "Bytecode file '" + FN + "' corrupt!"; - if (ErrorMessage.size()) OutErrorMessage += ": " + ErrorMessage; - return std::auto_ptr(); -} + // + // Count the number of entries in the old list; + // + for (entries = 0; envp[entries] != NULL; entries++) + { + ; + } + // + // Add one more entry for the NULL pointer that ends the list. + // + ++entries; -static Module *LoadSingleLibraryObject(const std::string &Filename) { - std::string ErrorMessage; - std::auto_ptr M = LoadObject(Filename, ErrorMessage); - if (M.get() == 0 && Verbose) { - std::cerr << "Error loading '" + Filename + "'"; - if (!ErrorMessage.empty()) std::cerr << ": " << ErrorMessage; - std::cerr << "\n"; + // + // If there are no entries at all, just return NULL. + // + if (entries == 0) + { + return NULL; } - - return M.release(); -} -// LoadLibraryExactName - This looks for a file with a known name and tries to -// load it, similarly to LoadLibraryFromDirectory(). -static inline bool LoadLibraryExactName(const std::string &FileName, - std::vector &Objects, bool &isArchive) { - if (Verbose) std::cerr << " Considering '" << FileName << "'\n"; - if (FileExists(FileName)) { - if (IsArchive(FileName)) { - std::string ErrorMessage; - if (Verbose) std::cerr << " Loading '" << FileName << "'\n"; - if (!ReadArchiveFile(FileName, Objects, &ErrorMessage)) { - isArchive = true; - return false; // Success! - } - if (Verbose) { - std::cerr << " Error loading archive '" + FileName + "'"; - if (!ErrorMessage.empty()) std::cerr << ": " << ErrorMessage; - std::cerr << "\n"; - } - } else { - if (Module *M = LoadSingleLibraryObject(FileName)) { - isArchive = false; - Objects.push_back(M); - return false; - } - } + // + // Allocate a new environment list. + // + if ((newenv = new (char *) [entries]) == NULL) + { + return NULL; } - return true; -} -// LoadLibrary - Try to load a library named LIBNAME that contains -// LLVM bytecode. If SEARCH is true, then search for a file named -// libLIBNAME.{a,so,bc} in the current library search path. Otherwise, -// assume LIBNAME is the real name of the library file. This method puts -// the loaded modules into the Objects list, and sets isArchive to true if -// a .a file was loaded. It returns true if no library is found or if an -// error occurs; otherwise it returns false. -// -static inline bool LoadLibrary(const std::string &LibName, - std::vector &Objects, bool &isArchive, - bool search, std::string &ErrorMessage) { - if (search) { - // First, try the current directory. Then, iterate over the - // directories in LibPaths, looking for a suitable match for LibName - // in each one. - for (unsigned NextLibPathIdx = 0; NextLibPathIdx != LibPaths.size(); - ++NextLibPathIdx) { - std::string Directory = LibPaths[NextLibPathIdx] + "/"; - if (!LoadLibraryExactName(Directory + "lib" + LibName + ".a", - Objects, isArchive)) - return false; - if (!LoadLibraryExactName(Directory + "lib" + LibName + ".so", - Objects, isArchive)) - return false; - if (!LoadLibraryExactName(Directory + "lib" + LibName + ".bc", - Objects, isArchive)) - return false; - } - } else { - // If they said no searching, then assume LibName is the real name. - if (!LoadLibraryExactName(LibName, Objects, isArchive)) - return false; + // + // Make a copy of the list. Don't forget the NULL that ends the list. + // + entries = 0; + while (envp[entries] != NULL) + { + newenv[entries] = new char[strlen (envp[entries]) + 1]; + strcpy (newenv[entries], envp[entries]); + ++entries; } - ErrorMessage = "error linking library '-l" + LibName+ "': library not found!"; - return true; + newenv[entries] = NULL; + + return newenv; } -static bool LinkLibrary(Module *M, const std::string &LibName, - bool search, std::string &ErrorMessage) { - std::set UndefinedSymbols; - GetAllUndefinedSymbols(M, UndefinedSymbols); - if (UndefinedSymbols.empty()) { - if (Verbose) std::cerr << " No symbols undefined, don't link library!\n"; - return false; // No need to link anything in! - } +// +// Function: RemoveEnv() +// +// Description: +// Remove the specified environment variable from the environment array. +// +// Inputs: +// name - The name of the variable to remove. It cannot be NULL. +// envp - The array of environment variables. It cannot be NULL. +// +// Outputs: +// envp - The pointer to the specified variable name is removed. +// +// Return value: +// None. +// +// Notes: +// This is mainly done because functions to remove items from the environment +// are not available across all platforms. In particular, Solaris does not +// seem to have an unsetenv() function or a setenv() function (or they are +// undocumented if they do exist). +// +void +RemoveEnv (const char * name, char ** const envp) +{ + // Pointer for scanning arrays + register char * p; - std::vector Objects; - bool isArchive; - if (LoadLibrary(LibName, Objects, isArchive, search, ErrorMessage)) - return true; - - // Figure out which symbols are defined by all of the modules in the .a file - std::vector > DefinedSymbols; - DefinedSymbols.resize(Objects.size()); - for (unsigned i = 0; i != Objects.size(); ++i) - GetAllDefinedSymbols(Objects[i], DefinedSymbols[i]); - - bool Linked = true; - while (Linked) { // While we are linking in object files, loop. - Linked = false; - - for (unsigned i = 0; i != Objects.size(); ++i) { - // Consider whether we need to link in this module... we only need to - // link it in if it defines some symbol which is so far undefined. - // - const std::set &DefSymbols = DefinedSymbols[i]; + // Index for selecting elements of the environment array + register int index; - bool ObjectRequired = false; - for (std::set::iterator I = UndefinedSymbols.begin(), - E = UndefinedSymbols.end(); I != E; ++I) - if (DefSymbols.count(*I)) { - if (Verbose) - std::cerr << " Found object providing symbol '" << *I << "'...\n"; - ObjectRequired = true; - break; - } - - // We DO need to link this object into the program... - if (ObjectRequired) { - if (LinkModules(M, Objects[i], &ErrorMessage)) - return true; // Couldn't link in the right object file... - - // Since we have linked in this object, delete it from the list of - // objects to consider in this archive file. - std::swap(Objects[i], Objects.back()); - std::swap(DefinedSymbols[i], DefinedSymbols.back()); - Objects.pop_back(); - DefinedSymbols.pop_back(); - --i; // Do not skip an entry - - // The undefined symbols set should have shrunk. - GetAllUndefinedSymbols(M, UndefinedSymbols); - Linked = true; // We have linked something in! - } + for (index=0; envp[index] != NULL; index++) + { + // + // Find the first equals sign in the array and make it an EOS character. + // + p = strchr (envp[index], '='); + if (p == NULL) + { + continue; + } + else + { + *p = '\0'; + } + + // + // Compare the two strings. If they are equal, zap this string. + // Otherwise, restore it. + // + if (!strcmp (name, envp[index])) + { + *envp[index] = '\0'; + } + else + { + *p = '='; } } - - return false; + + return; } @@ -296,40 +267,15 @@ if (char *SearchPath = getenv("LLVM_LIB_SEARCH_PATH")) LibPaths.push_back(SearchPath); - for (unsigned i = 1; i < InputFilenames.size(); ++i) { - // A user may specify an ar archive without -l, perhaps because it - // is not installed as a library. Detect that and link the library. - if (IsArchive(InputFilenames[i])) { - if (Verbose) std::cerr << "Linking archive '" << InputFilenames[i] - << "'\n"; - if (LinkLibrary(Composite.get(), InputFilenames[i], false, ErrorMessage)) - return PrintAndReturn(argv[0], ErrorMessage, - ": error linking in '" + InputFilenames[i] + "'"); - continue; - } - - std::auto_ptr M(LoadObject(InputFilenames[i], ErrorMessage)); - if (M.get() == 0) - return PrintAndReturn(argv[0], ErrorMessage); - - if (Verbose) std::cerr << "Linking in '" << InputFilenames[i] << "'\n"; - - if (LinkModules(Composite.get(), M.get(), &ErrorMessage)) - return PrintAndReturn(argv[0], ErrorMessage, - ": error linking in '" + InputFilenames[i] + "'"); - } - // Remove any consecutive duplicates of the same library... Libraries.erase(std::unique(Libraries.begin(), Libraries.end()), Libraries.end()); + // Link in all of the files + LinkFiles (argv[0], Composite.get(), InputFilenames, Verbose); + LinkLibraries (argv[0], Composite.get(), Libraries, LibPaths, Verbose, Native); + // Link in all of the libraries next... - for (unsigned i = 0; i != Libraries.size(); ++i) { - if (Verbose) std::cerr << "Linking in library: -l" << Libraries[i] << "\n"; - if (LinkLibrary(Composite.get(), Libraries[i], true, ErrorMessage)) - if (!Native) - return PrintAndReturn(argv[0], ErrorMessage); - } // // Create the output file. @@ -401,8 +347,10 @@ // // Generate an assembly language file for the bytecode. // - generate_assembly (AssemblyFile, RealBytecodeOutput, llc, envp); - generate_native (OutputFilename, AssemblyFile, Libraries, gcc, envp); + if (Verbose) std::cout << "Generating Assembly Code\n"; + GenerateAssembly (AssemblyFile, RealBytecodeOutput, llc, envp); + if (Verbose) std::cout << "Generating Native Code\n"; + GenerateNative (OutputFilename, AssemblyFile, Libraries, LibPaths, gcc, envp); // // Remove the assembly language file. Index: llvm/tools/gccld/gencode.cpp diff -u llvm/tools/gccld/gencode.cpp:1.1 llvm/tools/gccld/gencode.cpp:1.2 --- llvm/tools/gccld/gencode.cpp:1.1 Thu Sep 18 11:22:26 2003 +++ llvm/tools/gccld/gencode.cpp Fri Sep 19 15:24:23 2003 @@ -1,4 +1,4 @@ -//===- genexec.cpp - Functions for generating executable files ------------===// +//===- gencode.cpp - Functions for generating executable files -----------===// // // This file contains functions for generating executable files once linking // has finished. This includes generating a shell script to run the JIT or @@ -14,11 +14,7 @@ #include "llvm/PassManager.h" #include "llvm/Bytecode/WriteBytecodePass.h" #include "Support/SystemUtils.h" -#include "util.h" - -#include -#include -#include +#include "gccld.h" // // Function: GenerateBytecode () @@ -43,7 +39,7 @@ GenerateBytecode (Module * M, bool Strip, bool Internalize, - std::ofstream * Out) + std::ostream * Out) { // In addition to just linking the input from GCC, we also want to spiff it up // a little bit. Do this now. @@ -106,7 +102,7 @@ } // -// Function: generate_assembly () +// Function: GenerateAssembly () // // Description: // This function generates a native assembly language source file from the @@ -126,10 +122,10 @@ // 1 - Failure // int -generate_assembly (std::string OutputFilename, - std::string InputFilename, - std::string llc, - char ** const envp) +GenerateAssembly (const std::string & OutputFilename, + const std::string & InputFilename, + const std::string & llc, + char ** const envp) { // // Run LLC to convert the bytecode file into assembly code. @@ -142,16 +138,12 @@ cmd[3] = OutputFilename.c_str(); cmd[4] = InputFilename.c_str(); cmd[5] = NULL; - if ((ExecWait (cmd, envp)) == -1) - { - return 1; - } - return 0; + return (ExecWait (cmd, envp)); } // -// Function: generate_native () +// Function: GenerateNative () // // Description: // This function generates a native assembly language source file from the @@ -161,6 +153,7 @@ // InputFilename - The name of the output bytecode file. // OutputFilename - The name of the file to generate. // Libraries - The list of libraries with which to link. +// LibPaths - The list of directories in which to find libraries. // gcc - The pathname to use for GGC. // envp - A copy of the process's current environment. // @@ -172,11 +165,12 @@ // 1 - Failure // int -generate_native (std::string OutputFilename, - std::string InputFilename, - std::vector Libraries, - std::string gcc, - char ** const envp) +GenerateNative (const std::string & OutputFilename, + const std::string & InputFilename, + const std::vector & Libraries, + const std::vector & LibPaths, + const std::string & gcc, + char ** const envp) { // // Remove these environment variables from the environment of the @@ -187,18 +181,18 @@ // However, when we invoke GCC below, we want it to use its normal // configuration. Hence, we must sanitize it's environment. // - char ** clean_env = copy_env (envp); + char ** clean_env = CopyEnv (envp); if (clean_env == NULL) { return 1; } - remove_env ("LIBRARY_PATH", clean_env); - remove_env ("COLLECT_GCC_OPTIONS", clean_env); - remove_env ("GCC_EXEC_PREFIX", clean_env); - remove_env ("COMPILER_PATH", clean_env); - remove_env ("COLLECT_GCC", clean_env); + RemoveEnv ("LIBRARY_PATH", clean_env); + RemoveEnv ("COLLECT_GCC_OPTIONS", clean_env); + RemoveEnv ("GCC_EXEC_PREFIX", clean_env); + RemoveEnv ("COMPILER_PATH", clean_env); + RemoveEnv ("COLLECT_GCC", clean_env); - const char * cmd[8 + Libraries.size()]; + std::vector cmd; // // Run GCC to assemble and link the program into native code. @@ -208,21 +202,44 @@ // and linker because we don't know where to put the _start symbol. // GCC mysteriously knows how to do it. // - unsigned int index=0; - cmd[index++] = gcc.c_str(); - cmd[index++] = "-o"; - cmd[index++] = OutputFilename.c_str(); - cmd[index++] = InputFilename.c_str(); - for (; (index - 4) < Libraries.size(); index++) + cmd.push_back (gcc.c_str()); + cmd.push_back ("-o"); + cmd.push_back (OutputFilename.c_str()); + cmd.push_back (InputFilename.c_str()); + + // + // JTC: + // Adding the library paths creates a problem for native generation. If we + // include the search paths from llvmgcc, then we'll be telling normal gcc + // to look inside of llvmgcc's library directories for libraries. This is + // bad because those libraries hold only bytecode files (not native object + // files). In the end, we attempt to link the bytecode libgcc into a native + // program. + // +#ifdef ndef + // + // Add in the library path options. + // + for (unsigned index=0; index < LibPaths.size(); index++) { - Libraries[index - 4] = "-l" + Libraries[index - 4]; - cmd[index] = Libraries[index-4].c_str(); + cmd.push_back ("-L"); + cmd.push_back (LibPaths[index].c_str()); } - cmd[index++] = NULL; - if ((ExecWait (cmd, clean_env)) == -1) +#endif + + // + // Add in the libraries to link. + // + std::vector Libs (Libraries); + for (unsigned index = 0; index < Libs.size(); index++) { - return 1; + Libs[index] = "-l" + Libs[index]; + cmd.push_back (Libs[index].c_str()); } + cmd.push_back (NULL); - return 0; + // + // Run the compiler to assembly and link together the program. + // + return (ExecWait (&(cmd[0]), clean_env)); } From lattner at cs.uiuc.edu Fri Sep 19 20:21:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Sep 19 20:21:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructureStats.cpp Message-ID: <200309200120.UAA30525@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: DataStructureStats.cpp updated: 1.3 -> 1.4 --- Log message: Keep track of the number of typed/untyped memory accesses theyre are in the program VS: ---------------------------------------------------------------------- --- Diffs of the changes: Index: llvm/lib/Analysis/DataStructure/DataStructureStats.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructureStats.cpp:1.3 llvm/lib/Analysis/DataStructure/DataStructureStats.cpp:1.4 --- llvm/lib/Analysis/DataStructure/DataStructureStats.cpp:1.3 Wed Feb 5 15:59:56 2003 +++ llvm/lib/Analysis/DataStructure/DataStructureStats.cpp Fri Sep 19 20:20:46 2003 @@ -1,4 +1,4 @@ -//===- DSGraphStats.cpp - Various statistics for DS Graphs -----*- C++ -*--===// +//===- DSGraphStats.cpp - Various statistics for DS Graphs ----------------===// // //===----------------------------------------------------------------------===// @@ -6,7 +6,9 @@ #include "llvm/Analysis/DSGraph.h" #include "llvm/Function.h" #include "llvm/iOther.h" +#include "llvm/iMemory.h" #include "llvm/Pass.h" +#include "llvm/Support/InstVisitor.h" #include "Support/Statistic.h" #include @@ -18,9 +20,19 @@ Statistic<> NumPoolNodes("numpools", "Number of allocation nodes that could be pool allocated"); - class DSGraphStats: public FunctionPass { - void countCallees(const Function& F, const DSGraph& tdGraph); + // Typed/Untyped memory accesses: If DSA can infer that the types the loads + // and stores are accessing are correct (ie, the node has not been collapsed), + // increment the appropriate counter. + Statistic<> NumTypedMemAccesses("numtypedmemaccesses", + "Number of loads/stores which are fully typed"); + Statistic<> NumUntypedMemAccesses("numuntypedmemaccesses", + "Number of loads/stores which are untyped"); + + class DSGraphStats : public FunctionPass, public InstVisitor { + void countCallees(const Function &F); + const DSGraph *TDGraph; + DSNode *getNodeForValue(Value *V); public: /// Driver functions to compute the Load/Store Dep. Graph per function. bool runOnFunction(Function& F); @@ -31,9 +43,11 @@ AU.addRequired(); } + void visitLoad(LoadInst &LI); + void visitStore(StoreInst &SI); + /// Debugging support methods void print(std::ostream &O) const { } - void dump() const; }; static RegisterAnalysis Z("dsstats", "DS Graph Statistics"); @@ -48,43 +62,61 @@ } -void DSGraphStats::countCallees(const Function& F, const DSGraph& tdGraph) { +void DSGraphStats::countCallees(const Function& F) { unsigned numIndirectCalls = 0, totalNumCallees = 0; - const std::vector& callSites = tdGraph.getFunctionCalls(); - for (unsigned i=0, N = callSites.size(); i < N; ++i) - if (isIndirectCallee(callSites[i].getCallInst().getCalledValue())) - { // This is an indirect function call - std::vector Callees = - callSites[i].getCalleeNode()->getGlobals(); - if (Callees.size() > 0) { - totalNumCallees += Callees.size(); - ++numIndirectCalls; - } -#ifndef NDEBUG - else - std::cerr << "WARNING: No callee in Function " << F.getName() - << "at call:\n" << callSites[i].getCallInst(); -#endif - } - + const std::vector &callSites = TDGraph->getFunctionCalls(); + for (unsigned i = 0, N = callSites.size(); i != N; ++i) + if (isIndirectCallee(callSites[i].getCallInst().getCalledValue())) { + // This is an indirect function call + const std::vector &Callees = + callSites[i].getCalleeNode()->getGlobals(); + if (Callees.size() > 0) { + totalNumCallees += Callees.size(); + ++numIndirectCalls; + } else + std::cerr << "WARNING: No callee in Function " << F.getName() + << "at call:\n" << callSites[i].getCallInst(); + } + TotalNumCallees += totalNumCallees; NumIndirectCalls += numIndirectCalls; - + if (numIndirectCalls) std::cout << " In function " << F.getName() << ": " << (totalNumCallees / (double) numIndirectCalls) << " average callees per indirect call\n"; } +DSNode *DSGraphStats::getNodeForValue(Value *V) { + const DSGraph *G = TDGraph; + if (isa(V)) + G = TDGraph->getGlobalsGraph(); -bool DSGraphStats::runOnFunction(Function& F) { - const DSGraph& tdGraph = getAnalysis().getDSGraph(F); - countCallees(F, tdGraph); - return true; + return G->getNodeForValue(V).getNode(); +} + +void DSGraphStats::visitLoad(LoadInst &LI) { + if (getNodeForValue(LI.getOperand(0))->isNodeCompletelyFolded()) { + NumUntypedMemAccesses++; + } else { + NumTypedMemAccesses++; + } +} + +void DSGraphStats::visitStore(StoreInst &SI) { + if (getNodeForValue(SI.getOperand(1))->isNodeCompletelyFolded()) { + NumUntypedMemAccesses++; + } else { + NumTypedMemAccesses++; + } } -void DSGraphStats::dump() const -{ - this->print(std::cerr); + + +bool DSGraphStats::runOnFunction(Function& F) { + TDGraph = &getAnalysis().getDSGraph(F); + countCallees(F); + visit(F); + return true; } From lattner at cs.uiuc.edu Fri Sep 19 20:24:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Sep 19 20:24:01 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/DSGraph.h Message-ID: <200309200123.UAA30564@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: DSGraph.h updated: 1.58 -> 1.59 --- Log message: Unsquishify --- Diffs of the changes: Index: llvm/include/llvm/Analysis/DSGraph.h diff -u llvm/include/llvm/Analysis/DSGraph.h:1.58 llvm/include/llvm/Analysis/DSGraph.h:1.59 --- llvm/include/llvm/Analysis/DSGraph.h:1.58 Tue Aug 5 13:38:16 2003 +++ llvm/include/llvm/Analysis/DSGraph.h Fri Sep 19 20:23:29 2003 @@ -100,7 +100,7 @@ /// function point to... /// ScalarMapTy &getScalarMap() { return ScalarMap; } - const ScalarMapTy &getScalarMap() const {return ScalarMap;} + const ScalarMapTy &getScalarMap() const { return ScalarMap; } /// getFunctionCalls - Return the list of call sites in the original local /// graph... From lattner at cs.uiuc.edu Fri Sep 19 21:44:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Sep 19 21:44:01 2003 Subject: [llvm-commits] CVS: llvm/tools/llvm-link/llvm-link.cpp Message-ID: <200309200243.VAA10525@apoc.cs.uiuc.edu> Changes in directory llvm/tools/llvm-link: llvm-link.cpp updated: 1.28 -> 1.29 --- Log message: Fix file header --- Diffs of the changes: Index: llvm/tools/llvm-link/llvm-link.cpp diff -u llvm/tools/llvm-link/llvm-link.cpp:1.28 llvm/tools/llvm-link/llvm-link.cpp:1.29 --- llvm/tools/llvm-link/llvm-link.cpp:1.28 Mon Sep 15 13:34:34 2003 +++ llvm/tools/llvm-link/llvm-link.cpp Fri Sep 19 21:42:54 2003 @@ -1,5 +1,4 @@ -//===----------------------------------------------------------------------===// -// LLVM 'LINK' UTILITY +//===- llvm-link.cpp - Low-level LLVM linker ------------------------------===// // // This utility may be invoked in the following manner: // llvm-link a.bc b.bc c.bc -o x.bc From lattner at cs.uiuc.edu Fri Sep 19 22:09:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Sep 19 22:09:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/BasicAA/2003-09-19-LocalArgument.ll Message-ID: <200309200308.WAA16064@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/BasicAA: 2003-09-19-LocalArgument.ll added (r1.1) --- Log message: New testcase that basicaa should be able to handle --- Diffs of the changes: Index: llvm/test/Regression/Transforms/BasicAA/2003-09-19-LocalArgument.ll diff -c /dev/null llvm/test/Regression/Transforms/BasicAA/2003-09-19-LocalArgument.ll:1.1 *** /dev/null Fri Sep 19 22:08:31 2003 --- llvm/test/Regression/Transforms/BasicAA/2003-09-19-LocalArgument.ll Fri Sep 19 22:08:21 2003 *************** *** 0 **** --- 1,12 ---- + ; In this test, a local alloca cannot alias an incoming argument. + + ; RUN: llvm-as < %s | opt -load-vn -gcse -instcombine | llvm-dis | not grep sub + + int %test(int* %P) { + %X = alloca int + %V1 = load int* %P + store int 0, int* %X + %V2 = load int* %P + %Diff = sub int %V1, %V2 + ret int %Diff + } From lattner at cs.uiuc.edu Fri Sep 19 22:09:09 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Sep 19 22:09:09 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/BasicAliasAnalysis.cpp Message-ID: <200309200308.WAA16246@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis: BasicAliasAnalysis.cpp updated: 1.13 -> 1.14 --- Log message: Fix bug: BasicAA/2003-09-19-LocalArgument.ll --- Diffs of the changes: Index: llvm/lib/Analysis/BasicAliasAnalysis.cpp diff -u llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.13 llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.14 --- llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.13 Thu Sep 11 13:12:02 2003 +++ llvm/lib/Analysis/BasicAliasAnalysis.cpp Fri Sep 19 22:08:47 2003 @@ -8,6 +8,7 @@ #include "llvm/Analysis/AliasAnalysis.h" #include "llvm/Pass.h" +#include "llvm/Argument.h" #include "llvm/iMemory.h" #include "llvm/iOther.h" #include "llvm/ConstantHandling.h" @@ -54,16 +55,20 @@ -// hasUniqueAddress - Return true if the +// hasUniqueAddress - Return true if the specified value points to something +// with a unique, discernable, address. static inline bool hasUniqueAddress(const Value *V) { - return isa(V) || isa(V) || isa(V); + return isa(V) || isa(V); } +// getUnderlyingObject - This traverses the use chain to figure out what object +// the specified value points to. If the value points to, or is derived from, a +// unique object or an argument, return it. static const Value *getUnderlyingObject(const Value *V) { if (!isa(V->getType())) return 0; // If we are at some type of object... return it. - if (hasUniqueAddress(V)) return V; + if (hasUniqueAddress(V) || isa(V)) return V; // Traverse through different addressing mechanisms... if (const Instruction *I = dyn_cast(V)) { @@ -112,16 +117,26 @@ // Pointing at a discernible object? if (O1 && O2) { - // If they are two different objects, we know that we have no alias... - if (O1 != O2) return NoAlias; + if (isa(O1)) { + // Incoming argument cannot alias locally allocated object! + if (isa(O2)) return NoAlias; + // Otherwise, nothing is known... + } else if (isa(O2)) { + // Incoming argument cannot alias locally allocated object! + if (isa(O1)) return NoAlias; + // Otherwise, nothing is known... + } else { + // If they are two different objects, we know that we have no alias... + if (O1 != O2) return NoAlias; + } // If they are the same object, they we can look at the indexes. If they // index off of the object is the same for both pointers, they must alias. // If they are provably different, they must not alias. Otherwise, we can't // tell anything. - } else if (O1 && isa(V2)) { + } else if (O1 && !isa(O1) && isa(V2)) { return NoAlias; // Unique values don't alias null - } else if (O2 && isa(V1)) { + } else if (O2 && !isa(O2) && isa(V1)) { return NoAlias; // Unique values don't alias null } From lattner at cs.uiuc.edu Fri Sep 19 22:35:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Sep 19 22:35:01 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Argument.h Message-ID: <200309200334.WAA02281@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm: Argument.h updated: 1.4 -> 1.5 --- Log message: Fix header, fix broken friend decl --- Diffs of the changes: Index: llvm/include/llvm/Argument.h diff -u llvm/include/llvm/Argument.h:1.4 llvm/include/llvm/Argument.h:1.5 --- llvm/include/llvm/Argument.h:1.4 Fri Sep 6 16:31:57 2002 +++ llvm/include/llvm/Argument.h Fri Sep 19 22:34:44 2003 @@ -1,6 +1,6 @@ -//===-- llvm/Argument.h - Definition of the Argument class -------*- C++ -*--=// +//===-- llvm/Argument.h - Definition of the Argument class ------*- C++ -*-===// // -// This file defines the Argument class, which represents and incoming formal +// This file defines the Argument class, which represents an incoming formal // argument to a Function. // //===----------------------------------------------------------------------===// @@ -16,7 +16,8 @@ Argument *Prev, *Next; // Next and Prev links for our intrusive linked list void setNext(Argument *N) { Next = N; } void setPrev(Argument *N) { Prev = N; } - friend class SymbolTableListTraits; + friend class SymbolTableListTraits >; void setParent(Function *parent); public: From lattner at cs.uiuc.edu Sat Sep 20 00:01:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Sep 20 00:01:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/TailCallElim/ Message-ID: <200309200500.AAA07040@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/TailCallElim: --- Log message: Directory /home/vadve/vadve/Research/DynOpt/CVSRepository/llvm/test/Regression/Transforms/TailCallElim added to the repository --- Diffs of the changes: From lattner at cs.uiuc.edu Sat Sep 20 00:04:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Sep 20 00:04:02 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/TailCallElim/ackermann.ll Message-ID: <200309200503.AAA07087@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/TailCallElim: ackermann.ll added (r1.1) --- Log message: New testcase --- Diffs of the changes: Index: llvm/test/Regression/Transforms/TailCallElim/ackermann.ll diff -c /dev/null llvm/test/Regression/Transforms/TailCallElim/ackermann.ll:1.1 *** /dev/null Sat Sep 20 00:03:04 2003 --- llvm/test/Regression/Transforms/TailCallElim/ackermann.ll Sat Sep 20 00:02:54 2003 *************** *** 0 **** --- 1,29 ---- + ; This function contains two tail calls, which should be eliminated + ; RUN: llvm-as < %s | opt -tailcallelim -stats -disable-output 2>&1 | grep '2 tailcallelim' + + int %Ack(int %M.1, int %N.1) { + entry: + %tmp.1 = seteq int %M.1, 0 ; [#uses=1] + br bool %tmp.1, label %then.0, label %endif.0 + + then.0: + %tmp.4 = add int %N.1, 1 ; [#uses=1] + ret int %tmp.4 + + endif.0: + %tmp.6 = seteq int %N.1, 0 ; [#uses=1] + br bool %tmp.6, label %then.1, label %endif.1 + + then.1: + %tmp.10 = add int %M.1, -1 ; [#uses=1] + %tmp.8 = call int %Ack( int %tmp.10, int 1 ) ; [#uses=1] + ret int %tmp.8 + + endif.1: + %tmp.13 = add int %M.1, -1 ; [#uses=1] + %tmp.17 = add int %N.1, -1 ; [#uses=1] + %tmp.14 = call int %Ack( int %M.1, int %tmp.17 ) ; [#uses=1] + %tmp.11 = call int %Ack( int %tmp.13, int %tmp.14 ) ; [#uses=1] + ret int %tmp.11 + } + From lattner at cs.uiuc.edu Sat Sep 20 00:04:13 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Sep 20 00:04:13 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp Message-ID: <200309200503.AAA07102@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: TailRecursionElimination.cpp added (r1.1) --- Log message: New transformation: tail recursion elimination --- Diffs of the changes: Index: llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp diff -c /dev/null llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:1.1 *** /dev/null Sat Sep 20 00:03:41 2003 --- llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp Sat Sep 20 00:03:31 2003 *************** *** 0 **** --- 1,96 ---- + //===- TailRecursionElimination.cpp - Eliminate Tail Calls ----------------===// + // + // This file implements tail recursion elimination. + // + // Caveats: The algorithm implemented is trivially simple. There are several + // improvements that could be made: + // + // 1. If the function has any alloca instructions, these instructions will not + // remain in the entry block of the function. Doing this requires analysis + // to prove that the alloca is not reachable by the recursively invoked + // function call. + // 2. Tail recursion is only performed if the call immediately preceeds the + // return instruction. Would it be useful to generalize this somehow? + // 3. TRE is only performed if the function returns void or if the return + // returns the result returned by the call. It is possible, but unlikely, + // that the return returns something else (like constant 0), and can still + // be TRE'd. It can be TRE'd if ALL OTHER return instructions in the + // function return the exact same value. + // + //===----------------------------------------------------------------------===// + + #include "llvm/DerivedTypes.h" + #include "llvm/Function.h" + #include "llvm/Instructions.h" + #include "llvm/Pass.h" + #include "Support/Statistic.h" + + namespace { + Statistic<> NumEliminated("tailcallelim", "Number of tail calls removed"); + + struct TailCallElim : public FunctionPass { + virtual bool runOnFunction(Function &F); + }; + RegisterOpt X("tailcallelim", "Tail Call Elimination"); + } + + + bool TailCallElim::runOnFunction(Function &F) { + // If this function is a varargs function, we won't be able to PHI the args + // right, so don't even try to convert it... + if (F.getFunctionType()->isVarArg()) return false; + + BasicBlock *OldEntry = 0; + std::vector ArgumentPHIs; + bool MadeChange = false; + + // Loop over the function, looking for any returning blocks... + for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) + if (ReturnInst *Ret = dyn_cast(BB->getTerminator())) + if (Ret != BB->begin()) + if (CallInst *CI = dyn_cast(Ret->getPrev())) + // Make sure the tail call is to the current function, and that the + // return either returns void or returns the value computed by the + // call. + if (CI->getCalledFunction() == &F && + (Ret->getNumOperands() == 0 || Ret->getReturnValue() == CI)) { + // Ohh, it looks like we found a tail call, is this the first? + if (!OldEntry) { + // Ok, so this is the first tail call we have found in this + // function. Insert a new entry block into the function, allowing + // us to branch back to the old entry block. + OldEntry = &F.getEntryNode(); + BasicBlock *NewEntry = new BasicBlock("tailrecurse", OldEntry); + NewEntry->getInstList().push_back(new BranchInst(OldEntry)); + + // Now that we have created a new block, which jumps to the entry + // block, insert a PHI node for each argument of the function. + // For now, we initialize each PHI to only have the real arguments + // which are passed in. + Instruction *InsertPos = OldEntry->begin(); + for (Function::aiterator I = F.abegin(), E = F.aend(); I!=E; ++I){ + PHINode *PN = new PHINode(I->getType(), I->getName()+".tr", + InsertPos); + PN->addIncoming(I, NewEntry); + ArgumentPHIs.push_back(PN); + } + } + + // Ok, now that we know we have a pseudo-entry block WITH all of the + // required PHI nodes, add entries into the PHI node for the actual + // parameters passed into the tail-recursive call. + for (unsigned i = 0, e = CI->getNumOperands()-1; i != e; ++i) + ArgumentPHIs[i]->addIncoming(CI->getOperand(i+1), BB); + + // Now that all of the PHI nodes are in place, remove the call and + // ret instructions, replacing them with an unconditional branch. + new BranchInst(OldEntry, CI); + BB->getInstList().pop_back(); // Remove return. + BB->getInstList().pop_back(); // Remove call. + MadeChange = true; + NumEliminated++; + } + + return MadeChange; + } + From lattner at cs.uiuc.edu Sat Sep 20 00:15:03 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Sep 20 00:15:03 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Transforms/Scalar.h Message-ID: <200309200514.AAA11010@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Transforms: Scalar.h updated: 1.23 -> 1.24 --- Log message: Expose the TCE pass --- Diffs of the changes: Index: llvm/include/llvm/Transforms/Scalar.h diff -u llvm/include/llvm/Transforms/Scalar.h:1.23 llvm/include/llvm/Transforms/Scalar.h:1.24 --- llvm/include/llvm/Transforms/Scalar.h:1.23 Wed Sep 10 00:27:53 2003 +++ llvm/include/llvm/Transforms/Scalar.h Sat Sep 20 00:14:01 2003 @@ -241,6 +241,13 @@ Pass *createLoopPreheaderInsertionPass(); extern const PassInfo *LoopPreheadersID; +//===----------------------------------------------------------------------===// +// +// This pass eliminates call instructions to the current function which occur +// immediately before return instructions. +// +FunctionPass *createTailCallEliminationPass(); + //===----------------------------------------------------------------------===// // This pass convert malloc and free instructions to %malloc & %free function From lattner at cs.uiuc.edu Sat Sep 20 00:15:13 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Sep 20 00:15:13 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp Message-ID: <200309200514.AAA11019@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: TailRecursionElimination.cpp updated: 1.1 -> 1.2 --- Log message: Expose the TCE pass --- Diffs of the changes: Index: llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp diff -u llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:1.1 llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:1.2 --- llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:1.1 Sat Sep 20 00:03:31 2003 +++ llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp Sat Sep 20 00:14:13 2003 @@ -19,6 +19,7 @@ // //===----------------------------------------------------------------------===// +#include "llvm/Transforms/Scalar.h" #include "llvm/DerivedTypes.h" #include "llvm/Function.h" #include "llvm/Instructions.h" @@ -33,6 +34,8 @@ }; RegisterOpt X("tailcallelim", "Tail Call Elimination"); } + +FunctionPass *createTailCallEliminationPass() { return new TailCallElim(); } bool TailCallElim::runOnFunction(Function &F) { From lattner at cs.uiuc.edu Sat Sep 20 00:25:03 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Sep 20 00:25:03 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp Message-ID: <200309200524.AAA20284@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: TailRecursionElimination.cpp updated: 1.2 -> 1.3 --- Log message: Fix a really obvious huge gaping bug, add a comment --- Diffs of the changes: Index: llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp diff -u llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:1.2 llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:1.3 --- llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:1.2 Sat Sep 20 00:14:13 2003 +++ llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp Sat Sep 20 00:24:00 2003 @@ -50,7 +50,7 @@ // Loop over the function, looking for any returning blocks... for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) if (ReturnInst *Ret = dyn_cast(BB->getTerminator())) - if (Ret != BB->begin()) + if (Ret != BB->begin()) // Make sure there is something before the ret... if (CallInst *CI = dyn_cast(Ret->getPrev())) // Make sure the tail call is to the current function, and that the // return either returns void or returns the value computed by the @@ -74,6 +74,7 @@ for (Function::aiterator I = F.abegin(), E = F.aend(); I!=E; ++I){ PHINode *PN = new PHINode(I->getType(), I->getName()+".tr", InsertPos); + I->replaceAllUsesWith(PN); // Everyone use the PHI node now! PN->addIncoming(I, NewEntry); ArgumentPHIs.push_back(PN); } From lattner at cs.uiuc.edu Sat Sep 20 00:27:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Sep 20 00:27:01 2003 Subject: [llvm-commits] CVS: llvm/tools/gccas/gccas.cpp Message-ID: <200309200526.AAA20555@apoc.cs.uiuc.edu> Changes in directory llvm/tools/gccas: gccas.cpp updated: 1.74 -> 1.75 --- Log message: Now that the TCE pass passes all of the tests, add it to GCCAS --- Diffs of the changes: Index: llvm/tools/gccas/gccas.cpp diff -u llvm/tools/gccas/gccas.cpp:1.74 llvm/tools/gccas/gccas.cpp:1.75 --- llvm/tools/gccas/gccas.cpp:1.74 Sun Sep 14 23:56:44 2003 +++ llvm/tools/gccas/gccas.cpp Sat Sep 20 00:26:22 2003 @@ -57,8 +57,8 @@ addPass(PM, createTailDuplicationPass()); // Simplify cfg by copying code addPass(PM, createCFGSimplificationPass()); // Merge & remove BBs addPass(PM, createScalarReplAggregatesPass()); // Break up aggregate allocas + addPass(PM, createTailCallEliminationPass()); // Eliminate tail calls addPass(PM, createInstructionCombiningPass()); // Combine silly seq's - addPass(PM, createReassociatePass()); // Reassociate expressions addPass(PM, createInstructionCombiningPass()); // Combine silly seq's From lattner at cs.uiuc.edu Sat Sep 20 09:36:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Sep 20 09:36:01 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Transforms/Utils/DemoteRegToStack.h Message-ID: <200309201435.JAA05129@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Transforms/Utils: DemoteRegToStack.h updated: 1.1 -> 1.2 --- Log message: Cleanup header file --- Diffs of the changes: Index: llvm/include/llvm/Transforms/Utils/DemoteRegToStack.h diff -u llvm/include/llvm/Transforms/Utils/DemoteRegToStack.h:1.1 llvm/include/llvm/Transforms/Utils/DemoteRegToStack.h:1.2 --- llvm/include/llvm/Transforms/Utils/DemoteRegToStack.h:1.1 Tue Dec 10 07:07:12 2002 +++ llvm/include/llvm/Transforms/Utils/DemoteRegToStack.h Sat Sep 20 09:35:38 2003 @@ -1,4 +1,5 @@ //===- DemoteRegToStack.h - Move a virtual reg. to stack --------*- C++ -*-===// +// // This file provides the function: // AllocaInst* DemoteRegToStack(Instruction& X): // @@ -13,9 +14,10 @@ // (4) Delete X and all the Phis, which should all now be dead. // // Returns the pointer to the alloca inserted to create a stack slot for X. -//---------------------------------------------------------------------------- +// +//===----------------------------------------------------------------------===// class Instruction; class AllocaInst; -extern AllocaInst* DemoteRegToStack(Instruction& X); +AllocaInst *DemoteRegToStack(Instruction &X); From lattner at cs.uiuc.edu Sat Sep 20 09:37:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Sep 20 09:37:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Utils/DemoteRegToStack.cpp Message-ID: <200309201436.JAA06654@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Utils: DemoteRegToStack.cpp updated: 1.2 -> 1.3 --- Log message: Minor cleanups, no functional changes Rename Function::getEntryNode -> getEntryBlock --- Diffs of the changes: Index: llvm/lib/Transforms/Utils/DemoteRegToStack.cpp diff -u llvm/lib/Transforms/Utils/DemoteRegToStack.cpp:1.2 llvm/lib/Transforms/Utils/DemoteRegToStack.cpp:1.3 --- llvm/lib/Transforms/Utils/DemoteRegToStack.cpp:1.2 Thu May 29 10:12:27 2003 +++ llvm/lib/Transforms/Utils/DemoteRegToStack.cpp Sat Sep 20 09:36:23 2003 @@ -1,4 +1,4 @@ -//===- DemoteRegToStack.cpp - Move a virtual reg. to stack ------*- C++ -*-===// +//===- DemoteRegToStack.cpp - Move a virtual reg. to stack ----------------===// // // This file provide the function DemoteRegToStack(). This function takes a // virtual register computed by an Instruction& X and replaces it with a slot in @@ -16,11 +16,6 @@ #include "Support/hash_set" #include -//---------------------------------------------------------------------------- -// function DemoteRegToStack() -// -//---------------------------------------------------------------------------- - typedef hash_set PhiSet; typedef hash_set::iterator PhiSetIterator; @@ -36,41 +31,37 @@ workList.push(opI); } -void FindPhis(Instruction& X, PhiSet& phisToGo) -{ +static void FindPhis(Instruction& X, PhiSet& phisToGo) { std::stack workList; workList.push(&X); // Handle the case that X itself is a Phi! - if (PHINode* phiX = dyn_cast(&X)) - { - phisToGo.insert(phiX); - PushOperandsOnWorkList(workList, phisToGo, phiX); - } + if (PHINode* phiX = dyn_cast(&X)) { + phisToGo.insert(phiX); + PushOperandsOnWorkList(workList, phisToGo, phiX); + } // Now use a worklist to find all phis reachable from X, and // (recursively) all phis reachable from operands of such phis. - for (Instruction* workI; !workList.empty(); workList.pop()) - { - workI = workList.top(); - for (Value::use_iterator UI=workI->use_begin(), UE=workI->use_end(); - UI != UE; ++UI) - if (PHINode* phiN = dyn_cast(*UI)) - if (phisToGo.find(phiN) == phisToGo.end()) - { // Seeing this phi for the first time: it must go! - phisToGo.insert(phiN); - workList.push(phiN); - PushOperandsOnWorkList(workList, phisToGo, phiN); - } - } + for (Instruction* workI; !workList.empty(); workList.pop()) { + workI = workList.top(); + for (Value::use_iterator UI=workI->use_begin(), UE=workI->use_end(); + UI != UE; ++UI) + if (PHINode* phiN = dyn_cast(*UI)) + if (phisToGo.find(phiN) == phisToGo.end()) { + // Seeing this phi for the first time: it must go! + phisToGo.insert(phiN); + workList.push(phiN); + PushOperandsOnWorkList(workList, phisToGo, phiN); + } + } } // Create the Alloca for X -AllocaInst* CreateAllocaForX(Instruction& X) -{ +static AllocaInst* CreateAllocaForX(Instruction& X) { Function* parentFunc = X.getParent()->getParent(); - Instruction* entryInst = parentFunc->getEntryNode().begin(); + Instruction* entryInst = parentFunc->getEntryBlock().begin(); return new AllocaInst(X.getType(), /*arraySize*/ NULL, X.hasName()? X.getName()+std::string("OnStack") : "DemotedTmp", @@ -79,72 +70,63 @@ // Insert loads before all uses of I, except uses in Phis // since all such Phis *must* be deleted. -void LoadBeforeUses(Instruction* def, AllocaInst* XSlot) -{ - for (unsigned nPhis = 0; def->use_size() - nPhis > 0; ) - { +static void LoadBeforeUses(Instruction* def, AllocaInst* XSlot) { + for (unsigned nPhis = 0; def->use_size() - nPhis > 0; ) { Instruction* useI = cast(def->use_back()); - if (!isa(useI)) - { - LoadInst* loadI = - new LoadInst(XSlot, std::string("Load")+XSlot->getName(), useI); - useI->replaceUsesOfWith(def, loadI); - } - else + if (!isa(useI)) { + LoadInst* loadI = + new LoadInst(XSlot, std::string("Load")+XSlot->getName(), useI); + useI->replaceUsesOfWith(def, loadI); + } else ++nPhis; - } + } } -void AddLoadsAndStores(AllocaInst* XSlot, Instruction& X, PhiSet& phisToGo) -{ - for (PhiSetIterator PI=phisToGo.begin(), PE=phisToGo.end(); PI != PE; ++PI) - { - PHINode* pn = *PI; - - // First, insert loads before all uses except uses in Phis. - // Do this first because new stores will appear as uses also! - LoadBeforeUses(pn, XSlot); - - // For every incoming operand of the Phi, insert a store either - // just after the instruction defining the value or just before the - // predecessor of the Phi if the value is a formal, not an instruction. - // - for (unsigned i=0, N=pn->getNumIncomingValues(); i < N; ++i) - { - Value* phiOp = pn->getIncomingValue(i); - if (phiOp != &X && - (!isa(phiOp) || - phisToGo.find(cast(phiOp)) == phisToGo.end())) - { // This operand is not a phi that will be deleted: need to store. - assert(!isa(phiOp)); - - Instruction* storeBefore; - if (Instruction* I = dyn_cast(phiOp)) - { // phiOp is an instruction, store its result right after it. - assert(I->getNext() && "Non-terminator without successor?"); - storeBefore = I->getNext(); - } - else - { // If not, it must be a formal: store it at the end of the - // predecessor block of the Phi (*not* at function entry!). - storeBefore = pn->getIncomingBlock(i)->getTerminator(); - } - - // Create instr. to store the value of phiOp before `insertBefore' - StoreInst* storeI = new StoreInst(phiOp, XSlot, storeBefore); - } +static void AddLoadsAndStores(AllocaInst* XSlot, Instruction& X, + PhiSet& phisToGo) { + for (PhiSetIterator PI=phisToGo.begin(), PE=phisToGo.end(); PI != PE; ++PI) { + PHINode* pn = *PI; + + // First, insert loads before all uses except uses in Phis. + // Do this first because new stores will appear as uses also! + LoadBeforeUses(pn, XSlot); + + // For every incoming operand of the Phi, insert a store either + // just after the instruction defining the value or just before the + // predecessor of the Phi if the value is a formal, not an instruction. + // + for (unsigned i=0, N=pn->getNumIncomingValues(); i < N; ++i) { + Value* phiOp = pn->getIncomingValue(i); + if (phiOp != &X && + (!isa(phiOp) || + phisToGo.find(cast(phiOp)) == phisToGo.end())) { + // This operand is not a phi that will be deleted: need to store. + assert(!isa(phiOp)); + + Instruction* storeBefore; + if (Instruction* I = dyn_cast(phiOp)) { + // phiOp is an instruction, store its result right after it. + assert(I->getNext() && "Non-terminator without successor?"); + storeBefore = I->getNext(); + } else { + // If not, it must be a formal: store it at the end of the + // predecessor block of the Phi (*not* at function entry!). + storeBefore = pn->getIncomingBlock(i)->getTerminator(); } + + // Create instr. to store the value of phiOp before `insertBefore' + StoreInst* storeI = new StoreInst(phiOp, XSlot, storeBefore); + } } + } } -void DeletePhis(PhiSet& phisToGo) -{ - for (PhiSetIterator PI=phisToGo.begin(), PE=phisToGo.end(); PI != PE; ++PI) - { - assert((*PI)->use_size() == 0 && "This PHI should be DEAD!"); - (*PI)->getParent()->getInstList().remove(*PI); - delete *PI; - } +static void DeletePhis(PhiSet& phisToGo) { + for (PhiSetIterator PI=phisToGo.begin(), PE=phisToGo.end(); PI != PE; ++PI) { + assert((*PI)->use_size() == 0 && "This PHI should be DEAD!"); + (*PI)->getParent()->getInstList().remove(*PI); + delete *PI; + } phisToGo.clear(); } @@ -164,8 +146,7 @@ // Returns the pointer to the alloca inserted to create a stack slot for X. //---------------------------------------------------------------------------- -AllocaInst* DemoteRegToStack(Instruction& X) -{ +AllocaInst* DemoteRegToStack(Instruction& X) { if (X.getType() == Type::VoidTy) return NULL; // nothing to do! From lattner at cs.uiuc.edu Sat Sep 20 09:37:09 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Sep 20 09:37:09 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Function.h Message-ID: <200309201436.JAA08035@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm: Function.h updated: 1.44 -> 1.45 --- Log message: Rename getEntryNode -> getEntryBlock() --- Diffs of the changes: Index: llvm/include/llvm/Function.h diff -u llvm/include/llvm/Function.h:1.44 llvm/include/llvm/Function.h:1.45 --- llvm/include/llvm/Function.h:1.44 Tue Sep 16 23:58:43 2003 +++ llvm/include/llvm/Function.h Sat Sep 20 09:36:49 2003 @@ -122,8 +122,8 @@ const BasicBlockListType &getBasicBlockList() const { return BasicBlocks; } BasicBlockListType &getBasicBlockList() { return BasicBlocks; } - const BasicBlock &getEntryNode() const { return front(); } - BasicBlock &getEntryNode() { return front(); } + const BasicBlock &getEntryBlock() const { return front(); } + BasicBlock &getEntryBlock() { return front(); } //===--------------------------------------------------------------------===// // Symbol Table Accessing functions... From lattner at cs.uiuc.edu Sat Sep 20 09:39:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Sep 20 09:39:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/IPO/LowerSetJmp.cpp Message-ID: <200309201438.JAA11233@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/IPO: LowerSetJmp.cpp updated: 1.2 -> 1.3 --- Log message: Rename Function::getEntryNode -> getEntryBlock --- Diffs of the changes: Index: llvm/lib/Transforms/IPO/LowerSetJmp.cpp diff -u llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.2 llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.3 --- llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.2 Mon Sep 15 00:43:05 2003 +++ llvm/lib/Transforms/IPO/LowerSetJmp.cpp Sat Sep 20 09:38:44 2003 @@ -268,7 +268,7 @@ // Insert the setjmp map initialization before the first instruction in // the function. - Instruction* Inst = Func->getEntryNode().begin(); + Instruction* Inst = Func->getEntryBlock().begin(); assert(Inst && "Couldn't find even ONE instruction in entry block!"); // Fill in the alloca and call to initialize the SJ map. From lattner at cs.uiuc.edu Sat Sep 20 09:39:09 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Sep 20 09:39:09 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Instrumentation/TraceValues.cpp Message-ID: <200309201438.JAA11439@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Instrumentation: TraceValues.cpp updated: 1.59 -> 1.60 --- Log message: Rename Function::getEntryNode -> getEntryBlock --- Diffs of the changes: Index: llvm/lib/Transforms/Instrumentation/TraceValues.cpp diff -u llvm/lib/Transforms/Instrumentation/TraceValues.cpp:1.59 llvm/lib/Transforms/Instrumentation/TraceValues.cpp:1.60 --- llvm/lib/Transforms/Instrumentation/TraceValues.cpp:1.59 Sat Aug 30 19:20:36 2003 +++ llvm/lib/Transforms/Instrumentation/TraceValues.cpp Sat Sep 20 09:38:48 2003 @@ -348,7 +348,7 @@ static inline void InsertCodeToShowFunctionEntry(Function &F, Function *Printf, Function* HashPtrToSeqNum){ // Get an iterator to point to the insertion location - BasicBlock &BB = F.getEntryNode(); + BasicBlock &BB = F.getEntryBlock(); Instruction *InsertPos = BB.begin(); std::ostringstream OutStr; @@ -398,7 +398,7 @@ // Push a pointer set for recording alloca'd pointers at entry. if (!DisablePtrHashing) new CallInst(externalFuncs.PushOnEntryFunc, vector(), "", - F.getEntryNode().begin()); + F.getEntryBlock().begin()); for (Function::iterator BB = F.begin(); BB != F.end(); ++BB) { if (isa(BB->getTerminator())) From lattner at cs.uiuc.edu Sat Sep 20 09:39:16 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Sep 20 09:39:16 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp Message-ID: <200309201438.JAA11445@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Instrumentation/ProfilePaths: ProfilePaths.cpp updated: 1.31 -> 1.32 --- Log message: Rename Function::getEntryNode -> getEntryBlock --- Diffs of the changes: Index: llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp diff -u llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp:1.31 llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp:1.32 --- llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp:1.31 Wed Sep 10 15:35:33 2003 +++ llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp Sat Sep 20 09:38:49 2003 @@ -228,7 +228,7 @@ // insert initialization code in first (entry) BB // this includes initializing r and count - insertInTopBB(&F.getEntryNode(),numPaths, rVar, threshold); + insertInTopBB(&F.getEntryBlock(), numPaths, rVar, threshold); //now process the graph: get path numbers, //get increments along different paths, From lattner at cs.uiuc.edu Sat Sep 20 09:40:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Sep 20 09:40:01 2003 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Dominators.cpp Verifier.cpp Message-ID: <200309201439.JAA11665@apoc.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Dominators.cpp updated: 1.48 -> 1.49 Verifier.cpp updated: 1.60 -> 1.61 --- Log message: Rename Function::getEntryNode -> getEntryBlock --- Diffs of the changes: Index: llvm/lib/VMCore/Dominators.cpp diff -u llvm/lib/VMCore/Dominators.cpp:1.48 llvm/lib/VMCore/Dominators.cpp:1.49 --- llvm/lib/VMCore/Dominators.cpp:1.48 Thu Sep 11 11:26:13 2003 +++ llvm/lib/VMCore/Dominators.cpp Sat Sep 20 09:39:07 2003 @@ -87,7 +87,7 @@ // specified function. // bool DominatorSet::runOnFunction(Function &F) { - BasicBlock *Root = &F.getEntryNode(); + BasicBlock *Root = &F.getEntryBlock(); Roots.clear(); Roots.push_back(Root); assert(pred_begin(Root) == pred_end(Root) && Index: llvm/lib/VMCore/Verifier.cpp diff -u llvm/lib/VMCore/Verifier.cpp:1.60 llvm/lib/VMCore/Verifier.cpp:1.61 --- llvm/lib/VMCore/Verifier.cpp:1.60 Wed Sep 10 14:37:01 2003 +++ llvm/lib/VMCore/Verifier.cpp Sat Sep 20 09:39:07 2003 @@ -228,7 +228,7 @@ verifySymbolTable(F.getSymbolTable()); // Check the entry node - BasicBlock *Entry = &F.getEntryNode(); + BasicBlock *Entry = &F.getEntryBlock(); Assert1(pred_begin(Entry) == pred_end(Entry), "Entry block to function must not have predecessors!", Entry); } @@ -482,7 +482,7 @@ // Use must be dominated by by definition unless use is unreachable! Assert2(DS->dominates(BB, Pred) || - !DS->dominates(&BB->getParent()->getEntryNode(), Pred), + !DS->dominates(&BB->getParent()->getEntryBlock(), Pred), "Instruction does not dominate all uses!", &I, PN); } @@ -490,7 +490,8 @@ } else { // Use must be dominated by by definition unless use is unreachable! Assert2(DS->dominates(&I, Use) || - !DS->dominates(&BB->getParent()->getEntryNode(),Use->getParent()), + !DS->dominates(&BB->getParent()->getEntryBlock(), + Use->getParent()), "Instruction does not dominate all uses!", &I, Use); } } From lattner at cs.uiuc.edu Sat Sep 20 09:40:09 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Sep 20 09:40:09 2003 Subject: [llvm-commits] CVS: llvm/lib/CWriter/Writer.cpp Message-ID: <200309201439.JAA11654@apoc.cs.uiuc.edu> Changes in directory llvm/lib/CWriter: Writer.cpp updated: 1.126 -> 1.127 --- Log message: Rename Function::getEntryNode -> getEntryBlock --- Diffs of the changes: Index: llvm/lib/CWriter/Writer.cpp diff -u llvm/lib/CWriter/Writer.cpp:1.126 llvm/lib/CWriter/Writer.cpp:1.127 --- llvm/lib/CWriter/Writer.cpp:1.126 Mon Sep 15 11:47:12 2003 +++ llvm/lib/CWriter/Writer.cpp Sat Sep 20 09:39:05 2003 @@ -105,7 +105,7 @@ if (!AI) return false; if (AI->isArrayAllocation()) return 0; // FIXME: we can also inline fixed size array allocas! - if (AI->getParent() != &AI->getParent()->getParent()->getEntryNode()) + if (AI->getParent() != &AI->getParent()->getParent()->getEntryBlock()) return 0; return AI; } From lattner at cs.uiuc.edu Sat Sep 20 09:40:16 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Sep 20 09:40:16 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Support/CFG.h Message-ID: <200309201439.JAA11677@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Support: CFG.h updated: 1.12 -> 1.13 --- Log message: Rename Function::getEntryNode -> getEntryBlock --- Diffs of the changes: Index: llvm/include/llvm/Support/CFG.h diff -u llvm/include/llvm/Support/CFG.h:1.12 llvm/include/llvm/Support/CFG.h:1.13 --- llvm/include/llvm/Support/CFG.h:1.12 Sat Jun 21 22:07:01 2003 +++ llvm/include/llvm/Support/CFG.h Sat Sep 20 09:39:18 2003 @@ -217,7 +217,7 @@ // except that the root node is implicitly the first node of the function. // template <> struct GraphTraits : public GraphTraits { - static NodeType *getEntryNode(Function *F) { return &F->getEntryNode(); } + static NodeType *getEntryNode(Function *F) { return &F->getEntryBlock(); } // nodes_iterator/begin/end - Allow iteration over all nodes in the graph typedef Function::iterator nodes_iterator; @@ -226,7 +226,7 @@ }; template <> struct GraphTraits : public GraphTraits { - static NodeType *getEntryNode(const Function *F) { return &F->getEntryNode();} + static NodeType *getEntryNode(const Function *F) {return &F->getEntryBlock();} // nodes_iterator/begin/end - Allow iteration over all nodes in the graph typedef Function::const_iterator nodes_iterator; @@ -243,13 +243,13 @@ template <> struct GraphTraits > : public GraphTraits > { static NodeType *getEntryNode(Inverse G) { - return &G.Graph->getEntryNode(); + return &G.Graph->getEntryBlock(); } }; template <> struct GraphTraits > : public GraphTraits > { static NodeType *getEntryNode(Inverse G) { - return &G.Graph->getEntryNode(); + return &G.Graph->getEntryBlock(); } }; From lattner at cs.uiuc.edu Sat Sep 20 09:40:24 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Sep 20 09:40:24 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/ADCE.cpp CorrelatedExprs.cpp Mem2Reg.cpp ScalarReplAggregates.cpp TailRecursionElimination.cpp Message-ID: <200309201439.JAA11639@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: ADCE.cpp updated: 1.61 -> 1.62 CorrelatedExprs.cpp updated: 1.13 -> 1.14 Mem2Reg.cpp updated: 1.4 -> 1.5 ScalarReplAggregates.cpp updated: 1.13 -> 1.14 TailRecursionElimination.cpp updated: 1.3 -> 1.4 --- Log message: Rename Function::getEntryNode -> getEntryBlock --- Diffs of the changes: Index: llvm/lib/Transforms/Scalar/ADCE.cpp diff -u llvm/lib/Transforms/Scalar/ADCE.cpp:1.61 llvm/lib/Transforms/Scalar/ADCE.cpp:1.62 --- llvm/lib/Transforms/Scalar/ADCE.cpp:1.61 Thu Sep 11 11:26:10 2003 +++ llvm/lib/Transforms/Scalar/ADCE.cpp Sat Sep 20 09:38:50 2003 @@ -195,7 +195,7 @@ // transformations safely. // PostDominatorTree &DT = getAnalysis(); - if (DT[&Func->getEntryNode()] == 0) { + if (DT[&Func->getEntryBlock()] == 0) { WorkList.clear(); return MadeChanges; } Index: llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp diff -u llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.13 llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.14 --- llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.13 Thu Sep 11 11:26:10 2003 +++ llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp Sat Sep 20 09:38:50 2003 @@ -291,7 +291,7 @@ DT = &getAnalysis(); std::set VisitedBlocks; - bool Changed = TransformRegion(&F.getEntryNode(), VisitedBlocks); + bool Changed = TransformRegion(&F.getEntryBlock(), VisitedBlocks); RegionInfoMap.clear(); RankMap.clear(); Index: llvm/lib/Transforms/Scalar/Mem2Reg.cpp diff -u llvm/lib/Transforms/Scalar/Mem2Reg.cpp:1.4 llvm/lib/Transforms/Scalar/Mem2Reg.cpp:1.5 --- llvm/lib/Transforms/Scalar/Mem2Reg.cpp:1.4 Wed Jun 25 09:58:56 2003 +++ llvm/lib/Transforms/Scalar/Mem2Reg.cpp Sat Sep 20 09:38:50 2003 @@ -38,7 +38,7 @@ std::vector Allocas; const TargetData &TD = getAnalysis(); - BasicBlock &BB = F.getEntryNode(); // Get the entry node for the function + BasicBlock &BB = F.getEntryBlock(); // Get the entry node for the function bool Changed = false; Index: llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp diff -u llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp:1.13 llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp:1.14 --- llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp:1.13 Fri Sep 12 11:02:12 2003 +++ llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp Sat Sep 20 09:38:50 2003 @@ -75,7 +75,7 @@ std::vector Allocas; const TargetData &TD = getAnalysis(); - BasicBlock &BB = F.getEntryNode(); // Get the entry node for the function + BasicBlock &BB = F.getEntryBlock(); // Get the entry node for the function bool Changed = false; @@ -108,7 +108,7 @@ std::vector WorkList; // Scan the entry basic block, adding any alloca's and mallocs to the worklist - BasicBlock &BB = F.getEntryNode(); + BasicBlock &BB = F.getEntryBlock(); for (BasicBlock::iterator I = BB.begin(), E = BB.end(); I != E; ++I) if (AllocationInst *A = dyn_cast(I)) WorkList.push_back(A); Index: llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp diff -u llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:1.3 llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:1.4 --- llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:1.3 Sat Sep 20 00:24:00 2003 +++ llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp Sat Sep 20 09:38:50 2003 @@ -62,7 +62,7 @@ // Ok, so this is the first tail call we have found in this // function. Insert a new entry block into the function, allowing // us to branch back to the old entry block. - OldEntry = &F.getEntryNode(); + OldEntry = &F.getEntryBlock(); BasicBlock *NewEntry = new BasicBlock("tailrecurse", OldEntry); NewEntry->getInstList().push_back(new BranchInst(OldEntry)); From lattner at cs.uiuc.edu Sat Sep 20 09:44:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Sep 20 09:44:01 2003 Subject: [llvm-commits] CVS: llvm/www/docs/ProgrammersManual.html Message-ID: <200309201443.JAA10962@tank.cs.uiuc.edu> Changes in directory llvm/www/docs: ProgrammersManual.html updated: 1.46 -> 1.47 --- Log message: update dox --- Diffs of the changes: Index: llvm/www/docs/ProgrammersManual.html diff -u llvm/www/docs/ProgrammersManual.html:1.46 llvm/www/docs/ProgrammersManual.html:1.47 --- llvm/www/docs/ProgrammersManual.html:1.46 Wed Sep 10 00:29:43 2003 +++ llvm/www/docs/ProgrammersManual.html Sat Sep 20 09:43:16 2003 @@ -1472,7 +1472,7 @@ -

  • BasicBlock &getEntryNode()

    +

  • BasicBlock &getEntryBlock()

    Returns the entry BasicBlock for the function. Because the entry block for the function is always the first block, @@ -1789,6 +1789,6 @@ Chris Lattner -Last modified: Tue Aug 5 17:53:43 CDT 2003 +Last modified: Sat Sep 20 09:25:11 CDT 2003 From lattner at cs.uiuc.edu Sat Sep 20 10:18:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Sep 20 10:18:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/External/SPEC/CINT2000/Makefile Message-ID: <200309201517.KAA19438@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs/External/SPEC/CINT2000: Makefile updated: 1.4 -> 1.5 --- Log message: Switch to an explicit list of benchmarks to run --- Diffs of the changes: Index: llvm/test/Programs/External/SPEC/CINT2000/Makefile diff -u llvm/test/Programs/External/SPEC/CINT2000/Makefile:1.4 llvm/test/Programs/External/SPEC/CINT2000/Makefile:1.5 --- llvm/test/Programs/External/SPEC/CINT2000/Makefile:1.4 Tue Aug 19 16:30:33 2003 +++ llvm/test/Programs/External/SPEC/CINT2000/Makefile Sat Sep 20 10:17:14 2003 @@ -1,3 +1,13 @@ LEVEL = ../../../../.. -PARALLEL_DIRS := $(filter-out %-disabled/, $(sort $(filter-out CVS/, $(wildcard */)))) +PARALLEL_DIRS := \ + 164.gzip \ + 175.vpr \ + 181.mcf \ + 186.crafty \ + 197.parser \ + 254.gap \ + 255.vortex \ + 256.bzip2 \ + 300.twolf + include ${LEVEL}/test/Programs/Makefile.programs From lattner at cs.uiuc.edu Sat Sep 20 11:14:00 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Sep 20 11:14:00 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructureStats.cpp Message-ID: <200309201613.LAA21204@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: DataStructureStats.cpp updated: 1.4 -> 1.5 --- Log message: Make this work better for constants that aren't necessarily in ANY graph, such as null pointers --- Diffs of the changes: Index: llvm/lib/Analysis/DataStructure/DataStructureStats.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructureStats.cpp:1.4 llvm/lib/Analysis/DataStructure/DataStructureStats.cpp:1.5 --- llvm/lib/Analysis/DataStructure/DataStructureStats.cpp:1.4 Fri Sep 19 20:20:46 2003 +++ llvm/lib/Analysis/DataStructure/DataStructureStats.cpp Sat Sep 20 11:12:57 2003 @@ -33,6 +33,7 @@ const DSGraph *TDGraph; DSNode *getNodeForValue(Value *V); + bool isNodeForValueCollapsed(Value *V); public: /// Driver functions to compute the Load/Store Dep. Graph per function. bool runOnFunction(Function& F); @@ -90,14 +91,24 @@ DSNode *DSGraphStats::getNodeForValue(Value *V) { const DSGraph *G = TDGraph; - if (isa(V)) + if (isa(V) || isa(V)) G = TDGraph->getGlobalsGraph(); - return G->getNodeForValue(V).getNode(); + const DSGraph::ScalarMapTy &ScalarMap = G->getScalarMap(); + DSGraph::ScalarMapTy::const_iterator I = ScalarMap.find(V); + if (I != ScalarMap.end()) + return I->second.getNode(); + return 0; +} + +bool DSGraphStats::isNodeForValueCollapsed(Value *V) { + if (DSNode *N = getNodeForValue(V)) + return N->isNodeCompletelyFolded(); + return false; } void DSGraphStats::visitLoad(LoadInst &LI) { - if (getNodeForValue(LI.getOperand(0))->isNodeCompletelyFolded()) { + if (isNodeForValueCollapsed(LI.getOperand(0))) { NumUntypedMemAccesses++; } else { NumTypedMemAccesses++; @@ -105,7 +116,7 @@ } void DSGraphStats::visitStore(StoreInst &SI) { - if (getNodeForValue(SI.getOperand(1))->isNodeCompletelyFolded()) { + if (isNodeForValueCollapsed(SI.getOperand(1))) { NumUntypedMemAccesses++; } else { NumTypedMemAccesses++; From lattner at cs.uiuc.edu Sat Sep 20 11:35:00 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Sep 20 11:35:00 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/DSSupport.h DataStructure.h IPModRef.h Message-ID: <200309201634.LAA27478@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: DSSupport.h updated: 1.22 -> 1.23 DataStructure.h updated: 1.70 -> 1.71 IPModRef.h updated: 1.11 -> 1.12 --- Log message: Switch from using CallInst's to represent call sites to using the LLVM CallSite class. Now we can represent function calls by invoke instructions too! --- Diffs of the changes: Index: llvm/include/llvm/Analysis/DSSupport.h diff -u llvm/include/llvm/Analysis/DSSupport.h:1.22 llvm/include/llvm/Analysis/DSSupport.h:1.23 --- llvm/include/llvm/Analysis/DSSupport.h:1.22 Sat Jul 26 17:56:46 2003 +++ llvm/include/llvm/Analysis/DSSupport.h Sat Sep 20 11:34:02 2003 @@ -7,11 +7,9 @@ #ifndef LLVM_ANALYSIS_DSSUPPORT_H #define LLVM_ANALYSIS_DSSUPPORT_H -#include #include -#include -#include #include "Support/hash_set" +#include "llvm/Support/CallSite.h" class Function; class CallInst; @@ -127,7 +125,7 @@ /// the DSNode handles for the function arguments. /// class DSCallSite { - CallInst *Inst; // Actual call site + CallSite Site; // Actual call site Function *CalleeF; // The function called (direct call) DSNodeHandle CalleeN; // The function node called (indirect call) DSNodeHandle RetVal; // Returned value @@ -160,21 +158,21 @@ /// Constructor. Note - This ctor destroys the argument vector passed in. On /// exit, the argument vector is empty. /// - DSCallSite(CallInst &inst, const DSNodeHandle &rv, DSNode *Callee, + DSCallSite(CallSite CS, const DSNodeHandle &rv, DSNode *Callee, std::vector &Args) - : Inst(&inst), CalleeF(0), CalleeN(Callee), RetVal(rv) { + : Site(CS), CalleeF(0), CalleeN(Callee), RetVal(rv) { assert(Callee && "Null callee node specified for call site!"); Args.swap(CallArgs); } - DSCallSite(CallInst &inst, const DSNodeHandle &rv, Function *Callee, + DSCallSite(CallSite CS, const DSNodeHandle &rv, Function *Callee, std::vector &Args) - : Inst(&inst), CalleeF(Callee), RetVal(rv) { + : Site(CS), CalleeF(Callee), RetVal(rv) { assert(Callee && "Null callee function specified for call site!"); Args.swap(CallArgs); } DSCallSite(const DSCallSite &DSCS) // Simple copy ctor - : Inst(DSCS.Inst), CalleeF(DSCS.CalleeF), CalleeN(DSCS.CalleeN), + : Site(DSCS.Site), CalleeF(DSCS.CalleeF), CalleeN(DSCS.CalleeN), RetVal(DSCS.RetVal), CallArgs(DSCS.CallArgs) {} /// Mapping copy constructor - This constructor takes a preexisting call site @@ -183,7 +181,7 @@ /// template DSCallSite(const DSCallSite &FromCall, const MapTy &NodeMap) { - Inst = FromCall.Inst; + Site = FromCall.Site; InitNH(RetVal, FromCall.RetVal, NodeMap); InitNH(CalleeN, FromCall.CalleeN, NodeMap); CalleeF = FromCall.CalleeF; @@ -194,7 +192,7 @@ } const DSCallSite &operator=(const DSCallSite &RHS) { - Inst = RHS.Inst; + Site = RHS.Site; CalleeF = RHS.CalleeF; CalleeN = RHS.CalleeN; RetVal = RHS.RetVal; @@ -212,7 +210,7 @@ // Accessor functions... Function &getCaller() const; - CallInst &getCallInst() const { return *Inst; } + CallSite getCallSite() const { return Site; } DSNodeHandle &getRetVal() { return RetVal; } const DSNodeHandle &getRetVal() const { return RetVal; } @@ -236,7 +234,7 @@ void swap(DSCallSite &CS) { if (this != &CS) { - std::swap(Inst, CS.Inst); + std::swap(Site, CS.Site); std::swap(RetVal, CS.RetVal); std::swap(CalleeN, CS.CalleeN); std::swap(CalleeF, CS.CalleeF); Index: llvm/include/llvm/Analysis/DataStructure.h diff -u llvm/include/llvm/Analysis/DataStructure.h:1.70 llvm/include/llvm/Analysis/DataStructure.h:1.71 --- llvm/include/llvm/Analysis/DataStructure.h:1.70 Sat Jul 26 17:56:46 2003 +++ llvm/include/llvm/Analysis/DataStructure.h Sat Sep 20 11:34:02 2003 @@ -11,10 +11,9 @@ #include "Support/hash_set" class Type; -class CallInst; +class Instruction; class DSGraph; class DSNode; -class DSCallSite; // FIXME: move this stuff to a private header namespace DataStructureAnalysis { @@ -75,7 +74,7 @@ // DSInfo, one graph for each function hash_map DSInfo; DSGraph *GlobalsGraph; - hash_multimap ActualCallees; + hash_multimap ActualCallees; public: ~BUDataStructures() { releaseMemory(); } @@ -106,7 +105,7 @@ AU.addRequired(); } - typedef hash_multimap ActualCalleesTy; + typedef hash_multimap ActualCalleesTy; const ActualCalleesTy &getActualCallees() const { return ActualCallees; } Index: llvm/include/llvm/Analysis/IPModRef.h diff -u llvm/include/llvm/Analysis/IPModRef.h:1.11 llvm/include/llvm/Analysis/IPModRef.h:1.12 --- llvm/include/llvm/Analysis/IPModRef.h:1.11 Sat Jun 21 22:05:45 2003 +++ llvm/include/llvm/Analysis/IPModRef.h Sat Sep 20 11:34:02 2003 @@ -45,7 +45,10 @@ class Module; class Function; +class CallSite; +class Instruction; class CallInst; +class InvokeInst; class DSNode; class DSGraph; class DSNodeHandle; @@ -117,15 +120,15 @@ IPModRef& IPModRefObj; // The IPModRef Object owning this DSGraph* funcTDGraph; // Top-down DS graph for function ModRefInfo funcModRefInfo; // ModRefInfo for the function body - std::map + std::map callSiteModRefInfo; // ModRefInfo for each callsite std::map NodeIds; friend class IPModRef; void computeModRef (const Function &func); - void computeModRef (const CallInst& callInst); - DSGraph *ResolveCallSiteModRefInfo(CallInst &CI, + void computeModRef (CallSite call); + DSGraph *ResolveCallSiteModRefInfo(CallSite CS, hash_map &NodeMap); public: @@ -145,9 +148,14 @@ return &funcModRefInfo; } const ModRefInfo* getModRefInfo (const CallInst& callInst) const { - std::map::const_iterator I = - callSiteModRefInfo.find(&callInst); - return (I == callSiteModRefInfo.end())? NULL : I->second; + std::map::const_iterator I = + callSiteModRefInfo.find((Instruction*)&callInst); + return (I == callSiteModRefInfo.end()) ? NULL : I->second; + } + const ModRefInfo* getModRefInfo (const InvokeInst& II) const { + std::map::const_iterator I = + callSiteModRefInfo.find((Instruction*)&II); + return (I == callSiteModRefInfo.end()) ? NULL : I->second; } // Get the nodeIds used to index all Mod/Ref information for current function From lattner at cs.uiuc.edu Sat Sep 20 11:35:09 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Sep 20 11:35:09 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp DataStructure.cpp DataStructureStats.cpp Local.cpp TopDownClosure.cpp Message-ID: <200309201634.LAA27496@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: BottomUpClosure.cpp updated: 1.63 -> 1.64 DataStructure.cpp updated: 1.120 -> 1.121 DataStructureStats.cpp updated: 1.5 -> 1.6 Local.cpp updated: 1.61 -> 1.62 TopDownClosure.cpp updated: 1.53 -> 1.54 --- Log message: Switch from using CallInst's to represent call sites to using the LLVM CallSite class. Now we can represent function calls by invoke instructions too! --- Diffs of the changes: Index: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp diff -u llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.63 llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.64 --- llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.63 Fri Aug 1 17:14:28 2003 +++ llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp Sat Sep 20 11:34:11 2003 @@ -253,7 +253,8 @@ Graph.mergeInGraph(CS, *Callee, Graph, 0); } else { - ActualCallees.insert(std::make_pair(&CS.getCallInst(), Callee)); + ActualCallees.insert(std::make_pair(CS.getCallSite().getInstruction(), + Callee)); // Get the data structure graph for the called function. // Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.120 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.121 --- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.120 Thu Sep 11 13:12:35 2003 +++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Sat Sep 20 11:34:11 2003 @@ -709,7 +709,7 @@ // Define here to avoid including iOther.h and BasicBlock.h in DSGraph.h Function &DSCallSite::getCaller() const { - return *Inst->getParent()->getParent(); + return *Site.getInstruction()->getParent()->getParent(); } @@ -1044,7 +1044,7 @@ if (isPointerType(I->getType())) Args.push_back(getScalarMap().find(I)->second); - return DSCallSite(*(CallInst*)0, getReturnNodeFor(F), &F, Args); + return DSCallSite(CallSite(), getReturnNodeFor(F), &F, Args); } Index: llvm/lib/Analysis/DataStructure/DataStructureStats.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructureStats.cpp:1.5 llvm/lib/Analysis/DataStructure/DataStructureStats.cpp:1.6 --- llvm/lib/Analysis/DataStructure/DataStructureStats.cpp:1.5 Sat Sep 20 11:12:57 2003 +++ llvm/lib/Analysis/DataStructure/DataStructureStats.cpp Sat Sep 20 11:34:11 2003 @@ -68,7 +68,7 @@ const std::vector &callSites = TDGraph->getFunctionCalls(); for (unsigned i = 0, N = callSites.size(); i != N; ++i) - if (isIndirectCallee(callSites[i].getCallInst().getCalledValue())) { + if (isIndirectCallee(callSites[i].getCallSite().getCalledValue())) { // This is an indirect function call const std::vector &Callees = callSites[i].getCalleeNode()->getGlobals(); @@ -76,8 +76,9 @@ totalNumCallees += Callees.size(); ++numIndirectCalls; } else - std::cerr << "WARNING: No callee in Function " << F.getName() - << "at call:\n" << callSites[i].getCallInst(); + std::cerr << "WARNING: No callee in Function '" << F.getName() + << "' at call: \n" + << *callSites[i].getCallSite().getInstruction(); } TotalNumCallees += totalNumCallees; Index: llvm/lib/Analysis/DataStructure/Local.cpp diff -u llvm/lib/Analysis/DataStructure/Local.cpp:1.61 llvm/lib/Analysis/DataStructure/Local.cpp:1.62 --- llvm/lib/Analysis/DataStructure/Local.cpp:1.61 Thu Sep 11 13:12:35 2003 +++ llvm/lib/Analysis/DataStructure/Local.cpp Sat Sep 20 11:34:11 2003 @@ -7,14 +7,11 @@ #include "llvm/Analysis/DataStructure.h" #include "llvm/Analysis/DSGraph.h" -#include "llvm/iMemory.h" -#include "llvm/iTerminators.h" -#include "llvm/iPHINode.h" -#include "llvm/iOther.h" #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" #include "llvm/Function.h" #include "llvm/GlobalVariable.h" +#include "llvm/Instructions.h" #include "llvm/Support/InstVisitor.h" #include "llvm/Target/TargetData.h" #include "Support/CommandLine.h" @@ -96,11 +93,13 @@ void visitLoadInst(LoadInst &LI); void visitStoreInst(StoreInst &SI); void visitCallInst(CallInst &CI); + void visitInvokeInst(InvokeInst &II); void visitSetCondInst(SetCondInst &SCI) {} // SetEQ & friends are ignored void visitFreeInst(FreeInst &FI); void visitCastInst(CastInst &CI); void visitInstruction(Instruction &I); + void visitCallSite(CallSite CS); private: // Helper functions used to implement the visitation functions... @@ -405,29 +404,38 @@ } void GraphBuilder::visitCallInst(CallInst &CI) { + visitCallSite(&CI); +} + +void GraphBuilder::visitInvokeInst(InvokeInst &II) { + visitCallSite(&II); +} + +void GraphBuilder::visitCallSite(CallSite CS) { // Set up the return value... DSNodeHandle RetVal; - if (isPointerType(CI.getType())) - RetVal = getValueDest(CI); + Instruction *I = CS.getInstruction(); + if (isPointerType(I->getType())) + RetVal = getValueDest(*I); DSNode *Callee = 0; - if (DisableDirectCallOpt || !isa(CI.getOperand(0))) - Callee = getValueDest(*CI.getOperand(0)).getNode(); + if (DisableDirectCallOpt || !isa(CS.getCalledValue())) + Callee = getValueDest(*CS.getCalledValue()).getNode(); std::vector Args; - Args.reserve(CI.getNumOperands()-1); + Args.reserve(CS.arg_end()-CS.arg_begin()); // Calculate the arguments vector... - for (unsigned i = 1, e = CI.getNumOperands(); i != e; ++i) - if (isPointerType(CI.getOperand(i)->getType())) - Args.push_back(getValueDest(*CI.getOperand(i))); + for (CallSite::arg_iterator I = CS.arg_begin(), E = CS.arg_end(); I != E; ++I) + if (isPointerType((*I)->getType())) + Args.push_back(getValueDest(**I)); // Add a new function call entry... if (Callee) - FunctionCalls.push_back(DSCallSite(CI, RetVal, Callee, Args)); + FunctionCalls.push_back(DSCallSite(CS, RetVal, Callee, Args)); else - FunctionCalls.push_back(DSCallSite(CI, RetVal, - cast(CI.getOperand(0)), Args)); + FunctionCalls.push_back(DSCallSite(CS, RetVal, CS.getCalledFunction(), + Args)); } void GraphBuilder::visitFreeInst(FreeInst &FI) { Index: llvm/lib/Analysis/DataStructure/TopDownClosure.cpp diff -u llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.53 llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.54 --- llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.53 Fri Aug 1 17:14:28 2003 +++ llvm/lib/Analysis/DataStructure/TopDownClosure.cpp Sat Sep 20 11:34:11 2003 @@ -96,9 +96,10 @@ const std::vector &FunctionCalls = G.getFunctionCalls(); for (unsigned i = 0, e = FunctionCalls.size(); i != e; ++i) { + Instruction *CallI = FunctionCalls[i].getCallSite().getInstruction(); std::pair - IP = ActualCallees.equal_range(&FunctionCalls[i].getCallInst()); + IP = ActualCallees.equal_range(CallI); for (BUDataStructures::ActualCalleesTy::const_iterator I = IP.first; I != IP.second; ++I) @@ -191,10 +192,11 @@ // Clone and merge the reachable subgraph from the call into callee's graph. // for (unsigned i = 0, e = FunctionCalls.size(); i != e; ++i) { + Instruction *CallI = FunctionCalls[i].getCallSite().getInstruction(); // For each function in the invoked function list at this call site... std::pair - IP = ActualCallees.equal_range(&FunctionCalls[i].getCallInst()); + IP = ActualCallees.equal_range(CallI); // Multiple callees may have the same graph, so try to inline and merge // only once for each pair, not once for each From lattner at cs.uiuc.edu Sat Sep 20 11:35:17 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Sep 20 11:35:17 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/IPA/IPModRef.cpp Message-ID: <200309201634.LAA27503@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/IPA: IPModRef.cpp updated: 1.16 -> 1.17 --- Log message: Switch from using CallInst's to represent call sites to using the LLVM CallSite class. Now we can represent function calls by invoke instructions too! --- Diffs of the changes: Index: llvm/lib/Analysis/IPA/IPModRef.cpp diff -u llvm/lib/Analysis/IPA/IPModRef.cpp:1.16 llvm/lib/Analysis/IPA/IPModRef.cpp:1.17 --- llvm/lib/Analysis/IPA/IPModRef.cpp:1.16 Thu Sep 11 13:14:24 2003 +++ llvm/lib/Analysis/IPA/IPModRef.cpp Sat Sep 20 11:34:13 2003 @@ -61,7 +61,7 @@ FunctionModRefInfo::~FunctionModRefInfo() { - for(std::map::iterator + for(std::map::iterator I=callSiteModRefInfo.begin(), E=callSiteModRefInfo.end(); I != E; ++I) delete(I->second); @@ -98,7 +98,7 @@ // The call sites are recorded in the TD graph. const std::vector& callSites = funcTDGraph->getFunctionCalls(); for (unsigned i = 0, N = callSites.size(); i < N; ++i) - computeModRef(callSites[i].getCallInst()); + computeModRef(callSites[i].getCallSite()); } @@ -117,25 +117,22 @@ // requested information (because the call site calls an external // function or we cannot determine the complete set of functions invoked). // -DSGraph* FunctionModRefInfo::ResolveCallSiteModRefInfo(CallInst &CI, +DSGraph* FunctionModRefInfo::ResolveCallSiteModRefInfo(CallSite CS, hash_map &NodeMap) { // Step #0: Quick check if we are going to fail anyway: avoid // all the graph cloning and map copying in steps #1 and #2. // - if (const Function *F = CI.getCalledFunction()) - { - if (F->isExternal()) - return 0; // We cannot compute Mod/Ref info for this callsite... - } - else - { - // Eventually, should check here if any callee is external. - // For now we are not handling this case anyway. - std::cerr << "IP Mod/Ref indirect call not implemented yet: " - << "Being conservative\n"; + if (const Function *F = CS.getCalledFunction()) { + if (F->isExternal()) return 0; // We cannot compute Mod/Ref info for this callsite... - } + } else { + // Eventually, should check here if any callee is external. + // For now we are not handling this case anyway. + std::cerr << "IP Mod/Ref indirect call not implemented yet: " + << "Being conservative\n"; + return 0; // We cannot compute Mod/Ref info for this callsite... + } // Step #1: Clone the top-down graph... DSGraph *Result = new DSGraph(*funcTDGraph, NodeMap); @@ -144,7 +141,7 @@ Result->maskNodeTypes(~(DSNode::Modified | DSNode::Read)); // Step #3: clone the bottom up graphs for the callees into the caller graph - if (Function *F = CI.getCalledFunction()) + if (Function *F = CS.getCalledFunction()) { assert(!F->isExternal()); @@ -152,17 +149,18 @@ // If the call returns a value, make sure to merge the nodes... DSNodeHandle RetVal; - if (DS::isPointerType(CI.getType())) - RetVal = Result->getNodeForValue(&CI); + if (DS::isPointerType(CS.getInstruction()->getType())) + RetVal = Result->getNodeForValue(CS.getInstruction()); // Populate the arguments list... std::vector Args; - for (unsigned i = 1, e = CI.getNumOperands(); i != e; ++i) - if (DS::isPointerType(CI.getOperand(i)->getType())) - Args.push_back(Result->getNodeForValue(CI.getOperand(i))); + for (CallSite::arg_iterator I = CS.arg_begin(), E = CS.arg_end(); + I != E; ++I) + if (DS::isPointerType((*I)->getType())) + Args.push_back(Result->getNodeForValue(*I)); // Build the call site... - DSCallSite CS(CI, RetVal, F, Args); + DSCallSite CS(CS, RetVal, F, Args); // Perform the merging now of the graph for the callee, which will // come with mod/ref bits set... @@ -187,16 +185,15 @@ // and then inlining the callee's BU graph into the caller's TD graph. // void -FunctionModRefInfo::computeModRef(const CallInst& callInst) +FunctionModRefInfo::computeModRef(CallSite CS) { // Allocate the mod/ref info for the call site. Bits automatically cleared. ModRefInfo* callModRefInfo = new ModRefInfo(funcTDGraph->getGraphSize()); - callSiteModRefInfo[&callInst] = callModRefInfo; + callSiteModRefInfo[CS.getInstruction()] = callModRefInfo; // Get a copy of the graph for the callee with the callee inlined hash_map NodeMap; - DSGraph* csgp = ResolveCallSiteModRefInfo(const_cast(callInst), - NodeMap); + DSGraph* csgp = ResolveCallSiteModRefInfo(CS, NodeMap); if (!csgp) { // Callee's side effects are unknown: mark all nodes Mod and Ref. // Eventually this should only mark nodes visible to the callee, i.e., @@ -323,7 +320,7 @@ // Second: Print Globals and Locals modified at each call site in function // - for (std::map::const_iterator + for (std::map::const_iterator CI = callSiteModRefInfo.begin(), CE = callSiteModRefInfo.end(); CI != CE; ++CI) { From lattner at cs.uiuc.edu Sat Sep 20 11:51:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Sep 20 11:51:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/Local.cpp Message-ID: <200309201650.LAA29801@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: Local.cpp updated: 1.62 -> 1.63 --- Log message: Add special case handling for calloc and realloc --- Diffs of the changes: Index: llvm/lib/Analysis/DataStructure/Local.cpp diff -u llvm/lib/Analysis/DataStructure/Local.cpp:1.62 llvm/lib/Analysis/DataStructure/Local.cpp:1.63 --- llvm/lib/Analysis/DataStructure/Local.cpp:1.62 Sat Sep 20 11:34:11 2003 +++ llvm/lib/Analysis/DataStructure/Local.cpp Sat Sep 20 11:50:46 2003 @@ -412,6 +412,22 @@ } void GraphBuilder::visitCallSite(CallSite CS) { + // Special case handling of certain libc allocation functions here. + if (Function *F = CS.getCalledFunction()) + if (F->isExternal()) + if (F->getName() == "calloc") { + setDestTo(*CS.getInstruction(), + createNode()->setHeapNodeMarker()->setModifiedMarker()); + return; + } else if (F->getName() == "realloc") { + DSNodeHandle RetNH = getValueDest(*CS.getInstruction()); + RetNH.mergeWith(getValueDest(**CS.arg_begin())); + DSNode *N = RetNH.getNode(); + if (N) N->setHeapNodeMarker()->setModifiedMarker()->setReadMarker(); + return; + } + + // Set up the return value... DSNodeHandle RetVal; Instruction *I = CS.getInstruction(); From lattner at cs.uiuc.edu Sat Sep 20 13:54:00 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Sep 20 13:54:00 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/SingleSource/CustomChecked/oopack_v1p8.cpp Message-ID: <200309201853.NAA00346@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs/SingleSource/CustomChecked: oopack_v1p8.cpp updated: 1.1 -> 1.2 --- Log message: Make the test fail if tests aren't found! --- Diffs of the changes: Index: llvm/test/Programs/SingleSource/CustomChecked/oopack_v1p8.cpp diff -u llvm/test/Programs/SingleSource/CustomChecked/oopack_v1p8.cpp:1.1 llvm/test/Programs/SingleSource/CustomChecked/oopack_v1p8.cpp:1.2 --- llvm/test/Programs/SingleSource/CustomChecked/oopack_v1p8.cpp:1.1 Wed May 14 13:40:18 2003 +++ llvm/test/Programs/SingleSource/CustomChecked/oopack_v1p8.cpp Sat Sep 20 13:53:24 2003 @@ -677,6 +677,7 @@ Benchmark * b = Benchmark::find( test_name ); if( b==NULL ) { printf("skipping non-existent test = '%s'\n", test_name ); + abort(); } else { b->time_both( test_count ); } From lattner at cs.uiuc.edu Sat Sep 20 14:02:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Sep 20 14:02:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/IPO/GlobalDCE.cpp Message-ID: <200309201901.OAA01020@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/IPO: GlobalDCE.cpp updated: 1.27 -> 1.28 --- Log message: Global variables with APPENDING linkage are very important to keep around! --- Diffs of the changes: Index: llvm/lib/Transforms/IPO/GlobalDCE.cpp diff -u llvm/lib/Transforms/IPO/GlobalDCE.cpp:1.27 llvm/lib/Transforms/IPO/GlobalDCE.cpp:1.28 --- llvm/lib/Transforms/IPO/GlobalDCE.cpp:1.27 Tue Sep 16 14:27:31 2003 +++ llvm/lib/Transforms/IPO/GlobalDCE.cpp Sat Sep 20 14:00:50 2003 @@ -48,14 +48,17 @@ for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) { Changed |= RemoveUnusedConstantPointerRef(*I); // Functions with external linkage are needed if they have a body - if (I->hasExternalLinkage() && !I->isExternal()) + if ((!I->hasInternalLinkage() && !I->hasLinkOnceLinkage()) && + !I->isExternal()) GlobalIsNeeded(I); } for (Module::giterator I = M.gbegin(), E = M.gend(); I != E; ++I) { Changed |= RemoveUnusedConstantPointerRef(*I); - // Externally visible globals are needed, if they have an initializer. - if (I->hasExternalLinkage() && !I->isExternal()) + // Externally visible & appending globals are needed, if they have an + // initializer. + if ((!I->hasInternalLinkage() && !I->hasLinkOnceLinkage()) && + !I->isExternal()) GlobalIsNeeded(I); } From lattner at cs.uiuc.edu Sat Sep 20 14:11:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Sep 20 14:11:01 2003 Subject: [llvm-commits] CVS: poolalloc/lib/PoolAllocate/PoolAllocate.cpp Message-ID: <200309201910.OAA03097@apoc.cs.uiuc.edu> Changes in directory poolalloc/lib/PoolAllocate: PoolAllocate.cpp updated: 1.21 -> 1.22 --- Log message: Adjust to work with recent invoke changes. This doesn't handle invoke yet, but does at least compile now --- Diffs of the changes: Index: poolalloc/lib/PoolAllocate/PoolAllocate.cpp diff -u poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.21 poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.22 --- poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.21 Thu Aug 21 11:05:04 2003 +++ poolalloc/lib/PoolAllocate/PoolAllocate.cpp Sat Sep 20 14:10:11 2003 @@ -94,14 +94,15 @@ if (CSI->isIndirectCall()) { DSNode *DSN = CSI->getCalleeNode(); if (DSN->isIncomplete()) - std::cerr << "Incomplete node " << CSI->getCallInst(); + std::cerr << "Incomplete node: " + << *CSI->getCallSite().getInstruction(); // assert(DSN->isGlobalNode()); const std::vector &Callees = DSN->getGlobals(); if (Callees.size() > 0) { Function *firstCalledF = dyn_cast(*Callees.begin()); FuncECs.addElement(firstCalledF); CallInstTargets.insert(std::pair - (&CSI->getCallInst(), + (cast(CSI->getCallSite().getInstruction()), firstCalledF)); if (Callees.size() > 1) { for (std::vector::const_iterator CalleesI = @@ -110,11 +111,11 @@ Function *calledF = dyn_cast(*CalleesI); FuncECs.unionSetsWith(firstCalledF, calledF); CallInstTargets.insert(std::pair - (&CSI->getCallInst(), calledF)); + (cast(CSI->getCallSite().getInstruction()), calledF)); } } } else { - std::cerr << "No targets " << CSI->getCallInst(); + std::cerr << "No targets: " << *CSI->getCallSite().getInstruction(); } } } @@ -234,7 +235,7 @@ for (std::vector::iterator CSI = callSites.begin(), CSE = callSites.end(); CSI != CSE; ++CSI) { if (CSI->isIndirectCall()) { - CallInst &CI = CSI->getCallInst(); + CallInst &CI = *cast(CSI->getCallSite().getInstruction()); std::pair::iterator, std::multimap::iterator> Targets = CallInstTargets.equal_range(&CI); From lattner at cs.uiuc.edu Sat Sep 20 16:35:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Sep 20 16:35:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructure.cpp Message-ID: <200309202134.QAA09015@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: DataStructure.cpp updated: 1.121 -> 1.122 --- Log message: Remove trivially dead nodes was not removing nodes that were dead due to forwarding! --- Diffs of the changes: Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.121 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.122 --- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.121 Sat Sep 20 11:34:11 2003 +++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Sat Sep 20 16:34:07 2003 @@ -1228,6 +1228,20 @@ removeIdenticalCalls(FunctionCalls); removeIdenticalCalls(AuxFunctionCalls); + // Loop over all of the nodes in the graph, calling getNode on each field. + // This will cause all nodes to update their forwarding edges, causing + // forwarded nodes to be delete-able. + for (unsigned i = 0, e = Nodes.size(); i != e; ++i) { + DSNode *N = Nodes[i]; + for (unsigned l = 0, e = N->getNumLinks(); l != e; ++l) + N->getLink(l*N->getPointerSize()).getNode(); + } + + // Likewise, forward any edges from the scalar nodes... + for (ScalarMapTy::iterator I = ScalarMap.begin(), E = ScalarMap.end(); + I != E; ++I) + I->second.getNode(); + bool isGlobalsGraph = !GlobalsGraph; for (unsigned i = 0; i != Nodes.size(); ++i) { From lattner at cs.uiuc.edu Sat Sep 20 16:49:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Sep 20 16:49:02 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/Local.cpp Message-ID: <200309202148.QAA09961@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: Local.cpp updated: 1.63 -> 1.64 --- Log message: Make sure to add global variable initializers to the Globals graph! --- Diffs of the changes: Index: llvm/lib/Analysis/DataStructure/Local.cpp diff -u llvm/lib/Analysis/DataStructure/Local.cpp:1.63 llvm/lib/Analysis/DataStructure/Local.cpp:1.64 --- llvm/lib/Analysis/DataStructure/Local.cpp:1.63 Sat Sep 20 11:50:46 2003 +++ llvm/lib/Analysis/DataStructure/Local.cpp Sat Sep 20 16:48:16 2003 @@ -59,26 +59,32 @@ /// graph by performing a single pass over the function in question. /// class GraphBuilder : InstVisitor { - Function &F; DSGraph &G; - DSNodeHandle &RetNode; // Node that gets returned... + DSNodeHandle *RetNode; // Node that gets returned... DSGraph::ScalarMapTy &ScalarMap; - std::vector &FunctionCalls; + std::vector *FunctionCalls; public: GraphBuilder(Function &f, DSGraph &g, DSNodeHandle &retNode, - DSGraph::ScalarMapTy &SM, std::vector &fc) - : F(f), G(g), RetNode(retNode), ScalarMap(SM), - FunctionCalls(fc) { + std::vector &fc) + : G(g), RetNode(&retNode), ScalarMap(G.getScalarMap()), + FunctionCalls(&fc) { // Create scalar nodes for all pointer arguments... - for (Function::aiterator I = F.abegin(), E = F.aend(); I != E; ++I) + for (Function::aiterator I = f.abegin(), E = f.aend(); I != E; ++I) if (isPointerType(I->getType())) getValueDest(*I); - visit(F); // Single pass over the function + visit(f); // Single pass over the function } + // GraphBuilder ctor for working on the globals graph + GraphBuilder(DSGraph &g) + : G(g), RetNode(0), ScalarMap(G.getScalarMap()), FunctionCalls(0) { + } + + void mergeInGlobalInitializer(GlobalVariable *GV); + private: // Visitor functions, used to handle each instruction type we encounter... friend class InstVisitor; @@ -100,6 +106,8 @@ void visitInstruction(Instruction &I); void visitCallSite(CallSite CS); + + void MergeConstantInitIntoNode(DSNodeHandle &NH, Constant *C); private: // Helper functions used to implement the visitation functions... @@ -143,7 +151,7 @@ DEBUG(std::cerr << " [Loc] Calculating graph for: " << F.getName() << "\n"); // Use the graph builder to construct the local version of the graph - GraphBuilder B(F, *this, ReturnNodes[&F], ScalarMap, FunctionCalls); + GraphBuilder B(F, *this, ReturnNodes[&F], FunctionCalls); #ifndef NDEBUG Timer::addPeakMemoryMeasurement(); #endif @@ -287,7 +295,6 @@ DSNodeHandle Value = getValueDest(*GEP.getOperand(0)); if (Value.getNode() == 0) return; - unsigned Offset = 0; const PointerType *PTy = cast(GEP.getOperand(0)->getType()); const Type *CurTy = PTy->getElementType(); @@ -325,6 +332,7 @@ #endif // All of these subscripts are indexing INTO the elements we have... + unsigned Offset = 0; for (unsigned i = 2, e = GEP.getNumOperands(); i < e; ++i) if (GEP.getOperand(i)->getType() == Type::LongTy) { // Get the type indexing into... @@ -390,7 +398,7 @@ // Mark that the node is written to... Dest.getNode()->setModifiedMarker(); - // Ensure a typerecord exists... + // Ensure a type-record exists... Dest.getNode()->mergeTypeInfo(StoredTy, Dest.getOffset()); // Avoid adding edges from null, or processing non-"pointer" stores @@ -400,7 +408,7 @@ void GraphBuilder::visitReturnInst(ReturnInst &RI) { if (RI.getNumOperands() && isPointerType(RI.getOperand(0)->getType())) - RetNode.mergeWith(getValueDest(*RI.getOperand(0))); + RetNode->mergeWith(getValueDest(*RI.getOperand(0))); } void GraphBuilder::visitCallInst(CallInst &CI) { @@ -448,10 +456,10 @@ // Add a new function call entry... if (Callee) - FunctionCalls.push_back(DSCallSite(CS, RetVal, Callee, Args)); + FunctionCalls->push_back(DSCallSite(CS, RetVal, Callee, Args)); else - FunctionCalls.push_back(DSCallSite(CS, RetVal, CS.getCalledFunction(), - Args)); + FunctionCalls->push_back(DSCallSite(CS, RetVal, CS.getCalledFunction(), + Args)); } void GraphBuilder::visitFreeInst(FreeInst &FI) { @@ -498,6 +506,42 @@ // LocalDataStructures Implementation //===----------------------------------------------------------------------===// +// MergeConstantInitIntoNode - Merge the specified constant into the node +// pointed to by NH. +void GraphBuilder::MergeConstantInitIntoNode(DSNodeHandle &NH, Constant *C) { + // Ensure a type-record exists... + NH.getNode()->mergeTypeInfo(C->getType(), NH.getOffset()); + + if (C->getType()->isFirstClassType()) { + if (isPointerType(C->getType())) + // Avoid adding edges from null, or processing non-"pointer" stores + NH.addEdgeTo(getValueDest(*C)); + return; + } + + if (ConstantArray *CA = dyn_cast(C)) { + for (unsigned i = 0, e = CA->getNumOperands(); i != e; ++i) + // We don't currently do any indexing for arrays... + MergeConstantInitIntoNode(NH, cast(CA->getOperand(i))); + } else if (ConstantStruct *CS = dyn_cast(C)) { + const StructLayout *SL = TD.getStructLayout(CS->getType()); + for (unsigned i = 0, e = CS->getNumOperands(); i != e; ++i) { + DSNodeHandle NewNH(NH.getNode(), NH.getOffset()+SL->MemberOffsets[i]); + MergeConstantInitIntoNode(NewNH, cast(CS->getOperand(i))); + } + } else { + assert(0 && "Unknown constant type!"); + } +} + +void GraphBuilder::mergeInGlobalInitializer(GlobalVariable *GV) { + assert(!GV->isExternal() && "Cannot merge in external global!"); + // Get a node handle to the global node and merge the initializer into it. + DSNodeHandle NH = getValueDest(*GV); + MergeConstantInitIntoNode(NH, GV->getInitializer()); +} + + bool LocalDataStructures::run(Module &M) { GlobalsGraph = new DSGraph(); @@ -505,6 +549,16 @@ for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) if (!I->isExternal()) DSInfo.insert(std::make_pair(I, new DSGraph(*I, GlobalsGraph))); + + GraphBuilder GGB(*GlobalsGraph); + + // Add initializers for all of the globals to the globals graph... + for (Module::giterator I = M.gbegin(), E = M.gend(); I != E; ++I) + if (!I->isExternal()) + GGB.mergeInGlobalInitializer(I); + + GlobalsGraph->markIncompleteNodes(DSGraph::MarkFormalArgs); + GlobalsGraph->removeTriviallyDeadNodes(); return false; } From lattner at cs.uiuc.edu Sat Sep 20 16:49:10 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Sep 20 16:49:10 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructureStats.cpp Message-ID: <200309202148.QAA09966@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: DataStructureStats.cpp updated: 1.6 -> 1.7 --- Log message: Don't consider incomplete nodes to be typesafe! --- Diffs of the changes: Index: llvm/lib/Analysis/DataStructure/DataStructureStats.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructureStats.cpp:1.6 llvm/lib/Analysis/DataStructure/DataStructureStats.cpp:1.7 --- llvm/lib/Analysis/DataStructure/DataStructureStats.cpp:1.6 Sat Sep 20 11:34:11 2003 +++ llvm/lib/Analysis/DataStructure/DataStructureStats.cpp Sat Sep 20 16:48:01 2003 @@ -104,7 +104,7 @@ bool DSGraphStats::isNodeForValueCollapsed(Value *V) { if (DSNode *N = getNodeForValue(V)) - return N->isNodeCompletelyFolded(); + return N->isNodeCompletelyFolded() || N->isIncomplete(); return false; } From lattner at cs.uiuc.edu Sat Sep 20 17:25:00 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Sep 20 17:25:00 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/TopDownClosure.cpp Message-ID: <200309202224.RAA14032@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: TopDownClosure.cpp updated: 1.54 -> 1.55 --- Log message: Do not mark incoming arguments to functions complete if the function is pointed to by a global in the globals graph --- Diffs of the changes: Index: llvm/lib/Analysis/DataStructure/TopDownClosure.cpp diff -u llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.54 llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.55 --- llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.54 Sat Sep 20 11:34:11 2003 +++ llvm/lib/Analysis/DataStructure/TopDownClosure.cpp Sat Sep 20 17:24:04 2003 @@ -21,16 +21,25 @@ Statistic<> NumTDInlines("tddatastructures", "Number of graphs inlined"); } -/// FunctionHasCompleteArguments - This function returns true if it is safe not -/// to mark arguments to the function complete. -/// -/// FIXME: Need to check if all callers have been found, or rather if a -/// funcpointer escapes! -/// -static bool FunctionHasCompleteArguments(Function &F) { - return F.hasInternalLinkage(); +void TDDataStructures::markReachableFunctionsExternallyAccessible(DSNode *N, + hash_set &Visited) { + if (Visited.count(N)) return; + Visited.insert(N); + + for (unsigned i = 0, e = N->getNumLinks(); i != e; ++i) { + DSNodeHandle &NH = N->getLink(i*N->getPointerSize()); + if (DSNode *NN = NH.getNode()) { + const std::vector &Globals = NN->getGlobals(); + for (unsigned G = 0, e = Globals.size(); G != e; ++G) + if (Function *F = dyn_cast(Globals[G])) + ArgsRemainIncomplete.insert(F); + + markReachableFunctionsExternallyAccessible(NN, Visited); + } + } } + // run - Calculate the top down data structure graphs for each function in the // program. // @@ -39,9 +48,20 @@ GlobalsGraph = new DSGraph(BU.getGlobalsGraph()); // Figure out which functions must not mark their arguments complete because - // they are accessible outside this compilation unit. + // they are accessible outside this compilation unit. Currently, these + // arguments are functions which are reachable by global variables in the + // globals graph. + const DSGraph::ScalarMapTy &GGSM = GlobalsGraph->getScalarMap(); + hash_set Visited; + for (DSGraph::ScalarMapTy::const_iterator I = GGSM.begin(), E = GGSM.end(); + I != E; ++I) + if (isa(I->first)) + markReachableFunctionsExternallyAccessible(I->second.getNode(), Visited); + Visited.clear(); + + // Functions without internal linkage also have unknown incoming arguments! for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) - if (!FunctionHasCompleteArguments(*I)) + if (!I->isExternal() && !I->hasInternalLinkage()) ArgsRemainIncomplete.insert(I); // We want to traverse the call graph in reverse post-order. To do this, we From lattner at cs.uiuc.edu Sat Sep 20 18:28:00 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Sep 20 18:28:00 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp Message-ID: <200309202327.SAA17076@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: BottomUpClosure.cpp updated: 1.64 -> 1.65 --- Log message: The Globals graph must become complete at the end of the BU phase! --- Diffs of the changes: Index: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp diff -u llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.64 llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.65 --- llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.64 Sat Sep 20 11:34:11 2003 +++ llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp Sat Sep 20 18:27:05 2003 @@ -48,6 +48,11 @@ } NumCallEdges += ActualCallees.size(); + + // At the end of the bottom-up pass, the globals graph becomes complete. + // FIXME: This is not the right way to do this, but it is sorta better than + // nothing! + GlobalsGraph->maskIncompleteMarkers(); return false; } From lattner at cs.uiuc.edu Sat Sep 20 18:59:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Sep 20 18:59:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp TopDownClosure.cpp Message-ID: <200309202358.SAA21151@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: BottomUpClosure.cpp updated: 1.65 -> 1.66 TopDownClosure.cpp updated: 1.55 -> 1.56 --- Log message: Functions reachable from the arguments of unresolvable call nodes should not have their arguments marked complete --- Diffs of the changes: Index: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp diff -u llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.65 llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.66 --- llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.65 Sat Sep 20 18:27:05 2003 +++ llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp Sat Sep 20 18:58:33 2003 @@ -51,7 +51,10 @@ // At the end of the bottom-up pass, the globals graph becomes complete. // FIXME: This is not the right way to do this, but it is sorta better than - // nothing! + // nothing! In particular, externally visible globals and unresolvable call + // nodes at the end of the BU phase should make things that they point to + // incomplete in the globals graph. + // GlobalsGraph->maskIncompleteMarkers(); return false; } Index: llvm/lib/Analysis/DataStructure/TopDownClosure.cpp diff -u llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.55 llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.56 --- llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.55 Sat Sep 20 17:24:04 2003 +++ llvm/lib/Analysis/DataStructure/TopDownClosure.cpp Sat Sep 20 18:58:33 2003 @@ -23,7 +23,7 @@ void TDDataStructures::markReachableFunctionsExternallyAccessible(DSNode *N, hash_set &Visited) { - if (Visited.count(N)) return; + if (!N || Visited.count(N)) return; Visited.insert(N); for (unsigned i = 0, e = N->getNumLinks(); i != e; ++i) { @@ -46,6 +46,7 @@ bool TDDataStructures::run(Module &M) { BUDataStructures &BU = getAnalysis(); GlobalsGraph = new DSGraph(BU.getGlobalsGraph()); + GlobalsGraph->setPrintAuxCalls(); // Figure out which functions must not mark their arguments complete because // they are accessible outside this compilation unit. Currently, these @@ -57,6 +58,17 @@ I != E; ++I) if (isa(I->first)) markReachableFunctionsExternallyAccessible(I->second.getNode(), Visited); + + // Loop over unresolved call nodes. Any functions passed into (but not + // returned!?) from unresolvable call nodes may be invoked outside of the + // current module. + const std::vector &Calls = GlobalsGraph->getAuxFunctionCalls(); + for (unsigned i = 0, e = Calls.size(); i != e; ++i) { + const DSCallSite &CS = Calls[i]; + for (unsigned arg = 0, e = CS.getNumPtrArgs(); arg != e; ++arg) + markReachableFunctionsExternallyAccessible(CS.getPtrArg(arg).getNode(), + Visited); + } Visited.clear(); // Functions without internal linkage also have unknown incoming arguments! From lattner at cs.uiuc.edu Sat Sep 20 19:29:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Sep 20 19:29:01 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/DataStructure.h Message-ID: <200309210028.TAA23498@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: DataStructure.h updated: 1.71 -> 1.72 --- Log message: Add prototype --- Diffs of the changes: Index: llvm/include/llvm/Analysis/DataStructure.h diff -u llvm/include/llvm/Analysis/DataStructure.h:1.71 llvm/include/llvm/Analysis/DataStructure.h:1.72 --- llvm/include/llvm/Analysis/DataStructure.h:1.71 Sat Sep 20 11:34:02 2003 +++ llvm/include/llvm/Analysis/DataStructure.h Sat Sep 20 19:28:18 2003 @@ -165,6 +165,9 @@ } private: + void markReachableFunctionsExternallyAccessible(DSNode *N, + hash_set &Visited); + void inlineGraphIntoCallees(DSGraph &G); DSGraph &getOrCreateDSGraph(Function &F); void ComputePostOrder(Function &F, hash_set &Visited, From gaeke at cs.uiuc.edu Sat Sep 20 20:24:01 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Sat Sep 20 20:24:01 2003 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp PhyRegAlloc.h Message-ID: <200309210123.UAA29954@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/RegAlloc: PhyRegAlloc.cpp updated: 1.109 -> 1.110 PhyRegAlloc.h updated: 1.48 -> 1.49 --- Log message: Convert PhyRegAlloc into a proper pass. PhyRegAlloc.cpp: Don't include TargetMachine.h or TargetRegInfo.h, because these are provided by PhyRegAlloc.h. Merge class RegisterAllocator into class PhyRegAlloc. Simplify & move ctor, dtor to PhyRegAlloc.h. Make some of PhyRegAlloc's reference members into pointer members, so they can be more easily messed with. MarkAllocatedRegs() becomes a member method, with fewer args. PhyRegAlloc.h: Include Pass.h, TargetMachine.h and TargetRegInfo.h. Don't declare TargetRegInfo forward. Give AddedInstrns the obvious clear() method. Make some of PhyRegAlloc's reference members into pointer members, so they can be more easily messed with. Add prototype for markAllocatedRegs(). Remove unused inline void constructLiveRanges(). --- Diffs of the changes: Index: llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp diff -u llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp:1.109 llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp:1.110 --- llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp:1.109 Tue Sep 16 10:38:05 2003 +++ llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp Sat Sep 20 20:23:46 2003 @@ -16,10 +16,8 @@ #include "llvm/CodeGen/FunctionLiveVarInfo.h" #include "llvm/CodeGen/InstrSelection.h" #include "llvm/Analysis/LoopInfo.h" -#include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetFrameInfo.h" #include "llvm/Target/TargetInstrInfo.h" -#include "llvm/Target/TargetRegInfo.h" #include "llvm/Function.h" #include "llvm/Type.h" #include "llvm/iOther.h" @@ -42,68 +40,12 @@ clEnumValN(RA_DEBUG_Verbose, "v", "extra debug output"), 0)); -//---------------------------------------------------------------------------- -// RegisterAllocation pass front end... -//---------------------------------------------------------------------------- -namespace { - class RegisterAllocator : public FunctionPass { - TargetMachine &Target; - public: - inline RegisterAllocator(TargetMachine &T) : Target(T) {} - - const char *getPassName() const { return "Register Allocation"; } - - bool runOnFunction(Function &F) { - if (DEBUG_RA) - std::cerr << "\n********* Function "<< F.getName() << " ***********\n"; - - PhyRegAlloc PRA(&F, Target, &getAnalysis(), - &getAnalysis()); - PRA.allocateRegisters(); - - if (DEBUG_RA) std::cerr << "\nRegister allocation complete!\n"; - return false; - } - - virtual void getAnalysisUsage(AnalysisUsage &AU) const { - AU.addRequired(); - AU.addRequired(); - } - }; -} - FunctionPass *getRegisterAllocator(TargetMachine &T) { - return new RegisterAllocator(T); -} - -//---------------------------------------------------------------------------- -// Constructor: Init local composite objects and create register classes. -//---------------------------------------------------------------------------- -PhyRegAlloc::PhyRegAlloc(Function *F, const TargetMachine& tm, - FunctionLiveVarInfo *Lvi, LoopInfo *LDC) - : TM(tm), Fn(F), MF(MachineFunction::get(F)), LVI(Lvi), - LRI(F, tm, RegClassList), MRI(tm.getRegInfo()), - NumOfRegClasses(MRI.getNumOfRegClasses()), LoopDepthCalc(LDC) { - - // create each RegisterClass and put in RegClassList - // - for (unsigned rc=0; rc != NumOfRegClasses; rc++) - RegClassList.push_back(new RegClass(F, &tm.getRegInfo(), - MRI.getMachineRegClass(rc))); + return new PhyRegAlloc (T); } //---------------------------------------------------------------------------- -// Destructor: Deletes register classes -//---------------------------------------------------------------------------- -PhyRegAlloc::~PhyRegAlloc() { - for ( unsigned rc=0; rc < NumOfRegClasses; rc++) - delete RegClassList[rc]; - - AddedInstrMap.clear(); -} - -//---------------------------------------------------------------------------- // This method initially creates interference graphs (one in each reg class) // and IGNodeList (one in each IG). The actual nodes will be pushed later. //---------------------------------------------------------------------------- @@ -111,10 +53,10 @@ if (DEBUG_RA >= RA_DEBUG_LiveRanges) std::cerr << "Creating LR lists ...\n"; // hash map iterator - LiveRangeMapType::const_iterator HMI = LRI.getLiveRangeMap()->begin(); + LiveRangeMapType::const_iterator HMI = LRI->getLiveRangeMap()->begin(); // hash map end - LiveRangeMapType::const_iterator HMIEnd = LRI.getLiveRangeMap()->end(); + LiveRangeMapType::const_iterator HMIEnd = LRI->getLiveRangeMap()->end(); for (; HMI != HMIEnd ; ++HMI ) { if (HMI->first) { @@ -158,7 +100,7 @@ // get the live range of instruction // - const LiveRange *const LROfDef = LRI.getLiveRangeForValue( Def ); + const LiveRange *const LROfDef = LRI->getLiveRangeForValue( Def ); IGNode *const IGNodeOfDef = LROfDef->getUserIGNode(); assert( IGNodeOfDef ); @@ -174,7 +116,7 @@ // get the live range corresponding to live var // - LiveRange *LROfVar = LRI.getLiveRangeForValue(*LIt); + LiveRange *LROfVar = LRI->getLiveRangeForValue(*LIt); // LROfVar can be null if it is a const since a const // doesn't have a dominating def - see Assumptions above @@ -208,7 +150,7 @@ // get the live range corresponding to live var // - LiveRange *const LR = LRI.getLiveRangeForValue(*LIt ); + LiveRange *const LR = LRI->getLiveRangeForValue(*LIt ); // LR can be null if it is a const since a const // doesn't have a dominating def - see Assumptions above @@ -236,7 +178,7 @@ CallArgsDescriptor* argDesc = CallArgsDescriptor::get(MInst); if (const Value *RetVal = argDesc->getReturnValue()) { - LiveRange *RetValLR = LRI.getLiveRangeForValue( RetVal ); + LiveRange *RetValLR = LRI->getLiveRangeForValue( RetVal ); assert( RetValLR && "No LR for RetValue of call"); RetValLR->clearCallInterference(); } @@ -244,7 +186,7 @@ // If the CALL is an indirect call, find the LR of the function pointer. // That has a call interference because it conflicts with outgoing args. if (const Value *AddrVal = argDesc->getIndirectFuncPtr()) { - LiveRange *AddrValLR = LRI.getLiveRangeForValue( AddrVal ); + LiveRange *AddrValLR = LRI->getLiveRangeForValue( AddrVal ); assert( AddrValLR && "No LR for indirect addr val of call"); AddrValLR->setCallInterference(); } @@ -266,7 +208,7 @@ std::cerr << "Creating interference graphs ...\n"; unsigned BBLoopDepthCost; - for (MachineFunction::iterator BBI = MF.begin(), BBE = MF.end(); + for (MachineFunction::iterator BBI = MF->begin(), BBE = MF->end(); BBI != BBE; ++BBI) { const MachineBasicBlock &MBB = *BBI; const BasicBlock *BB = MBB.getBasicBlock(); @@ -307,7 +249,7 @@ // Calculate the spill cost of each live range // - LiveRange *LR = LRI.getLiveRangeForValue(*OpI); + LiveRange *LR = LRI->getLiveRangeForValue(*OpI); if (LR) LR->addSpillCost(BBLoopDepthCost); } @@ -356,12 +298,12 @@ // for (MachineInstr::const_val_op_iterator It1 = MInst->begin(), ItE = MInst->end(); It1 != ItE; ++It1) { - const LiveRange *LROfOp1 = LRI.getLiveRangeForValue(*It1); + const LiveRange *LROfOp1 = LRI->getLiveRangeForValue(*It1); assert((LROfOp1 || !It1.isUseOnly())&&"No LR for Def in PSEUDO insruction"); MachineInstr::const_val_op_iterator It2 = It1; for (++It2; It2 != ItE; ++It2) { - const LiveRange *LROfOp2 = LRI.getLiveRangeForValue(*It2); + const LiveRange *LROfOp2 = LRI->getLiveRangeForValue(*It2); if (LROfOp2) { RegClass *RCOfOp1 = LROfOp1->getRegClass(); @@ -489,9 +431,7 @@ } } -static bool MarkAllocatedRegs(MachineInstr* MInst, - LiveRangeInfo& LRI, - const TargetRegInfo& MRI) +bool PhyRegAlloc::markAllocatedRegs(MachineInstr* MInst) { bool instrNeedsSpills = false; @@ -506,7 +446,7 @@ Op.getType() == MachineOperand::MO_CCRegister) { const Value *const Val = Op.getVRegValue(); - if (const LiveRange* LR = LRI.getLiveRangeForValue(Val)) { + if (const LiveRange* LR = LRI->getLiveRangeForValue(Val)) { // Remember if any operand needs spilling instrNeedsSpills |= LR->isMarkedForSpill(); @@ -529,10 +469,10 @@ unsigned Opcode = MInst->getOpCode(); // Reset tmp stack positions so they can be reused for each machine instr. - MF.getInfo()->popAllTempValues(); + MF->getInfo()->popAllTempValues(); // Mark the operands for which regs have been allocated. - bool instrNeedsSpills = MarkAllocatedRegs(*MII, LRI, MRI); + bool instrNeedsSpills = markAllocatedRegs(*MII); #ifndef NDEBUG // Mark that the operands have been updated. Later, @@ -563,7 +503,7 @@ Op.getType() == MachineOperand::MO_CCRegister) { const Value* Val = Op.getVRegValue(); - if (const LiveRange *LR = LRI.getLiveRangeForValue(Val)) + if (const LiveRange *LR = LRI->getLiveRangeForValue(Val)) if (LR->isMarkedForSpill()) insertCode4SpilledLR(LR, MII, MBB, OpNum); } @@ -573,14 +513,14 @@ void PhyRegAlloc::updateMachineCode() { // Insert any instructions needed at method entry - MachineBasicBlock::iterator MII = MF.front().begin(); - PrependInstructions(AddedInstrAtEntry.InstrnsBefore, MF.front(), MII, + MachineBasicBlock::iterator MII = MF->front().begin(); + PrependInstructions(AddedInstrAtEntry.InstrnsBefore, MF->front(), MII, "At function entry: \n"); assert(AddedInstrAtEntry.InstrnsAfter.empty() && "InstrsAfter should be unnecessary since we are just inserting at " "the function entry point here."); - for (MachineFunction::iterator BBI = MF.begin(), BBE = MF.end(); + for (MachineFunction::iterator BBI = MF->begin(), BBE = MF->end(); BBI != BBE; ++BBI) { MachineBasicBlock &MBB = *BBI; @@ -762,7 +702,7 @@ } #endif - MF.getInfo()->pushTempValue(MRI.getSpilledRegSize(RegType) ); + MF->getInfo()->pushTempValue(MRI.getSpilledRegSize(RegType) ); std::vector MIBef, MIAft; std::vector AdIMid; @@ -885,7 +825,7 @@ assert(tmpRetVal->getOperand(0) == origRetVal && tmpRetVal->getType() == origRetVal->getType() && "Wrong implicit ref?"); - LiveRange *RetValLR = LRI.getLiveRangeForValue(tmpRetVal); + LiveRange *RetValLR = LRI->getLiveRangeForValue(tmpRetVal); assert(RetValLR && "No LR for RetValue of call"); if (! RetValLR->isMarkedForSpill()) @@ -900,7 +840,7 @@ for( ; LIt != LVSetAft.end(); ++LIt) { // get the live range corresponding to live var - LiveRange *const LR = LRI.getLiveRangeForValue(*LIt); + LiveRange *const LR = LRI->getLiveRangeForValue(*LIt); // LR can be null if it is a const since a const // doesn't have a dominating def - see Assumptions above @@ -935,7 +875,7 @@ // call instruction // int StackOff = - MF.getInfo()->pushTempValue(MRI.getSpilledRegSize(RegType)); + MF->getInfo()->pushTempValue(MRI.getSpilledRegSize(RegType)); //---- Insert code for pushing the reg on stack ---------- @@ -1044,7 +984,7 @@ // we couldn't find an unused register. Generate code to free up a reg by // saving it on stack and restoring after the instruction - int TmpOff = MF.getInfo()->pushTempValue(MRI.getSpilledRegSize(RegType)); + int TmpOff = MF->getInfo()->pushTempValue(MRI.getSpilledRegSize(RegType)); RegU = getUniRegNotUsedByThisInst(RC, RegType, MInst); @@ -1102,7 +1042,7 @@ for ( ; LIt != LVSetBef->end(); ++LIt) { // get the live range corresponding to live var, and its RegClass - LiveRange *const LRofLV = LRI.getLiveRangeForValue(*LIt ); + LiveRange *const LRofLV = LRI->getLiveRangeForValue(*LIt ); // LR can be null if it is a const since a const // doesn't have a dominating def - see Assumptions above @@ -1187,7 +1127,7 @@ // for (unsigned z=0; z < MI->getNumImplicitRefs(); z++) if (const LiveRange* - LRofImpRef = LRI.getLiveRangeForValue(MI->getImplicitRef(z))) + LRofImpRef = LRI->getLiveRangeForValue(MI->getImplicitRef(z))) if (LRofImpRef->hasColor()) // this implicit reference is in a LR that received a color RC->markColorsUsed(LRofImpRef->getColor(), @@ -1235,7 +1175,7 @@ std::cerr << "\n;************** Function " << Fn->getName() << " *****************\n"; - for (MachineFunction::iterator BBI = MF.begin(), BBE = MF.end(); + for (MachineFunction::iterator BBI = MF->begin(), BBE = MF->end(); BBI != BBE; ++BBI) { std::cerr << "\n"; printLabel(BBI->getBasicBlock()); std::cerr << ": "; @@ -1280,7 +1220,7 @@ if (Op.opIsDefOnly() || Op.opIsDefAndUse()) std::cerr << "*"; - const LiveRange *LROfVal = LRI.getLiveRangeForValue(Val); + const LiveRange *LROfVal = LRI->getLiveRangeForValue(Val); if (LROfVal ) if (LROfVal->hasSpillOffset() ) std::cerr << "$"; @@ -1314,13 +1254,9 @@ std::cerr << "\n"; } - -//---------------------------------------------------------------------------- - -//---------------------------------------------------------------------------- void PhyRegAlloc::colorIncomingArgs() { - MRI.colorMethodArgs(Fn, LRI, AddedInstrAtEntry.InstrnsBefore, + MRI.colorMethodArgs(Fn, *LRI, AddedInstrAtEntry.InstrnsBefore, AddedInstrAtEntry.InstrnsAfter); } @@ -1346,8 +1282,8 @@ void PhyRegAlloc::markUnusableSugColors() { // hash map iterator - LiveRangeMapType::const_iterator HMI = (LRI.getLiveRangeMap())->begin(); - LiveRangeMapType::const_iterator HMIEnd = (LRI.getLiveRangeMap())->end(); + LiveRangeMapType::const_iterator HMI = (LRI->getLiveRangeMap())->begin(); + LiveRangeMapType::const_iterator HMIEnd = (LRI->getLiveRangeMap())->end(); for (; HMI != HMIEnd ; ++HMI ) { if (HMI->first) { @@ -1378,14 +1314,14 @@ void PhyRegAlloc::allocateStackSpace4SpilledLRs() { if (DEBUG_RA) std::cerr << "\nSetting LR stack offsets for spills...\n"; - LiveRangeMapType::const_iterator HMI = LRI.getLiveRangeMap()->begin(); - LiveRangeMapType::const_iterator HMIEnd = LRI.getLiveRangeMap()->end(); + LiveRangeMapType::const_iterator HMI = LRI->getLiveRangeMap()->begin(); + LiveRangeMapType::const_iterator HMIEnd = LRI->getLiveRangeMap()->end(); for ( ; HMI != HMIEnd ; ++HMI) { if (HMI->first && HMI->second) { LiveRange *L = HMI->second; // get the LiveRange if (L->isMarkedForSpill()) { // NOTE: allocating size of long Type ** - int stackOffset = MF.getInfo()->allocateSpilledValue(Type::LongTy); + int stackOffset = MF->getInfo()->allocateSpilledValue(Type::LongTy); L->setSpillOffFromFP(stackOffset); if (DEBUG_RA) std::cerr << " LR# " << L->getUserIGNode()->getIndex() @@ -1395,20 +1331,29 @@ } // for all LR's in hash map } - //---------------------------------------------------------------------------- // The entry point to Register Allocation //---------------------------------------------------------------------------- -void PhyRegAlloc::allocateRegisters() -{ - // make sure that we put all register classes into the RegClassList - // before we call constructLiveRanges (now done in the constructor of - // PhyRegAlloc class). - // - LRI.constructLiveRanges(); // create LR info +bool PhyRegAlloc::runOnFunction (Function &F) { + if (DEBUG_RA) + std::cerr << "\n********* Function "<< F.getName () << " ***********\n"; + + Fn = &F; + MF = &MachineFunction::get (Fn); + LVI = &getAnalysis (); + LRI = new LiveRangeInfo (Fn, TM, RegClassList); + LoopDepthCalc = &getAnalysis (); + + // Create each RegClass for the target machine and add it to the + // RegClassList. This must be done before calling constructLiveRanges(). + for (unsigned rc = 0; rc != NumOfRegClasses; ++rc) + RegClassList.push_back (new RegClass (Fn, &TM.getRegInfo (), + MRI.getMachineRegClass (rc))); + + LRI->constructLiveRanges(); // create LR info if (DEBUG_RA >= RA_DEBUG_LiveRanges) - LRI.printLiveRanges(); + LRI->printLiveRanges(); createIGNodeListsAndIGs(); // create IGNode list and IGs @@ -1424,7 +1369,7 @@ RegClassList[rc]->printIG(); } - LRI.coalesceLRs(); // coalesce all live ranges + LRI->coalesceLRs(); // coalesce all live ranges if (DEBUG_RA >= RA_DEBUG_LiveRanges) { // print all LRs in all reg classes @@ -1436,7 +1381,6 @@ RegClassList[rc]->printIG(); } - // mark un-usable suggested color before graph coloring algorithm. // When this is done, the graph coloring algo will not reserve // suggested color unnecessarily - they can be used by another LR @@ -1454,7 +1398,7 @@ // Reset the temp. area on the stack before use by the first instruction. // This will also happen after updating each instruction. - MF.getInfo()->popAllTempValues(); + MF->getInfo()->popAllTempValues(); // color incoming args - if the correct color was not received // insert code to copy to the correct register @@ -1469,9 +1413,19 @@ if (DEBUG_RA) { std::cerr << "\n**** Machine Code After Register Allocation:\n\n"; - MF.dump(); + MF->dump(); } -} - - + + // Tear down temporary data structures + for (unsigned rc = 0; rc < NumOfRegClasses; ++rc) + delete RegClassList[rc]; + RegClassList.clear (); + AddedInstrMap.clear (); + OperandsColoredMap.clear (); + ScratchRegsUsed.clear (); + AddedInstrAtEntry.clear (); + delete LRI; + if (DEBUG_RA) std::cerr << "\nRegister allocation complete!\n"; + return false; // Function was not modified +} Index: llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h diff -u llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h:1.48 llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h:1.49 --- llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h:1.48 Tue Sep 16 10:36:50 2003 +++ llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h Sat Sep 20 20:23:46 2003 @@ -20,11 +20,13 @@ #define PHY_REG_ALLOC_H #include "LiveRangeInfo.h" +#include "llvm/Pass.h" #include "llvm/CodeGen/MachineBasicBlock.h" +#include "llvm/Target/TargetRegInfo.h" +#include "llvm/Target/TargetMachine.h" #include class MachineFunction; -class TargetRegInfo; class FunctionLiveVarInfo; class MachineInstr; class LoopInfo; @@ -42,22 +44,23 @@ struct AddedInstrns { std::vector InstrnsBefore;//Insts added BEFORE an existing inst std::vector InstrnsAfter; //Insts added AFTER an existing inst + inline void clear () { InstrnsBefore.clear (); InstrnsAfter.clear (); } }; //---------------------------------------------------------------------------- // class PhyRegAlloc: -// Main class the register allocator. Call allocateRegisters() to allocate +// Main class the register allocator. Call runOnFunction() to allocate // registers for a Function. //---------------------------------------------------------------------------- -class PhyRegAlloc { +class PhyRegAlloc : public FunctionPass { std::vector RegClassList; // vector of register classes const TargetMachine &TM; // target machine const Function *Fn; // name of the function we work on - MachineFunction &MF; // descriptor for method's native code - FunctionLiveVarInfo *const LVI; // LV information for this method + MachineFunction *MF; // descriptor for method's native code + FunctionLiveVarInfo *LVI; // LV information for this method // (already computed for BBs) - LiveRangeInfo LRI; // LR info (will be computed) + LiveRangeInfo *LRI; // LR info (will be computed) const TargetRegInfo &MRI; // Machine Register information const unsigned NumOfRegClasses; // recorded here for efficiency @@ -74,19 +77,29 @@ ScratchRegsUsedTy ScratchRegsUsed; AddedInstrns AddedInstrAtEntry; // to store instrns added at entry - LoopInfo *LoopDepthCalc; // to calculate loop depths + const LoopInfo *LoopDepthCalc; // to calculate loop depths PhyRegAlloc(const PhyRegAlloc&); // DO NOT IMPLEMENT void operator=(const PhyRegAlloc&); // DO NOT IMPLEMENT public: - PhyRegAlloc(Function *F, const TargetMachine& TM, FunctionLiveVarInfo *Lvi, - LoopInfo *LoopDepthCalc); - ~PhyRegAlloc(); - - // main method called for allocating registers - // - void allocateRegisters(); + inline PhyRegAlloc (const TargetMachine &TM_) : + TM (TM_), MRI (TM.getRegInfo ()), + NumOfRegClasses (MRI.getNumOfRegClasses ()) { } + virtual ~PhyRegAlloc() { } + + /// runOnFunction - Main method called for allocating registers. + /// + virtual bool runOnFunction (Function &F); + + virtual void getAnalysisUsage (AnalysisUsage &AU) const { + AU.addRequired (); + AU.addRequired (); + } + const char *getPassName () const { + return "Traditional graph-coloring reg. allocator"; + } + // access to register classes by class ID // const RegClass* getRegClassByID(unsigned id) const { @@ -99,6 +112,7 @@ private: void addInterference(const Value *Def, const ValueSet *LVSet, bool isCallInst); + bool markAllocatedRegs(MachineInstr* MInst); void addInterferencesForArgs(); void createIGNodeListsAndIGs(); @@ -123,8 +137,6 @@ std::vector& instrnsAfter, MachineInstr *CallMI, const BasicBlock *BB); - - inline void constructLiveRanges() { LRI.constructLiveRanges(); } void colorIncomingArgs(); void colorCallRetArgs(); From gaeke at cs.uiuc.edu Sat Sep 20 21:25:01 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Sat Sep 20 21:25:01 2003 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp PhyRegAlloc.h Message-ID: <200309210224.VAA03485@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/RegAlloc: PhyRegAlloc.cpp updated: 1.110 -> 1.111 PhyRegAlloc.h updated: 1.49 -> 1.50 --- Log message: I tried to standardize the formatting and tidy up the huge amount of excess whitespace a little. Also improved some comments. --- Diffs of the changes: Index: llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp diff -u llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp:1.110 llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp:1.111 --- llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp:1.110 Sat Sep 20 20:23:46 2003 +++ llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp Sat Sep 20 21:24:09 2003 @@ -95,11 +95,9 @@ void PhyRegAlloc::addInterference(const Value *Def, const ValueSet *LVSet, bool isCallInst) { - ValueSet::const_iterator LIt = LVSet->begin(); // get the live range of instruction - // const LiveRange *const LROfDef = LRI->getLiveRangeForValue( Def ); IGNode *const IGNodeOfDef = LROfDef->getUserIGNode(); @@ -108,19 +106,16 @@ RegClass *const RCOfDef = LROfDef->getRegClass(); // for each live var in live variable set - // for ( ; LIt != LVSet->end(); ++LIt) { if (DEBUG_RA >= RA_DEBUG_Verbose) std::cerr << "< Def=" << RAV(Def) << ", Lvar=" << RAV(*LIt) << "> "; // get the live range corresponding to live var - // LiveRange *LROfVar = LRI->getLiveRangeForValue(*LIt); // LROfVar can be null if it is a const since a const // doesn't have a dominating def - see Assumptions above - // if (LROfVar) if (LROfDef != LROfVar) // do not set interf for same LR if (RCOfDef == LROfVar->getRegClass()) // 2 reg classes are the same @@ -129,7 +124,6 @@ } - //---------------------------------------------------------------------------- // For a call instruction, this method sets the CallInterference flag in // the LR of each variable live int the Live Variable Set live after the @@ -139,22 +133,18 @@ void PhyRegAlloc::setCallInterferences(const MachineInstr *MInst, const ValueSet *LVSetAft) { - if (DEBUG_RA >= RA_DEBUG_Interference) std::cerr << "\n For call inst: " << *MInst; // for each live var in live variable set after machine inst - // for (ValueSet::const_iterator LIt = LVSetAft->begin(), LEnd = LVSetAft->end(); LIt != LEnd; ++LIt) { // get the live range corresponding to live var - // LiveRange *const LR = LRI->getLiveRangeForValue(*LIt ); // LR can be null if it is a const since a const // doesn't have a dominating def - see Assumptions above - // if (LR ) { if (DEBUG_RA >= RA_DEBUG_Interference) { std::cerr << "\n\tLR after Call: "; @@ -174,7 +164,6 @@ // to determine, which LRs must be saved across calls. The return value // of the call is live in this set - but it does not interfere with call // (i.e., we can allocate a volatile register to the return value) - // CallArgsDescriptor* argDesc = CallArgsDescriptor::get(MInst); if (const Value *RetVal = argDesc->getReturnValue()) { @@ -190,20 +179,17 @@ assert( AddrValLR && "No LR for indirect addr val of call"); AddrValLR->setCallInterference(); } - } - - //---------------------------------------------------------------------------- // This method will walk thru code and create interferences in the IG of // each RegClass. Also, this method calculates the spill cost of each // Live Range (it is done in this method to save another pass over the code). //---------------------------------------------------------------------------- + void PhyRegAlloc::buildInterferenceGraphs() { - if (DEBUG_RA >= RA_DEBUG_Interference) std::cerr << "Creating interference graphs ...\n"; @@ -214,20 +200,16 @@ const BasicBlock *BB = MBB.getBasicBlock(); // find the 10^(loop_depth) of this BB - // BBLoopDepthCost = (unsigned)pow(10.0, LoopDepthCalc->getLoopDepth(BB)); // get the iterator for machine instructions - // MachineBasicBlock::const_iterator MII = MBB.begin(); // iterate over all the machine instructions in BB - // for ( ; MII != MBB.end(); ++MII) { const MachineInstr *MInst = *MII; // get the LV set after the instruction - // const ValueSet &LVSetAI = LVI->getLiveVarSetAfterMInst(MInst, BB); bool isCallInst = TM.getInstrInfo().isCall(MInst->getOpCode()); @@ -236,33 +218,26 @@ // across this call instruction. This information is used by graph // coloring algorithm to avoid allocating volatile colors to live ranges // that span across calls (since they have to be saved/restored) - // setCallInterferences(MInst, &LVSetAI); } // iterate over all MI operands to find defs - // for (MachineInstr::const_val_op_iterator OpI = MInst->begin(), OpE = MInst->end(); OpI != OpE; ++OpI) { if (OpI.isDefOnly() || OpI.isDefAndUse()) // create a new LR since def addInterference(*OpI, &LVSetAI, isCallInst); // Calculate the spill cost of each live range - // LiveRange *LR = LRI->getLiveRangeForValue(*OpI); if (LR) LR->addSpillCost(BBLoopDepthCost); } - // if there are multiple defs in this instruction e.g. in SETX - // if (TM.getInstrInfo().isPseudoInstr(MInst->getOpCode())) addInterf4PseudoInstr(MInst); - // Also add interference for any implicit definitions in a machine // instr (currently, only calls have this). - // unsigned NumOfImpRefs = MInst->getNumImplicitRefs(); for (unsigned z=0; z < NumOfImpRefs; z++) if (MInst->getImplicitOp(z).opIsDefOnly() || @@ -272,10 +247,8 @@ } // for all machine instructions in BB } // for all BBs in function - // add interferences for function arguments. Since there are no explicit // defs in the function for args, we have to add them manually - // addInterferencesForArgs(); if (DEBUG_RA >= RA_DEBUG_Interference) @@ -283,19 +256,17 @@ } - //-------------------------------------------------------------------------- -// Pseudo-instructions will be expanded to multiple instructions by the -// assembler. Consequently, all the opernds must get distinct registers. -// Therefore, we mark all operands of a pseudo instruction as they interfere +// Pseudo-instructions may be expanded to multiple instructions by the +// assembler. Consequently, all the operands must get distinct registers. +// Therefore, we mark all operands of a pseudo-instruction as interfering // with one another. //-------------------------------------------------------------------------- -void PhyRegAlloc::addInterf4PseudoInstr(const MachineInstr *MInst) { +void PhyRegAlloc::addInterf4PseudoInstr(const MachineInstr *MInst) { bool setInterf = false; - // iterate over MI operands to find defs - // + // iterate over MI operands to find defs for (MachineInstr::const_val_op_iterator It1 = MInst->begin(), ItE = MInst->end(); It1 != ItE; ++It1) { const LiveRange *LROfOp1 = LRI->getLiveRangeForValue(*It1); @@ -325,9 +296,8 @@ } - //---------------------------------------------------------------------------- -// This method will add interferences for incoming arguments to a function. +// This method adds interferences for incoming arguments to a function. //---------------------------------------------------------------------------- void PhyRegAlloc::addInterferencesForArgs() { @@ -438,7 +408,6 @@ // First, set the registers for operands in the machine instruction // if a register was successfully allocated. Do this first because we // will need to know which registers are already used by this instr'n. - // for (unsigned OpNum=0; OpNum < MInst->getNumOperands(); ++OpNum) { MachineOperand& Op = MInst->getOperand(OpNum); @@ -485,7 +454,6 @@ // Now insert caller-saving code before/after the call. // Do this before inserting spill code since some registers must be // used by save/restore and spill code should not use those registers. - // if (TM.getInstrInfo().isCall(Opcode)) { AddedInstrns &AI = AddedInstrMap[MInst]; insertCallerSavingCode(AI.InstrnsBefore, AI.InstrnsAfter, MInst, @@ -546,7 +514,6 @@ // // If the annul bit of the branch is set, neither of these is legal! // If so, we need to handle spill differently but annulling is not yet used. - // for (MachineBasicBlock::iterator MII = MBB.begin(); MII != MBB.end(); ++MII) if (unsigned delaySlots = @@ -597,7 +564,6 @@ } // Finally iterate over all instructions in BB and insert before/after - // for (MachineBasicBlock::iterator MII=MBB.begin(); MII != MBB.end(); ++MII) { MachineInstr *MInst = *MII; @@ -623,7 +589,6 @@ // Temporary sanity checking code to detect whether the same machine // instruction is ever inserted twice before/after a call. // I suspect this is happening but am not sure. --Vikram, 7/1/03. - // std::set instrsSeen; for (int i = 0, N = CallAI.InstrnsBefore.size(); i < N; ++i) { assert(instrsSeen.count(CallAI.InstrnsBefore[i]) == 0 && @@ -640,7 +605,6 @@ // Now add the instructions before/after this MI. // We do this here to ensure that spill for an instruction is inserted // as close as possible to an instruction (see above insertCode4Spill) - // if (! CallAI.InstrnsBefore.empty()) PrependInstructions(CallAI.InstrnsBefore, MBB, MII,""); @@ -648,14 +612,11 @@ AppendInstructions(CallAI.InstrnsAfter, MBB, MII,""); } // if there are any added instructions - } // for each machine instruction - } } - //---------------------------------------------------------------------------- // This method inserts spill code for AN operand whose LR was spilled. // This method may be called several times for a single machine instruction @@ -669,7 +630,6 @@ MachineBasicBlock::iterator& MII, MachineBasicBlock &MBB, const unsigned OpNum) { - MachineInstr *MInst = *MII; const BasicBlock *BB = MBB.getBasicBlock(); @@ -692,7 +652,6 @@ // If this instr. is in the delay slot of a branch or return, we need to // include all live variables before that branch or return -- we don't want to // trample those! Verify that the set is included in the LV set before MInst. - // if (MII != MBB.begin()) { MachineInstr *PredMI = *(MII-1); if (unsigned DS = TM.getInstrInfo().getNumDelaySlots(PredMI->getOpCode())) @@ -773,7 +732,6 @@ } - //---------------------------------------------------------------------------- // This method inserts caller saving/restoring instructions before/after // a call machine instruction. The caller saving/restoring instructions are @@ -793,8 +751,7 @@ { assert(TM.getInstrInfo().isCall(CallMI->getOpCode())); - // has set to record which registers were saved/restored - // + // hash set to record which registers were saved/restored hash_set PushedRegSet; CallArgsDescriptor* argDesc = CallArgsDescriptor::get(CallMI); @@ -804,7 +761,6 @@ // restore for volatile regs. // // FIXME: this should be made general, not specific to the reoptimizer! - // const Function *Callee = argDesc->getCallInst()->getCalledFunction(); bool isLLVMFirstTrigger = Callee && Callee->getName() == "llvm_first_trigger"; @@ -816,7 +772,6 @@ // We do this because, we look at the LV set *after* the instruction // to determine, which LRs must be saved across calls. The return value // of the call is live in this set - but we must not save/restore it. - // if (const Value *origRetVal = argDesc->getReturnValue()) { unsigned retValRefNum = (CallMI->getNumImplicitRefs() - (argDesc->getIndirectFuncPtr()? 1 : 2)); @@ -838,42 +793,35 @@ // for each live var in live variable set after machine inst for( ; LIt != LVSetAft.end(); ++LIt) { - - // get the live range corresponding to live var + // get the live range corresponding to live var LiveRange *const LR = LRI->getLiveRangeForValue(*LIt); // LR can be null if it is a const since a const // doesn't have a dominating def - see Assumptions above if( LR ) { - if(! LR->isMarkedForSpill()) { - assert(LR->hasColor() && "LR is neither spilled nor colored?"); unsigned RCID = LR->getRegClassID(); unsigned Color = LR->getColor(); if (MRI.isRegVolatile(RCID, Color) ) { - - //if the function is special LLVM function, - //And the register is not modified by call, don't save and restore + // if this is a call to the first-level reoptimizer + // instrumentation entry point, and the register is not + // modified by call, don't save and restore it. if (isLLVMFirstTrigger && !MRI.modifiedByCall(RCID, Color)) continue; // if the value is in both LV sets (i.e., live before and after // the call machine instruction) - unsigned Reg = MRI.getUnifiedRegNum(RCID, Color); + // if we haven't already pushed this register... if( PushedRegSet.find(Reg) == PushedRegSet.end() ) { - - // if we haven't already pushed that register - unsigned RegType = MRI.getRegTypeForLR(LR); // Now get two instructions - to push on stack and pop from stack // and add them to InstrnsBefore and InstrnsAfter of the // call instruction - // int StackOff = MF->getInfo()->pushTempValue(MRI.getSpilledRegSize(RegType)); @@ -917,7 +865,6 @@ // from memory. This may itself have to insert code to // free up a scratch register. Any such code should go // after the save code. As above, scratch is not marked "used". - // scratchRegType = -1; scratchReg = -1; if (MRI.regTypeNeedsScratchReg(RegType, scratchRegType)) @@ -950,13 +897,9 @@ std::mem_fun(&MachineInstr::dump)); } } // if not already pushed - } // if LR has a volatile color - } // if LR has color - } // if there is a LR for Var - } // for each value in the LV set after instruction } @@ -975,7 +918,6 @@ MachineInstr *MInst, std::vector& MIBef, std::vector& MIAft) { - RegClass* RC = getRegClassByID(MRI.getRegClassIDOfRegType(RegType)); int RegU = getUnusedUniRegAtMI(RC, RegType, MInst, LVSetBef); @@ -1028,7 +970,6 @@ const int RegType, const MachineInstr *MInst, const ValueSet* LVSetBef) { - RC->clearColorsUsed(); // Reset array if (LVSetBef == NULL) { @@ -1040,8 +981,7 @@ // for each live var in live variable set after machine inst for ( ; LIt != LVSetBef->end(); ++LIt) { - - // get the live range corresponding to live var, and its RegClass + // Get the live range corresponding to live var, and its RegClass LiveRange *const LRofLV = LRI->getLiveRangeForValue(*LIt ); // LR can be null if it is a const since a const @@ -1054,7 +994,6 @@ // It is possible that one operand of this MInst was already spilled // and it received some register temporarily. If that's the case, // it is recorded in machine operand. We must skip such registers. - // setRelRegsUsedByThisInst(RC, RegType, MInst); int unusedReg = RC->getUnusedColor(RegType); // find first unused color @@ -1069,6 +1008,7 @@ // Get any other register in a register class, other than what is used // by operands of a machine instruction. Returns the unified reg number. //---------------------------------------------------------------------------- + int PhyRegAlloc::getUniRegNotUsedByThisInst(RegClass *RC, const int RegType, const MachineInstr *MInst) { @@ -1124,7 +1064,6 @@ markRegisterUsed(I->second, RC, RegType, MRI); // If there are implicit references, mark their allocated regs as well - // for (unsigned z=0; z < MI->getNumImplicitRefs(); z++) if (const LiveRange* LRofImpRef = LRI->getLiveRangeForValue(MI->getImplicitRef(z))) @@ -1165,94 +1104,6 @@ OrigAft.clear(); } -//---------------------------------------------------------------------------- -// This method prints the code with registers after register allocation is -// complete. -//---------------------------------------------------------------------------- -void PhyRegAlloc::printMachineCode() -{ - - std::cerr << "\n;************** Function " << Fn->getName() - << " *****************\n"; - - for (MachineFunction::iterator BBI = MF->begin(), BBE = MF->end(); - BBI != BBE; ++BBI) { - std::cerr << "\n"; printLabel(BBI->getBasicBlock()); std::cerr << ": "; - - // get the iterator for machine instructions - MachineBasicBlock& MBB = *BBI; - MachineBasicBlock::iterator MII = MBB.begin(); - - // iterate over all the machine instructions in BB - for ( ; MII != MBB.end(); ++MII) { - MachineInstr *MInst = *MII; - - std::cerr << "\n\t"; - std::cerr << TM.getInstrInfo().getName(MInst->getOpCode()); - - for (unsigned OpNum=0; OpNum < MInst->getNumOperands(); ++OpNum) { - MachineOperand& Op = MInst->getOperand(OpNum); - - if (Op.getType() == MachineOperand::MO_VirtualRegister || - Op.getType() == MachineOperand::MO_CCRegister /*|| - Op.getType() == MachineOperand::MO_PCRelativeDisp*/ ) { - - const Value *const Val = Op.getVRegValue () ; - // ****this code is temporary till NULL Values are fixed - if (! Val ) { - std::cerr << "\t<*NULL*>"; - continue; - } - - // if a label or a constant - if (isa(Val)) { - std::cerr << "\t"; printLabel( Op.getVRegValue () ); - } else { - // else it must be a register value - const int RegNum = Op.getAllocatedRegNum(); - - std::cerr << "\t" << "%" << MRI.getUnifiedRegName( RegNum ); - if (Val->hasName() ) - std::cerr << "(" << Val->getName() << ")"; - else - std::cerr << "(" << Val << ")"; - - if (Op.opIsDefOnly() || Op.opIsDefAndUse()) - std::cerr << "*"; - - const LiveRange *LROfVal = LRI->getLiveRangeForValue(Val); - if (LROfVal ) - if (LROfVal->hasSpillOffset() ) - std::cerr << "$"; - } - - } - else if (Op.getType() == MachineOperand::MO_MachineRegister) { - std::cerr << "\t%" << MRI.getUnifiedRegName(Op.getMachineRegNum()); - } - - else - std::cerr << "\t" << Op; // use dump field - } - - - - unsigned NumOfImpRefs = MInst->getNumImplicitRefs(); - if (NumOfImpRefs > 0) { - std::cerr << "\tImplicit:"; - - for (unsigned z=0; z < NumOfImpRefs; z++) - std::cerr << RAV(MInst->getImplicitRef(z)) << "\t"; - } - - } // for all machine instructions - - std::cerr << "\n"; - - } // for all BBs - - std::cerr << "\n"; -} void PhyRegAlloc::colorIncomingArgs() { @@ -1262,17 +1113,6 @@ //---------------------------------------------------------------------------- -// Used to generate a label for a basic block -//---------------------------------------------------------------------------- -void PhyRegAlloc::printLabel(const Value *Val) { - if (Val->hasName()) - std::cerr << Val->getName(); - else - std::cerr << "Label" << Val; -} - - -//---------------------------------------------------------------------------- // This method calls setSugColorUsable method of each live range. This // will determine whether the suggested color of LR is really usable. // A suggested color is not usable when the suggested color is volatile @@ -1281,29 +1121,27 @@ void PhyRegAlloc::markUnusableSugColors() { - // hash map iterator LiveRangeMapType::const_iterator HMI = (LRI->getLiveRangeMap())->begin(); LiveRangeMapType::const_iterator HMIEnd = (LRI->getLiveRangeMap())->end(); - for (; HMI != HMIEnd ; ++HMI ) { - if (HMI->first) { - LiveRange *L = HMI->second; // get the LiveRange - if (L) { - if (L->hasSuggestedColor()) { - int RCID = L->getRegClass()->getID(); - if (MRI.isRegVolatile( RCID, L->getSuggestedColor()) && - L->isCallInterference() ) - L->setSuggestedColorUsable( false ); - else - L->setSuggestedColorUsable( true ); - } - } // if L->hasSuggestedColor() - } - } // for all LR's in hash map + for (; HMI != HMIEnd ; ++HMI ) { + if (HMI->first) { + LiveRange *L = HMI->second; // get the LiveRange + if (L) { + if (L->hasSuggestedColor()) { + int RCID = L->getRegClass()->getID(); + if (MRI.isRegVolatile( RCID, L->getSuggestedColor()) && + L->isCallInterference() ) + L->setSuggestedColorUsable( false ); + else + L->setSuggestedColorUsable( true ); + } + } // if L->hasSuggestedColor() + } + } // for all LR's in hash map } - //---------------------------------------------------------------------------- // The following method will set the stack offsets of the live ranges that // are decided to be spilled. This must be called just after coloring the @@ -1384,7 +1222,6 @@ // mark un-usable suggested color before graph coloring algorithm. // When this is done, the graph coloring algo will not reserve // suggested color unnecessarily - they can be used by another LR - // markUnusableSugColors(); // color all register classes using the graph coloring algo @@ -1393,7 +1230,6 @@ // After graph coloring, if some LRs did not receive a color (i.e, spilled) // a position for such spilled LRs - // allocateStackSpace4SpilledLRs(); // Reset the temp. area on the stack before use by the first instruction. @@ -1402,13 +1238,11 @@ // color incoming args - if the correct color was not received // insert code to copy to the correct register - // colorIncomingArgs(); // Now update the machine code with register names and add any // additional code inserted by the register allocator to the instruction // stream - // updateMachineCode(); if (DEBUG_RA) { Index: llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h diff -u llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h:1.49 llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h:1.50 --- llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h:1.49 Sat Sep 20 20:23:46 2003 +++ llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h Sat Sep 20 21:24:09 2003 @@ -99,15 +99,11 @@ const char *getPassName () const { return "Traditional graph-coloring reg. allocator"; } - - // access to register classes by class ID - // - const RegClass* getRegClassByID(unsigned id) const { - return RegClassList[id]; - } - RegClass* getRegClassByID(unsigned id) { + + inline const RegClass* getRegClassByID(unsigned id) const { return RegClassList[id]; } + inline RegClass *getRegClassByID(unsigned id) { return RegClassList[id]; } private: void addInterference(const Value *Def, const ValueSet *LVSet, @@ -146,7 +142,6 @@ void printLabel(const Value *Val); void printMachineCode(); - int getUsableUniRegAtMI(int RegType, const ValueSet *LVSetBef, MachineInstr *MI, From gaeke at cs.uiuc.edu Sat Sep 20 21:32:01 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Sat Sep 20 21:32:01 2003 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/RegAlloc/InterferenceGraph.h LiveRange.h LiveRangeInfo.h RegAllocCommon.h RegClass.h Message-ID: <200309210231.VAA04207@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/RegAlloc: InterferenceGraph.h updated: 1.4 -> 1.5 LiveRange.h updated: 1.21 -> 1.22 LiveRangeInfo.h updated: 1.19 -> 1.20 RegAllocCommon.h updated: 1.9 -> 1.10 RegClass.h updated: 1.18 -> 1.19 --- Log message: Standardize the names of include guards. --- Diffs of the changes: Index: llvm/lib/CodeGen/RegAlloc/InterferenceGraph.h diff -u llvm/lib/CodeGen/RegAlloc/InterferenceGraph.h:1.4 llvm/lib/CodeGen/RegAlloc/InterferenceGraph.h:1.5 --- llvm/lib/CodeGen/RegAlloc/InterferenceGraph.h:1.4 Tue Oct 29 10:50:06 2002 +++ llvm/lib/CodeGen/RegAlloc/InterferenceGraph.h Sat Sep 20 21:31:37 2003 @@ -17,9 +17,8 @@ setCurDegreeOfIGNodes() before pushing IGNodes on to stack for coloring. */ - -#ifndef INTERFERENCE_GRAPH_H -#define INTERFERENCE_GRAPH_H +#ifndef INTERFERENCEGRAPH_H +#define INTERFERENCEGRAPH_H #include class LiveRange; Index: llvm/lib/CodeGen/RegAlloc/LiveRange.h diff -u llvm/lib/CodeGen/RegAlloc/LiveRange.h:1.21 llvm/lib/CodeGen/RegAlloc/LiveRange.h:1.22 --- llvm/lib/CodeGen/RegAlloc/LiveRange.h:1.21 Thu Jul 10 14:45:28 2003 +++ llvm/lib/CodeGen/RegAlloc/LiveRange.h Sat Sep 20 21:31:37 2003 @@ -8,8 +8,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LIVE_RANGE_H -#define LIVE_RANGE_H +#ifndef LIVERANGE_H +#define LIVERANGE_H #include "llvm/CodeGen/ValueSet.h" #include "llvm/Value.h" Index: llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.h diff -u llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.h:1.19 llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.h:1.20 --- llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.h:1.19 Mon Sep 15 00:28:42 2003 +++ llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.h Sat Sep 20 21:31:37 2003 @@ -16,8 +16,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LIVE_RANGE_INFO_H -#define LIVE_RANGE_INFO_H +#ifndef LIVERANGEINFO_H +#define LIVERANGEINFO_H #include "llvm/CodeGen/ValueSet.h" #include "Support/hash_map" Index: llvm/lib/CodeGen/RegAlloc/RegAllocCommon.h diff -u llvm/lib/CodeGen/RegAlloc/RegAllocCommon.h:1.9 llvm/lib/CodeGen/RegAlloc/RegAllocCommon.h:1.10 --- llvm/lib/CodeGen/RegAlloc/RegAllocCommon.h:1.9 Sat Sep 14 18:04:52 2002 +++ llvm/lib/CodeGen/RegAlloc/RegAllocCommon.h Sat Sep 20 21:31:37 2003 @@ -4,8 +4,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_CODEGEN_REGALLOCCOMMON_H -#define LLVM_CODEGEN_REGALLOCCOMMON_H +#ifndef REGALLOCCOMMON_H +#define REGALLOCCOMMON_H enum RegAllocDebugLevel_t { RA_DEBUG_None = 0, Index: llvm/lib/CodeGen/RegAlloc/RegClass.h diff -u llvm/lib/CodeGen/RegAlloc/RegClass.h:1.18 llvm/lib/CodeGen/RegAlloc/RegClass.h:1.19 --- llvm/lib/CodeGen/RegAlloc/RegClass.h:1.18 Thu Aug 21 17:10:24 2003 +++ llvm/lib/CodeGen/RegAlloc/RegClass.h Sat Sep 20 21:31:37 2003 @@ -5,8 +5,8 @@ */ -#ifndef REG_CLASS_H -#define REG_CLASS_H +#ifndef REGCLASS_H +#define REGCLASS_H #include "llvm/Target/TargetRegInfo.h" #include "InterferenceGraph.h" From gaeke at cs.uiuc.edu Sat Sep 20 21:32:10 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Sat Sep 20 21:32:10 2003 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/RegAlloc/IGNode.h Message-ID: <200309210231.VAA04213@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/RegAlloc: IGNode.h updated: 1.14 -> 1.15 --- Log message: Standardize the names of include guards. Fix typos in file header comment. --- Diffs of the changes: Index: llvm/lib/CodeGen/RegAlloc/IGNode.h diff -u llvm/lib/CodeGen/RegAlloc/IGNode.h:1.14 llvm/lib/CodeGen/RegAlloc/IGNode.h:1.15 --- llvm/lib/CodeGen/RegAlloc/IGNode.h:1.14 Mon Sep 1 15:17:07 2003 +++ llvm/lib/CodeGen/RegAlloc/IGNode.h Sat Sep 20 21:31:15 2003 @@ -9,21 +9,20 @@ The removal of nodes from IG is simulated by decrementing the CurDegree. If this node is put on stack (that is removed from IG), the CurDegree of all - the neighbors are decremented and this node is marked OnSack. Hence + the neighbors are decremented and this node is marked OnStack. Hence the effective neighbors in the AdjList are the ones that do not have the OnStack flag set (therefore, they are in the IG). - The methods that modify/use the CurDegree Must be called only + The methods that modify/use the CurDegree must be called only after all modifications to the IG are over (i.e., all neighbors are fixed). The vector representation is the most efficient one for adj list. - Though nodes are removed when coalsing is done, we access it in sequence + Though nodes are removed when coalescing is done, we access it in sequence for far many times when coloring (colorNode()). - */ -#ifndef IG_NODE_H -#define IG_NODE_H +#ifndef IGNODE_H +#define IGNODE_H #include "LiveRange.h" class RegClass; From gaeke at cs.uiuc.edu Sat Sep 20 21:33:00 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Sat Sep 20 21:33:00 2003 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h Message-ID: <200309210232.VAA04218@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/RegAlloc: PhyRegAlloc.h updated: 1.50 -> 1.51 --- Log message: Standardize the names of include guards. Remove more excess whitespace. --- Diffs of the changes: Index: llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h diff -u llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h:1.50 llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h:1.51 --- llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h:1.50 Sat Sep 20 21:24:09 2003 +++ llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h Sat Sep 20 21:31:25 2003 @@ -16,8 +16,8 @@ except coloring of an individual node are machine independent. */ -#ifndef PHY_REG_ALLOC_H -#define PHY_REG_ALLOC_H +#ifndef PHYREGALLOC_H +#define PHYREGALLOC_H #include "LiveRangeInfo.h" #include "llvm/Pass.h" @@ -167,6 +167,4 @@ void addInterf4PseudoInstr(const MachineInstr *MI); }; - #endif - From gaeke at cs.uiuc.edu Sat Sep 20 21:52:00 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Sat Sep 20 21:52:00 2003 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp Message-ID: <200309210251.VAA06439@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/RegAlloc: PhyRegAlloc.cpp updated: 1.111 -> 1.112 --- Log message: Rearrange #includes ... since there are fewer now I guess it's a win. (I also zapped printMachineCode() and printLabel() at the previous checkin, but forgot to mention it.) --- Diffs of the changes: Index: llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp diff -u llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp:1.111 llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp:1.112 --- llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp:1.111 Sat Sep 20 21:24:09 2003 +++ llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp Sat Sep 20 21:50:21 2003 @@ -4,11 +4,11 @@ // //===----------------------------------------------------------------------===// -#include "llvm/CodeGen/RegisterAllocation.h" #include "PhyRegAlloc.h" #include "RegAllocCommon.h" #include "RegClass.h" #include "IGNode.h" +#include "llvm/CodeGen/MachineInstr.h" #include "llvm/CodeGen/MachineInstrBuilder.h" #include "llvm/CodeGen/MachineInstrAnnot.h" #include "llvm/CodeGen/MachineFunction.h" @@ -16,7 +16,6 @@ #include "llvm/CodeGen/FunctionLiveVarInfo.h" #include "llvm/CodeGen/InstrSelection.h" #include "llvm/Analysis/LoopInfo.h" -#include "llvm/Target/TargetFrameInfo.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Function.h" #include "llvm/Type.h" @@ -1168,6 +1167,7 @@ } } // for all LR's in hash map } + //---------------------------------------------------------------------------- // The entry point to Register Allocation From gaeke at cs.uiuc.edu Sat Sep 20 21:52:10 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Sat Sep 20 21:52:10 2003 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h Message-ID: <200309210251.VAA06448@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/RegAlloc: PhyRegAlloc.h updated: 1.51 -> 1.52 --- Log message: Erase now-unused prototypes. --- Diffs of the changes: Index: llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h diff -u llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h:1.51 llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h:1.52 --- llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h:1.51 Sat Sep 20 21:31:25 2003 +++ llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h Sat Sep 20 21:51:00 2003 @@ -140,9 +140,6 @@ void updateInstruction(MachineBasicBlock::iterator& MII, MachineBasicBlock &MBB); - void printLabel(const Value *Val); - void printMachineCode(); - int getUsableUniRegAtMI(int RegType, const ValueSet *LVSetBef, MachineInstr *MI, std::vector& MIBef, From gaeke at cs.uiuc.edu Sat Sep 20 22:58:01 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Sat Sep 20 22:58:01 2003 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp Message-ID: <200309210357.WAA08677@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/RegAlloc: PhyRegAlloc.cpp updated: 1.112 -> 1.113 --- Log message: Use C++ math header instead of C version. --- Diffs of the changes: Index: llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp diff -u llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp:1.112 llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp:1.113 --- llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp:1.112 Sat Sep 20 21:50:21 2003 +++ llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp Sat Sep 20 22:57:37 2003 @@ -23,7 +23,7 @@ #include "Support/STLExtras.h" #include "Support/SetOperations.h" #include "Support/CommandLine.h" -#include +#include RegAllocDebugLevel_t DEBUG_RA; From lattner at cs.uiuc.edu Sat Sep 20 23:40:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Sep 20 23:40:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/External/SPEC/CFP2000/Makefile Message-ID: <200309210439.XAA24342@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs/External/SPEC/CFP2000: Makefile updated: 1.3 -> 1.4 --- Log message: Use explicit directory names --- Diffs of the changes: Index: llvm/test/Programs/External/SPEC/CFP2000/Makefile diff -u llvm/test/Programs/External/SPEC/CFP2000/Makefile:1.3 llvm/test/Programs/External/SPEC/CFP2000/Makefile:1.4 --- llvm/test/Programs/External/SPEC/CFP2000/Makefile:1.3 Tue Aug 19 16:30:32 2003 +++ llvm/test/Programs/External/SPEC/CFP2000/Makefile Sat Sep 20 23:39:28 2003 @@ -1,3 +1,7 @@ LEVEL = ../../../../.. -PARALLEL_DIRS := $(filter-out %-disabled/, $(sort $(filter-out CVS/, $(wildcard */)))) +PARALLEL_DIRS := \ + 179.art \ + 183.equake \ + 188.ammp + include ${LEVEL}/test/Programs/Makefile.programs From vadve at cs.uiuc.edu Sun Sep 21 02:56:01 2003 From: vadve at cs.uiuc.edu (Vikram Adve) Date: Sun Sep 21 02:56:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Target/Sparc/SparcRegClassInfo.cpp Message-ID: <200309210755.CAA20960@psmith.cs.uiuc.edu> Changes in directory llvm/lib/Target/Sparc: SparcRegClassInfo.cpp updated: 1.27 -> 1.28 --- Log message: Fix assertion so it doesn't not trip incorrectly. --- Diffs of the changes: Index: llvm/lib/Target/Sparc/SparcRegClassInfo.cpp diff -u llvm/lib/Target/Sparc/SparcRegClassInfo.cpp:1.27 llvm/lib/Target/Sparc/SparcRegClassInfo.cpp:1.28 --- llvm/lib/Target/Sparc/SparcRegClassInfo.cpp:1.27 Mon Sep 1 15:00:08 2003 +++ llvm/lib/Target/Sparc/SparcRegClassInfo.cpp Sun Sep 21 02:55:27 2003 @@ -213,10 +213,10 @@ IGNode *NeighIGNode = Node->getAdjIGNode(n); LiveRange *NeighLR = NeighIGNode->getParentLR(); - if (NeighLR->hasColor() && - NeighLR->getType() == Type::DoubleTy) { - assert(IsColorUsedArr[ NeighLR->getColor() ] && - IsColorUsedArr[ NeighLR->getColor()+1 ]); + if (NeighLR->hasColor()) { + assert(IsColorUsedArr[ NeighLR->getColor() ]); + if (NeighLR->getType() == Type::DoubleTy) + assert(IsColorUsedArr[ NeighLR->getColor()+1 ]); } else if (NeighLR->hasSuggestedColor() && NeighLR-> isSuggestedColorUsable() ) { From lattner at cs.uiuc.edu Sun Sep 21 11:58:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Sep 21 11:58:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/GenerateReport.pl Message-ID: <200309211657.LAA01987@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs: GenerateReport.pl updated: 1.14 -> 1.15 --- Log message: Auto escape characters that latex doesn't like --- Diffs of the changes: Index: llvm/test/Programs/GenerateReport.pl diff -u llvm/test/Programs/GenerateReport.pl:1.14 llvm/test/Programs/GenerateReport.pl:1.15 --- llvm/test/Programs/GenerateReport.pl:1.14 Fri Aug 22 19:31:09 2003 +++ llvm/test/Programs/GenerateReport.pl Sun Sep 21 11:56:55 2003 @@ -250,6 +250,9 @@ $Val = &{$LatexColumnFormat{$ColNum}}($Val); } + # Escape illegal latex characters + $Val =~ s/([%#])/\\$1/g; + printf " & %-$FieldWidths[$ColNum]s", $Val; } goto Done; From lattner at cs.uiuc.edu Sun Sep 21 13:45:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Sep 21 13:45:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/External/SPEC/CINT2000/252.eon/ Message-ID: <200309211844.NAA02391@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs/External/SPEC/CINT2000/252.eon: --- Log message: Directory /home/vadve/vadve/Research/DynOpt/CVSRepository/llvm/test/Programs/External/SPEC/CINT2000/252.eon added to the repository --- Diffs of the changes: From lattner at cs.uiuc.edu Sun Sep 21 13:46:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Sep 21 13:46:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/External/SPEC/CINT2000/252.eon/Makefile Message-ID: <200309211845.NAA02415@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs/External/SPEC/CINT2000/252.eon: Makefile added (r1.1) --- Log message: Makefile to include eon, even though it doesn't compile yet --- Diffs of the changes: Index: llvm/test/Programs/External/SPEC/CINT2000/252.eon/Makefile diff -c /dev/null llvm/test/Programs/External/SPEC/CINT2000/252.eon/Makefile:1.1 *** /dev/null Sun Sep 21 13:45:20 2003 --- llvm/test/Programs/External/SPEC/CINT2000/252.eon/Makefile Sun Sep 21 13:45:09 2003 *************** *** 0 **** --- 1,8 ---- + LEVEL = ../../../../../.. + #RUN_OPTIONS = cccp.i -o cccp.s + #STDOUT_FILENAME = cccp.out + + # Yes, we know this is an old crufty C++ benchmark. Don't tell us about it GCC! + CPPFLAGS = -Wno-deprecated + include ../../Makefile.spec + From lattner at cs.uiuc.edu Sun Sep 21 13:47:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Sep 21 13:47:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/External/SPEC/Makefile.spec Message-ID: <200309211846.NAA02478@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs/External/SPEC: Makefile.spec updated: 1.17 -> 1.18 --- Log message: Add explicit -I for the eon benchmark, which #includes it's own header files with <>. *sigh* --- Diffs of the changes: Index: llvm/test/Programs/External/SPEC/Makefile.spec diff -u llvm/test/Programs/External/SPEC/Makefile.spec:1.17 llvm/test/Programs/External/SPEC/Makefile.spec:1.18 --- llvm/test/Programs/External/SPEC/Makefile.spec:1.17 Thu Sep 11 13:04:28 2003 +++ llvm/test/Programs/External/SPEC/Makefile.spec Sun Sep 21 13:46:27 2003 @@ -49,7 +49,7 @@ LCCFLAGS := -O2 LCXXFLAGS := -O2 -CPPFLAGS += -DSPEC_CPU2000 +CPPFLAGS += -DSPEC_CPU2000 -I $(SPEC_BENCH_DIR)/src/ SPEC_SANDBOX := $(LLVM_SRC_ROOT)/test/Programs/External/SPEC/Sandbox.sh # Information about testing the program... From lattner at cs.uiuc.edu Sun Sep 21 16:24:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Sep 21 16:24:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/Makefile.programs Message-ID: <200309212123.QAA25501@trinity.cs.uiuc.edu> Changes in directory llvm/test/Programs: Makefile.programs updated: 1.94 -> 1.95 --- Log message: Add a target to build the native code for a program --- Diffs of the changes: Index: llvm/test/Programs/Makefile.programs diff -u llvm/test/Programs/Makefile.programs:1.94 llvm/test/Programs/Makefile.programs:1.95 --- llvm/test/Programs/Makefile.programs:1.94 Thu Sep 18 09:23:12 2003 +++ llvm/test/Programs/Makefile.programs Sun Sep 21 16:23:21 2003 @@ -283,6 +283,8 @@ LLI_OPTS = -q -force-interpreter=true $(EXTRA_LLI_OPTS) JIT_OPTS = -force-interpreter=false $(EXTRA_LLI_OPTS) +native: $(PROGRAMS_TO_TEST:%=Output/%.native) + ifndef PROGRAMS_HAVE_CUSTOM_RUN_RULES # Rules to build the test output...