[llvm-commits] CVS: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
Changes in directory llvm/lib/CodeGen: LiveIntervalAnalysis.cpp updated: 1.178 -> 1.179 --- Log message: Pull some code out of a hot recursive function because the common case doesn't need recursion. --- Diffs of the changes: (+19 -6) LiveIntervalAnalysis.cpp | 25 +++-- 1 files changed, 19 insertions(+), 6 deletions(-) Index: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp diff -u llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.178 llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.179 --- llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.178 Fri Sep 1 01:10:18 2006 +++ llvm/lib/CodeGen/LiveIntervalAnalysis.cpp Fri Sep 1 02:00:23 2006 @@ -857,7 +857,7 @@ // If the VN has already been computed, just return it. if (ThisValNoAssignments[VN] >= 0) return ThisValNoAssignments[VN]; - assert(ThisValNoAssignments[VN] != -2 && "FIXME: Cyclic case, handle it!"); +// assert(ThisValNoAssignments[VN] != -2 && "Cyclic case?"); // If this val is not a copy from the other val, then it must be a new value // number in the destination. @@ -867,9 +867,13 @@ return ThisValNoAssignments[VN] = ValueNumberInfo.size()-1; } - // Otherwise, this *is* a copy from the RHS. Mark this value number as - // currently being computed, then ask what the ultimate value # of the other - // value is. + // Otherwise, this *is* a copy from the RHS. If the other side has already + // been computed, return it. + if (OtherValNoAssignments[OtherValNo] >= 0) +return ThisValNoAssignments[VN] = OtherValNoAssignments[OtherValNo]; + + // Mark this value number as currently being computed, then ask what the + // ultimate value # of the other value is. ThisValNoAssignments[VN] = -2; unsigned UltimateVN = ComputeUltimateVN(OtherValNo, ValueNumberInfo, @@ -989,13 +993,22 @@ } for (unsigned VN = 0, e = LHS.getNumValNums(); VN != e; ++VN) { - if (LHS.getInstForValNum(VN) == ~2U) continue; + if (LHSValNoAssignments[VN] >= 0 || LHS.getInstForValNum(VN) == ~2U) +continue; ComputeUltimateVN(VN, ValueNumberInfo, LHSValsDefinedFromRHS, RHSValsDefinedFromLHS, LHSValNoAssignments, RHSValNoAssignments, LHS, RHS); } for (unsigned VN = 0, e = RHS.getNumValNums(); VN != e; ++VN) { - if (RHS.getInstForValNum(VN) == ~2U) continue; + if (RHSValNoAssignments[VN] >= 0 || RHS.getInstForValNum(VN) == ~2U) +continue; + // If this value number isn't a copy from the LHS, it's a new number. + if (RHSValsDefinedFromLHS[VN] == -1) { +ValueNumberInfo.push_back(RHS.getValNumInfo(VN)); +RHSValNoAssignments[VN] = ValueNumberInfo.size()-1; +continue; + } + ComputeUltimateVN(VN, ValueNumberInfo, RHSValsDefinedFromLHS, LHSValsDefinedFromRHS, RHSValNoAssignments, LHSValNoAssignments, RHS, LHS); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/JIT.cpp
Changes in directory llvm/lib/ExecutionEngine/JIT: JIT.cpp updated: 1.73 -> 1.74 --- Log message: Yikes. This requires checking apple gcc version. --- Diffs of the changes: (+4 -2) JIT.cpp |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) Index: llvm/lib/ExecutionEngine/JIT/JIT.cpp diff -u llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.73 llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.74 --- llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.73 Tue Aug 15 20:24:12 2006 +++ llvm/lib/ExecutionEngine/JIT/JIT.cppFri Sep 1 02:00:46 2006 @@ -32,7 +32,8 @@ #ifdef __APPLE__ #include -#if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4 +#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4 && \ +__APPLE_CC__ >= 5330 // __dso_handle is resolved by Mac OS X dynamic linker. extern void *__dso_handle __attribute__ ((__visibility__ ("hidden"))); #endif @@ -309,7 +310,8 @@ // If the global is external, just remember the address. if (GV->isExternal()) { #ifdef __APPLE__ -#if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4 +#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4 && \ +__APPLE_CC__ >= 5330 // __dso_handle is resolved by the Mac OS X dynamic linker. if (GV->getName() == "__dso_handle") return (void*)&__dso_handle; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/JIT.cpp
Changes in directory llvm/lib/ExecutionEngine/JIT: JIT.cpp updated: 1.74 -> 1.75 --- Log message: Better comments. --- Diffs of the changes: (+4 -1) JIT.cpp |5 - 1 files changed, 4 insertions(+), 1 deletion(-) Index: llvm/lib/ExecutionEngine/JIT/JIT.cpp diff -u llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.74 llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.75 --- llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.74 Fri Sep 1 02:00:46 2006 +++ llvm/lib/ExecutionEngine/JIT/JIT.cppFri Sep 1 02:09:56 2006 @@ -312,7 +312,10 @@ #ifdef __APPLE__ #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4 && \ __APPLE_CC__ >= 5330 -// __dso_handle is resolved by the Mac OS X dynamic linker. +// Apple gcc defaults to -fuse-cxa-atexit (i.e. calls __cxa_atexit instead +// of atexit). It passes the address of linker generated symbol __dso_handle +// to the function. +// This configuration change happened at version 5330. if (GV->getName() == "__dso_handle") return (void*)&__dso_handle; #endif ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: nightlytest-serverside/ProgramResults.php fulltest.php test.php
Changes in directory nightlytest-serverside: ProgramResults.php updated: 1.31 -> 1.32 fulltest.php updated: 1.16 -> 1.17 test.php updated: 1.18 -> 1.19 --- Log message: Clean up. --- Diffs of the changes: (+8 -6) ProgramResults.php |8 +--- fulltest.php |2 +- test.php |4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) Index: nightlytest-serverside/ProgramResults.php diff -u nightlytest-serverside/ProgramResults.php:1.31 nightlytest-serverside/ProgramResults.php:1.32 --- nightlytest-serverside/ProgramResults.php:1.31 Thu Aug 31 13:44:47 2006 +++ nightlytest-serverside/ProgramResults.php Fri Sep 1 05:48:04 2006 @@ -436,7 +436,7 @@ * This is somewhat of a hack because from night 684 forward we now store the test * in their own table as oppoesd in the night table. */ -function getUnexpectedFailures($night_id, $mysql_link){ +function getUnexpectedFailures($night_id){ $result=""; if($night_id<$new_schema_id){ $query = "SELECT unexpfail_tests FROM night WHERE id = $night_id"; @@ -554,10 +554,12 @@ /* * Does the test pass * - * Return true if the test result indicates a pass. + * Return true if the test result indicates a pass. For "tests" the possible + * conditions are "PASS", "FAIL" and "XFAIL" (expected to fail.) For programs + * an asterix appears by each tool that has failed. */ function isTestPass($test_result) { - return strcmp($test_result, "PASS") === 0 || + return strcmp($test_result, "FAIL") != 0 || strpos($test_result, "*") === false; } Index: nightlytest-serverside/fulltest.php diff -u nightlytest-serverside/fulltest.php:1.16 nightlytest-serverside/fulltest.php:1.17 --- nightlytest-serverside/fulltest.php:1.16Thu Aug 31 13:10:50 2006 +++ nightlytest-serverside/fulltest.php Fri Sep 1 05:48:04 2006 @@ -200,7 +200,7 @@ $delta_exppass = $today_row['teststats_exppass']-$yesterday_row['teststats_exppass']; $delta_expfail = $today_row['teststats_expfail']-$yesterday_row['teststats_expfail']; $delta_unexpfail = $today_row['teststats_unexpfail']-$yesterday_row['teststats_unexpfail']; -$unexpected_failures = getUnexpectedFailures($night_id, $mysql_link); +$unexpected_failures = getUnexpectedFailures($night_id); if($delta_exppass==0 && $delta_expfail==0 && $delta_unexpfail==0 && strcmp($unexpected_failures, "")===0){ Index: nightlytest-serverside/test.php diff -u nightlytest-serverside/test.php:1.18 nightlytest-serverside/test.php:1.19 --- nightlytest-serverside/test.php:1.18Mon Aug 21 16:56:57 2006 +++ nightlytest-serverside/test.php Fri Sep 1 05:48:04 2006 @@ -191,7 +191,7 @@ * Printing failures in test suite * **/ -$failing_tests=getFailures($night_id, $previous_succesful_id, $mysql_link); +$failing_tests=getFailures($night_id); if(strcmp($failing_tests,"")===0){ $newly_failing_tests="None"; } @@ -212,7 +212,7 @@ $delta_exppass = $today_row['teststats_exppass']-$yesterday_row['teststats_exppass']; $delta_expfail = $today_row['teststats_expfail']-$yesterday_row['teststats_expfail']; $delta_unexpfail = $today_row['teststats_unexpfail']-$yesterday_row['teststats_unexpfail']; -$unexpected_failures = getUnexpectedFailures($night_id, $mysql_link); +$unexpected_failures = getUnexpectedFailures($night_id); if($delta_exppass==0 && $delta_expfail==0 && $delta_unexpfail==0 && strcmp($unexpected_failures,"")===0){ ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: nightlytest-serverside/ProgramResults.php
Changes in directory nightlytest-serverside: ProgramResults.php updated: 1.32 -> 1.33 --- Log message: Not working correctly. --- Diffs of the changes: (+1 -1) ProgramResults.php |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: nightlytest-serverside/ProgramResults.php diff -u nightlytest-serverside/ProgramResults.php:1.32 nightlytest-serverside/ProgramResults.php:1.33 --- nightlytest-serverside/ProgramResults.php:1.32 Fri Sep 1 05:48:04 2006 +++ nightlytest-serverside/ProgramResults.php Fri Sep 1 05:51:27 2006 @@ -559,7 +559,7 @@ * an asterix appears by each tool that has failed. */ function isTestPass($test_result) { - return strcmp($test_result, "FAIL") != 0 || + return strcmp($test_result, "PASS") == 0 || strpos($test_result, "*") === false; } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: nightlytest-serverside/ProgramResults.php
Changes in directory nightlytest-serverside: ProgramResults.php updated: 1.33 -> 1.34 --- Log message: Different approach. --- Diffs of the changes: (+1 -0) ProgramResults.php |1 + 1 files changed, 1 insertion(+) Index: nightlytest-serverside/ProgramResults.php diff -u nightlytest-serverside/ProgramResults.php:1.33 nightlytest-serverside/ProgramResults.php:1.34 --- nightlytest-serverside/ProgramResults.php:1.33 Fri Sep 1 05:51:27 2006 +++ nightlytest-serverside/ProgramResults.php Fri Sep 1 05:53:35 2006 @@ -560,6 +560,7 @@ */ function isTestPass($test_result) { return strcmp($test_result, "PASS") == 0 || + strcmp($test_result, "XFAIL") == 0 || strpos($test_result, "*") === false; } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp
Changes in directory llvm/lib/CodeGen: DwarfWriter.cpp updated: 1.72 -> 1.73 --- Log message: Corrections. --- Diffs of the changes: (+4 -4) DwarfWriter.cpp |8 1 files changed, 4 insertions(+), 4 deletions(-) Index: llvm/lib/CodeGen/DwarfWriter.cpp diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.72 llvm/lib/CodeGen/DwarfWriter.cpp:1.73 --- llvm/lib/CodeGen/DwarfWriter.cpp:1.72 Tue Aug 29 11:24:26 2006 +++ llvm/lib/CodeGen/DwarfWriter.cppFri Sep 1 07:55:05 2006 @@ -942,7 +942,7 @@ //===--===// -/// DWContext +/// DwarfWriter //===--===// @@ -1103,9 +1103,9 @@ case '\t': O << "\\t"; break; default: O << '\\'; -O << char('0' + (C >> 6)); -O << char('0' + (C >> 3)); -O << char('0' + (C >> 0)); +O << char('0' + ((C >> 6) & 7)); +O << char('0' + ((C >> 3) & 7)); +O << char('0' + ((C >> 0) & 7)); break; } } else if (C == '\"') { ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/JIT.cpp
On Sep 1, 2006, at 12:01 AM, Evan Cheng wrote: > Yikes. This requires checking apple gcc version. > That's risky, because apple gcc version number are not guaranteed to increase monotonically. It means, higher number does not guarantee newer compiler. - Devang ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Changes in directory llvm/lib/CodeGen/SelectionDAG: LegalizeDAG.cpp updated: 1.389 -> 1.390 --- Log message: Allow legalizer to expand ISD::MUL using only MULHS in the rare case that is possible and the target only supports MULHS. --- Diffs of the changes: (+13 -6) LegalizeDAG.cpp | 19 +-- 1 files changed, 13 insertions(+), 6 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.389 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.390 --- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.389 Sun Aug 27 07:54:01 2006 +++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Fri Sep 1 13:17:58 2006 @@ -4656,7 +4656,10 @@ break; } case ISD::MUL: { -if (TLI.isOperationLegal(ISD::MULHU, NVT)) { +bool HasMULHS = TLI.isOperationLegal(ISD::MULHS, NVT); +bool HasMULHU = TLI.isOperationLegal(ISD::MULHU, NVT); +bool UseLibCall = true; +if (HasMULHS || HasMULHU) { SDOperand LL, LH, RL, RH; ExpandOp(Node->getOperand(0), LL, LH); ExpandOp(Node->getOperand(1), RL, RH); @@ -4665,7 +4668,7 @@ // extended the sign bit of the low half through the upper half, and if so // emit a MULHS instead of the alternate sequence that is valid for any // i64 x i64 multiply. - if (TLI.isOperationLegal(ISD::MULHS, NVT) && + if (HasMULHS && // is RH an extension of the sign bit of RL? RH.getOpcode() == ISD::SRA && RH.getOperand(0) == RL && RH.getOperand(1).getOpcode() == ISD::Constant && @@ -4675,17 +4678,21 @@ LH.getOperand(1).getOpcode() == ISD::Constant && cast(LH.getOperand(1))->getValue() == SH) { Hi = DAG.getNode(ISD::MULHS, NVT, LL, RL); - } else { +UseLibCall = false; + } else if (HasMULHU) { Hi = DAG.getNode(ISD::MULHU, NVT, LL, RL); RH = DAG.getNode(ISD::MUL, NVT, LL, RH); LH = DAG.getNode(ISD::MUL, NVT, LH, RL); Hi = DAG.getNode(ISD::ADD, NVT, Hi, RH); Hi = DAG.getNode(ISD::ADD, NVT, Hi, LH); +UseLibCall = false; } - Lo = DAG.getNode(ISD::MUL, NVT, LL, RL); -} else { - Lo = ExpandLibCall("__muldi3" , Node, Hi); + if (!UseLibCall) +Lo = DAG.getNode(ISD::MUL, NVT, LL, RL); } + +if (UseLibCall) + Lo = ExpandLibCall("__muldi3" , Node, Hi); break; } case ISD::SDIV: Lo = ExpandLibCall("__divdi3" , Node, Hi); break; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/JIT.cpp
Changes in directory llvm/lib/ExecutionEngine/JIT: JIT.cpp updated: 1.75 -> 1.76 --- Log message: --- Diffs of the changes: (+2 -2) JIT.cpp |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/ExecutionEngine/JIT/JIT.cpp diff -u llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.75 llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.76 --- llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.75 Fri Sep 1 02:09:56 2006 +++ llvm/lib/ExecutionEngine/JIT/JIT.cppFri Sep 1 13:40:46 2006 @@ -32,7 +32,7 @@ #ifdef __APPLE__ #include -#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4 && \ +#if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4 || \ __APPLE_CC__ >= 5330 // __dso_handle is resolved by Mac OS X dynamic linker. extern void *__dso_handle __attribute__ ((__visibility__ ("hidden"))); @@ -310,7 +310,7 @@ // If the global is external, just remember the address. if (GV->isExternal()) { #ifdef __APPLE__ -#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4 && \ +#if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4 || \ __APPLE_CC__ >= 5330 // Apple gcc defaults to -fuse-cxa-atexit (i.e. calls __cxa_atexit instead // of atexit). It passes the address of linker generated symbol __dso_handle ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/JIT.cpp
Changes in directory llvm/lib/ExecutionEngine/JIT: JIT.cpp updated: 1.76 -> 1.77 --- Log message: Last check-in was a mistake... I've been told apple gcc version number is not guaranteed to increase monotonically. Change the preprocess condition to make it less risky. The configuration change is done during the middle 10.4 life cycle so we have to check __APPLE_CC. For future OS X release, we should be able to assume -fenable-cxa-atexit is the default. --- Diffs of the changes: (+6 -4) JIT.cpp | 10 ++ 1 files changed, 6 insertions(+), 4 deletions(-) Index: llvm/lib/ExecutionEngine/JIT/JIT.cpp diff -u llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.76 llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.77 --- llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.76 Fri Sep 1 13:40:46 2006 +++ llvm/lib/ExecutionEngine/JIT/JIT.cppFri Sep 1 13:42:59 2006 @@ -32,8 +32,9 @@ #ifdef __APPLE__ #include -#if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4 || \ -__APPLE_CC__ >= 5330 +#if (MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4) || \ +(MAC_OS_X_VERSION_MIN_REQUIRED == MAC_OS_X_VERSION_10_4 &&\ + __APPLE_CC__ >= 5330) // __dso_handle is resolved by Mac OS X dynamic linker. extern void *__dso_handle __attribute__ ((__visibility__ ("hidden"))); #endif @@ -310,8 +311,9 @@ // If the global is external, just remember the address. if (GV->isExternal()) { #ifdef __APPLE__ -#if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4 || \ -__APPLE_CC__ >= 5330 +#if (MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4) || \ +(MAC_OS_X_VERSION_MIN_REQUIRED == MAC_OS_X_VERSION_10_4 &&\ + __APPLE_CC__ >= 5330) // Apple gcc defaults to -fuse-cxa-atexit (i.e. calls __cxa_atexit instead // of atexit). It passes the address of linker generated symbol __dso_handle // to the function. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/JIT.cpp
Changes in directory llvm/lib/ExecutionEngine/JIT: JIT.cpp updated: 1.77 -> 1.78 --- Log message: Remove extra spaces. --- Diffs of the changes: (+2 -2) JIT.cpp |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/ExecutionEngine/JIT/JIT.cpp diff -u llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.77 llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.78 --- llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.77 Fri Sep 1 13:42:59 2006 +++ llvm/lib/ExecutionEngine/JIT/JIT.cppFri Sep 1 13:45:22 2006 @@ -33,7 +33,7 @@ #ifdef __APPLE__ #include #if (MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4) || \ -(MAC_OS_X_VERSION_MIN_REQUIRED == MAC_OS_X_VERSION_10_4 &&\ +(MAC_OS_X_VERSION_MIN_REQUIRED == MAC_OS_X_VERSION_10_4 && \ __APPLE_CC__ >= 5330) // __dso_handle is resolved by Mac OS X dynamic linker. extern void *__dso_handle __attribute__ ((__visibility__ ("hidden"))); @@ -312,7 +312,7 @@ if (GV->isExternal()) { #ifdef __APPLE__ #if (MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4) || \ -(MAC_OS_X_VERSION_MIN_REQUIRED == MAC_OS_X_VERSION_10_4 &&\ +(MAC_OS_X_VERSION_MIN_REQUIRED == MAC_OS_X_VERSION_10_4 && \ __APPLE_CC__ >= 5330) // Apple gcc defaults to -fuse-cxa-atexit (i.e. calls __cxa_atexit instead // of atexit). It passes the address of linker generated symbol __dso_handle ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/tools/gccld/gccld.cpp
Changes in directory llvm/tools/gccld: gccld.cpp updated: 1.110 -> 1.111 --- Log message: - Fixed broken Win32 build - Removed warning about clobbered parameter in Bytecode/Reader --- Diffs of the changes: (+10 -5) gccld.cpp | 15 ++- 1 files changed, 10 insertions(+), 5 deletions(-) Index: llvm/tools/gccld/gccld.cpp diff -u llvm/tools/gccld/gccld.cpp:1.110 llvm/tools/gccld/gccld.cpp:1.111 --- llvm/tools/gccld/gccld.cpp:1.110Tue Aug 22 18:27:22 2006 +++ llvm/tools/gccld/gccld.cpp Fri Sep 1 15:35:17 2006 @@ -133,17 +133,22 @@ /// EmitShellScript - Output the wrapper file that invokes the JIT on the LLVM /// bytecode file for the program. static void EmitShellScript(char **argv) { -#if defined(_WIN32) || defined(__CYGWIN__) +#if defined(_WIN32) || defined(__CYGWIN__) // Windows doesn't support #!/bin/sh style shell scripts in .exe files. To // support windows systems, we copy the llvm-stub.exe executable from the // build tree to the destination file. - std::string llvmstub = FindExecutable("llvm-stub.exe", argv[0]).toString(); - if (llvmstub.empty()) { + std::string ErrMsg; + sys::Path llvmstub = FindExecutable("llvm-stub.exe", argv[0]); + if (llvmstub.isEmpty()) { std::cerr << "Could not find llvm-stub.exe executable!\n"; exit(1); } - sys::CopyFile(sys::Path(OutputFilename), sys::Path(llvmstub)); - return; + if (0 != sys::CopyFile(sys::Path(OutputFilename), llvmstub, &ErrMsg)) { +std::cerr << argv[0] << ": " << ErrMsg << "\n"; +exit(1); + } + + return; #endif // Output the script to start the program... ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/System/Win32/MappedFile.inc Path.inc Program.inc Win32.h
Changes in directory llvm/lib/System/Win32: MappedFile.inc updated: 1.7 -> 1.8 Path.inc updated: 1.57 -> 1.58 Program.inc updated: 1.17 -> 1.18 Win32.h updated: 1.9 -> 1.10 --- Log message: - Fixed broken Win32 build - Removed warning about clobbered parameter in Bytecode/Reader --- Diffs of the changes: (+24 -20) MappedFile.inc |2 ++ Path.inc | 32 +++- Program.inc|4 ++-- Win32.h|6 +- 4 files changed, 24 insertions(+), 20 deletions(-) Index: llvm/lib/System/Win32/MappedFile.inc diff -u llvm/lib/System/Win32/MappedFile.inc:1.7 llvm/lib/System/Win32/MappedFile.inc:1.8 --- llvm/lib/System/Win32/MappedFile.inc:1.7Fri Aug 25 16:37:17 2006 +++ llvm/lib/System/Win32/MappedFile.incFri Sep 1 15:35:17 2006 @@ -55,6 +55,8 @@ return MakeErrMsg(ErrMsg, std::string("Can't get size of file: ") + path_.toString()); } + + return false; } void MappedFile::terminate() { Index: llvm/lib/System/Win32/Path.inc diff -u llvm/lib/System/Win32/Path.inc:1.57 llvm/lib/System/Win32/Path.inc:1.58 --- llvm/lib/System/Win32/Path.inc:1.57 Fri Aug 25 16:37:17 2006 +++ llvm/lib/System/Win32/Path.inc Fri Sep 1 15:35:17 2006 @@ -315,12 +315,12 @@ return false; } -void Path::makeWriteableOnDisk(std::string* ErrMsg) { +bool Path::makeWriteableOnDisk(std::string* ErrMsg) { DWORD attr = GetFileAttributes(path.c_str()); // If it doesn't exist, we're done. if (attr == INVALID_FILE_ATTRIBUTES) -return; +return false; if (attr & FILE_ATTRIBUTE_READONLY) { if (!SetFileAttributes(path.c_str(), attr & ~FILE_ATTRIBUTE_READONLY)) { @@ -338,7 +338,11 @@ bool Path::getDirectoryContents(std::set& result, std::string* ErrMsg) const { - if (!isDirectory()) { + FileStatus Status; + if (getFileStatus(Status, ErrMsg)) +return true; + + if (!Status.isDir) { MakeErrMsg(ErrMsg, path + ": not a directory"); return true; } @@ -512,7 +516,7 @@ // Drop trailing slash. pathname[len-1] = 0; if (!CreateDirectory(pathname, NULL)) { - return MakeErrMsg(, std::string(pathname) + ": Can't create directory: "); + return MakeErrMsg(ErrMsg, std::string(pathname) + ": Can't create directory: "); } } return false; @@ -652,10 +656,12 @@ } bool -Path::setStatusInfoOnDisk(const FileStatus &si, std::string *ErrStr) const { +Path::setStatusInfoOnDisk(const FileStatus &si, std::string *ErrMsg) const { // FIXME: should work on directories also. - if (!isFile()) return true; - + if (!si.isFile) { +return true; + } + HANDLE h = CreateFile(path.c_str(), FILE_READ_ATTRIBUTES | FILE_WRITE_ATTRIBUTES, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, @@ -671,7 +677,7 @@ DWORD err = GetLastError(); CloseHandle(h); SetLastError(err); -return MakeErrMsg(ErrStr, path + ": GetFileInformationByHandle: "); +return MakeErrMsg(ErrMsg, path + ": GetFileInformationByHandle: "); } FILETIME ft; @@ -681,7 +687,7 @@ CloseHandle(h); if (!ret) { SetLastError(err); -return MakeErrMsg(path + ": SetFileTime: "); +return MakeErrMsg(ErrMsg, path + ": SetFileTime: "); } // Best we can do with Unix permission bits is to interpret the owner @@ -690,13 +696,13 @@ if (bhfi.dwFileAttributes & FILE_ATTRIBUTE_READONLY) { if (!SetFileAttributes(path.c_str(), bhfi.dwFileAttributes & ~FILE_ATTRIBUTE_READONLY)) -return MakeErrMsg(ErrStr, path + ": SetFileAttributes: "); +return MakeErrMsg(ErrMsg, path + ": SetFileAttributes: "); } } else { if (!(bhfi.dwFileAttributes & FILE_ATTRIBUTE_READONLY)) { if (!SetFileAttributes(path.c_str(), bhfi.dwFileAttributes | FILE_ATTRIBUTE_READONLY)) -return MakeErrMsg(ErrStr, path + ": SetFileAttributes: "); +return MakeErrMsg(ErrMsg, path + ": SetFileAttributes: "); } } @@ -739,13 +745,13 @@ bool Path::createTemporaryFileOnDisk(bool reuse_current, std::string* ErrMsg) { // Make this into a unique file name - makeUnique(reuse_current); + makeUnique(reuse_current, ErrMsg); // Now go and create it HANDLE h = CreateFile(path.c_str(), GENERIC_WRITE, 0, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL); if (h == INVALID_HANDLE_VALUE) -return MakeErrMsg(ErrMsg, path.toString() + ": can't create file"); +return MakeErrMsg(ErrMsg, path + ": can't create file"); CloseHandle(h); return false; Index: llvm/lib/System/Win32/Program.inc diff -u llvm/lib/System/Win32/Program.inc:1.17 llvm/lib/System/Win32/Program.inc:1.18 --- llvm/lib/System/Win32/Program.inc:1.17 Mon Aug 21 01:02:44 2006 +++ llvm/lib/System/Win32/Program.inc Fri Sep 1 15:35:17 2006 @@ -158,14 +158,14 @@ MakeErrMsg(ErrMsg, "can't redirect stdin"); return -1; } -si.hStdOutput = RedirectIO(redirects[1], 1); +
[llvm-commits] CVS: llvm/lib/Bytecode/Reader/Reader.cpp Reader.h
Changes in directory llvm/lib/Bytecode/Reader: Reader.cpp updated: 1.196 -> 1.197 Reader.h updated: 1.32 -> 1.33 --- Log message: - Fixed broken Win32 build - Removed warning about clobbered parameter in Bytecode/Reader --- Diffs of the changes: (+2 -2) Reader.cpp |2 +- Reader.h |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/Bytecode/Reader/Reader.cpp diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.196 llvm/lib/Bytecode/Reader/Reader.cpp:1.197 --- llvm/lib/Bytecode/Reader/Reader.cpp:1.196 Fri Aug 25 14:54:53 2006 +++ llvm/lib/Bytecode/Reader/Reader.cpp Fri Sep 1 15:35:17 2006 @@ -2409,7 +2409,7 @@ /// This function completely parses a bytecode buffer given by the \p Buf /// and \p Length parameters. -bool BytecodeReader::ParseBytecode(BufPtr Buf, unsigned Length, +bool BytecodeReader::ParseBytecode(volatile BufPtr Buf, unsigned Length, const std::string &ModuleID, std::string* ErrMsg) { Index: llvm/lib/Bytecode/Reader/Reader.h diff -u llvm/lib/Bytecode/Reader/Reader.h:1.32 llvm/lib/Bytecode/Reader/Reader.h:1.33 --- llvm/lib/Bytecode/Reader/Reader.h:1.32 Fri Aug 25 14:54:53 2006 +++ llvm/lib/Bytecode/Reader/Reader.h Fri Sep 1 15:35:17 2006 @@ -140,7 +140,7 @@ /// @returns true if an error occurred /// @brief Main interface to parsing a bytecode buffer. bool ParseBytecode( - const unsigned char *Buf,///< Beginning of the bytecode buffer + volatile BufPtr Buf, ///< Beginning of the bytecode buffer unsigned Length, ///< Length of the bytecode buffer const std::string &ModuleID, ///< An identifier for the module constructed. std::string* ErrMsg = 0 ///< Optional place for error message ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/tools/llvm-ld/llvm-ld.cpp
Changes in directory llvm/tools/llvm-ld: llvm-ld.cpp updated: 1.37 -> 1.38 --- Log message: - Fixed broken Win32 build - Removed warning about clobbered parameter in Bytecode/Reader --- Diffs of the changes: (+7 -1) llvm-ld.cpp |8 +++- 1 files changed, 7 insertions(+), 1 deletion(-) Index: llvm/tools/llvm-ld/llvm-ld.cpp diff -u llvm/tools/llvm-ld/llvm-ld.cpp:1.37 llvm/tools/llvm-ld/llvm-ld.cpp:1.38 --- llvm/tools/llvm-ld/llvm-ld.cpp:1.37 Wed Aug 23 02:30:48 2006 +++ llvm/tools/llvm-ld/llvm-ld.cpp Fri Sep 1 15:35:17 2006 @@ -345,12 +345,18 @@ // Windows doesn't support #!/bin/sh style shell scripts in .exe files. To // support windows systems, we copy the llvm-stub.exe executable from the // build tree to the destination file. + std::string ErrMsg; sys::Path llvmstub = FindExecutable("llvm-stub.exe", argv[0]); if (llvmstub.isEmpty()) { std::cerr << "Could not find llvm-stub.exe executable!\n"; exit(1); } - sys::CopyFile(sys::Path(OutputFilename), llvmstub); + + if (0 != sys::CopyFile(sys::Path(OutputFilename), llvmstub, &ErrMsg)) { +std::cerr << argv[0] << ": " << ErrMsg << "\n"; +exit(1); + } + return; #endif ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/utils/TableGen/FileLexer.l FileParser.y
Changes in directory llvm/utils/TableGen: FileLexer.l updated: 1.29 -> 1.30 FileParser.y updated: 1.42 -> 1.43 --- Log message: Add often-requested support for defining "multiclasses" which can be instantiated. This allows you to define multiple definitions with one line, encouraging more .td file factoring. --- Diffs of the changes: (+202 -38) FileLexer.l |2 FileParser.y | 238 +-- 2 files changed, 202 insertions(+), 38 deletions(-) Index: llvm/utils/TableGen/FileLexer.l diff -u llvm/utils/TableGen/FileLexer.l:1.29 llvm/utils/TableGen/FileLexer.l:1.30 --- llvm/utils/TableGen/FileLexer.l:1.29Fri Mar 31 15:53:49 2006 +++ llvm/utils/TableGen/FileLexer.l Fri Sep 1 16:13:49 2006 @@ -195,6 +195,8 @@ class { return CLASS; } def{ return DEF; } +defm { return DEFM; } +multiclass { return MULTICLASS; } field { return FIELD; } let{ return LET; } in { return IN; } Index: llvm/utils/TableGen/FileParser.y diff -u llvm/utils/TableGen/FileParser.y:1.42 llvm/utils/TableGen/FileParser.y:1.43 --- llvm/utils/TableGen/FileParser.y:1.42 Fri Mar 31 15:53:49 2006 +++ llvm/utils/TableGen/FileParser.yFri Sep 1 16:13:49 2006 @@ -22,8 +22,19 @@ int yylex(); namespace llvm { + struct MultiClass { +Record Rec; // Placeholder for template args and Name. +std::vector DefPrototypes; + +MultiClass(const std::string &Name) : Rec(Name) {} + }; + +static std::map MultiClasses; + extern int Filelineno; +static MultiClass *CurMultiClass = 0;// Set while parsing a multiclass. +static std::string *CurDefmPrefix = 0; // Set while parsing defm. static Record *CurRec = 0; static bool ParsingTemplateArgs = false; @@ -45,8 +56,16 @@ extern std::ostream &err(); +/// getActiveRec - If inside a def/class definition, return the def/class. +/// Otherwise, if within a multidef, return it. +static Record *getActiveRec() { + return CurRec ? CurRec : &CurMultiClass->Rec; +} + static void addValue(const RecordVal &RV) { - if (RecordVal *ERV = CurRec->getValue(RV.getName())) { + Record *TheRec = getActiveRec(); + + if (RecordVal *ERV = TheRec->getValue(RV.getName())) { // The value already exists in the class, treat this as a set... if (ERV->setValue(RV.getValue())) { err() << "New definition of '" << RV.getName() << "' of type '" @@ -55,7 +74,7 @@ exit(1); } } else { -CurRec->addValue(RV); +TheRec->addValue(RV); } } @@ -148,33 +167,33 @@ if (TArgs.size() < TemplateArgs.size()) { err() << "ERROR: More template args specified than expected!\n"; exit(1); - } else {// This class expects template arguments... -// Loop over all of the template arguments, setting them to the specified -// value or leaving them as the default if necessary. -for (unsigned i = 0, e = TArgs.size(); i != e; ++i) { - if (i < TemplateArgs.size()) { // A value is specified for this temp-arg? -// Set it now. -setValue(TArgs[i], 0, TemplateArgs[i]); - -// Resolve it next. -CurRec->resolveReferencesTo(CurRec->getValue(TArgs[i])); - - -// Now remove it. -CurRec->removeValue(TArgs[i]); - - } else if (!CurRec->getValue(TArgs[i])->getValue()->isComplete()) { -err() << "ERROR: Value not specified for template argument #" - << i << " (" << TArgs[i] << ") of subclass '" << SC->getName() - << "'!\n"; -exit(1); - } + } + + // Loop over all of the template arguments, setting them to the specified + // value or leaving them as the default if necessary. + for (unsigned i = 0, e = TArgs.size(); i != e; ++i) { +if (i < TemplateArgs.size()) { // A value is specified for this temp-arg? + // Set it now. + setValue(TArgs[i], 0, TemplateArgs[i]); + + // Resolve it next. + CurRec->resolveReferencesTo(CurRec->getValue(TArgs[i])); + + + // Now remove it. + CurRec->removeValue(TArgs[i]); + +} else if (!CurRec->getValue(TArgs[i])->getValue()->isComplete()) { + err() << "ERROR: Value not specified for template argument #" +<< i << " (" << TArgs[i] << ") of subclass '" << SC->getName() +<< "'!\n"; + exit(1); } } // Since everything went well, we can now set the "superclass" list for the // current record. - const std::vector &SCs = SC->getSuperClasses(); + const std::vector &SCs = SC->getSuperClasses(); for (unsigned i = 0, e = SCs.size(); i != e; ++i) addSuperClass(SCs[i]); addSuperClass(SC); @@ -194,18 +213,20 @@ std::vector* FieldList; std::vector* BitList; llvm::Record* Rec; + std::vector* RecList; SubClassRefTy* SubClassRef; std::vector* SubClassList; std::vector >
[llvm-commits] CVS: llvm/test/Regression/TableGen/MultiClass.td
Changes in directory llvm/test/Regression/TableGen: MultiClass.td added (r1.1) --- Log message: simple multiclass example --- Diffs of the changes: (+17 -0) MultiClass.td | 17 + 1 files changed, 17 insertions(+) Index: llvm/test/Regression/TableGen/MultiClass.td diff -c /dev/null llvm/test/Regression/TableGen/MultiClass.td:1.1 *** /dev/null Fri Sep 1 16:14:47 2006 --- llvm/test/Regression/TableGen/MultiClass.td Fri Sep 1 16:14:37 2006 *** *** 0 --- 1,17 + // RUN: tblgen %s + class C1 { + int bar = A; + string thestr = B; + } + + def T : C1<4, "blah">; + + multiclass t { + def S1 : C1 { + int foo = 4; + let bar = 1; + } + def S2 : C1; + } + + defm FOO : t<42>; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/docs/TableGenFundamentals.html
Changes in directory llvm/docs: TableGenFundamentals.html updated: 1.15 -> 1.16 --- Log message: Document multiclasses and defm's --- Diffs of the changes: (+84 -7) TableGenFundamentals.html | 91 ++ 1 files changed, 84 insertions(+), 7 deletions(-) Index: llvm/docs/TableGenFundamentals.html diff -u llvm/docs/TableGenFundamentals.html:1.15 llvm/docs/TableGenFundamentals.html:1.16 --- llvm/docs/TableGenFundamentals.html:1.15Mon Mar 13 23:39:39 2006 +++ llvm/docs/TableGenFundamentals.html Fri Sep 1 16:44:18 2006 @@ -30,6 +30,7 @@ Value definitions 'let' expressions Class template arguments + Multiclass definitions and instances File scope entities @@ -102,6 +103,10 @@ definition, so the backend can find all definitions of a particular class, such as "Instruction". +TableGen multiclasses are groups of abstract records that are +instantiated all at once. Each instantiation can result in multiple TableGen +definitions. + @@ -463,16 +468,16 @@ def bork { // Value - bit isMod = 1; - bit isRef = 0; + bit isMod = 1; + bit isRef = 0; } def hork { // Value - bit isMod = 1; - bit isRef = 1; + bit isMod = 1; + bit isRef = 1; } def zork { // Value - bit isMod = 0; - bit isRef = 1; + bit isMod = 0; + bit isRef = 1; } @@ -483,6 +488,78 @@ + + + Multiclass definitions and instances + + + + + +While classes with template arguments are a good way to factor commonality +between two instances of a definition, multiclasses allow a convenient notation +for defining multiple definitions at once (instances of implicitly constructed +classes). For example, consider an 3-address instruction set whose instructions +come in two forms: "reg = reg op reg" and "reg = reg op imm" (e.g. SPARC). In +this case, you'd like to specify in one place that this commonality exists, then +in a separate place indicate what all the ops are. + + + +Here is an example TableGen fragment that shows this idea: + + + +def ops; +def GPR; +def Imm; +class inst; + +multiclass ri_inst { + def _rr : inst ; + def _ri : inst ; +} + +// Instantiations of the ri_inst multiclass. +defm ADD : ri_inst<0b111, "add">; +defm SUB : ri_inst<0b101, "sub">; +defm MUL : ri_inst<0b100, "mul">; +... + + +The name of the resuntant definitions has the multidef fragment names + appended to them, so this defines ADD_rr, ADD_ri, SUB_rr, etc. Using a + multiclass this way is exactly equivalent to instantiating the + classes multiple times yourself, e.g. by writing: + + +def ops; +def GPR; +def Imm; +class inst ; + +class rrinst + : inst ; + +class riinst + : inst ; + +// Instantiations of the ri_inst multiclass. +def ADD_rr : rrinst<0b111, "add">; +def ADD_ri : riinst<0b111, "add">; +def SUB_rr : rrinst<0b101, "sub">; +def SUB_ri : riinst<0b101, "sub">; +def MUL_rr : rrinst<0b100, "mul">; +def MUL_ri : riinst<0b100, "mul">; +... + + + + File scope entities @@ -560,7 +637,7 @@ mailto:[EMAIL PROTECTED]">Chris Lattner http://llvm.org";>LLVM Compiler Infrastructure - Last modified: $Date: 2006/03/14 05:39:39 $ + Last modified: $Date: 2006/09/01 21:44:18 $ ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/docs/TableGenFundamentals.html
Changes in directory llvm/docs: TableGenFundamentals.html updated: 1.16 -> 1.17 --- Log message: document !strconcat --- Diffs of the changes: (+3 -1) TableGenFundamentals.html |4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) Index: llvm/docs/TableGenFundamentals.html diff -u llvm/docs/TableGenFundamentals.html:1.16 llvm/docs/TableGenFundamentals.html:1.17 --- llvm/docs/TableGenFundamentals.html:1.16Fri Sep 1 16:44:18 2006 +++ llvm/docs/TableGenFundamentals.html Fri Sep 1 16:46:01 2006 @@ -322,6 +322,8 @@ (DEF a, b) - a dag value. The first element is required to be a record definition, the remaining elements in the list may be arbitrary other values, including nested `dag' values. +!strconcat(a, b) - A string value that is the result of + concatenating the 'a' and 'b' strings. Note that all of the values have rules specifying how they convert to values @@ -637,7 +639,7 @@ mailto:[EMAIL PROTECTED]">Chris Lattner http://llvm.org";>LLVM Compiler Infrastructure - Last modified: $Date: 2006/09/01 21:44:18 $ + Last modified: $Date: 2006/09/01 21:46:01 $ ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/docs/CodeGenerator.html
Changes in directory llvm/docs: CodeGenerator.html updated: 1.33 -> 1.34 --- Log message: Added documentation Fernando Magno Quintao Pereira wrote for the register allocator. (First draft) --- Diffs of the changes: (+342 -4) CodeGenerator.html | 346 - 1 files changed, 342 insertions(+), 4 deletions(-) Index: llvm/docs/CodeGenerator.html diff -u llvm/docs/CodeGenerator.html:1.33 llvm/docs/CodeGenerator.html:1.34 --- llvm/docs/CodeGenerator.html:1.33 Sun Aug 27 22:04:05 2006 +++ llvm/docs/CodeGenerator.htmlFri Sep 1 16:46:00 2006 @@ -58,6 +58,18 @@ Future directions for the SelectionDAG + +Register Allocation + + How registers are represented in +LLVM + Mapping virtual registers to physical +registers + Handling two address instructions + The SSA deconstruction phase + Instruction folding + Built in register allocators + Code Emission Generating Assembly Code @@ -74,8 +86,10 @@ - Written by mailto:[EMAIL PROTECTED]">Chris Lattner & - mailto:[EMAIL PROTECTED]">Bill Wendling + Written by mailto:[EMAIL PROTECTED]">Chris Lattner, +mailto:[EMAIL PROTECTED]">Bill Wendling, and +mailto:[EMAIL PROTECTED]">Fernando Magno Quintao +Pereira @@ -1140,11 +1154,335 @@ SSA-based Machine Code Optimizations To Be Written + Register Allocation -To Be Written + + + +The Register Allocation problem consists in mapping a +program Pv, that can use an unbounded number of +virtual registers, to a program Pp that contains a +finite (possibly small) number of physical registers. Each target +architecture has a different number of physical registers. If the +number of physical registers is not enough to accommodate all the +virtual registers, some of them will have to be mapped into +memory. These virtuals are called spilled virtuals. + + + + + + + How registers are represented in LLVM + + + + +In LLVM, physical registers are denoted by integer numbers that +normally range from 1 to 1023. To see how this numbering is defined +for a particular architecture, you can read the +GenRegisterNames.inc file for that architecture. For +instance, by inspecting +lib/Target/X86/X86GenRegisterNames.inc we see that the 32-bit +register EAX is denoted by 15, and the MMX register +MM0 is mapped to 48. + +Some architectures contain registers that share the same physical +location. A notable example is the X86 platform. For instance, in the +X86 architecture, the registers EAX, AX and +AL share the first eight bits. These physical registers are +marked as aliased in LLVM. Given a particular architecture, you +can check which registers are aliased by inspecting its +RegisterInfo.td file. Moreover, the method +MRegisterInfo::getAliasSet(p_reg) returns an array containing +all the physical registers aliased to the register p_reg. + +Physical registers, in LLVM, are grouped in Register Classes. +Elements in the same register class are functionally equivalent, and can +be interchangeably used. Each virtual register can only be mapped to +physical registers of a particular class. For instance, in the X86 +architecture, some virtuals can only be allocated to 8 bit registers. +A register class is described by TargetRegisterClass objects. +To discover if a virtual register is compatible with a given physical, +this code can be used: + + + + +bool RegMapping_Fer::compatible_class(MachineFunction &mf, + unsigned v_reg, + unsigned p_reg) { + assert(MRegisterInfo::isPhysicalRegister(p_reg) && + "Target register must be physical"); + const TargetRegisterClass *trc = mf.getSSARegMap()->getRegClass(v_reg); + return trc->contains(p_reg); +} + + + +Sometimes, mostly for debugging purposes, it is useful to change +the number of physical registers available in the target +architecture. This must be done statically, inside the +TargetRegsterInfo.td file. Just grep for +RegisterClass, the last parameter of which is a list of +registers. Just commenting some out is one simple way to avoid them +being used. A more polite way is to explicitly exclude some registers +from the allocation order. See the definition of the +GR register class in +lib/Target/IA64/IA64RegisterInfo.td for an example of this +(e.g., numReservedRegs registers are hidden.) + +Virtual registers are also denoted by integer numbers. Contrary to +physical registers, different virtual registers never share the same +number. The smallest virtual register is normally assigned the number +1024. This may change, so, in order to know which is the first virtual +register, you should access +MRegisterInfo::FirstVirtualRegister. Any register wh
[llvm-commits] CVS: llvm/docs/CodeGenerator.html
Changes in directory llvm/docs: CodeGenerator.html updated: 1.34 -> 1.35 --- Log message: Fixed formatting problem. --- Diffs of the changes: (+1 -2) CodeGenerator.html |3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) Index: llvm/docs/CodeGenerator.html diff -u llvm/docs/CodeGenerator.html:1.34 llvm/docs/CodeGenerator.html:1.35 --- llvm/docs/CodeGenerator.html:1.34 Fri Sep 1 16:46:00 2006 +++ llvm/docs/CodeGenerator.htmlFri Sep 1 16:47:10 2006 @@ -58,7 +58,6 @@ Future directions for the SelectionDAG - Register Allocation How registers are represented in @@ -1625,7 +1624,7 @@ mailto:[EMAIL PROTECTED]">Chris Lattner http://llvm.org";>The LLVM Compiler Infrastructure - Last modified: $Date: 2006/09/01 21:46:00 $ + Last modified: $Date: 2006/09/01 21:47:10 $ ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/utils/TableGen/FileParser.cpp.cvs FileParser.y FileParser.y.cvs
Changes in directory llvm/utils/TableGen: FileParser.cpp.cvs updated: 1.4 -> 1.5 FileParser.y updated: 1.43 -> 1.44 FileParser.y.cvs updated: 1.4 -> 1.5 --- Log message: fix an assertion with multidefs. Def inside of multiclasses don't need to be complete. --- Diffs of the changes: (+37 -25) FileParser.cpp.cvs | 50 +++--- FileParser.y |6 +- FileParser.y.cvs |6 +- 3 files changed, 37 insertions(+), 25 deletions(-) Index: llvm/utils/TableGen/FileParser.cpp.cvs diff -u llvm/utils/TableGen/FileParser.cpp.cvs:1.4 llvm/utils/TableGen/FileParser.cpp.cvs:1.5 --- llvm/utils/TableGen/FileParser.cpp.cvs:1.4 Fri Sep 1 16:14:42 2006 +++ llvm/utils/TableGen/FileParser.cpp.cvs Fri Sep 1 16:59:03 2006 @@ -350,10 +350,10 @@ 458, 471, 487, 489, 489, 493, 495, 499, 502, 506, 523, 525, 531, 531, 532, 532, 534, 536, 540, 545, 550, 553, 557, 560, 565, 566, 566, 568, 568, 570, - 577, 595, 620, 634, 639, 641, 643, 647, 656, 670, - 673, 677, 688, 690, 692, 697, 697, 759, 759, 760, - 760, 762, 767, 767, 770, 770, 773, 776, 780, 780, - 782 + 577, 595, 620, 634, 639, 641, 643, 647, 657, 671, + 674, 678, 689, 691, 693, 698, 698, 763, 763, 764, + 764, 766, 771, 771, 774, 774, 777, 780, 784, 784, + 786 }; #endif @@ -1679,7 +1679,8 @@ case 78: #line 647 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" { - yyvsp[0].Rec->resolveReferences(); + if (CurMultiClass == 0) // Def's in multiclasses aren't really defs. +yyvsp[0].Rec->resolveReferences(); // If ObjectBody has template arguments, it's an error. assert(yyvsp[0].Rec->getTemplateArgs().empty() && "How'd this get template args?"); @@ -1687,7 +1688,7 @@ ; break;} case 79: -#line 656 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" +#line 657 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" { yyval.Rec = yyvsp[0].Rec; // Copy the template arguments for the multiclass into the def. @@ -1701,20 +1702,20 @@ ; break;} case 80: -#line 670 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" +#line 671 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" { yyval.RecList = new std::vector(); yyval.RecList->push_back(yyvsp[0].Rec); ; break;} case 81: -#line 673 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" +#line 674 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" { yyval.RecList->push_back(yyvsp[0].Rec); ; break;} case 82: -#line 677 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" +#line 678 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" { MultiClass *&MCE = MultiClasses[*yyvsp[0].StrVal]; if (MCE) { @@ -1726,29 +1727,29 @@ ; break;} case 83: -#line 688 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" +#line 689 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" { ParsingTemplateArgs = true; ; break;} case 84: -#line 690 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" +#line 691 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" { ParsingTemplateArgs = false; ; break;} case 85: -#line 692 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" +#line 693 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" { CurMultiClass = 0; ; break;} case 86: -#line 697 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" +#line 698 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" { CurDefmPrefix = yyvsp[0].StrVal; ; break;} case 87: -#line 697 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" +#line 698 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" { // To instantiate a multiclass, we need to first get the multiclass, then // instantiate each def contained in the multiclass with the SubClassRef @@ -1804,6 +1805,9 @@ exit(1); } Records.addDef(CurRec); + +CurRec->resolveReferences(); + CurRec = 0; } @@ -1812,42 +1816,42 @@ ; break;} case 88: -#line 759 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" +#line 763 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" {; break;} case 89: -#line 759 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" +#line 763 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" {; break;} case 92: -#line 762 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" +#line 766 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" { LetStack.back().push_back(LetRecord(*yyvsp[-3].StrVal, yyvsp
[llvm-commits] CVS: llvm/docs/TableGenFundamentals.html
Changes in directory llvm/docs: TableGenFundamentals.html updated: 1.17 -> 1.18 --- Log message: Fix a typo Jim pointed out, thanks! --- Diffs of the changes: (+2 -2) TableGenFundamentals.html |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/docs/TableGenFundamentals.html diff -u llvm/docs/TableGenFundamentals.html:1.17 llvm/docs/TableGenFundamentals.html:1.18 --- llvm/docs/TableGenFundamentals.html:1.17Fri Sep 1 16:46:01 2006 +++ llvm/docs/TableGenFundamentals.html Fri Sep 1 17:01:36 2006 @@ -531,7 +531,7 @@ ... -The name of the resuntant definitions has the multidef fragment names +The name of the resultant definitions has the multidef fragment names appended to them, so this defines ADD_rr, ADD_ri, SUB_rr, etc. Using a multiclass this way is exactly equivalent to instantiating the classes multiple times yourself, e.g. by writing: @@ -639,7 +639,7 @@ mailto:[EMAIL PROTECTED]">Chris Lattner http://llvm.org";>LLVM Compiler Infrastructure - Last modified: $Date: 2006/09/01 21:46:01 $ + Last modified: $Date: 2006/09/01 22:01:36 $ ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Regression/TableGen/MultiClass.td
Changes in directory llvm/test/Regression/TableGen: MultiClass.td updated: 1.1 -> 1.2 --- Log message: Make this harder --- Diffs of the changes: (+2 -0) MultiClass.td |2 ++ 1 files changed, 2 insertions(+) Index: llvm/test/Regression/TableGen/MultiClass.td diff -u llvm/test/Regression/TableGen/MultiClass.td:1.1 llvm/test/Regression/TableGen/MultiClass.td:1.2 --- llvm/test/Regression/TableGen/MultiClass.td:1.1 Fri Sep 1 16:14:37 2006 +++ llvm/test/Regression/TableGen/MultiClass.td Fri Sep 1 17:07:00 2006 @@ -15,3 +15,5 @@ } defm FOO : t<42>; + +def T4 : C1<6, "foo">; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/utils/TableGen/FileParser.cpp.cvs FileParser.y FileParser.y.cvs
Changes in directory llvm/utils/TableGen: FileParser.cpp.cvs updated: 1.5 -> 1.6 FileParser.y updated: 1.44 -> 1.45 FileParser.y.cvs updated: 1.5 -> 1.6 --- Log message: Make sure to clear CurDefmPrefix = 0, otherwise stuff after a defm won't parse right. This fixes TableGen/MultiClass.td --- Diffs of the changes: (+15 -12) FileParser.cpp.cvs | 25 + FileParser.y |1 + FileParser.y.cvs |1 + 3 files changed, 15 insertions(+), 12 deletions(-) Index: llvm/utils/TableGen/FileParser.cpp.cvs diff -u llvm/utils/TableGen/FileParser.cpp.cvs:1.5 llvm/utils/TableGen/FileParser.cpp.cvs:1.6 --- llvm/utils/TableGen/FileParser.cpp.cvs:1.5 Fri Sep 1 16:59:03 2006 +++ llvm/utils/TableGen/FileParser.cpp.cvs Fri Sep 1 17:07:27 2006 @@ -351,9 +351,9 @@ 523, 525, 531, 531, 532, 532, 534, 536, 540, 545, 550, 553, 557, 560, 565, 566, 566, 568, 568, 570, 577, 595, 620, 634, 639, 641, 643, 647, 657, 671, - 674, 678, 689, 691, 693, 698, 698, 763, 763, 764, - 764, 766, 771, 771, 774, 774, 777, 780, 784, 784, - 786 + 674, 678, 689, 691, 693, 698, 698, 764, 764, 765, + 765, 767, 772, 772, 775, 775, 778, 781, 785, 785, + 787 }; #endif @@ -1813,45 +1813,46 @@ delete &TemplateVals; delete yyvsp[-4].StrVal; + CurDefmPrefix = 0; ; break;} case 88: -#line 763 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" +#line 764 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" {; break;} case 89: -#line 763 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" +#line 764 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" {; break;} case 92: -#line 766 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" +#line 767 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" { LetStack.back().push_back(LetRecord(*yyvsp[-3].StrVal, yyvsp[-2].BitList, yyvsp[0].Initializer)); delete yyvsp[-3].StrVal; delete yyvsp[-2].BitList; ; break;} case 95: -#line 774 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" +#line 775 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" { LetStack.push_back(std::vector()); ; break;} case 97: -#line 777 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" +#line 778 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" { LetStack.pop_back(); ; break;} case 98: -#line 780 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" +#line 781 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" { LetStack.pop_back(); ; break;} case 99: -#line 784 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" +#line 785 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" {; break;} case 100: -#line 784 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" +#line 785 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" {; break;} } @@ -2076,7 +2077,7 @@ } return 1; } -#line 788 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" +#line 789 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" int yyerror(const char *ErrorMsg) { Index: llvm/utils/TableGen/FileParser.y diff -u llvm/utils/TableGen/FileParser.y:1.44 llvm/utils/TableGen/FileParser.y:1.45 --- llvm/utils/TableGen/FileParser.y:1.44 Fri Sep 1 16:59:03 2006 +++ llvm/utils/TableGen/FileParser.yFri Sep 1 17:07:27 2006 @@ -758,6 +758,7 @@ delete &TemplateVals; delete $2; + CurDefmPrefix = 0; }; Object : ClassInst {} | DefInst {}; Index: llvm/utils/TableGen/FileParser.y.cvs diff -u llvm/utils/TableGen/FileParser.y.cvs:1.5 llvm/utils/TableGen/FileParser.y.cvs:1.6 --- llvm/utils/TableGen/FileParser.y.cvs:1.5Fri Sep 1 16:59:03 2006 +++ llvm/utils/TableGen/FileParser.y.cvsFri Sep 1 17:07:27 2006 @@ -758,6 +758,7 @@ delete &TemplateVals; delete $2; + CurDefmPrefix = 0; }; Object : ClassInst {} | DefInst {}; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/Sparc/SparcInstrInfo.td
Changes in directory llvm/lib/Target/Sparc: SparcInstrInfo.td updated: 1.125 -> 1.126 --- Log message: remove a bunch of comments --- Diffs of the changes: (+0 -54) SparcInstrInfo.td | 54 -- 1 files changed, 54 deletions(-) Index: llvm/lib/Target/Sparc/SparcInstrInfo.td diff -u llvm/lib/Target/Sparc/SparcInstrInfo.td:1.125 llvm/lib/Target/Sparc/SparcInstrInfo.td:1.126 --- llvm/lib/Target/Sparc/SparcInstrInfo.td:1.125 Fri Aug 11 04:03:00 2006 +++ llvm/lib/Target/Sparc/SparcInstrInfo.td Fri Sep 1 17:16:22 2006 @@ -515,60 +515,6 @@ "smul $b, $c, $dst", [(set IntRegs:$dst, (mul IntRegs:$b, simm13:$c))]>; -/* -//===- -// Sparc Example -defm intinst{OPC1, OPC2} { - def OPC1 : F3_1<2, Opc, asmstr, (ops IntRegs:$dst, IntRegs:$b, IntRegs:$c), - [(set IntRegs:$dst, (code IntRegs:$b, IntRegs:$c))]>; - def OPC2 : F3_2<2, Opc, asmstr, (ops IntRegs:$dst, IntRegs:$b, i32imm:$c), - [(set IntRegs:$dst, (code IntRegs:$b, simm13:$c))]>; -} -defm intinst_np{OPC1, OPC2} { - def OPC1 : F3_1<2, Opc, asmstr, (ops IntRegs:$dst, IntRegs:$b, IntRegs:$c), - []>; - def OPC2 : F3_2<2, Opc, asmstr, (ops IntRegs:$dst, IntRegs:$b, i32imm:$c), - []>; -} - -def { ADDXrr, ADDXri} : intinstnp<0b001000, "addx $b, $c, $dst">; -def { SUBrr, SUBri} : intinst <0b000100, "sub $b, $c, $dst", sub>; -def intinstnp{ SUBXrr, SUBXri}<0b001100, "subx $b, $c, $dst">; -def intinst {SUBCCrr, SUBCCri}<0b010100, "subcc $b, $c, $dst", SPcmpicc>; -def intinst { SMULrr, SMULri}<0b001011, "smul $b, $c, $dst", mul>; - -//===- -// X86 Example -defm cmov32 { - def OPC1 : I, TB; - def OPC2 : I, TB; -} - -def cmov; -def cmov; - -//===- -// PPC Example - -def fpunop { - def OPC1 : FORM; - def OPC2 : FORM; -} - -def fpunop< FABSS, FABSD, XForm_26, 63, 63, 264, "fabs", fabs>; -def fpunop; -def fpunop< FNEGS, FNEGD, XForm_26, 63, 63, 40, "fneg", fneg>; -*/ // Section B.19 - Divide Instructions, p. 115 def UDIVrr : F3_1<2, 0b001110, ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/Sparc/SparcInstrFormats.td SparcInstrInfo.td
Changes in directory llvm/lib/Target/Sparc: SparcInstrFormats.td updated: 1.16 -> 1.17 SparcInstrInfo.td updated: 1.126 -> 1.127 --- Log message: Use a couple of multiclass patterns to factor some integer ops. --- Diffs of the changes: (+51 -135) SparcInstrFormats.td |2 SparcInstrInfo.td| 184 +-- 2 files changed, 51 insertions(+), 135 deletions(-) Index: llvm/lib/Target/Sparc/SparcInstrFormats.td diff -u llvm/lib/Target/Sparc/SparcInstrFormats.td:1.16 llvm/lib/Target/Sparc/SparcInstrFormats.td:1.17 --- llvm/lib/Target/Sparc/SparcInstrFormats.td:1.16 Sat Feb 4 23:50:24 2006 +++ llvm/lib/Target/Sparc/SparcInstrFormats.td Fri Sep 1 17:28:02 2006 @@ -109,3 +109,5 @@ let Inst{13-5} = opfval; // fp opcode let Inst{4-0} = rs2; } + + Index: llvm/lib/Target/Sparc/SparcInstrInfo.td diff -u llvm/lib/Target/Sparc/SparcInstrInfo.td:1.126 llvm/lib/Target/Sparc/SparcInstrInfo.td:1.127 --- llvm/lib/Target/Sparc/SparcInstrInfo.td:1.126 Fri Sep 1 17:16:22 2006 +++ llvm/lib/Target/Sparc/SparcInstrInfo.td Fri Sep 1 17:28:02 2006 @@ -168,6 +168,32 @@ def FCC_ULE : FCC_VAL<28>; // Unordered or Less or Equal def FCC_O : FCC_VAL<29>; // Ordered +//===--===// +// Instruction Class Templates +//===--===// + +/// F3_12 multiclass - Define a normal F3_1/F3_2 pattern in one shot. +multiclass F3_12 Op3Val, SDNode OpNode> { + def rr : F3_1<2, Op3Val, + (ops IntRegs:$dst, IntRegs:$b, IntRegs:$c), + !strconcat(OpcStr, " $b, $c, $dst"), + [(set IntRegs:$dst, (OpNode IntRegs:$b, IntRegs:$c))]>; + def ri : F3_2<2, Op3Val, + (ops IntRegs:$dst, IntRegs:$b, i32imm:$c), + !strconcat(OpcStr, " $b, $c, $dst"), + [(set IntRegs:$dst, (OpNode IntRegs:$b, simm13:$c))]>; +} + +/// F3_12np multiclass - Define a normal F3_1/F3_2 pattern in one shot, with no +/// pattern. +multiclass F3_12np Op3Val> { + def rr : F3_1<2, Op3Val, + (ops IntRegs:$dst, IntRegs:$b, IntRegs:$c), + !strconcat(OpcStr, " $b, $c, $dst"), []>; + def ri : F3_2<2, Op3Val, + (ops IntRegs:$dst, IntRegs:$b, i32imm:$c), + !strconcat(OpcStr, " $b, $c, $dst"), []>; +} //===--===// // Instructions @@ -364,14 +390,8 @@ def NOP : F2_1<0b100, (ops), "nop", []>; // Section B.11 - Logical Instructions, p. 106 -def ANDrr : F3_1<2, 0b01, - (ops IntRegs:$dst, IntRegs:$b, IntRegs:$c), - "and $b, $c, $dst", - [(set IntRegs:$dst, (and IntRegs:$b, IntRegs:$c))]>; -def ANDri : F3_2<2, 0b01, - (ops IntRegs:$dst, IntRegs:$b, i32imm:$c), - "and $b, $c, $dst", - [(set IntRegs:$dst, (and IntRegs:$b, simm13:$c))]>; +defm AND: F3_12<"and", 0b01, and>; + def ANDNrr : F3_1<2, 0b000101, (ops IntRegs:$dst, IntRegs:$b, IntRegs:$c), "andn $b, $c, $dst", @@ -379,14 +399,9 @@ def ANDNri : F3_2<2, 0b000101, (ops IntRegs:$dst, IntRegs:$b, i32imm:$c), "andn $b, $c, $dst", []>; -def ORrr: F3_1<2, 0b10, - (ops IntRegs:$dst, IntRegs:$b, IntRegs:$c), - "or $b, $c, $dst", - [(set IntRegs:$dst, (or IntRegs:$b, IntRegs:$c))]>; -def ORri: F3_2<2, 0b10, - (ops IntRegs:$dst, IntRegs:$b, i32imm:$c), - "or $b, $c, $dst", - [(set IntRegs:$dst, (or IntRegs:$b, simm13:$c))]>; + +defm OR : F3_12<"or", 0b10, or>; + def ORNrr : F3_1<2, 0b000110, (ops IntRegs:$dst, IntRegs:$b, IntRegs:$c), "orn $b, $c, $dst", @@ -394,14 +409,8 @@ def ORNri : F3_2<2, 0b000110, (ops IntRegs:$dst, IntRegs:$b, i32imm:$c), "orn $b, $c, $dst", []>; -def XORrr : F3_1<2, 0b11, - (ops IntRegs:$dst, IntRegs:$b, IntRegs:$c), - "xor $b, $c, $dst", - [(set IntRegs:$dst, (xor IntRegs:$b, IntRegs:$c))]>; -def XORri : F3_2<2, 0b11, - (ops IntRegs:$dst, IntRegs:$b, i32imm:$c), - "xor $b, $c, $dst", - [(set IntRegs:$dst, (xor IntRegs:$b, simm13:$c))]>; +defm XOR: F3_12<"xor", 0b11, xor>; + def XNORrr : F3_1<2, 0b000111, (ops IntRegs:$dst, IntRegs:$b, IntRegs:$c), "xnor $b, $c, $dst", @@ -411,40 +420,12 @@ "xnor $b, $c, $dst", []>; // Section B.12 - Shift Instructions, p. 107 -def SLLrr : F3_1<2, 0b100101, - (ops IntRegs:$dst, IntRegs:$b, IntRegs:$c), -
[llvm-commits] CVS: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
Changes in directory llvm/lib/Target/X86: X86ISelDAGToDAG.cpp updated: 1.103 -> 1.104 --- Log message: Oops. Bad typo. Without the check of N1.hasOneUse() bad things can happen. Suppose the TokenFactor can reach the Op: [Load chain] ^ | [Load] ^^ || / \- / | / [Op] / ^ ^ |.. | | /| [TokenFactor] | ^ | | | \/ \ / [Store] If we move the Load below the TokenFactor, we would have created a cycle in the DAG. --- Diffs of the changes: (+2 -2) X86ISelDAGToDAG.cpp |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp diff -u llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.103 llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.104 --- llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.103 Tue Aug 29 16:42:58 2006 +++ llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Fri Sep 1 17:52:28 2006 @@ -308,8 +308,8 @@ SDOperand N1 = I->getOperand(1); SDOperand N2 = I->getOperand(2); -if (MVT::isFloatingPoint(N1.getValueType()) && -MVT::isVector(N1.getValueType()) && +if (MVT::isFloatingPoint(N1.getValueType()) || +MVT::isVector(N1.getValueType()) || !N1.hasOneUse()) continue; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CFP2006/434.zeusmp/Makefile
Changes in directory llvm-test/External/SPEC/CFP2006/434.zeusmp: Makefile added (r1.1) --- Log message: Initial commit for the SPEC2006 floating point Makefiles. --- Diffs of the changes: (+15 -0) Makefile | 15 +++ 1 files changed, 15 insertions(+) Index: llvm-test/External/SPEC/CFP2006/434.zeusmp/Makefile diff -c /dev/null llvm-test/External/SPEC/CFP2006/434.zeusmp/Makefile:1.1 *** /dev/null Fri Sep 1 18:27:23 2006 --- llvm-test/External/SPEC/CFP2006/434.zeusmp/Makefile Fri Sep 1 18:27:13 2006 *** *** 0 --- 1,15 + ##===- Makefile *- Makefile -*-===## + # + # This makefile contains information for building the SPEC2006 zeusmp test. + # + ##===--===## + + LEVEL = ../../../.. + + FP_TOLERANCE= 0.001 + FP_ABSTOLERANCE = 0.001 + + include ../../Makefile.spec2006 + include $(PROJ_SRC_ROOT)/Makefile.FORTRAN + + STDOUT_FILENAME := zeusmp.stdout ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CFP2006/433.milc/Makefile
Changes in directory llvm-test/External/SPEC/CFP2006/433.milc: Makefile added (r1.1) --- Log message: Initial commit for the SPEC2006 floating point Makefiles. --- Diffs of the changes: (+17 -0) Makefile | 17 + 1 files changed, 17 insertions(+) Index: llvm-test/External/SPEC/CFP2006/433.milc/Makefile diff -c /dev/null llvm-test/External/SPEC/CFP2006/433.milc/Makefile:1.1 *** /dev/null Fri Sep 1 18:27:23 2006 --- llvm-test/External/SPEC/CFP2006/433.milc/Makefile Fri Sep 1 18:27:13 2006 *** *** 0 --- 1,17 + ##===- Makefile *- Makefile -*-===## + # + # This makefile contains information for building the SPEC2006 milc test. + # + ##===--===## + + LEVEL = ../../../.. + + FP_TOLERANCE= 0.0001 + FP_ABSTOLERANCE = 0.002 + + include ../../Makefile.spec2006 + + CPPFLAGS += -DFN -DFAST -DCONGRAD_TMP_VECTORS -DDSLASH_TMP_LINKS + + STDIN_FILENAME := su3imp.in + STDOUT_FILENAME := su3imp.out ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CFP2006/435.gromacs/Makefile
Changes in directory llvm-test/External/SPEC/CFP2006/435.gromacs: Makefile added (r1.1) --- Log message: Initial commit for the SPEC2006 floating point Makefiles. --- Diffs of the changes: (+18 -0) Makefile | 18 ++ 1 files changed, 18 insertions(+) Index: llvm-test/External/SPEC/CFP2006/435.gromacs/Makefile diff -c /dev/null llvm-test/External/SPEC/CFP2006/435.gromacs/Makefile:1.1 *** /dev/null Fri Sep 1 18:27:23 2006 --- llvm-test/External/SPEC/CFP2006/435.gromacs/MakefileFri Sep 1 18:27:13 2006 *** *** 0 --- 1,18 + ##===- Makefile *- Makefile -*-===## + # + # This makefile contains information for building the SPEC2006 gromacs test. + # + ##===--===## + + LEVEL = ../../../.. + + FP_TOLERANCE = 0.0125 + + include ../../Makefile.spec2006 + include $(PROJ_SRC_ROOT)/Makefile.FORTRAN + + CPPFLAGS += -I$(SPEC_BENCH_DIR)/src/ -DHAVE_CONFIG_H + NAGFORTRAN_FLAGS = -maxcontin=50 + + RUN_OPTIONS := -silent -deffnm gromacs -nice 0 + STDOUT_FILENAME := gromacs.err ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CFP2006/447.dealII/Makefile
Changes in directory llvm-test/External/SPEC/CFP2006/447.dealII: Makefile added (r1.1) --- Log message: Initial commit for the SPEC2006 floating point Makefiles. --- Diffs of the changes: (+24 -0) Makefile | 24 1 files changed, 24 insertions(+) Index: llvm-test/External/SPEC/CFP2006/447.dealII/Makefile diff -c /dev/null llvm-test/External/SPEC/CFP2006/447.dealII/Makefile:1.1 *** /dev/null Fri Sep 1 18:27:23 2006 --- llvm-test/External/SPEC/CFP2006/447.dealII/Makefile Fri Sep 1 18:27:13 2006 *** *** 0 --- 1,24 + ##===- Makefile *- Makefile -*-===## + # + # This makefile contains information for building the SPEC2006 dealII test. + # + ##===--===## + + LEVEL = ../../../.. + + FP_ABSTOLERANCE = 0.001; + + include ../../Makefile.spec2006 + + CPPFLAGS += -I$(SPEC_BENCH_DIR)/src/include -DBOOST_DISABLE_THREADS + + ifeq ($(RUN_TYPE),test) + RUN_OPTIONS := 8 + else + RUN_OPTIONS := 10 + endif + + STDOUT_FILENAME := log + + LDFLAGS = -lstdc++ -lm + LIBS= -lstdc++ -lm ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CFP2006/410.bwaves/Makefile
Changes in directory llvm-test/External/SPEC/CFP2006/410.bwaves: Makefile added (r1.1) --- Log message: Initial commit for the SPEC2006 floating point Makefiles. --- Diffs of the changes: (+13 -0) Makefile | 13 + 1 files changed, 13 insertions(+) Index: llvm-test/External/SPEC/CFP2006/410.bwaves/Makefile diff -c /dev/null llvm-test/External/SPEC/CFP2006/410.bwaves/Makefile:1.1 *** /dev/null Fri Sep 1 18:27:23 2006 --- llvm-test/External/SPEC/CFP2006/410.bwaves/Makefile Fri Sep 1 18:27:13 2006 *** *** 0 --- 1,13 + ##===- Makefile *- Makefile -*-===## + # + # This makefile contains information for building the SPEC2006 bwaves test. + # + ##===--===## + + LEVEL = ../../../.. + + FP_TOLERANCE= 0.015 + FP_ABSTOLERANCE = 1.0e-16 + + include ../../Makefile.spec2006 + include $(PROJ_SRC_ROOT)/Makefile.FORTRAN ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CFP2006/482.sphinx3/Makefile
Changes in directory llvm-test/External/SPEC/CFP2006/482.sphinx3: Makefile added (r1.1) --- Log message: Initial commit for the SPEC2006 floating point Makefiles. --- Diffs of the changes: (+24 -0) Makefile | 24 1 files changed, 24 insertions(+) Index: llvm-test/External/SPEC/CFP2006/482.sphinx3/Makefile diff -c /dev/null llvm-test/External/SPEC/CFP2006/482.sphinx3/Makefile:1.1 *** /dev/null Fri Sep 1 18:27:23 2006 --- llvm-test/External/SPEC/CFP2006/482.sphinx3/MakefileFri Sep 1 18:27:13 2006 *** *** 0 --- 1,24 + ##===- Makefile *- Makefile -*-===## + # + # This makefile contains information for building the SPEC2006 sphinx3 test. + # + ##===--===## + + LEVEL = ../../../.. + + FP_TOLERANCE = 0.001 + + include ../../Makefile.spec2006 + + CPPFLAGS += -I$(SPEC_BENCH_DIR)/src/libutil -DHAVE_CONFIG_H -DSPEC_CPU + + ifeq ($(RUN_TYPE),test) + RUN_OPTIONS := `cp an406-fcaw-b.be.raw an406-fcaw-b.raw` \ + `cp an407-fcaw-b.be.raw an407-fcaw-b.raw` \ + `echo "an406-fcaw-b 128000" > ctlfile`\ + `echo "an407-fcaw-b 131200" >> ctlfile` ctlfile . args.an4 + STDOUT_FILENAME := an4.log + else + RUN_OPTIONS := leng100.hmm + STDOUT_FILENAME := leng100.out + endif ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CFP2006/481.wrf/Makefile
Changes in directory llvm-test/External/SPEC/CFP2006/481.wrf: Makefile added (r1.1) --- Log message: Initial commit for the SPEC2006 floating point Makefiles. --- Diffs of the changes: (+24 -0) Makefile | 24 1 files changed, 24 insertions(+) Index: llvm-test/External/SPEC/CFP2006/481.wrf/Makefile diff -c /dev/null llvm-test/External/SPEC/CFP2006/481.wrf/Makefile:1.1 *** /dev/null Fri Sep 1 18:27:24 2006 --- llvm-test/External/SPEC/CFP2006/481.wrf/MakefileFri Sep 1 18:27:13 2006 *** *** 0 --- 1,24 + ##===- Makefile *- Makefile -*-===## + # + # This makefile contains information for building the SPEC2006 wrf test. + # + ##===--===## + + LEVEL = ../../../.. + + FP_TOLERANCE= 5e-2 + FP_ABSTOLERANCE = 1.0e-2 + + include ../../Makefile.spec2006 + include $(PROJ_SRC_ROOT)/Makefile.FORTRAN + + FPPFLAGS += -w -m literal.pm \ + -DINTIO -DIWORDSIZE=4 -DDWORDSIZE=8 -DRWORDSIZE=4 -DLWORDSIZE=4 \ + -DNETCDF -DTRIEDNTRUE -DLIMIT_ARGS -DEM_CORE=1 -DNMM_CORE=0 \ + -DNMM_MAX_DIM=1000 -DCOAMPS_CORE=0 -DEXP_CORE=0 -DF90_STANDALONE \ + -DCONFIG_BUF_LEN=8192 -DMAX_DOMAINS_F=21 -DNO_NAMELIST_PRINT \ + -I$(SPEC_BENCH_DIR)/src + + CPPFLAGS += -I$(SPEC_BENCH_DIR)/src -I$(SPEC_BENCH_DIR)/src/netcdf/include + + STDOUT_FILENAME := rsl.out. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CFP2006/416.gamess/Makefile
Changes in directory llvm-test/External/SPEC/CFP2006/416.gamess: Makefile added (r1.1) --- Log message: Initial commit for the SPEC2006 floating point Makefiles. --- Diffs of the changes: (+24 -0) Makefile | 24 1 files changed, 24 insertions(+) Index: llvm-test/External/SPEC/CFP2006/416.gamess/Makefile diff -c /dev/null llvm-test/External/SPEC/CFP2006/416.gamess/Makefile:1.1 *** /dev/null Fri Sep 1 18:27:23 2006 --- llvm-test/External/SPEC/CFP2006/416.gamess/Makefile Fri Sep 1 18:27:13 2006 *** *** 0 --- 1,24 + ##===- Makefile *- Makefile -*-===## + # + # This makefile contains information for building the SPEC2006 gamess test. + # + ##===--===## + + LEVEL = ../../../.. + + FP_TOLERANCE= 0.0001 + FP_ABSTOLERANCE = 0.1 + + include ../../Makefile.spec2006 + include $(PROJ_SRC_ROOT)/Makefile.FORTRAN + + ifeq ($(RUN_TYPE),test) + STDIN_FILENAME := exam29.config + STDOUT_FILENAME := exam29.out + else + STDIN_FILENAME := h2ocu2+.energy.config + STDOUT_FILENAME := h2ocu2+.energy.out + endif + + NAGFORTRAN_FLAGS += -dusty -maxcontin=100 -dcfuns + FPPFLAGS += -DSPEC_CPU_NO_HOLLERITH ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CFP2006/465.tonto/Makefile
Changes in directory llvm-test/External/SPEC/CFP2006/465.tonto: Makefile added (r1.1) --- Log message: Initial commit for the SPEC2006 floating point Makefiles. --- Diffs of the changes: (+23 -0) Makefile | 23 +++ 1 files changed, 23 insertions(+) Index: llvm-test/External/SPEC/CFP2006/465.tonto/Makefile diff -c /dev/null llvm-test/External/SPEC/CFP2006/465.tonto/Makefile:1.1 *** /dev/null Fri Sep 1 18:27:23 2006 --- llvm-test/External/SPEC/CFP2006/465.tonto/Makefile Fri Sep 1 18:27:13 2006 *** *** 0 --- 1,23 + ##===- Makefile *- Makefile -*-===## + # + # This makefile contains information for building the SPEC2006 tonto test. + # + ##===--===## + + LEVEL = ../../../.. + + FP_TOLERANCE = 0.006 + + include ../../Makefile.spec2006 + include $(PROJ_SRC_ROOT)/Makefile.FORTRAN + + FPPFLAGS += -w -DUSE_PRE_AND_POST_CONDITIONS -DUSE_ERROR_MANAGEMENT \ + -m literal.pm -m tonto.pm + + ifeq ($(RUN_TYPE),test) + RUN_OPTIONS := stdin + STDOUT_FILENAME := test.out + else + RUN_OPTIONS := stdin + STDOUT_FILENAME := train.out + endif ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CFP2006/454.calculix/Makefile
Changes in directory llvm-test/External/SPEC/CFP2006/454.calculix: Makefile added (r1.1) --- Log message: Initial commit for the SPEC2006 floating point Makefiles. --- Diffs of the changes: (+23 -0) Makefile | 23 +++ 1 files changed, 23 insertions(+) Index: llvm-test/External/SPEC/CFP2006/454.calculix/Makefile diff -c /dev/null llvm-test/External/SPEC/CFP2006/454.calculix/Makefile:1.1 *** /dev/null Fri Sep 1 18:27:24 2006 --- llvm-test/External/SPEC/CFP2006/454.calculix/Makefile Fri Sep 1 18:27:13 2006 *** *** 0 --- 1,23 + ##===- Makefile *- Makefile -*-===## + # + # This makefile contains information for building the SPEC2006 calculix test. + # + ##===--===## + + LEVEL = ../../../.. + + FP_TOLERANCE= 5e-2 + FP_ABSTOLERANCE = 1.0e-2 + + include ../../Makefile.spec2006 + include $(PROJ_SRC_ROOT)/Makefile.FORTRAN + + CPPFLAGS += -I$(SPEC_BENCH_DIR)/src/SPOOLES + + ifeq ($(RUN_TYPE),test) + RUN_OPTIONS := -i beampic + STDOUT_FILENAME := beampic.log + else + RUN_OPTIONS := -i stairs + STDOUT_FILENAME := stairs.log + endif ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CFP2006/444.namd/Makefile
Changes in directory llvm-test/External/SPEC/CFP2006/444.namd: Makefile added (r1.1) --- Log message: Initial commit for the SPEC2006 floating point Makefiles. --- Diffs of the changes: (+22 -0) Makefile | 22 ++ 1 files changed, 22 insertions(+) Index: llvm-test/External/SPEC/CFP2006/444.namd/Makefile diff -c /dev/null llvm-test/External/SPEC/CFP2006/444.namd/Makefile:1.1 *** /dev/null Fri Sep 1 18:27:23 2006 --- llvm-test/External/SPEC/CFP2006/444.namd/Makefile Fri Sep 1 18:27:13 2006 *** *** 0 --- 1,22 + ##===- Makefile *- Makefile -*-===## + # + # This makefile contains information for building the SPEC2006 namd test. + # + ##===--===## + + LEVEL = ../../../.. + + FP_ABSTOLERANCE = 0.1 + + include ../../Makefile.spec2006 + + ifeq ($(RUN_TYPE),test) + RUN_OPTIONS := --input namd.input --iterations 1 --output namd.out + STDOUT_FILENAME := namd.stdout + else + RUN_OPTIONS := --input namd.input --iterations 1 --output namd.out + STDOUT_FILENAME := namd.stdout + endif + + LDFLAGS = -lstdc++ -lm + LIBS= -lstdc++ -lm ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CFP2006/Makefile
Changes in directory llvm-test/External/SPEC/CFP2006: Makefile added (r1.1) --- Log message: Initial commit for the SPEC2006 floating point Makefiles. --- Diffs of the changes: (+34 -0) Makefile | 34 ++ 1 files changed, 34 insertions(+) Index: llvm-test/External/SPEC/CFP2006/Makefile diff -c /dev/null llvm-test/External/SPEC/CFP2006/Makefile:1.1 *** /dev/null Fri Sep 1 18:27:23 2006 --- llvm-test/External/SPEC/CFP2006/MakefileFri Sep 1 18:27:13 2006 *** *** 0 --- 1,34 + ##===- Makefile *- Makefile -*-===## + # + # This makefile contains information for building SPEC2006 floating point tests. + # + ##===--===## + + LEVEL = ../../.. + + PARALLEL_DIRS := \ + 410.bwaves \ + 416.gamess \ + 433.milc \ + 434.zeusmp \ + 435.gromacs \ + 437.leslie3d \ + 444.namd \ + 459.GemsFDTD \ + 470.lbm + + # These compile but need other things to run: + # 450.soplex- enter.cc:535, works at -O0, not at -O2 + # 453.povray- c++ exceptions + # 465.tonto - infinite loop, works at -O0, not at -O2 + # 482.sphinx3 - generates control file at run time + # These don't compile + # 436.cactusADM - multiple dirs + # 447.dealII- multiple dirs + # 454.calculix - multiple dirs + # 481.wrf - multiple dirs + + # Get the $(ARCH) setting + include $(LEVEL)/Makefile.config + + include $(LEVEL)/Makefile.programs ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CFP2006/470.lbm/Makefile
Changes in directory llvm-test/External/SPEC/CFP2006/470.lbm: Makefile added (r1.1) --- Log message: Initial commit for the SPEC2006 floating point Makefiles. --- Diffs of the changes: (+14 -0) Makefile | 14 ++ 1 files changed, 14 insertions(+) Index: llvm-test/External/SPEC/CFP2006/470.lbm/Makefile diff -c /dev/null llvm-test/External/SPEC/CFP2006/470.lbm/Makefile:1.1 *** /dev/null Fri Sep 1 18:27:24 2006 --- llvm-test/External/SPEC/CFP2006/470.lbm/MakefileFri Sep 1 18:27:13 2006 *** *** 0 --- 1,14 + ##===- Makefile *- Makefile -*-===## + # + # This makefile contains information for building the SPEC2006 lbm test. + # + ##===--===## + + LEVEL = ../../../.. + + FP_ABSTOLERANCE = 0.001 + + include ../../Makefile.spec2006 + + RUN_OPTIONS := `cat $(REF_IN_DIR)lbm.in` + STDOUT_FILENAME := lbm.out ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CFP2006/437.leslie3d/Makefile
Changes in directory llvm-test/External/SPEC/CFP2006/437.leslie3d: Makefile added (r1.1) --- Log message: Initial commit for the SPEC2006 floating point Makefiles. --- Diffs of the changes: (+13 -0) Makefile | 13 + 1 files changed, 13 insertions(+) Index: llvm-test/External/SPEC/CFP2006/437.leslie3d/Makefile diff -c /dev/null llvm-test/External/SPEC/CFP2006/437.leslie3d/Makefile:1.1 *** /dev/null Fri Sep 1 18:27:23 2006 --- llvm-test/External/SPEC/CFP2006/437.leslie3d/Makefile Fri Sep 1 18:27:13 2006 *** *** 0 --- 1,13 + ##===- Makefile *- Makefile -*-===## + # + # This makefile contains information for building the SPEC2006 leslie3d test. + # + ##===--===## + + LEVEL = ../../../.. + + include ../../Makefile.spec2006 + include $(PROJ_SRC_ROOT)/Makefile.FORTRAN + + STDIN_FILENAME := leslie3d.in + STDOUT_FILENAME := leslie3d.out ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CFP2006/459.GemsFDTD/Makefile
Changes in directory llvm-test/External/SPEC/CFP2006/459.GemsFDTD: Makefile added (r1.1) --- Log message: Initial commit for the SPEC2006 floating point Makefiles. --- Diffs of the changes: (+21 -0) Makefile | 21 + 1 files changed, 21 insertions(+) Index: llvm-test/External/SPEC/CFP2006/459.GemsFDTD/Makefile diff -c /dev/null llvm-test/External/SPEC/CFP2006/459.GemsFDTD/Makefile:1.1 *** /dev/null Fri Sep 1 18:27:23 2006 --- llvm-test/External/SPEC/CFP2006/459.GemsFDTD/Makefile Fri Sep 1 18:27:13 2006 *** *** 0 --- 1,21 + ##===- Makefile *- Makefile -*-===## + # + # This makefile contains information for building the SPEC2006 GemsFTDT test. + # + ##===--===## + + LEVEL = ../../../.. + + FP_TOLERANCE= 1e-10 + FP_ABSTOLERANCE = 1e-9 + + include ../../Makefile.spec2006 + include $(PROJ_SRC_ROOT)/Makefile.FORTRAN + + ifeq ($(RUN_TYPE),test) + RUN_OPTIONS := test.in + STDOUT_FILENAME := test.log + else + RUN_OPTIONS := train.in + STDOUT_FILENAME := train.log + endif ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CFP2006/450.soplex/Makefile
Changes in directory llvm-test/External/SPEC/CFP2006/450.soplex: Makefile added (r1.1) --- Log message: Initial commit for the SPEC2006 floating point Makefiles. --- Diffs of the changes: (+25 -0) Makefile | 25 + 1 files changed, 25 insertions(+) Index: llvm-test/External/SPEC/CFP2006/450.soplex/Makefile diff -c /dev/null llvm-test/External/SPEC/CFP2006/450.soplex/Makefile:1.1 *** /dev/null Fri Sep 1 18:27:23 2006 --- llvm-test/External/SPEC/CFP2006/450.soplex/Makefile Fri Sep 1 18:27:13 2006 *** *** 0 --- 1,25 + ##===- Makefile *- Makefile -*-===## + # + # This makefile contains information for building the SPEC2006 soplex test. + # + ##===--===## + + LEVEL = ../../../.. + + FP_TOLERANCE= 0.0001 + FP_ABSTOLERANCE = 1.0e-5 + + include ../../Makefile.spec2006 + + CPPFLAGS += -DNDEBUG + + ifeq ($(RUN_TYPE),test) + RUN_OPTIONS := -s1 -e -m1 test.mps + STDOUT_FILENAME := test.out + else + RUN_OPTIONS := -s1 -e -m1200 train.mps + STDOUT_FILENAME := train.out + endif + + LDFLAGS = -lstdc++ -lm + LIBS= -lstdc++ -lm ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CFP2006/436.cactusADM/Makefile
Changes in directory llvm-test/External/SPEC/CFP2006/436.cactusADM: Makefile added (r1.1) --- Log message: Initial commit for the SPEC2006 floating point Makefiles. --- Diffs of the changes: (+14 -0) Makefile | 14 ++ 1 files changed, 14 insertions(+) Index: llvm-test/External/SPEC/CFP2006/436.cactusADM/Makefile diff -c /dev/null llvm-test/External/SPEC/CFP2006/436.cactusADM/Makefile:1.1 *** /dev/null Fri Sep 1 18:27:23 2006 --- llvm-test/External/SPEC/CFP2006/436.cactusADM/Makefile Fri Sep 1 18:27:13 2006 *** *** 0 --- 1,14 + ##===- Makefile *- Makefile -*-===## + # + # This makefile contains information for building the SPEC2006 cactusADM test. + # + ##===--===## + + LEVEL = ../../../.. + + include ../../Makefile.spec2006 + include $(PROJ_SRC_ROOT)/Makefile.FORTRAN + + CPPFLAGS += -DCCODE -I$(SPEC_BENCH_DIR)/src/include + + STDOUT_FILENAME := cactusADM.out ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CFP2006/453.povray/Makefile
Changes in directory llvm-test/External/SPEC/CFP2006/453.povray: Makefile added (r1.1) --- Log message: Initial commit for the SPEC2006 floating point Makefiles. --- Diffs of the changes: (+22 -0) Makefile | 22 ++ 1 files changed, 22 insertions(+) Index: llvm-test/External/SPEC/CFP2006/453.povray/Makefile diff -c /dev/null llvm-test/External/SPEC/CFP2006/453.povray/Makefile:1.1 *** /dev/null Fri Sep 1 18:27:23 2006 --- llvm-test/External/SPEC/CFP2006/453.povray/Makefile Fri Sep 1 18:27:13 2006 *** *** 0 --- 1,22 + ##===- Makefile *- Makefile -*-===## + # + # This makefile contains information for building the SPEC2006 povray test. + # + ##===--===## + + LEVEL = ../../../.. + + include ../../Makefile.spec2006 + + ifeq ($(RUN_TYPE),test) + FP_TOLERANCE = 0.0002 + RUN_OPTIONS := SPEC-benchmark-test + STDOUT_FILENAME := test.out + else + FP_TOLERANCE = 0.5 + RUN_OPTIONS := SPEC-benchmark-train + STDOUT_FILENAME := train.out + endif + + LDFLAGS = -lstdc++ -lm + LIBS= -lstdc++ -lm ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CINT2006/429.mcf/Makefile
Changes in directory llvm-test/External/SPEC/CINT2006/429.mcf: Makefile updated: 1.1 -> 1.2 --- Log message: Added perlbench Makefile. --- Diffs of the changes: (+0 -1) Makefile |1 - 1 files changed, 1 deletion(-) Index: llvm-test/External/SPEC/CINT2006/429.mcf/Makefile diff -u llvm-test/External/SPEC/CINT2006/429.mcf/Makefile:1.1 llvm-test/External/SPEC/CINT2006/429.mcf/Makefile:1.2 --- llvm-test/External/SPEC/CINT2006/429.mcf/Makefile:1.1 Thu Aug 31 14:26:36 2006 +++ llvm-test/External/SPEC/CINT2006/429.mcf/Makefile Fri Sep 1 18:29:51 2006 @@ -11,7 +11,6 @@ RUN_OPTIONS = inp.in CPPFLAGS += -DWANT_STDC_PROTO -LDFLAGS += -lm ifeq ($(RUN_TYPE),test) STDOUT_FILENAME := test.out ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CINT2006/400.perlbench/Makefile
Changes in directory llvm-test/External/SPEC/CINT2006/400.perlbench: Makefile added (r1.1) --- Log message: Added perlbench Makefile. --- Diffs of the changes: (+36 -0) Makefile | 36 1 files changed, 36 insertions(+) Index: llvm-test/External/SPEC/CINT2006/400.perlbench/Makefile diff -c /dev/null llvm-test/External/SPEC/CINT2006/400.perlbench/Makefile:1.1 *** /dev/null Fri Sep 1 18:30:01 2006 --- llvm-test/External/SPEC/CINT2006/400.perlbench/Makefile Fri Sep 1 18:29:51 2006 *** *** 0 --- 1,36 + ##===- Makefile *- Makefile -*-===## + # + # This makefile contains information for building the SPEC2006 400.perlbench + # test. + # + ##===--===## + + LEVEL = ../../../.. + + Source = $(addprefix $(SPEC_BENCH_DIR)/src/, \ + av.c deb.c doio.c doop.c dump.c globals.c gv.c hv.c locale.c mg.c \ + numeric.c op.c pad.c perl.c perlapi.c perlio.c perlmain.c perly.c pp.c \ + pp_ctl.c pp_hot.c pp_pack.c pp_sort.c pp_sys.c regcomp.c regexec.c run.c \ + scope.c sv.c taint.c toke.c universal.c utf8.c util.c xsutils.c Base64.c \ + Cwd.c Dumper.c HiRes.c IO.c Peek.c attrs.c poll.c stdio.c DynaLoader.c \ + MD5.c Storable.c Parser.c specrand.c Hostname.c Opcode.c) + + include ../../Makefile.spec2006 + + CPPFLAGS += -DPERL_CORE + + ifeq ($(OS),Darwin) + ifeq ($(ARCH),PowerPC) + CPPFLAGS += -DSPEC_CPU_MACOSX_PPC + else + ifeq ($(ARCH),x86) + CPPFLAGS += -DSPEC_CPU_MACOSX_IA32 + endif + endif + endif + + ifeq ($(RUN_TYPE),test) + RUN_OPTIONS = xxx + else + RUN_OPTIONS = xxx + endif ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CINT2006/401.bzip2/Makefile
Changes in directory llvm-test/External/SPEC/CINT2006/401.bzip2: Makefile updated: 1.1 -> 1.2 --- Log message: Added perlbench Makefile. --- Diffs of the changes: (+2 -2) Makefile |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm-test/External/SPEC/CINT2006/401.bzip2/Makefile diff -u llvm-test/External/SPEC/CINT2006/401.bzip2/Makefile:1.1 llvm-test/External/SPEC/CINT2006/401.bzip2/Makefile:1.2 --- llvm-test/External/SPEC/CINT2006/401.bzip2/Makefile:1.1 Thu Aug 31 14:26:35 2006 +++ llvm-test/External/SPEC/CINT2006/401.bzip2/Makefile Fri Sep 1 18:29:51 2006 @@ -6,6 +6,8 @@ LEVEL = ../../../.. +include ../../Makefile.spec2006 + RUN_OPTIONS = `head -n 1 $(REF_IN_DIR)control` ifeq ($(RUN_TYPE),test) @@ -13,5 +15,3 @@ else STDOUT_FILENAME := input.combined.out endif - -include ../../Makefile.spec2006 ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CINT2006/483.xalancbmk/Makefile
Changes in directory llvm-test/External/SPEC/CINT2006/483.xalancbmk: Makefile updated: 1.1 -> 1.2 --- Log message: Added perlbench Makefile. --- Diffs of the changes: (+1 -1) Makefile |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-test/External/SPEC/CINT2006/483.xalancbmk/Makefile diff -u llvm-test/External/SPEC/CINT2006/483.xalancbmk/Makefile:1.1 llvm-test/External/SPEC/CINT2006/483.xalancbmk/Makefile:1.2 --- llvm-test/External/SPEC/CINT2006/483.xalancbmk/Makefile:1.1 Thu Aug 31 14:26:36 2006 +++ llvm-test/External/SPEC/CINT2006/483.xalancbmk/Makefile Fri Sep 1 18:29:51 2006 @@ -17,7 +17,7 @@ -I$(SPEC_BENCH_DIR)/src/xercesc/sax \ -I$(SPEC_BENCH_DIR)/src/xercesc/util/MsgLoaders/InMemory \ -I$(SPEC_BENCH_DIR)/src/xercesc/util/Transcoders/Iconv\ --I$(SPEC_BENCH_DIR)/src/xalanc/include +-I$(SPEC_BENCH_DIR)/src/xalanc/Include include ../../Makefile.spec2006 ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Regression/CodeGen/X86/2006-09-01-CycleInDAG.ll
Changes in directory llvm/test/Regression/CodeGen/X86: 2006-09-01-CycleInDAG.ll added (r1.1) --- Log message: Another "cyclic DAG" test case. --- Diffs of the changes: (+135 -0) 2006-09-01-CycleInDAG.ll | 135 +++ 1 files changed, 135 insertions(+) Index: llvm/test/Regression/CodeGen/X86/2006-09-01-CycleInDAG.ll diff -c /dev/null llvm/test/Regression/CodeGen/X86/2006-09-01-CycleInDAG.ll:1.1 *** /dev/null Fri Sep 1 18:50:28 2006 --- llvm/test/Regression/CodeGen/X86/2006-09-01-CycleInDAG.ll Fri Sep 1 18:50:17 2006 *** *** 0 --- 1,135 + ; RUN: llvm-as < %s | llc -march=x86 + + target endian = little + target pointersize = 32 + target triple = "i686-apple-darwin8" + %struct.CUMULATIVE_ARGS = type { int, int, int, int, int, int, int, int, int, int, int, int } + %struct.FILE = type { ubyte*, int, int, short, short, %struct.__sbuf, int, sbyte*, int (sbyte*)*, int (sbyte*, sbyte*, int)*, long (sbyte*, long, int)*, int (sbyte*, sbyte*, int)*, %struct.__sbuf, %struct.__sFILEX*, int, [3 x ubyte], [1 x ubyte], %struct.__sbuf, int, long } + %struct.VEC_edge = type { uint, uint, [1 x %struct.edge_def*] } + %struct.VEC_tree = type { uint, uint, [1 x %struct.tree_node*] } + %struct.__sFILEX = type opaque + %struct.__sbuf = type { ubyte*, int } + %struct._obstack_chunk = type { sbyte*, %struct._obstack_chunk*, [4 x sbyte] } + %struct._var_map = type { %struct.partition_def*, int*, int*, %struct.tree_node**, uint, uint, int* } + %struct.basic_block_def = type { %struct.rtx_def*, %struct.rtx_def*, %struct.tree_node*, %struct.VEC_edge*, %struct.VEC_edge*, %struct.bitmap_head_def*, %struct.bitmap_head_def*, sbyte*, %struct.loop*, [2 x %struct.et_node*], %struct.basic_block_def*, %struct.basic_block_def*, %struct.reorder_block_def*, %struct.bb_ann_d*, long, int, int, int, int } + %struct.bb_ann_d = type { %struct.tree_node*, ubyte, %struct.edge_prediction* } + %struct.bitmap_element_def = type { %struct.bitmap_element_def*, %struct.bitmap_element_def*, uint, [4 x uint] } + %struct.bitmap_head_def = type { %struct.bitmap_element_def*, %struct.bitmap_element_def*, uint, %struct.bitmap_obstack* } + %struct.bitmap_iterator = type { %struct.bitmap_element_def*, %struct.bitmap_element_def*, uint, uint } + %struct.bitmap_obstack = type { %struct.bitmap_element_def*, %struct.bitmap_head_def*, %struct.obstack } + %struct.block_stmt_iterator = type { %struct.tree_stmt_iterator, %struct.basic_block_def* } + %struct.coalesce_list_d = type { %struct._var_map*, %struct.partition_pair_d**, bool } + %struct.conflict_graph_def = type opaque + %struct.dataflow_d = type { %struct.varray_head_tag*, [2 x %struct.tree_node*] } + %struct.def_operand_ptr = type { %struct.tree_node** } + %struct.def_optype_d = type { uint, [1 x %struct.def_operand_ptr] } + %struct.die_struct = type opaque + %struct.edge_def = type { %struct.basic_block_def*, %struct.basic_block_def*, %struct.edge_def_insns, sbyte*, %struct.location_t*, int, int, long, uint } + %struct.edge_def_insns = type { %struct.rtx_def* } + %struct.edge_iterator = type { uint, %struct.VEC_edge** } + %struct.edge_prediction = type { %struct.edge_prediction*, %struct.edge_def*, uint, int } + %struct.eh_status = type opaque + %struct.elt_list = type opaque + %struct.emit_status = type { int, int, %struct.rtx_def*, %struct.rtx_def*, %struct.sequence_stack*, int, %struct.location_t, int, ubyte*, %struct.rtx_def** } + %struct.et_node = type opaque + %struct.expr_status = type { int, int, int, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def* } + %struct.function = type { %struct.eh_status*, %struct.expr_status*, %struct.emit_status*, %struct.varasm_status*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.function*, int, int, int, int, %struct.rtx_def*, %struct.CUMULATIVE_ARGS, %struct.rtx_def*, %struct.rtx_def*, %struct.initial_value_struct*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, ubyte, int, long, %struct.tree_node*, %struct.tree_node*, %struct.rtx_def*, %struct.varray_head_tag*, %struct.temp_slot*, int, %struct.var_refs_queue*, int, int, %struct.rtvec_def*, %struct.tree_node*, int, int, int, %struct.machine_function*, uint, uint, bool, bool, %struct.language_function*, %struct.rtx_def*, uint, int, int, int, %struct.location_t, %struct.varray_head_tag*, %struct.tree_node*, ubyte, ubyte, ubyte } + %struct.ht_identifier = type { ubyte*, uint, uint } + %struct.initial_value_struct = type opaque + %struct.lang_decl = type opaque + %struct.lang_type = type opaque + %struct.language_function = type opaque + %struct.location_t = type { sbyte*, int } + %str
[llvm-commits] CVS: llvm-test/autoconf/configure.ac
Changes in directory llvm-test/autoconf: configure.ac updated: 1.36 -> 1.37 --- Log message: Added support for SPEC2006. --- Diffs of the changes: (+13 -0) configure.ac | 13 + 1 files changed, 13 insertions(+) Index: llvm-test/autoconf/configure.ac diff -u llvm-test/autoconf/configure.ac:1.36 llvm-test/autoconf/configure.ac:1.37 --- llvm-test/autoconf/configure.ac:1.36Wed Aug 16 17:09:23 2006 +++ llvm-test/autoconf/configure.ac Fri Sep 1 19:04:00 2006 @@ -33,8 +33,11 @@ AC_CONFIG_MAKEFILE(External/Povray/Makefile) AC_CONFIG_MAKEFILE(External/SPEC/Makefile) AC_CONFIG_MAKEFILE(External/SPEC/Makefile.spec) +AC_CONFIG_MAKEFILE(External/SPEC/Makefile.spec2006) AC_CONFIG_MAKEFILE(External/SPEC/Makefile.spec2000) AC_CONFIG_MAKEFILE(External/SPEC/Makefile.spec95) +AC_CONFIG_MAKEFILE(External/SPEC/CFP2006/Makefile) +AC_CONFIG_MAKEFILE(External/SPEC/CINT2006/Makefile) AC_CONFIG_MAKEFILE(External/SPEC/CFP2000/Makefile) AC_CONFIG_MAKEFILE(External/SPEC/CINT2000/Makefile) AC_CONFIG_MAKEFILE(External/SPEC/CFP95/Makefile) @@ -69,6 +72,7 @@ dnl Configure the default locations of the external benchmarks EXTERNAL_BENCHMARK(spec95,${LLVM_EXTERNALS}/spec95/benchspec) EXTERNAL_BENCHMARK(spec2000,${LLVM_EXTERNALS}/speccpu2000/benchspec) +EXTERNAL_BENCHMARK(spec2006,${LLVM_EXTERNALS}/speccpu2006/benchspec) EXTERNAL_BENCHMARK(povray,${LLVM_EXTERNALS}/povray31) EXTERNAL_BENCHMARK(namd,${LLVM_EXTERNALS}/spec_namd) EXTERNAL_BENCHMARK(sweep3d,${LLVM_EXTERNALS}/sweep3d) @@ -77,6 +81,15 @@ EXTERNAL_BENCHMARK(nurbs,${LLVM_EXTERNALS}/nurbs) dnl Check that the paths of provided external benchmark dirs make sense +if test -n "$SPEC2006_ROOT" ; then + if test -d "$SPEC2006_ROOT" ; then +if test `basename "$SPEC2006_ROOT"` != "benchspec"; then + AC_MSG_ERROR([SPEC 2006 directory must end in 'benchspec']) +fi + else +AC_MSG_ERROR([SPEC 2006 option must specify a directory]) + fi +fi if test -n "$SPEC2000_ROOT" ; then if test -d "$SPEC2000_ROOT" ; then if test `basename "$SPEC2000_ROOT"` != "benchspec"; then ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/Makefile.config.in
Changes in directory llvm-test: Makefile.config.in updated: 1.20 -> 1.21 --- Log message: Added support for SPEC2006. --- Diffs of the changes: (+2 -0) Makefile.config.in |2 ++ 1 files changed, 2 insertions(+) Index: llvm-test/Makefile.config.in diff -u llvm-test/Makefile.config.in:1.20 llvm-test/Makefile.config.in:1.21 --- llvm-test/Makefile.config.in:1.20 Mon Apr 17 03:02:47 2006 +++ llvm-test/Makefile.config.inFri Sep 1 19:04:00 2006 @@ -35,10 +35,12 @@ # SPEC benchmarks: # If these are set then run the SPEC benchmarks. # You must provide the SPEC benchmarks on your own. [EMAIL PROTECTED]@ @USE_SPEC2000@ @USE_SPEC95@ # Path to the SPEC benchmarks. +SPEC2006_ROOT := @SPEC2006_ROOT@ SPEC2000_ROOT := @SPEC2000_ROOT@ SPEC95_ROOT := @SPEC95_ROOT@ ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/Makefile Makefile.spec
Changes in directory llvm-test/External/SPEC: Makefile updated: 1.18 -> 1.19 Makefile.spec updated: 1.55 -> 1.56 --- Log message: Added support for SPEC2006. --- Diffs of the changes: (+20 -9) Makefile | 15 +-- Makefile.spec | 14 +++--- 2 files changed, 20 insertions(+), 9 deletions(-) Index: llvm-test/External/SPEC/Makefile diff -u llvm-test/External/SPEC/Makefile:1.18 llvm-test/External/SPEC/Makefile:1.19 --- llvm-test/External/SPEC/Makefile:1.18 Mon Oct 25 23:51:51 2004 +++ llvm-test/External/SPEC/MakefileFri Sep 1 19:04:00 2006 @@ -1,10 +1,21 @@ +##===- Makefile *- Makefile -*-===## +# +# This makefile runs the SPEC benchmarks. +# +##===--===## + LEVEL = ../.. -PARALLEL_DIRS := CFP2000 CINT2000 CFP95 CINT95 +PARALLEL_DIRS := CFP2006 CINT2006 CFP2000 CINT2000 CFP95 CINT95 include $(LEVEL)/Makefile.config # -# Remove SPEC95 and SPEC2000 per the user's configuration +# Remove SPEC95, SPEC2000, and SPEC2006 per the user's configuration # +ifndef USE_SPEC2006 +PARALLEL_DIRS := $(filter-out CFP2006, $(PARALLEL_DIRS)) +PARALLEL_DIRS := $(filter-out CINT2006, $(PARALLEL_DIRS)) +endif + ifndef USE_SPEC2000 PARALLEL_DIRS := $(filter-out CFP2000, $(PARALLEL_DIRS)) PARALLEL_DIRS := $(filter-out CINT2000, $(PARALLEL_DIRS)) Index: llvm-test/External/SPEC/Makefile.spec diff -u llvm-test/External/SPEC/Makefile.spec:1.55 llvm-test/External/SPEC/Makefile.spec:1.56 --- llvm-test/External/SPEC/Makefile.spec:1.55 Tue Jun 27 15:37:01 2006 +++ llvm-test/External/SPEC/Makefile.spec Fri Sep 1 19:04:00 2006 @@ -1,7 +1,7 @@ ##===- Makefile.spec ---*- Makefile -*-===## # -# This makefile is a template for building SPEC as an external -# test. It is included by Makefile.spec2000 and Makefile.spec95. +# This makefile is a template for building SPEC as an external test. It is +# included by Makefile.spec2006, Makefile.spec2000, and Makefile.spec95. # ##===--===## @@ -38,12 +38,12 @@ PROG := $(BENCH_NAME) ifndef Source -Source := $(wildcard $(SPEC_BENCH_DIR)/src/*.c \ -$(SPEC_BENCH_DIR)/src/*.C \ - $(SPEC_BENCH_DIR)/src/*.cc \ +Source := $(wildcard $(SPEC_BENCH_DIR)/src/*.c \ + $(SPEC_BENCH_DIR)/src/*.C \ + $(SPEC_BENCH_DIR)/src/*.cc \ $(SPEC_BENCH_DIR)/src/*.cpp \ - $(SPEC_BENCH_DIR)/src/*.f \ - $(SPEC_BENCH_DIR)/src/*.F \ + $(SPEC_BENCH_DIR)/src/*.f \ + $(SPEC_BENCH_DIR)/src/*.F \ $(SPEC_BENCH_DIR)/src/*.f90 \ $(SPEC_BENCH_DIR)/src/*.F90) endif ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CINT2006/400.perlbench/Makefile
Changes in directory llvm-test/External/SPEC/CINT2006/400.perlbench: Makefile updated: 1.1 -> 1.2 --- Log message: Added RUN_OPTIONS, STD{OUT,IN}_FILENAME flags. Removed redundant "Source" line --- Diffs of the changes: (+11 -10) Makefile | 21 +++-- 1 files changed, 11 insertions(+), 10 deletions(-) Index: llvm-test/External/SPEC/CINT2006/400.perlbench/Makefile diff -u llvm-test/External/SPEC/CINT2006/400.perlbench/Makefile:1.1 llvm-test/External/SPEC/CINT2006/400.perlbench/Makefile:1.2 --- llvm-test/External/SPEC/CINT2006/400.perlbench/Makefile:1.1 Fri Sep 1 18:29:51 2006 +++ llvm-test/External/SPEC/CINT2006/400.perlbench/Makefile Fri Sep 1 20:29:28 2006 @@ -7,14 +7,6 @@ LEVEL = ../../../.. -Source = $(addprefix $(SPEC_BENCH_DIR)/src/, \ - av.c deb.c doio.c doop.c dump.c globals.c gv.c hv.c locale.c mg.c\ - numeric.c op.c pad.c perl.c perlapi.c perlio.c perlmain.c perly.c pp.c \ - pp_ctl.c pp_hot.c pp_pack.c pp_sort.c pp_sys.c regcomp.c regexec.c run.c \ - scope.c sv.c taint.c toke.c universal.c utf8.c util.c xsutils.c Base64.c \ - Cwd.c Dumper.c HiRes.c IO.c Peek.c attrs.c poll.c stdio.c DynaLoader.c \ - MD5.c Storable.c Parser.c specrand.c Hostname.c Opcode.c) - include ../../Makefile.spec2006 CPPFLAGS += -DPERL_CORE @@ -29,8 +21,17 @@ endif endif +ifeq ($(ENDIAN),little) + CPPFLAGS += -D__LITTLE_ENDIAN__ +else + CPPFLAGS += -D__BIG_ENDIAN__ +endif + ifeq ($(RUN_TYPE),test) - RUN_OPTIONS = xxx + RUN_OPTIONS = test.pl + STDOUT_FILENAME := test.out else - RUN_OPTIONS = xxx + RUN_OPTIONS = scrabbl.pl + STDIN_FILENAME := scrabbl.in + STDOUT_FILENAME := scrabbl.out endif ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CINT2006/429.mcf/Makefile
Changes in directory llvm-test/External/SPEC/CINT2006/429.mcf: Makefile updated: 1.2 -> 1.3 --- Log message: Cosmetic changes --- Diffs of the changes: (+2 -7) Makefile |9 ++--- 1 files changed, 2 insertions(+), 7 deletions(-) Index: llvm-test/External/SPEC/CINT2006/429.mcf/Makefile diff -u llvm-test/External/SPEC/CINT2006/429.mcf/Makefile:1.2 llvm-test/External/SPEC/CINT2006/429.mcf/Makefile:1.3 --- llvm-test/External/SPEC/CINT2006/429.mcf/Makefile:1.2 Fri Sep 1 18:29:51 2006 +++ llvm-test/External/SPEC/CINT2006/429.mcf/Makefile Fri Sep 1 20:30:39 2006 @@ -8,12 +8,7 @@ include ../../Makefile.spec2006 -RUN_OPTIONS = inp.in - CPPFLAGS += -DWANT_STDC_PROTO -ifeq ($(RUN_TYPE),test) - STDOUT_FILENAME := test.out -else - STDOUT_FILENAME := train.out -endif +RUN_OPTIONS = inp.in +STDOUT_FILENAME := inp.out ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CINT2006/401.bzip2/Makefile
Changes in directory llvm-test/External/SPEC/CINT2006/401.bzip2: Makefile updated: 1.2 -> 1.3 --- Log message: Cosmetic changes --- Diffs of the changes: (+1 -0) Makefile |1 + 1 files changed, 1 insertion(+) Index: llvm-test/External/SPEC/CINT2006/401.bzip2/Makefile diff -u llvm-test/External/SPEC/CINT2006/401.bzip2/Makefile:1.2 llvm-test/External/SPEC/CINT2006/401.bzip2/Makefile:1.3 --- llvm-test/External/SPEC/CINT2006/401.bzip2/Makefile:1.2 Fri Sep 1 18:29:51 2006 +++ llvm-test/External/SPEC/CINT2006/401.bzip2/Makefile Fri Sep 1 20:30:39 2006 @@ -8,6 +8,7 @@ include ../../Makefile.spec2006 +## FIXME: The control file has more than one line in it. RUN_OPTIONS = `head -n 1 $(REF_IN_DIR)control` ifeq ($(RUN_TYPE),test) ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CINT2006/403.gcc/Makefile
Changes in directory llvm-test/External/SPEC/CINT2006/403.gcc: Makefile updated: 1.1 -> 1.2 --- Log message: Cosmetic changes --- Diffs of the changes: (+4 -2) Makefile |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) Index: llvm-test/External/SPEC/CINT2006/403.gcc/Makefile diff -u llvm-test/External/SPEC/CINT2006/403.gcc/Makefile:1.1 llvm-test/External/SPEC/CINT2006/403.gcc/Makefile:1.2 --- llvm-test/External/SPEC/CINT2006/403.gcc/Makefile:1.1 Thu Aug 31 14:26:35 2006 +++ llvm-test/External/SPEC/CINT2006/403.gcc/Makefile Fri Sep 1 20:30:39 2006 @@ -17,7 +17,9 @@ endif ifeq ($(RUN_TYPE),test) - RUN_OPTIONS = cccp.i -o cccp.s + RUN_OPTIONS = cccp.i -o cccp.s + STDOUT_FILENAME := cccp.s else - RUN_OPTIONS = integrate.i -o integrate.s + RUN_OPTIONS = integrate.i -o integrate.s + STDOUT_FILENAME := integrate.s endif ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CINT2006/445.gobmk/Makefile
Changes in directory llvm-test/External/SPEC/CINT2006/445.gobmk: Makefile updated: 1.1 -> 1.2 --- Log message: Add attempt to handle multiple directories --- Diffs of the changes: (+25 -2) Makefile | 27 +-- 1 files changed, 25 insertions(+), 2 deletions(-) Index: llvm-test/External/SPEC/CINT2006/445.gobmk/Makefile diff -u llvm-test/External/SPEC/CINT2006/445.gobmk/Makefile:1.1 llvm-test/External/SPEC/CINT2006/445.gobmk/Makefile:1.2 --- llvm-test/External/SPEC/CINT2006/445.gobmk/Makefile:1.1 Thu Aug 31 14:26:36 2006 +++ llvm-test/External/SPEC/CINT2006/445.gobmk/Makefile Fri Sep 1 20:31:50 2006 @@ -6,14 +6,37 @@ LEVEL = ../../../.. +Source = $(addprefix $(SPEC_BENCH_DIR)/src/sgf/, \ + sgf_utils.c sgftree.c sgfnode.c) \ + $(addprefix $(SPEC_BENCH_DIR)/src/engine/, \ + aftermath.c board.c cache.c combination.c dragon.c filllib.c \ + fuseki.c genmove.c hash.c influence.c interface.c matchpat.c \ + move_reasons.c movelist.c optics.c owl.c printutils.c readconnect.c \ + reading.c score.c semeai.c sgfdecide.c sgffile.c shapes.c \ + showbord.c utils.c value_moves.c worm.c globals.c persistent.c \ + handicap.c surround.c) \ + $(addprefix $(SPEC_BENCH_DIR)/src/interface/, \ + gtp.c main.c play_ascii.c play_gtp.c play_solo.c play_test.c) \ + $(addprefix $(SPEC_BENCH_DIR)/src/patterns/, \ + connections.c dfa.c helpers.c transform.c owl_attackpat.c conn.c \ + patterns.c apatterns.c dpatterns.c owl_vital_apat.c eyes.c \ + influence.c barriers.c endgame.c aa_attackpat.c owl_defendpat.c \ + fusekipat.c fuseki9.c fuseki13.c fuseki19.c josekidb.c handipat.c) \ + $(addprefix $(SPEC_BENCH_DIR)/src/utils/, \ + getopt.c getopt1.c gg_utils.c random.c) + include ../../Makefile.spec2006 CPPFLAGS += -DHAVE_CONFIG_H +## FIXME: Multiple *.tst files + ifeq ($(RUN_TYPE),test) - RUN_OPTIONS := --quiet --mode gtp capture.tst + RUN_OPTIONS := --quiet --mode gtp + STDIN_FILENAME := capture.tst STDOUT_FILENAME := capture.out else - RUN_OPTIONS := --quiet --mode gtp arb.tst + RUN_OPTIONS := --quiet --mode gtp + STDIN_FILENAME := arb.tst STDOUT_FILENAME := arb.out endif ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CINT2006/471.omnetpp/Makefile
Changes in directory llvm-test/External/SPEC/CINT2006/471.omnetpp: Makefile updated: 1.1 -> 1.2 --- Log message: Add attempt to handle multiple directories --- Diffs of the changes: (+27 -8) Makefile | 35 +++ 1 files changed, 27 insertions(+), 8 deletions(-) Index: llvm-test/External/SPEC/CINT2006/471.omnetpp/Makefile diff -u llvm-test/External/SPEC/CINT2006/471.omnetpp/Makefile:1.1 llvm-test/External/SPEC/CINT2006/471.omnetpp/Makefile:1.2 --- llvm-test/External/SPEC/CINT2006/471.omnetpp/Makefile:1.1 Thu Aug 31 14:26:36 2006 +++ llvm-test/External/SPEC/CINT2006/471.omnetpp/Makefile Fri Sep 1 20:31:50 2006 @@ -6,8 +6,32 @@ LEVEL = ../../../.. -FP_ABSTOLERANCE = 0.01 FP_TOLERANCE= 0.1 +FP_ABSTOLERANCE = 0.01 + +Source = $(addprefix $(SPEC_BENCH_DIR)/src/, \ + EtherAppCli.cc EtherAppCli_n.cc EtherAppSrv.cc EtherAppSrv_n.cc \ + EtherApp_m.cc EtherBus.cc EtherBus_n.cc EtherCtrl_m.cc \ + EtherEncap.cc EtherEncap_n.cc EtherFrame_m.cc EtherHost_n.cc \ + EtherHub.cc EtherHub_n.cc EtherLLC.cc EtherLLC_n.cc EtherMAC.cc \ + EtherMAC_n.cc EtherSwitch_n.cc LargeNet_n.cc MACAddress.cc \ + MACAddress_m.cc MACRelayUnitBase.cc MACRelayUnitNP.cc \ + MACRelayUnitNP_n.cc MACRelayUnitPP.cc MACRelayUnitPP_n.cc \ + MACRelayUnit_n.cc Networks_n.cc eth-index_n.cc utils.cc) \ + $(addprefix $(SPEC_BENCH_DIR)/src/libs/cmdenv/, \ + cmdenv.cc enumstr.cc heap.cc) \ + $(addprefix $(SPEC_BENCH_DIR)/src/libs/envir/, \ + akoutvectormgr.cc args.cc cenvir.cc cinifile.cc filemgrs.cc main.cc \ + omnetapp.cc patmatch.cc platdep.cc seeds.cc slaveapp.cc speedmtr.cc)\ + $(addprefix $(SPEC_BENCH_DIR)/src/libs/sim/, \ + carray.cc cexception.cc cmessage.cc cpar.cc ctypes.cc task.cc \ + cchannel.cc cfsm.cc cmodule.cc cpsquare.cc cvarhist.cc util.cc \ + ccoroutine.cc cgate.cc cmsgheap.cc cqueue.cc cwatch.cc cdensity.cc \ + chead.cc cnetmod.cc csimul.cc distrib.cc cdetect.cc chist.cc \ + cobject.cc cstat.cc errmsg.cc cdispstr.cc cksplit.cc coutvect.cc \ + cstruct.cc onstartup.cc cenum.cc cllist.cc cpacket.cc ctopo.cc \ + random.cc std/netpack.cc) \ + $(SPEC_BENCH_DIR)/src/libs/spec/spec_qsort.cc CPPFLAGS += -DNDEBUG=1\ -I$(SPEC_BENCH_DIR)/src/omnet_include \ @@ -15,10 +39,5 @@ include ../../Makefile.spec2006 -RUN_OPTIONS = omnetpp.ini - -ifeq ($(RUN_TYPE),test) - STDOUT_FILENAME := test.out -else - STDOUT_FILENAME := train.out -endif +RUN_OPTIONS = omnetpp.ini +STDOUT_FILENAME := omnetpp.log ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CINT2006/456.hmmer/Makefile
Changes in directory llvm-test/External/SPEC/CINT2006/456.hmmer: Makefile updated: 1.1 -> 1.2 --- Log message: Cosmetic changes --- Diffs of the changes: (+1 -1) Makefile |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-test/External/SPEC/CINT2006/456.hmmer/Makefile diff -u llvm-test/External/SPEC/CINT2006/456.hmmer/Makefile:1.1 llvm-test/External/SPEC/CINT2006/456.hmmer/Makefile:1.2 --- llvm-test/External/SPEC/CINT2006/456.hmmer/Makefile:1.1 Thu Aug 31 14:26:36 2006 +++ llvm-test/External/SPEC/CINT2006/456.hmmer/Makefile Fri Sep 1 20:32:22 2006 @@ -6,8 +6,8 @@ LEVEL = ../../../.. -FP_ABSTOLERANCE = 0.1 FP_TOLERANCE= 0.002 +FP_ABSTOLERANCE = 0.1 include ../../Makefile.spec2006 ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CINT2006/483.xalancbmk/Makefile
Changes in directory llvm-test/External/SPEC/CINT2006/483.xalancbmk: Makefile updated: 1.2 -> 1.3 --- Log message: Cosmetic changes --- Diffs of the changes: (+1 -1) Makefile |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-test/External/SPEC/CINT2006/483.xalancbmk/Makefile diff -u llvm-test/External/SPEC/CINT2006/483.xalancbmk/Makefile:1.2 llvm-test/External/SPEC/CINT2006/483.xalancbmk/Makefile:1.3 --- llvm-test/External/SPEC/CINT2006/483.xalancbmk/Makefile:1.2 Fri Sep 1 18:29:51 2006 +++ llvm-test/External/SPEC/CINT2006/483.xalancbmk/Makefile Fri Sep 1 20:32:22 2006 @@ -17,7 +17,7 @@ -I$(SPEC_BENCH_DIR)/src/xercesc/sax \ -I$(SPEC_BENCH_DIR)/src/xercesc/util/MsgLoaders/InMemory \ -I$(SPEC_BENCH_DIR)/src/xercesc/util/Transcoders/Iconv\ --I$(SPEC_BENCH_DIR)/src/xalanc/Include +-I$(SPEC_BENCH_DIR)/src/xalanc/include include ../../Makefile.spec2006 ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
Changes in directory llvm/include/llvm/CodeGen: LiveIntervalAnalysis.h updated: 1.57 -> 1.58 --- Log message: new method --- Diffs of the changes: (+7 -0) LiveIntervalAnalysis.h |7 +++ 1 files changed, 7 insertions(+) Index: llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h diff -u llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h:1.57 llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h:1.58 --- llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h:1.57 Thu Aug 31 23:02:42 2006 +++ llvm/include/llvm/CodeGen/LiveIntervalAnalysis.hSat Sep 2 00:26:01 2006 @@ -168,6 +168,13 @@ /// below to update aliases. bool JoinIntervals(LiveInterval &LHS, LiveInterval &RHS); +/// SimpleJoin - Attempt to joint the specified interval into this one. The +/// caller of this method must guarantee that the RHS only contains a single +/// value number and that the RHS is not defined by a copy from this +/// interval. This returns false if the intervals are not joinable, or it +/// joins them and returns true. +bool SimpleJoin(LiveInterval &LHS, LiveInterval &RHS); + /// handleRegisterDef - update intervals for a register def /// (calls handlePhysicalRegisterDef and /// handleVirtualRegisterDef) ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/CodeGen/LiveInterval.cpp LiveIntervalAnalysis.cpp
Changes in directory llvm/lib/CodeGen: LiveInterval.cpp updated: 1.34 -> 1.35 LiveIntervalAnalysis.cpp updated: 1.179 -> 1.180 --- Log message: When joining two intervals where the RHS is really simple, use a light-weight method for joining the live ranges instead of the fully-general one. --- Diffs of the changes: (+172 -11) LiveInterval.cpp | 17 LiveIntervalAnalysis.cpp | 166 +++ 2 files changed, 172 insertions(+), 11 deletions(-) Index: llvm/lib/CodeGen/LiveInterval.cpp diff -u llvm/lib/CodeGen/LiveInterval.cpp:1.34 llvm/lib/CodeGen/LiveInterval.cpp:1.35 --- llvm/lib/CodeGen/LiveInterval.cpp:1.34 Thu Aug 31 00:54:43 2006 +++ llvm/lib/CodeGen/LiveInterval.cpp Sat Sep 2 00:26:59 2006 @@ -351,6 +351,23 @@ weight += Other.weight; } +/// MergeRangesInAsValue - Merge all of the intervals in RHS into this live +/// interval as the specified value number. The LiveRanges in RHS are +/// allowed to overlap with LiveRanges in the current interval, but only if +/// the overlapping LiveRanges have the specified value number. +void LiveInterval::MergeRangesInAsValue(const LiveInterval &RHS, +unsigned LHSValNo) { + // TODO: Make this more efficient. + iterator InsertPos = begin(); + for (const_iterator I = RHS.begin(), E = RHS.end(); I != E; ++I) { +// Map the ValId in the other live range to the current live range. +LiveRange Tmp = *I; +Tmp.ValId = LHSValNo; +InsertPos = addRangeFrom(Tmp, InsertPos); + } +} + + /// MergeInClobberRanges - For any live ranges that are not defined in the /// current interval, but are defined in the Clobbers interval, mark them /// used with an unknown definition value. Index: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp diff -u llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.179 llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.180 --- llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.179 Fri Sep 1 02:00:23 2006 +++ llvm/lib/CodeGen/LiveIntervalAnalysis.cpp Sat Sep 2 00:26:59 2006 @@ -883,6 +883,140 @@ return ThisValNoAssignments[VN] = UltimateVN; } +Statistic<> A("x", "a"); +Statistic<> B("x", "b"); +Statistic<> C("x", "c"); +Statistic<> D("x", "d"); + + +static bool InVector(unsigned Val, const SmallVector &V) { + return std::find(V.begin(), V.end(), Val) != V.end(); +} + +/// SimpleJoin - Attempt to joint the specified interval into this one. The +/// caller of this method must guarantee that the RHS only contains a single +/// value number and that the RHS is not defined by a copy from this +/// interval. This returns false if the intervals are not joinable, or it +/// joins them and returns true. +bool LiveIntervals::SimpleJoin(LiveInterval &LHS, LiveInterval &RHS) { + assert(RHS.containsOneValue()); + + // Some number (potentially more than one) value numbers in the current + // interval may be defined as copies from the RHS. Scan the overlapping + // portions of the LHS and RHS, keeping track of this and looking for + // overlapping live ranges that are NOT defined as copies. If these exist, we + // cannot coallesce. + + LiveInterval::iterator LHSIt = LHS.begin(), LHSEnd = LHS.end(); + LiveInterval::iterator RHSIt = RHS.begin(), RHSEnd = RHS.end(); + + if (LHSIt->start < RHSIt->start) { +LHSIt = std::upper_bound(LHSIt, LHSEnd, RHSIt->start); +if (LHSIt != LHS.begin()) --LHSIt; + } else if (RHSIt->start < LHSIt->start) { +RHSIt = std::upper_bound(RHSIt, RHSEnd, LHSIt->start); +if (RHSIt != RHS.begin()) --RHSIt; + } + + SmallVector EliminatedLHSVals; + + while (1) { +// Determine if these live intervals overlap. +bool Overlaps = false; +if (LHSIt->start <= RHSIt->start) + Overlaps = LHSIt->end > RHSIt->start; +else + Overlaps = RHSIt->end > LHSIt->start; + +// If the live intervals overlap, there are two interesting cases: if the +// LHS interval is defined by a copy from the RHS, it's ok and we record +// that the LHS value # is the same as the RHS. If it's not, then we cannot +// coallesce these live ranges and we bail out. +if (Overlaps) { + // If we haven't already recorded that this value # is safe, check it. + if (!InVector(LHSIt->ValId, EliminatedLHSVals)) { +// Copy from the RHS? +unsigned SrcReg = LHS.getSrcRegForValNum(LHSIt->ValId); +if (rep(SrcReg) != RHS.reg) + return false;// Nope, bail out. + +EliminatedLHSVals.push_back(LHSIt->ValId); + } + + // We know this entire LHS live range is okay, so skip it now. + if (++LHSIt == LHSEnd) break; + continue; +} + +if (LHSIt->end < RHSIt->end) { + if (++LHSIt == LHSEnd) break; +} else { + // One interesting case to check here. It's possible that we have + // something like "X3 = Y" which defines a new value number in the LHS, + // and is the last use of this liv
[llvm-commits] CVS: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
Changes in directory llvm/lib/CodeGen: LiveIntervalAnalysis.cpp updated: 1.180 -> 1.181 --- Log message: Iteration is required for some cases, even if they don't occur in crafty. Restore it, which re-fixes X86/2006-08-21-ExtraMovInst.ll --- Diffs of the changes: (+24 -13) LiveIntervalAnalysis.cpp | 37 - 1 files changed, 24 insertions(+), 13 deletions(-) Index: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp diff -u llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.180 llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.181 --- llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.180 Sat Sep 2 00:26:59 2006 +++ llvm/lib/CodeGen/LiveIntervalAnalysis.cpp Sat Sep 2 00:32:53 2006 @@ -883,12 +883,6 @@ return ThisValNoAssignments[VN] = UltimateVN; } -Statistic<> A("x", "a"); -Statistic<> B("x", "b"); -Statistic<> C("x", "c"); -Statistic<> D("x", "d"); - - static bool InVector(unsigned Val, const SmallVector &V) { return std::find(V.begin(), V.end(), Val) != V.end(); } @@ -1048,13 +1042,11 @@ } else { RHSValNoInfo = RHS.getValNumInfo(0); } - ++A; } else { // It was defined as a copy from the LHS, find out what value # it is. unsigned ValInst = RHS.getInstForValNum(0); RHSValID = LHS.getLiveRangeContaining(ValInst-1)->ValId; RHSValNoInfo = LHS.getValNumInfo(RHSValID); - ++B; } LHSValNoAssignments.resize(LHS.getNumValNums(), -1); @@ -1093,7 +1085,6 @@ RHSValNoAssignments[0] = RHSValID; } else { -++D; // Loop over the value numbers of the LHS, seeing if any are defined from // the RHS. SmallVector LHSValsDefinedFromRHS; @@ -1223,7 +1214,8 @@ } -void LiveIntervals::CopyCoallesceInMBB(MachineBasicBlock *MBB) { +void LiveIntervals::CopyCoallesceInMBB(MachineBasicBlock *MBB, + std::vector &TryAgain) { DEBUG(std::cerr << ((Value*)MBB->getBasicBlock())->getName() << ":\n"); for (MachineBasicBlock::iterator MII = MBB->begin(), E = MBB->end(); @@ -1234,7 +1226,8 @@ unsigned SrcReg, DstReg; if (!tii_->isMoveInstr(*Inst, SrcReg, DstReg)) continue; -JoinCopy(Inst, SrcReg, DstReg); +if (!JoinCopy(Inst, SrcReg, DstReg)) + TryAgain.push_back(getCopyRec(Inst, SrcReg, DstReg)); } } @@ -1242,12 +1235,14 @@ void LiveIntervals::joinIntervals() { DEBUG(std::cerr << "** JOINING INTERVALS ***\n"); + std::vector TryAgainList; + const LoopInfo &LI = getAnalysis(); if (LI.begin() == LI.end()) { // If there are no loops in the function, join intervals in function order. for (MachineFunction::iterator I = mf_->begin(), E = mf_->end(); I != E; ++I) - CopyCoallesceInMBB(I); + CopyCoallesceInMBB(I, TryAgainList); } else { // Otherwise, join intervals in inner loops before other intervals. // Unfortunately we can't just iterate over loop hierarchy here because @@ -1262,7 +1257,23 @@ // Finally, join intervals in loop nest order. for (unsigned i = 0, e = MBBs.size(); i != e; ++i) - CopyCoallesceInMBB(MBBs[i].second); + CopyCoallesceInMBB(MBBs[i].second, TryAgainList); + } + + // Joining intervals can allow other intervals to be joined. Iteratively join + // until we make no progress. + bool ProgressMade = true; + while (ProgressMade) { +ProgressMade = false; + +for (unsigned i = 0, e = TryAgainList.size(); i != e; ++i) { + CopyRec &TheCopy = TryAgainList[i]; + if (TheCopy.MI && + JoinCopy(TheCopy.MI, TheCopy.SrcReg, TheCopy.DstReg)) { +TheCopy.MI = 0; // Mark this one as done. +ProgressMade = true; + } +} } DEBUG(std::cerr << "*** Register mapping ***\n"); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
Changes in directory llvm/include/llvm/CodeGen: LiveIntervalAnalysis.h updated: 1.58 -> 1.59 --- Log message: Iteration is required for some cases, even if they don't occur in crafty. Restore it, which re-fixes X86/2006-08-21-ExtraMovInst.ll --- Diffs of the changes: (+15 -3) LiveIntervalAnalysis.h | 18 +++--- 1 files changed, 15 insertions(+), 3 deletions(-) Index: llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h diff -u llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h:1.58 llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h:1.59 --- llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h:1.58 Sat Sep 2 00:26:01 2006 +++ llvm/include/llvm/CodeGen/LiveIntervalAnalysis.hSat Sep 2 00:32:53 2006 @@ -53,6 +53,17 @@ std::vector allocatableRegs_; public: +struct CopyRec { + MachineInstr *MI; + unsigned SrcReg, DstReg; +}; +CopyRec getCopyRec(MachineInstr *MI, unsigned SrcReg, unsigned DstReg) { + CopyRec R; + R.MI = MI; + R.SrcReg = SrcReg; + R.DstReg = DstReg; + return R; +} struct InstrSlots { enum { LOAD = 0, @@ -150,9 +161,10 @@ /// joinIntervals - join compatible live intervals void joinIntervals(); -/// CopyCoallesceInMBB - Coallsece copies in the specified MBB. -void CopyCoallesceInMBB(MachineBasicBlock *MBB); - +/// CopyCoallesceInMBB - Coallsece copies in the specified MBB, putting +/// copies that cannot yet be coallesced into the "TryAgain" list. +void CopyCoallesceInMBB(MachineBasicBlock *MBB, +std::vector &TryAgain); /// JoinCopy - Attempt to join intervals corresponding to SrcReg/DstReg, /// which are the src/dst of the copy instruction CopyMI. This returns true /// if the copy was successfully coallesced away, or if it is never possible ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/CodeGen/LiveInterval.h
Changes in directory llvm/include/llvm/CodeGen: LiveInterval.h updated: 1.24 -> 1.25 --- Log message: add a prototype --- Diffs of the changes: (+7 -1) LiveInterval.h |8 +++- 1 files changed, 7 insertions(+), 1 deletion(-) Index: llvm/include/llvm/CodeGen/LiveInterval.h diff -u llvm/include/llvm/CodeGen/LiveInterval.h:1.24 llvm/include/llvm/CodeGen/LiveInterval.h:1.25 --- llvm/include/llvm/CodeGen/LiveInterval.h:1.24 Fri Sep 1 01:57:35 2006 +++ llvm/include/llvm/CodeGen/LiveInterval.hSat Sep 2 00:37:53 2006 @@ -166,6 +166,13 @@ /// used with an unknown definition value. void MergeInClobberRanges(const LiveInterval &Clobbers); + +/// MergeRangesInAsValue - Merge all of the intervals in RHS into this live +/// interval as the specified value number. The LiveRanges in RHS are +/// allowed to overlap with LiveRanges in the current interval, but only if +/// the overlapping LiveRanges have the specified value number. +void MergeRangesInAsValue(const LiveInterval &RHS, unsigned LHSValNo); + bool empty() const { return ranges.empty(); } /// beginNumber - Return the lowest numbered slot covered by interval. @@ -233,7 +240,6 @@ int *RHSValNoAssignments, SmallVector,16> &NewValueNumberInfo); - /// removeRange - Remove the specified range from this interval. Note that /// the range must already be in this interval in its entirety. void removeRange(unsigned Start, unsigned End); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits