From resistor at mac.com Mon Jun 25 00:41:35 2007 From: resistor at mac.com (Owen Anderson) Date: Mon, 25 Jun 2007 00:41:35 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/GVNPRE.cpp Message-ID: <200706250541.l5P5fZqT009143@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: GVNPRE.cpp updated: 1.56 -> 1.57 --- Log message: 1) Fix an issue with non-deterministic iteration order in phi_translate 2) Remove some maximal-set computing code that is no longer used. 3) Use a post-order CFG traversal to compute ANTIC_IN instead of a postdom traversal. This causes the ANTIC_IN calculation to converge much faster. Thanks to Daniel Berlin for suggesting this. With this patch, the time to optimize 403.gcc decreased from 17.5s to 7.5s, and Anton's huge testcase decreased from 62 minutes to 38 seconds. --- Diffs of the changes: (+86 -111) GVNPRE.cpp | 197 ++++++++++++++++++++++++++----------------------------------- 1 files changed, 86 insertions(+), 111 deletions(-) Index: llvm/lib/Transforms/Scalar/GVNPRE.cpp diff -u llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.56 llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.57 --- llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.56 Sun Jun 24 03:42:24 2007 +++ llvm/lib/Transforms/Scalar/GVNPRE.cpp Mon Jun 25 00:41:12 2007 @@ -24,7 +24,6 @@ #include "llvm/Instructions.h" #include "llvm/Function.h" #include "llvm/Analysis/Dominators.h" -#include "llvm/Analysis/PostDominators.h" #include "llvm/ADT/BitVector.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/DepthFirstIterator.h" @@ -86,9 +85,6 @@ DenseMap valueNumbering; std::map expressionNumbering; - std::set maximalExpressions; - SmallPtrSet maximalValues; - uint32_t nextValueNumber; Expression::ExpressionOpcode getOpcode(BinaryOperator* BO); @@ -101,11 +97,6 @@ uint32_t lookup(Value* V); void add(Value* V, uint32_t num); void clear(); - std::set& getMaximalExpressions() { - return maximalExpressions; - - } - SmallPtrSet& getMaximalValues() { return maximalValues; } void erase(Value* v); unsigned size(); }; @@ -230,8 +221,6 @@ e.rightVN = lookup_or_add(BO->getOperand(1)); e.opcode = getOpcode(BO); - maximalExpressions.insert(e); - return e; } @@ -242,8 +231,6 @@ e.rightVN = lookup_or_add(C->getOperand(1)); e.opcode = getOpcode(C); - maximalExpressions.insert(e); - return e; } @@ -254,8 +241,6 @@ /// lookup_or_add - Returns the value number for the specified value, assigning /// it a new number if it did not have one before. uint32_t ValueTable::lookup_or_add(Value* V) { - maximalValues.insert(V); - DenseMap::iterator VI = valueNumbering.find(V); if (VI != valueNumbering.end()) return VI->second; @@ -314,23 +299,16 @@ valueNumbering.insert(std::make_pair(V, num)); } -/// clear - Remove all entries from the ValueTable and the maximal sets +/// clear - Remove all entries from the ValueTable void ValueTable::clear() { valueNumbering.clear(); expressionNumbering.clear(); - maximalExpressions.clear(); - maximalValues.clear(); nextValueNumber = 1; } -/// erase - Remove a value from the value numbering and maximal sets +/// erase - Remove a value from the value numbering void ValueTable::erase(Value* V) { - maximalValues.erase(V); valueNumbering.erase(V); - if (BinaryOperator* BO = dyn_cast(V)) - maximalExpressions.erase(create_expression(BO)); - else if (CmpInst* C = dyn_cast(V)) - maximalExpressions.erase(create_expression(C)); } /// size - Return the number of assigned value numbers @@ -362,7 +340,6 @@ virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesCFG(); AU.addRequired(); - AU.addRequired(); } // Helper fuctions @@ -467,33 +444,38 @@ if (V == 0) return 0; - if (BinaryOperator* BO = dyn_cast(V)) { + if (isa(V) || isa(V)) { + User* U = cast(V); + Value* newOp1 = 0; - if (isa(BO->getOperand(0))) - newOp1 = phi_translate(find_leader(anticipatedIn[succ], - VN.lookup(BO->getOperand(0))), - pred, succ); + if (isa(U->getOperand(0))) + newOp1 = phi_translate(U->getOperand(0), pred, succ); else - newOp1 = BO->getOperand(0); + newOp1 = U->getOperand(0); if (newOp1 == 0) return 0; Value* newOp2 = 0; - if (isa(BO->getOperand(1))) - newOp2 = phi_translate(find_leader(anticipatedIn[succ], - VN.lookup(BO->getOperand(1))), - pred, succ); + if (isa(U->getOperand(1))) + newOp2 = phi_translate(U->getOperand(1), pred, succ); else - newOp2 = BO->getOperand(1); + newOp2 = U->getOperand(1); if (newOp2 == 0) return 0; - if (newOp1 != BO->getOperand(0) || newOp2 != BO->getOperand(1)) { - Instruction* newVal = BinaryOperator::create(BO->getOpcode(), - newOp1, newOp2, - BO->getName()+".expr"); + if (newOp1 != U->getOperand(0) || newOp2 != U->getOperand(1)) { + Instruction* newVal = 0; + if (BinaryOperator* BO = dyn_cast(U)) + newVal = BinaryOperator::create(BO->getOpcode(), + newOp1, newOp2, + BO->getName()+".expr"); + else if (CmpInst* C = dyn_cast(U)) + newVal = CmpInst::create(C->getOpcode(), + C->getPredicate(), + newOp1, newOp2, + C->getName()+".expr"); uint32_t v = VN.lookup_or_add(newVal); @@ -510,47 +492,6 @@ } else if (PHINode* P = dyn_cast(V)) { if (P->getParent() == succ) return P->getIncomingValueForBlock(pred); - } else if (CmpInst* C = dyn_cast(V)) { - Value* newOp1 = 0; - if (isa(C->getOperand(0))) - newOp1 = phi_translate(find_leader(anticipatedIn[succ], - VN.lookup(C->getOperand(0))), - pred, succ); - else - newOp1 = C->getOperand(0); - - if (newOp1 == 0) - return 0; - - Value* newOp2 = 0; - if (isa(C->getOperand(1))) - newOp2 = phi_translate(find_leader(anticipatedIn[succ], - VN.lookup(C->getOperand(1))), - pred, succ); - else - newOp2 = C->getOperand(1); - - if (newOp2 == 0) - return 0; - - if (newOp1 != C->getOperand(0) || newOp2 != C->getOperand(1)) { - Instruction* newVal = CmpInst::create(C->getOpcode(), - C->getPredicate(), - newOp1, newOp2, - C->getName()+".expr"); - - uint32_t v = VN.lookup_or_add(newVal); - - Value* leader = find_leader(availableOut[pred], v); - if (leader == 0) { - createdExpressions.push_back(newVal); - return newVal; - } else { - VN.erase(newVal); - delete newVal; - return leader; - } - } } return V; @@ -728,9 +669,9 @@ E = df_end(DT.getRootNode()); DI != E; ++DI) { BasicBlock* BB = DI->getBlock(); - DOUT << "Block: " << BB->getName() << "\n"; - dump(availableOut[BB]); - DOUT << "\n\n"; + //DOUT << "Block: " << BB->getName() << "\n"; + //dump(availableOut[BB]); + //DOUT << "\n\n"; for (BasicBlock::iterator BI = BB->begin(), BE = BB->end(); BI != BE; ++BI) { @@ -866,11 +807,15 @@ SmallPtrSet& anticOut, std::set& visited) { if (BB->getTerminator()->getNumSuccessors() == 1) { - if (visited.count(BB->getTerminator()->getSuccessor(0)) == 0) + if (BB->getTerminator()->getSuccessor(0) != BB && + visited.count(BB->getTerminator()->getSuccessor(0)) == 0) { + DOUT << "DEFER: " << BB->getName() << "\n"; return true; - else + } + else { phi_translate_set(anticipatedIn[BB->getTerminator()->getSuccessor(0)], BB, BB->getTerminator()->getSuccessor(0), anticOut); + } } else if (BB->getTerminator()->getNumSuccessors() > 1) { BasicBlock* first = BB->getTerminator()->getSuccessor(0); anticOut.insert(anticipatedIn[first].begin(), anticipatedIn[first].end()); @@ -910,13 +855,17 @@ if (defer) return 0; + + anticIn.clear(); BitVector numbers(VN.size()); for (SmallPtrSet::iterator I = anticOut.begin(), E = anticOut.end(); I != E; ++I) { anticIn.insert(*I); - numbers.set(VN.lookup_or_add(*I)); + unsigned num = VN.lookup_or_add(*I); + numbers.resize(VN.size()); + numbers.set(num); } for (SmallPtrSet::iterator I = currExps.begin(), E = currExps.end(); I != E; ++I) { @@ -931,11 +880,15 @@ anticIn.erase(*I); clean(anticIn); - anticOut.clear(); - if (old != anticIn.size()) + if (old != anticIn.size()) { + DOUT << "OLD: " << old << "\n"; + DOUT << "NEW: " << anticIn.size() << "\n"; + DOUT << "ANTIC_OUT: " << anticOut.size() << "\n"; + anticOut.clear(); return 2; - else + } else + anticOut.clear(); return 1; } @@ -979,21 +932,41 @@ currTemps, availNumbers, expNumbers); } + + // Phase 1, Part 2: calculate ANTIC_IN - // If function has no exit blocks, only perform GVN - PostDominatorTree &PDT = getAnalysis(); - if (PDT[&F.getEntryBlock()] == 0) { - bool changed_function = elimination(); - cleanup(); + DOUT << "Calculating walk\n"; + // Calculate a postorder CFG walk + std::vector walk; + std::vector walkStack; + SmallPtrSet walkVisited; + walkStack.push_back(&F.getEntryBlock()); + walkVisited.insert(&F.getEntryBlock()); + + while (!walkStack.empty()) { + BasicBlock* BB = walkStack.back(); + walkVisited.insert(BB); + + bool inserted = false; + for (unsigned i = 0; i < BB->getTerminator()->getNumSuccessors(); ++i) { + BasicBlock* succ = BB->getTerminator()->getSuccessor(i); + if (walkVisited.count(succ) == 0) { + walkStack.push_back(succ); + inserted = true; + } + } - if (changed_function) - return 2; // Bailed early, made changes - else - return 1; // Bailed early, no changes + if (inserted) + continue; + else { + walk.push_back(BB); + walkStack.pop_back(); + } } + DOUT << "Finished calculating walk\n"; - // Phase 1, Part 2: calculate ANTIC_IN + // Perform the ANTIC_IN calculation std::set visited; @@ -1004,23 +977,23 @@ SmallPtrSet anticOut; // Top-down walk of the postdominator tree - for (df_iterator PDI = - df_begin(PDT.getRootNode()), E = df_end(PDT.getRootNode()); - PDI != E; ++PDI) { - BasicBlock* BB = PDI->getBlock(); + for (std::vector::iterator BBI = walk.begin(), BBE = walk.end(); + BBI != BBE; ++BBI) { + BasicBlock* BB = *BBI; if (BB == 0) continue; - - unsigned ret = buildsets_anticin(BB, anticOut,generatedExpressions[BB], generatedTemporaries[BB], visited); if (ret == 0) { changed = true; - break; + continue; } else { visited.insert(BB); + if (ret == 2) { + DOUT << "CHANGED: " << BB->getName() << "\n"; + } changed |= (ret == 2); } } @@ -1028,6 +1001,8 @@ iterations++; } + DOUT << "ITERATIONS: " << iterations << "\n"; + return 0; // No bail, no changes } @@ -1197,10 +1172,10 @@ workList.reserve(anticIn.size()); topo_sort(anticIn, workList); - DOUT << "Merge Block: " << BB->getName() << "\n"; - DOUT << "ANTIC_IN: "; - dump(anticIn); - DOUT << "\n"; + //DOUT << "Merge Block: " << BB->getName() << "\n"; + //DOUT << "ANTIC_IN: "; + //dump(anticIn); + //DOUT << "\n"; unsigned result = insertion_mergepoint(workList, DI, new_set); if (result & 1) From asl at math.spbu.ru Mon Jun 25 02:12:37 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Mon, 25 Jun 2007 02:12:37 -0500 Subject: [llvm-commits] CVS: llvm/lib/System/Win32/DynamicLibrary.inc Message-ID: <200706250712.l5P7CbTh013600@zion.cs.uiuc.edu> Changes in directory llvm/lib/System/Win32: DynamicLibrary.inc updated: 1.18 -> 1.19 --- Log message: Provide hook for alloca on VCPP. Patch by Scott Graham --- Diffs of the changes: (+18 -4) DynamicLibrary.inc | 22 ++++++++++++++++++---- 1 files changed, 18 insertions(+), 4 deletions(-) Index: llvm/lib/System/Win32/DynamicLibrary.inc diff -u llvm/lib/System/Win32/DynamicLibrary.inc:1.18 llvm/lib/System/Win32/DynamicLibrary.inc:1.19 --- llvm/lib/System/Win32/DynamicLibrary.inc:1.18 Tue Dec 19 09:24:18 2006 +++ llvm/lib/System/Win32/DynamicLibrary.inc Mon Jun 25 02:12:14 2007 @@ -88,15 +88,21 @@ } } -#ifdef __MINGW32__ +// Stack probing routines are in the support library (e.g. libgcc), but we don't +// have dynamic linking on windows. Provide a hook. +#if defined(__MINGW32__) || defined (_MSC_VER) #define EXPLICIT_SYMBOL(SYM) \ if (!strcmp(symbolName, #SYM)) return (void*)&SYM #define EXPLICIT_SYMBOL2(SYMFROM, SYMTO) \ if (!strcmp(symbolName, #SYMFROM)) return (void*)&SYMTO #define EXPLICIT_SYMBOL_DEF(SYM) \ extern "C" { extern void *SYM; } - - EXPLICIT_SYMBOL_DEF(_alloca); + + #if defined(__MINGW32__) + EXPLICIT_SYMBOL_DEF(_alloca); + #elif defined(_MSC_VER) + EXPLICIT_SYMBOL_DEF(_alloca_probe); + #endif #endif bool DynamicLibrary::LoadLibraryPermanently(const char *filename, @@ -133,7 +139,7 @@ return (void *) ptr; } -#ifdef __MINGW32__ +#if defined(__MINGW32__) { EXPLICIT_SYMBOL(_alloca); EXPLICIT_SYMBOL2(alloca, _alloca); @@ -141,6 +147,14 @@ #undef EXPLICIT_SYMBOL2 #undef EXPLICIT_SYMBOL_DEF } +#elif defined(_MSC_VER) + { + EXPLICIT_SYMBOL2(alloca, _alloca_probe); + EXPLICIT_SYMBOL2(_alloca, _alloca_probe); +#undef EXPLICIT_SYMBOL +#undef EXPLICIT_SYMBOL2 +#undef EXPLICIT_SYMBOL_DEF + } #endif return 0; From djg at cray.com Mon Jun 25 10:11:48 2007 From: djg at cray.com (Dan Gohman) Date: Mon, 25 Jun 2007 10:11:48 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp X86ATTAsmPrinter.h Message-ID: <200706251511.l5PFBmVO030400@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ATTAsmPrinter.cpp updated: 1.107 -> 1.108 X86ATTAsmPrinter.h updated: 1.18 -> 1.19 --- Log message: Say AT&T instead of Intel in the comments for AT&T support. --- Diffs of the changes: (+3 -3) X86ATTAsmPrinter.cpp | 4 ++-- X86ATTAsmPrinter.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp diff -u llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.107 llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.108 --- llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.107 Thu Jun 14 10:00:27 2007 +++ llvm/lib/Target/X86/X86ATTAsmPrinter.cpp Mon Jun 25 10:11:25 2007 @@ -1,4 +1,4 @@ -//===-- X86ATTAsmPrinter.cpp - Convert X86 LLVM code to Intel assembly ----===// +//===-- X86ATTAsmPrinter.cpp - Convert X86 LLVM code to AT&T assembly -----===// // // The LLVM Compiler Infrastructure // @@ -562,7 +562,7 @@ } /// printMachineInstruction -- Print out a single X86 LLVM instruction -/// MI in Intel syntax to the current output stream. +/// MI in AT&T syntax to the current output stream. /// void X86ATTAsmPrinter::printMachineInstruction(const MachineInstr *MI) { ++EmittedInsts; Index: llvm/lib/Target/X86/X86ATTAsmPrinter.h diff -u llvm/lib/Target/X86/X86ATTAsmPrinter.h:1.18 llvm/lib/Target/X86/X86ATTAsmPrinter.h:1.19 --- llvm/lib/Target/X86/X86ATTAsmPrinter.h:1.18 Tue Dec 5 13:50:18 2006 +++ llvm/lib/Target/X86/X86ATTAsmPrinter.h Mon Jun 25 10:11:25 2007 @@ -1,4 +1,4 @@ -//===-- X86ATTAsmPrinter.h - Convert X86 LLVM code to Intel assembly ------===// +//===-- X86ATTAsmPrinter.h - Convert X86 LLVM code to AT&T assembly -------===// // // The LLVM Compiler Infrastructure // From djg at cray.com Mon Jun 25 10:19:25 2007 From: djg at cray.com (Dan Gohman) Date: Mon, 25 Jun 2007 10:19:25 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86InstrSSE.td Message-ID: <200706251519.l5PFJPW4030565@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86InstrSSE.td updated: 1.184 -> 1.185 --- Log message: Fix loadv2i32 to be loadv4i32, though it isn't actually used anywhere yet. --- Diffs of the changes: (+1 -1) X86InstrSSE.td | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/X86/X86InstrSSE.td diff -u llvm/lib/Target/X86/X86InstrSSE.td:1.184 llvm/lib/Target/X86/X86InstrSSE.td:1.185 --- llvm/lib/Target/X86/X86InstrSSE.td:1.184 Mon Jun 18 20:48:05 2007 +++ llvm/lib/Target/X86/X86InstrSSE.td Mon Jun 25 10:19:03 2007 @@ -85,7 +85,7 @@ def loadv4f32 : PatFrag<(ops node:$ptr), (v4f32 (load node:$ptr))>; def loadv2f64 : PatFrag<(ops node:$ptr), (v2f64 (load node:$ptr))>; -def loadv2i32 : PatFrag<(ops node:$ptr), (v2i32 (load node:$ptr))>; +def loadv4i32 : PatFrag<(ops node:$ptr), (v4i32 (load node:$ptr))>; def loadv2i64 : PatFrag<(ops node:$ptr), (v2i64 (load node:$ptr))>; def bc_v4f32 : PatFrag<(ops node:$in), (v4f32 (bitconvert node:$in))>; From djg at cray.com Mon Jun 25 10:44:42 2007 From: djg at cray.com (Dan Gohman) Date: Mon, 25 Jun 2007 10:44:42 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86InstrSSE.td Message-ID: <200706251544.l5PFigwl031221@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86InstrSSE.td updated: 1.185 -> 1.186 --- Log message: Make minor adjustments to whitespace and comments to reduce differences between SSE1 instructions and their respective SSE2 analogues. --- Diffs of the changes: (+28 -25) X86InstrSSE.td | 53 ++++++++++++++++++++++++++++------------------------- 1 files changed, 28 insertions(+), 25 deletions(-) Index: llvm/lib/Target/X86/X86InstrSSE.td diff -u llvm/lib/Target/X86/X86InstrSSE.td:1.185 llvm/lib/Target/X86/X86InstrSSE.td:1.186 --- llvm/lib/Target/X86/X86InstrSSE.td:1.185 Mon Jun 25 10:19:03 2007 +++ llvm/lib/Target/X86/X86InstrSSE.td Mon Jun 25 10:44:19 2007 @@ -392,7 +392,6 @@ // Alias bitwise logical operations using SSE logical ops on packed FP values. let isTwoAddress = 1 in { - let isCommutable = 1 in { def FsANDPSrr : PSI<0x54, MRMSrcReg, (ops FR32:$dst, FR32:$src1, FR32:$src2), "andps {$src2, $dst|$dst, $src2}", @@ -418,9 +417,11 @@ [(set FR32:$dst, (X86fxor FR32:$src1, (X86loadpf32 addr:$src2)))]>; -def FsANDNPSrr : PSI<0x55, MRMSrcReg, (ops FR32:$dst, FR32:$src1, FR32:$src2), +def FsANDNPSrr : PSI<0x55, MRMSrcReg, + (ops FR32:$dst, FR32:$src1, FR32:$src2), "andnps {$src2, $dst|$dst, $src2}", []>; -def FsANDNPSrm : PSI<0x55, MRMSrcMem, (ops FR32:$dst, FR32:$src1, f128mem:$src2), +def FsANDNPSrm : PSI<0x55, MRMSrcMem, + (ops FR32:$dst, FR32:$src1, f128mem:$src2), "andnps {$src2, $dst|$dst, $src2}", []>; } @@ -440,8 +441,8 @@ bit Commutable = 0> { // Scalar operation, reg+reg. def SSrr : SSI { + !strconcat(OpcodeStr, "ss {$src2, $dst|$dst, $src2}"), + [(set FR32:$dst, (OpNode FR32:$src1, FR32:$src2))]> { let isCommutable = Commutable; } @@ -498,20 +499,22 @@ [(int_x86_sse_storeu_ps addr:$dst, VR128:$src)]>; let isTwoAddress = 1 in { -let AddedComplexity = 20 in { -def MOVLPSrm : PSI<0x12, MRMSrcMem, (ops VR128:$dst, VR128:$src1, f64mem:$src2), - "movlps {$src2, $dst|$dst, $src2}", - [(set VR128:$dst, - (v4f32 (vector_shuffle VR128:$src1, - (bc_v4f32 (v2f64 (scalar_to_vector (loadf64 addr:$src2)))), - MOVLP_shuffle_mask)))]>; -def MOVHPSrm : PSI<0x16, MRMSrcMem, (ops VR128:$dst, VR128:$src1, f64mem:$src2), - "movhps {$src2, $dst|$dst, $src2}", - [(set VR128:$dst, - (v4f32 (vector_shuffle VR128:$src1, - (bc_v4f32 (v2f64 (scalar_to_vector (loadf64 addr:$src2)))), - MOVHP_shuffle_mask)))]>; -} // AddedComplexity + let AddedComplexity = 20 in { + def MOVLPSrm : PSI<0x12, MRMSrcMem, + (ops VR128:$dst, VR128:$src1, f64mem:$src2), + "movlps {$src2, $dst|$dst, $src2}", + [(set VR128:$dst, + (v4f32 (vector_shuffle VR128:$src1, + (bc_v4f32 (v2f64 (scalar_to_vector (loadf64 addr:$src2)))), + MOVLP_shuffle_mask)))]>; + def MOVHPSrm : PSI<0x16, MRMSrcMem, + (ops VR128:$dst, VR128:$src1, f64mem:$src2), + "movhps {$src2, $dst|$dst, $src2}", + [(set VR128:$dst, + (v4f32 (vector_shuffle VR128:$src1, + (bc_v4f32 (v2f64 (scalar_to_vector (loadf64 addr:$src2)))), + MOVHP_shuffle_mask)))]>; + } // AddedComplexity } // isTwoAddress def MOVLPSmr : PSI<0x13, MRMDestMem, (ops f64mem:$dst, VR128:$src), @@ -955,7 +958,7 @@ "comisd {$src2, $src1|$src1, $src2}", [(X86comi (v2f64 VR128:$src1), (load addr:$src2))]>; -// Aliases of packed instructions for scalar use. These all have names that +// Aliases of packed SSE2 instructions for scalar use. These all have names that // start with 'Fs'. // Alias instructions that map fld0 to pxor for sse. @@ -963,16 +966,16 @@ "pxor $dst, $dst", [(set FR64:$dst, fp64imm0)]>, Requires<[HasSSE2]>, TB, OpSize; -// Alias instructions to do FR64 reg-to-reg copy using movapd. Upper bits are +// Alias instruction to do FR64 reg-to-reg copy using movapd. Upper bits are // disregarded. def FsMOVAPDrr : PDI<0x28, MRMSrcReg, (ops FR64:$dst, FR64:$src), - "movapd {$src, $dst|$dst, $src}", []>; + "movapd {$src, $dst|$dst, $src}", []>; -// Alias instructions to load FR64 from f128mem using movapd. Upper bits are +// Alias instruction to load FR64 from f128mem using movapd. Upper bits are // disregarded. def FsMOVAPDrm : PDI<0x28, MRMSrcMem, (ops FR64:$dst, f128mem:$src), - "movapd {$src, $dst|$dst, $src}", - [(set FR64:$dst, (X86loadpf64 addr:$src))]>; + "movapd {$src, $dst|$dst, $src}", + [(set FR64:$dst, (X86loadpf64 addr:$src))]>; // Alias bitwise logical operations using SSE logical ops on packed FP values. let isTwoAddress = 1 in { From zhousheng00 at gmail.com Mon Jun 25 10:57:50 2007 From: zhousheng00 at gmail.com (Zhou Sheng) Date: Mon, 25 Jun 2007 23:57:50 +0800 Subject: [llvm-commits] [llvm-gcc] llvm-gcc patch for PR1373 (review only) Message-ID: <8abe0dc60706250857r258da393n15c41a7e24889a4a@mail.gmail.com> Hi All, Here is the llvm-gcc patch for PR1373. It makes llvm-gcc to emit noalias parameter attribute as well as noalias intrinsic. Note this patch is just for review. Please give me some suggestion to improve it. Thanks. Sheng. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070625/63c3c5d8/attachment.html -------------- next part -------------- Index: gcc/llvm-convert.cpp =================================================================== --- gcc/llvm-convert.cpp (revision 359) +++ gcc/llvm-convert.cpp (working copy) @@ -1400,6 +1400,20 @@ BranchFixups.push_back(BranchFixup(BI, isExceptionEdge)); } +// Emits noalias intrinsic if the decl has the restrict qualifier. +Value *TreeToLLVM::EmitNoAliasIntrinsic(Value *V) { + Function *noAliasFun = Intrinsic::getDeclaration(TheModule, + Intrinsic::noalias); + PointerType *PT = PointerType::get(IntegerType::Int8Ty); + const Type *VTy = V->getType(); + if (VTy != PT) { + V = Builder.CreateBitCast(V, PT, "tmp.be"); + V = Builder.CreateCall(noAliasFun, V, "tmp.noalias"); + return Builder.CreateBitCast(V, VTy, "tmp.af.noalias"); + } + return Builder.CreateCall(noAliasFun, V, "tmp.noalias"); +} + // Emits annotate intrinsic if the decl has the annotate attribute set. void TreeToLLVM::EmitAnnotateIntrinsic(Value *V, tree decl) { @@ -1561,7 +1575,7 @@ // Handle annotate attributes if (DECL_ATTRIBUTES(decl)) EmitAnnotateIntrinsic(AI, decl); - + if (TheDebugInfo) { if (DECL_NAME(decl)) { TheDebugInfo->EmitDeclare(decl, llvm::dwarf::DW_TAG_auto_variable, @@ -2425,7 +2439,10 @@ // Scalar value: emit a load. Value *Ptr = CastToType(Instruction::BitCast, LV.Ptr, PointerType::get(Ty)); - return Builder.CreateLoad(Ptr, isVolatile, "tmp"); + Value *Tmp = Builder.CreateLoad(Ptr, isVolatile, "tmp"); + if (isa(Tmp->getType()) && TYPE_RESTRICT(TREE_TYPE(exp))) + Tmp = EmitNoAliasIntrinsic(Tmp); + return Tmp; } else { EmitAggregateCopy(DestLoc, LV.Ptr, TREE_TYPE(exp), false, isVolatile); return 0; Index: gcc/llvm-internal.h =================================================================== --- gcc/llvm-internal.h (revision 359) +++ gcc/llvm-internal.h (working copy) @@ -453,6 +453,9 @@ /// EmitAnnotateIntrinsic - Emits call to annotate attr intrinsic void EmitAnnotateIntrinsic(Value *V, tree_node *decl); + + /// EmitNoAliasIntrinsic - Emits call to noalias intrinsic + Value *EmitNoAliasIntrinsic(Value *V); private: /// GatherTypeInfo - Walk through the expression gathering all the Index: gcc/llvm-types.cpp =================================================================== --- gcc/llvm-types.cpp (revision 359) +++ gcc/llvm-types.cpp (working copy) @@ -1006,6 +1006,11 @@ else Attributes |= ParamAttr::SExt; } + + // Compute noalias attributes. + if (TREE_CODE(ArgTy) == POINTER_TYPE) + if (TYPE_RESTRICT(ArgTy)) + Attributes |= ParamAttr::NoAlias; #ifdef LLVM_TARGET_ENABLE_REGPARM // Allow the target to mark this as inreg. From djg at cray.com Mon Jun 25 11:24:02 2007 From: djg at cray.com (Dan Gohman) Date: Mon, 25 Jun 2007 11:24:02 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/TargetLowering.h Message-ID: <200706251624.l5PGO2dK032264@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Target: TargetLowering.h updated: 1.129 -> 1.130 --- Log message: Generalize MVT::ValueType and associated functions to be able to represent extended vector types. Remove the special SDNode opcodes used for pre-legalize vector operations, and the special MVT::Vector type used with them. Adjust lowering and legalize to work with the normal SDNode kinds instead, and to use the normal MVT functions to work with vector types instead of using the two special operands that the pre-legalize nodes held. This allows pre-legalize and post-legalize DAGs, and the code that operates on them, to be more consistent. Pre-legalize vector operators can be handled more consistently with scalar operators. And, -view-dag-combine1-dags and -view-legalize-dags now look prettier for vector code. --- Diffs of the changes: (+40 -14) TargetLowering.h | 54 ++++++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 40 insertions(+), 14 deletions(-) Index: llvm/include/llvm/Target/TargetLowering.h diff -u llvm/include/llvm/Target/TargetLowering.h:1.129 llvm/include/llvm/Target/TargetLowering.h:1.130 --- llvm/include/llvm/Target/TargetLowering.h:1.129 Fri Jun 22 09:59:07 2007 +++ llvm/include/llvm/Target/TargetLowering.h Mon Jun 25 11:23:39 2007 @@ -120,6 +120,7 @@ /// getRegClassFor - Return the register class that should be used for the /// specified value type. This may only be called on legal types. TargetRegisterClass *getRegClassFor(MVT::ValueType VT) const { + assert(!MVT::isExtendedValueType(VT)); TargetRegisterClass *RC = RegClassForVT[VT]; assert(RC && "This value type is not natively supported!"); return RC; @@ -129,7 +130,9 @@ /// specified value type. This means that it has a register that directly /// holds it without promotions or expansions. bool isTypeLegal(MVT::ValueType VT) const { - return RegClassForVT[VT] != 0; + return !MVT::isExtendedValueType(VT) ? + RegClassForVT[VT] != 0 : + false; } class ValueTypeActionImpl { @@ -147,9 +150,12 @@ } LegalizeAction getTypeAction(MVT::ValueType VT) const { - return (LegalizeAction)((ValueTypeActions[VT>>4] >> ((2*VT) & 31)) & 3); + return !MVT::isExtendedValueType(VT) ? + (LegalizeAction)((ValueTypeActions[VT>>4] >> ((2*VT) & 31)) & 3) : + Expand; } void setTypeAction(MVT::ValueType VT, LegalizeAction Action) { + assert(!MVT::isExtendedValueType(VT)); assert(unsigned(VT >> 4) < sizeof(ValueTypeActions)/sizeof(ValueTypeActions[0])); ValueTypeActions[VT>>4] |= Action << ((VT*2) & 31); @@ -175,6 +181,10 @@ /// to get to the smaller register. For illegal floating point types, this /// returns the integer type to transform to. MVT::ValueType getTypeToTransformTo(MVT::ValueType VT) const { + if (MVT::isExtendedValueType(VT)) + return MVT::getVectorType(MVT::getVectorElementType(VT), + MVT::getVectorNumElements(VT) / 2); + return TransformToType[VT]; } @@ -183,12 +193,13 @@ /// that are larger than the largest integer register or illegal floating /// point types), this returns the largest legal type it will be expanded to. MVT::ValueType getTypeToExpandTo(MVT::ValueType VT) const { + assert(!MVT::isExtendedValueType(VT)); while (true) { switch (getTypeAction(VT)) { case Legal: return VT; case Expand: - VT = TransformToType[VT]; + VT = getTypeToTransformTo(VT); break; default: assert(false && "Type is not legal nor is it to be expanded!"); @@ -199,17 +210,17 @@ } /// getVectorTypeBreakdown - Vector types are broken down into some number of - /// legal first class types. For example, <8 x float> maps to 2 MVT::v4f32 + /// legal first class types. For example, MVT::v8f32 maps to 2 MVT::v4f32 /// with Altivec or SSE1, or 8 promoted MVT::f64 values with the X86 FP stack. - /// Similarly, <2 x long> turns into 4 MVT::i32 values with both PPC and X86. + /// Similarly, MVT::v2i64 turns into 4 MVT::i32 values with both PPC and X86. /// /// This method returns the number of registers needed, and the VT for each /// register. It also returns the VT of the VectorType elements before they /// are promoted/expanded. /// - unsigned getVectorTypeBreakdown(const VectorType *PTy, - MVT::ValueType &PTyElementVT, - MVT::ValueType &PTyLegalElementVT) const; + unsigned getVectorTypeBreakdown(MVT::ValueType VT, + MVT::ValueType &ElementVT, + MVT::ValueType &LegalElementVT) const; typedef std::vector::const_iterator legal_fpimm_iterator; legal_fpimm_iterator legal_fpimm_begin() const { @@ -242,7 +253,9 @@ /// expanded to some other code sequence, or the target has a custom expander /// for it. LegalizeAction getOperationAction(unsigned Op, MVT::ValueType VT) const { - return (LegalizeAction)((OpActions[Op] >> (2*VT)) & 3); + return !MVT::isExtendedValueType(VT) ? + (LegalizeAction)((OpActions[Op] >> (2*VT)) & 3) : + Expand; } /// isOperationLegal - Return true if the specified operation is legal on this @@ -257,7 +270,9 @@ /// expanded to some other code sequence, or the target has a custom expander /// for it. LegalizeAction getLoadXAction(unsigned LType, MVT::ValueType VT) const { - return (LegalizeAction)((LoadXActions[LType] >> (2*VT)) & 3); + return !MVT::isExtendedValueType(VT) ? + (LegalizeAction)((LoadXActions[LType] >> (2*VT)) & 3) : + Expand; } /// isLoadXLegal - Return true if the specified load with extension is legal @@ -272,7 +287,9 @@ /// expanded to some other code sequence, or the target has a custom expander /// for it. LegalizeAction getStoreXAction(MVT::ValueType VT) const { - return (LegalizeAction)((StoreXActions >> (2*VT)) & 3); + return !MVT::isExtendedValueType(VT) ? + (LegalizeAction)((StoreXActions >> (2*VT)) & 3) : + Expand; } /// isStoreXLegal - Return true if the specified store with truncation is @@ -287,7 +304,9 @@ /// for it. LegalizeAction getIndexedLoadAction(unsigned IdxMode, MVT::ValueType VT) const { - return (LegalizeAction)((IndexedModeActions[0][IdxMode] >> (2*VT)) & 3); + return !MVT::isExtendedValueType(VT) ? + (LegalizeAction)((IndexedModeActions[0][IdxMode] >> (2*VT)) & 3) : + Expand; } /// isIndexedLoadLegal - Return true if the specified indexed load is legal @@ -303,7 +322,9 @@ /// for it. LegalizeAction getIndexedStoreAction(unsigned IdxMode, MVT::ValueType VT) const { - return (LegalizeAction)((IndexedModeActions[1][IdxMode] >> (2*VT)) & 3); + return !MVT::isExtendedValueType(VT) ? + (LegalizeAction)((IndexedModeActions[1][IdxMode] >> (2*VT)) & 3) : + Expand; } /// isIndexedStoreLegal - Return true if the specified indexed load is legal @@ -352,7 +373,11 @@ /// registers, but may be more than one for types (like i64) that are split /// into pieces. unsigned getNumRegisters(MVT::ValueType VT) const { - return NumRegistersForVT[VT]; + if (!MVT::isExtendedValueType(VT)) + return NumRegistersForVT[VT]; + + MVT::ValueType VT1, VT2; + return getVectorTypeBreakdown(VT, VT1, VT2); } /// hasTargetDAGCombine - If true, the target has custom DAG combine @@ -648,6 +673,7 @@ /// regclass for the specified value type. This indicates the selector can /// handle values of that class natively. void addRegisterClass(MVT::ValueType VT, TargetRegisterClass *RC) { + assert(!MVT::isExtendedValueType(VT)); AvailableRegClasses.push_back(std::make_pair(VT, RC)); RegClassForVT[VT] = RC; } From djg at cray.com Mon Jun 25 11:24:12 2007 From: djg at cray.com (Dan Gohman) Date: Mon, 25 Jun 2007 11:24:12 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp Message-ID: <200706251624.l5PGOCKP032271@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ISelLowering.cpp updated: 1.414 -> 1.415 --- Log message: Generalize MVT::ValueType and associated functions to be able to represent extended vector types. Remove the special SDNode opcodes used for pre-legalize vector operations, and the special MVT::Vector type used with them. Adjust lowering and legalize to work with the normal SDNode kinds instead, and to use the normal MVT functions to work with vector types instead of using the two special operands that the pre-legalize nodes held. This allows pre-legalize and post-legalize DAGs, and the code that operates on them, to be more consistent. Pre-legalize vector operators can be handled more consistently with scalar operators. And, -view-dag-combine1-dags and -view-legalize-dags now look prettier for vector code. --- Diffs of the changes: (+8 -4) X86ISelLowering.cpp | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) Index: llvm/lib/Target/X86/X86ISelLowering.cpp diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.414 llvm/lib/Target/X86/X86ISelLowering.cpp:1.415 --- llvm/lib/Target/X86/X86ISelLowering.cpp:1.414 Fri Jun 22 09:59:07 2007 +++ llvm/lib/Target/X86/X86ISelLowering.cpp Mon Jun 25 11:23:39 2007 @@ -2493,9 +2493,14 @@ } } - if (NumNonZero == 0) - // Must be a mix of zero and undef. Return a zero vector. - return getZeroVector(VT, DAG); + if (NumNonZero == 0) { + if (NumZero == 0) + // All undef vector. Return an UNDEF. + return DAG.getNode(ISD::UNDEF, VT); + else + // A mix of zero and undef. Return a zero vector. + return getZeroVector(VT, DAG); + } // Splat is obviously ok. Let legalizer expand it to a shuffle. if (Values.size() == 1) @@ -4919,7 +4924,6 @@ case MVT::i64: return std::make_pair(0U, X86::FR64RegisterClass); // Vector types. - case MVT::Vector: case MVT::v16i8: case MVT::v8i16: case MVT::v4i32: From djg at cray.com Mon Jun 25 11:24:13 2007 From: djg at cray.com (Dan Gohman) Date: Mon, 25 Jun 2007 11:24:13 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/CallingConvLower.h SelectionDAG.h SelectionDAGNodes.h ValueTypes.h Message-ID: <200706251624.l5PGODi8032282@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: CallingConvLower.h updated: 1.5 -> 1.6 SelectionDAG.h updated: 1.151 -> 1.152 SelectionDAGNodes.h updated: 1.192 -> 1.193 ValueTypes.h updated: 1.35 -> 1.36 --- Log message: Generalize MVT::ValueType and associated functions to be able to represent extended vector types. Remove the special SDNode opcodes used for pre-legalize vector operations, and the special MVT::Vector type used with them. Adjust lowering and legalize to work with the normal SDNode kinds instead, and to use the normal MVT functions to work with vector types instead of using the two special operands that the pre-legalize nodes held. This allows pre-legalize and post-legalize DAGs, and the code that operates on them, to be more consistent. Pre-legalize vector operators can be handled more consistently with scalar operators. And, -view-dag-combine1-dags and -view-legalize-dags now look prettier for vector code. --- Diffs of the changes: (+141 -141) CallingConvLower.h | 4 - SelectionDAG.h | 2 SelectionDAGNodes.h | 89 +++--------------------- ValueTypes.h | 187 ++++++++++++++++++++++++++++++++++------------------ 4 files changed, 141 insertions(+), 141 deletions(-) Index: llvm/include/llvm/CodeGen/CallingConvLower.h diff -u llvm/include/llvm/CodeGen/CallingConvLower.h:1.5 llvm/include/llvm/CodeGen/CallingConvLower.h:1.6 --- llvm/include/llvm/CodeGen/CallingConvLower.h:1.5 Mon Jun 18 19:10:25 2007 +++ llvm/include/llvm/CodeGen/CallingConvLower.h Mon Jun 25 11:23:39 2007 @@ -48,10 +48,10 @@ LocInfo HTP : 7; /// ValVT - The type of the value being assigned. - MVT::ValueType ValVT : 8; + MVT::ValueType ValVT; /// LocVT - The type of the location being assigned to. - MVT::ValueType LocVT : 8; + MVT::ValueType LocVT; public: static CCValAssign getReg(unsigned ValNo, MVT::ValueType ValVT, Index: llvm/include/llvm/CodeGen/SelectionDAG.h diff -u llvm/include/llvm/CodeGen/SelectionDAG.h:1.151 llvm/include/llvm/CodeGen/SelectionDAG.h:1.152 --- llvm/include/llvm/CodeGen/SelectionDAG.h:1.151 Fri Jun 22 09:59:07 2007 +++ llvm/include/llvm/CodeGen/SelectionDAG.h Mon Jun 25 11:23:39 2007 @@ -319,8 +319,6 @@ unsigned Alignment=0); SDOperand getIndexedLoad(SDOperand OrigLoad, SDOperand Base, SDOperand Offset, ISD::MemIndexedMode AM); - SDOperand getVecLoad(unsigned Count, MVT::ValueType VT, SDOperand Chain, - SDOperand Ptr, SDOperand SV); /// getStore - Helper function to build ISD::STORE nodes. /// Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.192 llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.193 --- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.192 Wed Jun 13 10:12:02 2007 +++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h Mon Jun 25 11:23:39 2007 @@ -237,58 +237,30 @@ // FCOPYSIGN(f32, f64) is allowed. FCOPYSIGN, - /// VBUILD_VECTOR(ELT1, ELT2, ELT3, ELT4,..., COUNT,TYPE) - Return a vector - /// with the specified, possibly variable, elements. The number of elements - /// is required to be a power of two. - VBUILD_VECTOR, - /// BUILD_VECTOR(ELT1, ELT2, ELT3, ELT4,...) - Return a vector /// with the specified, possibly variable, elements. The number of elements /// is required to be a power of two. BUILD_VECTOR, - /// VINSERT_VECTOR_ELT(VECTOR, VAL, IDX, COUNT,TYPE) - Given a vector - /// VECTOR, an element ELEMENT, and a (potentially variable) index IDX, - /// return a vector with the specified element of VECTOR replaced with VAL. - /// COUNT and TYPE specify the type of vector, as is standard for V* nodes. - VINSERT_VECTOR_ELT, - - /// INSERT_VECTOR_ELT(VECTOR, VAL, IDX) - Returns VECTOR (a legal packed - /// type) with the element at IDX replaced with VAL. + /// INSERT_VECTOR_ELT(VECTOR, VAL, IDX) - Returns VECTOR with the element + /// at IDX replaced with VAL. INSERT_VECTOR_ELT, - /// VEXTRACT_VECTOR_ELT(VECTOR, IDX) - Returns a single element from VECTOR - /// (an MVT::Vector value) identified by the (potentially variable) element - /// number IDX. - VEXTRACT_VECTOR_ELT, - /// EXTRACT_VECTOR_ELT(VECTOR, IDX) - Returns a single element from VECTOR - /// (a legal vector type vector) identified by the (potentially variable) - /// element number IDX. + /// identified by the (potentially variable) element number IDX. EXTRACT_VECTOR_ELT, - /// VCONCAT_VECTORS(VECTOR0, VECTOR1, ..., COUNT,TYPE) - Given a number of - /// values of MVT::Vector type with the same length and element type, this - /// produces a concatenated MVT::Vector result value, with length equal to - /// the sum of the input vectors. This can only be used before - /// legalization. - VCONCAT_VECTORS, - - /// VEXTRACT_SUBVECTOR(VECTOR, IDX) - Returns a subvector from VECTOR (an - /// MVT::Vector value) starting with the (potentially variable) - /// element number IDX, which must be a multiple of the result vector - /// length. This can only be used before legalization. - VEXTRACT_SUBVECTOR, - - /// VVECTOR_SHUFFLE(VEC1, VEC2, SHUFFLEVEC, COUNT,TYPE) - Returns a vector, - /// of the same type as VEC1/VEC2. SHUFFLEVEC is a VBUILD_VECTOR of - /// constant int values that indicate which value each result element will - /// get. The elements of VEC1/VEC2 are enumerated in order. This is quite - /// similar to the Altivec 'vperm' instruction, except that the indices must - /// be constants and are in terms of the element size of VEC1/VEC2, not in - /// terms of bytes. - VVECTOR_SHUFFLE, - + /// CONCAT_VECTORS(VECTOR0, VECTOR1, ...) - Given a number of values of + /// vector type with the same length and element type, this produces a + /// concatenated vector result value, with length equal to the sum of the + /// input vectors. + CONCAT_VECTORS, + + /// EXTRACT_SUBVECTOR(VECTOR, IDX) - Returns a subvector from VECTOR (an + /// vector value) starting with the (potentially variable) element number + /// IDX, which must be a multiple of the result vector length. + EXTRACT_SUBVECTOR, + /// VECTOR_SHUFFLE(VEC1, VEC2, SHUFFLEVEC) - Returns a vector, of the same /// type as VEC1/VEC2. SHUFFLEVEC is a BUILD_VECTOR of constant int values /// (regardless of whether its datatype is legal or not) that indicate @@ -298,34 +270,6 @@ /// of the element size of VEC1/VEC2, not in terms of bytes. VECTOR_SHUFFLE, - /// X = VBIT_CONVERT(Y) and X = VBIT_CONVERT(Y, COUNT,TYPE) - This node - /// represents a conversion from or to an ISD::Vector type. - /// - /// This is lowered to a BIT_CONVERT of the appropriate input/output types. - /// The input and output are required to have the same size and at least one - /// is required to be a vector (if neither is a vector, just use - /// BIT_CONVERT). - /// - /// If the result is a vector, this takes three operands (like any other - /// vector producer) which indicate the size and type of the vector result. - /// Otherwise it takes one input. - VBIT_CONVERT, - - /// BINOP(LHS, RHS, COUNT,TYPE) - /// Simple abstract vector operators. Unlike the integer and floating point - /// binary operators, these nodes also take two additional operands: - /// a constant element count, and a value type node indicating the type of - /// the elements. The order is op0, op1, count, type. All vector opcodes, - /// including VLOAD and VConstant must currently have count and type as - /// their last two operands. - VADD, VSUB, VMUL, VSDIV, VUDIV, - VAND, VOR, VXOR, - - /// VSELECT(COND,LHS,RHS, COUNT,TYPE) - Select for MVT::Vector values. - /// COND is a boolean value. This node return LHS if COND is true, RHS if - /// COND is false. - VSELECT, - /// SCALAR_TO_VECTOR(VAL) - This represents the operation of loading a /// scalar value into the low element of the resultant vector type. The top /// elements of the vector are undefined. @@ -432,11 +376,6 @@ // indexed memory ops). LOAD, STORE, - // Abstract vector version of LOAD. VLOAD has a constant element count as - // the first operand, followed by a value type node indicating the type of - // the elements, a token chain, a pointer operand, and a SRCVALUE node. - VLOAD, - // TRUNCSTORE - This operators truncates (for integer) or rounds (for FP) a // value and stores it to memory in one operation. This can be used for // either integer or floating point operands. The first four operands of Index: llvm/include/llvm/CodeGen/ValueTypes.h diff -u llvm/include/llvm/CodeGen/ValueTypes.h:1.35 llvm/include/llvm/CodeGen/ValueTypes.h:1.36 --- llvm/include/llvm/CodeGen/ValueTypes.h:1.35 Thu Jun 14 17:58:02 2007 +++ llvm/include/llvm/CodeGen/ValueTypes.h Mon Jun 25 11:23:39 2007 @@ -17,16 +17,17 @@ #define LLVM_CODEGEN_VALUETYPES_H #include +#include #include "llvm/Support/DataTypes.h" namespace llvm { class Type; -/// MVT namespace - This namespace defines the ValueType enum, which contains -/// the various low-level value types. +/// MVT namespace - This namespace defines the SimpleValueType enum, which +/// contains the various low-level value types, and the ValueType typedef. /// namespace MVT { // MVT = Machine Value Types - enum ValueType { + enum SimpleValueType { // If you change this numbering, you must change the values in ValueTypes.td // well! Other = 0, // This is a non-standard value @@ -45,10 +46,6 @@ isVoid = 12, // This has no value - Vector = 13, // This is an abstract vector type, which will - // be expanded into a target vector type, or scalars - // if no matching vector type is available. - v8i8 = 14, // 8 x i8 v4i16 = 15, // 4 x i16 v2i32 = 16, // 2 x i32 @@ -76,64 +73,55 @@ iPTR = 255 }; - /// MVT::isInteger - Return true if this is a simple integer, or a packed - /// vector integer type. - static inline bool isInteger(ValueType VT) { - return (VT >= i1 && VT <= i128) || (VT >= v8i8 && VT <= v2i64); + /// MVT::ValueType - This type holds low-level value types. Valid values + /// include any of the values in the SimpleValueType enum, or any value + /// returned from a function in the MVT namespace that has a ValueType + /// return type. Any value type equal to one of the SimpleValueType enum + /// values is a "simple" value type. All other value types are "extended". + /// + /// Note that simple doesn't necessary mean legal for the target machine. + /// All legal value types must be simple, but often there are some simple + /// value types that are not legal. + typedef uint32_t ValueType; + + static const int SimpleTypeBits = 8; + + static const uint32_t SimpleTypeMask = + (~uint32_t(0) << (32 - SimpleTypeBits)) >> (32 - SimpleTypeBits); + + /// MVT::isExtendedValueType - Test if the given ValueType is extended + /// (as opposed to being simple). + static inline bool isExtendedValueType(ValueType VT) { + return VT & ~SimpleTypeMask; } - /// MVT::isFloatingPoint - Return true if this is a simple FP, or a packed - /// vector FP type. - static inline bool isFloatingPoint(ValueType VT) { - return (VT >= f32 && VT <= f128) || (VT >= v2f32 && VT <= v2f64); + /// MVT::isInteger - Return true if this is an integer, or a vector integer + /// type. + static inline bool isInteger(ValueType VT) { + ValueType SVT = VT & SimpleTypeMask; + return (SVT >= i1 && SVT <= i128) || (SVT >= v8i8 && SVT <= v2i64); } - /// MVT::isVector - Return true if this is a packed vector type (i.e. not - /// MVT::Vector). - static inline bool isVector(ValueType VT) { - return VT >= FIRST_VECTOR_VALUETYPE && VT <= LAST_VECTOR_VALUETYPE; + /// MVT::isFloatingPoint - Return true if this is an FP, or a vector FP type. + static inline bool isFloatingPoint(ValueType VT) { + ValueType SVT = VT & SimpleTypeMask; + return (SVT >= f32 && SVT <= f128) || (SVT >= v2f32 && SVT <= v2f64); } - /// MVT::getSizeInBits - Return the size of the specified value type in bits. - /// - static inline unsigned getSizeInBits(ValueType VT) { - switch (VT) { - default: assert(0 && "ValueType has no known size!"); - case MVT::i1 : return 1; - case MVT::i8 : return 8; - case MVT::i16 : return 16; - case MVT::f32 : - case MVT::i32 : return 32; - case MVT::f64 : - case MVT::i64 : - case MVT::v8i8: - case MVT::v4i16: - case MVT::v2i32: - case MVT::v1i64: - case MVT::v2f32: return 64; - case MVT::f80 : return 80; - case MVT::f128: - case MVT::i128: - case MVT::v16i8: - case MVT::v8i16: - case MVT::v4i32: - case MVT::v2i64: - case MVT::v4f32: - case MVT::v2f64: return 128; - } + /// MVT::isVector - Return true if this is a vector value type. + static inline bool isVector(ValueType VT) { + return (VT >= FIRST_VECTOR_VALUETYPE && VT <= LAST_VECTOR_VALUETYPE) || + isExtendedValueType(VT); } - /// MVT::getVectorType - Returns the ValueType that represents a vector - /// NumElements in length, where each element is of type VT. If there is no - /// ValueType that represents this vector, a ValueType of Other is returned. - /// - ValueType getVectorType(ValueType VT, unsigned NumElements); - - /// MVT::getVectorElementType - Given a packed vector type, return the type of + /// MVT::getVectorElementType - Given a vector type, return the type of /// each element. static inline ValueType getVectorElementType(ValueType VT) { switch (VT) { - default: assert(0 && "Invalid vector type!"); + default: + if (isExtendedValueType(VT)) + return VT & SimpleTypeMask; + assert(0 && "Invalid vector type!"); case v8i8 : case v16i8: return i8; case v4i16: @@ -148,11 +136,14 @@ } } - /// MVT::getVectorNumElements - Given a packed vector type, return the number - /// of elements it contains. + /// MVT::getVectorNumElements - Given a vector type, return the + /// number of elements it contains. static inline unsigned getVectorNumElements(ValueType VT) { switch (VT) { - default: assert(0 && "Invalid vector type!"); + default: + if (isExtendedValueType(VT)) + return ((VT & ~SimpleTypeMask) >> SimpleTypeBits) - 1; + assert(0 && "Invalid vector type!"); case v16i8: return 16; case v8i8 : case v8i16: return 8; @@ -167,11 +158,84 @@ } } + /// MVT::getSizeInBits - Return the size of the specified value type + /// in bits. + /// + static inline unsigned getSizeInBits(ValueType VT) { + switch (VT) { + default: + if (isExtendedValueType(VT)) + return getSizeInBits(getVectorElementType(VT)) * + getVectorNumElements(VT); + assert(0 && "ValueType has no known size!"); + case MVT::i1 : return 1; + case MVT::i8 : return 8; + case MVT::i16 : return 16; + case MVT::f32 : + case MVT::i32 : return 32; + case MVT::f64 : + case MVT::i64 : + case MVT::v8i8: + case MVT::v4i16: + case MVT::v2i32: + case MVT::v1i64: + case MVT::v2f32: return 64; + case MVT::f80 : return 80; + case MVT::f128: + case MVT::i128: + case MVT::v16i8: + case MVT::v8i16: + case MVT::v4i32: + case MVT::v2i64: + case MVT::v4f32: + case MVT::v2f64: return 128; + } + } + + /// MVT::getVectorType - Returns the ValueType that represents a vector + /// NumElements in length, where each element is of type VT. + /// + static inline ValueType getVectorType(ValueType VT, unsigned NumElements) { + switch (VT) { + default: + break; + case MVT::i8: + if (NumElements == 8) return MVT::v8i8; + if (NumElements == 16) return MVT::v16i8; + break; + case MVT::i16: + if (NumElements == 4) return MVT::v4i16; + if (NumElements == 8) return MVT::v8i16; + break; + case MVT::i32: + if (NumElements == 2) return MVT::v2i32; + if (NumElements == 4) return MVT::v4i32; + break; + case MVT::i64: + if (NumElements == 1) return MVT::v1i64; + if (NumElements == 2) return MVT::v2i64; + break; + case MVT::f32: + if (NumElements == 2) return MVT::v2f32; + if (NumElements == 4) return MVT::v4f32; + break; + case MVT::f64: + if (NumElements == 2) return MVT::v2f64; + break; + } + ValueType Result = VT | ((NumElements + 1) << SimpleTypeBits); + assert(getVectorElementType(Result) == VT && + "Bad vector element type!"); + assert(getVectorNumElements(Result) == NumElements && + "Bad vector length!"); + return Result; + } + /// MVT::getIntVectorWithNumElements - Return any integer vector type that has /// the specified number of elements. static inline ValueType getIntVectorWithNumElements(unsigned NumElts) { switch (NumElts) { - default: assert(0 && "Invalid vector type!"); + default: return getVectorType(i8, NumElts); case 1: return v1i64; case 2: return v2i32; case 4: return v4i16; @@ -196,7 +260,7 @@ /// MVT::getValueTypeString - This function returns value type as a string, /// e.g. "i32". - const char *getValueTypeString(ValueType VT); + std::string getValueTypeString(ValueType VT); /// MVT::getTypeForValueType - This method returns an LLVM type corresponding /// to the specified ValueType. For integer types, this returns an unsigned @@ -204,9 +268,8 @@ const Type *getTypeForValueType(ValueType VT); /// MVT::getValueType - Return the value type corresponding to the specified - /// type. This returns all vectors as MVT::Vector and all pointers as - /// MVT::iPTR. If HandleUnknown is true, unknown types are returned as Other, - /// otherwise they are invalid. + /// type. This returns all pointers as MVT::iPTR. If HandleUnknown is true, + /// unknown types are returned as Other, otherwise they are invalid. ValueType getValueType(const Type *Ty, bool HandleUnknown = false); } From djg at cray.com Mon Jun 25 11:24:13 2007 From: djg at cray.com (Dan Gohman) Date: Mon, 25 Jun 2007 11:24:13 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/ValueTypes.cpp Message-ID: <200706251624.l5PGOD8J032287@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: ValueTypes.cpp updated: 1.18 -> 1.19 --- Log message: Generalize MVT::ValueType and associated functions to be able to represent extended vector types. Remove the special SDNode opcodes used for pre-legalize vector operations, and the special MVT::Vector type used with them. Adjust lowering and legalize to work with the normal SDNode kinds instead, and to use the normal MVT functions to work with vector types instead of using the two special operands that the pre-legalize nodes held. This allows pre-legalize and post-legalize DAGs, and the code that operates on them, to be more consistent. Pre-legalize vector operators can be handled more consistently with scalar operators. And, -view-dag-combine1-dags and -view-legalize-dags now look prettier for vector code. --- Diffs of the changes: (+22 -43) ValueTypes.cpp | 65 +++++++++++++++++++-------------------------------------- 1 files changed, 22 insertions(+), 43 deletions(-) Index: llvm/lib/VMCore/ValueTypes.cpp diff -u llvm/lib/VMCore/ValueTypes.cpp:1.18 llvm/lib/VMCore/ValueTypes.cpp:1.19 --- llvm/lib/VMCore/ValueTypes.cpp:1.18 Thu May 24 09:29:12 2007 +++ llvm/lib/VMCore/ValueTypes.cpp Mon Jun 25 11:23:39 2007 @@ -14,13 +14,21 @@ #include "llvm/CodeGen/ValueTypes.h" #include "llvm/Type.h" #include "llvm/DerivedTypes.h" +#include using namespace llvm; /// MVT::getValueTypeString - This function returns value type as a string, /// e.g. "i32". -const char *MVT::getValueTypeString(MVT::ValueType VT) { +std::string MVT::getValueTypeString(MVT::ValueType VT) { switch (VT) { - default: assert(0 && "Invalid ValueType!"); + default: + if (isExtendedValueType(VT)) { + std::ostringstream OS; + OS << "v" << getVectorNumElements(VT) + << getValueTypeString(getVectorElementType(VT)); + return OS.str(); + } + assert(0 && "Invalid ValueType!"); case MVT::i1: return "i1"; case MVT::i8: return "i8"; case MVT::i16: return "i16"; @@ -34,7 +42,6 @@ case MVT::isVoid:return "isVoid"; case MVT::Other: return "ch"; case MVT::Flag: return "flag"; - case MVT::Vector:return "vec"; case MVT::v8i8: return "v8i8"; case MVT::v4i16: return "v4i16"; case MVT::v2i32: return "v2i32"; @@ -49,47 +56,16 @@ } } -/// MVT::getVectorType - Returns the ValueType that represents a vector -/// NumElements in length, where each element is of type VT. If there is no -/// ValueType that represents this vector, a ValueType of Other is returned. -/// -MVT::ValueType MVT::getVectorType(ValueType VT, unsigned NumElements) { - switch (VT) { - default: - break; - case MVT::i8: - if (NumElements == 8) return MVT::v8i8; - if (NumElements == 16) return MVT::v16i8; - break; - case MVT::i16: - if (NumElements == 4) return MVT::v4i16; - if (NumElements == 8) return MVT::v8i16; - break; - case MVT::i32: - if (NumElements == 2) return MVT::v2i32; - if (NumElements == 4) return MVT::v4i32; - break; - case MVT::i64: - if (NumElements == 1) return MVT::v1i64; - if (NumElements == 2) return MVT::v2i64; - break; - case MVT::f32: - if (NumElements == 2) return MVT::v2f32; - if (NumElements == 4) return MVT::v4f32; - break; - case MVT::f64: - if (NumElements == 2) return MVT::v2f64; - break; - } - return MVT::Other; -} - /// MVT::getTypeForValueType - This method returns an LLVM type corresponding /// to the specified ValueType. Note that this will abort for types that cannot /// be represented. const Type *MVT::getTypeForValueType(MVT::ValueType VT) { switch (VT) { - default: assert(0 && "ValueType does not correspond to LLVM type!"); + default: + if (isExtendedValueType(VT)) + return VectorType::get(getTypeForValueType(getVectorElementType(VT)), + getVectorNumElements(VT)); + assert(0 && "ValueType does not correspond to LLVM type!"); case MVT::isVoid:return Type::VoidTy; case MVT::i1: return Type::Int1Ty; case MVT::i8: return Type::Int8Ty; @@ -114,9 +90,8 @@ } /// MVT::getValueType - Return the value type corresponding to the specified -/// type. This returns all vectors as MVT::Vector and all pointers as -/// MVT::iPTR. If HandleUnknown is true, unknown types are returned as Other, -/// otherwise they are invalid. +/// type. This returns all pointers as MVT::iPTR. If HandleUnknown is true, +/// unknown types are returned as Other, otherwise they are invalid. MVT::ValueType MVT::getValueType(const Type *Ty, bool HandleUnknown) { switch (Ty->getTypeID()) { default: @@ -141,6 +116,10 @@ case Type::FloatTyID: return MVT::f32; case Type::DoubleTyID: return MVT::f64; case Type::PointerTyID: return MVT::iPTR; - case Type::VectorTyID: return MVT::Vector; + case Type::VectorTyID: { + const VectorType *VTy = cast(Ty); + return getVectorType(getValueType(VTy->getElementType(), false), + VTy->getNumElements()); + } } } From djg at cray.com Mon Jun 25 11:24:14 2007 From: djg at cray.com (Dan Gohman) Date: Mon, 25 Jun 2007 11:24:14 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp LegalizeDAG.cpp SelectionDAG.cpp SelectionDAGISel.cpp TargetLowering.cpp Message-ID: <200706251624.l5PGOE6v032300@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: DAGCombiner.cpp updated: 1.315 -> 1.316 LegalizeDAG.cpp updated: 1.500 -> 1.501 SelectionDAG.cpp updated: 1.409 -> 1.410 SelectionDAGISel.cpp updated: 1.468 -> 1.469 TargetLowering.cpp updated: 1.122 -> 1.123 --- Log message: Generalize MVT::ValueType and associated functions to be able to represent extended vector types. Remove the special SDNode opcodes used for pre-legalize vector operations, and the special MVT::Vector type used with them. Adjust lowering and legalize to work with the normal SDNode kinds instead, and to use the normal MVT functions to work with vector types instead of using the two special operands that the pre-legalize nodes held. This allows pre-legalize and post-legalize DAGs, and the code that operates on them, to be more consistent. Pre-legalize vector operators can be handled more consistently with scalar operators. And, -view-dag-combine1-dags and -view-legalize-dags now look prettier for vector code. --- Diffs of the changes: (+745 -966) DAGCombiner.cpp | 532 ++++++++++++++++++---------------------- LegalizeDAG.cpp | 675 +++++++++++++++++++++------------------------------ SelectionDAG.cpp | 95 +++---- SelectionDAGISel.cpp | 357 ++++++++++---------------- TargetLowering.cpp | 52 ++- 5 files changed, 745 insertions(+), 966 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.315 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.316 --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.315 Fri Jun 22 09:59:07 2007 +++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Mon Jun 25 11:23:39 2007 @@ -227,7 +227,7 @@ SDOperand visitAND(SDNode *N); SDOperand visitOR(SDNode *N); SDOperand visitXOR(SDNode *N); - SDOperand visitVBinOp(SDNode *N, ISD::NodeType IntOp, ISD::NodeType FPOp); + SDOperand SimplifyVBinOp(SDNode *N); SDOperand visitSHL(SDNode *N); SDOperand visitSRA(SDNode *N); SDOperand visitSRL(SDNode *N); @@ -243,7 +243,6 @@ SDOperand visitSIGN_EXTEND_INREG(SDNode *N); SDOperand visitTRUNCATE(SDNode *N); SDOperand visitBIT_CONVERT(SDNode *N); - SDOperand visitVBIT_CONVERT(SDNode *N); SDOperand visitFADD(SDNode *N); SDOperand visitFSUB(SDNode *N); SDOperand visitFMUL(SDNode *N); @@ -264,10 +263,9 @@ SDOperand visitLOAD(SDNode *N); SDOperand visitSTORE(SDNode *N); SDOperand visitINSERT_VECTOR_ELT(SDNode *N); - SDOperand visitVINSERT_VECTOR_ELT(SDNode *N); - SDOperand visitVBUILD_VECTOR(SDNode *N); + SDOperand visitBUILD_VECTOR(SDNode *N); + SDOperand visitCONCAT_VECTORS(SDNode *N); SDOperand visitVECTOR_SHUFFLE(SDNode *N); - SDOperand visitVVECTOR_SHUFFLE(SDNode *N); SDOperand XformToShuffleWithZero(SDNode *N); SDOperand ReassociateOps(unsigned Opc, SDOperand LHS, SDOperand RHS); @@ -280,7 +278,7 @@ bool NotExtCompare = false); SDOperand SimplifySetCC(MVT::ValueType VT, SDOperand N0, SDOperand N1, ISD::CondCode Cond, bool foldBooleans = true); - SDOperand ConstantFoldVBIT_CONVERTofVBUILD_VECTOR(SDNode *, MVT::ValueType); + SDOperand ConstantFoldBIT_CONVERTofBUILD_VECTOR(SDNode *, MVT::ValueType); SDOperand BuildSDIV(SDNode *N); SDOperand BuildUDIV(SDNode *N); SDNode *MatchRotate(SDOperand LHS, SDOperand RHS); @@ -657,7 +655,6 @@ case ISD::SIGN_EXTEND_INREG: return visitSIGN_EXTEND_INREG(N); case ISD::TRUNCATE: return visitTRUNCATE(N); case ISD::BIT_CONVERT: return visitBIT_CONVERT(N); - case ISD::VBIT_CONVERT: return visitVBIT_CONVERT(N); case ISD::FADD: return visitFADD(N); case ISD::FSUB: return visitFSUB(N); case ISD::FMUL: return visitFMUL(N); @@ -678,18 +675,9 @@ case ISD::LOAD: return visitLOAD(N); case ISD::STORE: return visitSTORE(N); case ISD::INSERT_VECTOR_ELT: return visitINSERT_VECTOR_ELT(N); - case ISD::VINSERT_VECTOR_ELT: return visitVINSERT_VECTOR_ELT(N); - case ISD::VBUILD_VECTOR: return visitVBUILD_VECTOR(N); + case ISD::BUILD_VECTOR: return visitBUILD_VECTOR(N); + case ISD::CONCAT_VECTORS: return visitCONCAT_VECTORS(N); case ISD::VECTOR_SHUFFLE: return visitVECTOR_SHUFFLE(N); - case ISD::VVECTOR_SHUFFLE: return visitVVECTOR_SHUFFLE(N); - case ISD::VADD: return visitVBinOp(N, ISD::ADD , ISD::FADD); - case ISD::VSUB: return visitVBinOp(N, ISD::SUB , ISD::FSUB); - case ISD::VMUL: return visitVBinOp(N, ISD::MUL , ISD::FMUL); - case ISD::VSDIV: return visitVBinOp(N, ISD::SDIV, ISD::FDIV); - case ISD::VUDIV: return visitVBinOp(N, ISD::UDIV, ISD::UDIV); - case ISD::VAND: return visitVBinOp(N, ISD::AND , ISD::AND); - case ISD::VOR: return visitVBinOp(N, ISD::OR , ISD::OR); - case ISD::VXOR: return visitVBinOp(N, ISD::XOR , ISD::XOR); } return SDOperand(); } @@ -856,6 +844,10 @@ ConstantSDNode *N0C = dyn_cast(N0); ConstantSDNode *N1C = dyn_cast(N1); MVT::ValueType VT = N0.getValueType(); + + // fold vector ops + SDOperand FoldedVOp = SimplifyVBinOp(N); + if (FoldedVOp.Val) return FoldedVOp; // fold (add c1, c2) -> c1+c2 if (N0C && N1C) @@ -928,6 +920,10 @@ if (Result.Val) return Result; } + // If either operand is undef, the result is undef + if (N0.getOpcode() == ISD::UNDEF || N1.getOpcode() == ISD::UNDEF) + return DAG.getNode(ISD::UNDEF, VT); + return SDOperand(); } @@ -1004,6 +1000,10 @@ ConstantSDNode *N1C = dyn_cast(N1.Val); MVT::ValueType VT = N0.getValueType(); + // fold vector ops + SDOperand FoldedVOp = SimplifyVBinOp(N); + if (FoldedVOp.Val) return FoldedVOp; + // fold (sub x, x) -> 0 if (N0 == N1) return DAG.getConstant(0, N->getValueType(0)); @@ -1024,6 +1024,10 @@ SDOperand Result = combineSelectAndUse(N, N1, N0, DAG); if (Result.Val) return Result; } + // If either operand is undef, the result is undef + if (N0.getOpcode() == ISD::UNDEF || N1.getOpcode() == ISD::UNDEF) + return DAG.getNode(ISD::UNDEF, VT); + return SDOperand(); } @@ -1034,6 +1038,10 @@ ConstantSDNode *N1C = dyn_cast(N1); MVT::ValueType VT = N0.getValueType(); + // fold vector ops + SDOperand FoldedVOp = SimplifyVBinOp(N); + if (FoldedVOp.Val) return FoldedVOp; + // fold (mul c1, c2) -> c1*c2 if (N0C && N1C) return DAG.getNode(ISD::MUL, VT, N0, N1); @@ -1098,6 +1106,11 @@ SDOperand RMUL = ReassociateOps(ISD::MUL, N0, N1); if (RMUL.Val != 0) return RMUL; + + // If either operand is undef, the result is undef + if (N0.getOpcode() == ISD::UNDEF || N1.getOpcode() == ISD::UNDEF) + return DAG.getNode(ISD::UNDEF, VT); + return SDOperand(); } @@ -1108,6 +1121,10 @@ ConstantSDNode *N1C = dyn_cast(N1.Val); MVT::ValueType VT = N->getValueType(0); + // fold vector ops + SDOperand FoldedVOp = SimplifyVBinOp(N); + if (FoldedVOp.Val) return FoldedVOp; + // fold (sdiv c1, c2) -> c1/c2 if (N0C && N1C && !N1C->isNullValue()) return DAG.getNode(ISD::SDIV, VT, N0, N1); @@ -1162,6 +1179,11 @@ SDOperand Op = BuildSDIV(N); if (Op.Val) return Op; } + + // If either operand is undef, the result is undef + if (N0.getOpcode() == ISD::UNDEF || N1.getOpcode() == ISD::UNDEF) + return DAG.getNode(ISD::UNDEF, VT); + return SDOperand(); } @@ -1172,6 +1194,10 @@ ConstantSDNode *N1C = dyn_cast(N1.Val); MVT::ValueType VT = N->getValueType(0); + // fold vector ops + SDOperand FoldedVOp = SimplifyVBinOp(N); + if (FoldedVOp.Val) return FoldedVOp; + // fold (udiv c1, c2) -> c1/c2 if (N0C && N1C && !N1C->isNullValue()) return DAG.getNode(ISD::UDIV, VT, N0, N1); @@ -1198,6 +1224,11 @@ SDOperand Op = BuildUDIV(N); if (Op.Val) return Op; } + + // If either operand is undef, the result is undef + if (N0.getOpcode() == ISD::UNDEF || N1.getOpcode() == ISD::UNDEF) + return DAG.getNode(ISD::UNDEF, VT); + return SDOperand(); } @@ -1229,6 +1260,10 @@ return Sub; } + // If either operand is undef, the result is undef + if (N0.getOpcode() == ISD::UNDEF || N1.getOpcode() == ISD::UNDEF) + return DAG.getNode(ISD::UNDEF, VT); + return SDOperand(); } @@ -1267,6 +1302,10 @@ return Sub; } + // If either operand is undef, the result is undef + if (N0.getOpcode() == ISD::UNDEF || N1.getOpcode() == ISD::UNDEF) + return DAG.getNode(ISD::UNDEF, VT); + return SDOperand(); } @@ -1274,6 +1313,7 @@ SDOperand N0 = N->getOperand(0); SDOperand N1 = N->getOperand(1); ConstantSDNode *N1C = dyn_cast(N1); + MVT::ValueType VT = N->getValueType(0); // fold (mulhs x, 0) -> 0 if (N1C && N1C->isNullValue()) @@ -1283,6 +1323,10 @@ return DAG.getNode(ISD::SRA, N0.getValueType(), N0, DAG.getConstant(MVT::getSizeInBits(N0.getValueType())-1, TLI.getShiftAmountTy())); + // If either operand is undef, the result is undef + if (N0.getOpcode() == ISD::UNDEF || N1.getOpcode() == ISD::UNDEF) + return DAG.getNode(ISD::UNDEF, VT); + return SDOperand(); } @@ -1290,6 +1334,7 @@ SDOperand N0 = N->getOperand(0); SDOperand N1 = N->getOperand(1); ConstantSDNode *N1C = dyn_cast(N1); + MVT::ValueType VT = N->getValueType(0); // fold (mulhu x, 0) -> 0 if (N1C && N1C->isNullValue()) @@ -1297,6 +1342,10 @@ // fold (mulhu x, 1) -> 0 if (N1C && N1C->getValue() == 1) return DAG.getConstant(0, N0.getValueType()); + // If either operand is undef, the result is undef + if (N0.getOpcode() == ISD::UNDEF || N1.getOpcode() == ISD::UNDEF) + return DAG.getNode(ISD::UNDEF, VT); + return SDOperand(); } @@ -1336,6 +1385,10 @@ return DAG.getNode(N0.getOpcode(), VT, ORNode, N0.getOperand(1)); } + // If either operand is undef, the result is undef + if (N0.getOpcode() == ISD::UNDEF || N1.getOpcode() == ISD::UNDEF) + return DAG.getNode(ISD::UNDEF, VT); + return SDOperand(); } @@ -1347,6 +1400,10 @@ ConstantSDNode *N1C = dyn_cast(N1); MVT::ValueType VT = N1.getValueType(); + // fold vector ops + SDOperand FoldedVOp = SimplifyVBinOp(N); + if (FoldedVOp.Val) return FoldedVOp; + // fold (and c1, c2) -> c1&c2 if (N0C && N1C) return DAG.getNode(ISD::AND, VT, N0, N1); @@ -1528,6 +1585,10 @@ MVT::ValueType VT = N1.getValueType(); unsigned OpSizeInBits = MVT::getSizeInBits(VT); + // fold vector ops + SDOperand FoldedVOp = SimplifyVBinOp(N); + if (FoldedVOp.Val) return FoldedVOp; + // fold (or c1, c2) -> c1|c2 if (N0C && N1C) return DAG.getNode(ISD::OR, VT, N0, N1); @@ -1807,6 +1868,10 @@ ConstantSDNode *N1C = dyn_cast(N1); MVT::ValueType VT = N0.getValueType(); + // fold vector ops + SDOperand FoldedVOp = SimplifyVBinOp(N); + if (FoldedVOp.Val) return FoldedVOp; + // fold (xor c1, c2) -> c1^c2 if (N0C && N1C) return DAG.getNode(ISD::XOR, VT, N0, N1); @@ -2742,6 +2807,30 @@ SDOperand N0 = N->getOperand(0); MVT::ValueType VT = N->getValueType(0); + // If the input is a BUILD_VECTOR with all constant elements, fold this now. + // Only do this before legalize, since afterward the target may be depending + // on the bitconvert. + // First check to see if this is all constant. + if (!AfterLegalize && + N0.getOpcode() == ISD::BUILD_VECTOR && N0.Val->hasOneUse() && + MVT::isVector(VT)) { + bool isSimple = true; + for (unsigned i = 0, e = N0.getNumOperands(); i != e; ++i) + if (N0.getOperand(i).getOpcode() != ISD::UNDEF && + N0.getOperand(i).getOpcode() != ISD::Constant && + N0.getOperand(i).getOpcode() != ISD::ConstantFP) { + isSimple = false; + break; + } + + MVT::ValueType DestEltVT = MVT::getVectorElementType(N->getValueType(0)); + assert(!MVT::isVector(DestEltVT) && + "Element type of vector ValueType must not be vector!"); + if (isSimple) { + return ConstantFoldBIT_CONVERTofBUILD_VECTOR(N0.Val, DestEltVT); + } + } + // If the input is a constant, let getNode() fold it. if (isa(N0) || isa(N0)) { SDOperand Res = DAG.getNode(ISD::BIT_CONVERT, VT, N0); @@ -2774,37 +2863,11 @@ return SDOperand(); } -SDOperand DAGCombiner::visitVBIT_CONVERT(SDNode *N) { - SDOperand N0 = N->getOperand(0); - MVT::ValueType VT = N->getValueType(0); - - // If the input is a VBUILD_VECTOR with all constant elements, fold this now. - // First check to see if this is all constant. - if (N0.getOpcode() == ISD::VBUILD_VECTOR && N0.Val->hasOneUse() && - VT == MVT::Vector) { - bool isSimple = true; - for (unsigned i = 0, e = N0.getNumOperands()-2; i != e; ++i) - if (N0.getOperand(i).getOpcode() != ISD::UNDEF && - N0.getOperand(i).getOpcode() != ISD::Constant && - N0.getOperand(i).getOpcode() != ISD::ConstantFP) { - isSimple = false; - break; - } - - MVT::ValueType DestEltVT = cast(N->getOperand(2))->getVT(); - if (isSimple && !MVT::isVector(DestEltVT)) { - return ConstantFoldVBIT_CONVERTofVBUILD_VECTOR(N0.Val, DestEltVT); - } - } - - return SDOperand(); -} - -/// ConstantFoldVBIT_CONVERTofVBUILD_VECTOR - We know that BV is a vbuild_vector +/// ConstantFoldBIT_CONVERTofBUILD_VECTOR - We know that BV is a build_vector /// node with Constant, ConstantFP or Undef operands. DstEltVT indicates the /// destination element value type. SDOperand DAGCombiner:: -ConstantFoldVBIT_CONVERTofVBUILD_VECTOR(SDNode *BV, MVT::ValueType DstEltVT) { +ConstantFoldBIT_CONVERTofBUILD_VECTOR(SDNode *BV, MVT::ValueType DstEltVT) { MVT::ValueType SrcEltVT = BV->getOperand(0).getValueType(); // If this is already the right type, we're done. @@ -2817,13 +2880,14 @@ // type, convert each element. This handles FP<->INT cases. if (SrcBitSize == DstBitSize) { SmallVector Ops; - for (unsigned i = 0, e = BV->getNumOperands()-2; i != e; ++i) { + for (unsigned i = 0, e = BV->getNumOperands(); i != e; ++i) { Ops.push_back(DAG.getNode(ISD::BIT_CONVERT, DstEltVT, BV->getOperand(i))); AddToWorkList(Ops.back().Val); } - Ops.push_back(*(BV->op_end()-2)); // Add num elements. - Ops.push_back(DAG.getValueType(DstEltVT)); - return DAG.getNode(ISD::VBUILD_VECTOR, MVT::Vector, &Ops[0], Ops.size()); + MVT::ValueType VT = + MVT::getVectorType(DstEltVT, + MVT::getVectorNumElements(BV->getValueType(0))); + return DAG.getNode(ISD::BUILD_VECTOR, VT, &Ops[0], Ops.size()); } // Otherwise, we're growing or shrinking the elements. To avoid having to @@ -2834,7 +2898,7 @@ // same sizes. assert((SrcEltVT == MVT::f32 || SrcEltVT == MVT::f64) && "Unknown FP VT!"); MVT::ValueType IntVT = SrcEltVT == MVT::f32 ? MVT::i32 : MVT::i64; - BV = ConstantFoldVBIT_CONVERTofVBUILD_VECTOR(BV, IntVT).Val; + BV = ConstantFoldBIT_CONVERTofBUILD_VECTOR(BV, IntVT).Val; SrcEltVT = IntVT; } @@ -2843,10 +2907,10 @@ if (MVT::isFloatingPoint(DstEltVT)) { assert((DstEltVT == MVT::f32 || DstEltVT == MVT::f64) && "Unknown FP VT!"); MVT::ValueType TmpVT = DstEltVT == MVT::f32 ? MVT::i32 : MVT::i64; - SDNode *Tmp = ConstantFoldVBIT_CONVERTofVBUILD_VECTOR(BV, TmpVT).Val; + SDNode *Tmp = ConstantFoldBIT_CONVERTofBUILD_VECTOR(BV, TmpVT).Val; // Next, convert to FP elements of the same size. - return ConstantFoldVBIT_CONVERTofVBUILD_VECTOR(Tmp, DstEltVT); + return ConstantFoldBIT_CONVERTofBUILD_VECTOR(Tmp, DstEltVT); } // Okay, we know the src/dst types are both integers of differing types. @@ -2856,7 +2920,7 @@ unsigned NumInputsPerOutput = DstBitSize/SrcBitSize; SmallVector Ops; - for (unsigned i = 0, e = BV->getNumOperands()-2; i != e; + for (unsigned i = 0, e = BV->getNumOperands(); i != e; i += NumInputsPerOutput) { bool isLE = TLI.isLittleEndian(); uint64_t NewBits = 0; @@ -2877,16 +2941,16 @@ Ops.push_back(DAG.getConstant(NewBits, DstEltVT)); } - Ops.push_back(DAG.getConstant(Ops.size(), MVT::i32)); // Add num elements. - Ops.push_back(DAG.getValueType(DstEltVT)); // Add element size. - return DAG.getNode(ISD::VBUILD_VECTOR, MVT::Vector, &Ops[0], Ops.size()); + MVT::ValueType VT = MVT::getVectorType(DstEltVT, + Ops.size()); + return DAG.getNode(ISD::BUILD_VECTOR, VT, &Ops[0], Ops.size()); } // Finally, this must be the case where we are shrinking elements: each input // turns into multiple outputs. unsigned NumOutputsPerInput = SrcBitSize/DstBitSize; SmallVector Ops; - for (unsigned i = 0, e = BV->getNumOperands()-2; i != e; ++i) { + for (unsigned i = 0, e = BV->getNumOperands(); i != e; ++i) { if (BV->getOperand(i).getOpcode() == ISD::UNDEF) { for (unsigned j = 0; j != NumOutputsPerInput; ++j) Ops.push_back(DAG.getNode(ISD::UNDEF, DstEltVT)); @@ -2904,9 +2968,8 @@ if (!TLI.isLittleEndian()) std::reverse(Ops.end()-NumOutputsPerInput, Ops.end()); } - Ops.push_back(DAG.getConstant(Ops.size(), MVT::i32)); // Add num elements. - Ops.push_back(DAG.getValueType(DstEltVT)); // Add element size. - return DAG.getNode(ISD::VBUILD_VECTOR, MVT::Vector, &Ops[0], Ops.size()); + MVT::ValueType VT = MVT::getVectorType(DstEltVT, Ops.size()); + return DAG.getNode(ISD::BUILD_VECTOR, VT, &Ops[0], Ops.size()); } @@ -2918,6 +2981,10 @@ ConstantFPSDNode *N1CFP = dyn_cast(N1); MVT::ValueType VT = N->getValueType(0); + // fold vector ops + SDOperand FoldedVOp = SimplifyVBinOp(N); + if (FoldedVOp.Val) return FoldedVOp; + // fold (fadd c1, c2) -> c1+c2 if (N0CFP && N1CFP) return DAG.getNode(ISD::FADD, VT, N0, N1); @@ -2937,6 +3004,10 @@ return DAG.getNode(ISD::FADD, VT, N0.getOperand(0), DAG.getNode(ISD::FADD, VT, N0.getOperand(1), N1)); + // If either operand is undef, the result is undef + if (N0.getOpcode() == ISD::UNDEF || N1.getOpcode() == ISD::UNDEF) + return DAG.getNode(ISD::UNDEF, VT); + return SDOperand(); } @@ -2947,6 +3018,10 @@ ConstantFPSDNode *N1CFP = dyn_cast(N1); MVT::ValueType VT = N->getValueType(0); + // fold vector ops + SDOperand FoldedVOp = SimplifyVBinOp(N); + if (FoldedVOp.Val) return FoldedVOp; + // fold (fsub c1, c2) -> c1-c2 if (N0CFP && N1CFP) return DAG.getNode(ISD::FSUB, VT, N0, N1); @@ -2954,6 +3029,10 @@ if (isNegatibleForFree(N1)) return DAG.getNode(ISD::FADD, VT, N0, GetNegatedExpression(N1, DAG)); + // If either operand is undef, the result is undef + if (N0.getOpcode() == ISD::UNDEF || N1.getOpcode() == ISD::UNDEF) + return DAG.getNode(ISD::UNDEF, VT); + return SDOperand(); } @@ -2964,6 +3043,10 @@ ConstantFPSDNode *N1CFP = dyn_cast(N1); MVT::ValueType VT = N->getValueType(0); + // fold vector ops + SDOperand FoldedVOp = SimplifyVBinOp(N); + if (FoldedVOp.Val) return FoldedVOp; + // fold (fmul c1, c2) -> c1*c2 if (N0CFP && N1CFP) return DAG.getNode(ISD::FMUL, VT, N0, N1); @@ -2994,6 +3077,10 @@ return DAG.getNode(ISD::FMUL, VT, N0.getOperand(0), DAG.getNode(ISD::FMUL, VT, N0.getOperand(1), N1)); + // If either operand is undef, the result is undef + if (N0.getOpcode() == ISD::UNDEF || N1.getOpcode() == ISD::UNDEF) + return DAG.getNode(ISD::UNDEF, VT); + return SDOperand(); } @@ -3004,6 +3091,10 @@ ConstantFPSDNode *N1CFP = dyn_cast(N1); MVT::ValueType VT = N->getValueType(0); + // fold vector ops + SDOperand FoldedVOp = SimplifyVBinOp(N); + if (FoldedVOp.Val) return FoldedVOp; + // fold (fdiv c1, c2) -> c1/c2 if (N0CFP && N1CFP) return DAG.getNode(ISD::FDIV, VT, N0, N1); @@ -3020,6 +3111,10 @@ } } + // If either operand is undef, the result is undef + if (N0.getOpcode() == ISD::UNDEF || N1.getOpcode() == ISD::UNDEF) + return DAG.getNode(ISD::UNDEF, VT); + return SDOperand(); } @@ -3033,6 +3128,11 @@ // fold (frem c1, c2) -> fmod(c1,c2) if (N0CFP && N1CFP) return DAG.getNode(ISD::FREM, VT, N0, N1); + + // If either operand is undef, the result is undef + if (N0.getOpcode() == ISD::UNDEF || N1.getOpcode() == ISD::UNDEF) + return DAG.getNode(ISD::UNDEF, VT); + return SDOperand(); } @@ -3735,53 +3835,32 @@ return SDOperand(); } -SDOperand DAGCombiner::visitVINSERT_VECTOR_ELT(SDNode *N) { - SDOperand InVec = N->getOperand(0); - SDOperand InVal = N->getOperand(1); - SDOperand EltNo = N->getOperand(2); - SDOperand NumElts = N->getOperand(3); - SDOperand EltType = N->getOperand(4); - - // If the invec is a VBUILD_VECTOR and if EltNo is a constant, build a new - // vector with the inserted element. - if (InVec.getOpcode() == ISD::VBUILD_VECTOR && isa(EltNo)) { - unsigned Elt = cast(EltNo)->getValue(); - SmallVector Ops(InVec.Val->op_begin(), InVec.Val->op_end()); - if (Elt < Ops.size()-2) - Ops[Elt] = InVal; - return DAG.getNode(ISD::VBUILD_VECTOR, InVec.getValueType(), - &Ops[0], Ops.size()); - } - - return SDOperand(); -} +SDOperand DAGCombiner::visitBUILD_VECTOR(SDNode *N) { + unsigned NumInScalars = N->getNumOperands(); + MVT::ValueType VT = N->getValueType(0); + unsigned NumElts = MVT::getVectorNumElements(VT); + MVT::ValueType EltType = MVT::getVectorElementType(VT); -SDOperand DAGCombiner::visitVBUILD_VECTOR(SDNode *N) { - unsigned NumInScalars = N->getNumOperands()-2; - SDOperand NumElts = N->getOperand(NumInScalars); - SDOperand EltType = N->getOperand(NumInScalars+1); - - // Check to see if this is a VBUILD_VECTOR of a bunch of VEXTRACT_VECTOR_ELT - // operations. If so, and if the EXTRACT_ELT vector inputs come from at most - // two distinct vectors, turn this into a shuffle node. + // Check to see if this is a BUILD_VECTOR of a bunch of EXTRACT_VECTOR_ELT + // operations. If so, and if the EXTRACT_VECTOR_ELT vector inputs come from + // at most two distinct vectors, turn this into a shuffle node. SDOperand VecIn1, VecIn2; for (unsigned i = 0; i != NumInScalars; ++i) { // Ignore undef inputs. if (N->getOperand(i).getOpcode() == ISD::UNDEF) continue; - // If this input is something other than a VEXTRACT_VECTOR_ELT with a + // If this input is something other than a EXTRACT_VECTOR_ELT with a // constant index, bail out. - if (N->getOperand(i).getOpcode() != ISD::VEXTRACT_VECTOR_ELT || + if (N->getOperand(i).getOpcode() != ISD::EXTRACT_VECTOR_ELT || !isa(N->getOperand(i).getOperand(1))) { VecIn1 = VecIn2 = SDOperand(0, 0); break; } - // If the input vector type disagrees with the result of the vbuild_vector, + // If the input vector type disagrees with the result of the build_vector, // we can't make a shuffle. SDOperand ExtractedFromVec = N->getOperand(i).getOperand(0); - if (*(ExtractedFromVec.Val->op_end()-2) != NumElts || - *(ExtractedFromVec.Val->op_end()-1) != EltType) { + if (ExtractedFromVec.getValueType() != VT) { VecIn1 = VecIn2 = SDOperand(0, 0); break; } @@ -3825,158 +3904,49 @@ } // Add count and size info. - BuildVecIndices.push_back(NumElts); - BuildVecIndices.push_back(DAG.getValueType(TLI.getPointerTy())); + MVT::ValueType BuildVecVT = + MVT::getVectorType(TLI.getPointerTy(), NumElts); - // Return the new VVECTOR_SHUFFLE node. + // Return the new VECTOR_SHUFFLE node. SDOperand Ops[5]; Ops[0] = VecIn1; if (VecIn2.Val) { Ops[1] = VecIn2; } else { - // Use an undef vbuild_vector as input for the second operand. + // Use an undef build_vector as input for the second operand. std::vector UnOps(NumInScalars, DAG.getNode(ISD::UNDEF, - cast(EltType)->getVT())); - UnOps.push_back(NumElts); - UnOps.push_back(EltType); - Ops[1] = DAG.getNode(ISD::VBUILD_VECTOR, MVT::Vector, + EltType)); + Ops[1] = DAG.getNode(ISD::BUILD_VECTOR, VT, &UnOps[0], UnOps.size()); AddToWorkList(Ops[1].Val); } - Ops[2] = DAG.getNode(ISD::VBUILD_VECTOR, MVT::Vector, + Ops[2] = DAG.getNode(ISD::BUILD_VECTOR, BuildVecVT, &BuildVecIndices[0], BuildVecIndices.size()); - Ops[3] = NumElts; - Ops[4] = EltType; - return DAG.getNode(ISD::VVECTOR_SHUFFLE, MVT::Vector, Ops, 5); + return DAG.getNode(ISD::VECTOR_SHUFFLE, VT, Ops, 3); } return SDOperand(); } -SDOperand DAGCombiner::visitVECTOR_SHUFFLE(SDNode *N) { - SDOperand ShufMask = N->getOperand(2); - unsigned NumElts = ShufMask.getNumOperands(); +SDOperand DAGCombiner::visitCONCAT_VECTORS(SDNode *N) { + // TODO: Check to see if this is a CONCAT_VECTORS of a bunch of + // EXTRACT_SUBVECTOR operations. If so, and if the EXTRACT_SUBVECTOR vector + // inputs come from at most two distinct vectors, turn this into a shuffle + // node. - // If the shuffle mask is an identity operation on the LHS, return the LHS. - bool isIdentity = true; - for (unsigned i = 0; i != NumElts; ++i) { - if (ShufMask.getOperand(i).getOpcode() != ISD::UNDEF && - cast(ShufMask.getOperand(i))->getValue() != i) { - isIdentity = false; - break; - } - } - if (isIdentity) return N->getOperand(0); - - // If the shuffle mask is an identity operation on the RHS, return the RHS. - isIdentity = true; - for (unsigned i = 0; i != NumElts; ++i) { - if (ShufMask.getOperand(i).getOpcode() != ISD::UNDEF && - cast(ShufMask.getOperand(i))->getValue() != i+NumElts) { - isIdentity = false; - break; - } - } - if (isIdentity) return N->getOperand(1); - - // Check if the shuffle is a unary shuffle, i.e. one of the vectors is not - // needed at all. - bool isUnary = true; - bool isSplat = true; - int VecNum = -1; - unsigned BaseIdx = 0; - for (unsigned i = 0; i != NumElts; ++i) - if (ShufMask.getOperand(i).getOpcode() != ISD::UNDEF) { - unsigned Idx = cast(ShufMask.getOperand(i))->getValue(); - int V = (Idx < NumElts) ? 0 : 1; - if (VecNum == -1) { - VecNum = V; - BaseIdx = Idx; - } else { - if (BaseIdx != Idx) - isSplat = false; - if (VecNum != V) { - isUnary = false; - break; - } - } - } - - SDOperand N0 = N->getOperand(0); - SDOperand N1 = N->getOperand(1); - // Normalize unary shuffle so the RHS is undef. - if (isUnary && VecNum == 1) - std::swap(N0, N1); - - // If it is a splat, check if the argument vector is a build_vector with - // all scalar elements the same. - if (isSplat) { - SDNode *V = N0.Val; - if (V->getOpcode() == ISD::BIT_CONVERT) - V = V->getOperand(0).Val; - if (V->getOpcode() == ISD::BUILD_VECTOR) { - unsigned NumElems = V->getNumOperands()-2; - if (NumElems > BaseIdx) { - SDOperand Base; - bool AllSame = true; - for (unsigned i = 0; i != NumElems; ++i) { - if (V->getOperand(i).getOpcode() != ISD::UNDEF) { - Base = V->getOperand(i); - break; - } - } - // Splat of , return - if (!Base.Val) - return N0; - for (unsigned i = 0; i != NumElems; ++i) { - if (V->getOperand(i).getOpcode() != ISD::UNDEF && - V->getOperand(i) != Base) { - AllSame = false; - break; - } - } - // Splat of , return - if (AllSame) - return N0; - } - } + // If we only have one input vector, we don't need to do any concatenation. + if (N->getNumOperands() == 1) { + return N->getOperand(0); } - // If it is a unary or the LHS and the RHS are the same node, turn the RHS - // into an undef. - if (isUnary || N0 == N1) { - if (N0.getOpcode() == ISD::UNDEF) - return DAG.getNode(ISD::UNDEF, N->getValueType(0)); - // Check the SHUFFLE mask, mapping any inputs from the 2nd operand into the - // first operand. - SmallVector MappedOps; - for (unsigned i = 0, e = ShufMask.getNumOperands(); i != e; ++i) { - if (ShufMask.getOperand(i).getOpcode() == ISD::UNDEF || - cast(ShufMask.getOperand(i))->getValue() < NumElts) { - MappedOps.push_back(ShufMask.getOperand(i)); - } else { - unsigned NewIdx = - cast(ShufMask.getOperand(i))->getValue() - NumElts; - MappedOps.push_back(DAG.getConstant(NewIdx, MVT::i32)); - } - } - ShufMask = DAG.getNode(ISD::BUILD_VECTOR, ShufMask.getValueType(), - &MappedOps[0], MappedOps.size()); - AddToWorkList(ShufMask.Val); - return DAG.getNode(ISD::VECTOR_SHUFFLE, N->getValueType(0), - N0, - DAG.getNode(ISD::UNDEF, N->getValueType(0)), - ShufMask); - } - return SDOperand(); } -SDOperand DAGCombiner::visitVVECTOR_SHUFFLE(SDNode *N) { +SDOperand DAGCombiner::visitVECTOR_SHUFFLE(SDNode *N) { SDOperand ShufMask = N->getOperand(2); - unsigned NumElts = ShufMask.getNumOperands()-2; - + unsigned NumElts = ShufMask.getNumOperands(); + // If the shuffle mask is an identity operation on the LHS, return the LHS. bool isIdentity = true; for (unsigned i = 0; i != NumElts; ++i) { @@ -3987,7 +3957,7 @@ } } if (isIdentity) return N->getOperand(0); - + // If the shuffle mask is an identity operation on the RHS, return the RHS. isIdentity = true; for (unsigned i = 0; i != NumElts; ++i) { @@ -4033,19 +4003,17 @@ if (isSplat) { SDNode *V = N0.Val; - // If this is a vbit convert that changes the element type of the vector but + // If this is a bit convert that changes the element type of the vector but // not the number of vector elements, look through it. Be careful not to // look though conversions that change things like v4f32 to v2f64. - if (V->getOpcode() == ISD::VBIT_CONVERT) { + if (V->getOpcode() == ISD::BIT_CONVERT) { SDOperand ConvInput = V->getOperand(0); - if (ConvInput.getValueType() == MVT::Vector && - NumElts == - ConvInput.getConstantOperandVal(ConvInput.getNumOperands()-2)) + if (MVT::getVectorNumElements(ConvInput.getValueType()) == NumElts) V = ConvInput.Val; } - if (V->getOpcode() == ISD::VBUILD_VECTOR) { - unsigned NumElems = V->getNumOperands()-2; + if (V->getOpcode() == ISD::BUILD_VECTOR) { + unsigned NumElems = V->getNumOperands(); if (NumElems > BaseIdx) { SDOperand Base; bool AllSame = true; @@ -4088,48 +4056,33 @@ MappedOps.push_back(DAG.getConstant(NewIdx, MVT::i32)); } } - // Add the type/#elts values. - MappedOps.push_back(ShufMask.getOperand(NumElts)); - MappedOps.push_back(ShufMask.getOperand(NumElts+1)); - - ShufMask = DAG.getNode(ISD::VBUILD_VECTOR, ShufMask.getValueType(), + ShufMask = DAG.getNode(ISD::BUILD_VECTOR, ShufMask.getValueType(), &MappedOps[0], MappedOps.size()); AddToWorkList(ShufMask.Val); - - // Build the undef vector. - SDOperand UDVal = DAG.getNode(ISD::UNDEF, MappedOps[0].getValueType()); - for (unsigned i = 0; i != NumElts; ++i) - MappedOps[i] = UDVal; - MappedOps[NumElts ] = *(N0.Val->op_end()-2); - MappedOps[NumElts+1] = *(N0.Val->op_end()-1); - UDVal = DAG.getNode(ISD::VBUILD_VECTOR, MVT::Vector, - &MappedOps[0], MappedOps.size()); - - return DAG.getNode(ISD::VVECTOR_SHUFFLE, MVT::Vector, - N0, UDVal, ShufMask, - MappedOps[NumElts], MappedOps[NumElts+1]); + return DAG.getNode(ISD::VECTOR_SHUFFLE, N->getValueType(0), + N0, + DAG.getNode(ISD::UNDEF, N->getValueType(0)), + ShufMask); } - + return SDOperand(); } /// XformToShuffleWithZero - Returns a vector_shuffle if it able to transform -/// a VAND to a vector_shuffle with the destination vector and a zero vector. -/// e.g. VAND V, <0xffffffff, 0, 0xffffffff, 0>. ==> +/// an AND to a vector_shuffle with the destination vector and a zero vector. +/// e.g. AND V, <0xffffffff, 0, 0xffffffff, 0>. ==> /// vector_shuffle V, Zero, <0, 4, 2, 4> SDOperand DAGCombiner::XformToShuffleWithZero(SDNode *N) { SDOperand LHS = N->getOperand(0); SDOperand RHS = N->getOperand(1); - if (N->getOpcode() == ISD::VAND) { - SDOperand DstVecSize = *(LHS.Val->op_end()-2); - SDOperand DstVecEVT = *(LHS.Val->op_end()-1); - if (RHS.getOpcode() == ISD::VBIT_CONVERT) + if (N->getOpcode() == ISD::AND) { + if (RHS.getOpcode() == ISD::BIT_CONVERT) RHS = RHS.getOperand(0); - if (RHS.getOpcode() == ISD::VBUILD_VECTOR) { + if (RHS.getOpcode() == ISD::BUILD_VECTOR) { std::vector IdxOps; unsigned NumOps = RHS.getNumOperands(); - unsigned NumElts = NumOps-2; - MVT::ValueType EVT = cast(RHS.getOperand(NumOps-1))->getVT(); + unsigned NumElts = NumOps; + MVT::ValueType EVT = MVT::getVectorElementType(RHS.getValueType()); for (unsigned i = 0; i != NumElts; ++i) { SDOperand Elt = RHS.getOperand(i); if (!isa(Elt)) @@ -4146,30 +4099,21 @@ if (!TLI.isVectorClearMaskLegal(IdxOps, EVT, DAG)) return SDOperand(); - // Return the new VVECTOR_SHUFFLE node. - SDOperand NumEltsNode = DAG.getConstant(NumElts, MVT::i32); - SDOperand EVTNode = DAG.getValueType(EVT); + // Return the new VECTOR_SHUFFLE node. + MVT::ValueType VT = MVT::getVectorType(EVT, NumElts); std::vector Ops; - LHS = DAG.getNode(ISD::VBIT_CONVERT, MVT::Vector, LHS, NumEltsNode, - EVTNode); + LHS = DAG.getNode(ISD::BIT_CONVERT, VT, LHS); Ops.push_back(LHS); AddToWorkList(LHS.Val); std::vector ZeroOps(NumElts, DAG.getConstant(0, EVT)); - ZeroOps.push_back(NumEltsNode); - ZeroOps.push_back(EVTNode); - Ops.push_back(DAG.getNode(ISD::VBUILD_VECTOR, MVT::Vector, + Ops.push_back(DAG.getNode(ISD::BUILD_VECTOR, VT, &ZeroOps[0], ZeroOps.size())); - IdxOps.push_back(NumEltsNode); - IdxOps.push_back(EVTNode); - Ops.push_back(DAG.getNode(ISD::VBUILD_VECTOR, MVT::Vector, + Ops.push_back(DAG.getNode(ISD::BUILD_VECTOR, VT, &IdxOps[0], IdxOps.size())); - Ops.push_back(NumEltsNode); - Ops.push_back(EVTNode); - SDOperand Result = DAG.getNode(ISD::VVECTOR_SHUFFLE, MVT::Vector, + SDOperand Result = DAG.getNode(ISD::VECTOR_SHUFFLE, VT, &Ops[0], Ops.size()); - if (NumEltsNode != DstVecSize || EVTNode != DstVecEVT) { - Result = DAG.getNode(ISD::VBIT_CONVERT, MVT::Vector, Result, - DstVecSize, DstVecEVT); + if (VT != LHS.getValueType()) { + Result = DAG.getNode(ISD::BIT_CONVERT, LHS.getValueType(), Result); } return Result; } @@ -4177,24 +4121,28 @@ return SDOperand(); } -/// visitVBinOp - Visit a binary vector operation, like VADD. IntOp indicates -/// the scalar operation of the vop if it is operating on an integer vector -/// (e.g. ADD) and FPOp indicates the FP version (e.g. FADD). -SDOperand DAGCombiner::visitVBinOp(SDNode *N, ISD::NodeType IntOp, - ISD::NodeType FPOp) { - MVT::ValueType EltType = cast(*(N->op_end()-1))->getVT(); - ISD::NodeType ScalarOp = MVT::isInteger(EltType) ? IntOp : FPOp; +/// SimplifyVBinOp - Visit a binary vector operation, like ADD. +SDOperand DAGCombiner::SimplifyVBinOp(SDNode *N) { + // After legalize, the target may be depending on adds and other + // binary ops to provide legal ways to construct constants or other + // things. Simplifying them may result in a loss of legality. + if (AfterLegalize) return SDOperand(); + + MVT::ValueType VT = N->getValueType(0); + if (!MVT::isVector(VT)) return SDOperand(); + + MVT::ValueType EltType = MVT::getVectorElementType(VT); SDOperand LHS = N->getOperand(0); SDOperand RHS = N->getOperand(1); SDOperand Shuffle = XformToShuffleWithZero(N); if (Shuffle.Val) return Shuffle; - // If the LHS and RHS are VBUILD_VECTOR nodes, see if we can constant fold + // If the LHS and RHS are BUILD_VECTOR nodes, see if we can constant fold // this operation. - if (LHS.getOpcode() == ISD::VBUILD_VECTOR && - RHS.getOpcode() == ISD::VBUILD_VECTOR) { + if (LHS.getOpcode() == ISD::BUILD_VECTOR && + RHS.getOpcode() == ISD::BUILD_VECTOR) { SmallVector Ops; - for (unsigned i = 0, e = LHS.getNumOperands()-2; i != e; ++i) { + for (unsigned i = 0, e = LHS.getNumOperands(); i != e; ++i) { SDOperand LHSOp = LHS.getOperand(i); SDOperand RHSOp = RHS.getOperand(i); // If these two elements can't be folded, bail out. @@ -4206,14 +4154,15 @@ RHSOp.getOpcode() != ISD::ConstantFP)) break; // Can't fold divide by zero. - if (N->getOpcode() == ISD::VSDIV || N->getOpcode() == ISD::VUDIV) { + if (N->getOpcode() == ISD::SDIV || N->getOpcode() == ISD::UDIV || + N->getOpcode() == ISD::FDIV) { if ((RHSOp.getOpcode() == ISD::Constant && cast(RHSOp.Val)->isNullValue()) || (RHSOp.getOpcode() == ISD::ConstantFP && !cast(RHSOp.Val)->getValue())) break; } - Ops.push_back(DAG.getNode(ScalarOp, EltType, LHSOp, RHSOp)); + Ops.push_back(DAG.getNode(N->getOpcode(), EltType, LHSOp, RHSOp)); AddToWorkList(Ops.back().Val); assert((Ops.back().getOpcode() == ISD::UNDEF || Ops.back().getOpcode() == ISD::Constant || @@ -4221,10 +4170,9 @@ "Scalar binop didn't fold!"); } - if (Ops.size() == LHS.getNumOperands()-2) { - Ops.push_back(*(LHS.Val->op_end()-2)); - Ops.push_back(*(LHS.Val->op_end()-1)); - return DAG.getNode(ISD::VBUILD_VECTOR, MVT::Vector, &Ops[0], Ops.size()); + if (Ops.size() == LHS.getNumOperands()) { + MVT::ValueType VT = LHS.getValueType(); + return DAG.getNode(ISD::BUILD_VECTOR, VT, &Ops[0], Ops.size()); } } Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.500 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.501 --- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.500 Fri Jun 22 09:59:07 2007 +++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Mon Jun 25 11:23:39 2007 @@ -111,10 +111,10 @@ /// to avoid splitting the same node more than once. std::map > SplitNodes; - /// PackedNodes - For nodes that need to be packed from MVT::Vector types to - /// concrete vector types, this contains the mapping of ones we have already + /// ScalarizedNodes - For nodes that need to be converted from vector types to + /// scalar types, this contains the mapping of ones we have already /// processed to the result. - std::map PackedNodes; + std::map ScalarizedNodes; void AddLegalizedOperand(SDOperand From, SDOperand To) { LegalizedNodes.insert(std::make_pair(From, To)); @@ -149,7 +149,7 @@ void LegalizeDAG(); private: - /// HandleOp - Legalize, Promote, Expand or Pack the specified operand as + /// HandleOp - Legalize, Promote, or Expand the specified operand as /// appropriate for its type. void HandleOp(SDOperand Op); @@ -173,15 +173,13 @@ /// types. void ExpandOp(SDOperand O, SDOperand &Lo, SDOperand &Hi); - /// SplitVectorOp - Given an operand of MVT::Vector type, break it down into - /// two smaller values of MVT::Vector type. + /// SplitVectorOp - Given an operand of vector type, break it down into + /// two smaller values. void SplitVectorOp(SDOperand O, SDOperand &Lo, SDOperand &Hi); - /// PackVectorOp - Given an operand of MVT::Vector type, convert it into the - /// equivalent operation that returns a packed value (e.g. MVT::V4F32). When - /// this is called, we know that PackedVT is the right type for the result and - /// we know that this type is legal for the target. - SDOperand PackVectorOp(SDOperand O, MVT::ValueType PackedVT); + /// ScalarizeVectorOp - Given an operand of vector type, convert it into the + /// equivalent operation that returns a scalar value. + SDOperand ScalarizeVectorOp(SDOperand O); /// isShuffleLegal - Return true if a vector shuffle is legal with the /// specified mask and type. Targets can specify exactly which masks they @@ -224,8 +222,7 @@ void ExpandShiftParts(unsigned NodeOp, SDOperand Op, SDOperand Amt, SDOperand &Lo, SDOperand &Hi); - SDOperand LowerVEXTRACT_VECTOR_ELT(SDOperand Op); - SDOperand LowerVEXTRACT_SUBVECTOR(SDOperand Op); + SDOperand ExpandEXTRACT_SUBVECTOR(SDOperand Op); SDOperand ExpandEXTRACT_VECTOR_ELT(SDOperand Op); SDOperand getIntPtrConstant(uint64_t Val) { @@ -279,22 +276,6 @@ return TLI.isShuffleMaskLegal(Mask, VT) ? Mask.Val : 0; } -/// getScalarizedOpcode - Return the scalar opcode that corresponds to the -/// specified vector opcode. -static unsigned getScalarizedOpcode(unsigned VecOp, MVT::ValueType VT) { - switch (VecOp) { - default: assert(0 && "Don't know how to scalarize this opcode!"); - case ISD::VADD: return MVT::isInteger(VT) ? ISD::ADD : ISD::FADD; - case ISD::VSUB: return MVT::isInteger(VT) ? ISD::SUB : ISD::FSUB; - case ISD::VMUL: return MVT::isInteger(VT) ? ISD::MUL : ISD::FMUL; - case ISD::VSDIV: return MVT::isInteger(VT) ? ISD::SDIV: ISD::FDIV; - case ISD::VUDIV: return MVT::isInteger(VT) ? ISD::UDIV: ISD::FDIV; - case ISD::VAND: return MVT::isInteger(VT) ? ISD::AND : 0; - case ISD::VOR: return MVT::isInteger(VT) ? ISD::OR : 0; - case ISD::VXOR: return MVT::isInteger(VT) ? ISD::XOR : 0; - } -} - SelectionDAGLegalize::SelectionDAGLegalize(SelectionDAG &dag) : TLI(dag.getTargetLoweringInfo()), DAG(dag), ValueTypeActions(TLI.getValueTypeActions()) { @@ -369,7 +350,7 @@ LegalizedNodes.clear(); PromotedNodes.clear(); SplitNodes.clear(); - PackedNodes.clear(); + ScalarizedNodes.clear(); // Remove dead nodes now. DAG.RemoveDeadNodes(); @@ -473,38 +454,29 @@ return false; } -/// HandleOp - Legalize, Promote, Expand or Pack the specified operand as +/// HandleOp - Legalize, Promote, or Expand the specified operand as /// appropriate for its type. void SelectionDAGLegalize::HandleOp(SDOperand Op) { - switch (getTypeAction(Op.getValueType())) { + MVT::ValueType VT = Op.getValueType(); + switch (getTypeAction(VT)) { default: assert(0 && "Bad type action!"); - case Legal: LegalizeOp(Op); break; - case Promote: PromoteOp(Op); break; + case Legal: (void)LegalizeOp(Op); break; + case Promote: (void)PromoteOp(Op); break; case Expand: - if (Op.getValueType() != MVT::Vector) { + if (!MVT::isVector(VT)) { + // If this is an illegal scalar, expand it into its two component + // pieces. SDOperand X, Y; ExpandOp(Op, X, Y); + } else if (MVT::getVectorNumElements(VT) == 1) { + // If this is an illegal single element vector, convert it to a + // scalar operation. + (void)ScalarizeVectorOp(Op); } else { - SDNode *N = Op.Val; - unsigned NumOps = N->getNumOperands(); - unsigned NumElements = - cast(N->getOperand(NumOps-2))->getValue(); - MVT::ValueType EVT = cast(N->getOperand(NumOps-1))->getVT(); - MVT::ValueType PackedVT = MVT::getVectorType(EVT, NumElements); - if (PackedVT != MVT::Other && TLI.isTypeLegal(PackedVT)) { - // In the common case, this is a legal vector type, convert it to the - // packed operation and type now. - PackVectorOp(Op, PackedVT); - } else if (NumElements == 1) { - // Otherwise, if this is a single element vector, convert it to a - // scalar operation. - PackVectorOp(Op, EVT); - } else { - // Otherwise, this is a multiple element vector that isn't supported. - // Split it in half and legalize both parts. - SDOperand X, Y; - SplitVectorOp(Op, X, Y); - } + // Otherwise, this is an illegal multiple element vector. + // Split it in half and legalize both parts. + SDOperand X, Y; + SplitVectorOp(Op, X, Y); } break; } @@ -556,6 +528,8 @@ SelectionDAG &DAG, TargetLowering &TLI) { MVT::ValueType VT = Node->getValueType(0); MVT::ValueType SrcVT = Node->getOperand(1).getValueType(); + assert((SrcVT == MVT::f32 || SrcVT == MVT::f64) && + "fcopysign expansion only supported for f32 and f64"); MVT::ValueType SrcNVT = (SrcVT == MVT::f64) ? MVT::i64 : MVT::i32; // First get the sign bit of second operand. @@ -1158,34 +1132,17 @@ break; case ISD::EXTRACT_VECTOR_ELT: - Tmp1 = LegalizeOp(Node->getOperand(0)); + Tmp1 = Node->getOperand(0); Tmp2 = LegalizeOp(Node->getOperand(1)); Result = DAG.UpdateNodeOperands(Result, Tmp1, Tmp2); - - switch (TLI.getOperationAction(ISD::EXTRACT_VECTOR_ELT, - Tmp1.getValueType())) { - default: assert(0 && "This action is not supported yet!"); - case TargetLowering::Legal: - break; - case TargetLowering::Custom: - Tmp3 = TLI.LowerOperation(Result, DAG); - if (Tmp3.Val) { - Result = Tmp3; - break; - } - // FALLTHROUGH - case TargetLowering::Expand: - Result = ExpandEXTRACT_VECTOR_ELT(Result); - break; - } + Result = ExpandEXTRACT_VECTOR_ELT(Result); break; - case ISD::VEXTRACT_VECTOR_ELT: - Result = LegalizeOp(LowerVEXTRACT_VECTOR_ELT(Op)); - break; - - case ISD::VEXTRACT_SUBVECTOR: - Result = LegalizeOp(LowerVEXTRACT_SUBVECTOR(Op)); + case ISD::EXTRACT_SUBVECTOR: + Tmp1 = Node->getOperand(0); + Tmp2 = LegalizeOp(Node->getOperand(1)); + Result = DAG.UpdateNodeOperands(Result, Tmp1, Tmp2); + Result = ExpandEXTRACT_SUBVECTOR(Result); break; case ISD::CALLSEQ_START: { @@ -1688,7 +1645,7 @@ Result = DAG.UpdateNodeOperands(Result, Tmp1, LegalizeOp(Tmp2), Tmp3); break; case Expand: - if (Tmp2.getValueType() != MVT::Vector) { + if (!MVT::isVector(Tmp2.getValueType())) { SDOperand Lo, Hi; ExpandOp(Tmp2, Lo, Hi); @@ -1703,20 +1660,20 @@ Result = LegalizeOp(Result); } else { SDNode *InVal = Tmp2.Val; - unsigned NumElems = - cast(*(InVal->op_end()-2))->getValue(); - MVT::ValueType EVT = cast(*(InVal->op_end()-1))->getVT(); + unsigned NumElems = MVT::getVectorNumElements(InVal->getValueType(0)); + MVT::ValueType EVT = MVT::getVectorElementType(InVal->getValueType(0)); - // Figure out if there is a Packed type corresponding to this Vector + // Figure out if there is a simple type corresponding to this Vector // type. If so, convert to the vector type. MVT::ValueType TVT = MVT::getVectorType(EVT, NumElems); - if (TVT != MVT::Other && TLI.isTypeLegal(TVT)) { + if (TLI.isTypeLegal(TVT)) { // Turn this into a return of the vector type. - Tmp2 = PackVectorOp(Tmp2, TVT); + Tmp2 = LegalizeOp(Tmp2); Result = DAG.UpdateNodeOperands(Result, Tmp1, Tmp2, Tmp3); } else if (NumElems == 1) { // Turn this into a return of the scalar type. - Tmp2 = PackVectorOp(Tmp2, EVT); + Tmp2 = ScalarizeVectorOp(Tmp2); + Tmp2 = LegalizeOp(Tmp2); Result = DAG.UpdateNodeOperands(Result, Tmp1, Tmp2, Tmp3); // FIXME: Returns of gcc generic vectors smaller than a legal type @@ -1756,7 +1713,7 @@ break; case Expand: { SDOperand Lo, Hi; - assert(Node->getOperand(i).getValueType() != MVT::Vector && + assert(!MVT::isExtendedValueType(Node->getOperand(i).getValueType())&& "FIXME: TODO: implement returning non-legal vector types!"); ExpandOp(Node->getOperand(i), Lo, Hi); NewValues.push_back(Lo); @@ -1853,27 +1810,30 @@ // If this is a vector type, then we have to calculate the increment as // the product of the element size in bytes, and the number of elements // in the high half of the vector. - if (ST->getValue().getValueType() == MVT::Vector) { + if (MVT::isVector(ST->getValue().getValueType())) { SDNode *InVal = ST->getValue().Val; - unsigned NumElems = - cast(*(InVal->op_end()-2))->getValue(); - MVT::ValueType EVT = cast(*(InVal->op_end()-1))->getVT(); + unsigned NumElems = MVT::getVectorNumElements(InVal->getValueType(0)); + MVT::ValueType EVT = MVT::getVectorElementType(InVal->getValueType(0)); - // Figure out if there is a Packed type corresponding to this Vector + // Figure out if there is a simple type corresponding to this Vector // type. If so, convert to the vector type. MVT::ValueType TVT = MVT::getVectorType(EVT, NumElems); - if (TVT != MVT::Other && TLI.isTypeLegal(TVT)) { + if (TLI.isTypeLegal(TVT)) { // Turn this into a normal store of the vector type. - Tmp3 = PackVectorOp(Node->getOperand(1), TVT); + Tmp3 = LegalizeOp(Node->getOperand(1)); Result = DAG.getStore(Tmp1, Tmp3, Tmp2, ST->getSrcValue(), - ST->getSrcValueOffset()); + ST->getSrcValueOffset(), + ST->isVolatile(), + ST->getAlignment()); Result = LegalizeOp(Result); break; } else if (NumElems == 1) { // Turn this into a normal store of the scalar type. - Tmp3 = PackVectorOp(Node->getOperand(1), EVT); + Tmp3 = ScalarizeVectorOp(Node->getOperand(1)); Result = DAG.getStore(Tmp1, Tmp3, Tmp2, ST->getSrcValue(), - ST->getSrcValueOffset()); + ST->getSrcValueOffset(), + ST->isVolatile(), + ST->getAlignment()); // The scalarized value type may not be legal, e.g. it might require // promotion or expansion. Relegalize the scalar store. Result = LegalizeOp(Result); @@ -2864,6 +2824,30 @@ case ISD::BIT_CONVERT: if (!isTypeLegal(Node->getOperand(0).getValueType())) { Result = ExpandBIT_CONVERT(Node->getValueType(0), Node->getOperand(0)); + } else if (MVT::isVector(Op.getOperand(0).getValueType())) { + // The input has to be a vector type, we have to either scalarize it, pack + // it, or convert it based on whether the input vector type is legal. + SDNode *InVal = Node->getOperand(0).Val; + unsigned NumElems = MVT::getVectorNumElements(InVal->getValueType(0)); + MVT::ValueType EVT = MVT::getVectorElementType(InVal->getValueType(0)); + + // Figure out if there is a simple type corresponding to this Vector + // type. If so, convert to the vector type. + MVT::ValueType TVT = MVT::getVectorType(EVT, NumElems); + if (TLI.isTypeLegal(TVT)) { + // Turn this into a bit convert of the packed input. + Result = DAG.getNode(ISD::BIT_CONVERT, Node->getValueType(0), + LegalizeOp(Node->getOperand(0))); + break; + } else if (NumElems == 1) { + // Turn this into a bit convert of the scalar input. + Result = DAG.getNode(ISD::BIT_CONVERT, Node->getValueType(0), + ScalarizeVectorOp(Node->getOperand(0))); + break; + } else { + // FIXME: UNIMP! Store then reload + assert(0 && "Cast from unsupported vector type not implemented yet!"); + } } else { switch (TLI.getOperationAction(ISD::BIT_CONVERT, Node->getOperand(0).getValueType())) { @@ -2878,35 +2862,6 @@ } } break; - case ISD::VBIT_CONVERT: { - assert(Op.getOperand(0).getValueType() == MVT::Vector && - "Can only have VBIT_CONVERT where input or output is MVT::Vector!"); - - // The input has to be a vector type, we have to either scalarize it, pack - // it, or convert it based on whether the input vector type is legal. - SDNode *InVal = Node->getOperand(0).Val; - unsigned NumElems = - cast(*(InVal->op_end()-2))->getValue(); - MVT::ValueType EVT = cast(*(InVal->op_end()-1))->getVT(); - - // Figure out if there is a Packed type corresponding to this Vector - // type. If so, convert to the vector type. - MVT::ValueType TVT = MVT::getVectorType(EVT, NumElems); - if (TVT != MVT::Other && TLI.isTypeLegal(TVT)) { - // Turn this into a bit convert of the packed input. - Result = DAG.getNode(ISD::BIT_CONVERT, Node->getValueType(0), - PackVectorOp(Node->getOperand(0), TVT)); - break; - } else if (NumElems == 1) { - // Turn this into a bit convert of the scalar input. - Result = DAG.getNode(ISD::BIT_CONVERT, Node->getValueType(0), - PackVectorOp(Node->getOperand(0), EVT)); - break; - } else { - // FIXME: UNIMP! Store then reload - assert(0 && "Cast from unsupported vector type not implemented yet!"); - } - } // Conversion operators. The source and destination have different types. case ISD::SINT_TO_FP: @@ -3568,11 +3523,8 @@ break; } break; - case ISD::VEXTRACT_VECTOR_ELT: - Result = PromoteOp(LowerVEXTRACT_VECTOR_ELT(Op)); - break; - case ISD::VEXTRACT_SUBVECTOR: - Result = PromoteOp(LowerVEXTRACT_SUBVECTOR(Op)); + case ISD::EXTRACT_SUBVECTOR: + Result = PromoteOp(ExpandEXTRACT_SUBVECTOR(Op)); break; case ISD::EXTRACT_VECTOR_ELT: Result = PromoteOp(ExpandEXTRACT_VECTOR_ELT(Op)); @@ -3589,66 +3541,90 @@ return Result; } -/// LowerVEXTRACT_VECTOR_ELT - Lower a VEXTRACT_VECTOR_ELT operation into a -/// EXTRACT_VECTOR_ELT operation, to memory operations, or to scalar code based -/// on the vector type. The return type of this matches the element type of the -/// vector, which may not be legal for the target. -SDOperand SelectionDAGLegalize::LowerVEXTRACT_VECTOR_ELT(SDOperand Op) { +/// ExpandEXTRACT_VECTOR_ELT - Expand an EXTRACT_VECTOR_ELT operation into +/// a legal EXTRACT_VECTOR_ELT operation, scalar code, or memory traffic, +/// based on the vector type. The return type of this matches the element type +/// of the vector, which may not be legal for the target. +SDOperand SelectionDAGLegalize::ExpandEXTRACT_VECTOR_ELT(SDOperand Op) { // We know that operand #0 is the Vec vector. If the index is a constant // or if the invec is a supported hardware type, we can use it. Otherwise, // lower to a store then an indexed load. SDOperand Vec = Op.getOperand(0); - SDOperand Idx = LegalizeOp(Op.getOperand(1)); + SDOperand Idx = Op.getOperand(1); SDNode *InVal = Vec.Val; - unsigned NumElems = cast(*(InVal->op_end()-2))->getValue(); - MVT::ValueType EVT = cast(*(InVal->op_end()-1))->getVT(); + MVT::ValueType TVT = InVal->getValueType(0); + unsigned NumElems = MVT::getVectorNumElements(TVT); - // Figure out if there is a Packed type corresponding to this Vector - // type. If so, convert to the vector type. - MVT::ValueType TVT = MVT::getVectorType(EVT, NumElems); - if (TVT != MVT::Other && TLI.isTypeLegal(TVT)) { - // Turn this into a packed extract_vector_elt operation. - Vec = PackVectorOp(Vec, TVT); - return DAG.getNode(ISD::EXTRACT_VECTOR_ELT, Op.getValueType(), Vec, Idx); - } else if (NumElems == 1) { + switch (TLI.getOperationAction(ISD::EXTRACT_VECTOR_ELT, TVT)) { + default: assert(0 && "This action is not supported yet!"); + case TargetLowering::Custom: { + Vec = LegalizeOp(Vec); + Op = DAG.UpdateNodeOperands(Op, Vec, Idx); + SDOperand Tmp3 = TLI.LowerOperation(Op, DAG); + if (Tmp3.Val) + return Tmp3; + break; + } + case TargetLowering::Legal: + if (isTypeLegal(TVT)) { + Vec = LegalizeOp(Vec); + Op = DAG.UpdateNodeOperands(Op, Vec, Idx); + Op = LegalizeOp(Op); + } + break; + case TargetLowering::Expand: + break; + } + + if (NumElems == 1) { // This must be an access of the only element. Return it. - return PackVectorOp(Vec, EVT); - } else if (ConstantSDNode *CIdx = dyn_cast(Idx)) { + Op = ScalarizeVectorOp(Vec); + } else if (!TLI.isTypeLegal(TVT) && isa(Idx)) { + ConstantSDNode *CIdx = cast(Idx); SDOperand Lo, Hi; SplitVectorOp(Vec, Lo, Hi); if (CIdx->getValue() < NumElems/2) { Vec = Lo; } else { Vec = Hi; - Idx = DAG.getConstant(CIdx->getValue() - NumElems/2, Idx.getValueType()); + Idx = DAG.getConstant(CIdx->getValue() - NumElems/2, + Idx.getValueType()); } - + // It's now an extract from the appropriate high or low part. Recurse. Op = DAG.UpdateNodeOperands(Op, Vec, Idx); - return LowerVEXTRACT_VECTOR_ELT(Op); + Op = ExpandEXTRACT_VECTOR_ELT(Op); } else { - // Variable index case for extract element. - // FIXME: IMPLEMENT STORE/LOAD lowering. Need alignment of stack slot!! - assert(0 && "unimp!"); - return SDOperand(); + // Store the value to a temporary stack slot, then LOAD the scalar + // element back out. + SDOperand StackPtr = CreateStackTemporary(Vec.getValueType()); + SDOperand Ch = DAG.getStore(DAG.getEntryNode(), Vec, StackPtr, NULL, 0); + + // Add the offset to the index. + unsigned EltSize = MVT::getSizeInBits(Op.getValueType())/8; + Idx = DAG.getNode(ISD::MUL, Idx.getValueType(), Idx, + DAG.getConstant(EltSize, Idx.getValueType())); + StackPtr = DAG.getNode(ISD::ADD, Idx.getValueType(), Idx, StackPtr); + + Op = DAG.getLoad(Op.getValueType(), Ch, StackPtr, NULL, 0); } + return Op; } -/// LowerVEXTRACT_SUBVECTOR - Lower a VEXTRACT_SUBVECTOR operation. For now +/// ExpandEXTRACT_SUBVECTOR - Expand a EXTRACT_SUBVECTOR operation. For now /// we assume the operation can be split if it is not already legal. -SDOperand SelectionDAGLegalize::LowerVEXTRACT_SUBVECTOR(SDOperand Op) { +SDOperand SelectionDAGLegalize::ExpandEXTRACT_SUBVECTOR(SDOperand Op) { // We know that operand #0 is the Vec vector. For now we assume the index // is a constant and that the extracted result is a supported hardware type. SDOperand Vec = Op.getOperand(0); SDOperand Idx = LegalizeOp(Op.getOperand(1)); - SDNode *InVal = Vec.Val; - unsigned NumElems = cast(*(InVal->op_end()-2))->getValue(); + unsigned NumElems = MVT::getVectorNumElements(Vec.getValueType()); if (NumElems == MVT::getVectorNumElements(Op.getValueType())) { // This must be an access of the desired vector length. Return it. - return PackVectorOp(Vec, Op.getValueType()); + return Vec; } ConstantSDNode *CIdx = cast(Idx); @@ -3663,30 +3639,9 @@ // It's now an extract from the appropriate high or low part. Recurse. Op = DAG.UpdateNodeOperands(Op, Vec, Idx); - return LowerVEXTRACT_SUBVECTOR(Op); + return ExpandEXTRACT_SUBVECTOR(Op); } -/// ExpandEXTRACT_VECTOR_ELT - Expand an EXTRACT_VECTOR_ELT operation into -/// memory traffic. -SDOperand SelectionDAGLegalize::ExpandEXTRACT_VECTOR_ELT(SDOperand Op) { - SDOperand Vector = Op.getOperand(0); - SDOperand Idx = Op.getOperand(1); - - // If the target doesn't support this, store the value to a temporary - // stack slot, then LOAD the scalar element back out. - SDOperand StackPtr = CreateStackTemporary(Vector.getValueType()); - SDOperand Ch = DAG.getStore(DAG.getEntryNode(), Vector, StackPtr, NULL, 0); - - // Add the offset to the index. - unsigned EltSize = MVT::getSizeInBits(Op.getValueType())/8; - Idx = DAG.getNode(ISD::MUL, Idx.getValueType(), Idx, - DAG.getConstant(EltSize, Idx.getValueType())); - StackPtr = DAG.getNode(ISD::ADD, Idx.getValueType(), Idx, StackPtr); - - return DAG.getLoad(Op.getValueType(), Ch, StackPtr, NULL, 0); -} - - /// LegalizeSetCCOperands - Attempts to create a legal LHS and RHS for a SETCC /// with condition CC on the current target. This usually involves legalizing /// or promoting the arguments. In the case where LHS and RHS must be expanded, @@ -4748,7 +4703,7 @@ SDNode *Node = Op.Val; assert(getTypeAction(VT) == Expand && "Not an expanded type!"); assert(((MVT::isInteger(NVT) && NVT < VT) || MVT::isFloatingPoint(VT) || - VT == MVT::Vector) && + MVT::isVector(VT)) && "Cannot expand to FP value or to larger int value!"); // See if we already expanded it. @@ -4870,9 +4825,10 @@ SDOperand Ch = LD->getChain(); // Legalize the chain. SDOperand Ptr = LD->getBasePtr(); // Legalize the pointer. ISD::LoadExtType ExtType = LD->getExtensionType(); + unsigned SVOffset = LD->getSrcValueOffset(); if (ExtType == ISD::NON_EXTLOAD) { - Lo = DAG.getLoad(NVT, Ch, Ptr, LD->getSrcValue(),LD->getSrcValueOffset()); + Lo = DAG.getLoad(NVT, Ch, Ptr, LD->getSrcValue(), SVOffset); if (VT == MVT::f32 || VT == MVT::f64) { // f32->i32 or f64->i64 one to one expansion. // Remember that we legalized the chain. @@ -4887,8 +4843,8 @@ unsigned IncrementSize = MVT::getSizeInBits(Lo.getValueType())/8; Ptr = DAG.getNode(ISD::ADD, Ptr.getValueType(), Ptr, getIntPtrConstant(IncrementSize)); - // FIXME: This creates a bogus srcvalue! - Hi = DAG.getLoad(NVT, Ch, Ptr, LD->getSrcValue(),LD->getSrcValueOffset()); + SVOffset += IncrementSize; + Hi = DAG.getLoad(NVT, Ch, Ptr, LD->getSrcValue(), SVOffset); // Build a factor node to remember that this load is independent of the // other one. @@ -4905,7 +4861,7 @@ if (VT == MVT::f64 && EVT == MVT::f32) { // f64 = EXTLOAD f32 should expand to LOAD, FP_EXTEND SDOperand Load = DAG.getLoad(EVT, Ch, Ptr, LD->getSrcValue(), - LD->getSrcValueOffset()); + SVOffset); // Remember that we legalized the chain. AddLegalizedOperand(SDOperand(Node, 1), LegalizeOp(Load.getValue(1))); ExpandOp(DAG.getNode(ISD::FP_EXTEND, VT, Load), Lo, Hi); @@ -4914,10 +4870,10 @@ if (EVT == NVT) Lo = DAG.getLoad(NVT, Ch, Ptr, LD->getSrcValue(), - LD->getSrcValueOffset()); + SVOffset); else Lo = DAG.getExtLoad(ExtType, NVT, Ch, Ptr, LD->getSrcValue(), - LD->getSrcValueOffset(), EVT); + SVOffset, EVT); // Remember that we legalized the chain. AddLegalizedOperand(SDOperand(Node, 1), LegalizeOp(Lo.getValue(1))); @@ -5504,17 +5460,17 @@ assert(isNew && "Value already expanded?!?"); } -/// SplitVectorOp - Given an operand of MVT::Vector type, break it down into -/// two smaller values of MVT::Vector type. +/// SplitVectorOp - Given an operand of vector type, break it down into +/// two smaller values, still of vector type. void SelectionDAGLegalize::SplitVectorOp(SDOperand Op, SDOperand &Lo, SDOperand &Hi) { - assert(Op.getValueType() == MVT::Vector && "Cannot split non-vector type!"); + assert(MVT::isVector(Op.getValueType()) && "Cannot split non-vector type!"); SDNode *Node = Op.Val; - unsigned NumElements = cast(*(Node->op_end()-2))->getValue(); + unsigned NumElements = MVT::getVectorNumElements(Node->getValueType(0)); assert(NumElements > 1 && "Cannot split a single element vector!"); unsigned NewNumElts = NumElements/2; - SDOperand NewNumEltsNode = DAG.getConstant(NewNumElts, MVT::i32); - SDOperand TypeNode = *(Node->op_end()-1); + MVT::ValueType NewEltVT = MVT::getVectorElementType(Node->getValueType(0)); + MVT::ValueType NewVT = MVT::getVectorType(NewEltVT, NewNumElts); // See if we already split it. std::map >::iterator I @@ -5531,64 +5487,73 @@ Node->dump(&DAG); #endif assert(0 && "Unhandled operation in SplitVectorOp!"); - case ISD::VBUILD_VECTOR: { + case ISD::BUILD_PAIR: + Lo = Node->getOperand(0); + Hi = Node->getOperand(1); + break; + case ISD::BUILD_VECTOR: { SmallVector LoOps(Node->op_begin(), Node->op_begin()+NewNumElts); - LoOps.push_back(NewNumEltsNode); - LoOps.push_back(TypeNode); - Lo = DAG.getNode(ISD::VBUILD_VECTOR, MVT::Vector, &LoOps[0], LoOps.size()); + Lo = DAG.getNode(ISD::BUILD_VECTOR, NewVT, &LoOps[0], LoOps.size()); SmallVector HiOps(Node->op_begin()+NewNumElts, - Node->op_end()-2); - HiOps.push_back(NewNumEltsNode); - HiOps.push_back(TypeNode); - Hi = DAG.getNode(ISD::VBUILD_VECTOR, MVT::Vector, &HiOps[0], HiOps.size()); + Node->op_end()); + Hi = DAG.getNode(ISD::BUILD_VECTOR, NewVT, &HiOps[0], HiOps.size()); break; } - case ISD::VCONCAT_VECTORS: { - unsigned NewNumSubvectors = (Node->getNumOperands() - 2) / 2; - SmallVector LoOps(Node->op_begin(), - Node->op_begin()+NewNumSubvectors); - LoOps.push_back(NewNumEltsNode); - LoOps.push_back(TypeNode); - Lo = DAG.getNode(ISD::VCONCAT_VECTORS, MVT::Vector, &LoOps[0], LoOps.size()); - - SmallVector HiOps(Node->op_begin()+NewNumSubvectors, - Node->op_end()-2); - HiOps.push_back(NewNumEltsNode); - HiOps.push_back(TypeNode); - Hi = DAG.getNode(ISD::VCONCAT_VECTORS, MVT::Vector, &HiOps[0], HiOps.size()); - break; - } - case ISD::VADD: - case ISD::VSUB: - case ISD::VMUL: - case ISD::VSDIV: - case ISD::VUDIV: - case ISD::VAND: - case ISD::VOR: - case ISD::VXOR: { + case ISD::CONCAT_VECTORS: { + unsigned NewNumSubvectors = Node->getNumOperands() / 2; + if (NewNumSubvectors == 1) { + Lo = Node->getOperand(0); + Hi = Node->getOperand(1); + } else { + SmallVector LoOps(Node->op_begin(), + Node->op_begin()+NewNumSubvectors); + Lo = DAG.getNode(ISD::CONCAT_VECTORS, NewVT, &LoOps[0], LoOps.size()); + + SmallVector HiOps(Node->op_begin()+NewNumSubvectors, + Node->op_end()); + Hi = DAG.getNode(ISD::CONCAT_VECTORS, NewVT, &HiOps[0], HiOps.size()); + } + break; + } + case ISD::ADD: + case ISD::SUB: + case ISD::MUL: + case ISD::FADD: + case ISD::FSUB: + case ISD::FMUL: + case ISD::SDIV: + case ISD::UDIV: + case ISD::FDIV: + case ISD::AND: + case ISD::OR: + case ISD::XOR: { SDOperand LL, LH, RL, RH; SplitVectorOp(Node->getOperand(0), LL, LH); SplitVectorOp(Node->getOperand(1), RL, RH); - Lo = DAG.getNode(Node->getOpcode(), MVT::Vector, LL, RL, - NewNumEltsNode, TypeNode); - Hi = DAG.getNode(Node->getOpcode(), MVT::Vector, LH, RH, - NewNumEltsNode, TypeNode); + Lo = DAG.getNode(Node->getOpcode(), NewVT, LL, RL); + Hi = DAG.getNode(Node->getOpcode(), NewVT, LH, RH); break; } - case ISD::VLOAD: { - SDOperand Ch = Node->getOperand(0); // Legalize the chain. - SDOperand Ptr = Node->getOperand(1); // Legalize the pointer. - MVT::ValueType EVT = cast(TypeNode)->getVT(); - - Lo = DAG.getVecLoad(NewNumElts, EVT, Ch, Ptr, Node->getOperand(2)); - unsigned IncrementSize = NewNumElts * MVT::getSizeInBits(EVT)/8; + case ISD::LOAD: { + LoadSDNode *LD = cast(Node); + SDOperand Ch = LD->getChain(); + SDOperand Ptr = LD->getBasePtr(); + const Value *SV = LD->getSrcValue(); + int SVOffset = LD->getSrcValueOffset(); + unsigned Alignment = LD->getAlignment(); + bool isVolatile = LD->isVolatile(); + + Lo = DAG.getLoad(NewVT, Ch, Ptr, SV, SVOffset, isVolatile, Alignment); + unsigned IncrementSize = NewNumElts * MVT::getSizeInBits(NewEltVT)/8; Ptr = DAG.getNode(ISD::ADD, Ptr.getValueType(), Ptr, getIntPtrConstant(IncrementSize)); - // FIXME: This creates a bogus srcvalue! - Hi = DAG.getVecLoad(NewNumElts, EVT, Ch, Ptr, Node->getOperand(2)); + SVOffset += IncrementSize; + if (Alignment > IncrementSize) + Alignment = IncrementSize; + Hi = DAG.getLoad(NewVT, Ch, Ptr, SV, SVOffset, isVolatile, Alignment); // Build a factor node to remember that this load is independent of the // other one. @@ -5599,42 +5564,31 @@ AddLegalizedOperand(Op.getValue(1), LegalizeOp(TF)); break; } - case ISD::VBIT_CONVERT: { + case ISD::BIT_CONVERT: { // We know the result is a vector. The input may be either a vector or a // scalar value. - if (Op.getOperand(0).getValueType() != MVT::Vector) { + if (!MVT::isVector(Op.getOperand(0).getValueType())) { // Lower to a store/load. FIXME: this could be improved probably. SDOperand Ptr = CreateStackTemporary(Op.getOperand(0).getValueType()); SDOperand St = DAG.getStore(DAG.getEntryNode(), Op.getOperand(0), Ptr, NULL, 0); - MVT::ValueType EVT = cast(TypeNode)->getVT(); - St = DAG.getVecLoad(NumElements, EVT, St, Ptr, DAG.getSrcValue(0)); + St = DAG.getLoad(NewVT, St, Ptr, NULL, 0); SplitVectorOp(St, Lo, Hi); } else { // If the input is a vector type, we have to either scalarize it, pack it // or convert it based on whether the input vector type is legal. SDNode *InVal = Node->getOperand(0).Val; - unsigned NumElems = - cast(*(InVal->op_end()-2))->getValue(); - MVT::ValueType EVT = cast(*(InVal->op_end()-1))->getVT(); - - // If the input is from a single element vector, scalarize the vector, - // then treat like a scalar. - if (NumElems == 1) { - SDOperand Scalar = PackVectorOp(Op.getOperand(0), EVT); - Scalar = DAG.getNode(ISD::VBIT_CONVERT, MVT::Vector, Scalar, - Op.getOperand(1), Op.getOperand(2)); - SplitVectorOp(Scalar, Lo, Hi); - } else { + unsigned NumElems = MVT::getVectorNumElements(InVal->getValueType(0)); + + assert(NumElems > 1); + { // Split the input vector. SplitVectorOp(Op.getOperand(0), Lo, Hi); // Convert each of the pieces now. - Lo = DAG.getNode(ISD::VBIT_CONVERT, MVT::Vector, Lo, - NewNumEltsNode, TypeNode); - Hi = DAG.getNode(ISD::VBIT_CONVERT, MVT::Vector, Hi, - NewNumEltsNode, TypeNode); + Lo = DAG.getNode(ISD::BIT_CONVERT, NewVT, Lo); + Hi = DAG.getNode(ISD::BIT_CONVERT, NewVT, Hi); } break; } @@ -5648,18 +5602,18 @@ } -/// PackVectorOp - Given an operand of MVT::Vector type, convert it into the -/// equivalent operation that returns a scalar (e.g. MVT::f32) or packed value -/// (e.g. MVT::v4f32). When this is called, we know that PackedVT is the right -/// type for the result. -SDOperand SelectionDAGLegalize::PackVectorOp(SDOperand Op, - MVT::ValueType NewVT) { - assert(Op.getValueType() == MVT::Vector && "Bad PackVectorOp invocation!"); +/// ScalarizeVectorOp - Given an operand of vector type, convert it into the +/// equivalent operation that returns a scalar (e.g. F32) value. +SDOperand SelectionDAGLegalize::ScalarizeVectorOp(SDOperand Op) { + assert(MVT::isVector(Op.getValueType()) && + "Bad ScalarizeVectorOp invocation!"); SDNode *Node = Op.Val; + MVT::ValueType NewVT = MVT::getVectorElementType(Op.getValueType()); + assert(MVT::getVectorNumElements(Op.getValueType()) == 1); - // See if we already packed it. - std::map::iterator I = PackedNodes.find(Op); - if (I != PackedNodes.end()) return I->second; + // See if we already scalarized it. + std::map::iterator I = ScalarizedNodes.find(Op); + if (I != ScalarizedNodes.end()) return I->second; SDOperand Result; switch (Node->getOpcode()) { @@ -5667,146 +5621,89 @@ #ifndef NDEBUG Node->dump(&DAG); cerr << "\n"; #endif - assert(0 && "Unknown vector operation in PackVectorOp!"); - case ISD::VADD: - case ISD::VSUB: - case ISD::VMUL: - case ISD::VSDIV: - case ISD::VUDIV: - case ISD::VAND: - case ISD::VOR: - case ISD::VXOR: - Result = DAG.getNode(getScalarizedOpcode(Node->getOpcode(), NewVT), + assert(0 && "Unknown vector operation in ScalarizeVectorOp!"); + case ISD::ADD: + case ISD::FADD: + case ISD::SUB: + case ISD::FSUB: + case ISD::MUL: + case ISD::FMUL: + case ISD::SDIV: + case ISD::UDIV: + case ISD::FDIV: + case ISD::SREM: + case ISD::UREM: + case ISD::FREM: + case ISD::AND: + case ISD::OR: + case ISD::XOR: + Result = DAG.getNode(Node->getOpcode(), NewVT, - PackVectorOp(Node->getOperand(0), NewVT), - PackVectorOp(Node->getOperand(1), NewVT)); + ScalarizeVectorOp(Node->getOperand(0)), + ScalarizeVectorOp(Node->getOperand(1))); break; - case ISD::VLOAD: { - SDOperand Ch = LegalizeOp(Node->getOperand(0)); // Legalize the chain. - SDOperand Ptr = LegalizeOp(Node->getOperand(1)); // Legalize the pointer. - - SrcValueSDNode *SV = cast(Node->getOperand(2)); - Result = DAG.getLoad(NewVT, Ch, Ptr, SV->getValue(), SV->getOffset()); + case ISD::FNEG: + case ISD::FABS: + case ISD::FSQRT: + case ISD::FSIN: + case ISD::FCOS: + Result = DAG.getNode(Node->getOpcode(), + NewVT, + ScalarizeVectorOp(Node->getOperand(0))); + break; + case ISD::LOAD: { + LoadSDNode *LD = cast(Node); + SDOperand Ch = LegalizeOp(LD->getChain()); // Legalize the chain. + SDOperand Ptr = LegalizeOp(LD->getBasePtr()); // Legalize the pointer. + const Value *SV = LD->getSrcValue(); + int SVOffset = LD->getSrcValueOffset(); + Result = DAG.getLoad(NewVT, Ch, Ptr, SV, SVOffset, + LD->isVolatile(), LD->getAlignment()); + // Remember that we legalized the chain. AddLegalizedOperand(Op.getValue(1), LegalizeOp(Result.getValue(1))); break; } - case ISD::VBUILD_VECTOR: - if (Node->getOperand(0).getValueType() == NewVT) { - // Returning a scalar? - Result = Node->getOperand(0); - } else { - // Returning a BUILD_VECTOR? - - // If all elements of the build_vector are undefs, return an undef. - bool AllUndef = true; - for (unsigned i = 0, e = Node->getNumOperands()-2; i != e; ++i) - if (Node->getOperand(i).getOpcode() != ISD::UNDEF) { - AllUndef = false; - break; - } - if (AllUndef) { - Result = DAG.getNode(ISD::UNDEF, NewVT); - } else { - Result = DAG.getNode(ISD::BUILD_VECTOR, NewVT, Node->op_begin(), - Node->getNumOperands()-2); - } - } + case ISD::BUILD_VECTOR: + Result = Node->getOperand(0); break; - case ISD::VCONCAT_VECTORS: + case ISD::INSERT_VECTOR_ELT: + // Returning the inserted scalar element. + Result = Node->getOperand(1); + break; + case ISD::CONCAT_VECTORS: assert(Node->getOperand(0).getValueType() == NewVT && "Concat of non-legal vectors not yet supported!"); Result = Node->getOperand(0); break; - case ISD::VINSERT_VECTOR_ELT: - if (!MVT::isVector(NewVT)) { - // Returning a scalar? Must be the inserted element. - Result = Node->getOperand(1); - } else { - Result = DAG.getNode(ISD::INSERT_VECTOR_ELT, NewVT, - PackVectorOp(Node->getOperand(0), NewVT), - Node->getOperand(1), Node->getOperand(2)); - } + case ISD::VECTOR_SHUFFLE: { + // Figure out if the scalar is the LHS or RHS and return it. + SDOperand EltNum = Node->getOperand(2).getOperand(0); + if (cast(EltNum)->getValue()) + Result = ScalarizeVectorOp(Node->getOperand(1)); + else + Result = ScalarizeVectorOp(Node->getOperand(0)); break; - case ISD::VEXTRACT_SUBVECTOR: - Result = PackVectorOp(Node->getOperand(0), NewVT); + } + case ISD::EXTRACT_SUBVECTOR: + Result = Node->getOperand(0); assert(Result.getValueType() == NewVT); break; - case ISD::VVECTOR_SHUFFLE: - if (!MVT::isVector(NewVT)) { - // Returning a scalar? Figure out if it is the LHS or RHS and return it. - SDOperand EltNum = Node->getOperand(2).getOperand(0); - if (cast(EltNum)->getValue()) - Result = PackVectorOp(Node->getOperand(1), NewVT); - else - Result = PackVectorOp(Node->getOperand(0), NewVT); - } else { - // Otherwise, return a VECTOR_SHUFFLE node. First convert the index - // vector from a VBUILD_VECTOR to a BUILD_VECTOR. - std::vector BuildVecIdx(Node->getOperand(2).Val->op_begin(), - Node->getOperand(2).Val->op_end()-2); - MVT::ValueType BVT = MVT::getIntVectorWithNumElements(BuildVecIdx.size()); - SDOperand BV = DAG.getNode(ISD::BUILD_VECTOR, BVT, - Node->getOperand(2).Val->op_begin(), - Node->getOperand(2).Val->getNumOperands()-2); - - Result = DAG.getNode(ISD::VECTOR_SHUFFLE, NewVT, - PackVectorOp(Node->getOperand(0), NewVT), - PackVectorOp(Node->getOperand(1), NewVT), BV); - } - break; - case ISD::VBIT_CONVERT: - if (Op.getOperand(0).getValueType() != MVT::Vector) - Result = DAG.getNode(ISD::BIT_CONVERT, NewVT, Op.getOperand(0)); - else { - // If the input is a vector type, we have to either scalarize it, pack it - // or convert it based on whether the input vector type is legal. - SDNode *InVal = Node->getOperand(0).Val; - unsigned NumElems = - cast(*(InVal->op_end()-2))->getValue(); - MVT::ValueType EVT = cast(*(InVal->op_end()-1))->getVT(); - - // Figure out if there is a Packed type corresponding to this Vector - // type. If so, convert to the vector type. - MVT::ValueType TVT = MVT::getVectorType(EVT, NumElems); - if (TVT != MVT::Other && TLI.isTypeLegal(TVT)) { - // Turn this into a bit convert of the packed input. - Result = DAG.getNode(ISD::BIT_CONVERT, NewVT, - PackVectorOp(Node->getOperand(0), TVT)); - break; - } else if (NumElems == 1) { - // Turn this into a bit convert of the scalar input. - Result = DAG.getNode(ISD::BIT_CONVERT, NewVT, - PackVectorOp(Node->getOperand(0), EVT)); - break; - } else { - // If the input vector type isn't legal, then go through memory. - SDOperand Ptr = CreateStackTemporary(NewVT); - // Get the alignment for the store. - const TargetData &TD = *TLI.getTargetData(); - unsigned Align = - TD.getABITypeAlignment(MVT::getTypeForValueType(NewVT)); - - SDOperand St = DAG.getStore(DAG.getEntryNode(), - Node->getOperand(0), Ptr, NULL, 0, false, - Align); - Result = DAG.getLoad(NewVT, St, Ptr, 0, 0); - break; - } - } + case ISD::BIT_CONVERT: + Result = DAG.getNode(ISD::BIT_CONVERT, NewVT, Op.getOperand(0)); break; - case ISD::VSELECT: + case ISD::SELECT: Result = DAG.getNode(ISD::SELECT, NewVT, Op.getOperand(0), - PackVectorOp(Op.getOperand(1), NewVT), - PackVectorOp(Op.getOperand(2), NewVT)); + ScalarizeVectorOp(Op.getOperand(1)), + ScalarizeVectorOp(Op.getOperand(2))); break; } if (TLI.isTypeLegal(NewVT)) Result = LegalizeOp(Result); - bool isNew = PackedNodes.insert(std::make_pair(Op, Result)).second; - assert(isNew && "Value already packed?"); + bool isNew = ScalarizedNodes.insert(std::make_pair(Op, Result)).second; + assert(isNew && "Value already scalarized?"); return Result; } Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.409 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.410 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.409 Fri Jun 22 09:59:07 2007 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Mon Jun 25 11:23:39 2007 @@ -673,7 +673,9 @@ SDOperand SelectionDAG::getConstantFP(double Val, MVT::ValueType VT, bool isTarget) { assert(MVT::isFloatingPoint(VT) && "Cannot create integer FP constant!"); - if (VT == MVT::f32) + MVT::ValueType EltVT = + MVT::isVector(VT) ? MVT::getVectorElementType(VT) : VT; + if (EltVT == MVT::f32) Val = (float)Val; // Mask out extra precision. // Do the map lookup using the actual bit pattern for the floating point @@ -681,15 +683,21 @@ // we don't have issues with SNANs. unsigned Opc = isTarget ? ISD::TargetConstantFP : ISD::ConstantFP; FoldingSetNodeID ID; - AddNodeIDNode(ID, Opc, getVTList(VT), 0, 0); + AddNodeIDNode(ID, Opc, getVTList(EltVT), 0, 0); ID.AddDouble(Val); void *IP = 0; if (SDNode *E = CSEMap.FindNodeOrInsertPos(ID, IP)) return SDOperand(E, 0); - SDNode *N = new ConstantFPSDNode(isTarget, Val, VT); + SDNode *N = new ConstantFPSDNode(isTarget, Val, EltVT); CSEMap.InsertNode(N, IP); AllNodes.push_back(N); - return SDOperand(N, 0); + SDOperand Result(N, 0); + if (MVT::isVector(VT)) { + SmallVector Ops; + Ops.assign(MVT::getVectorNumElements(VT), Result); + Result = getNode(ISD::BUILD_VECTOR, VT, &Ops[0], Ops.size()); + } + return Result; } SDOperand SelectionDAG::getGlobalAddress(const GlobalValue *GV, @@ -1952,6 +1960,23 @@ if (EVT == VT) return N1; // Not actually extending break; } + case ISD::EXTRACT_VECTOR_ELT: + assert(N2C && "Bad EXTRACT_VECTOR_ELT!"); + + // EXTRACT_VECTOR_ELT of BUILD_PAIR is often formed while lowering is + // expanding copies of large vectors from registers. + if (N1.getOpcode() == ISD::BUILD_PAIR) { + unsigned NewNumElts = MVT::getVectorNumElements(N1.getValueType()) / 2; + bool Low = N2C->getValue() < NewNumElts; + return getNode(ISD::EXTRACT_VECTOR_ELT, VT, N1.getOperand(!Low), + Low ? N2 : getConstant(N2C->getValue() - NewNumElts, + N2.getValueType())); + } + // EXTRACT_VECTOR_ELT of BUILD_VECTOR is often formed while lowering is + // expanding large vector constants. + if (N1.getOpcode() == ISD::BUILD_VECTOR) + return N1.getOperand(N2C->getValue()); + break; case ISD::EXTRACT_ELEMENT: assert(N2C && (unsigned)N2C->getValue() < 2 && "Bad EXTRACT_ELEMENT!"); @@ -2045,14 +2070,10 @@ MVT::getVectorNumElements(VT) == N3.getNumOperands() && "Illegal VECTOR_SHUFFLE node!"); break; - case ISD::VBIT_CONVERT: - // Fold vbit_convert nodes from a type to themselves. - if (N1.getValueType() == MVT::Vector) { - assert(isa(*(N1.Val->op_end()-2)) && - isa(*(N1.Val->op_end()-1)) && "Malformed vector input!"); - if (*(N1.Val->op_end()-2) == N2 && *(N1.Val->op_end()-1) == N3) - return N1; - } + case ISD::BIT_CONVERT: + // Fold bit_convert nodes from a type to themselves. + if (N1.getValueType() == VT) + return N1; break; } @@ -2095,7 +2116,7 @@ bool isVolatile, unsigned Alignment) { if (Alignment == 0) { // Ensure that codegen never sees alignment 0 const Type *Ty = 0; - if (VT != MVT::Vector && VT != MVT::iPTR) { + if (VT != MVT::iPTR) { Ty = MVT::getTypeForValueType(VT); } else if (SV) { const PointerType *PT = dyn_cast(SV->getType()); @@ -2149,7 +2170,7 @@ if (Alignment == 0) { // Ensure that codegen never sees alignment 0 const Type *Ty = 0; - if (VT != MVT::Vector && VT != MVT::iPTR) { + if (VT != MVT::iPTR) { Ty = MVT::getTypeForValueType(VT); } else if (SV) { const PointerType *PT = dyn_cast(SV->getType()); @@ -2211,14 +2232,6 @@ return SDOperand(N, 0); } -SDOperand SelectionDAG::getVecLoad(unsigned Count, MVT::ValueType EVT, - SDOperand Chain, SDOperand Ptr, - SDOperand SV) { - SDOperand Ops[] = { Chain, Ptr, SV, getConstant(Count, MVT::i32), - getValueType(EVT) }; - return getNode(ISD::VLOAD, getVTList(MVT::Vector, MVT::Other), Ops, 5); -} - SDOperand SelectionDAG::getStore(SDOperand Chain, SDOperand Val, SDOperand Ptr, const Value *SV, int SVOffset, bool isVolatile, unsigned Alignment) { @@ -2226,7 +2239,7 @@ if (Alignment == 0) { // Ensure that codegen never sees alignment 0 const Type *Ty = 0; - if (VT != MVT::Vector && VT != MVT::iPTR) { + if (VT != MVT::iPTR) { Ty = MVT::getTypeForValueType(VT); } else if (SV) { const PointerType *PT = dyn_cast(SV->getType()); @@ -2271,7 +2284,7 @@ if (Alignment == 0) { // Ensure that codegen never sees alignment 0 const Type *Ty = 0; - if (VT != MVT::Vector && VT != MVT::iPTR) { + if (VT != MVT::iPTR) { Ty = MVT::getTypeForValueType(VT); } else if (SV) { const PointerType *PT = dyn_cast(SV->getType()); @@ -2462,7 +2475,18 @@ } SDVTList SelectionDAG::getVTList(MVT::ValueType VT) { - return makeVTList(SDNode::getValueTypeList(VT), 1); + if (!MVT::isExtendedValueType(VT)) + return makeVTList(SDNode::getValueTypeList(VT), 1); + + for (std::list >::iterator I = VTList.begin(), + E = VTList.end(); I != E; ++I) { + if (I->size() == 1 && (*I)[0] == VT) + return makeVTList(&(*I)[0], 1); + } + std::vector V; + V.push_back(VT); + VTList.push_front(V); + return makeVTList(&(*VTList.begin())[0], 1); } SDVTList SelectionDAG::getVTList(MVT::ValueType VT1, MVT::ValueType VT2) { @@ -2496,7 +2520,7 @@ SDVTList SelectionDAG::getVTList(const MVT::ValueType *VTs, unsigned NumVTs) { switch (NumVTs) { case 0: assert(0 && "Cannot have nodes without results!"); - case 1: return makeVTList(SDNode::getValueTypeList(VTs[0]), 1); + case 1: return getVTList(VTs[0]); case 2: return getVTList(VTs[0], VTs[1]); case 3: return getVTList(VTs[0], VTs[1], VTs[2]); default: break; @@ -3394,30 +3418,16 @@ case ISD::FDIV: return "fdiv"; case ISD::FREM: return "frem"; case ISD::FCOPYSIGN: return "fcopysign"; - case ISD::VADD: return "vadd"; - case ISD::VSUB: return "vsub"; - case ISD::VMUL: return "vmul"; - case ISD::VSDIV: return "vsdiv"; - case ISD::VUDIV: return "vudiv"; - case ISD::VAND: return "vand"; - case ISD::VOR: return "vor"; - case ISD::VXOR: return "vxor"; case ISD::SETCC: return "setcc"; case ISD::SELECT: return "select"; case ISD::SELECT_CC: return "select_cc"; - case ISD::VSELECT: return "vselect"; case ISD::INSERT_VECTOR_ELT: return "insert_vector_elt"; - case ISD::VINSERT_VECTOR_ELT: return "vinsert_vector_elt"; case ISD::EXTRACT_VECTOR_ELT: return "extract_vector_elt"; - case ISD::VEXTRACT_VECTOR_ELT: return "vextract_vector_elt"; - case ISD::VCONCAT_VECTORS: return "vconcat_vectors"; - case ISD::VEXTRACT_SUBVECTOR: return "vextract_subvector"; + case ISD::CONCAT_VECTORS: return "concat_vectors"; + case ISD::EXTRACT_SUBVECTOR: return "extract_subvector"; case ISD::SCALAR_TO_VECTOR: return "scalar_to_vector"; - case ISD::VBUILD_VECTOR: return "vbuild_vector"; case ISD::VECTOR_SHUFFLE: return "vector_shuffle"; - case ISD::VVECTOR_SHUFFLE: return "vvector_shuffle"; - case ISD::VBIT_CONVERT: return "vbit_convert"; case ISD::CARRY_FALSE: return "carry_false"; case ISD::ADDC: return "addc"; case ISD::ADDE: return "adde"; @@ -3456,7 +3466,6 @@ // Other operators case ISD::LOAD: return "load"; case ISD::STORE: return "store"; - case ISD::VLOAD: return "vload"; case ISD::VAARG: return "vaarg"; case ISD::VACOPY: return "vacopy"; case ISD::VAEND: return "vaend"; Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.468 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.469 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.468 Fri Jun 22 09:59:07 2007 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Mon Jun 25 11:23:39 2007 @@ -290,15 +290,7 @@ if (PN->use_empty()) continue; MVT::ValueType VT = TLI.getValueType(PN->getType()); - unsigned NumRegisters; - if (VT != MVT::Vector) - NumRegisters = TLI.getNumRegisters(VT); - else { - MVT::ValueType VT1,VT2; - NumRegisters = - TLI.getVectorTypeBreakdown(cast(PN->getType()), - VT1, VT2); - } + unsigned NumRegisters = TLI.getNumRegisters(VT); unsigned PHIReg = ValueMap[PN]; assert(PHIReg && "PHI node does not have an assigned virtual register!"); const TargetInstrInfo *TII = TLI.getTargetMachine().getInstrInfo(); @@ -320,7 +312,7 @@ // If this is a vector type, figure out what type it will decompose into // and how many of the elements it will use. - if (VT == MVT::Vector) { + if (MVT::isVector(VT)) { const VectorType *PTy = cast(V->getType()); unsigned NumElts = PTy->getNumElements(); MVT::ValueType EltTy = TLI.getValueType(PTy->getElementType()); @@ -582,36 +574,30 @@ void visitInvoke(InvokeInst &I); void visitUnwind(UnwindInst &I); - void visitScalarBinary(User &I, unsigned OpCode); - void visitVectorBinary(User &I, unsigned OpCode); - void visitEitherBinary(User &I, unsigned ScalarOp, unsigned VectorOp); + void visitBinary(User &I, unsigned OpCode); void visitShift(User &I, unsigned Opcode); void visitAdd(User &I) { - if (isa(I.getType())) - visitVectorBinary(I, ISD::VADD); - else if (I.getType()->isFloatingPoint()) - visitScalarBinary(I, ISD::FADD); + if (I.getType()->isFPOrFPVector()) + visitBinary(I, ISD::FADD); else - visitScalarBinary(I, ISD::ADD); + visitBinary(I, ISD::ADD); } void visitSub(User &I); void visitMul(User &I) { - if (isa(I.getType())) - visitVectorBinary(I, ISD::VMUL); - else if (I.getType()->isFloatingPoint()) - visitScalarBinary(I, ISD::FMUL); + if (I.getType()->isFPOrFPVector()) + visitBinary(I, ISD::FMUL); else - visitScalarBinary(I, ISD::MUL); + visitBinary(I, ISD::MUL); } - void visitURem(User &I) { visitScalarBinary(I, ISD::UREM); } - void visitSRem(User &I) { visitScalarBinary(I, ISD::SREM); } - void visitFRem(User &I) { visitScalarBinary(I, ISD::FREM); } - void visitUDiv(User &I) { visitEitherBinary(I, ISD::UDIV, ISD::VUDIV); } - void visitSDiv(User &I) { visitEitherBinary(I, ISD::SDIV, ISD::VSDIV); } - void visitFDiv(User &I) { visitEitherBinary(I, ISD::FDIV, ISD::VSDIV); } - void visitAnd (User &I) { visitEitherBinary(I, ISD::AND, ISD::VAND ); } - void visitOr (User &I) { visitEitherBinary(I, ISD::OR, ISD::VOR ); } - void visitXor (User &I) { visitEitherBinary(I, ISD::XOR, ISD::VXOR ); } + void visitURem(User &I) { visitBinary(I, ISD::UREM); } + void visitSRem(User &I) { visitBinary(I, ISD::SREM); } + void visitFRem(User &I) { visitBinary(I, ISD::FREM); } + void visitUDiv(User &I) { visitBinary(I, ISD::UDIV); } + void visitSDiv(User &I) { visitBinary(I, ISD::SDIV); } + void visitFDiv(User &I) { visitBinary(I, ISD::FDIV); } + void visitAnd (User &I) { visitBinary(I, ISD::AND); } + void visitOr (User &I) { visitBinary(I, ISD::OR); } + void visitXor (User &I) { visitBinary(I, ISD::XOR); } void visitShl (User &I) { visitShift(I, ISD::SHL); } void visitLShr(User &I) { visitShift(I, ISD::SRL); } void visitAShr(User &I) { visitShift(I, ISD::SRA); } @@ -687,7 +673,7 @@ if (!isa(VTy)) return N = DAG.getNode(ISD::UNDEF, VT); - // Create a VBUILD_VECTOR of undef nodes. + // Create a BUILD_VECTOR of undef nodes. const VectorType *PTy = cast(VTy); unsigned NumElements = PTy->getNumElements(); MVT::ValueType PVT = TLI.getValueType(PTy->getElementType()); @@ -696,9 +682,8 @@ Ops.assign(NumElements, DAG.getNode(ISD::UNDEF, PVT)); // Create a VConstant node with generic Vector type. - Ops.push_back(DAG.getConstant(NumElements, MVT::i32)); - Ops.push_back(DAG.getValueType(PVT)); - return N = DAG.getNode(ISD::VBUILD_VECTOR, MVT::Vector, + MVT::ValueType VT = MVT::getVectorType(PVT, NumElements); + return N = DAG.getNode(ISD::BUILD_VECTOR, VT, &Ops[0], Ops.size()); } else if (ConstantFP *CFP = dyn_cast(C)) { return N = DAG.getConstantFP(CFP->getValue(), VT); @@ -723,10 +708,9 @@ Ops.assign(NumElements, Op); } - // Create a VBUILD_VECTOR node with generic Vector type. - Ops.push_back(DAG.getConstant(NumElements, MVT::i32)); - Ops.push_back(DAG.getValueType(PVT)); - return NodeMap[V] = DAG.getNode(ISD::VBUILD_VECTOR, MVT::Vector, &Ops[0], + // Create a BUILD_VECTOR node. + MVT::ValueType VT = MVT::getVectorType(PVT, NumElements); + return NodeMap[V] = DAG.getNode(ISD::BUILD_VECTOR, VT, &Ops[0], Ops.size()); } else { // Canonicalize all constant ints to be unsigned. @@ -745,7 +729,7 @@ assert(InReg && "Value not in map!"); // If this type is not legal, make it so now. - if (VT != MVT::Vector) { + if (!MVT::isVector(VT)) { if (TLI.getTypeAction(VT) == TargetLowering::Expand) { // Source must be expanded. This input value is actually coming from the // register pair InReg and InReg+1. @@ -757,7 +741,7 @@ else { assert(NumVals == 2 && "1 to 4 (and more) expansion not implemented!"); N = DAG.getNode(ISD::BUILD_PAIR, VT, N, - DAG.getCopyFromReg(DAG.getEntryNode(), InReg+1, DestVT)); + DAG.getCopyFromReg(DAG.getEntryNode(), InReg+1, DestVT)); } } else { MVT::ValueType DestVT = TLI.getTypeToTransformTo(VT); @@ -768,29 +752,28 @@ : DAG.getNode(ISD::TRUNCATE, VT, N); } } else { - // Otherwise, if this is a vector, make it available as a generic vector + // Otherwise, if this is a vector, make it available as a vector // here. - MVT::ValueType PTyElementVT, PTyLegalElementVT; - const VectorType *PTy = cast(VTy); - unsigned NE = TLI.getVectorTypeBreakdown(PTy, PTyElementVT, - PTyLegalElementVT); + MVT::ValueType ElementVT, LegalElementVT; + unsigned NE = TLI.getVectorTypeBreakdown(VT, ElementVT, + LegalElementVT); - // Build a VBUILD_VECTOR or VCONCAT_VECTORS with the input registers. + // Build a BUILD_VECTOR or CONCAT_VECTORS with the input registers. SmallVector Ops; - if (PTyElementVT == PTyLegalElementVT) { - // If the value types are legal, just VBUILD the CopyFromReg nodes. + if (ElementVT == LegalElementVT) { + // If the value types are legal, just BUILD the CopyFromReg nodes. for (unsigned i = 0; i != NE; ++i) Ops.push_back(DAG.getCopyFromReg(DAG.getEntryNode(), InReg++, - PTyElementVT)); - } else if (PTyElementVT < PTyLegalElementVT) { + ElementVT)); + } else if (ElementVT < LegalElementVT) { // If the register was promoted, use TRUNCATE or FP_ROUND as appropriate. for (unsigned i = 0; i != NE; ++i) { SDOperand Op = DAG.getCopyFromReg(DAG.getEntryNode(), InReg++, - PTyLegalElementVT); - if (MVT::isFloatingPoint(PTyElementVT)) - Op = DAG.getNode(ISD::FP_ROUND, PTyElementVT, Op); + LegalElementVT); + if (MVT::isFloatingPoint(ElementVT)) + Op = DAG.getNode(ISD::FP_ROUND, ElementVT, Op); else - Op = DAG.getNode(ISD::TRUNCATE, PTyElementVT, Op); + Op = DAG.getNode(ISD::TRUNCATE, ElementVT, Op); Ops.push_back(Op); } } else { @@ -798,21 +781,22 @@ assert((NE & 1) == 0 && "Must expand into a multiple of 2 elements!"); for (unsigned i = 0; i != NE; ++i) { SDOperand Op0 = DAG.getCopyFromReg(DAG.getEntryNode(), InReg++, - PTyLegalElementVT); + LegalElementVT); SDOperand Op1 = DAG.getCopyFromReg(DAG.getEntryNode(), InReg++, - PTyLegalElementVT); - Ops.push_back(DAG.getNode(ISD::BUILD_PAIR, PTyElementVT, Op0, Op1)); + LegalElementVT); + Ops.push_back(DAG.getNode(ISD::BUILD_PAIR, ElementVT, Op0, Op1)); } } - if (MVT::isVector(PTyElementVT)) { - Ops.push_back(DAG.getConstant(NE * MVT::getVectorNumElements(PTyElementVT), MVT::i32)); - Ops.push_back(DAG.getValueType(MVT::getVectorElementType(PTyElementVT))); - N = DAG.getNode(ISD::VCONCAT_VECTORS, MVT::Vector, &Ops[0], Ops.size()); + if (MVT::isVector(ElementVT)) { + N = DAG.getNode(ISD::CONCAT_VECTORS, + MVT::getVectorType(MVT::getVectorElementType(ElementVT), + NE * MVT::getVectorNumElements(ElementVT)), + &Ops[0], Ops.size()); } else { - Ops.push_back(DAG.getConstant(NE, MVT::i32)); - Ops.push_back(DAG.getValueType(PTyElementVT)); - N = DAG.getNode(ISD::VBUILD_VECTOR, MVT::Vector, &Ops[0], Ops.size()); + N = DAG.getNode(ISD::BUILD_VECTOR, + MVT::getVectorType(ElementVT, NE), + &Ops[0], Ops.size()); } } @@ -1220,7 +1204,7 @@ // register so it can be used as an index into the jump table in a // subsequent basic block. This value may be smaller or larger than the // target's pointer type, and therefore require extension or truncating. - if (VT > TLI.getPointerTy()) + if (MVT::getSizeInBits(VT) > MVT::getSizeInBits(TLI.getPointerTy())) SwitchOp = DAG.getNode(ISD::TRUNCATE, TLI.getPointerTy(), SUB); else SwitchOp = DAG.getNode(ISD::ZERO_EXTEND, TLI.getPointerTy(), SUB); @@ -1270,7 +1254,7 @@ ISD::SETUGT); SDOperand ShiftOp; - if (VT > TLI.getShiftAmountTy()) + if (MVT::getSizeInBits(VT) > MVT::getSizeInBits(TLI.getShiftAmountTy())) ShiftOp = DAG.getNode(ISD::TRUNCATE, TLI.getShiftAmountTy(), SUB); else ShiftOp = DAG.getNode(ISD::ZERO_EXTEND, TLI.getShiftAmountTy(), SUB); @@ -1910,52 +1894,44 @@ // -0.0 - X --> fneg const Type *Ty = I.getType(); if (isa(Ty)) { - visitVectorBinary(I, ISD::VSUB); - } else if (Ty->isFloatingPoint()) { + if (ConstantVector *CV = dyn_cast(I.getOperand(0))) { + const VectorType *DestTy = cast(I.getType()); + const Type *ElTy = DestTy->getElementType(); + unsigned VL = DestTy->getNumElements(); + std::vector NZ(VL, ConstantFP::get(ElTy, -0.0)); + Constant *CNZ = ConstantVector::get(&NZ[0], NZ.size()); + if (CV == CNZ) { + SDOperand Op2 = getValue(I.getOperand(1)); + setValue(&I, DAG.getNode(ISD::FNEG, Op2.getValueType(), Op2)); + return; + } + } + } + if (Ty->isFloatingPoint()) { if (ConstantFP *CFP = dyn_cast(I.getOperand(0))) if (CFP->isExactlyValue(-0.0)) { SDOperand Op2 = getValue(I.getOperand(1)); setValue(&I, DAG.getNode(ISD::FNEG, Op2.getValueType(), Op2)); return; } - visitScalarBinary(I, ISD::FSUB); - } else - visitScalarBinary(I, ISD::SUB); + } + + visitBinary(I, Ty->isFPOrFPVector() ? ISD::FSUB : ISD::SUB); } -void SelectionDAGLowering::visitScalarBinary(User &I, unsigned OpCode) { +void SelectionDAGLowering::visitBinary(User &I, unsigned OpCode) { SDOperand Op1 = getValue(I.getOperand(0)); SDOperand Op2 = getValue(I.getOperand(1)); setValue(&I, DAG.getNode(OpCode, Op1.getValueType(), Op1, Op2)); } -void -SelectionDAGLowering::visitVectorBinary(User &I, unsigned OpCode) { - assert(isa(I.getType())); - const VectorType *Ty = cast(I.getType()); - SDOperand Typ = DAG.getValueType(TLI.getValueType(Ty->getElementType())); - - setValue(&I, DAG.getNode(OpCode, MVT::Vector, - getValue(I.getOperand(0)), - getValue(I.getOperand(1)), - DAG.getConstant(Ty->getNumElements(), MVT::i32), - Typ)); -} - -void SelectionDAGLowering::visitEitherBinary(User &I, unsigned ScalarOp, - unsigned VectorOp) { - if (isa(I.getType())) - visitVectorBinary(I, VectorOp); - else - visitScalarBinary(I, ScalarOp); -} - void SelectionDAGLowering::visitShift(User &I, unsigned Opcode) { SDOperand Op1 = getValue(I.getOperand(0)); SDOperand Op2 = getValue(I.getOperand(1)); - if (TLI.getShiftAmountTy() < Op2.getValueType()) + if (MVT::getSizeInBits(TLI.getShiftAmountTy()) < + MVT::getSizeInBits(Op2.getValueType())) Op2 = DAG.getNode(ISD::TRUNCATE, TLI.getShiftAmountTy(), Op2); else if (TLI.getShiftAmountTy() > Op2.getValueType()) Op2 = DAG.getNode(ISD::ANY_EXTEND, TLI.getShiftAmountTy(), Op2); @@ -2033,14 +2009,8 @@ SDOperand Cond = getValue(I.getOperand(0)); SDOperand TrueVal = getValue(I.getOperand(1)); SDOperand FalseVal = getValue(I.getOperand(2)); - if (!isa(I.getType())) { - setValue(&I, DAG.getNode(ISD::SELECT, TrueVal.getValueType(), Cond, - TrueVal, FalseVal)); - } else { - setValue(&I, DAG.getNode(ISD::VSELECT, MVT::Vector, Cond, TrueVal, FalseVal, - *(TrueVal.Val->op_end()-2), - *(TrueVal.Val->op_end()-1))); - } + setValue(&I, DAG.getNode(ISD::SELECT, TrueVal.getValueType(), Cond, + TrueVal, FalseVal)); } @@ -2140,23 +2110,6 @@ void SelectionDAGLowering::visitBitCast(User &I) { SDOperand N = getValue(I.getOperand(0)); MVT::ValueType DestVT = TLI.getValueType(I.getType()); - if (DestVT == MVT::Vector) { - // This is a cast to a vector from something else. - // Get information about the output vector. - const VectorType *DestTy = cast(I.getType()); - MVT::ValueType EltVT = TLI.getValueType(DestTy->getElementType()); - setValue(&I, DAG.getNode(ISD::VBIT_CONVERT, DestVT, N, - DAG.getConstant(DestTy->getNumElements(),MVT::i32), - DAG.getValueType(EltVT))); - return; - } - MVT::ValueType SrcVT = N.getValueType(); - if (SrcVT == MVT::Vector) { - // This is a cast from a vctor to something else. - // Get information about the input vector. - setValue(&I, DAG.getNode(ISD::VBIT_CONVERT, DestVT, N)); - return; - } // BitCast assures us that source and destination are the same size so this // is either a BIT_CONVERT or a no-op. @@ -2172,18 +2125,16 @@ SDOperand InIdx = DAG.getNode(ISD::ZERO_EXTEND, TLI.getPointerTy(), getValue(I.getOperand(2))); - SDOperand Num = *(InVec.Val->op_end()-2); - SDOperand Typ = *(InVec.Val->op_end()-1); - setValue(&I, DAG.getNode(ISD::VINSERT_VECTOR_ELT, MVT::Vector, - InVec, InVal, InIdx, Num, Typ)); + setValue(&I, DAG.getNode(ISD::INSERT_VECTOR_ELT, + TLI.getValueType(I.getType()), + InVec, InVal, InIdx)); } void SelectionDAGLowering::visitExtractElement(User &I) { SDOperand InVec = getValue(I.getOperand(0)); SDOperand InIdx = DAG.getNode(ISD::ZERO_EXTEND, TLI.getPointerTy(), getValue(I.getOperand(1))); - SDOperand Typ = *(InVec.Val->op_end()-1); - setValue(&I, DAG.getNode(ISD::VEXTRACT_VECTOR_ELT, + setValue(&I, DAG.getNode(ISD::EXTRACT_VECTOR_ELT, TLI.getValueType(I.getType()), InVec, InIdx)); } @@ -2192,10 +2143,9 @@ SDOperand V2 = getValue(I.getOperand(1)); SDOperand Mask = getValue(I.getOperand(2)); - SDOperand Num = *(V1.Val->op_end()-2); - SDOperand Typ = *(V2.Val->op_end()-1); - setValue(&I, DAG.getNode(ISD::VVECTOR_SHUFFLE, MVT::Vector, - V1, V2, Mask, Num, Typ)); + setValue(&I, DAG.getNode(ISD::VECTOR_SHUFFLE, + TLI.getValueType(I.getType()), + V1, V2, Mask)); } @@ -2325,15 +2275,9 @@ const Value *SV, SDOperand Root, bool isVolatile, unsigned Alignment) { - SDOperand L; - if (const VectorType *PTy = dyn_cast(Ty)) { - MVT::ValueType PVT = TLI.getValueType(PTy->getElementType()); - L = DAG.getVecLoad(PTy->getNumElements(), PVT, Root, Ptr, - DAG.getSrcValue(SV)); - } else { - L = DAG.getLoad(TLI.getValueType(Ty), Root, Ptr, SV, 0, - isVolatile, Alignment); - } + SDOperand L = + DAG.getLoad(TLI.getValueType(Ty), Root, Ptr, SV, 0, + isVolatile, Alignment); if (isVolatile) DAG.setRoot(L.getValue(1)); @@ -2394,17 +2338,6 @@ // Add all operands of the call to the operand list. for (unsigned i = 1, e = I.getNumOperands(); i != e; ++i) { SDOperand Op = getValue(I.getOperand(i)); - - // If this is a vector type, force it to the right vector type. - if (Op.getValueType() == MVT::Vector) { - const VectorType *OpTy = cast(I.getOperand(i)->getType()); - MVT::ValueType EltVT = TLI.getValueType(OpTy->getElementType()); - - MVT::ValueType VVT = MVT::getVectorType(EltVT, OpTy->getNumElements()); - assert(VVT != MVT::Other && "Intrinsic uses a non-legal type?"); - Op = DAG.getNode(ISD::VBIT_CONVERT, VVT, Op); - } - assert(TLI.isTypeLegal(Op.getValueType()) && "Intrinsic uses a non-legal type?"); Ops.push_back(Op); @@ -2413,7 +2346,7 @@ std::vector VTs; if (I.getType() != Type::VoidTy) { MVT::ValueType VT = TLI.getValueType(I.getType()); - if (VT == MVT::Vector) { + if (MVT::isVector(VT)) { const VectorType *DestTy = cast(I.getType()); MVT::ValueType EltVT = TLI.getValueType(DestTy->getElementType()); @@ -2450,10 +2383,8 @@ } if (I.getType() != Type::VoidTy) { if (const VectorType *PTy = dyn_cast(I.getType())) { - MVT::ValueType EVT = TLI.getValueType(PTy->getElementType()); - Result = DAG.getNode(ISD::VBIT_CONVERT, MVT::Vector, Result, - DAG.getConstant(PTy->getNumElements(), MVT::i32), - DAG.getValueType(EVT)); + MVT::ValueType VT = TLI.getValueType(PTy); + Result = DAG.getNode(ISD::BIT_CONVERT, VT, Result); } setValue(&I, Result); } @@ -2931,11 +2862,8 @@ return Val; if (MVT::isVector(RegVT)) { - assert(ValueVT == MVT::Vector && "Unknown vector conversion!"); - return DAG.getNode(ISD::VBIT_CONVERT, MVT::Vector, Val, - DAG.getConstant(MVT::getVectorNumElements(RegVT), - MVT::i32), - DAG.getValueType(MVT::getVectorElementType(RegVT))); + assert(MVT::isVector(ValueVT) && "Unknown vector conversion!"); + return DAG.getNode(ISD::BIT_CONVERT, RegVT, Val); } if (MVT::isInteger(RegVT)) { @@ -2960,8 +2888,9 @@ // a promotion. if (RegVT != ValueVT) { if (MVT::isVector(RegVT)) { - assert(Val.getValueType() == MVT::Vector &&"Not a vector-vector cast?"); - Val = DAG.getNode(ISD::VBIT_CONVERT, RegVT, Val); + assert(MVT::isVector(Val.getValueType()) && + "Not a vector-vector cast?"); + Val = DAG.getNode(ISD::BIT_CONVERT, RegVT, Val); } else if (MVT::isInteger(RegVT) && MVT::isInteger(Val.getValueType())) { if (RegVT < ValueVT) Val = DAG.getNode(ISD::TRUNCATE, RegVT, Val); @@ -3631,15 +3560,12 @@ // If the result of the inline asm is a vector, it may have the wrong // width/num elts. Make sure to convert it to the right type with - // vbit_convert. - if (Val.getValueType() == MVT::Vector) { + // bit_convert. + if (MVT::isVector(Val.getValueType())) { const VectorType *VTy = cast(I.getType()); - unsigned DesiredNumElts = VTy->getNumElements(); - MVT::ValueType DesiredEltVT = TLI.getValueType(VTy->getElementType()); + MVT::ValueType DesiredVT = TLI.getValueType(VTy); - Val = DAG.getNode(ISD::VBIT_CONVERT, MVT::Vector, Val, - DAG.getConstant(DesiredNumElts, MVT::i32), - DAG.getValueType(DesiredEltVT)); + Val = DAG.getNode(ISD::BIT_CONVERT, DesiredVT, Val); } setValue(&I, Val); @@ -3826,7 +3752,7 @@ Ops.push_back(DAG.getConstant(Flags, MVT::i32)); break; case Expand: - if (VT != MVT::Vector) { + if (!MVT::isVector(VT)) { // If this is a large integer, it needs to be broken up into small // integers. Figure out what the destination type is and how many small // integers it turns into. @@ -3848,7 +3774,8 @@ // Figure out if there is a Packed type corresponding to this Vector // type. If so, convert to the vector type. - MVT::ValueType TVT = MVT::getVectorType(getValueType(EltTy), NumElems); + MVT::ValueType TVT = + MVT::getVectorType(getValueType(EltTy), NumElems); if (TVT != MVT::Other && isTypeLegal(TVT)) { RetVals.push_back(TVT); Ops.push_back(DAG.getConstant(Flags, MVT::i32)); @@ -3900,7 +3827,7 @@ break; } case Expand: - if (VT != MVT::Vector) { + if (!MVT::isVector(VT)) { // If this is a large integer or a floating point node that needs to be // expanded, it needs to be reassembled from small integers. Figure out // what the source elt type is and how many small integers it is. @@ -3914,13 +3841,12 @@ // Figure out if there is a Packed type corresponding to this Vector // type. If so, convert to the vector type. - MVT::ValueType TVT = MVT::getVectorType(getValueType(EltTy), NumElems); + MVT::ValueType TVT = + MVT::getVectorType(getValueType(EltTy), NumElems); if (TVT != MVT::Other && isTypeLegal(TVT)) { SDOperand N = SDOperand(Result, i++); - // Handle copies from generic vectors to registers. - N = DAG.getNode(ISD::VBIT_CONVERT, MVT::Vector, N, - DAG.getConstant(NumElems, MVT::i32), - DAG.getValueType(getValueType(EltTy))); + // Handle copies from vectors to registers. + N = DAG.getNode(ISD::BIT_CONVERT, TVT, N); Ops.push_back(N); } else { assert(0 && "Don't support illegal by-val vector arguments yet!"); @@ -4040,7 +3966,7 @@ Ops.push_back(DAG.getConstant(Flags, MVT::i32)); break; case Expand: - if (VT != MVT::Vector) { + if (!MVT::isVector(VT)) { // If this is a large integer, it needs to be broken down into small // integers. Figure out what the source elt type is and how many small // integers it is. @@ -4054,10 +3980,11 @@ // Figure out if there is a Packed type corresponding to this Vector // type. If so, convert to the vector type. - MVT::ValueType TVT = MVT::getVectorType(getValueType(EltTy), NumElems); + MVT::ValueType TVT = + MVT::getVectorType(getValueType(EltTy), NumElems); if (TVT != MVT::Other && isTypeLegal(TVT)) { - // Insert a VBIT_CONVERT of the MVT::Vector type to the vector type. - Op = DAG.getNode(ISD::VBIT_CONVERT, TVT, Op); + // Insert a BIT_CONVERT of the original type to the vector type. + Op = DAG.getNode(ISD::BIT_CONVERT, TVT, Op); Ops.push_back(Op); Ops.push_back(DAG.getConstant(Flags, MVT::i32)); } else { @@ -4083,7 +4010,7 @@ RetTys.push_back(getTypeToTransformTo(VT)); break; case Expand: - if (VT != MVT::Vector) { + if (!MVT::isVector(VT)) { // If this is a large integer, it needs to be reassembled from small // integers. Figure out what the source elt type is and how many small // integers it is. @@ -4100,7 +4027,8 @@ // Figure out if there is a Packed type corresponding to this Vector // type. If so, convert to the vector type. - MVT::ValueType TVT = MVT::getVectorType(getValueType(EltTy), NumElems); + MVT::ValueType TVT = + MVT::getVectorType(getValueType(EltTy), NumElems); if (TVT != MVT::Other && isTypeLegal(TVT)) { RetTys.push_back(TVT); } else { @@ -4129,21 +4057,20 @@ // If this value was promoted, truncate it down. if (ResVal.getValueType() != VT) { - if (VT == MVT::Vector) { - // Insert a VBIT_CONVERT to convert from the packed result type to the - // MVT::Vector type. + if (MVT::isVector(VT)) { + // Insert a BIT_CONVERT to convert from the packed result type to the + // new vector type. unsigned NumElems = cast(RetTy)->getNumElements(); const Type *EltTy = cast(RetTy)->getElementType(); // Figure out if there is a Packed type corresponding to this Vector // type. If so, convert to the vector type. - MVT::ValueType TVT = MVT::getVectorType(getValueType(EltTy),NumElems); + MVT::ValueType TVT = + MVT::getVectorType(getValueType(EltTy),NumElems); if (TVT != MVT::Other && isTypeLegal(TVT)) { - // Insert a VBIT_CONVERT of the FORMAL_ARGUMENTS to a - // "N x PTyElementVT" MVT::Vector type. - ResVal = DAG.getNode(ISD::VBIT_CONVERT, MVT::Vector, ResVal, - DAG.getConstant(NumElems, MVT::i32), - DAG.getValueType(getValueType(EltTy))); + // Insert a BIT_CONVERT of the FORMAL_ARGUMENTS to a + // "N x PTyElementVT" vector type. + ResVal = DAG.getNode(ISD::BIT_CONVERT, TVT, ResVal); } else { abort(); } @@ -4457,40 +4384,40 @@ MVT::ValueType DestVT = TLI.getTypeToTransformTo(SrcVT); if (SrcVT == DestVT) { return DAG.getCopyToReg(getRoot(), Reg, Op); - } else if (SrcVT == MVT::Vector) { + } else if (MVT::isVector(SrcVT)) { // Handle copies from generic vectors to registers. - MVT::ValueType PTyElementVT, PTyLegalElementVT; - unsigned NE = TLI.getVectorTypeBreakdown(cast(V->getType()), - PTyElementVT, PTyLegalElementVT); - uint64_t SrcVL = cast(*(Op.Val->op_end()-2))->getValue(); + MVT::ValueType ElementVT, LegalElementVT; + unsigned NE = TLI.getVectorTypeBreakdown(SrcVT, + ElementVT, LegalElementVT); + uint64_t SrcVL = MVT::getVectorNumElements(SrcVT); // Loop over all of the elements of the resultant vector, - // VEXTRACT_VECTOR_ELT'ing or VEXTRACT_SUBVECTOR'ing them, converting them - // to PTyLegalElementVT, then copying them into output registers. + // EXTRACT_VECTOR_ELT'ing or EXTRACT_SUBVECTOR'ing them, converting them + // to LegalElementVT, then copying them into output registers. SmallVector OutChains; SDOperand Root = getRoot(); for (unsigned i = 0; i != NE; ++i) { - SDOperand Elt = MVT::isVector(PTyElementVT) ? - DAG.getNode(ISD::VEXTRACT_SUBVECTOR, PTyElementVT, + SDOperand Elt = MVT::isVector(ElementVT) ? + DAG.getNode(ISD::EXTRACT_SUBVECTOR, ElementVT, Op, DAG.getConstant(i * (SrcVL / NE), TLI.getPointerTy())) : - DAG.getNode(ISD::VEXTRACT_VECTOR_ELT, PTyElementVT, + DAG.getNode(ISD::EXTRACT_VECTOR_ELT, ElementVT, Op, DAG.getConstant(i, TLI.getPointerTy())); - if (PTyElementVT == PTyLegalElementVT) { + if (ElementVT == LegalElementVT) { // Elements are legal. OutChains.push_back(DAG.getCopyToReg(Root, Reg++, Elt)); - } else if (PTyLegalElementVT > PTyElementVT) { + } else if (LegalElementVT > ElementVT) { // Elements are promoted. - if (MVT::isFloatingPoint(PTyLegalElementVT)) - Elt = DAG.getNode(ISD::FP_EXTEND, PTyLegalElementVT, Elt); + if (MVT::isFloatingPoint(LegalElementVT)) + Elt = DAG.getNode(ISD::FP_EXTEND, LegalElementVT, Elt); else - Elt = DAG.getNode(ISD::ANY_EXTEND, PTyLegalElementVT, Elt); + Elt = DAG.getNode(ISD::ANY_EXTEND, LegalElementVT, Elt); OutChains.push_back(DAG.getCopyToReg(Root, Reg++, Elt)); } else { // Elements are expanded. // The src value is expanded into multiple registers. - SDOperand Lo = DAG.getNode(ISD::EXTRACT_ELEMENT, PTyLegalElementVT, + SDOperand Lo = DAG.getNode(ISD::EXTRACT_ELEMENT, LegalElementVT, Elt, DAG.getConstant(0, TLI.getPointerTy())); - SDOperand Hi = DAG.getNode(ISD::EXTRACT_ELEMENT, PTyLegalElementVT, + SDOperand Hi = DAG.getNode(ISD::EXTRACT_ELEMENT, LegalElementVT, Elt, DAG.getConstant(1, TLI.getPointerTy())); OutChains.push_back(DAG.getCopyToReg(Root, Reg++, Lo)); OutChains.push_back(DAG.getCopyToReg(Root, Reg++, Hi)); @@ -4695,15 +4622,7 @@ // Remember that this register needs to added to the machine PHI node as // the input for this MBB. MVT::ValueType VT = TLI.getValueType(PN->getType()); - unsigned NumRegisters; - if (VT != MVT::Vector) - NumRegisters = TLI.getNumRegisters(VT); - else { - MVT::ValueType VT1,VT2; - NumRegisters = - TLI.getVectorTypeBreakdown(cast(PN->getType()), - VT1, VT2); - } + unsigned NumRegisters = TLI.getNumRegisters(VT); for (unsigned i = 0, e = NumRegisters; i != e; ++i) PHINodesToUpdate.push_back(std::make_pair(MBBI++, Reg+i)); } Index: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp diff -u llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.122 llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.123 --- llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.122 Fri Jun 22 09:59:07 2007 +++ llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp Mon Jun 25 11:23:39 2007 @@ -199,7 +199,7 @@ else if (VT == MVT::f64) TransformToType[VT] = MVT::i64; else { - assert((VT == MVT::Vector || MVT::isInteger(VT)) && VT > MVT::i8 && + assert((MVT::isVector(VT) || MVT::isInteger(VT)) && VT > MVT::i8 && "Cannot expand this type: target must support SOME integer reg!"); // Expand to the next smaller integer type! TransformToType[VT] = (MVT::ValueType)(VT-1); @@ -265,16 +265,18 @@ ValueTypeActions); } - // Set MVT::Vector to always be Expanded - SetValueTypeAction(MVT::Vector, Expand, *this, TransformToType, - ValueTypeActions); - // Loop over all of the legal vector value types, specifying an identity type // transformation. for (unsigned i = MVT::FIRST_VECTOR_VALUETYPE; i <= MVT::LAST_VECTOR_VALUETYPE; ++i) { if (isTypeLegal((MVT::ValueType)i)) TransformToType[i] = (MVT::ValueType)i; + else { + MVT::ValueType VT1, VT2; + NumRegistersForVT[i] = getVectorTypeBreakdown(i, VT1, VT2); + SetValueTypeAction(i, Expand, *this, TransformToType, + ValueTypeActions); + } } } @@ -282,38 +284,42 @@ return NULL; } -/// getVectorTypeBreakdown - Packed types are broken down into some number of -/// legal first class types. For example, <8 x float> maps to 2 MVT::v4f32 +/// getVectorTypeBreakdown - Vector types are broken down into some number of +/// legal first class types. For example, MVT::v8f32 maps to 2 MVT::v4f32 /// with Altivec or SSE1, or 8 promoted MVT::f64 values with the X86 FP stack. +/// Similarly, MVT::v2i64 turns into 4 MVT::i32 values with both PPC and X86. /// -/// This method returns the number and type of the resultant breakdown. +/// This method returns the number of registers needed, and the VT for each +/// register. It also returns the VT of the VectorType elements before they +/// are promoted/expanded. /// -unsigned TargetLowering::getVectorTypeBreakdown(const VectorType *PTy, - MVT::ValueType &PTyElementVT, - MVT::ValueType &PTyLegalElementVT) const { +unsigned TargetLowering::getVectorTypeBreakdown(MVT::ValueType VT, + MVT::ValueType &ElementVT, + MVT::ValueType &LegalElementVT) const { // Figure out the right, legal destination reg to copy into. - unsigned NumElts = PTy->getNumElements(); - MVT::ValueType EltTy = getValueType(PTy->getElementType()); + unsigned NumElts = MVT::getVectorNumElements(VT); + MVT::ValueType EltTy = MVT::getVectorElementType(VT); unsigned NumVectorRegs = 1; // Divide the input until we get to a supported size. This will always // end with a scalar if the target doesn't support vectors. - while (NumElts > 1 && !isTypeLegal(MVT::getVectorType(EltTy, NumElts))) { + while (NumElts > 1 && + !isTypeLegal(MVT::getVectorType(EltTy, NumElts))) { NumElts >>= 1; NumVectorRegs <<= 1; } - MVT::ValueType VT = MVT::getVectorType(EltTy, NumElts); - if (!isTypeLegal(VT)) - VT = EltTy; - PTyElementVT = VT; - - MVT::ValueType DestVT = getTypeToTransformTo(VT); - PTyLegalElementVT = DestVT; - if (DestVT < VT) { + MVT::ValueType NewVT = MVT::getVectorType(EltTy, NumElts); + if (!isTypeLegal(NewVT)) + NewVT = EltTy; + ElementVT = NewVT; + + MVT::ValueType DestVT = getTypeToTransformTo(NewVT); + LegalElementVT = DestVT; + if (DestVT < NewVT) { // Value is expanded, e.g. i64 -> i16. - return NumVectorRegs*(MVT::getSizeInBits(VT)/MVT::getSizeInBits(DestVT)); + return NumVectorRegs*(MVT::getSizeInBits(NewVT)/MVT::getSizeInBits(DestVT)); } else { // Otherwise, promotion or legal types use the same number of registers as // the vector decimated to the appropriate level. From reid at x10sys.com Mon Jun 25 11:46:17 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 25 Jun 2007 11:46:17 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvm2cpp/CppWriter.cpp Message-ID: <200706251646.l5PGkHbc000339@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm2cpp: CppWriter.cpp updated: 1.52 -> 1.53 --- Log message: Fix PR1525: http://llvm.org/PR1525 : Use a better determinator for identifying constant array initializers that are or are not zero terminated and generate code appropriately. --- Diffs of the changes: (+10 -4) CppWriter.cpp | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) Index: llvm/tools/llvm2cpp/CppWriter.cpp diff -u llvm/tools/llvm2cpp/CppWriter.cpp:1.52 llvm/tools/llvm2cpp/CppWriter.cpp:1.53 --- llvm/tools/llvm2cpp/CppWriter.cpp:1.52 Sat Jun 16 15:48:27 2007 +++ llvm/tools/llvm2cpp/CppWriter.cpp Mon Jun 25 11:45:54 2007 @@ -720,12 +720,18 @@ } else if (const ConstantArray *CA = dyn_cast(CV)) { if (CA->isString() && CA->getType()->getElementType() == Type::Int8Ty) { Out << "Constant* " << constName << " = ConstantArray::get(\""; - printEscapedString(CA->getAsString()); + std::string tmp = CA->getAsString(); + bool nullTerminate = false; + if (tmp[tmp.length()-1] == 0) { + tmp.erase(tmp.length()-1); + nullTerminate = true; + } + printEscapedString(tmp); // Determine if we want null termination or not. - if (CA->getType()->getNumElements() <= CA->getAsString().length()) - Out << "\", false";// No null terminator - else + if (nullTerminate) Out << "\", true"; // Indicate that the null terminator should be added. + else + Out << "\", false";// No null terminator Out << ");"; } else { Out << "std::vector " << constName << "_elems;"; From clattner at apple.com Mon Jun 25 12:36:35 2007 From: clattner at apple.com (clattner at apple.com) Date: Mon, 25 Jun 2007 10:36:35 -0700 (PDT) Subject: [llvm-commits] [128805] remove a bogus change. Message-ID: <20070625173635.B9E89A9C0087@src> Revision: 128805 Author: clattner Date: 2007-06-25 10:36:34 -0700 (Mon, 25 Jun 2007) Log Message: ----------- remove a bogus change. Modified Paths: -------------- apple-local/branches/llvm/gcc/c-lex.c Modified: apple-local/branches/llvm/gcc/c-lex.c =================================================================== --- apple-local/branches/llvm/gcc/c-lex.c 2007-06-25 17:24:27 UTC (rev 128804) +++ apple-local/branches/llvm/gcc/c-lex.c 2007-06-25 17:36:34 UTC (rev 128805) @@ -825,8 +825,6 @@ static cpp_num my_cpp_num_sign_extend (cpp_num num, size_t precision) { - if (num.high) - printf("%lu\n", (long unsigned int) num.high); if (!num.unsignedp) { if (precision > PART_PRECISION) From resistor at mac.com Mon Jun 25 13:25:53 2007 From: resistor at mac.com (Owen Anderson) Date: Mon, 25 Jun 2007 13:25:53 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/GVNPRE.cpp Message-ID: <200706251825.l5PIPrkF003065@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: GVNPRE.cpp updated: 1.57 -> 1.58 --- Log message: Use the built-in postorder iterators rather than computing a postorder walk by hand. --- Diffs of the changes: (+3 -35) GVNPRE.cpp | 38 +++----------------------------------- 1 files changed, 3 insertions(+), 35 deletions(-) Index: llvm/lib/Transforms/Scalar/GVNPRE.cpp diff -u llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.57 llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.58 --- llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.57 Mon Jun 25 00:41:12 2007 +++ llvm/lib/Transforms/Scalar/GVNPRE.cpp Mon Jun 25 13:25:31 2007 @@ -27,6 +27,7 @@ #include "llvm/ADT/BitVector.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/DepthFirstIterator.h" +#include "llvm/ADT/PostOrderIterator.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/Statistic.h" #include "llvm/Support/CFG.h" @@ -935,39 +936,6 @@ // Phase 1, Part 2: calculate ANTIC_IN - DOUT << "Calculating walk\n"; - // Calculate a postorder CFG walk - std::vector walk; - std::vector walkStack; - SmallPtrSet walkVisited; - walkStack.push_back(&F.getEntryBlock()); - walkVisited.insert(&F.getEntryBlock()); - - while (!walkStack.empty()) { - BasicBlock* BB = walkStack.back(); - walkVisited.insert(BB); - - bool inserted = false; - for (unsigned i = 0; i < BB->getTerminator()->getNumSuccessors(); ++i) { - BasicBlock* succ = BB->getTerminator()->getSuccessor(i); - if (walkVisited.count(succ) == 0) { - walkStack.push_back(succ); - inserted = true; - } - } - - if (inserted) - continue; - else { - walk.push_back(BB); - walkStack.pop_back(); - } - } - - DOUT << "Finished calculating walk\n"; - - // Perform the ANTIC_IN calculation - std::set visited; bool changed = true; @@ -977,8 +945,8 @@ SmallPtrSet anticOut; // Top-down walk of the postdominator tree - for (std::vector::iterator BBI = walk.begin(), BBE = walk.end(); - BBI != BBE; ++BBI) { + for (po_iterator BBI = po_begin(&F.getEntryBlock()), + BBE = po_end(&F.getEntryBlock()); BBI != BBE; ++BBI) { BasicBlock* BB = *BBI; if (BB == 0) continue; From sabre at nondot.org Mon Jun 25 16:50:21 2007 From: sabre at nondot.org (Chris Lattner) Date: Mon, 25 Jun 2007 16:50:21 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/Inline/2007-06-25-WeakInline.ll Message-ID: <200706252150.l5PLoLsi010240@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/Inline: 2007-06-25-WeakInline.ll added (r1.1) --- Log message: new testcase, the inliner shouldn't inline this. --- Diffs of the changes: (+14 -0) 2007-06-25-WeakInline.ll | 14 ++++++++++++++ 1 files changed, 14 insertions(+) Index: llvm/test/Transforms/Inline/2007-06-25-WeakInline.ll diff -c /dev/null llvm/test/Transforms/Inline/2007-06-25-WeakInline.ll:1.1 *** /dev/null Mon Jun 25 16:50:03 2007 --- llvm/test/Transforms/Inline/2007-06-25-WeakInline.ll Mon Jun 25 16:49:53 2007 *************** *** 0 **** --- 1,14 ---- + ; RUN: llvm-as < %s | opt -inline | llvm-dis | grep call + + ; 'bar' can be overridden at link-time, don't inline it. + + define void @foo() { + entry: + tail call void @bar( ) ; [#uses=0] + ret void + } + + define weak void @bar() { + ret void + } + From sabre at nondot.org Mon Jun 25 16:50:30 2007 From: sabre at nondot.org (Chris Lattner) Date: Mon, 25 Jun 2007 16:50:30 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/IPO/InlineSimple.cpp Message-ID: <200706252150.l5PLoUOW010276@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/IPO: InlineSimple.cpp updated: 1.86 -> 1.87 --- Log message: fix Transforms/Inline/2007-06-25-WeakInline.ll by not inlining functions with weak linkage. --- Diffs of the changes: (+8 -4) InlineSimple.cpp | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) Index: llvm/lib/Transforms/IPO/InlineSimple.cpp diff -u llvm/lib/Transforms/IPO/InlineSimple.cpp:1.86 llvm/lib/Transforms/IPO/InlineSimple.cpp:1.87 --- llvm/lib/Transforms/IPO/InlineSimple.cpp:1.86 Tue Jun 19 17:29:50 2007 +++ llvm/lib/Transforms/IPO/InlineSimple.cpp Mon Jun 25 16:50:09 2007 @@ -195,10 +195,14 @@ const Function *Caller = TheCall->getParent()->getParent(); // Don't inline a directly recursive call. - if (Caller == Callee) return 2000000000; - - // Don't inline functions marked noinline - if (NeverInline.count(Callee)) return 2000000000; + if (Caller == Callee || + // Don't inline functions which can be redefined at link-time to mean + // something else. link-once linkage is ok though. + Callee->hasWeakLinkage() || + + // Don't inline functions marked noinline. + NeverInline.count(Callee)) + return 2000000000; // InlineCost - This value measures how good of an inline candidate this call // site is to inline. A lower inline cost make is more likely for the call to From duraid at octopus.com.au Mon Jun 25 18:47:36 2007 From: duraid at octopus.com.au (Duraid Madina) Date: Mon, 25 Jun 2007 18:47:36 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/RegAllocBigBlock.cpp Message-ID: <200706252347.l5PNlamS013310@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: RegAllocBigBlock.cpp updated: 1.1 -> 1.2 --- Log message: A bunch of fixes to the BigBlock allocator improve compile-time by ~20% and code quality by ~2% on my tests. A big thank you to Roman Levenstein for this patch! See http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070618/050717.html for more details. --- Diffs of the changes: (+65 -72) RegAllocBigBlock.cpp | 137 ++++++++++++++++++++++++--------------------------- 1 files changed, 65 insertions(+), 72 deletions(-) Index: llvm/lib/CodeGen/RegAllocBigBlock.cpp diff -u llvm/lib/CodeGen/RegAllocBigBlock.cpp:1.1 llvm/lib/CodeGen/RegAllocBigBlock.cpp:1.2 --- llvm/lib/CodeGen/RegAllocBigBlock.cpp:1.1 Fri Jun 22 03:27:12 2007 +++ llvm/lib/CodeGen/RegAllocBigBlock.cpp Mon Jun 25 18:46:54 2007 @@ -40,6 +40,7 @@ #include "llvm/ADT/IndexedMap.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallVector.h" +#include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/Statistic.h" #include using namespace llvm; @@ -69,15 +70,17 @@ const MRegisterInfo *RegInfo; LiveVariables *LV; - // InsnTimes - maps machine instructions to their "execute times" - std::map InsnTimes; - // VRegReadTable - maps VRegs in a BB to the set of times they are read - DenseMap*, VRegKeyInfo> VRegReadTable; + // This is a sorted list + typedef SmallVector VRegTimes; + + DenseMap VRegReadTable; + DenseMap VRegReadIdx; // StackSlotForVirtReg - Maps virtual regs to the frame index where these // values are spilled. - std::map StackSlotForVirtReg; + //DenseMap StackSlotForVirtReg; + IndexedMap StackSlotForVirtReg; // Virt2PhysRegMap - This map contains entries for each virtual register // that is currently available in a physical register. @@ -87,6 +90,11 @@ return Virt2PhysRegMap[VirtReg]; } + unsigned &getVirt2StackSlot(unsigned VirtReg) { + return StackSlotForVirtReg[VirtReg]; + } + + // PhysRegsUsed - This array is effectively a map, containing entries for // each physical register that currently has a value (ie, it is in // Virt2PhysRegMap). The value mapped to is the virtual register @@ -98,22 +106,19 @@ // std::vector PhysRegsUsed; - // PhysRegsUseOrder - This contains a list of the physical registers that - // currently have a virtual register value in them. This list provides an - // ordering of registers, imposing a reallocation order. This list is only - // used if all registers are allocated and we have to spill one, in which - // case we spill the least recently used register. Entries at the front of - // the list are the least recently used registers, entries at the back are - // the most recently used. - // - std::vector PhysRegsUseOrder; // VirtRegModified - This bitset contains information about which virtual // registers need to be spilled back to memory when their registers are // scavenged. If a virtual register has simply been rematerialized, there // is no reason to spill it to memory when we need the register back. // - std::vector VirtRegModified; + std::vector VirtRegModified; + + // MBBLastInsnTime - the number of the the last instruction in MBB + int MBBLastInsnTime; + + // MBBCurTime - the number of the the instruction being currently processed + int MBBCurTime; void markVirtRegModified(unsigned Reg, bool Val = true) { assert(MRegisterInfo::isVirtualRegister(Reg) && "Illegal VirtReg!"); @@ -129,21 +134,6 @@ return VirtRegModified[Reg - MRegisterInfo::FirstVirtualRegister]; } - void MarkPhysRegRecentlyUsed(unsigned Reg) { - if (PhysRegsUseOrder.empty() || - PhysRegsUseOrder.back() == Reg) return; // Already most recently used - - for (unsigned i = PhysRegsUseOrder.size(); i != 0; --i) - if (areRegsEqual(Reg, PhysRegsUseOrder[i-1])) { - unsigned RegMatch = PhysRegsUseOrder[i-1]; // remove from middle - PhysRegsUseOrder.erase(PhysRegsUseOrder.begin()+i-1); - // Add it to the end of the list - PhysRegsUseOrder.push_back(RegMatch); - if (RegMatch == Reg) - return; // Found an exact match, exit early - } - } - public: virtual const char *getPassName() const { return "BigBlock Register Allocator"; @@ -256,17 +246,17 @@ /// to be held on the stack. int RABigBlock::getStackSpaceFor(unsigned VirtReg, const TargetRegisterClass *RC) { // Find the location Reg would belong... - std::map::iterator I =StackSlotForVirtReg.lower_bound(VirtReg); + int FrameIdx = getVirt2StackSlot(VirtReg); - if (I != StackSlotForVirtReg.end() && I->first == VirtReg) - return I->second; // Already has space allocated? + if (FrameIdx) + return FrameIdx - 1; // Already has space allocated? // Allocate a new stack object for this spill location... - int FrameIdx = MF->getFrameInfo()->CreateStackObject(RC->getSize(), + FrameIdx = MF->getFrameInfo()->CreateStackObject(RC->getSize(), RC->getAlignment()); // Assign the slot... - StackSlotForVirtReg.insert(I, std::make_pair(VirtReg, FrameIdx)); + getVirt2StackSlot(VirtReg) = FrameIdx + 1; return FrameIdx; } @@ -276,11 +266,6 @@ /// void RABigBlock::removePhysReg(unsigned PhysReg) { PhysRegsUsed[PhysReg] = -1; // PhyReg no longer used - - std::vector::iterator It = - std::find(PhysRegsUseOrder.begin(), PhysRegsUseOrder.end(), PhysReg); - if (It != PhysRegsUseOrder.end()) - PhysRegsUseOrder.erase(It); } @@ -362,7 +347,6 @@ // it holds VirtReg. PhysRegsUsed[PhysReg] = VirtReg; getVirt2PhysRegMapSlot(VirtReg) = PhysReg; - PhysRegsUseOrder.push_back(PhysReg); // New use of PhysReg } @@ -426,9 +410,9 @@ // read at the most distant point in time. if (PhysReg == 0) { unsigned delay=0, longest_delay=0; - SmallVector *ReadTimes; + VRegTimes* ReadTimes; - unsigned curTime = InsnTimes[I]; + unsigned curTime = MBBCurTime; // for all physical regs in the RC, for(TargetRegisterClass::iterator pReg = RC->begin(); @@ -436,11 +420,23 @@ // how long until they're read? if(PhysRegsUsed[*pReg]>0) { // ignore non-allocatable regs ReadTimes = VRegReadTable[PhysRegsUsed[*pReg]]; - SmallVector::iterator pt = - std::lower_bound(ReadTimes->begin(), - ReadTimes->end(), - curTime); - delay = *pt - curTime; + if(ReadTimes && !ReadTimes->empty()) { + unsigned& pt = VRegReadIdx[PhysRegsUsed[*pReg]]; + while(pt < ReadTimes->size() && (*ReadTimes)[pt] < curTime) { + ++pt; + } + + if(pt < ReadTimes->size()) + delay = (*ReadTimes)[pt] - curTime; + else + delay = MBBLastInsnTime + 1 - curTime; + } else { + // This register is only defined, but never + // read in this MBB. Therefore the next read + // happens after the end of this MBB + delay = MBBLastInsnTime + 1 - curTime; + } + if(delay > longest_delay) { longest_delay = delay; @@ -533,25 +529,34 @@ for(ReadTime=0, MII = MBB.begin(); MII != MBB.end(); ++ReadTime, ++MII) { MachineInstr *MI = MII; - InsnTimes[MI] = ReadTime; - for (unsigned i = 0; i != MI->getNumOperands(); ++i) { MachineOperand& MO = MI->getOperand(i); // look for vreg reads.. if (MO.isRegister() && !MO.isDef() && MO.getReg() && MRegisterInfo::isVirtualRegister(MO.getReg())) { - // ..and add them to the read table. - if(!VRegReadTable[MO.getReg()]) - VRegReadTable[MO.getReg()] = new SmallVector; - - VRegReadTable[MO.getReg()]->push_back(ReadTime); + // ..and add them to the read table. + VRegTimes* &Times = VRegReadTable[MO.getReg()]; + if(!VRegReadTable[MO.getReg()]) { + Times = new VRegTimes; + VRegReadIdx[MO.getReg()] = 0; + } + Times->push_back(ReadTime); } } } + MBBLastInsnTime = ReadTime; + + for(DenseMap::iterator Reads = VRegReadTable.begin(); + Reads != VRegReadTable.end(); ++Reads) { + if(Reads->second) { + DOUT << "Reads[" << Reads->first << "]=" << Reads->second->size() << "\n"; + } + } } + void RABigBlock::AllocateBasicBlock(MachineBasicBlock &MBB) { // loop over each instruction MachineBasicBlock::iterator MII = MBB.begin(); @@ -568,11 +573,9 @@ unsigned Reg = I->first; MF->setPhysRegUsed(Reg); PhysRegsUsed[Reg] = 0; // It is free and reserved now - PhysRegsUseOrder.push_back(Reg); for (const unsigned *AliasSet = RegInfo->getAliasSet(Reg); *AliasSet; ++AliasSet) { if (PhysRegsUsed[*AliasSet] != -2) { - PhysRegsUseOrder.push_back(*AliasSet); PhysRegsUsed[*AliasSet] = 0; // It is free and reserved now MF->setPhysRegUsed(*AliasSet); } @@ -581,10 +584,12 @@ } // Otherwise, sequentially allocate each instruction in the MBB. + MBBCurTime = -1; while (MII != MBB.end()) { MachineInstr *MI = MII++; + MBBCurTime++; const TargetInstrDescriptor &TID = TII.get(MI->getOpcode()); - DEBUG(DOUT << "\nStarting RegAlloc of: " << *MI; + DEBUG(DOUT << "\nTime=" << MBBCurTime << " Starting RegAlloc of: " << *MI; DOUT << " Regs have values: "; for (unsigned i = 0; i != RegInfo->getNumRegs(); ++i) if (PhysRegsUsed[i] != -1 && PhysRegsUsed[i] != -2) @@ -592,14 +597,6 @@ << ",%reg" << PhysRegsUsed[i] << "] "; DOUT << "\n"); - // Loop over the implicit uses, making sure that they are at the head of the - // use order list, so they don't get reallocated. - if (TID.ImplicitUses) { - for (const unsigned *ImplicitUses = TID.ImplicitUses; - *ImplicitUses; ++ImplicitUses) - MarkPhysRegRecentlyUsed(*ImplicitUses); - } - SmallVector Kills; for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { MachineOperand& MO = MI->getOperand(i); @@ -667,11 +664,9 @@ MF->setPhysRegUsed(Reg); spillPhysReg(MBB, MI, Reg, true); // Spill any existing value in reg PhysRegsUsed[Reg] = 0; // It is free and reserved now - PhysRegsUseOrder.push_back(Reg); for (const unsigned *AliasSet = RegInfo->getAliasSet(Reg); *AliasSet; ++AliasSet) { if (PhysRegsUsed[*AliasSet] != -2) { - PhysRegsUseOrder.push_back(*AliasSet); PhysRegsUsed[*AliasSet] = 0; // It is free and reserved now MF->setPhysRegUsed(*AliasSet); } @@ -687,7 +682,6 @@ bool IsNonAllocatable = PhysRegsUsed[Reg] == -2; if (!IsNonAllocatable) { spillPhysReg(MBB, MI, Reg, true); - PhysRegsUseOrder.push_back(Reg); PhysRegsUsed[Reg] = 0; // It is free and reserved now } MF->setPhysRegUsed(Reg); @@ -696,7 +690,6 @@ *AliasSet; ++AliasSet) { if (PhysRegsUsed[*AliasSet] != -2) { if (!IsNonAllocatable) { - PhysRegsUseOrder.push_back(*AliasSet); PhysRegsUsed[*AliasSet] = 0; // It is free and reserved now } MF->setPhysRegUsed(*AliasSet); @@ -800,7 +793,6 @@ // Clear any physical register which appear live at the end of the basic // block, but which do not hold any virtual registers. e.g., the stack // pointer. - PhysRegsUseOrder.clear(); } /// runOnMachineFunction - Register allocate the whole function @@ -827,6 +819,8 @@ // initialize the virtual->physical register map to have a 'null' // mapping for all virtual registers Virt2PhysRegMap.grow(MF->getSSARegMap()->getLastVirtReg()); + StackSlotForVirtReg.grow(MF->getSSARegMap()->getLastVirtReg()); + VirtRegModified.resize(MF->getSSARegMap()->getLastVirtReg() - MRegisterInfo::FirstVirtualRegister + 1,0); // Loop over all of the basic blocks, eliminating virtual register references for (MachineFunction::iterator MBB = Fn.begin(), MBBe = Fn.end(); @@ -849,4 +843,3 @@ FunctionPass *llvm::createBigBlockRegisterAllocator() { return new RABigBlock(); } - From duraid at octopus.com.au Mon Jun 25 19:22:31 2007 From: duraid at octopus.com.au (Duraid Madina) Date: Mon, 25 Jun 2007 19:22:31 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/RegAllocBigBlock.cpp Message-ID: <200706260022.l5Q0MV4Z002179@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: RegAllocBigBlock.cpp updated: 1.2 -> 1.3 --- Log message: tidy this file up a bit --- Diffs of the changes: (+82 -54) RegAllocBigBlock.cpp | 136 ++++++++++++++++++++++++++++++--------------------- 1 files changed, 82 insertions(+), 54 deletions(-) Index: llvm/lib/CodeGen/RegAllocBigBlock.cpp diff -u llvm/lib/CodeGen/RegAllocBigBlock.cpp:1.2 llvm/lib/CodeGen/RegAllocBigBlock.cpp:1.3 --- llvm/lib/CodeGen/RegAllocBigBlock.cpp:1.2 Mon Jun 25 18:46:54 2007 +++ llvm/lib/CodeGen/RegAllocBigBlock.cpp Mon Jun 25 19:21:58 2007 @@ -2,11 +2,15 @@ // // The LLVM Compiler Infrastructure // -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. +// This file was developed by Duraid Madina and is distributed under the +// University of Illinois Open Source License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // +// This file implements the RABigBlock class +// +//===----------------------------------------------------------------------===// + // This register allocator is derived from RegAllocLocal.cpp. Like it, this // allocator works on one basic block at a time, oblivious to others. // However, the algorithm used here is suited for long blocks of @@ -54,79 +58,112 @@ bigBlockRegAlloc("bigblock", " Big-block register allocator", createBigBlockRegisterAllocator); +/// VRegKeyInfo - Defines magic values required to use VirtRegs as DenseMap +/// keys. struct VRegKeyInfo { static inline unsigned getEmptyKey() { return -1U; } static inline unsigned getTombstoneKey() { return -2U; } static unsigned getHashValue(const unsigned &Key) { return Key; } }; + +/// This register allocator is derived from RegAllocLocal.cpp. Like it, this +/// allocator works on one basic block at a time, oblivious to others. +/// However, the algorithm used here is suited for long blocks of +/// instructions - registers are spilled by greedily choosing those holding +/// values that will not be needed for the longest amount of time. This works +/// particularly well for blocks with 10 or more times as many instructions +/// as machine registers, but can be used for general code. +/// +/// TODO: - automagically invoke linearscan for (groups of) small BBs? +/// - break ties when picking regs? (probably not worth it in a +/// JIT context) +/// class VISIBILITY_HIDDEN RABigBlock : public MachineFunctionPass { public: static char ID; RABigBlock() : MachineFunctionPass((intptr_t)&ID) {} private: + /// TM - For getting at TargetMachine info + /// const TargetMachine *TM; + + /// MF - Our generic MachineFunction pointer + /// MachineFunction *MF; + + /// RegInfo - For dealing with machine register info (aliases, folds + /// etc) const MRegisterInfo *RegInfo; + + /// LV - Our generic LiveVariables pointer + /// LiveVariables *LV; - // VRegReadTable - maps VRegs in a BB to the set of times they are read - // This is a sorted list typedef SmallVector VRegTimes; + /// VRegReadTable - maps VRegs in a BB to the set of times they are read + /// DenseMap VRegReadTable; + + /// VRegReadIdx - keeps track of the "current time" in terms of + /// positions in VRegReadTable DenseMap VRegReadIdx; - // StackSlotForVirtReg - Maps virtual regs to the frame index where these - // values are spilled. - //DenseMap StackSlotForVirtReg; + /// StackSlotForVirtReg - Maps virtual regs to the frame index where these + /// values are spilled. IndexedMap StackSlotForVirtReg; - // Virt2PhysRegMap - This map contains entries for each virtual register - // that is currently available in a physical register. + /// Virt2PhysRegMap - This map contains entries for each virtual register + /// that is currently available in a physical register. IndexedMap Virt2PhysRegMap; - unsigned &getVirt2PhysRegMapSlot(unsigned VirtReg) { - return Virt2PhysRegMap[VirtReg]; - } - - unsigned &getVirt2StackSlot(unsigned VirtReg) { - return StackSlotForVirtReg[VirtReg]; - } - - - // PhysRegsUsed - This array is effectively a map, containing entries for - // each physical register that currently has a value (ie, it is in - // Virt2PhysRegMap). The value mapped to is the virtual register - // corresponding to the physical register (the inverse of the - // Virt2PhysRegMap), or 0. The value is set to 0 if this register is pinned - // because it is used by a future instruction, and to -2 if it is not - // allocatable. If the entry for a physical register is -1, then the - // physical register is "not in the map". - // + /// PhysRegsUsed - This array is effectively a map, containing entries for + /// each physical register that currently has a value (ie, it is in + /// Virt2PhysRegMap). The value mapped to is the virtual register + /// corresponding to the physical register (the inverse of the + /// Virt2PhysRegMap), or 0. The value is set to 0 if this register is pinned + /// because it is used by a future instruction, and to -2 if it is not + /// allocatable. If the entry for a physical register is -1, then the + /// physical register is "not in the map". + /// std::vector PhysRegsUsed; - - // VirtRegModified - This bitset contains information about which virtual - // registers need to be spilled back to memory when their registers are - // scavenged. If a virtual register has simply been rematerialized, there - // is no reason to spill it to memory when we need the register back. - // + /// VirtRegModified - This bitset contains information about which virtual + /// registers need to be spilled back to memory when their registers are + /// scavenged. If a virtual register has simply been rematerialized, there + /// is no reason to spill it to memory when we need the register back. + /// std::vector VirtRegModified; - // MBBLastInsnTime - the number of the the last instruction in MBB + /// MBBLastInsnTime - the number of the the last instruction in MBB + /// int MBBLastInsnTime; - // MBBCurTime - the number of the the instruction being currently processed + /// MBBCurTime - the number of the the instruction being currently processed + /// int MBBCurTime; + unsigned &getVirt2PhysRegMapSlot(unsigned VirtReg) { + return Virt2PhysRegMap[VirtReg]; + } + + unsigned &getVirt2StackSlot(unsigned VirtReg) { + return StackSlotForVirtReg[VirtReg]; + } + + /// markVirtRegModified - Lets us flip bits in the VirtRegModified bitset + /// void markVirtRegModified(unsigned Reg, bool Val = true) { assert(MRegisterInfo::isVirtualRegister(Reg) && "Illegal VirtReg!"); Reg -= MRegisterInfo::FirstVirtualRegister; - if (VirtRegModified.size() <= Reg) VirtRegModified.resize(Reg+1); + if (VirtRegModified.size() <= Reg) + VirtRegModified.resize(Reg+1); VirtRegModified[Reg] = Val; } + /// isVirtRegModified - Lets us query the VirtRegModified bitset + /// bool isVirtRegModified(unsigned Reg) const { assert(MRegisterInfo::isVirtualRegister(Reg) && "Illegal VirtReg!"); assert(Reg - MRegisterInfo::FirstVirtualRegister < VirtRegModified.size() @@ -135,10 +172,14 @@ } public: + /// getPassName - returns the BigBlock allocator's name + /// virtual const char *getPassName() const { return "BigBlock Register Allocator"; } + /// getAnalaysisUsage - declares the required analyses + /// virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired(); AU.addRequiredID(PHIEliminationID); @@ -148,12 +189,15 @@ private: /// runOnMachineFunction - Register allocate the whole function + /// bool runOnMachineFunction(MachineFunction &Fn); /// AllocateBasicBlock - Register allocate the specified basic block. + /// void AllocateBasicBlock(MachineBasicBlock &MBB); /// FillVRegReadTable - Fill out the table of vreg read times given a BB + /// void FillVRegReadTable(MachineBasicBlock &MBB); /// areRegsEqual - This method returns true if the specified registers are @@ -366,8 +410,7 @@ return true; } - -//////// FIX THIS: + /// getFreeReg - Look to see if there is a free register available in the /// specified register class. If not, return 0. /// @@ -777,22 +820,6 @@ spillVirtReg(MBB, MI, VirtReg, i); else removePhysReg(i); - -#if 0 - // This checking code is very expensive. - bool AllOk = true; - for (unsigned i = MRegisterInfo::FirstVirtualRegister, - e = MF->getSSARegMap()->getLastVirtReg(); i <= e; ++i) - if (unsigned PR = Virt2PhysRegMap[i]) { - cerr << "Register still mapped: " << i << " -> " << PR << "\n"; - AllOk = false; - } - assert(AllOk && "Virtual registers still in phys regs?"); -#endif - - // Clear any physical register which appear live at the end of the basic - // block, but which do not hold any virtual registers. e.g., the stack - // pointer. } /// runOnMachineFunction - Register allocate the whole function @@ -843,3 +870,4 @@ FunctionPass *llvm::createBigBlockRegisterAllocator() { return new RABigBlock(); } + From djg at cray.com Mon Jun 25 19:39:11 2007 From: djg at cray.com (Dan Gohman) Date: Mon, 25 Jun 2007 19:39:11 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Module.h Message-ID: <200706260039.l5Q0dBSt002850@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: Module.h updated: 1.89 -> 1.90 --- Log message: Add a convenince member function for appending strings to a module's module-level asm string data. --- Diffs of the changes: (+7 -0) Module.h | 7 +++++++ 1 files changed, 7 insertions(+) Index: llvm/include/llvm/Module.h diff -u llvm/include/llvm/Module.h:1.89 llvm/include/llvm/Module.h:1.90 --- llvm/include/llvm/Module.h:1.89 Wed Apr 25 09:27:10 2007 +++ llvm/include/llvm/Module.h Mon Jun 25 19:38:49 2007 @@ -174,6 +174,13 @@ /// Set the module-scope inline assembly blocks. void setModuleInlineAsm(const std::string &Asm) { GlobalScopeAsm = Asm; } + /// Append to the module-scope inline assembly blocks, automatically + /// appending a newline to the end. + void appendModuleInlineAsm(const std::string &Asm) { + GlobalScopeAsm += Asm; + GlobalScopeAsm += '\n'; + } + /// @} /// @name Function Accessors /// @{ From djg at cray.com Mon Jun 25 19:43:40 2007 From: djg at cray.com (Dan Gohman) Date: Mon, 25 Jun 2007 19:43:40 -0500 Subject: [llvm-commits] CVS: llvm/utils/TableGen/IntrinsicEmitter.cpp Message-ID: <200706260043.l5Q0hemf011503@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: IntrinsicEmitter.cpp updated: 1.32 -> 1.33 --- Log message: Fix a typo in a comment. --- Diffs of the changes: (+1 -1) IntrinsicEmitter.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/utils/TableGen/IntrinsicEmitter.cpp diff -u llvm/utils/TableGen/IntrinsicEmitter.cpp:1.32 llvm/utils/TableGen/IntrinsicEmitter.cpp:1.33 --- llvm/utils/TableGen/IntrinsicEmitter.cpp:1.32 Tue May 22 14:30:31 2007 +++ llvm/utils/TableGen/IntrinsicEmitter.cpp Mon Jun 25 19:43:18 2007 @@ -141,7 +141,7 @@ // NOTE: The ArgNo variable here is not the absolute argument number, it is // the index of the "arbitrary" type in the Tys array passed to the // Intrinsic::getDeclaration function. Consequently, we only want to - // increment it when we actually hit an arbitray integer type which is + // increment it when we actually hit an arbitrary integer type which is // identified by BitWidth == 0. Getting this wrong leads to very subtle // bugs! if (BitWidth == 0) From djg at cray.com Mon Jun 25 19:48:46 2007 From: djg at cray.com (Dan Gohman) Date: Mon, 25 Jun 2007 19:48:46 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/TargetInstrInfo.h Message-ID: <200706260048.l5Q0mkPG023560@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Target: TargetInstrInfo.h updated: 1.132 -> 1.133 --- Log message: Revert the earlier change that removed the M_REMATERIALIZABLE machine instruction flag, and use the flag along with a virtual member function hook for targets to override if there are instructions that are only trivially rematerializable with specific operands (i.e. constant pool loads). --- Diffs of the changes: (+26 -10) TargetInstrInfo.h | 36 ++++++++++++++++++++++++++---------- 1 files changed, 26 insertions(+), 10 deletions(-) Index: llvm/include/llvm/Target/TargetInstrInfo.h diff -u llvm/include/llvm/Target/TargetInstrInfo.h:1.132 llvm/include/llvm/Target/TargetInstrInfo.h:1.133 --- llvm/include/llvm/Target/TargetInstrInfo.h:1.132 Mon Jun 18 20:48:04 2007 +++ llvm/include/llvm/Target/TargetInstrInfo.h Mon Jun 25 19:48:06 2007 @@ -78,6 +78,10 @@ // controls execution. It may be set to 'always'. const unsigned M_PREDICABLE = 1 << 12; +// M_REMATERIALIZIBLE - Set if this instruction can be trivally re-materialized +// at any time, e.g. constant generation, load from constant pool. +const unsigned M_REMATERIALIZIBLE = 1 << 13; + // M_CLOBBERS_PRED - Set if this instruction may clobbers the condition code // register and / or registers that are used to predicate instructions. const unsigned M_CLOBBERS_PRED = 1 << 14; @@ -268,6 +272,28 @@ return get(Opcode).Flags & M_NOT_DUPLICABLE; } + /// isTriviallyReMaterializable - Return true if the instruction is trivially + /// rematerializable, meaning it has no side effects and requires no operands + /// that aren't always available. + bool isTriviallyReMaterializable(MachineInstr *MI) const { + return (MI->getInstrDescriptor()->Flags & M_REMATERIALIZIBLE) && + isReallyTriviallyReMaterializable(MI); + } + +protected: + /// isReallyTriviallyReMaterializable - For instructions with opcodes for + /// which the M_REMATERIALIZABLE flag is set, this function tests whether the + /// instruction itself is actually trivially rematerializable, considering + /// its operands. This is used for targets that have instructions that are + /// only trivially rematerializable for specific uses. This predicate must + /// return false if the instruction has any side effects other than + /// producing a value, or if it requres any address registers that are not + /// always available. + virtual bool isReallyTriviallyReMaterializable(MachineInstr *MI) const { + return true; + } + +public: /// getOperandConstraint - Returns the value of the specific constraint if /// it is set. Returns -1 if it is not set. int getOperandConstraint(MachineOpCode Opcode, unsigned OpNum, @@ -301,16 +327,6 @@ return 0; } - /// isTriviallyReMaterializable - If the specified machine instruction can - /// be trivally re-materialized at any time, e.g. constant generation or - /// loads from constant pools. If not, return false. This predicate must - /// return false if the instruction has any side effects other than - /// producing the value from the load, or if it requres any address - /// registers that are not always available. - virtual bool isTriviallyReMaterializable(MachineInstr *MI) const { - return false; - } - /// convertToThreeAddress - This method must be implemented by targets that /// set the M_CONVERTIBLE_TO_3_ADDR flag. When this flag is set, the target /// may be able to convert a two-address instruction into one or moretrue From djg at cray.com Mon Jun 25 19:48:47 2007 From: djg at cray.com (Dan Gohman) Date: Mon, 25 Jun 2007 19:48:47 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMInstrInfo.cpp ARMInstrInfo.h ARMInstrInfo.td ARMInstrThumb.td Message-ID: <200706260048.l5Q0mlwT023595@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMInstrInfo.cpp updated: 1.39 -> 1.40 ARMInstrInfo.h updated: 1.16 -> 1.17 ARMInstrInfo.td updated: 1.114 -> 1.115 ARMInstrThumb.td updated: 1.32 -> 1.33 --- Log message: Revert the earlier change that removed the M_REMATERIALIZABLE machine instruction flag, and use the flag along with a virtual member function hook for targets to override if there are instructions that are only trivially rematerializable with specific operands (i.e. constant pool loads). --- Diffs of the changes: (+5 -15) ARMInstrInfo.cpp | 14 -------------- ARMInstrInfo.h | 1 - ARMInstrInfo.td | 4 ++++ ARMInstrThumb.td | 1 + 4 files changed, 5 insertions(+), 15 deletions(-) Index: llvm/lib/Target/ARM/ARMInstrInfo.cpp diff -u llvm/lib/Target/ARM/ARMInstrInfo.cpp:1.39 llvm/lib/Target/ARM/ARMInstrInfo.cpp:1.40 --- llvm/lib/Target/ARM/ARMInstrInfo.cpp:1.39 Mon Jun 18 20:48:04 2007 +++ llvm/lib/Target/ARM/ARMInstrInfo.cpp Mon Jun 25 19:48:06 2007 @@ -130,20 +130,6 @@ return 0; } -bool ARMInstrInfo::isTriviallyReMaterializable(MachineInstr *MI) const { - switch (MI->getOpcode()) { - default: break; - case ARM::LDRcp: - case ARM::MOVi: - case ARM::MVNi: - case ARM::MOVi2pieces: - case ARM::tLDRcp: - // These instructions are always trivially rematerializable. - return true; - } - return false; -} - static unsigned getUnindexedOpcode(unsigned Opc) { switch (Opc) { default: break; Index: llvm/lib/Target/ARM/ARMInstrInfo.h diff -u llvm/lib/Target/ARM/ARMInstrInfo.h:1.16 llvm/lib/Target/ARM/ARMInstrInfo.h:1.17 --- llvm/lib/Target/ARM/ARMInstrInfo.h:1.16 Mon Jun 18 20:48:04 2007 +++ llvm/lib/Target/ARM/ARMInstrInfo.h Mon Jun 25 19:48:06 2007 @@ -87,7 +87,6 @@ unsigned &SrcReg, unsigned &DstReg) const; virtual unsigned isLoadFromStackSlot(MachineInstr *MI, int &FrameIndex) const; virtual unsigned isStoreToStackSlot(MachineInstr *MI, int &FrameIndex) const; - virtual bool isTriviallyReMaterializable(MachineInstr *MI) const; virtual MachineInstr *convertToThreeAddress(MachineFunction::iterator &MFI, MachineBasicBlock::iterator &MBBI, Index: llvm/lib/Target/ARM/ARMInstrInfo.td diff -u llvm/lib/Target/ARM/ARMInstrInfo.td:1.114 llvm/lib/Target/ARM/ARMInstrInfo.td:1.115 --- llvm/lib/Target/ARM/ARMInstrInfo.td:1.114 Fri Jun 22 11:59:54 2007 +++ llvm/lib/Target/ARM/ARMInstrInfo.td Mon Jun 25 19:48:06 2007 @@ -677,6 +677,7 @@ [(set GPR:$dst, (load addrmode2:$addr))]>; // Special LDR for loads from non-pc-relative constpools. +let isReMaterializable = 1 in def LDRcp : AI2<(ops GPR:$dst, addrmode2:$addr), "ldr", " $dst, $addr", []>; @@ -810,6 +811,7 @@ def MOVs : AI1<(ops GPR:$dst, so_reg:$src), "mov", " $dst, $src", [(set GPR:$dst, so_reg:$src)]>; +let isReMaterializable = 1 in def MOVi : AI1<(ops GPR:$dst, so_imm:$src), "mov", " $dst, $src", [(set GPR:$dst, so_imm:$src)]>; @@ -917,6 +919,7 @@ "mvn", " $dst, $src", [(set GPR:$dst, (not GPR:$src))]>; def MVNs : AI<(ops GPR:$dst, so_reg:$src), "mvn", " $dst, $src", [(set GPR:$dst, (not so_reg:$src))]>; +let isReMaterializable = 1 in def MVNi : AI<(ops GPR:$dst, so_imm:$imm), "mvn", " $dst, $imm", [(set GPR:$dst, so_imm_not:$imm)]>; @@ -1187,6 +1190,7 @@ // Large immediate handling. // Two piece so_imms. +let isReMaterializable = 1 in def MOVi2pieces : AI1x2<(ops GPR:$dst, so_imm2part:$src), "mov", " $dst, $src", [(set GPR:$dst, so_imm2part:$src)]>; Index: llvm/lib/Target/ARM/ARMInstrThumb.td diff -u llvm/lib/Target/ARM/ARMInstrThumb.td:1.32 llvm/lib/Target/ARM/ARMInstrThumb.td:1.33 --- llvm/lib/Target/ARM/ARMInstrThumb.td:1.32 Mon Jun 18 20:48:04 2007 +++ llvm/lib/Target/ARM/ARMInstrThumb.td Mon Jun 25 19:48:06 2007 @@ -267,6 +267,7 @@ [(set GPR:$dst, (load (ARMWrapper tconstpool:$addr)))]>; // Special LDR for loads from non-pc-relative constpools. +let isReMaterializable = 1 in def tLDRcp : TIs<(ops GPR:$dst, i32imm:$addr), "ldr $dst, $addr", []>; } // isLoad From djg at cray.com Mon Jun 25 19:48:47 2007 From: djg at cray.com (Dan Gohman) Date: Mon, 25 Jun 2007 19:48:47 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/Target.td Message-ID: <200706260048.l5Q0mllk023603@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target: Target.td updated: 1.105 -> 1.106 --- Log message: Revert the earlier change that removed the M_REMATERIALIZABLE machine instruction flag, and use the flag along with a virtual member function hook for targets to override if there are instructions that are only trivially rematerializable with specific operands (i.e. constant pool loads). --- Diffs of the changes: (+1 -0) Target.td | 1 + 1 files changed, 1 insertion(+) Index: llvm/lib/Target/Target.td diff -u llvm/lib/Target/Target.td:1.105 llvm/lib/Target/Target.td:1.106 --- llvm/lib/Target/Target.td:1.105 Mon Jun 18 20:48:04 2007 +++ llvm/lib/Target/Target.td Mon Jun 25 19:48:06 2007 @@ -186,6 +186,7 @@ bit isConvertibleToThreeAddress = 0; // Can this 2-addr instruction promote? bit isCommutable = 0; // Is this 3 operand instruction commutable? bit isTerminator = 0; // Is this part of the terminator for a basic block? + bit isReMaterializable = 0; // Is this instruction re-materializable? bit isPredicable = 0; // Is this instruction predicable? bit hasDelaySlot = 0; // Does this instruction have an delay slot? bit usesCustomDAGSchedInserter = 0; // Pseudo instr needing special help. From djg at cray.com Mon Jun 25 19:48:48 2007 From: djg at cray.com (Dan Gohman) Date: Mon, 25 Jun 2007 19:48:48 -0500 Subject: [llvm-commits] CVS: llvm/utils/TableGen/CodeGenInstruction.h CodeGenTarget.cpp InstrInfoEmitter.cpp Message-ID: <200706260048.l5Q0mm3m023625@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: CodeGenInstruction.h updated: 1.30 -> 1.31 CodeGenTarget.cpp updated: 1.94 -> 1.95 InstrInfoEmitter.cpp updated: 1.62 -> 1.63 --- Log message: Revert the earlier change that removed the M_REMATERIALIZABLE machine instruction flag, and use the flag along with a virtual member function hook for targets to override if there are instructions that are only trivially rematerializable with specific operands (i.e. constant pool loads). --- Diffs of the changes: (+3 -0) CodeGenInstruction.h | 1 + CodeGenTarget.cpp | 1 + InstrInfoEmitter.cpp | 1 + 3 files changed, 3 insertions(+) Index: llvm/utils/TableGen/CodeGenInstruction.h diff -u llvm/utils/TableGen/CodeGenInstruction.h:1.30 llvm/utils/TableGen/CodeGenInstruction.h:1.31 --- llvm/utils/TableGen/CodeGenInstruction.h:1.30 Mon Jun 18 20:48:05 2007 +++ llvm/utils/TableGen/CodeGenInstruction.h Mon Jun 25 19:48:07 2007 @@ -91,6 +91,7 @@ bool isConvertibleToThreeAddress; bool isCommutable; bool isTerminator; + bool isReMaterializable; bool hasDelaySlot; bool usesCustomDAGSchedInserter; bool hasVariableNumberOfOperands; Index: llvm/utils/TableGen/CodeGenTarget.cpp diff -u llvm/utils/TableGen/CodeGenTarget.cpp:1.94 llvm/utils/TableGen/CodeGenTarget.cpp:1.95 --- llvm/utils/TableGen/CodeGenTarget.cpp:1.94 Mon Jun 18 20:48:05 2007 +++ llvm/utils/TableGen/CodeGenTarget.cpp Mon Jun 25 19:48:07 2007 @@ -365,6 +365,7 @@ isConvertibleToThreeAddress = R->getValueAsBit("isConvertibleToThreeAddress"); isCommutable = R->getValueAsBit("isCommutable"); isTerminator = R->getValueAsBit("isTerminator"); + isReMaterializable = R->getValueAsBit("isReMaterializable"); hasDelaySlot = R->getValueAsBit("hasDelaySlot"); usesCustomDAGSchedInserter = R->getValueAsBit("usesCustomDAGSchedInserter"); hasCtrlDep = R->getValueAsBit("hasCtrlDep"); Index: llvm/utils/TableGen/InstrInfoEmitter.cpp diff -u llvm/utils/TableGen/InstrInfoEmitter.cpp:1.62 llvm/utils/TableGen/InstrInfoEmitter.cpp:1.63 --- llvm/utils/TableGen/InstrInfoEmitter.cpp:1.62 Mon Jun 18 20:48:05 2007 +++ llvm/utils/TableGen/InstrInfoEmitter.cpp Mon Jun 25 19:48:07 2007 @@ -240,6 +240,7 @@ if (Inst.isConvertibleToThreeAddress) OS << "|M_CONVERTIBLE_TO_3_ADDR"; if (Inst.isCommutable) OS << "|M_COMMUTABLE"; if (Inst.isTerminator) OS << "|M_TERMINATOR_FLAG"; + if (Inst.isReMaterializable) OS << "|M_REMATERIALIZIBLE"; if (Inst.clobbersPred) OS << "|M_CLOBBERS_PRED"; if (Inst.isNotDuplicable) OS << "|M_NOT_DUPLICABLE"; if (Inst.usesCustomDAGSchedInserter) From djg at cray.com Mon Jun 25 19:48:48 2007 From: djg at cray.com (Dan Gohman) Date: Mon, 25 Jun 2007 19:48:48 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86InstrFPStack.td X86InstrInfo.cpp X86InstrInfo.h X86InstrInfo.td X86InstrMMX.td X86InstrSSE.td Message-ID: <200706260048.l5Q0mmBj023646@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86InstrFPStack.td updated: 1.10 -> 1.11 X86InstrInfo.cpp updated: 1.92 -> 1.93 X86InstrInfo.h updated: 1.67 -> 1.68 X86InstrInfo.td updated: 1.308 -> 1.309 X86InstrMMX.td updated: 1.33 -> 1.34 X86InstrSSE.td updated: 1.186 -> 1.187 --- Log message: Revert the earlier change that removed the M_REMATERIALIZABLE machine instruction flag, and use the flag along with a virtual member function hook for targets to override if there are instructions that are only trivially rematerializable with specific operands (i.e. constant pool loads). --- Diffs of the changes: (+22 -23) X86InstrFPStack.td | 2 ++ X86InstrInfo.cpp | 17 ++++------------- X86InstrInfo.h | 2 +- X86InstrInfo.td | 2 ++ X86InstrMMX.td | 14 ++++++++------ X86InstrSSE.td | 8 +++++--- 6 files changed, 22 insertions(+), 23 deletions(-) Index: llvm/lib/Target/X86/X86InstrFPStack.td diff -u llvm/lib/Target/X86/X86InstrFPStack.td:1.10 llvm/lib/Target/X86/X86InstrFPStack.td:1.11 --- llvm/lib/Target/X86/X86InstrFPStack.td:1.10 Mon Jun 18 20:48:04 2007 +++ llvm/lib/Target/X86/X86InstrFPStack.td Mon Jun 25 19:48:07 2007 @@ -413,10 +413,12 @@ def FXCH : FPI<0xC8, AddRegFrm, (ops RST:$op), "fxch $op">, D9; // Floating point constant loads. +let isReMaterializable = 1 in { def FpLD0 : FpI<(ops RFP:$dst), ZeroArgFP, [(set RFP:$dst, fp64imm0)]>; def FpLD1 : FpI<(ops RFP:$dst), ZeroArgFP, [(set RFP:$dst, fp64imm1)]>; +} def FLD0 : FPI<0xEE, RawFrm, (ops), "fldz">, D9; def FLD1 : FPI<0xE8, RawFrm, (ops), "fld1">, D9; Index: llvm/lib/Target/X86/X86InstrInfo.cpp diff -u llvm/lib/Target/X86/X86InstrInfo.cpp:1.92 llvm/lib/Target/X86/X86InstrInfo.cpp:1.93 --- llvm/lib/Target/X86/X86InstrInfo.cpp:1.92 Mon Jun 18 20:48:04 2007 +++ llvm/lib/Target/X86/X86InstrInfo.cpp Mon Jun 25 19:48:07 2007 @@ -112,20 +112,9 @@ } -bool X86InstrInfo::isTriviallyReMaterializable(MachineInstr *MI) const { +bool X86InstrInfo::isReallyTriviallyReMaterializable(MachineInstr *MI) const { switch (MI->getOpcode()) { default: break; - case X86::FpLD0: - case X86::FpLD1: - case X86::MOV8ri: - case X86::MOV16ri: - case X86::MOV32ri: - case X86::MMX_V_SET0: - case X86::MMX_V_SETALLONES: - case X86::V_SET0: - case X86::V_SETALLONES: - // These instructions are always trivially rematerializable. - return true; case X86::MOV8rm: case X86::MOV16rm: case X86::MOV16_rm: @@ -146,7 +135,9 @@ MI->getOperand(2).getImmedValue() == 1 && MI->getOperand(3).getReg() == 0; } - return false; + // All other instructions marked M_REMATERIALIZABLE are always trivially + // rematerializable. + return true; } /// convertToThreeAddress - This method must be implemented by targets that Index: llvm/lib/Target/X86/X86InstrInfo.h diff -u llvm/lib/Target/X86/X86InstrInfo.h:1.67 llvm/lib/Target/X86/X86InstrInfo.h:1.68 --- llvm/lib/Target/X86/X86InstrInfo.h:1.67 Mon Jun 18 20:48:04 2007 +++ llvm/lib/Target/X86/X86InstrInfo.h Mon Jun 25 19:48:07 2007 @@ -239,7 +239,7 @@ unsigned& destReg) const; unsigned isLoadFromStackSlot(MachineInstr *MI, int &FrameIndex) const; unsigned isStoreToStackSlot(MachineInstr *MI, int &FrameIndex) const; - bool isTriviallyReMaterializable(MachineInstr *MI) const; + bool isReallyTriviallyReMaterializable(MachineInstr *MI) const; /// convertToThreeAddress - This method must be implemented by targets that /// set the M_CONVERTIBLE_TO_3_ADDR flag. When this flag is set, the target Index: llvm/lib/Target/X86/X86InstrInfo.td diff -u llvm/lib/Target/X86/X86InstrInfo.td:1.308 llvm/lib/Target/X86/X86InstrInfo.td:1.309 --- llvm/lib/Target/X86/X86InstrInfo.td:1.308 Mon Jun 18 20:48:04 2007 +++ llvm/lib/Target/X86/X86InstrInfo.td Mon Jun 25 19:48:07 2007 @@ -617,6 +617,7 @@ "mov{w} {$src, $dst|$dst, $src}", []>, OpSize; def MOV32rr : I<0x89, MRMDestReg, (ops GR32:$dst, GR32:$src), "mov{l} {$src, $dst|$dst, $src}", []>; +let isReMaterializable = 1 in { def MOV8ri : Ii8 <0xB0, AddRegFrm, (ops GR8 :$dst, i8imm :$src), "mov{b} {$src, $dst|$dst, $src}", [(set GR8:$dst, imm:$src)]>; @@ -626,6 +627,7 @@ def MOV32ri : Ii32<0xB8, AddRegFrm, (ops GR32:$dst, i32imm:$src), "mov{l} {$src, $dst|$dst, $src}", [(set GR32:$dst, imm:$src)]>; +} def MOV8mi : Ii8 <0xC6, MRM0m, (ops i8mem :$dst, i8imm :$src), "mov{b} {$src, $dst|$dst, $src}", [(store (i8 imm:$src), addr:$dst)]>; Index: llvm/lib/Target/X86/X86InstrMMX.td diff -u llvm/lib/Target/X86/X86InstrMMX.td:1.33 llvm/lib/Target/X86/X86InstrMMX.td:1.34 --- llvm/lib/Target/X86/X86InstrMMX.td:1.33 Mon Jun 18 20:48:05 2007 +++ llvm/lib/Target/X86/X86InstrMMX.td Mon Jun 25 19:48:07 2007 @@ -503,12 +503,14 @@ // Alias instructions that map zero vector to pxor. // FIXME: remove when we can teach regalloc that xor reg, reg is ok. -def MMX_V_SET0 : MMXI<0xEF, MRMInitReg, (ops VR64:$dst), - "pxor $dst, $dst", - [(set VR64:$dst, (v1i64 immAllZerosV))]>; -def MMX_V_SETALLONES : MMXI<0x76, MRMInitReg, (ops VR64:$dst), - "pcmpeqd $dst, $dst", - [(set VR64:$dst, (v1i64 immAllOnesV))]>; +let isReMaterializable = 1 in { + def MMX_V_SET0 : MMXI<0xEF, MRMInitReg, (ops VR64:$dst), + "pxor $dst, $dst", + [(set VR64:$dst, (v1i64 immAllZerosV))]>; + def MMX_V_SETALLONES : MMXI<0x76, MRMInitReg, (ops VR64:$dst), + "pcmpeqd $dst, $dst", + [(set VR64:$dst, (v1i64 immAllOnesV))]>; +} //===----------------------------------------------------------------------===// // Non-Instruction Patterns Index: llvm/lib/Target/X86/X86InstrSSE.td diff -u llvm/lib/Target/X86/X86InstrSSE.td:1.186 llvm/lib/Target/X86/X86InstrSSE.td:1.187 --- llvm/lib/Target/X86/X86InstrSSE.td:1.186 Mon Jun 25 10:44:19 2007 +++ llvm/lib/Target/X86/X86InstrSSE.td Mon Jun 25 19:48:07 2007 @@ -762,6 +762,7 @@ // Alias instructions that map zero vector to pxor / xorp* for sse. // FIXME: remove when we can teach regalloc that xor reg, reg is ok. +let isReMaterializable = 1 in def V_SET0 : PSI<0x57, MRMInitReg, (ops VR128:$dst), "xorps $dst, $dst", [(set VR128:$dst, (v4f32 immAllZerosV))]>; @@ -1821,9 +1822,10 @@ // Alias instructions that map zero vector to pxor / xorp* for sse. // FIXME: remove when we can teach regalloc that xor reg, reg is ok. -def V_SETALLONES : PDI<0x76, MRMInitReg, (ops VR128:$dst), - "pcmpeqd $dst, $dst", - [(set VR128:$dst, (v2f64 immAllOnesV))]>; +let isReMaterializable = 1 in + def V_SETALLONES : PDI<0x76, MRMInitReg, (ops VR128:$dst), + "pcmpeqd $dst, $dst", + [(set VR128:$dst, (v2f64 immAllOnesV))]>; // FR64 to 128-bit vector conversion. def MOVSD2PDrr : SDI<0x10, MRMSrcReg, (ops VR128:$dst, FR64:$src), From duraid at octopus.com.au Mon Jun 25 22:23:11 2007 From: duraid at octopus.com.au (Duraid Madina) Date: Mon, 25 Jun 2007 22:23:11 -0500 Subject: [llvm-commits] CVS: llvm-test/Makefile.programs Message-ID: <200706260323.l5Q3NBQx026169@zion.cs.uiuc.edu> Changes in directory llvm-test: Makefile.programs updated: 1.269 -> 1.270 --- Log message: give the bigblock allocator a workout --- Diffs of the changes: (+1 -1) Makefile.programs | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-test/Makefile.programs diff -u llvm-test/Makefile.programs:1.269 llvm-test/Makefile.programs:1.270 --- llvm-test/Makefile.programs:1.269 Wed Jun 20 18:48:01 2007 +++ llvm-test/Makefile.programs Mon Jun 25 22:22:13 2007 @@ -235,7 +235,7 @@ LLCBETAOPTION := -sched=simple endif ifeq ($(ARCH),x86) -LLCBETAOPTION := -regalloc=local -fast +LLCBETAOPTION := -regalloc=bigblock -fast endif ifeq ($(ARCH),Sparc) LLCBETAOPTION := -enable-sparc-v9-insts From clattner at apple.com Tue Jun 26 00:51:19 2007 From: clattner at apple.com (Chris Lattner) Date: Mon, 25 Jun 2007 22:51:19 -0700 Subject: [llvm-commits] [llvm-gcc] llvm-gcc patch for PR1373 (review only) In-Reply-To: <8abe0dc60706250857r258da393n15c41a7e24889a4a@mail.gmail.com> References: <8abe0dc60706250857r258da393n15c41a7e24889a4a@mail.gmail.com> Message-ID: On Jun 25, 2007, at 8:57 AM, Zhou Sheng wrote: > Hi All, > > Here is the llvm-gcc patch for PR1373. It makes llvm-gcc to emit > noalias parameter attribute as well as noalias intrinsic. Note this > patch is just for review. Please give me some suggestion to improve > it. Thanks. > The patch looks good. I'd suggest splitting it into two changes though: First, introduce the parameter attribute. Your code to do this looks good, but please add support for REFERENCE_TYPE as well (for c++ restrict references). When this goes in, basicaa can be enhanced to use this info and we can get some idea how well this works. As a second step, the noalias intrinsic can be added. This is more likely to disrupt code, and we'll have to closely monitor it when it goes it (we don't want it to block mem2reg etc). In practice, we'll want to add the intrinsic to llvm, then start updating important optimizations to see through it (e.g. mem2reg and scalarrepl), then turn it on in the front-end. If you send a patch for just adding restrict support for arguments, that handles pointers and references, I'd be happy to check it in. Nice work! -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070625/4963a286/attachment.html From clattner at apple.com Tue Jun 26 01:02:06 2007 From: clattner at apple.com (Chris Lattner) Date: Mon, 25 Jun 2007 23:02:06 -0700 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/CallingConvLower.h SelectionDAG.h SelectionDAGNodes.h ValueTypes.h In-Reply-To: <200706251624.l5PGODi8032282@zion.cs.uiuc.edu> References: <200706251624.l5PGODi8032282@zion.cs.uiuc.edu> Message-ID: <5B848994-2CE1-4F9C-A15E-F4325FDDDC00@apple.com> > Generalize MVT::ValueType and associated functions to be able to > represent > extended vector types. Whoa, I'm surprised to see this so soon! > @@ -45,10 +46,6 @@ > > isVoid = 12, // This has no value > > - Vector = 13, // This is an abstract vector type, > which will > - // be expanded into a target vector > type, or scalars > - // if no matching vector type is > available. > - > v8i8 = 14, // 8 x i8 > v4i16 = 15, // 4 x i16 > v2i32 = 16, // 2 x i32 Should the value of these all slide up to avoid the hole at "13"? > @@ -76,64 +73,55 @@ > iPTR = 255 is 255 a good sentinel for iPTR anymore? Would we gain anything by making SimpleTypeBits less than 8? > + /// MVT::ValueType - This type holds low-level value types. > Valid values > + /// include any of the values in the SimpleValueType enum, or > any value > + /// returned from a function in the MVT namespace that has a > ValueType > + /// return type. Any value type equal to one of the > SimpleValueType enum > + /// values is a "simple" value type. All other value types are > "extended". > + /// > + /// Note that simple doesn't necessary mean legal for the target > machine. > + /// All legal value types must be simple, but often there are > some simple > + /// value types that are not legal. > + typedef uint32_t ValueType; This would be a great place to talk about what non-simple value types currently exist, and how they are encoded. > + /// MVT::isExtendedValueType - Test if the given ValueType is > extended > + /// (as opposed to being simple). > + static inline bool isExtendedValueType(ValueType VT) { > + return VT & ~SimpleTypeMask; > } I notice that several places use !MVT::isExtendedValueType(VT). Please add MVT::isSimpleValueType() Would it make sense to shrinkify these to MVT::isExtendedVT() and MVT::isSimpleVT()? ValueType and the namespace are somewhat redundant with each other. -Chris From clattner at apple.com Tue Jun 26 01:11:25 2007 From: clattner at apple.com (Chris Lattner) Date: Mon, 25 Jun 2007 23:11:25 -0700 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/CallingConvLower.h SelectionDAG.h SelectionDAGNodes.h ValueTypes.h In-Reply-To: <5B848994-2CE1-4F9C-A15E-F4325FDDDC00@apple.com> References: <200706251624.l5PGODi8032282@zion.cs.uiuc.edu> <5B848994-2CE1-4F9C-A15E-F4325FDDDC00@apple.com> Message-ID: <2057E4D9-8DF2-43BD-A747-5E2094DAB4EB@apple.com> On Jun 25, 2007, at 11:02 PM, Chris Lattner wrote: >> + /// MVT::isExtendedValueType - Test if the given ValueType is >> extended >> + /// (as opposed to being simple). >> + static inline bool isExtendedValueType(ValueType VT) { >> + return VT & ~SimpleTypeMask; >> } Oh, one other thing. Empirically, GCC is not optimizing this to VT > 255, which hurts on ppc and probably other targets (as this is often inlined into if conditions). Since this is frequently executed, could you please manual do this xform? yes, llvm does get this right. :) -Chris From clattner at apple.com Tue Jun 26 01:13:20 2007 From: clattner at apple.com (Chris Lattner) Date: Mon, 25 Jun 2007 23:13:20 -0700 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/TargetLowering.h In-Reply-To: <200706251624.l5PGO2dK032264@zion.cs.uiuc.edu> References: <200706251624.l5PGO2dK032264@zion.cs.uiuc.edu> Message-ID: <13673F5E-B06C-4185-86A8-E3492D317F92@apple.com> > @@ -129,7 +130,9 @@ > /// specified value type. This means that it has a register > that directly > /// holds it without promotions or expansions. > bool isTypeLegal(MVT::ValueType VT) const { > - return RegClassForVT[VT] != 0; > + return !MVT::isExtendedValueType(VT) ? > + RegClassForVT[VT] != 0 : > + false; > } This could be written more naturally as: return MVT::isSimpleVT(VT) && RegClassForVT[VT] != 0; > @@ -147,9 +150,12 @@ > } > > LegalizeAction getTypeAction(MVT::ValueType VT) const { > - return (LegalizeAction)((ValueTypeActions[VT>>4] >> ((2*VT) > & 31)) & 3); > + return !MVT::isExtendedValueType(VT) ? > + (LegalizeAction)((ValueTypeActions[VT>>4] >> ((2*VT) > & 31)) & 3) : > + Expand; > } I think this would be more clear with an explicit: if (MVT::isExtendedValueType(VT)) return Expand; instead of ?: :) > @@ -242,7 +253,9 @@ > /// expanded to some other code sequence, or the target has a > custom expander > /// for it. > LegalizeAction getOperationAction(unsigned Op, MVT::ValueType > VT) const { > - return (LegalizeAction)((OpActions[Op] >> (2*VT)) & 3); > + return !MVT::isExtendedValueType(VT) ? > + (LegalizeAction)((OpActions[Op] >> (2*VT)) & 3) : > + Expand; > } > > /// isOperationLegal - Return true if the specified operation is > legal on this > @@ -257,7 +270,9 @@ > /// expanded to some other code sequence, or the target has a > custom expander > /// for it. > LegalizeAction getLoadXAction(unsigned LType, MVT::ValueType VT) > const { > - return (LegalizeAction)((LoadXActions[LType] >> (2*VT)) & 3); > + return !MVT::isExtendedValueType(VT) ? > + (LegalizeAction)((LoadXActions[LType] >> (2*VT)) & 3) : > + Expand; > } > > /// isLoadXLegal - Return true if the specified load with > extension is legal > @@ -272,7 +287,9 @@ > /// expanded to some other code sequence, or the target has a > custom expander > /// for it. > LegalizeAction getStoreXAction(MVT::ValueType VT) const { > - return (LegalizeAction)((StoreXActions >> (2*VT)) & 3); > + return !MVT::isExtendedValueType(VT) ? > + (LegalizeAction)((StoreXActions >> (2*VT)) & 3) : > + Expand; > } > > /// isStoreXLegal - Return true if the specified store with > truncation is > @@ -287,7 +304,9 @@ > /// for it. > LegalizeAction > getIndexedLoadAction(unsigned IdxMode, MVT::ValueType VT) const { > - return (LegalizeAction)((IndexedModeActions[0][IdxMode] >> > (2*VT)) & 3); > + return !MVT::isExtendedValueType(VT) ? > + (LegalizeAction)((IndexedModeActions[0][IdxMode] >> > (2*VT)) & 3) : > + Expand; > } > > /// isIndexedLoadLegal - Return true if the specified indexed > load is legal > @@ -303,7 +322,9 @@ > /// for it. > LegalizeAction > getIndexedStoreAction(unsigned IdxMode, MVT::ValueType VT) const { > - return (LegalizeAction)((IndexedModeActions[1][IdxMode] >> > (2*VT)) & 3); > + return !MVT::isExtendedValueType(VT) ? > + (LegalizeAction)((IndexedModeActions[1][IdxMode] >> > (2*VT)) & 3) : > + Expand; > } I think these would also be more clear with an explicit if stmt, but if you disagree, feel free to leave them. -Chris From clattner at apple.com Tue Jun 26 01:14:33 2007 From: clattner at apple.com (Chris Lattner) Date: Mon, 25 Jun 2007 23:14:33 -0700 Subject: [llvm-commits] CVS: llvm/lib/VMCore/ValueTypes.cpp In-Reply-To: <200706251624.l5PGOD8J032287@zion.cs.uiuc.edu> References: <200706251624.l5PGOD8J032287@zion.cs.uiuc.edu> Message-ID: <03431437-0BA1-4B9E-BB38-77B250AE7A6C@apple.com> > @@ -14,13 +14,21 @@ > #include "llvm/CodeGen/ValueTypes.h" > #include "llvm/Type.h" > #include "llvm/DerivedTypes.h" > +#include > using namespace llvm; Please use utostr() in llvm/ADT/StringExtras.h instead of sstream. -Chris From clattner at apple.com Tue Jun 26 01:46:29 2007 From: clattner at apple.com (Chris Lattner) Date: Mon, 25 Jun 2007 23:46:29 -0700 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp In-Reply-To: <200706251624.l5PGOE6v032300@zion.cs.uiuc.edu> References: <200706251624.l5PGOE6v032300@zion.cs.uiuc.edu> Message-ID: <696AA14D-F92F-4448-AB54-61C53D4780B3@apple.com> Another great change. > @@ -856,6 +844,10 @@ > ConstantSDNode *N0C = dyn_cast(N0); > ConstantSDNode *N1C = dyn_cast(N1); > MVT::ValueType VT = N0.getValueType(); > + > + // fold vector ops > + SDOperand FoldedVOp = SimplifyVBinOp(N); > + if (FoldedVOp.Val) return FoldedVOp; I'm concerned that this adds a significant amount of control flow for non-vector operations. What do you think of: // fold vector ops if (MVT::isVector(N->getValueType(VT))) { SDOperand FoldedVOp = SimplifyVBinOp(N); if (FoldedVOp.Val) return FoldedVOp; } for each of these? > @@ -1098,6 +1106,11 @@ > SDOperand RMUL = ReassociateOps(ISD::MUL, N0, N1); > if (RMUL.Val != 0) > return RMUL; > + > + // If either operand is undef, the result is undef > + if (N0.getOpcode() == ISD::UNDEF || N1.getOpcode() == ISD::UNDEF) > + return DAG.getNode(ISD::UNDEF, VT); > + > return SDOperand(); > } This isn't safe for multiply. In particular, undef*X could be well defined to be 0 if X is dynamically always zero. As such, this should return Zero. Note that this should return vector zero (or disable the xform) in the vector case. This xform is safe for add/sub, because there is no defined value that (when combined with an undef) can produce a defined result. > @@ -1162,6 +1179,11 @@ > SDOperand Op = BuildSDIV(N); > if (Op.Val) return Op; > } > + > + // If either operand is undef, the result is undef > + if (N0.getOpcode() == ISD::UNDEF || N1.getOpcode() == ISD::UNDEF) > + return DAG.getNode(ISD::UNDEF, VT); > + > return SDOperand(); > } This is not safe for sdiv/udiv. Safe xforms are: // undef / X -> 0 // X / undef -> undef If in doubt, plz check instcombine. > @@ -1229,6 +1260,10 @@ > return Sub; > } > > + // If either operand is undef, the result is undef > + if (N0.getOpcode() == ISD::UNDEF || N1.getOpcode() == ISD::UNDEF) > + return DAG.getNode(ISD::UNDEF, VT); > + > return SDOperand(); > } // undef % X -> 0 // X % undef -> undef for both srem and urem. > @@ -1283,6 +1323,10 @@ > return DAG.getNode(ISD::SRA, N0.getValueType(), N0, > DAG.getConstant(MVT::getSizeInBits > (N0.getValueType())-1, > TLI.getShiftAmountTy())); > + // If either operand is undef, the result is undef > + if (N0.getOpcode() == ISD::UNDEF || N1.getOpcode() == ISD::UNDEF) > + return DAG.getNode(ISD::UNDEF, VT); mulhs/mulhu seem to be the same as mul, they should produce zero instead of undef. > @@ -1336,6 +1385,10 @@ > return DAG.getNode(N0.getOpcode(), VT, ORNode, N0.getOperand(1)); > } > > + // If either operand is undef, the result is undef > + if (N0.getOpcode() == ISD::UNDEF || N1.getOpcode() == ISD::UNDEF) > + return DAG.getNode(ISD::UNDEF, VT); I think this is dead. The only way to get into this code is if N0- >opcode == N1->opcode. > @@ -2742,6 +2807,30 @@ > SDOperand N0 = N->getOperand(0); > MVT::ValueType VT = N->getValueType(0); > > + // If the input is a BUILD_VECTOR with all constant elements, > fold this now. > + // Only do this before legalize, since afterward the target may > be depending > + // on the bitconvert. Interesting. This is a good solution for now, but maybe this argues for having a "target build vector", like "target constant", which would be unmolested by the optimizer? > + MVT::ValueType VT = MVT::getVectorType(DstEltVT, > + Ops.size()); > + return DAG.getNode(ISD::BUILD_VECTOR, VT, &Ops[0], Ops.size()); This idiom occurs in several places. Do you think it makes sense to have a helper method on SelectionDAG to do this? > +SDOperand DAGCombiner::visitCONCAT_VECTORS(SDNode *N) { > + // TODO: Check to see if this is a CONCAT_VECTORS of a bunch of > + // EXTRACT_SUBVECTOR operations. If so, and if the > EXTRACT_SUBVECTOR vector > + // inputs come from at most two distinct vectors, turn this into > a shuffle > + // node. Also, if they come from a single vector with the right subvectors, it could be a noop :) > @@ -4177,24 +4121,28 @@ > return SDOperand(); > } > > +/// SimplifyVBinOp - Visit a binary vector operation, like ADD. > +SDOperand DAGCombiner::SimplifyVBinOp(SDNode *N) { > + // After legalize, the target may be depending on adds and other > + // binary ops to provide legal ways to construct constants or other > + // things. Simplifying them may result in a loss of legality. > + if (AfterLegalize) return SDOperand(); It would be nice if this wasn't required :( More tomorrow. Thanks again for tackling this Dan! -Chris From djg at cray.com Tue Jun 26 09:30:08 2007 From: djg at cray.com (Dan Gohman) Date: Tue, 26 Jun 2007 09:30:08 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/ValueTypes.h ValueTypes.td Message-ID: <200706261430.l5QEU83t002245@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: ValueTypes.h updated: 1.36 -> 1.37 ValueTypes.td updated: 1.4 -> 1.5 --- Log message: Renumber the SimpleValueType values to fill in the hole left by removing MVT::Vector. --- Diffs of the changes: (+24 -25) ValueTypes.h | 26 +++++++++++++------------- ValueTypes.td | 23 +++++++++++------------ 2 files changed, 24 insertions(+), 25 deletions(-) Index: llvm/include/llvm/CodeGen/ValueTypes.h diff -u llvm/include/llvm/CodeGen/ValueTypes.h:1.36 llvm/include/llvm/CodeGen/ValueTypes.h:1.37 --- llvm/include/llvm/CodeGen/ValueTypes.h:1.36 Mon Jun 25 11:23:39 2007 +++ llvm/include/llvm/CodeGen/ValueTypes.h Tue Jun 26 09:28:59 2007 @@ -46,22 +46,22 @@ isVoid = 12, // This has no value - v8i8 = 14, // 8 x i8 - v4i16 = 15, // 4 x i16 - v2i32 = 16, // 2 x i32 - v1i64 = 17, // 1 x i64 - v16i8 = 18, // 16 x i8 - v8i16 = 19, // 8 x i16 - v4i32 = 20, // 4 x i32 - v2i64 = 21, // 2 x i64 - - v2f32 = 22, // 2 x f32 - v4f32 = 23, // 4 x f32 - v2f64 = 24, // 2 x f64 + v8i8 = 13, // 8 x i8 + v4i16 = 14, // 4 x i16 + v2i32 = 15, // 2 x i32 + v1i64 = 16, // 1 x i64 + v16i8 = 17, // 16 x i8 + v8i16 = 18, // 8 x i16 + v4i32 = 19, // 4 x i32 + v2i64 = 20, // 2 x i64 + + v2f32 = 21, // 2 x f32 + v4f32 = 22, // 4 x f32 + v2f64 = 23, // 2 x f64 FIRST_VECTOR_VALUETYPE = v8i8, LAST_VECTOR_VALUETYPE = v2f64, - LAST_VALUETYPE = 25, // This always remains at the end of the list. + LAST_VALUETYPE = 24, // This always remains at the end of the list. // iAny - An integer value of any bit width. This is used for intrinsics // that have overloadings based on integer bit widths. This is only for Index: llvm/include/llvm/CodeGen/ValueTypes.td diff -u llvm/include/llvm/CodeGen/ValueTypes.td:1.4 llvm/include/llvm/CodeGen/ValueTypes.td:1.5 --- llvm/include/llvm/CodeGen/ValueTypes.td:1.4 Sun Apr 1 02:17:45 2007 +++ llvm/include/llvm/CodeGen/ValueTypes.td Tue Jun 26 09:28:59 2007 @@ -32,19 +32,18 @@ def f128 : ValueType<128, 10>; // 128-bit floating point value def FlagVT : ValueType<0 , 11>; // Condition code or machine flag def isVoid : ValueType<0 , 12>; // Produces no value -def Vector : ValueType<0 , 13>; // Abstract vector value -def v8i8 : ValueType<64 , 14>; // 8 x i8 vector value -def v4i16 : ValueType<64 , 15>; // 4 x i16 vector value -def v2i32 : ValueType<64 , 16>; // 2 x i32 vector value -def v1i64 : ValueType<64 , 17>; // 1 x i64 vector value +def v8i8 : ValueType<64 , 13>; // 8 x i8 vector value +def v4i16 : ValueType<64 , 14>; // 4 x i16 vector value +def v2i32 : ValueType<64 , 15>; // 2 x i32 vector value +def v1i64 : ValueType<64 , 16>; // 1 x i64 vector value -def v16i8 : ValueType<128, 18>; // 16 x i8 vector value -def v8i16 : ValueType<128, 19>; // 8 x i16 vector value -def v4i32 : ValueType<128, 20>; // 4 x i32 vector value -def v2i64 : ValueType<128, 21>; // 2 x i64 vector value -def v2f32 : ValueType<64, 22>; // 2 x f32 vector value -def v4f32 : ValueType<128, 23>; // 4 x f32 vector value -def v2f64 : ValueType<128, 24>; // 2 x f64 vector value +def v16i8 : ValueType<128, 17>; // 16 x i8 vector value +def v8i16 : ValueType<128, 18>; // 8 x i16 vector value +def v4i32 : ValueType<128, 19>; // 4 x i32 vector value +def v2i64 : ValueType<128, 20>; // 2 x i64 vector value +def v2f32 : ValueType<64, 21>; // 2 x f32 vector value +def v4f32 : ValueType<128, 22>; // 4 x f32 vector value +def v2f64 : ValueType<128, 23>; // 2 x f64 vector value // Pseudo valuetype to represent "integer of any bit width" def iAny : ValueType<0 , 254>; // integer value of any bit width From djg at cray.com Tue Jun 26 10:01:05 2007 From: djg at cray.com (Dan Gohman) Date: Tue, 26 Jun 2007 10:01:05 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Message-ID: <20070626150105.GN5693@village.us.cray.com> Hi Chris, Thanks for all the review comments! I've addressed a few comments below; I'll get to the others soon. >> @@ -1162,6 +1179,11 @@ >> SDOperand Op = BuildSDIV(N); >> if (Op.Val) return Op; >> } >> + >> + // If either operand is undef, the result is undef >> + if (N0.getOpcode() == ISD::UNDEF || N1.getOpcode() == ISD::UNDEF) >> + return DAG.getNode(ISD::UNDEF, VT); >> + >> return SDOperand(); >> } > > This is not safe for sdiv/udiv. Safe xforms are: > > // undef / X -> 0 > // X / undef -> undef > > If in doubt, plz check instcombine. Thanks for correcting me on the undef rules. I'll check in a fix for the code soon. For this sdiv/udiv one though, why is undef/X not undef? For any non-zero value of X there's at least one value the undef might have which makes the divide have a non-zero result. >> @@ -2742,6 +2807,30 @@ >> SDOperand N0 = N->getOperand(0); >> MVT::ValueType VT = N->getValueType(0); >> >> + // If the input is a BUILD_VECTOR with all constant elements, >> fold this now. >> + // Only do this before legalize, since afterward the target may >> be depending >> + // on the bitconvert. > > Interesting. This is a good solution for now, but maybe this argues > for having a "target build vector", like "target constant", which > would be unmolested by the optimizer? It's a similar situation for SimplifyVBinOp, and a few other places, as you noticed, and we don't want to clone all those if we don't need to. An alternative would be to replace the conservative checks with specific checks for !AfterLegalize || TLI.isOperationLegal(....) as is done in other places to protect against creating illegal nodes. >> + MVT::ValueType VT = MVT::getVectorType(DstEltVT, >> + Ops.size()); >> + return DAG.getNode(ISD::BUILD_VECTOR, VT, &Ops[0], Ops.size()); > > This idiom occurs in several places. Do you think it makes sense to > have a helper method on SelectionDAG to do this? Sure. Dan -- Dan Gohman, Cray Inc. From djg at cray.com Tue Jun 26 10:15:20 2007 From: djg at cray.com (Dan Gohman) Date: Tue, 26 Jun 2007 10:15:20 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/ValueTypes.cpp Message-ID: <200706261515.l5QFFK1F004284@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: ValueTypes.cpp updated: 1.19 -> 1.20 --- Log message: Use utostr from StringExtras.h instead of ostringstream from . --- Diffs of the changes: (+4 -7) ValueTypes.cpp | 11 ++++------- 1 files changed, 4 insertions(+), 7 deletions(-) Index: llvm/lib/VMCore/ValueTypes.cpp diff -u llvm/lib/VMCore/ValueTypes.cpp:1.19 llvm/lib/VMCore/ValueTypes.cpp:1.20 --- llvm/lib/VMCore/ValueTypes.cpp:1.19 Mon Jun 25 11:23:39 2007 +++ llvm/lib/VMCore/ValueTypes.cpp Tue Jun 26 10:14:48 2007 @@ -11,10 +11,10 @@ // //===----------------------------------------------------------------------===// +#include "llvm/ADT/StringExtras.h" #include "llvm/CodeGen/ValueTypes.h" #include "llvm/Type.h" #include "llvm/DerivedTypes.h" -#include using namespace llvm; /// MVT::getValueTypeString - This function returns value type as a string, @@ -22,12 +22,9 @@ std::string MVT::getValueTypeString(MVT::ValueType VT) { switch (VT) { default: - if (isExtendedValueType(VT)) { - std::ostringstream OS; - OS << "v" << getVectorNumElements(VT) - << getValueTypeString(getVectorElementType(VT)); - return OS.str(); - } + if (isExtendedValueType(VT)) + return "v" + utostr(getVectorNumElements(VT)) + + getValueTypeString(getVectorElementType(VT)); assert(0 && "Invalid ValueType!"); case MVT::i1: return "i1"; case MVT::i8: return "i8"; From djg at cray.com Tue Jun 26 10:16:50 2007 From: djg at cray.com (Dan Gohman) Date: Tue, 26 Jun 2007 10:16:50 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/TargetLowering.h Message-ID: <200706261516.l5QFGo4h004326@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Target: TargetLowering.h updated: 1.130 -> 1.131 --- Log message: Simplify the expression for TargetLowering::isTypeLegal. --- Diffs of the changes: (+1 -3) TargetLowering.h | 4 +--- 1 files changed, 1 insertion(+), 3 deletions(-) Index: llvm/include/llvm/Target/TargetLowering.h diff -u llvm/include/llvm/Target/TargetLowering.h:1.130 llvm/include/llvm/Target/TargetLowering.h:1.131 --- llvm/include/llvm/Target/TargetLowering.h:1.130 Mon Jun 25 11:23:39 2007 +++ llvm/include/llvm/Target/TargetLowering.h Tue Jun 26 10:16:27 2007 @@ -130,9 +130,7 @@ /// specified value type. This means that it has a register that directly /// holds it without promotions or expansions. bool isTypeLegal(MVT::ValueType VT) const { - return !MVT::isExtendedValueType(VT) ? - RegClassForVT[VT] != 0 : - false; + return !MVT::isExtendedValueType(VT) && RegClassForVT[VT] != 0; } class ValueTypeActionImpl { From djg at cray.com Tue Jun 26 10:20:26 2007 From: djg at cray.com (Dan Gohman) Date: Tue, 26 Jun 2007 10:20:26 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/ValueTypes.h Message-ID: <200706261520.l5QFKQkb004412@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: ValueTypes.h updated: 1.37 -> 1.38 --- Log message: Simplify the expression for MVT::isExtendedValueType. --- Diffs of the changes: (+1 -1) ValueTypes.h | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/include/llvm/CodeGen/ValueTypes.h diff -u llvm/include/llvm/CodeGen/ValueTypes.h:1.37 llvm/include/llvm/CodeGen/ValueTypes.h:1.38 --- llvm/include/llvm/CodeGen/ValueTypes.h:1.37 Tue Jun 26 09:28:59 2007 +++ llvm/include/llvm/CodeGen/ValueTypes.h Tue Jun 26 10:20:04 2007 @@ -92,7 +92,7 @@ /// MVT::isExtendedValueType - Test if the given ValueType is extended /// (as opposed to being simple). static inline bool isExtendedValueType(ValueType VT) { - return VT & ~SimpleTypeMask; + return VT > SimpleTypeMask; } /// MVT::isInteger - Return true if this is an integer, or a vector integer From sabre at nondot.org Tue Jun 26 11:13:03 2007 From: sabre at nondot.org (Chris Lattner) Date: Tue, 26 Jun 2007 11:13:03 -0500 Subject: [llvm-commits] CVS: llvm-test/Makefile.programs Message-ID: <200706261613.l5QGD3fa005570@zion.cs.uiuc.edu> Changes in directory llvm-test: Makefile.programs updated: 1.270 -> 1.271 --- Log message: switch back to local. Duraid has plenty of todo items from last night's run :) --- Diffs of the changes: (+1 -1) Makefile.programs | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-test/Makefile.programs diff -u llvm-test/Makefile.programs:1.270 llvm-test/Makefile.programs:1.271 --- llvm-test/Makefile.programs:1.270 Mon Jun 25 22:22:13 2007 +++ llvm-test/Makefile.programs Tue Jun 26 11:12:31 2007 @@ -235,7 +235,7 @@ LLCBETAOPTION := -sched=simple endif ifeq ($(ARCH),x86) -LLCBETAOPTION := -regalloc=bigblock -fast +LLCBETAOPTION := -regalloc=local -fast endif ifeq ($(ARCH),Sparc) LLCBETAOPTION := -enable-sparc-v9-insts From djg at cray.com Tue Jun 26 11:19:31 2007 From: djg at cray.com (Dan Gohman) Date: Tue, 26 Jun 2007 11:19:31 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/TargetLowering.h Message-ID: <200706261619.l5QGJVUJ005719@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Target: TargetLowering.h updated: 1.131 -> 1.132 --- Log message: Replace ?: with if statements, for clarity. --- Diffs of the changes: (+12 -18) TargetLowering.h | 30 ++++++++++++------------------ 1 files changed, 12 insertions(+), 18 deletions(-) Index: llvm/include/llvm/Target/TargetLowering.h diff -u llvm/include/llvm/Target/TargetLowering.h:1.131 llvm/include/llvm/Target/TargetLowering.h:1.132 --- llvm/include/llvm/Target/TargetLowering.h:1.131 Tue Jun 26 10:16:27 2007 +++ llvm/include/llvm/Target/TargetLowering.h Tue Jun 26 11:19:08 2007 @@ -148,9 +148,8 @@ } LegalizeAction getTypeAction(MVT::ValueType VT) const { - return !MVT::isExtendedValueType(VT) ? - (LegalizeAction)((ValueTypeActions[VT>>4] >> ((2*VT) & 31)) & 3) : - Expand; + if (MVT::isExtendedValueType(VT)) return Expand; + return (LegalizeAction)((ValueTypeActions[VT>>4] >> ((2*VT) & 31)) & 3); } void setTypeAction(MVT::ValueType VT, LegalizeAction Action) { assert(!MVT::isExtendedValueType(VT)); @@ -251,9 +250,8 @@ /// expanded to some other code sequence, or the target has a custom expander /// for it. LegalizeAction getOperationAction(unsigned Op, MVT::ValueType VT) const { - return !MVT::isExtendedValueType(VT) ? - (LegalizeAction)((OpActions[Op] >> (2*VT)) & 3) : - Expand; + if (MVT::isExtendedValueType(VT)) return Expand; + return (LegalizeAction)((OpActions[Op] >> (2*VT)) & 3); } /// isOperationLegal - Return true if the specified operation is legal on this @@ -268,9 +266,8 @@ /// expanded to some other code sequence, or the target has a custom expander /// for it. LegalizeAction getLoadXAction(unsigned LType, MVT::ValueType VT) const { - return !MVT::isExtendedValueType(VT) ? - (LegalizeAction)((LoadXActions[LType] >> (2*VT)) & 3) : - Expand; + if (MVT::isExtendedValueType(VT)) return Expand; + return (LegalizeAction)((LoadXActions[LType] >> (2*VT)) & 3); } /// isLoadXLegal - Return true if the specified load with extension is legal @@ -285,9 +282,8 @@ /// expanded to some other code sequence, or the target has a custom expander /// for it. LegalizeAction getStoreXAction(MVT::ValueType VT) const { - return !MVT::isExtendedValueType(VT) ? - (LegalizeAction)((StoreXActions >> (2*VT)) & 3) : - Expand; + if (MVT::isExtendedValueType(VT)) return Expand; + return (LegalizeAction)((StoreXActions >> (2*VT)) & 3); } /// isStoreXLegal - Return true if the specified store with truncation is @@ -302,9 +298,8 @@ /// for it. LegalizeAction getIndexedLoadAction(unsigned IdxMode, MVT::ValueType VT) const { - return !MVT::isExtendedValueType(VT) ? - (LegalizeAction)((IndexedModeActions[0][IdxMode] >> (2*VT)) & 3) : - Expand; + if (MVT::isExtendedValueType(VT)) return Expand; + return (LegalizeAction)((IndexedModeActions[0][IdxMode] >> (2*VT)) & 3); } /// isIndexedLoadLegal - Return true if the specified indexed load is legal @@ -320,9 +315,8 @@ /// for it. LegalizeAction getIndexedStoreAction(unsigned IdxMode, MVT::ValueType VT) const { - return !MVT::isExtendedValueType(VT) ? - (LegalizeAction)((IndexedModeActions[1][IdxMode] >> (2*VT)) & 3) : - Expand; + if (MVT::isExtendedValueType(VT)) return Expand; + return (LegalizeAction)((IndexedModeActions[1][IdxMode] >> (2*VT)) & 3); } /// isIndexedStoreLegal - Return true if the specified indexed load is legal From johannes at apple.com Tue Jun 26 11:45:24 2007 From: johannes at apple.com (johannes at apple.com) Date: Tue, 26 Jun 2007 09:45:24 -0700 (PDT) Subject: [llvm-commits] [128838] Don't assume &P[0] is nonnull in LLVM. Message-ID: <20070626164524.8559EADBBC7C@src> Revision: 128838 Author: johannes Date: 2007-06-26 09:45:24 -0700 (Tue, 26 Jun 2007) Log Message: ----------- Don't assume &P[0] is nonnull in LLVM. Modified Paths: -------------- apple-local/branches/llvm/gcc/c-common.c Modified: apple-local/branches/llvm/gcc/c-common.c =================================================================== --- apple-local/branches/llvm/gcc/c-common.c 2007-06-26 15:41:13 UTC (rev 128837) +++ apple-local/branches/llvm/gcc/c-common.c 2007-06-26 16:45:24 UTC (rev 128838) @@ -2636,6 +2636,18 @@ && DECL_EXTERNAL (TREE_OPERAND (expr, 0))) break; +/* APPLE LOCAL begin llvm */ +#if ENABLE_LLVM + /* LLVM extends ARRAY_REF to allow pointers to be the base value. It is not + valid to assume ADDR of this is nonzero, because it could be derived from + original (P+constant). Radar 5286401. */ + if (TREE_CODE (TREE_OPERAND (expr, 0)) == ARRAY_REF + && TREE_CODE (TREE_TYPE (TREE_OPERAND (TREE_OPERAND (expr, 0), 0))) + != ARRAY_TYPE) + break; +#endif +/* APPLE LOCAL end llvm */ + if (TREE_SIDE_EFFECTS (TREE_OPERAND (expr, 0))) return build2 (COMPOUND_EXPR, truthvalue_type_node, TREE_OPERAND (expr, 0), truthvalue_true_node); From johannes at apple.com Tue Jun 26 11:46:15 2007 From: johannes at apple.com (johannes at apple.com) Date: Tue, 26 Jun 2007 09:46:15 -0700 (PDT) Subject: [llvm-commits] [128839] Fix a couple of objC-specific name encodings for LLVM. Message-ID: <20070626164615.8474AADBC48C@src> Revision: 128839 Author: johannes Date: 2007-06-26 09:46:15 -0700 (Tue, 26 Jun 2007) Log Message: ----------- Fix a couple of objC-specific name encodings for LLVM. Modified Paths: -------------- apple-local/branches/llvm/gcc/objc/objc-act.c Modified: apple-local/branches/llvm/gcc/objc/objc-act.c =================================================================== --- apple-local/branches/llvm/gcc/objc/objc-act.c 2007-06-26 16:45:24 UTC (rev 128838) +++ apple-local/branches/llvm/gcc/objc/objc-act.c 2007-06-26 16:46:15 UTC (rev 128839) @@ -18152,6 +18152,13 @@ DECL_INITIAL (decl) = exp; TREE_STATIC (decl) = 1; TREE_USED (decl) = 1; +/* APPLE LOCAL begin LLVM */ +#ifdef ENABLE_LLVM + /* This decl's name is special. Ask llvm to not add leading underscore by + setting it as a user supplied asm name. */ + set_user_assembler_name(decl, string); +#endif ENABLE_LLVM +/* APPLE LOCAL end LLVM */ pushdecl (decl); rest_of_decl_compilation (decl, 0, 0); @@ -18188,8 +18195,16 @@ /* Do the same for categories. Even though no references to these symbols are generated automatically by the compiler, it gives you a handle to pull them into an archive by hand. */ +/* APPLE LOCAL begin LLVM */ +#ifdef ENABLE_LLVM + /* The * is a sentinel for gcc's back end, but is not wanted by llvm. */ + sprintf (string, "%sobjc_category_name_%s_%s", + (flag_next_runtime ? "." : "__"), class_name, class_super_name); +#else sprintf (string, "*%sobjc_category_name_%s_%s", (flag_next_runtime ? "." : "__"), class_name, class_super_name); +#endif +/* APPLE LOCAL end LLVM */ } else return; From clattner at apple.com Tue Jun 26 11:59:02 2007 From: clattner at apple.com (Chris Lattner) Date: Tue, 26 Jun 2007 09:59:02 -0700 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp In-Reply-To: <20070626150105.GN5693@village.us.cray.com> References: <20070626150105.GN5693@village.us.cray.com> Message-ID: > Thanks for all the review comments! I've addressed a few comments > below; I'll get to the others soon. Thanks! I also filed pr1529, which is the only failure that showed on the ppc nightly tester. >>> @@ -1162,6 +1179,11 @@ >>> SDOperand Op = BuildSDIV(N); >>> if (Op.Val) return Op; >>> } >>> + >>> + // If either operand is undef, the result is undef >>> + if (N0.getOpcode() == ISD::UNDEF || N1.getOpcode() == ISD::UNDEF) >>> + return DAG.getNode(ISD::UNDEF, VT); >>> + >>> return SDOperand(); >>> } >> >> This is not safe for sdiv/udiv. Safe xforms are: >> >> // undef / X -> 0 >> // X / undef -> undef >> >> If in doubt, plz check instcombine. > > Thanks for correcting me on the undef rules. I'll check in a fix > for the code soon. For this sdiv/udiv one though, why is undef/X not > undef? For any non-zero value of X there's at least one value the > undef might have which makes the divide have a non-zero result. I think that undef udiv intmax -> 0, no? If not, plz update instcombine as well. >>> @@ -2742,6 +2807,30 @@ >>> SDOperand N0 = N->getOperand(0); >>> MVT::ValueType VT = N->getValueType(0); >>> >>> + // If the input is a BUILD_VECTOR with all constant elements, >>> fold this now. >>> + // Only do this before legalize, since afterward the target may >>> be depending >>> + // on the bitconvert. >> >> Interesting. This is a good solution for now, but maybe this argues >> for having a "target build vector", like "target constant", which >> would be unmolested by the optimizer? > > It's a similar situation for SimplifyVBinOp, and a few other > places, as > you noticed, and we don't want to clone all those if we don't need to. > An alternative would be to replace the conservative checks with > specific checks for > !AfterLegalize || TLI.isOperationLegal(....) > as is done in other places to protect against creating illegal nodes. I think it certainly would be better to check isOperationLegal. The only hard part is that some operations (like buildvector) are legal with certain operands. We don't have a way to capture that. :( >>> + MVT::ValueType VT = MVT::getVectorType(DstEltVT, >>> + Ops.size()); >>> + return DAG.getNode(ISD::BUILD_VECTOR, VT, &Ops[0], Ops.size()); >> >> This idiom occurs in several places. Do you think it makes sense to >> have a helper method on SelectionDAG to do this? > > Sure. Thanks for all the great changes Dan! -Chris From reid at x10sys.com Tue Jun 26 12:09:23 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 26 Jun 2007 12:09:23 -0500 Subject: [llvm-commits] CVS: llvm/utils/NewNightlyTest.pl Message-ID: <200706261709.l5QH9Nhq006720@zion.cs.uiuc.edu> Changes in directory llvm/utils: NewNightlyTest.pl updated: 1.73 -> 1.74 --- Log message: Update for Subversion conversion: 1. Fix comments for -usesvn and -svnurl options. 2. Fix default URL for SVN access. 3. Fix paths to accommodate "trunk" when checking out from SVN. --- Diffs of the changes: (+7 -7) NewNightlyTest.pl | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) Index: llvm/utils/NewNightlyTest.pl diff -u llvm/utils/NewNightlyTest.pl:1.73 llvm/utils/NewNightlyTest.pl:1.74 --- llvm/utils/NewNightlyTest.pl:1.73 Mon May 14 13:03:45 2007 +++ llvm/utils/NewNightlyTest.pl Tue Jun 26 12:08:16 2007 @@ -45,10 +45,10 @@ # -gccpath Path to gcc/g++ used to build LLVM # -cvstag Check out a specific CVS tag to build LLVM (useful for # testing release branches) -# -usesvn Check code out from a subversion repository. With no -# argument, use the standard repository. An argument specifies -# the repository URL to use. -# -svnurl Specify the SVN URL where LLVM can be found +# -usesvn Check code out from a subversion repository. +# -svnurl Specify the SVN URL where LLVM can be found. Needs -usesvn +# to be useful. If -svnurl is not used but -usesvn is then +# the standard (UIUC) repository will be used. # -target Specify the target triplet # -cflags Next argument specifies that C compilation options that # override the default. @@ -96,7 +96,7 @@ ############################################################## my $HOME = $ENV{'HOME'}; my $SVNURL = $ENV{"SVNURL"}; -$SVNURL = 'svn://anon at hlvm.org:3691/llvm.svn' unless $SVNURL; +$SVNURL = 'https://llvm.org/svn/llvm-project' unless $SVNURL; my $CVSRootDir = $ENV{'CVSROOT'}; $CVSRootDir = "/home/vadve/shared/PublicCVS" unless $CVSRootDir; my $BuildDir = $ENV{'BUILDDIR'}; @@ -520,9 +520,9 @@ if ($USESVN) { my $SVNCMD = "$NICE svn co $SVNURL"; if ($VERBOSE) { - print "( time -p $SVNCMD/llvm/trunk llvm; cd llvm/projects ; " . + print "( time -p $SVNCMD/llvm/trunk llvm; cd llvm/trunk/projects ; " . "$SVNCMD/llvm-test/trunk llvm-test ) > $COLog 2>&1\n"; - system "( time -p $SVNCMD/llvm/trunk llvm; cd llvm/projects ; " . + system "( time -p $SVNCMD/llvm/trunk llvm; cd llvm/trunk/projects ; " . "$SVNCMD/llvm-test/trunk llvm-test ) > $COLog 2>&1\n"; } } else { From evan.cheng at apple.com Tue Jun 26 13:32:00 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 26 Jun 2007 13:32:00 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMISelLowering.cpp Message-ID: <200706261832.l5QIW0wj027868@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMISelLowering.cpp updated: 1.59 -> 1.60 --- Log message: Silence a warning. --- Diffs of the changes: (+2 -1) ARMISelLowering.cpp | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/lib/Target/ARM/ARMISelLowering.cpp diff -u llvm/lib/Target/ARM/ARMISelLowering.cpp:1.59 llvm/lib/Target/ARM/ARMISelLowering.cpp:1.60 --- llvm/lib/Target/ARM/ARMISelLowering.cpp:1.59 Fri Jun 22 09:59:07 2007 +++ llvm/lib/Target/ARM/ARMISelLowering.cpp Tue Jun 26 13:31:22 2007 @@ -1195,7 +1195,8 @@ Index = DAG.getNode(ISD::MUL, PTy, Index, DAG.getConstant(4, PTy)); SDOperand Addr = DAG.getNode(ISD::ADD, PTy, Index, Table); bool isPIC = getTargetMachine().getRelocationModel() == Reloc::PIC_; - Addr = DAG.getLoad(isPIC ? MVT::i32 : PTy, Chain, Addr, NULL, 0); + Addr = DAG.getLoad(isPIC ? (MVT::ValueType)MVT::i32 : PTy, + Chain, Addr, NULL, 0); Chain = Addr.getValue(1); if (isPIC) Addr = DAG.getNode(ISD::ADD, PTy, Addr, Table); From reid at x10sys.com Tue Jun 26 15:46:19 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 26 Jun 2007 15:46:19 -0500 Subject: [llvm-commits] CVS: llvm-www/SVNMigration.html Message-ID: <200706262046.l5QKkJZh032639@zion.cs.uiuc.edu> Changes in directory llvm-www: SVNMigration.html updated: 1.15 -> 1.16 --- Log message: Update with current information. --- Diffs of the changes: (+96 -31) SVNMigration.html | 127 ++++++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 96 insertions(+), 31 deletions(-) Index: llvm-www/SVNMigration.html diff -u llvm-www/SVNMigration.html:1.15 llvm-www/SVNMigration.html:1.16 --- llvm-www/SVNMigration.html:1.15 Fri Jun 15 15:03:47 2007 +++ llvm-www/SVNMigration.html Tue Jun 26 15:45:56 2007 @@ -4,23 +4,33 @@

This document contains notes about the planned migration of the CVS code repository to Subversion.

+
    +
  1. Schedule
  2. +
  3. Impact +
  4. Status +
  5. Module Renaming +
  6. Branch Status +
  7. Tag Status +
  8. Migration Process +
-
Schedule
+
-

When: (Tentatively) June 25, 2007, approx. 1pm CDT (Central Time USA) or 18:00 GMT).

-

Duration: 4 hours

-

Notices:: Notices will be sent out 1 week before, 1 day before, and +

When: June 29, 2007, 09:00 CDT, 07:00 PDT, 14:00 UTC.

+

Duration: Approximately 4 hours

+

Notices:: Notices will be sent out 3 days before, 1 day before, and 1 hour before the conversion actually takes place.

-

Impact: Both CVS and Subversion will be unavailable for approximately - 4 hours while the migration takes place. Once completed, CVS will be restored - in read-only mode and Subversion will permit read-write access.

+

Impact: CVS commits will be unavailable for approximately 4 hours + while the migration takes place. Anonymous CVS checkout will still be allowed + during this time frame. Once the migration is done, CVS will remain in + read-only mode and Subversion will be enable for read and write access.

Fallback Plan: If the conversion cannot be completed successfully in 4 hours, we will turn CVS commit access back on and try the migration again at a later date.

-
User Impact
+

Here are some things you need to know about how to use Subversion once the migration is done and how to prepare for the change.

@@ -28,32 +38,42 @@
  • Subversion Version: 1.4.3. You can use older clients, but we recommend that you upgrade to 1.4.3 to gain most benefit.
  • URLS: Subversion uses URLs to specify the repository. Our - configuration uses HTTP URLs. The host name portion of the URL for all - LLVM related repositories is svn.llvm.org (which redirects to - subversion.cs.uiuc.edu). We encourage you to use the svn.llvm.org host name - because that one will be correct in perpetuity as the redirect might not be. -
  • Repository Access: There are two ways to access the - repository: public (anonymous, read-only access) and private (named, - read-write access).
  • -
  • Public Access: The URL for the public access repository is - http://svn.llvm.org/pub/svn/llvm - Use this URL with the svn checkout command to obtain a read-only - copy of LLVM without a username or password.
  • -
  • Private Access: The URL for the private access repository is - http://vn.llvm.org/svn/llvm. - Use this URL with the svn checkout command to obtain read-write - access to the LLVM repository. The svn command will prompt you for - your user name and password.
  • -
  • Browsable URLs: Both the public and private access URLs are - browsable with any web browser.
  • + configuration uses HTTPS URLs. The host name portion of the URL for all + LLVM related repositories is llvm.org. The URL for accessing any of + the modules in the LLVM repository is: + + https://llvm.org/svn/llvm-project. Note that the URL uses the HTTPS + protocol. This is necessary to ensure that passwords are not transmitted in + the clear. +
  • Browsing: You can browse the latest revision of the repository + with any web browser by just pointing it at the URL shown above.
  • +
  • Modules: The repository contains several modules. Each module is + contained in a top level directory and has its own trunk, + branches, and tags directories at the second level. Some + of the modules have changed name. See the Renaming + section for details.
  • +
  • Checkout Access: You can checkout any llvm module by simply using + the svn command with the above URL. For example:
    +    svn co https://llvm.org/svn/llvm-project/llvm/trunk llvm
    +    
    This will give you a local llvm directory that contains the + contents of the "llvm" module.
  • +
  • Commit Access: If you have commit access you will need to supply + a user name and password to commit. We recommend that you check out using a + URL like this: https://uname at llvm.org/svn/llvm-project/.... You + should replace "uname" with your actual user name. When you attempt to + commit you will get a password prompt from the Subversion command. Enter + your password to complete the commit.
  • Available Now:: You can try these out now. Only a few users have commit access (those who are testing it). Any changes made will be discarded - before the June 5th conversion.
  • + before the June 29th conversion.
    -
    Notes
    +
    +

    Status as of 2007-06-26
    We are finally ready to do the migration + on June 29th. Access to the final repository location is now available. It + will be updated twice per day until the conversion occurs.

    Status as of 2007-04-20
    We have successfully migrated all the sub-projects targeted for conversion over the UIUC internal network. The Subversion snapshot is available for access (for testing only).

    @@ -80,7 +100,7 @@
    - +

    Since everything will be in one SVN repository, we thought we'd take this opportunity to rename some top level directories to reduce redundancy. This @@ -99,7 +119,7 @@ nightlytest-serversidenightly-test

    NOTE: Due to synchronization of commits in the conversion process, - we will likely transition all of the above to Subversion in one shot. + we will transition all of the above to Subversion in one shot. This will allow SVN revision numbers to increase temporally instead of disjointedly if the projects were imported one at a time. It also permits revision groups to span across projects. For example, @@ -212,6 +232,51 @@

    + + + +
    +

    The following describes the sequence of events that need to occur in order + to complete the migration from CVS to Subversion. While this is mostly + internal to the people doing the conversion, it may be useful for you to see + what the process is.

    +

    The list below shows the logical order in which things need to be done + without assigning any dates to them.

    +
      +
    1. (done) Test Repository Up.
    2. +
    3. Integrate email notification script. The email notification + script needs to be put into the convert script so that conversion + automatically has the post-commit hook set up.
    4. +
    5. Configure ViewVC. We need to get ViewVC up and running so that it + is presenting the SVN repository from its new host (Zion). The main web + page probably needs to be updated too.
    6. +
    7. (done) NewNightlyTest.pl -usesvn. This script needs to be updated + so that the -usesvn option gets the right repository by default.
    8. +
    9. Final CutOver. The cut-over to SVN needs to be done. Currently + scheduled for 6/29/2007 at 9:00am CDT.
    10. +
    11. NewNightlyTest.pl Defaults to SVN. This script needs to be + updated so that the default repository is Subversion and the ability to + use CVS is taken away.
    12. +
    13. Documents. We need to rewrite the /docs/ url to go to + /svn/llvm-project/llvm/trunk/docs/. There's no need to have an auto-update + rule any more as this will always provide the latest.
    14. +
    15. llvm-www. The web pages (but not releases sibudir) for the main + web site need to be put into a new "website" module in Subversion. We can + do this with the cvs2svn script again and (I think) tell it to ignore the + releases directory.
    16. +
    17. Web Site Auto Update. We don't need to check out any more, we + just need a rewrite rule. Basically, http://llvm.org/ needs to be rewritten + as accessing http://llvm.org/svn/llvm-project/website/trunk/. This is sure + to provde the latest version without a check out.
    18. +
    19. Releases. We need a strategy for dealing with releases. I'd be + fine if these were just put in the web server's document root and not + version controlled. They are huge and not changed much (ever). In any event, + whatever we do we should jsut rewrite the /releases/ URL to point to some + place where the releases are stored (or create /releases/ in the document + root).
    20. +
    +
    +
    @@ -219,6 +284,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"> Valid HTML 4.01! -
    Last modified: $Date: 2007/06/15 20:03:47 $ +
    Last modified: $Date: 2007/06/26 20:45:56 $
    From evan.cheng at apple.com Tue Jun 26 15:55:09 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 26 Jun 2007 15:55:09 -0500 Subject: [llvm-commits] CVS: llvm/utils/TableGen/RegisterInfoEmitter.cpp Message-ID: <200706262055.l5QKt9sO000347@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: RegisterInfoEmitter.cpp updated: 1.57 -> 1.58 --- Log message: Add immediate sub-registers. --- Diffs of the changes: (+21 -0) RegisterInfoEmitter.cpp | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+) Index: llvm/utils/TableGen/RegisterInfoEmitter.cpp diff -u llvm/utils/TableGen/RegisterInfoEmitter.cpp:1.57 llvm/utils/TableGen/RegisterInfoEmitter.cpp:1.58 --- llvm/utils/TableGen/RegisterInfoEmitter.cpp:1.57 Wed Jun 13 17:20:15 2007 +++ llvm/utils/TableGen/RegisterInfoEmitter.cpp Tue Jun 26 15:54:46 2007 @@ -359,6 +359,7 @@ OS << " };\n"; // Emit register sub-registers / super-registers, aliases... + std::map > RegisterImmSubRegs; std::map > RegisterSubRegs; std::map > RegisterSuperRegs; std::map > RegisterAliases; @@ -397,6 +398,7 @@ cerr << "Warning: register " << getQualifiedName(SubReg) << " specified as a sub-register of " << getQualifiedName(R) << " multiple times!\n"; + RegisterImmSubRegs[R].insert(SubReg); addSubSuperReg(R, SubReg, RegisterSubRegs, RegisterSuperRegs, RegisterAliases, *this); } @@ -434,6 +436,21 @@ OS << "0 };\n"; } + if (!RegisterImmSubRegs.empty()) + OS << "\n\n // Register Immediate Sub-registers Sets...\n"; + + // Loop over all of the registers which have sub-registers, emitting the + // sub-registers list to memory. + for (std::map >::iterator + I = RegisterImmSubRegs.begin(), E = RegisterImmSubRegs.end(); + I != E; ++I) { + OS << " const unsigned " << I->first->getName() << "_ImmSubRegsSet[] = { "; + for (std::set::iterator ASI = I->second.begin(), + E = I->second.end(); ASI != E; ++ASI) + OS << getQualifiedName(*ASI) << ", "; + OS << "0 };\n"; + } + if (!RegisterSuperRegs.empty()) OS << "\n\n // Register Super-registers Sets...\n"; @@ -472,6 +489,10 @@ OS << Reg.getName() << "_SubRegsSet,\t"; else OS << "Empty_SubRegsSet,\t"; + if (RegisterImmSubRegs.count(Reg.TheDef)) + OS << Reg.getName() << "_ImmSubRegsSet,\t"; + else + OS << "Empty_SubRegsSet,\t"; if (RegisterSuperRegs.count(Reg.TheDef)) OS << Reg.getName() << "_SuperRegsSet },\n"; else From evan.cheng at apple.com Tue Jun 26 15:59:39 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 26 Jun 2007 15:59:39 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/MRegisterInfo.h Message-ID: <200706262059.l5QKxdPM000441@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Target: MRegisterInfo.h updated: 1.111 -> 1.112 --- Log message: Add immediate sub-registers. --- Diffs of the changes: (+9 -0) MRegisterInfo.h | 9 +++++++++ 1 files changed, 9 insertions(+) Index: llvm/include/llvm/Target/MRegisterInfo.h diff -u llvm/include/llvm/Target/MRegisterInfo.h:1.111 llvm/include/llvm/Target/MRegisterInfo.h:1.112 --- llvm/include/llvm/Target/MRegisterInfo.h:1.111 Wed Jun 13 17:20:15 2007 +++ llvm/include/llvm/Target/MRegisterInfo.h Tue Jun 26 15:59:16 2007 @@ -48,6 +48,7 @@ const char *Name; // Assembly language name for the register const unsigned *AliasSet; // Register Alias Set, described above const unsigned *SubRegs; // Sub-register set, described above + const unsigned *ImmSubRegs; // Immediate sub-register set, described above const unsigned *SuperRegs; // Super-register set, described above }; @@ -326,6 +327,14 @@ return get(RegNo).SubRegs; } + /// getImmediateSubRegisters - Return the set of registers that are immediate + /// sub-registers of the specified register, or a null list of there are none. + /// The list returned is zero terminated. + /// + const unsigned *getImmediateSubRegisters(unsigned RegNo) const { + return get(RegNo).ImmSubRegs; + } + /// getSuperRegisters - Return the set of registers that are super-registers /// of the specified register, or a null list of there are none. The list /// returned is zero terminated. From reid at x10sys.com Tue Jun 26 16:03:06 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 26 Jun 2007 16:03:06 -0500 Subject: [llvm-commits] CVS: llvm-www/SVNMigration.html Message-ID: <200706262103.l5QL36tI000598@zion.cs.uiuc.edu> Changes in directory llvm-www: SVNMigration.html updated: 1.16 -> 1.17 --- Log message: Add doxygen to the to-do list. --- Diffs of the changes: (+5 -1) SVNMigration.html | 6 +++++- 1 files changed, 5 insertions(+), 1 deletion(-) Index: llvm-www/SVNMigration.html diff -u llvm-www/SVNMigration.html:1.16 llvm-www/SVNMigration.html:1.17 --- llvm-www/SVNMigration.html:1.16 Tue Jun 26 15:45:56 2007 +++ llvm-www/SVNMigration.html Tue Jun 26 16:02:42 2007 @@ -274,6 +274,10 @@ whatever we do we should jsut rewrite the /releases/ URL to point to some place where the releases are stored (or create /releases/ in the document root). +
  • Doxygen. The crontab on Zion needs to be fixed so that doxygen is + generated from the right sources. Probably it should be generated into some + standard location on Zion and then the /doxygen/ URL mapped to that + location.
  • @@ -284,6 +288,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"> Valid HTML 4.01! -
    Last modified: $Date: 2007/06/26 20:45:56 $ +
    Last modified: $Date: 2007/06/26 21:02:42 $ From evan.cheng at apple.com Tue Jun 26 16:03:21 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 26 Jun 2007 16:03:21 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/LiveVariables.h Message-ID: <200706262103.l5QL3LN7000609@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: LiveVariables.h updated: 1.46 -> 1.47 --- Log message: Properly handle kills of a physical register which has sub-registers that are read by later instructions. --- Diffs of the changes: (+10 -0) LiveVariables.h | 10 ++++++++++ 1 files changed, 10 insertions(+) Index: llvm/include/llvm/CodeGen/LiveVariables.h diff -u llvm/include/llvm/CodeGen/LiveVariables.h:1.46 llvm/include/llvm/CodeGen/LiveVariables.h:1.47 --- llvm/include/llvm/CodeGen/LiveVariables.h:1.46 Tue May 8 14:00:00 2007 +++ llvm/include/llvm/CodeGen/LiveVariables.h Tue Jun 26 16:02:59 2007 @@ -31,6 +31,7 @@ #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/ADT/BitVector.h" +#include "llvm/ADT/SmallSet.h" #include "llvm/ADT/SmallVector.h" #include @@ -163,6 +164,15 @@ bool addRegisterDead(unsigned IncomingReg, MachineInstr *MI, bool AddIfNotFound = false); + void addRegisterKills(unsigned Reg, MachineInstr *MI, + SmallSet &SubKills); + + /// HandlePhysRegKill - Add kills of Reg and its sub-registers to the + /// uses. Pay special attention to the sub-register uses which may come below + /// the last use of the whole register. + bool HandlePhysRegKill(unsigned Reg, MachineInstr *MI, + SmallSet &SubKills); + bool HandlePhysRegKill(unsigned Reg, MachineInstr *MI); void HandlePhysRegUse(unsigned Reg, MachineInstr *MI); void HandlePhysRegDef(unsigned Reg, MachineInstr *MI); From evan.cheng at apple.com Tue Jun 26 16:03:58 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 26 Jun 2007 16:03:58 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/LiveVariables.cpp Message-ID: <200706262103.l5QL3wDT000636@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: LiveVariables.cpp updated: 1.84 -> 1.85 --- Log message: Properly handle kills of a physical register which has sub-registers that are read by later instructions. --- Diffs of the changes: (+73 -13) LiveVariables.cpp | 86 +++++++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 73 insertions(+), 13 deletions(-) Index: llvm/lib/CodeGen/LiveVariables.cpp diff -u llvm/lib/CodeGen/LiveVariables.cpp:1.84 llvm/lib/CodeGen/LiveVariables.cpp:1.85 --- llvm/lib/CodeGen/LiveVariables.cpp:1.84 Mon May 14 15:39:18 2007 +++ llvm/lib/CodeGen/LiveVariables.cpp Tue Jun 26 16:03:35 2007 @@ -286,38 +286,85 @@ PhysRegPartUse[SuperReg] = MI; } +bool LiveVariables::HandlePhysRegKill(unsigned Reg, MachineInstr *RefMI, + SmallSet &SubKills) { + for (const unsigned *SubRegs = RegInfo->getImmediateSubRegisters(Reg); + unsigned SubReg = *SubRegs; ++SubRegs) { + MachineInstr *LastRef = PhysRegInfo[SubReg]; + if (LastRef != RefMI) + SubKills.insert(SubReg); + else if (!HandlePhysRegKill(SubReg, RefMI, SubKills)) + SubKills.insert(SubReg); + } + + if (*RegInfo->getImmediateSubRegisters(Reg) == 0) { + // No sub-registers, just check if reg is killed by RefMI. + if (PhysRegInfo[Reg] == RefMI) + return true; + } else if (SubKills.empty()) + // None of the sub-registers are killed elsewhere... + return true; + return false; +} + +void LiveVariables::addRegisterKills(unsigned Reg, MachineInstr *MI, + SmallSet &SubKills) { + if (SubKills.count(Reg) == 0) + addRegisterKilled(Reg, MI, true); + else { + for (const unsigned *SubRegs = RegInfo->getImmediateSubRegisters(Reg); + unsigned SubReg = *SubRegs; ++SubRegs) + addRegisterKills(SubReg, MI, SubKills); + } +} + +bool LiveVariables::HandlePhysRegKill(unsigned Reg, MachineInstr *RefMI) { + SmallSet SubKills; + if (HandlePhysRegKill(Reg, RefMI, SubKills)) { + addRegisterKilled(Reg, RefMI); + return true; + } else { + // Some sub-registers are killed by another MI. + for (const unsigned *SubRegs = RegInfo->getImmediateSubRegisters(Reg); + unsigned SubReg = *SubRegs; ++SubRegs) + addRegisterKills(SubReg, RefMI, SubKills); + return false; + } +} + void LiveVariables::HandlePhysRegDef(unsigned Reg, MachineInstr *MI) { // Does this kill a previous version of this register? if (MachineInstr *LastRef = PhysRegInfo[Reg]) { - if (PhysRegUsed[Reg]) - addRegisterKilled(Reg, LastRef); - else if (PhysRegPartUse[Reg]) + if (PhysRegUsed[Reg]) { + if (!HandlePhysRegKill(Reg, LastRef)) { + if (PhysRegPartUse[Reg]) + addRegisterKilled(Reg, PhysRegPartUse[Reg], true); + } + } else if (PhysRegPartUse[Reg]) // Add implicit use / kill to last use of a sub-register. addRegisterKilled(Reg, PhysRegPartUse[Reg], true); else addRegisterDead(Reg, LastRef); } - PhysRegInfo[Reg] = MI; - PhysRegUsed[Reg] = false; - PhysRegPartUse[Reg] = NULL; for (const unsigned *SubRegs = RegInfo->getSubRegisters(Reg); unsigned SubReg = *SubRegs; ++SubRegs) { if (MachineInstr *LastRef = PhysRegInfo[SubReg]) { - if (PhysRegUsed[SubReg]) - addRegisterKilled(SubReg, LastRef); - else if (PhysRegPartUse[SubReg]) + if (PhysRegUsed[SubReg]) { + if (!HandlePhysRegKill(SubReg, LastRef)) { + if (PhysRegPartUse[SubReg]) + addRegisterKilled(SubReg, PhysRegPartUse[SubReg], true); + } + //addRegisterKilled(SubReg, LastRef); + } else if (PhysRegPartUse[SubReg]) // Add implicit use / kill to last use of a sub-register. addRegisterKilled(SubReg, PhysRegPartUse[SubReg], true); else addRegisterDead(SubReg, LastRef); } - PhysRegInfo[SubReg] = MI; - PhysRegUsed[SubReg] = false; - PhysRegPartUse[SubReg] = NULL; } - if (MI) + if (MI) { for (const unsigned *SuperRegs = RegInfo->getSuperRegisters(Reg); unsigned SuperReg = *SuperRegs; ++SuperRegs) { if (PhysRegInfo[SuperReg]) { @@ -334,6 +381,17 @@ // Remember this partial def. PhysRegPartDef[SuperReg].push_back(MI); } + } + + PhysRegInfo[Reg] = MI; + PhysRegUsed[Reg] = false; + PhysRegPartUse[Reg] = NULL; + for (const unsigned *SubRegs = RegInfo->getSubRegisters(Reg); + unsigned SubReg = *SubRegs; ++SubRegs) { + PhysRegInfo[SubReg] = MI; + PhysRegUsed[SubReg] = false; + PhysRegPartUse[SubReg] = NULL; + } } } @@ -465,6 +523,8 @@ // Clear some states between BB's. These are purely local information. for (unsigned i = 0; i != NumRegs; ++i) PhysRegPartDef[i].clear(); + std::fill(PhysRegInfo, PhysRegInfo + NumRegs, (MachineInstr*)0); + std::fill(PhysRegUsed, PhysRegUsed + NumRegs, false); std::fill(PhysRegPartUse, PhysRegPartUse + NumRegs, (MachineInstr*)0); } From evan.cheng at apple.com Tue Jun 26 16:05:36 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 26 Jun 2007 16:05:36 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/RegAllocLocal.cpp Message-ID: <200706262105.l5QL5asj000688@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: RegAllocLocal.cpp updated: 1.106 -> 1.107 --- Log message: Correctly handle implcit def / use operands. --- Diffs of the changes: (+64 -52) RegAllocLocal.cpp | 116 +++++++++++++++++++++++++++++------------------------- 1 files changed, 64 insertions(+), 52 deletions(-) Index: llvm/lib/CodeGen/RegAllocLocal.cpp diff -u llvm/lib/CodeGen/RegAllocLocal.cpp:1.106 llvm/lib/CodeGen/RegAllocLocal.cpp:1.107 --- llvm/lib/CodeGen/RegAllocLocal.cpp:1.106 Tue May 8 14:02:46 2007 +++ llvm/lib/CodeGen/RegAllocLocal.cpp Tue Jun 26 16:05:13 2007 @@ -106,6 +106,14 @@ return VirtRegModified[Reg - MRegisterInfo::FirstVirtualRegister]; } + void AddToPhysRegsUseOrder(unsigned Reg) { + std::vector::iterator It = + std::find(PhysRegsUseOrder.begin(), PhysRegsUseOrder.end(), Reg); + if (It != PhysRegsUseOrder.end()) + PhysRegsUseOrder.erase(It); + PhysRegsUseOrder.push_back(Reg); + } + void MarkPhysRegRecentlyUsed(unsigned Reg) { if (PhysRegsUseOrder.empty() || PhysRegsUseOrder.back() == Reg) return; // Already most recently used @@ -184,13 +192,6 @@ /// void assignVirtToPhysReg(unsigned VirtReg, unsigned PhysReg); - /// liberatePhysReg - Make sure the specified physical register is available - /// for use. If there is currently a value in it, it is either moved out of - /// the way or spilled to memory. - /// - void liberatePhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator &I, - unsigned PhysReg); - /// isPhysRegAvailable - Return true if the specified physical register is /// free and available for use. This also includes checking to see if /// aliased registers are all free... @@ -314,19 +315,8 @@ *AliasSet; ++AliasSet) if (PhysRegsUsed[*AliasSet] != -1 && // Spill aliased register. PhysRegsUsed[*AliasSet] != -2) // If allocatable. - if (PhysRegsUsed[*AliasSet] == 0) { - // This must have been a dead def due to something like this: - // %EAX := - // := op %AL - // No more use of %EAX, %AH, etc. - // %EAX isn't dead upon definition, but %AH is. However %AH isn't - // an operand of definition MI so it's not marked as such. - DOUT << " Register " << RegInfo->getName(*AliasSet) - << " [%reg" << *AliasSet - << "] is never used, removing it frame live list\n"; - removePhysReg(*AliasSet); - } else - spillVirtReg(MBB, I, PhysRegsUsed[*AliasSet], *AliasSet); + if (PhysRegsUsed[*AliasSet]) + spillVirtReg(MBB, I, PhysRegsUsed[*AliasSet], *AliasSet); } } @@ -341,7 +331,7 @@ // it holds VirtReg. PhysRegsUsed[PhysReg] = VirtReg; getVirt2PhysRegMapSlot(VirtReg) = PhysReg; - PhysRegsUseOrder.push_back(PhysReg); // New use of PhysReg + AddToPhysRegsUseOrder(PhysReg); // New use of PhysReg } @@ -380,17 +370,6 @@ } -/// liberatePhysReg - Make sure the specified physical register is available for -/// use. If there is currently a value in it, it is either moved out of the way -/// or spilled to memory. -/// -void RALocal::liberatePhysReg(MachineBasicBlock &MBB, - MachineBasicBlock::iterator &I, - unsigned PhysReg) { - spillPhysReg(MBB, I, PhysReg); -} - - /// getReg - Find a physical register to hold the specified virtual /// register. If all compatible physical registers are used, this method spills /// the last used virtual register to the stack, and uses that register. @@ -522,7 +501,29 @@ return MI; } +/// isReadModWriteImplicitKill - True if this is an implicit kill for a +/// read/mod/write register, i.e. update partial register. +static bool isReadModWriteImplicitKill(MachineInstr *MI, unsigned Reg) { + for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { + MachineOperand& MO = MI->getOperand(i); + if (MO.isRegister() && MO.getReg() == Reg && MO.isImplicit() && + MO.isDef() && !MO.isDead()) + return true; + } + return false; +} +/// isReadModWriteImplicitDef - True if this is an implicit def for a +/// read/mod/write register, i.e. update partial register. +static bool isReadModWriteImplicitDef(MachineInstr *MI, unsigned Reg) { + for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { + MachineOperand& MO = MI->getOperand(i); + if (MO.isRegister() && MO.getReg() == Reg && MO.isImplicit() && + !MO.isDef() && MO.isKill()) + return true; + } + return false; +} void RALocal::AllocateBasicBlock(MachineBasicBlock &MBB) { // loop over each instruction @@ -540,11 +541,11 @@ unsigned Reg = I->first; MF->setPhysRegUsed(Reg); PhysRegsUsed[Reg] = 0; // It is free and reserved now - PhysRegsUseOrder.push_back(Reg); - for (const unsigned *AliasSet = RegInfo->getAliasSet(Reg); + AddToPhysRegsUseOrder(Reg); + for (const unsigned *AliasSet = RegInfo->getSubRegisters(Reg); *AliasSet; ++AliasSet) { if (PhysRegsUsed[*AliasSet] != -2) { - PhysRegsUseOrder.push_back(*AliasSet); + AddToPhysRegsUseOrder(*AliasSet); PhysRegsUsed[*AliasSet] = 0; // It is free and reserved now MF->setPhysRegUsed(*AliasSet); } @@ -575,8 +576,15 @@ SmallVector Kills; for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { MachineOperand& MO = MI->getOperand(i); - if (MO.isRegister() && MO.isKill()) - Kills.push_back(MO.getReg()); + if (MO.isRegister() && MO.isKill()) { + if (!MO.isImplicit()) + Kills.push_back(MO.getReg()); + else if (!isReadModWriteImplicitKill(MI, MO.getReg())) + // These are extra physical register kills when a sub-register + // is defined (def of a sub-register is a read/mod/write of the + // larger registers). Ignore. + Kills.push_back(MO.getReg()); + } } // Get the used operands into registers. This has the potential to spill @@ -609,13 +617,16 @@ } else if (PhysRegsUsed[PhysReg] == -2) { // Unallocatable register dead, ignore. continue; + } else { + assert(!PhysRegsUsed[PhysReg] || PhysRegsUsed[PhysReg] == -1 && + "Silently clearing a virtual register?"); } if (PhysReg) { DOUT << " Last use of " << RegInfo->getName(PhysReg) << "[%reg" << VirtReg <<"], removing it from live set\n"; removePhysReg(PhysReg); - for (const unsigned *AliasSet = RegInfo->getAliasSet(PhysReg); + for (const unsigned *AliasSet = RegInfo->getSubRegisters(PhysReg); *AliasSet; ++AliasSet) { if (PhysRegsUsed[*AliasSet] != -2) { DOUT << " Last use of " @@ -635,17 +646,22 @@ MRegisterInfo::isPhysicalRegister(MO.getReg())) { unsigned Reg = MO.getReg(); if (PhysRegsUsed[Reg] == -2) continue; // Something like ESP. - + // These are extra physical register defs when a sub-register + // is defined (def of a sub-register is a read/mod/write of the + // larger registers). Ignore. + if (isReadModWriteImplicitDef(MI, MO.getReg())) continue; + MF->setPhysRegUsed(Reg); spillPhysReg(MBB, MI, Reg, true); // Spill any existing value in reg PhysRegsUsed[Reg] = 0; // It is free and reserved now - PhysRegsUseOrder.push_back(Reg); - for (const unsigned *AliasSet = RegInfo->getAliasSet(Reg); + AddToPhysRegsUseOrder(Reg); + + for (const unsigned *AliasSet = RegInfo->getSubRegisters(Reg); *AliasSet; ++AliasSet) { if (PhysRegsUsed[*AliasSet] != -2) { - PhysRegsUseOrder.push_back(*AliasSet); - PhysRegsUsed[*AliasSet] = 0; // It is free and reserved now MF->setPhysRegUsed(*AliasSet); + PhysRegsUsed[*AliasSet] = 0; // It is free and reserved now + AddToPhysRegsUseOrder(*AliasSet); } } } @@ -656,21 +672,17 @@ for (const unsigned *ImplicitDefs = TID.ImplicitDefs; *ImplicitDefs; ++ImplicitDefs) { unsigned Reg = *ImplicitDefs; - bool IsNonAllocatable = PhysRegsUsed[Reg] == -2; - if (!IsNonAllocatable) { + if (PhysRegsUsed[Reg] != -2) { spillPhysReg(MBB, MI, Reg, true); - PhysRegsUseOrder.push_back(Reg); + AddToPhysRegsUseOrder(Reg); PhysRegsUsed[Reg] = 0; // It is free and reserved now } MF->setPhysRegUsed(Reg); - - for (const unsigned *AliasSet = RegInfo->getAliasSet(Reg); + for (const unsigned *AliasSet = RegInfo->getSubRegisters(Reg); *AliasSet; ++AliasSet) { if (PhysRegsUsed[*AliasSet] != -2) { - if (!IsNonAllocatable) { - PhysRegsUseOrder.push_back(*AliasSet); - PhysRegsUsed[*AliasSet] = 0; // It is free and reserved now - } + AddToPhysRegsUseOrder(*AliasSet); + PhysRegsUsed[*AliasSet] = 0; // It is free and reserved now MF->setPhysRegUsed(*AliasSet); } } From evan.cheng at apple.com Tue Jun 26 16:19:30 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 26 Jun 2007 16:19:30 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/MRegisterInfo.h Message-ID: <200706262119.l5QLJUDm000993@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Target: MRegisterInfo.h updated: 1.112 -> 1.113 --- Log message: Add comment. --- Diffs of the changes: (+5 -3) MRegisterInfo.h | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) Index: llvm/include/llvm/Target/MRegisterInfo.h diff -u llvm/include/llvm/Target/MRegisterInfo.h:1.112 llvm/include/llvm/Target/MRegisterInfo.h:1.113 --- llvm/include/llvm/Target/MRegisterInfo.h:1.112 Tue Jun 26 15:59:16 2007 +++ llvm/include/llvm/Target/MRegisterInfo.h Tue Jun 26 16:19:07 2007 @@ -40,9 +40,11 @@ /// Registers that this does not apply to simply should set this to null. /// The SubRegs field is a zero terminated array of registers that are /// sub-registers of the specific register, e.g. AL, AH are sub-registers of AX. -/// The SuperRegs field is a zero terminated array of registers that are -/// super-registers of the specific register, e.g. RAX, EAX, are super-registers -/// of AX. +/// The ImmsubRegs field is a subset of SubRegs. It includes only the immediate +/// sub-registers. e.g. EAX has only one immediate sub-register of AX, not AH, +/// AL which are immediate sub-registers of AX. The SuperRegs field is a zero +/// terminated array of registers that are super-registers of the specific +/// register, e.g. RAX, EAX, are super-registers of AX. /// struct TargetRegisterDesc { const char *Name; // Assembly language name for the register From reid at x10sys.com Tue Jun 26 17:02:20 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 26 Jun 2007 17:02:20 -0500 Subject: [llvm-commits] CVS: llvm-www/SVNMigration.html Message-ID: <200706262202.l5QM2KPk001974@zion.cs.uiuc.edu> Changes in directory llvm-www: SVNMigration.html updated: 1.17 -> 1.18 --- Log message: Add a step to update GettingStarted.html directions for checkout from SVN. --- Diffs of the changes: (+3 -1) SVNMigration.html | 4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) Index: llvm-www/SVNMigration.html diff -u llvm-www/SVNMigration.html:1.17 llvm-www/SVNMigration.html:1.18 --- llvm-www/SVNMigration.html:1.17 Tue Jun 26 16:02:42 2007 +++ llvm-www/SVNMigration.html Tue Jun 26 17:01:57 2007 @@ -254,6 +254,8 @@ so that the -usesvn option gets the right repository by default.
  • Final CutOver. The cut-over to SVN needs to be done. Currently scheduled for 6/29/2007 at 9:00am CDT.
  • +
  • GettingStarted.html. Update this to reflect the new checkout + commands needed.
  • NewNightlyTest.pl Defaults to SVN. This script needs to be updated so that the default repository is Subversion and the ability to use CVS is taken away.
  • @@ -288,6 +290,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"> Valid HTML 4.01! -
    Last modified: $Date: 2007/06/26 21:02:42 $ +
    Last modified: $Date: 2007/06/26 22:01:57 $ From reid at x10sys.com Tue Jun 26 17:33:38 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 26 Jun 2007 17:33:38 -0500 Subject: [llvm-commits] CVS: llvm-www/SVNMigration.html Message-ID: <200706262233.l5QMXcNP002639@zion.cs.uiuc.edu> Changes in directory llvm-www: SVNMigration.html updated: 1.18 -> 1.19 --- Log message: Add notes about migration of llvm-gcc4 and HLVM to the Subversion repo. --- Diffs of the changes: (+7 -1) SVNMigration.html | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletion(-) Index: llvm-www/SVNMigration.html diff -u llvm-www/SVNMigration.html:1.18 llvm-www/SVNMigration.html:1.19 --- llvm-www/SVNMigration.html:1.18 Tue Jun 26 17:01:57 2007 +++ llvm-www/SVNMigration.html Tue Jun 26 17:33:16 2007 @@ -280,6 +280,12 @@ generated from the right sources. Probably it should be generated into some standard location on Zion and then the /doxygen/ URL mapped to that location. +
  • llvm-gcc. The llvm-gcc repository hosted by Apple needs to be + migrated to the Zion repository. This should be as simple as dump and load + since they are both Subversion.
  • +
  • HLVM. The HLVM repository hosted by Reid needs to be + migrated to the Zion repository. This should be as simple as dump and load + since they are both Subversion.
  • @@ -290,6 +296,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"> Valid HTML 4.01! -
    Last modified: $Date: 2007/06/26 22:01:57 $ +
    Last modified: $Date: 2007/06/26 22:33:16 $ From resistor at mac.com Tue Jun 26 18:30:02 2007 From: resistor at mac.com (Owen Anderson) Date: Tue, 26 Jun 2007 18:30:02 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/GVNPRE.cpp Message-ID: <200706262330.l5QNU2Te003857@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: GVNPRE.cpp updated: 1.58 -> 1.59 --- Log message: 1. Correct some comments and clean up some dead code. 2. When calculating ANTIC_IN, only iterate the changed blocks. For most average inputs this is a small speedup, but for cases with unusual CFGs, this can be a significant win. --- Diffs of the changes: (+27 -22) GVNPRE.cpp | 49 +++++++++++++++++++++++++++---------------------- 1 files changed, 27 insertions(+), 22 deletions(-) Index: llvm/lib/Transforms/Scalar/GVNPRE.cpp diff -u llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.58 llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.59 --- llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.58 Mon Jun 25 13:25:31 2007 +++ llvm/lib/Transforms/Scalar/GVNPRE.cpp Tue Jun 26 18:29:41 2007 @@ -377,7 +377,7 @@ SmallPtrSet& currExps, SmallPtrSet& currTemps, std::set& visited); - unsigned buildsets(Function& F); + void buildsets(Function& F); void insertion_pre(Value* e, BasicBlock* BB, std::map& avail, @@ -895,7 +895,7 @@ /// buildsets - Phase 1 of the main algorithm. Construct the AVAIL_OUT /// and the ANTIC_IN sets. -unsigned GVNPRE::buildsets(Function& F) { +void GVNPRE::buildsets(Function& F) { std::map > generatedExpressions; std::map > generatedPhis; std::map > generatedTemporaries; @@ -937,32 +937,42 @@ // Phase 1, Part 2: calculate ANTIC_IN std::set visited; + SmallPtrSet block_changed; + for (Function::iterator FI = F.begin(), FE = F.end(); FI != FE; ++FI) + block_changed.insert(FI); bool changed = true; unsigned iterations = 0; + while (changed) { changed = false; SmallPtrSet anticOut; - // Top-down walk of the postdominator tree + // Postorder walk of the CFG for (po_iterator BBI = po_begin(&F.getEntryBlock()), BBE = po_end(&F.getEntryBlock()); BBI != BBE; ++BBI) { BasicBlock* BB = *BBI; - if (BB == 0) - continue; - unsigned ret = buildsets_anticin(BB, anticOut,generatedExpressions[BB], - generatedTemporaries[BB], visited); - - if (ret == 0) { - changed = true; - continue; - } else { - visited.insert(BB); - if (ret == 2) { - DOUT << "CHANGED: " << BB->getName() << "\n"; + if (block_changed.count(BB) != 0) { + unsigned ret = buildsets_anticin(BB, anticOut,generatedExpressions[BB], + generatedTemporaries[BB], visited); + + if (ret == 0) { + changed = true; + continue; + } else { + visited.insert(BB); + + if (ret == 2) + for (pred_iterator PI = pred_begin(BB), PE = pred_end(BB); + PI != PE; ++PI) { + block_changed.insert(*PI); + } + else + block_changed.erase(BB); + + changed |= (ret == 2); } - changed |= (ret == 2); } } @@ -970,8 +980,6 @@ } DOUT << "ITERATIONS: " << iterations << "\n"; - - return 0; // No bail, no changes } /// insertion_pre - When a partial redundancy has been identified, eliminate it @@ -1173,10 +1181,7 @@ // This phase calculates the AVAIL_OUT and ANTIC_IN sets // NOTE: If full postdom information is no available, this will bail // early, performing GVN but not PRE - unsigned bail = buildsets(F); - //If a bail occurred, terminate early - if (bail != 0) - return (bail == 2); + buildsets(F); // Phase 2: Insert // This phase inserts values to make partially redundant values From clattner at apple.com Tue Jun 26 18:44:30 2007 From: clattner at apple.com (Chris Lattner) Date: Tue, 26 Jun 2007 16:44:30 -0700 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp LegalizeDAG.cpp SelectionDAG.cpp SelectionDAGISel.cpp TargetLowering.cpp In-Reply-To: <200706251624.l5PGOE6v032300@zion.cs.uiuc.edu> References: <200706251624.l5PGOE6v032300@zion.cs.uiuc.edu> Message-ID: <37C88669-4AE2-481D-89DF-922C9C23932D@apple.com> > --- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.500 Fri Jun 22 > 09:59:07 2007 > +++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Mon Jun 25 > 11:23:39 2007 > @@ -173,15 +173,13 @@ > + /// ScalarizeVectorOp - Given an operand of vector type, convert > it into the > + /// equivalent operation that returns a scalar value. > + SDOperand ScalarizeVectorOp(SDOperand O); This comment should explicitly mention that the function is only supposed to be called on single-element vector types. > Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp > diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.409 llvm/ > lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.410 > --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.409 Fri Jun 22 > 09:59:07 2007 > +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Mon Jun 25 > 11:23:39 2007 > @@ -673,7 +673,9 @@ > SDOperand SelectionDAG::getConstantFP(double Val, MVT::ValueType VT, > bool isTarget) { > assert(MVT::isFloatingPoint(VT) && "Cannot create integer FP > constant!"); > - if (VT == MVT::f32) > + MVT::ValueType EltVT = > + MVT::isVector(VT) ? MVT::getVectorElementType(VT) : VT; I don't understand this change. getConstantFP shouldn't be called on vectors, should it? This seems to be a strange thing to overload. -Chris From clattner at apple.com Tue Jun 26 18:47:31 2007 From: clattner at apple.com (Chris Lattner) Date: Tue, 26 Jun 2007 16:47:31 -0700 Subject: [llvm-commits] CVS: llvm/lib/Target/Target.td In-Reply-To: <200706260048.l5Q0mllk023603@zion.cs.uiuc.edu> References: <200706260048.l5Q0mllk023603@zion.cs.uiuc.edu> Message-ID: <2B0A0BA1-D128-4E54-87DE-539753F10C04@apple.com> On Jun 25, 2007, at 5:48 PM, Dan Gohman wrote: > Revert the earlier change that removed the M_REMATERIALIZABLE machine > instruction flag, and use the flag along with a virtual member > function > hook for targets to override if there are instructions that are only > trivially rematerializable with specific operands (i.e. constant pool > loads). nice! -chris From johannes at apple.com Tue Jun 26 19:16:20 2007 From: johannes at apple.com (johannes at apple.com) Date: Tue, 26 Jun 2007 17:16:20 -0700 (PDT) Subject: [llvm-commits] [128845] Make weak_import work for LLVM. Message-ID: <20070627001620.0B029AFAEF54@src> Revision: 128845 Author: johannes Date: 2007-06-26 17:16:19 -0700 (Tue, 26 Jun 2007) Log Message: ----------- Make weak_import work for LLVM. Modified Paths: -------------- apple-local/branches/llvm/gcc/config/darwin.h Modified: apple-local/branches/llvm/gcc/config/darwin.h =================================================================== --- apple-local/branches/llvm/gcc/config/darwin.h 2007-06-26 21:59:14 UTC (rev 128844) +++ apple-local/branches/llvm/gcc/config/darwin.h 2007-06-27 00:16:19 UTC (rev 128845) @@ -673,6 +673,23 @@ fputc ('\n', FILE); \ } while (0) +/* APPLE LOCAL begin LLVM */ +/* weak_import, a Darwin special, does not make function definitions weak. */ +#define TARGET_ADJUST_LLVM_LINKAGE(FN, DECL) \ + do { \ + if ((DECL) && \ + TREE_CODE (DECL) == FUNCTION_DECL && \ + !DECL_EXTERNAL (DECL) && \ + TREE_PUBLIC (DECL) && \ + DECL_WEAK (DECL) && \ + ! lookup_attribute ("weak", DECL_ATTRIBUTES (DECL)) && \ + lookup_attribute ("weak_import", DECL_ATTRIBUTES (DECL)) && \ + (FN)->hasWeakLinkage()) { \ + (FN)->setLinkage(Function::ExternalLinkage); \ + } \ + } while (0) +/* APPLE LOCAL end LLVM */ + /* Darwin has the pthread routines in libSystem, which every program links to, so there's no need for weak-ness for that. */ #define GTHREAD_USE_WEAK 0 From evan.cheng at apple.com Tue Jun 26 20:16:58 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 26 Jun 2007 20:16:58 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp Message-ID: <200706270116.l5R1GwF6006284@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: LiveIntervalAnalysis.cpp updated: 1.248 -> 1.249 --- Log message: Fix an obvious bug. Old code only worked for the entry block. --- Diffs of the changes: (+4 -3) LiveIntervalAnalysis.cpp | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) Index: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp diff -u llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.248 llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.249 --- llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.248 Mon Jun 18 20:48:04 2007 +++ llvm/lib/CodeGen/LiveIntervalAnalysis.cpp Tue Jun 26 20:16:36 2007 @@ -623,10 +623,11 @@ } exit: - // Alias of a live-in register might not be used at all. - if (isAlias && end == 0) { + // Live-in register might not be used at all. + if (end == MIIdx) { DOUT << " dead"; - end = getDefIndex(start) + 1; + if (isAlias) + end = getDefIndex(MIIdx) + 1; } assert(start < end && "did not find end of interval?"); From resistor at mac.com Tue Jun 26 23:06:55 2007 From: resistor at mac.com (Owen Anderson) Date: Tue, 26 Jun 2007 23:06:55 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/GVNPRE/extractelement.ll insertelement.ll shufflevector.ll Message-ID: <200706270406.l5R46taS009728@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/GVNPRE: extractelement.ll added (r1.1) insertelement.ll added (r1.1) shufflevector.ll added (r1.1) --- Log message: Add tests for performing GVNPRE on the three vector-specific instructions. --- Diffs of the changes: (+54 -0) extractelement.ll | 18 ++++++++++++++++++ insertelement.ll | 18 ++++++++++++++++++ shufflevector.ll | 18 ++++++++++++++++++ 3 files changed, 54 insertions(+) Index: llvm/test/Transforms/GVNPRE/extractelement.ll diff -c /dev/null llvm/test/Transforms/GVNPRE/extractelement.ll:1.1 *** /dev/null Tue Jun 26 23:06:42 2007 --- llvm/test/Transforms/GVNPRE/extractelement.ll Tue Jun 26 23:06:32 2007 *************** *** 0 **** --- 1,18 ---- + ; RUN: llvm-as < %s | opt -gvnpre | llvm-dis | grep b.gvnpre + + define i32 @extract() { + entry: ; preds = %cond_false, %entry + %foo = add <2 x i32> < i32 1, i32 1 >, < i32 1, i32 1 > + br i1 true, label %cond_true, label %cond_false + + cond_true: + br label %end + + cond_false: + %a = extractelement <2 x i32> %foo, i32 0 + br label %end + + end: + %b = extractelement <2 x i32> %foo, i32 0 + ret i32 %b + } Index: llvm/test/Transforms/GVNPRE/insertelement.ll diff -c /dev/null llvm/test/Transforms/GVNPRE/insertelement.ll:1.1 *** /dev/null Tue Jun 26 23:06:55 2007 --- llvm/test/Transforms/GVNPRE/insertelement.ll Tue Jun 26 23:06:32 2007 *************** *** 0 **** --- 1,18 ---- + ; RUN: llvm-as < %s | opt -gvnpre | llvm-dis | grep b.gvnpre + + define i32 @extract() { + entry: ; preds = %cond_false, %entry + %foo = add <2 x i32> < i32 1, i32 1 >, < i32 1, i32 1 > + br i1 true, label %cond_true, label %cond_false + + cond_true: + br label %end + + cond_false: + %a = insertelement <2 x i32> %foo, i32 0, i32 3 + br label %end + + end: + %b = insertelement <2 x i32> %foo, i32 0, i32 3 + ret i32 0 + } Index: llvm/test/Transforms/GVNPRE/shufflevector.ll diff -c /dev/null llvm/test/Transforms/GVNPRE/shufflevector.ll:1.1 *** /dev/null Tue Jun 26 23:06:55 2007 --- llvm/test/Transforms/GVNPRE/shufflevector.ll Tue Jun 26 23:06:32 2007 *************** *** 0 **** --- 1,18 ---- + ; RUN: llvm-as < %s | opt -gvnpre | llvm-dis | grep b.gvnpre + + define i32 @extract() { + entry: ; preds = %cond_false, %entry + %foo = add <2 x i32> < i32 1, i32 1 >, < i32 1, i32 1 > + br i1 true, label %cond_true, label %cond_false + + cond_true: + br label %end + + cond_false: + %a = shufflevector <2 x i32> %foo, <2 x i32> undef, <2 x i32> < i32 0, i32 1 > + br label %end + + end: + %b = shufflevector <2 x i32> %foo, <2 x i32> undef, <2 x i32> < i32 0, i32 1 > + ret i32 0 + } From resistor at mac.com Tue Jun 26 23:11:09 2007 From: resistor at mac.com (Owen Anderson) Date: Tue, 26 Jun 2007 23:11:09 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/GVNPRE.cpp Message-ID: <200706270411.l5R4B9tW009829@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: GVNPRE.cpp updated: 1.59 -> 1.60 --- Log message: Add support for performing GVNPRE on the three vector-specific operations. --- Diffs of the changes: (+436 -20) GVNPRE.cpp | 456 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 436 insertions(+), 20 deletions(-) Index: llvm/lib/Transforms/Scalar/GVNPRE.cpp diff -u llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.59 llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.60 --- llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.59 Tue Jun 26 18:29:41 2007 +++ llvm/lib/Transforms/Scalar/GVNPRE.cpp Tue Jun 26 23:10:46 2007 @@ -58,24 +58,30 @@ ICMPSGT, ICMPSGE, ICMPSLT, ICMPSLE, FCMPOEQ, FCMPOGT, FCMPOGE, FCMPOLT, FCMPOLE, FCMPONE, FCMPORD, FCMPUNO, FCMPUEQ, FCMPUGT, FCMPUGE, - FCMPULT, FCMPULE, FCMPUNE }; + FCMPULT, FCMPULE, FCMPUNE, EXTRACT, INSERT, + SHUFFLE }; ExpressionOpcode opcode; - uint32_t leftVN; - uint32_t rightVN; + uint32_t firstVN; + uint32_t secondVN; + uint32_t thirdVN; bool operator< (const Expression& other) const { if (opcode < other.opcode) return true; else if (opcode > other.opcode) return false; - else if (leftVN < other.leftVN) + else if (firstVN < other.firstVN) return true; - else if (leftVN > other.leftVN) + else if (firstVN > other.firstVN) return false; - else if (rightVN < other.rightVN) + else if (secondVN < other.secondVN) return true; - else if (rightVN > other.rightVN) + else if (secondVN > other.secondVN) + return false; + else if (thirdVN < other.thirdVN) + return true; + else if (thirdVN > other.thirdVN) return false; else return false; @@ -92,6 +98,9 @@ Expression::ExpressionOpcode getOpcode(CmpInst* C); Expression create_expression(BinaryOperator* BO); Expression create_expression(CmpInst* C); + Expression create_expression(ShuffleVectorInst* V); + Expression create_expression(ExtractElementInst* C); + Expression create_expression(InsertElementInst* V); public: ValueTable() { nextValueNumber = 1; } uint32_t lookup_or_add(Value* V); @@ -218,8 +227,9 @@ ValueTable::Expression ValueTable::create_expression(BinaryOperator* BO) { Expression e; - e.leftVN = lookup_or_add(BO->getOperand(0)); - e.rightVN = lookup_or_add(BO->getOperand(1)); + e.firstVN = lookup_or_add(BO->getOperand(0)); + e.secondVN = lookup_or_add(BO->getOperand(1)); + e.thirdVN = 0; e.opcode = getOpcode(BO); return e; @@ -228,13 +238,47 @@ ValueTable::Expression ValueTable::create_expression(CmpInst* C) { Expression e; - e.leftVN = lookup_or_add(C->getOperand(0)); - e.rightVN = lookup_or_add(C->getOperand(1)); + e.firstVN = lookup_or_add(C->getOperand(0)); + e.secondVN = lookup_or_add(C->getOperand(1)); + e.thirdVN = 0; e.opcode = getOpcode(C); return e; } +ValueTable::Expression ValueTable::create_expression(ShuffleVectorInst* S) { + Expression e; + + e.firstVN = lookup_or_add(S->getOperand(0)); + e.secondVN = lookup_or_add(S->getOperand(1)); + e.thirdVN = lookup_or_add(S->getOperand(2)); + e.opcode = Expression::SHUFFLE; + + return e; +} + +ValueTable::Expression ValueTable::create_expression(ExtractElementInst* E) { + Expression e; + + e.firstVN = lookup_or_add(E->getOperand(0)); + e.secondVN = lookup_or_add(E->getOperand(1)); + e.thirdVN = 0; + e.opcode = Expression::EXTRACT; + + return e; +} + +ValueTable::Expression ValueTable::create_expression(InsertElementInst* I) { + Expression e; + + e.firstVN = lookup_or_add(I->getOperand(0)); + e.secondVN = lookup_or_add(I->getOperand(1)); + e.thirdVN = lookup_or_add(I->getOperand(2)); + e.opcode = Expression::INSERT; + + return e; +} + //===----------------------------------------------------------------------===// // ValueTable External Functions //===----------------------------------------------------------------------===// @@ -273,6 +317,45 @@ return nextValueNumber++; } + } else if (ShuffleVectorInst* U = dyn_cast(V)) { + Expression e = create_expression(U); + + std::map::iterator EI = expressionNumbering.find(e); + if (EI != expressionNumbering.end()) { + valueNumbering.insert(std::make_pair(V, EI->second)); + return EI->second; + } else { + expressionNumbering.insert(std::make_pair(e, nextValueNumber)); + valueNumbering.insert(std::make_pair(V, nextValueNumber)); + + return nextValueNumber++; + } + } else if (ExtractElementInst* U = dyn_cast(V)) { + Expression e = create_expression(U); + + std::map::iterator EI = expressionNumbering.find(e); + if (EI != expressionNumbering.end()) { + valueNumbering.insert(std::make_pair(V, EI->second)); + return EI->second; + } else { + expressionNumbering.insert(std::make_pair(e, nextValueNumber)); + valueNumbering.insert(std::make_pair(V, nextValueNumber)); + + return nextValueNumber++; + } + } else if (InsertElementInst* U = dyn_cast(V)) { + Expression e = create_expression(U); + + std::map::iterator EI = expressionNumbering.find(e); + if (EI != expressionNumbering.end()) { + valueNumbering.insert(std::make_pair(V, EI->second)); + return EI->second; + } else { + expressionNumbering.insert(std::make_pair(e, nextValueNumber)); + valueNumbering.insert(std::make_pair(V, nextValueNumber)); + + return nextValueNumber++; + } } else { valueNumbering.insert(std::make_pair(V, nextValueNumber)); return nextValueNumber++; @@ -445,7 +528,9 @@ if (V == 0) return 0; - if (isa(V) || isa(V)) { + // Binary Operations + if (isa(V) || isa(V) || + isa(V)) { User* U = cast(V); Value* newOp1 = 0; @@ -477,6 +562,63 @@ C->getPredicate(), newOp1, newOp2, C->getName()+".expr"); + else if (ExtractElementInst* E = dyn_cast(U)) + newVal = new ExtractElementInst(newOp1, newOp2, E->getName()+".expr"); + + uint32_t v = VN.lookup_or_add(newVal); + + Value* leader = find_leader(availableOut[pred], v); + if (leader == 0) { + createdExpressions.push_back(newVal); + return newVal; + } else { + VN.erase(newVal); + delete newVal; + return leader; + } + } + + // Ternary Operations + } else if (isa(V) || isa(V)) { + User* U = cast(V); + + Value* newOp1 = 0; + if (isa(U->getOperand(0))) + newOp1 = phi_translate(U->getOperand(0), pred, succ); + else + newOp1 = U->getOperand(0); + + if (newOp1 == 0) + return 0; + + Value* newOp2 = 0; + if (isa(U->getOperand(1))) + newOp2 = phi_translate(U->getOperand(1), pred, succ); + else + newOp2 = U->getOperand(1); + + if (newOp2 == 0) + return 0; + + Value* newOp3 = 0; + if (isa(U->getOperand(2))) + newOp3 = phi_translate(U->getOperand(2), pred, succ); + else + newOp3 = U->getOperand(2); + + if (newOp3 == 0) + return 0; + + if (newOp1 != U->getOperand(0) || + newOp2 != U->getOperand(1) || + newOp3 != U->getOperand(2)) { + Instruction* newVal = 0; + if (ShuffleVectorInst* S = dyn_cast(U)) + newVal = new ShuffleVectorInst(newOp1, newOp2, newOp3, + S->getName()+".expr"); + else if (InsertElementInst* I = dyn_cast(U)) + newVal = new InsertElementInst(newOp1, newOp2, newOp3, + I->getName()+".expr"); uint32_t v = VN.lookup_or_add(newVal); @@ -490,6 +632,8 @@ return leader; } } + + // PHI Nodes } else if (PHINode* P = dyn_cast(V)) { if (P->getParent() == succ) return P->getIncomingValueForBlock(pred); @@ -585,6 +729,103 @@ if (!lhsValid || !rhsValid) set.erase(C); + } else if (ShuffleVectorInst* S = dyn_cast(v)) { + bool lhsValid = !isa(S->getOperand(0)); + if (!lhsValid) + for (SmallPtrSet::iterator I = set.begin(), E = set.end(); + I != E; ++I) + if (VN.lookup(*I) == VN.lookup(S->getOperand(0))) { + lhsValid = true; + break; + } + if (lhsValid) + lhsValid = !dependsOnInvoke(S->getOperand(0)); + + bool rhsValid = !isa(S->getOperand(1)); + if (!rhsValid) + for (SmallPtrSet::iterator I = set.begin(), E = set.end(); + I != E; ++I) + if (VN.lookup(*I) == VN.lookup(S->getOperand(1))) { + rhsValid = true; + break; + } + if (rhsValid) + rhsValid = !dependsOnInvoke(S->getOperand(1)); + + bool thirdValid = !isa(S->getOperand(2)); + if (!thirdValid) + for (SmallPtrSet::iterator I = set.begin(), E = set.end(); + I != E; ++I) + if (VN.lookup(*I) == VN.lookup(S->getOperand(2))) { + thirdValid = true; + break; + } + if (thirdValid) + thirdValid = !dependsOnInvoke(S->getOperand(2)); + + if (!lhsValid || !rhsValid || !thirdValid) + set.erase(C); + } else if (InsertElementInst* S = dyn_cast(v)) { + bool lhsValid = !isa(S->getOperand(0)); + if (!lhsValid) + for (SmallPtrSet::iterator I = set.begin(), E = set.end(); + I != E; ++I) + if (VN.lookup(*I) == VN.lookup(S->getOperand(0))) { + lhsValid = true; + break; + } + if (lhsValid) + lhsValid = !dependsOnInvoke(S->getOperand(0)); + + bool rhsValid = !isa(S->getOperand(1)); + if (!rhsValid) + for (SmallPtrSet::iterator I = set.begin(), E = set.end(); + I != E; ++I) + if (VN.lookup(*I) == VN.lookup(S->getOperand(1))) { + rhsValid = true; + break; + } + if (rhsValid) + rhsValid = !dependsOnInvoke(S->getOperand(1)); + + bool thirdValid = !isa(S->getOperand(2)); + if (!thirdValid) + for (SmallPtrSet::iterator I = set.begin(), E = set.end(); + I != E; ++I) + if (VN.lookup(*I) == VN.lookup(S->getOperand(2))) { + thirdValid = true; + break; + } + if (thirdValid) + thirdValid = !dependsOnInvoke(S->getOperand(2)); + + if (!lhsValid || !rhsValid || !thirdValid) + set.erase(C); + } else if (ExtractElementInst* C = dyn_cast(v)) { + bool lhsValid = !isa(C->getOperand(0)); + if (!lhsValid) + for (SmallPtrSet::iterator I = set.begin(), E = set.end(); + I != E; ++I) + if (VN.lookup(*I) == VN.lookup(C->getOperand(0))) { + lhsValid = true; + break; + } + if (lhsValid) + lhsValid = !dependsOnInvoke(C->getOperand(0)); + + bool rhsValid = !isa(C->getOperand(1)); + if (!rhsValid) + for (SmallPtrSet::iterator I = set.begin(), E = set.end(); + I != E; ++I) + if (VN.lookup(*I) == VN.lookup(C->getOperand(1))) { + rhsValid = true; + break; + } + if (rhsValid) + rhsValid = !dependsOnInvoke(C->getOperand(1)); + + if (!lhsValid || !rhsValid) + set.erase(C); } } } @@ -632,6 +873,59 @@ visited.insert(e); stack.pop_back(); } + } else if (ExtractElementInst* C = dyn_cast(e)) { + Value* l = find_leader(set, VN.lookup(C->getOperand(0))); + Value* r = find_leader(set, VN.lookup(C->getOperand(1))); + + if (l != 0 && isa(l) && + visited.count(l) == 0) + stack.push_back(l); + else if (r != 0 && isa(r) && + visited.count(r) == 0) + stack.push_back(r); + else { + vec.push_back(e); + visited.insert(e); + stack.pop_back(); + } + } else if (InsertElementInst* C = dyn_cast(e)) { + Value* l = find_leader(set, VN.lookup(C->getOperand(0))); + Value* r = find_leader(set, VN.lookup(C->getOperand(1))); + Value* m = find_leader(set, VN.lookup(C->getOperand(2))); + + if (l != 0 && isa(l) && + visited.count(l) == 0) + stack.push_back(l); + else if (r != 0 && isa(r) && + visited.count(r) == 0) + stack.push_back(r); + else if (m != 0 && isa(m) && + visited.count(m) == 0) + stack.push_back(r); + else { + vec.push_back(e); + visited.insert(e); + stack.pop_back(); + } + } else if (ShuffleVectorInst* C = dyn_cast(e)) { + Value* l = find_leader(set, VN.lookup(C->getOperand(0))); + Value* r = find_leader(set, VN.lookup(C->getOperand(1))); + Value* m = find_leader(set, VN.lookup(C->getOperand(2))); + + if (l != 0 && isa(l) && + visited.count(l) == 0) + stack.push_back(l); + else if (r != 0 && isa(r) && + visited.count(r) == 0) + stack.push_back(r); + else if (m != 0 && isa(m) && + visited.count(m) == 0) + stack.push_back(r); + else { + vec.push_back(e); + visited.insert(e); + stack.pop_back(); + } } else { visited.insert(e); vec.push_back(e); @@ -677,7 +971,9 @@ for (BasicBlock::iterator BI = BB->begin(), BE = BB->end(); BI != BE; ++BI) { - if (isa(BI) || isa(BI)) { + if (isa(BI) || isa(BI) || + isa(BI) || isa(BI) || + isa(BI)) { Value *leader = find_leader(availableOut[BB], VN.lookup(BI)); if (leader != 0) @@ -786,8 +1082,101 @@ expNumbers.set(num); } + // Handle extractelemt ops + } else if (InsertElementInst* C = dyn_cast(I)) { + Value* leftValue = C->getOperand(0); + Value* rightValue = C->getOperand(1); + Value* thirdValue = C->getOperand(2); + + VN.lookup_or_add(C); + + unsigned num = VN.lookup_or_add(C); + expNumbers.resize(VN.size()); + availNumbers.resize(VN.size()); + + if (isa(leftValue)) + if (!expNumbers.test(VN.lookup(leftValue))) { + currExps.insert(leftValue); + expNumbers.set(VN.lookup(leftValue)); + } + if (isa(rightValue)) + if (!expNumbers.test(VN.lookup(rightValue))) { + currExps.insert(rightValue); + expNumbers.set(VN.lookup(rightValue)); + } + if (isa(thirdValue)) + if (!expNumbers.test(VN.lookup(thirdValue))) { + currExps.insert(thirdValue); + expNumbers.set(VN.lookup(thirdValue)); + } + + if (!expNumbers.test(VN.lookup(C))) { + currExps.insert(C); + expNumbers.set(num); + } + + // Handle shufflevector ops + } else if (ShuffleVectorInst* C = dyn_cast(I)) { + Value* leftValue = C->getOperand(0); + Value* rightValue = C->getOperand(1); + Value* thirdValue = C->getOperand(2); + + VN.lookup_or_add(C); + + unsigned num = VN.lookup_or_add(C); + expNumbers.resize(VN.size()); + availNumbers.resize(VN.size()); + + if (isa(leftValue)) + if (!expNumbers.test(VN.lookup(leftValue))) { + currExps.insert(leftValue); + expNumbers.set(VN.lookup(leftValue)); + } + if (isa(rightValue)) + if (!expNumbers.test(VN.lookup(rightValue))) { + currExps.insert(rightValue); + expNumbers.set(VN.lookup(rightValue)); + } + if (isa(thirdValue)) + if (!expNumbers.test(VN.lookup(thirdValue))) { + currExps.insert(thirdValue); + expNumbers.set(VN.lookup(thirdValue)); + } + + if (!expNumbers.test(VN.lookup(C))) { + currExps.insert(C); + expNumbers.set(num); + } + + // Handle insertelement ops + } else if (ExtractElementInst* C = dyn_cast(I)) { + Value* leftValue = C->getOperand(0); + Value* rightValue = C->getOperand(1); + + VN.lookup_or_add(C); + + unsigned num = VN.lookup_or_add(C); + expNumbers.resize(VN.size()); + availNumbers.resize(VN.size()); + + if (isa(leftValue)) + if (!expNumbers.test(VN.lookup(leftValue))) { + currExps.insert(leftValue); + expNumbers.set(VN.lookup(leftValue)); + } + if (isa(rightValue)) + if (!expNumbers.test(VN.lookup(rightValue))) { + currExps.insert(rightValue); + expNumbers.set(VN.lookup(rightValue)); + } + + if (!expNumbers.test(VN.lookup(C))) { + currExps.insert(C); + expNumbers.set(num); + } + // Handle unsupported ops - } else if (!I->isTerminator()){ + }else if (!I->isTerminator()){ VN.lookup_or_add(I); expNumbers.resize(VN.size()); availNumbers.resize(VN.size()); @@ -995,17 +1384,35 @@ Value* s1 = 0; if (isa(U->getOperand(0)) || - isa(U->getOperand(0))) + isa(U->getOperand(0)) || + isa(U->getOperand(0)) || + isa(U->getOperand(0)) || + isa(U->getOperand(0))) s1 = find_leader(availableOut[*PI], VN.lookup(U->getOperand(0))); else s1 = U->getOperand(0); Value* s2 = 0; - if (isa(U->getOperand(1)) || - isa(U->getOperand(1))) + if (isa(U->getOperand(1)) || + isa(U->getOperand(1)) || + isa(U->getOperand(1)) || + isa(U->getOperand(1)) || + isa(U->getOperand(1))) s2 = find_leader(availableOut[*PI], VN.lookup(U->getOperand(1))); else s2 = U->getOperand(1); + + Value* s3 = 0; + if (isa(U) || + isa(U)) + if (isa(U->getOperand(2)) || + isa(U->getOperand(2)) || + isa(U->getOperand(2)) || + isa(U->getOperand(2)) || + isa(U->getOperand(2))) + s3 = find_leader(availableOut[*PI], VN.lookup(U->getOperand(2))); + else + s3 = U->getOperand(2); Value* newVal = 0; if (BinaryOperator* BO = dyn_cast(U)) @@ -1016,6 +1423,15 @@ newVal = CmpInst::create(C->getOpcode(), C->getPredicate(), s1, s2, C->getName()+".gvnpre", (*PI)->getTerminator()); + else if (ShuffleVectorInst* S = dyn_cast(U)) + newVal = new ShuffleVectorInst(s1, s2, s3, S->getName()+".gvnpre", + (*PI)->getTerminator()); + else if (InsertElementInst* S = dyn_cast(U)) + newVal = new InsertElementInst(s1, s2, s3, S->getName()+".gvnpre", + (*PI)->getTerminator()); + else if (ExtractElementInst* S = dyn_cast(U)) + newVal = new ExtractElementInst(s1, s2, S->getName()+".gvnpre", + (*PI)->getTerminator()); VN.add(newVal, VN.lookup(U)); @@ -1059,7 +1475,9 @@ for (unsigned i = 0; i < workList.size(); ++i) { Value* e = workList[i]; - if (isa(e) || isa(e)) { + if (isa(e) || isa(e) || + isa(e) || isa(e) || + isa(e)) { if (find_leader(availableOut[D->getIDom()->getBlock()], VN.lookup(e)) != 0) continue; @@ -1179,8 +1597,6 @@ // Phase 1: BuildSets // This phase calculates the AVAIL_OUT and ANTIC_IN sets - // NOTE: If full postdom information is no available, this will bail - // early, performing GVN but not PRE buildsets(F); // Phase 2: Insert From evan.cheng at apple.com Wed Jun 27 00:23:23 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 27 Jun 2007 00:23:23 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/LiveVariables.cpp Message-ID: <200706270523.l5R5NN6K011262@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: LiveVariables.cpp updated: 1.85 -> 1.86 --- Log message: Replace std::set with SmallPtrSet. --- Diffs of the changes: (+5 -3) LiveVariables.cpp | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) Index: llvm/lib/CodeGen/LiveVariables.cpp diff -u llvm/lib/CodeGen/LiveVariables.cpp:1.85 llvm/lib/CodeGen/LiveVariables.cpp:1.86 --- llvm/lib/CodeGen/LiveVariables.cpp:1.85 Tue Jun 26 16:03:35 2007 +++ llvm/lib/CodeGen/LiveVariables.cpp Wed Jun 27 00:23:00 2007 @@ -32,6 +32,7 @@ #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetMachine.h" #include "llvm/ADT/DepthFirstIterator.h" +#include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/STLExtras.h" #include "llvm/Config/alloca.h" #include @@ -424,9 +425,10 @@ // nodes, which are treated as a special case). // MachineBasicBlock *Entry = MF->begin(); - std::set Visited; - for (df_ext_iterator DFI = df_ext_begin(Entry, Visited), - E = df_ext_end(Entry, Visited); DFI != E; ++DFI) { + SmallPtrSet Visited; + for (df_ext_iterator > + DFI = df_ext_begin(Entry, Visited), E = df_ext_end(Entry, Visited); + DFI != E; ++DFI) { MachineBasicBlock *MBB = *DFI; // Mark live-in registers as live-in. From duraid at octopus.com.au Wed Jun 27 02:07:35 2007 From: duraid at octopus.com.au (Duraid Madina) Date: Wed, 27 Jun 2007 02:07:35 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/RegAllocBigBlock.cpp Message-ID: <200706270707.l5R77Z6R013517@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: RegAllocBigBlock.cpp updated: 1.3 -> 1.4 --- Log message: pull evan's fixes - should help the nightly tester (but there are still some issues) --- Diffs of the changes: (+63 -48) RegAllocBigBlock.cpp | 111 ++++++++++++++++++++++++++++----------------------- 1 files changed, 63 insertions(+), 48 deletions(-) Index: llvm/lib/CodeGen/RegAllocBigBlock.cpp diff -u llvm/lib/CodeGen/RegAllocBigBlock.cpp:1.3 llvm/lib/CodeGen/RegAllocBigBlock.cpp:1.4 --- llvm/lib/CodeGen/RegAllocBigBlock.cpp:1.3 Mon Jun 25 19:21:58 2007 +++ llvm/lib/CodeGen/RegAllocBigBlock.cpp Wed Jun 27 02:07:13 2007 @@ -47,6 +47,7 @@ #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/Statistic.h" #include +#include using namespace llvm; STATISTIC(NumStores, "Number of stores added"); @@ -243,13 +244,6 @@ /// void assignVirtToPhysReg(unsigned VirtReg, unsigned PhysReg); - /// liberatePhysReg - Make sure the specified physical register is available - /// for use. If there is currently a value in it, it is either moved out of - /// the way or spilled to memory. - /// - void liberatePhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator &I, - unsigned PhysReg); - /// isPhysRegAvailable - Return true if the specified physical register is /// free and available for use. This also includes checking to see if /// aliased registers are all free... @@ -364,18 +358,7 @@ *AliasSet; ++AliasSet) if (PhysRegsUsed[*AliasSet] != -1 && // Spill aliased register. PhysRegsUsed[*AliasSet] != -2) // If allocatable. - if (PhysRegsUsed[*AliasSet] == 0) { - // This must have been a dead def due to something like this: - // %EAX := - // := op %AL - // No more use of %EAX, %AH, etc. - // %EAX isn't dead upon definition, but %AH is. However %AH isn't - // an operand of definition MI so it's not marked as such. - DOUT << " Register " << RegInfo->getName(*AliasSet) - << " [%reg" << *AliasSet - << "] is never used, removing it frame live list\n"; - removePhysReg(*AliasSet); - } else + if (PhysRegsUsed[*AliasSet]) spillVirtReg(MBB, I, PhysRegsUsed[*AliasSet], *AliasSet); } } @@ -429,16 +412,6 @@ } -/// liberatePhysReg - Make sure the specified physical register is available for -/// use. If there is currently a value in it, it is either moved out of the way -/// or spilled to memory. -/// -void RABigBlock::liberatePhysReg(MachineBasicBlock &MBB, - MachineBasicBlock::iterator &I, - unsigned PhysReg) { - spillPhysReg(MBB, I, PhysReg); -} - /// chooseReg - Pick a physical register to hold the specified /// virtual register by choosing the one whose value will be read /// furthest in the future. @@ -487,8 +460,8 @@ } } } - - assert(PhysReg && "couldn't grab a register from the table?"); + + assert(PhysReg && "couldn't assign a physical register :( "); // TODO: assert that RC->contains(PhysReg) / handle aliased registers // since we needed to look in the table we need to spill this register. @@ -599,6 +572,29 @@ } } +/// isReadModWriteImplicitKill - True if this is an implicit kill for a +/// read/mod/write register, i.e. update partial register. +static bool isReadModWriteImplicitKill(MachineInstr *MI, unsigned Reg) { + for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { + MachineOperand& MO = MI->getOperand(i); + if (MO.isRegister() && MO.getReg() == Reg && MO.isImplicit() && + MO.isDef() && !MO.isDead()) + return true; + } + return false; +} + +/// isReadModWriteImplicitDef - True if this is an implicit def for a +/// read/mod/write register, i.e. update partial register. +static bool isReadModWriteImplicitDef(MachineInstr *MI, unsigned Reg) { + for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { + MachineOperand& MO = MI->getOperand(i); + if (MO.isRegister() && MO.getReg() == Reg && MO.isImplicit() && + !MO.isDef() && MO.isKill()) + return true; + } + return false; +} void RABigBlock::AllocateBasicBlock(MachineBasicBlock &MBB) { // loop over each instruction @@ -616,7 +612,7 @@ unsigned Reg = I->first; MF->setPhysRegUsed(Reg); PhysRegsUsed[Reg] = 0; // It is free and reserved now - for (const unsigned *AliasSet = RegInfo->getAliasSet(Reg); + for (const unsigned *AliasSet = RegInfo->getSubRegisters(Reg); *AliasSet; ++AliasSet) { if (PhysRegsUsed[*AliasSet] != -2) { PhysRegsUsed[*AliasSet] = 0; // It is free and reserved now @@ -627,12 +623,10 @@ } // Otherwise, sequentially allocate each instruction in the MBB. - MBBCurTime = -1; while (MII != MBB.end()) { MachineInstr *MI = MII++; - MBBCurTime++; const TargetInstrDescriptor &TID = TII.get(MI->getOpcode()); - DEBUG(DOUT << "\nTime=" << MBBCurTime << " Starting RegAlloc of: " << *MI; + DEBUG(DOUT << "\nStarting RegAlloc of: " << *MI; DOUT << " Regs have values: "; for (unsigned i = 0; i != RegInfo->getNumRegs(); ++i) if (PhysRegsUsed[i] != -1 && PhysRegsUsed[i] != -2) @@ -640,11 +634,28 @@ << ",%reg" << PhysRegsUsed[i] << "] "; DOUT << "\n"); +/* XXX : + // Loop over the implicit uses, making sure that they are at the head of the + // use order list, so they don't get reallocated. + if (TID.ImplicitUses) { + for (const unsigned *ImplicitUses = TID.ImplicitUses; + *ImplicitUses; ++ImplicitUses) + MarkPhysRegRecentlyUsed(*ImplicitUses); + } + XXX */ + SmallVector Kills; for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { MachineOperand& MO = MI->getOperand(i); - if (MO.isRegister() && MO.isKill()) - Kills.push_back(MO.getReg()); + if (MO.isRegister() && MO.isKill()) { + if (!MO.isImplicit()) + Kills.push_back(MO.getReg()); + else if (!isReadModWriteImplicitKill(MI, MO.getReg())) + // These are extra physical register kills when a sub-register + // is defined (def of a sub-register is a read/mod/write of the + // larger registers). Ignore. + Kills.push_back(MO.getReg()); + } } // Get the used operands into registers. This has the potential to spill @@ -677,13 +688,16 @@ } else if (PhysRegsUsed[PhysReg] == -2) { // Unallocatable register dead, ignore. continue; + } else { + assert(!PhysRegsUsed[PhysReg] || PhysRegsUsed[PhysReg] == -1 && + "Silently clearing a virtual register?"); } if (PhysReg) { DOUT << " Last use of " << RegInfo->getName(PhysReg) << "[%reg" << VirtReg <<"], removing it from live set\n"; removePhysReg(PhysReg); - for (const unsigned *AliasSet = RegInfo->getAliasSet(PhysReg); + for (const unsigned *AliasSet = RegInfo->getSubRegisters(PhysReg); *AliasSet; ++AliasSet) { if (PhysRegsUsed[*AliasSet] != -2) { DOUT << " Last use of " @@ -703,15 +717,20 @@ MRegisterInfo::isPhysicalRegister(MO.getReg())) { unsigned Reg = MO.getReg(); if (PhysRegsUsed[Reg] == -2) continue; // Something like ESP. - + // These are extra physical register defs when a sub-register + // is defined (def of a sub-register is a read/mod/write of the + // larger registers). Ignore. + if (isReadModWriteImplicitDef(MI, MO.getReg())) continue; + MF->setPhysRegUsed(Reg); spillPhysReg(MBB, MI, Reg, true); // Spill any existing value in reg PhysRegsUsed[Reg] = 0; // It is free and reserved now - for (const unsigned *AliasSet = RegInfo->getAliasSet(Reg); + + for (const unsigned *AliasSet = RegInfo->getSubRegisters(Reg); *AliasSet; ++AliasSet) { if (PhysRegsUsed[*AliasSet] != -2) { - PhysRegsUsed[*AliasSet] = 0; // It is free and reserved now MF->setPhysRegUsed(*AliasSet); + PhysRegsUsed[*AliasSet] = 0; // It is free and reserved now } } } @@ -722,19 +741,15 @@ for (const unsigned *ImplicitDefs = TID.ImplicitDefs; *ImplicitDefs; ++ImplicitDefs) { unsigned Reg = *ImplicitDefs; - bool IsNonAllocatable = PhysRegsUsed[Reg] == -2; - if (!IsNonAllocatable) { + if (PhysRegsUsed[Reg] != -2) { spillPhysReg(MBB, MI, Reg, true); PhysRegsUsed[Reg] = 0; // It is free and reserved now } MF->setPhysRegUsed(Reg); - - for (const unsigned *AliasSet = RegInfo->getAliasSet(Reg); + for (const unsigned *AliasSet = RegInfo->getSubRegisters(Reg); *AliasSet; ++AliasSet) { if (PhysRegsUsed[*AliasSet] != -2) { - if (!IsNonAllocatable) { - PhysRegsUsed[*AliasSet] = 0; // It is free and reserved now - } + PhysRegsUsed[*AliasSet] = 0; // It is free and reserved now MF->setPhysRegUsed(*AliasSet); } } From isanbard at gmail.com Wed Jun 27 02:49:21 2007 From: isanbard at gmail.com (Bill Wendling) Date: Wed, 27 Jun 2007 00:49:21 -0700 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/RegAllocBigBlock.cpp In-Reply-To: <200706270707.l5R77Z6R013517@zion.cs.uiuc.edu> References: <200706270707.l5R77Z6R013517@zion.cs.uiuc.edu> Message-ID: <75F180C6-2931-4E47-8DFE-7D83D282F564@gmail.com> Hi Duraid, > +#include Please remove this. It's forbidden in the main libraries. Thanks! -bw From duraid at octopus.com.au Wed Jun 27 03:12:42 2007 From: duraid at octopus.com.au (Duraid Madina) Date: Wed, 27 Jun 2007 03:12:42 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/RegAllocBigBlock.cpp Message-ID: <200706270812.l5R8Cg4h023557@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: RegAllocBigBlock.cpp updated: 1.4 -> 1.5 --- Log message: revert evan's fixes (and my doofusness) since they had a huge code quality hit. will look at this soon. --- Diffs of the changes: (+31 -63) RegAllocBigBlock.cpp | 94 ++++++++++++++++----------------------------------- 1 files changed, 31 insertions(+), 63 deletions(-) Index: llvm/lib/CodeGen/RegAllocBigBlock.cpp diff -u llvm/lib/CodeGen/RegAllocBigBlock.cpp:1.4 llvm/lib/CodeGen/RegAllocBigBlock.cpp:1.5 --- llvm/lib/CodeGen/RegAllocBigBlock.cpp:1.4 Wed Jun 27 02:07:13 2007 +++ llvm/lib/CodeGen/RegAllocBigBlock.cpp Wed Jun 27 03:11:59 2007 @@ -47,7 +47,6 @@ #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/Statistic.h" #include -#include using namespace llvm; STATISTIC(NumStores, "Number of stores added"); @@ -358,7 +357,18 @@ *AliasSet; ++AliasSet) if (PhysRegsUsed[*AliasSet] != -1 && // Spill aliased register. PhysRegsUsed[*AliasSet] != -2) // If allocatable. - if (PhysRegsUsed[*AliasSet]) + if (PhysRegsUsed[*AliasSet] == 0) { + // This must have been a dead def due to something like this: + // %EAX := + // := op %AL + // No more use of %EAX, %AH, etc. + // %EAX isn't dead upon definition, but %AH is. However %AH isn't + // an operand of definition MI so it's not marked as such. + DOUT << " Register " << RegInfo->getName(*AliasSet) + << " [%reg" << *AliasSet + << "] is never used, removing it frame live list\n"; + removePhysReg(*AliasSet); + } else spillVirtReg(MBB, I, PhysRegsUsed[*AliasSet], *AliasSet); } } @@ -460,8 +470,8 @@ } } } - - assert(PhysReg && "couldn't assign a physical register :( "); + + assert(PhysReg && "couldn't grab a register from the table?"); // TODO: assert that RC->contains(PhysReg) / handle aliased registers // since we needed to look in the table we need to spill this register. @@ -572,29 +582,6 @@ } } -/// isReadModWriteImplicitKill - True if this is an implicit kill for a -/// read/mod/write register, i.e. update partial register. -static bool isReadModWriteImplicitKill(MachineInstr *MI, unsigned Reg) { - for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { - MachineOperand& MO = MI->getOperand(i); - if (MO.isRegister() && MO.getReg() == Reg && MO.isImplicit() && - MO.isDef() && !MO.isDead()) - return true; - } - return false; -} - -/// isReadModWriteImplicitDef - True if this is an implicit def for a -/// read/mod/write register, i.e. update partial register. -static bool isReadModWriteImplicitDef(MachineInstr *MI, unsigned Reg) { - for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { - MachineOperand& MO = MI->getOperand(i); - if (MO.isRegister() && MO.getReg() == Reg && MO.isImplicit() && - !MO.isDef() && MO.isKill()) - return true; - } - return false; -} void RABigBlock::AllocateBasicBlock(MachineBasicBlock &MBB) { // loop over each instruction @@ -612,7 +599,7 @@ unsigned Reg = I->first; MF->setPhysRegUsed(Reg); PhysRegsUsed[Reg] = 0; // It is free and reserved now - for (const unsigned *AliasSet = RegInfo->getSubRegisters(Reg); + for (const unsigned *AliasSet = RegInfo->getAliasSet(Reg); *AliasSet; ++AliasSet) { if (PhysRegsUsed[*AliasSet] != -2) { PhysRegsUsed[*AliasSet] = 0; // It is free and reserved now @@ -623,10 +610,12 @@ } // Otherwise, sequentially allocate each instruction in the MBB. + MBBCurTime = -1; while (MII != MBB.end()) { MachineInstr *MI = MII++; + MBBCurTime++; const TargetInstrDescriptor &TID = TII.get(MI->getOpcode()); - DEBUG(DOUT << "\nStarting RegAlloc of: " << *MI; + DEBUG(DOUT << "\nTime=" << MBBCurTime << " Starting RegAlloc of: " << *MI; DOUT << " Regs have values: "; for (unsigned i = 0; i != RegInfo->getNumRegs(); ++i) if (PhysRegsUsed[i] != -1 && PhysRegsUsed[i] != -2) @@ -634,28 +623,11 @@ << ",%reg" << PhysRegsUsed[i] << "] "; DOUT << "\n"); -/* XXX : - // Loop over the implicit uses, making sure that they are at the head of the - // use order list, so they don't get reallocated. - if (TID.ImplicitUses) { - for (const unsigned *ImplicitUses = TID.ImplicitUses; - *ImplicitUses; ++ImplicitUses) - MarkPhysRegRecentlyUsed(*ImplicitUses); - } - XXX */ - SmallVector Kills; for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { MachineOperand& MO = MI->getOperand(i); - if (MO.isRegister() && MO.isKill()) { - if (!MO.isImplicit()) - Kills.push_back(MO.getReg()); - else if (!isReadModWriteImplicitKill(MI, MO.getReg())) - // These are extra physical register kills when a sub-register - // is defined (def of a sub-register is a read/mod/write of the - // larger registers). Ignore. - Kills.push_back(MO.getReg()); - } + if (MO.isRegister() && MO.isKill()) + Kills.push_back(MO.getReg()); } // Get the used operands into registers. This has the potential to spill @@ -688,16 +660,13 @@ } else if (PhysRegsUsed[PhysReg] == -2) { // Unallocatable register dead, ignore. continue; - } else { - assert(!PhysRegsUsed[PhysReg] || PhysRegsUsed[PhysReg] == -1 && - "Silently clearing a virtual register?"); } if (PhysReg) { DOUT << " Last use of " << RegInfo->getName(PhysReg) << "[%reg" << VirtReg <<"], removing it from live set\n"; removePhysReg(PhysReg); - for (const unsigned *AliasSet = RegInfo->getSubRegisters(PhysReg); + for (const unsigned *AliasSet = RegInfo->getAliasSet(PhysReg); *AliasSet; ++AliasSet) { if (PhysRegsUsed[*AliasSet] != -2) { DOUT << " Last use of " @@ -717,20 +686,15 @@ MRegisterInfo::isPhysicalRegister(MO.getReg())) { unsigned Reg = MO.getReg(); if (PhysRegsUsed[Reg] == -2) continue; // Something like ESP. - // These are extra physical register defs when a sub-register - // is defined (def of a sub-register is a read/mod/write of the - // larger registers). Ignore. - if (isReadModWriteImplicitDef(MI, MO.getReg())) continue; - + MF->setPhysRegUsed(Reg); spillPhysReg(MBB, MI, Reg, true); // Spill any existing value in reg PhysRegsUsed[Reg] = 0; // It is free and reserved now - - for (const unsigned *AliasSet = RegInfo->getSubRegisters(Reg); + for (const unsigned *AliasSet = RegInfo->getAliasSet(Reg); *AliasSet; ++AliasSet) { if (PhysRegsUsed[*AliasSet] != -2) { - MF->setPhysRegUsed(*AliasSet); PhysRegsUsed[*AliasSet] = 0; // It is free and reserved now + MF->setPhysRegUsed(*AliasSet); } } } @@ -741,15 +705,19 @@ for (const unsigned *ImplicitDefs = TID.ImplicitDefs; *ImplicitDefs; ++ImplicitDefs) { unsigned Reg = *ImplicitDefs; - if (PhysRegsUsed[Reg] != -2) { + bool IsNonAllocatable = PhysRegsUsed[Reg] == -2; + if (!IsNonAllocatable) { spillPhysReg(MBB, MI, Reg, true); PhysRegsUsed[Reg] = 0; // It is free and reserved now } MF->setPhysRegUsed(Reg); - for (const unsigned *AliasSet = RegInfo->getSubRegisters(Reg); + + for (const unsigned *AliasSet = RegInfo->getAliasSet(Reg); *AliasSet; ++AliasSet) { if (PhysRegsUsed[*AliasSet] != -2) { - PhysRegsUsed[*AliasSet] = 0; // It is free and reserved now + if (!IsNonAllocatable) { + PhysRegsUsed[*AliasSet] = 0; // It is free and reserved now + } MF->setPhysRegUsed(*AliasSet); } } From duraid at octopus.com.au Wed Jun 27 03:31:39 2007 From: duraid at octopus.com.au (Duraid Madina) Date: Wed, 27 Jun 2007 03:31:39 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/RegAllocBigBlock.cpp Message-ID: <200706270831.l5R8Vdwb023918@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: RegAllocBigBlock.cpp updated: 1.5 -> 1.6 --- Log message: ok, this much doesn't seem to bork anything --- Diffs of the changes: (+48 -25) RegAllocBigBlock.cpp | 73 +++++++++++++++++++++++++++++++++------------------ 1 files changed, 48 insertions(+), 25 deletions(-) Index: llvm/lib/CodeGen/RegAllocBigBlock.cpp diff -u llvm/lib/CodeGen/RegAllocBigBlock.cpp:1.5 llvm/lib/CodeGen/RegAllocBigBlock.cpp:1.6 --- llvm/lib/CodeGen/RegAllocBigBlock.cpp:1.5 Wed Jun 27 03:11:59 2007 +++ llvm/lib/CodeGen/RegAllocBigBlock.cpp Wed Jun 27 03:31:07 2007 @@ -357,18 +357,7 @@ *AliasSet; ++AliasSet) if (PhysRegsUsed[*AliasSet] != -1 && // Spill aliased register. PhysRegsUsed[*AliasSet] != -2) // If allocatable. - if (PhysRegsUsed[*AliasSet] == 0) { - // This must have been a dead def due to something like this: - // %EAX := - // := op %AL - // No more use of %EAX, %AH, etc. - // %EAX isn't dead upon definition, but %AH is. However %AH isn't - // an operand of definition MI so it's not marked as such. - DOUT << " Register " << RegInfo->getName(*AliasSet) - << " [%reg" << *AliasSet - << "] is never used, removing it frame live list\n"; - removePhysReg(*AliasSet); - } else + if (PhysRegsUsed[*AliasSet]) spillVirtReg(MBB, I, PhysRegsUsed[*AliasSet], *AliasSet); } } @@ -582,6 +571,30 @@ } } +/// isReadModWriteImplicitKill - True if this is an implicit kill for a +/// read/mod/write register, i.e. update partial register. +static bool isReadModWriteImplicitKill(MachineInstr *MI, unsigned Reg) { + for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { + MachineOperand& MO = MI->getOperand(i); + if (MO.isRegister() && MO.getReg() == Reg && MO.isImplicit() && + MO.isDef() && !MO.isDead()) + return true; + } + return false; +} + +/// isReadModWriteImplicitDef - True if this is an implicit def for a +/// read/mod/write register, i.e. update partial register. +static bool isReadModWriteImplicitDef(MachineInstr *MI, unsigned Reg) { + for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { + MachineOperand& MO = MI->getOperand(i); + if (MO.isRegister() && MO.getReg() == Reg && MO.isImplicit() && + !MO.isDef() && MO.isKill()) + return true; + } + return false; +} + void RABigBlock::AllocateBasicBlock(MachineBasicBlock &MBB) { // loop over each instruction @@ -599,7 +612,7 @@ unsigned Reg = I->first; MF->setPhysRegUsed(Reg); PhysRegsUsed[Reg] = 0; // It is free and reserved now - for (const unsigned *AliasSet = RegInfo->getAliasSet(Reg); + for (const unsigned *AliasSet = RegInfo->getSubRegisters(Reg); *AliasSet; ++AliasSet) { if (PhysRegsUsed[*AliasSet] != -2) { PhysRegsUsed[*AliasSet] = 0; // It is free and reserved now @@ -626,8 +639,15 @@ SmallVector Kills; for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { MachineOperand& MO = MI->getOperand(i); - if (MO.isRegister() && MO.isKill()) - Kills.push_back(MO.getReg()); + if (MO.isRegister() && MO.isKill()) { + if (!MO.isImplicit()) + Kills.push_back(MO.getReg()); + else if (!isReadModWriteImplicitKill(MI, MO.getReg())) + // These are extra physical register kills when a sub-register + // is defined (def of a sub-register is a read/mod/write of the + // larger registers). Ignore. + Kills.push_back(MO.getReg()); + } } // Get the used operands into registers. This has the potential to spill @@ -660,13 +680,16 @@ } else if (PhysRegsUsed[PhysReg] == -2) { // Unallocatable register dead, ignore. continue; + } else { + assert(!PhysRegsUsed[PhysReg] || PhysRegsUsed[PhysReg] == -1 && + "Silently clearing a virtual register?"); } if (PhysReg) { DOUT << " Last use of " << RegInfo->getName(PhysReg) << "[%reg" << VirtReg <<"], removing it from live set\n"; removePhysReg(PhysReg); - for (const unsigned *AliasSet = RegInfo->getAliasSet(PhysReg); + for (const unsigned *AliasSet = RegInfo->getSubRegisters(PhysReg); *AliasSet; ++AliasSet) { if (PhysRegsUsed[*AliasSet] != -2) { DOUT << " Last use of " @@ -686,11 +709,15 @@ MRegisterInfo::isPhysicalRegister(MO.getReg())) { unsigned Reg = MO.getReg(); if (PhysRegsUsed[Reg] == -2) continue; // Something like ESP. - + // These are extra physical register defs when a sub-register + // is defined (def of a sub-register is a read/mod/write of the + // larger registers). Ignore. + if (isReadModWriteImplicitDef(MI, MO.getReg())) continue; + MF->setPhysRegUsed(Reg); spillPhysReg(MBB, MI, Reg, true); // Spill any existing value in reg PhysRegsUsed[Reg] = 0; // It is free and reserved now - for (const unsigned *AliasSet = RegInfo->getAliasSet(Reg); + for (const unsigned *AliasSet = RegInfo->getSubRegisters(Reg); *AliasSet; ++AliasSet) { if (PhysRegsUsed[*AliasSet] != -2) { PhysRegsUsed[*AliasSet] = 0; // It is free and reserved now @@ -705,19 +732,15 @@ for (const unsigned *ImplicitDefs = TID.ImplicitDefs; *ImplicitDefs; ++ImplicitDefs) { unsigned Reg = *ImplicitDefs; - bool IsNonAllocatable = PhysRegsUsed[Reg] == -2; - if (!IsNonAllocatable) { + if (PhysRegsUsed[Reg] != -2) { spillPhysReg(MBB, MI, Reg, true); PhysRegsUsed[Reg] = 0; // It is free and reserved now } MF->setPhysRegUsed(Reg); - - for (const unsigned *AliasSet = RegInfo->getAliasSet(Reg); + for (const unsigned *AliasSet = RegInfo->getSubRegisters(Reg); *AliasSet; ++AliasSet) { if (PhysRegsUsed[*AliasSet] != -2) { - if (!IsNonAllocatable) { - PhysRegsUsed[*AliasSet] = 0; // It is free and reserved now - } + PhysRegsUsed[*AliasSet] = 0; // It is free and reserved now MF->setPhysRegUsed(*AliasSet); } } From duraid at octopus.com.au Wed Jun 27 04:01:36 2007 From: duraid at octopus.com.au (Duraid Madina) Date: Wed, 27 Jun 2007 04:01:36 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/RegAllocBigBlock.cpp Message-ID: <200706270901.l5R91aAN024424@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: RegAllocBigBlock.cpp updated: 1.6 -> 1.7 --- Log message: ok, this is something of a dirty hack, but it seems to work. (fixes e.g. the SPASS miscompilation) --- Diffs of the changes: (+16 -2) RegAllocBigBlock.cpp | 18 ++++++++++++++++-- 1 files changed, 16 insertions(+), 2 deletions(-) Index: llvm/lib/CodeGen/RegAllocBigBlock.cpp diff -u llvm/lib/CodeGen/RegAllocBigBlock.cpp:1.6 llvm/lib/CodeGen/RegAllocBigBlock.cpp:1.7 --- llvm/lib/CodeGen/RegAllocBigBlock.cpp:1.6 Wed Jun 27 03:31:07 2007 +++ llvm/lib/CodeGen/RegAllocBigBlock.cpp Wed Jun 27 04:01:14 2007 @@ -459,9 +459,23 @@ } } } + + if(PhysReg == 0) { // ok, now we're desperate. We couldn't choose + // a register to spill by looking through the + // read timetable, so now we just spill the + // first allocatable register we find. + + // for all physical regs in the RC, + for(TargetRegisterClass::iterator pReg = RC->begin(); + pReg != RC->end(); ++pReg) { + // if we find a register we can spill + if(PhysRegsUsed[*pReg]>=-1) + PhysReg = *pReg; // choose it to be spilled + } + } - assert(PhysReg && "couldn't grab a register from the table?"); - // TODO: assert that RC->contains(PhysReg) / handle aliased registers + assert(PhysReg && "couldn't choose a register to spill :( "); + // TODO: assert that RC->contains(PhysReg) / handle aliased registers? // since we needed to look in the table we need to spill this register. spillPhysReg(MBB, I, PhysReg); From zhousheng00 at gmail.com Wed Jun 27 04:50:48 2007 From: zhousheng00 at gmail.com (Zhou Sheng) Date: Wed, 27 Jun 2007 04:50:48 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp Message-ID: <200706270950.l5R9omZx025986@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: IndVarSimplify.cpp updated: 1.123 -> 1.124 --- Log message: Fix a bug. --- Diffs of the changes: (+4 -1) IndVarSimplify.cpp | 5 ++++- 1 files changed, 4 insertions(+), 1 deletion(-) Index: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp diff -u llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.123 llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.124 --- llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.123 Tue Jun 19 09:28:31 2007 +++ llvm/lib/Transforms/Scalar/IndVarSimplify.cpp Wed Jun 27 04:50:26 2007 @@ -519,8 +519,11 @@ DOUT << "INDVARS: New CanIV: " << *IndVar; if (!isa(IterationCount)) { - if (IterationCount->getType() != LargestType) + if (IterationCount->getType()->getPrimitiveSizeInBits() < + LargestType->getPrimitiveSizeInBits()) IterationCount = SCEVZeroExtendExpr::get(IterationCount, LargestType); + else if (IterationCount->getType() != LargestType) + IterationCount = SCEVTruncateExpr::get(IterationCount, LargestType); if (Instruction *DI = LinearFunctionTestReplace(L, IterationCount,Rewriter)) DeadInsts.insert(DI); } From djg at cray.com Wed Jun 27 09:06:43 2007 From: djg at cray.com (Dan Gohman) Date: Wed, 27 Jun 2007 09:06:43 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Message-ID: <200706271406.l5RE6hCq032399@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: LegalizeDAG.cpp updated: 1.501 -> 1.502 --- Log message: Make the comment for ScalarizeVectorOp mention that it is only for use with single-element vectors. --- Diffs of the changes: (+6 -4) LegalizeDAG.cpp | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.501 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.502 --- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.501 Mon Jun 25 11:23:39 2007 +++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Wed Jun 27 09:06:22 2007 @@ -177,8 +177,9 @@ /// two smaller values. void SplitVectorOp(SDOperand O, SDOperand &Lo, SDOperand &Hi); - /// ScalarizeVectorOp - Given an operand of vector type, convert it into the - /// equivalent operation that returns a scalar value. + /// ScalarizeVectorOp - Given an operand of single-element vector type + /// (e.g. v1f32), convert it into the equivalent operation that returns a + /// scalar (e.g. f32) value. SDOperand ScalarizeVectorOp(SDOperand O); /// isShuffleLegal - Return true if a vector shuffle is legal with the @@ -5602,8 +5603,9 @@ } -/// ScalarizeVectorOp - Given an operand of vector type, convert it into the -/// equivalent operation that returns a scalar (e.g. F32) value. +/// ScalarizeVectorOp - Given an operand of single-element vector type +/// (e.g. v1f32), convert it into the equivalent operation that returns a +/// scalar (e.g. f32) value. SDOperand SelectionDAGLegalize::ScalarizeVectorOp(SDOperand Op) { assert(MVT::isVector(Op.getValueType()) && "Bad ScalarizeVectorOp invocation!"); From djg at cray.com Wed Jun 27 09:10:01 2007 From: djg at cray.com (Dan Gohman) Date: Wed, 27 Jun 2007 09:10:01 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Support/Debug.h Message-ID: <200706271410.l5REA1lD000300@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Support: Debug.h updated: 1.15 -> 1.16 --- Log message: Allow DOUT to be used outside of the llvm namespace. --- Diffs of the changes: (+2 -2) Debug.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/include/llvm/Support/Debug.h diff -u llvm/include/llvm/Support/Debug.h:1.15 llvm/include/llvm/Support/Debug.h:1.16 --- llvm/include/llvm/Support/Debug.h:1.15 Thu Feb 1 06:09:51 2007 +++ llvm/include/llvm/Support/Debug.h Wed Jun 27 09:09:38 2007 @@ -68,9 +68,9 @@ OStream &getErrorOutputStream(const char *DebugType); #ifdef NDEBUG -#define DOUT OStream(0) +#define DOUT llvm::OStream(0) #else -#define DOUT getErrorOutputStream(DEBUG_TYPE) +#define DOUT llvm::getErrorOutputStream(DEBUG_TYPE) #endif } // End llvm namespace From duraid at octopus.com.au Wed Jun 27 09:10:54 2007 From: duraid at octopus.com.au (Duraid Madina) Date: Wed, 27 Jun 2007 09:10:54 -0500 Subject: [llvm-commits] CVS: llvm-test/Makefile.programs Message-ID: <200706271410.l5REAs6L000348@zion.cs.uiuc.edu> Changes in directory llvm-test: Makefile.programs updated: 1.271 -> 1.272 --- Log message: spass+oggenc work, therefore everything works(tm) ;) --- Diffs of the changes: (+1 -1) Makefile.programs | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-test/Makefile.programs diff -u llvm-test/Makefile.programs:1.271 llvm-test/Makefile.programs:1.272 --- llvm-test/Makefile.programs:1.271 Tue Jun 26 11:12:31 2007 +++ llvm-test/Makefile.programs Wed Jun 27 09:10:36 2007 @@ -235,7 +235,7 @@ LLCBETAOPTION := -sched=simple endif ifeq ($(ARCH),x86) -LLCBETAOPTION := -regalloc=local -fast +LLCBETAOPTION := -regalloc=bigblock -fast endif ifeq ($(ARCH),Sparc) LLCBETAOPTION := -enable-sparc-v9-insts From djg at cray.com Wed Jun 27 09:34:29 2007 From: djg at cray.com (Dan Gohman) Date: Wed, 27 Jun 2007 09:34:29 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Message-ID: <200706271434.l5REYT8u001005@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAGISel.cpp updated: 1.469 -> 1.470 --- Log message: Use getVectorTypeBreakdown in FunctionLoweringInfo::CreateRegForValue to compute the number and type of registers needed for vector values instead of computing it manually. This fixes PR1529: http://llvm.org/PR1529 . --- Diffs of the changes: (+11 -44) SelectionDAGISel.cpp | 55 ++++++++++----------------------------------------- 1 files changed, 11 insertions(+), 44 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.469 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.470 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.469 Mon Jun 25 11:23:39 2007 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Wed Jun 27 09:34:07 2007 @@ -306,53 +306,20 @@ unsigned FunctionLoweringInfo::CreateRegForValue(const Value *V) { MVT::ValueType VT = TLI.getValueType(V->getType()); - // The number of multiples of registers that we need, to, e.g., split up - // a <2 x int64> -> 4 x i32 registers. - unsigned NumVectorRegs = 1; - - // If this is a vector type, figure out what type it will decompose into - // and how many of the elements it will use. + unsigned NumRegisters; + MVT::ValueType RegisterVT; if (MVT::isVector(VT)) { - const VectorType *PTy = cast(V->getType()); - unsigned NumElts = PTy->getNumElements(); - MVT::ValueType EltTy = TLI.getValueType(PTy->getElementType()); - MVT::ValueType VecTy = MVT::getVectorType(EltTy, NumElts); - - // Divide the input until we get to a supported size. This will always - // end with a scalar if the target doesn't support vectors. - while (NumElts > 1 && !TLI.isTypeLegal(VecTy)) { - NumElts >>= 1; - NumVectorRegs <<= 1; - VecTy = MVT::getVectorType(EltTy, NumElts); - } - - // Check that VecTy isn't a 1-element vector. - if (NumElts == 1 && VecTy == MVT::Other) - VT = EltTy; - else - VT = VecTy; + MVT::ValueType ElementVT; + NumRegisters = TLI.getVectorTypeBreakdown(VT, ElementVT, RegisterVT); + } else { + RegisterVT = TLI.getTypeToTransformTo(VT); + NumRegisters = TLI.getNumRegisters(VT); } - // The common case is that we will only create one register for this - // value. If we have that case, create and return the virtual register. - unsigned NV = TLI.getNumRegisters(VT); - if (NV == 1) { - // If we are promoting this value, pick the next largest supported type. - MVT::ValueType PromotedType = TLI.getTypeToTransformTo(VT); - unsigned Reg = MakeReg(PromotedType); - // If this is a vector of supported or promoted types (e.g. 4 x i16), - // create all of the registers. - for (unsigned i = 1; i != NumVectorRegs; ++i) - MakeReg(PromotedType); - return Reg; - } - - // If this value is represented with multiple target registers, make sure - // to create enough consecutive registers of the right (smaller) type. - VT = TLI.getTypeToExpandTo(VT); - unsigned R = MakeReg(VT); - for (unsigned i = 1; i != NV*NumVectorRegs; ++i) - MakeReg(VT); + unsigned R = MakeReg(RegisterVT); + for (unsigned i = 1; i != NumRegisters; ++i) + MakeReg(RegisterVT); + return R; } From djg at cray.com Wed Jun 27 09:59:58 2007 From: djg at cray.com (Dan Gohman) Date: Wed, 27 Jun 2007 09:59:58 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp LegalizeDAG.cpp SelectionDAG.cpp SelectionDAGISel.cpp TargetLowering.cpp Message-ID: <20070627145958.GR5693@village.us.cray.com> >> Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp >> diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.409 llvm/ >> lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.410 >> --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.409 Fri Jun 22 >> 09:59:07 2007 >> +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Mon Jun 25 >> 11:23:39 2007 >> @@ -673,7 +673,9 @@ >> SDOperand SelectionDAG::getConstantFP(double Val, MVT::ValueType VT, >> bool isTarget) { >> assert(MVT::isFloatingPoint(VT) && "Cannot create integer FP >> constant!"); >> - if (VT == MVT::f32) >> + MVT::ValueType EltVT = >> + MVT::isVector(VT) ? MVT::getVectorElementType(VT) : VT; > > I don't understand this change. getConstantFP shouldn't be called on > vectors, should it? This seems to be a strange thing to overload. Oops; that's a small part of an unrelated set of changes I'm working on. That code isn't used currently. Just as there isn't a special ADD node kind for vectors -- just an ADD kind with nodes that can have a vector ValueType, ConstantFP can also be "vectorized". A ConstantFP with a vector ValueType is a vector constant, equivalent to what is currently represented as a splat BUILD_VECTOR, except that it's easier to work with :). Dan -- Dan Gohman, Cray Inc. From djg at cray.com Wed Jun 27 10:10:06 2007 From: djg at cray.com (Dan Gohman) Date: Wed, 27 Jun 2007 10:10:06 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86TargetAsmInfo.cpp Message-ID: <200706271510.l5RFA6F5001808@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86TargetAsmInfo.cpp updated: 1.42 -> 1.43 --- Log message: Remove a redundant newline in the asm output for ELF .rodata sections. --- Diffs of the changes: (+1 -1) X86TargetAsmInfo.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/X86/X86TargetAsmInfo.cpp diff -u llvm/lib/Target/X86/X86TargetAsmInfo.cpp:1.42 llvm/lib/Target/X86/X86TargetAsmInfo.cpp:1.43 --- llvm/lib/Target/X86/X86TargetAsmInfo.cpp:1.42 Sat May 12 17:36:25 2007 +++ llvm/lib/Target/X86/X86TargetAsmInfo.cpp Wed Jun 27 10:09:47 2007 @@ -98,7 +98,7 @@ break; case X86Subtarget::isELF: - ReadOnlySection = "\t.section\t.rodata\n"; + ReadOnlySection = "\t.section\t.rodata"; FourByteConstantSection = "\t.section\t.rodata.cst4,\"aM\", at progbits,4"; EightByteConstantSection = "\t.section\t.rodata.cst8,\"aM\", at progbits,8"; SixteenByteConstantSection = "\t.section\t.rodata.cst16,\"aM\", at progbits,16"; From djg at cray.com Wed Jun 27 10:28:49 2007 From: djg at cray.com (Dan Gohman) Date: Wed, 27 Jun 2007 10:28:49 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/ValueTypes.h Message-ID: <200706271528.l5RFSngA002315@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: ValueTypes.h updated: 1.38 -> 1.39 --- Log message: Document the encoding of MVT::ValueType. --- Diffs of the changes: (+6 -0) ValueTypes.h | 6 ++++++ 1 files changed, 6 insertions(+) Index: llvm/include/llvm/CodeGen/ValueTypes.h diff -u llvm/include/llvm/CodeGen/ValueTypes.h:1.38 llvm/include/llvm/CodeGen/ValueTypes.h:1.39 --- llvm/include/llvm/CodeGen/ValueTypes.h:1.38 Tue Jun 26 10:20:04 2007 +++ llvm/include/llvm/CodeGen/ValueTypes.h Wed Jun 27 10:28:26 2007 @@ -82,6 +82,12 @@ /// Note that simple doesn't necessary mean legal for the target machine. /// All legal value types must be simple, but often there are some simple /// value types that are not legal. + /// + /// @internal + /// Currently extended types are always vector types. Extended types are + /// encoded by having the first SimpleTypeBits bits encode the vector + /// element type (which must be a scalar type) and the remaining upper + /// bits encode the vector length, offset by one. typedef uint32_t ValueType; static const int SimpleTypeBits = 8; From djg at cray.com Wed Jun 27 10:41:24 2007 From: djg at cray.com (Dan Gohman) Date: Wed, 27 Jun 2007 10:41:24 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Message-ID: <20070627154124.GS5693@village.us.cray.com> >>>> + >>>> + // If either operand is undef, the result is undef >>>> + if (N0.getOpcode() == ISD::UNDEF || N1.getOpcode() == ISD::UNDEF) >>>> + return DAG.getNode(ISD::UNDEF, VT); >>>> + >>>> return SDOperand(); >>>> } >>> >>> This is not safe for sdiv/udiv. Safe xforms are: >>> >>> // undef / X -> 0 >>> // X / undef -> undef >>> >>> If in doubt, plz check instcombine. >> >> Thanks for correcting me on the undef rules. I'll check in a fix >> for the code soon. For this sdiv/udiv one though, why is undef/X not >> undef? For any non-zero value of X there's at least one value the >> undef might have which makes the divide have a non-zero result. > > I think that undef udiv intmax -> 0, no? If not, plz update > instcombine as well. intmax udiv intmax -> 1. It seems like folding undef/X to undef isn't safe either though, with the way it sounds like undef is intended to work. This code: %x = udiv i32 undef, %intmax %y = udiv i32 %x, 2 will always set %y to 0. Maybe instcombine can fold the second udiv by looking through its operands, but it can't safely fold the first. The best it could do is try to fold away all of %x's uses so that %x isn't needed anymore. Even simple things like undef+X don't seem to be safe to fold. %x = undef; if (%x >= 0) %z = %y / (%x + 1); // don't divide by undef! (offtopic, wouldn't it be nifty to have a parser for LLVM that used a C-ish expression syntax?). It seems that only undef*0 and undef+0 and a few similar things are really safe here. And those aren't specific to undef. Dan -- Dan Gohman, Cray Inc. From djg at cray.com Wed Jun 27 11:08:27 2007 From: djg at cray.com (Dan Gohman) Date: Wed, 27 Jun 2007 11:08:27 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/TargetLowering.h Message-ID: <200706271608.l5RG8REq003167@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Target: TargetLowering.h updated: 1.132 -> 1.133 --- Log message: Rename ("shrinkify") MVT::isExtendedValueType to MVT::isExtendedVT. --- Diffs of the changes: (+13 -13) TargetLowering.h | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-) Index: llvm/include/llvm/Target/TargetLowering.h diff -u llvm/include/llvm/Target/TargetLowering.h:1.132 llvm/include/llvm/Target/TargetLowering.h:1.133 --- llvm/include/llvm/Target/TargetLowering.h:1.132 Tue Jun 26 11:19:08 2007 +++ llvm/include/llvm/Target/TargetLowering.h Wed Jun 27 11:08:04 2007 @@ -120,7 +120,7 @@ /// getRegClassFor - Return the register class that should be used for the /// specified value type. This may only be called on legal types. TargetRegisterClass *getRegClassFor(MVT::ValueType VT) const { - assert(!MVT::isExtendedValueType(VT)); + assert(!MVT::isExtendedVT(VT)); TargetRegisterClass *RC = RegClassForVT[VT]; assert(RC && "This value type is not natively supported!"); return RC; @@ -130,7 +130,7 @@ /// specified value type. This means that it has a register that directly /// holds it without promotions or expansions. bool isTypeLegal(MVT::ValueType VT) const { - return !MVT::isExtendedValueType(VT) && RegClassForVT[VT] != 0; + return !MVT::isExtendedVT(VT) && RegClassForVT[VT] != 0; } class ValueTypeActionImpl { @@ -148,11 +148,11 @@ } LegalizeAction getTypeAction(MVT::ValueType VT) const { - if (MVT::isExtendedValueType(VT)) return Expand; + if (MVT::isExtendedVT(VT)) return Expand; return (LegalizeAction)((ValueTypeActions[VT>>4] >> ((2*VT) & 31)) & 3); } void setTypeAction(MVT::ValueType VT, LegalizeAction Action) { - assert(!MVT::isExtendedValueType(VT)); + assert(!MVT::isExtendedVT(VT)); assert(unsigned(VT >> 4) < sizeof(ValueTypeActions)/sizeof(ValueTypeActions[0])); ValueTypeActions[VT>>4] |= Action << ((VT*2) & 31); @@ -178,7 +178,7 @@ /// to get to the smaller register. For illegal floating point types, this /// returns the integer type to transform to. MVT::ValueType getTypeToTransformTo(MVT::ValueType VT) const { - if (MVT::isExtendedValueType(VT)) + if (MVT::isExtendedVT(VT)) return MVT::getVectorType(MVT::getVectorElementType(VT), MVT::getVectorNumElements(VT) / 2); @@ -190,7 +190,7 @@ /// that are larger than the largest integer register or illegal floating /// point types), this returns the largest legal type it will be expanded to. MVT::ValueType getTypeToExpandTo(MVT::ValueType VT) const { - assert(!MVT::isExtendedValueType(VT)); + assert(!MVT::isExtendedVT(VT)); while (true) { switch (getTypeAction(VT)) { case Legal: @@ -250,7 +250,7 @@ /// expanded to some other code sequence, or the target has a custom expander /// for it. LegalizeAction getOperationAction(unsigned Op, MVT::ValueType VT) const { - if (MVT::isExtendedValueType(VT)) return Expand; + if (MVT::isExtendedVT(VT)) return Expand; return (LegalizeAction)((OpActions[Op] >> (2*VT)) & 3); } @@ -266,7 +266,7 @@ /// expanded to some other code sequence, or the target has a custom expander /// for it. LegalizeAction getLoadXAction(unsigned LType, MVT::ValueType VT) const { - if (MVT::isExtendedValueType(VT)) return Expand; + if (MVT::isExtendedVT(VT)) return Expand; return (LegalizeAction)((LoadXActions[LType] >> (2*VT)) & 3); } @@ -282,7 +282,7 @@ /// expanded to some other code sequence, or the target has a custom expander /// for it. LegalizeAction getStoreXAction(MVT::ValueType VT) const { - if (MVT::isExtendedValueType(VT)) return Expand; + if (MVT::isExtendedVT(VT)) return Expand; return (LegalizeAction)((StoreXActions >> (2*VT)) & 3); } @@ -298,7 +298,7 @@ /// for it. LegalizeAction getIndexedLoadAction(unsigned IdxMode, MVT::ValueType VT) const { - if (MVT::isExtendedValueType(VT)) return Expand; + if (MVT::isExtendedVT(VT)) return Expand; return (LegalizeAction)((IndexedModeActions[0][IdxMode] >> (2*VT)) & 3); } @@ -315,7 +315,7 @@ /// for it. LegalizeAction getIndexedStoreAction(unsigned IdxMode, MVT::ValueType VT) const { - if (MVT::isExtendedValueType(VT)) return Expand; + if (MVT::isExtendedVT(VT)) return Expand; return (LegalizeAction)((IndexedModeActions[1][IdxMode] >> (2*VT)) & 3); } @@ -365,7 +365,7 @@ /// registers, but may be more than one for types (like i64) that are split /// into pieces. unsigned getNumRegisters(MVT::ValueType VT) const { - if (!MVT::isExtendedValueType(VT)) + if (!MVT::isExtendedVT(VT)) return NumRegistersForVT[VT]; MVT::ValueType VT1, VT2; @@ -665,7 +665,7 @@ /// regclass for the specified value type. This indicates the selector can /// handle values of that class natively. void addRegisterClass(MVT::ValueType VT, TargetRegisterClass *RC) { - assert(!MVT::isExtendedValueType(VT)); + assert(!MVT::isExtendedVT(VT)); AvailableRegClasses.push_back(std::make_pair(VT, RC)); RegClassForVT[VT] = RC; } From djg at cray.com Wed Jun 27 11:08:33 2007 From: djg at cray.com (Dan Gohman) Date: Wed, 27 Jun 2007 11:08:33 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/ValueTypes.cpp Message-ID: <200706271608.l5RG8X8U003172@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: ValueTypes.cpp updated: 1.20 -> 1.21 --- Log message: Rename ("shrinkify") MVT::isExtendedValueType to MVT::isExtendedVT. --- Diffs of the changes: (+2 -2) ValueTypes.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/VMCore/ValueTypes.cpp diff -u llvm/lib/VMCore/ValueTypes.cpp:1.20 llvm/lib/VMCore/ValueTypes.cpp:1.21 --- llvm/lib/VMCore/ValueTypes.cpp:1.20 Tue Jun 26 10:14:48 2007 +++ llvm/lib/VMCore/ValueTypes.cpp Wed Jun 27 11:08:04 2007 @@ -22,7 +22,7 @@ std::string MVT::getValueTypeString(MVT::ValueType VT) { switch (VT) { default: - if (isExtendedValueType(VT)) + if (isExtendedVT(VT)) return "v" + utostr(getVectorNumElements(VT)) + getValueTypeString(getVectorElementType(VT)); assert(0 && "Invalid ValueType!"); @@ -59,7 +59,7 @@ const Type *MVT::getTypeForValueType(MVT::ValueType VT) { switch (VT) { default: - if (isExtendedValueType(VT)) + if (isExtendedVT(VT)) return VectorType::get(getTypeForValueType(getVectorElementType(VT)), getVectorNumElements(VT)); assert(0 && "ValueType does not correspond to LLVM type!"); From djg at cray.com Wed Jun 27 11:08:36 2007 From: djg at cray.com (Dan Gohman) Date: Wed, 27 Jun 2007 11:08:36 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/ValueTypes.h Message-ID: <200706271608.l5RG8a91003178@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: ValueTypes.h updated: 1.39 -> 1.40 --- Log message: Rename ("shrinkify") MVT::isExtendedValueType to MVT::isExtendedVT. --- Diffs of the changes: (+6 -6) ValueTypes.h | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) Index: llvm/include/llvm/CodeGen/ValueTypes.h diff -u llvm/include/llvm/CodeGen/ValueTypes.h:1.39 llvm/include/llvm/CodeGen/ValueTypes.h:1.40 --- llvm/include/llvm/CodeGen/ValueTypes.h:1.39 Wed Jun 27 10:28:26 2007 +++ llvm/include/llvm/CodeGen/ValueTypes.h Wed Jun 27 11:08:04 2007 @@ -95,9 +95,9 @@ static const uint32_t SimpleTypeMask = (~uint32_t(0) << (32 - SimpleTypeBits)) >> (32 - SimpleTypeBits); - /// MVT::isExtendedValueType - Test if the given ValueType is extended + /// MVT::isExtendedVT - Test if the given ValueType is extended /// (as opposed to being simple). - static inline bool isExtendedValueType(ValueType VT) { + static inline bool isExtendedVT(ValueType VT) { return VT > SimpleTypeMask; } @@ -117,7 +117,7 @@ /// MVT::isVector - Return true if this is a vector value type. static inline bool isVector(ValueType VT) { return (VT >= FIRST_VECTOR_VALUETYPE && VT <= LAST_VECTOR_VALUETYPE) || - isExtendedValueType(VT); + isExtendedVT(VT); } /// MVT::getVectorElementType - Given a vector type, return the type of @@ -125,7 +125,7 @@ static inline ValueType getVectorElementType(ValueType VT) { switch (VT) { default: - if (isExtendedValueType(VT)) + if (isExtendedVT(VT)) return VT & SimpleTypeMask; assert(0 && "Invalid vector type!"); case v8i8 : @@ -147,7 +147,7 @@ static inline unsigned getVectorNumElements(ValueType VT) { switch (VT) { default: - if (isExtendedValueType(VT)) + if (isExtendedVT(VT)) return ((VT & ~SimpleTypeMask) >> SimpleTypeBits) - 1; assert(0 && "Invalid vector type!"); case v16i8: return 16; @@ -170,7 +170,7 @@ static inline unsigned getSizeInBits(ValueType VT) { switch (VT) { default: - if (isExtendedValueType(VT)) + if (isExtendedVT(VT)) return getSizeInBits(getVectorElementType(VT)) * getVectorNumElements(VT); assert(0 && "ValueType has no known size!"); From djg at cray.com Wed Jun 27 11:08:36 2007 From: djg at cray.com (Dan Gohman) Date: Wed, 27 Jun 2007 11:08:36 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp SelectionDAG.cpp Message-ID: <200706271608.l5RG8aiE003185@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: LegalizeDAG.cpp updated: 1.502 -> 1.503 SelectionDAG.cpp updated: 1.410 -> 1.411 --- Log message: Rename ("shrinkify") MVT::isExtendedValueType to MVT::isExtendedVT. --- Diffs of the changes: (+2 -2) LegalizeDAG.cpp | 2 +- SelectionDAG.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.502 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.503 --- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.502 Wed Jun 27 09:06:22 2007 +++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Wed Jun 27 11:08:04 2007 @@ -1714,7 +1714,7 @@ break; case Expand: { SDOperand Lo, Hi; - assert(!MVT::isExtendedValueType(Node->getOperand(i).getValueType())&& + assert(!MVT::isExtendedVT(Node->getOperand(i).getValueType()) && "FIXME: TODO: implement returning non-legal vector types!"); ExpandOp(Node->getOperand(i), Lo, Hi); NewValues.push_back(Lo); Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.410 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.411 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.410 Mon Jun 25 11:23:39 2007 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Wed Jun 27 11:08:04 2007 @@ -2475,7 +2475,7 @@ } SDVTList SelectionDAG::getVTList(MVT::ValueType VT) { - if (!MVT::isExtendedValueType(VT)) + if (!MVT::isExtendedVT(VT)) return makeVTList(SDNode::getValueTypeList(VT), 1); for (std::list >::iterator I = VTList.begin(), From djg at cray.com Wed Jun 27 11:16:31 2007 From: djg at cray.com (Dan Gohman) Date: Wed, 27 Jun 2007 11:16:31 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/CallingConvLower.h SelectionDAG.h SelectionDAGNodes.h ValueTypes.h Message-ID: <20070627161631.GT5693@village.us.cray.com> >> @@ -76,64 +73,55 @@ >> iPTR = 255 > > is 255 a good sentinel for iPTR anymore? Would we gain anything by > making SimpleTypeBits less than 8? If someone ever wants to actually do the arbitrary bitwidth stuff in codegen this will need to be revisited, but right now 8 leaves 24 bits for a linear vector length, which seems enough to be comfortable. Dan -- Dan Gohman, Cray Inc. From clattner at apple.com Wed Jun 27 12:02:06 2007 From: clattner at apple.com (Chris Lattner) Date: Wed, 27 Jun 2007 10:02:06 -0700 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp In-Reply-To: <200706270950.l5R9omZx025986@zion.cs.uiuc.edu> References: <200706270950.l5R9omZx025986@zion.cs.uiuc.edu> Message-ID: <20EA5C21-30BC-4BD9-BEA6-92C67E4F5724@apple.com> On Jun 27, 2007, at 2:50 AM, Zhou Sheng wrote: > Fix a bug. Testcase plz! What does this do, it seems wrong. -Chris > --- > Diffs of the changes: (+4 -1) > > IndVarSimplify.cpp | 5 ++++- > 1 files changed, 4 insertions(+), 1 deletion(-) > > > Index: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp > diff -u llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.123 llvm/ > lib/Transforms/Scalar/IndVarSimplify.cpp:1.124 > --- llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.123 Tue Jun 19 > 09:28:31 2007 > +++ llvm/lib/Transforms/Scalar/IndVarSimplify.cpp Wed Jun 27 > 04:50:26 2007 > @@ -519,8 +519,11 @@ > DOUT << "INDVARS: New CanIV: " << *IndVar; > > if (!isa(IterationCount)) { > - if (IterationCount->getType() != LargestType) > + if (IterationCount->getType()->getPrimitiveSizeInBits() < > + LargestType->getPrimitiveSizeInBits()) > IterationCount = SCEVZeroExtendExpr::get(IterationCount, > LargestType); > + else if (IterationCount->getType() != LargestType) > + IterationCount = SCEVTruncateExpr::get(IterationCount, > LargestType); > if (Instruction *DI = LinearFunctionTestReplace(L, > IterationCount,Rewriter)) > DeadInsts.insert(DI); > } > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From resistor at mac.com Wed Jun 27 12:03:40 2007 From: resistor at mac.com (Owen Anderson) Date: Wed, 27 Jun 2007 12:03:40 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/GVNPRE.cpp Message-ID: <200706271703.l5RH3eqU004668@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: GVNPRE.cpp updated: 1.60 -> 1.61 --- Log message: Fold a lot of code into two cases: binary instructions and ternary instructions. This saves many lines of code duplication. No functionality change. --- Diffs of the changes: (+62 -269) GVNPRE.cpp | 331 +++++++++++-------------------------------------------------- 1 files changed, 62 insertions(+), 269 deletions(-) Index: llvm/lib/Transforms/Scalar/GVNPRE.cpp diff -u llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.60 llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.61 --- llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.60 Tue Jun 26 23:10:46 2007 +++ llvm/lib/Transforms/Scalar/GVNPRE.cpp Wed Jun 27 12:03:03 2007 @@ -679,153 +679,75 @@ for (unsigned i = 0; i < worklist.size(); ++i) { Value* v = worklist[i]; - if (BinaryOperator* BO = dyn_cast(v)) { - bool lhsValid = !isa(BO->getOperand(0)); + // Handle binary ops + if (isa(v) || isa(v) || + isa(v)) { + User* U = cast(v); + + bool lhsValid = !isa(U->getOperand(0)); if (!lhsValid) for (SmallPtrSet::iterator I = set.begin(), E = set.end(); I != E; ++I) - if (VN.lookup(*I) == VN.lookup(BO->getOperand(0))) { + if (VN.lookup(*I) == VN.lookup(U->getOperand(0))) { lhsValid = true; break; } if (lhsValid) - lhsValid = !dependsOnInvoke(BO->getOperand(0)); + lhsValid = !dependsOnInvoke(U->getOperand(0)); - bool rhsValid = !isa(BO->getOperand(1)); + bool rhsValid = !isa(U->getOperand(1)); if (!rhsValid) for (SmallPtrSet::iterator I = set.begin(), E = set.end(); I != E; ++I) - if (VN.lookup(*I) == VN.lookup(BO->getOperand(1))) { + if (VN.lookup(*I) == VN.lookup(U->getOperand(1))) { rhsValid = true; break; } if (rhsValid) - rhsValid = !dependsOnInvoke(BO->getOperand(1)); + rhsValid = !dependsOnInvoke(U->getOperand(1)); if (!lhsValid || !rhsValid) - set.erase(BO); - } else if (CmpInst* C = dyn_cast(v)) { - bool lhsValid = !isa(C->getOperand(0)); - if (!lhsValid) - for (SmallPtrSet::iterator I = set.begin(), E = set.end(); - I != E; ++I) - if (VN.lookup(*I) == VN.lookup(C->getOperand(0))) { - lhsValid = true; - break; - } - if (lhsValid) - lhsValid = !dependsOnInvoke(C->getOperand(0)); - - bool rhsValid = !isa(C->getOperand(1)); - if (!rhsValid) - for (SmallPtrSet::iterator I = set.begin(), E = set.end(); - I != E; ++I) - if (VN.lookup(*I) == VN.lookup(C->getOperand(1))) { - rhsValid = true; - break; - } - if (rhsValid) - rhsValid = !dependsOnInvoke(C->getOperand(1)); + set.erase(U); - if (!lhsValid || !rhsValid) - set.erase(C); - } else if (ShuffleVectorInst* S = dyn_cast(v)) { - bool lhsValid = !isa(S->getOperand(0)); - if (!lhsValid) - for (SmallPtrSet::iterator I = set.begin(), E = set.end(); - I != E; ++I) - if (VN.lookup(*I) == VN.lookup(S->getOperand(0))) { - lhsValid = true; - break; - } - if (lhsValid) - lhsValid = !dependsOnInvoke(S->getOperand(0)); - - bool rhsValid = !isa(S->getOperand(1)); - if (!rhsValid) - for (SmallPtrSet::iterator I = set.begin(), E = set.end(); - I != E; ++I) - if (VN.lookup(*I) == VN.lookup(S->getOperand(1))) { - rhsValid = true; - break; - } - if (rhsValid) - rhsValid = !dependsOnInvoke(S->getOperand(1)); - - bool thirdValid = !isa(S->getOperand(2)); - if (!thirdValid) - for (SmallPtrSet::iterator I = set.begin(), E = set.end(); - I != E; ++I) - if (VN.lookup(*I) == VN.lookup(S->getOperand(2))) { - thirdValid = true; - break; - } - if (thirdValid) - thirdValid = !dependsOnInvoke(S->getOperand(2)); + // Handle ternary ops + } else if (isa(v) || isa(v)) { + User* U = cast(v); - if (!lhsValid || !rhsValid || !thirdValid) - set.erase(C); - } else if (InsertElementInst* S = dyn_cast(v)) { - bool lhsValid = !isa(S->getOperand(0)); + bool lhsValid = !isa(U->getOperand(0)); if (!lhsValid) for (SmallPtrSet::iterator I = set.begin(), E = set.end(); I != E; ++I) - if (VN.lookup(*I) == VN.lookup(S->getOperand(0))) { + if (VN.lookup(*I) == VN.lookup(U->getOperand(0))) { lhsValid = true; break; } if (lhsValid) - lhsValid = !dependsOnInvoke(S->getOperand(0)); + lhsValid = !dependsOnInvoke(U->getOperand(0)); - bool rhsValid = !isa(S->getOperand(1)); + bool rhsValid = !isa(U->getOperand(1)); if (!rhsValid) for (SmallPtrSet::iterator I = set.begin(), E = set.end(); I != E; ++I) - if (VN.lookup(*I) == VN.lookup(S->getOperand(1))) { + if (VN.lookup(*I) == VN.lookup(U->getOperand(1))) { rhsValid = true; break; } if (rhsValid) - rhsValid = !dependsOnInvoke(S->getOperand(1)); + rhsValid = !dependsOnInvoke(U->getOperand(1)); - bool thirdValid = !isa(S->getOperand(2)); + bool thirdValid = !isa(U->getOperand(2)); if (!thirdValid) for (SmallPtrSet::iterator I = set.begin(), E = set.end(); I != E; ++I) - if (VN.lookup(*I) == VN.lookup(S->getOperand(2))) { + if (VN.lookup(*I) == VN.lookup(U->getOperand(2))) { thirdValid = true; break; } if (thirdValid) - thirdValid = !dependsOnInvoke(S->getOperand(2)); + thirdValid = !dependsOnInvoke(U->getOperand(2)); if (!lhsValid || !rhsValid || !thirdValid) - set.erase(C); - } else if (ExtractElementInst* C = dyn_cast(v)) { - bool lhsValid = !isa(C->getOperand(0)); - if (!lhsValid) - for (SmallPtrSet::iterator I = set.begin(), E = set.end(); - I != E; ++I) - if (VN.lookup(*I) == VN.lookup(C->getOperand(0))) { - lhsValid = true; - break; - } - if (lhsValid) - lhsValid = !dependsOnInvoke(C->getOperand(0)); - - bool rhsValid = !isa(C->getOperand(1)); - if (!rhsValid) - for (SmallPtrSet::iterator I = set.begin(), E = set.end(); - I != E; ++I) - if (VN.lookup(*I) == VN.lookup(C->getOperand(1))) { - rhsValid = true; - break; - } - if (rhsValid) - rhsValid = !dependsOnInvoke(C->getOperand(1)); - - if (!lhsValid || !rhsValid) - set.erase(C); + set.erase(U); } } } @@ -843,9 +765,12 @@ while (!stack.empty()) { Value* e = stack.back(); - if (BinaryOperator* BO = dyn_cast(e)) { - Value* l = find_leader(set, VN.lookup(BO->getOperand(0))); - Value* r = find_leader(set, VN.lookup(BO->getOperand(1))); + // Handle binary ops + if (isa(e) || isa(e) || + isa(e)) { + User* U = cast(e); + Value* l = find_leader(set, VN.lookup(U->getOperand(0))); + Value* r = find_leader(set, VN.lookup(U->getOperand(1))); if (l != 0 && isa(l) && visited.count(l) == 0) @@ -858,40 +783,13 @@ visited.insert(e); stack.pop_back(); } - } else if (CmpInst* C = dyn_cast(e)) { - Value* l = find_leader(set, VN.lookup(C->getOperand(0))); - Value* r = find_leader(set, VN.lookup(C->getOperand(1))); - - if (l != 0 && isa(l) && - visited.count(l) == 0) - stack.push_back(l); - else if (r != 0 && isa(r) && - visited.count(r) == 0) - stack.push_back(r); - else { - vec.push_back(e); - visited.insert(e); - stack.pop_back(); - } - } else if (ExtractElementInst* C = dyn_cast(e)) { - Value* l = find_leader(set, VN.lookup(C->getOperand(0))); - Value* r = find_leader(set, VN.lookup(C->getOperand(1))); - if (l != 0 && isa(l) && - visited.count(l) == 0) - stack.push_back(l); - else if (r != 0 && isa(r) && - visited.count(r) == 0) - stack.push_back(r); - else { - vec.push_back(e); - visited.insert(e); - stack.pop_back(); - } - } else if (InsertElementInst* C = dyn_cast(e)) { - Value* l = find_leader(set, VN.lookup(C->getOperand(0))); - Value* r = find_leader(set, VN.lookup(C->getOperand(1))); - Value* m = find_leader(set, VN.lookup(C->getOperand(2))); + // Handle ternary ops + } else if (isa(e) || isa(e)) { + User* U = cast(e); + Value* l = find_leader(set, VN.lookup(U->getOperand(0))); + Value* r = find_leader(set, VN.lookup(U->getOperand(1))); + Value* m = find_leader(set, VN.lookup(U->getOperand(2))); if (l != 0 && isa(l) && visited.count(l) == 0) @@ -907,25 +805,8 @@ visited.insert(e); stack.pop_back(); } - } else if (ShuffleVectorInst* C = dyn_cast(e)) { - Value* l = find_leader(set, VN.lookup(C->getOperand(0))); - Value* r = find_leader(set, VN.lookup(C->getOperand(1))); - Value* m = find_leader(set, VN.lookup(C->getOperand(2))); - if (l != 0 && isa(l) && - visited.count(l) == 0) - stack.push_back(l); - else if (r != 0 && isa(r) && - visited.count(r) == 0) - stack.push_back(r); - else if (m != 0 && isa(m) && - visited.count(m) == 0) - stack.push_back(r); - else { - vec.push_back(e); - visited.insert(e); - stack.pop_back(); - } + // Handle opaque ops } else { visited.insert(e); vec.push_back(e); @@ -1021,7 +902,7 @@ SmallPtrSet& currTemps, BitVector& availNumbers, BitVector& expNumbers) { - // Handle PHI nodes... + // Handle PHI nodes if (PHINode* p = dyn_cast(I)) { VN.lookup_or_add(p); expNumbers.resize(VN.size()); @@ -1029,12 +910,14 @@ currPhis.insert(p); - // Handle binary ops... - } else if (BinaryOperator* BO = dyn_cast(I)) { - Value* leftValue = BO->getOperand(0); - Value* rightValue = BO->getOperand(1); + // Handle binary ops + } else if (isa(I) || isa(I) || + isa(I)) { + User* U = cast(I); + Value* leftValue = U->getOperand(0); + Value* rightValue = U->getOperand(1); - unsigned num = VN.lookup_or_add(BO); + unsigned num = VN.lookup_or_add(U); expNumbers.resize(VN.size()); availNumbers.resize(VN.size()); @@ -1050,80 +933,21 @@ expNumbers.set(VN.lookup(rightValue)); } - if (!expNumbers.test(VN.lookup(BO))) { - currExps.insert(BO); - expNumbers.set(num); - } - - // Handle cmp ops... - } else if (CmpInst* C = dyn_cast(I)) { - Value* leftValue = C->getOperand(0); - Value* rightValue = C->getOperand(1); - - VN.lookup_or_add(C); - - unsigned num = VN.lookup_or_add(C); - expNumbers.resize(VN.size()); - availNumbers.resize(VN.size()); - - if (isa(leftValue)) - if (!expNumbers.test(VN.lookup(leftValue))) { - currExps.insert(leftValue); - expNumbers.set(VN.lookup(leftValue)); - } - if (isa(rightValue)) - if (!expNumbers.test(VN.lookup(rightValue))) { - currExps.insert(rightValue); - expNumbers.set(VN.lookup(rightValue)); - } - - if (!expNumbers.test(VN.lookup(C))) { - currExps.insert(C); - expNumbers.set(num); - } - - // Handle extractelemt ops - } else if (InsertElementInst* C = dyn_cast(I)) { - Value* leftValue = C->getOperand(0); - Value* rightValue = C->getOperand(1); - Value* thirdValue = C->getOperand(2); - - VN.lookup_or_add(C); - - unsigned num = VN.lookup_or_add(C); - expNumbers.resize(VN.size()); - availNumbers.resize(VN.size()); - - if (isa(leftValue)) - if (!expNumbers.test(VN.lookup(leftValue))) { - currExps.insert(leftValue); - expNumbers.set(VN.lookup(leftValue)); - } - if (isa(rightValue)) - if (!expNumbers.test(VN.lookup(rightValue))) { - currExps.insert(rightValue); - expNumbers.set(VN.lookup(rightValue)); - } - if (isa(thirdValue)) - if (!expNumbers.test(VN.lookup(thirdValue))) { - currExps.insert(thirdValue); - expNumbers.set(VN.lookup(thirdValue)); - } - - if (!expNumbers.test(VN.lookup(C))) { - currExps.insert(C); + if (!expNumbers.test(VN.lookup(U))) { + currExps.insert(U); expNumbers.set(num); } - // Handle shufflevector ops - } else if (ShuffleVectorInst* C = dyn_cast(I)) { - Value* leftValue = C->getOperand(0); - Value* rightValue = C->getOperand(1); - Value* thirdValue = C->getOperand(2); + // Handle ternary ops + } else if (isa(I) || isa(I)) { + User* U = cast(I); + Value* leftValue = U->getOperand(0); + Value* rightValue = U->getOperand(1); + Value* thirdValue = U->getOperand(2); - VN.lookup_or_add(C); + VN.lookup_or_add(U); - unsigned num = VN.lookup_or_add(C); + unsigned num = VN.lookup_or_add(U); expNumbers.resize(VN.size()); availNumbers.resize(VN.size()); @@ -1143,40 +967,13 @@ expNumbers.set(VN.lookup(thirdValue)); } - if (!expNumbers.test(VN.lookup(C))) { - currExps.insert(C); - expNumbers.set(num); - } - - // Handle insertelement ops - } else if (ExtractElementInst* C = dyn_cast(I)) { - Value* leftValue = C->getOperand(0); - Value* rightValue = C->getOperand(1); - - VN.lookup_or_add(C); - - unsigned num = VN.lookup_or_add(C); - expNumbers.resize(VN.size()); - availNumbers.resize(VN.size()); - - if (isa(leftValue)) - if (!expNumbers.test(VN.lookup(leftValue))) { - currExps.insert(leftValue); - expNumbers.set(VN.lookup(leftValue)); - } - if (isa(rightValue)) - if (!expNumbers.test(VN.lookup(rightValue))) { - currExps.insert(rightValue); - expNumbers.set(VN.lookup(rightValue)); - } - - if (!expNumbers.test(VN.lookup(C))) { - currExps.insert(C); + if (!expNumbers.test(VN.lookup(U))) { + currExps.insert(U); expNumbers.set(num); } - // Handle unsupported ops - }else if (!I->isTerminator()){ + // Handle opaque ops + } else if (!I->isTerminator()){ VN.lookup_or_add(I); expNumbers.resize(VN.size()); availNumbers.resize(VN.size()); @@ -1401,7 +1198,8 @@ s2 = find_leader(availableOut[*PI], VN.lookup(U->getOperand(1))); else s2 = U->getOperand(1); - + + // Ternary Operators Value* s3 = 0; if (isa(U) || isa(U)) @@ -1566,11 +1364,6 @@ workList.reserve(anticIn.size()); topo_sort(anticIn, workList); - //DOUT << "Merge Block: " << BB->getName() << "\n"; - //DOUT << "ANTIC_IN: "; - //dump(anticIn); - //DOUT << "\n"; - unsigned result = insertion_mergepoint(workList, DI, new_set); if (result & 1) changed_function = true; From clattner at apple.com Wed Jun 27 12:05:38 2007 From: clattner at apple.com (Chris Lattner) Date: Wed, 27 Jun 2007 10:05:38 -0700 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/CallingConvLower.h SelectionDAG.h SelectionDAGNodes.h ValueTypes.h In-Reply-To: <20070627161631.GT5693@village.us.cray.com> References: <20070627161631.GT5693@village.us.cray.com> Message-ID: <2A1FBABB-5163-409D-B1BD-B990E3424E49@apple.com> On Jun 27, 2007, at 9:16 AM, Dan Gohman wrote: >>> @@ -76,64 +73,55 @@ >>> iPTR = 255 >> >> is 255 a good sentinel for iPTR anymore? Would we gain anything by >> making SimpleTypeBits less than 8? > > If someone ever wants to actually do the arbitrary bitwidth stuff in > codegen this will need to be revisited, but right now 8 leaves 24 bits > for a linear vector length, which seems enough to be comfortable. Ok -Chris From evan.cheng at apple.com Wed Jun 27 12:09:57 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 27 Jun 2007 12:09:57 -0500 Subject: [llvm-commits] CVS: llvm/utils/TableGen/RegisterInfoEmitter.cpp Message-ID: <200706271709.l5RH9vOj004850@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: RegisterInfoEmitter.cpp updated: 1.58 -> 1.59 --- Log message: One additional field in TargetRegisterDesc. --- Diffs of the changes: (+1 -1) RegisterInfoEmitter.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/utils/TableGen/RegisterInfoEmitter.cpp diff -u llvm/utils/TableGen/RegisterInfoEmitter.cpp:1.58 llvm/utils/TableGen/RegisterInfoEmitter.cpp:1.59 --- llvm/utils/TableGen/RegisterInfoEmitter.cpp:1.58 Tue Jun 26 15:54:46 2007 +++ llvm/utils/TableGen/RegisterInfoEmitter.cpp Wed Jun 27 12:09:34 2007 @@ -468,7 +468,7 @@ } OS<<"\n const TargetRegisterDesc RegisterDescriptors[] = { // Descriptors\n"; - OS << " { \"NOREG\",\t0,\t0,\t0 },\n"; + OS << " { \"NOREG\",\t0,\t0,\t0,\t0 },\n"; // Now that register alias and sub-registers sets have been emitted, emit the // register descriptors now. From clattner at apple.com Wed Jun 27 12:12:44 2007 From: clattner at apple.com (Chris Lattner) Date: Wed, 27 Jun 2007 10:12:44 -0700 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp LegalizeDAG.cpp SelectionDAG.cpp SelectionDAGISel.cpp TargetLowering.cpp In-Reply-To: <20070627145958.GR5693@village.us.cray.com> References: <20070627145958.GR5693@village.us.cray.com> Message-ID: On Jun 27, 2007, at 7:59 AM, Dan Gohman wrote: >>> Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp >>> diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.409 llvm/ >>> lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.410 >>> --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.409 Fri Jun 22 >>> 09:59:07 2007 >>> +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Mon Jun 25 >>> 11:23:39 2007 >>> @@ -673,7 +673,9 @@ >>> SDOperand SelectionDAG::getConstantFP(double Val, MVT::ValueType >>> VT, >>> bool isTarget) { >>> assert(MVT::isFloatingPoint(VT) && "Cannot create integer FP >>> constant!"); >>> - if (VT == MVT::f32) >>> + MVT::ValueType EltVT = >>> + MVT::isVector(VT) ? MVT::getVectorElementType(VT) : VT; >> >> I don't understand this change. getConstantFP shouldn't be called on >> vectors, should it? This seems to be a strange thing to overload. > > Oops; that's a small part of an unrelated set of changes I'm working > on. That code isn't used currently. > > Just as there isn't a special ADD node kind for vectors -- just an ADD > kind with nodes that can have a vector ValueType, ConstantFP can also > be "vectorized". A ConstantFP with a vector ValueType is a vector > constant, > equivalent to what is currently represented as a splat BUILD_VECTOR, > except that it's easier to work with :). I'm not opposed to doing this, but I don't think we should overload ConstantFP() and getConstantFP() for this. Could you make a new VectorConstantFP or something? -Chris From clattner at apple.com Wed Jun 27 12:17:04 2007 From: clattner at apple.com (Chris Lattner) Date: Wed, 27 Jun 2007 10:17:04 -0700 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp In-Reply-To: <20070627154124.GS5693@village.us.cray.com> References: <20070627154124.GS5693@village.us.cray.com> Message-ID: <7053099D-22B7-41C3-97E8-818E22BA7AF3@apple.com> >> I think that undef udiv intmax -> 0, no? If not, plz update >> instcombine as well. > > intmax udiv intmax -> 1. > > It seems like folding undef/X to undef isn't safe either though, with > the way it sounds like undef is intended to work. This code: > > %x = udiv i32 undef, %intmax > %y = udiv i32 %x, 2 > > will always set %y to 0. Maybe instcombine can fold the second > udiv by looking through its operands, but it can't safely fold the > first. The best it could do is try to fold away all of %x's uses so > that %x isn't needed anymore. Ug, excellent point. At this point, I'm inclined to just give up folding of udiv undefs. What do you think? > Even simple things like undef+X don't seem to be safe to fold. > > %x = undef; > if (%x >= 0) > %z = %y / (%x + 1); // don't divide by undef! Fortunately, this isn't a problem. LLVM has no copy instruction, so the code is really this: > if (undef >= 0) > %z = %y / (undef + 1); // don't divide by undef! There is nothing that specifies the two undefs are the same value. Also, in C, if you have an undefined variable, you aren't guaranteed to get the same undef value each time you read the variable, so transforming C into LLVM is ok :) > (offtopic, wouldn't it be nifty to have a parser for LLVM that > used a C-ish expression syntax?). Hopefully I'll check in a new parser in a few weeks for llvm that accepts something very *very* similar to C. :) -Chris From resistor at mac.com Wed Jun 27 12:38:51 2007 From: resistor at mac.com (Owen Anderson) Date: Wed, 27 Jun 2007 12:38:51 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/GVNPRE.cpp Message-ID: <200706271738.l5RHcpS4005585@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: GVNPRE.cpp updated: 1.61 -> 1.62 --- Log message: Use cached information that has already been computed to make clean() simpler and faster. This is a small speedup on most cases. --- Diffs of the changes: (+31 -52) GVNPRE.cpp | 83 ++++++++++++++++++++++--------------------------------------- 1 files changed, 31 insertions(+), 52 deletions(-) Index: llvm/lib/Transforms/Scalar/GVNPRE.cpp diff -u llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.61 llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.62 --- llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.61 Wed Jun 27 12:03:03 2007 +++ llvm/lib/Transforms/Scalar/GVNPRE.cpp Wed Jun 27 12:38:29 2007 @@ -429,7 +429,7 @@ // Helper fuctions // FIXME: eliminate or document these better void dump(const SmallPtrSet& s) const; - void clean(SmallPtrSet& set); + void clean(SmallPtrSet& set, BitVector& presentInSet); Value* find_leader(SmallPtrSet& vals, uint32_t v); Value* phi_translate(Value* V, BasicBlock* pred, BasicBlock* succ); @@ -671,7 +671,7 @@ /// clean - Remove all non-opaque values from the set whose operands are not /// themselves in the set, as well as all values that depend on invokes (see /// above) -void GVNPRE::clean(SmallPtrSet& set) { +void GVNPRE::clean(SmallPtrSet& set, BitVector& presentInSet) { std::vector worklist; worklist.reserve(set.size()); topo_sort(set, worklist); @@ -685,69 +685,43 @@ User* U = cast(v); bool lhsValid = !isa(U->getOperand(0)); - if (!lhsValid) - for (SmallPtrSet::iterator I = set.begin(), E = set.end(); - I != E; ++I) - if (VN.lookup(*I) == VN.lookup(U->getOperand(0))) { - lhsValid = true; - break; - } + lhsValid |= presentInSet.test(VN.lookup(U->getOperand(0))); if (lhsValid) lhsValid = !dependsOnInvoke(U->getOperand(0)); bool rhsValid = !isa(U->getOperand(1)); - if (!rhsValid) - for (SmallPtrSet::iterator I = set.begin(), E = set.end(); - I != E; ++I) - if (VN.lookup(*I) == VN.lookup(U->getOperand(1))) { - rhsValid = true; - break; - } + rhsValid |= presentInSet.test(VN.lookup(U->getOperand(1))); if (rhsValid) rhsValid = !dependsOnInvoke(U->getOperand(1)); - if (!lhsValid || !rhsValid) + if (!lhsValid || !rhsValid) { set.erase(U); + presentInSet.flip(VN.lookup(U)); + } // Handle ternary ops } else if (isa(v) || isa(v)) { User* U = cast(v); bool lhsValid = !isa(U->getOperand(0)); - if (!lhsValid) - for (SmallPtrSet::iterator I = set.begin(), E = set.end(); - I != E; ++I) - if (VN.lookup(*I) == VN.lookup(U->getOperand(0))) { - lhsValid = true; - break; - } + lhsValid |= presentInSet.test(VN.lookup(U->getOperand(0))); if (lhsValid) lhsValid = !dependsOnInvoke(U->getOperand(0)); bool rhsValid = !isa(U->getOperand(1)); - if (!rhsValid) - for (SmallPtrSet::iterator I = set.begin(), E = set.end(); - I != E; ++I) - if (VN.lookup(*I) == VN.lookup(U->getOperand(1))) { - rhsValid = true; - break; - } + rhsValid |= presentInSet.test(VN.lookup(U->getOperand(1))); if (rhsValid) rhsValid = !dependsOnInvoke(U->getOperand(1)); bool thirdValid = !isa(U->getOperand(2)); - if (!thirdValid) - for (SmallPtrSet::iterator I = set.begin(), E = set.end(); - I != E; ++I) - if (VN.lookup(*I) == VN.lookup(U->getOperand(2))) { - thirdValid = true; - break; - } + thirdValid |= presentInSet.test(VN.lookup(U->getOperand(2))); if (thirdValid) thirdValid = !dependsOnInvoke(U->getOperand(2)); - if (!lhsValid || !rhsValid || !thirdValid) + if (!lhsValid || !rhsValid || !thirdValid) { set.erase(U); + presentInSet.flip(VN.lookup(U)); + } } } } @@ -1042,17 +1016,18 @@ if (defer) return 0; - - anticIn.clear(); BitVector numbers(VN.size()); for (SmallPtrSet::iterator I = anticOut.begin(), E = anticOut.end(); I != E; ++I) { - anticIn.insert(*I); unsigned num = VN.lookup_or_add(*I); numbers.resize(VN.size()); - numbers.set(num); + + if (isa(*I)) { + anticIn.insert(*I); + numbers.set(num); + } } for (SmallPtrSet::iterator I = currExps.begin(), E = currExps.end(); I != E; ++I) { @@ -1063,19 +1038,17 @@ } for (SmallPtrSet::iterator I = currTemps.begin(), - E = currTemps.end(); I != E; ++I) + E = currTemps.end(); I != E; ++I) { anticIn.erase(*I); + numbers.flip(VN.lookup(*I)); + } - clean(anticIn); + clean(anticIn, numbers); + anticOut.clear(); - if (old != anticIn.size()) { - DOUT << "OLD: " << old << "\n"; - DOUT << "NEW: " << anticIn.size() << "\n"; - DOUT << "ANTIC_OUT: " << anticOut.size() << "\n"; - anticOut.clear(); + if (old != anticIn.size()) return 2; - } else - anticOut.clear(); + else return 1; } @@ -1392,6 +1365,12 @@ // This phase calculates the AVAIL_OUT and ANTIC_IN sets buildsets(F); + for (Function::iterator FI = F.begin(), FE = F.end(); FI != FE; ++FI) { + DOUT << "ANTIC_IN: " << FI->getName() << "\n"; + dump(anticipatedIn[FI]); + DOUT << "\n\n"; + } + // Phase 2: Insert // This phase inserts values to make partially redundant values // fully redundant From criswell at cs.uiuc.edu Wed Jun 27 12:54:59 2007 From: criswell at cs.uiuc.edu (John Criswell) Date: Wed, 27 Jun 2007 12:54:59 -0500 Subject: [llvm-commits] [see] CVS: llvm/lib/Support/ConstantRange.cpp Message-ID: <200706271754.l5RHsx9F005917@zion.cs.uiuc.edu> Changes in directory llvm/lib/Support: ConstantRange.cpp (r1.16) removed --- Log message: This has moved to lib/Analysis. --- Diffs of the changes: (+0 -0) 0 files changed From raulherbster at gmail.com Wed Jun 27 13:26:59 2007 From: raulherbster at gmail.com (Raul Fernandes Herbster) Date: Wed, 27 Jun 2007 15:26:59 -0300 Subject: [llvm-commits] Patch: JIT support for ARM Message-ID: <6fbb4ff20706271126n2b67a36di7e78879045c53f31@mail.gmail.com> This is an initial implementation of ARM JIT support. So far, it hasn't generated code machine yet. Next patch must provide such feature. The tar.gzfile must be unpacked under lib/Target/ARM directory. Please, send me any feedback. Best regards, Raul. -- Raul Fernandes Herbster Embedded and Pervasive Computing Laboratory - embedded.dee.ufcg.edu.br Electrical Engineering Department - DEE - www.dee.ufcg.edu.br Electrical Engineering and Informatics Center - CEEI Federal University of Campina Grande - UFCG - www.ufcg.edu.br Caixa Postal 10105 58109-970 Campina Grande - PB - Brasil -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070627/b49c30a2/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: arm_jit_patch Type: application/octet-stream Size: 5960 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070627/b49c30a2/attachment.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: arm_jit.tar.gz Type: application/x-gzip Size: 3490 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070627/b49c30a2/attachment.gz From evan.cheng at apple.com Wed Jun 27 13:45:55 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 27 Jun 2007 13:45:55 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Message-ID: <200706271845.l5RIjtDW007117@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAGISel.cpp updated: 1.470 -> 1.471 --- Log message: Partial fix for PR1502: http://llvm.org/PR1502 : If a EH register is needed in a successor of landing pad, add it as livein to all the blocks in the paths between the landing pad and the specified block. --- Diffs of the changes: (+34 -11) SelectionDAGISel.cpp | 45 ++++++++++++++++++++++++++++++++++----------- 1 files changed, 34 insertions(+), 11 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.470 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.471 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.470 Wed Jun 27 09:34:07 2007 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Wed Jun 27 13:45:32 2007 @@ -2402,6 +2402,25 @@ MMI->addCatchTypeInfo(MBB, TyInfo); } +/// propagateEHRegister - The specified EH register is required in a successor +/// of the EH landing pad. Propagate it (by adding it to livein) to all the +/// blocks in the paths between the landing pad and the specified block. +static void propagateEHRegister(MachineBasicBlock *MBB, unsigned EHReg, + SmallPtrSet Visited) { + if (MBB->isLandingPad() || !Visited.insert(MBB)) + return; + + MBB->addLiveIn(EHReg); + for (MachineBasicBlock::pred_iterator PI = MBB->pred_begin(), + E = MBB->pred_end(); PI != E; ++PI) + propagateEHRegister(*PI, EHReg, Visited); +} + +static void propagateEHRegister(MachineBasicBlock *MBB, unsigned EHReg) { + SmallPtrSet Visited; + propagateEHRegister(MBB, EHReg, Visited); +} + /// visitIntrinsicCall - Lower the call to the specified intrinsic function. If /// we want to emit this as a call to a named external function, return the name /// otherwise lower it and return null. @@ -2511,12 +2530,9 @@ } case Intrinsic::eh_exception: { - MachineModuleInfo *MMI = DAG.getMachineModuleInfo(); - - if (ExceptionHandling && MMI) { - // Mark exception register as live in. - unsigned Reg = TLI.getExceptionAddressRegister(); - if (Reg) CurMBB->addLiveIn(Reg); + if (ExceptionHandling) { + if (!CurMBB->isLandingPad() && TLI.getExceptionAddressRegister()) + propagateEHRegister(CurMBB, TLI.getExceptionAddressRegister()); // Insert the EXCEPTIONADDR instruction. SDVTList VTs = DAG.getVTList(TLI.getPointerTy(), MVT::Other); @@ -2538,14 +2554,13 @@ if (ExceptionHandling && MMI) { if (CurMBB->isLandingPad()) addCatchInfo(I, MMI, CurMBB); + else { #ifndef NDEBUG - else FuncInfo.CatchInfoLost.insert(&I); #endif - - // Mark exception selector register as live in. - unsigned Reg = TLI.getExceptionSelectorRegister(); - if (Reg) CurMBB->addLiveIn(Reg); + if (TLI.getExceptionSelectorRegister()) + propagateEHRegister(CurMBB, TLI.getExceptionSelectorRegister()); + } // Insert the EHSELECTION instruction. SDVTList VTs = DAG.getVTList(TLI.getPointerTy(), MVT::Other); @@ -4482,6 +4497,14 @@ DAG.setRoot(DAG.getNode(ISD::LABEL, MVT::Other, DAG.getEntryNode(), DAG.getConstant(LabelID, MVT::i32))); + // Mark exception register as live in. + unsigned Reg = TLI.getExceptionAddressRegister(); + if (Reg) BB->addLiveIn(Reg); + + // Mark exception selector register as live in. + Reg = TLI.getExceptionSelectorRegister(); + if (Reg) BB->addLiveIn(Reg); + // FIXME: Hack around an exception handling flaw (PR1508): the personality // function and list of typeids logically belong to the invoke (or, if you // like, the basic block containing the invoke), and need to be associated From evan.cheng at apple.com Wed Jun 27 13:47:51 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 27 Jun 2007 13:47:51 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp Message-ID: <200706271847.l5RIlpG6007163@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: LiveIntervalAnalysis.cpp updated: 1.249 -> 1.250 --- Log message: If a livein is not used in the block. It's live through. --- Diffs of the changes: (+8 -5) LiveIntervalAnalysis.cpp | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) Index: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp diff -u llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.249 llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.250 --- llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.249 Tue Jun 26 20:16:36 2007 +++ llvm/lib/CodeGen/LiveIntervalAnalysis.cpp Wed Jun 27 13:47:28 2007 @@ -625,13 +625,15 @@ exit: // Live-in register might not be used at all. if (end == MIIdx) { - DOUT << " dead"; - if (isAlias) + if (isAlias) { + DOUT << " dead"; end = getDefIndex(MIIdx) + 1; + } else { + DOUT << " live through"; + end = baseIndex; + } } - assert(start < end && "did not find end of interval?"); - LiveRange LR(start, end, interval.getNextValue(~0U, 0)); DOUT << " +" << LR << '\n'; interval.addRange(LR); @@ -662,7 +664,8 @@ // Multiple live-ins can alias the same register. for (const unsigned* AS = mri_->getSubRegisters(*LI); *AS; ++AS) if (!hasInterval(*AS)) - handleLiveInRegister(MBB, MIIndex, getOrCreateInterval(*AS), true); + handleLiveInRegister(MBB, MIIndex, getOrCreateInterval(*AS), + true); } } From asl at math.spbu.ru Wed Jun 27 14:37:40 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Wed, 27 Jun 2007 14:37:40 -0500 Subject: [llvm-commits] CVS: llvm-www/GSoCProjects.html Message-ID: <200706271937.l5RJbeqC008395@zion.cs.uiuc.edu> Changes in directory llvm-www: GSoCProjects.html updated: 1.2 -> 1.3 --- Log message: Add link to the llvm-qemu project home. Btw, should we "add" this page somewhere? --- Diffs of the changes: (+2 -1) GSoCProjects.html | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm-www/GSoCProjects.html diff -u llvm-www/GSoCProjects.html:1.2 llvm-www/GSoCProjects.html:1.3 --- llvm-www/GSoCProjects.html:1.2 Fri Apr 13 00:45:07 2007 +++ llvm-www/GSoCProjects.html Wed Jun 27 14:37:04 2007 @@ -65,6 +65,7 @@ translator StudentTilmann Scheller MentorPaul Brook + Linkhttp://code.google.com/p/llvm-qemu/ @@ -78,7 +79,7 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"> LLVM Compiler Infrastructure
    - Last modified: $Date: 2007/04/13 05:45:07 $ + Last modified: $Date: 2007/06/27 19:37:04 $ From asl at math.spbu.ru Wed Jun 27 14:39:25 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Wed, 27 Jun 2007 14:39:25 -0500 Subject: [llvm-commits] CVS: llvm-www/GSoCProjects.html Message-ID: <200706271939.l5RJdPuY008497@zion.cs.uiuc.edu> Changes in directory llvm-www: GSoCProjects.html updated: 1.3 -> 1.4 --- Log message: Make it to be real link --- Diffs of the changes: (+5 -2) GSoCProjects.html | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) Index: llvm-www/GSoCProjects.html diff -u llvm-www/GSoCProjects.html:1.3 llvm-www/GSoCProjects.html:1.4 --- llvm-www/GSoCProjects.html:1.3 Wed Jun 27 14:37:04 2007 +++ llvm-www/GSoCProjects.html Wed Jun 27 14:39:03 2007 @@ -65,7 +65,10 @@ translator StudentTilmann Scheller MentorPaul Brook - Linkhttp://code.google.com/p/llvm-qemu/ + Link + + http://code.google.com/p/llvm-qemu/ + @@ -79,7 +82,7 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"> LLVM Compiler Infrastructure
    - Last modified: $Date: 2007/06/27 19:37:04 $ + Last modified: $Date: 2007/06/27 19:39:03 $ From clattner at apple.com Wed Jun 27 15:24:48 2007 From: clattner at apple.com (Chris Lattner) Date: Wed, 27 Jun 2007 13:24:48 -0700 Subject: [llvm-commits] CVS: llvm-www/GSoCProjects.html In-Reply-To: <200706271937.l5RJbeqC008395@zion.cs.uiuc.edu> References: <200706271937.l5RJbeqC008395@zion.cs.uiuc.edu> Message-ID: > > Add link to the llvm-qemu project home. Btw, should we "add" this > page somewhere? GSoCProjects.html should be linked somewhere. Any suggestions? -Chris > --- > Diffs of the changes: (+2 -1) > > GSoCProjects.html | 3 ++- > 1 files changed, 2 insertions(+), 1 deletion(-) > > > Index: llvm-www/GSoCProjects.html > diff -u llvm-www/GSoCProjects.html:1.2 llvm-www/GSoCProjects.html:1.3 > --- llvm-www/GSoCProjects.html:1.2 Fri Apr 13 00:45:07 2007 > +++ llvm-www/GSoCProjects.html Wed Jun 27 14:37:04 2007 > @@ -65,6 +65,7 @@ > translator > StudentTilmann Scheller > MentorPaul Brook > + Linkhttp://code.google.com/p/llvm-qemu/ tr> > > > > @@ -78,7 +79,7 @@ > src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML > 4.01!"> > > LLVM Compiler Infrastructure
    > - Last modified: $Date: 2007/04/13 05:45:07 $ > + Last modified: $Date: 2007/06/27 19:37:04 $ > > > > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From djg at cray.com Wed Jun 27 15:50:29 2007 From: djg at cray.com (Dan Gohman) Date: Wed, 27 Jun 2007 15:50:29 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Message-ID: <20070627205029.GW5693@village.us.cray.com> >>> I think that undef udiv intmax -> 0, no? If not, plz update >>> instcombine as well. >> >> intmax udiv intmax -> 1. >> >> It seems like folding undef/X to undef isn't safe either though, with >> the way it sounds like undef is intended to work. This code: >> >> %x = udiv i32 undef, %intmax >> %y = udiv i32 %x, 2 >> >> will always set %y to 0. Maybe instcombine can fold the second >> udiv by looking through its operands, but it can't safely fold the >> first. The best it could do is try to fold away all of %x's uses so >> that %x isn't needed anymore. > > Ug, excellent point. At this point, I'm inclined to just give up > folding of udiv undefs. What do you think? udiv isn't the only one, the way this is going... %x = mul i32 undef, 2 %y = srem i32 %x, 2 %x = and i32 undef, 0xffff0000 %y = and i32 %x, 0x0000ffff and so on for a lot of others. add, sub, and xor, might be different though; the example below is relevant. >> Even simple things like undef+X don't seem to be safe to fold. >> >> %x = undef; >> if (%x >= 0) >> %z = %y / (%x + 1); // don't divide by undef! > > Fortunately, this isn't a problem. LLVM has no copy instruction, so > the code is really this: > >> if (undef >= 0) >> %z = %y / (undef + 1); // don't divide by undef! > > There is nothing that specifies the two undefs are the same value. > Also, in C, if you have an undefined variable, you aren't guaranteed > to get the same undef value each time you read the variable, so > transforming C into LLVM is ok :) In C, an uninitialized variable has an "indeterminate value", which is potentially a trap representation, which can't even be multiplied by zero without incurring undefined behavior. I don't know where it suggests that a variable with indeterminate value might be different on each read though. LLVM does so have copy instructions. The syntax is a little odd though, and the keyword is spelled 'bitcast' ;-). %x = bitcast i64 undef to i64; if (%x >= 0) %z = %y / (%x + 1); // don't divide by undef! Now what should instcombine do? Dan -- Dan Gohman, Cray Inc. From dpatel at apple.com Wed Jun 27 15:54:29 2007 From: dpatel at apple.com (Devang Patel) Date: Wed, 27 Jun 2007 15:54:29 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Dominators.cpp Message-ID: <200706272054.l5RKsTDJ030071@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Dominators.cpp updated: 1.118 -> 1.119 --- Log message: Remove ETForest. --- Diffs of the changes: (+0 -551) Dominators.cpp | 551 --------------------------------------------------------- 1 files changed, 551 deletions(-) Index: llvm/lib/VMCore/Dominators.cpp diff -u llvm/lib/VMCore/Dominators.cpp:1.118 llvm/lib/VMCore/Dominators.cpp:1.119 --- llvm/lib/VMCore/Dominators.cpp:1.118 Thu Jun 21 12:23:45 2007 +++ llvm/lib/VMCore/Dominators.cpp Wed Jun 27 15:53:52 2007 @@ -805,554 +805,3 @@ void DominanceFrontierBase::dump() { print (llvm::cerr); } - - -//===----------------------------------------------------------------------===// -// ETOccurrence Implementation -//===----------------------------------------------------------------------===// - -void ETOccurrence::Splay() { - ETOccurrence *father; - ETOccurrence *grandfather; - int occdepth; - int fatherdepth; - - while (Parent) { - occdepth = Depth; - - father = Parent; - fatherdepth = Parent->Depth; - grandfather = father->Parent; - - // If we have no grandparent, a single zig or zag will do. - if (!grandfather) { - setDepthAdd(fatherdepth); - MinOccurrence = father->MinOccurrence; - Min = father->Min; - - // See what we have to rotate - if (father->Left == this) { - // Zig - father->setLeft(Right); - setRight(father); - if (father->Left) - father->Left->setDepthAdd(occdepth); - } else { - // Zag - father->setRight(Left); - setLeft(father); - if (father->Right) - father->Right->setDepthAdd(occdepth); - } - father->setDepth(-occdepth); - Parent = NULL; - - father->recomputeMin(); - return; - } - - // If we have a grandfather, we need to do some - // combination of zig and zag. - int grandfatherdepth = grandfather->Depth; - - setDepthAdd(fatherdepth + grandfatherdepth); - MinOccurrence = grandfather->MinOccurrence; - Min = grandfather->Min; - - ETOccurrence *greatgrandfather = grandfather->Parent; - - if (grandfather->Left == father) { - if (father->Left == this) { - // Zig zig - grandfather->setLeft(father->Right); - father->setLeft(Right); - setRight(father); - father->setRight(grandfather); - - father->setDepth(-occdepth); - - if (father->Left) - father->Left->setDepthAdd(occdepth); - - grandfather->setDepth(-fatherdepth); - if (grandfather->Left) - grandfather->Left->setDepthAdd(fatherdepth); - } else { - // Zag zig - grandfather->setLeft(Right); - father->setRight(Left); - setLeft(father); - setRight(grandfather); - - father->setDepth(-occdepth); - if (father->Right) - father->Right->setDepthAdd(occdepth); - grandfather->setDepth(-occdepth - fatherdepth); - if (grandfather->Left) - grandfather->Left->setDepthAdd(occdepth + fatherdepth); - } - } else { - if (father->Left == this) { - // Zig zag - grandfather->setRight(Left); - father->setLeft(Right); - setLeft(grandfather); - setRight(father); - - father->setDepth(-occdepth); - if (father->Left) - father->Left->setDepthAdd(occdepth); - grandfather->setDepth(-occdepth - fatherdepth); - if (grandfather->Right) - grandfather->Right->setDepthAdd(occdepth + fatherdepth); - } else { // Zag Zag - grandfather->setRight(father->Left); - father->setRight(Left); - setLeft(father); - father->setLeft(grandfather); - - father->setDepth(-occdepth); - if (father->Right) - father->Right->setDepthAdd(occdepth); - grandfather->setDepth(-fatherdepth); - if (grandfather->Right) - grandfather->Right->setDepthAdd(fatherdepth); - } - } - - // Might need one more rotate depending on greatgrandfather. - setParent(greatgrandfather); - if (greatgrandfather) { - if (greatgrandfather->Left == grandfather) - greatgrandfather->Left = this; - else - greatgrandfather->Right = this; - - } - grandfather->recomputeMin(); - father->recomputeMin(); - } -} - -//===----------------------------------------------------------------------===// -// ETNode implementation -//===----------------------------------------------------------------------===// - -void ETNode::Split() { - ETOccurrence *right, *left; - ETOccurrence *rightmost = RightmostOcc; - ETOccurrence *parent; - - // Update the occurrence tree first. - RightmostOcc->Splay(); - - // Find the leftmost occurrence in the rightmost subtree, then splay - // around it. - for (right = rightmost->Right; right->Left; right = right->Left); - - right->Splay(); - - // Start splitting - right->Left->Parent = NULL; - parent = ParentOcc; - parent->Splay(); - ParentOcc = NULL; - - left = parent->Left; - parent->Right->Parent = NULL; - - right->setLeft(left); - - right->recomputeMin(); - - rightmost->Splay(); - rightmost->Depth = 0; - rightmost->Min = 0; - - delete parent; - - // Now update *our* tree - - if (Father->Son == this) - Father->Son = Right; - - if (Father->Son == this) - Father->Son = NULL; - else { - Left->Right = Right; - Right->Left = Left; - } - Left = Right = NULL; - Father = NULL; -} - -void ETNode::setFather(ETNode *NewFather) { - ETOccurrence *rightmost; - ETOccurrence *leftpart; - ETOccurrence *NewFatherOcc; - ETOccurrence *temp; - - // First update the path in the splay tree - NewFatherOcc = new ETOccurrence(NewFather); - - rightmost = NewFather->RightmostOcc; - rightmost->Splay(); - - leftpart = rightmost->Left; - - temp = RightmostOcc; - temp->Splay(); - - NewFatherOcc->setLeft(leftpart); - NewFatherOcc->setRight(temp); - - temp->Depth++; - temp->Min++; - NewFatherOcc->recomputeMin(); - - rightmost->setLeft(NewFatherOcc); - - if (NewFatherOcc->Min + rightmost->Depth < rightmost->Min) { - rightmost->Min = NewFatherOcc->Min + rightmost->Depth; - rightmost->MinOccurrence = NewFatherOcc->MinOccurrence; - } - - delete ParentOcc; - ParentOcc = NewFatherOcc; - - // Update *our* tree - ETNode *left; - ETNode *right; - - Father = NewFather; - right = Father->Son; - - if (right) - left = right->Left; - else - left = right = this; - - left->Right = this; - right->Left = this; - Left = left; - Right = right; - - Father->Son = this; -} - -bool ETNode::Below(ETNode *other) { - ETOccurrence *up = other->RightmostOcc; - ETOccurrence *down = RightmostOcc; - - if (this == other) - return true; - - up->Splay(); - - ETOccurrence *left, *right; - left = up->Left; - right = up->Right; - - if (!left) - return false; - - left->Parent = NULL; - - if (right) - right->Parent = NULL; - - down->Splay(); - - if (left == down || left->Parent != NULL) { - if (right) - right->Parent = up; - up->setLeft(down); - } else { - left->Parent = up; - - // If the two occurrences are in different trees, put things - // back the way they were. - if (right && right->Parent != NULL) - up->setRight(down); - else - up->setRight(right); - return false; - } - - if (down->Depth <= 0) - return false; - - return !down->Right || down->Right->Min + down->Depth >= 0; -} - -ETNode *ETNode::NCA(ETNode *other) { - ETOccurrence *occ1 = RightmostOcc; - ETOccurrence *occ2 = other->RightmostOcc; - - ETOccurrence *left, *right, *ret; - ETOccurrence *occmin; - int mindepth; - - if (this == other) - return this; - - occ1->Splay(); - left = occ1->Left; - right = occ1->Right; - - if (left) - left->Parent = NULL; - - if (right) - right->Parent = NULL; - occ2->Splay(); - - if (left == occ2 || (left && left->Parent != NULL)) { - ret = occ2->Right; - - occ1->setLeft(occ2); - if (right) - right->Parent = occ1; - } else { - ret = occ2->Left; - - occ1->setRight(occ2); - if (left) - left->Parent = occ1; - } - - if (occ2->Depth > 0) { - occmin = occ1; - mindepth = occ1->Depth; - } else { - occmin = occ2; - mindepth = occ2->Depth + occ1->Depth; - } - - if (ret && ret->Min + occ1->Depth + occ2->Depth < mindepth) - return ret->MinOccurrence->OccFor; - else - return occmin->OccFor; -} - -void ETNode::assignDFSNumber(int num) { - std::vector workStack; - std::set visitedNodes; - - workStack.push_back(this); - visitedNodes.insert(this); - this->DFSNumIn = num++; - - while (!workStack.empty()) { - ETNode *Node = workStack.back(); - - // If this is leaf node then set DFSNumOut and pop the stack - if (!Node->Son) { - Node->DFSNumOut = num++; - workStack.pop_back(); - continue; - } - - ETNode *son = Node->Son; - - // Visit Node->Son first - if (visitedNodes.count(son) == 0) { - son->DFSNumIn = num++; - workStack.push_back(son); - visitedNodes.insert(son); - continue; - } - - bool visitChild = false; - // Visit remaining children - for (ETNode *s = son->Right; s != son && !visitChild; s = s->Right) { - if (visitedNodes.count(s) == 0) { - visitChild = true; - s->DFSNumIn = num++; - workStack.push_back(s); - visitedNodes.insert(s); - } - } - - if (!visitChild) { - // If we reach here means all children are visited - Node->DFSNumOut = num++; - workStack.pop_back(); - } - } -} - -//===----------------------------------------------------------------------===// -// ETForest implementation -//===----------------------------------------------------------------------===// - -char ETForest::ID = 0; -static RegisterPass -D("etforest", "ET Forest Construction", true); - -void ETForestBase::reset() { - for (ETMapType::iterator I = Nodes.begin(), E = Nodes.end(); I != E; ++I) - delete I->second; - Nodes.clear(); -} - -void ETForestBase::updateDFSNumbers() -{ - int dfsnum = 0; - // Iterate over all nodes in depth first order. - for (unsigned i = 0, e = Roots.size(); i != e; ++i) - for (df_iterator I = df_begin(Roots[i]), - E = df_end(Roots[i]); I != E; ++I) { - BasicBlock *BB = *I; - ETNode *ETN = getNode(BB); - if (ETN && !ETN->hasFather()) - ETN->assignDFSNumber(dfsnum); - } - SlowQueries = 0; - DFSInfoValid = true; -} - -// dominates - Return true if A dominates B. THis performs the -// special checks necessary if A and B are in the same basic block. -bool ETForestBase::dominates(Instruction *A, Instruction *B) { - BasicBlock *BBA = A->getParent(), *BBB = B->getParent(); - if (BBA != BBB) return dominates(BBA, BBB); - - // It is not possible to determine dominance between two PHI nodes - // based on their ordering. - if (isa(A) && isa(B)) - return false; - - // Loop through the basic block until we find A or B. - BasicBlock::iterator I = BBA->begin(); - for (; &*I != A && &*I != B; ++I) /*empty*/; - - if(!IsPostDominators) { - // A dominates B if it is found first in the basic block. - return &*I == A; - } else { - // A post-dominates B if B is found first in the basic block. - return &*I == B; - } -} - -/// isReachableFromEntry - Return true if A is dominated by the entry -/// block of the function containing it. -const bool ETForestBase::isReachableFromEntry(BasicBlock* A) { - return dominates(&A->getParent()->getEntryBlock(), A); -} - -// FIXME : There is no need to make getNodeForBlock public. Fix -// predicate simplifier. -ETNode *ETForest::getNodeForBlock(BasicBlock *BB) { - ETNode *&BBNode = Nodes[BB]; - if (BBNode) return BBNode; - - // Haven't calculated this node yet? Get or calculate the node for the - // immediate dominator. - DomTreeNode *node= getAnalysis().getNode(BB); - - // If we are unreachable, we may not have an immediate dominator. - if (!node || !node->getIDom()) - return BBNode = new ETNode(BB); - else { - ETNode *IDomNode = getNodeForBlock(node->getIDom()->getBlock()); - - // Add a new tree node for this BasicBlock, and link it as a child of - // IDomNode - BBNode = new ETNode(BB); - BBNode->setFather(IDomNode); - return BBNode; - } -} - -void ETForest::calculate(const DominatorTree &DT) { - assert(Roots.size() == 1 && "ETForest should have 1 root block!"); - BasicBlock *Root = Roots[0]; - Nodes[Root] = new ETNode(Root); // Add a node for the root - - Function *F = Root->getParent(); - // Loop over all of the reachable blocks in the function... - for (Function::iterator I = F->begin(), E = F->end(); I != E; ++I) { - DomTreeNode* node = DT.getNode(I); - if (node && node->getIDom()) { // Reachable block. - BasicBlock* ImmDom = node->getIDom()->getBlock(); - ETNode *&BBNode = Nodes[I]; - if (!BBNode) { // Haven't calculated this node yet? - // Get or calculate the node for the immediate dominator - ETNode *IDomNode = getNodeForBlock(ImmDom); - - // Add a new ETNode for this BasicBlock, and set it's parent - // to it's immediate dominator. - BBNode = new ETNode(I); - BBNode->setFather(IDomNode); - } - } - } - - // Make sure we've got nodes around for every block - for (Function::iterator I = F->begin(), E = F->end(); I != E; ++I) { - ETNode *&BBNode = Nodes[I]; - if (!BBNode) - BBNode = new ETNode(I); - } - - updateDFSNumbers (); -} - -//===----------------------------------------------------------------------===// -// ETForestBase Implementation -//===----------------------------------------------------------------------===// - -void ETForestBase::addNewBlock(BasicBlock *BB, BasicBlock *IDom) { - ETNode *&BBNode = Nodes[BB]; - assert(!BBNode && "BasicBlock already in ET-Forest"); - - BBNode = new ETNode(BB); - BBNode->setFather(getNode(IDom)); - DFSInfoValid = false; -} - -void ETForestBase::setImmediateDominator(BasicBlock *BB, BasicBlock *newIDom) { - assert(getNode(BB) && "BasicBlock not in ET-Forest"); - assert(getNode(newIDom) && "IDom not in ET-Forest"); - - ETNode *Node = getNode(BB); - if (Node->hasFather()) { - if (Node->getFather()->getData() == newIDom) - return; - Node->Split(); - } - Node->setFather(getNode(newIDom)); - DFSInfoValid= false; -} - -void ETForestBase::print(std::ostream &o, const Module *) const { - o << "=============================--------------------------------\n"; - o << "ET Forest:\n"; - o << "DFS Info "; - if (DFSInfoValid) - o << "is"; - else - o << "is not"; - o << " up to date\n"; - - Function *F = getRoots()[0]->getParent(); - for (Function::iterator I = F->begin(), E = F->end(); I != E; ++I) { - o << " DFS Numbers For Basic Block:"; - WriteAsOperand(o, I, false); - o << " are:"; - if (ETNode *EN = getNode(I)) { - o << "In: " << EN->getDFSNumIn(); - o << " Out: " << EN->getDFSNumOut() << "\n"; - } else { - o << "No associated ETNode"; - } - o << "\n"; - } - o << "\n"; -} - -void ETForestBase::dump() { - print (llvm::cerr); -} From dpatel at apple.com Wed Jun 27 15:54:29 2007 From: dpatel at apple.com (Devang Patel) Date: Wed, 27 Jun 2007 15:54:29 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/Dominators.h ET-Forest.h Message-ID: <200706272054.l5RKsTkb030072@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: Dominators.h updated: 1.106 -> 1.107 ET-Forest.h (r1.10) removed --- Log message: Remove ETForest. --- Diffs of the changes: (+1 -168) Dominators.h | 169 ----------------------------------------------------------- 1 files changed, 1 insertion(+), 168 deletions(-) Index: llvm/include/llvm/Analysis/Dominators.h diff -u llvm/include/llvm/Analysis/Dominators.h:1.106 llvm/include/llvm/Analysis/Dominators.h:1.107 --- llvm/include/llvm/Analysis/Dominators.h:1.106 Thu Jun 21 12:23:45 2007 +++ llvm/include/llvm/Analysis/Dominators.h Wed Jun 27 15:53:52 2007 @@ -9,9 +9,7 @@ // // This file defines the following classes: // 1. DominatorTree: Represent dominators as an explicit tree structure. -// 2. ETForest: Efficient data structure for dominance comparisons and -// nearest-common-ancestor queries. -// 3. DominanceFrontier: Calculate and hold the dominance frontier for a +// 2. DominanceFrontier: Calculate and hold the dominance frontier for a // function. // // These data structures are listed in increasing order of complexity. It @@ -23,7 +21,6 @@ #ifndef LLVM_ANALYSIS_DOMINATORS_H #define LLVM_ANALYSIS_DOMINATORS_H -#include "llvm/Analysis/ET-Forest.h" #include "llvm/Pass.h" #include @@ -347,170 +344,6 @@ }; -//===------------------------------------- -/// ET-Forest Class - Class used to construct forwards and backwards -/// ET-Forests -/// -class ETForestBase : public DominatorBase { -public: - ETForestBase(intptr_t ID, bool isPostDom) - : DominatorBase(ID, isPostDom), Nodes(), - DFSInfoValid(false), SlowQueries(0) {} - - virtual void releaseMemory() { reset(); } - - typedef std::map ETMapType; - - // FIXME : There is no need to make this interface public. - // Fix predicate simplifier. - void updateDFSNumbers(); - - /// dominates - Return true if A dominates B. - /// - inline bool dominates(BasicBlock *A, BasicBlock *B) { - if (A == B) - return true; - - ETNode *NodeA = getNode(A); - ETNode *NodeB = getNode(B); - - if (DFSInfoValid) - return NodeB->DominatedBy(NodeA); - else { - // If we end up with too many slow queries, just update the - // DFS numbers on the theory that we are going to keep querying. - SlowQueries++; - if (SlowQueries > 32) { - updateDFSNumbers(); - return NodeB->DominatedBy(NodeA); - } - return NodeB->DominatedBySlow(NodeA); - } - } - - // dominates - Return true if A dominates B. This performs the - // special checks necessary if A and B are in the same basic block. - bool dominates(Instruction *A, Instruction *B); - - /// properlyDominates - Return true if A dominates B and A != B. - /// - bool properlyDominates(BasicBlock *A, BasicBlock *B) { - return dominates(A, B) && A != B; - } - - /// isReachableFromEntry - Return true if A is dominated by the entry - /// block of the function containing it. - const bool isReachableFromEntry(BasicBlock* A); - - /// Return the nearest common dominator of A and B. - BasicBlock *nearestCommonDominator(BasicBlock *A, BasicBlock *B) const { - ETNode *NodeA = getNode(A); - ETNode *NodeB = getNode(B); - - ETNode *Common = NodeA->NCA(NodeB); - if (!Common) - return NULL; - return Common->getData(); - } - - /// Return the immediate dominator of A. - BasicBlock *getIDom(BasicBlock *A) const { - ETNode *NodeA = getNode(A); - if (!NodeA) return 0; - const ETNode *idom = NodeA->getFather(); - return idom ? idom->getData() : 0; - } - - void getETNodeChildren(BasicBlock *A, std::vector& children) const { - ETNode *NodeA = getNode(A); - if (!NodeA) return; - const ETNode* son = NodeA->getSon(); - - if (!son) return; - children.push_back(son->getData()); - - const ETNode* brother = son->getBrother(); - while (brother != son) { - children.push_back(brother->getData()); - brother = brother->getBrother(); - } - } - - virtual void getAnalysisUsage(AnalysisUsage &AU) const { - AU.setPreservesAll(); - AU.addRequired(); - } - //===--------------------------------------------------------------------===// - // API to update Forest information based on modifications - // to the CFG... - - /// addNewBlock - Add a new block to the CFG, with the specified immediate - /// dominator. - /// - void addNewBlock(BasicBlock *BB, BasicBlock *IDom); - - /// setImmediateDominator - Update the immediate dominator information to - /// change the current immediate dominator for the specified block - /// to another block. This method requires that BB for NewIDom - /// already have an ETNode, otherwise just use addNewBlock. - /// - void setImmediateDominator(BasicBlock *BB, BasicBlock *NewIDom); - /// print - Convert to human readable form - /// - virtual void print(std::ostream &OS, const Module* = 0) const; - void print(std::ostream *OS, const Module* M = 0) const { - if (OS) print(*OS, M); - } - virtual void dump(); -protected: - /// getNode - return the (Post)DominatorTree node for the specified basic - /// block. This is the same as using operator[] on this class. - /// - inline ETNode *getNode(BasicBlock *BB) const { - ETMapType::const_iterator i = Nodes.find(BB); - return (i != Nodes.end()) ? i->second : 0; - } - - inline ETNode *operator[](BasicBlock *BB) const { - return getNode(BB); - } - - void reset(); - ETMapType Nodes; - bool DFSInfoValid; - unsigned int SlowQueries; - -}; - -//==------------------------------------- -/// ETForest Class - Concrete subclass of ETForestBase that is used to -/// compute a forwards ET-Forest. - -class ETForest : public ETForestBase { -public: - static char ID; // Pass identification, replacement for typeid - - ETForest() : ETForestBase((intptr_t)&ID, false) {} - - BasicBlock *getRoot() const { - assert(Roots.size() == 1 && "Should always have entry node!"); - return Roots[0]; - } - - virtual bool runOnFunction(Function &F) { - reset(); // Reset from the last time we were run... - DominatorTree &DT = getAnalysis(); - Roots = DT.getRoots(); - calculate(DT); - return false; - } - - void calculate(const DominatorTree &DT); - // FIXME : There is no need to make getNodeForBlock public. Fix - // predicate simplifier. - ETNode *getNodeForBlock(BasicBlock *BB); -}; - //===----------------------------------------------------------------------===// /// DominanceFrontierBase - Common base class for computing forward and inverse /// dominance frontiers for a function. From lauro.venancio at gmail.com Wed Jun 27 17:08:45 2007 From: lauro.venancio at gmail.com (Lauro Ramos Venancio) Date: Wed, 27 Jun 2007 17:08:45 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvm-nm/llvm-nm.cpp Message-ID: <200706272208.l5RM8jMR032059@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-nm: llvm-nm.cpp updated: 1.36 -> 1.37 --- Log message: llvm-nm must print the alias symbols. --- Diffs of the changes: (+13 -5) llvm-nm.cpp | 18 +++++++++++++----- 1 files changed, 13 insertions(+), 5 deletions(-) Index: llvm/tools/llvm-nm/llvm-nm.cpp diff -u llvm/tools/llvm-nm/llvm-nm.cpp:1.36 llvm/tools/llvm-nm/llvm-nm.cpp:1.37 --- llvm/tools/llvm-nm/llvm-nm.cpp:1.36 Sun May 6 18:45:49 2007 +++ llvm/tools/llvm-nm/llvm-nm.cpp Wed Jun 27 17:08:09 2007 @@ -68,14 +68,19 @@ } static char TypeCharForSymbol(GlobalValue &GV) { - if (GV.isDeclaration()) return 'U'; + if (GV.isDeclaration()) return 'U'; if (GV.hasLinkOnceLinkage()) return 'C'; if (GV.hasWeakLinkage()) return 'W'; - if (isa(GV) && GV.hasInternalLinkage()) return 't'; + if (isa(GV) && GV.hasInternalLinkage()) return 't'; if (isa(GV)) return 'T'; - if (isa(GV) && GV.hasInternalLinkage()) return 'd'; + if (isa(GV) && GV.hasInternalLinkage()) return 'd'; if (isa(GV)) return 'D'; - return '?'; + if (const GlobalAlias *GA = dyn_cast(&GV)) { + const GlobalValue *AliasedGV = GA->getAliasedGlobal(); + if (isa(AliasedGV)) return 'T'; + if (isa(AliasedGV)) return 'D'; + } + return '?'; } static void DumpSymbolNameForGlobalValue(GlobalValue &GV) { @@ -115,7 +120,10 @@ << " Size Line Section\n"; } std::for_each (M->begin (), M->end (), DumpSymbolNameForGlobalValue); - std::for_each (M->global_begin (), M->global_end (), DumpSymbolNameForGlobalValue); + std::for_each (M->global_begin (), M->global_end (), + DumpSymbolNameForGlobalValue); + std::for_each (M->alias_begin (), M->alias_end (), + DumpSymbolNameForGlobalValue); } static void DumpSymbolNamesFromFile(std::string &Filename) { From lauro.venancio at gmail.com Wed Jun 27 17:54:21 2007 From: lauro.venancio at gmail.com (Lauro Ramos Venancio) Date: Wed, 27 Jun 2007 19:54:21 -0300 Subject: [llvm-commits] ARM problem Message-ID: <9c10c9f0706271554q6acc1b5dy686c5baa12d0b17a@mail.gmail.com> Something did today broke the compilation of the attached testcase. Lauro Error message: laurov at laurov-desktop:~$ llvm/llvm/build/Debug/bin/llc < /tmp/bugpoint-reduced-simplified.bc llc: /home/laurov/llvm/llvm/include/llvm/Target/TargetLowering.h:125: llvm::TargetRegisterClass* llvm::TargetLowering::getRegClassFor(llvm::MVT::ValueType) const: Assertion `RC && "This value type is not natively supported!"' failed. llvm/llvm/build/Debug/bin/llc((anonymous namespace)::PrintStackTrace()+0x1a)[0x8955d06] llvm/llvm/build/Debug/bin/llc((anonymous namespace)::SignalHandler(int)+0x112)[0x8955fcc] [0xffffe420] /lib/tls/i686/cmov/libc.so.6(abort+0x101)[0xb7c9c641] /lib/tls/i686/cmov/libc.so.6(__assert_fail+0xfb)[0xb7c9443b] llvm/llvm/build/Debug/bin/llc(llvm::TargetLowering::getRegClassFor(unsigned int) const+0x6d)[0x84cb859] llvm/llvm/build/Debug/bin/llc(llvm::FunctionLoweringInfo::MakeReg(unsigned int)+0x1a)[0x86f0a4c] llvm/llvm/build/Debug/bin/llc(llvm::FunctionLoweringInfo::CreateRegForValue(llvm::Value const*)+0xa2)[0x86c8f58] llvm/llvm/build/Debug/bin/llc(llvm::FunctionLoweringInfo::InitializeRegForValue(llvm::Value const*)+0x5d)[0x86f67bb] llvm/llvm/build/Debug/bin/llc(llvm::FunctionLoweringInfo::FunctionLoweringInfo(llvm::TargetLowering&, llvm::Function&, llvm::MachineFunction&)+0xfa)[0x86df3b4] llvm/llvm/build/Debug/bin/llc(llvm::SelectionDAGISel::runOnFunction(llvm::Function&)+0xc0)[0x86dfa34] llvm/llvm/build/Debug/bin/llc(llvm::FPPassManager::runOnFunction(llvm::Function&)+0x13a)[0x88f00ac] llvm/llvm/build/Debug/bin/llc(llvm::FunctionPassManagerImpl::run(llvm::Function&)+0x6e)[0x88f0330] llvm/llvm/build/Debug/bin/llc(llvm::FunctionPassManager::run(llvm::Function&)+0x88)[0x88f047e] llvm/llvm/build/Debug/bin/llc(main+0x97d)[0x84257fd] /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xdc)[0xb7c86ebc] llvm/llvm/build/Debug/bin/llc[0x8423f51] Aborted (core dumped) -------------- next part -------------- A non-text attachment was scrubbed... Name: bugpoint-reduced-simplified.bc Type: application/octet-stream Size: 732 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070627/8fa946e4/attachment.obj From dpatel at apple.com Wed Jun 27 17:58:53 2007 From: dpatel at apple.com (Devang Patel) Date: Wed, 27 Jun 2007 17:58:53 -0500 Subject: [llvm-commits] CVS: llvm/test/Other/2006-02-05-PassManager.ll Message-ID: <200706272258.l5RMwr83027752@zion.cs.uiuc.edu> Changes in directory llvm/test/Other: 2006-02-05-PassManager.ll updated: 1.2 -> 1.3 --- Log message: Update. Now, -etforest is an invalid option. --- Diffs of the changes: (+1 -1) 2006-02-05-PassManager.ll | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/Other/2006-02-05-PassManager.ll diff -u llvm/test/Other/2006-02-05-PassManager.ll:1.2 llvm/test/Other/2006-02-05-PassManager.ll:1.3 --- llvm/test/Other/2006-02-05-PassManager.ll:1.2 Sun Apr 15 03:54:57 2007 +++ llvm/test/Other/2006-02-05-PassManager.ll Wed Jun 27 17:58:12 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | opt -domtree -gcse -etforest -constmerge -disable-output +; RUN: llvm-as < %s | opt -domtree -gcse -domtree -constmerge -disable-output define i32 @test1() { unreachable From isanbard at gmail.com Wed Jun 27 18:34:52 2007 From: isanbard at gmail.com (Bill Wendling) Date: Wed, 27 Jun 2007 18:34:52 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/SubtargetFeature.cpp Message-ID: <200706272334.l5RNYqT8021172@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target: SubtargetFeature.cpp updated: 1.13 -> 1.14 --- Log message: Set implied features based upon the CPU's feature list. --- Diffs of the changes: (+7 -0) SubtargetFeature.cpp | 7 +++++++ 1 files changed, 7 insertions(+) Index: llvm/lib/Target/SubtargetFeature.cpp diff -u llvm/lib/Target/SubtargetFeature.cpp:1.13 llvm/lib/Target/SubtargetFeature.cpp:1.14 --- llvm/lib/Target/SubtargetFeature.cpp:1.13 Fri May 4 15:38:40 2007 +++ llvm/lib/Target/SubtargetFeature.cpp Wed Jun 27 18:34:06 2007 @@ -268,6 +268,13 @@ if (CPUEntry) { // Set base feature bits Bits = CPUEntry->Value; + + // Set the feature implied by this CPU feature, if any. + for (size_t i = 0; i < FeatureTableSize; ++i) { + const SubtargetFeatureKV &FE = FeatureTable[i]; + if (CPUEntry->Value & FE.Value) + SetImpliedBits(Bits, &FE, FeatureTable, FeatureTableSize); + } } else { cerr << "'" << Features[0] << "' is not a recognized processor for this target" From djg at cray.com Wed Jun 27 19:02:02 2007 From: djg at cray.com (Dan Gohman) Date: Wed, 27 Jun 2007 19:02:02 -0500 Subject: [llvm-commits] ARM problem Message-ID: <20070628000202.GX5693@village.us.cray.com> Hi Lauro, This was caused by my fix for PR1529. I'm currently considering the following patch, which fixes your attached test case: Index: lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp =================================================================== RCS file: /var/cvs/llvm/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp,v retrieving revision 1.470 diff -u -r1.470 SelectionDAGISel.cpp --- lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -312,7 +312,9 @@ MVT::ValueType ElementVT; NumRegisters = TLI.getVectorTypeBreakdown(VT, ElementVT, RegisterVT); } else { - RegisterVT = TLI.getTypeToTransformTo(VT); + RegisterVT = VT; + while (!TLI.isTypeLegal(RegisterVT)) + RegisterVT = TLI.getTypeToTransformTo(RegisterVT); NumRegisters = TLI.getNumRegisters(VT); } I'm looking to see if I can find a cleaner way to solve this. Dan -- Dan Gohman, Cray Inc. From resistor at mac.com Wed Jun 27 19:35:12 2007 From: resistor at mac.com (Owen Anderson) Date: Wed, 27 Jun 2007 19:35:12 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/GVNPRE.cpp Message-ID: <200706280035.l5S0ZCYn023555@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: GVNPRE.cpp updated: 1.62 -> 1.63 --- Log message: Make many sets a much more reasonable size. This decreases the time to optimize Anton's testcase from 35.5s to 34.7s. --- Diffs of the changes: (+65 -65) GVNPRE.cpp | 130 ++++++++++++++++++++++++++++++------------------------------- 1 files changed, 65 insertions(+), 65 deletions(-) Index: llvm/lib/Transforms/Scalar/GVNPRE.cpp diff -u llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.62 llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.63 --- llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.62 Wed Jun 27 12:38:29 2007 +++ llvm/lib/Transforms/Scalar/GVNPRE.cpp Wed Jun 27 19:34:34 2007 @@ -417,8 +417,8 @@ ValueTable VN; std::vector createdExpressions; - std::map > availableOut; - std::map > anticipatedIn; + std::map > availableOut; + std::map > anticipatedIn; // This transformation requires dominator postdominator info virtual void getAnalysisUsage(AnalysisUsage &AU) const { @@ -428,46 +428,46 @@ // Helper fuctions // FIXME: eliminate or document these better - void dump(const SmallPtrSet& s) const; - void clean(SmallPtrSet& set, BitVector& presentInSet); - Value* find_leader(SmallPtrSet& vals, + void dump(const SmallPtrSet& s) const; + void clean(SmallPtrSet& set, BitVector& presentInSet); + Value* find_leader(SmallPtrSet& vals, uint32_t v); Value* phi_translate(Value* V, BasicBlock* pred, BasicBlock* succ); - void phi_translate_set(SmallPtrSet& anticIn, BasicBlock* pred, - BasicBlock* succ, SmallPtrSet& out); + void phi_translate_set(SmallPtrSet& anticIn, BasicBlock* pred, + BasicBlock* succ, SmallPtrSet& out); - void topo_sort(SmallPtrSet& set, + void topo_sort(SmallPtrSet& set, std::vector& vec); void cleanup(); bool elimination(); - void val_insert(SmallPtrSet& s, Value* v); - void val_replace(SmallPtrSet& s, Value* v); + void val_insert(SmallPtrSet& s, Value* v); + void val_replace(SmallPtrSet& s, Value* v); bool dependsOnInvoke(Value* V); void buildsets_availout(BasicBlock::iterator I, - SmallPtrSet& currAvail, - SmallPtrSet& currPhis, - SmallPtrSet& currExps, - SmallPtrSet& currTemps, + SmallPtrSet& currAvail, + SmallPtrSet& currPhis, + SmallPtrSet& currExps, + SmallPtrSet& currTemps, BitVector& availNumbers, BitVector& expNumbers); bool buildsets_anticout(BasicBlock* BB, - SmallPtrSet& anticOut, + SmallPtrSet& anticOut, std::set& visited); unsigned buildsets_anticin(BasicBlock* BB, - SmallPtrSet& anticOut, - SmallPtrSet& currExps, - SmallPtrSet& currTemps, + SmallPtrSet& anticOut, + SmallPtrSet& currExps, + SmallPtrSet& currTemps, std::set& visited); void buildsets(Function& F); void insertion_pre(Value* e, BasicBlock* BB, std::map& avail, - SmallPtrSet& new_set); + SmallPtrSet& new_set); unsigned insertion_mergepoint(std::vector& workList, df_iterator& D, - SmallPtrSet& new_set); + SmallPtrSet& new_set); bool insertion(Function& F); }; @@ -490,8 +490,8 @@ /// find_leader - Given a set and a value number, return the first /// element of the set with that value number, or 0 if no such element /// is present -Value* GVNPRE::find_leader(SmallPtrSet& vals, uint32_t v) { - for (SmallPtrSet::iterator I = vals.begin(), E = vals.end(); +Value* GVNPRE::find_leader(SmallPtrSet& vals, uint32_t v) { + for (SmallPtrSet::iterator I = vals.begin(), E = vals.end(); I != E; ++I) if (v == VN.lookup(*I)) return *I; @@ -501,7 +501,7 @@ /// val_insert - Insert a value into a set only if there is not a value /// with the same value number already in the set -void GVNPRE::val_insert(SmallPtrSet& s, Value* v) { +void GVNPRE::val_insert(SmallPtrSet& s, Value* v) { uint32_t num = VN.lookup(v); Value* leader = find_leader(s, num); if (leader == 0) @@ -510,7 +510,7 @@ /// val_replace - Insert a value into a set, replacing any values already in /// the set that have the same value number -void GVNPRE::val_replace(SmallPtrSet& s, Value* v) { +void GVNPRE::val_replace(SmallPtrSet& s, Value* v) { uint32_t num = VN.lookup(v); Value* leader = find_leader(s, num); while (leader != 0) { @@ -643,10 +643,10 @@ } /// phi_translate_set - Perform phi translation on every element of a set -void GVNPRE::phi_translate_set(SmallPtrSet& anticIn, +void GVNPRE::phi_translate_set(SmallPtrSet& anticIn, BasicBlock* pred, BasicBlock* succ, - SmallPtrSet& out) { - for (SmallPtrSet::iterator I = anticIn.begin(), + SmallPtrSet& out) { + for (SmallPtrSet::iterator I = anticIn.begin(), E = anticIn.end(); I != E; ++I) { Value* V = phi_translate(*I, pred, succ); if (V != 0) @@ -671,7 +671,7 @@ /// clean - Remove all non-opaque values from the set whose operands are not /// themselves in the set, as well as all values that depend on invokes (see /// above) -void GVNPRE::clean(SmallPtrSet& set, BitVector& presentInSet) { +void GVNPRE::clean(SmallPtrSet& set, BitVector& presentInSet) { std::vector worklist; worklist.reserve(set.size()); topo_sort(set, worklist); @@ -728,10 +728,10 @@ /// topo_sort - Given a set of values, sort them by topological /// order into the provided vector. -void GVNPRE::topo_sort(SmallPtrSet& set, std::vector& vec) { - SmallPtrSet visited; +void GVNPRE::topo_sort(SmallPtrSet& set, std::vector& vec) { + SmallPtrSet visited; std::vector stack; - for (SmallPtrSet::iterator I = set.begin(), E = set.end(); + for (SmallPtrSet::iterator I = set.begin(), E = set.end(); I != E; ++I) { if (visited.count(*I) == 0) stack.push_back(*I); @@ -793,9 +793,9 @@ } /// dump - Dump a set of values to standard error -void GVNPRE::dump(const SmallPtrSet& s) const { +void GVNPRE::dump(const SmallPtrSet& s) const { DOUT << "{ "; - for (SmallPtrSet::iterator I = s.begin(), E = s.end(); + for (SmallPtrSet::iterator I = s.begin(), E = s.end(); I != E; ++I) { DEBUG((*I)->dump()); } @@ -870,10 +870,10 @@ /// buildsets_availout - When calculating availability, handle an instruction /// by inserting it into the appropriate sets void GVNPRE::buildsets_availout(BasicBlock::iterator I, - SmallPtrSet& currAvail, - SmallPtrSet& currPhis, - SmallPtrSet& currExps, - SmallPtrSet& currTemps, + SmallPtrSet& currAvail, + SmallPtrSet& currPhis, + SmallPtrSet& currExps, + SmallPtrSet& currTemps, BitVector& availNumbers, BitVector& expNumbers) { // Handle PHI nodes @@ -965,7 +965,7 @@ /// buildsets_anticout - When walking the postdom tree, calculate the ANTIC_OUT /// set as a function of the ANTIC_IN set of the block's predecessors bool GVNPRE::buildsets_anticout(BasicBlock* BB, - SmallPtrSet& anticOut, + SmallPtrSet& anticOut, std::set& visited) { if (BB->getTerminator()->getNumSuccessors() == 1) { if (BB->getTerminator()->getSuccessor(0) != BB && @@ -983,11 +983,11 @@ for (unsigned i = 1; i < BB->getTerminator()->getNumSuccessors(); ++i) { BasicBlock* currSucc = BB->getTerminator()->getSuccessor(i); - SmallPtrSet& succAnticIn = anticipatedIn[currSucc]; + SmallPtrSet& succAnticIn = anticipatedIn[currSucc]; std::vector temp; - for (SmallPtrSet::iterator I = anticOut.begin(), + for (SmallPtrSet::iterator I = anticOut.begin(), E = anticOut.end(); I != E; ++I) if (succAnticIn.count(*I) == 0) temp.push_back(*I); @@ -1005,11 +1005,11 @@ /// each block. ANTIC_IN is then a function of ANTIC_OUT and the GEN /// sets populated in buildsets_availout unsigned GVNPRE::buildsets_anticin(BasicBlock* BB, - SmallPtrSet& anticOut, - SmallPtrSet& currExps, - SmallPtrSet& currTemps, + SmallPtrSet& anticOut, + SmallPtrSet& currExps, + SmallPtrSet& currTemps, std::set& visited) { - SmallPtrSet& anticIn = anticipatedIn[BB]; + SmallPtrSet& anticIn = anticipatedIn[BB]; unsigned old = anticIn.size(); bool defer = buildsets_anticout(BB, anticOut, visited); @@ -1019,7 +1019,7 @@ anticIn.clear(); BitVector numbers(VN.size()); - for (SmallPtrSet::iterator I = anticOut.begin(), + for (SmallPtrSet::iterator I = anticOut.begin(), E = anticOut.end(); I != E; ++I) { unsigned num = VN.lookup_or_add(*I); numbers.resize(VN.size()); @@ -1029,7 +1029,7 @@ numbers.set(num); } } - for (SmallPtrSet::iterator I = currExps.begin(), + for (SmallPtrSet::iterator I = currExps.begin(), E = currExps.end(); I != E; ++I) { if (!numbers.test(VN.lookup_or_add(*I))) { anticIn.insert(*I); @@ -1037,7 +1037,7 @@ } } - for (SmallPtrSet::iterator I = currTemps.begin(), + for (SmallPtrSet::iterator I = currTemps.begin(), E = currTemps.end(); I != E; ++I) { anticIn.erase(*I); numbers.flip(VN.lookup(*I)); @@ -1055,9 +1055,9 @@ /// buildsets - Phase 1 of the main algorithm. Construct the AVAIL_OUT /// and the ANTIC_IN sets. void GVNPRE::buildsets(Function& F) { - std::map > generatedExpressions; - std::map > generatedPhis; - std::map > generatedTemporaries; + std::map > generatedExpressions; + std::map > generatedPhis; + std::map > generatedTemporaries; DominatorTree &DT = getAnalysis(); @@ -1068,10 +1068,10 @@ E = df_end(DT.getRootNode()); DI != E; ++DI) { // Get the sets to update for this block - SmallPtrSet& currExps = generatedExpressions[DI->getBlock()]; - SmallPtrSet& currPhis = generatedPhis[DI->getBlock()]; - SmallPtrSet& currTemps = generatedTemporaries[DI->getBlock()]; - SmallPtrSet& currAvail = availableOut[DI->getBlock()]; + SmallPtrSet& currExps = generatedExpressions[DI->getBlock()]; + SmallPtrSet& currPhis = generatedPhis[DI->getBlock()]; + SmallPtrSet& currTemps = generatedTemporaries[DI->getBlock()]; + SmallPtrSet& currAvail = availableOut[DI->getBlock()]; BasicBlock* BB = DI->getBlock(); @@ -1081,7 +1081,7 @@ availableOut[DI->getIDom()->getBlock()].end()); BitVector availNumbers(VN.size()); - for (SmallPtrSet::iterator I = currAvail.begin(), + for (SmallPtrSet::iterator I = currAvail.begin(), E = currAvail.end(); I != E; ++I) availNumbers.set(VN.lookup(*I)); @@ -1105,7 +1105,7 @@ while (changed) { changed = false; - SmallPtrSet anticOut; + SmallPtrSet anticOut; // Postorder walk of the CFG for (po_iterator BBI = po_begin(&F.getEntryBlock()), @@ -1146,7 +1146,7 @@ /// the main block void GVNPRE::insertion_pre(Value* e, BasicBlock* BB, std::map& avail, - SmallPtrSet& new_set) { + SmallPtrSet& new_set) { for (pred_iterator PI = pred_begin(BB), PE = pred_end(BB); PI != PE; ++PI) { Value* e2 = avail[*PI]; if (!find_leader(availableOut[*PI], VN.lookup(e2))) { @@ -1206,7 +1206,7 @@ VN.add(newVal, VN.lookup(U)); - SmallPtrSet& predAvail = availableOut[*PI]; + SmallPtrSet& predAvail = availableOut[*PI]; val_replace(predAvail, newVal); std::map::iterator av = avail.find(*PI); @@ -1238,7 +1238,7 @@ /// block for the possibility of a partial redundancy. If present, eliminate it unsigned GVNPRE::insertion_mergepoint(std::vector& workList, df_iterator& D, - SmallPtrSet& new_set) { + SmallPtrSet& new_set) { bool changed_function = false; bool new_stuff = false; @@ -1304,7 +1304,7 @@ DominatorTree &DT = getAnalysis(); - std::map > new_sets; + std::map > new_sets; bool new_stuff = true; while (new_stuff) { new_stuff = false; @@ -1315,16 +1315,16 @@ if (BB == 0) continue; - SmallPtrSet& new_set = new_sets[BB]; - SmallPtrSet& availOut = availableOut[BB]; - SmallPtrSet& anticIn = anticipatedIn[BB]; + SmallPtrSet& new_set = new_sets[BB]; + SmallPtrSet& availOut = availableOut[BB]; + SmallPtrSet& anticIn = anticipatedIn[BB]; new_set.clear(); // Replace leaders with leaders inherited from dominator if (DI->getIDom() != 0) { - SmallPtrSet& dom_set = new_sets[DI->getIDom()->getBlock()]; - for (SmallPtrSet::iterator I = dom_set.begin(), + SmallPtrSet& dom_set = new_sets[DI->getIDom()->getBlock()]; + for (SmallPtrSet::iterator I = dom_set.begin(), E = dom_set.end(); I != E; ++I) { new_set.insert(*I); val_replace(availOut, *I); From dpatel at apple.com Wed Jun 27 19:44:33 2007 From: dpatel at apple.com (Devang Patel) Date: Wed, 27 Jun 2007 19:44:33 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp Message-ID: <200706280044.l5S0iX0U023724@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.70 -> 1.71 --- Log message: If a condition is not inside a loop then the condition is suitable to loop unswitch candidate for the loop. --- Diffs of the changes: (+7 -0) LoopUnswitch.cpp | 7 +++++++ 1 files changed, 7 insertions(+) Index: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp diff -u llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:1.70 llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:1.71 --- llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:1.70 Tue Jun 5 19:21:03 2007 +++ llvm/lib/Transforms/Scalar/LoopUnswitch.cpp Wed Jun 27 19:44:10 2007 @@ -128,6 +128,13 @@ static Value *FindLIVLoopCondition(Value *Cond, Loop *L, bool &Changed) { // Constants should be folded, not unswitched on! if (isa(Cond)) return false; + + // If cond is not in loop then it is not suitable. + if (Instruction *I = dyn_cast(Cond)) + if (!L->contains(I->getParent())) + return 0; + if (isa(Cond)) + return 0; // TODO: Handle: br (VARIANT|INVARIANT). // TODO: Hoist simple expressions out of loops. From dpatel at apple.com Wed Jun 27 19:49:23 2007 From: dpatel at apple.com (Devang Patel) Date: Wed, 27 Jun 2007 19:49:23 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp Message-ID: <200706280049.l5S0nNph023823@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.71 -> 1.72 --- Log message: Update LoopUnswitch pass to preserve DomiantorTree. --- Diffs of the changes: (+55 -32) LoopUnswitch.cpp | 87 ++++++++++++++++++++++++++++++++++--------------------- 1 files changed, 55 insertions(+), 32 deletions(-) Index: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp diff -u llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:1.71 llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:1.72 --- llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:1.71 Wed Jun 27 19:44:10 2007 +++ llvm/lib/Transforms/Scalar/LoopUnswitch.cpp Wed Jun 27 19:49:00 2007 @@ -35,6 +35,7 @@ #include "llvm/Analysis/ConstantFolding.h" #include "llvm/Analysis/LoopInfo.h" #include "llvm/Analysis/LoopPass.h" +#include "llvm/Analysis/Dominators.h" #include "llvm/Transforms/Utils/Cloning.h" #include "llvm/Transforms/Utils/Local.h" #include "llvm/Transforms/Utils/BasicBlockUtils.h" @@ -82,6 +83,7 @@ virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequiredID(LoopSimplifyID); AU.addPreservedID(LoopSimplifyID); + AU.addPreserved(); AU.addRequired(); AU.addPreserved(); AU.addRequiredID(LCSSAID); @@ -108,7 +110,12 @@ void RewriteLoopBodyWithConditionConstant(Loop *L, Value *LIC, Constant *Val, bool isEqual); - + + void EmitPreheaderBranchOnCondition(Value *LIC, Constant *Val, + BasicBlock *TrueDest, + BasicBlock *FalseDest, + Instruction *InsertPt); + void SimplifyCode(std::vector &Worklist); void RemoveBlockIfDead(BasicBlock *BB, std::vector &Worklist); @@ -135,7 +142,7 @@ return 0; if (isa(Cond)) return 0; - + // TODO: Handle: br (VARIANT|INVARIANT). // TODO: Hoist simple expressions out of loops. if (L->isLoopInvariant(Cond)) return Cond; @@ -413,6 +420,9 @@ if (Loop *L = LI->getLoopFor(Old)) L->addBasicBlockToLoop(New, *LI); + if (DominatorTree *DT = getAnalysisToUpdate()) + DT->addNewBlock(New, Old); + return New; } @@ -429,30 +439,8 @@ } // If this is a critical edge, let SplitCriticalEdge do it. - Loop *OrigDestBBL = LI->getLoopFor(BB->getTerminator()->getSuccessor(SuccNum)); - if (SplitCriticalEdge(BB->getTerminator(), SuccNum)) { - BasicBlock *NewBB = LatchTerm->getSuccessor(SuccNum); - - Loop *BBL = LI->getLoopFor(BB); - if (!BBL || !OrigDestBBL) - return NewBB; - - // If edge is inside a loop then NewBB is part of same loop. - if (BBL == OrigDestBBL) - BBL->addBasicBlockToLoop(NewBB, *LI); - // If edge is entering loop then NewBB is part of outer loop. - else if (BBL->contains(OrigDestBBL->getHeader())) - BBL->addBasicBlockToLoop(NewBB, *LI); - // If edge is from an inner loop to outer loop then NewBB is part - // of outer loop. - else if (OrigDestBBL->contains(BBL->getHeader())) - OrigDestBBL->addBasicBlockToLoop(NewBB, *LI); - // Else edge is connecting two loops and NewBB is part of their parent loop - else if (Loop *PL = OrigDestBBL->getParentLoop()) - PL->addBasicBlockToLoop(NewBB, *LI); - - return NewBB; - } + if (SplitCriticalEdge(BB->getTerminator(), SuccNum, this)) + return LatchTerm->getSuccessor(SuccNum); // If the edge isn't critical, then BB has a single successor or Succ has a // single pred. Split the block. @@ -486,6 +474,26 @@ } } +// CloneDomInfo - NewBB is cloned from Orig basic block. Now clone Dominator Info. +// If Orig is in Loop then find and use Orig dominator's cloned block as NewBB +// dominator. +void CloneDomInfo(BasicBlock *NewBB, BasicBlock *Orig, Loop *L, + DominatorTree *DT, + DenseMap &VM) { + + DomTreeNode *OrigNode = DT->getNode(Orig); + if (!OrigNode) + return; + BasicBlock *OrigIDom = OrigNode->getBlock(); + BasicBlock *NewIDom = OrigIDom; + if (L->contains(OrigIDom)) { + if (!DT->getNode(OrigIDom)) + CloneDomInfo(NewIDom, OrigIDom, L, DT, VM); + NewIDom = cast(VM[OrigIDom]); + } + DT->addNewBlock(NewBB, OrigIDom); +} + /// CloneLoop - Recursively clone the specified loop and all of its children, /// mapping the blocks with the specified map. static Loop *CloneLoop(Loop *L, Loop *PL, DenseMap &VM, @@ -510,10 +518,10 @@ /// EmitPreheaderBranchOnCondition - Emit a conditional branch on two values /// if LIC == Val, branch to TrueDst, otherwise branch to FalseDest. Insert the /// code immediately before InsertPt. -static void EmitPreheaderBranchOnCondition(Value *LIC, Constant *Val, - BasicBlock *TrueDest, - BasicBlock *FalseDest, - Instruction *InsertPt) { +void LoopUnswitch::EmitPreheaderBranchOnCondition(Value *LIC, Constant *Val, + BasicBlock *TrueDest, + BasicBlock *FalseDest, + Instruction *InsertPt) { // Insert a conditional branch on LIC to the two preheaders. The original // code is the true version and the new code is the false version. Value *BranchVal = LIC; @@ -524,7 +532,15 @@ std::swap(TrueDest, FalseDest); // Insert the new branch. - new BranchInst(TrueDest, FalseDest, BranchVal, InsertPt); + BranchInst *BRI = new BranchInst(TrueDest, FalseDest, BranchVal, InsertPt); + + // Update dominator info. + if (DominatorTree *DT = getAnalysisToUpdate()) { + // BranchVal is a new preheader so it dominates true and false destination + // loop headers. + DT->changeImmediateDominator(TrueDest, BRI->getParent()); + DT->changeImmediateDominator(FalseDest, BRI->getParent()); + } } @@ -574,7 +590,6 @@ ++NumTrivial; } - /// VersionLoop - We determined that the loop is profitable to unswitch when LIC /// equal Val. Split it into loop versions and test the condition outside of /// either loop. Return the loops created as Out1/Out2. @@ -666,6 +681,14 @@ ValueMap[LoopBlocks[i]] = New; // Keep the BB mapping. } + // Update dominator info + if (DominatorTree *DT = getAnalysisToUpdate()) + for (unsigned i = 0, e = LoopBlocks.size(); i != e; ++i) { + BasicBlock *LBB = LoopBlocks[i]; + BasicBlock *NBB = NewBlocks[i]; + CloneDomInfo(NBB, LBB, L, DT, ValueMap); + } + // Splice the newly inserted blocks into the function right before the // original preheader. F->getBasicBlockList().splice(LoopBlocks[0], F->getBasicBlockList(), From clattner at apple.com Wed Jun 27 19:52:26 2007 From: clattner at apple.com (Chris Lattner) Date: Wed, 27 Jun 2007 17:52:26 -0700 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp In-Reply-To: <200706280044.l5S0iX0U023724@zion.cs.uiuc.edu> References: <200706280044.l5S0iX0U023724@zion.cs.uiuc.edu> Message-ID: <01F4A2E5-A1F3-4D77-8C13-465BA88F1AEA@apple.com> > If a condition is not inside a loop then the condition is suitable > to loop unswitch candidate for the loop. I don't understand, why reject unswitching on these values? cases like this should be unswitched: int foo(int arg) { for (..) if (arg) ... } -Chris > > --- > Diffs of the changes: (+7 -0) > > LoopUnswitch.cpp | 7 +++++++ > 1 files changed, 7 insertions(+) > > > Index: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp > diff -u llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:1.70 llvm/lib/ > Transforms/Scalar/LoopUnswitch.cpp:1.71 > --- llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:1.70 Tue Jun 5 > 19:21:03 2007 > +++ llvm/lib/Transforms/Scalar/LoopUnswitch.cpp Wed Jun 27 19:44:10 > 2007 > @@ -128,6 +128,13 @@ > static Value *FindLIVLoopCondition(Value *Cond, Loop *L, bool > &Changed) { > // Constants should be folded, not unswitched on! > if (isa(Cond)) return false; > + > + // If cond is not in loop then it is not suitable. > + if (Instruction *I = dyn_cast(Cond)) > + if (!L->contains(I->getParent())) > + return 0; > + if (isa(Cond)) > + return 0; > > // TODO: Handle: br (VARIANT|INVARIANT). > // TODO: Hoist simple expressions out of loops. > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From dpatel at apple.com Wed Jun 27 19:54:50 2007 From: dpatel at apple.com (Devang Patel) Date: Wed, 27 Jun 2007 17:54:50 -0700 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp In-Reply-To: <01F4A2E5-A1F3-4D77-8C13-465BA88F1AEA@apple.com> References: <200706280044.l5S0iX0U023724@zion.cs.uiuc.edu> <01F4A2E5-A1F3-4D77-8C13-465BA88F1AEA@apple.com> Message-ID: <8AFADC18-D364-4002-AA12-1E1926753D1C@apple.com> On Jun 27, 2007, at 5:52 PM, Chris Lattner wrote: >> If a condition is not inside a loop then the condition is suitable >> to loop unswitch candidate for the loop. > > I don't understand, why reject unswitching on these values? > > cases like this should be unswitched: > > int foo(int arg) { > for (..) > if (arg) > ... > } hmm.. no good reason. Let me double check. - Devang From zhousheng00 at gmail.com Wed Jun 27 21:00:41 2007 From: zhousheng00 at gmail.com (Sheng Zhou) Date: Thu, 28 Jun 2007 10:00:41 +0800 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp Message-ID: <46831649.6010708@gmail.com> Chris, Attached is the testcase, which will get: opt: /developer/home2/zsth/llvm-gcc-dev/HEAD/llvm/llvm/lib/VMCore/Constants.cpp:1559: static llvm::Constant* llvm::ConstantExpr::getZExt(llvm::Constant*, const llvm::Type*): Assertion `C->getType()->getPrimitiveSizeInBits() < Ty->getPrimitiveSizeInBits()&& "SrcTy must be smaller than DestTy for ZExt!"' failed. The condition "IterationCount->getType() != LargestType" doesn't mean the IterationCount->getType's bitwidth < LargestType's so, sometimes, (like in this testcase), it need a trunc not ext. This patch is to fix it. Sheng DOUT << "INDVARS: New CanIV: " << *IndVar; > > if (!isa(IterationCount)) { > - if (IterationCount->getType() != LargestType) > + if (IterationCount->getType()->getPrimitiveSizeInBits() < > + LargestType->getPrimitiveSizeInBits()) > IterationCount = SCEVZeroExtendExpr::get(IterationCount, > LargestType); > + else if (IterationCount->getType() != LargestType) > + IterationCount = SCEVTruncateExpr::get(IterationCount, > LargestType); > if (Instruction *DI = LinearFunctionTestReplace(L, > IterationCount,Rewriter)) > DeadInsts.insert(DI); > } -------------- next part -------------- A non-text attachment was scrubbed... Name: testcase.bc Type: application/octet-stream Size: 524 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070628/82cf95ed/attachment.obj -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: testcase.ll Url: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070628/82cf95ed/attachment.pl From dpatel at apple.com Wed Jun 27 21:06:09 2007 From: dpatel at apple.com (Devang Patel) Date: Wed, 27 Jun 2007 21:06:09 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp Message-ID: <200706280206.l5S269Yc014363@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.72 -> 1.73 --- Log message: - Undo previous check and allow loop switch for condtion that is not inside loop. - Avoid loop unswich for loop header branch. - While cloning dominators fix typo and handle self dominating blocks. --- Diffs of the changes: (+7 -8) LoopUnswitch.cpp | 15 +++++++-------- 1 files changed, 7 insertions(+), 8 deletions(-) Index: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp diff -u llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:1.72 llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:1.73 --- llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:1.72 Wed Jun 27 19:49:00 2007 +++ llvm/lib/Transforms/Scalar/LoopUnswitch.cpp Wed Jun 27 21:05:46 2007 @@ -136,13 +136,6 @@ // Constants should be folded, not unswitched on! if (isa(Cond)) return false; - // If cond is not in loop then it is not suitable. - if (Instruction *I = dyn_cast(Cond)) - if (!L->contains(I->getParent())) - return 0; - if (isa(Cond)) - return 0; - // TODO: Handle: br (VARIANT|INVARIANT). // TODO: Hoist simple expressions out of loops. if (L->isLoopInvariant(Cond)) return Cond; @@ -173,6 +166,8 @@ // loop. for (Loop::block_iterator I = L->block_begin(), E = L->block_end(); I != E; ++I) { + if (*I == L->getHeader()) + continue; TerminatorInst *TI = (*I)->getTerminator(); if (BranchInst *BI = dyn_cast(TI)) { // If this isn't branching on an invariant condition, we can't unswitch @@ -491,7 +486,11 @@ CloneDomInfo(NewIDom, OrigIDom, L, DT, VM); NewIDom = cast(VM[OrigIDom]); } - DT->addNewBlock(NewBB, OrigIDom); + if (NewBB == NewIDom) { + DT->addNewBlock(NewBB, OrigIDom); + DT->changeImmediateDominator(NewBB, NewIDom); + } else + DT->addNewBlock(NewBB, NewIDom); } /// CloneLoop - Recursively clone the specified loop and all of its children, From dpatel at apple.com Wed Jun 27 21:07:30 2007 From: dpatel at apple.com (Devang Patel) Date: Wed, 27 Jun 2007 21:07:30 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/Dominators.h Message-ID: <200706280207.l5S27UqK014414@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: Dominators.h updated: 1.107 -> 1.108 --- Log message: Handle the case when block dominates itself. --- Diffs of the changes: (+4 -1) Dominators.h | 5 ++++- 1 files changed, 4 insertions(+), 1 deletion(-) Index: llvm/include/llvm/Analysis/Dominators.h diff -u llvm/include/llvm/Analysis/Dominators.h:1.107 llvm/include/llvm/Analysis/Dominators.h:1.108 --- llvm/include/llvm/Analysis/Dominators.h:1.107 Wed Jun 27 15:53:52 2007 +++ llvm/include/llvm/Analysis/Dominators.h Wed Jun 27 21:07:08 2007 @@ -185,7 +185,7 @@ const DomTreeNode *B) const { const DomTreeNode *IDom; if (A == 0 || B == 0) return false; - while ((IDom = B->getIDom()) != 0 && IDom != A) + while ((IDom = B->getIDom()) != 0 && IDom != A && IDom != B) B = IDom; // Walk up the tree return IDom != 0; } @@ -244,6 +244,9 @@ DomTreeNode *addNewBlock(BasicBlock *BB, BasicBlock *DomBB) { assert(getNode(BB) == 0 && "Block already in dominator tree!"); DomTreeNode *IDomNode = getNode(DomBB); + // Check if BB dominates itself. + //if (!IDomNode && BB == DomBB) + // IDomNode = BB; assert(IDomNode && "Not immediate dominator specified for block!"); DFSInfoValid = false; return DomTreeNodes[BB] = From dpatel at apple.com Wed Jun 27 21:12:16 2007 From: dpatel at apple.com (Devang Patel) Date: Wed, 27 Jun 2007 21:12:16 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/Dominators.h Message-ID: <200706280212.l5S2CGgf014514@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: Dominators.h updated: 1.108 -> 1.109 --- Log message: Remove unnecessary comments. --- Diffs of the changes: (+0 -3) Dominators.h | 3 --- 1 files changed, 3 deletions(-) Index: llvm/include/llvm/Analysis/Dominators.h diff -u llvm/include/llvm/Analysis/Dominators.h:1.108 llvm/include/llvm/Analysis/Dominators.h:1.109 --- llvm/include/llvm/Analysis/Dominators.h:1.108 Wed Jun 27 21:07:08 2007 +++ llvm/include/llvm/Analysis/Dominators.h Wed Jun 27 21:11:54 2007 @@ -244,9 +244,6 @@ DomTreeNode *addNewBlock(BasicBlock *BB, BasicBlock *DomBB) { assert(getNode(BB) == 0 && "Block already in dominator tree!"); DomTreeNode *IDomNode = getNode(DomBB); - // Check if BB dominates itself. - //if (!IDomNode && BB == DomBB) - // IDomNode = BB; assert(IDomNode && "Not immediate dominator specified for block!"); DFSInfoValid = false; return DomTreeNodes[BB] = From baldrick at free.fr Thu Jun 28 04:02:00 2007 From: baldrick at free.fr (Duncan Sands) Date: Thu, 28 Jun 2007 11:02:00 +0200 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp In-Reply-To: <200706271847.l5RIlpG6007163@zion.cs.uiuc.edu> References: <200706271847.l5RIlpG6007163@zion.cs.uiuc.edu> Message-ID: <200706281102.01939.baldrick@free.fr> Hi Evan > If a livein is not used in the block. It's live through. thanks for doing this. Does this mean that the value in the livein register is available in all blocks reachable from this one? If so, why is propagateEHRegister needed? Or does it mean that the value is available in successor basic blocks, but only if also marked as livein for the successor? Best wishes, Duncan. From baldrick at free.fr Thu Jun 28 05:09:40 2007 From: baldrick at free.fr (Duncan Sands) Date: Thu, 28 Jun 2007 12:09:40 +0200 Subject: [llvm-commits] =?iso-8859-1?q?CVS=3A=09llvm/lib/CodeGen/Selection?= =?iso-8859-1?q?DAG/DAGCombiner=2Ecpp?= In-Reply-To: <7053099D-22B7-41C3-97E8-818E22BA7AF3@apple.com> References: <20070627154124.GS5693@village.us.cray.com> <7053099D-22B7-41C3-97E8-818E22BA7AF3@apple.com> Message-ID: <200706281209.41595.baldrick@free.fr> Hi, > > It seems like folding undef/X to undef isn't safe either though, with > > the way it sounds like undef is intended to work. This code: > > > > %x = udiv i32 undef, %intmax > > %y = udiv i32 %x, 2 > > > > will always set %y to 0. Maybe instcombine can fold the second > > udiv by looking through its operands, but it can't safely fold the > > first. The best it could do is try to fold away all of %x's uses so > > that %x isn't needed anymore. presumably undef/X should be folded to 0. [This means that undef/0 gets folded to 0, not sure if that's OK]. Ciao, D. From clattner at apple.com Thu Jun 28 11:55:55 2007 From: clattner at apple.com (Chris Lattner) Date: Thu, 28 Jun 2007 09:55:55 -0700 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp In-Reply-To: <200706281209.41595.baldrick@free.fr> References: <20070627154124.GS5693@village.us.cray.com> <7053099D-22B7-41C3-97E8-818E22BA7AF3@apple.com> <200706281209.41595.baldrick@free.fr> Message-ID: On Jun 28, 2007, at 3:09 AM, Duncan Sands wrote: > Hi, > >>> It seems like folding undef/X to undef isn't safe either though, >>> with >>> the way it sounds like undef is intended to work. This code: >>> >>> %x = udiv i32 undef, %intmax >>> %y = udiv i32 %x, 2 >>> >>> will always set %y to 0. Maybe instcombine can fold the second >>> udiv by looking through its operands, but it can't safely fold the >>> first. The best it could do is try to fold away all of %x's uses so >>> that %x isn't needed anymore. > > presumably undef/X should be folded to 0. [This means that undef/0 > gets > folded to 0, not sure if that's OK]. Ah, duncan's right. I confused myself. We can fold undef/x -> 0 because there is some value of the undef where it is always safe to produce zero for any x. In particular, if the undef was 0, x can be anything (if it is also zero, the result is undefined, so zero is fine). -Chris From clattner at apple.com Thu Jun 28 12:02:34 2007 From: clattner at apple.com (Chris Lattner) Date: Thu, 28 Jun 2007 10:02:34 -0700 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp In-Reply-To: <20070627205029.GW5693@village.us.cray.com> References: <20070627205029.GW5693@village.us.cray.com> Message-ID: On Jun 27, 2007, at 1:50 PM, Dan Gohman wrote: >>>> I think that undef udiv intmax -> 0, no? If not, plz update >>>> instcombine as well. >>> >>> intmax udiv intmax -> 1. >>> It seems like folding undef/X to undef isn't safe either though, >>> with >>> the way it sounds like undef is intended to work. This code: >>> >>> %x = udiv i32 undef, %intmax >>> %y = udiv i32 %x, 2 >>> >>> will always set %y to 0. Maybe instcombine can fold the second >>> udiv by looking through its operands, but it can't safely fold the >>> first. The best it could do is try to fold away all of %x's uses so >>> that %x isn't needed anymore. Duncan pointed out that I confused myself. If something is undef, we can choose to pick any specific value for the undef to pick the cancellation. >> Ug, excellent point. At this point, I'm inclined to just give up >> folding of udiv undefs. What do you think? > > udiv isn't the only one, the way this is going... > > %x = mul i32 undef, 2 > %y = srem i32 %x, 2 This is fine, we fold the mul to 0 (because the undef could be zero). > %x = and i32 undef, 0xffff0000 > %y = and i32 %x, 0x0000ffff > > and so on for a lot of others. For and, we fold undef to 0 (because the undef could be 0) For or undef, X, we fold to -1, because the undef could be -1. >>> Even simple things like undef+X don't seem to be safe to fold. >>> >>> %x = undef; >>> if (%x >= 0) >>> %z = %y / (%x + 1); // don't divide by undef! >> >> Fortunately, this isn't a problem. LLVM has no copy instruction, so >> the code is really this: >> >>> if (undef >= 0) >>> %z = %y / (undef + 1); // don't divide by undef! >> >> There is nothing that specifies the two undefs are the same value. >> Also, in C, if you have an undefined variable, you aren't guaranteed >> to get the same undef value each time you read the variable, so >> transforming C into LLVM is ok :) > > In C, an uninitialized variable has an "indeterminate value", which is > potentially a trap representation, which can't even be multiplied by > zero without incurring undefined behavior. I don't know where it > suggests that a variable with indeterminate value might be different > on each read though. There have been discussions about this issue on the GCC list. I remember the resolution (they take the same basic approach we do), but I don't remember why. I think a DR may be submitted to the C committee on the issue. IIRC, the basic reason this (allowing an undefined value to have multiple values) bites GCC is due to regalloc. For example, if you have: int x; int y; y = 1; print(x, y); ... y = 2; print(x, y); Because there is no live range for x (just uses) x and y can be allocated to the same register. Doing so causes the value of x to follow the value of y. > LLVM does so have copy instructions. The syntax is a little odd > though, > and the keyword is spelled 'bitcast' ;-). Point taken. :) -Chris From lauro.venancio at gmail.com Thu Jun 28 12:06:43 2007 From: lauro.venancio at gmail.com (Lauro Ramos Venancio) Date: Thu, 28 Jun 2007 14:06:43 -0300 Subject: [llvm-commits] ARM problem In-Reply-To: <20070628000202.GX5693@village.us.cray.com> References: <20070628000202.GX5693@village.us.cray.com> Message-ID: <9c10c9f0706281006r478e2a3dm80339430e1095300@mail.gmail.com> Hi Dan, Do you already have the final fix for this problem? It caused a lot of fails on nightly test (http://llvm.org/nightlytest/test.php?machine=142&night=3088). Lauro 2007/6/27, Dan Gohman : > Hi Lauro, > > This was caused by my fix for PR1529. > > I'm currently considering the following patch, which fixes your attached > test case: > > Index: lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp > =================================================================== > RCS file: /var/cvs/llvm/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp,v > retrieving revision 1.470 > diff -u -r1.470 SelectionDAGISel.cpp > --- lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp > +++ lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp > @@ -312,7 +312,9 @@ > MVT::ValueType ElementVT; > NumRegisters = TLI.getVectorTypeBreakdown(VT, ElementVT, RegisterVT); > } else { > - RegisterVT = TLI.getTypeToTransformTo(VT); > + RegisterVT = VT; > + while (!TLI.isTypeLegal(RegisterVT)) > + RegisterVT = TLI.getTypeToTransformTo(RegisterVT); > NumRegisters = TLI.getNumRegisters(VT); > } > > > I'm looking to see if I can find a cleaner way to solve this. > > Dan > > -- > Dan Gohman, Cray Inc. > From alenhar2 at cs.uiuc.edu Thu Jun 28 12:40:23 2007 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Thu, 28 Jun 2007 12:40:23 -0500 Subject: [llvm-commits] [see] CVS: llvm-poolalloc/lib/DSA/Local.cpp Message-ID: <200706281740.l5SHeN6c027611@apoc.cs.uiuc.edu> Changes in directory llvm-poolalloc/lib/DSA: Local.cpp updated: 1.158.2.4.2.11 -> 1.158.2.4.2.12 --- Log message: add hacky debug support for unknowns, and add 1 and -1 as null values (as used too often in the linux kernel) --- Diffs of the changes: (+32 -4) Local.cpp | 36 ++++++++++++++++++++++++++++++++---- 1 files changed, 32 insertions(+), 4 deletions(-) Index: llvm-poolalloc/lib/DSA/Local.cpp diff -u llvm-poolalloc/lib/DSA/Local.cpp:1.158.2.4.2.11 llvm-poolalloc/lib/DSA/Local.cpp:1.158.2.4.2.12 --- llvm-poolalloc/lib/DSA/Local.cpp:1.158.2.4.2.11 Fri May 18 13:26:25 2007 +++ llvm-poolalloc/lib/DSA/Local.cpp Thu Jun 28 12:39:40 2007 @@ -42,6 +42,23 @@ static Statistic<> GlobalPools ("dsa", "Number of global pools"); #endif +Statistic<> stat_unknown ("dsa", "Number of markunknowns"); +static cl::opt +Crash("dsa-crash", cl::Hidden, + cl::desc("Crash on unknowns")); +static cl::opt +CrashAt("dsa-crashat", cl::Hidden, + cl::desc("Crash on unknowns")); +static int CrashCur = 0; +DSNode *DSNode::setUnknownNodeMarker() { + if (Crash && CrashCur == CrashAt) assert(0); + ++CrashCur; + ++stat_unknown; + NodeType |= UnknownNode; + return this; +} + + static RegisterPass X("datastructure", "Local Data Structure Analysis"); @@ -116,7 +133,7 @@ Value::use_iterator U; for (U=f.use_begin(); U != f.use_end(); ++U) { if (isa(U)) { - std::cerr << "LLVA: isa: " << f.getName() << " " << *U << std::endl; + // std::cerr << "LLVA: isa: " << f.getName() << " " << *U << std::endl; escapes = true; break; } @@ -283,7 +300,15 @@ if (isa(CE->getOperand(0)->getType())) NH = getValueDest(*CE->getOperand(0)); else - NH = createNode()->setUnknownNodeMarker(); + if (CE->getOpcode() == Instruction::Cast && + isa(CE->getOperand(0)) && + ( + cast(CE->getOperand(0))->equalsInt(1) || + cast(CE->getOperand(0))->getZExtValue() == 0xFFFFFFFF + )) + NH = createNode(); + else + NH = createNode()->setUnknownNodeMarker(); } else if (CE->getOpcode() == Instruction::GetElementPtr) { visitGetElementPtrInst(*CE); DSScalarMap::iterator I = ScalarMap.find(CE); @@ -1114,7 +1139,7 @@ DSNode *N = createNode(); N->setAllocaNodeMarker(); N->setUnknownNodeMarker(); - N->setIncompleteMarker(); + CS.getInstruction()->dump(); N->foldNodeCompletely(); // @@ -1239,6 +1264,7 @@ // to track the fact that the node points to SOMETHING, just something we // don't know about. Make an "Unknown" node. // + CI.dump(); setDestTo(CI, createNode()->setUnknownNodeMarker()); } } @@ -1255,8 +1281,10 @@ if (isPointerType((*I)->getType())) CurNode.mergeWith(getValueDest(**I)); - if (DSNode *N = CurNode.getNode()) + if (DSNode *N = CurNode.getNode()) { + Inst.dump(); N->setUnknownNodeMarker(); + } } From lauro.venancio at gmail.com Thu Jun 28 14:03:27 2007 From: lauro.venancio at gmail.com (Lauro Ramos Venancio) Date: Thu, 28 Jun 2007 14:03:27 -0500 Subject: [llvm-commits] CVS: llvm/lib/Linker/LinkModules.cpp Message-ID: <200706281903.l5SJ3RwY029576@zion.cs.uiuc.edu> Changes in directory llvm/lib/Linker: LinkModules.cpp updated: 1.141 -> 1.142 --- Log message: When linking two modules, we should copy the alias. --- Diffs of the changes: (+28 -0) LinkModules.cpp | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+) Index: llvm/lib/Linker/LinkModules.cpp diff -u llvm/lib/Linker/LinkModules.cpp:1.141 llvm/lib/Linker/LinkModules.cpp:1.142 --- llvm/lib/Linker/LinkModules.cpp:1.141 Wed Jun 6 17:01:12 2007 +++ llvm/lib/Linker/LinkModules.cpp Thu Jun 28 14:02:54 2007 @@ -561,6 +561,31 @@ return false; } +// LinkAlias - Loop through the alias in the src module and link them into the +// dest module. +static bool LinkAlias(Module *Dest, const Module *Src, std::string *Err) { + // Loop over all alias in the src module + for (Module::const_alias_iterator I = Src->alias_begin(), + E = Src->alias_end(); I != E; ++I) { + const GlobalAlias *GA = I; + + GlobalValue *NewAliased = NULL; + const GlobalValue *Aliased = GA->getAliasedGlobal(); + if (isa(*Aliased)) + NewAliased = Dest->getGlobalVariable(Aliased->getName()); + else if (isa(*Aliased)) + NewAliased = Dest->getFunction(Aliased->getName()); + // FIXME: we should handle the bitcast alias. + assert(NewAliased && "Can't find the aliased GV."); + + GlobalAlias *NewGA = new GlobalAlias(GA->getType()->getElementType(), + GA->getLinkage(), GA->getName(), + NewAliased, Dest); + CopyGVAttributes(NewGA, GA); + } + return false; +} + // LinkGlobalInits - Update the initializers in the Dest module now that all // globals that may be referenced are in Dest. @@ -1005,6 +1030,9 @@ // If there were any appending global variables, link them together now. if (LinkAppendingVars(Dest, AppendingVars, ErrorMsg)) return true; + // If there were any alias, link them now. + if (LinkAlias(Dest, Src, ErrorMsg)) return true; + // If the source library's module id is in the dependent library list of the // destination library, remove it since that module is now linked in. sys::Path modId; From greened at obbligato.org Thu Jun 28 14:12:52 2007 From: greened at obbligato.org (David A. Greene) Date: Thu, 28 Jun 2007 14:12:52 -0500 Subject: [llvm-commits] llvm-gcc patch for _GLIBCXX_DEBUG Message-ID: <200706281412.52596.greened@obbligato.org> Here's a patch to llvm-gcc to support llvm builds with _GLIBCXX_DEBUG (--enable-expensive-checks). Can someone apply it if it looks good? Thanks. I'm about to commit changes to llvm but I wanted to get llvm-gcc support out first so builds don't get broken. -Dave -------------- next part -------------- Index: gcc/Makefile.in =================================================================== --- gcc/Makefile.in (revision 361) +++ gcc/Makefile.in (working copy) @@ -217,26 +217,22 @@ # APPLE LOCAL begin LLVM @checkingenabled_flag@ LLVMOBJDIR = @LLVMBASEPATH@ -ifeq ($(LLVMOBJDIR),) -CPPFLAGS = @CPPFLAGS@ -else -CPPFLAGS = @CPPFLAGS@ -DENABLE_LLVM -D__STDC_LIMIT_MACROS ifdef LLVM_VERSION_INFO CPPFLAGS += -DLLVM_VERSION_INFO='"$(LLVM_VERSION_INFO)"' endif -ifdef CHECKING_ENABLED -BUILDMODE=Debug -else -ifdef DISABLE_LLVMASSERTIONS -BUILDMODE=Release-Asserts -else -BUILDMODE=Release -endif -endif +# Cray [dag] Determine BUILDMODE from configure run (--enable-llvm) + +BUILDMODE := @LLVMBUILDMODE@ + LLVMBINPATH = $(LLVMOBJDIR)/$(BUILDMODE)/bin +ifeq ($(LLVMOBJDIR),) +CPPFLAGS = @CPPFLAGS@ +else +CPPFLAGS := @CPPFLAGS@ -DENABLE_LLVM -D__STDC_LIMIT_MACROS $(shell $(LLVMBINPATH)/llvm-config --cppflags) + # Use llvm-config to get the srcdir that LLVM was configured with, to support # srcdir != objdir builds. LLVMSRCDIR := $(shell $(LLVMBINPATH)/llvm-config --src-root) Index: gcc/configure.ac =================================================================== --- gcc/configure.ac (revision 361) +++ gcc/configure.ac (working copy) @@ -745,16 +745,38 @@ if test -x "$LLVMBASEPATH/Release/bin/llc$EXEEXT"; then echo Found Release LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Release" elif test -x "$LLVMBASEPATH/Debug/bin/llc$EXEEXT"; then echo Found Debug LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Debug" elif test -x "$LLVMBASEPATH/Release-Asserts/bin/llc$EXEEXT"; then echo Found Release-Asserts LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Release-Asserts" + elif test -x "$LLVMBASEPATH/Debug-Asserts/bin/llc$EXEEXT"; then + echo Found Debug-Asserts LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Debug-Asserts" + elif test -x "$LLVMBASEPATH/Release+Checks/bin/llc$EXEEXT"; then + echo Found Release+Checks LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Release+Checks" + elif test -x "$LLVMBASEPATH/Debug+Checks/bin/llc$EXEEXT"; then + echo Found Debug+Checks LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Debug+Checks" + elif test -x "$LLVMBASEPATH/Release-Asserts+Checks/bin/llc$EXEEXT"; then + echo Found Release-Asserts+Checks LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Release-Asserts+Checks" + elif test -x "$LLVMBASEPATH/Debug-Asserts+Checks/bin/llc$EXEEXT"; then + echo Found Debug-Asserts+Checks LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Debug-Asserts+Checks" else AC_MSG_ERROR([You must specify valid path to your LLVM tree with --enable-llvm=DIR]) fi ], -[LLVMBASEPATH=""]) +[LLVMBASEPATH="" + LLVMBUILDMODE="" +]) AC_SUBST(LLVMBASEPATH) +# Cray [dag] send llvm build mode to gcc Makefiles +AC_SUBST(LLVMBUILDMODE) # APPLE LOCAL end LLVM # Sanity check enable_languages in case someone does not run the toplevel Index: gcc/configure =================================================================== --- gcc/configure (revision 361) +++ gcc/configure (working copy) @@ -1,8 +1,9 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59. +# Generated by GNU Autoconf 2.60. # -# Copyright (C) 2003 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## @@ -16,11 +17,35 @@ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi +BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset @@ -29,8 +54,43 @@ fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -44,18 +104,19 @@ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -63,157 +124,386 @@ # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# CDPATH. +$as_unset CDPATH -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no fi + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +for as_dir in /usr/bin/posix$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in + case $as_dir in /*) - if ("$as_dir/$as_base" -c ' + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf at gnu.org about your system, + echo including any error possibly output before this + echo message +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || + chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -222,7 +512,19 @@ as_mkdir_p=false fi -as_executable_p="test -f" +# Find out whether ``test -x'' works. Don't use a zero-byte file, as +# systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + as_executable_p="test -x" +else + as_executable_p=: +fi +rm -f conf$$.file # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -231,39 +533,27 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" -# CDPATH. -$as_unset CDPATH +exec 7<&0 &1 - # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` -exec 6>&1 - # # Initializations. # ac_default_prefix=/usr/local +ac_clean_files= ac_config_libobj_dir=. +LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -# This variable seems obsolete. It should probably be removed, and -# only ac_max_sed_lines should be used. -: ${ac_max_here_lines=38} - # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= @@ -300,18 +590,241 @@ #endif #if HAVE_INTTYPES_H # include -#else -# if HAVE_STDINT_H -# include -# endif #endif +#if HAVE_STDINT_H +# include +#endif #if HAVE_UNISTD_H # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_subdir host_subdir target_subdir gcc_version_trigger gcc_version_full gcc_version GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP strict1_warn warn_cflags WERROR checkingenabled_flag nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep DSYMUTIL LLVMBASEPATH SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file PACKAGE VERSION USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS cc_for_cross_gnattools CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir objdir subdirs srcdir all_boot_languages all_compilers all_gtfiles all_gtfiles_files_langs all_gtfiles_files_files all_lang_makefrags all_lang_makefiles all_languages all_stagestuff build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages cc_set_by_configure quoted_cc_set_by_configure cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir libstdcxx_incdir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_cxx_file out_object_file out_cxx_object_file stage_prefix_set_by_configure quoted_stage_prefix_set_by_configure thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default set_gcc_lib_path GMPLIBS GMPINC LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +build +build_cpu +build_vendor +build_os +host +host_cpu +host_vendor +host_os +target +target_cpu +target_vendor +target_os +target_noncanonical +build_subdir +host_subdir +target_subdir +gcc_version_trigger +gcc_version_full +gcc_version +GENINSRC +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +NO_MINUS_C_MINUS_O +OUTPUT_OPTION +CPP +GREP +EGREP +strict1_warn +warn_cflags +WERROR +checkingenabled_flag +nocommon_flag +TREEBROWSER +valgrind_path +valgrind_path_defines +valgrind_command +coverage_flags +enable_multilib +enable_shared +TARGET_SYSTEM_ROOT +TARGET_SYSTEM_ROOT_DEFINE +CROSS_SYSTEM_HEADER_DIR +onestep +DSYMUTIL +LLVMBASEPATH +LLVMBUILDMODE +SET_MAKE +AWK +LN_S +LN +RANLIB +ranlib_flags +INSTALL +INSTALL_PROGRAM +INSTALL_DATA +make_compare_target +have_mktemp_command +MAKEINFO +BUILD_INFO +GENERATED_MANPAGES +FLEX +BISON +NM +AR +stage1_cflags +COLLECT2_LIBS +GNAT_LIBEXC +LDEXP_LIB +TARGET_GETGROUPS_T +LIBICONV +LTLIBICONV +LIBICONV_DEP +manext +objext +gthread_flags +extra_modes_file +PACKAGE +VERSION +USE_NLS +LIBINTL +LIBINTL_DEP +INCINTL +XGETTEXT +GMSGFMT +POSUB +CATALOGS +cc_for_cross_gnattools +CROSS +ALL +SYSTEM_HEADER_DIR +inhibit_libc +CC_FOR_BUILD +BUILD_CFLAGS +STMP_FIXINC +STMP_FIXPROTO +collect2 +libgcc_visibility +GGC +zlibdir +zlibinc +MAINT +gcc_tooldir +dollar +slibdir +objdir +subdirs +srcdir +all_boot_languages +all_compilers +all_gtfiles +all_gtfiles_files_langs +all_gtfiles_files_files +all_lang_makefrags +all_lang_makefiles +all_languages +all_stagestuff +build_exeext +build_install_headers_dir +build_xm_file_list +build_xm_include_list +build_xm_defines +check_languages +cc_set_by_configure +quoted_cc_set_by_configure +cpp_install_dir +xmake_file +tmake_file +extra_gcc_objs +extra_headers_list +extra_objs +extra_parts +extra_passes +extra_programs +float_h_file +gcc_config_arguments +gcc_gxx_include_dir +libstdcxx_incdir +host_exeext +host_xm_file_list +host_xm_include_list +host_xm_defines +out_host_hook_obj +install +lang_opt_files +lang_specs_files +lang_tree_files +local_prefix +md_file +objc_boehm_gc +out_file +out_cxx_file +out_object_file +out_cxx_object_file +stage_prefix_set_by_configure +quoted_stage_prefix_set_by_configure +thread_file +tm_file_list +tm_include_list +tm_defines +tm_p_file_list +tm_p_include_list +xm_file_list +xm_include_list +xm_defines +c_target_objs +cxx_target_objs +target_cpu_default +set_gcc_lib_path +GMPLIBS +GMPINC +LIBOBJS +LTLIBOBJS' ac_subst_files='language_hooks' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +CPPFLAGS +CPP +GMPLIBS +GMPINC' + # Initialize some variables set by options. ac_init_help= ac_init_version=false @@ -337,34 +850,48 @@ # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' +datarootdir='${prefix}/share' +datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' +docdir='${datarootdir}/doc/${PACKAGE}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' ac_prev= +ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" + eval $ac_prev=\$ac_option ac_prev= continue fi - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_option in + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -386,12 +913,18 @@ --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) + -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. @@ -399,8 +932,18 @@ { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` - eval "enable_$ac_feature=no" ;; + eval enable_$ac_feature=no ;; + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. @@ -408,11 +951,7 @@ { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "enable_$ac_feature='$ac_optarg'" ;; + eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -439,6 +978,12 @@ -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -463,13 +1008,16 @@ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) + | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -534,6 +1082,16 @@ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -590,11 +1148,7 @@ { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "with_$ac_package='$ac_optarg'" ;; + eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` @@ -603,7 +1157,7 @@ { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` - eval "with_$ac_package=no" ;; + eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. @@ -634,8 +1188,7 @@ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - eval "$ac_envvar='$ac_optarg'" + eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) @@ -655,29 +1208,21 @@ { (exit 1); exit 1; }; } fi -# Be sure to have absolute paths. -for ac_var in exec_prefix prefix +# Be sure to have absolute directory names. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir do - eval ac_val=$`echo $ac_var` + eval ac_val=\$$ac_var case $ac_val in - [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } done -# Be sure to have absolute paths. -for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -done - # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. @@ -702,82 +1247,76 @@ test "$silent" = yes && exec 6>/dev/null +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_confdir=`(dirname "$0") 2>/dev/null || + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then + if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } - else - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } - fi + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. fi -(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || - { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 - { (exit 1); exit 1; }; } -srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` -ac_env_build_alias_set=${build_alias+set} -ac_env_build_alias_value=$build_alias -ac_cv_env_build_alias_set=${build_alias+set} -ac_cv_env_build_alias_value=$build_alias -ac_env_host_alias_set=${host_alias+set} -ac_env_host_alias_value=$host_alias -ac_cv_env_host_alias_set=${host_alias+set} -ac_cv_env_host_alias_value=$host_alias -ac_env_target_alias_set=${target_alias+set} -ac_env_target_alias_value=$target_alias -ac_cv_env_target_alias_set=${target_alias+set} -ac_cv_env_target_alias_value=$target_alias -ac_env_CC_set=${CC+set} -ac_env_CC_value=$CC -ac_cv_env_CC_set=${CC+set} -ac_cv_env_CC_value=$CC -ac_env_CFLAGS_set=${CFLAGS+set} -ac_env_CFLAGS_value=$CFLAGS -ac_cv_env_CFLAGS_set=${CFLAGS+set} -ac_cv_env_CFLAGS_value=$CFLAGS -ac_env_LDFLAGS_set=${LDFLAGS+set} -ac_env_LDFLAGS_value=$LDFLAGS -ac_cv_env_LDFLAGS_set=${LDFLAGS+set} -ac_cv_env_LDFLAGS_value=$LDFLAGS -ac_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_env_CPPFLAGS_value=$CPPFLAGS -ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_cv_env_CPPFLAGS_value=$CPPFLAGS -ac_env_CPP_set=${CPP+set} -ac_env_CPP_value=$CPP -ac_cv_env_CPP_set=${CPP+set} -ac_cv_env_CPP_value=$CPP -ac_env_GMPLIBS_set=${GMPLIBS+set} -ac_env_GMPLIBS_value=$GMPLIBS -ac_cv_env_GMPLIBS_set=${GMPLIBS+set} -ac_cv_env_GMPLIBS_value=$GMPLIBS -ac_env_GMPINC_set=${GMPINC+set} -ac_env_GMPINC_value=$GMPINC -ac_cv_env_GMPINC_set=${GMPINC+set} -ac_cv_env_GMPINC_value=$GMPINC +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done # # Report the --help message. @@ -806,9 +1345,6 @@ -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] -_ACEOF - - cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] @@ -826,15 +1362,22 @@ --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] - --infodir=DIR info documentation [PREFIX/info] - --mandir=DIR man documentation [PREFIX/man] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -936,8 +1479,8 @@ CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have - headers in a nonstandard directory + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory CPP C preprocessor GMPLIBS How to link GMP GMPINC How to find GMP include files @@ -946,118 +1489,86 @@ it to find libraries and programs with nonstandard names/locations. _ACEOF +ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. - ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d $ac_dir || continue + test -d "$ac_dir" || continue ac_builddir=. -if test "$ac_dir" != .; then +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - cd $ac_dir - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_srcdir/configure.gnu; then - echo - $SHELL $ac_srcdir/configure.gnu --help=recursive - elif test -f $ac_srcdir/configure; then - echo - $SHELL $ac_srcdir/configure --help=recursive - elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then - echo - $ac_configure --help + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi - cd $ac_popdir + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } done fi -test -n "$ac_init_help" && exit 0 +test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF +configure +generated by GNU Autoconf 2.60 -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit 0 + exit fi -exec 5>config.log -cat >&5 <<_ACEOF +cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.60. Invocation command line was $ $0 $@ _ACEOF +exec 5>>config.log { cat <<_ASUNAME ## --------- ## @@ -1076,7 +1587,7 @@ /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` @@ -1090,6 +1601,7 @@ test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done +IFS=$as_save_IFS } >&5 @@ -1111,7 +1623,6 @@ ac_configure_args= ac_configure_args0= ac_configure_args1= -ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -1122,7 +1633,7 @@ -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in @@ -1144,9 +1655,7 @@ -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " + ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done @@ -1157,8 +1666,8 @@ # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. -# WARNING: Be sure not to use single quotes in there, as some shells, -# such as our DU 5.0 friend, will then `close' the trap. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -1171,20 +1680,34 @@ _ASBOX echo # The following way of writing the cache mishandles newlines in values, -{ +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( *) - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} + esac | + sort +) echo cat <<\_ASBOX @@ -1195,22 +1718,28 @@ echo for ac_var in $ac_subst_vars do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------- ## -## Output files. ## -## ------------- ## +## ------------------- ## +## File substitutions. ## +## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -1222,26 +1751,24 @@ ## ----------- ## _ASBOX echo - sed "/^$/d" confdefs.h | sort + cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core && - rm -rf conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status - ' 0 +' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo >confdefs.h +rm -f -r conftest* confdefs.h # Predefined preprocessor variables. @@ -1272,14 +1799,17 @@ # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi +if test -n "$CONFIG_SITE"; then + set x "$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + set x "$prefix/share/config.site" "$prefix/etc/config.site" +else + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" fi -for ac_site_file in $CONFIG_SITE; do +shift +for ac_site_file +do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} @@ -1295,8 +1825,8 @@ { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . $cache_file;; - *) . ./$cache_file;; + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; esac fi else @@ -1308,12 +1838,11 @@ # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do +for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val="\$ac_cv_env_${ac_var}_value" - eval ac_new_val="\$ac_env_${ac_var}_value" + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 @@ -1338,8 +1867,7 @@ # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1356,11 +1884,6 @@ { (exit 1); exit 1; }; } fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu @@ -1377,116 +1900,170 @@ +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_config_headers="$ac_config_headers auto-host.h:config.in" - ac_config_headers="$ac_config_headers auto-host.h:config.in" - #Set to 1 on a release branch is_release=1 # Determine the host, build, and target systems ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/install-sh; then +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break - elif test -f $ac_dir/install.sh; then + elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break - elif test -f $ac_dir/shtool; then + elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 -echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 +echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} { (exit 1); exit 1; }; } fi -ac_config_guess="$SHELL $ac_aux_dir/config.guess" -ac_config_sub="$SHELL $ac_aux_dir/config.sub" -ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + # Make sure we can run config.sub. -$ac_config_sub sun4 >/dev/null 2>&1 || - { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 -echo "$as_me: error: cannot run $ac_config_sub" >&2;} +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 +echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} { (exit 1); exit 1; }; } -echo "$as_me:$LINENO: checking build system type" >&5 -echo $ECHO_N "checking build system type... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6; } if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_build_alias=$build_alias -test -z "$ac_cv_build_alias" && - ac_cv_build_alias=`$ac_config_guess` -test -z "$ac_cv_build_alias" && + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } -ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -echo "${ECHO_T}$ac_cv_build" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 +echo "$as_me: error: invalid value of canonical build" >&2;} + { (exit 1); exit 1; }; };; +esac build=$ac_cv_build -build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -echo "$as_me:$LINENO: checking host system type" >&5 -echo $ECHO_N "checking host system type... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6; } if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_host_alias=$host_alias -test -z "$ac_cv_host_alias" && - ac_cv_host_alias=$ac_cv_build_alias -ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } +fi fi -echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -echo "${ECHO_T}$ac_cv_host" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 +echo "$as_me: error: invalid value of canonical host" >&2;} + { (exit 1); exit 1; }; };; +esac host=$ac_cv_host -host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac -echo "$as_me:$LINENO: checking target system type" >&5 -echo $ECHO_N "checking target system type... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking target system type" >&5 +echo $ECHO_N "checking target system type... $ECHO_C" >&6; } if test "${ac_cv_target+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_target_alias=$target_alias -test "x$ac_cv_target_alias" = "x" && - ac_cv_target_alias=$ac_cv_host_alias -ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} + if test "x$target_alias" = x; then + ac_cv_target=$ac_cv_host +else + ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;} { (exit 1); exit 1; }; } +fi fi -echo "$as_me:$LINENO: result: $ac_cv_target" >&5 -echo "${ECHO_T}$ac_cv_target" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_target" >&5 +echo "${ECHO_T}$ac_cv_target" >&6; } +case $ac_cv_target in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5 +echo "$as_me: error: invalid value of canonical target" >&2;} + { (exit 1); exit 1; }; };; +esac target=$ac_cv_target -target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_target +shift +target_cpu=$1 +target_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +target_os=$* +IFS=$ac_save_IFS +case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # The aliases save the names the user supplied, while $host etc. @@ -1526,17 +2103,17 @@ # Set program_transform_name test "$program_prefix" != NONE && - program_transform_name="s,^,$program_prefix,;$program_transform_name" + program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && - program_transform_name="s,\$,$program_suffix,;$program_transform_name" + program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` -rm conftest.sed +rm -f conftest.sed # Check for bogus environment variables. @@ -1547,8 +2124,8 @@ # - one of the terminals (":" and ";") is the first or last sign # - two terminals occur directly after each other # - the path contains an element with a dot in it -echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5 -echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5 +echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6; } case ${LIBRARY_PATH} in [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) library_path_setting="contains current directory" @@ -1557,8 +2134,8 @@ library_path_setting="ok" ;; esac -echo "$as_me:$LINENO: result: $library_path_setting" >&5 -echo "${ECHO_T}$library_path_setting" >&6 +{ echo "$as_me:$LINENO: result: $library_path_setting" >&5 +echo "${ECHO_T}$library_path_setting" >&6; } if test "$library_path_setting" != "ok"; then { { echo "$as_me:$LINENO: error: *** LIBRARY_PATH shouldn't contain the current directory when @@ -1578,8 +2155,8 @@ # - one of the terminals (":" and ";") is the first or last sign # - two terminals occur directly after each other # - the path contains an element with a dot in it -echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5 -echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5 +echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6; } case ${GCC_EXEC_PREFIX} in [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) gcc_exec_prefix_setting="contains current directory" @@ -1588,8 +2165,8 @@ gcc_exec_prefix_setting="ok" ;; esac -echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5 -echo "${ECHO_T}$gcc_exec_prefix_setting" >&6 +{ echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5 +echo "${ECHO_T}$gcc_exec_prefix_setting" >&6; } if test "$gcc_exec_prefix_setting" != "ok"; then { { echo "$as_me:$LINENO: error: *** GCC_EXEC_PREFIX shouldn't contain the current directory when @@ -1626,18 +2203,18 @@ # Specify the local prefix local_prefix= -# Check whether --with-local-prefix or --without-local-prefix was given. +# Check whether --with-local-prefix was given. if test "${with_local_prefix+set}" = set; then - withval="$with_local_prefix" - case "${withval}" in + withval=$with_local_prefix; case "${withval}" in yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5 echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;} { (exit 1); exit 1; }; } ;; no) ;; *) local_prefix=$with_local_prefix ;; esac -fi; +fi + # Default local prefix if it is empty if test x$local_prefix = x; then local_prefix=/usr/local @@ -1649,18 +2226,18 @@ gcc_gxx_include_dir= # Specify the g++ header file directory -# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given. +# Check whether --with-gxx-include-dir was given. if test "${with_gxx_include_dir+set}" = set; then - withval="$with_gxx_include_dir" - case "${withval}" in + withval=$with_gxx_include_dir; case "${withval}" in yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5 echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;} { (exit 1); exit 1; }; } ;; no) ;; *) gcc_gxx_include_dir=$with_gxx_include_dir ;; esac -fi; +fi + if test x${gcc_gxx_include_dir} = x; then if test x${enable_version_specific_runtime_libs} = xyes; then gcc_gxx_include_dir='${libsubdir}/include/c++' @@ -1671,37 +2248,37 @@ fi -# Check whether --with-cpp_install_dir or --without-cpp_install_dir was given. +# Check whether --with-cpp_install_dir was given. if test "${with_cpp_install_dir+set}" = set; then - withval="$with_cpp_install_dir" - if test x$withval = xyes; then + withval=$with_cpp_install_dir; if test x$withval = xyes; then { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5 echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;} { (exit 1); exit 1; }; } elif test x$withval != xno; then cpp_install_dir=$withval fi -fi; +fi + # We would like to our source tree to be readonly. However when releases or # pre-releases are generated, the flex/bison generated files as well as the # various formats of manuals need to be included along with the rest of the # sources. Therefore we have --enable-generated-files-in-srcdir to do # just that. -echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5 -echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6 - # Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given. +{ echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5 +echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6; } + # Check whether --enable-generated-files-in-srcdir was given. if test "${enable_generated_files_in_srcdir+set}" = set; then - enableval="$enable_generated_files_in_srcdir" - generated_files_in_srcdir=$enableval + enableval=$enable_generated_files_in_srcdir; generated_files_in_srcdir=$enableval else generated_files_in_srcdir=no -fi; +fi -echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5 -echo "${ECHO_T}$generated_files_in_srcdir" >&6 +{ echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5 +echo "${ECHO_T}$generated_files_in_srcdir" >&6; } + if test "$generated_files_in_srcdir" = "yes"; then GENINSRC='' else @@ -1715,21 +2292,21 @@ # With GNU ld -# Check whether --with-gnu-ld or --without-gnu-ld was given. +# Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then - withval="$with_gnu_ld" - gnu_ld_flag="$with_gnu_ld" + withval=$with_gnu_ld; gnu_ld_flag="$with_gnu_ld" else gnu_ld_flag=no -fi; +fi + # With pre-defined ld -# Check whether --with-ld or --without-ld was given. +# Check whether --with-ld was given. if test "${with_ld+set}" = set; then - withval="$with_ld" - DEFAULT_LINKER="$with_ld" -fi; + withval=$with_ld; DEFAULT_LINKER="$with_ld" +fi + if test x"${DEFAULT_LINKER+set}" = x"set"; then if test ! -x "$DEFAULT_LINKER"; then { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5 @@ -1745,51 +2322,51 @@ fi -echo "$as_me:$LINENO: checking whether a default linker was specified" >&5 -echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether a default linker was specified" >&5 +echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6; } if test x"${DEFAULT_LINKER+set}" = x"set"; then if test x"$gnu_ld_flag" = x"no"; then - echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5 -echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6 + { echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5 +echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6; } else - echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5 -echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6 + { echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5 +echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6; } fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi # With demangler in GNU ld -# Check whether --with-demangler-in-ld or --without-demangler-in-ld was given. +# Check whether --with-demangler-in-ld was given. if test "${with_demangler_in_ld+set}" = set; then - withval="$with_demangler_in_ld" - demangler_in_ld="$with_demangler_in_ld" + withval=$with_demangler_in_ld; demangler_in_ld="$with_demangler_in_ld" else demangler_in_ld=no -fi; +fi + # ---------------------- # Find default assembler # ---------------------- # With GNU as -# Check whether --with-gnu-as or --without-gnu-as was given. +# Check whether --with-gnu-as was given. if test "${with_gnu_as+set}" = set; then - withval="$with_gnu_as" - gas_flag="$with_gnu_as" + withval=$with_gnu_as; gas_flag="$with_gnu_as" else gas_flag=no -fi; +fi -# Check whether --with-as or --without-as was given. + +# Check whether --with-as was given. if test "${with_as+set}" = set; then - withval="$with_as" - DEFAULT_ASSEMBLER="$with_as" -fi; + withval=$with_as; DEFAULT_ASSEMBLER="$with_as" +fi + if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then if test ! -x "$DEFAULT_ASSEMBLER"; then { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5 @@ -1805,19 +2382,19 @@ fi -echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5 -echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5 +echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6; } if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then if test x"$gas_flag" = x"no"; then - echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5 -echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6 + { echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5 +echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6; } else - echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5 -echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6 + { echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5 +echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6; } fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi # --------------- @@ -1842,8 +2419,8 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1856,32 +2433,34 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1894,36 +2473,51 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1936,74 +2530,34 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 + fi -done -done - fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi - -fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2017,7 +2571,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -2028,6 +2582,7 @@ fi done done +IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -2045,22 +2600,23 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2073,36 +2629,38 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2115,29 +2673,45 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$ac_ct_CC" && break done - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi fi fi @@ -2150,21 +2724,35 @@ { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 +echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } @@ -2189,46 +2777,70 @@ # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 - (eval $ac_link_default) 2>&5 +# +# List of possible output files, starting from the most likely. +# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +# only as a last resort. b.out is created by i960 compilers. +ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +# +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - # Find the output, starting from the most likely. This scheme is -# not robust to junk in `.', hence go to wildcards (a.*) only as a last -# resort. - -# Be careful to initialize this variable, since it used to be cached. -# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. -ac_cv_exeext= -# b.out is created by i960 compilers. -for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; - conftest.$ac_ext ) - # This is the source file. - ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool, - # but it would be cool to find out if it's true. Does anybody - # maintain Libtool? --akim. - export ac_cv_exeext + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. break;; * ) break;; esac done +test "$ac_cv_exeext" = no && ac_cv_exeext= + else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -2241,19 +2853,23 @@ fi ac_exeext=$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6 +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2272,22 +2888,27 @@ fi fi fi -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6 +{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6; } -echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then @@ -2298,9 +2919,8 @@ for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext break;; * ) break;; esac @@ -2314,14 +2934,14 @@ fi rm -f conftest$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2341,14 +2961,20 @@ } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac @@ -2366,12 +2992,12 @@ rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2394,24 +3020,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2420,24 +3058,28 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_compiler_gnu=no + ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2453,24 +3095,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2479,12 +3133,131 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_prog_cc_g=no + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -2500,12 +3273,12 @@ CFLAGS= fi fi -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_prog_cc_stdc=no + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2539,12 +3312,17 @@ /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 is added to get + as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ + that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -2559,205 +3337,74 @@ return 0; } _ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break + ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break done -rm -f conftest.$ac_ext conftest.$ac_objext +rm -f conftest.$ac_ext CC=$ac_save_CC fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF -#ifndef __cplusplus - choke me -#endif -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -#include -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -continue -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -2765,15 +3412,15 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test "x$CC" != xcc; then - echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 -echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 +echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6; } else - echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 -echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 +echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6; } fi set dummy $CC; ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then +if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -2794,14 +3441,23 @@ # Make sure it works both with $CC and with simple cc. # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. -ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5' -if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 +ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' +rm -f conftest2.* +if { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + test -f conftest2.$ac_objext && { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; @@ -2810,19 +3466,32 @@ if test "x$CC" != xcc; then # Test first that cc exists at all. if { ac_try='cc -c conftest.$ac_ext >&5' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5' - if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' + rm -f conftest2.* + if { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + test -f conftest2.$ac_objext && { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; @@ -2838,15 +3507,15 @@ else eval ac_cv_prog_cc_${ac_cc}_c_o=no fi -rm -f conftest* +rm -f core conftest* fi -if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } cat >>confdefs.h <<\_ACEOF #define NO_MINUS_C_MINUS_O 1 @@ -2888,8 +3557,8 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2923,8 +3592,13 @@ #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -2949,9 +3623,10 @@ # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2961,8 +3636,13 @@ /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -2989,6 +3669,7 @@ ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -3006,8 +3687,8 @@ else ac_cv_prog_CPP=$CPP fi -echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6 +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -3030,8 +3711,13 @@ #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -3056,9 +3742,10 @@ # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3068,8 +3755,13 @@ /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -3096,6 +3788,7 @@ ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -3118,8 +3811,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking for inline" >&5 -echo $ECHO_N "checking for inline... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6; } if test "${ac_cv_c_inline+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3139,39 +3832,54 @@ _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_c_inline=$ac_kw; break + ac_cv_c_inline=$ac_kw else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break done fi -echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -echo "${ECHO_T}$ac_cv_c_inline" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in @@ -3190,8 +3898,8 @@ esac -echo "$as_me:$LINENO: checking for long long int" >&5 -echo $ECHO_N "checking for long long int... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for long long int" >&5 +echo $ECHO_N "checking for long long int... $ECHO_C" >&6; } if test "${ac_cv_c_long_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3211,24 +3919,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3237,12 +3957,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_c_long_long=no + ac_cv_c_long_long=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_c_long_long" >&5 -echo "${ECHO_T}$ac_cv_c_long_long" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_long_long" >&5 +echo "${ECHO_T}$ac_cv_c_long_long" >&6; } if test $ac_cv_c_long_long = yes; then cat >>confdefs.h <<\_ACEOF @@ -3250,8 +3971,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for __int64" >&5 -echo $ECHO_N "checking for __int64... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for __int64" >&5 +echo $ECHO_N "checking for __int64... $ECHO_C" >&6; } if test "${ac_cv_c___int64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3271,24 +3992,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3297,12 +4030,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_c___int64=no + ac_cv_c___int64=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_c___int64" >&5 -echo "${ECHO_T}$ac_cv_c___int64" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c___int64" >&5 +echo "${ECHO_T}$ac_cv_c___int64" >&6; } if test $ac_cv_c___int64 = yes; then cat >>confdefs.h <<\_ACEOF @@ -3314,23 +4048,170 @@ # sizeof(char) is 1 by definition. -echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6 -if test "${ac_cv_prog_egrep+set}" = set; then +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_GREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_executable_p "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_GREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + fi -echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 -echo "${ECHO_T}$ac_cv_prog_egrep" >&6 - EGREP=$ac_cv_prog_egrep +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi -echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +else + ac_cv_path_GREP=$GREP +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_EGREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_executable_p "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_EGREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_EGREP=$EGREP +fi + + + fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3354,24 +4235,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3380,10 +4273,11 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_stdc=no + ac_cv_header_stdc=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF @@ -3438,6 +4332,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -3457,18 +4352,27 @@ for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); + return 2; + return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3481,12 +4385,14 @@ ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -3509,9 +4415,9 @@ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -3525,24 +4431,36 @@ #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3551,12 +4469,14 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Header=no" + eval "$as_ac_Header=no" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 @@ -3567,8 +4487,8 @@ done -echo "$as_me:$LINENO: checking for void *" >&5 -echo $ECHO_N "checking for void *... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for void *" >&5 +echo $ECHO_N "checking for void *... $ECHO_C" >&6; } if test "${ac_cv_type_void_p+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3579,36 +4499,49 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef void * ac__type_new_; int main () { -if ((void * *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (void *)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3617,20 +4550,21 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_void_p=no + ac_cv_type_void_p=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5 -echo "${ECHO_T}$ac_cv_type_void_p" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5 +echo "${ECHO_T}$ac_cv_type_void_p" >&6; } -echo "$as_me:$LINENO: checking size of void *" >&5 -echo $ECHO_N "checking size of void *... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking size of void *" >&5 +echo $ECHO_N "checking size of void *... $ECHO_C" >&6; } if test "${ac_cv_sizeof_void_p+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_void_p" = yes; then - # The cast to unsigned long works around a bug in the HP C Compiler + # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. @@ -3643,10 +4577,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef void * ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -3654,24 +4589,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3684,10 +4631,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef void * ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -3695,24 +4643,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3721,30 +4681,32 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef void * ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -3752,24 +4714,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3782,10 +4756,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef void * ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -3793,24 +4768,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3819,24 +4806,27 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo= ac_hi= + ac_lo= ac_hi= fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` @@ -3847,10 +4837,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef void * ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -3858,24 +4849,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3884,26 +4887,20 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr '(' $ac_mid ')' + 1` + ac_lo=`expr '(' $ac_mid ')' + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_void_p=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77 +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (void *), 77 +echo "$as_me: error: cannot compute sizeof (void *) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } ;; + { (exit 77); exit 77; }; } ;; esac else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3911,8 +4908,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -long longval () { return (long) (sizeof (void *)); } -unsigned long ulongval () { return (long) (sizeof (void *)); } + typedef void * ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include #include int @@ -3921,35 +4919,44 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) - exit (1); - if (((long) (sizeof (void *))) < 0) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { - long i = longval (); - if (i != ((long) (sizeof (void *)))) - exit (1); + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%ld\n", i); } else { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (void *)))) - exit (1); + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%lu\n", i); } - exit (ferror (f) || fclose (f) != 0); + return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3960,29 +4967,28 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77 +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (void *), 77 +echo "$as_me: error: cannot compute sizeof (void *) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 77); exit 77; }; } fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -fi rm -f conftest.val else ac_cv_sizeof_void_p=0 fi fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 -echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 +echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_VOID_P $ac_cv_sizeof_void_p _ACEOF -echo "$as_me:$LINENO: checking for short" >&5 -echo $ECHO_N "checking for short... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for short" >&5 +echo $ECHO_N "checking for short... $ECHO_C" >&6; } if test "${ac_cv_type_short+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3993,36 +4999,49 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef short ac__type_new_; int main () { -if ((short *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (short)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4031,20 +5050,21 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_short=no + ac_cv_type_short=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5 -echo "${ECHO_T}$ac_cv_type_short" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5 +echo "${ECHO_T}$ac_cv_type_short" >&6; } -echo "$as_me:$LINENO: checking size of short" >&5 -echo $ECHO_N "checking size of short... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking size of short" >&5 +echo $ECHO_N "checking size of short... $ECHO_C" >&6; } if test "${ac_cv_sizeof_short+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_short" = yes; then - # The cast to unsigned long works around a bug in the HP C Compiler + # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. @@ -4057,10 +5077,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef short ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -4068,24 +5089,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4098,10 +5131,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef short ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -4109,24 +5143,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4135,30 +5181,32 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef short ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -4166,24 +5214,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4196,10 +5256,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef short ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -4207,24 +5268,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4233,24 +5306,27 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo= ac_hi= + ac_lo= ac_hi= fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` @@ -4261,10 +5337,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef short ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -4272,24 +5349,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4298,26 +5387,20 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr '(' $ac_mid ')' + 1` + ac_lo=`expr '(' $ac_mid ')' + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_short=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (short), 77 +echo "$as_me: error: cannot compute sizeof (short) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } ;; + { (exit 77); exit 77; }; } ;; esac else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4325,8 +5408,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -long longval () { return (long) (sizeof (short)); } -unsigned long ulongval () { return (long) (sizeof (short)); } + typedef short ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include #include int @@ -4335,35 +5419,44 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) - exit (1); - if (((long) (sizeof (short))) < 0) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { - long i = longval (); - if (i != ((long) (sizeof (short)))) - exit (1); + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%ld\n", i); } else { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (short)))) - exit (1); + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%lu\n", i); } - exit (ferror (f) || fclose (f) != 0); + return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4374,29 +5467,28 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (short), 77 +echo "$as_me: error: cannot compute sizeof (short) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 77); exit 77; }; } fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -fi rm -f conftest.val else ac_cv_sizeof_short=0 fi fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 -echo "${ECHO_T}$ac_cv_sizeof_short" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 +echo "${ECHO_T}$ac_cv_sizeof_short" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_SHORT $ac_cv_sizeof_short _ACEOF -echo "$as_me:$LINENO: checking for int" >&5 -echo $ECHO_N "checking for int... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for int" >&5 +echo $ECHO_N "checking for int... $ECHO_C" >&6; } if test "${ac_cv_type_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4407,36 +5499,49 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef int ac__type_new_; int main () { -if ((int *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (int)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4445,20 +5550,21 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_int=no + ac_cv_type_int=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 -echo "${ECHO_T}$ac_cv_type_int" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 +echo "${ECHO_T}$ac_cv_type_int" >&6; } -echo "$as_me:$LINENO: checking size of int" >&5 -echo $ECHO_N "checking size of int... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking size of int" >&5 +echo $ECHO_N "checking size of int... $ECHO_C" >&6; } if test "${ac_cv_sizeof_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_int" = yes; then - # The cast to unsigned long works around a bug in the HP C Compiler + # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. @@ -4471,10 +5577,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef int ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -4482,24 +5589,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4512,10 +5631,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef int ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -4523,24 +5643,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4549,30 +5681,32 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef int ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -4580,24 +5714,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4610,10 +5756,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef int ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -4621,24 +5768,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4647,24 +5806,27 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo= ac_hi= + ac_lo= ac_hi= fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` @@ -4675,10 +5837,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef int ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -4686,24 +5849,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4712,26 +5887,20 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr '(' $ac_mid ')' + 1` + ac_lo=`expr '(' $ac_mid ')' + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_int=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (int), 77 +echo "$as_me: error: cannot compute sizeof (int) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } ;; + { (exit 77); exit 77; }; } ;; esac else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4739,8 +5908,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -long longval () { return (long) (sizeof (int)); } -unsigned long ulongval () { return (long) (sizeof (int)); } + typedef int ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include #include int @@ -4749,35 +5919,44 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) - exit (1); - if (((long) (sizeof (int))) < 0) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { - long i = longval (); - if (i != ((long) (sizeof (int)))) - exit (1); + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%ld\n", i); } else { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (int)))) - exit (1); + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%lu\n", i); } - exit (ferror (f) || fclose (f) != 0); + return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4788,29 +5967,28 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (int), 77 +echo "$as_me: error: cannot compute sizeof (int) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 77); exit 77; }; } fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -fi rm -f conftest.val else ac_cv_sizeof_int=0 fi fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 -echo "${ECHO_T}$ac_cv_sizeof_int" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 +echo "${ECHO_T}$ac_cv_sizeof_int" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_INT $ac_cv_sizeof_int _ACEOF -echo "$as_me:$LINENO: checking for long" >&5 -echo $ECHO_N "checking for long... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for long" >&5 +echo $ECHO_N "checking for long... $ECHO_C" >&6; } if test "${ac_cv_type_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4821,36 +5999,49 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef long ac__type_new_; int main () { -if ((long *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (long)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4859,20 +6050,21 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_long=no + ac_cv_type_long=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 -echo "${ECHO_T}$ac_cv_type_long" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 +echo "${ECHO_T}$ac_cv_type_long" >&6; } -echo "$as_me:$LINENO: checking size of long" >&5 -echo $ECHO_N "checking size of long... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking size of long" >&5 +echo $ECHO_N "checking size of long... $ECHO_C" >&6; } if test "${ac_cv_sizeof_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_long" = yes; then - # The cast to unsigned long works around a bug in the HP C Compiler + # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. @@ -4885,10 +6077,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -4896,24 +6089,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4926,10 +6131,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -4937,24 +6143,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4963,30 +6181,32 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -4994,24 +6214,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5024,10 +6256,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -5035,24 +6268,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5061,24 +6306,27 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo= ac_hi= + ac_lo= ac_hi= fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` @@ -5089,10 +6337,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -5100,24 +6349,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5126,26 +6387,20 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr '(' $ac_mid ')' + 1` + ac_lo=`expr '(' $ac_mid ')' + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_long=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long), 77 +echo "$as_me: error: cannot compute sizeof (long) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } ;; + { (exit 77); exit 77; }; } ;; esac else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5153,8 +6408,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -long longval () { return (long) (sizeof (long)); } -unsigned long ulongval () { return (long) (sizeof (long)); } + typedef long ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include #include int @@ -5163,35 +6419,44 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) - exit (1); - if (((long) (sizeof (long))) < 0) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { - long i = longval (); - if (i != ((long) (sizeof (long)))) - exit (1); + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%ld\n", i); } else { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (long)))) - exit (1); + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%lu\n", i); } - exit (ferror (f) || fclose (f) != 0); + return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5202,30 +6467,29 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long), 77 +echo "$as_me: error: cannot compute sizeof (long) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 77); exit 77; }; } fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -fi rm -f conftest.val else ac_cv_sizeof_long=0 fi fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 -echo "${ECHO_T}$ac_cv_sizeof_long" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 +echo "${ECHO_T}$ac_cv_sizeof_long" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG $ac_cv_sizeof_long _ACEOF if test $ac_cv_c_long_long = yes; then - echo "$as_me:$LINENO: checking for long long" >&5 -echo $ECHO_N "checking for long long... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for long long" >&5 +echo $ECHO_N "checking for long long... $ECHO_C" >&6; } if test "${ac_cv_type_long_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5236,36 +6500,49 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef long long ac__type_new_; int main () { -if ((long long *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (long long)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5274,20 +6551,21 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_long_long=no + ac_cv_type_long_long=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 -echo "${ECHO_T}$ac_cv_type_long_long" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 +echo "${ECHO_T}$ac_cv_type_long_long" >&6; } -echo "$as_me:$LINENO: checking size of long long" >&5 -echo $ECHO_N "checking size of long long... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking size of long long" >&5 +echo $ECHO_N "checking size of long long... $ECHO_C" >&6; } if test "${ac_cv_sizeof_long_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_long_long" = yes; then - # The cast to unsigned long works around a bug in the HP C Compiler + # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. @@ -5300,10 +6578,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long long ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -5311,24 +6590,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5341,10 +6632,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long long ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -5352,24 +6644,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5378,30 +6682,32 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long long ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -5409,24 +6715,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5439,10 +6757,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long long ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -5450,24 +6769,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5476,24 +6807,27 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo= ac_hi= + ac_lo= ac_hi= fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` @@ -5504,10 +6838,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long long ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -5515,24 +6850,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5541,26 +6888,20 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr '(' $ac_mid ')' + 1` + ac_lo=`expr '(' $ac_mid ')' + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_long_long=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long long), 77 +echo "$as_me: error: cannot compute sizeof (long long) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } ;; + { (exit 77); exit 77; }; } ;; esac else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5568,8 +6909,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -long longval () { return (long) (sizeof (long long)); } -unsigned long ulongval () { return (long) (sizeof (long long)); } + typedef long long ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include #include int @@ -5578,35 +6920,44 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) - exit (1); - if (((long) (sizeof (long long))) < 0) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { - long i = longval (); - if (i != ((long) (sizeof (long long)))) - exit (1); + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%ld\n", i); } else { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (long long)))) - exit (1); + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%lu\n", i); } - exit (ferror (f) || fclose (f) != 0); + return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5617,22 +6968,21 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long long), 77 +echo "$as_me: error: cannot compute sizeof (long long) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 77); exit 77; }; } fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -fi rm -f conftest.val else ac_cv_sizeof_long_long=0 fi fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 -echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 +echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long _ACEOF @@ -5640,8 +6990,8 @@ fi if test $ac_cv_c___int64 = yes; then - echo "$as_me:$LINENO: checking for __int64" >&5 -echo $ECHO_N "checking for __int64... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for __int64" >&5 +echo $ECHO_N "checking for __int64... $ECHO_C" >&6; } if test "${ac_cv_type___int64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5652,36 +7002,49 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef __int64 ac__type_new_; int main () { -if ((__int64 *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (__int64)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5690,20 +7053,21 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type___int64=no + ac_cv_type___int64=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5 -echo "${ECHO_T}$ac_cv_type___int64" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5 +echo "${ECHO_T}$ac_cv_type___int64" >&6; } -echo "$as_me:$LINENO: checking size of __int64" >&5 -echo $ECHO_N "checking size of __int64... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking size of __int64" >&5 +echo $ECHO_N "checking size of __int64... $ECHO_C" >&6; } if test "${ac_cv_sizeof___int64+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type___int64" = yes; then - # The cast to unsigned long works around a bug in the HP C Compiler + # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. @@ -5716,10 +7080,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef __int64 ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -5727,24 +7092,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5757,10 +7134,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef __int64 ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -5768,24 +7146,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5794,30 +7184,32 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef __int64 ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (__int64))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -5825,24 +7217,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5855,10 +7259,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef __int64 ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -5866,24 +7271,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5892,24 +7309,27 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo= ac_hi= + ac_lo= ac_hi= fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` @@ -5920,10 +7340,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef __int64 ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -5931,24 +7352,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5957,26 +7390,20 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr '(' $ac_mid ')' + 1` + ac_lo=`expr '(' $ac_mid ')' + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof___int64=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77 +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (__int64), 77 +echo "$as_me: error: cannot compute sizeof (__int64) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } ;; + { (exit 77); exit 77; }; } ;; esac else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5984,8 +7411,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -long longval () { return (long) (sizeof (__int64)); } -unsigned long ulongval () { return (long) (sizeof (__int64)); } + typedef __int64 ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include #include int @@ -5994,35 +7422,44 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) - exit (1); - if (((long) (sizeof (__int64))) < 0) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { - long i = longval (); - if (i != ((long) (sizeof (__int64)))) - exit (1); + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%ld\n", i); } else { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (__int64)))) - exit (1); + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%lu\n", i); } - exit (ferror (f) || fclose (f) != 0); + return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -6033,22 +7470,21 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77 +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (__int64), 77 +echo "$as_me: error: cannot compute sizeof (__int64) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 77); exit 77; }; } fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -fi rm -f conftest.val else ac_cv_sizeof___int64=0 fi fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5 -echo "${ECHO_T}$ac_cv_sizeof___int64" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5 +echo "${ECHO_T}$ac_cv_sizeof___int64" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF___INT64 $ac_cv_sizeof___int64 _ACEOF @@ -6066,8 +7502,8 @@ # * variadic macros # So, we only use -pedantic if we can disable those warnings. -echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-long-long" >&5 -echo $ECHO_N "checking whether ${CC} accepts -Wno-long-long... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-long-long" >&5 +echo $ECHO_N "checking whether ${CC} accepts -Wno-long-long... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_w_no_long_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6082,24 +7518,36 @@ _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -6108,17 +7556,18 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_prog_cc_w_no_long_long=no + ac_cv_prog_cc_w_no_long_long=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_long_long" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_w_no_long_long" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_long_long" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_w_no_long_long" >&6; } -echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-variadic-macros" >&5 -echo $ECHO_N "checking whether ${CC} accepts -Wno-variadic-macros... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-variadic-macros" >&5 +echo $ECHO_N "checking whether ${CC} accepts -Wno-variadic-macros... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_w_no_variadic_macros+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6133,24 +7582,36 @@ _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -6159,14 +7620,15 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_prog_cc_w_no_variadic_macros=no + ac_cv_prog_cc_w_no_variadic_macros=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_variadic_macros" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_w_no_variadic_macros" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_variadic_macros" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_w_no_variadic_macros" >&6; } strict1_warn= if test $ac_cv_prog_cc_w_no_long_long = yes \ @@ -6176,8 +7638,8 @@ # Add -Wold-style-definition if it's accepted -echo "$as_me:$LINENO: checking whether ${CC} accepts -Wold-style-definition" >&5 -echo $ECHO_N "checking whether ${CC} accepts -Wold-style-definition... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether ${CC} accepts -Wold-style-definition" >&5 +echo $ECHO_N "checking whether ${CC} accepts -Wold-style-definition... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_w_old_style_definition+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6192,24 +7654,36 @@ _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -6218,26 +7692,27 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_prog_cc_w_old_style_definition=no + ac_cv_prog_cc_w_old_style_definition=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_old_style_definition" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_w_old_style_definition" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_old_style_definition" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_w_old_style_definition" >&6; } if test $ac_cv_prog_cc_w_old_style_definition = yes ; then strict1_warn="${strict1_warn} -Wold-style-definition" fi # Enable -Werror, period. -# Check whether --enable-werror_always or --disable-werror_always was given. +# Check whether --enable-werror_always was given. if test "${enable_werror_always+set}" = set; then - enableval="$enable_werror_always" - + enableval=$enable_werror_always; else enable_werror_always=no -fi; +fi + if test x${enable_werror_always} = xyes ; then strict1_warn="${strict1_warn} -Werror" WERROR=-Werror @@ -6253,10 +7728,9 @@ # Enable -Werror in bootstrap stage2 and later. -# Check whether --enable-werror or --disable-werror was given. +# Check whether --enable-werror was given. if test "${enable_werror+set}" = set; then - enableval="$enable_werror" - + enableval=$enable_werror; else if test x$is_release = x ; then # Default to "yes" on development branches. @@ -6265,17 +7739,17 @@ # Default to "no" on release branches. enable_werror=no fi -fi; +fi + if test x$enable_werror = xyes ; then WERROR=-Werror fi # Enable expensive internal checks -# Check whether --enable-checking or --disable-checking was given. +# Check whether --enable-checking was given. if test "${enable_checking+set}" = set; then - enableval="$enable_checking" - ac_checking_flags="${enableval}" + enableval=$enable_checking; ac_checking_flags="${enableval}" else # Determine the default checks. @@ -6284,7 +7758,8 @@ else ac_checking_flags=release fi -fi; +fi + ac_assert_checking=1 ac_checking= ac_tree_checking= @@ -6397,17 +7872,17 @@ valgrind_command= if test "${ac_cv_header_valgrind_h+set}" = set; then - echo "$as_me:$LINENO: checking for valgrind.h" >&5 -echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for valgrind.h" >&5 +echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6; } if test "${ac_cv_header_valgrind_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5 -echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5 +echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking valgrind.h usability" >&5 -echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking valgrind.h usability" >&5 +echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6418,24 +7893,36 @@ #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -6444,15 +7931,16 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + # Is the header present? -echo "$as_me:$LINENO: checking valgrind.h presence" >&5 -echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking valgrind.h presence" >&5 +echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6461,8 +7949,13 @@ /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -6486,9 +7979,10 @@ ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -6512,25 +8006,18 @@ echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: valgrind.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for valgrind.h" >&5 -echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for valgrind.h" >&5 +echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6; } if test "${ac_cv_header_valgrind_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_valgrind_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5 -echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5 +echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6; } fi if test $ac_cv_header_valgrind_h = yes; then @@ -6544,8 +8031,8 @@ if test x$ac_checking_valgrind != x ; then # It is certainly possible that there's valgrind but no valgrind.h. # GCC relies on making annotations so we must have both. - echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in " >&5 -echo $ECHO_N "checking for VALGRIND_DISCARD in ... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in " >&5 +echo $ECHO_N "checking for VALGRIND_DISCARD in ... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6557,8 +8044,13 @@ #error VALGRIND_DISCARD not defined #endif _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -6582,11 +8074,12 @@ gcc_cv_header_valgrind_memcheck_h=no fi + rm -f conftest.err conftest.$ac_ext - echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5 -echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6 - echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in " >&5 -echo $ECHO_N "checking for VALGRIND_DISCARD in ... $ECHO_C" >&6 + { echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5 +echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6; } + { echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in " >&5 +echo $ECHO_N "checking for VALGRIND_DISCARD in ... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6598,8 +8091,13 @@ #error VALGRIND_DISCARD not defined #endif _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -6623,9 +8121,10 @@ gcc_cv_header_memcheck_h=no fi + rm -f conftest.err conftest.$ac_ext - echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5 -echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6 + { echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5 +echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6; } # Prepare PATH_SEPARATOR. # The user is always right. @@ -6657,8 +8156,8 @@ # Extract the first word of "valgrind", so it can be a program name with args. set dummy valgrind; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_valgrind_path+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6686,11 +8185,11 @@ fi valgrind_path="$ac_cv_path_valgrind_path" if test -n "$valgrind_path"; then - echo "$as_me:$LINENO: result: $valgrind_path" >&5 -echo "${ECHO_T}$valgrind_path" >&6 + { echo "$as_me:$LINENO: result: $valgrind_path" >&5 +echo "${ECHO_T}$valgrind_path" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi if test "x$valgrind_path" = "x" \ @@ -6726,14 +8225,14 @@ -# Check whether --enable-mapped-location or --disable-mapped-location was given. +# Check whether --enable-mapped-location was given. if test "${enable_mapped_location+set}" = set; then - enableval="$enable_mapped_location" - + enableval=$enable_mapped_location; else enable_mapped_location=no -fi; +fi + if test "$enable_mapped_location" = yes ; then cat >>confdefs.h <<\_ACEOF @@ -6743,10 +8242,9 @@ fi # Enable code coverage collection -# Check whether --enable-coverage or --disable-coverage was given. +# Check whether --enable-coverage was given. if test "${enable_coverage+set}" = set; then - enableval="$enable_coverage" - case "${enableval}" in + enableval=$enable_coverage; case "${enableval}" in yes|noopt) coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0" ;; @@ -6765,16 +8263,17 @@ esac else coverage_flags="" -fi; +fi -# Check whether --enable-gather-detailed-mem-stats or --disable-gather-detailed-mem-stats was given. + +# Check whether --enable-gather-detailed-mem-stats was given. if test "${enable_gather_detailed_mem_stats+set}" = set; then - enableval="$enable_gather_detailed_mem_stats" - + enableval=$enable_gather_detailed_mem_stats; else enable_gather_detailed_mem_stats=no -fi; +fi + if test x$enable_gather_detailed_mem_stats = xyes ; then cat >>confdefs.h <<\_ACEOF @@ -6789,67 +8288,66 @@ # With stabs -# Check whether --with-stabs or --without-stabs was given. +# Check whether --with-stabs was given. if test "${with_stabs+set}" = set; then - withval="$with_stabs" - stabs="$with_stabs" + withval=$with_stabs; stabs="$with_stabs" else stabs=no -fi; +fi + # Determine whether or not multilibs are enabled. -# Check whether --enable-multilib or --disable-multilib was given. +# Check whether --enable-multilib was given. if test "${enable_multilib+set}" = set; then - enableval="$enable_multilib" - + enableval=$enable_multilib; else enable_multilib=yes -fi; +fi + # Enable __cxa_atexit for C++. -# Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given. +# Check whether --enable-__cxa_atexit was given. if test "${enable___cxa_atexit+set}" = set; then - enableval="$enable___cxa_atexit" + enableval=$enable___cxa_atexit; +fi -fi; # Enable threads # Pass with no value to take the default # Pass with a value to specify a thread package -# Check whether --enable-threads or --disable-threads was given. +# Check whether --enable-threads was given. if test "${enable_threads+set}" = set; then - enableval="$enable_threads" - + enableval=$enable_threads; else enable_threads='' -fi; +fi -# Check whether --enable-objc-gc or --disable-objc-gc was given. + +# Check whether --enable-objc-gc was given. if test "${enable_objc_gc+set}" = set; then - enableval="$enable_objc_gc" - if test x$enable_objc_gc = xno; then + enableval=$enable_objc_gc; if test x$enable_objc_gc = xno; then objc_boehm_gc='' else objc_boehm_gc=1 fi else objc_boehm_gc='' -fi; +fi -# Check whether --with-dwarf2 or --without-dwarf2 was given. + +# Check whether --with-dwarf2 was given. if test "${with_dwarf2+set}" = set; then - withval="$with_dwarf2" - dwarf2="$with_dwarf2" + withval=$with_dwarf2; dwarf2="$with_dwarf2" else dwarf2=no -fi; +fi -# Check whether --enable-shared or --disable-shared was given. + +# Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - + enableval=$enable_shared; case $enable_shared in yes | no) ;; *) @@ -6866,14 +8364,14 @@ else enable_shared=yes -fi; +fi -# Check whether --with-sysroot or --without-sysroot was given. + +# Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then - withval="$with_sysroot" - + withval=$with_sysroot; case ${with_sysroot} in yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;; *) TARGET_SYSTEM_ROOT=$with_sysroot ;; @@ -6905,31 +8403,32 @@ TARGET_SYSTEM_ROOT_DEFINE= CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include' -fi; +fi + # Build with intermodule optimisations -# Check whether --enable-intermodule or --disable-intermodule was given. +# Check whether --enable-intermodule was given. if test "${enable_intermodule+set}" = set; then - enableval="$enable_intermodule" - case ${enable_intermodule} in + enableval=$enable_intermodule; case ${enable_intermodule} in yes) onestep="-onestep";; *) onestep="";; esac else onestep="" -fi; +fi + # APPLE LOCAL begin LLVM # See if dsymutil has been installed and is modern enough # that we can use DWARF. # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_DSYMUTIL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6942,35 +8441,37 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="dsymutil" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then - echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 -echo "${ECHO_T}$DSYMUTIL" >&6 + { echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 +echo "${ECHO_T}$DSYMUTIL" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + if test -n "$DSYMUTIL"; then # Found it, now check the version. - echo "$as_me:$LINENO: checking for modern dsymutil" >&5 -echo $ECHO_N "checking for modern dsymutil... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for modern dsymutil" >&5 +echo $ECHO_N "checking for modern dsymutil... $ECHO_C" >&6; } if test "${gcc_cv_prog_dsymutil_modern+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_prog_version=`$DSYMUTIL --version 2>&1 | sed -n 's/^.*.*dwarfutils.\([0-9]*\).*$/\1/p'` - echo "configure:6973: version of dsymutil is $ac_prog_version" >&5 + echo "configure:8474: version of dsymutil is $ac_prog_version" >&5 case $ac_prog_version in '') gcc_cv_prog_dsymutil_modern=no;; 2[5-9]*) @@ -6979,15 +8480,15 @@ esac fi -echo "$as_me:$LINENO: result: $gcc_cv_prog_dsymutil_modern" >&5 -echo "${ECHO_T}$gcc_cv_prog_dsymutil_modern" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_prog_dsymutil_modern" >&5 +echo "${ECHO_T}$gcc_cv_prog_dsymutil_modern" >&6; } else gcc_cv_prog_dsymutil_modern=no fi if test $gcc_cv_prog_dsymutil_modern = no; then - echo "$as_me:$LINENO: result: dsymutil is not available" >&5 -echo "${ECHO_T}dsymutil is not available" >&6 + { echo "$as_me:$LINENO: result: dsymutil is not available" >&5 +echo "${ECHO_T}dsymutil is not available" >&6; } else cat >>confdefs.h <<\_ACEOF @@ -6998,8 +8499,8 @@ # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_DSYMUTIL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7012,35 +8513,37 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="dsymutil" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then - echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 -echo "${ECHO_T}$DSYMUTIL" >&6 + { echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 +echo "${ECHO_T}$DSYMUTIL" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + if test -n "$DSYMUTIL"; then # Found it, now check the version. - echo "$as_me:$LINENO: checking for modern dsymutil" >&5 -echo $ECHO_N "checking for modern dsymutil... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for modern dsymutil" >&5 +echo $ECHO_N "checking for modern dsymutil... $ECHO_C" >&6; } if test "${gcc_cv_prog_dsymutil_modern+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_prog_version=`$DSYMUTIL --version 2>&1 | sed -n 's/^.*.*dwarfutils.\([0-9]*\).*$/\1/p'` - echo "configure:7043: version of dsymutil is $ac_prog_version" >&5 + echo "configure:8546: version of dsymutil is $ac_prog_version" >&5 case $ac_prog_version in '') gcc_cv_prog_dsymutil_modern=no;; [3-9][0-9]*) @@ -7049,15 +8552,15 @@ esac fi -echo "$as_me:$LINENO: result: $gcc_cv_prog_dsymutil_modern" >&5 -echo "${ECHO_T}$gcc_cv_prog_dsymutil_modern" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_prog_dsymutil_modern" >&5 +echo "${ECHO_T}$gcc_cv_prog_dsymutil_modern" >&6; } else gcc_cv_prog_dsymutil_modern=no fi if test $gcc_cv_prog_dsymutil_modern = no; then - echo "$as_me:$LINENO: result: dsymutil is not available" >&5 -echo "${ECHO_T}dsymutil is not available" >&6 + { echo "$as_me:$LINENO: result: dsymutil is not available" >&5 +echo "${ECHO_T}dsymutil is not available" >&6; } else cat >>confdefs.h <<\_ACEOF @@ -7066,10 +8569,9 @@ fi -# Check whether --enable-llvm or --disable-llvm was given. +# Check whether --enable-llvm was given. if test "${enable_llvm+set}" = set; then - enableval="$enable_llvm" - case "${enableval}" in + enableval=$enable_llvm; case "${enableval}" in yes) { { echo "$as_me:$LINENO: error: You must specify a path to your LLVM tree with --enable-llvm=DIR" >&5 echo "$as_me: error: You must specify a path to your LLVM tree with --enable-llvm=DIR" >&2;} { (exit 1); exit 1; }; } @@ -7089,10 +8591,28 @@ if test -x "$LLVMBASEPATH/Release/bin/llc$EXEEXT"; then echo Found Release LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Release" elif test -x "$LLVMBASEPATH/Debug/bin/llc$EXEEXT"; then echo Found Debug LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Debug" elif test -x "$LLVMBASEPATH/Release-Asserts/bin/llc$EXEEXT"; then echo Found Release-Asserts LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Release-Asserts" + elif test -x "$LLVMBASEPATH/Debug-Asserts/bin/llc$EXEEXT"; then + echo Found Debug-Asserts LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Debug-Asserts" + elif test -x "$LLVMBASEPATH/Release+Checks/bin/llc$EXEEXT"; then + echo Found Release+Checks LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Release+Checks" + elif test -x "$LLVMBASEPATH/Debug+Checks/bin/llc$EXEEXT"; then + echo Found Debug+Checks LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Debug+Checks" + elif test -x "$LLVMBASEPATH/Release-Asserts+Checks/bin/llc$EXEEXT"; then + echo Found Release-Asserts+Checks LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Release-Asserts+Checks" + elif test -x "$LLVMBASEPATH/Debug-Asserts+Checks/bin/llc$EXEEXT"; then + echo Found Debug-Asserts+Checks LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Debug-Asserts+Checks" else { { echo "$as_me:$LINENO: error: You must specify valid path to your LLVM tree with --enable-llvm=DIR" >&5 echo "$as_me: error: You must specify valid path to your LLVM tree with --enable-llvm=DIR" >&2;} @@ -7101,16 +8621,20 @@ else LLVMBASEPATH="" -fi; + LLVMBUILDMODE="" +fi + + +# Cray [dag] send llvm build mode to gcc Makefiles + # APPLE LOCAL end LLVM # Sanity check enable_languages in case someone does not run the toplevel # configure # script. -# Check whether --enable-languages or --disable-languages was given. +# Check whether --enable-languages was given. if test "${enable_languages+set}" = set; then - enableval="$enable_languages" - case ,${enable_languages}, in + enableval=$enable_languages; case ,${enable_languages}, in ,,|,yes,) # go safe -- we cannot be much sure without the toplevel # configure's @@ -7130,8 +8654,9 @@ esac else enable_languages=c -fi; +fi + subdirs= for lang in ${srcdir}/*/config-lang.in do @@ -7159,32 +8684,33 @@ # Checks for other programs # ------------------------- -echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then +{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } +set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF +SHELL = /bin/sh all: - @echo 'ac_maketemp="$(MAKE)"' + @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. -eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` -if test -n "$ac_maketemp"; then - eval ac_cv_prog_make_${ac_make}_set=yes -else - eval ac_cv_prog_make_${ac_make}_set=no -fi +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac rm -f conftest.make fi -if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } SET_MAKE= else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -7194,8 +8720,8 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7208,25 +8734,27 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - echo "$as_me:$LINENO: result: $AWK" >&5 -echo "${ECHO_T}$AWK" >&6 + { echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$AWK" && break done @@ -7238,8 +8766,8 @@ { (exit 1); exit 1; }; } ;; esac -echo "$as_me:$LINENO: checking whether ln -s works" >&5 -echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether ln -s works" >&5 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } if test "${gcc_cv_prog_LN_S+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7266,20 +8794,20 @@ fi LN_S="$gcc_cv_prog_LN_S" if test "$gcc_cv_prog_LN_S" = "ln -s"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else if test "$gcc_cv_prog_LN_S" = "ln"; then - echo "$as_me:$LINENO: result: no, using ln" >&5 -echo "${ECHO_T}no, using ln" >&6 + { echo "$as_me:$LINENO: result: no, using ln" >&5 +echo "${ECHO_T}no, using ln" >&6; } else - echo "$as_me:$LINENO: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5 -echo "${ECHO_T}no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6 + { echo "$as_me:$LINENO: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5 +echo "${ECHO_T}no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6; } fi fi -echo "$as_me:$LINENO: checking whether ln works" >&5 -echo $ECHO_N "checking whether ln works... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether ln works" >&5 +echo $ECHO_N "checking whether ln works... $ECHO_C" >&6; } if test "${acx_cv_prog_LN+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7296,19 +8824,19 @@ fi if test $acx_cv_prog_LN = no; then LN="$LN_S" - echo "$as_me:$LINENO: result: no, using $LN" >&5 -echo "${ECHO_T}no, using $LN" >&6 + { echo "$as_me:$LINENO: result: no, using $LN" >&5 +echo "${ECHO_T}no, using $LN" >&6; } else LN="$acx_cv_prog_LN" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7321,32 +8849,34 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6 + { echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7359,27 +8889,41 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS - test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - RANLIB=$ac_ct_RANLIB + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi else RANLIB="$ac_cv_prog_RANLIB" fi @@ -7407,8 +8951,8 @@ # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. -echo "$as_me:$LINENO: checking for a BSD compatible install" >&5 -echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for a BSD compatible install" >&5 +echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -7449,8 +8993,8 @@ INSTALL="$ac_install_sh" fi fi -echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6 +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -7464,18 +9008,19 @@ for ac_header in mach/mach_time.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -7486,24 +9031,36 @@ #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -7512,15 +9069,16 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -7529,8 +9087,13 @@ /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -7554,9 +9117,10 @@ ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -7580,25 +9144,19 @@ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -7613,8 +9171,8 @@ # APPLE LOCAL end Mach time # See if cmp has --ignore-initial. -echo "$as_me:$LINENO: checking for cmp's capabilities" >&5 -echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for cmp's capabilities" >&5 +echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6; } if test "${gcc_cv_prog_cmp_skip+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7640,8 +9198,8 @@ rm t1 t2 fi -echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5 -echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5 +echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6; } make_compare_target=$gcc_cv_prog_cmp_skip @@ -7649,8 +9207,8 @@ # See if we have the mktemp command. # Extract the first word of "mktemp", so it can be a program name with args. set dummy mktemp; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_have_mktemp_command+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7663,35 +9221,37 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_have_mktemp_command="yes" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no" fi fi have_mktemp_command=$ac_cv_prog_have_mktemp_command if test -n "$have_mktemp_command"; then - echo "$as_me:$LINENO: result: $have_mktemp_command" >&5 -echo "${ECHO_T}$have_mktemp_command" >&6 + { echo "$as_me:$LINENO: result: $have_mktemp_command" >&5 +echo "${ECHO_T}$have_mktemp_command" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + MISSING="${CONFIG_SHELL-/bin/sh} $srcdir/../missing" # See if makeinfo has been installed and is modern enough # that we can use it. # Extract the first word of "makeinfo", so it can be a program name with args. set dummy makeinfo; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_MAKEINFO+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7704,35 +9264,37 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_MAKEINFO="makeinfo" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi MAKEINFO=$ac_cv_prog_MAKEINFO if test -n "$MAKEINFO"; then - echo "$as_me:$LINENO: result: $MAKEINFO" >&5 -echo "${ECHO_T}$MAKEINFO" >&6 + { echo "$as_me:$LINENO: result: $MAKEINFO" >&5 +echo "${ECHO_T}$MAKEINFO" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + if test -n "$MAKEINFO"; then # Found it, now check the version. - echo "$as_me:$LINENO: checking for modern makeinfo" >&5 -echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for modern makeinfo" >&5 +echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6; } if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_prog_version=`$MAKEINFO --version 2>&1 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` - echo "configure:7735: version of makeinfo is $ac_prog_version" >&5 + echo "configure:9297: version of makeinfo is $ac_prog_version" >&5 case $ac_prog_version in '') gcc_cv_prog_makeinfo_modern=no;; 4.[2-9]*) @@ -7741,8 +9303,8 @@ esac fi -echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5 -echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5 +echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6; } else gcc_cv_prog_makeinfo_modern=no fi @@ -7762,15 +9324,15 @@ # Is pod2man recent enough to regenerate manpages? -echo "$as_me:$LINENO: checking for recent Pod::Man" >&5 -echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for recent Pod::Man" >&5 +echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6; } if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } GENERATED_MANPAGES=generated-manpages else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } GENERATED_MANPAGES= fi @@ -7780,8 +9342,8 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_FLEX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7794,25 +9356,27 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_FLEX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi FLEX=$ac_cv_prog_FLEX if test -n "$FLEX"; then - echo "$as_me:$LINENO: result: $FLEX" >&5 -echo "${ECHO_T}$FLEX" >&6 + { echo "$as_me:$LINENO: result: $FLEX" >&5 +echo "${ECHO_T}$FLEX" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$FLEX" && break done test -n "$FLEX" || FLEX="$MISSING flex" @@ -7823,8 +9387,8 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_BISON+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7837,25 +9401,27 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_BISON="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi BISON=$ac_cv_prog_BISON if test -n "$BISON"; then - echo "$as_me:$LINENO: result: $BISON" >&5 -echo "${ECHO_T}$BISON" >&6 + { echo "$as_me:$LINENO: result: $BISON" >&5 +echo "${ECHO_T}$BISON" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$BISON" && break done test -n "$BISON" || BISON="$MISSING bison" @@ -7871,8 +9437,8 @@ else # Extract the first word of "nm", so it can be a program name with args. set dummy nm; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_NM+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7885,26 +9451,28 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NM="nm" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm" fi fi NM=$ac_cv_prog_NM if test -n "$NM"; then - echo "$as_me:$LINENO: result: $NM" >&5 -echo "${ECHO_T}$NM" >&6 + { echo "$as_me:$LINENO: result: $NM" >&5 +echo "${ECHO_T}$NM" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi # AR @@ -7914,8 +9482,8 @@ else # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7928,26 +9496,28 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar" fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6 + { echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi @@ -7955,8 +9525,8 @@ # Checks for C headers # -------------------- -echo "$as_me:$LINENO: checking for GNU C library" >&5 -echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for GNU C library" >&5 +echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6; } if test "${gcc_cv_glibc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7979,24 +9549,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -8005,13 +9587,14 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -gcc_cv_glibc=no + gcc_cv_glibc=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5 -echo "${ECHO_T}$gcc_cv_glibc" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5 +echo "${ECHO_T}$gcc_cv_glibc" >&6; } if test $gcc_cv_glibc = yes; then cat >>confdefs.h <<\_ACEOF @@ -8025,8 +9608,8 @@ ac_c_preproc_warn_flag=yes -echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8050,24 +9633,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -8076,10 +9671,11 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_stdc=no + ac_cv_header_stdc=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF @@ -8134,6 +9730,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -8153,18 +9750,27 @@ for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); + return 2; + return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -8177,12 +9783,14 @@ ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -8191,8 +9799,8 @@ fi -echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 -echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8216,24 +9824,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -8242,12 +9862,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_time=no + ac_cv_header_time=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 -echo "${ECHO_T}$ac_cv_header_time" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF @@ -8256,8 +9877,8 @@ fi -echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5 -echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5 +echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6; } if test "${gcc_cv_header_string+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8278,24 +9899,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -8304,12 +9937,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -gcc_cv_header_string=no + gcc_cv_header_string=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5 -echo "${ECHO_T}$gcc_cv_header_string" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5 +echo "${ECHO_T}$gcc_cv_header_string" >&6; } if test $gcc_cv_header_string = yes; then cat >>confdefs.h <<\_ACEOF @@ -8318,8 +9952,8 @@ fi -echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 -echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; } if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8332,7 +9966,7 @@ #include #include #ifndef WEXITSTATUS -# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) +# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) @@ -8349,24 +9983,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -8375,12 +10021,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_sys_wait_h=no + ac_cv_header_sys_wait_h=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } if test $ac_cv_header_sys_wait_h = yes; then cat >>confdefs.h <<\_ACEOF @@ -8417,9 +10064,9 @@ direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -8430,8 +10077,13 @@ /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -8455,10 +10107,12 @@ eval "$as_ac_Header=no" fi + rm -f conftest.err conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 @@ -8469,8 +10123,8 @@ # Check for thread headers. -echo "$as_me:$LINENO: checking for thread.h" >&5 -echo $ECHO_N "checking for thread.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for thread.h" >&5 +echo $ECHO_N "checking for thread.h... $ECHO_C" >&6; } if test "${ac_cv_header_thread_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8482,8 +10136,13 @@ /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -8507,18 +10166,19 @@ ac_cv_header_thread_h=no fi + rm -f conftest.err conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5 -echo "${ECHO_T}$ac_cv_header_thread_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5 +echo "${ECHO_T}$ac_cv_header_thread_h" >&6; } if test $ac_cv_header_thread_h = yes; then have_thread_h=yes else have_thread_h= fi -echo "$as_me:$LINENO: checking for pthread.h" >&5 -echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for pthread.h" >&5 +echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6; } if test "${ac_cv_header_pthread_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8530,8 +10190,13 @@ /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -8555,10 +10220,11 @@ ac_cv_header_pthread_h=no fi + rm -f conftest.err conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 -echo "${ECHO_T}$ac_cv_header_pthread_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 +echo "${ECHO_T}$ac_cv_header_pthread_h" >&6; } if test $ac_cv_header_pthread_h = yes; then have_pthread_h=yes else @@ -8567,8 +10233,8 @@ # These tests can't be done till we know if we have limits.h. -echo "$as_me:$LINENO: checking for CHAR_BIT" >&5 -echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for CHAR_BIT" >&5 +echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6; } if test "${gcc_cv_decl_char_bit+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8595,11 +10261,11 @@ fi -echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5 -echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5 +echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6; } if test $gcc_cv_decl_char_bit = no; then - echo "$as_me:$LINENO: checking number of bits in a byte" >&5 -echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking number of bits in a byte" >&5 +echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6; } if test "${gcc_cv_c_nbby+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8625,24 +10291,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -8651,15 +10329,17 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext i=`expr $i + 1` done test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed fi -echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5 -echo "${ECHO_T}$gcc_cv_c_nbby" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5 +echo "${ECHO_T}$gcc_cv_c_nbby" >&6; } if test $gcc_cv_c_nbby = failed; then { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5 echo "$as_me: error: cannot determine number of bits in a byte" >&2;} @@ -8672,8 +10352,8 @@ fi fi -echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 -echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } if test "${ac_cv_c_bigendian+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8699,24 +10379,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -8741,24 +10433,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -8767,15 +10471,18 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_c_bigendian=no + ac_cv_c_bigendian=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then if test "$cross_compiling" = yes; then echo $ac_n "cross-compiling... " 2>&6 @@ -8798,13 +10505,22 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -8817,15 +10533,17 @@ ( exit $ac_status ) ac_cv_c_bigendian=yes fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 -echo "${ECHO_T}$ac_cv_c_bigendian" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } if test $ac_cv_c_bigendian = unknown; then -echo "$as_me:$LINENO: checking to probe for byte ordering" >&5 -echo $ECHO_N "checking to probe for byte ordering... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking to probe for byte ordering" >&5 +echo $ECHO_N "checking to probe for byte ordering... $ECHO_C" >&6; } cat >conftest.c <&6 fi fi -echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 -echo "${ECHO_T}$ac_cv_c_bigendian" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } fi if test $ac_cv_c_bigendian = yes; then @@ -8912,8 +10630,8 @@ # These libraries may be used by collect2. # We may need a special search path to get them linked. -echo "$as_me:$LINENO: checking for collect2 libraries" >&5 -echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for collect2 libraries" >&5 +echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6; } if test "${gcc_cv_collect2_libs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8930,40 +10648,52 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char ldopen (); int main () { -ldopen (); +return ldopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -8972,15 +10702,17 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done LIBS="$save_LIBS" test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required' fi -echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5 -echo "${ECHO_T}$gcc_cv_collect2_libs" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5 +echo "${ECHO_T}$gcc_cv_collect2_libs" >&6; } case $gcc_cv_collect2_libs in "none required") ;; *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;; @@ -8991,13 +10723,12 @@ # -lexc. So test for it. save_LIBS="$LIBS" LIBS= -echo "$as_me:$LINENO: checking for library containing exc_resume" >&5 -echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for library containing exc_resume" >&5 +echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6; } if test "${ac_cv_search_exc_resume+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS -ac_cv_search_exc_resume=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -9005,115 +10736,89 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char exc_resume (); int main () { -exc_resume (); +return exc_resume (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +for ac_lib in '' exc; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_search_exc_resume="none required" + ac_cv_search_exc_resume=$ac_res else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_search_exc_resume" = no; then - for ac_lib in exc; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char exc_resume (); -int -main () -{ -exc_resume (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_exc_resume="-l$ac_lib" -break +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_exc_resume+set}" = set; then + break +fi +done +if test "${ac_cv_search_exc_resume+set}" = set; then + : else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + ac_cv_search_exc_resume=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done -fi +rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5 -echo "${ECHO_T}$ac_cv_search_exc_resume" >&6 -if test "$ac_cv_search_exc_resume" != no; then - test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS" +{ echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5 +echo "${ECHO_T}$ac_cv_search_exc_resume" >&6; } +ac_res=$ac_cv_search_exc_resume +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi @@ -9125,13 +10830,12 @@ # they're both in the same place. jcf-dump needs them. save_LIBS="$LIBS" LIBS= -echo "$as_me:$LINENO: checking for library containing ldexp" >&5 -echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for library containing ldexp" >&5 +echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6; } if test "${ac_cv_search_ldexp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS -ac_cv_search_ldexp=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -9139,115 +10843,89 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char ldexp (); int main () { -ldexp (); +return ldexp (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +for ac_lib in '' m; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_search_ldexp="none required" + ac_cv_search_ldexp=$ac_res else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_search_ldexp" = no; then - for ac_lib in m; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char ldexp (); -int -main () -{ -ldexp (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_ldexp="-l$ac_lib" -break +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_ldexp+set}" = set; then + break +fi +done +if test "${ac_cv_search_ldexp+set}" = set; then + : else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + ac_cv_search_ldexp=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done -fi +rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5 -echo "${ECHO_T}$ac_cv_search_ldexp" >&6 -if test "$ac_cv_search_ldexp" != no; then - test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS" +{ echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5 +echo "${ECHO_T}$ac_cv_search_ldexp" >&6; } +ac_res=$ac_cv_search_ldexp +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi @@ -9257,8 +10935,8 @@ # Use only if it exists, # doesn't clash with , and declares intmax_t. -echo "$as_me:$LINENO: checking for inttypes.h" >&5 -echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for inttypes.h" >&5 +echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6; } if test "${gcc_cv_header_inttypes_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9279,24 +10957,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -9305,13 +10995,14 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -gcc_cv_header_inttypes_h=no + gcc_cv_header_inttypes_h=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5 -echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5 +echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6; } if test $gcc_cv_header_inttypes_h = yes; then cat >>confdefs.h <<\_ACEOF @@ -9364,9 +11055,9 @@ clearerr_unlocked feof_unlocked ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked putchar_unlocked putc_unlocked do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -9392,53 +11083,59 @@ #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; #endif -#ifdef __cplusplus -} -#endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -9447,13 +11144,15 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -9464,8 +11163,8 @@ if test x$ac_cv_func_mbstowcs = xyes; then - echo "$as_me:$LINENO: checking whether mbstowcs works" >&5 -echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether mbstowcs works" >&5 +echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6; } if test "${gcc_cv_func_mbstowcs_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9486,13 +11185,22 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -9505,11 +11213,13 @@ ( exit $ac_status ) gcc_cv_func_mbstowcs_works=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5 -echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5 +echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6; } if test x$gcc_cv_func_mbstowcs_works = xyes; then cat >>confdefs.h <<\_ACEOF @@ -9519,8 +11229,8 @@ fi fi -echo "$as_me:$LINENO: checking for ssize_t" >&5 -echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for ssize_t" >&5 +echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; } if test "${ac_cv_type_ssize_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9531,36 +11241,49 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef ssize_t ac__type_new_; int main () { -if ((ssize_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (ssize_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -9569,12 +11292,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_ssize_t=no + ac_cv_type_ssize_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 -echo "${ECHO_T}$ac_cv_type_ssize_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 +echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; } if test $ac_cv_type_ssize_t = yes; then : else @@ -9588,8 +11312,8 @@ # Try to determine the array type of the second argument of getgroups # for the target system (int or gid_t). -echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 -echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 +echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; } if test "${ac_cv_type_uid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9611,8 +11335,8 @@ rm -f conftest* fi -echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 -echo "${ECHO_T}$ac_cv_type_uid_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 +echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } if test $ac_cv_type_uid_t = no; then cat >>confdefs.h <<\_ACEOF @@ -9626,8 +11350,8 @@ fi -echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5 -echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5 +echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6; } if test "${ac_cv_type_getgroups+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9641,7 +11365,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Thanks to Mike Rendell for this test. */ -#include +$ac_includes_default #define NGID 256 #undef MAX #define MAX(x, y) ((x) > (y) ? (x) : (y)) @@ -9651,7 +11375,7 @@ { gid_t gidset[NGID]; int i, n; - union { gid_t gval; long lval; } val; + union { gid_t gval; long int lval; } val; val.lval = -1; for (i = 0; i < NGID; i++) @@ -9659,18 +11383,28 @@ n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, gidset); /* Exit non-zero if getgroups seems to require an array of ints. This - happens when gid_t is short but getgroups modifies an array of ints. */ - exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); + happens when gid_t is short int but getgroups modifies an array + of ints. */ + return n > 0 && gidset[n] != val.gval; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -9683,8 +11417,10 @@ ( exit $ac_status ) ac_cv_type_getgroups=int fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + if test $ac_cv_type_getgroups = cross; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -9705,8 +11441,8 @@ fi fi -echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5 -echo "${ECHO_T}$ac_cv_type_getgroups" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5 +echo "${ECHO_T}$ac_cv_type_getgroups" >&6; } cat >>confdefs.h <<_ACEOF #define GETGROUPS_T $ac_cv_type_getgroups @@ -9730,8 +11466,8 @@ fi -echo "$as_me:$LINENO: checking whether the printf functions support %p" >&5 -echo $ECHO_N "checking whether the printf functions support %p... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether the printf functions support %p" >&5 +echo $ECHO_N "checking whether the printf functions support %p... $ECHO_C" >&6; } if test "${gcc_cv_func_printf_ptr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9756,13 +11492,22 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -9775,12 +11520,14 @@ ( exit $ac_status ) gcc_cv_func_printf_ptr=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + rm -f core core.* *.core fi -echo "$as_me:$LINENO: result: $gcc_cv_func_printf_ptr" >&5 -echo "${ECHO_T}$gcc_cv_func_printf_ptr" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_func_printf_ptr" >&5 +echo "${ECHO_T}$gcc_cv_func_printf_ptr" >&6; } if test $gcc_cv_func_printf_ptr = yes ; then cat >>confdefs.h <<\_ACEOF @@ -9790,8 +11537,8 @@ fi -echo "$as_me:$LINENO: checking for sys/mman.h" >&5 -echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for sys/mman.h" >&5 +echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_mman_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9803,8 +11550,13 @@ /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -9828,18 +11580,19 @@ ac_cv_header_sys_mman_h=no fi + rm -f conftest.err conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6; } if test $ac_cv_header_sys_mman_h = yes; then gcc_header_sys_mman_h=yes else gcc_header_sys_mman_h=no fi -echo "$as_me:$LINENO: checking for mmap" >&5 -echo $ECHO_N "checking for mmap... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for mmap" >&5 +echo $ECHO_N "checking for mmap... $ECHO_C" >&6; } if test "${ac_cv_func_mmap+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9866,53 +11619,59 @@ #undef mmap -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char mmap (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_mmap) || defined (__stub___mmap) +#if defined __stub_mmap || defined __stub___mmap choke me -#else -char (*f) () = mmap; #endif -#ifdef __cplusplus -} -#endif int main () { -return f != mmap; +return mmap (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -9921,13 +11680,14 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_mmap=no + ac_cv_func_mmap=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5 -echo "${ECHO_T}$ac_cv_func_mmap" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5 +echo "${ECHO_T}$ac_cv_func_mmap" >&6; } if test $ac_cv_func_mmap = yes; then gcc_func_mmap=yes else @@ -9940,8 +11700,8 @@ gcc_cv_func_mmap_dev_zero=no gcc_cv_func_mmap_anon=no else - echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5 -echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5 +echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6; } if test "${gcc_cv_func_mmap_file+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9957,10 +11717,10 @@ gcc_cv_func_mmap_file=yes;; esac fi -echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5 -echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6 - echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5 -echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5 +echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6; } + { echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5 +echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6; } if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9981,12 +11741,12 @@ gcc_cv_func_mmap_dev_zero=yes;; esac fi -echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5 -echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5 +echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6; } # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for. - echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5 -echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5 +echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6; } if test "${gcc_cv_decl_map_anon+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10013,24 +11773,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -10039,18 +11811,19 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -gcc_cv_decl_map_anon=no + gcc_cv_decl_map_anon=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5 -echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5 +echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6; } if test $gcc_cv_decl_map_anon = no; then gcc_cv_func_mmap_anon=no else - echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5 -echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5 +echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6; } if test "${gcc_cv_func_mmap_anon+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10066,8 +11839,8 @@ gcc_cv_func_mmap_anon=yes;; esac fi -echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5 -echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5 +echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6; } fi fi @@ -10102,8 +11875,8 @@ ac_cv_func_vfork_works=yes ;; esac -echo "$as_me:$LINENO: checking for pid_t" >&5 -echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for pid_t" >&5 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } if test "${ac_cv_type_pid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10114,36 +11887,49 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef pid_t ac__type_new_; int main () { -if ((pid_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (pid_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -10152,12 +11938,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_pid_t=no + ac_cv_type_pid_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 -echo "${ECHO_T}$ac_cv_type_pid_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } if test $ac_cv_type_pid_t = yes; then : else @@ -10169,13 +11956,12 @@ fi - -for ac_header in unistd.h vfork.h +for ac_header in vfork.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10186,8 +11972,13 @@ /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -10211,10 +12002,12 @@ eval "$as_ac_Header=no" fi + rm -f conftest.err conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 @@ -10228,9 +12021,9 @@ for ac_func in fork vfork do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -10256,53 +12049,59 @@ #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; #endif -#ifdef __cplusplus -} -#endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -10311,13 +12110,15 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -10327,8 +12128,8 @@ done if test "x$ac_cv_func_fork" = xyes; then - echo "$as_me:$LINENO: checking for working fork" >&5 -echo $ECHO_N "checking for working fork... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for working fork" >&5 +echo $ECHO_N "checking for working fork... $ECHO_C" >&6; } if test "${ac_cv_func_fork_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10336,27 +12137,40 @@ ac_cv_func_fork_works=cross else cat >conftest.$ac_ext <<_ACEOF -/* By Ruediger Kuhlmann. */ - #include - #if HAVE_UNISTD_H - # include - #endif - /* Some systems only have a dummy stub for fork() */ - int main () - { - if (fork() < 0) - exit (1); - exit (0); - } +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* By Ruediger Kuhlmann. */ + return fork () < 0; + + ; + return 0; +} +_ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -10369,11 +12183,13 @@ ( exit $ac_status ) ac_cv_func_fork_works=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5 -echo "${ECHO_T}$ac_cv_func_fork_works" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5 +echo "${ECHO_T}$ac_cv_func_fork_works" >&6; } else ac_cv_func_fork_works=$ac_cv_func_fork @@ -10393,8 +12209,8 @@ fi ac_cv_func_vfork_works=$ac_cv_func_vfork if test "x$ac_cv_func_vfork" = xyes; then - echo "$as_me:$LINENO: checking for working vfork" >&5 -echo $ECHO_N "checking for working vfork... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for working vfork" >&5 +echo $ECHO_N "checking for working vfork... $ECHO_C" >&6; } if test "${ac_cv_func_vfork_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10408,14 +12224,8 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Thanks to Paul Eggert for this test. */ -#include -#include -#include -#include +$ac_includes_default #include -#if HAVE_UNISTD_H -# include -#endif #if HAVE_VFORK_H # include #endif @@ -10487,7 +12297,7 @@ while (wait(&status) != child) ; - exit( + return ( /* Was there some problem with vforking? */ child < 0 @@ -10504,13 +12314,22 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -10523,11 +12342,13 @@ ( exit $ac_status ) ac_cv_func_vfork_works=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 -echo "${ECHO_T}$ac_cv_func_vfork_works" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 +echo "${ECHO_T}$ac_cv_func_vfork_works" >&6; } fi; if test "x$ac_cv_func_fork_works" = xcross; then @@ -10575,13 +12396,13 @@ prefix="$acl_save_prefix" -# Check whether --with-gnu-ld or --without-gnu-ld was given. +# Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then - withval="$with_gnu_ld" - test "$withval" = no || with_gnu_ld=yes + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no -fi; +fi + # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then @@ -10598,8 +12419,8 @@ ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. - echo "$as_me:$LINENO: checking for ld used by GCC" >&5 -echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for ld used by GCC" >&5 +echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw @@ -10628,11 +12449,11 @@ ;; esac elif test "$with_gnu_ld" = yes; then - echo "$as_me:$LINENO: checking for GNU ld" >&5 -echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } else - echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } fi if test "${acl_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -10661,17 +12482,17 @@ LD="$acl_cv_path_LD" if test -n "$LD"; then - echo "$as_me:$LINENO: result: $LD" >&5 -echo "${ECHO_T}$LD" >&6 + { echo "$as_me:$LINENO: result: $LD" >&5 +echo "${ECHO_T}$LD" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } -echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } if test "${acl_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10682,14 +12503,14 @@ acl_cv_prog_gnu_ld=no fi fi -echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5 -echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6 +{ echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5 +echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6; } with_gnu_ld=$acl_cv_prog_gnu_ld - echo "$as_me:$LINENO: checking for shared library run path origin" >&5 -echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for shared library run path origin" >&5 +echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6; } if test "${acl_cv_rpath+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10701,8 +12522,8 @@ acl_cv_rpath=done fi -echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 -echo "${ECHO_T}$acl_cv_rpath" >&6 +{ echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 +echo "${ECHO_T}$acl_cv_rpath" >&6; } wl="$acl_cv_wl" libext="$acl_cv_libext" shlibext="$acl_cv_shlibext" @@ -10710,13 +12531,12 @@ hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" hardcode_direct="$acl_cv_hardcode_direct" hardcode_minus_L="$acl_cv_hardcode_minus_L" - # Check whether --enable-rpath or --disable-rpath was given. + # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then - enableval="$enable_rpath" - : + enableval=$enable_rpath; : else enable_rpath=yes -fi; +fi @@ -10724,6 +12544,7 @@ + use_additional=yes acl_save_prefix="$prefix" @@ -10738,10 +12559,9 @@ prefix="$acl_save_prefix" -# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. +# Check whether --with-libiconv-prefix was given. if test "${with_libiconv_prefix+set}" = set; then - withval="$with_libiconv_prefix" - + withval=$with_libiconv_prefix; if test "X$withval" = "Xno"; then use_additional=no else @@ -10764,7 +12584,8 @@ fi fi -fi; +fi + LIBICONV= LTLIBICONV= INCICONV= @@ -11131,8 +12952,8 @@ done - echo "$as_me:$LINENO: checking for iconv" >&5 -echo $ECHO_N "checking for iconv... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for iconv" >&5 +echo $ECHO_N "checking for iconv... $ECHO_C" >&6; } if test "${am_cv_func_iconv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11158,24 +12979,36 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -11184,8 +13017,10 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" @@ -11209,24 +13044,36 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -11236,15 +13083,17 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi -echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 -echo "${ECHO_T}$am_cv_func_iconv" >&6 +{ echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 +echo "${ECHO_T}$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then cat >>confdefs.h <<\_ACEOF @@ -11253,10 +13102,10 @@ fi if test "$am_cv_lib_iconv" = yes; then - echo "$as_me:$LINENO: checking how to link with libiconv" >&5 -echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6 - echo "$as_me:$LINENO: result: $LIBICONV" >&5 -echo "${ECHO_T}$LIBICONV" >&6 + { echo "$as_me:$LINENO: checking how to link with libiconv" >&5 +echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6; } + { echo "$as_me:$LINENO: result: $LIBICONV" >&5 +echo "${ECHO_T}$LIBICONV" >&6; } else CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= @@ -11266,8 +13115,8 @@ if test "$am_cv_func_iconv" = yes; then - echo "$as_me:$LINENO: checking for iconv declaration" >&5 -echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for iconv declaration" >&5 +echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6; } if test "${am_cv_proto_iconv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11300,24 +13149,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -11326,17 +13187,18 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -am_cv_proto_iconv_arg1="const" + am_cv_proto_iconv_arg1="const" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" fi am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` - echo "$as_me:$LINENO: result: ${ac_t:- + { echo "$as_me:$LINENO: result: ${ac_t:- }$am_cv_proto_iconv" >&5 echo "${ECHO_T}${ac_t:- - }$am_cv_proto_iconv" >&6 + }$am_cv_proto_iconv" >&6; } cat >>confdefs.h <<_ACEOF #define ICONV_CONST $am_cv_proto_iconv_arg1 @@ -11349,8 +13211,8 @@ - echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5 -echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5 +echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6; } if test "${am_cv_val_LC_MESSAGES+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11370,24 +13232,36 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -11396,13 +13270,14 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -am_cv_val_LC_MESSAGES=no + am_cv_val_LC_MESSAGES=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5 -echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6 +{ echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5 +echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6; } if test $am_cv_val_LC_MESSAGES = yes; then cat >>confdefs.h <<\_ACEOF @@ -11413,8 +13288,8 @@ - echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5 -echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5 +echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6; } if test "${am_cv_langinfo_codeset+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11434,24 +13309,36 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -11460,14 +13347,15 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -am_cv_langinfo_codeset=no + am_cv_langinfo_codeset=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5 -echo "${ECHO_T}$am_cv_langinfo_codeset" >&6 +{ echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5 +echo "${ECHO_T}$am_cv_langinfo_codeset" >&6; } if test $am_cv_langinfo_codeset = yes; then cat >>confdefs.h <<\_ACEOF @@ -11525,9 +13413,9 @@ basename getopt clock getpagesize clearerr_unlocked feof_unlocked ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked putchar_unlocked putc_unlocked do ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` -echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 -echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 -if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then +{ echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 +echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6; } +if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -11553,24 +13441,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -11579,20 +13479,21 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "gcc_cv_have_decl_$ac_func=no" + eval "gcc_cv_have_decl_$ac_func=no" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } ; cat >>confdefs.h <<_ACEOF #define $ac_tr_decl 1 _ACEOF else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } ; cat >>confdefs.h <<_ACEOF #define $ac_tr_decl 0 _ACEOF @@ -11608,9 +13509,9 @@ for ac_func in getrlimit setrlimit getrusage do ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` -echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 -echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 -if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then +{ echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 +echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6; } +if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -11640,24 +13541,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -11666,20 +13579,21 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "gcc_cv_have_decl_$ac_func=no" + eval "gcc_cv_have_decl_$ac_func=no" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } ; cat >>confdefs.h <<_ACEOF #define $ac_tr_decl 1 _ACEOF else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } ; cat >>confdefs.h <<_ACEOF #define $ac_tr_decl 0 _ACEOF @@ -11710,24 +13624,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -11742,8 +13668,9 @@ _ACEOF fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + # On AIX 5.2, conflicts with , as both define incompatible # FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname # in collect2.c, isn't visible, but the configure test below needs @@ -11752,9 +13679,9 @@ for ac_func in ldgetname do ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` -echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 -echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 -if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then +{ echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 +echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6; } +if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -11786,24 +13713,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -11812,20 +13751,21 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "gcc_cv_have_decl_$ac_func=no" + eval "gcc_cv_have_decl_$ac_func=no" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } ; cat >>confdefs.h <<_ACEOF #define $ac_tr_decl 1 _ACEOF else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } ; cat >>confdefs.h <<_ACEOF #define $ac_tr_decl 0 _ACEOF @@ -11838,9 +13778,9 @@ for ac_func in times do ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` -echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 -echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 -if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then +{ echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 +echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6; } +if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -11870,24 +13810,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -11896,20 +13848,21 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "gcc_cv_have_decl_$ac_func=no" + eval "gcc_cv_have_decl_$ac_func=no" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } ; cat >>confdefs.h <<_ACEOF #define $ac_tr_decl 1 _ACEOF else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } ; cat >>confdefs.h <<_ACEOF #define $ac_tr_decl 0 _ACEOF @@ -11923,9 +13876,9 @@ for ac_func in sigaltstack do ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` -echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 -echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 -if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then +{ echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 +echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6; } +if { as_var=gcc_cv_have_decl_$ac_func; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -11953,24 +13906,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -11979,20 +13944,21 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "gcc_cv_have_decl_$ac_func=no" + eval "gcc_cv_have_decl_$ac_func=no" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } ; cat >>confdefs.h <<_ACEOF #define $ac_tr_decl 1 _ACEOF else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } ; cat >>confdefs.h <<_ACEOF #define $ac_tr_decl 0 _ACEOF @@ -12003,8 +13969,8 @@ # APPLE LOCAL end mainline 2006-06-02 4508814 # More time-related stuff. -echo "$as_me:$LINENO: checking for struct tms" >&5 -echo $ECHO_N "checking for struct tms... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for struct tms" >&5 +echo $ECHO_N "checking for struct tms... $ECHO_C" >&6; } if test "${ac_cv_struct_tms+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12031,24 +13997,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12057,12 +14035,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_struct_tms=no + ac_cv_struct_tms=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5 -echo "${ECHO_T}$ac_cv_struct_tms" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5 +echo "${ECHO_T}$ac_cv_struct_tms" >&6; } if test $ac_cv_struct_tms = yes; then cat >>confdefs.h <<\_ACEOF @@ -12073,8 +14052,8 @@ # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE. # revisit after autoconf 2.50. -echo "$as_me:$LINENO: checking for clock_t" >&5 -echo $ECHO_N "checking for clock_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for clock_t" >&5 +echo $ECHO_N "checking for clock_t... $ECHO_C" >&6; } if test "${gcc_cv_type_clock_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12098,24 +14077,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12124,12 +14115,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -gcc_cv_type_clock_t=no + gcc_cv_type_clock_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5 -echo "${ECHO_T}$gcc_cv_type_clock_t" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5 +echo "${ECHO_T}$gcc_cv_type_clock_t" >&6; } if test $gcc_cv_type_clock_t = yes; then cat >>confdefs.h <<\_ACEOF @@ -12141,14 +14133,13 @@ # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests. CFLAGS="$saved_CFLAGS" -# Check whether --enable-initfini-array or --disable-initfini-array was given. +# Check whether --enable-initfini-array was given. if test "${enable_initfini_array+set}" = set; then - enableval="$enable_initfini_array" - + enableval=$enable_initfini_array; else -echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5 -echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5 +echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6; } if test "${gcc_cv_initfini_array+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12168,13 +14159,22 @@ int (*fp) (void) __attribute__ ((section (".init_array"))) = foo; _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12187,14 +14187,17 @@ ( exit $ac_status ) gcc_cv_initfini_array=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5 -echo "${ECHO_T}$gcc_cv_initfini_array" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5 +echo "${ECHO_T}$gcc_cv_initfini_array" >&6; } enable_initfini_array=$gcc_cv_initfini_array -fi; +fi + if test $enable_initfini_array = yes; then cat >>confdefs.h <<\_ACEOF @@ -12204,8 +14207,8 @@ fi # mkdir takes a single argument on some systems. -echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5 -echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5 +echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6; } if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12235,24 +14238,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12261,12 +14276,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -gcc_cv_mkdir_takes_one_arg=yes + gcc_cv_mkdir_takes_one_arg=yes fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5 -echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5 +echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6; } if test $gcc_cv_mkdir_takes_one_arg = yes ; then cat >>confdefs.h <<\_ACEOF @@ -12283,25 +14299,25 @@ # With Setjmp/Longjmp based exception handling. -# Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given. +# Check whether --enable-sjlj-exceptions was given. if test "${enable_sjlj_exceptions+set}" = set; then - enableval="$enable_sjlj_exceptions" - sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi` + enableval=$enable_sjlj_exceptions; sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi` cat >>confdefs.h <<_ACEOF #define CONFIG_SJLJ_EXCEPTIONS $sjlj _ACEOF -fi; +fi + # For platforms with the unwind ABI which includes an unwind library, # libunwind, we can choose to use the system libunwind. -# Check whether --with-system-libunwind or --without-system-libunwind was given. +# Check whether --with-system-libunwind was given. if test "${with_system_libunwind+set}" = set; then - withval="$with_system_libunwind" + withval=$with_system_libunwind; +fi -fi; # -------------------------------------------------------- # Build, host, and target specific configuration fragments @@ -12446,8 +14462,8 @@ # APPLE LOCAL begin mainline 2006-06-02 4508814 case ${host} in powerpc*-*-darwin*) - echo "$as_me:$LINENO: checking whether mcontext_t fields have underscores" >&5 -echo $ECHO_N "checking whether mcontext_t fields have underscores... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether mcontext_t fields have underscores" >&5 +echo $ECHO_N "checking whether mcontext_t fields have underscores... $ECHO_C" >&6; } if test "${gcc_cv_mcontext_underscores+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12459,24 +14475,36 @@ _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12485,12 +14513,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -gcc_cv_mcontext_underscores=yes + gcc_cv_mcontext_underscores=yes fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $gcc_cv_mcontext_underscores" >&5 -echo "${ECHO_T}$gcc_cv_mcontext_underscores" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_mcontext_underscores" >&5 +echo "${ECHO_T}$gcc_cv_mcontext_underscores" >&6; } if test $gcc_cv_mcontext_underscores = yes; then cat >>confdefs.h <<\_ACEOF @@ -12549,8 +14578,8 @@ if test x$enable___cxa_atexit = xyes || \ test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then if test x$host = x$target; then - echo "$as_me:$LINENO: checking for __cxa_atexit" >&5 -echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for __cxa_atexit" >&5 +echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6; } if test "${ac_cv_func___cxa_atexit+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12577,53 +14606,59 @@ #undef __cxa_atexit -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char __cxa_atexit (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub___cxa_atexit) || defined (__stub_____cxa_atexit) +#if defined __stub___cxa_atexit || defined __stub_____cxa_atexit choke me -#else -char (*f) () = __cxa_atexit; #endif -#ifdef __cplusplus -} -#endif int main () { -return f != __cxa_atexit; +return __cxa_atexit (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -12632,13 +14667,14 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func___cxa_atexit=no + ac_cv_func___cxa_atexit=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5 -echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5 +echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6; } if test $ac_cv_func___cxa_atexit = yes; then use_cxa_atexit=yes else @@ -12769,22 +14805,22 @@ if test -f ../intl/config.intl; then . ../intl/config.intl fi -echo "$as_me:$LINENO: checking whether NLS is requested" >&5 -echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether NLS is requested" >&5 +echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6; } if test x"$USE_NLS" != xyes; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } cat >>confdefs.h <<\_ACEOF #define ENABLE_NLS 1 _ACEOF - echo "$as_me:$LINENO: checking for catalogs to be installed" >&5 -echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for catalogs to be installed" >&5 +echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6; } # Look for .po and .gmo files in the source directory. CATALOGS= XLINGUAS= @@ -12815,8 +14851,8 @@ fi done LINGUAS="$XLINGUAS" - echo "$as_me:$LINENO: result: $LINGUAS" >&5 -echo "${ECHO_T}$LINGUAS" >&6 + { echo "$as_me:$LINENO: result: $LINGUAS" >&5 +echo "${ECHO_T}$LINGUAS" >&6; } fi # If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get @@ -12826,30 +14862,29 @@ esac # Windows32 Registry support for specifying GCC installation paths. -# Check whether --enable-win32-registry or --disable-win32-registry was given. +# Check whether --enable-win32-registry was given. if test "${enable_win32_registry+set}" = set; then - enableval="$enable_win32_registry" + enableval=$enable_win32_registry; +fi -fi; case $host_os in win32 | pe | cygwin* | mingw32* | uwin*) -echo "$as_me:$LINENO: checking whether windows registry support is requested" >&5 -echo $ECHO_N "checking whether windows registry support is requested... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether windows registry support is requested" >&5 +echo $ECHO_N "checking whether windows registry support is requested... $ECHO_C" >&6; } if test "x$enable_win32_registry" != xno; then cat >>confdefs.h <<\_ACEOF #define ENABLE_WIN32_REGISTRY 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5 -echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + { echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5 +echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6; } if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS -ac_cv_search_RegOpenKeyExA=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12857,121 +14892,95 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char RegOpenKeyExA (); int main () { -RegOpenKeyExA (); +return RegOpenKeyExA (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +for ac_lib in '' advapi32; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_search_RegOpenKeyExA="none required" + ac_cv_search_RegOpenKeyExA=$ac_res else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_search_RegOpenKeyExA" = no; then - for ac_lib in advapi32; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char RegOpenKeyExA (); -int -main () -{ -RegOpenKeyExA (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_RegOpenKeyExA="-l$ac_lib" -break +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then + break +fi +done +if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then + : else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + ac_cv_search_RegOpenKeyExA=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done -fi +rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5 -echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6 -if test "$ac_cv_search_RegOpenKeyExA" != no; then - test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS" +{ echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5 +echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6; } +ac_res=$ac_cv_search_RegOpenKeyExA +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi # Check if user specified a different registry key. @@ -12991,15 +15000,15 @@ esac if test "x$enable_win32_registry" != xno; then - echo "$as_me:$LINENO: checking registry key on windows hosts" >&5 -echo $ECHO_N "checking registry key on windows hosts... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking registry key on windows hosts" >&5 +echo $ECHO_N "checking registry key on windows hosts... $ECHO_C" >&6; } cat >>confdefs.h <<_ACEOF #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key" _ACEOF - echo "$as_me:$LINENO: result: $gcc_cv_win32_registry_key" >&5 -echo "${ECHO_T}$gcc_cv_win32_registry_key" >&6 + { echo "$as_me:$LINENO: result: $gcc_cv_win32_registry_key" >&5 +echo "${ECHO_T}$gcc_cv_win32_registry_key" >&6; } fi ;; esac @@ -13275,8 +15284,8 @@ # If build != host, and we aren't building gas in-tree, we identify a # build->target assembler and hope that it will have the same features # as the host->target assembler we'll be using. -echo "$as_me:$LINENO: checking what assembler to use" >&5 -echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking what assembler to use" >&5 +echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6; } in_tree_gas=no gcc_cv_as= gcc_cv_gas_major_version= @@ -13394,12 +15403,12 @@ fi case $in_tree_gas in yes) - echo "$as_me:$LINENO: result: \"newly built gas\"" >&5 -echo "${ECHO_T}\"newly built gas\"" >&6 + { echo "$as_me:$LINENO: result: \"newly built gas\"" >&5 +echo "${ECHO_T}\"newly built gas\"" >&6; } ;; no) - echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 -echo "${ECHO_T}$gcc_cv_as" >&6 + { echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 +echo "${ECHO_T}$gcc_cv_as" >&6; } ;; esac @@ -13410,8 +15419,8 @@ # If build != host, and we aren't building gas in-tree, we identify a # build->target linker and hope that it will have the same features # as the host->target linker we'll be using. -echo "$as_me:$LINENO: checking what linker to use" >&5 -echo $ECHO_N "checking what linker to use... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking what linker to use" >&5 +echo $ECHO_N "checking what linker to use... $ECHO_C" >&6; } in_tree_ld=no gcc_cv_ld= gcc_cv_gld_major_version= @@ -13518,19 +15527,19 @@ fi case $in_tree_ld in yes) - echo "$as_me:$LINENO: result: \"newly built ld\"" >&5 -echo "${ECHO_T}\"newly built ld\"" >&6 + { echo "$as_me:$LINENO: result: \"newly built ld\"" >&5 +echo "${ECHO_T}\"newly built ld\"" >&6; } ;; no) - echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 -echo "${ECHO_T}$gcc_cv_ld" >&6 + { echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 +echo "${ECHO_T}$gcc_cv_ld" >&6; } ;; esac # Figure out what nm we will be using. gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils -echo "$as_me:$LINENO: checking what nm to use" >&5 -echo $ECHO_N "checking what nm to use... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking what nm to use" >&5 +echo $ECHO_N "checking what nm to use... $ECHO_C" >&6; } in_tree_nm=no if test -x nm$build_exeext; then gcc_cv_nm=./nm$build_exeext @@ -13547,15 +15556,15 @@ gcc_cv_nm=`echo nm | sed "${program_transform_name}"`$build_exeext fi case $in_tree_nm in - yes) echo "$as_me:$LINENO: result: \"newly built nm\"" >&5 -echo "${ECHO_T}\"newly built nm\"" >&6 ;; - no) echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 -echo "${ECHO_T}$gcc_cv_nm" >&6 ;; + yes) { echo "$as_me:$LINENO: result: \"newly built nm\"" >&5 +echo "${ECHO_T}\"newly built nm\"" >&6; } ;; + no) { echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 +echo "${ECHO_T}$gcc_cv_nm" >&6; } ;; esac # Figure out what objdump we will be using. -echo "$as_me:$LINENO: checking what objdump to use" >&5 -echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking what objdump to use" >&5 +echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6; } in_tree_objdump=no if test -x objdump$build_exeext; then gcc_cv_objdump=./objdump$build_exeext @@ -13573,15 +15582,15 @@ sed "${program_transform_name}"`$build_exeext fi case $in_tree_objdump in - yes) echo "$as_me:$LINENO: result: \"newly built objdump\"" >&5 -echo "${ECHO_T}\"newly built objdump\"" >&6 ;; - no) echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5 -echo "${ECHO_T}$gcc_cv_objdump" >&6 ;; + yes) { echo "$as_me:$LINENO: result: \"newly built objdump\"" >&5 +echo "${ECHO_T}\"newly built objdump\"" >&6; } ;; + no) { echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5 +echo "${ECHO_T}$gcc_cv_objdump" >&6; } ;; esac # Figure out what assembler alignment features are present. -echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5 -echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5 +echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6; } if test "${gcc_cv_as_balign_and_p2align+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13608,8 +15617,8 @@ rm -f conftest.o conftest.s fi fi -echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5 -echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5 +echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6; } if test $gcc_cv_as_balign_and_p2align = yes; then cat >>confdefs.h <<\_ACEOF @@ -13618,8 +15627,8 @@ fi -echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5 -echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5 +echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6; } if test "${gcc_cv_as_max_skip_p2align+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13645,8 +15654,8 @@ rm -f conftest.o conftest.s fi fi -echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5 -echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5 +echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6; } if test $gcc_cv_as_max_skip_p2align = yes; then cat >>confdefs.h <<\_ACEOF @@ -13656,8 +15665,8 @@ fi # APPLE LOCAL begin x86_64 literal16 -echo "$as_me:$LINENO: checking assembler for .literal16" >&5 -echo $ECHO_N "checking assembler for .literal16... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking assembler for .literal16" >&5 +echo $ECHO_N "checking assembler for .literal16... $ECHO_C" >&6; } if test "${gcc_cv_as_literal16+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13683,8 +15692,8 @@ rm -f conftest.o conftest.s fi fi -echo "$as_me:$LINENO: result: $gcc_cv_as_literal16" >&5 -echo "${ECHO_T}$gcc_cv_as_literal16" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_as_literal16" >&5 +echo "${ECHO_T}$gcc_cv_as_literal16" >&6; } if test $gcc_cv_as_literal16 = yes; then cat >>confdefs.h <<\_ACEOF @@ -13694,8 +15703,8 @@ fi # APPLE LOCAL end x86_64 literal16 -echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5 -echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5 +echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6; } if test "${gcc_cv_as_subsection_m1+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13733,8 +15742,8 @@ rm -f conftest.o conftest.s fi fi -echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5 -echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5 +echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6; } if test $gcc_cv_as_subsection_m1 = yes; then cat >>confdefs.h <<\_ACEOF @@ -13743,8 +15752,8 @@ fi -echo "$as_me:$LINENO: checking assembler for .weak" >&5 -echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking assembler for .weak" >&5 +echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6; } if test "${gcc_cv_as_weak+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13770,8 +15779,8 @@ rm -f conftest.o conftest.s fi fi -echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5 -echo "${ECHO_T}$gcc_cv_as_weak" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5 +echo "${ECHO_T}$gcc_cv_as_weak" >&6; } if test $gcc_cv_as_weak = yes; then cat >>confdefs.h <<\_ACEOF @@ -13780,8 +15789,8 @@ fi -echo "$as_me:$LINENO: checking assembler for .nsubspa comdat" >&5 -echo $ECHO_N "checking assembler for .nsubspa comdat... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking assembler for .nsubspa comdat" >&5 +echo $ECHO_N "checking assembler for .nsubspa comdat... $ECHO_C" >&6; } if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13808,8 +15817,8 @@ rm -f conftest.o conftest.s fi fi -echo "$as_me:$LINENO: result: $gcc_cv_as_nsubspa_comdat" >&5 -echo "${ECHO_T}$gcc_cv_as_nsubspa_comdat" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_as_nsubspa_comdat" >&5 +echo "${ECHO_T}$gcc_cv_as_nsubspa_comdat" >&6; } if test $gcc_cv_as_nsubspa_comdat = yes; then cat >>confdefs.h <<\_ACEOF @@ -13825,8 +15834,8 @@ # ld, we don't know its patchlevel version, so we set the baseline at 2.13 # to be safe. # The gcc_GAS_CHECK_FEATURE call just sets a cache variable. -echo "$as_me:$LINENO: checking assembler for .hidden" >&5 -echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking assembler for .hidden" >&5 +echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6; } if test "${gcc_cv_as_hidden+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13854,12 +15863,12 @@ rm -f conftest.o conftest.s fi fi -echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5 -echo "${ECHO_T}$gcc_cv_as_hidden" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5 +echo "${ECHO_T}$gcc_cv_as_hidden" >&6; } -echo "$as_me:$LINENO: checking linker for .hidden support" >&5 -echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking linker for .hidden support" >&5 +echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6; } if test "${gcc_cv_ld_hidden+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13914,8 +15923,8 @@ fi fi fi -echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5 -echo "${ECHO_T}$gcc_cv_ld_hidden" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5 +echo "${ECHO_T}$gcc_cv_ld_hidden" >&6; } libgcc_visibility=no if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then @@ -13928,8 +15937,8 @@ fi # Check if we have .[us]leb128, and support symbol arithmetic with it. -echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5 -echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5 +echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6; } if test "${gcc_cv_as_leb128+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13975,8 +15984,8 @@ rm -f conftest.o conftest.s fi fi -echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5 -echo "${ECHO_T}$gcc_cv_as_leb128" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5 +echo "${ECHO_T}$gcc_cv_as_leb128" >&6; } if test $gcc_cv_as_leb128 = yes; then cat >>confdefs.h <<\_ACEOF @@ -13987,8 +15996,8 @@ # GAS versions up to and including 2.11.0 may mis-optimize # .eh_frame data. -echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5 -echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5 +echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6; } if test "${gcc_cv_as_eh_frame+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14075,8 +16084,8 @@ rm -f conftest.o conftest.s fi fi -echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5 -echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5 +echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6; } if test $gcc_cv_as_eh_frame = buggy; then @@ -14087,8 +16096,8 @@ fi -echo "$as_me:$LINENO: checking assembler for section merging support" >&5 -echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking assembler for section merging support" >&5 +echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6; } if test "${gcc_cv_as_shf_merge+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14115,12 +16124,12 @@ rm -f conftest.o conftest.s fi fi -echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5 -echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5 +echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6; } if test $gcc_cv_as_shf_merge = no; then - echo "$as_me:$LINENO: checking assembler for section merging support" >&5 -echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking assembler for section merging support" >&5 +echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6; } if test "${gcc_cv_as_shf_merge+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14147,8 +16156,8 @@ rm -f conftest.o conftest.s fi fi -echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5 -echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5 +echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6; } fi @@ -14157,8 +16166,8 @@ _ACEOF -echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5 -echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5 +echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6; } if test "${gcc_cv_as_comdat_group+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14185,14 +16194,14 @@ rm -f conftest.o conftest.s fi fi -echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group" >&5 -echo "${ECHO_T}$gcc_cv_as_comdat_group" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group" >&5 +echo "${ECHO_T}$gcc_cv_as_comdat_group" >&6; } if test $gcc_cv_as_comdat_group = yes; then gcc_cv_as_comdat_group_percent=no else - echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5 -echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5 +echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6; } if test "${gcc_cv_as_comdat_group_percent+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14219,8 +16228,8 @@ rm -f conftest.o conftest.s fi fi -echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group_percent" >&5 -echo "${ECHO_T}$gcc_cv_as_comdat_group_percent" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group_percent" >&5 +echo "${ECHO_T}$gcc_cv_as_comdat_group_percent" >&6; } fi @@ -14497,8 +16506,8 @@ if test -z "$tls_first_major"; then : # If we don't have a check, assume no support. else - echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5 -echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5 +echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6; } if test "${gcc_cv_as_tls+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14524,8 +16533,8 @@ rm -f conftest.o conftest.s fi fi -echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5 -echo "${ECHO_T}$gcc_cv_as_tls" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5 +echo "${ECHO_T}$gcc_cv_as_tls" >&6; } if test $gcc_cv_as_tls = yes; then cat >>confdefs.h <<\_ACEOF @@ -14537,8 +16546,8 @@ # Target-specific assembler checks. -echo "$as_me:$LINENO: checking linker -Bstatic/-Bdynamic option" >&5 -echo $ECHO_N "checking linker -Bstatic/-Bdynamic option... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking linker -Bstatic/-Bdynamic option" >&5 +echo $ECHO_N "checking linker -Bstatic/-Bdynamic option... $ECHO_C" >&6; } gcc_cv_ld_static_dynamic=no if test $in_tree_ld = yes ; then if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10; then @@ -14558,12 +16567,12 @@ _ACEOF fi -echo "$as_me:$LINENO: result: $gcc_cv_ld_static_dynamic" >&5 -echo "${ECHO_T}$gcc_cv_ld_static_dynamic" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_ld_static_dynamic" >&5 +echo "${ECHO_T}$gcc_cv_ld_static_dynamic" >&6; } if test x"$demangler_in_ld" = xyes; then - echo "$as_me:$LINENO: checking linker --demangle support" >&5 -echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking linker --demangle support" >&5 +echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6; } gcc_cv_ld_demangle=no if test $in_tree_ld = yes; then if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 14 -o "$gcc_cv_gld_major_version" -gt 2; then \ @@ -14582,15 +16591,15 @@ _ACEOF fi - echo "$as_me:$LINENO: result: $gcc_cv_ld_demangle" >&5 -echo "${ECHO_T}$gcc_cv_ld_demangle" >&6 + { echo "$as_me:$LINENO: result: $gcc_cv_ld_demangle" >&5 +echo "${ECHO_T}$gcc_cv_ld_demangle" >&6; } fi case "$target" in # All TARGET_ABI_OSF targets. alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*) - echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5 -echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5 +echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6; } if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14628,8 +16637,8 @@ rm -f conftest.o conftest.s fi fi -echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5 -echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5 +echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6; } if test $gcc_cv_as_alpha_explicit_relocs = yes; then cat >>confdefs.h <<\_ACEOF @@ -14637,8 +16646,8 @@ _ACEOF fi - echo "$as_me:$LINENO: checking assembler for jsrdirect relocation support" >&5 -echo $ECHO_N "checking assembler for jsrdirect relocation support... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking assembler for jsrdirect relocation support" >&5 +echo $ECHO_N "checking assembler for jsrdirect relocation support... $ECHO_C" >&6; } if test "${gcc_cv_as_alpha_jsrdirect_relocs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14667,8 +16676,8 @@ rm -f conftest.o conftest.s fi fi -echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_jsrdirect_relocs" >&5 -echo "${ECHO_T}$gcc_cv_as_alpha_jsrdirect_relocs" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_jsrdirect_relocs" >&5 +echo "${ECHO_T}$gcc_cv_as_alpha_jsrdirect_relocs" >&6; } if test $gcc_cv_as_alpha_jsrdirect_relocs = yes; then cat >>confdefs.h <<\_ACEOF @@ -14679,8 +16688,8 @@ ;; cris-*-*) - echo "$as_me:$LINENO: checking assembler for -no-mul-bug-abort option" >&5 -echo $ECHO_N "checking assembler for -no-mul-bug-abort option... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking assembler for -no-mul-bug-abort option" >&5 +echo $ECHO_N "checking assembler for -no-mul-bug-abort option... $ECHO_C" >&6; } if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14706,8 +16715,8 @@ rm -f conftest.o conftest.s fi fi -echo "$as_me:$LINENO: result: $gcc_cv_as_cris_no_mul_bug" >&5 -echo "${ECHO_T}$gcc_cv_as_cris_no_mul_bug" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_as_cris_no_mul_bug" >&5 +echo "${ECHO_T}$gcc_cv_as_cris_no_mul_bug" >&6; } if test $gcc_cv_as_cris_no_mul_bug = yes; then cat >>confdefs.h <<\_ACEOF @@ -14718,8 +16727,8 @@ ;; sparc*-*-*) - echo "$as_me:$LINENO: checking assembler for .register" >&5 -echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking assembler for .register" >&5 +echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6; } if test "${gcc_cv_as_sparc_register_op+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14741,8 +16750,8 @@ rm -f conftest.o conftest.s fi fi -echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5 -echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5 +echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6; } if test $gcc_cv_as_sparc_register_op = yes; then cat >>confdefs.h <<\_ACEOF @@ -14751,8 +16760,8 @@ fi - echo "$as_me:$LINENO: checking assembler for -relax option" >&5 -echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking assembler for -relax option" >&5 +echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6; } if test "${gcc_cv_as_sparc_relax+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14774,8 +16783,8 @@ rm -f conftest.o conftest.s fi fi -echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5 -echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5 +echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6; } if test $gcc_cv_as_sparc_relax = yes; then cat >>confdefs.h <<\_ACEOF @@ -14784,8 +16793,8 @@ fi - echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5 -echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5 +echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6; } if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14817,8 +16826,8 @@ rm -f conftest.o conftest.s fi fi -echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5 -echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5 +echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6; } if test $gcc_cv_as_sparc_ua_pcrel = yes; then cat >>confdefs.h <<\_ACEOF @@ -14826,8 +16835,8 @@ _ACEOF - echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5 -echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5 +echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6; } if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14868,8 +16877,8 @@ rm -f conftest.o conftest.s fi fi -echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5 -echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5 +echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6; } if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then cat >>confdefs.h <<\_ACEOF @@ -14880,8 +16889,8 @@ fi # unaligned pcrel relocs - echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5 -echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5 +echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6; } if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14909,8 +16918,8 @@ rm -f conftest.o conftest.s fi fi -echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5 -echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5 +echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6; } if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then cat >>confdefs.h <<\_ACEOF @@ -14924,8 +16933,8 @@ case $target_os in cygwin* | pe | mingw32*) # Used for DWARF 2 in PE - echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5 -echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5 +echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6; } if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14958,8 +16967,8 @@ rm -f conftest.o conftest.s fi fi -echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5 -echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5 +echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6; } if test $gcc_cv_as_ix86_pe_secrel32 = yes; then cat >>confdefs.h <<\_ACEOF @@ -14970,8 +16979,8 @@ ;; esac - echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5 -echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5 +echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6; } if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -14997,8 +17006,8 @@ rm -f conftest.o conftest.s fi fi -echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5 -echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5 +echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6; } if test $gcc_cv_as_ix86_filds_fists = yes; then cat >>confdefs.h <<\_ACEOF @@ -15007,8 +17016,8 @@ fi - echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5 -echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5 +echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6; } if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15030,8 +17039,8 @@ rm -f conftest.o conftest.s fi fi -echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5 -echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5 +echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6; } if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then cat >>confdefs.h <<\_ACEOF @@ -15042,8 +17051,8 @@ # This one is used unconditionally by i386.[ch]; it is to be defined # to 1 if the feature is present, 0 otherwise. - echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5 -echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5 +echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6; } if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15073,8 +17082,8 @@ rm -f conftest.o conftest.s fi fi -echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5 -echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5 +echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6; } cat >>confdefs.h <<_ACEOF @@ -15084,8 +17093,8 @@ ;; ia64*-*-*) - echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5 -echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5 +echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6; } if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15114,8 +17123,8 @@ rm -f conftest.o conftest.s fi fi -echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5 -echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5 +echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6; } if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then cat >>confdefs.h <<\_ACEOF @@ -15131,8 +17140,8 @@ *-*-aix*) conftest_s=' .csect .text[PR] mfcr 3,128';; *-*-darwin*) - echo "$as_me:$LINENO: checking assembler for .machine directive support" >&5 -echo $ECHO_N "checking assembler for .machine directive support... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking assembler for .machine directive support" >&5 +echo $ECHO_N "checking assembler for .machine directive support... $ECHO_C" >&6; } if test "${gcc_cv_as_machine_directive+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15154,8 +17163,8 @@ rm -f conftest.o conftest.s fi fi -echo "$as_me:$LINENO: result: $gcc_cv_as_machine_directive" >&5 -echo "${ECHO_T}$gcc_cv_as_machine_directive" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_as_machine_directive" >&5 +echo "${ECHO_T}$gcc_cv_as_machine_directive" >&6; } if test x$gcc_cv_as_machine_directive != xyes; then echo "*** This target requires an assembler supporting \".machine\"" >&2 @@ -15169,8 +17178,8 @@ mfcr 3,128';; esac - echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5 -echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5 +echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6; } if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15196,8 +17205,8 @@ rm -f conftest.o conftest.s fi fi -echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5 -echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5 +echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6; } if test $gcc_cv_as_powerpc_mfcrf = yes; then cat >>confdefs.h <<\_ACEOF @@ -15208,8 +17217,8 @@ ;; mips*-*-*) - echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5 -echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5 +echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6; } if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15235,8 +17244,8 @@ rm -f conftest.o conftest.s fi fi -echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5 -echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5 +echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6; } if test $gcc_cv_as_mips_explicit_relocs = yes; then if test x$target_cpu_default = x then target_cpu_default=MASK_EXPLICIT_RELOCS @@ -15279,8 +17288,8 @@ .file 1 \"conftest.s\" .loc 1 3 0 $insn" - echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5 -echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5 +echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6; } if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15311,16 +17320,16 @@ rm -f conftest.o conftest.s fi fi -echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5 -echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5 +echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6; } # The .debug_line file table must be in the exact order that # we specified the files, since these indices are also used # by DW_AT_decl_file. Approximate this test by testing if # the assembler bitches if the same index is assigned twice. - echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5 -echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5 +echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6; } if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15343,8 +17352,8 @@ rm -f conftest.o conftest.s fi fi -echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5 -echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5 +echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6; } if test $gcc_cv_as_dwarf2_debug_line = yes \ @@ -15356,8 +17365,8 @@ fi - echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5 -echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5 +echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6; } if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15384,8 +17393,8 @@ rm -f conftest.o conftest.s fi fi -echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5 -echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5 +echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6; } if test $gcc_cv_as_gdwarf2_flag = yes; then cat >>confdefs.h <<\_ACEOF @@ -15394,8 +17403,8 @@ fi - echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5 -echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5 +echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6; } if test "${gcc_cv_as_gstabs_flag+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15433,8 +17442,8 @@ rm -f conftest.o conftest.s fi fi -echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5 -echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5 +echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6; } if test $gcc_cv_as_gstabs_flag = yes; then cat >>confdefs.h <<\_ACEOF @@ -15444,8 +17453,8 @@ fi fi -echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5 -echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5 +echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6; } gcc_cv_ld_ro_rw_mix=unknown if test $in_tree_ld = yes ; then if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10 -o "$gcc_cv_gld_major_version" -gt 2 \ @@ -15482,11 +17491,11 @@ _ACEOF fi -echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5 -echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5 +echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6; } -echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5 -echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5 +echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6; } gcc_cv_ld_eh_frame_hdr=no if test $in_tree_ld = yes ; then if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 12 -o "$gcc_cv_gld_major_version" -gt 2 \ @@ -15506,11 +17515,11 @@ _ACEOF fi -echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5 -echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5 +echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6; } -echo "$as_me:$LINENO: checking linker position independent executable support" >&5 -echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking linker position independent executable support" >&5 +echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6; } gcc_cv_ld_pie=no if test $in_tree_ld = yes ; then if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 15 -o "$gcc_cv_gld_major_version" -gt 2 \ @@ -15530,15 +17539,15 @@ _ACEOF fi -echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5 -echo "${ECHO_T}$gcc_cv_ld_pie" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5 +echo "${ECHO_T}$gcc_cv_ld_pie" >&6; } # -------- # UNSORTED # -------- -echo "$as_me:$LINENO: checking linker --as-needed support" >&5 -echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking linker --as-needed support" >&5 +echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6; } if test "${gcc_cv_ld_as_needed+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15556,8 +17565,8 @@ fi fi -echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5 -echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5 +echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6; } if test x"$gcc_cv_ld_as_needed" = xyes; then cat >>confdefs.h <<\_ACEOF @@ -15568,8 +17577,8 @@ case "$target" in powerpc64*-*-linux*) - echo "$as_me:$LINENO: checking linker support for omitting dot symbols" >&5 -echo $ECHO_N "checking linker support for omitting dot symbols... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking linker support for omitting dot symbols" >&5 +echo $ECHO_N "checking linker support for omitting dot symbols... $ECHO_C" >&6; } if test "${gcc_cv_ld_no_dot_syms+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15604,8 +17613,8 @@ fi fi -echo "$as_me:$LINENO: result: $gcc_cv_ld_no_dot_syms" >&5 -echo "${ECHO_T}$gcc_cv_ld_no_dot_syms" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_ld_no_dot_syms" >&5 +echo "${ECHO_T}$gcc_cv_ld_no_dot_syms" >&6; } if test x"$gcc_cv_ld_no_dot_syms" = xyes; then cat >>confdefs.h <<\_ACEOF @@ -15627,10 +17636,9 @@ # Find out what GC implementation we want, or may, use. -# Check whether --with-gc or --without-gc was given. +# Check whether --with-gc was given. if test "${with_gc+set}" = set; then - withval="$with_gc" - case "$withval" in + withval=$with_gc; case "$withval" in page | zone) GGC=ggc-$withval ;; @@ -15642,38 +17650,39 @@ esac else GGC=ggc-page -fi; +fi + echo "Using $GGC for garbage collection." # Use the system's zlib library. zlibdir=-L../zlib zlibinc="-I\$(srcdir)/../zlib" -# Check whether --with-system-zlib or --without-system-zlib was given. +# Check whether --with-system-zlib was given. if test "${with_system_zlib+set}" = set; then - withval="$with_system_zlib" - zlibdir= + withval=$with_system_zlib; zlibdir= zlibinc= -fi; +fi -echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 -echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 - # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. + +{ echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6; } + # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then - enableval="$enable_maintainer_mode" - maintainer_mode=$enableval + enableval=$enable_maintainer_mode; maintainer_mode=$enableval else maintainer_mode=no -fi; +fi -echo "$as_me:$LINENO: result: $maintainer_mode" >&5 -echo "${ECHO_T}$maintainer_mode" >&6 +{ echo "$as_me:$LINENO: result: $maintainer_mode" >&5 +echo "${ECHO_T}$maintainer_mode" >&6; } + if test "$maintainer_mode" = "yes"; then MAINT='' else @@ -15859,17 +17868,16 @@ # Find a directory in which to install a shared libgcc. -# Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given. +# Check whether --enable-version-specific-runtime-libs was given. if test "${enable_version_specific_runtime_libs+set}" = set; then - enableval="$enable_version_specific_runtime_libs" + enableval=$enable_version_specific_runtime_libs; +fi -fi; -# Check whether --with-slibdir or --without-slibdir was given. +# Check whether --with-slibdir was given. if test "${with_slibdir+set}" = set; then - withval="$with_slibdir" - slibdir="$with_slibdir" + withval=$with_slibdir; slibdir="$with_slibdir" else if test "${enable_version_specific_runtime_libs+set}" = set; then slibdir='$(libsubdir)' @@ -15878,9 +17886,10 @@ else slibdir='$(libdir)' fi -fi; +fi + objdir=`${PWDCMD-pwd}` @@ -15993,10 +18002,10 @@ # Create the Makefile # and configure language subdirectories - ac_config_files="$ac_config_files $all_outputs" +ac_config_files="$ac_config_files $all_outputs" - ac_config_commands="$ac_config_commands default" +ac_config_commands="$ac_config_commands default" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -16016,39 +18025,58 @@ # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. +# So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -{ +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; + ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} | + esac | + sort +) | sed ' + /^ac_cv_env_/b end t clear - : clear + :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - echo "not updating unwritable cache $cache_file" + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -16057,32 +18085,18 @@ # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' -fi - DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. - ac_i=`echo "$ac_i" | - sed 's/\$U\././;s/\.o$//;s/\.obj$//'` - # 2. Add them. - ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -16120,11 +18134,35 @@ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi +BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset @@ -16133,8 +18171,43 @@ fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -16148,18 +18221,19 @@ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -16167,159 +18241,120 @@ # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# CDPATH. +$as_unset CDPATH -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -16328,7 +18363,19 @@ as_mkdir_p=false fi -as_executable_p="test -f" +# Find out whether ``test -x'' works. Don't use a zero-byte file, as +# systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + as_executable_p="test -x" +else + as_executable_p=: +fi +rm -f conf$$.file # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -16337,31 +18384,14 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - exec 6>&1 -# Open the log real soon, to keep \$[0] and so on meaningful, and to +# Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - +# values after options handling. +ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.60. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -16369,30 +18399,20 @@ CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + _ACEOF +cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" -if test -n "$ac_config_headers"; then - echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -fi +_ACEOF -if test -n "$ac_config_links"; then - echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_commands"; then - echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -fi - cat >>$CONFIG_STATUS <<\_ACEOF - ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. @@ -16419,18 +18439,20 @@ $config_commands Report bugs to ." + _ACEOF - cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.59, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.60, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." -srcdir=$srcdir + +ac_pwd='$ac_pwd' +srcdir='$srcdir' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -16441,39 +18463,24 @@ do case $1 in --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; - -*) + *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; esac case $ac_option in # Handling of the options. -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift @@ -16483,18 +18490,24 @@ $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + { echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} + -*) { echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; - *) ac_config_targets="$ac_config_targets $1" ;; + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; esac shift @@ -16510,37 +18523,49 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL + export CONFIG_SHELL + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + echo "$ac_log" +} >&5 +_ACEOF cat >>$CONFIG_STATUS <<_ACEOF # -# INIT-COMMANDS section. +# INIT-COMMANDS # - subdirs='$subdirs' _ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF +# Handling of arguments. for ac_config_target in $ac_config_targets do - case "$ac_config_target" in - # Handling of arguments. - "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;; - "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; - "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;; + case $ac_config_target in + "auto-host.h") CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;; + "$all_outputs") CONFIG_FILES="$CONFIG_FILES $all_outputs" ;; + "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done + # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -16552,823 +18577,755 @@ fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, +# simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. $debug || { - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } - # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF - # -# CONFIG_FILES section. +# Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h -if test -n "\$CONFIG_FILES"; then - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -s, at SHELL@,$SHELL,;t t -s, at PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s, at PACKAGE_NAME@,$PACKAGE_NAME,;t t -s, at PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s, at PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s, at PACKAGE_STRING@,$PACKAGE_STRING,;t t -s, at PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s, at exec_prefix@,$exec_prefix,;t t -s, at prefix@,$prefix,;t t -s, at program_transform_name@,$program_transform_name,;t t -s, at bindir@,$bindir,;t t -s, at sbindir@,$sbindir,;t t -s, at libexecdir@,$libexecdir,;t t -s, at datadir@,$datadir,;t t -s, at sysconfdir@,$sysconfdir,;t t -s, at sharedstatedir@,$sharedstatedir,;t t -s, at localstatedir@,$localstatedir,;t t -s, at libdir@,$libdir,;t t -s, at includedir@,$includedir,;t t -s, at oldincludedir@,$oldincludedir,;t t -s, at infodir@,$infodir,;t t -s, at mandir@,$mandir,;t t -s, at build_alias@,$build_alias,;t t -s, at host_alias@,$host_alias,;t t -s, at target_alias@,$target_alias,;t t -s, at DEFS@,$DEFS,;t t -s, at ECHO_C@,$ECHO_C,;t t -s, at ECHO_N@,$ECHO_N,;t t -s, at ECHO_T@,$ECHO_T,;t t -s, at LIBS@,$LIBS,;t t -s, at build@,$build,;t t -s, at build_cpu@,$build_cpu,;t t -s, at build_vendor@,$build_vendor,;t t -s, at build_os@,$build_os,;t t -s, at host@,$host,;t t -s, at host_cpu@,$host_cpu,;t t -s, at host_vendor@,$host_vendor,;t t -s, at host_os@,$host_os,;t t -s, at target@,$target,;t t -s, at target_cpu@,$target_cpu,;t t -s, at target_vendor@,$target_vendor,;t t -s, at target_os@,$target_os,;t t -s, at target_noncanonical@,$target_noncanonical,;t t -s, at build_subdir@,$build_subdir,;t t -s, at host_subdir@,$host_subdir,;t t -s, at target_subdir@,$target_subdir,;t t -s, at gcc_version_trigger@,$gcc_version_trigger,;t t -s, at gcc_version_full@,$gcc_version_full,;t t -s, at gcc_version@,$gcc_version,;t t -s, at GENINSRC@,$GENINSRC,;t t -s, at CC@,$CC,;t t -s, at CFLAGS@,$CFLAGS,;t t -s, at LDFLAGS@,$LDFLAGS,;t t -s, at CPPFLAGS@,$CPPFLAGS,;t t -s, at ac_ct_CC@,$ac_ct_CC,;t t -s, at EXEEXT@,$EXEEXT,;t t -s, at OBJEXT@,$OBJEXT,;t t -s, at NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t -s, at OUTPUT_OPTION@,$OUTPUT_OPTION,;t t -s, at CPP@,$CPP,;t t -s, at EGREP@,$EGREP,;t t -s, at strict1_warn@,$strict1_warn,;t t -s, at warn_cflags@,$warn_cflags,;t t -s, at WERROR@,$WERROR,;t t -s, at checkingenabled_flag@,$checkingenabled_flag,;t t -s, at nocommon_flag@,$nocommon_flag,;t t -s, at TREEBROWSER@,$TREEBROWSER,;t t -s, at valgrind_path@,$valgrind_path,;t t -s, at valgrind_path_defines@,$valgrind_path_defines,;t t -s, at valgrind_command@,$valgrind_command,;t t -s, at coverage_flags@,$coverage_flags,;t t -s, at enable_multilib@,$enable_multilib,;t t -s, at enable_shared@,$enable_shared,;t t -s, at TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t -s, at TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t -s, at CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t -s, at onestep@,$onestep,;t t -s, at DSYMUTIL@,$DSYMUTIL,;t t -s, at LLVMBASEPATH@,$LLVMBASEPATH,;t t -s, at SET_MAKE@,$SET_MAKE,;t t -s, at AWK@,$AWK,;t t -s, at LN_S@,$LN_S,;t t -s, at LN@,$LN,;t t -s, at RANLIB@,$RANLIB,;t t -s, at ac_ct_RANLIB@,$ac_ct_RANLIB,;t t -s, at ranlib_flags@,$ranlib_flags,;t t -s, at INSTALL@,$INSTALL,;t t -s, at INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t -s, at INSTALL_DATA@,$INSTALL_DATA,;t t -s, at make_compare_target@,$make_compare_target,;t t -s, at have_mktemp_command@,$have_mktemp_command,;t t -s, at MAKEINFO@,$MAKEINFO,;t t -s, at BUILD_INFO@,$BUILD_INFO,;t t -s, at GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t -s, at FLEX@,$FLEX,;t t -s, at BISON@,$BISON,;t t -s, at NM@,$NM,;t t -s, at AR@,$AR,;t t -s, at stage1_cflags@,$stage1_cflags,;t t -s, at COLLECT2_LIBS@,$COLLECT2_LIBS,;t t -s, at GNAT_LIBEXC@,$GNAT_LIBEXC,;t t -s, at LDEXP_LIB@,$LDEXP_LIB,;t t -s, at TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t -s, at LIBICONV@,$LIBICONV,;t t -s, at LTLIBICONV@,$LTLIBICONV,;t t -s, at LIBICONV_DEP@,$LIBICONV_DEP,;t t -s, at manext@,$manext,;t t -s, at objext@,$objext,;t t -s, at gthread_flags@,$gthread_flags,;t t -s, at extra_modes_file@,$extra_modes_file,;t t -s, at PACKAGE@,$PACKAGE,;t t -s, at VERSION@,$VERSION,;t t -s, at USE_NLS@,$USE_NLS,;t t -s, at LIBINTL@,$LIBINTL,;t t -s, at LIBINTL_DEP@,$LIBINTL_DEP,;t t -s, at INCINTL@,$INCINTL,;t t -s, at XGETTEXT@,$XGETTEXT,;t t -s, at GMSGFMT@,$GMSGFMT,;t t -s, at POSUB@,$POSUB,;t t -s, at CATALOGS@,$CATALOGS,;t t -s, at cc_for_cross_gnattools@,$cc_for_cross_gnattools,;t t -s, at CROSS@,$CROSS,;t t -s, at ALL@,$ALL,;t t -s, at SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t -s, at inhibit_libc@,$inhibit_libc,;t t -s, at CC_FOR_BUILD@,$CC_FOR_BUILD,;t t -s, at BUILD_CFLAGS@,$BUILD_CFLAGS,;t t -s, at STMP_FIXINC@,$STMP_FIXINC,;t t -s, at STMP_FIXPROTO@,$STMP_FIXPROTO,;t t -s, at collect2@,$collect2,;t t -s, at libgcc_visibility@,$libgcc_visibility,;t t -s, at GGC@,$GGC,;t t -s, at zlibdir@,$zlibdir,;t t -s, at zlibinc@,$zlibinc,;t t -s, at MAINT@,$MAINT,;t t -s, at gcc_tooldir@,$gcc_tooldir,;t t -s, at dollar@,$dollar,;t t -s, at slibdir@,$slibdir,;t t -s, at objdir@,$objdir,;t t -s, at subdirs@,$subdirs,;t t -s, at srcdir@,$srcdir,;t t -s, at all_boot_languages@,$all_boot_languages,;t t -s, at all_compilers@,$all_compilers,;t t -s, at all_gtfiles@,$all_gtfiles,;t t -s, at all_gtfiles_files_langs@,$all_gtfiles_files_langs,;t t -s, at all_gtfiles_files_files@,$all_gtfiles_files_files,;t t -s, at all_lang_makefrags@,$all_lang_makefrags,;t t -s, at all_lang_makefiles@,$all_lang_makefiles,;t t -s, at all_languages@,$all_languages,;t t -s, at all_stagestuff@,$all_stagestuff,;t t -s, at build_exeext@,$build_exeext,;t t -s, at build_install_headers_dir@,$build_install_headers_dir,;t t -s, at build_xm_file_list@,$build_xm_file_list,;t t -s, at build_xm_include_list@,$build_xm_include_list,;t t -s, at build_xm_defines@,$build_xm_defines,;t t -s, at check_languages@,$check_languages,;t t -s, at cc_set_by_configure@,$cc_set_by_configure,;t t -s, at quoted_cc_set_by_configure@,$quoted_cc_set_by_configure,;t t -s, at cpp_install_dir@,$cpp_install_dir,;t t -s, at xmake_file@,$xmake_file,;t t -s, at tmake_file@,$tmake_file,;t t -s, at extra_gcc_objs@,$extra_gcc_objs,;t t -s, at extra_headers_list@,$extra_headers_list,;t t -s, at extra_objs@,$extra_objs,;t t -s, at extra_parts@,$extra_parts,;t t -s, at extra_passes@,$extra_passes,;t t -s, at extra_programs@,$extra_programs,;t t -s, at float_h_file@,$float_h_file,;t t -s, at gcc_config_arguments@,$gcc_config_arguments,;t t -s, at gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t -s, at libstdcxx_incdir@,$libstdcxx_incdir,;t t -s, at host_exeext@,$host_exeext,;t t -s, at host_xm_file_list@,$host_xm_file_list,;t t -s, at host_xm_include_list@,$host_xm_include_list,;t t -s, at host_xm_defines@,$host_xm_defines,;t t -s, at out_host_hook_obj@,$out_host_hook_obj,;t t -s, at install@,$install,;t t -s, at lang_opt_files@,$lang_opt_files,;t t -s, at lang_specs_files@,$lang_specs_files,;t t -s, at lang_tree_files@,$lang_tree_files,;t t -s, at local_prefix@,$local_prefix,;t t -s, at md_file@,$md_file,;t t -s, at objc_boehm_gc@,$objc_boehm_gc,;t t -s, at out_file@,$out_file,;t t -s, at out_cxx_file@,$out_cxx_file,;t t -s, at out_object_file@,$out_object_file,;t t -s, at out_cxx_object_file@,$out_cxx_object_file,;t t -s, at stage_prefix_set_by_configure@,$stage_prefix_set_by_configure,;t t -s, at quoted_stage_prefix_set_by_configure@,$quoted_stage_prefix_set_by_configure,;t t -s, at thread_file@,$thread_file,;t t -s, at tm_file_list@,$tm_file_list,;t t -s, at tm_include_list@,$tm_include_list,;t t -s, at tm_defines@,$tm_defines,;t t -s, at tm_p_file_list@,$tm_p_file_list,;t t -s, at tm_p_include_list@,$tm_p_include_list,;t t -s, at xm_file_list@,$xm_file_list,;t t -s, at xm_include_list@,$xm_include_list,;t t -s, at xm_defines@,$xm_defines,;t t -s, at c_target_objs@,$c_target_objs,;t t -s, at cxx_target_objs@,$cxx_target_objs,;t t -s, at target_cpu_default@,$target_cpu_default,;t t -s, at set_gcc_lib_path@,$set_gcc_lib_path,;t t -s, at GMPLIBS@,$GMPLIBS,;t t -s, at GMPINC@,$GMPINC,;t t -s, at LIBOBJS@,$LIBOBJS,;t t -s, at LTLIBOBJS@,$LTLIBOBJS,;t t -/@language_hooks@/r $language_hooks -s, at language_hooks@,,;t t -CEOF +if test -n "$CONFIG_FILES"; then _ACEOF - cat >>$CONFIG_STATUS <<\_ACEOF - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. - ac_max_sed_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # Line after last line for current file. - ac_more_lines=: - ac_sed_cmds= - while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat +# Create sed commands to just substitute file output variables. + +# Remaining file output variables are in a fragment that also has non-file +# output varibles. + + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +build!$build$ac_delim +build_cpu!$build_cpu$ac_delim +build_vendor!$build_vendor$ac_delim +build_os!$build_os$ac_delim +host!$host$ac_delim +host_cpu!$host_cpu$ac_delim +host_vendor!$host_vendor$ac_delim +host_os!$host_os$ac_delim +target!$target$ac_delim +target_cpu!$target_cpu$ac_delim +target_vendor!$target_vendor$ac_delim +target_os!$target_os$ac_delim +target_noncanonical!$target_noncanonical$ac_delim +build_subdir!$build_subdir$ac_delim +host_subdir!$host_subdir$ac_delim +target_subdir!$target_subdir$ac_delim +gcc_version_trigger!$gcc_version_trigger$ac_delim +gcc_version_full!$gcc_version_full$ac_delim +gcc_version!$gcc_version$ac_delim +GENINSRC!$GENINSRC$ac_delim +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +NO_MINUS_C_MINUS_O!$NO_MINUS_C_MINUS_O$ac_delim +OUTPUT_OPTION!$OUTPUT_OPTION$ac_delim +CPP!$CPP$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +strict1_warn!$strict1_warn$ac_delim +warn_cflags!$warn_cflags$ac_delim +WERROR!$WERROR$ac_delim +checkingenabled_flag!$checkingenabled_flag$ac_delim +nocommon_flag!$nocommon_flag$ac_delim +TREEBROWSER!$TREEBROWSER$ac_delim +valgrind_path!$valgrind_path$ac_delim +valgrind_path_defines!$valgrind_path_defines$ac_delim +valgrind_command!$valgrind_command$ac_delim +coverage_flags!$coverage_flags$ac_delim +enable_multilib!$enable_multilib$ac_delim +enable_shared!$enable_shared$ac_delim +TARGET_SYSTEM_ROOT!$TARGET_SYSTEM_ROOT$ac_delim +TARGET_SYSTEM_ROOT_DEFINE!$TARGET_SYSTEM_ROOT_DEFINE$ac_delim +CROSS_SYSTEM_HEADER_DIR!$CROSS_SYSTEM_HEADER_DIR$ac_delim +onestep!$onestep$ac_delim +DSYMUTIL!$DSYMUTIL$ac_delim +LLVMBASEPATH!$LLVMBASEPATH$ac_delim +LLVMBUILDMODE!$LLVMBUILDMODE$ac_delim +SET_MAKE!$SET_MAKE$ac_delim +AWK!$AWK$ac_delim +LN_S!$LN_S$ac_delim +LN!$LN$ac_delim +RANLIB!$RANLIB$ac_delim +ranlib_flags!$ranlib_flags$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 94; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi -fi # test -n "$CONFIG_FILES" +done +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +/^[ ]*@language_hooks@[ ]*$/{ +r $language_hooks +d +} _ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +INSTALL!$INSTALL$ac_delim +INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim +INSTALL_DATA!$INSTALL_DATA$ac_delim +make_compare_target!$make_compare_target$ac_delim +have_mktemp_command!$have_mktemp_command$ac_delim +MAKEINFO!$MAKEINFO$ac_delim +BUILD_INFO!$BUILD_INFO$ac_delim +GENERATED_MANPAGES!$GENERATED_MANPAGES$ac_delim +FLEX!$FLEX$ac_delim +BISON!$BISON$ac_delim +NM!$NM$ac_delim +AR!$AR$ac_delim +stage1_cflags!$stage1_cflags$ac_delim +COLLECT2_LIBS!$COLLECT2_LIBS$ac_delim +GNAT_LIBEXC!$GNAT_LIBEXC$ac_delim +LDEXP_LIB!$LDEXP_LIB$ac_delim +TARGET_GETGROUPS_T!$TARGET_GETGROUPS_T$ac_delim +LIBICONV!$LIBICONV$ac_delim +LTLIBICONV!$LTLIBICONV$ac_delim +LIBICONV_DEP!$LIBICONV_DEP$ac_delim +manext!$manext$ac_delim +objext!$objext$ac_delim +gthread_flags!$gthread_flags$ac_delim +extra_modes_file!$extra_modes_file$ac_delim +PACKAGE!$PACKAGE$ac_delim +VERSION!$VERSION$ac_delim +USE_NLS!$USE_NLS$ac_delim +LIBINTL!$LIBINTL$ac_delim +LIBINTL_DEP!$LIBINTL_DEP$ac_delim +INCINTL!$INCINTL$ac_delim +XGETTEXT!$XGETTEXT$ac_delim +GMSGFMT!$GMSGFMT$ac_delim +POSUB!$POSUB$ac_delim +CATALOGS!$CATALOGS$ac_delim +cc_for_cross_gnattools!$cc_for_cross_gnattools$ac_delim +CROSS!$CROSS$ac_delim +ALL!$ALL$ac_delim +SYSTEM_HEADER_DIR!$SYSTEM_HEADER_DIR$ac_delim +inhibit_libc!$inhibit_libc$ac_delim +CC_FOR_BUILD!$CC_FOR_BUILD$ac_delim +BUILD_CFLAGS!$BUILD_CFLAGS$ac_delim +STMP_FIXINC!$STMP_FIXINC$ac_delim +STMP_FIXPROTO!$STMP_FIXPROTO$ac_delim +collect2!$collect2$ac_delim +libgcc_visibility!$libgcc_visibility$ac_delim +GGC!$GGC$ac_delim +zlibdir!$zlibdir$ac_delim +zlibinc!$zlibinc$ac_delim +MAINT!$MAINT$ac_delim +gcc_tooldir!$gcc_tooldir$ac_delim +dollar!$dollar$ac_delim +slibdir!$slibdir$ac_delim +objdir!$objdir$ac_delim +subdirs!$subdirs$ac_delim +srcdir!$srcdir$ac_delim +all_boot_languages!$all_boot_languages$ac_delim +all_compilers!$all_compilers$ac_delim +all_gtfiles!$all_gtfiles$ac_delim +all_gtfiles_files_langs!$all_gtfiles_files_langs$ac_delim +all_gtfiles_files_files!$all_gtfiles_files_files$ac_delim +all_lang_makefrags!$all_lang_makefrags$ac_delim +all_lang_makefiles!$all_lang_makefiles$ac_delim +all_languages!$all_languages$ac_delim +all_stagestuff!$all_stagestuff$ac_delim +build_exeext!$build_exeext$ac_delim +build_install_headers_dir!$build_install_headers_dir$ac_delim +build_xm_file_list!$build_xm_file_list$ac_delim +build_xm_include_list!$build_xm_include_list$ac_delim +build_xm_defines!$build_xm_defines$ac_delim +check_languages!$check_languages$ac_delim +cc_set_by_configure!$cc_set_by_configure$ac_delim +quoted_cc_set_by_configure!$quoted_cc_set_by_configure$ac_delim +cpp_install_dir!$cpp_install_dir$ac_delim +xmake_file!$xmake_file$ac_delim +tmake_file!$tmake_file$ac_delim +extra_gcc_objs!$extra_gcc_objs$ac_delim +extra_headers_list!$extra_headers_list$ac_delim +extra_objs!$extra_objs$ac_delim +extra_parts!$extra_parts$ac_delim +extra_passes!$extra_passes$ac_delim +extra_programs!$extra_programs$ac_delim +float_h_file!$float_h_file$ac_delim +gcc_config_arguments!$gcc_config_arguments$ac_delim +gcc_gxx_include_dir!$gcc_gxx_include_dir$ac_delim +libstdcxx_incdir!$libstdcxx_incdir$ac_delim +host_exeext!$host_exeext$ac_delim +host_xm_file_list!$host_xm_file_list$ac_delim +host_xm_include_list!$host_xm_include_list$ac_delim +host_xm_defines!$host_xm_defines$ac_delim +out_host_hook_obj!$out_host_hook_obj$ac_delim +install!$install$ac_delim +lang_opt_files!$lang_opt_files$ac_delim +lang_specs_files!$lang_specs_files$ac_delim +lang_tree_files!$lang_tree_files$ac_delim +local_prefix!$local_prefix$ac_delim +md_file!$md_file$ac_delim +objc_boehm_gc!$objc_boehm_gc$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +out_file!$out_file$ac_delim +out_cxx_file!$out_cxx_file$ac_delim +out_object_file!$out_object_file$ac_delim +out_cxx_object_file!$out_cxx_object_file$ac_delim +stage_prefix_set_by_configure!$stage_prefix_set_by_configure$ac_delim +quoted_stage_prefix_set_by_configure!$quoted_stage_prefix_set_by_configure$ac_delim +thread_file!$thread_file$ac_delim +tm_file_list!$tm_file_list$ac_delim +tm_include_list!$tm_include_list$ac_delim +tm_defines!$tm_defines$ac_delim +tm_p_file_list!$tm_p_file_list$ac_delim +tm_p_include_list!$tm_p_include_list$ac_delim +xm_file_list!$xm_file_list$ac_delim +xm_include_list!$xm_include_list$ac_delim +xm_defines!$xm_defines$ac_delim +c_target_objs!$c_target_objs$ac_delim +cxx_target_objs!$cxx_target_objs$ac_delim +target_cpu_default!$target_cpu_default$ac_delim +set_gcc_lib_path!$set_gcc_lib_path$ac_delim +GMPLIBS!$GMPLIBS$ac_delim +GMPINC!$GMPINC$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +LTLIBOBJS!$LTLIBOBJS$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 23; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-3.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof +_ACEOF + + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + cat >>$CONFIG_STATUS <<\_ACEOF -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + ac_file_inputs="$ac_file_inputs $ac_f" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input="Generated from "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + fi + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } - ac_builddir=. -if test "$ac_dir" != .; then +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + case $ac_mode in + :F) + # + # CONFIG_FILE + # +_ACEOF - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." +cat >>$CONFIG_STATUS <<\_ACEOF +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } +case `sed -n '/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $ac_file_inputs` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s, at configure_input@,$configure_input,;t t -s, at srcdir@,$ac_srcdir,;t t -s, at abs_srcdir@,$ac_abs_srcdir,;t t -s, at top_srcdir@,$ac_top_srcdir,;t t -s, at abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s, at builddir@,$ac_builddir,;t t -s, at abs_builddir@,$ac_abs_builddir,;t t -s, at top_builddir@,$ac_top_builddir,;t t -s, at abs_top_builddir@,$ac_abs_top_builddir,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +$ac_datarootdir_hack +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" | sed -f "$tmp/subs-3.sed" >$tmp/out -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} -# -# CONFIG_HEADER section. -# - -# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -# NAME is the cpp macro being defined and VALUE is the value it is being given. -# -# ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='[ ].*$,\1#\2' -ac_dC=' ' -ac_dD=',;t' -# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='$,\1#\2define\3' -ac_uC=' ' -ac_uD=',;t' - -for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + rm -f "$tmp/stdin" case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; esac + ;; + :H) + # + # CONFIG_HEADER + # +_ACEOF - test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} +# Transform confdefs.h into a sed script `conftest.defines', that +# substitutes the proper values into config.h.in to produce config.h. +rm -f conftest.defines conftest.tail +# First, append a space to every undef/define line, to ease matching. +echo 's/$/ /' >conftest.defines +# Then, protect against being on the right side of a sed subst, or in +# an unquoted here document, in config.status. If some macros were +# called several times there might be several #defines for the same +# symbol, which is useless. But do not sort them, since the last +# AC_DEFINE must be honored. +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where +# NAME is the cpp macro being defined, VALUE is the value it is being given. +# PARAMS is the parameter list in the macro definition--in most cases, it's +# just an empty string. +ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' +ac_dB='\\)[ (].*,\\1define\\2' +ac_dC=' ' +ac_dD=' ,' - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - # Do quote $f, to prevent DOS paths from being IFS'd. - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } - # Remove the trailing spaces. - sed 's/[ ]*$//' $ac_file_inputs >$tmp/in +uniq confdefs.h | + sed -n ' + t rset + :rset + s/^[ ]*#[ ]*define[ ][ ]*// + t ok + d + :ok + s/[\\&,]/\\&/g + s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p + s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p + ' >>conftest.defines -_ACEOF - -# Transform confdefs.h into two sed scripts, `conftest.defines' and -# `conftest.undefs', that substitutes the proper values into -# config.h.in to produce config.h. The first handles `#define' -# templates, and the second `#undef' templates. -# And first: Protect against being on the right side of a sed subst in -# config.status. Protect against being in an unquoted here document -# in config.status. -rm -f conftest.defines conftest.undefs -# Using a here document instead of a string reduces the quoting nightmare. -# Putting comments in sed scripts is not portable. -# -# `end' is used to avoid that the second main sed command (meant for -# 0-ary CPP macros) applies to n-ary macro definitions. -# See the Autoconf documentation for `clear'. -cat >confdef2sed.sed <<\_ACEOF -s/[\\&,]/\\&/g -s,[\\$`],\\&,g -t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp -t end -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp -: end -_ACEOF -# If some macros were called several times there might be several times -# the same #defines, which is useless. Nevertheless, we may not want to -# sort them, since we want the *last* AC-DEFINE to be honored. -uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines -sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs -rm -f confdef2sed.sed - -# This sed command replaces #undef with comments. This is necessary, for +# Remove the space that was appended to ease matching. +# Then replace #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. -cat >>conftest.undefs <<\_ACEOF -s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, -_ACEOF +# (The regexp can be short, since the line contains either #define or #undef.) +echo 's/ $// +s,^[ #]*u.*,/* & */,' >>conftest.defines -# Break up conftest.defines because some shells have a limit on the size -# of here documents, and old seds have small limits too (100 cmds). -echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS -echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS -echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS -echo ' :' >>$CONFIG_STATUS -rm -f conftest.tail -while grep . conftest.defines >/dev/null +# Break up conftest.defines: +ac_max_sed_lines=50 + +# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" +# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" +# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" +# et cetera. +ac_in='$ac_file_inputs' +ac_out='"$tmp/out1"' +ac_nxt='"$tmp/out2"' + +while : do - # Write a limited-size here document to $tmp/defines.sed. - echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS - # Speed up: don't consider the non `#define' lines. - echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS - # Work around the forget-to-reset-the-flag bug. - echo 't clr' >>$CONFIG_STATUS - echo ': clr' >>$CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS + # Write a here document: + cat >>$CONFIG_STATUS <<_ACEOF + # First, check the format of the line: + cat >"\$tmp/defines.sed" <<\\CEOF +/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def +/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def +b +:def +_ACEOF + sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF - sed -f $tmp/defines.sed $tmp/in >$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in -' >>$CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail + sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS + ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in + sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail + grep . conftest.tail >/dev/null || break rm -f conftest.defines mv conftest.tail conftest.defines done -rm -f conftest.defines -echo ' fi # grep' >>$CONFIG_STATUS -echo >>$CONFIG_STATUS +rm -f conftest.defines conftest.tail -# Break up conftest.undefs because some shells have a limit on the size -# of here documents, and old seds have small limits too (100 cmds). -echo ' # Handle all the #undef templates' >>$CONFIG_STATUS -rm -f conftest.tail -while grep . conftest.undefs >/dev/null -do - # Write a limited-size here document to $tmp/undefs.sed. - echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS - # Speed up: don't consider the non `#undef' - echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS - # Work around the forget-to-reset-the-flag bug. - echo 't clr' >>$CONFIG_STATUS - echo ': clr' >>$CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS - echo 'CEOF - sed -f $tmp/undefs.sed $tmp/in >$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in -' >>$CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail - rm -f conftest.undefs - mv conftest.tail conftest.undefs -done -rm -f conftest.undefs - +echo "ac_result=$ac_in" >>$CONFIG_STATUS cat >>$CONFIG_STATUS <<\_ACEOF - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - echo "/* Generated by configure. */" >$tmp/config.h - else - echo "/* $ac_file. Generated by configure. */" >$tmp/config.h - fi - cat $tmp/in >>$tmp/config.h - rm -f $tmp/in if test x"$ac_file" != x-; then - if diff $ac_file $tmp/config.h >/dev/null 2>&1; then + echo "/* $configure_input */" >"$tmp/config.h" + cat "$ac_result" >>"$tmp/config.h" + if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else - ac_dir=`(dirname "$ac_file") 2>/dev/null || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - rm -f $ac_file - mv $tmp/config.h $ac_file + mv "$tmp/config.h" $ac_file fi else - cat $tmp/config.h - rm -f $tmp/config.h + echo "/* $configure_input */" + cat "$ac_result" fi -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF + rm -f "$tmp/out12" + ;; -# -# CONFIG_COMMANDS section. -# -for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue - ac_dest=`echo "$ac_file" | sed 's,:.*,,'` - ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_dir=`(dirname "$ac_dest") 2>/dev/null || -$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_dest" : 'X\(//\)[^/]' \| \ - X"$ac_dest" : 'X\(//\)$' \| \ - X"$ac_dest" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_dest" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } + :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 +echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac - ac_builddir=. -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi - -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - - { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 -echo "$as_me: executing $ac_dest commands" >&6;} - case $ac_dest in - default ) + case $ac_file$ac_mode in + "default":C) case ${CONFIG_HEADERS} in *auto-host.h:config.in*) echo > cstamp-h ;; @@ -17399,11 +19356,10 @@ ;; esac ;; + esac -done -_ACEOF +done # for ac_tag -cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF Index: libcpp/configure.ac =================================================================== --- libcpp/configure.ac (revision 361) +++ libcpp/configure.ac (working copy) @@ -104,13 +104,16 @@ [Define if you want more run-time sanity checks.]) fi +# Cray [dag]: These comments cannot be in the middle of continuation +# lines (autoconf 2.60) + # APPLE LOCAL begin 4126124 + #APPLE LOCAL begin LLVM + #APPLE LOCAL end LLVM + # APPLE LOCAL end 4126124 m4_changequote(,) case $target in - # APPLE LOCAL begin 4126124 alpha*-*-* | \ - #APPLE LOCAL begin LLVM arm*-*-*eabi* | \ - #APPLE LOCAL end LLVM arm*-*-symbianelf* | \ x86_64-*-* | \ ia64-*-* | \ @@ -126,7 +129,6 @@ sparcv9-*-solaris2* | \ sparc-*-solaris2.[789] | sparc-*-solaris2.1[0-9]* | \ sh[123456789l]*-*-*) - # APPLE LOCAL end 4126124 need_64bit_hwint=yes ;; *) need_64bit_hwint=no ;; @@ -161,10 +163,28 @@ if test -x "$LLVMBASEPATH/Release/bin/llc$EXEEXT"; then echo Found Release LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Release" elif test -x "$LLVMBASEPATH/Debug/bin/llc$EXEEXT"; then echo Found Debug LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Debug" elif test -x "$LLVMBASEPATH/Release-Asserts/bin/llc$EXEEXT"; then echo Found Release-Asserts LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Release-Asserts" + elif test -x "$LLVMBASEPATH/Debug-Asserts/bin/llc$EXEEXT"; then + echo Found Debug-Asserts LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Debug-Asserts" + elif test -x "$LLVMBASEPATH/Release+Checks/bin/llc$EXEEXT"; then + echo Found Release+Checks LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Release+Checks" + elif test -x "$LLVMBASEPATH/Debug+Checks/bin/llc$EXEEXT"; then + echo Found Debug+Checks LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Debug+Checks" + elif test -x "$LLVMBASEPATH/Release-Asserts+Checks/bin/llc$EXEEXT"; then + echo Found Release-Asserts+Checks LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Release-Asserts+Checks" + elif test -x "$LLVMBASEPATH/Debug-Asserts+Checks/bin/llc$EXEEXT"; then + echo Found Debug-Asserts+Checks LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Debug-Asserts+Checks" else AC_MSG_ERROR([You must specify valid path to your LLVM tree with --enable-llvm=DIR]) fi Index: libcpp/configure =================================================================== --- libcpp/configure (revision 361) +++ libcpp/configure (working copy) @@ -1,10 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for cpplib . +# Generated by GNU Autoconf 2.60 for cpplib . # # Report bugs to . # -# Copyright (C) 2003 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## @@ -18,11 +19,35 @@ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi +BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset @@ -31,8 +56,43 @@ fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -46,18 +106,19 @@ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -65,157 +126,386 @@ # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# CDPATH. +$as_unset CDPATH -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no fi + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +for as_dir in /usr/bin/posix$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in + case $as_dir in /*) - if ("$as_dir/$as_base" -c ' + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf at gnu.org about your system, + echo including any error possibly output before this + echo message +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || + chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -224,7 +514,19 @@ as_mkdir_p=false fi -as_executable_p="test -f" +# Find out whether ``test -x'' works. Don't use a zero-byte file, as +# systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + as_executable_p="test -x" +else + as_executable_p=: +fi +rm -f conf$$.file # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -233,39 +535,27 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" -# CDPATH. -$as_unset CDPATH +exec 7<&0 &1 - # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` -exec 6>&1 - # # Initializations. # ac_default_prefix=/usr/local +ac_clean_files= ac_config_libobj_dir=. +LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -# This variable seems obsolete. It should probably be removed, and -# only ac_max_sed_lines should be used. -: ${ac_max_here_lines=38} - # Identity of this package. PACKAGE_NAME='cpplib' PACKAGE_TARNAME='cpplib' @@ -302,18 +592,112 @@ #endif #if HAVE_INTTYPES_H # include -#else -# if HAVE_STDINT_H -# include -# endif #endif +#if HAVE_STDINT_H +# include +#endif #if HAVE_UNISTD_H # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os SET_MAKE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT RANLIB ac_ct_RANLIB ACLOCAL AUTOCONF AUTOHEADER WARN_CFLAGS WARN_PEDANTIC WERROR CPP EGREP LIBOBJS ALLOCA USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS LIBICONV LTLIBICONV PACKAGE USED_CATALOGS MAINT LLVMBASEPATH LTLIBOBJS' +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +build +build_cpu +build_vendor +build_os +host +host_cpu +host_vendor +host_os +target +target_cpu +target_vendor +target_os +SET_MAKE +INSTALL_PROGRAM +INSTALL_SCRIPT +INSTALL_DATA +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +RANLIB +ACLOCAL +AUTOCONF +AUTOHEADER +WARN_CFLAGS +WARN_PEDANTIC +WERROR +CPP +GREP +EGREP +LIBOBJS +ALLOCA +USE_NLS +LIBINTL +LIBINTL_DEP +INCINTL +XGETTEXT +GMSGFMT +POSUB +CATALOGS +LIBICONV +LTLIBICONV +PACKAGE +USED_CATALOGS +MAINT +LLVMBASEPATH +LTLIBOBJS' ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +CPPFLAGS +CPP' + # Initialize some variables set by options. ac_init_help= ac_init_version=false @@ -339,34 +723,48 @@ # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' +datarootdir='${prefix}/share' +datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' ac_prev= +ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" + eval $ac_prev=\$ac_option ac_prev= continue fi - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_option in + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -388,12 +786,18 @@ --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) + -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. @@ -401,8 +805,18 @@ { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` - eval "enable_$ac_feature=no" ;; + eval enable_$ac_feature=no ;; + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. @@ -410,11 +824,7 @@ { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "enable_$ac_feature='$ac_optarg'" ;; + eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -441,6 +851,12 @@ -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -465,13 +881,16 @@ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) + | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -536,6 +955,16 @@ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -592,11 +1021,7 @@ { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "with_$ac_package='$ac_optarg'" ;; + eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` @@ -605,7 +1030,7 @@ { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` - eval "with_$ac_package=no" ;; + eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. @@ -636,8 +1061,7 @@ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - eval "$ac_envvar='$ac_optarg'" + eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) @@ -657,29 +1081,21 @@ { (exit 1); exit 1; }; } fi -# Be sure to have absolute paths. -for ac_var in exec_prefix prefix +# Be sure to have absolute directory names. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir do - eval ac_val=$`echo $ac_var` + eval ac_val=\$$ac_var case $ac_val in - [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } done -# Be sure to have absolute paths. -for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -done - # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. @@ -704,74 +1120,76 @@ test "$silent" = yes && exec 6>/dev/null +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_confdir=`(dirname "$0") 2>/dev/null || + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then + if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } - else - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } - fi + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. fi -(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || - { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 - { (exit 1); exit 1; }; } -srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` -ac_env_build_alias_set=${build_alias+set} -ac_env_build_alias_value=$build_alias -ac_cv_env_build_alias_set=${build_alias+set} -ac_cv_env_build_alias_value=$build_alias -ac_env_host_alias_set=${host_alias+set} -ac_env_host_alias_value=$host_alias -ac_cv_env_host_alias_set=${host_alias+set} -ac_cv_env_host_alias_value=$host_alias -ac_env_target_alias_set=${target_alias+set} -ac_env_target_alias_value=$target_alias -ac_cv_env_target_alias_set=${target_alias+set} -ac_cv_env_target_alias_value=$target_alias -ac_env_CC_set=${CC+set} -ac_env_CC_value=$CC -ac_cv_env_CC_set=${CC+set} -ac_cv_env_CC_value=$CC -ac_env_CFLAGS_set=${CFLAGS+set} -ac_env_CFLAGS_value=$CFLAGS -ac_cv_env_CFLAGS_set=${CFLAGS+set} -ac_cv_env_CFLAGS_value=$CFLAGS -ac_env_LDFLAGS_set=${LDFLAGS+set} -ac_env_LDFLAGS_value=$LDFLAGS -ac_cv_env_LDFLAGS_set=${LDFLAGS+set} -ac_cv_env_LDFLAGS_value=$LDFLAGS -ac_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_env_CPPFLAGS_value=$CPPFLAGS -ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_cv_env_CPPFLAGS_value=$CPPFLAGS -ac_env_CPP_set=${CPP+set} -ac_env_CPP_value=$CPP -ac_cv_env_CPP_set=${CPP+set} -ac_cv_env_CPP_value=$CPP +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done # # Report the --help message. @@ -800,9 +1218,6 @@ -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] -_ACEOF - - cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] @@ -820,15 +1235,22 @@ --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] - --infodir=DIR info documentation [PREFIX/info] - --mandir=DIR man documentation [PREFIX/man] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/cpplib] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -867,8 +1289,8 @@ CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have - headers in a nonstandard directory + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help @@ -876,120 +1298,86 @@ Report bugs to . _ACEOF +ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. - ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d $ac_dir || continue + test -d "$ac_dir" || continue ac_builddir=. -if test "$ac_dir" != .; then +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - cd $ac_dir - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_srcdir/configure.gnu; then - echo - $SHELL $ac_srcdir/configure.gnu --help=recursive - elif test -f $ac_srcdir/configure; then - echo - $SHELL $ac_srcdir/configure --help=recursive - elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then - echo - $ac_configure --help + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi - cd $ac_popdir + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } done fi -test -n "$ac_init_help" && exit 0 +test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF cpplib configure -generated by GNU Autoconf 2.59 +generated by GNU Autoconf 2.60 -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit 0 + exit fi -exec 5>config.log -cat >&5 <<_ACEOF +cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by cpplib $as_me , which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.60. Invocation command line was $ $0 $@ _ACEOF +exec 5>>config.log { cat <<_ASUNAME ## --------- ## @@ -1008,7 +1396,7 @@ /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` @@ -1022,6 +1410,7 @@ test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done +IFS=$as_save_IFS } >&5 @@ -1043,7 +1432,6 @@ ac_configure_args= ac_configure_args0= ac_configure_args1= -ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -1054,7 +1442,7 @@ -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in @@ -1076,9 +1464,7 @@ -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " + ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done @@ -1089,8 +1475,8 @@ # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. -# WARNING: Be sure not to use single quotes in there, as some shells, -# such as our DU 5.0 friend, will then `close' the trap. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -1103,20 +1489,34 @@ _ASBOX echo # The following way of writing the cache mishandles newlines in values, -{ +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( *) - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} + esac | + sort +) echo cat <<\_ASBOX @@ -1127,22 +1527,28 @@ echo for ac_var in $ac_subst_vars do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------- ## -## Output files. ## -## ------------- ## +## ------------------- ## +## File substitutions. ## +## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -1154,26 +1560,24 @@ ## ----------- ## _ASBOX echo - sed "/^$/d" confdefs.h | sort + cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core && - rm -rf conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status - ' 0 +' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo >confdefs.h +rm -f -r conftest* confdefs.h # Predefined preprocessor variables. @@ -1204,14 +1608,17 @@ # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi +if test -n "$CONFIG_SITE"; then + set x "$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + set x "$prefix/share/config.site" "$prefix/etc/config.site" +else + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" fi -for ac_site_file in $CONFIG_SITE; do +shift +for ac_site_file +do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} @@ -1227,8 +1634,8 @@ { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . $cache_file;; - *) . ./$cache_file;; + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; esac fi else @@ -1240,12 +1647,11 @@ # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do +for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val="\$ac_cv_env_${ac_var}_value" - eval ac_new_val="\$ac_env_${ac_var}_value" + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 @@ -1270,8 +1676,7 @@ # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1288,11 +1693,6 @@ { (exit 1); exit 1; }; } fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu @@ -1317,120 +1717,172 @@ +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu - case ../config in [\\/]* | ?:[\\/]* ) ac_macro_dir=../config ;; *) ac_macro_dir=$srcdir/../config ;; esac -if test -d "$ac_macro_dir"; then : -else +test -d "$ac_macro_dir" || { { echo "$as_me:$LINENO: error: cannot find macro directory \`../config'" >&5 echo "$as_me: error: cannot find macro directory \`../config'" >&2;} { (exit 1); exit 1; }; } -fi ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/install-sh; then +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break - elif test -f $ac_dir/install.sh; then + elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break - elif test -f $ac_dir/shtool; then + elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 -echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 +echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} { (exit 1); exit 1; }; } fi -ac_config_guess="$SHELL $ac_aux_dir/config.guess" -ac_config_sub="$SHELL $ac_aux_dir/config.sub" -ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + # Make sure we can run config.sub. -$ac_config_sub sun4 >/dev/null 2>&1 || - { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 -echo "$as_me: error: cannot run $ac_config_sub" >&2;} +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 +echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} { (exit 1); exit 1; }; } -echo "$as_me:$LINENO: checking build system type" >&5 -echo $ECHO_N "checking build system type... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6; } if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_build_alias=$build_alias -test -z "$ac_cv_build_alias" && - ac_cv_build_alias=`$ac_config_guess` -test -z "$ac_cv_build_alias" && + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } -ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -echo "${ECHO_T}$ac_cv_build" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 +echo "$as_me: error: invalid value of canonical build" >&2;} + { (exit 1); exit 1; }; };; +esac build=$ac_cv_build -build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -echo "$as_me:$LINENO: checking host system type" >&5 -echo $ECHO_N "checking host system type... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6; } if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_host_alias=$host_alias -test -z "$ac_cv_host_alias" && - ac_cv_host_alias=$ac_cv_build_alias -ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } +fi fi -echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -echo "${ECHO_T}$ac_cv_host" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 +echo "$as_me: error: invalid value of canonical host" >&2;} + { (exit 1); exit 1; }; };; +esac host=$ac_cv_host -host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac -echo "$as_me:$LINENO: checking target system type" >&5 -echo $ECHO_N "checking target system type... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking target system type" >&5 +echo $ECHO_N "checking target system type... $ECHO_C" >&6; } if test "${ac_cv_target+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_target_alias=$target_alias -test "x$ac_cv_target_alias" = "x" && - ac_cv_target_alias=$ac_cv_host_alias -ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} + if test "x$target_alias" = x; then + ac_cv_target=$ac_cv_host +else + ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;} { (exit 1); exit 1; }; } +fi fi -echo "$as_me:$LINENO: result: $ac_cv_target" >&5 -echo "${ECHO_T}$ac_cv_target" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_target" >&5 +echo "${ECHO_T}$ac_cv_target" >&6; } +case $ac_cv_target in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5 +echo "$as_me: error: invalid value of canonical target" >&2;} + { (exit 1); exit 1; }; };; +esac target=$ac_cv_target -target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_target +shift +target_cpu=$1 +target_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +target_os=$* +IFS=$ac_save_IFS +case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # The aliases save the names the user supplied, while $host etc. @@ -1441,32 +1893,33 @@ program_prefix=${target_alias}- # Checks for programs. -echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then +{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } +set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF +SHELL = /bin/sh all: - @echo 'ac_maketemp="$(MAKE)"' + @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. -eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` -if test -n "$ac_maketemp"; then - eval ac_cv_prog_make_${ac_make}_set=yes -else - eval ac_cv_prog_make_${ac_make}_set=no -fi +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac rm -f conftest.make fi -if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } SET_MAKE= else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -1483,8 +1936,8 @@ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. -echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1506,7 +1959,7 @@ # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -1525,21 +1978,22 @@ ;; esac done +IFS=$as_save_IFS fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is - # removed, or if the path is relative. + # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi -echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6 +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -1557,8 +2011,8 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1571,32 +2025,34 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1609,36 +2065,51 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1651,74 +2122,34 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 + fi -done -done - fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi - -fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1732,7 +2163,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -1743,6 +2174,7 @@ fi done done +IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -1760,22 +2192,23 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1788,36 +2221,38 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1830,29 +2265,45 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$ac_ct_CC" && break done - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi fi fi @@ -1865,21 +2316,35 @@ { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 +echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } @@ -1904,46 +2369,70 @@ # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 - (eval $ac_link_default) 2>&5 +# +# List of possible output files, starting from the most likely. +# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +# only as a last resort. b.out is created by i960 compilers. +ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +# +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - # Find the output, starting from the most likely. This scheme is -# not robust to junk in `.', hence go to wildcards (a.*) only as a last -# resort. - -# Be careful to initialize this variable, since it used to be cached. -# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. -ac_cv_exeext= -# b.out is created by i960 compilers. -for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; - conftest.$ac_ext ) - # This is the source file. - ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool, - # but it would be cool to find out if it's true. Does anybody - # maintain Libtool? --akim. - export ac_cv_exeext + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. break;; * ) break;; esac done +test "$ac_cv_exeext" = no && ac_cv_exeext= + else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -1956,19 +2445,23 @@ fi ac_exeext=$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6 +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -1987,22 +2480,27 @@ fi fi fi -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6 +{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6; } -echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then @@ -2013,9 +2511,8 @@ for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext break;; * ) break;; esac @@ -2029,14 +2526,14 @@ fi rm -f conftest$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2056,14 +2553,20 @@ } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac @@ -2081,12 +2584,12 @@ rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2109,24 +2612,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2135,24 +2650,28 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_compiler_gnu=no + ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2168,24 +2687,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2194,12 +2725,131 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_prog_cc_g=no + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -2215,12 +2865,12 @@ CFLAGS= fi fi -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_prog_cc_stdc=no + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2254,12 +2904,17 @@ /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 is added to get + as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ + that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -2274,205 +2929,74 @@ return 0; } _ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break + ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break done -rm -f conftest.$ac_ext conftest.$ac_objext +rm -f conftest.$ac_ext CC=$ac_save_CC fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF -#ifndef __cplusplus - choke me -#endif -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -#include -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -continue -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -2482,8 +3006,8 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2496,32 +3020,34 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6 + { echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2534,27 +3060,41 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS - test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - RANLIB=$ac_ct_RANLIB + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi else RANLIB="$ac_cv_prog_RANLIB" fi @@ -2565,8 +3105,8 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ACLOCAL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2579,25 +3119,27 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ACLOCAL="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ACLOCAL=$ac_cv_prog_ACLOCAL if test -n "$ACLOCAL"; then - echo "$as_me:$LINENO: result: $ACLOCAL" >&5 -echo "${ECHO_T}$ACLOCAL" >&6 + { echo "$as_me:$LINENO: result: $ACLOCAL" >&5 +echo "${ECHO_T}$ACLOCAL" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$ACLOCAL" && break done test -n "$ACLOCAL" || ACLOCAL="$MISSING aclocal" @@ -2606,8 +3148,8 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AUTOCONF+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2620,25 +3162,27 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AUTOCONF="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi AUTOCONF=$ac_cv_prog_AUTOCONF if test -n "$AUTOCONF"; then - echo "$as_me:$LINENO: result: $AUTOCONF" >&5 -echo "${ECHO_T}$AUTOCONF" >&6 + { echo "$as_me:$LINENO: result: $AUTOCONF" >&5 +echo "${ECHO_T}$AUTOCONF" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$AUTOCONF" && break done test -n "$AUTOCONF" || AUTOCONF="$MISSING autoconf" @@ -2647,8 +3191,8 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AUTOHEADER+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2661,25 +3205,27 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AUTOHEADER="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi AUTOHEADER=$ac_cv_prog_AUTOHEADER if test -n "$AUTOHEADER"; then - echo "$as_me:$LINENO: result: $AUTOHEADER" >&5 -echo "${ECHO_T}$AUTOHEADER" >&6 + { echo "$as_me:$LINENO: result: $AUTOHEADER" >&5 +echo "${ECHO_T}$AUTOHEADER" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$AUTOHEADER" && break done test -n "$AUTOHEADER" || AUTOHEADER="$MISSING autoheader" @@ -2695,9 +3241,9 @@ -Wmissing-prototypes -Wold-style-definition; do as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh` - echo "$as_me:$LINENO: checking whether $CC supports $option" >&5 -echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6 -if eval "test \"\${$as_acx_Woption+set}\" = set"; then + { echo "$as_me:$LINENO: checking whether $CC supports $option" >&5 +echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6; } +if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else CFLAGS="$option" @@ -2717,24 +3263,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2743,13 +3301,15 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_acx_Woption=no" + eval "$as_acx_Woption=no" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_acx_Woption'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_acx_Woption'}'`" >&6 +ac_res=`eval echo '${'$as_acx_Woption'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_acx_Woption'}'` = yes; then WARN_CFLAGS="$WARN_CFLAGS${WARN_CFLAGS:+ }$option" fi @@ -2759,8 +3319,8 @@ WARN_PEDANTIC= if test "$GCC" = yes; then - echo "$as_me:$LINENO: checking whether $CC supports -pedantic -Wno-long-long" >&5 -echo $ECHO_N "checking whether $CC supports -pedantic -Wno-long-long... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether $CC supports -pedantic -Wno-long-long" >&5 +echo $ECHO_N "checking whether $CC supports -pedantic -Wno-long-long... $ECHO_C" >&6; } if test "${acx_cv_prog_cc_pedantic__Wno_long_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2782,24 +3342,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2808,13 +3380,14 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -acx_cv_prog_cc_pedantic__Wno_long_long=no + acx_cv_prog_cc_pedantic__Wno_long_long=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" fi -echo "$as_me:$LINENO: result: $acx_cv_prog_cc_pedantic__Wno_long_long" >&5 -echo "${ECHO_T}$acx_cv_prog_cc_pedantic__Wno_long_long" >&6 +{ echo "$as_me:$LINENO: result: $acx_cv_prog_cc_pedantic__Wno_long_long" >&5 +echo "${ECHO_T}$acx_cv_prog_cc_pedantic__Wno_long_long" >&6; } if test $acx_cv_prog_cc_pedantic__Wno_long_long = yes; then WARN_PEDANTIC="-pedantic -Wno-long-long" fi @@ -2827,13 +3400,13 @@ # Only enable with --enable-werror-always until existing warnings are # corrected. WERROR= -# Check whether --enable-werror-always or --disable-werror-always was given. +# Check whether --enable-werror-always was given. if test "${enable_werror_always+set}" = set; then - enableval="$enable_werror_always" - + enableval=$enable_werror_always; else enable_werror_always=no -fi; +fi + if test $enable_werror_always = yes; then WERROR=-Werror fi @@ -2841,8 +3414,8 @@ # Checks for header files. -echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 -echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2866,24 +3439,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2892,12 +3477,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_time=no + ac_cv_header_time=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 -echo "${ECHO_T}$ac_cv_header_time" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF @@ -2906,8 +3492,8 @@ fi -echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5 -echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5 +echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6; } if test "${gcc_cv_header_string+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2928,24 +3514,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2954,12 +3552,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -gcc_cv_header_string=no + gcc_cv_header_string=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5 -echo "${ECHO_T}$gcc_cv_header_string" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5 +echo "${ECHO_T}$gcc_cv_header_string" >&6; } if test $gcc_cv_header_string = yes; then cat >>confdefs.h <<\_ACEOF @@ -2973,8 +3572,8 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -3008,8 +3607,13 @@ #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -3034,9 +3638,10 @@ # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3046,8 +3651,13 @@ /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -3074,6 +3684,7 @@ ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -3091,8 +3702,8 @@ else ac_cv_prog_CPP=$CPP fi -echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6 +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -3115,8 +3726,13 @@ #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -3141,9 +3757,10 @@ # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3153,8 +3770,13 @@ /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -3181,6 +3803,7 @@ ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -3203,23 +3826,170 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6 -if test "${ac_cv_prog_egrep+set}" = set; then +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_GREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_executable_p "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_GREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + fi -echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 -echo "${ECHO_T}$ac_cv_prog_egrep" >&6 - EGREP=$ac_cv_prog_egrep +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi -echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +else + ac_cv_path_GREP=$GREP +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_EGREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_executable_p "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_EGREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_EGREP=$EGREP +fi + + + fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3243,24 +4013,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3269,10 +4051,11 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_stdc=no + ac_cv_header_stdc=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF @@ -3327,6 +4110,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -3346,18 +4130,27 @@ for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); + return 2; + return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3370,12 +4163,14 @@ ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -3398,9 +4193,9 @@ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -3414,24 +4209,36 @@ #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3440,12 +4247,14 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Header=no" + eval "$as_ac_Header=no" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 @@ -3470,18 +4279,19 @@ stdlib.h strings.h string.h sys/file.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3492,24 +4302,36 @@ #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3518,15 +4340,16 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3535,8 +4358,13 @@ /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -3560,9 +4388,10 @@ ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -3586,25 +4415,24 @@ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX + ( cat <<\_ASBOX ## ----------------------------------- ## ## Report this to gcc-bugs at gcc.gnu.org ## ## ----------------------------------- ## _ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -3618,8 +4446,8 @@ # Checks for typedefs, structures, and compiler characteristics. -echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 -echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3659,6 +4487,7 @@ char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; + if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; @@ -3677,7 +4506,9 @@ } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; + if (!foo) return 0; } + return !x[0] && !zero.x; #endif ; @@ -3685,24 +4516,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3711,12 +4554,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_c_const=no + ac_cv_c_const=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 -echo "${ECHO_T}$ac_cv_c_const" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +echo "${ECHO_T}$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF @@ -3725,8 +4569,8 @@ fi -echo "$as_me:$LINENO: checking for inline" >&5 -echo $ECHO_N "checking for inline... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6; } if test "${ac_cv_c_inline+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3746,39 +4590,54 @@ _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_c_inline=$ac_kw; break + ac_cv_c_inline=$ac_kw else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break done fi -echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -echo "${ECHO_T}$ac_cv_c_inline" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in @@ -3796,8 +4655,8 @@ ;; esac -echo "$as_me:$LINENO: checking for obstacks" >&5 -echo $ECHO_N "checking for obstacks... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for obstacks" >&5 +echo $ECHO_N "checking for obstacks... $ECHO_C" >&6; } if test "${ac_cv_func_obstack+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3817,24 +4676,36 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3843,13 +4714,14 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_obstack=no + ac_cv_func_obstack=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_obstack" >&5 -echo "${ECHO_T}$ac_cv_func_obstack" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_obstack" >&5 +echo "${ECHO_T}$ac_cv_func_obstack" >&6; } if test $ac_cv_func_obstack = yes; then cat >>confdefs.h <<\_ACEOF @@ -3857,18 +4729,16 @@ _ACEOF else - case $LIBOBJS in - "obstack.$ac_objext" | \ - *" obstack.$ac_objext" | \ - "obstack.$ac_objext "* | \ + case " $LIBOBJS " in *" obstack.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS obstack.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS obstack.$ac_objext" + ;; esac fi -echo "$as_me:$LINENO: checking for off_t" >&5 -echo $ECHO_N "checking for off_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for off_t" >&5 +echo $ECHO_N "checking for off_t... $ECHO_C" >&6; } if test "${ac_cv_type_off_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3879,36 +4749,49 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef off_t ac__type_new_; int main () { -if ((off_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (off_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3917,24 +4800,25 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_off_t=no + ac_cv_type_off_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 -echo "${ECHO_T}$ac_cv_type_off_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 +echo "${ECHO_T}$ac_cv_type_off_t" >&6; } if test $ac_cv_type_off_t = yes; then : else cat >>confdefs.h <<_ACEOF -#define off_t long +#define off_t long int _ACEOF fi -echo "$as_me:$LINENO: checking for size_t" >&5 -echo $ECHO_N "checking for size_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3945,36 +4829,49 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef size_t ac__type_new_; int main () { -if ((size_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (size_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3983,24 +4880,25 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_size_t=no + ac_cv_type_size_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -echo "${ECHO_T}$ac_cv_type_size_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6; } if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF -#define size_t unsigned +#define size_t unsigned int _ACEOF fi -echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 -echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 +echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; } if test "${ac_cv_struct_tm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4022,24 +4920,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4048,12 +4958,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_struct_tm=sys/time.h + ac_cv_struct_tm=sys/time.h fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 -echo "${ECHO_T}$ac_cv_struct_tm" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 +echo "${ECHO_T}$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then cat >>confdefs.h <<\_ACEOF @@ -4062,8 +4973,8 @@ fi -echo "$as_me:$LINENO: checking for int" >&5 -echo $ECHO_N "checking for int... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for int" >&5 +echo $ECHO_N "checking for int... $ECHO_C" >&6; } if test "${ac_cv_type_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4074,36 +4985,49 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef int ac__type_new_; int main () { -if ((int *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (int)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4112,20 +5036,21 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_int=no + ac_cv_type_int=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 -echo "${ECHO_T}$ac_cv_type_int" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 +echo "${ECHO_T}$ac_cv_type_int" >&6; } -echo "$as_me:$LINENO: checking size of int" >&5 -echo $ECHO_N "checking size of int... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking size of int" >&5 +echo $ECHO_N "checking size of int... $ECHO_C" >&6; } if test "${ac_cv_sizeof_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_int" = yes; then - # The cast to unsigned long works around a bug in the HP C Compiler + # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. @@ -4138,10 +5063,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef int ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -4149,24 +5075,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4179,10 +5117,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef int ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -4190,24 +5129,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4216,30 +5167,32 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef int ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -4247,24 +5200,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4277,10 +5242,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef int ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -4288,24 +5254,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4314,24 +5292,27 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo= ac_hi= + ac_lo= ac_hi= fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` @@ -4342,10 +5323,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef int ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -4353,24 +5335,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4379,26 +5373,20 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr '(' $ac_mid ')' + 1` + ac_lo=`expr '(' $ac_mid ')' + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_int=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (int), 77 +echo "$as_me: error: cannot compute sizeof (int) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } ;; + { (exit 77); exit 77; }; } ;; esac else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4406,8 +5394,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -long longval () { return (long) (sizeof (int)); } -unsigned long ulongval () { return (long) (sizeof (int)); } + typedef int ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include #include int @@ -4416,35 +5405,44 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) - exit (1); - if (((long) (sizeof (int))) < 0) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { - long i = longval (); - if (i != ((long) (sizeof (int)))) - exit (1); + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%ld\n", i); } else { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (int)))) - exit (1); + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%lu\n", i); } - exit (ferror (f) || fclose (f) != 0); + return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4455,29 +5453,28 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (int), 77 +echo "$as_me: error: cannot compute sizeof (int) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 77); exit 77; }; } fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -fi rm -f conftest.val else ac_cv_sizeof_int=0 fi fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 -echo "${ECHO_T}$ac_cv_sizeof_int" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 +echo "${ECHO_T}$ac_cv_sizeof_int" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_INT $ac_cv_sizeof_int _ACEOF -echo "$as_me:$LINENO: checking for long" >&5 -echo $ECHO_N "checking for long... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for long" >&5 +echo $ECHO_N "checking for long... $ECHO_C" >&6; } if test "${ac_cv_type_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4488,36 +5485,49 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef long ac__type_new_; int main () { -if ((long *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (long)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4526,20 +5536,21 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_long=no + ac_cv_type_long=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 -echo "${ECHO_T}$ac_cv_type_long" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 +echo "${ECHO_T}$ac_cv_type_long" >&6; } -echo "$as_me:$LINENO: checking size of long" >&5 -echo $ECHO_N "checking size of long... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking size of long" >&5 +echo $ECHO_N "checking size of long... $ECHO_C" >&6; } if test "${ac_cv_sizeof_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_long" = yes; then - # The cast to unsigned long works around a bug in the HP C Compiler + # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. @@ -4552,10 +5563,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -4563,24 +5575,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4593,10 +5617,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -4604,24 +5629,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4630,30 +5667,32 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -4661,24 +5700,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4691,10 +5742,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -4702,24 +5754,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4728,24 +5792,27 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo= ac_hi= + ac_lo= ac_hi= fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` @@ -4756,10 +5823,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -4767,24 +5835,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4793,26 +5873,20 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr '(' $ac_mid ')' + 1` + ac_lo=`expr '(' $ac_mid ')' + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_long=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long), 77 +echo "$as_me: error: cannot compute sizeof (long) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } ;; + { (exit 77); exit 77; }; } ;; esac else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4820,8 +5894,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -long longval () { return (long) (sizeof (long)); } -unsigned long ulongval () { return (long) (sizeof (long)); } + typedef long ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include #include int @@ -4830,35 +5905,44 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) - exit (1); - if (((long) (sizeof (long))) < 0) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { - long i = longval (); - if (i != ((long) (sizeof (long)))) - exit (1); + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%ld\n", i); } else { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (long)))) - exit (1); + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%lu\n", i); } - exit (ferror (f) || fclose (f) != 0); + return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4869,22 +5953,21 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long), 77 +echo "$as_me: error: cannot compute sizeof (long) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 77); exit 77; }; } fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -fi rm -f conftest.val else ac_cv_sizeof_long=0 fi fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 -echo "${ECHO_T}$ac_cv_sizeof_long" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 +echo "${ECHO_T}$ac_cv_sizeof_long" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG $ac_cv_sizeof_long _ACEOF @@ -4910,9 +5993,9 @@ for ac_func in clearerr_unlocked feof_unlocked ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked putchar_unlocked putc_unlocked do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -4938,53 +6021,59 @@ #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; #endif -#ifdef __cplusplus -} -#endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4993,13 +6082,15 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -5008,8 +6099,8 @@ fi done -echo "$as_me:$LINENO: checking whether abort is declared" >&5 -echo $ECHO_N "checking whether abort is declared... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether abort is declared" >&5 +echo $ECHO_N "checking whether abort is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_abort+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5025,6 +6116,7 @@ { #ifndef abort char *p = (char *) abort; + return !p; #endif ; @@ -5032,24 +6124,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5058,12 +6162,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_have_decl_abort=no + ac_cv_have_decl_abort=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_abort" >&5 -echo "${ECHO_T}$ac_cv_have_decl_abort" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_abort" >&5 +echo "${ECHO_T}$ac_cv_have_decl_abort" >&6; } if test $ac_cv_have_decl_abort = yes; then cat >>confdefs.h <<_ACEOF @@ -5078,8 +6183,8 @@ fi -echo "$as_me:$LINENO: checking whether basename is declared" >&5 -echo $ECHO_N "checking whether basename is declared... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether basename is declared" >&5 +echo $ECHO_N "checking whether basename is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_basename+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5095,6 +6200,7 @@ { #ifndef basename char *p = (char *) basename; + return !p; #endif ; @@ -5102,24 +6208,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5128,12 +6246,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_have_decl_basename=no + ac_cv_have_decl_basename=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_basename" >&5 -echo "${ECHO_T}$ac_cv_have_decl_basename" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_basename" >&5 +echo "${ECHO_T}$ac_cv_have_decl_basename" >&6; } if test $ac_cv_have_decl_basename = yes; then cat >>confdefs.h <<_ACEOF @@ -5148,8 +6267,8 @@ fi -echo "$as_me:$LINENO: checking whether errno is declared" >&5 -echo $ECHO_N "checking whether errno is declared... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether errno is declared" >&5 +echo $ECHO_N "checking whether errno is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_errno+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5165,6 +6284,7 @@ { #ifndef errno char *p = (char *) errno; + return !p; #endif ; @@ -5172,24 +6292,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5198,12 +6330,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_have_decl_errno=no + ac_cv_have_decl_errno=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_errno" >&5 -echo "${ECHO_T}$ac_cv_have_decl_errno" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_errno" >&5 +echo "${ECHO_T}$ac_cv_have_decl_errno" >&6; } if test $ac_cv_have_decl_errno = yes; then cat >>confdefs.h <<_ACEOF @@ -5218,8 +6351,8 @@ fi -echo "$as_me:$LINENO: checking whether getopt is declared" >&5 -echo $ECHO_N "checking whether getopt is declared... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether getopt is declared" >&5 +echo $ECHO_N "checking whether getopt is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_getopt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5235,6 +6368,7 @@ { #ifndef getopt char *p = (char *) getopt; + return !p; #endif ; @@ -5242,24 +6376,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5268,12 +6414,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_have_decl_getopt=no + ac_cv_have_decl_getopt=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt" >&5 -echo "${ECHO_T}$ac_cv_have_decl_getopt" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt" >&5 +echo "${ECHO_T}$ac_cv_have_decl_getopt" >&6; } if test $ac_cv_have_decl_getopt = yes; then cat >>confdefs.h <<_ACEOF @@ -5288,8 +6435,8 @@ fi -echo "$as_me:$LINENO: checking whether clearerr_unlocked is declared" >&5 -echo $ECHO_N "checking whether clearerr_unlocked is declared... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether clearerr_unlocked is declared" >&5 +echo $ECHO_N "checking whether clearerr_unlocked is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_clearerr_unlocked+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5305,6 +6452,7 @@ { #ifndef clearerr_unlocked char *p = (char *) clearerr_unlocked; + return !p; #endif ; @@ -5312,24 +6460,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5338,12 +6498,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_have_decl_clearerr_unlocked=no + ac_cv_have_decl_clearerr_unlocked=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_clearerr_unlocked" >&5 -echo "${ECHO_T}$ac_cv_have_decl_clearerr_unlocked" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_clearerr_unlocked" >&5 +echo "${ECHO_T}$ac_cv_have_decl_clearerr_unlocked" >&6; } if test $ac_cv_have_decl_clearerr_unlocked = yes; then cat >>confdefs.h <<_ACEOF @@ -5358,8 +6519,8 @@ fi -echo "$as_me:$LINENO: checking whether feof_unlocked is declared" >&5 -echo $ECHO_N "checking whether feof_unlocked is declared... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether feof_unlocked is declared" >&5 +echo $ECHO_N "checking whether feof_unlocked is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_feof_unlocked+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5375,6 +6536,7 @@ { #ifndef feof_unlocked char *p = (char *) feof_unlocked; + return !p; #endif ; @@ -5382,24 +6544,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5408,12 +6582,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_have_decl_feof_unlocked=no + ac_cv_have_decl_feof_unlocked=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_feof_unlocked" >&5 -echo "${ECHO_T}$ac_cv_have_decl_feof_unlocked" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_feof_unlocked" >&5 +echo "${ECHO_T}$ac_cv_have_decl_feof_unlocked" >&6; } if test $ac_cv_have_decl_feof_unlocked = yes; then cat >>confdefs.h <<_ACEOF @@ -5428,8 +6603,8 @@ fi -echo "$as_me:$LINENO: checking whether ferror_unlocked is declared" >&5 -echo $ECHO_N "checking whether ferror_unlocked is declared... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether ferror_unlocked is declared" >&5 +echo $ECHO_N "checking whether ferror_unlocked is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_ferror_unlocked+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5445,6 +6620,7 @@ { #ifndef ferror_unlocked char *p = (char *) ferror_unlocked; + return !p; #endif ; @@ -5452,24 +6628,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5478,12 +6666,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_have_decl_ferror_unlocked=no + ac_cv_have_decl_ferror_unlocked=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_ferror_unlocked" >&5 -echo "${ECHO_T}$ac_cv_have_decl_ferror_unlocked" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_ferror_unlocked" >&5 +echo "${ECHO_T}$ac_cv_have_decl_ferror_unlocked" >&6; } if test $ac_cv_have_decl_ferror_unlocked = yes; then cat >>confdefs.h <<_ACEOF @@ -5498,8 +6687,8 @@ fi -echo "$as_me:$LINENO: checking whether fflush_unlocked is declared" >&5 -echo $ECHO_N "checking whether fflush_unlocked is declared... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether fflush_unlocked is declared" >&5 +echo $ECHO_N "checking whether fflush_unlocked is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_fflush_unlocked+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5515,6 +6704,7 @@ { #ifndef fflush_unlocked char *p = (char *) fflush_unlocked; + return !p; #endif ; @@ -5522,24 +6712,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5548,12 +6750,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_have_decl_fflush_unlocked=no + ac_cv_have_decl_fflush_unlocked=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_fflush_unlocked" >&5 -echo "${ECHO_T}$ac_cv_have_decl_fflush_unlocked" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_fflush_unlocked" >&5 +echo "${ECHO_T}$ac_cv_have_decl_fflush_unlocked" >&6; } if test $ac_cv_have_decl_fflush_unlocked = yes; then cat >>confdefs.h <<_ACEOF @@ -5568,8 +6771,8 @@ fi -echo "$as_me:$LINENO: checking whether fgetc_unlocked is declared" >&5 -echo $ECHO_N "checking whether fgetc_unlocked is declared... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether fgetc_unlocked is declared" >&5 +echo $ECHO_N "checking whether fgetc_unlocked is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_fgetc_unlocked+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5585,6 +6788,7 @@ { #ifndef fgetc_unlocked char *p = (char *) fgetc_unlocked; + return !p; #endif ; @@ -5592,24 +6796,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5618,12 +6834,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_have_decl_fgetc_unlocked=no + ac_cv_have_decl_fgetc_unlocked=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_fgetc_unlocked" >&5 -echo "${ECHO_T}$ac_cv_have_decl_fgetc_unlocked" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_fgetc_unlocked" >&5 +echo "${ECHO_T}$ac_cv_have_decl_fgetc_unlocked" >&6; } if test $ac_cv_have_decl_fgetc_unlocked = yes; then cat >>confdefs.h <<_ACEOF @@ -5638,8 +6855,8 @@ fi -echo "$as_me:$LINENO: checking whether fgets_unlocked is declared" >&5 -echo $ECHO_N "checking whether fgets_unlocked is declared... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether fgets_unlocked is declared" >&5 +echo $ECHO_N "checking whether fgets_unlocked is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_fgets_unlocked+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5655,6 +6872,7 @@ { #ifndef fgets_unlocked char *p = (char *) fgets_unlocked; + return !p; #endif ; @@ -5662,24 +6880,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5688,12 +6918,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_have_decl_fgets_unlocked=no + ac_cv_have_decl_fgets_unlocked=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_fgets_unlocked" >&5 -echo "${ECHO_T}$ac_cv_have_decl_fgets_unlocked" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_fgets_unlocked" >&5 +echo "${ECHO_T}$ac_cv_have_decl_fgets_unlocked" >&6; } if test $ac_cv_have_decl_fgets_unlocked = yes; then cat >>confdefs.h <<_ACEOF @@ -5708,8 +6939,8 @@ fi -echo "$as_me:$LINENO: checking whether fileno_unlocked is declared" >&5 -echo $ECHO_N "checking whether fileno_unlocked is declared... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether fileno_unlocked is declared" >&5 +echo $ECHO_N "checking whether fileno_unlocked is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_fileno_unlocked+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5725,6 +6956,7 @@ { #ifndef fileno_unlocked char *p = (char *) fileno_unlocked; + return !p; #endif ; @@ -5732,24 +6964,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5758,12 +7002,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_have_decl_fileno_unlocked=no + ac_cv_have_decl_fileno_unlocked=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_fileno_unlocked" >&5 -echo "${ECHO_T}$ac_cv_have_decl_fileno_unlocked" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_fileno_unlocked" >&5 +echo "${ECHO_T}$ac_cv_have_decl_fileno_unlocked" >&6; } if test $ac_cv_have_decl_fileno_unlocked = yes; then cat >>confdefs.h <<_ACEOF @@ -5778,8 +7023,8 @@ fi -echo "$as_me:$LINENO: checking whether fprintf_unlocked is declared" >&5 -echo $ECHO_N "checking whether fprintf_unlocked is declared... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether fprintf_unlocked is declared" >&5 +echo $ECHO_N "checking whether fprintf_unlocked is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_fprintf_unlocked+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5795,6 +7040,7 @@ { #ifndef fprintf_unlocked char *p = (char *) fprintf_unlocked; + return !p; #endif ; @@ -5802,24 +7048,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5828,12 +7086,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_have_decl_fprintf_unlocked=no + ac_cv_have_decl_fprintf_unlocked=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_fprintf_unlocked" >&5 -echo "${ECHO_T}$ac_cv_have_decl_fprintf_unlocked" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_fprintf_unlocked" >&5 +echo "${ECHO_T}$ac_cv_have_decl_fprintf_unlocked" >&6; } if test $ac_cv_have_decl_fprintf_unlocked = yes; then cat >>confdefs.h <<_ACEOF @@ -5848,8 +7107,8 @@ fi -echo "$as_me:$LINENO: checking whether fputc_unlocked is declared" >&5 -echo $ECHO_N "checking whether fputc_unlocked is declared... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether fputc_unlocked is declared" >&5 +echo $ECHO_N "checking whether fputc_unlocked is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_fputc_unlocked+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5865,6 +7124,7 @@ { #ifndef fputc_unlocked char *p = (char *) fputc_unlocked; + return !p; #endif ; @@ -5872,24 +7132,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5898,12 +7170,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_have_decl_fputc_unlocked=no + ac_cv_have_decl_fputc_unlocked=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_fputc_unlocked" >&5 -echo "${ECHO_T}$ac_cv_have_decl_fputc_unlocked" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_fputc_unlocked" >&5 +echo "${ECHO_T}$ac_cv_have_decl_fputc_unlocked" >&6; } if test $ac_cv_have_decl_fputc_unlocked = yes; then cat >>confdefs.h <<_ACEOF @@ -5918,8 +7191,8 @@ fi -echo "$as_me:$LINENO: checking whether fputs_unlocked is declared" >&5 -echo $ECHO_N "checking whether fputs_unlocked is declared... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether fputs_unlocked is declared" >&5 +echo $ECHO_N "checking whether fputs_unlocked is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_fputs_unlocked+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5935,6 +7208,7 @@ { #ifndef fputs_unlocked char *p = (char *) fputs_unlocked; + return !p; #endif ; @@ -5942,24 +7216,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -5968,12 +7254,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_have_decl_fputs_unlocked=no + ac_cv_have_decl_fputs_unlocked=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_fputs_unlocked" >&5 -echo "${ECHO_T}$ac_cv_have_decl_fputs_unlocked" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_fputs_unlocked" >&5 +echo "${ECHO_T}$ac_cv_have_decl_fputs_unlocked" >&6; } if test $ac_cv_have_decl_fputs_unlocked = yes; then cat >>confdefs.h <<_ACEOF @@ -5988,8 +7275,8 @@ fi -echo "$as_me:$LINENO: checking whether fread_unlocked is declared" >&5 -echo $ECHO_N "checking whether fread_unlocked is declared... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether fread_unlocked is declared" >&5 +echo $ECHO_N "checking whether fread_unlocked is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_fread_unlocked+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6005,6 +7292,7 @@ { #ifndef fread_unlocked char *p = (char *) fread_unlocked; + return !p; #endif ; @@ -6012,24 +7300,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -6038,12 +7338,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_have_decl_fread_unlocked=no + ac_cv_have_decl_fread_unlocked=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_fread_unlocked" >&5 -echo "${ECHO_T}$ac_cv_have_decl_fread_unlocked" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_fread_unlocked" >&5 +echo "${ECHO_T}$ac_cv_have_decl_fread_unlocked" >&6; } if test $ac_cv_have_decl_fread_unlocked = yes; then cat >>confdefs.h <<_ACEOF @@ -6058,8 +7359,8 @@ fi -echo "$as_me:$LINENO: checking whether fwrite_unlocked is declared" >&5 -echo $ECHO_N "checking whether fwrite_unlocked is declared... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether fwrite_unlocked is declared" >&5 +echo $ECHO_N "checking whether fwrite_unlocked is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_fwrite_unlocked+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6075,6 +7376,7 @@ { #ifndef fwrite_unlocked char *p = (char *) fwrite_unlocked; + return !p; #endif ; @@ -6082,24 +7384,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -6108,12 +7422,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_have_decl_fwrite_unlocked=no + ac_cv_have_decl_fwrite_unlocked=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_fwrite_unlocked" >&5 -echo "${ECHO_T}$ac_cv_have_decl_fwrite_unlocked" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_fwrite_unlocked" >&5 +echo "${ECHO_T}$ac_cv_have_decl_fwrite_unlocked" >&6; } if test $ac_cv_have_decl_fwrite_unlocked = yes; then cat >>confdefs.h <<_ACEOF @@ -6128,8 +7443,8 @@ fi -echo "$as_me:$LINENO: checking whether getchar_unlocked is declared" >&5 -echo $ECHO_N "checking whether getchar_unlocked is declared... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether getchar_unlocked is declared" >&5 +echo $ECHO_N "checking whether getchar_unlocked is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_getchar_unlocked+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6145,6 +7460,7 @@ { #ifndef getchar_unlocked char *p = (char *) getchar_unlocked; + return !p; #endif ; @@ -6152,24 +7468,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -6178,12 +7506,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_have_decl_getchar_unlocked=no + ac_cv_have_decl_getchar_unlocked=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_getchar_unlocked" >&5 -echo "${ECHO_T}$ac_cv_have_decl_getchar_unlocked" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getchar_unlocked" >&5 +echo "${ECHO_T}$ac_cv_have_decl_getchar_unlocked" >&6; } if test $ac_cv_have_decl_getchar_unlocked = yes; then cat >>confdefs.h <<_ACEOF @@ -6198,8 +7527,8 @@ fi -echo "$as_me:$LINENO: checking whether getc_unlocked is declared" >&5 -echo $ECHO_N "checking whether getc_unlocked is declared... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether getc_unlocked is declared" >&5 +echo $ECHO_N "checking whether getc_unlocked is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_getc_unlocked+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6215,6 +7544,7 @@ { #ifndef getc_unlocked char *p = (char *) getc_unlocked; + return !p; #endif ; @@ -6222,24 +7552,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -6248,12 +7590,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_have_decl_getc_unlocked=no + ac_cv_have_decl_getc_unlocked=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_getc_unlocked" >&5 -echo "${ECHO_T}$ac_cv_have_decl_getc_unlocked" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getc_unlocked" >&5 +echo "${ECHO_T}$ac_cv_have_decl_getc_unlocked" >&6; } if test $ac_cv_have_decl_getc_unlocked = yes; then cat >>confdefs.h <<_ACEOF @@ -6268,8 +7611,8 @@ fi -echo "$as_me:$LINENO: checking whether putchar_unlocked is declared" >&5 -echo $ECHO_N "checking whether putchar_unlocked is declared... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether putchar_unlocked is declared" >&5 +echo $ECHO_N "checking whether putchar_unlocked is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_putchar_unlocked+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6285,6 +7628,7 @@ { #ifndef putchar_unlocked char *p = (char *) putchar_unlocked; + return !p; #endif ; @@ -6292,24 +7636,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -6318,12 +7674,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_have_decl_putchar_unlocked=no + ac_cv_have_decl_putchar_unlocked=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_putchar_unlocked" >&5 -echo "${ECHO_T}$ac_cv_have_decl_putchar_unlocked" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_putchar_unlocked" >&5 +echo "${ECHO_T}$ac_cv_have_decl_putchar_unlocked" >&6; } if test $ac_cv_have_decl_putchar_unlocked = yes; then cat >>confdefs.h <<_ACEOF @@ -6338,8 +7695,8 @@ fi -echo "$as_me:$LINENO: checking whether putc_unlocked is declared" >&5 -echo $ECHO_N "checking whether putc_unlocked is declared... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether putc_unlocked is declared" >&5 +echo $ECHO_N "checking whether putc_unlocked is declared... $ECHO_C" >&6; } if test "${ac_cv_have_decl_putc_unlocked+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6355,6 +7712,7 @@ { #ifndef putc_unlocked char *p = (char *) putc_unlocked; + return !p; #endif ; @@ -6362,24 +7720,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -6388,12 +7758,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_have_decl_putc_unlocked=no + ac_cv_have_decl_putc_unlocked=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_putc_unlocked" >&5 -echo "${ECHO_T}$ac_cv_have_decl_putc_unlocked" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_putc_unlocked" >&5 +echo "${ECHO_T}$ac_cv_have_decl_putc_unlocked" >&6; } if test $ac_cv_have_decl_putc_unlocked = yes; then cat >>confdefs.h <<_ACEOF @@ -6414,8 +7785,8 @@ # Checks for library functions. # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! -echo "$as_me:$LINENO: checking for working alloca.h" >&5 -echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for working alloca.h" >&5 +echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; } if test "${ac_cv_working_alloca_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6430,29 +7801,42 @@ main () { char *p = (char *) alloca (2 * sizeof (int)); + if (p) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -6461,13 +7845,14 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_working_alloca_h=no + ac_cv_working_alloca_h=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 -echo "${ECHO_T}$ac_cv_working_alloca_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 +echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; } if test $ac_cv_working_alloca_h = yes; then cat >>confdefs.h <<\_ACEOF @@ -6476,8 +7861,8 @@ fi -echo "$as_me:$LINENO: checking for alloca" >&5 -echo $ECHO_N "checking for alloca... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for alloca" >&5 +echo $ECHO_N "checking for alloca... $ECHO_C" >&6; } if test "${ac_cv_func_alloca_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6512,29 +7897,42 @@ main () { char *p = (char *) alloca (1); + if (p) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -6543,13 +7941,14 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_alloca_works=no + ac_cv_func_alloca_works=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 -echo "${ECHO_T}$ac_cv_func_alloca_works" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 +echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; } if test $ac_cv_func_alloca_works = yes; then @@ -6563,15 +7962,15 @@ # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. -ALLOCA=alloca.$ac_objext +ALLOCA=\${LIBOBJDIR}alloca.$ac_objext cat >>confdefs.h <<\_ACEOF #define C_ALLOCA 1 _ACEOF -echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 -echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 +echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; } if test "${ac_cv_os_cray+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6581,7 +7980,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#if defined(CRAY) && ! defined(CRAY2) +#if defined CRAY && ! defined CRAY2 webecray #else wenotbecray @@ -6597,14 +7996,14 @@ rm -f conftest* fi -echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 -echo "${ECHO_T}$ac_cv_os_cray" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 +echo "${ECHO_T}$ac_cv_os_cray" >&6; } if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -6630,53 +8029,59 @@ #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; #endif -#ifdef __cplusplus -} -#endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -6685,13 +8090,15 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF @@ -6704,8 +8111,8 @@ done fi -echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 -echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 +echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; } if test "${ac_cv_c_stack_direction+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6718,6 +8125,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +$ac_includes_default int find_stack_direction () { @@ -6735,17 +8143,26 @@ int main () { - exit (find_stack_direction () < 0); + return find_stack_direction () < 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -6758,11 +8175,13 @@ ( exit $ac_status ) ac_cv_c_stack_direction=-1 fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 -echo "${ECHO_T}$ac_cv_c_stack_direction" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 +echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; } cat >>confdefs.h <<_ACEOF #define STACK_DIRECTION $ac_cv_c_stack_direction @@ -6771,8 +8190,8 @@ fi -echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6796,24 +8215,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -6822,10 +8253,11 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_stdc=no + ac_cv_header_stdc=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF @@ -6880,6 +8312,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -6899,18 +8332,27 @@ for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); + return 2; + return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -6923,12 +8365,14 @@ ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -6938,8 +8382,8 @@ fi - echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5 -echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5 +echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6; } if test "${am_cv_langinfo_codeset+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6959,24 +8403,36 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -6985,14 +8441,15 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -am_cv_langinfo_codeset=no + am_cv_langinfo_codeset=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5 -echo "${ECHO_T}$am_cv_langinfo_codeset" >&6 +{ echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5 +echo "${ECHO_T}$am_cv_langinfo_codeset" >&6; } if test $am_cv_langinfo_codeset = yes; then cat >>confdefs.h <<\_ACEOF @@ -7013,22 +8470,22 @@ if test -f ../intl/config.intl; then . ../intl/config.intl fi -echo "$as_me:$LINENO: checking whether NLS is requested" >&5 -echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether NLS is requested" >&5 +echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6; } if test x"$USE_NLS" != xyes; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } cat >>confdefs.h <<\_ACEOF #define ENABLE_NLS 1 _ACEOF - echo "$as_me:$LINENO: checking for catalogs to be installed" >&5 -echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for catalogs to be installed" >&5 +echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6; } # Look for .po and .gmo files in the source directory. CATALOGS= XLINGUAS= @@ -7059,12 +8516,12 @@ fi done LINGUAS="$XLINGUAS" - echo "$as_me:$LINENO: result: $LINGUAS" >&5 -echo "${ECHO_T}$LINGUAS" >&6 + { echo "$as_me:$LINENO: result: $LINGUAS" >&5 +echo "${ECHO_T}$LINGUAS" >&6; } fi -echo "$as_me:$LINENO: checking for uchar" >&5 -echo $ECHO_N "checking for uchar... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for uchar" >&5 +echo $ECHO_N "checking for uchar... $ECHO_C" >&6; } if test "${gcc_cv_type_uchar+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7087,24 +8544,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -7113,12 +8582,13 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_uchar=no + ac_cv_type_uchar=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $gcc_cv_type_uchar" >&5 -echo "${ECHO_T}$gcc_cv_type_uchar" >&6 +{ echo "$as_me:$LINENO: result: $gcc_cv_type_uchar" >&5 +echo "${ECHO_T}$gcc_cv_type_uchar" >&6; } if test $ac_cv_type_uchar = yes; then cat >>confdefs.h <<\_ACEOF @@ -7144,13 +8614,13 @@ prefix="$acl_save_prefix" -# Check whether --with-gnu-ld or --without-gnu-ld was given. +# Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then - withval="$with_gnu_ld" - test "$withval" = no || with_gnu_ld=yes + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no -fi; +fi + # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then @@ -7167,8 +8637,8 @@ ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. - echo "$as_me:$LINENO: checking for ld used by GCC" >&5 -echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for ld used by GCC" >&5 +echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw @@ -7197,11 +8667,11 @@ ;; esac elif test "$with_gnu_ld" = yes; then - echo "$as_me:$LINENO: checking for GNU ld" >&5 -echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } else - echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } fi if test "${acl_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -7230,17 +8700,17 @@ LD="$acl_cv_path_LD" if test -n "$LD"; then - echo "$as_me:$LINENO: result: $LD" >&5 -echo "${ECHO_T}$LD" >&6 + { echo "$as_me:$LINENO: result: $LD" >&5 +echo "${ECHO_T}$LD" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } -echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } if test "${acl_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7251,14 +8721,14 @@ acl_cv_prog_gnu_ld=no fi fi -echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5 -echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6 +{ echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5 +echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6; } with_gnu_ld=$acl_cv_prog_gnu_ld - echo "$as_me:$LINENO: checking for shared library run path origin" >&5 -echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for shared library run path origin" >&5 +echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6; } if test "${acl_cv_rpath+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7270,8 +8740,8 @@ acl_cv_rpath=done fi -echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 -echo "${ECHO_T}$acl_cv_rpath" >&6 +{ echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 +echo "${ECHO_T}$acl_cv_rpath" >&6; } wl="$acl_cv_wl" libext="$acl_cv_libext" shlibext="$acl_cv_shlibext" @@ -7279,13 +8749,12 @@ hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" hardcode_direct="$acl_cv_hardcode_direct" hardcode_minus_L="$acl_cv_hardcode_minus_L" - # Check whether --enable-rpath or --disable-rpath was given. + # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then - enableval="$enable_rpath" - : + enableval=$enable_rpath; : else enable_rpath=yes -fi; +fi @@ -7293,6 +8762,7 @@ + use_additional=yes acl_save_prefix="$prefix" @@ -7307,10 +8777,9 @@ prefix="$acl_save_prefix" -# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. +# Check whether --with-libiconv-prefix was given. if test "${with_libiconv_prefix+set}" = set; then - withval="$with_libiconv_prefix" - + withval=$with_libiconv_prefix; if test "X$withval" = "Xno"; then use_additional=no else @@ -7333,7 +8802,8 @@ fi fi -fi; +fi + LIBICONV= LTLIBICONV= INCICONV= @@ -7700,8 +9170,8 @@ done - echo "$as_me:$LINENO: checking for iconv" >&5 -echo $ECHO_N "checking for iconv... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for iconv" >&5 +echo $ECHO_N "checking for iconv... $ECHO_C" >&6; } if test "${am_cv_func_iconv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7727,24 +9197,36 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -7753,8 +9235,10 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" @@ -7778,24 +9262,36 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -7805,15 +9301,17 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi -echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 -echo "${ECHO_T}$am_cv_func_iconv" >&6 +{ echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 +echo "${ECHO_T}$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then cat >>confdefs.h <<\_ACEOF @@ -7822,10 +9320,10 @@ fi if test "$am_cv_lib_iconv" = yes; then - echo "$as_me:$LINENO: checking how to link with libiconv" >&5 -echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6 - echo "$as_me:$LINENO: result: $LIBICONV" >&5 -echo "${ECHO_T}$LIBICONV" >&6 + { echo "$as_me:$LINENO: checking how to link with libiconv" >&5 +echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6; } + { echo "$as_me:$LINENO: result: $LIBICONV" >&5 +echo "${ECHO_T}$LIBICONV" >&6; } else CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= @@ -7835,8 +9333,8 @@ if test "$am_cv_func_iconv" = yes; then - echo "$as_me:$LINENO: checking for iconv declaration" >&5 -echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for iconv declaration" >&5 +echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6; } if test "${am_cv_proto_iconv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7869,24 +9367,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -7895,17 +9405,18 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -am_cv_proto_iconv_arg1="const" + am_cv_proto_iconv_arg1="const" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" fi am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` - echo "$as_me:$LINENO: result: ${ac_t:- + { echo "$as_me:$LINENO: result: ${ac_t:- }$am_cv_proto_iconv" >&5 echo "${ECHO_T}${ac_t:- - }$am_cv_proto_iconv" >&6 + }$am_cv_proto_iconv" >&6; } cat >>confdefs.h <<_ACEOF #define ICONV_CONST $am_cv_proto_iconv_arg1 @@ -7930,14 +9441,14 @@ fi -# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. +# Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then - enableval="$enable_maintainer_mode" - + enableval=$enable_maintainer_mode; else enable_maintainer_mode=no -fi; +fi + if test "x$enable_maintainer_mode" = xno; then MAINT='#' else @@ -7945,14 +9456,14 @@ fi -# Check whether --enable-checking or --disable-checking was given. +# Check whether --enable-checking was given. if test "${enable_checking+set}" = set; then - enableval="$enable_checking" - + enableval=$enable_checking; else enable_checking=no -fi; +fi + if test $enable_checking != no ; then cat >>confdefs.h <<\_ACEOF @@ -7961,9 +9472,14 @@ fi +# Cray [dag]: These comments cannot be in the middle of continuation +# lines (autoconf 2.60) + # APPLE LOCAL begin 4126124 + #APPLE LOCAL begin LLVM + #APPLE LOCAL end LLVM + # APPLE LOCAL end 4126124 case $target in - # APPLE LOCAL begin 4126124 alpha*-*-* | \ arm*-*-*eabi* | \ arm*-*-symbianelf* | \ @@ -7981,7 +9497,6 @@ sparcv9-*-solaris2* | \ sparc-*-solaris2.[789] | sparc-*-solaris2.1[0-9]* | \ sh[123456789l]*-*-*) - # APPLE LOCAL end 4126124 need_64bit_hwint=yes ;; *) need_64bit_hwint=no ;; @@ -8000,10 +9515,9 @@ # APPLE LOCAL begin LLVM -# Check whether --enable-llvm or --disable-llvm was given. +# Check whether --enable-llvm was given. if test "${enable_llvm+set}" = set; then - enableval="$enable_llvm" - case "${enableval}" in + enableval=$enable_llvm; case "${enableval}" in yes) { { echo "$as_me:$LINENO: error: You must specify a path to your LLVM tree with --enable-llvm=DIR" >&5 echo "$as_me: error: You must specify a path to your LLVM tree with --enable-llvm=DIR" >&2;} { (exit 1); exit 1; }; } @@ -8023,10 +9537,28 @@ if test -x "$LLVMBASEPATH/Release/bin/llc$EXEEXT"; then echo Found Release LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Release" elif test -x "$LLVMBASEPATH/Debug/bin/llc$EXEEXT"; then echo Found Debug LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Debug" elif test -x "$LLVMBASEPATH/Release-Asserts/bin/llc$EXEEXT"; then echo Found Release-Asserts LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Release-Asserts" + elif test -x "$LLVMBASEPATH/Debug-Asserts/bin/llc$EXEEXT"; then + echo Found Debug-Asserts LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Debug-Asserts" + elif test -x "$LLVMBASEPATH/Release+Checks/bin/llc$EXEEXT"; then + echo Found Release+Checks LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Release+Checks" + elif test -x "$LLVMBASEPATH/Debug+Checks/bin/llc$EXEEXT"; then + echo Found Debug+Checks LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Debug+Checks" + elif test -x "$LLVMBASEPATH/Release-Asserts+Checks/bin/llc$EXEEXT"; then + echo Found Release-Asserts+Checks LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Release-Asserts+Checks" + elif test -x "$LLVMBASEPATH/Debug-Asserts+Checks/bin/llc$EXEEXT"; then + echo Found Debug-Asserts+Checks LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Debug-Asserts+Checks" else { { echo "$as_me:$LINENO: error: You must specify valid path to your LLVM tree with --enable-llvm=DIR" >&5 echo "$as_me: error: You must specify valid path to your LLVM tree with --enable-llvm=DIR" >&2;} @@ -8035,16 +9567,17 @@ else LLVMBASEPATH="" -fi; +fi + # APPLE LOCAL end LLVM # Output. - ac_config_headers="$ac_config_headers config.h:config.in" +ac_config_headers="$ac_config_headers config.h:config.in" - ac_config_files="$ac_config_files Makefile" +ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -8064,39 +9597,58 @@ # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. +# So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -{ +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; + ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} | + esac | + sort +) | sed ' + /^ac_cv_env_/b end t clear - : clear + :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - echo "not updating unwritable cache $cache_file" + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -8105,32 +9657,18 @@ # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' -fi - DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. - ac_i=`echo "$ac_i" | - sed 's/\$U\././;s/\.o$//;s/\.obj$//'` - # 2. Add them. - ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -8168,11 +9706,35 @@ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi +BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset @@ -8181,8 +9743,43 @@ fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -8196,18 +9793,19 @@ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -8215,159 +9813,120 @@ # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# CDPATH. +$as_unset CDPATH -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -8376,7 +9935,19 @@ as_mkdir_p=false fi -as_executable_p="test -f" +# Find out whether ``test -x'' works. Don't use a zero-byte file, as +# systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + as_executable_p="test -x" +else + as_executable_p=: +fi +rm -f conf$$.file # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -8385,31 +9956,14 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - exec 6>&1 -# Open the log real soon, to keep \$[0] and so on meaningful, and to +# Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - +# values after options handling. +ac_log=" This file was extended by cpplib $as_me , which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.60. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -8417,30 +9971,19 @@ CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + _ACEOF +cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi +config_files="$ac_config_files" +config_headers="$ac_config_headers" -if test -n "$ac_config_headers"; then - echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -fi +_ACEOF -if test -n "$ac_config_links"; then - echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_commands"; then - echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -fi - cat >>$CONFIG_STATUS <<\_ACEOF - ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. @@ -8464,19 +10007,21 @@ $config_headers Report bugs to ." + _ACEOF - cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ cpplib config.status -configured by $0, generated by GNU Autoconf 2.59, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.60, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." -srcdir=$srcdir -INSTALL="$INSTALL" + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -8487,39 +10032,24 @@ do case $1 in --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; - -*) + *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; esac case $ac_option in # Handling of the options. -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift @@ -8529,18 +10059,24 @@ $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + { echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} + -*) { echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; - *) ac_config_targets="$ac_config_targets $1" ;; + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; esac shift @@ -8556,29 +10092,43 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL + export CONFIG_SHELL + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + echo "$ac_log" +} >&5 +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF - - -cat >>$CONFIG_STATUS <<\_ACEOF +# Handling of arguments. for ac_config_target in $ac_config_targets do - case "$ac_config_target" in - # Handling of arguments. - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; + case $ac_config_target in + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done + # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -8589,592 +10139,545 @@ fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, +# simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. $debug || { - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } - # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF - # -# CONFIG_FILES section. +# Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h -if test -n "\$CONFIG_FILES"; then - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -s, at SHELL@,$SHELL,;t t -s, at PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s, at PACKAGE_NAME@,$PACKAGE_NAME,;t t -s, at PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s, at PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s, at PACKAGE_STRING@,$PACKAGE_STRING,;t t -s, at PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s, at exec_prefix@,$exec_prefix,;t t -s, at prefix@,$prefix,;t t -s, at program_transform_name@,$program_transform_name,;t t -s, at bindir@,$bindir,;t t -s, at sbindir@,$sbindir,;t t -s, at libexecdir@,$libexecdir,;t t -s, at datadir@,$datadir,;t t -s, at sysconfdir@,$sysconfdir,;t t -s, at sharedstatedir@,$sharedstatedir,;t t -s, at localstatedir@,$localstatedir,;t t -s, at libdir@,$libdir,;t t -s, at includedir@,$includedir,;t t -s, at oldincludedir@,$oldincludedir,;t t -s, at infodir@,$infodir,;t t -s, at mandir@,$mandir,;t t -s, at build_alias@,$build_alias,;t t -s, at host_alias@,$host_alias,;t t -s, at target_alias@,$target_alias,;t t -s, at DEFS@,$DEFS,;t t -s, at ECHO_C@,$ECHO_C,;t t -s, at ECHO_N@,$ECHO_N,;t t -s, at ECHO_T@,$ECHO_T,;t t -s, at LIBS@,$LIBS,;t t -s, at build@,$build,;t t -s, at build_cpu@,$build_cpu,;t t -s, at build_vendor@,$build_vendor,;t t -s, at build_os@,$build_os,;t t -s, at host@,$host,;t t -s, at host_cpu@,$host_cpu,;t t -s, at host_vendor@,$host_vendor,;t t -s, at host_os@,$host_os,;t t -s, at target@,$target,;t t -s, at target_cpu@,$target_cpu,;t t -s, at target_vendor@,$target_vendor,;t t -s, at target_os@,$target_os,;t t -s, at SET_MAKE@,$SET_MAKE,;t t -s, at INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t -s, at INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t -s, at INSTALL_DATA@,$INSTALL_DATA,;t t -s, at CC@,$CC,;t t -s, at CFLAGS@,$CFLAGS,;t t -s, at LDFLAGS@,$LDFLAGS,;t t -s, at CPPFLAGS@,$CPPFLAGS,;t t -s, at ac_ct_CC@,$ac_ct_CC,;t t -s, at EXEEXT@,$EXEEXT,;t t -s, at OBJEXT@,$OBJEXT,;t t -s, at RANLIB@,$RANLIB,;t t -s, at ac_ct_RANLIB@,$ac_ct_RANLIB,;t t -s, at ACLOCAL@,$ACLOCAL,;t t -s, at AUTOCONF@,$AUTOCONF,;t t -s, at AUTOHEADER@,$AUTOHEADER,;t t -s, at WARN_CFLAGS@,$WARN_CFLAGS,;t t -s, at WARN_PEDANTIC@,$WARN_PEDANTIC,;t t -s, at WERROR@,$WERROR,;t t -s, at CPP@,$CPP,;t t -s, at EGREP@,$EGREP,;t t -s, at LIBOBJS@,$LIBOBJS,;t t -s, at ALLOCA@,$ALLOCA,;t t -s, at USE_NLS@,$USE_NLS,;t t -s, at LIBINTL@,$LIBINTL,;t t -s, at LIBINTL_DEP@,$LIBINTL_DEP,;t t -s, at INCINTL@,$INCINTL,;t t -s, at XGETTEXT@,$XGETTEXT,;t t -s, at GMSGFMT@,$GMSGFMT,;t t -s, at POSUB@,$POSUB,;t t -s, at CATALOGS@,$CATALOGS,;t t -s, at LIBICONV@,$LIBICONV,;t t -s, at LTLIBICONV@,$LTLIBICONV,;t t -s, at PACKAGE@,$PACKAGE,;t t -s, at USED_CATALOGS@,$USED_CATALOGS,;t t -s, at MAINT@,$MAINT,;t t -s, at LLVMBASEPATH@,$LLVMBASEPATH,;t t -s, at LTLIBOBJS@,$LTLIBOBJS,;t t -CEOF +if test -n "$CONFIG_FILES"; then _ACEOF - cat >>$CONFIG_STATUS <<\_ACEOF - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. - ac_max_sed_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # Line after last line for current file. - ac_more_lines=: - ac_sed_cmds= - while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +build!$build$ac_delim +build_cpu!$build_cpu$ac_delim +build_vendor!$build_vendor$ac_delim +build_os!$build_os$ac_delim +host!$host$ac_delim +host_cpu!$host_cpu$ac_delim +host_vendor!$host_vendor$ac_delim +host_os!$host_os$ac_delim +target!$target$ac_delim +target_cpu!$target_cpu$ac_delim +target_vendor!$target_vendor$ac_delim +target_os!$target_os$ac_delim +SET_MAKE!$SET_MAKE$ac_delim +INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim +INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim +INSTALL_DATA!$INSTALL_DATA$ac_delim +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +RANLIB!$RANLIB$ac_delim +ACLOCAL!$ACLOCAL$ac_delim +AUTOCONF!$AUTOCONF$ac_delim +AUTOHEADER!$AUTOHEADER$ac_delim +WARN_CFLAGS!$WARN_CFLAGS$ac_delim +WARN_PEDANTIC!$WARN_PEDANTIC$ac_delim +WERROR!$WERROR$ac_delim +CPP!$CPP$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +ALLOCA!$ALLOCA$ac_delim +USE_NLS!$USE_NLS$ac_delim +LIBINTL!$LIBINTL$ac_delim +LIBINTL_DEP!$LIBINTL_DEP$ac_delim +INCINTL!$INCINTL$ac_delim +XGETTEXT!$XGETTEXT$ac_delim +GMSGFMT!$GMSGFMT$ac_delim +POSUB!$POSUB$ac_delim +CATALOGS!$CATALOGS$ac_delim +LIBICONV!$LIBICONV$ac_delim +LTLIBICONV!$LTLIBICONV$ac_delim +PACKAGE!$PACKAGE$ac_delim +USED_CATALOGS!$USED_CATALOGS$ac_delim +MAINT!$MAINT$ac_delim +LLVMBASEPATH!$LLVMBASEPATH$ac_delim +LTLIBOBJS!$LTLIBOBJS$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 87; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi -fi # test -n "$CONFIG_FILES" +done +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end _ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof +_ACEOF + + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + cat >>$CONFIG_STATUS <<\_ACEOF -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + ac_file_inputs="$ac_file_inputs $ac_f" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input="Generated from "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + fi + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } - ac_builddir=. -if test "$ac_dir" != .; then +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + case $ac_mode in + :F) + # + # CONFIG_FILE + # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_builddir$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac +_ACEOF - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." +cat >>$CONFIG_STATUS <<\_ACEOF +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } +case `sed -n '/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $ac_file_inputs` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s, at configure_input@,$configure_input,;t t -s, at srcdir@,$ac_srcdir,;t t -s, at abs_srcdir@,$ac_abs_srcdir,;t t -s, at top_srcdir@,$ac_top_srcdir,;t t -s, at abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s, at builddir@,$ac_builddir,;t t -s, at abs_builddir@,$ac_abs_builddir,;t t -s, at top_builddir@,$ac_top_builddir,;t t -s, at abs_top_builddir@,$ac_abs_top_builddir,;t t -s, at INSTALL@,$ac_INSTALL,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +$ac_datarootdir_hack +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} -# -# CONFIG_HEADER section. -# - -# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -# NAME is the cpp macro being defined and VALUE is the value it is being given. -# -# ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='[ ].*$,\1#\2' -ac_dC=' ' -ac_dD=',;t' -# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='$,\1#\2define\3' -ac_uC=' ' -ac_uD=',;t' - -for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + rm -f "$tmp/stdin" case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; esac + ;; + :H) + # + # CONFIG_HEADER + # +_ACEOF - test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} +# Transform confdefs.h into a sed script `conftest.defines', that +# substitutes the proper values into config.h.in to produce config.h. +rm -f conftest.defines conftest.tail +# First, append a space to every undef/define line, to ease matching. +echo 's/$/ /' >conftest.defines +# Then, protect against being on the right side of a sed subst, or in +# an unquoted here document, in config.status. If some macros were +# called several times there might be several #defines for the same +# symbol, which is useless. But do not sort them, since the last +# AC_DEFINE must be honored. +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where +# NAME is the cpp macro being defined, VALUE is the value it is being given. +# PARAMS is the parameter list in the macro definition--in most cases, it's +# just an empty string. +ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' +ac_dB='\\)[ (].*,\\1define\\2' +ac_dC=' ' +ac_dD=' ,' - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - # Do quote $f, to prevent DOS paths from being IFS'd. - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } - # Remove the trailing spaces. - sed 's/[ ]*$//' $ac_file_inputs >$tmp/in +uniq confdefs.h | + sed -n ' + t rset + :rset + s/^[ ]*#[ ]*define[ ][ ]*// + t ok + d + :ok + s/[\\&,]/\\&/g + s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p + s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p + ' >>conftest.defines -_ACEOF - -# Transform confdefs.h into two sed scripts, `conftest.defines' and -# `conftest.undefs', that substitutes the proper values into -# config.h.in to produce config.h. The first handles `#define' -# templates, and the second `#undef' templates. -# And first: Protect against being on the right side of a sed subst in -# config.status. Protect against being in an unquoted here document -# in config.status. -rm -f conftest.defines conftest.undefs -# Using a here document instead of a string reduces the quoting nightmare. -# Putting comments in sed scripts is not portable. -# -# `end' is used to avoid that the second main sed command (meant for -# 0-ary CPP macros) applies to n-ary macro definitions. -# See the Autoconf documentation for `clear'. -cat >confdef2sed.sed <<\_ACEOF -s/[\\&,]/\\&/g -s,[\\$`],\\&,g -t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp -t end -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp -: end -_ACEOF -# If some macros were called several times there might be several times -# the same #defines, which is useless. Nevertheless, we may not want to -# sort them, since we want the *last* AC-DEFINE to be honored. -uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines -sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs -rm -f confdef2sed.sed - -# This sed command replaces #undef with comments. This is necessary, for +# Remove the space that was appended to ease matching. +# Then replace #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. -cat >>conftest.undefs <<\_ACEOF -s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, -_ACEOF +# (The regexp can be short, since the line contains either #define or #undef.) +echo 's/ $// +s,^[ #]*u.*,/* & */,' >>conftest.defines -# Break up conftest.defines because some shells have a limit on the size -# of here documents, and old seds have small limits too (100 cmds). -echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS -echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS -echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS -echo ' :' >>$CONFIG_STATUS -rm -f conftest.tail -while grep . conftest.defines >/dev/null +# Break up conftest.defines: +ac_max_sed_lines=50 + +# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" +# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" +# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" +# et cetera. +ac_in='$ac_file_inputs' +ac_out='"$tmp/out1"' +ac_nxt='"$tmp/out2"' + +while : do - # Write a limited-size here document to $tmp/defines.sed. - echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS - # Speed up: don't consider the non `#define' lines. - echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS - # Work around the forget-to-reset-the-flag bug. - echo 't clr' >>$CONFIG_STATUS - echo ': clr' >>$CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS + # Write a here document: + cat >>$CONFIG_STATUS <<_ACEOF + # First, check the format of the line: + cat >"\$tmp/defines.sed" <<\\CEOF +/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def +/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def +b +:def +_ACEOF + sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF - sed -f $tmp/defines.sed $tmp/in >$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in -' >>$CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail + sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS + ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in + sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail + grep . conftest.tail >/dev/null || break rm -f conftest.defines mv conftest.tail conftest.defines done -rm -f conftest.defines -echo ' fi # grep' >>$CONFIG_STATUS -echo >>$CONFIG_STATUS +rm -f conftest.defines conftest.tail -# Break up conftest.undefs because some shells have a limit on the size -# of here documents, and old seds have small limits too (100 cmds). -echo ' # Handle all the #undef templates' >>$CONFIG_STATUS -rm -f conftest.tail -while grep . conftest.undefs >/dev/null -do - # Write a limited-size here document to $tmp/undefs.sed. - echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS - # Speed up: don't consider the non `#undef' - echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS - # Work around the forget-to-reset-the-flag bug. - echo 't clr' >>$CONFIG_STATUS - echo ': clr' >>$CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS - echo 'CEOF - sed -f $tmp/undefs.sed $tmp/in >$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in -' >>$CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail - rm -f conftest.undefs - mv conftest.tail conftest.undefs -done -rm -f conftest.undefs - +echo "ac_result=$ac_in" >>$CONFIG_STATUS cat >>$CONFIG_STATUS <<\_ACEOF - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - echo "/* Generated by configure. */" >$tmp/config.h - else - echo "/* $ac_file. Generated by configure. */" >$tmp/config.h - fi - cat $tmp/in >>$tmp/config.h - rm -f $tmp/in if test x"$ac_file" != x-; then - if diff $ac_file $tmp/config.h >/dev/null 2>&1; then + echo "/* $configure_input */" >"$tmp/config.h" + cat "$ac_result" >>"$tmp/config.h" + if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else - ac_dir=`(dirname "$ac_file") 2>/dev/null || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - rm -f $ac_file - mv $tmp/config.h $ac_file + mv "$tmp/config.h" $ac_file fi else - cat $tmp/config.h - rm -f $tmp/config.h + echo "/* $configure_input */" + cat "$ac_result" fi - # Run the commands associated with the file. - case $ac_file in - config.h ) echo timestamp > stamp-h1 ;; + rm -f "$tmp/out12" + ;; + + esac -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF + case $ac_file$ac_mode in + "config.h":H) echo timestamp > stamp-h1 ;; + + esac +done # for ac_tag + + { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS From greened at obbligato.org Thu Jun 28 14:36:30 2007 From: greened at obbligato.org (David Greene) Date: Thu, 28 Jun 2007 14:36:30 -0500 Subject: [llvm-commits] CVS: llvm/configure Makefile.rules Makefile.config.in Message-ID: <200706281936.l5SJaUBX030150@zion.cs.uiuc.edu> Changes in directory llvm: configure updated: 1.277 -> 1.278 Makefile.rules updated: 1.435 -> 1.436 Makefile.config.in updated: 1.76 -> 1.77 --- Log message: Add support for building with _GLIBCXX_DEBUG. New configure option --enable-expensive-checks allows the developer to enable runtime checking that can greatly increase compile time. Currently it only turns on _GLIBCXX_DEBUG. Other expensive debugging checks added later should be controlled by this configure option. This patch also updates llvm-config with a --cppflags option to inform llvm-gcc how to build itself so that it is compatible with an llvm that was built with _GLIBCXX_DEBUG. --- Diffs of the changes: (+66 -28) Makefile.config.in | 5 +++ Makefile.rules | 10 ++++++ configure | 79 ++++++++++++++++++++++++++++++++++------------------- 3 files changed, 66 insertions(+), 28 deletions(-) Index: llvm/configure diff -u llvm/configure:1.277 llvm/configure:1.278 --- llvm/configure:1.277 Thu May 17 13:11:03 2007 +++ llvm/configure Thu Jun 28 14:36:07 2007 @@ -830,6 +830,8 @@ CVSBUILD ENABLE_OPTIMIZED DISABLE_ASSERTIONS +ENABLE_EXPENSIVE_CHECKS +EXPENSIVE_CHECKS DEBUG_RUNTIME JIT TARGET_HAS_JIT @@ -1525,6 +1527,8 @@ --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-optimized --enable-assertions + --enable-expensive-checks + --enable-debug-runtime --enable-jit Enable Just In Time Compiling (default is YES) --enable-doxygen Build doxygen documentation (default is NO) @@ -4577,6 +4581,25 @@ fi +# Check whether --enable-expensive-checks was given. +if test "${enable_expensive_checks+set}" = set; then + enableval=$enable_expensive_checks; +else + enableval="no" +fi + +if test ${enableval} = "yes" ; then + ENABLE_EXPENSIVE_CHECKS=ENABLE_EXPENSIVE_CHECKS=1 + + EXPENSIVE_CHECKS=yes + +else + ENABLE_EXPENSIVE_CHECKS= + + EXPENSIVE_CHECKS=no + +fi + # Check whether --enable-debug-runtime was given. if test "${enable_debug_runtime+set}" = set; then enableval=$enable_debug_runtime; @@ -10343,7 +10366,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext + echo '#line 12513 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -14205,11 +14228,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14208: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14231: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14212: \$? = $ac_status" >&5 + echo "$as_me:14235: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -14473,11 +14496,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14476: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14499: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14480: \$? = $ac_status" >&5 + echo "$as_me:14503: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -14577,11 +14600,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14580: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14603: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14584: \$? = $ac_status" >&5 + echo "$as_me:14607: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17029,7 +17052,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:19523: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:19504: \$? = $ac_status" >&5 + echo "$as_me:19527: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -19601,11 +19624,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:19604: $lt_compile\"" >&5) + (eval echo "\"\$as_me:19627: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:19608: \$? = $ac_status" >&5 + echo "$as_me:19631: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -21171,11 +21194,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:21174: $lt_compile\"" >&5) + (eval echo "\"\$as_me:21197: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:21178: \$? = $ac_status" >&5 + echo "$as_me:21201: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -21275,11 +21298,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:21278: $lt_compile\"" >&5) + (eval echo "\"\$as_me:21301: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:21282: \$? = $ac_status" >&5 + echo "$as_me:21305: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -23510,11 +23533,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:23513: $lt_compile\"" >&5) + (eval echo "\"\$as_me:23536: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:23517: \$? = $ac_status" >&5 + echo "$as_me:23540: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -23778,11 +23801,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:23781: $lt_compile\"" >&5) + (eval echo "\"\$as_me:23804: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:23785: \$? = $ac_status" >&5 + echo "$as_me:23808: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -23882,11 +23905,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:23885: $lt_compile\"" >&5) + (eval echo "\"\$as_me:23908: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:23889: \$? = $ac_status" >&5 + echo "$as_me:23912: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -34342,6 +34365,8 @@ CVSBUILD!$CVSBUILD$ac_delim ENABLE_OPTIMIZED!$ENABLE_OPTIMIZED$ac_delim DISABLE_ASSERTIONS!$DISABLE_ASSERTIONS$ac_delim +ENABLE_EXPENSIVE_CHECKS!$ENABLE_EXPENSIVE_CHECKS$ac_delim +EXPENSIVE_CHECKS!$EXPENSIVE_CHECKS$ac_delim DEBUG_RUNTIME!$DEBUG_RUNTIME$ac_delim JIT!$JIT$ac_delim TARGET_HAS_JIT!$TARGET_HAS_JIT$ac_delim @@ -34363,8 +34388,6 @@ BISON!$BISON$ac_delim NM!$NM$ac_delim ifGNUmake!$ifGNUmake$ac_delim -LN_S!$LN_S$ac_delim -CMP!$CMP$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then @@ -34406,6 +34429,8 @@ ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF +LN_S!$LN_S$ac_delim +CMP!$CMP$ac_delim CP!$CP$ac_delim DATE!$DATE$ac_delim FIND!$FIND$ac_delim @@ -34477,7 +34502,7 @@ LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 69; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 71; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.435 llvm/Makefile.rules:1.436 --- llvm/Makefile.rules:1.435 Thu May 17 17:51:35 2007 +++ llvm/Makefile.rules Thu Jun 28 14:36:08 2007 @@ -260,6 +260,13 @@ C.Flags += -D_DEBUG endif +# If DISABLE_EXPENSIVE_CHECKS=1 is specified (make command line or configured), +# then disable expensive checks by defining the appropriate preprocessor symbols. +ifdef ENABLE_EXPENSIVE_CHECKS + BuildMode := $(BuildMode)+Checks + CXX.Flags += -D_GLIBCXX_DEBUG +endif + ifeq ($(ENABLE_PIC),1) CXX.Flags += -fPIC C.Flags += -fPIC @@ -267,7 +274,8 @@ CXX.Flags += $(CXXFLAGS) -Woverloaded-virtual C.Flags += $(CFLAGS) -CPP.BaseFlags += $(CPPFLAGS) +CPP.Defines += $(CPPFLAGS) +CPP.BaseFlags += $(CPP.Defines) LD.Flags += $(LDFLAGS) AR.Flags := cru LibTool.Flags := --tag=CXX Index: llvm/Makefile.config.in diff -u llvm/Makefile.config.in:1.76 llvm/Makefile.config.in:1.77 --- llvm/Makefile.config.in:1.76 Sat Apr 21 16:28:12 2007 +++ llvm/Makefile.config.in Thu Jun 28 14:36:08 2007 @@ -209,6 +209,11 @@ #DISABLE_ASSERTIONS = 1 @DISABLE_ASSERTIONS@ +# When ENABLE_EXPENSIVE_CHECKS is enabled, builds of all of the LLVM +# code will include expensive checks, otherwise they are excluded. +#ENABLE_EXPENSIVE_CHECKS = 0 + at ENABLE_EXPENSIVE_CHECKS@ + # When DEBUG_RUNTIME is enabled, the runtime libraries will retain debug # symbols. #DEBUG_RUNTIME = 1 From greened at obbligato.org Thu Jun 28 14:36:31 2007 From: greened at obbligato.org (David Greene) Date: Thu, 28 Jun 2007 14:36:31 -0500 Subject: [llvm-commits] CVS: llvm/autoconf/configure.ac Message-ID: <200706281936.l5SJaVlh030155@zion.cs.uiuc.edu> Changes in directory llvm/autoconf: configure.ac updated: 1.271 -> 1.272 --- Log message: Add support for building with _GLIBCXX_DEBUG. New configure option --enable-expensive-checks allows the developer to enable runtime checking that can greatly increase compile time. Currently it only turns on _GLIBCXX_DEBUG. Other expensive debugging checks added later should be controlled by this configure option. This patch also updates llvm-config with a --cppflags option to inform llvm-gcc how to build itself so that it is compatible with an llvm that was built with _GLIBCXX_DEBUG. --- Diffs of the changes: (+11 -0) configure.ac | 11 +++++++++++ 1 files changed, 11 insertions(+) Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.271 llvm/autoconf/configure.ac:1.272 --- llvm/autoconf/configure.ac:1.271 Thu May 17 13:06:19 2007 +++ llvm/autoconf/configure.ac Thu Jun 28 14:36:07 2007 @@ -274,6 +274,17 @@ AC_SUBST(DISABLE_ASSERTIONS,[[DISABLE_ASSERTIONS=1]]) fi +dnl --enable-expensive-checks : check whether they want to turn on expensive debug checks: +AC_ARG_ENABLE(expensive-checks,AS_HELP_STRING( + [--enable-expensive-checks,Compile with expensive debug checks enabled (default is NO)]),, enableval="no") +if test ${enableval} = "yes" ; then + AC_SUBST(ENABLE_EXPENSIVE_CHECKS,[[ENABLE_EXPENSIVE_CHECKS=1]]) + AC_SUBST(EXPENSIVE_CHECKS,[[yes]]) +else + AC_SUBST(ENABLE_EXPENSIVE_CHECKS,[[]]) + AC_SUBST(EXPENSIVE_CHECKS,[[no]]) +fi + dnl --enable-debug-runtime : should runtime libraries have debug symbols? AC_ARG_ENABLE(debug-runtime, AS_HELP_STRING([--enable-debug-runtime,Build runtime libs with debug symbols (default is NO)]),,enableval=no) From greened at obbligato.org Thu Jun 28 14:36:36 2007 From: greened at obbligato.org (David Greene) Date: Thu, 28 Jun 2007 14:36:36 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvm-config/llvm-config.in.in Makefile Message-ID: <200706281936.l5SJaaU9030162@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-config: llvm-config.in.in updated: 1.27 -> 1.28 Makefile updated: 1.23 -> 1.24 --- Log message: Add support for building with _GLIBCXX_DEBUG. New configure option --enable-expensive-checks allows the developer to enable runtime checking that can greatly increase compile time. Currently it only turns on _GLIBCXX_DEBUG. Other expensive debugging checks added later should be controlled by this configure option. This patch also updates llvm-config with a --cppflags option to inform llvm-gcc how to build itself so that it is compatible with an llvm that was built with _GLIBCXX_DEBUG. --- Diffs of the changes: (+30 -3) Makefile | 4 +++- llvm-config.in.in | 29 +++++++++++++++++++++++++++-- 2 files changed, 30 insertions(+), 3 deletions(-) Index: llvm/tools/llvm-config/llvm-config.in.in diff -u llvm/tools/llvm-config/llvm-config.in.in:1.27 llvm/tools/llvm-config/llvm-config.in.in:1.28 --- llvm/tools/llvm-config/llvm-config.in.in:1.27 Sun Apr 22 13:33:20 2007 +++ llvm/tools/llvm-config/llvm-config.in.in Thu Jun 28 14:36:07 2007 @@ -42,6 +42,7 @@ my $TARGETS_TO_BUILD = q{@TARGETS_TO_BUILD@}; my $TARGET_HAS_JIT = q{@TARGET_HAS_JIT@}; my @TARGETS_BUILT = map { lc($_) } qw{@TARGETS_TO_BUILD@}; +my $EXPENSIVE_CHECKS = q{@EXPENSIVE_CHECKS@}; #---- end autoconf values ---- # Must pretend x86_64 architecture is really x86, otherwise the native backend @@ -49,6 +50,7 @@ $ARCH = "x86" if $ARCH eq "x86_64"; #---- begin Makefile values ---- +my $CPPFLAGS = q{@LLVM_CPPFLAGS@}; my $CFLAGS = q{@LLVM_CFLAGS@}; my $CXXFLAGS = q{@LLVM_CXXFLAGS@}; my $LDFLAGS = q{@LLVM_LDFLAGS@}; @@ -112,10 +114,18 @@ $has_opt = 1; print "$INCLUDEDIR\n"; } elsif ($arg eq "--libdir") { $has_opt = 1; print "$LIBDIR\n"; + } elsif ($arg eq "--cppflags") { + $has_opt = 1; + my $cppopts = get_cpp_opts(); + print "$cppopts\n"; } elsif ($arg eq "--cflags") { - $has_opt = 1; print "-I$INCLUDEDIR $CFLAGS\n"; + $has_opt = 1; + my $cppopts = get_cpp_opts(); + print "$cppopts $CFLAGS\n"; } elsif ($arg eq "--cxxflags") { - $has_opt = 1; print "-I$INCLUDEDIR $CXXFLAGS\n"; + $has_opt = 1; + my $cppopts = get_cpp_opts(); + print "$cppopts $CXXFLAGS\n"; } elsif ($arg eq "--ldflags") { $has_opt = 1; print "-L$LIBDIR $LDFLAGS $SYSTEM_LIBS\n"; } elsif ($arg eq "--libs") { @@ -187,6 +197,7 @@ --bindir Directory containing LLVM executables. --includedir Directory containing LLVM headers. --libdir Directory containing LLVM libraries. + --cppflags C preprocessor flags for files that include LLVM headers. --cflags C compiler flags for files that include LLVM headers. --cxxflags C++ compiler flags for files that include LLVM headers. --ldflags Print Linker flags. @@ -205,6 +216,20 @@ exit(1); } +# Return cpp flags used to build llvm. +sub get_cpp_opts { + my $opts = ""; + + if ($EXPENSIVE_CHECKS eq "yes") { + $opts = "-D_GLIBCXX_DEBUG -I$INCLUDEDIR $CPPFLAGS"; + } + else { + $opts = "-I$INCLUDEDIR $CPPFLAGS"; + } + + return $opts; +} + # Use -lfoo instead of libfoo.a whenever possible, and add directories to # files which can't be found using -L. sub fix_library_names (@) { Index: llvm/tools/llvm-config/Makefile diff -u llvm/tools/llvm-config/Makefile:1.23 llvm/tools/llvm-config/Makefile:1.24 --- llvm/tools/llvm-config/Makefile:1.23 Sun Feb 4 16:08:16 2007 +++ llvm/tools/llvm-config/Makefile Thu Jun 28 14:36:07 2007 @@ -20,6 +20,7 @@ ifeq ($(HAVE_PERL),1) # Combine preprocessor flags (except for -I) and CXX flags. +SUB_CPPFLAGS = ${CPP.Defines} SUB_CFLAGS = ${CPP.BaseFlags} ${C.Flags} SUB_CXXFLAGS = ${CPP.BaseFlags} ${CXX.Flags} @@ -56,7 +57,8 @@ # Build our final script. $(ToolDir)/llvm-config: llvm-config.in $(FinalLibDeps) $(Echo) "Building llvm-config script." - $(Verb) $(ECHO) 's, at LLVM_CFLAGS@,$(SUB_CFLAGS),' > temp.sed + $(Verb) $(ECHO) 's, at LLVM_CPPFLAGS@,$(SUB_CPPFLAGS),' > temp.sed + $(Verb) $(ECHO) 's, at LLVM_CFLAGS@,$(SUB_CFLAGS),' >> temp.sed $(Verb) $(ECHO) 's, at LLVM_CXXFLAGS@,$(SUB_CXXFLAGS),' >> temp.sed $(Verb) $(ECHO) 's, at LLVM_LDFLAGS@,$(SUB_LDFLAGS),' >> temp.sed $(Verb) $(ECHO) 's, at LLVM_BUILDMODE@,$(BuildMode),' >> temp.sed From djg at cray.com Thu Jun 28 14:36:47 2007 From: djg at cray.com (Dan Gohman) Date: Thu, 28 Jun 2007 14:36:47 -0500 Subject: [llvm-commits] ARM problem In-Reply-To: <9c10c9f0706281006r478e2a3dm80339430e1095300@mail.gmail.com> References: <20070628000202.GX5693@village.us.cray.com> <9c10c9f0706281006r478e2a3dm80339430e1095300@mail.gmail.com> Message-ID: <20070628193647.GC5693@village.us.cray.com> Attached is my new patch for this bug. It's bigger than I had originally planned, but it fixes the bug you reported, and it factors out the copy-to-regs/copy-from-regs logic which was duplicated in several places so that it's handled the same way in each place. If this patch is not ok for any reason, I'll apply the simpler fix to fix the regression for tonight's nightly test. Dan On Thu, Jun 28, 2007 at 02:06:43PM -0300, Lauro Ramos Venancio wrote: > Hi Dan, > > Do you already have the final fix for this problem? It caused a lot of > fails on nightly test > (http://llvm.org/nightlytest/test.php?machine=142&night=3088). > > Lauro -- Dan Gohman, Cray Inc. -------------- next part -------------- Index: include/llvm/ADT/SmallVector.h =================================================================== RCS file: /var/cvs/llvm/llvm/include/llvm/ADT/SmallVector.h,v retrieving revision 1.30 diff -u -r1.30 SmallVector.h --- include/llvm/ADT/SmallVector.h +++ include/llvm/ADT/SmallVector.h @@ -442,7 +442,7 @@ SmallVector() : SmallVectorImpl(NumTsAvailable) { } - SmallVector(unsigned Size, const T &Value) + SmallVector(unsigned Size, const T &Value = T()) : SmallVectorImpl(NumTsAvailable) { this->reserve(Size); while (Size--) Index: include/llvm/CodeGen/SelectionDAGNodes.h =================================================================== RCS file: /var/cvs/llvm/llvm/include/llvm/CodeGen/SelectionDAGNodes.h,v retrieving revision 1.193 diff -u -r1.193 SelectionDAGNodes.h --- include/llvm/CodeGen/SelectionDAGNodes.h +++ include/llvm/CodeGen/SelectionDAGNodes.h @@ -253,7 +253,7 @@ /// CONCAT_VECTORS(VECTOR0, VECTOR1, ...) - Given a number of values of /// vector type with the same length and element type, this produces a /// concatenated vector result value, with length equal to the sum of the - /// input vectors. + /// lengths of the input vectors. CONCAT_VECTORS, /// EXTRACT_SUBVECTOR(VECTOR, IDX) - Returns a subvector from VECTOR (an Index: include/llvm/Target/TargetLowering.h =================================================================== RCS file: /var/cvs/llvm/llvm/include/llvm/Target/TargetLowering.h,v retrieving revision 1.133 diff -u -r1.133 TargetLowering.h --- include/llvm/Target/TargetLowering.h +++ include/llvm/Target/TargetLowering.h @@ -212,12 +212,13 @@ /// Similarly, MVT::v2i64 turns into 4 MVT::i32 values with both PPC and X86. /// /// This method returns the number of registers needed, and the VT for each - /// register. It also returns the VT of the VectorType elements before they - /// are promoted/expanded. + /// register. It also returns the VT and quantity of the intermediate values + /// before they are promoted/expanded. /// unsigned getVectorTypeBreakdown(MVT::ValueType VT, - MVT::ValueType &ElementVT, - MVT::ValueType &LegalElementVT) const; + MVT::ValueType &IntermediateVT, + unsigned &NumIntermediates, + MVT::ValueType &RegisterVT) const; typedef std::vector::const_iterator legal_fpimm_iterator; legal_fpimm_iterator legal_fpimm_begin() const { @@ -360,6 +361,18 @@ return VT == MVT::iPTR ? PointerTy : VT; } + /// getRegisterType - Return the type of registers that this ValueType will + /// eventually require. + MVT::ValueType getRegisterType(MVT::ValueType VT) const { + if (!MVT::isExtendedVT(VT)) + return RegisterTypeForVT[VT]; + + MVT::ValueType VT1, RegisterVT; + unsigned NumIntermediates; + (void)getVectorTypeBreakdown(VT, VT1, NumIntermediates, RegisterVT); + return RegisterVT; + } + /// getNumRegisters - Return the number of registers that this ValueType will /// eventually require. This is one for any types promoted to live in larger /// registers, but may be more than one for types (like i64) that are split @@ -369,7 +382,8 @@ return NumRegistersForVT[VT]; MVT::ValueType VT1, VT2; - return getVectorTypeBreakdown(VT, VT1, VT2); + unsigned NumIntermediates; + return getVectorTypeBreakdown(VT, VT1, NumIntermediates, VT2); } /// hasTargetDAGCombine - If true, the target has custom DAG combine @@ -1034,6 +1048,7 @@ /// each ValueType the target supports natively. TargetRegisterClass *RegClassForVT[MVT::LAST_VALUETYPE]; unsigned char NumRegistersForVT[MVT::LAST_VALUETYPE]; + MVT::ValueType RegisterTypeForVT[MVT::LAST_VALUETYPE]; /// TransformToType - For any value types we are promoting or expanding, this /// contains the value type that we are changing to. For Expanded types, this Index: lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp =================================================================== RCS file: /var/cvs/llvm/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp,v retrieving revision 1.471 diff -u -r1.471 SelectionDAGISel.cpp --- lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -90,7 +90,7 @@ /// This is needed because values can be promoted into larger registers and /// expanded into multiple smaller registers than the value. struct VISIBILITY_HIDDEN RegsForValue { - /// Regs - This list hold the register (for legal and promoted values) + /// Regs - This list holds the register (for legal and promoted values) /// or register set (for expanded values) that the value should be assigned /// to. std::vector Regs; @@ -118,14 +118,13 @@ /// this value and returns the result as a ValueVT value. This uses /// Chain/Flag as the input and updates them for the output Chain/Flag. SDOperand getCopyFromRegs(SelectionDAG &DAG, - SDOperand &Chain, SDOperand &Flag) const; + SDOperand &Chain, SDOperand *Flag) const; /// getCopyToRegs - Emit a series of CopyToReg nodes that copies the /// specified value into the registers specified by this object. This uses /// Chain/Flag as the input and updates them for the output Chain/Flag. void getCopyToRegs(SDOperand Val, SelectionDAG &DAG, - SDOperand &Chain, SDOperand &Flag, - MVT::ValueType PtrVT) const; + SDOperand &Chain, SDOperand *Flag) const; /// AddInlineAsmOperands - Add this value to the specified inlineasm node /// operand list. This adds the code marker and includes the number of @@ -306,15 +305,8 @@ unsigned FunctionLoweringInfo::CreateRegForValue(const Value *V) { MVT::ValueType VT = TLI.getValueType(V->getType()); - unsigned NumRegisters; - MVT::ValueType RegisterVT; - if (MVT::isVector(VT)) { - MVT::ValueType ElementVT; - NumRegisters = TLI.getVectorTypeBreakdown(VT, ElementVT, RegisterVT); - } else { - RegisterVT = TLI.getTypeToTransformTo(VT); - NumRegisters = TLI.getNumRegisters(VT); - } + unsigned NumRegisters = TLI.getNumRegisters(VT); + MVT::ValueType RegisterVT = TLI.getRegisterType(VT); unsigned R = MakeReg(RegisterVT); for (unsigned i = 1; i != NumRegisters; ++i) @@ -695,79 +687,17 @@ unsigned InReg = FuncInfo.ValueMap[V]; assert(InReg && "Value not in map!"); - // If this type is not legal, make it so now. - if (!MVT::isVector(VT)) { - if (TLI.getTypeAction(VT) == TargetLowering::Expand) { - // Source must be expanded. This input value is actually coming from the - // register pair InReg and InReg+1. - MVT::ValueType DestVT = TLI.getTypeToExpandTo(VT); - unsigned NumVals = TLI.getNumRegisters(VT); - N = DAG.getCopyFromReg(DAG.getEntryNode(), InReg, DestVT); - if (NumVals == 1) - N = DAG.getNode(ISD::BIT_CONVERT, VT, N); - else { - assert(NumVals == 2 && "1 to 4 (and more) expansion not implemented!"); - N = DAG.getNode(ISD::BUILD_PAIR, VT, N, - DAG.getCopyFromReg(DAG.getEntryNode(), InReg+1, DestVT)); - } - } else { - MVT::ValueType DestVT = TLI.getTypeToTransformTo(VT); - N = DAG.getCopyFromReg(DAG.getEntryNode(), InReg, DestVT); - if (TLI.getTypeAction(VT) == TargetLowering::Promote) // Promotion case - N = MVT::isFloatingPoint(VT) - ? DAG.getNode(ISD::FP_ROUND, VT, N) - : DAG.getNode(ISD::TRUNCATE, VT, N); - } - } else { - // Otherwise, if this is a vector, make it available as a vector - // here. - MVT::ValueType ElementVT, LegalElementVT; - unsigned NE = TLI.getVectorTypeBreakdown(VT, ElementVT, - LegalElementVT); - - // Build a BUILD_VECTOR or CONCAT_VECTORS with the input registers. - SmallVector Ops; - if (ElementVT == LegalElementVT) { - // If the value types are legal, just BUILD the CopyFromReg nodes. - for (unsigned i = 0; i != NE; ++i) - Ops.push_back(DAG.getCopyFromReg(DAG.getEntryNode(), InReg++, - ElementVT)); - } else if (ElementVT < LegalElementVT) { - // If the register was promoted, use TRUNCATE or FP_ROUND as appropriate. - for (unsigned i = 0; i != NE; ++i) { - SDOperand Op = DAG.getCopyFromReg(DAG.getEntryNode(), InReg++, - LegalElementVT); - if (MVT::isFloatingPoint(ElementVT)) - Op = DAG.getNode(ISD::FP_ROUND, ElementVT, Op); - else - Op = DAG.getNode(ISD::TRUNCATE, ElementVT, Op); - Ops.push_back(Op); - } - } else { - // If the register was expanded, use BUILD_PAIR. - assert((NE & 1) == 0 && "Must expand into a multiple of 2 elements!"); - for (unsigned i = 0; i != NE; ++i) { - SDOperand Op0 = DAG.getCopyFromReg(DAG.getEntryNode(), InReg++, - LegalElementVT); - SDOperand Op1 = DAG.getCopyFromReg(DAG.getEntryNode(), InReg++, - LegalElementVT); - Ops.push_back(DAG.getNode(ISD::BUILD_PAIR, ElementVT, Op0, Op1)); - } - } - - if (MVT::isVector(ElementVT)) { - N = DAG.getNode(ISD::CONCAT_VECTORS, - MVT::getVectorType(MVT::getVectorElementType(ElementVT), - NE * MVT::getVectorNumElements(ElementVT)), - &Ops[0], Ops.size()); - } else { - N = DAG.getNode(ISD::BUILD_VECTOR, - MVT::getVectorType(ElementVT, NE), - &Ops[0], Ops.size()); - } - } - - return N; + MVT::ValueType RegisterVT = TLI.getRegisterType(VT); + unsigned NumRegs = TLI.getNumRegisters(VT); + + std::vector Regs(NumRegs); + for (unsigned i = 0; i != NumRegs; ++i) + Regs[i] = InReg + i; + + RegsForValue RFV(Regs, RegisterVT, VT); + SDOperand Chain = DAG.getEntryNode(); + + return RFV.getCopyFromRegs(DAG, Chain, NULL); } @@ -2819,88 +2749,234 @@ } -SDOperand RegsForValue::getCopyFromRegs(SelectionDAG &DAG, - SDOperand &Chain, SDOperand &Flag)const{ - SDOperand Val = DAG.getCopyFromReg(Chain, Regs[0], RegVT, Flag); - Chain = Val.getValue(1); - Flag = Val.getValue(2); - - // If the result was expanded, copy from the top part. - if (Regs.size() > 1) { - assert(Regs.size() == 2 && - "Cannot expand to more than 2 elts yet!"); - SDOperand Hi = DAG.getCopyFromReg(Chain, Regs[1], RegVT, Flag); - Chain = Hi.getValue(1); - Flag = Hi.getValue(2); - if (DAG.getTargetLoweringInfo().isLittleEndian()) +/// getCopyFromParts - Create a value that contains the +/// specified legal parts combined into the value they represent. +static SDOperand getCopyFromParts(SelectionDAG &DAG, + const SDOperand *Parts, + unsigned NumParts, + MVT::ValueType PartVT, + MVT::ValueType ValueVT, + ISD::NodeType AssertOp = ISD::DELETED_NODE) { + if (!MVT::isVector(ValueVT) || NumParts == 1) { + SDOperand Val = Parts[0]; + + // If the value was expanded, copy from the top part. + if (NumParts > 1) { + assert(NumParts == 2 && + "Cannot expand to more than 2 elts yet!"); + SDOperand Hi = Parts[1]; return DAG.getNode(ISD::BUILD_PAIR, ValueVT, Val, Hi); - else - return DAG.getNode(ISD::BUILD_PAIR, ValueVT, Hi, Val); - } + } - // Otherwise, if the return value was promoted or extended, truncate it to the - // appropriate type. - if (RegVT == ValueVT) - return Val; + // Otherwise, if the value was promoted or extended, truncate it to the + // appropriate type. + if (PartVT == ValueVT) + return Val; + + if (MVT::isVector(PartVT)) { + assert(MVT::isVector(ValueVT) && "Unknown vector conversion!"); + return DAG.getNode(ISD::BIT_CONVERT, PartVT, Val); + } + + if (MVT::isInteger(PartVT) && + MVT::isInteger(ValueVT)) { + if (ValueVT < PartVT) { + // For a truncate, see if we have any information to + // indicate whether the truncated bits will always be + // zero or sign-extension. + if (AssertOp != ISD::DELETED_NODE) + Val = DAG.getNode(AssertOp, PartVT, Val, + DAG.getValueType(ValueVT)); + return DAG.getNode(ISD::TRUNCATE, ValueVT, Val); + } else { + return DAG.getNode(ISD::ANY_EXTEND, ValueVT, Val); + } + } - if (MVT::isVector(RegVT)) { - assert(MVT::isVector(ValueVT) && "Unknown vector conversion!"); - return DAG.getNode(ISD::BIT_CONVERT, RegVT, Val); + if (MVT::isFloatingPoint(PartVT) && + MVT::isFloatingPoint(ValueVT)) + return DAG.getNode(ISD::FP_ROUND, ValueVT, Val); + + if (MVT::getSizeInBits(PartVT) == + MVT::getSizeInBits(ValueVT)) + return DAG.getNode(ISD::BIT_CONVERT, ValueVT, Val); + + assert(0 && "Unknown mismatch!"); + } + + // Handle a multi-element vector. + MVT::ValueType IntermediateVT, RegisterVT; + unsigned NumIntermediates; + unsigned NumRegs = + DAG.getTargetLoweringInfo() + .getVectorTypeBreakdown(ValueVT, IntermediateVT, NumIntermediates, + RegisterVT); + + assert(NumRegs == NumParts && "Part count doesn't match vector breakdown!"); + assert(RegisterVT == PartVT && "Part type doesn't match vector breakdown!"); + assert(RegisterVT == Parts[0].getValueType() && + "Part type doesn't match part!"); + + // Assemble the parts into intermediate operands. + SmallVector Ops(NumIntermediates); + if (NumIntermediates == NumParts) { + // If the register was not expanded, truncate or copy the value, + // as appropriate. + for (unsigned i = 0; i != NumParts; ++i) + Ops[i] = getCopyFromParts(DAG, &Parts[i], 1, PartVT, IntermediateVT); + } else if (NumParts > 0) { + // If the intermediate type was expanded, build the intermediate operands + // from the parts. + assert(NumIntermediates % NumParts == 0 && + "Must expand into a divisible number of parts!"); + unsigned Factor = NumIntermediates / NumParts; + for (unsigned i = 0; i != NumIntermediates; ++i) + Ops[i] = getCopyFromParts(DAG, &Parts[i * Factor], Factor, + PartVT, IntermediateVT); + } + + // Build a vector with BUILD_VECTOR or CONCAT_VECTORS from the intermediate + // operands. + return DAG.getNode(MVT::isVector(IntermediateVT) ? + ISD::CONCAT_VECTORS : + ISD::BUILD_VECTOR, + ValueVT, &Ops[0], NumParts); +} + +/// getCopyToParts - Create a series of nodes that contain the +/// specified value split into legal parts. +static void getCopyToParts(SelectionDAG &DAG, + SDOperand Val, + SDOperand *Parts, + unsigned NumParts, + MVT::ValueType PartVT) { + MVT::ValueType ValueVT = Val.getValueType(); + + if (!MVT::isVector(ValueVT) || NumParts == 1) { + // If the value was expanded, copy from the parts. + if (NumParts > 1) { + for (unsigned i = 0; i < NumParts; ++i) + Parts[i] = DAG.getNode(ISD::EXTRACT_ELEMENT, PartVT, Val, + DAG.getConstant(i, MVT::i32)); + return; + } + + // If there is a single part and the types differ, this must be + // a promotion. + if (PartVT != ValueVT) { + if (MVT::isVector(PartVT)) { + assert(MVT::isVector(ValueVT) && + "Not a vector-vector cast?"); + Val = DAG.getNode(ISD::BIT_CONVERT, PartVT, Val); + } else if (MVT::isInteger(PartVT) && MVT::isInteger(ValueVT)) { + if (PartVT < ValueVT) + Val = DAG.getNode(ISD::TRUNCATE, PartVT, Val); + else + Val = DAG.getNode(ISD::ANY_EXTEND, PartVT, Val); + } else if (MVT::isFloatingPoint(PartVT) && + MVT::isFloatingPoint(ValueVT)) { + Val = DAG.getNode(ISD::FP_EXTEND, PartVT, Val); + } else if (MVT::getSizeInBits(PartVT) == + MVT::getSizeInBits(ValueVT)) { + Val = DAG.getNode(ISD::BIT_CONVERT, PartVT, Val); + } else { + assert(0 && "Unknown mismatch!"); + } + } + Parts[0] = Val; + return; } - - if (MVT::isInteger(RegVT)) { - if (ValueVT < RegVT) - return DAG.getNode(ISD::TRUNCATE, ValueVT, Val); + + // Handle a multi-element vector. + MVT::ValueType IntermediateVT, RegisterVT; + unsigned NumIntermediates; + unsigned NumRegs = + DAG.getTargetLoweringInfo() + .getVectorTypeBreakdown(ValueVT, IntermediateVT, NumIntermediates, + RegisterVT); + unsigned NumElements = MVT::getVectorNumElements(ValueVT); + + assert(NumRegs == NumParts && "Part count doesn't match vector breakdown!"); + assert(RegisterVT == PartVT && "Part type doesn't match vector breakdown!"); + + // Split the vector into intermediate operands. + SmallVector Ops(NumIntermediates); + for (unsigned i = 0; i != NumIntermediates; ++i) + if (MVT::isVector(IntermediateVT)) + Ops[i] = DAG.getNode(ISD::EXTRACT_SUBVECTOR, + IntermediateVT, Val, + DAG.getConstant(i * (NumElements / NumIntermediates), + MVT::i32)); else - return DAG.getNode(ISD::ANY_EXTEND, ValueVT, Val); + Ops[i] = DAG.getNode(ISD::EXTRACT_VECTOR_ELT, + IntermediateVT, Val, + DAG.getConstant(i, MVT::i32)); + + // Split the intermediate operands into legal parts. + if (NumParts == NumIntermediates) { + // If the register was not expanded, promote or copy the value, + // as appropriate. + for (unsigned i = 0; i != NumParts; ++i) + getCopyToParts(DAG, Ops[i], &Parts[i], 1, PartVT); + } else if (NumParts > 0) { + // If the intermediate type was expanded, split each the value into + // legal parts. + assert(NumParts % NumIntermediates == 0 && + "Must expand into a divisible number of parts!"); + unsigned Factor = NumParts / NumIntermediates; + for (unsigned i = 0; i != NumIntermediates; ++i) + getCopyToParts(DAG, Ops[i], &Parts[i * Factor], Factor, PartVT); + } +} + + +SDOperand RegsForValue::getCopyFromRegs(SelectionDAG &DAG, + SDOperand &Chain, SDOperand *Flag)const{ + // Get the list of registers, in the appropriate order. + std::vector R(Regs); + if (!DAG.getTargetLoweringInfo().isLittleEndian()) + std::reverse(R.begin(), R.end()); + + // Copy the legal parts from the registers. + unsigned NumParts = Regs.size(); + SmallVector Parts(NumParts); + for (unsigned i = 0; i < NumParts; ++i) { + SDOperand Part = Flag ? + DAG.getCopyFromReg(Chain, Regs[i], RegVT, *Flag) : + DAG.getCopyFromReg(Chain, Regs[i], RegVT); + Chain = Part.getValue(1); + if (Flag) + *Flag = Part.getValue(2); + Parts[i] = Part; } - assert(MVT::isFloatingPoint(RegVT) && MVT::isFloatingPoint(ValueVT)); - return DAG.getNode(ISD::FP_ROUND, ValueVT, Val); + // Assemble the legal parts into the final value. + return getCopyFromParts(DAG, &Parts[0], NumParts, RegVT, ValueVT); } /// getCopyToRegs - Emit a series of CopyToReg nodes that copies the /// specified value into the registers specified by this object. This uses /// Chain/Flag as the input and updates them for the output Chain/Flag. void RegsForValue::getCopyToRegs(SDOperand Val, SelectionDAG &DAG, - SDOperand &Chain, SDOperand &Flag, - MVT::ValueType PtrVT) const { - if (Regs.size() == 1) { - // If there is a single register and the types differ, this must be - // a promotion. - if (RegVT != ValueVT) { - if (MVT::isVector(RegVT)) { - assert(MVT::isVector(Val.getValueType()) && - "Not a vector-vector cast?"); - Val = DAG.getNode(ISD::BIT_CONVERT, RegVT, Val); - } else if (MVT::isInteger(RegVT) && MVT::isInteger(Val.getValueType())) { - if (RegVT < ValueVT) - Val = DAG.getNode(ISD::TRUNCATE, RegVT, Val); - else - Val = DAG.getNode(ISD::ANY_EXTEND, RegVT, Val); - } else if (MVT::isFloatingPoint(RegVT) && - MVT::isFloatingPoint(Val.getValueType())) { - Val = DAG.getNode(ISD::FP_EXTEND, RegVT, Val); - } else if (MVT::getSizeInBits(RegVT) == - MVT::getSizeInBits(Val.getValueType())) { - Val = DAG.getNode(ISD::BIT_CONVERT, RegVT, Val); - } else { - assert(0 && "Unknown mismatch!"); - } - } - Chain = DAG.getCopyToReg(Chain, Regs[0], Val, Flag); - Flag = Chain.getValue(1); - } else { - std::vector R(Regs); - if (!DAG.getTargetLoweringInfo().isLittleEndian()) - std::reverse(R.begin(), R.end()); - - for (unsigned i = 0, e = R.size(); i != e; ++i) { - SDOperand Part = DAG.getNode(ISD::EXTRACT_ELEMENT, RegVT, Val, - DAG.getConstant(i, PtrVT)); - Chain = DAG.getCopyToReg(Chain, R[i], Part, Flag); - Flag = Chain.getValue(1); - } + SDOperand &Chain, SDOperand *Flag) const { + // Get the list of registers, in the appropriate order. + std::vector R(Regs); + if (!DAG.getTargetLoweringInfo().isLittleEndian()) + std::reverse(R.begin(), R.end()); + + // Get the list of the values's legal parts. + unsigned NumParts = Regs.size(); + SmallVector Parts(NumParts); + getCopyToParts(DAG, Val, &Parts[0], NumParts, RegVT); + + // Copy the parts into the registers. + for (unsigned i = 0; i < NumParts; ++i) { + SDOperand Part = Flag ? + DAG.getCopyToReg(Chain, R[i], Parts[i], *Flag) : + DAG.getCopyToReg(Chain, R[i], Parts[i]); + Chain = Part.getValue(0); + if (Flag) + *Flag = Part.getValue(1); } } @@ -3456,8 +3532,7 @@ } // Use the produced MatchedRegs object to - MatchedRegs.getCopyToRegs(InOperandVal, DAG, Chain, Flag, - TLI.getPointerTy()); + MatchedRegs.getCopyToRegs(InOperandVal, DAG, Chain, &Flag); MatchedRegs.AddInlineAsmOperands(1 /*REGUSE*/, DAG, AsmNodeOperands); break; } else { @@ -3508,8 +3583,7 @@ assert(!OpInfo.AssignedRegs.Regs.empty() && "Couldn't allocate input reg!"); - OpInfo.AssignedRegs.getCopyToRegs(InOperandVal, DAG, Chain, Flag, - TLI.getPointerTy()); + OpInfo.AssignedRegs.getCopyToRegs(InOperandVal, DAG, Chain, &Flag); OpInfo.AssignedRegs.AddInlineAsmOperands(1/*REGUSE*/, DAG, AsmNodeOperands); @@ -3538,7 +3612,7 @@ // If this asm returns a register value, copy the result from that register // and set it as the value of the call. if (!RetValRegs.Regs.empty()) { - SDOperand Val = RetValRegs.getCopyFromRegs(DAG, Chain, Flag); + SDOperand Val = RetValRegs.getCopyFromRegs(DAG, Chain, &Flag); // If the result of the inline asm is a vector, it may have the wrong // width/num elts. Make sure to convert it to the right type with @@ -3560,7 +3634,7 @@ for (unsigned i = 0, e = IndirectStoresToEmit.size(); i != e; ++i) { RegsForValue &OutRegs = IndirectStoresToEmit[i].first; Value *Ptr = IndirectStoresToEmit[i].second; - SDOperand OutVal = OutRegs.getCopyFromRegs(DAG, Chain, Flag); + SDOperand OutVal = OutRegs.getCopyFromRegs(DAG, Chain, &Flag); StoresToEmit.push_back(std::make_pair(OutVal, Ptr)); } @@ -3733,40 +3807,22 @@ RetVals.push_back(getTypeToTransformTo(VT)); Ops.push_back(DAG.getConstant(Flags, MVT::i32)); break; - case Expand: - if (!MVT::isVector(VT)) { - // If this is a large integer, it needs to be broken up into small - // integers. Figure out what the destination type is and how many small - // integers it turns into. - MVT::ValueType NVT = getTypeToExpandTo(VT); - unsigned NumVals = getNumRegisters(VT); - for (unsigned i = 0; i != NumVals; ++i) { - RetVals.push_back(NVT); - // if it isn't first piece, alignment must be 1 - if (i > 0) - Flags = (Flags & (~ISD::ParamFlags::OrigAlignment)) | - (1 << ISD::ParamFlags::OrigAlignmentOffs); - Ops.push_back(DAG.getConstant(Flags, MVT::i32)); - } - } else { - // Otherwise, this is a vector type. We only support legal vectors - // right now. - unsigned NumElems = cast(I->getType())->getNumElements(); - const Type *EltTy = cast(I->getType())->getElementType(); - - // Figure out if there is a Packed type corresponding to this Vector - // type. If so, convert to the vector type. - MVT::ValueType TVT = - MVT::getVectorType(getValueType(EltTy), NumElems); - if (TVT != MVT::Other && isTypeLegal(TVT)) { - RetVals.push_back(TVT); - Ops.push_back(DAG.getConstant(Flags, MVT::i32)); - } else { - assert(0 && "Don't support illegal by-val vector arguments yet!"); - } + case Expand: { + // If this is an illegal type, it needs to be broken up to fit into + // registers. + MVT::ValueType RegisterVT = getRegisterType(VT); + unsigned NumRegs = getNumRegisters(VT); + for (unsigned i = 0; i != NumRegs; ++i) { + RetVals.push_back(RegisterVT); + // if it isn't first piece, alignment must be 1 + if (i > 0) + Flags = (Flags & (~ISD::ParamFlags::OrigAlignment)) | + (1 << ISD::ParamFlags::OrigAlignmentOffs); + Ops.push_back(DAG.getConstant(Flags, MVT::i32)); } break; } + } } RetVals.push_back(MVT::Other); @@ -3979,108 +4035,33 @@ } // Figure out the result value types. - SmallVector RetTys; - - if (RetTy != Type::VoidTy) { - MVT::ValueType VT = getValueType(RetTy); - switch (getTypeAction(VT)) { - default: assert(0 && "Unknown type action!"); - case Legal: - RetTys.push_back(VT); - break; - case Promote: - RetTys.push_back(getTypeToTransformTo(VT)); - break; - case Expand: - if (!MVT::isVector(VT)) { - // If this is a large integer, it needs to be reassembled from small - // integers. Figure out what the source elt type is and how many small - // integers it is. - MVT::ValueType NVT = getTypeToExpandTo(VT); - unsigned NumVals = getNumRegisters(VT); - for (unsigned i = 0; i != NumVals; ++i) - RetTys.push_back(NVT); - } else { - // Otherwise, this is a vector type. We only support legal vectors - // right now. - const VectorType *PTy = cast(RetTy); - unsigned NumElems = PTy->getNumElements(); - const Type *EltTy = PTy->getElementType(); - - // Figure out if there is a Packed type corresponding to this Vector - // type. If so, convert to the vector type. - MVT::ValueType TVT = - MVT::getVectorType(getValueType(EltTy), NumElems); - if (TVT != MVT::Other && isTypeLegal(TVT)) { - RetTys.push_back(TVT); - } else { - assert(0 && "Don't support illegal by-val vector call results yet!"); - abort(); - } - } - } - } + MVT::ValueType VT = getValueType(RetTy); + MVT::ValueType RegisterVT = getRegisterType(VT); + unsigned NumRegs = getNumRegisters(VT); + SmallVector RetTys(NumRegs); + for (unsigned i = 0; i != NumRegs; ++i) + RetTys[i] = RegisterVT; RetTys.push_back(MVT::Other); // Always has a chain. - // Finally, create the CALL node. + // Create the CALL node. SDOperand Res = DAG.getNode(ISD::CALL, - DAG.getVTList(&RetTys[0], RetTys.size()), + DAG.getVTList(&RetTys[0], NumRegs + 1), &Ops[0], Ops.size()); - - // This returns a pair of operands. The first element is the - // return value for the function (if RetTy is not VoidTy). The second - // element is the outgoing token chain. - SDOperand ResVal; - if (RetTys.size() != 1) { - MVT::ValueType VT = getValueType(RetTy); - if (RetTys.size() == 2) { - ResVal = Res; - - // If this value was promoted, truncate it down. - if (ResVal.getValueType() != VT) { - if (MVT::isVector(VT)) { - // Insert a BIT_CONVERT to convert from the packed result type to the - // new vector type. - unsigned NumElems = cast(RetTy)->getNumElements(); - const Type *EltTy = cast(RetTy)->getElementType(); - - // Figure out if there is a Packed type corresponding to this Vector - // type. If so, convert to the vector type. - MVT::ValueType TVT = - MVT::getVectorType(getValueType(EltTy),NumElems); - if (TVT != MVT::Other && isTypeLegal(TVT)) { - // Insert a BIT_CONVERT of the FORMAL_ARGUMENTS to a - // "N x PTyElementVT" vector type. - ResVal = DAG.getNode(ISD::BIT_CONVERT, TVT, ResVal); - } else { - abort(); - } - } else if (MVT::isInteger(VT)) { - unsigned AssertOp = ISD::AssertSext; - if (!RetTyIsSigned) - AssertOp = ISD::AssertZext; - ResVal = DAG.getNode(AssertOp, ResVal.getValueType(), ResVal, - DAG.getValueType(VT)); - ResVal = DAG.getNode(ISD::TRUNCATE, VT, ResVal); - } else { - assert(MVT::isFloatingPoint(VT)); - if (getTypeAction(VT) == Expand) - ResVal = DAG.getNode(ISD::BIT_CONVERT, VT, ResVal); - else - ResVal = DAG.getNode(ISD::FP_ROUND, VT, ResVal); - } - } - } else if (RetTys.size() == 3) { - ResVal = DAG.getNode(ISD::BUILD_PAIR, VT, - Res.getValue(0), Res.getValue(1)); - - } else { - assert(0 && "Case not handled yet!"); - } + SDOperand Chain = Res.getValue(NumRegs); + + // Gather up the call result into a single value. + if (RetTy != Type::VoidTy) { + ISD::NodeType AssertOp = ISD::AssertSext; + if (!RetTyIsSigned) + AssertOp = ISD::AssertZext; + SmallVector Results(NumRegs); + for (unsigned i = 0; i != NumRegs; ++i) + Results[i] = Res.getValue(i); + Res = getCopyFromParts(DAG, &Results[0], NumRegs, RegisterVT, VT, AssertOp); } - - return std::make_pair(ResVal, Res.getValue(Res.Val->getNumValues()-1)); + + return std::make_pair(Res, Chain); } SDOperand TargetLowering::LowerOperation(SDOperand Op, SelectionDAG &DAG) { @@ -4360,75 +4341,17 @@ cast(Op.getOperand(1))->getReg() != Reg) && "Copy from a reg to the same reg!"); - // If this type is not legal, we must make sure to not create an invalid - // register use. MVT::ValueType SrcVT = Op.getValueType(); - MVT::ValueType DestVT = TLI.getTypeToTransformTo(SrcVT); - if (SrcVT == DestVT) { - return DAG.getCopyToReg(getRoot(), Reg, Op); - } else if (MVT::isVector(SrcVT)) { - // Handle copies from generic vectors to registers. - MVT::ValueType ElementVT, LegalElementVT; - unsigned NE = TLI.getVectorTypeBreakdown(SrcVT, - ElementVT, LegalElementVT); - uint64_t SrcVL = MVT::getVectorNumElements(SrcVT); - - // Loop over all of the elements of the resultant vector, - // EXTRACT_VECTOR_ELT'ing or EXTRACT_SUBVECTOR'ing them, converting them - // to LegalElementVT, then copying them into output registers. - SmallVector OutChains; - SDOperand Root = getRoot(); - for (unsigned i = 0; i != NE; ++i) { - SDOperand Elt = MVT::isVector(ElementVT) ? - DAG.getNode(ISD::EXTRACT_SUBVECTOR, ElementVT, - Op, DAG.getConstant(i * (SrcVL / NE), TLI.getPointerTy())) : - DAG.getNode(ISD::EXTRACT_VECTOR_ELT, ElementVT, - Op, DAG.getConstant(i, TLI.getPointerTy())); - if (ElementVT == LegalElementVT) { - // Elements are legal. - OutChains.push_back(DAG.getCopyToReg(Root, Reg++, Elt)); - } else if (LegalElementVT > ElementVT) { - // Elements are promoted. - if (MVT::isFloatingPoint(LegalElementVT)) - Elt = DAG.getNode(ISD::FP_EXTEND, LegalElementVT, Elt); - else - Elt = DAG.getNode(ISD::ANY_EXTEND, LegalElementVT, Elt); - OutChains.push_back(DAG.getCopyToReg(Root, Reg++, Elt)); - } else { - // Elements are expanded. - // The src value is expanded into multiple registers. - SDOperand Lo = DAG.getNode(ISD::EXTRACT_ELEMENT, LegalElementVT, - Elt, DAG.getConstant(0, TLI.getPointerTy())); - SDOperand Hi = DAG.getNode(ISD::EXTRACT_ELEMENT, LegalElementVT, - Elt, DAG.getConstant(1, TLI.getPointerTy())); - OutChains.push_back(DAG.getCopyToReg(Root, Reg++, Lo)); - OutChains.push_back(DAG.getCopyToReg(Root, Reg++, Hi)); - } - } - return DAG.getNode(ISD::TokenFactor, MVT::Other, - &OutChains[0], OutChains.size()); - } else if (TLI.getTypeAction(SrcVT) == TargetLowering::Promote) { - // The src value is promoted to the register. - if (MVT::isFloatingPoint(SrcVT)) - Op = DAG.getNode(ISD::FP_EXTEND, DestVT, Op); - else - Op = DAG.getNode(ISD::ANY_EXTEND, DestVT, Op); - return DAG.getCopyToReg(getRoot(), Reg, Op); - } else { - DestVT = TLI.getTypeToExpandTo(SrcVT); - unsigned NumVals = TLI.getNumRegisters(SrcVT); - if (NumVals == 1) - return DAG.getCopyToReg(getRoot(), Reg, - DAG.getNode(ISD::BIT_CONVERT, DestVT, Op)); - assert(NumVals == 2 && "1 to 4 (and more) expansion not implemented!"); - // The src value is expanded into multiple registers. - SDOperand Lo = DAG.getNode(ISD::EXTRACT_ELEMENT, DestVT, - Op, DAG.getConstant(0, TLI.getPointerTy())); - SDOperand Hi = DAG.getNode(ISD::EXTRACT_ELEMENT, DestVT, - Op, DAG.getConstant(1, TLI.getPointerTy())); - Op = DAG.getCopyToReg(getRoot(), Reg, Lo); - return DAG.getCopyToReg(Op, Reg+1, Hi); - } + MVT::ValueType RegisterVT = TLI.getRegisterType(SrcVT); + unsigned NumRegs = TLI.getNumRegisters(SrcVT); + SmallVector Regs(NumRegs); + SmallVector Chains(NumRegs); + + // Copy the value by legal parts into sequential virtual registers. + getCopyToParts(DAG, Op, &Regs[0], NumRegs, RegisterVT); + for (unsigned i = 0; i < NumRegs; ++i) + Chains[i] = DAG.getCopyToReg(getRoot(), Reg + i, Regs[i]); + return DAG.getNode(ISD::TokenFactor, MVT::Other, &Chains[0], NumRegs); } void SelectionDAGISel:: Index: lib/CodeGen/SelectionDAG/TargetLowering.cpp =================================================================== RCS file: /var/cvs/llvm/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp,v retrieving revision 1.123 diff -u -r1.123 TargetLowering.cpp --- lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ lib/CodeGen/SelectionDAG/TargetLowering.cpp @@ -165,58 +165,19 @@ TargetLowering::~TargetLowering() {} -/// setValueTypeAction - Set the action for a particular value type. This -/// assumes an action has not already been set for this value type. -static void SetValueTypeAction(MVT::ValueType VT, - TargetLowering::LegalizeAction Action, - TargetLowering &TLI, - MVT::ValueType *TransformToType, - TargetLowering::ValueTypeActionImpl &ValueTypeActions) { - ValueTypeActions.setTypeAction(VT, Action); - if (Action == TargetLowering::Promote) { - MVT::ValueType PromoteTo; - if (VT == MVT::f32) - PromoteTo = MVT::f64; - else { - unsigned LargerReg = VT+1; - while (!TLI.isTypeLegal((MVT::ValueType)LargerReg)) { - ++LargerReg; - assert(MVT::isInteger((MVT::ValueType)LargerReg) && - "Nothing to promote to??"); - } - PromoteTo = (MVT::ValueType)LargerReg; - } - - assert(MVT::isInteger(VT) == MVT::isInteger(PromoteTo) && - MVT::isFloatingPoint(VT) == MVT::isFloatingPoint(PromoteTo) && - "Can only promote from int->int or fp->fp!"); - assert(VT < PromoteTo && "Must promote to a larger type!"); - TransformToType[VT] = PromoteTo; - } else if (Action == TargetLowering::Expand) { - // f32 and f64 is each expanded to corresponding integer type of same size. - if (VT == MVT::f32) - TransformToType[VT] = MVT::i32; - else if (VT == MVT::f64) - TransformToType[VT] = MVT::i64; - else { - assert((MVT::isVector(VT) || MVT::isInteger(VT)) && VT > MVT::i8 && - "Cannot expand this type: target must support SOME integer reg!"); - // Expand to the next smaller integer type! - TransformToType[VT] = (MVT::ValueType)(VT-1); - } - } -} - - /// computeRegisterProperties - Once all of the register classes are added, /// this allows us to compute derived properties we expose. void TargetLowering::computeRegisterProperties() { assert(MVT::LAST_VALUETYPE <= 32 && "Too many value types for ValueTypeActions to hold!"); - // Everything defaults to one. - for (unsigned i = 0; i != MVT::LAST_VALUETYPE; ++i) + // Everything defaults to needing one register. + for (unsigned i = 0; i != MVT::LAST_VALUETYPE; ++i) { NumRegistersForVT[i] = 1; + RegisterTypeForVT[i] = TransformToType[i] = i; + } + // ...except isVoid, which doesn't need any registers. + NumRegistersForVT[MVT::isVoid] = 0; // Find the largest integer register class. unsigned LargestIntReg = MVT::i128; @@ -225,57 +186,65 @@ // Every integer value type larger than this largest register takes twice as // many registers to represent as the previous ValueType. - unsigned ExpandedReg = LargestIntReg; ++LargestIntReg; - for (++ExpandedReg; MVT::isInteger((MVT::ValueType)ExpandedReg);++ExpandedReg) + for (MVT::ValueType ExpandedReg = LargestIntReg + 1; + MVT::isInteger(ExpandedReg); ++ExpandedReg) { NumRegistersForVT[ExpandedReg] = 2*NumRegistersForVT[ExpandedReg-1]; + RegisterTypeForVT[ExpandedReg] = LargestIntReg; + TransformToType[ExpandedReg] = ExpandedReg - 1; + ValueTypeActions.setTypeAction(ExpandedReg, Expand); + } - // Inspect all of the ValueType's possible, deciding how to process them. - for (unsigned IntReg = MVT::i1; IntReg <= MVT::i128; ++IntReg) - // If we are expanding this type, expand it! - if (getNumRegisters((MVT::ValueType)IntReg) != 1) - SetValueTypeAction((MVT::ValueType)IntReg, Expand, *this, TransformToType, - ValueTypeActions); - else if (!isTypeLegal((MVT::ValueType)IntReg)) - // Otherwise, if we don't have native support, we must promote to a - // larger type. - SetValueTypeAction((MVT::ValueType)IntReg, Promote, *this, - TransformToType, ValueTypeActions); - else - TransformToType[(MVT::ValueType)IntReg] = (MVT::ValueType)IntReg; - - // If the target does not have native f64 support, expand it to i64. We will - // be generating soft float library calls. If the target does not have native - // support for f32, promote it to f64 if it is legal. Otherwise, expand it to - // i32. - if (isTypeLegal(MVT::f64)) - TransformToType[MVT::f64] = MVT::f64; - else { + // Inspect all of the ValueType's smaller than the largest integer + // register to see which ones need promotion. + MVT::ValueType LegalIntReg = LargestIntReg; + for (MVT::ValueType IntReg = LargestIntReg - 1; + IntReg >= MVT::i1; --IntReg) { + if (isTypeLegal(IntReg)) { + LegalIntReg = IntReg; + } else { + RegisterTypeForVT[IntReg] = TransformToType[IntReg] = LegalIntReg; + ValueTypeActions.setTypeAction(IntReg, Promote); + } + } + + // Decide how to handle f64. If the target does not have native f64 support, + // expand it to i64 and we will be generating soft float library calls. + if (!isTypeLegal(MVT::f64)) { NumRegistersForVT[MVT::f64] = NumRegistersForVT[MVT::i64]; - SetValueTypeAction(MVT::f64, Expand, *this, TransformToType, - ValueTypeActions); + RegisterTypeForVT[MVT::f64] = RegisterTypeForVT[MVT::i64]; + TransformToType[MVT::f64] = MVT::i64; + ValueTypeActions.setTypeAction(MVT::f64, Expand); } - if (isTypeLegal(MVT::f32)) - TransformToType[MVT::f32] = MVT::f32; - else if (isTypeLegal(MVT::f64)) - SetValueTypeAction(MVT::f32, Promote, *this, TransformToType, - ValueTypeActions); - else { - NumRegistersForVT[MVT::f32] = NumRegistersForVT[MVT::i32]; - SetValueTypeAction(MVT::f32, Expand, *this, TransformToType, - ValueTypeActions); - } - - // Loop over all of the legal vector value types, specifying an identity type - // transformation. - for (unsigned i = MVT::FIRST_VECTOR_VALUETYPE; + + // Decide how to handle f32. If the target does not have native support for + // f32, promote it to f64 if it is legal. Otherwise, expand it to i32. + if (!isTypeLegal(MVT::f32)) { + if (isTypeLegal(MVT::f64)) { + NumRegistersForVT[MVT::f32] = NumRegistersForVT[MVT::f64]; + RegisterTypeForVT[MVT::f32] = RegisterTypeForVT[MVT::f64]; + TransformToType[MVT::f32] = MVT::f64; + ValueTypeActions.setTypeAction(MVT::f32, Promote); + } else { + NumRegistersForVT[MVT::f32] = NumRegistersForVT[MVT::i32]; + RegisterTypeForVT[MVT::f32] = RegisterTypeForVT[MVT::i32]; + TransformToType[MVT::f32] = MVT::i32; + ValueTypeActions.setTypeAction(MVT::f32, Expand); + } + } + + // Loop over all of the vector value types to see which need transformations. + for (MVT::ValueType i = MVT::FIRST_VECTOR_VALUETYPE; i <= MVT::LAST_VECTOR_VALUETYPE; ++i) { - if (isTypeLegal((MVT::ValueType)i)) - TransformToType[i] = (MVT::ValueType)i; - else { - MVT::ValueType VT1, VT2; - NumRegistersForVT[i] = getVectorTypeBreakdown(i, VT1, VT2); - SetValueTypeAction(i, Expand, *this, TransformToType, - ValueTypeActions); + if (!isTypeLegal(i)) { + MVT::ValueType IntermediateVT, RegisterVT; + unsigned NumIntermediates; + NumRegistersForVT[i] = + getVectorTypeBreakdown(i, + IntermediateVT, NumIntermediates, + RegisterVT); + RegisterTypeForVT[i] = RegisterVT; + TransformToType[i] = MVT::Other; // this isn't actually used + ValueTypeActions.setTypeAction(i, Expand); } } } @@ -290,12 +259,13 @@ /// Similarly, MVT::v2i64 turns into 4 MVT::i32 values with both PPC and X86. /// /// This method returns the number of registers needed, and the VT for each -/// register. It also returns the VT of the VectorType elements before they -/// are promoted/expanded. +/// register. It also returns the VT and quantity of the intermediate values +/// before they are promoted/expanded. /// unsigned TargetLowering::getVectorTypeBreakdown(MVT::ValueType VT, - MVT::ValueType &ElementVT, - MVT::ValueType &LegalElementVT) const { + MVT::ValueType &IntermediateVT, + unsigned &NumIntermediates, + MVT::ValueType &RegisterVT) const { // Figure out the right, legal destination reg to copy into. unsigned NumElts = MVT::getVectorNumElements(VT); MVT::ValueType EltTy = MVT::getVectorElementType(VT); @@ -309,14 +279,16 @@ NumElts >>= 1; NumVectorRegs <<= 1; } + + NumIntermediates = NumVectorRegs; MVT::ValueType NewVT = MVT::getVectorType(EltTy, NumElts); if (!isTypeLegal(NewVT)) NewVT = EltTy; - ElementVT = NewVT; + IntermediateVT = NewVT; MVT::ValueType DestVT = getTypeToTransformTo(NewVT); - LegalElementVT = DestVT; + RegisterVT = DestVT; if (DestVT < NewVT) { // Value is expanded, e.g. i64 -> i16. return NumVectorRegs*(MVT::getSizeInBits(NewVT)/MVT::getSizeInBits(DestVT)); From greened at obbligato.org Thu Jun 28 14:46:14 2007 From: greened at obbligato.org (David A. Greene) Date: Thu, 28 Jun 2007 14:46:14 -0500 Subject: [llvm-commits] Smaller llvm-gcc patch for _GLIBCXX_DEBUG Message-ID: <200706281446.14986.greened@obbligato.org> Wow, sorry about the huge patch I just posted. Here's a version without the patches to the two configure scripts. Whoever applies it will have to re-run autoconf. -Dave -------------- next part -------------- Index: gcc/Makefile.in =================================================================== --- gcc/Makefile.in (revision 361) +++ gcc/Makefile.in (working copy) @@ -217,26 +217,22 @@ # APPLE LOCAL begin LLVM @checkingenabled_flag@ LLVMOBJDIR = @LLVMBASEPATH@ -ifeq ($(LLVMOBJDIR),) -CPPFLAGS = @CPPFLAGS@ -else -CPPFLAGS = @CPPFLAGS@ -DENABLE_LLVM -D__STDC_LIMIT_MACROS ifdef LLVM_VERSION_INFO CPPFLAGS += -DLLVM_VERSION_INFO='"$(LLVM_VERSION_INFO)"' endif -ifdef CHECKING_ENABLED -BUILDMODE=Debug -else -ifdef DISABLE_LLVMASSERTIONS -BUILDMODE=Release-Asserts -else -BUILDMODE=Release -endif -endif +# Cray [dag] Determine BUILDMODE from configure run (--enable-llvm) + +BUILDMODE := @LLVMBUILDMODE@ + LLVMBINPATH = $(LLVMOBJDIR)/$(BUILDMODE)/bin +ifeq ($(LLVMOBJDIR),) +CPPFLAGS = @CPPFLAGS@ +else +CPPFLAGS := @CPPFLAGS@ -DENABLE_LLVM -D__STDC_LIMIT_MACROS $(shell $(LLVMBINPATH)/llvm-config --cppflags) + # Use llvm-config to get the srcdir that LLVM was configured with, to support # srcdir != objdir builds. LLVMSRCDIR := $(shell $(LLVMBINPATH)/llvm-config --src-root) Index: gcc/configure.ac =================================================================== --- gcc/configure.ac (revision 361) +++ gcc/configure.ac (working copy) @@ -745,16 +745,38 @@ if test -x "$LLVMBASEPATH/Release/bin/llc$EXEEXT"; then echo Found Release LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Release" elif test -x "$LLVMBASEPATH/Debug/bin/llc$EXEEXT"; then echo Found Debug LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Debug" elif test -x "$LLVMBASEPATH/Release-Asserts/bin/llc$EXEEXT"; then echo Found Release-Asserts LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Release-Asserts" + elif test -x "$LLVMBASEPATH/Debug-Asserts/bin/llc$EXEEXT"; then + echo Found Debug-Asserts LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Debug-Asserts" + elif test -x "$LLVMBASEPATH/Release+Checks/bin/llc$EXEEXT"; then + echo Found Release+Checks LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Release+Checks" + elif test -x "$LLVMBASEPATH/Debug+Checks/bin/llc$EXEEXT"; then + echo Found Debug+Checks LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Debug+Checks" + elif test -x "$LLVMBASEPATH/Release-Asserts+Checks/bin/llc$EXEEXT"; then + echo Found Release-Asserts+Checks LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Release-Asserts+Checks" + elif test -x "$LLVMBASEPATH/Debug-Asserts+Checks/bin/llc$EXEEXT"; then + echo Found Debug-Asserts+Checks LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Debug-Asserts+Checks" else AC_MSG_ERROR([You must specify valid path to your LLVM tree with --enable-llvm=DIR]) fi ], -[LLVMBASEPATH=""]) +[LLVMBASEPATH="" + LLVMBUILDMODE="" +]) AC_SUBST(LLVMBASEPATH) +# Cray [dag] send llvm build mode to gcc Makefiles +AC_SUBST(LLVMBUILDMODE) # APPLE LOCAL end LLVM # Sanity check enable_languages in case someone does not run the toplevel Index: libcpp/configure.ac =================================================================== --- libcpp/configure.ac (revision 361) +++ libcpp/configure.ac (working copy) @@ -104,13 +104,16 @@ [Define if you want more run-time sanity checks.]) fi +# Cray [dag]: These comments cannot be in the middle of continuation +# lines (autoconf 2.60) + # APPLE LOCAL begin 4126124 + #APPLE LOCAL begin LLVM + #APPLE LOCAL end LLVM + # APPLE LOCAL end 4126124 m4_changequote(,) case $target in - # APPLE LOCAL begin 4126124 alpha*-*-* | \ - #APPLE LOCAL begin LLVM arm*-*-*eabi* | \ - #APPLE LOCAL end LLVM arm*-*-symbianelf* | \ x86_64-*-* | \ ia64-*-* | \ @@ -126,7 +129,6 @@ sparcv9-*-solaris2* | \ sparc-*-solaris2.[789] | sparc-*-solaris2.1[0-9]* | \ sh[123456789l]*-*-*) - # APPLE LOCAL end 4126124 need_64bit_hwint=yes ;; *) need_64bit_hwint=no ;; @@ -161,10 +163,28 @@ if test -x "$LLVMBASEPATH/Release/bin/llc$EXEEXT"; then echo Found Release LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Release" elif test -x "$LLVMBASEPATH/Debug/bin/llc$EXEEXT"; then echo Found Debug LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Debug" elif test -x "$LLVMBASEPATH/Release-Asserts/bin/llc$EXEEXT"; then echo Found Release-Asserts LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Release-Asserts" + elif test -x "$LLVMBASEPATH/Debug-Asserts/bin/llc$EXEEXT"; then + echo Found Debug-Asserts LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Debug-Asserts" + elif test -x "$LLVMBASEPATH/Release+Checks/bin/llc$EXEEXT"; then + echo Found Release+Checks LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Release+Checks" + elif test -x "$LLVMBASEPATH/Debug+Checks/bin/llc$EXEEXT"; then + echo Found Debug+Checks LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Debug+Checks" + elif test -x "$LLVMBASEPATH/Release-Asserts+Checks/bin/llc$EXEEXT"; then + echo Found Release-Asserts+Checks LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Release-Asserts+Checks" + elif test -x "$LLVMBASEPATH/Debug-Asserts+Checks/bin/llc$EXEEXT"; then + echo Found Debug-Asserts+Checks LLVM Tree in $LLVMBASEPATH + LLVMBUILDMODE="Debug-Asserts+Checks" else AC_MSG_ERROR([You must specify valid path to your LLVM tree with --enable-llvm=DIR]) fi From lauro.venancio at gmail.com Thu Jun 28 15:07:01 2007 From: lauro.venancio at gmail.com (Lauro Ramos Venancio) Date: Thu, 28 Jun 2007 15:07:01 -0500 Subject: [llvm-commits] CVS: llvm/lib/Linker/LinkModules.cpp Message-ID: <200706282007.l5SK71ta030748@zion.cs.uiuc.edu> Changes in directory llvm/lib/Linker: LinkModules.cpp updated: 1.142 -> 1.143 --- Log message: Fix a bug in my previous patch. --- Diffs of the changes: (+2 -3) LinkModules.cpp | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) Index: llvm/lib/Linker/LinkModules.cpp diff -u llvm/lib/Linker/LinkModules.cpp:1.142 llvm/lib/Linker/LinkModules.cpp:1.143 --- llvm/lib/Linker/LinkModules.cpp:1.142 Thu Jun 28 14:02:54 2007 +++ llvm/lib/Linker/LinkModules.cpp Thu Jun 28 15:06:38 2007 @@ -578,9 +578,8 @@ // FIXME: we should handle the bitcast alias. assert(NewAliased && "Can't find the aliased GV."); - GlobalAlias *NewGA = new GlobalAlias(GA->getType()->getElementType(), - GA->getLinkage(), GA->getName(), - NewAliased, Dest); + GlobalAlias *NewGA = new GlobalAlias(GA->getType(), GA->getLinkage(), + GA->getName(), NewAliased, Dest); CopyGVAttributes(NewGA, GA); } return false; From djg at cray.com Thu Jun 28 15:27:46 2007 From: djg at cray.com (Dan Gohman) Date: Thu, 28 Jun 2007 15:27:46 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/ADT/SmallVector.h Message-ID: <200706282027.l5SKRkfr031281@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/ADT: SmallVector.h updated: 1.30 -> 1.31 --- Log message: Add a default parameter to a SmallVector constructor to allow it to be called with just an initial length value, just like in std::vector. --- Diffs of the changes: (+1 -1) SmallVector.h | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/include/llvm/ADT/SmallVector.h diff -u llvm/include/llvm/ADT/SmallVector.h:1.30 llvm/include/llvm/ADT/SmallVector.h:1.31 --- llvm/include/llvm/ADT/SmallVector.h:1.30 Thu May 17 15:01:40 2007 +++ llvm/include/llvm/ADT/SmallVector.h Thu Jun 28 15:27:24 2007 @@ -442,7 +442,7 @@ SmallVector() : SmallVectorImpl(NumTsAvailable) { } - SmallVector(unsigned Size, const T &Value) + SmallVector(unsigned Size, const T &Value = T()) : SmallVectorImpl(NumTsAvailable) { this->reserve(Size); while (Size--) From evan.cheng at apple.com Thu Jun 28 17:21:42 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 28 Jun 2007 15:21:42 -0700 Subject: [llvm-commits] Patch: JIT support for ARM In-Reply-To: <6fbb4ff20706271126n2b67a36di7e78879045c53f31@mail.gmail.com> References: <6fbb4ff20706271126n2b67a36di7e78879045c53f31@mail.gmail.com> Message-ID: Hi Raul, Good first step! Thanks. +bool ARMTargetMachine::addCodeEmitter(FunctionPassManager &PM, bool Fast, + MachineCodeEmitter &MCE) { + // FIXME: Move this to TargetJITInfo! + setRelocationModel(Reloc::Static); + + setCodeModel(CodeModel::Large); + + // Machine code emitter pass for ARM. + PM.add(createARMCodeEmitterPass(*this, MCE)); + return false; +} The setCodeModel() call is unnecessary. Please don't include header files if they are not necessary. For example, is it necessary to include TargetOptions.h in ARMCodeEmitter.cpp Also in ARMCodeEmitter.cpp: void Emitter::emitInstruction(const MachineInstr &MI) { NumEmitted++; // Keep track of the # of mi's emitted } Please remove the blank line. :-) ARMJITInfo.h: // This file contains the ARM implementation of the TargetJITInfo class. Not accurate. Something like "This file contains the declaration of the ARMJITInfo class." (I'll fix the similar problems in other targets. :-) Can you fix the problems and resubmit the patch? BTW, I can't patch cleanly: Patching file lib/Target/ARM/ARMTargetMachine.cpp using Plan A... Hunk #1 succeeded at 33. patch: **** malformed patch at line 90: @@ -106,3 +129,22 @@ Please fix that as well. Thanks, Evan On Jun 27, 2007, at 11:26 AM, Raul Fernandes Herbster wrote: > This is an initial implementation of ARM JIT support. So far, it > hasn't generated code machine yet. Next patch must provide such > feature. The tar.gz file must be unpacked under lib/Target/ARM > directory. Please, send me any feedback. > > Best regards, Raul. > > -- > Raul Fernandes Herbster > Embedded and Pervasive Computing Laboratory - embedded.dee.ufcg.edu.br > Electrical Engineering Department - DEE - www.dee.ufcg.edu.br > Electrical Engineering and Informatics Center - CEEI > Federal University of Campina Grande - UFCG - www.ufcg.edu.br > Caixa Postal 10105 > 58109-970 Campina Grande - PB - Brasil > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070628/fe9fee4d/attachment.html From evan.cheng at apple.com Thu Jun 28 17:23:17 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 28 Jun 2007 15:23:17 -0700 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp In-Reply-To: <200706281102.01939.baldrick@free.fr> References: <200706271847.l5RIlpG6007163@zion.cs.uiuc.edu> <200706281102.01939.baldrick@free.fr> Message-ID: On Jun 28, 2007, at 2:02 AM, Duncan Sands wrote: > Hi Evan > >> If a livein is not used in the block. It's live through. > > thanks for doing this. Does this mean that the value in the livein > register is available in all blocks reachable from this one? No. It just means the value is not clobbered at any point in the block. You still need to explicitly mark whether it's livein in successor blocks. Evan > If so, > why is propagateEHRegister needed? Or does it mean that the value > is available in successor basic blocks, but only if also marked as > livein for the successor? > > Best wishes, > > Duncan. From dpatel at apple.com Thu Jun 28 18:09:51 2007 From: dpatel at apple.com (Devang Patel) Date: Thu, 28 Jun 2007 18:09:51 -0500 Subject: [llvm-commits] CVS: llvm/tools/opt/opt.cpp Message-ID: <200706282309.l5SN9p2L006323@zion.cs.uiuc.edu> Changes in directory llvm/tools/opt: opt.cpp updated: 1.142 -> 1.143 --- Log message: Fix PR 1526: http://llvm.org/PR1526 . --- Diffs of the changes: (+34 -0) opt.cpp | 34 ++++++++++++++++++++++++++++++++++ 1 files changed, 34 insertions(+) Index: llvm/tools/opt/opt.cpp diff -u llvm/tools/opt/opt.cpp:1.142 llvm/tools/opt/opt.cpp:1.143 --- llvm/tools/opt/opt.cpp:1.142 Sun May 6 18:45:49 2007 +++ llvm/tools/opt/opt.cpp Thu Jun 28 18:09:24 2007 @@ -14,10 +14,12 @@ #include "llvm/Module.h" #include "llvm/PassManager.h" +#include "llvm/CallGraphSCCPass.h" #include "llvm/Bitcode/ReaderWriter.h" #include "llvm/Assembly/PrintModulePass.h" #include "llvm/Analysis/Verifier.h" #include "llvm/Analysis/LoopPass.h" +#include "llvm/Analysis/CallGraph.h" #include "llvm/Target/TargetData.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Support/PassNameParser.h" @@ -94,6 +96,36 @@ // ---------- Define Printers for module and function passes ------------ namespace { +struct CallGraphSCCPassPrinter : public CallGraphSCCPass { + static char ID; + const PassInfo *PassToPrint; + CallGraphSCCPassPrinter(const PassInfo *PI) : + CallGraphSCCPass((intptr_t)&ID), PassToPrint(PI) {} + + virtual bool runOnSCC(const std::vector&SCC) { + if (!Quiet) { + cout << "Printing analysis '" << PassToPrint->getPassName() << "':\n"; + + for (unsigned i = 0, e = SCC.size(); i != e; ++i) { + Function *F = SCC[i]->getFunction(); + if (F) + getAnalysisID(PassToPrint).print(cout, F->getParent()); + } + } + // Get and print pass... + return false; + } + + virtual const char *getPassName() const { return "'Pass' Printer"; } + + virtual void getAnalysisUsage(AnalysisUsage &AU) const { + AU.addRequiredID(PassToPrint); + AU.setPreservesAll(); + } +}; + +char CallGraphSCCPassPrinter::ID = 0; + struct ModulePassPrinter : public ModulePass { static char ID; const PassInfo *PassToPrint; @@ -342,6 +374,8 @@ Passes.add(new BasicBlockPassPrinter(PassInf)); else if (dynamic_cast(P)) Passes.add(new FunctionPassPrinter(PassInf)); + else if (dynamic_cast(P)) + Passes.add(new CallGraphSCCPassPrinter(PassInf)); else Passes.add(new ModulePassPrinter(PassInf)); } From dpatel at apple.com Thu Jun 28 18:09:51 2007 From: dpatel at apple.com (Devang Patel) Date: Thu, 28 Jun 2007 18:09:51 -0500 Subject: [llvm-commits] CVS: llvm/test/Other/2007-06-28-PassManager.ll Message-ID: <200706282309.l5SN9pIM006322@zion.cs.uiuc.edu> Changes in directory llvm/test/Other: 2007-06-28-PassManager.ll added (r1.1) --- Log message: Fix PR 1526: http://llvm.org/PR1526 . --- Diffs of the changes: (+5 -0) 2007-06-28-PassManager.ll | 5 +++++ 1 files changed, 5 insertions(+) Index: llvm/test/Other/2007-06-28-PassManager.ll diff -c /dev/null llvm/test/Other/2007-06-28-PassManager.ll:1.1 *** /dev/null Thu Jun 28 18:09:35 2007 --- llvm/test/Other/2007-06-28-PassManager.ll Thu Jun 28 18:09:25 2007 *************** *** 0 **** --- 1,5 ---- + ; RUN: llvm-as < %s | opt -analyze -inline -disable-output + ; PR 1526 + define i32 @test1() { + ret i32 0; + } From djg at cray.com Thu Jun 28 18:30:11 2007 From: djg at cray.com (Dan Gohman) Date: Thu, 28 Jun 2007 18:30:11 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/TargetLowering.h Message-ID: <200706282330.l5SNUBn5006735@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Target: TargetLowering.h updated: 1.133 -> 1.134 --- Log message: Add new TargetLowering code to provide the final register type that an illegal value type will be transformed to, for code that needs the register type after all transformations instead of just after the first transformation. Factor out the code that uses this information to do copy-from-regs and copy-to-regs for various purposes into separate functions so that they are done consistently. --- Diffs of the changes: (+20 -5) TargetLowering.h | 25 ++++++++++++++++++++----- 1 files changed, 20 insertions(+), 5 deletions(-) Index: llvm/include/llvm/Target/TargetLowering.h diff -u llvm/include/llvm/Target/TargetLowering.h:1.133 llvm/include/llvm/Target/TargetLowering.h:1.134 --- llvm/include/llvm/Target/TargetLowering.h:1.133 Wed Jun 27 11:08:04 2007 +++ llvm/include/llvm/Target/TargetLowering.h Thu Jun 28 18:29:44 2007 @@ -212,12 +212,13 @@ /// Similarly, MVT::v2i64 turns into 4 MVT::i32 values with both PPC and X86. /// /// This method returns the number of registers needed, and the VT for each - /// register. It also returns the VT of the VectorType elements before they - /// are promoted/expanded. + /// register. It also returns the VT and quantity of the intermediate values + /// before they are promoted/expanded. /// unsigned getVectorTypeBreakdown(MVT::ValueType VT, - MVT::ValueType &ElementVT, - MVT::ValueType &LegalElementVT) const; + MVT::ValueType &IntermediateVT, + unsigned &NumIntermediates, + MVT::ValueType &RegisterVT) const; typedef std::vector::const_iterator legal_fpimm_iterator; legal_fpimm_iterator legal_fpimm_begin() const { @@ -360,6 +361,18 @@ return VT == MVT::iPTR ? PointerTy : VT; } + /// getRegisterType - Return the type of registers that this ValueType will + /// eventually require. + MVT::ValueType getRegisterType(MVT::ValueType VT) const { + if (!MVT::isExtendedVT(VT)) + return RegisterTypeForVT[VT]; + + MVT::ValueType VT1, RegisterVT; + unsigned NumIntermediates; + (void)getVectorTypeBreakdown(VT, VT1, NumIntermediates, RegisterVT); + return RegisterVT; + } + /// getNumRegisters - Return the number of registers that this ValueType will /// eventually require. This is one for any types promoted to live in larger /// registers, but may be more than one for types (like i64) that are split @@ -369,7 +382,8 @@ return NumRegistersForVT[VT]; MVT::ValueType VT1, VT2; - return getVectorTypeBreakdown(VT, VT1, VT2); + unsigned NumIntermediates; + return getVectorTypeBreakdown(VT, VT1, NumIntermediates, VT2); } /// hasTargetDAGCombine - If true, the target has custom DAG combine @@ -1034,6 +1048,7 @@ /// each ValueType the target supports natively. TargetRegisterClass *RegClassForVT[MVT::LAST_VALUETYPE]; unsigned char NumRegistersForVT[MVT::LAST_VALUETYPE]; + MVT::ValueType RegisterTypeForVT[MVT::LAST_VALUETYPE]; /// TransformToType - For any value types we are promoting or expanding, this /// contains the value type that we are changing to. For Expanded types, this From djg at cray.com Thu Jun 28 18:30:11 2007 From: djg at cray.com (Dan Gohman) Date: Thu, 28 Jun 2007 18:30:11 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp TargetLowering.cpp Message-ID: <200706282330.l5SNUB7d006742@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAGISel.cpp updated: 1.471 -> 1.472 TargetLowering.cpp updated: 1.123 -> 1.124 --- Log message: Add new TargetLowering code to provide the final register type that an illegal value type will be transformed to, for code that needs the register type after all transformations instead of just after the first transformation. Factor out the code that uses this information to do copy-from-regs and copy-to-regs for various purposes into separate functions so that they are done consistently. --- Diffs of the changes: (+355 -453) SelectionDAGISel.cpp | 642 ++++++++++++++++++++++----------------------------- TargetLowering.cpp | 166 +++++-------- 2 files changed, 355 insertions(+), 453 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.471 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.472 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.471 Wed Jun 27 13:45:32 2007 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Thu Jun 28 18:29:44 2007 @@ -90,7 +90,7 @@ /// This is needed because values can be promoted into larger registers and /// expanded into multiple smaller registers than the value. struct VISIBILITY_HIDDEN RegsForValue { - /// Regs - This list hold the register (for legal and promoted values) + /// Regs - This list holds the register (for legal and promoted values) /// or register set (for expanded values) that the value should be assigned /// to. std::vector Regs; @@ -117,15 +117,16 @@ /// getCopyFromRegs - Emit a series of CopyFromReg nodes that copies from /// this value and returns the result as a ValueVT value. This uses /// Chain/Flag as the input and updates them for the output Chain/Flag. + /// If the Flag pointer is NULL, no flag is used. SDOperand getCopyFromRegs(SelectionDAG &DAG, - SDOperand &Chain, SDOperand &Flag) const; + SDOperand &Chain, SDOperand *Flag) const; /// getCopyToRegs - Emit a series of CopyToReg nodes that copies the /// specified value into the registers specified by this object. This uses /// Chain/Flag as the input and updates them for the output Chain/Flag. + /// If the Flag pointer is NULL, no flag is used. void getCopyToRegs(SDOperand Val, SelectionDAG &DAG, - SDOperand &Chain, SDOperand &Flag, - MVT::ValueType PtrVT) const; + SDOperand &Chain, SDOperand *Flag) const; /// AddInlineAsmOperands - Add this value to the specified inlineasm node /// operand list. This adds the code marker and includes the number of @@ -306,15 +307,8 @@ unsigned FunctionLoweringInfo::CreateRegForValue(const Value *V) { MVT::ValueType VT = TLI.getValueType(V->getType()); - unsigned NumRegisters; - MVT::ValueType RegisterVT; - if (MVT::isVector(VT)) { - MVT::ValueType ElementVT; - NumRegisters = TLI.getVectorTypeBreakdown(VT, ElementVT, RegisterVT); - } else { - RegisterVT = TLI.getTypeToTransformTo(VT); - NumRegisters = TLI.getNumRegisters(VT); - } + unsigned NumRegisters = TLI.getNumRegisters(VT); + MVT::ValueType RegisterVT = TLI.getRegisterType(VT); unsigned R = MakeReg(RegisterVT); for (unsigned i = 1; i != NumRegisters; ++i) @@ -695,79 +689,17 @@ unsigned InReg = FuncInfo.ValueMap[V]; assert(InReg && "Value not in map!"); - // If this type is not legal, make it so now. - if (!MVT::isVector(VT)) { - if (TLI.getTypeAction(VT) == TargetLowering::Expand) { - // Source must be expanded. This input value is actually coming from the - // register pair InReg and InReg+1. - MVT::ValueType DestVT = TLI.getTypeToExpandTo(VT); - unsigned NumVals = TLI.getNumRegisters(VT); - N = DAG.getCopyFromReg(DAG.getEntryNode(), InReg, DestVT); - if (NumVals == 1) - N = DAG.getNode(ISD::BIT_CONVERT, VT, N); - else { - assert(NumVals == 2 && "1 to 4 (and more) expansion not implemented!"); - N = DAG.getNode(ISD::BUILD_PAIR, VT, N, - DAG.getCopyFromReg(DAG.getEntryNode(), InReg+1, DestVT)); - } - } else { - MVT::ValueType DestVT = TLI.getTypeToTransformTo(VT); - N = DAG.getCopyFromReg(DAG.getEntryNode(), InReg, DestVT); - if (TLI.getTypeAction(VT) == TargetLowering::Promote) // Promotion case - N = MVT::isFloatingPoint(VT) - ? DAG.getNode(ISD::FP_ROUND, VT, N) - : DAG.getNode(ISD::TRUNCATE, VT, N); - } - } else { - // Otherwise, if this is a vector, make it available as a vector - // here. - MVT::ValueType ElementVT, LegalElementVT; - unsigned NE = TLI.getVectorTypeBreakdown(VT, ElementVT, - LegalElementVT); - - // Build a BUILD_VECTOR or CONCAT_VECTORS with the input registers. - SmallVector Ops; - if (ElementVT == LegalElementVT) { - // If the value types are legal, just BUILD the CopyFromReg nodes. - for (unsigned i = 0; i != NE; ++i) - Ops.push_back(DAG.getCopyFromReg(DAG.getEntryNode(), InReg++, - ElementVT)); - } else if (ElementVT < LegalElementVT) { - // If the register was promoted, use TRUNCATE or FP_ROUND as appropriate. - for (unsigned i = 0; i != NE; ++i) { - SDOperand Op = DAG.getCopyFromReg(DAG.getEntryNode(), InReg++, - LegalElementVT); - if (MVT::isFloatingPoint(ElementVT)) - Op = DAG.getNode(ISD::FP_ROUND, ElementVT, Op); - else - Op = DAG.getNode(ISD::TRUNCATE, ElementVT, Op); - Ops.push_back(Op); - } - } else { - // If the register was expanded, use BUILD_PAIR. - assert((NE & 1) == 0 && "Must expand into a multiple of 2 elements!"); - for (unsigned i = 0; i != NE; ++i) { - SDOperand Op0 = DAG.getCopyFromReg(DAG.getEntryNode(), InReg++, - LegalElementVT); - SDOperand Op1 = DAG.getCopyFromReg(DAG.getEntryNode(), InReg++, - LegalElementVT); - Ops.push_back(DAG.getNode(ISD::BUILD_PAIR, ElementVT, Op0, Op1)); - } - } - - if (MVT::isVector(ElementVT)) { - N = DAG.getNode(ISD::CONCAT_VECTORS, - MVT::getVectorType(MVT::getVectorElementType(ElementVT), - NE * MVT::getVectorNumElements(ElementVT)), - &Ops[0], Ops.size()); - } else { - N = DAG.getNode(ISD::BUILD_VECTOR, - MVT::getVectorType(ElementVT, NE), - &Ops[0], Ops.size()); - } - } - - return N; + MVT::ValueType RegisterVT = TLI.getRegisterType(VT); + unsigned NumRegs = TLI.getNumRegisters(VT); + + std::vector Regs(NumRegs); + for (unsigned i = 0; i != NumRegs; ++i) + Regs[i] = InReg + i; + + RegsForValue RFV(Regs, RegisterVT, VT); + SDOperand Chain = DAG.getEntryNode(); + + return RFV.getCopyFromRegs(DAG, Chain, NULL); } @@ -2819,88 +2751,239 @@ } -SDOperand RegsForValue::getCopyFromRegs(SelectionDAG &DAG, - SDOperand &Chain, SDOperand &Flag)const{ - SDOperand Val = DAG.getCopyFromReg(Chain, Regs[0], RegVT, Flag); - Chain = Val.getValue(1); - Flag = Val.getValue(2); - - // If the result was expanded, copy from the top part. - if (Regs.size() > 1) { - assert(Regs.size() == 2 && - "Cannot expand to more than 2 elts yet!"); - SDOperand Hi = DAG.getCopyFromReg(Chain, Regs[1], RegVT, Flag); - Chain = Hi.getValue(1); - Flag = Hi.getValue(2); - if (DAG.getTargetLoweringInfo().isLittleEndian()) +/// getCopyFromParts - Create a value that contains the +/// specified legal parts combined into the value they represent. +static SDOperand getCopyFromParts(SelectionDAG &DAG, + const SDOperand *Parts, + unsigned NumParts, + MVT::ValueType PartVT, + MVT::ValueType ValueVT, + ISD::NodeType AssertOp = ISD::DELETED_NODE) { + if (!MVT::isVector(ValueVT) || NumParts == 1) { + SDOperand Val = Parts[0]; + + // If the value was expanded, copy from the top part. + if (NumParts > 1) { + assert(NumParts == 2 && + "Cannot expand to more than 2 elts yet!"); + SDOperand Hi = Parts[1]; return DAG.getNode(ISD::BUILD_PAIR, ValueVT, Val, Hi); - else - return DAG.getNode(ISD::BUILD_PAIR, ValueVT, Hi, Val); - } + } - // Otherwise, if the return value was promoted or extended, truncate it to the - // appropriate type. - if (RegVT == ValueVT) - return Val; + // Otherwise, if the value was promoted or extended, truncate it to the + // appropriate type. + if (PartVT == ValueVT) + return Val; + + if (MVT::isVector(PartVT)) { + assert(MVT::isVector(ValueVT) && "Unknown vector conversion!"); + return DAG.getNode(ISD::BIT_CONVERT, PartVT, Val); + } + + if (MVT::isInteger(PartVT) && + MVT::isInteger(ValueVT)) { + if (ValueVT < PartVT) { + // For a truncate, see if we have any information to + // indicate whether the truncated bits will always be + // zero or sign-extension. + if (AssertOp != ISD::DELETED_NODE) + Val = DAG.getNode(AssertOp, PartVT, Val, + DAG.getValueType(ValueVT)); + return DAG.getNode(ISD::TRUNCATE, ValueVT, Val); + } else { + return DAG.getNode(ISD::ANY_EXTEND, ValueVT, Val); + } + } - if (MVT::isVector(RegVT)) { - assert(MVT::isVector(ValueVT) && "Unknown vector conversion!"); - return DAG.getNode(ISD::BIT_CONVERT, RegVT, Val); + if (MVT::isFloatingPoint(PartVT) && + MVT::isFloatingPoint(ValueVT)) + return DAG.getNode(ISD::FP_ROUND, ValueVT, Val); + + if (MVT::getSizeInBits(PartVT) == + MVT::getSizeInBits(ValueVT)) + return DAG.getNode(ISD::BIT_CONVERT, ValueVT, Val); + + assert(0 && "Unknown mismatch!"); + } + + // Handle a multi-element vector. + MVT::ValueType IntermediateVT, RegisterVT; + unsigned NumIntermediates; + unsigned NumRegs = + DAG.getTargetLoweringInfo() + .getVectorTypeBreakdown(ValueVT, IntermediateVT, NumIntermediates, + RegisterVT); + + assert(NumRegs == NumParts && "Part count doesn't match vector breakdown!"); + assert(RegisterVT == PartVT && "Part type doesn't match vector breakdown!"); + assert(RegisterVT == Parts[0].getValueType() && + "Part type doesn't match part!"); + + // Assemble the parts into intermediate operands. + SmallVector Ops(NumIntermediates); + if (NumIntermediates == NumParts) { + // If the register was not expanded, truncate or copy the value, + // as appropriate. + for (unsigned i = 0; i != NumParts; ++i) + Ops[i] = getCopyFromParts(DAG, &Parts[i], 1, PartVT, IntermediateVT); + } else if (NumParts > 0) { + // If the intermediate type was expanded, build the intermediate operands + // from the parts. + assert(NumIntermediates % NumParts == 0 && + "Must expand into a divisible number of parts!"); + unsigned Factor = NumIntermediates / NumParts; + for (unsigned i = 0; i != NumIntermediates; ++i) + Ops[i] = getCopyFromParts(DAG, &Parts[i * Factor], Factor, + PartVT, IntermediateVT); + } + + // Build a vector with BUILD_VECTOR or CONCAT_VECTORS from the intermediate + // operands. + return DAG.getNode(MVT::isVector(IntermediateVT) ? + ISD::CONCAT_VECTORS : + ISD::BUILD_VECTOR, + ValueVT, &Ops[0], NumParts); +} + +/// getCopyToParts - Create a series of nodes that contain the +/// specified value split into legal parts. +static void getCopyToParts(SelectionDAG &DAG, + SDOperand Val, + SDOperand *Parts, + unsigned NumParts, + MVT::ValueType PartVT) { + MVT::ValueType ValueVT = Val.getValueType(); + + if (!MVT::isVector(ValueVT) || NumParts == 1) { + // If the value was expanded, copy from the parts. + if (NumParts > 1) { + for (unsigned i = 0; i < NumParts; ++i) + Parts[i] = DAG.getNode(ISD::EXTRACT_ELEMENT, PartVT, Val, + DAG.getConstant(i, MVT::i32)); + return; + } + + // If there is a single part and the types differ, this must be + // a promotion. + if (PartVT != ValueVT) { + if (MVT::isVector(PartVT)) { + assert(MVT::isVector(ValueVT) && + "Not a vector-vector cast?"); + Val = DAG.getNode(ISD::BIT_CONVERT, PartVT, Val); + } else if (MVT::isInteger(PartVT) && MVT::isInteger(ValueVT)) { + if (PartVT < ValueVT) + Val = DAG.getNode(ISD::TRUNCATE, PartVT, Val); + else + Val = DAG.getNode(ISD::ANY_EXTEND, PartVT, Val); + } else if (MVT::isFloatingPoint(PartVT) && + MVT::isFloatingPoint(ValueVT)) { + Val = DAG.getNode(ISD::FP_EXTEND, PartVT, Val); + } else if (MVT::getSizeInBits(PartVT) == + MVT::getSizeInBits(ValueVT)) { + Val = DAG.getNode(ISD::BIT_CONVERT, PartVT, Val); + } else { + assert(0 && "Unknown mismatch!"); + } + } + Parts[0] = Val; + return; } - - if (MVT::isInteger(RegVT)) { - if (ValueVT < RegVT) - return DAG.getNode(ISD::TRUNCATE, ValueVT, Val); + + // Handle a multi-element vector. + MVT::ValueType IntermediateVT, RegisterVT; + unsigned NumIntermediates; + unsigned NumRegs = + DAG.getTargetLoweringInfo() + .getVectorTypeBreakdown(ValueVT, IntermediateVT, NumIntermediates, + RegisterVT); + unsigned NumElements = MVT::getVectorNumElements(ValueVT); + + assert(NumRegs == NumParts && "Part count doesn't match vector breakdown!"); + assert(RegisterVT == PartVT && "Part type doesn't match vector breakdown!"); + + // Split the vector into intermediate operands. + SmallVector Ops(NumIntermediates); + for (unsigned i = 0; i != NumIntermediates; ++i) + if (MVT::isVector(IntermediateVT)) + Ops[i] = DAG.getNode(ISD::EXTRACT_SUBVECTOR, + IntermediateVT, Val, + DAG.getConstant(i * (NumElements / NumIntermediates), + MVT::i32)); else - return DAG.getNode(ISD::ANY_EXTEND, ValueVT, Val); + Ops[i] = DAG.getNode(ISD::EXTRACT_VECTOR_ELT, + IntermediateVT, Val, + DAG.getConstant(i, MVT::i32)); + + // Split the intermediate operands into legal parts. + if (NumParts == NumIntermediates) { + // If the register was not expanded, promote or copy the value, + // as appropriate. + for (unsigned i = 0; i != NumParts; ++i) + getCopyToParts(DAG, Ops[i], &Parts[i], 1, PartVT); + } else if (NumParts > 0) { + // If the intermediate type was expanded, split each the value into + // legal parts. + assert(NumParts % NumIntermediates == 0 && + "Must expand into a divisible number of parts!"); + unsigned Factor = NumParts / NumIntermediates; + for (unsigned i = 0; i != NumIntermediates; ++i) + getCopyToParts(DAG, Ops[i], &Parts[i * Factor], Factor, PartVT); + } +} + + +/// getCopyFromRegs - Emit a series of CopyFromReg nodes that copies from +/// this value and returns the result as a ValueVT value. This uses +/// Chain/Flag as the input and updates them for the output Chain/Flag. +/// If the Flag pointer is NULL, no flag is used. +SDOperand RegsForValue::getCopyFromRegs(SelectionDAG &DAG, + SDOperand &Chain, SDOperand *Flag)const{ + // Get the list of registers, in the appropriate order. + std::vector R(Regs); + if (!DAG.getTargetLoweringInfo().isLittleEndian()) + std::reverse(R.begin(), R.end()); + + // Copy the legal parts from the registers. + unsigned NumParts = Regs.size(); + SmallVector Parts(NumParts); + for (unsigned i = 0; i < NumParts; ++i) { + SDOperand Part = Flag ? + DAG.getCopyFromReg(Chain, Regs[i], RegVT, *Flag) : + DAG.getCopyFromReg(Chain, Regs[i], RegVT); + Chain = Part.getValue(1); + if (Flag) + *Flag = Part.getValue(2); + Parts[i] = Part; } - assert(MVT::isFloatingPoint(RegVT) && MVT::isFloatingPoint(ValueVT)); - return DAG.getNode(ISD::FP_ROUND, ValueVT, Val); + // Assemble the legal parts into the final value. + return getCopyFromParts(DAG, &Parts[0], NumParts, RegVT, ValueVT); } /// getCopyToRegs - Emit a series of CopyToReg nodes that copies the /// specified value into the registers specified by this object. This uses /// Chain/Flag as the input and updates them for the output Chain/Flag. +/// If the Flag pointer is NULL, no flag is used. void RegsForValue::getCopyToRegs(SDOperand Val, SelectionDAG &DAG, - SDOperand &Chain, SDOperand &Flag, - MVT::ValueType PtrVT) const { - if (Regs.size() == 1) { - // If there is a single register and the types differ, this must be - // a promotion. - if (RegVT != ValueVT) { - if (MVT::isVector(RegVT)) { - assert(MVT::isVector(Val.getValueType()) && - "Not a vector-vector cast?"); - Val = DAG.getNode(ISD::BIT_CONVERT, RegVT, Val); - } else if (MVT::isInteger(RegVT) && MVT::isInteger(Val.getValueType())) { - if (RegVT < ValueVT) - Val = DAG.getNode(ISD::TRUNCATE, RegVT, Val); - else - Val = DAG.getNode(ISD::ANY_EXTEND, RegVT, Val); - } else if (MVT::isFloatingPoint(RegVT) && - MVT::isFloatingPoint(Val.getValueType())) { - Val = DAG.getNode(ISD::FP_EXTEND, RegVT, Val); - } else if (MVT::getSizeInBits(RegVT) == - MVT::getSizeInBits(Val.getValueType())) { - Val = DAG.getNode(ISD::BIT_CONVERT, RegVT, Val); - } else { - assert(0 && "Unknown mismatch!"); - } - } - Chain = DAG.getCopyToReg(Chain, Regs[0], Val, Flag); - Flag = Chain.getValue(1); - } else { - std::vector R(Regs); - if (!DAG.getTargetLoweringInfo().isLittleEndian()) - std::reverse(R.begin(), R.end()); - - for (unsigned i = 0, e = R.size(); i != e; ++i) { - SDOperand Part = DAG.getNode(ISD::EXTRACT_ELEMENT, RegVT, Val, - DAG.getConstant(i, PtrVT)); - Chain = DAG.getCopyToReg(Chain, R[i], Part, Flag); - Flag = Chain.getValue(1); - } + SDOperand &Chain, SDOperand *Flag) const { + // Get the list of registers, in the appropriate order. + std::vector R(Regs); + if (!DAG.getTargetLoweringInfo().isLittleEndian()) + std::reverse(R.begin(), R.end()); + + // Get the list of the values's legal parts. + unsigned NumParts = Regs.size(); + SmallVector Parts(NumParts); + getCopyToParts(DAG, Val, &Parts[0], NumParts, RegVT); + + // Copy the parts into the registers. + for (unsigned i = 0; i < NumParts; ++i) { + SDOperand Part = Flag ? + DAG.getCopyToReg(Chain, R[i], Parts[i], *Flag) : + DAG.getCopyToReg(Chain, R[i], Parts[i]); + Chain = Part.getValue(0); + if (Flag) + *Flag = Part.getValue(1); } } @@ -3456,8 +3539,7 @@ } // Use the produced MatchedRegs object to - MatchedRegs.getCopyToRegs(InOperandVal, DAG, Chain, Flag, - TLI.getPointerTy()); + MatchedRegs.getCopyToRegs(InOperandVal, DAG, Chain, &Flag); MatchedRegs.AddInlineAsmOperands(1 /*REGUSE*/, DAG, AsmNodeOperands); break; } else { @@ -3508,8 +3590,7 @@ assert(!OpInfo.AssignedRegs.Regs.empty() && "Couldn't allocate input reg!"); - OpInfo.AssignedRegs.getCopyToRegs(InOperandVal, DAG, Chain, Flag, - TLI.getPointerTy()); + OpInfo.AssignedRegs.getCopyToRegs(InOperandVal, DAG, Chain, &Flag); OpInfo.AssignedRegs.AddInlineAsmOperands(1/*REGUSE*/, DAG, AsmNodeOperands); @@ -3538,7 +3619,7 @@ // If this asm returns a register value, copy the result from that register // and set it as the value of the call. if (!RetValRegs.Regs.empty()) { - SDOperand Val = RetValRegs.getCopyFromRegs(DAG, Chain, Flag); + SDOperand Val = RetValRegs.getCopyFromRegs(DAG, Chain, &Flag); // If the result of the inline asm is a vector, it may have the wrong // width/num elts. Make sure to convert it to the right type with @@ -3560,7 +3641,7 @@ for (unsigned i = 0, e = IndirectStoresToEmit.size(); i != e; ++i) { RegsForValue &OutRegs = IndirectStoresToEmit[i].first; Value *Ptr = IndirectStoresToEmit[i].second; - SDOperand OutVal = OutRegs.getCopyFromRegs(DAG, Chain, Flag); + SDOperand OutVal = OutRegs.getCopyFromRegs(DAG, Chain, &Flag); StoresToEmit.push_back(std::make_pair(OutVal, Ptr)); } @@ -3733,40 +3814,22 @@ RetVals.push_back(getTypeToTransformTo(VT)); Ops.push_back(DAG.getConstant(Flags, MVT::i32)); break; - case Expand: - if (!MVT::isVector(VT)) { - // If this is a large integer, it needs to be broken up into small - // integers. Figure out what the destination type is and how many small - // integers it turns into. - MVT::ValueType NVT = getTypeToExpandTo(VT); - unsigned NumVals = getNumRegisters(VT); - for (unsigned i = 0; i != NumVals; ++i) { - RetVals.push_back(NVT); - // if it isn't first piece, alignment must be 1 - if (i > 0) - Flags = (Flags & (~ISD::ParamFlags::OrigAlignment)) | - (1 << ISD::ParamFlags::OrigAlignmentOffs); - Ops.push_back(DAG.getConstant(Flags, MVT::i32)); - } - } else { - // Otherwise, this is a vector type. We only support legal vectors - // right now. - unsigned NumElems = cast(I->getType())->getNumElements(); - const Type *EltTy = cast(I->getType())->getElementType(); - - // Figure out if there is a Packed type corresponding to this Vector - // type. If so, convert to the vector type. - MVT::ValueType TVT = - MVT::getVectorType(getValueType(EltTy), NumElems); - if (TVT != MVT::Other && isTypeLegal(TVT)) { - RetVals.push_back(TVT); - Ops.push_back(DAG.getConstant(Flags, MVT::i32)); - } else { - assert(0 && "Don't support illegal by-val vector arguments yet!"); - } + case Expand: { + // If this is an illegal type, it needs to be broken up to fit into + // registers. + MVT::ValueType RegisterVT = getRegisterType(VT); + unsigned NumRegs = getNumRegisters(VT); + for (unsigned i = 0; i != NumRegs; ++i) { + RetVals.push_back(RegisterVT); + // if it isn't first piece, alignment must be 1 + if (i > 0) + Flags = (Flags & (~ISD::ParamFlags::OrigAlignment)) | + (1 << ISD::ParamFlags::OrigAlignmentOffs); + Ops.push_back(DAG.getConstant(Flags, MVT::i32)); } break; } + } } RetVals.push_back(MVT::Other); @@ -3979,108 +4042,33 @@ } // Figure out the result value types. - SmallVector RetTys; - - if (RetTy != Type::VoidTy) { - MVT::ValueType VT = getValueType(RetTy); - switch (getTypeAction(VT)) { - default: assert(0 && "Unknown type action!"); - case Legal: - RetTys.push_back(VT); - break; - case Promote: - RetTys.push_back(getTypeToTransformTo(VT)); - break; - case Expand: - if (!MVT::isVector(VT)) { - // If this is a large integer, it needs to be reassembled from small - // integers. Figure out what the source elt type is and how many small - // integers it is. - MVT::ValueType NVT = getTypeToExpandTo(VT); - unsigned NumVals = getNumRegisters(VT); - for (unsigned i = 0; i != NumVals; ++i) - RetTys.push_back(NVT); - } else { - // Otherwise, this is a vector type. We only support legal vectors - // right now. - const VectorType *PTy = cast(RetTy); - unsigned NumElems = PTy->getNumElements(); - const Type *EltTy = PTy->getElementType(); - - // Figure out if there is a Packed type corresponding to this Vector - // type. If so, convert to the vector type. - MVT::ValueType TVT = - MVT::getVectorType(getValueType(EltTy), NumElems); - if (TVT != MVT::Other && isTypeLegal(TVT)) { - RetTys.push_back(TVT); - } else { - assert(0 && "Don't support illegal by-val vector call results yet!"); - abort(); - } - } - } - } + MVT::ValueType VT = getValueType(RetTy); + MVT::ValueType RegisterVT = getRegisterType(VT); + unsigned NumRegs = getNumRegisters(VT); + SmallVector RetTys(NumRegs); + for (unsigned i = 0; i != NumRegs; ++i) + RetTys[i] = RegisterVT; RetTys.push_back(MVT::Other); // Always has a chain. - // Finally, create the CALL node. + // Create the CALL node. SDOperand Res = DAG.getNode(ISD::CALL, - DAG.getVTList(&RetTys[0], RetTys.size()), + DAG.getVTList(&RetTys[0], NumRegs + 1), &Ops[0], Ops.size()); - - // This returns a pair of operands. The first element is the - // return value for the function (if RetTy is not VoidTy). The second - // element is the outgoing token chain. - SDOperand ResVal; - if (RetTys.size() != 1) { - MVT::ValueType VT = getValueType(RetTy); - if (RetTys.size() == 2) { - ResVal = Res; - - // If this value was promoted, truncate it down. - if (ResVal.getValueType() != VT) { - if (MVT::isVector(VT)) { - // Insert a BIT_CONVERT to convert from the packed result type to the - // new vector type. - unsigned NumElems = cast(RetTy)->getNumElements(); - const Type *EltTy = cast(RetTy)->getElementType(); - - // Figure out if there is a Packed type corresponding to this Vector - // type. If so, convert to the vector type. - MVT::ValueType TVT = - MVT::getVectorType(getValueType(EltTy),NumElems); - if (TVT != MVT::Other && isTypeLegal(TVT)) { - // Insert a BIT_CONVERT of the FORMAL_ARGUMENTS to a - // "N x PTyElementVT" vector type. - ResVal = DAG.getNode(ISD::BIT_CONVERT, TVT, ResVal); - } else { - abort(); - } - } else if (MVT::isInteger(VT)) { - unsigned AssertOp = ISD::AssertSext; - if (!RetTyIsSigned) - AssertOp = ISD::AssertZext; - ResVal = DAG.getNode(AssertOp, ResVal.getValueType(), ResVal, - DAG.getValueType(VT)); - ResVal = DAG.getNode(ISD::TRUNCATE, VT, ResVal); - } else { - assert(MVT::isFloatingPoint(VT)); - if (getTypeAction(VT) == Expand) - ResVal = DAG.getNode(ISD::BIT_CONVERT, VT, ResVal); - else - ResVal = DAG.getNode(ISD::FP_ROUND, VT, ResVal); - } - } - } else if (RetTys.size() == 3) { - ResVal = DAG.getNode(ISD::BUILD_PAIR, VT, - Res.getValue(0), Res.getValue(1)); - - } else { - assert(0 && "Case not handled yet!"); - } + SDOperand Chain = Res.getValue(NumRegs); + + // Gather up the call result into a single value. + if (RetTy != Type::VoidTy) { + ISD::NodeType AssertOp = ISD::AssertSext; + if (!RetTyIsSigned) + AssertOp = ISD::AssertZext; + SmallVector Results(NumRegs); + for (unsigned i = 0; i != NumRegs; ++i) + Results[i] = Res.getValue(i); + Res = getCopyFromParts(DAG, &Results[0], NumRegs, RegisterVT, VT, AssertOp); } - - return std::make_pair(ResVal, Res.getValue(Res.Val->getNumValues()-1)); + + return std::make_pair(Res, Chain); } SDOperand TargetLowering::LowerOperation(SDOperand Op, SelectionDAG &DAG) { @@ -4360,75 +4348,17 @@ cast(Op.getOperand(1))->getReg() != Reg) && "Copy from a reg to the same reg!"); - // If this type is not legal, we must make sure to not create an invalid - // register use. MVT::ValueType SrcVT = Op.getValueType(); - MVT::ValueType DestVT = TLI.getTypeToTransformTo(SrcVT); - if (SrcVT == DestVT) { - return DAG.getCopyToReg(getRoot(), Reg, Op); - } else if (MVT::isVector(SrcVT)) { - // Handle copies from generic vectors to registers. - MVT::ValueType ElementVT, LegalElementVT; - unsigned NE = TLI.getVectorTypeBreakdown(SrcVT, - ElementVT, LegalElementVT); - uint64_t SrcVL = MVT::getVectorNumElements(SrcVT); - - // Loop over all of the elements of the resultant vector, - // EXTRACT_VECTOR_ELT'ing or EXTRACT_SUBVECTOR'ing them, converting them - // to LegalElementVT, then copying them into output registers. - SmallVector OutChains; - SDOperand Root = getRoot(); - for (unsigned i = 0; i != NE; ++i) { - SDOperand Elt = MVT::isVector(ElementVT) ? - DAG.getNode(ISD::EXTRACT_SUBVECTOR, ElementVT, - Op, DAG.getConstant(i * (SrcVL / NE), TLI.getPointerTy())) : - DAG.getNode(ISD::EXTRACT_VECTOR_ELT, ElementVT, - Op, DAG.getConstant(i, TLI.getPointerTy())); - if (ElementVT == LegalElementVT) { - // Elements are legal. - OutChains.push_back(DAG.getCopyToReg(Root, Reg++, Elt)); - } else if (LegalElementVT > ElementVT) { - // Elements are promoted. - if (MVT::isFloatingPoint(LegalElementVT)) - Elt = DAG.getNode(ISD::FP_EXTEND, LegalElementVT, Elt); - else - Elt = DAG.getNode(ISD::ANY_EXTEND, LegalElementVT, Elt); - OutChains.push_back(DAG.getCopyToReg(Root, Reg++, Elt)); - } else { - // Elements are expanded. - // The src value is expanded into multiple registers. - SDOperand Lo = DAG.getNode(ISD::EXTRACT_ELEMENT, LegalElementVT, - Elt, DAG.getConstant(0, TLI.getPointerTy())); - SDOperand Hi = DAG.getNode(ISD::EXTRACT_ELEMENT, LegalElementVT, - Elt, DAG.getConstant(1, TLI.getPointerTy())); - OutChains.push_back(DAG.getCopyToReg(Root, Reg++, Lo)); - OutChains.push_back(DAG.getCopyToReg(Root, Reg++, Hi)); - } - } - return DAG.getNode(ISD::TokenFactor, MVT::Other, - &OutChains[0], OutChains.size()); - } else if (TLI.getTypeAction(SrcVT) == TargetLowering::Promote) { - // The src value is promoted to the register. - if (MVT::isFloatingPoint(SrcVT)) - Op = DAG.getNode(ISD::FP_EXTEND, DestVT, Op); - else - Op = DAG.getNode(ISD::ANY_EXTEND, DestVT, Op); - return DAG.getCopyToReg(getRoot(), Reg, Op); - } else { - DestVT = TLI.getTypeToExpandTo(SrcVT); - unsigned NumVals = TLI.getNumRegisters(SrcVT); - if (NumVals == 1) - return DAG.getCopyToReg(getRoot(), Reg, - DAG.getNode(ISD::BIT_CONVERT, DestVT, Op)); - assert(NumVals == 2 && "1 to 4 (and more) expansion not implemented!"); - // The src value is expanded into multiple registers. - SDOperand Lo = DAG.getNode(ISD::EXTRACT_ELEMENT, DestVT, - Op, DAG.getConstant(0, TLI.getPointerTy())); - SDOperand Hi = DAG.getNode(ISD::EXTRACT_ELEMENT, DestVT, - Op, DAG.getConstant(1, TLI.getPointerTy())); - Op = DAG.getCopyToReg(getRoot(), Reg, Lo); - return DAG.getCopyToReg(Op, Reg+1, Hi); - } + MVT::ValueType RegisterVT = TLI.getRegisterType(SrcVT); + unsigned NumRegs = TLI.getNumRegisters(SrcVT); + SmallVector Regs(NumRegs); + SmallVector Chains(NumRegs); + + // Copy the value by legal parts into sequential virtual registers. + getCopyToParts(DAG, Op, &Regs[0], NumRegs, RegisterVT); + for (unsigned i = 0; i < NumRegs; ++i) + Chains[i] = DAG.getCopyToReg(getRoot(), Reg + i, Regs[i]); + return DAG.getNode(ISD::TokenFactor, MVT::Other, &Chains[0], NumRegs); } void SelectionDAGISel:: Index: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp diff -u llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.123 llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.124 --- llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.123 Mon Jun 25 11:23:39 2007 +++ llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp Thu Jun 28 18:29:44 2007 @@ -165,58 +165,19 @@ TargetLowering::~TargetLowering() {} -/// setValueTypeAction - Set the action for a particular value type. This -/// assumes an action has not already been set for this value type. -static void SetValueTypeAction(MVT::ValueType VT, - TargetLowering::LegalizeAction Action, - TargetLowering &TLI, - MVT::ValueType *TransformToType, - TargetLowering::ValueTypeActionImpl &ValueTypeActions) { - ValueTypeActions.setTypeAction(VT, Action); - if (Action == TargetLowering::Promote) { - MVT::ValueType PromoteTo; - if (VT == MVT::f32) - PromoteTo = MVT::f64; - else { - unsigned LargerReg = VT+1; - while (!TLI.isTypeLegal((MVT::ValueType)LargerReg)) { - ++LargerReg; - assert(MVT::isInteger((MVT::ValueType)LargerReg) && - "Nothing to promote to??"); - } - PromoteTo = (MVT::ValueType)LargerReg; - } - - assert(MVT::isInteger(VT) == MVT::isInteger(PromoteTo) && - MVT::isFloatingPoint(VT) == MVT::isFloatingPoint(PromoteTo) && - "Can only promote from int->int or fp->fp!"); - assert(VT < PromoteTo && "Must promote to a larger type!"); - TransformToType[VT] = PromoteTo; - } else if (Action == TargetLowering::Expand) { - // f32 and f64 is each expanded to corresponding integer type of same size. - if (VT == MVT::f32) - TransformToType[VT] = MVT::i32; - else if (VT == MVT::f64) - TransformToType[VT] = MVT::i64; - else { - assert((MVT::isVector(VT) || MVT::isInteger(VT)) && VT > MVT::i8 && - "Cannot expand this type: target must support SOME integer reg!"); - // Expand to the next smaller integer type! - TransformToType[VT] = (MVT::ValueType)(VT-1); - } - } -} - - /// computeRegisterProperties - Once all of the register classes are added, /// this allows us to compute derived properties we expose. void TargetLowering::computeRegisterProperties() { assert(MVT::LAST_VALUETYPE <= 32 && "Too many value types for ValueTypeActions to hold!"); - // Everything defaults to one. - for (unsigned i = 0; i != MVT::LAST_VALUETYPE; ++i) + // Everything defaults to needing one register. + for (unsigned i = 0; i != MVT::LAST_VALUETYPE; ++i) { NumRegistersForVT[i] = 1; + RegisterTypeForVT[i] = TransformToType[i] = i; + } + // ...except isVoid, which doesn't need any registers. + NumRegistersForVT[MVT::isVoid] = 0; // Find the largest integer register class. unsigned LargestIntReg = MVT::i128; @@ -225,57 +186,65 @@ // Every integer value type larger than this largest register takes twice as // many registers to represent as the previous ValueType. - unsigned ExpandedReg = LargestIntReg; ++LargestIntReg; - for (++ExpandedReg; MVT::isInteger((MVT::ValueType)ExpandedReg);++ExpandedReg) + for (MVT::ValueType ExpandedReg = LargestIntReg + 1; + MVT::isInteger(ExpandedReg); ++ExpandedReg) { NumRegistersForVT[ExpandedReg] = 2*NumRegistersForVT[ExpandedReg-1]; + RegisterTypeForVT[ExpandedReg] = LargestIntReg; + TransformToType[ExpandedReg] = ExpandedReg - 1; + ValueTypeActions.setTypeAction(ExpandedReg, Expand); + } - // Inspect all of the ValueType's possible, deciding how to process them. - for (unsigned IntReg = MVT::i1; IntReg <= MVT::i128; ++IntReg) - // If we are expanding this type, expand it! - if (getNumRegisters((MVT::ValueType)IntReg) != 1) - SetValueTypeAction((MVT::ValueType)IntReg, Expand, *this, TransformToType, - ValueTypeActions); - else if (!isTypeLegal((MVT::ValueType)IntReg)) - // Otherwise, if we don't have native support, we must promote to a - // larger type. - SetValueTypeAction((MVT::ValueType)IntReg, Promote, *this, - TransformToType, ValueTypeActions); - else - TransformToType[(MVT::ValueType)IntReg] = (MVT::ValueType)IntReg; - - // If the target does not have native f64 support, expand it to i64. We will - // be generating soft float library calls. If the target does not have native - // support for f32, promote it to f64 if it is legal. Otherwise, expand it to - // i32. - if (isTypeLegal(MVT::f64)) - TransformToType[MVT::f64] = MVT::f64; - else { + // Inspect all of the ValueType's smaller than the largest integer + // register to see which ones need promotion. + MVT::ValueType LegalIntReg = LargestIntReg; + for (MVT::ValueType IntReg = LargestIntReg - 1; + IntReg >= MVT::i1; --IntReg) { + if (isTypeLegal(IntReg)) { + LegalIntReg = IntReg; + } else { + RegisterTypeForVT[IntReg] = TransformToType[IntReg] = LegalIntReg; + ValueTypeActions.setTypeAction(IntReg, Promote); + } + } + + // Decide how to handle f64. If the target does not have native f64 support, + // expand it to i64 and we will be generating soft float library calls. + if (!isTypeLegal(MVT::f64)) { NumRegistersForVT[MVT::f64] = NumRegistersForVT[MVT::i64]; - SetValueTypeAction(MVT::f64, Expand, *this, TransformToType, - ValueTypeActions); + RegisterTypeForVT[MVT::f64] = RegisterTypeForVT[MVT::i64]; + TransformToType[MVT::f64] = MVT::i64; + ValueTypeActions.setTypeAction(MVT::f64, Expand); } - if (isTypeLegal(MVT::f32)) - TransformToType[MVT::f32] = MVT::f32; - else if (isTypeLegal(MVT::f64)) - SetValueTypeAction(MVT::f32, Promote, *this, TransformToType, - ValueTypeActions); - else { - NumRegistersForVT[MVT::f32] = NumRegistersForVT[MVT::i32]; - SetValueTypeAction(MVT::f32, Expand, *this, TransformToType, - ValueTypeActions); - } - - // Loop over all of the legal vector value types, specifying an identity type - // transformation. - for (unsigned i = MVT::FIRST_VECTOR_VALUETYPE; + + // Decide how to handle f32. If the target does not have native support for + // f32, promote it to f64 if it is legal. Otherwise, expand it to i32. + if (!isTypeLegal(MVT::f32)) { + if (isTypeLegal(MVT::f64)) { + NumRegistersForVT[MVT::f32] = NumRegistersForVT[MVT::f64]; + RegisterTypeForVT[MVT::f32] = RegisterTypeForVT[MVT::f64]; + TransformToType[MVT::f32] = MVT::f64; + ValueTypeActions.setTypeAction(MVT::f32, Promote); + } else { + NumRegistersForVT[MVT::f32] = NumRegistersForVT[MVT::i32]; + RegisterTypeForVT[MVT::f32] = RegisterTypeForVT[MVT::i32]; + TransformToType[MVT::f32] = MVT::i32; + ValueTypeActions.setTypeAction(MVT::f32, Expand); + } + } + + // Loop over all of the vector value types to see which need transformations. + for (MVT::ValueType i = MVT::FIRST_VECTOR_VALUETYPE; i <= MVT::LAST_VECTOR_VALUETYPE; ++i) { - if (isTypeLegal((MVT::ValueType)i)) - TransformToType[i] = (MVT::ValueType)i; - else { - MVT::ValueType VT1, VT2; - NumRegistersForVT[i] = getVectorTypeBreakdown(i, VT1, VT2); - SetValueTypeAction(i, Expand, *this, TransformToType, - ValueTypeActions); + if (!isTypeLegal(i)) { + MVT::ValueType IntermediateVT, RegisterVT; + unsigned NumIntermediates; + NumRegistersForVT[i] = + getVectorTypeBreakdown(i, + IntermediateVT, NumIntermediates, + RegisterVT); + RegisterTypeForVT[i] = RegisterVT; + TransformToType[i] = MVT::Other; // this isn't actually used + ValueTypeActions.setTypeAction(i, Expand); } } } @@ -290,12 +259,13 @@ /// Similarly, MVT::v2i64 turns into 4 MVT::i32 values with both PPC and X86. /// /// This method returns the number of registers needed, and the VT for each -/// register. It also returns the VT of the VectorType elements before they -/// are promoted/expanded. +/// register. It also returns the VT and quantity of the intermediate values +/// before they are promoted/expanded. /// unsigned TargetLowering::getVectorTypeBreakdown(MVT::ValueType VT, - MVT::ValueType &ElementVT, - MVT::ValueType &LegalElementVT) const { + MVT::ValueType &IntermediateVT, + unsigned &NumIntermediates, + MVT::ValueType &RegisterVT) const { // Figure out the right, legal destination reg to copy into. unsigned NumElts = MVT::getVectorNumElements(VT); MVT::ValueType EltTy = MVT::getVectorElementType(VT); @@ -309,14 +279,16 @@ NumElts >>= 1; NumVectorRegs <<= 1; } + + NumIntermediates = NumVectorRegs; MVT::ValueType NewVT = MVT::getVectorType(EltTy, NumElts); if (!isTypeLegal(NewVT)) NewVT = EltTy; - ElementVT = NewVT; + IntermediateVT = NewVT; MVT::ValueType DestVT = getTypeToTransformTo(NewVT); - LegalElementVT = DestVT; + RegisterVT = DestVT; if (DestVT < NewVT) { // Value is expanded, e.g. i64 -> i16. return NumVectorRegs*(MVT::getSizeInBits(NewVT)/MVT::getSizeInBits(DestVT)); From djg at cray.com Thu Jun 28 18:30:12 2007 From: djg at cray.com (Dan Gohman) Date: Thu, 28 Jun 2007 18:30:12 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h Message-ID: <200706282330.l5SNUCD0006748@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: SelectionDAGNodes.h updated: 1.193 -> 1.194 --- Log message: Add new TargetLowering code to provide the final register type that an illegal value type will be transformed to, for code that needs the register type after all transformations instead of just after the first transformation. Factor out the code that uses this information to do copy-from-regs and copy-to-regs for various purposes into separate functions so that they are done consistently. --- Diffs of the changes: (+1 -1) SelectionDAGNodes.h | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.193 llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.194 --- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.193 Mon Jun 25 11:23:39 2007 +++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h Thu Jun 28 18:29:44 2007 @@ -253,7 +253,7 @@ /// CONCAT_VECTORS(VECTOR0, VECTOR1, ...) - Given a number of values of /// vector type with the same length and element type, this produces a /// concatenated vector result value, with length equal to the sum of the - /// input vectors. + /// lengths of the input vectors. CONCAT_VECTORS, /// EXTRACT_SUBVECTOR(VECTOR, IDX) - Returns a subvector from VECTOR (an From resistor at mac.com Thu Jun 28 18:50:54 2007 From: resistor at mac.com (Owen Anderson) Date: Thu, 28 Jun 2007 18:50:54 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/GVNPRE/select.ll Message-ID: <200706282350.l5SNosZY007091@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/GVNPRE: select.ll added (r1.1) --- Log message: Add a test for performing GVNPRE on select instructions. --- Diffs of the changes: (+17 -0) select.ll | 17 +++++++++++++++++ 1 files changed, 17 insertions(+) Index: llvm/test/Transforms/GVNPRE/select.ll diff -c /dev/null llvm/test/Transforms/GVNPRE/select.ll:1.1 *** /dev/null Thu Jun 28 18:50:41 2007 --- llvm/test/Transforms/GVNPRE/select.ll Thu Jun 28 18:50:31 2007 *************** *** 0 **** --- 1,17 ---- + ; RUN: llvm-as < %s | opt -gvnpre | llvm-dis | grep b.gvnpre + + define i32 @extract() { + entry: ; preds = %cond_false, %entry + br i1 true, label %cond_true, label %cond_false + + cond_true: + br label %end + + cond_false: + %a = select i1 true, i32 0, i32 1 + br label %end + + end: + %b = select i1 true, i32 0, i32 1 + ret i32 %b + } From resistor at mac.com Thu Jun 28 18:51:44 2007 From: resistor at mac.com (Owen Anderson) Date: Thu, 28 Jun 2007 18:51:44 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/GVNPRE.cpp Message-ID: <200706282351.l5SNpilk007123@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: GVNPRE.cpp updated: 1.63 -> 1.64 --- Log message: Add support for performing GVNPRE on select instructions. This fixes test/Transforms/GVNPRE/select.ll. --- Diffs of the changes: (+57 -13) GVNPRE.cpp | 70 +++++++++++++++++++++++++++++++++++++++++++++++++------------ 1 files changed, 57 insertions(+), 13 deletions(-) Index: llvm/lib/Transforms/Scalar/GVNPRE.cpp diff -u llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.63 llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.64 --- llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.63 Wed Jun 27 19:34:34 2007 +++ llvm/lib/Transforms/Scalar/GVNPRE.cpp Thu Jun 28 18:51:21 2007 @@ -59,7 +59,7 @@ FCMPOGT, FCMPOGE, FCMPOLT, FCMPOLE, FCMPONE, FCMPORD, FCMPUNO, FCMPUEQ, FCMPUGT, FCMPUGE, FCMPULT, FCMPULE, FCMPUNE, EXTRACT, INSERT, - SHUFFLE }; + SHUFFLE, SELECT }; ExpressionOpcode opcode; uint32_t firstVN; @@ -101,10 +101,11 @@ Expression create_expression(ShuffleVectorInst* V); Expression create_expression(ExtractElementInst* C); Expression create_expression(InsertElementInst* V); + Expression create_expression(SelectInst* V); public: ValueTable() { nextValueNumber = 1; } uint32_t lookup_or_add(Value* V); - uint32_t lookup(Value* V); + uint32_t lookup(Value* V) const; void add(Value* V, uint32_t num); void clear(); void erase(Value* v); @@ -279,6 +280,17 @@ return e; } +ValueTable::Expression ValueTable::create_expression(SelectInst* I) { + Expression e; + + e.firstVN = lookup_or_add(I->getCondition()); + e.secondVN = lookup_or_add(I->getTrueValue()); + e.thirdVN = lookup_or_add(I->getFalseValue()); + e.opcode = Expression::SELECT; + + return e; +} + //===----------------------------------------------------------------------===// // ValueTable External Functions //===----------------------------------------------------------------------===// @@ -356,6 +368,19 @@ return nextValueNumber++; } + } else if (SelectInst* U = dyn_cast(V)) { + Expression e = create_expression(U); + + std::map::iterator EI = expressionNumbering.find(e); + if (EI != expressionNumbering.end()) { + valueNumbering.insert(std::make_pair(V, EI->second)); + return EI->second; + } else { + expressionNumbering.insert(std::make_pair(e, nextValueNumber)); + valueNumbering.insert(std::make_pair(V, nextValueNumber)); + + return nextValueNumber++; + } } else { valueNumbering.insert(std::make_pair(V, nextValueNumber)); return nextValueNumber++; @@ -364,7 +389,7 @@ /// lookup - Returns the value number of the specified value. Fails if /// the value has not yet been numbered. -uint32_t ValueTable::lookup(Value* V) { +uint32_t ValueTable::lookup(Value* V) const { DenseMap::iterator VI = valueNumbering.find(V); if (VI != valueNumbering.end()) return VI->second; @@ -579,7 +604,8 @@ } // Ternary Operations - } else if (isa(V) || isa(V)) { + } else if (isa(V) || isa(V) || + isa(V)) { User* U = cast(V); Value* newOp1 = 0; @@ -619,6 +645,8 @@ else if (InsertElementInst* I = dyn_cast(U)) newVal = new InsertElementInst(newOp1, newOp2, newOp3, I->getName()+".expr"); + else if (SelectInst* I = dyn_cast(U)) + newVal = new SelectInst(newOp1, newOp2, newOp3, I->getName()+".expr"); uint32_t v = VN.lookup_or_add(newVal); @@ -700,7 +728,8 @@ } // Handle ternary ops - } else if (isa(v) || isa(v)) { + } else if (isa(v) || isa(v) || + isa(v)) { User* U = cast(v); bool lhsValid = !isa(U->getOperand(0)); @@ -759,7 +788,8 @@ } // Handle ternary ops - } else if (isa(e) || isa(e)) { + } else if (isa(e) || isa(e) || + isa(e)) { User* U = cast(e); Value* l = find_leader(set, VN.lookup(U->getOperand(0))); Value* r = find_leader(set, VN.lookup(U->getOperand(1))); @@ -797,6 +827,7 @@ DOUT << "{ "; for (SmallPtrSet::iterator I = s.begin(), E = s.end(); I != E; ++I) { + DOUT << "" << VN.lookup(*I) << ": "; DEBUG((*I)->dump()); } DOUT << "}\n\n"; @@ -828,7 +859,7 @@ if (isa(BI) || isa(BI) || isa(BI) || isa(BI) || - isa(BI)) { + isa(BI) || isa(BI)) { Value *leader = find_leader(availableOut[BB], VN.lookup(BI)); if (leader != 0) @@ -913,7 +944,8 @@ } // Handle ternary ops - } else if (isa(I) || isa(I)) { + } else if (isa(I) || isa(I) || + isa(I)) { User* U = cast(I); Value* leftValue = U->getOperand(0); Value* rightValue = U->getOperand(1); @@ -1157,7 +1189,8 @@ isa(U->getOperand(0)) || isa(U->getOperand(0)) || isa(U->getOperand(0)) || - isa(U->getOperand(0))) + isa(U->getOperand(0)) || + isa(U->getOperand(0))) s1 = find_leader(availableOut[*PI], VN.lookup(U->getOperand(0))); else s1 = U->getOperand(0); @@ -1167,7 +1200,8 @@ isa(U->getOperand(1)) || isa(U->getOperand(1)) || isa(U->getOperand(1)) || - isa(U->getOperand(1))) + isa(U->getOperand(1)) || + isa(U->getOperand(1))) s2 = find_leader(availableOut[*PI], VN.lookup(U->getOperand(1))); else s2 = U->getOperand(1); @@ -1175,12 +1209,14 @@ // Ternary Operators Value* s3 = 0; if (isa(U) || - isa(U)) + isa(U) || + isa(U)) if (isa(U->getOperand(2)) || isa(U->getOperand(2)) || isa(U->getOperand(2)) || isa(U->getOperand(2)) || - isa(U->getOperand(2))) + isa(U->getOperand(2)) || + isa(U->getOperand(2))) s3 = find_leader(availableOut[*PI], VN.lookup(U->getOperand(2))); else s3 = U->getOperand(2); @@ -1203,6 +1239,11 @@ else if (ExtractElementInst* S = dyn_cast(U)) newVal = new ExtractElementInst(s1, s2, S->getName()+".gvnpre", (*PI)->getTerminator()); + else if (SelectInst* S = dyn_cast(U)) + newVal = new SelectInst(S->getCondition(), S->getTrueValue(), + S->getFalseValue(), S->getName()+".gvnpre", + (*PI)->getTerminator()); + VN.add(newVal, VN.lookup(U)); @@ -1248,7 +1289,7 @@ if (isa(e) || isa(e) || isa(e) || isa(e) || - isa(e)) { + isa(e) || isa(e)) { if (find_leader(availableOut[D->getIDom()->getBlock()], VN.lookup(e)) != 0) continue; @@ -1366,6 +1407,9 @@ buildsets(F); for (Function::iterator FI = F.begin(), FE = F.end(); FI != FE; ++FI) { + DOUT << "AVAIL_OUT: " << FI->getName() << "\n"; + dump(availableOut[FI]); + DOUT << "\n"; DOUT << "ANTIC_IN: " << FI->getName() << "\n"; dump(anticipatedIn[FI]); DOUT << "\n\n"; From evan.cheng at apple.com Thu Jun 28 19:01:43 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 28 Jun 2007 19:01:43 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp Message-ID: <200706290001.l5T01hke007297@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ISelLowering.cpp updated: 1.415 -> 1.416 --- Log message: Type of vector extract / insert index operand should be iPTR. --- Diffs of the changes: (+1 -1) X86ISelLowering.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/X86/X86ISelLowering.cpp diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.415 llvm/lib/Target/X86/X86ISelLowering.cpp:1.416 --- llvm/lib/Target/X86/X86ISelLowering.cpp:1.415 Mon Jun 25 11:23:39 2007 +++ llvm/lib/Target/X86/X86ISelLowering.cpp Thu Jun 28 19:01:20 2007 @@ -2959,7 +2959,7 @@ if (N1.getValueType() != MVT::i32) N1 = DAG.getNode(ISD::ANY_EXTEND, MVT::i32, N1); if (N2.getValueType() != MVT::i32) - N2 = DAG.getConstant(cast(N2)->getValue(), MVT::i32); + N2 = DAG.getConstant(cast(N2)->getValue(),getPointerTy()); return DAG.getNode(X86ISD::PINSRW, VT, N0, N1, N2); } else if (MVT::getSizeInBits(BaseVT) == 32) { unsigned Idx = cast(N2)->getValue(); From djg at cray.com Thu Jun 28 19:09:30 2007 From: djg at cray.com (Dan Gohman) Date: Thu, 28 Jun 2007 19:09:30 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Message-ID: <200706290009.l5T09UX1007436@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: LegalizeDAG.cpp updated: 1.503 -> 1.504 --- Log message: Fix an assertion failure in legalizing bitcast operators on targets where vectors are split down to single elements as part of legalization. --- Diffs of the changes: (+15 -23) LegalizeDAG.cpp | 38 +++++++++++++++----------------------- 1 files changed, 15 insertions(+), 23 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.503 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.504 --- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.503 Wed Jun 27 11:08:04 2007 +++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Thu Jun 28 19:09:08 2007 @@ -5568,38 +5568,30 @@ case ISD::BIT_CONVERT: { // We know the result is a vector. The input may be either a vector or a // scalar value. - if (!MVT::isVector(Op.getOperand(0).getValueType())) { - // Lower to a store/load. FIXME: this could be improved probably. - SDOperand Ptr = CreateStackTemporary(Op.getOperand(0).getValueType()); + SDOperand InOp = Node->getOperand(0); + if (!MVT::isVector(InOp.getValueType()) || + MVT::getVectorNumElements(InOp.getValueType()) == 1) { + // The input is a scalar or single-element vector. + // Lower to a store/load so that it can be split. + // FIXME: this could be improved probably. + SDOperand Ptr = CreateStackTemporary(InOp.getValueType()); SDOperand St = DAG.getStore(DAG.getEntryNode(), - Op.getOperand(0), Ptr, NULL, 0); - St = DAG.getLoad(NewVT, St, Ptr, NULL, 0); - SplitVectorOp(St, Lo, Hi); - } else { - // If the input is a vector type, we have to either scalarize it, pack it - // or convert it based on whether the input vector type is legal. - SDNode *InVal = Node->getOperand(0).Val; - unsigned NumElems = MVT::getVectorNumElements(InVal->getValueType(0)); - - assert(NumElems > 1); - { - // Split the input vector. - SplitVectorOp(Op.getOperand(0), Lo, Hi); - - // Convert each of the pieces now. - Lo = DAG.getNode(ISD::BIT_CONVERT, NewVT, Lo); - Hi = DAG.getNode(ISD::BIT_CONVERT, NewVT, Hi); - } - break; + InOp, Ptr, NULL, 0); + InOp = DAG.getLoad(Op.getValueType(), St, Ptr, NULL, 0); } + // Split the vector and convert each of the pieces now. + SplitVectorOp(InOp, Lo, Hi); + Lo = DAG.getNode(ISD::BIT_CONVERT, NewVT, Lo); + Hi = DAG.getNode(ISD::BIT_CONVERT, NewVT, Hi); + break; } } // Remember in a map if the values will be reused later. bool isNew = SplitNodes.insert(std::make_pair(Op, std::make_pair(Lo, Hi))).second; - assert(isNew && "Value already expanded?!?"); + assert(isNew && "Value already split?!?"); } From djg at cray.com Thu Jun 28 19:09:30 2007 From: djg at cray.com (Dan Gohman) Date: Thu, 28 Jun 2007 19:09:30 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/ARM/illegal-vector-bitcast.ll Message-ID: <200706290009.l5T09UTj007441@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/ARM: illegal-vector-bitcast.ll added (r1.1) --- Log message: Fix an assertion failure in legalizing bitcast operators on targets where vectors are split down to single elements as part of legalization. --- Diffs of the changes: (+13 -0) illegal-vector-bitcast.ll | 13 +++++++++++++ 1 files changed, 13 insertions(+) Index: llvm/test/CodeGen/ARM/illegal-vector-bitcast.ll diff -c /dev/null llvm/test/CodeGen/ARM/illegal-vector-bitcast.ll:1.1 *** /dev/null Thu Jun 28 19:09:18 2007 --- llvm/test/CodeGen/ARM/illegal-vector-bitcast.ll Thu Jun 28 19:09:08 2007 *************** *** 0 **** --- 1,13 ---- + ; RUN: llvm-as < %s | llc -march=arm + + define void @foo(<8 x float>* %f, <8 x float>* %g, <4 x i64>* %y) + { + %h = load <8 x float>* %f + %i = mul <8 x float> %h, + %m = bitcast <8 x float> %i to <4 x i64> + %z = load <4 x i64>* %y + %n = mul <4 x i64> %z, %m + %p = bitcast <4 x i64> %n to <8 x float> + store <8 x float> %p, <8 x float>* %g + ret void + } From evan.cheng at apple.com Thu Jun 28 19:18:42 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 28 Jun 2007 19:18:42 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp Message-ID: <200706290018.l5T0IgAo007616@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ISelLowering.cpp updated: 1.416 -> 1.417 --- Log message: No vector fneg. --- Diffs of the changes: (+1 -0) X86ISelLowering.cpp | 1 + 1 files changed, 1 insertion(+) Index: llvm/lib/Target/X86/X86ISelLowering.cpp diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.416 llvm/lib/Target/X86/X86ISelLowering.cpp:1.417 --- llvm/lib/Target/X86/X86ISelLowering.cpp:1.416 Thu Jun 28 19:01:20 2007 +++ llvm/lib/Target/X86/X86ISelLowering.cpp Thu Jun 28 19:18:15 2007 @@ -314,6 +314,7 @@ setOperationAction(ISD::ADD , (MVT::ValueType)VT, Expand); setOperationAction(ISD::SUB , (MVT::ValueType)VT, Expand); setOperationAction(ISD::FADD, (MVT::ValueType)VT, Expand); + setOperationAction(ISD::FNEG, (MVT::ValueType)VT, Expand); setOperationAction(ISD::FSUB, (MVT::ValueType)VT, Expand); setOperationAction(ISD::MUL , (MVT::ValueType)VT, Expand); setOperationAction(ISD::FMUL, (MVT::ValueType)VT, Expand); From evan.cheng at apple.com Thu Jun 28 19:27:40 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 28 Jun 2007 19:27:40 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/X86/2007-06-28-X86-64-isel.ll vec_fneg.ll Message-ID: <200706290027.l5T0Reaj007783@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/X86: 2007-06-28-X86-64-isel.ll added (r1.1) vec_fneg.ll added (r1.1) --- Log message: New tests. --- Diffs of the changes: (+27 -0) 2007-06-28-X86-64-isel.ll | 16 ++++++++++++++++ vec_fneg.ll | 11 +++++++++++ 2 files changed, 27 insertions(+) Index: llvm/test/CodeGen/X86/2007-06-28-X86-64-isel.ll diff -c /dev/null llvm/test/CodeGen/X86/2007-06-28-X86-64-isel.ll:1.1 *** /dev/null Thu Jun 28 19:27:28 2007 --- llvm/test/CodeGen/X86/2007-06-28-X86-64-isel.ll Thu Jun 28 19:27:18 2007 *************** *** 0 **** --- 1,16 ---- + ; RUN: llvm-as < %s | | llc -march=x86-64 -mattr=+sse2 + + define void @test() { + %tmp1 = call <8 x i16> @llvm.x86.sse2.pmins.w( <8 x i16> zeroinitializer, <8 x i16> bitcast (<4 x i32> < i32 7, i32 7, i32 7, i32 7 > to <8 x i16>) ) + %tmp2 = bitcast <8 x i16> %tmp1 to <4 x i32> + br i1 false, label %bb1, label %bb2 + + bb2: + %tmp38007.i = extractelement <4 x i32> %tmp2, i32 3 + ret void + + bb1: + ret void + } + + declare <8 x i16> @llvm.x86.sse2.pmins.w(<8 x i16>, <8 x i16>) Index: llvm/test/CodeGen/X86/vec_fneg.ll diff -c /dev/null llvm/test/CodeGen/X86/vec_fneg.ll:1.1 *** /dev/null Thu Jun 28 19:27:40 2007 --- llvm/test/CodeGen/X86/vec_fneg.ll Thu Jun 28 19:27:18 2007 *************** *** 0 **** --- 1,11 ---- + ; RUN: llvm-as < %s | | llc -march=x86 -mattr=+sse2 + + define <4 x float> @t1(<4 x float> %Q) { + %tmp15 = sub <4 x float> < float -0.000000e+00, float -0.000000e+00, float -0.000000e+00, float -0.000000e+00 >, %Q + ret <4 x float> %tmp15 + } + + define <4 x float> @t2(<4 x float> %Q) { + %tmp15 = sub <4 x float> zeroinitializer, %Q + ret <4 x float> %tmp15 + } From resistor at mac.com Thu Jun 28 19:40:27 2007 From: resistor at mac.com (Owen Anderson) Date: Thu, 28 Jun 2007 19:40:27 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/GVNPRE.cpp Message-ID: <200706290040.l5T0eRo3008026@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: GVNPRE.cpp updated: 1.64 -> 1.65 --- Log message: Add a type field to expressions in preparation for performing GVNPRE on casts. --- Diffs of the changes: (+12 -0) GVNPRE.cpp | 12 ++++++++++++ 1 files changed, 12 insertions(+) Index: llvm/lib/Transforms/Scalar/GVNPRE.cpp diff -u llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.64 llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.65 --- llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.64 Thu Jun 28 18:51:21 2007 +++ llvm/lib/Transforms/Scalar/GVNPRE.cpp Thu Jun 28 19:40:05 2007 @@ -23,6 +23,7 @@ #include "llvm/Transforms/Scalar.h" #include "llvm/Instructions.h" #include "llvm/Function.h" +#include "llvm/DerivedTypes.h" #include "llvm/Analysis/Dominators.h" #include "llvm/ADT/BitVector.h" #include "llvm/ADT/DenseMap.h" @@ -62,6 +63,7 @@ SHUFFLE, SELECT }; ExpressionOpcode opcode; + const Type* type; uint32_t firstVN; uint32_t secondVN; uint32_t thirdVN; @@ -71,6 +73,10 @@ return true; else if (opcode > other.opcode) return false; + else if (type < other.type) + return true; + else if (type > other.type) + return false; else if (firstVN < other.firstVN) return true; else if (firstVN > other.firstVN) @@ -231,6 +237,7 @@ e.firstVN = lookup_or_add(BO->getOperand(0)); e.secondVN = lookup_or_add(BO->getOperand(1)); e.thirdVN = 0; + e.type = BO->getType(); e.opcode = getOpcode(BO); return e; @@ -242,6 +249,7 @@ e.firstVN = lookup_or_add(C->getOperand(0)); e.secondVN = lookup_or_add(C->getOperand(1)); e.thirdVN = 0; + e.type = C->getType(); e.opcode = getOpcode(C); return e; @@ -253,6 +261,7 @@ e.firstVN = lookup_or_add(S->getOperand(0)); e.secondVN = lookup_or_add(S->getOperand(1)); e.thirdVN = lookup_or_add(S->getOperand(2)); + e.type = S->getType(); e.opcode = Expression::SHUFFLE; return e; @@ -264,6 +273,7 @@ e.firstVN = lookup_or_add(E->getOperand(0)); e.secondVN = lookup_or_add(E->getOperand(1)); e.thirdVN = 0; + e.type = E->getType(); e.opcode = Expression::EXTRACT; return e; @@ -275,6 +285,7 @@ e.firstVN = lookup_or_add(I->getOperand(0)); e.secondVN = lookup_or_add(I->getOperand(1)); e.thirdVN = lookup_or_add(I->getOperand(2)); + e.type = I->getType(); e.opcode = Expression::INSERT; return e; @@ -286,6 +297,7 @@ e.firstVN = lookup_or_add(I->getCondition()); e.secondVN = lookup_or_add(I->getTrueValue()); e.thirdVN = lookup_or_add(I->getFalseValue()); + e.type = I->getType(); e.opcode = Expression::SELECT; return e; From resistor at mac.com Thu Jun 28 19:51:25 2007 From: resistor at mac.com (Owen Anderson) Date: Thu, 28 Jun 2007 19:51:25 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/GVNPRE.cpp Message-ID: <200706290051.l5T0pP2Z008252@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: GVNPRE.cpp updated: 1.65 -> 1.66 --- Log message: Add support for value numbering (but not actually optimizing) cast instructions. --- Diffs of the changes: (+65 -1) GVNPRE.cpp | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 65 insertions(+), 1 deletion(-) Index: llvm/lib/Transforms/Scalar/GVNPRE.cpp diff -u llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.65 llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.66 --- llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.65 Thu Jun 28 19:40:05 2007 +++ llvm/lib/Transforms/Scalar/GVNPRE.cpp Thu Jun 28 19:51:03 2007 @@ -60,7 +60,9 @@ FCMPOGT, FCMPOGE, FCMPOLT, FCMPOLE, FCMPONE, FCMPORD, FCMPUNO, FCMPUEQ, FCMPUGT, FCMPUGE, FCMPULT, FCMPULE, FCMPUNE, EXTRACT, INSERT, - SHUFFLE, SELECT }; + SHUFFLE, SELECT, TRUNC, ZEXT, SEXT, FPTOUI, + FPTOSI, UITOFP, SITOFP, FPTRUNC, FPEXT, + PTRTOINT, INTTOPTR, BITCAST}; ExpressionOpcode opcode; const Type* type; @@ -102,12 +104,14 @@ Expression::ExpressionOpcode getOpcode(BinaryOperator* BO); Expression::ExpressionOpcode getOpcode(CmpInst* C); + Expression::ExpressionOpcode getOpcode(CastInst* C); Expression create_expression(BinaryOperator* BO); Expression create_expression(CmpInst* C); Expression create_expression(ShuffleVectorInst* V); Expression create_expression(ExtractElementInst* C); Expression create_expression(InsertElementInst* V); Expression create_expression(SelectInst* V); + Expression create_expression(CastInst* C); public: ValueTable() { nextValueNumber = 1; } uint32_t lookup_or_add(Value* V); @@ -231,6 +235,41 @@ } } +ValueTable::Expression::ExpressionOpcode + ValueTable::getOpcode(CastInst* C) { + switch(C->getOpcode()) { + case Instruction::Trunc: + return Expression::TRUNC; + case Instruction::ZExt: + return Expression::ZEXT; + case Instruction::SExt: + return Expression::SEXT; + case Instruction::FPToUI: + return Expression::FPTOUI; + case Instruction::FPToSI: + return Expression::FPTOSI; + case Instruction::UIToFP: + return Expression::UITOFP; + case Instruction::SIToFP: + return Expression::SITOFP; + case Instruction::FPTrunc: + return Expression::FPTRUNC; + case Instruction::FPExt: + return Expression::FPEXT; + case Instruction::PtrToInt: + return Expression::PTRTOINT; + case Instruction::IntToPtr: + return Expression::INTTOPTR; + case Instruction::BitCast: + return Expression::BITCAST; + + // THIS SHOULD NEVER HAPPEN + default: + assert(0 && "Cast operator with unknown opcode?"); + return Expression::BITCAST; + } +} + ValueTable::Expression ValueTable::create_expression(BinaryOperator* BO) { Expression e; @@ -255,6 +294,18 @@ return e; } +ValueTable::Expression ValueTable::create_expression(CastInst* C) { + Expression e; + + e.firstVN = lookup_or_add(C->getOperand(0)); + e.secondVN = 0; + e.thirdVN = 0; + e.type = C->getType(); + e.opcode = getOpcode(C); + + return e; +} + ValueTable::Expression ValueTable::create_expression(ShuffleVectorInst* S) { Expression e; @@ -393,6 +444,19 @@ return nextValueNumber++; } + } else if (CastInst* U = dyn_cast(V)) { + Expression e = create_expression(U); + + std::map::iterator EI = expressionNumbering.find(e); + if (EI != expressionNumbering.end()) { + valueNumbering.insert(std::make_pair(V, EI->second)); + return EI->second; + } else { + expressionNumbering.insert(std::make_pair(e, nextValueNumber)); + valueNumbering.insert(std::make_pair(V, nextValueNumber)); + + return nextValueNumber++; + } } else { valueNumbering.insert(std::make_pair(V, nextValueNumber)); return nextValueNumber++; From rspencer at reidspencer.com Thu Jun 28 20:14:49 2007 From: rspencer at reidspencer.com (Reid Spencer) Date: Thu, 28 Jun 2007 18:14:49 -0700 Subject: [llvm-commits] CVS: llvm/configure Makefile.rules Makefile.config.in In-Reply-To: <200706281936.l5SJaUBX030150@zion.cs.uiuc.edu> References: <200706281936.l5SJaUBX030150@zion.cs.uiuc.edu> Message-ID: <1183079689.3143.54.camel@bashful.x10sys.com> Hi David, A couple comments ... On Thu, 2007-06-28 at 14:36 -0500, David Greene wrote: > > Changes in directory llvm: > > configure updated: 1.277 -> 1.278 > Makefile.rules updated: 1.435 -> 1.436 > Makefile.config.in updated: 1.76 -> 1.77 > --- > Log message: > > Add support for building with _GLIBCXX_DEBUG. New configure option > --enable-expensive-checks allows the developer to enable runtime > checking that can greatly increase compile time. Currently it only > turns on _GLIBCXX_DEBUG. Other expensive debugging checks added later > should be controlled by this configure option. > > This patch also updates llvm-config with a --cppflags option to inform > llvm-gcc how to build itself so that it is compatible with an llvm that > was built with _GLIBCXX_DEBUG. Sounds good. > > > --- > Diffs of the changes: (+66 -28) > > Makefile.config.in | 5 +++ > Makefile.rules | 10 ++++++ > configure | 79 ++++++++++++++++++++++++++++++++++------------------- > 3 files changed, 66 insertions(+), 28 deletions(-) > > > Index: llvm/configure Please don't commit generated files with non-generated files. > diff -u llvm/configure:1.277 llvm/configure:1.278 > --- llvm/configure:1.277 Thu May 17 13:11:03 2007 > +++ llvm/configure Thu Jun 28 14:36:07 2007 > @@ -830,6 +830,8 @@ > CVSBUILD > ENABLE_OPTIMIZED > DISABLE_ASSERTIONS > +ENABLE_EXPENSIVE_CHECKS > +EXPENSIVE_CHECKS > DEBUG_RUNTIME > JIT > TARGET_HAS_JIT > @@ -1525,6 +1527,8 @@ > --enable-FEATURE[=ARG] include FEATURE [ARG=yes] > --enable-optimized > --enable-assertions > + --enable-expensive-checks > + > --enable-debug-runtime > --enable-jit Enable Just In Time Compiling (default is YES) > --enable-doxygen Build doxygen documentation (default is NO) > @@ -4577,6 +4581,25 @@ > > fi > > +# Check whether --enable-expensive-checks was given. > +if test "${enable_expensive_checks+set}" = set; then > + enableval=$enable_expensive_checks; > +else > + enableval="no" > +fi > + > +if test ${enableval} = "yes" ; then > + ENABLE_EXPENSIVE_CHECKS=ENABLE_EXPENSIVE_CHECKS=1 > + > + EXPENSIVE_CHECKS=yes > + > +else > + ENABLE_EXPENSIVE_CHECKS= > + > + EXPENSIVE_CHECKS=no > + > +fi > + > # Check whether --enable-debug-runtime was given. > if test "${enable_debug_runtime+set}" = set; then > enableval=$enable_debug_runtime; > @@ -10343,7 +10366,7 @@ > lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 > lt_status=$lt_dlunknown > cat > conftest.$ac_ext < -#line 10346 "configure" > +#line 10369 "configure" > #include "confdefs.h" > > #if HAVE_DLFCN_H > @@ -12487,7 +12510,7 @@ > ;; > *-*-irix6*) > # Find out which ABI we are using. > - echo '#line 12490 "configure"' > conftest.$ac_ext > + echo '#line 12513 "configure"' > conftest.$ac_ext > if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 > (eval $ac_compile) 2>&5 > ac_status=$? > @@ -14205,11 +14228,11 @@ > -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ > -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ > -e 's:$: $lt_compiler_flag:'` > - (eval echo "\"\$as_me:14208: $lt_compile\"" >&5) > + (eval echo "\"\$as_me:14231: $lt_compile\"" >&5) > (eval "$lt_compile" 2>conftest.err) > ac_status=$? > cat conftest.err >&5 > - echo "$as_me:14212: \$? = $ac_status" >&5 > + echo "$as_me:14235: \$? = $ac_status" >&5 > if (exit $ac_status) && test -s "$ac_outfile"; then > # The compiler can only warn and ignore the option if not recognized > # So say no if there are warnings other than the usual output. > @@ -14473,11 +14496,11 @@ > -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ > -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ > -e 's:$: $lt_compiler_flag:'` > - (eval echo "\"\$as_me:14476: $lt_compile\"" >&5) > + (eval echo "\"\$as_me:14499: $lt_compile\"" >&5) > (eval "$lt_compile" 2>conftest.err) > ac_status=$? > cat conftest.err >&5 > - echo "$as_me:14480: \$? = $ac_status" >&5 > + echo "$as_me:14503: \$? = $ac_status" >&5 > if (exit $ac_status) && test -s "$ac_outfile"; then > # The compiler can only warn and ignore the option if not recognized > # So say no if there are warnings other than the usual output. > @@ -14577,11 +14600,11 @@ > -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ > -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ > -e 's:$: $lt_compiler_flag:'` > - (eval echo "\"\$as_me:14580: $lt_compile\"" >&5) > + (eval echo "\"\$as_me:14603: $lt_compile\"" >&5) > (eval "$lt_compile" 2>out/conftest.err) > ac_status=$? > cat out/conftest.err >&5 > - echo "$as_me:14584: \$? = $ac_status" >&5 > + echo "$as_me:14607: \$? = $ac_status" >&5 > if (exit $ac_status) && test -s out/conftest2.$ac_objext > then > # The compiler can only warn and ignore the option if not recognized > @@ -17029,7 +17052,7 @@ > lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 > lt_status=$lt_dlunknown > cat > conftest.$ac_ext < -#line 17032 "configure" > +#line 17055 "configure" > #include "confdefs.h" > > #if HAVE_DLFCN_H > @@ -17129,7 +17152,7 @@ > lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 > lt_status=$lt_dlunknown > cat > conftest.$ac_ext < -#line 17132 "configure" > +#line 17155 "configure" > #include "confdefs.h" > > #if HAVE_DLFCN_H > @@ -19497,11 +19520,11 @@ > -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ > -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ > -e 's:$: $lt_compiler_flag:'` > - (eval echo "\"\$as_me:19500: $lt_compile\"" >&5) > + (eval echo "\"\$as_me:19523: $lt_compile\"" >&5) > (eval "$lt_compile" 2>conftest.err) > ac_status=$? > cat conftest.err >&5 > - echo "$as_me:19504: \$? = $ac_status" >&5 > + echo "$as_me:19527: \$? = $ac_status" >&5 > if (exit $ac_status) && test -s "$ac_outfile"; then > # The compiler can only warn and ignore the option if not recognized > # So say no if there are warnings other than the usual output. > @@ -19601,11 +19624,11 @@ > -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ > -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ > -e 's:$: $lt_compiler_flag:'` > - (eval echo "\"\$as_me:19604: $lt_compile\"" >&5) > + (eval echo "\"\$as_me:19627: $lt_compile\"" >&5) > (eval "$lt_compile" 2>out/conftest.err) > ac_status=$? > cat out/conftest.err >&5 > - echo "$as_me:19608: \$? = $ac_status" >&5 > + echo "$as_me:19631: \$? = $ac_status" >&5 > if (exit $ac_status) && test -s out/conftest2.$ac_objext > then > # The compiler can only warn and ignore the option if not recognized > @@ -21171,11 +21194,11 @@ > -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ > -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ > -e 's:$: $lt_compiler_flag:'` > - (eval echo "\"\$as_me:21174: $lt_compile\"" >&5) > + (eval echo "\"\$as_me:21197: $lt_compile\"" >&5) > (eval "$lt_compile" 2>conftest.err) > ac_status=$? > cat conftest.err >&5 > - echo "$as_me:21178: \$? = $ac_status" >&5 > + echo "$as_me:21201: \$? = $ac_status" >&5 > if (exit $ac_status) && test -s "$ac_outfile"; then > # The compiler can only warn and ignore the option if not recognized > # So say no if there are warnings other than the usual output. > @@ -21275,11 +21298,11 @@ > -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ > -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ > -e 's:$: $lt_compiler_flag:'` > - (eval echo "\"\$as_me:21278: $lt_compile\"" >&5) > + (eval echo "\"\$as_me:21301: $lt_compile\"" >&5) > (eval "$lt_compile" 2>out/conftest.err) > ac_status=$? > cat out/conftest.err >&5 > - echo "$as_me:21282: \$? = $ac_status" >&5 > + echo "$as_me:21305: \$? = $ac_status" >&5 > if (exit $ac_status) && test -s out/conftest2.$ac_objext > then > # The compiler can only warn and ignore the option if not recognized > @@ -23510,11 +23533,11 @@ > -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ > -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ > -e 's:$: $lt_compiler_flag:'` > - (eval echo "\"\$as_me:23513: $lt_compile\"" >&5) > + (eval echo "\"\$as_me:23536: $lt_compile\"" >&5) > (eval "$lt_compile" 2>conftest.err) > ac_status=$? > cat conftest.err >&5 > - echo "$as_me:23517: \$? = $ac_status" >&5 > + echo "$as_me:23540: \$? = $ac_status" >&5 > if (exit $ac_status) && test -s "$ac_outfile"; then > # The compiler can only warn and ignore the option if not recognized > # So say no if there are warnings other than the usual output. > @@ -23778,11 +23801,11 @@ > -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ > -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ > -e 's:$: $lt_compiler_flag:'` > - (eval echo "\"\$as_me:23781: $lt_compile\"" >&5) > + (eval echo "\"\$as_me:23804: $lt_compile\"" >&5) > (eval "$lt_compile" 2>conftest.err) > ac_status=$? > cat conftest.err >&5 > - echo "$as_me:23785: \$? = $ac_status" >&5 > + echo "$as_me:23808: \$? = $ac_status" >&5 > if (exit $ac_status) && test -s "$ac_outfile"; then > # The compiler can only warn and ignore the option if not recognized > # So say no if there are warnings other than the usual output. > @@ -23882,11 +23905,11 @@ > -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ > -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ > -e 's:$: $lt_compiler_flag:'` > - (eval echo "\"\$as_me:23885: $lt_compile\"" >&5) > + (eval echo "\"\$as_me:23908: $lt_compile\"" >&5) > (eval "$lt_compile" 2>out/conftest.err) > ac_status=$? > cat out/conftest.err >&5 > - echo "$as_me:23889: \$? = $ac_status" >&5 > + echo "$as_me:23912: \$? = $ac_status" >&5 > if (exit $ac_status) && test -s out/conftest2.$ac_objext > then > # The compiler can only warn and ignore the option if not recognized > @@ -34342,6 +34365,8 @@ > CVSBUILD!$CVSBUILD$ac_delim > ENABLE_OPTIMIZED!$ENABLE_OPTIMIZED$ac_delim > DISABLE_ASSERTIONS!$DISABLE_ASSERTIONS$ac_delim > +ENABLE_EXPENSIVE_CHECKS!$ENABLE_EXPENSIVE_CHECKS$ac_delim > +EXPENSIVE_CHECKS!$EXPENSIVE_CHECKS$ac_delim > DEBUG_RUNTIME!$DEBUG_RUNTIME$ac_delim > JIT!$JIT$ac_delim > TARGET_HAS_JIT!$TARGET_HAS_JIT$ac_delim > @@ -34363,8 +34388,6 @@ > BISON!$BISON$ac_delim > NM!$NM$ac_delim > ifGNUmake!$ifGNUmake$ac_delim > -LN_S!$LN_S$ac_delim > -CMP!$CMP$ac_delim > _ACEOF > > if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then > @@ -34406,6 +34429,8 @@ > ac_delim='%!_!# ' > for ac_last_try in false false false false false :; do > cat >conf$$subs.sed <<_ACEOF > +LN_S!$LN_S$ac_delim > +CMP!$CMP$ac_delim > CP!$CP$ac_delim > DATE!$DATE$ac_delim > FIND!$FIND$ac_delim > @@ -34477,7 +34502,7 @@ > LTLIBOBJS!$LTLIBOBJS$ac_delim > _ACEOF > > - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 69; then > + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 71; then > break > elif $ac_last_try; then > { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 > > > Index: llvm/Makefile.rules > diff -u llvm/Makefile.rules:1.435 llvm/Makefile.rules:1.436 > --- llvm/Makefile.rules:1.435 Thu May 17 17:51:35 2007 > +++ llvm/Makefile.rules Thu Jun 28 14:36:08 2007 > @@ -260,6 +260,13 @@ > C.Flags += -D_DEBUG > endif > > +# If DISABLE_EXPENSIVE_CHECKS=1 is specified (make command line or configured), > +# then disable expensive checks by defining the appropriate preprocessor symbols. This comment doesn't jive with the code below. The comment talks about DISABLE_* while the code is for ENABLE_* .. please synchronize > +ifdef ENABLE_EXPENSIVE_CHECKS > + BuildMode := $(BuildMode)+Checks > + CXX.Flags += -D_GLIBCXX_DEBUG > +endif > + > ifeq ($(ENABLE_PIC),1) > CXX.Flags += -fPIC > C.Flags += -fPIC > @@ -267,7 +274,8 @@ > > CXX.Flags += $(CXXFLAGS) -Woverloaded-virtual > C.Flags += $(CFLAGS) > -CPP.BaseFlags += $(CPPFLAGS) > +CPP.Defines += $(CPPFLAGS) > +CPP.BaseFlags += $(CPP.Defines) You're introducing CPP.Defines but I don't see it used in this file. Is this for future use? > LD.Flags += $(LDFLAGS) > AR.Flags := cru > LibTool.Flags := --tag=CXX > > > Index: llvm/Makefile.config.in > diff -u llvm/Makefile.config.in:1.76 llvm/Makefile.config.in:1.77 > --- llvm/Makefile.config.in:1.76 Sat Apr 21 16:28:12 2007 > +++ llvm/Makefile.config.in Thu Jun 28 14:36:08 2007 > @@ -209,6 +209,11 @@ > #DISABLE_ASSERTIONS = 1 > @DISABLE_ASSERTIONS@ > > +# When ENABLE_EXPENSIVE_CHECKS is enabled, builds of all of the LLVM > +# code will include expensive checks, otherwise they are excluded. > +#ENABLE_EXPENSIVE_CHECKS = 0 > + at ENABLE_EXPENSIVE_CHECKS@ > + > # When DEBUG_RUNTIME is enabled, the runtime libraries will retain debug > # symbols. > #DEBUG_RUNTIME = 1 Looks good. Thanks, David. Reid. > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From evan.cheng at apple.com Thu Jun 28 20:25:29 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 28 Jun 2007 20:25:29 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp Message-ID: <200706290125.l5T1PTg3008798@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCISelDAGToDAG.cpp updated: 1.231 -> 1.232 --- Log message: Prevent PPC::BCC first operand, the PRED number, from being isel'd into a LI instruction. --- Diffs of the changes: (+4 -1) PPCISelDAGToDAG.cpp | 5 ++++- 1 files changed, 4 insertions(+), 1 deletion(-) Index: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp diff -u llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1.231 llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1.232 --- llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1.231 Fri Jun 22 09:59:07 2007 +++ llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp Thu Jun 28 20:25:06 2007 @@ -1080,7 +1080,10 @@ // Op #2 is the CR# // Op #3 is the Dest MBB AddToISelQueue(N->getOperand(4)); // Op #4 is the Flag. - SDOperand Ops[] = { N->getOperand(1), N->getOperand(2), N->getOperand(3), + // Prevent PPC::PRED_* from being selected into LI. + SDOperand Pred = + getI32Imm(cast(N->getOperand(1))->getValue()); + SDOperand Ops[] = { Pred, N->getOperand(2), N->getOperand(3), N->getOperand(0), N->getOperand(4) }; return CurDAG->SelectNodeTo(N, PPC::BCC, MVT::Other, Ops, 5); } From evan.cheng at apple.com Thu Jun 28 20:36:51 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 28 Jun 2007 20:36:51 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/PowerPC/2007-06-28-BCCISelBug.ll Message-ID: <200706290136.l5T1apZb009097@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/PowerPC: 2007-06-28-BCCISelBug.ll added (r1.1) --- Log message: New test. --- Diffs of the changes: (+85 -0) 2007-06-28-BCCISelBug.ll | 85 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 85 insertions(+) Index: llvm/test/CodeGen/PowerPC/2007-06-28-BCCISelBug.ll diff -c /dev/null llvm/test/CodeGen/PowerPC/2007-06-28-BCCISelBug.ll:1.1 *** /dev/null Thu Jun 28 20:36:43 2007 --- llvm/test/CodeGen/PowerPC/2007-06-28-BCCISelBug.ll Thu Jun 28 20:36:33 2007 *************** *** 0 **** --- 1,85 ---- + ; RUN: llvm-as < %s | llc -march=ppc32 + + %struct.XATest = type { float, i16, i8, i8 } + %struct.XArrayRange = type { i8, i8, i8, i8 } + %struct.XBlendMode = type { i16, i16, i16, i16, %struct.GIC4, i16, i16, i8, i8, i8, i8 } + %struct.XClearC = type { double, %struct.GIC4, %struct.GIC4, float, i32 } + %struct.XClipPlane = type { i32, [6 x %struct.GIC4] } + %struct.XCBuffer = type { i16, i16, [8 x i16] } + %struct.XCMatrix = type { [16 x float]*, %struct.XICSS } + %struct.XConvolution = type { %struct.GIC4, %struct.XICSS, i16, i16, float*, i32, i32 } + %struct.XDepthTest = type { i16, i16, i8, i8, i8, i8, double, double } + %struct.XFixedFunctionProgram = type { %struct.PPSToken* } + %struct.XFogMode = type { %struct.GIC4, float, float, float, float, float, i16, i16, i16, i8, i8 } + %struct.XFramebufferAttachment = type { i32, i32, i32, i32 } + %struct.XHintMode = type { i16, i16, i16, i16, i16, i16, i16, i16, i16, i16 } + %struct.XHistogram = type { %struct.XFramebufferAttachment*, i32, i16, i8, i8 } + %struct.XICSS = type { %struct.GTCoord2, %struct.GTCoord2, %struct.GTCoord2, %struct.GTCoord2 } + %struct.XISubset = type { %struct.XConvolution, %struct.XConvolution, %struct.XConvolution, %struct.XCMatrix, %struct.XMinmax, %struct.XHistogram, %struct.XICSS, %struct.XICSS, %struct.XICSS, %struct.XICSS, i32 } + %struct.XLight = type { %struct.GIC4, %struct.GIC4, %struct.GIC4, %struct.GIC4, %struct.XPointLineLimits, float, float, float, float, float, %struct.XPointLineLimits, float, float, float, float, float } + %struct.XLightModel = type { %struct.GIC4, [8 x %struct.XLight], [2 x %struct.XMaterial], i32, i16, i16, i16, i8, i8, i8, i8, i8, i8 } + %struct.XLightProduct = type { %struct.GIC4, %struct.GIC4, %struct.GIC4 } + %struct.XLineMode = type { float, i32, i16, i16, i8, i8, i8, i8 } + %struct.XLogicOp = type { i16, i8, i8 } + %struct.XMaskMode = type { i32, [3 x i32], i8, i8, i8, i8, i8, i8, i8, i8 } + %struct.XMaterial = type { %struct.GIC4, %struct.GIC4, %struct.GIC4, %struct.GIC4, float, float, float, float, [8 x %struct.XLightProduct], %struct.GIC4, [6 x i32], [2 x i32] } + %struct.XMinmax = type { %struct.XMinmaxTable*, i16, i8, i8 } + %struct.XMinmaxTable = type { %struct.GIC4, %struct.GIC4 } + %struct.XMipmaplevel = type { [4 x i32], [4 x i32], [4 x float], [4 x i32], i32, i32, float*, i8*, i16, i16, i16, i16, [2 x float] } + %struct.XMultisample = type { float, i8, i8, i8, i8, i8, i8, i8, i8 } + %struct.XPipelineProgramState = type { i8, i8, i8, i8, %struct.GIC4* } + %struct.XPMap = type { i32*, float*, float*, float*, float*, float*, float*, float*, float*, i32*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 } + %struct.XPMode = type { float, float, %struct.XPStore, %struct.XPTransfer, %struct.XPMap, %struct.XISubset, i32, i32 } + %struct.XPPack = type { i32, i32, i32, i32, i32, i32, i32, i32, i8, i8, i8, i8 } + %struct.XPStore = type { %struct.XPPack, %struct.XPPack } + %struct.XPTransfer = type { float, float, float, float, float, float, float, float, float, float, i32, i32, float, float, float, float, float, float, float, float, float, float, float, float } + %struct.XPointLineLimits = type { float, float, float } + %struct.XPointMode = type { float, float, float, float, %struct.XPointLineLimits, float, i8, i8, i8, i8, i16, i16, i32, i16, i16 } + %struct.XPGMode = type { [128 x i8], float, float, i16, i16, i16, i16, i8, i8, i8, i8, i8, i8, i8, i8 } + %struct.XRegisterCCs = type { i8, i8, i8, i8, i32, [2 x %struct.GIC4], [8 x %struct.XRegisterCCsPerStageState], %struct.XRegisterCCsFinalStageState } + %struct.XRegisterCCsFinalStageState = type { i8, i8, i8, i8, [7 x %struct.XRegisterCCsPerVariableState] } + %struct.XRegisterCCsPerPortionState = type { [4 x %struct.XRegisterCCsPerVariableState], i8, i8, i8, i8, i16, i16, i16, i16, i16, i16 } + %struct.XRegisterCCsPerStageState = type { [2 x %struct.XRegisterCCsPerPortionState], [2 x %struct.GIC4] } + %struct.XRegisterCCsPerVariableState = type { i16, i16, i16, i16 } + %struct.XScissorTest = type { %struct.XFramebufferAttachment, i8, i8, i8, i8 } + %struct.XState = type { i16, i16, i16, i16, i32, i32, [256 x %struct.GIC4], [128 x %struct.GIC4], %struct.XViewport, %struct.XXF, %struct.XLightModel, %struct.XATest, %struct.XBlendMode, %struct.XClearC, %struct.XCBuffer, %struct.XDepthTest, %struct.XArrayRange, %struct.XFogMode, %struct.XHintMode, %struct.XLineMode, %struct.XLogicOp, %struct.XMaskMode, %struct.XPMode, %struct.XPointMode, %struct.XPGMode, %struct.XScissorTest, i32, %struct.XStencilTest, [16 x %struct.XTMode], %struct.XArrayRange, [8 x %struct.XTCoordGen], %struct.XClipPlane, %struct.XMultisample, %struct.XRegisterCCs, %struct.XArrayRange, %struct.XArrayRange, [3 x %struct.XPipelineProgramState], %struct.XXFFeedback, i32*, %struct.XFixedFunctionProgram, [3 x i32] } + %struct.XStencilTest = type { [3 x { i32, i32, i16, i16, i16, i16 }], i32, [4 x i8] } + %struct.XTCoordGen = type { { i16, i16, %struct.GIC4, %struct.GIC4 }, { i16, i16, %struct.GIC4, %struct.GIC4 }, { i16, i16, %struct.GIC4, %struct.GIC4 }, { i16, i16, %struct.GIC4, %struct.GIC4 }, i8, i8, i8, i8 } + %struct.XTGeomState = type { i16, i16, i16, i16, i16, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, [6 x i16], [6 x i16] } + %struct.XTLevel = type { i32, i32, i16, i16, i16, i8, i8, i16, i16, i16, i16, i8* } + %struct.XTMode = type { %struct.GIC4, i32, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, float, float, float, i16, i16, i16, i16, i16, i16, [4 x i16], i8, i8, i8, i8, [3 x float], [4 x float], float, float } + %struct.XTParamState = type { i16, i16, i16, i16, i16, i16, %struct.GIC4, float, float, float, float, i16, i16, i16, i16, float, i16, i8, i8, i32, i8* } + %struct.XTRec = type { %struct.XTState*, float, float, float, float, %struct.XMipmaplevel*, %struct.XMipmaplevel*, i32, i32, i32, i32, i32, i32, i32, [2 x %struct.PPSToken] } + %struct.XTState = type { i16, i8, i8, i16, i16, float, i32, %struct.GISWRSurface*, %struct.XTParamState, %struct.XTGeomState, %struct.XTLevel, [6 x [15 x %struct.XTLevel]] } + %struct.XXF = type { [24 x [16 x float]], [24 x [16 x float]], [16 x float], float, float, float, float, float, i8, i8, i8, i8, i32, i32, i32, i16, i16, i8, i8, i8, i8, i32 } + %struct.XXFFeedback = type { i8, i8, i8, i8, [16 x i32], [16 x i32] } + %struct.XViewport = type { float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, double, double, i32, i32, i32, i32, float, float, float, float } + %struct.GIC4 = type { float, float, float, float } + %struct.GISWRSurface = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8*, i8*, i8*, [4 x i8*], i32 } + %struct.GTCoord2 = type { float, float } + %struct.GVMFPContext = type { float, i32, i32, i32, float, [3 x float] } + %struct.GVMFPStack = type { [8 x i8*], i8*, i8*, i32, i32, { <4 x float> }, { <4 x float> }, <4 x i32> } + %struct.GVMFGAttrib = type { <4 x float>, <4 x float>, <4 x float>, <4 x float>, <4 x float>, [8 x <4 x float>] } + %struct.GVMTs = type { [16 x %struct.XTRec*] } + %struct.PPSToken = type { { i16, i16, i32 } } + %struct._GVMConstants = type { <4 x i32>, <4 x i32>, <4 x float>, <4 x float>, <4 x float>, <4 x float>, <4 x float>, <4 x float>, <4 x float>, <4 x float>, <4 x float>, <4 x float>, float, float, float, float, float, float, float, float, float, float, float, float, [256 x float], [528 x i8] } + + declare <4 x i32> @llvm.ppc.altivec.lvewx(i8*) + + declare i32 @llvm.ppc.altivec.vcmpequw.p(i32, <4 x i32>, <4 x i32>) + + define void @test(%struct.XState* %gldst, <4 x float>* %prgrm, <4 x float>** %buffs, %struct._GVMConstants* %cnstn, %struct.PPSToken* %pstrm, %struct.GVMFPContext* %vmctx, %struct.GVMTs* %txtrs, %struct.GVMFPStack* %fpstk, %struct.GVMFGAttrib* %start, %struct.GVMFGAttrib* %deriv, i32 %fragx, i32 %fragy) { + bb58.i: + %tmp3405.i = getelementptr %struct.XTRec* null, i32 0, i32 1 ; [#uses=1] + %tmp34053406.i = bitcast float* %tmp3405.i to i8* ; [#uses=1] + %tmp3407.i = call <4 x i32> @llvm.ppc.altivec.lvewx( i8* %tmp34053406.i ) ; <<4 x i32>> [#uses=0] + %tmp4146.i = call i32 @llvm.ppc.altivec.vcmpequw.p( i32 3, <4 x i32> zeroinitializer, <4 x i32> zeroinitializer ) ; [#uses=1] + %tmp4147.i = icmp eq i32 %tmp4146.i, 0 ; [#uses=1] + br i1 %tmp4147.i, label %bb8799.i, label %bb4150.i + + bb4150.i: ; preds = %bb58.i + br label %bb8799.i + + bb8799.i: ; preds = %bb4150.i, %bb58.i + ret void + } From dpatel at apple.com Thu Jun 28 20:40:15 2007 From: dpatel at apple.com (Devang Patel) Date: Thu, 28 Jun 2007 20:40:15 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp Message-ID: <200706290140.l5T1eFnJ009170@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.73 -> 1.74 --- Log message: Do not filter loop if candidate branch is in loop header. --- Diffs of the changes: (+0 -2) LoopUnswitch.cpp | 2 -- 1 files changed, 2 deletions(-) Index: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp diff -u llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:1.73 llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:1.74 --- llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:1.73 Wed Jun 27 21:05:46 2007 +++ llvm/lib/Transforms/Scalar/LoopUnswitch.cpp Thu Jun 28 20:39:53 2007 @@ -166,8 +166,6 @@ // loop. for (Loop::block_iterator I = L->block_begin(), E = L->block_end(); I != E; ++I) { - if (*I == L->getHeader()) - continue; TerminatorInst *TI = (*I)->getTerminator(); if (BranchInst *BI = dyn_cast(TI)) { // If this isn't branching on an invariant condition, we can't unswitch From greened at obbligato.org Thu Jun 28 21:43:24 2007 From: greened at obbligato.org (David Greene) Date: Thu, 28 Jun 2007 21:43:24 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineBasicBlock.h Message-ID: <200706290243.l5T2hOT9010207@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: MachineBasicBlock.h updated: 1.66 -> 1.67 --- Log message: Fix misue of iterator pointing to erased object. Uncovered by _GLIBCXX_DEBUG. --- Diffs of the changes: (+2 -2) MachineBasicBlock.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/include/llvm/CodeGen/MachineBasicBlock.h diff -u llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.66 llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.67 --- llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.66 Mon Jun 18 17:43:58 2007 +++ llvm/include/llvm/CodeGen/MachineBasicBlock.h Thu Jun 28 21:43:02 2007 @@ -211,9 +211,9 @@ /// removeSuccessor - Remove specified successor from the successors list of /// this MachineBasicBlock. The Predecessors list of succ is automatically - /// updated. + /// updated. Return the iterator to the element after the one removed. /// - void removeSuccessor(succ_iterator I); + succ_iterator removeSuccessor(succ_iterator I); /// isSuccessor - Return true if the specified MBB is a successor of this /// block. From greened at obbligato.org Thu Jun 28 21:43:24 2007 From: greened at obbligato.org (David Greene) Date: Thu, 28 Jun 2007 21:43:24 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/MachineBasicBlock.cpp Message-ID: <200706290243.l5T2hOxf010212@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: MachineBasicBlock.cpp updated: 1.47 -> 1.48 --- Log message: Fix misue of iterator pointing to erased object. Uncovered by _GLIBCXX_DEBUG. --- Diffs of the changes: (+3 -3) MachineBasicBlock.cpp | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/lib/CodeGen/MachineBasicBlock.cpp diff -u llvm/lib/CodeGen/MachineBasicBlock.cpp:1.47 llvm/lib/CodeGen/MachineBasicBlock.cpp:1.48 --- llvm/lib/CodeGen/MachineBasicBlock.cpp:1.47 Mon Jun 18 17:43:31 2007 +++ llvm/lib/CodeGen/MachineBasicBlock.cpp Thu Jun 28 21:43:02 2007 @@ -176,10 +176,10 @@ Successors.erase(I); } -void MachineBasicBlock::removeSuccessor(succ_iterator I) { +MachineBasicBlock::succ_iterator MachineBasicBlock::removeSuccessor(succ_iterator I) { assert(I != Successors.end() && "Not a current successor!"); (*I)->removePredecessor(this); - Successors.erase(I); + return(Successors.erase(I)); } void MachineBasicBlock::addPredecessor(MachineBasicBlock *pred) { @@ -273,7 +273,7 @@ ++SI; } else { // Otherwise, this is a superfluous edge, remove it. - removeSuccessor(SI); + SI = removeSuccessor(SI); MadeChange = true; } } From greened at obbligato.org Thu Jun 28 21:45:46 2007 From: greened at obbligato.org (David Greene) Date: Thu, 28 Jun 2007 21:45:46 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/BranchFolding.cpp Message-ID: <200706290245.l5T2jkdS010257@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: BranchFolding.cpp updated: 1.68 -> 1.69 --- Log message: Fix misue of iterator pointing to erased object. Uncovered by _GLIBCXX_DEBUG. --- Diffs of the changes: (+5 -4) BranchFolding.cpp | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) Index: llvm/lib/CodeGen/BranchFolding.cpp diff -u llvm/lib/CodeGen/BranchFolding.cpp:1.68 llvm/lib/CodeGen/BranchFolding.cpp:1.69 --- llvm/lib/CodeGen/BranchFolding.cpp:1.68 Mon Jun 18 17:43:31 2007 +++ llvm/lib/CodeGen/BranchFolding.cpp Thu Jun 28 21:45:24 2007 @@ -978,17 +978,18 @@ } // Iterate through all the predecessors, revectoring each in-turn. - MachineBasicBlock::pred_iterator PI = MBB->pred_begin(); + size_t PI = 0; bool DidChange = false; bool HasBranchToSelf = false; - while (PI != MBB->pred_end()) { - if (*PI == MBB) { + while(PI != MBB->pred_size()) { + MachineBasicBlock *PMBB = *(MBB->pred_begin() + PI); + if (PMBB == MBB) { // If this block has an uncond branch to itself, leave it. ++PI; HasBranchToSelf = true; } else { DidChange = true; - (*PI)->ReplaceUsesOfBlockWith(MBB, CurTBB); + PMBB->ReplaceUsesOfBlockWith(MBB, CurTBB); } } From greened at obbligato.org Thu Jun 28 21:48:32 2007 From: greened at obbligato.org (David Greene) Date: Thu, 28 Jun 2007 21:48:32 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp Message-ID: <200706290248.l5T2mWi4010312@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: ScheduleDAGRRList.cpp updated: 1.31 -> 1.32 --- Log message: Remove the "special tie breaker" because it resulted in inconsistent ordering and thus violated the strict weak ordering requirement of priority_queue. Uncovered by _GLIBCXX_DEBUG. --- Diffs of the changes: (+12 -10) ScheduleDAGRRList.cpp | 22 ++++++++++++---------- 1 files changed, 12 insertions(+), 10 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp diff -u llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:1.31 llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:1.32 --- llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:1.31 Thu Jun 21 20:35:51 2007 +++ llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp Thu Jun 28 21:48:09 2007 @@ -618,16 +618,18 @@ bool LIsTarget = left->Node->isTargetOpcode(); bool RIsTarget = right->Node->isTargetOpcode(); - // Special tie breaker: if two nodes share a operand, the one that use it - // as a def&use operand is preferred. - if (LIsTarget && RIsTarget) { - if (left->isTwoAddress && !right->isTwoAddress) - if (SPQ->isDUOperand(left, right)) - return false; - if (!left->isTwoAddress && right->isTwoAddress) - if (SPQ->isDUOperand(right, left)) - return true; - } + // Cray: There used to be a special tie breaker here that looked for + // two-address instructions and preferred the instruction with a + // def&use operand. The special case triggered diagnostics when + // _GLIBCXX_DEBUG was enabled because it broke the strict weak + // ordering that priority_queue requires. It didn't help much anyway + // because AddPseudoTwoAddrDeps already covers many of the cases + // where it would have applied. In addition, it's counter-intuitive + // that a tie breaker would be the first thing attempted. There's a + // "real" tie breaker below that is the operation of last resort. + // The fact that the "special tie breaker" would trigger when there + // wasn't otherwise a tie is what broke the strict weak ordering + // constraint. unsigned LPriority = SPQ->getNodePriority(left); unsigned RPriority = SPQ->getNodePriority(right); From greened at obbligato.org Thu Jun 28 21:49:34 2007 From: greened at obbligato.org (David Greene) Date: Thu, 28 Jun 2007 21:49:34 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Message-ID: <200706290249.l5T2nYZL010348@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAGISel.cpp updated: 1.472 -> 1.473 --- Log message: Fix reference to cached end iterator invalidated by an erase operation. Uncovered by _GLIBCXX_DEBUG. --- Diffs of the changes: (+3 -1) SelectionDAGISel.cpp | 4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.472 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.473 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.472 Thu Jun 28 18:29:44 2007 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Thu Jun 28 21:49:11 2007 @@ -1700,7 +1700,9 @@ // Merge case into clusters if (Cases.size()>=2) - for (CaseItr I=Cases.begin(), J=++(Cases.begin()), E=Cases.end(); J!=E; ) { + // Cray [dag]: Must recompute end() each iteration because it may + // be invalidated by erase if we hold on to it + for (CaseItr I=Cases.begin(), J=++(Cases.begin()); J!=Cases.end(); ) { int64_t nextValue = cast(J->Low)->getSExtValue(); int64_t currentValue = cast(I->High)->getSExtValue(); MachineBasicBlock* nextBB = J->BB; From nicholas at mxc.ca Thu Jun 28 21:51:08 2007 From: nicholas at mxc.ca (Nick Lewycky) Date: Thu, 28 Jun 2007 22:51:08 -0400 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp In-Reply-To: <200706290249.l5T2nYZL010348@zion.cs.uiuc.edu> References: <200706290249.l5T2nYZL010348@zion.cs.uiuc.edu> Message-ID: <4684739C.1080904@mxc.ca> David Greene wrote: > + // Cray [dag]: Must recompute end() each iteration because it may Please don't mark the comments as being from Cray. Just write the comment as a standard explanation. Nick From greened at obbligato.org Thu Jun 28 21:53:39 2007 From: greened at obbligato.org (David Greene) Date: Thu, 28 Jun 2007 21:53:39 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Utils/LoopSimplify.cpp Message-ID: <200706290253.l5T2rdEB010426@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Utils: LoopSimplify.cpp updated: 1.105 -> 1.106 --- Log message: Fix reference to iterator invalidated by an erase operation. Uncovered by _GLIBCXX_DEBUG. --- Diffs of the changes: (+4 -3) LoopSimplify.cpp | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) Index: llvm/lib/Transforms/Utils/LoopSimplify.cpp diff -u llvm/lib/Transforms/Utils/LoopSimplify.cpp:1.105 llvm/lib/Transforms/Utils/LoopSimplify.cpp:1.106 --- llvm/lib/Transforms/Utils/LoopSimplify.cpp:1.105 Thu Jun 21 12:23:45 2007 +++ llvm/lib/Transforms/Utils/LoopSimplify.cpp Thu Jun 28 21:53:16 2007 @@ -564,11 +564,12 @@ // Scan all of the loop children of L, moving them to OuterLoop if they are // not part of the inner loop. - for (Loop::iterator I = L->begin(); I != L->end(); ) - if (BlocksInL.count((*I)->getHeader())) + const std::vector &SubLoops = L->getSubLoops(); + for (size_t I = 0; I != SubLoops.size(); ) + if (BlocksInL.count(SubLoops[I]->getHeader())) ++I; // Loop remains in L else - NewOuter->addChildLoop(L->removeChildLoop(I)); + NewOuter->addChildLoop(L->removeChildLoop(SubLoops.begin() + I)); // Now that we know which blocks are in L and which need to be moved to // OuterLoop, move any blocks that need it. From reid at x10sys.com Thu Jun 28 22:13:17 2007 From: reid at x10sys.com (Reid Spencer) Date: Thu, 28 Jun 2007 22:13:17 -0500 Subject: [llvm-commits] CVS: llvm/utils/NewNightlyTest.pl Message-ID: <200706290313.l5T3DHcx014119@zion.cs.uiuc.edu> Changes in directory llvm/utils: NewNightlyTest.pl updated: 1.74 -> 1.75 --- Log message: Fix problems with the checkout and cd directories for SVN checkout. --- Diffs of the changes: (+4 -4) NewNightlyTest.pl | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) Index: llvm/utils/NewNightlyTest.pl diff -u llvm/utils/NewNightlyTest.pl:1.74 llvm/utils/NewNightlyTest.pl:1.75 --- llvm/utils/NewNightlyTest.pl:1.74 Tue Jun 26 12:08:16 2007 +++ llvm/utils/NewNightlyTest.pl Thu Jun 28 22:12:42 2007 @@ -520,10 +520,10 @@ if ($USESVN) { my $SVNCMD = "$NICE svn co $SVNURL"; if ($VERBOSE) { - print "( time -p $SVNCMD/llvm/trunk llvm; cd llvm/trunk/projects ; " . - "$SVNCMD/llvm-test/trunk llvm-test ) > $COLog 2>&1\n"; - system "( time -p $SVNCMD/llvm/trunk llvm; cd llvm/trunk/projects ; " . - "$SVNCMD/llvm-test/trunk llvm-test ) > $COLog 2>&1\n"; + print "( time -p $SVNCMD/llvm/trunk llvm; cd llvm/projects ; " . + "$SVNCMD/test-suite/trunk llvm-test ) > $COLog 2>&1\n"; + system "( time -p $SVNCMD/llvm/trunk llvm; cd llvm/projects ; " . + "$SVNCMD/test-suite/trunk llvm-test ) > $COLog 2>&1\n"; } } else { my $CVSOPT = ""; From clattner at apple.com Thu Jun 28 22:16:16 2007 From: clattner at apple.com (Chris Lattner) Date: Thu, 28 Jun 2007 20:16:16 -0700 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp In-Reply-To: <200706290018.l5T0IgAo007616@zion.cs.uiuc.edu> References: <200706290018.l5T0IgAo007616@zion.cs.uiuc.edu> Message-ID: Awesome, thanks Evan. As an improvement, can't vector fneg be implemented with a xor of a constant vector? -Chris On Jun 28, 2007, at 5:18 PM, Evan Cheng wrote: > > > Changes in directory llvm/lib/Target/X86: > > X86ISelLowering.cpp updated: 1.416 -> 1.417 > --- > Log message: > > No vector fneg. > > --- > Diffs of the changes: (+1 -0) > > X86ISelLowering.cpp | 1 + > 1 files changed, 1 insertion(+) > > > Index: llvm/lib/Target/X86/X86ISelLowering.cpp > diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.416 llvm/lib/ > Target/X86/X86ISelLowering.cpp:1.417 > --- llvm/lib/Target/X86/X86ISelLowering.cpp:1.416 Thu Jun 28 > 19:01:20 2007 > +++ llvm/lib/Target/X86/X86ISelLowering.cpp Thu Jun 28 19:18:15 2007 > @@ -314,6 +314,7 @@ > setOperationAction(ISD::ADD , (MVT::ValueType)VT, Expand); > setOperationAction(ISD::SUB , (MVT::ValueType)VT, Expand); > setOperationAction(ISD::FADD, (MVT::ValueType)VT, Expand); > + setOperationAction(ISD::FNEG, (MVT::ValueType)VT, Expand); > setOperationAction(ISD::FSUB, (MVT::ValueType)VT, Expand); > setOperationAction(ISD::MUL , (MVT::ValueType)VT, Expand); > setOperationAction(ISD::FMUL, (MVT::ValueType)VT, Expand); > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From greened at obbligato.org Thu Jun 28 22:32:15 2007 From: greened at obbligato.org (David A. Greene) Date: Thu, 28 Jun 2007 22:32:15 -0500 Subject: [llvm-commits] =?iso-8859-1?q?CVS=3A_llvm/configure_Makefile=2Eru?= =?iso-8859-1?q?les=09Makefile=2Econfig=2Ein?= In-Reply-To: <1183079689.3143.54.camel@bashful.x10sys.com> References: <200706281936.l5SJaUBX030150@zion.cs.uiuc.edu> <1183079689.3143.54.camel@bashful.x10sys.com> Message-ID: <200706282232.16804.greened@obbligato.org> On Thursday 28 June 2007 20:14, Reid Spencer wrote: > > Index: llvm/configure > > Please don't commit generated files with non-generated files. Oops, sorry about that. > > +# If DISABLE_EXPENSIVE_CHECKS=1 is specified (make command line or > > configured), +# then disable expensive checks by defining the appropriate > > preprocessor symbols. > > This comment doesn't jive with the code below. The comment talks about > DISABLE_* while the code is for ENABLE_* .. please synchronize I noticed that just before I had to leave for a meeting. I'll get a fix in tonight. > > CXX.Flags += $(CXXFLAGS) -Woverloaded-virtual > > C.Flags += $(CFLAGS) > > -CPP.BaseFlags += $(CPPFLAGS) > > +CPP.Defines += $(CPPFLAGS) > > +CPP.BaseFlags += $(CPP.Defines) > > You're introducing CPP.Defines but I don't see it used in this file. Is > this for future use? Ah, I think that's an artifact of something I was going to do for llvm-config but decided against. I'll clean it up. Thanks for the feedback. -Dave From greened at obbligato.org Thu Jun 28 22:35:19 2007 From: greened at obbligato.org (David A. Greene) Date: Thu, 28 Jun 2007 22:35:19 -0500 Subject: [llvm-commits] =?iso-8859-1?q?CVS=3A_llvm/configure_Makefile=2Eru?= =?iso-8859-1?q?les=09Makefile=2Econfig=2Ein?= In-Reply-To: <200706282232.16804.greened@obbligato.org> References: <200706281936.l5SJaUBX030150@zion.cs.uiuc.edu> <1183079689.3143.54.camel@bashful.x10sys.com> <200706282232.16804.greened@obbligato.org> Message-ID: <200706282235.19245.greened@obbligato.org> On Thursday 28 June 2007 22:32, David A. Greene wrote: > > You're introducing CPP.Defines but I don't see it used in this file. Is > > this for future use? > > Ah, I think that's an artifact of something I was going to do for > llvm-config but decided against. I'll clean it up. Scratch that. It IS used by the llvm-config Makefile: # Combine preprocessor flags (except for -I) and CXX flags. SUB_CPPFLAGS = ${CPP.Defines} SUB_CFLAGS = ${CPP.BaseFlags} ${C.Flags} SUB_CXXFLAGS = ${CPP.BaseFlags} ${CXX.Flags} I need that for --cppflags support. -Dave From greened at obbligato.org Thu Jun 28 22:37:02 2007 From: greened at obbligato.org (David Greene) Date: Thu, 28 Jun 2007 22:37:02 -0500 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200706290337.l5T3b2VR008634@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.436 -> 1.437 --- Log message: Clean up comments to be consistent with code. --- Diffs of the changes: (+3 -2) Makefile.rules | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.436 llvm/Makefile.rules:1.437 --- llvm/Makefile.rules:1.436 Thu Jun 28 14:36:08 2007 +++ llvm/Makefile.rules Thu Jun 28 22:36:21 2007 @@ -260,8 +260,9 @@ C.Flags += -D_DEBUG endif -# If DISABLE_EXPENSIVE_CHECKS=1 is specified (make command line or configured), -# then disable expensive checks by defining the appropriate preprocessor symbols. +# If ENABLE_EXPENSIVE_CHECKS=1 is specified (make command line or +# configured), then enable expensive checks by defining the +# appropriate preprocessor symbols. ifdef ENABLE_EXPENSIVE_CHECKS BuildMode := $(BuildMode)+Checks CXX.Flags += -D_GLIBCXX_DEBUG From greened at obbligato.org Thu Jun 28 22:37:29 2007 From: greened at obbligato.org (David A. Greene) Date: Thu, 28 Jun 2007 22:37:29 -0500 Subject: [llvm-commits] =?iso-8859-1?q?CVS=3A=09llvm/lib/CodeGen/Selection?= =?iso-8859-1?q?DAG/SelectionDAGISel=2Ecpp?= In-Reply-To: <4684739C.1080904@mxc.ca> References: <200706290249.l5T2nYZL010348@zion.cs.uiuc.edu> <4684739C.1080904@mxc.ca> Message-ID: <200706282237.29311.greened@obbligato.org> On Thursday 28 June 2007 21:51, Nick Lewycky wrote: > David Greene wrote: > > + // Cray [dag]: Must recompute end() each iteration because it may > > Please don't mark the comments as being from Cray. Just write the > comment as a standard explanation. Ok, will fix. Just wanted to take responsibility for screw-ups. :) -Dave From greened at obbligato.org Thu Jun 28 22:42:56 2007 From: greened at obbligato.org (David Greene) Date: Thu, 28 Jun 2007 22:42:56 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp ScheduleDAGRRList.cpp Message-ID: <200706290342.l5T3gups021825@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAGISel.cpp updated: 1.473 -> 1.474 ScheduleDAGRRList.cpp updated: 1.32 -> 1.33 --- Log message: Remove unnecessary attributions in comments. --- Diffs of the changes: (+3 -3) ScheduleDAGRRList.cpp | 2 +- SelectionDAGISel.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.473 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.474 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.473 Thu Jun 28 21:49:11 2007 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Thu Jun 28 22:42:22 2007 @@ -1700,8 +1700,8 @@ // Merge case into clusters if (Cases.size()>=2) - // Cray [dag]: Must recompute end() each iteration because it may - // be invalidated by erase if we hold on to it + // Must recompute end() each iteration because it may be + // invalidated by erase if we hold on to it for (CaseItr I=Cases.begin(), J=++(Cases.begin()); J!=Cases.end(); ) { int64_t nextValue = cast(J->Low)->getSExtValue(); int64_t currentValue = cast(I->High)->getSExtValue(); Index: llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp diff -u llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:1.32 llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:1.33 --- llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:1.32 Thu Jun 28 21:48:09 2007 +++ llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp Thu Jun 28 22:42:23 2007 @@ -618,7 +618,7 @@ bool LIsTarget = left->Node->isTargetOpcode(); bool RIsTarget = right->Node->isTargetOpcode(); - // Cray: There used to be a special tie breaker here that looked for + // There used to be a special tie breaker here that looked for // two-address instructions and preferred the instruction with a // def&use operand. The special case triggered diagnostics when // _GLIBCXX_DEBUG was enabled because it broke the strict weak From rspencer at reidspencer.com Thu Jun 28 22:46:46 2007 From: rspencer at reidspencer.com (Reid Spencer) Date: Thu, 28 Jun 2007 20:46:46 -0700 Subject: [llvm-commits] CVS: llvm/configure Makefile.rules Makefile.config.in In-Reply-To: <200706282235.19245.greened@obbligato.org> References: <200706281936.l5SJaUBX030150@zion.cs.uiuc.edu> <1183079689.3143.54.camel@bashful.x10sys.com> <200706282232.16804.greened@obbligato.org> <200706282235.19245.greened@obbligato.org> Message-ID: <1183088806.3143.71.camel@bashful.x10sys.com> On Thu, 2007-06-28 at 22:35 -0500, David A. Greene wrote: > On Thursday 28 June 2007 22:32, David A. Greene wrote: > > > > You're introducing CPP.Defines but I don't see it used in this file. Is > > > this for future use? > > > > Ah, I think that's an artifact of something I was going to do for > > llvm-config but decided against. I'll clean it up. > > Scratch that. It IS used by the llvm-config Makefile: Ah, okay. I missed that connection. Reid. > > # Combine preprocessor flags (except for -I) and CXX flags. > SUB_CPPFLAGS = ${CPP.Defines} > SUB_CFLAGS = ${CPP.BaseFlags} ${C.Flags} > SUB_CXXFLAGS = ${CPP.BaseFlags} ${CXX.Flags} > > I need that for --cppflags support. > > -Dave > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From baldrick at free.fr Fri Jun 29 03:10:23 2007 From: baldrick at free.fr (Duncan Sands) Date: Fri, 29 Jun 2007 10:10:23 +0200 Subject: [llvm-commits] =?iso-8859-1?q?CVS=3A=09llvm/lib/CodeGen/Selection?= =?iso-8859-1?q?DAG/DAGCombiner=2Ecpp?= In-Reply-To: References: <20070627205029.GW5693@village.us.cray.com> Message-ID: <200706291010.23781.baldrick@free.fr> Hi, > >>> It seems like folding undef/X to undef isn't safe either though, here is my understanding of how to fold undef. I hope it clarifies this confusing area. Of course, I could be confused myself but I hope not :) (1) When is it OK to fold "y=foo(undef)" to "y=undef"? I claim that it is OK if and only if foo is surjective, i.e. if for each possible value for y there exists a value for x such that y=foo(x). "Surjective" is sometimes called "onto". Before I explain why I think this, an example: y=(undef == z) The possible values of y are 0 and 1 because the result of == is an i1. Surjectivity means: can I get (undef==z) to produce each of 0 and 1 by plugging in different values for undef? Obviously I can, so in this case I can fold to "y=undef". OK, now let me justify my claim. If foo is surjective then every possible value of y can be obtained by varying the value of undef put into foo(undef) so clearly putting y=undef is OK. More interesting is why if f is *not* surjective then it is wrong to fold to y=undef: if f is not surjective then by definition there is some y0 which cannot be obtained as foo(x) no matter what x you try. Consider the following code: y = foo(undef) z = (y == y0) The value of z is deterministic: it is always 0 because it is impossible to have foo(anything)==y0. But if we fold to y=undef then this becomes z = (undef == y0) which is (correctly) folded to z=undef. Conclusion: if foo is not surjective then folding "y=foo(undef)" to "y=undef" can result in wrong future deductions, in this case, z=undef rather than z=0. Example: y = undef udiv 2. Here foo(x)=x udiv 2 is not surjective so it is wrong to fold to y=undef, as observed by Dan. Example: y = undef + 2. Here, thanks to circular arithmetic, foo(x)=x+2 is surjective so we can fold to y=undef. (2) What to do when foo is not surjective? Choose some value for undef and fold to "y=foo(value_chosen)". In general foo will involve some other variables, so the trick is to find a constant value for y that is always obtainable no matter what those other variables are (while it is logically correct to replace y with a function of those other variables, which is what foo(0) will give in general for example, it is more efficient to use a constant value if possible). Example: folding "y=undef udiv x". This could be folded to 0 or to 1, since 0 is what you get by substituting undef=0, and 1 is what you get by substituting undef=x. (If x=0 then in both cases you get 0/0 which is, I hear, undefined so you can choose it to be 0 or 1 as you like). Of course you could also fold it to "1 div x" or "intmax div x" or "(x*x) div x" if you really felt like it, but 0 and 1 are the only constants that can always be obtained regardless of the value of x, so they are the most efficient choices. Ciao, Duncan. > >>> > >>> with > >>> the way it sounds like undef is intended to work. This code: > >>> > >>> %x = udiv i32 undef, %intmax > >>> %y = udiv i32 %x, 2 > >>> > >>> will always set %y to 0. Maybe instcombine can fold the second > >>> udiv by looking through its operands, but it can't safely fold the > >>> first. The best it could do is try to fold away all of %x's uses so > >>> that %x isn't needed anymore. > > Duncan pointed out that I confused myself. If something is undef, we > can choose to pick any specific value for the undef to pick the > cancellation. > > >> Ug, excellent point. At this point, I'm inclined to just give up > >> folding of udiv undefs. What do you think? > > > > udiv isn't the only one, the way this is going... > > > > %x = mul i32 undef, 2 > > %y = srem i32 %x, 2 > > This is fine, we fold the mul to 0 (because the undef could be zero). > > > %x = and i32 undef, 0xffff0000 > > %y = and i32 %x, 0x0000ffff > > > > and so on for a lot of others. > > For and, we fold undef to 0 (because the undef could be 0) > For or undef, X, we fold to -1, because the undef could be -1. > > >>> Even simple things like undef+X don't seem to be safe to fold. > >>> > >>> %x = undef; > >>> if (%x >= 0) > >>> %z = %y / (%x + 1); // don't divide by undef! > >> > >> Fortunately, this isn't a problem. LLVM has no copy instruction, so > >> the code is really this: > >> > >>> if (undef >= 0) > >>> %z = %y / (undef + 1); // don't divide by undef! > >> > >> There is nothing that specifies the two undefs are the same value. > >> Also, in C, if you have an undefined variable, you aren't guaranteed > >> to get the same undef value each time you read the variable, so > >> transforming C into LLVM is ok :) > > > > In C, an uninitialized variable has an "indeterminate value", which is > > potentially a trap representation, which can't even be multiplied by > > zero without incurring undefined behavior. I don't know where it > > suggests that a variable with indeterminate value might be different > > on each read though. > > There have been discussions about this issue on the GCC list. I > remember the resolution (they take the same basic approach we do), > but I don't remember why. I think a DR may be submitted to the C > committee on the issue. > > IIRC, the basic reason this (allowing an undefined value to have > multiple values) bites GCC is due to regalloc. For example, if you > have: > > int x; > int y; > > y = 1; > print(x, y); > ... > > y = 2; > print(x, y); > > Because there is no live range for x (just uses) x and y can be > allocated to the same register. Doing so causes the value of x to > follow the value of y. > > > LLVM does so have copy instructions. The syntax is a little odd > > though, > > and the keyword is spelled 'bitcast' ;-). > > Point taken. :) > > -Chris > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > From baldrick at free.fr Fri Jun 29 04:03:36 2007 From: baldrick at free.fr (Duncan Sands) Date: Fri, 29 Jun 2007 11:03:36 +0200 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Message-ID: <200706291103.37341.baldrick@free.fr> Hi Evan, > +/// propagateEHRegister - The specified EH register is required in a successor > +/// of the EH landing pad. Propagate it (by adding it to livein) to all the > +/// blocks in the paths between the landing pad and the specified block. thanks for this fix. For the moment we don't really need this much generality: due to other problems (PR1508) we don't even try to handle the case where the exception handling intrinsics are neither in the landing pad nor in an immediate successor of the landing pad (we assert if this occurs). Thus the attached minimal fix is good enough until PR1508 is resolved (shall I commit it?). Also, I can't help feeling that the right way to solve the problem of reading the exception register in some block potentially far away from the landing pad is: (1) add code to the landing pad that writes the physical register to a virtual register; (2) turn the eh.exception intrinsic into a read from the virtual register. The problem is that we are in ssa form during codegen, so doing this means inserting phi nodes etc for the virtual register. Ciao, Duncan. -------------- next part -------------- A non-text attachment was scrubbed... Name: eh_register.diff Type: text/x-diff Size: 2698 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070629/93454049/attachment.bin From gordonhenriksen at mac.com Fri Jun 29 07:49:48 2007 From: gordonhenriksen at mac.com (Gordon Henriksen) Date: Fri, 29 Jun 2007 08:49:48 -0400 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp In-Reply-To: <200706282237.29311.greened@obbligato.org> References: <200706290249.l5T2nYZL010348@zion.cs.uiuc.edu> <4684739C.1080904@mxc.ca> <200706282237.29311.greened@obbligato.org> Message-ID: <33F59B6F-5416-4A00-A686-94006D31C4B4@mac.com> On 2007-06-28, at 23:37, David A. Greene wrote: > On Thursday 28 June 2007 21:51, Nick Lewycky wrote: > >> David Greene wrote: >> >>> + // Cray [dag]: Must recompute end() each iteration because >>> it may >> >> Please don't mark the comments as being from Cray. Just write the >> comment as a standard explanation. > > Ok, will fix. Just wanted to take responsibility for screw-ups. :) svn blame will know your name. ;) ? Gordon -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070629/305a7bd7/attachment.html From reid at x10sys.com Fri Jun 29 09:02:40 2007 From: reid at x10sys.com (Reid Spencer) Date: Fri, 29 Jun 2007 09:02:40 -0500 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200706291402.l5TE2ebi026953@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.437 -> 1.438 --- Log message: Add a missing . --- Diffs of the changes: (+1 -1) Makefile.rules | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.437 llvm/Makefile.rules:1.438 --- llvm/Makefile.rules:1.437 Thu Jun 28 22:36:21 2007 +++ llvm/Makefile.rules Fri Jun 29 09:02:07 2007 @@ -38,7 +38,7 @@ VPATH=$(PROJ_SRC_DIR) #-------------------------------------------------------------------- -# Reset the list of suffixes we know how to build +# Reset the list of suffixes we know how to build. #-------------------------------------------------------------------- .SUFFIXES: .SUFFIXES: .c .cpp .cc .h .hpp .y .l .lo .o .a .bc .td .ps .dot .ll From clattner at apple.com Fri Jun 29 10:55:00 2007 From: clattner at apple.com (Chris Lattner) Date: Fri, 29 Jun 2007 08:55:00 -0700 Subject: [llvm-commits] CVS: llvm/include/llvm/ADT/SmallVector.h In-Reply-To: <200706282027.l5SKRkfr031281@zion.cs.uiuc.edu> References: <200706282027.l5SKRkfr031281@zion.cs.uiuc.edu> Message-ID: > Add a default parameter to a SmallVector constructor to allow it to > be called with just an initial length value, just like in std::vector. Ok. Should this be marked 'explicit'? -Chris > > --- > Diffs of the changes: (+1 -1) > > SmallVector.h | 2 +- > 1 files changed, 1 insertion(+), 1 deletion(-) > > > Index: llvm/include/llvm/ADT/SmallVector.h > diff -u llvm/include/llvm/ADT/SmallVector.h:1.30 llvm/include/llvm/ > ADT/SmallVector.h:1.31 > --- llvm/include/llvm/ADT/SmallVector.h:1.30 Thu May 17 15:01:40 2007 > +++ llvm/include/llvm/ADT/SmallVector.h Thu Jun 28 15:27:24 2007 > @@ -442,7 +442,7 @@ > SmallVector() : SmallVectorImpl(NumTsAvailable) { > } > > - SmallVector(unsigned Size, const T &Value) > + SmallVector(unsigned Size, const T &Value = T()) > : SmallVectorImpl(NumTsAvailable) { > this->reserve(Size); > while (Size--) > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From lattner at apple.com Fri Jun 29 12:24:20 2007 From: lattner at apple.com (Tanya Lattner) Date: Fri, 29 Jun 2007 10:24:20 -0700 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp In-Reply-To: <46831649.6010708@gmail.com> References: <46831649.6010708@gmail.com> Message-ID: Should this be added as a regression test? -Tanya On Jun 27, 2007, at 7:00 PM, Sheng Zhou wrote: > Chris, > > Attached is the testcase, which will get: > > opt: /developer/home2/zsth/llvm-gcc-dev/HEAD/llvm/llvm/lib/VMCore/ > Constants.cpp:1559: static llvm::Constant* > llvm::ConstantExpr::getZExt(llvm::Constant*, const llvm::Type*): > Assertion `C->getType()->getPrimitiveSizeInBits() < Ty- > >getPrimitiveSizeInBits()&& "SrcTy must be smaller than DestTy for > ZExt!"' failed. > > The condition "IterationCount->getType() != LargestType" doesn't > mean the IterationCount->getType's bitwidth < LargestType's > so, sometimes, (like in this testcase), it need a trunc not ext. > This patch is to fix it. > > Sheng > > > > DOUT << "INDVARS: New CanIV: " << *IndVar; >> >> if (!isa(IterationCount)) { >> - if (IterationCount->getType() != LargestType) >> + if (IterationCount->getType()->getPrimitiveSizeInBits() < >> + LargestType->getPrimitiveSizeInBits()) >> IterationCount = SCEVZeroExtendExpr::get(IterationCount, >> LargestType); >> + else if (IterationCount->getType() != LargestType) >> + IterationCount = SCEVTruncateExpr::get(IterationCount, >> LargestType); >> if (Instruction *DI = LinearFunctionTestReplace(L, >> IterationCount,Rewriter)) >> DeadInsts.insert(DI); >> } > > > > ; ModuleID = 'testcase.bc' > target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32- > i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64" > target triple = "i686-pc-linux-gnu" > > define i32 @testcase(i5 zext %k) { > entry: > br label %bb2 > > bb: ; preds = %bb2 > %tmp1 = add i32 %tmp2, %result ; [#uses=1] > %indvar_next1 = add i5 %k_0, 1 ; [#uses=1] > br label %bb2 > > bb2: ; preds = %bb, %entry > %k_0 = phi i5 [ 0, %entry ], [ %indvar_next1, %bb ] ; [#uses=2] > %result = phi i32 [ 0, %entry ], [ %tmp1, %bb ] ; [#uses=2] > %tmp2 = zext i5 %k_0 to i32 ; [#uses=1] > %exitcond = icmp eq i32 %tmp2, 16 ; [#uses=1] > br i1 %exitcond, label %bb3, label %bb > > bb3: ; preds = %bb2 > ret i32 %result > } > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From alkis at cs.uiuc.edu Fri Jun 29 13:19:06 2007 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Fri, 29 Jun 2007 18:19:06 -0000 Subject: [llvm-commits] [java] r20000 - in /java/trunk: include/llvm/Java/Bytecode.h include/llvm/Java/ClassFile.h lib/ClassFile/ClassFile.cpp lib/Compiler/Compiler.cpp lib/Compiler/Locals.cpp lib/Compiler/OperandStack.cpp runtime/runtime.c Message-ID: <200706291819.l5TIJ7Nv021339@zion.cs.uiuc.edu> Author: alkis Date: Wed Feb 2 10:26:54 2005 New Revision: 20000 URL: http://llvm.org/viewvc/llvm-project?rev=20000&view=rev Log: Make llvm-java compile on Windows. Patch contributed by Jeff Cohen! Modified: java/trunk/include/llvm/Java/Bytecode.h (contents, props changed) java/trunk/include/llvm/Java/ClassFile.h (contents, props changed) java/trunk/lib/ClassFile/ClassFile.cpp (contents, props changed) java/trunk/lib/Compiler/Compiler.cpp (contents, props changed) java/trunk/lib/Compiler/Locals.cpp (contents, props changed) java/trunk/lib/Compiler/OperandStack.cpp (contents, props changed) java/trunk/runtime/runtime.c (contents, props changed) Modified: java/trunk/include/llvm/Java/Bytecode.h URL: http://llvm.org/viewvc/llvm-project/java/trunk/include/llvm/Java/Bytecode.h?rev=20000&r1=19999&r2=20000&view=diff ============================================================================== --- java/trunk/include/llvm/Java/Bytecode.h (original) +++ java/trunk/include/llvm/Java/Bytecode.h Wed Feb 2 10:26:54 2005 @@ -14,7 +14,7 @@ #ifndef LLVM_JAVA_BYTECODE_H #define LLVM_JAVA_BYTECODE_H -#include +#include namespace llvm { namespace Java { Propchange: java/trunk/include/llvm/Java/Bytecode.h ------------------------------------------------------------------------------ --- cvs2svn:cvs-rev (original) +++ cvs2svn:cvs-rev Wed Feb 2 10:26:54 2005 @@ -1 +1 @@ -1.13 +1.14 Modified: java/trunk/include/llvm/Java/ClassFile.h URL: http://llvm.org/viewvc/llvm-project/java/trunk/include/llvm/Java/ClassFile.h?rev=20000&r1=19999&r2=20000&view=diff ============================================================================== --- java/trunk/include/llvm/Java/ClassFile.h (original) +++ java/trunk/include/llvm/Java/ClassFile.h Wed Feb 2 10:26:54 2005 @@ -22,7 +22,7 @@ #include #include -#include +#include namespace llvm { namespace Java { @@ -193,17 +193,20 @@ std::ostream& dump(std::ostream& os) const; }; - struct ConstantFieldRef : public ConstantMemberRef { + class ConstantFieldRef : public ConstantMemberRef { + public: ConstantFieldRef(const ConstantPool& cp, std::istream& is) : ConstantMemberRef(cp, is) { } }; - struct ConstantMethodRef : public ConstantMemberRef { + class ConstantMethodRef : public ConstantMemberRef { + public: ConstantMethodRef(const ConstantPool& cp, std::istream& is) : ConstantMemberRef(cp, is) { } }; - struct ConstantInterfaceMethodRef : public ConstantMemberRef { + class ConstantInterfaceMethodRef : public ConstantMemberRef { + public: ConstantInterfaceMethodRef(const ConstantPool& cp, std::istream& is) : ConstantMemberRef(cp, is) { } }; Propchange: java/trunk/include/llvm/Java/ClassFile.h ------------------------------------------------------------------------------ --- cvs2svn:cvs-rev (original) +++ cvs2svn:cvs-rev Wed Feb 2 10:26:54 2005 @@ -1 +1 @@ -1.27 +1.28 Modified: java/trunk/lib/ClassFile/ClassFile.cpp URL: http://llvm.org/viewvc/llvm-project/java/trunk/lib/ClassFile/ClassFile.cpp?rev=20000&r1=19999&r2=20000&view=diff ============================================================================== --- java/trunk/lib/ClassFile/ClassFile.cpp (original) +++ java/trunk/lib/ClassFile/ClassFile.cpp Wed Feb 2 10:26:54 2005 @@ -18,7 +18,9 @@ #include #include #include +#include +#include #include #include #include @@ -517,7 +519,7 @@ : Constant(cp) { uint16_t length = readU2(is); - char buf[length]; + char *buf = (char *)alloca(length); std::streamsize s = is.rdbuf()->sgetn(buf, length); if (s != length) throw ClassFileParseError( Propchange: java/trunk/lib/ClassFile/ClassFile.cpp ------------------------------------------------------------------------------ --- cvs2svn:cvs-rev (original) +++ cvs2svn:cvs-rev Wed Feb 2 10:26:54 2005 @@ -1 +1 @@ -1.34 +1.35 Modified: java/trunk/lib/Compiler/Compiler.cpp URL: http://llvm.org/viewvc/llvm-project/java/trunk/lib/Compiler/Compiler.cpp?rev=20000&r1=19999&r2=20000&view=diff ============================================================================== --- java/trunk/lib/Compiler/Compiler.cpp (original) +++ java/trunk/lib/Compiler/Compiler.cpp Wed Feb 2 10:26:54 2005 @@ -206,6 +206,7 @@ return ConstantFP::get(Type::DoubleTy, d->getValue()); else assert(0 && "Unknown llvm::Java::Constant!"); + return 0; // not reached } /// Given a JType returns the appropriate llvm::Type. @@ -268,6 +269,7 @@ // FIXME: Throw something default: assert(0 && "Cannot parse type descriptor!"); } + return 0; // not reached } /// Returns the type of the Java string descriptor for JNI. @@ -313,6 +315,7 @@ // FIXME: Throw something default: assert(0 && "Cannot parse type descriptor!"); } + return 0; // not reached } /// Initializes the class info map; in other words it adds the Propchange: java/trunk/lib/Compiler/Compiler.cpp ------------------------------------------------------------------------------ --- cvs2svn:cvs-rev (original) +++ cvs2svn:cvs-rev Wed Feb 2 10:26:54 2005 @@ -1 +1 @@ -1.210 +1.211 Modified: java/trunk/lib/Compiler/Locals.cpp URL: http://llvm.org/viewvc/llvm-project/java/trunk/lib/Compiler/Locals.cpp?rev=20000&r1=19999&r2=20000&view=diff ============================================================================== --- java/trunk/lib/Compiler/Locals.cpp (original) +++ java/trunk/lib/Compiler/Locals.cpp Wed Feb 2 10:26:54 2005 @@ -21,6 +21,7 @@ #include #include +using namespace llvm; using namespace llvm::Java; Locals::Locals(unsigned maxLocals) Propchange: java/trunk/lib/Compiler/Locals.cpp ------------------------------------------------------------------------------ --- cvs2svn:cvs-rev (original) +++ cvs2svn:cvs-rev Wed Feb 2 10:26:54 2005 @@ -1 +1 @@ -1.7 +1.8 Modified: java/trunk/lib/Compiler/OperandStack.cpp URL: http://llvm.org/viewvc/llvm-project/java/trunk/lib/Compiler/OperandStack.cpp?rev=20000&r1=19999&r2=20000&view=diff ============================================================================== --- java/trunk/lib/Compiler/OperandStack.cpp (original) +++ java/trunk/lib/Compiler/OperandStack.cpp Wed Feb 2 10:26:54 2005 @@ -22,6 +22,7 @@ #include #include +using namespace llvm; using namespace llvm::Java; void OperandStack::copySlots(const SlotMap& src, Propchange: java/trunk/lib/Compiler/OperandStack.cpp ------------------------------------------------------------------------------ --- cvs2svn:cvs-rev (original) +++ cvs2svn:cvs-rev Wed Feb 2 10:26:54 2005 @@ -1 +1 @@ -1.9 +1.10 Modified: java/trunk/runtime/runtime.c URL: http://llvm.org/viewvc/llvm-project/java/trunk/runtime/runtime.c?rev=20000&r1=19999&r2=20000&view=diff ============================================================================== --- java/trunk/runtime/runtime.c (original) +++ java/trunk/runtime/runtime.c Wed Feb 2 10:26:54 2005 @@ -9,6 +9,7 @@ struct llvm_java_object_header { /* gc info, hash info, locking */ + int dummy; }; struct llvm_java_object_base { @@ -41,11 +42,13 @@ jint llvm_java_is_instance_of(jobject obj, struct llvm_java_object_vtable* clazz) { + struct llvm_java_object_vtable* objClazz; + /* trivial case 1: a null object can be cast to any type */ if (!obj) return JNI_TRUE; - struct llvm_java_object_vtable* objClazz = obj->vtable; + objClazz = obj->vtable; /* trivial case 2: this object is of class clazz */ if (objClazz == clazz) return JNI_TRUE; Propchange: java/trunk/runtime/runtime.c ------------------------------------------------------------------------------ --- cvs2svn:cvs-rev (original) +++ cvs2svn:cvs-rev Wed Feb 2 10:26:54 2005 @@ -1 +1 @@ -1.18 +1.19 From criswell at uiuc.edu Fri Jun 29 13:24:05 2007 From: criswell at uiuc.edu (John Criswell) Date: Fri, 29 Jun 2007 18:24:05 -0000 Subject: [llvm-commits] [llvm] r37807 - /llvm/trunk/CREDITS.TXT Message-ID: <200706291824.l5TIO5fq021451@zion.cs.uiuc.edu> Author: criswell Date: Fri Jun 29 13:24:05 2007 New Revision: 37807 URL: http://llvm.org/viewvc/llvm-project?rev=37807&view=rev Log: Updated my entry as a test commit. Removed QMTest (it is long gone). Acknowledge the fleeting'ness of my original autoconf work. Mention that I fixed some bugs. Modified: llvm/trunk/CREDITS.TXT Modified: llvm/trunk/CREDITS.TXT URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CREDITS.TXT?rev=37807&r1=37806&r2=37807&view=diff ============================================================================== --- llvm/trunk/CREDITS.TXT (original) +++ llvm/trunk/CREDITS.TXT Fri Jun 29 13:24:05 2007 @@ -62,7 +62,7 @@ N: John T. Criswell E: criswell at uiuc.edu -D: Autoconf support, QMTest database, documentation improvements +D: Original Autoconf support, documentation improvements, bug fixes N: Rafael Avila de Espindola E: rafael.espindola at gmail.com From asl at math.spbu.ru Fri Jun 29 13:36:05 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Fri, 29 Jun 2007 18:36:05 -0000 Subject: [llvm-commits] [test-suite] r37808 - /test-suite/trunk/README.txt Message-ID: <200706291836.l5TIa6V4021692@zion.cs.uiuc.edu> Author: asl Date: Fri Jun 29 13:35:56 2007 New Revision: 37808 URL: http://llvm.org/viewvc/llvm-project?rev=37808&view=rev Log: Test commit Modified: test-suite/trunk/README.txt Modified: test-suite/trunk/README.txt URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/README.txt?rev=37808&r1=37807&r2=37808&view=diff ============================================================================== --- test-suite/trunk/README.txt (original) +++ test-suite/trunk/README.txt Fri Jun 29 13:35:56 2007 @@ -8,4 +8,3 @@ In the future, given 'make thorough' we can add trace instrumentation and diff the trace logs as well. - From criswell at uiuc.edu Fri Jun 29 14:04:53 2007 From: criswell at uiuc.edu (John Criswell) Date: Fri, 29 Jun 2007 19:04:53 -0000 Subject: [llvm-commits] [llvm] r37809 - /llvm/branches/SVA/README.txt Message-ID: <200706291904.l5TJ4rFi014134@zion.cs.uiuc.edu> Author: criswell Date: Fri Jun 29 14:04:53 2007 New Revision: 37809 URL: http://llvm.org/viewvc/llvm-project?rev=37809&view=rev Log: Test commit on SVA branch. Modified: llvm/branches/SVA/README.txt Modified: llvm/branches/SVA/README.txt URL: http://llvm.org/viewvc/llvm-project/llvm/branches/SVA/README.txt?rev=37809&r1=37808&r2=37809&view=diff ============================================================================== --- llvm/branches/SVA/README.txt (original) +++ llvm/branches/SVA/README.txt Fri Jun 29 14:04:53 2007 @@ -10,3 +10,4 @@ Please see the HTML documentation provided in docs/index.html for further assistance with LLVM. + From criswell at uiuc.edu Fri Jun 29 14:07:03 2007 From: criswell at uiuc.edu (John Criswell) Date: Fri, 29 Jun 2007 19:07:03 -0000 Subject: [llvm-commits] [llvm] r37810 - /llvm/branches/SVA/README.txt Message-ID: <200706291907.l5TJ73oF014187@zion.cs.uiuc.edu> Author: criswell Date: Fri Jun 29 14:07:03 2007 New Revision: 37810 URL: http://llvm.org/viewvc/llvm-project?rev=37810&view=rev Log: Undo previous commit. Modified: llvm/branches/SVA/README.txt Modified: llvm/branches/SVA/README.txt URL: http://llvm.org/viewvc/llvm-project/llvm/branches/SVA/README.txt?rev=37810&r1=37809&r2=37810&view=diff ============================================================================== --- llvm/branches/SVA/README.txt (original) +++ llvm/branches/SVA/README.txt Fri Jun 29 14:07:03 2007 @@ -10,4 +10,3 @@ Please see the HTML documentation provided in docs/index.html for further assistance with LLVM. - From asl at math.spbu.ru Fri Jun 29 14:04:41 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Fri, 29 Jun 2007 23:04:41 +0400 Subject: [llvm-commits] Warnings Message-ID: <1183143881.814.1.camel@asl.dorms.spbu.ru> Hello, Everyone. I'm getting these warnings on trunk: src/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp: In member function `bool ::bu_ls_rr_sort::operator()(const llvm::SUnit*, const llvm::SUnit*) const': src/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:618: warning: unused variable 'LIsTarget' src/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:619: warning: unused variable 'RIsTarget' -- With best regards, Anton Korobeynikov. Faculty of Mathematics & Mechanics, Saint Petersburg State University. From criswell at uiuc.edu Fri Jun 29 14:12:32 2007 From: criswell at uiuc.edu (John Criswell) Date: Fri, 29 Jun 2007 19:12:32 -0000 Subject: [llvm-commits] [llvm] r37811 - /llvm/trunk/docs/GettingStarted.html Message-ID: <200706291912.l5TJCWkL014310@zion.cs.uiuc.edu> Author: criswell Date: Fri Jun 29 14:12:31 2007 New Revision: 37811 URL: http://llvm.org/viewvc/llvm-project?rev=37811&view=rev Log: Applied Reid's patch. Long live Subversion! Modified: llvm/trunk/docs/GettingStarted.html Modified: llvm/trunk/docs/GettingStarted.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/GettingStarted.html?rev=37811&r1=37810&r2=37811&view=diff ============================================================================== --- llvm/trunk/docs/GettingStarted.html (original) +++ llvm/trunk/docs/GettingStarted.html Fri Jun 29 14:12:31 2007 @@ -27,7 +27,7 @@
  • Terminology and Notation
  • Setting Up Your Environment
  • Unpacking the LLVM Archives -
  • Checkout LLVM from CVS +
  • Checkout LLVM from Subversion
  • Install the GCC Front End
  • Local LLVM Configuration
  • Compiling the LLVM Suite Source Code @@ -38,7 +38,6 @@
  • Program layout
      -
    1. CVS directories
    2. llvm/examples
    3. llvm/include
    4. llvm/lib @@ -127,7 +126,7 @@
    5. Get the LLVM Source Code
        -
      • With the distributed files (or use CVS): +
      • With the distributed files (or use SVN):
        1. cd where-you-want-llvm-to-live
        2. gunzip --stdout llvm-version.tar.gz | tar -xvf - @@ -137,7 +136,7 @@
        3. [Optional] Get the Test Suite Source Code

          If you would like to get the LLVM test suite (a separate package as of 1.4), -you get it from the CVS repository:

          +you get it from the Subversion repository:

             cd llvm/projects
          -  cvs -z3 -d :pserver:anon at llvm.org:/var/cvs/llvm co llvm-test
          +  svn so http://llvm.org/svn/llvm-project/test-suite/trunk test-suite
           

          By placing it in the llvm/projects, it will be automatically configured by the LLVM configure script as well as automatically updated when -you run cvs update.

          +you run svn update.

          If you would like to get the GCC front end source code, you can also get it and build it yourself. Please follow these @@ -783,7 +782,8 @@

          - -
          -

          Every directory checked out of CVS will contain a CVS directory; for -the most part these can just be ignored.

          -
          - -

          This directory contains some simple examples of how to use the LLVM IR and @@ -1308,13 +1301,16 @@

          - +
          -

          This is not a directory in the normal llvm module; it is a separate CVS - module that must be checked out (usually to projects/llvm-test). This +

          This is not a directory in the normal llvm module; it is a separate + Subversion + module that must be checked out (usually to projects/test-suite). + This module contains a comprehensive correctness, performance, and benchmarking test - suite for LLVM. It is a separate CVS module because not every LLVM user is + suite for LLVM. It is a separate Subversion module because not every LLVM + user is interested in downloading or building such a comprehensive test suite. For further details on this test suite, please see the Testing Guide document.

          @@ -1395,7 +1391,7 @@ usual machine code output. It works just like any other GCC compiler, taking the typical -c, -S, -E, -o options that are typically used. Additionally, the the source code for llvm-gcc is available as a - separate CVS module. + separate Subversion module.
          opt
          opt reads LLVM bytecode, applies a series of LLVM to LLVM @@ -1423,14 +1419,6 @@ assuming that the other generates correct output. For the full user manual, run `perldoc codegen-diff'.

          -
          cvsupdate
          cvsupdate is a script that will - update your CVS tree, but produce a much cleaner and more organized output - than simply running `cvs -z3 up -dP' will. For example, it will group - together all the new and updated files and modified files in separate - sections, so you can see at a glance what has changed. If you are at the - top of your LLVM CVS tree, running utils/cvsupdate is the - preferred way of updating the tree.

          -
          emacs/
          The emacs directory contains syntax-highlighting files which will work with Emacs and XEmacs editors, providing syntax highlighting support for LLVM assembly files and TableGen From criswell at uiuc.edu Fri Jun 29 14:12:50 2007 From: criswell at uiuc.edu (John Criswell) Date: Fri, 29 Jun 2007 19:12:50 -0000 Subject: [llvm-commits] [llvm] r37812 - /llvm/trunk/utils/NewNightlyTest.pl Message-ID: <200706291912.l5TJCouV014325@zion.cs.uiuc.edu> Author: criswell Date: Fri Jun 29 14:12:50 2007 New Revision: 37812 URL: http://llvm.org/viewvc/llvm-project?rev=37812&view=rev Log: Applied Reid's patch. Long live Subversion! Modified: llvm/trunk/utils/NewNightlyTest.pl Modified: llvm/trunk/utils/NewNightlyTest.pl URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/NewNightlyTest.pl?rev=37812&r1=37811&r2=37812&view=diff ============================================================================== --- llvm/trunk/utils/NewNightlyTest.pl (original) +++ llvm/trunk/utils/NewNightlyTest.pl Fri Jun 29 14:12:50 2007 @@ -122,7 +122,7 @@ $CONFIGUREARGS=""; $nickname=""; $NOTEST=0; -$USESVN=0; +$USESVN=1; $NORUNNINGTESTS=0; $MAKECMD="make"; $SUBMITSERVER = "llvm.org"; @@ -170,7 +170,6 @@ else { $GCCPATH=""; } if (/^-cvstag/) { $CVSCOOPT .= " -r $ARGV[0]"; shift; next; } else { $CVSCOOPT="";} - if (/^-usesvn/) { $USESVN = 1; } if (/^-svnurl/) { $SVNURL = $ARGV[0]; shift; next; } if (/^-target/) { $CONFIGUREARGS .= " --target=$ARGV[0]"; shift; next; } From greened at obbligato.org Fri Jun 29 14:30:58 2007 From: greened at obbligato.org (David A. Greene) Date: Fri, 29 Jun 2007 14:30:58 -0500 Subject: [llvm-commits] Warnings In-Reply-To: <1183143881.814.1.camel@asl.dorms.spbu.ru> References: <1183143881.814.1.camel@asl.dorms.spbu.ru> Message-ID: <200706291430.58557.greened@obbligato.org> On Friday 29 June 2007 14:04, Anton Korobeynikov wrote: > Hello, Everyone. > > I'm getting these warnings on trunk: > > src/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp: In member function > `bool ::bu_ls_rr_sort::operator()(const llvm::SUnit*, const > llvm::SUnit*) const': > src/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:618: warning: unused > variable 'LIsTarget' > src/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:619: warning: unused > variable 'RIsTarget' That's probably mine. I'll take a look as soon as I get the svn checked out. -Dave From djg at cray.com Fri Jun 29 14:36:34 2007 From: djg at cray.com (Dan Gohman) Date: Fri, 29 Jun 2007 14:36:34 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Message-ID: <20070629193634.GQ5693@village.us.cray.com> > Duncan pointed out that I confused myself. If something is undef, we > can choose to pick any specific value for the undef to pick the > cancellation. Thanks Chris and Duncan for explaining this. I'll submit a fix for the DAGCombiner changes accordingly. Dan -- Dan Gohman, Cray Inc. From greened at obbligato.org Fri Jun 29 14:37:11 2007 From: greened at obbligato.org (David A. Greene) Date: Fri, 29 Jun 2007 14:37:11 -0500 Subject: [llvm-commits] Warnings In-Reply-To: <1183143881.814.1.camel@asl.dorms.spbu.ru> References: <1183143881.814.1.camel@asl.dorms.spbu.ru> Message-ID: <200706291437.11595.greened@obbligato.org> On Friday 29 June 2007 14:04, Anton Korobeynikov wrote: > Hello, Everyone. > > I'm getting these warnings on trunk: > > src/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp: In member function > `bool ::bu_ls_rr_sort::operator()(const llvm::SUnit*, const > llvm::SUnit*) const': > src/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:618: warning: unused > variable 'LIsTarget' > src/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:619: warning: unused > variable 'RIsTarget' That's probably due to a commit I made yesterday. I'll take a look as soon as I get the svn checked out. -Dave From djg at cray.com Fri Jun 29 14:38:33 2007 From: djg at cray.com (Dan Gohman) Date: Fri, 29 Jun 2007 14:38:33 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp LegalizeDAG.cpp SelectionDAG.cpp SelectionDAGISel.cpp TargetLowering.cpp Message-ID: <20070629193833.GR5693@village.us.cray.com> >> Just as there isn't a special ADD node kind for vectors -- just an ADD >> kind with nodes that can have a vector ValueType, ConstantFP can also >> be "vectorized". A ConstantFP with a vector ValueType is a vector >> constant, >> equivalent to what is currently represented as a splat BUILD_VECTOR, >> except that it's easier to work with :). > > I'm not opposed to doing this, but I don't think we should overload > ConstantFP() and getConstantFP() for this. Could you make a new > VectorConstantFP or something? We overload ISD::FADD and quite a lot of others. Why not ISD::ConstantFP too? Dan -- Dan Gohman, Cray Inc. From djg at cray.com Fri Jun 29 14:47:48 2007 From: djg at cray.com (Dan Gohman) Date: Fri, 29 Jun 2007 14:47:48 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/CallingConvLower.h SelectionDAG.h SelectionDAGNodes.h ValueTypes.h Message-ID: <20070629194748.GS5693@village.us.cray.com> >> >> I notice that several places use !MVT::isExtendedValueType(VT). >> Please add MVT::isSimpleValueType() After making a different change to TargetLowering.h following the review feedback, there are fewer of these. Fewer uses of isExtendedVT are negated than not now. I'd prefer to avoid having two different names to do essentially the same thing. Dan -- Dan Gohman, Cray Inc. From djg at cray.com Fri Jun 29 15:06:00 2007 From: djg at cray.com (Dan Gohman) Date: Fri, 29 Jun 2007 15:06:00 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/ADT/SmallVector.h Message-ID: <20070629200600.GU5693@village.us.cray.com> >> Add a default parameter to a SmallVector constructor to allow it to >> be called with just an initial length value, just like in std::vector. > > Ok. > > Should this be marked 'explicit'? Yep. Good catch. Dan -- Dan Gohman, Cray Inc. From asl at math.spbu.ru Fri Jun 29 15:56:49 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Fri, 29 Jun 2007 20:56:49 -0000 Subject: [llvm-commits] [llvm] r37813 - /llvm/trunk/docs/GettingStarted.html Message-ID: <200706292056.l5TKuoYp007070@zion.cs.uiuc.edu> Author: asl Date: Fri Jun 29 15:56:49 2007 New Revision: 37813 URL: http://llvm.org/viewvc/llvm-project?rev=37813&view=rev Log: Fix a typo Modified: llvm/trunk/docs/GettingStarted.html Modified: llvm/trunk/docs/GettingStarted.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/GettingStarted.html?rev=37813&r1=37812&r2=37813&view=diff ============================================================================== --- llvm/trunk/docs/GettingStarted.html (original) +++ llvm/trunk/docs/GettingStarted.html Fri Jun 29 15:56:49 2007 @@ -691,8 +691,8 @@
          • cd where-you-want-llvm-to-live
          • -
          • Read-Only: svn co http://llvm.org/svn/llvm-project/trunk/llvm llvm
          • -
          • Read-Write:svn co https://user at llvm.org/svn/llvm-project/trunk/llvm +
          • Read-Only: svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
          • +
          • Read-Write:svn co https://user at llvm.org/svn/llvm-project/llvm/trunk llvm
          From clattner at apple.com Fri Jun 29 16:01:36 2007 From: clattner at apple.com (Chris Lattner) Date: Fri, 29 Jun 2007 14:01:36 -0700 Subject: [llvm-commits] [llvm] r37813 - /llvm/trunk/docs/GettingStarted.html In-Reply-To: <200706292056.l5TKuoYp007070@zion.cs.uiuc.edu> References: <200706292056.l5TKuoYp007070@zion.cs.uiuc.edu> Message-ID: On Jun 29, 2007, at 1:56 PM, Anton Korobeynikov wrote: > Author: asl > Date: Fri Jun 29 15:56:49 2007 > New Revision: 37813 > > URL: http://llvm.org/viewvc/llvm-project?rev=37813&view=rev > Log: > Fix a typo > > Modified: > llvm/trunk/docs/GettingStarted.html > > Modified: llvm/trunk/docs/GettingStarted.html > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ > GettingStarted.html?rev=37813&r1=37812&r2=37813&view=diff > ====================================================================== > ======== Please put a newline between the URL and the ==== divider line :) -Chris > --- llvm/trunk/docs/GettingStarted.html (original) > +++ llvm/trunk/docs/GettingStarted.html Fri Jun 29 15:56:49 2007 > @@ -691,8 +691,8 @@ > >
            >
          • cd where-you-want-llvm-to-live
          • > -
          • Read-Only: svn co http://llvm.org/svn/llvm-project/trunk/ > llvm llvm
          • > -
          • Read-Write:svn co https://user at llvm.org/svn/llvm-project/ > trunk/llvm > +
          • Read-Only: svn co http://llvm.org/svn/llvm-project/llvm/ > trunk llvm
          • > +
          • Read-Write:svn co https://user at llvm.org/svn/llvm-project/ > llvm/trunk > llvm
          • >
          > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From evan.cheng at apple.com Fri Jun 29 16:36:04 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Fri, 29 Jun 2007 21:36:04 -0000 Subject: [llvm-commits] [llvm] r37814 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Message-ID: <200706292136.l5TLa4dM007937@zion.cs.uiuc.edu> Author: evancheng Date: Fri Jun 29 16:36:04 2007 New Revision: 37814 URL: http://llvm.org/viewvc/llvm-project?rev=37814&view=rev Log: Fix a vector FP constant CSE bug. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=37814&r1=37813&r2=37814&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Fri Jun 29 16:36:04 2007 @@ -686,11 +686,16 @@ AddNodeIDNode(ID, Opc, getVTList(EltVT), 0, 0); ID.AddDouble(Val); void *IP = 0; - if (SDNode *E = CSEMap.FindNodeOrInsertPos(ID, IP)) - return SDOperand(E, 0); - SDNode *N = new ConstantFPSDNode(isTarget, Val, EltVT); - CSEMap.InsertNode(N, IP); - AllNodes.push_back(N); + SDNode *N = NULL; + if ((N = CSEMap.FindNodeOrInsertPos(ID, IP))) + if (!MVT::isVector(VT)) + return SDOperand(N, 0); + if (!N) { + N = new ConstantFPSDNode(isTarget, Val, EltVT); + CSEMap.InsertNode(N, IP); + AllNodes.push_back(N); + } + SDOperand Result(N, 0); if (MVT::isVector(VT)) { SmallVector Ops; From evan.cheng at apple.com Fri Jun 29 16:40:30 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Fri, 29 Jun 2007 21:40:30 -0000 Subject: [llvm-commits] [llvm] r37815 - /llvm/trunk/test/CodeGen/X86/2007-06-29-VecFPConstantCSEBug.ll Message-ID: <200706292140.l5TLeUPk008032@zion.cs.uiuc.edu> Author: evancheng Date: Fri Jun 29 16:40:30 2007 New Revision: 37815 URL: http://llvm.org/viewvc/llvm-project?rev=37815&view=rev Log: New test. Added: llvm/trunk/test/CodeGen/X86/2007-06-29-VecFPConstantCSEBug.ll Added: llvm/trunk/test/CodeGen/X86/2007-06-29-VecFPConstantCSEBug.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2007-06-29-VecFPConstantCSEBug.ll?rev=37815&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/2007-06-29-VecFPConstantCSEBug.ll (added) +++ llvm/trunk/test/CodeGen/X86/2007-06-29-VecFPConstantCSEBug.ll Fri Jun 29 16:40:30 2007 @@ -0,0 +1,11 @@ +; RUN: llvm-as < %s | | llc -march=x86 -mattr=+sse2 + +define void @test(<4 x float>* %arg) { + %tmp89 = getelementptr <4 x float>* %arg, i64 3 + %tmp1144 = sub <4 x float> < float -0.000000e+00, float -0.000000e+00, float -0.000000e+00, float -0.000000e+00 >, zeroinitializer + store <4 x float> %tmp1144, <4 x float>* null + %tmp1149 = load <4 x float>* %tmp89 + %tmp1150 = sub <4 x float> < float -0.000000e+00, float -0.000000e+00, float -0.000000e+00, float -0.000000e+00 >, %tmp1149 + store <4 x float> %tmp1150, <4 x float>* %tmp89 + ret void +} From greened at obbligato.org Fri Jun 29 16:42:03 2007 From: greened at obbligato.org (David Greene) Date: Fri, 29 Jun 2007 21:42:03 -0000 Subject: [llvm-commits] [llvm] r37816 - /llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp Message-ID: <200706292142.l5TLg3KN008069@zion.cs.uiuc.edu> Author: greened Date: Fri Jun 29 16:42:03 2007 New Revision: 37816 URL: http://llvm.org/viewvc/llvm-project?rev=37816&view=rev Log: Remove unused variables. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp?rev=37816&r1=37815&r2=37816&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp Fri Jun 29 16:42:03 2007 @@ -615,9 +615,6 @@ // Bottom up bool bu_ls_rr_sort::operator()(const SUnit *left, const SUnit *right) const { - bool LIsTarget = left->Node->isTargetOpcode(); - bool RIsTarget = right->Node->isTargetOpcode(); - // There used to be a special tie breaker here that looked for // two-address instructions and preferred the instruction with a // def&use operand. The special case triggered diagnostics when From asl at math.spbu.ru Fri Jun 29 16:44:14 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Fri, 29 Jun 2007 21:44:14 -0000 Subject: [llvm-commits] [llvm] r37817 - /llvm/trunk/docs/GettingStarted.html Message-ID: <200706292144.l5TLiEFD015932@zion.cs.uiuc.edu> Author: asl Date: Fri Jun 29 16:44:14 2007 New Revision: 37817 URL: http://llvm.org/viewvc/llvm-project?rev=37817&view=rev Log: Another typo Modified: llvm/trunk/docs/GettingStarted.html Modified: llvm/trunk/docs/GettingStarted.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/GettingStarted.html?rev=37817&r1=37816&r2=37817&view=diff ============================================================================== --- llvm/trunk/docs/GettingStarted.html (original) +++ llvm/trunk/docs/GettingStarted.html Fri Jun 29 16:44:14 2007 @@ -723,7 +723,7 @@ you get it from the Subversion repository:

             cd llvm/projects
          -  svn so http://llvm.org/svn/llvm-project/test-suite/trunk test-suite
          +  svn co http://llvm.org/svn/llvm-project/test-suite/trunk test-suite
           

          By placing it in the llvm/projects, it will be automatically configured by the LLVM configure script as well as automatically updated when From evan.cheng at apple.com Fri Jun 29 16:44:35 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Fri, 29 Jun 2007 21:44:35 -0000 Subject: [llvm-commits] [llvm] r37818 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Message-ID: <200706292144.l5TLiZFE018853@zion.cs.uiuc.edu> Author: evancheng Date: Fri Jun 29 16:44:35 2007 New Revision: 37818 URL: http://llvm.org/viewvc/llvm-project?rev=37818&view=rev Log: Only do FNEG xform when the vector type is a floating point type. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=37818&r1=37817&r2=37818&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Fri Jun 29 16:44:35 2007 @@ -1798,13 +1798,15 @@ if (ConstantVector *CV = dyn_cast(I.getOperand(0))) { const VectorType *DestTy = cast(I.getType()); const Type *ElTy = DestTy->getElementType(); - unsigned VL = DestTy->getNumElements(); - std::vector NZ(VL, ConstantFP::get(ElTy, -0.0)); - Constant *CNZ = ConstantVector::get(&NZ[0], NZ.size()); - if (CV == CNZ) { - SDOperand Op2 = getValue(I.getOperand(1)); - setValue(&I, DAG.getNode(ISD::FNEG, Op2.getValueType(), Op2)); - return; + if (ElTy->isFloatingPoint()) { + unsigned VL = DestTy->getNumElements(); + std::vector NZ(VL, ConstantFP::get(ElTy, -0.0)); + Constant *CNZ = ConstantVector::get(&NZ[0], NZ.size()); + if (CV == CNZ) { + SDOperand Op2 = getValue(I.getOperand(1)); + setValue(&I, DAG.getNode(ISD::FNEG, Op2.getValueType(), Op2)); + return; + } } } } From djg at cray.com Fri Jun 29 17:16:26 2007 From: djg at cray.com (Dan Gohman) Date: Fri, 29 Jun 2007 22:16:26 -0000 Subject: [llvm-commits] [llvm] r37819 - /llvm/trunk/include/llvm/ADT/SmallVector.h Message-ID: <200706292216.l5TMGQY3019001@zion.cs.uiuc.edu> Author: djg Date: Fri Jun 29 17:16:25 2007 New Revision: 37819 URL: http://llvm.org/viewvc/llvm-project?rev=37819&view=rev Log: Add an explicit keyword. Thanks Chris! Modified: llvm/trunk/include/llvm/ADT/SmallVector.h Modified: llvm/trunk/include/llvm/ADT/SmallVector.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SmallVector.h?rev=37819&r1=37818&r2=37819&view=diff ============================================================================== --- llvm/trunk/include/llvm/ADT/SmallVector.h (original) +++ llvm/trunk/include/llvm/ADT/SmallVector.h Fri Jun 29 17:16:25 2007 @@ -442,7 +442,7 @@ SmallVector() : SmallVectorImpl(NumTsAvailable) { } - SmallVector(unsigned Size, const T &Value = T()) + explicit SmallVector(unsigned Size, const T &Value = T()) : SmallVectorImpl(NumTsAvailable) { this->reserve(Size); while (Size--) From asl at math.spbu.ru Fri Jun 29 18:06:02 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Fri, 29 Jun 2007 18:06:02 -0500 Subject: [llvm-commits] CVS: llvm-www/header.incl Message-ID: <200706292306.l5TN62P1020632@zion.cs.uiuc.edu> Changes in directory llvm-www: header.incl updated: 1.60 -> 1.61 --- Log message: Switch from cvsweb to ViewVC --- Diffs of the changes: (+1 -1) header.incl | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-www/header.incl diff -u llvm-www/header.incl:1.60 llvm-www/header.incl:1.61 --- llvm-www/header.incl:1.60 Fri Jun 1 11:23:59 2007 +++ llvm-www/header.incl Fri Jun 29 18:05:26 2007 @@ -113,7 +113,7 @@ Dev. Resources:
          doxygen - cvsweb
          + ViewVC
          Nightly Tester
          LLVM Bugzilla

          From asl at math.spbu.ru Fri Jun 29 18:07:48 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Fri, 29 Jun 2007 18:07:48 -0500 Subject: [llvm-commits] CVS: llvm-www/www-index.html Message-ID: <200706292307.l5TN7mX1020765@zion.cs.uiuc.edu> Changes in directory llvm-www: www-index.html updated: 1.143 -> 1.144 --- Log message: Remove cvsweb link from here. SVNify it. --- Diffs of the changes: (+1 -1) www-index.html | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-www/www-index.html diff -u llvm-www/www-index.html:1.143 llvm-www/www-index.html:1.144 --- llvm-www/www-index.html:1.143 Fri Jun 1 11:15:46 2007 +++ llvm-www/www-index.html Fri Jun 29 18:07:24 2007 @@ -69,7 +69,7 @@ href="http://www-faculty.cs.uiuc.edu/~vadve/">Vikram Adve at the University of Illinois, Urbana-Champaign. Since the first public release, LLVM has grown to include contributions from several +href="/svn/llvm-project/llvm/trunk/CREDITS.TXT">several other people! We welcome external contributions, so please send e-mail to llvmdev at cs.uiuc.edu if you are From dpatel at apple.com Fri Jun 29 18:11:49 2007 From: dpatel at apple.com (Devang Patel) Date: Fri, 29 Jun 2007 23:11:49 -0000 Subject: [llvm-commits] [llvm] r37820 - /llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp Message-ID: <200706292311.l5TNBoiA020852@zion.cs.uiuc.edu> Author: dpatel Date: Fri Jun 29 18:11:49 2007 New Revision: 37820 URL: http://llvm.org/viewvc/llvm-project?rev=37820&view=rev Log: Preserve DominanceFrontier. Modified: llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp Modified: llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp?rev=37820&r1=37819&r2=37820&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp Fri Jun 29 18:11:49 2007 @@ -84,6 +84,7 @@ AU.addRequiredID(LoopSimplifyID); AU.addPreservedID(LoopSimplifyID); AU.addPreserved(); + AU.addPreserved(); AU.addRequired(); AU.addPreserved(); AU.addRequiredID(LCSSAID); @@ -415,6 +416,9 @@ if (DominatorTree *DT = getAnalysisToUpdate()) DT->addNewBlock(New, Old); + + if (DominanceFrontier *DF = getAnalysisToUpdate()) + DF->splitBlock(Old); return New; } @@ -471,7 +475,7 @@ // If Orig is in Loop then find and use Orig dominator's cloned block as NewBB // dominator. void CloneDomInfo(BasicBlock *NewBB, BasicBlock *Orig, Loop *L, - DominatorTree *DT, + DominatorTree *DT, DominanceFrontier *DF, DenseMap &VM) { DomTreeNode *OrigNode = DT->getNode(Orig); @@ -481,7 +485,7 @@ BasicBlock *NewIDom = OrigIDom; if (L->contains(OrigIDom)) { if (!DT->getNode(OrigIDom)) - CloneDomInfo(NewIDom, OrigIDom, L, DT, VM); + CloneDomInfo(NewIDom, OrigIDom, L, DT, DF, VM); NewIDom = cast(VM[OrigIDom]); } if (NewBB == NewIDom) { @@ -489,6 +493,23 @@ DT->changeImmediateDominator(NewBB, NewIDom); } else DT->addNewBlock(NewBB, NewIDom); + + DominanceFrontier::DomSetType NewDFSet; + if (DF) { + DominanceFrontier::iterator DFI = DF->find(Orig); + if ( DFI != DF->end()) { + DominanceFrontier::DomSetType S = DFI->second; + for (DominanceFrontier::DomSetType::iterator I = S.begin(), E = S.end(); + I != E; ++I) { + BasicBlock *BB = *I; + if (L->contains(BB)) + NewDFSet.insert(cast(VM[Orig])); + else + NewDFSet.insert(BB); + } + } + DF->addBasicBlock(NewBB, NewDFSet); + } } /// CloneLoop - Recursively clone the specified loop and all of its children, @@ -532,12 +553,14 @@ BranchInst *BRI = new BranchInst(TrueDest, FalseDest, BranchVal, InsertPt); // Update dominator info. + // BranchVal is a new preheader so it dominates true and false destination + // loop headers. if (DominatorTree *DT = getAnalysisToUpdate()) { - // BranchVal is a new preheader so it dominates true and false destination - // loop headers. DT->changeImmediateDominator(TrueDest, BRI->getParent()); DT->changeImmediateDominator(FalseDest, BRI->getParent()); } + // No need to update DominanceFrontier. BRI->getParent() dominated TrueDest + // and FalseDest anyway. Now it immediately dominates them. } @@ -679,11 +702,12 @@ } // Update dominator info + DominanceFrontier *DF = getAnalysisToUpdate(); if (DominatorTree *DT = getAnalysisToUpdate()) for (unsigned i = 0, e = LoopBlocks.size(); i != e; ++i) { BasicBlock *LBB = LoopBlocks[i]; BasicBlock *NBB = NewBlocks[i]; - CloneDomInfo(NBB, LBB, L, DT, ValueMap); + CloneDomInfo(NBB, LBB, L, DT, DF, ValueMap); } // Splice the newly inserted blocks into the function right before the From asl at math.spbu.ru Fri Jun 29 18:13:42 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Fri, 29 Jun 2007 23:13:42 -0000 Subject: [llvm-commits] [llvm] r37821 - /llvm/trunk/docs/GettingStarted.html Message-ID: <200706292313.l5TNDgCV020893@zion.cs.uiuc.edu> Author: asl Date: Fri Jun 29 18:13:42 2007 New Revision: 37821 URL: http://llvm.org/viewvc/llvm-project?rev=37821&view=rev Log: Change CVS-style 'labels' to SVN 'tags' directory. Modified: llvm/trunk/docs/GettingStarted.html Modified: llvm/trunk/docs/GettingStarted.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/GettingStarted.html?rev=37821&r1=37820&r2=37821&view=diff ============================================================================== --- llvm/trunk/docs/GettingStarted.html (original) +++ llvm/trunk/docs/GettingStarted.html Fri Jun 29 18:13:42 2007 @@ -702,8 +702,8 @@ test directories, and local copies of documentation files.

          If you want to get a specific release (as opposed to the most recent -revision), you can specify a label. The following releases have the following -labels:

          +revision), you can checkout it from the 'tags' directory (instead of +'trunk'). The following releases have the following labels:

          • Release 2.0: RELEASE_20
          • From dpatel at apple.com Fri Jun 29 18:13:42 2007 From: dpatel at apple.com (Devang Patel) Date: Fri, 29 Jun 2007 23:13:42 -0000 Subject: [llvm-commits] [llvm] r37822 - in /llvm/trunk: include/llvm/Analysis/LoopPass.h lib/Analysis/LoopPass.cpp Message-ID: <200706292313.l5TNDgF3020901@zion.cs.uiuc.edu> Author: dpatel Date: Fri Jun 29 18:13:42 2007 New Revision: 37822 URL: http://llvm.org/viewvc/llvm-project?rev=37822&view=rev Log: Add loop info verification mechanism. Modified: llvm/trunk/include/llvm/Analysis/LoopPass.h llvm/trunk/lib/Analysis/LoopPass.cpp Modified: llvm/trunk/include/llvm/Analysis/LoopPass.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/LoopPass.h?rev=37822&r1=37821&r2=37822&view=diff ============================================================================== --- llvm/trunk/include/llvm/Analysis/LoopPass.h (original) +++ llvm/trunk/include/llvm/Analysis/LoopPass.h Fri Jun 29 18:13:42 2007 @@ -114,6 +114,11 @@ // queue. This allows LoopPass to change loop nest for the loop. This // utility may send LPPassManager into infinite loops so use caution. void redoLoop(Loop *L); + +private: + /// verifyLoopInfo - Verify loop nest. + void verifyLoopInfo(); + private: std::deque LQ; bool skipThisLoop; Modified: llvm/trunk/lib/Analysis/LoopPass.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoopPass.cpp?rev=37822&r1=37821&r2=37822&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/LoopPass.cpp (original) +++ llvm/trunk/lib/Analysis/LoopPass.cpp Fri Jun 29 18:13:42 2007 @@ -157,6 +157,18 @@ Info.setPreservesAll(); } +/// verifyLoopInfo - Verify loop nest. +void LPPassManager::verifyLoopInfo() { + assert (LI && "Loop Info is missing"); + + for (LoopInfo::iterator I = LI->begin(), E = LI->end(); I != E; ++I) { + Loop *L = *I; + assert (L->getHeader() && "Loop header is missing"); + assert (L->getLoopPreheader() && "Loop preheader is missing"); + assert (L->getLoopLatch() && "Loop latch is missing"); + } +} + /// run - Execute all of the passes scheduled for execution. Keep track of /// whether any of the passes modifies the function, and if so, return true. bool LPPassManager::runOnFunction(Function &F) { @@ -202,6 +214,7 @@ LoopPass *LP = dynamic_cast(P); assert (LP && "Invalid LPPassManager member"); LP->runOnLoop(CurrentLoop, *this); + verifyLoopInfo(); StopPassTimer(P); if (Changed) @@ -302,4 +315,3 @@ LPPM->add(this); } - From evan.cheng at apple.com Fri Jun 29 18:17:16 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Fri, 29 Jun 2007 23:17:16 -0000 Subject: [llvm-commits] [llvm] r37823 - /llvm/trunk/test/CodeGen/X86/2007-06-29-DAGCombinerBug.ll Message-ID: <200706292317.l5TNHGKI020984@zion.cs.uiuc.edu> Author: evancheng Date: Fri Jun 29 18:17:15 2007 New Revision: 37823 URL: http://llvm.org/viewvc/llvm-project?rev=37823&view=rev Log: New test. Added: llvm/trunk/test/CodeGen/X86/2007-06-29-DAGCombinerBug.ll Added: llvm/trunk/test/CodeGen/X86/2007-06-29-DAGCombinerBug.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2007-06-29-DAGCombinerBug.ll?rev=37823&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/2007-06-29-DAGCombinerBug.ll (added) +++ llvm/trunk/test/CodeGen/X86/2007-06-29-DAGCombinerBug.ll Fri Jun 29 18:17:15 2007 @@ -0,0 +1,50 @@ +; RUN: llvm-as < %s | | llc -march=x86 -mattr=+sse2 + +define void @test() { +entry: + br i1 false, label %bb13944.preheader, label %cond_true418 + +cond_true418: ; preds = %entry + ret void + +bb13944.preheader: ; preds = %entry + br i1 false, label %bb3517, label %bb13968.preheader + +bb3517: ; preds = %bb13944.preheader + br i1 false, label %cond_false7408, label %cond_next11422 + +cond_false7408: ; preds = %bb3517 + switch i32 0, label %cond_false10578 [ + i32 7, label %cond_next11422 + i32 6, label %cond_true7828 + i32 1, label %cond_true10095 + i32 3, label %cond_true10095 + i32 5, label %cond_true10176 + i32 24, label %cond_true10176 + ] + +cond_true7828: ; preds = %cond_false7408 + br i1 false, label %cond_next8191, label %cond_true8045 + +cond_true8045: ; preds = %cond_true7828 + ret void + +cond_next8191: ; preds = %cond_true7828 + %tmp8234 = sub <4 x i32> < i32 939524096, i32 939524096, i32 939524096, i32 939524096 >, zeroinitializer ; <<4 x i32>> [#uses=0] + ret void + +cond_true10095: ; preds = %cond_false7408, %cond_false7408 + ret void + +cond_true10176: ; preds = %cond_false7408, %cond_false7408 + ret void + +cond_false10578: ; preds = %cond_false7408 + ret void + +cond_next11422: ; preds = %cond_false7408, %bb3517 + ret void + +bb13968.preheader: ; preds = %bb13944.preheader + ret void +} From asl at math.spbu.ru Fri Jun 29 19:00:58 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Sat, 30 Jun 2007 00:00:58 -0000 Subject: [llvm-commits] [llvm] r37824 - /llvm/trunk/docs/GettingStarted.html Message-ID: <200706300000.l5U00wnY022292@zion.cs.uiuc.edu> Author: asl Date: Fri Jun 29 19:00:57 2007 New Revision: 37824 URL: http://llvm.org/viewvc/llvm-project?rev=37824&view=rev Log: Remove labels again Modified: llvm/trunk/docs/GettingStarted.html Modified: llvm/trunk/docs/GettingStarted.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/GettingStarted.html?rev=37824&r1=37823&r2=37824&view=diff ============================================================================== --- llvm/trunk/docs/GettingStarted.html (original) +++ llvm/trunk/docs/GettingStarted.html Fri Jun 29 19:00:57 2007 @@ -703,7 +703,8 @@

            If you want to get a specific release (as opposed to the most recent revision), you can checkout it from the 'tags' directory (instead of -'trunk'). The following releases have the following labels:

            +'trunk'). The following releases are located in the following + subdirectories of the 'tags' directory:

            • Release 2.0: RELEASE_20
            • From evan.cheng at apple.com Fri Jun 29 19:10:37 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Sat, 30 Jun 2007 00:10:37 -0000 Subject: [llvm-commits] [llvm] r37825 - /llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp Message-ID: <200706300010.l5U0Acac022634@zion.cs.uiuc.edu> Author: evancheng Date: Fri Jun 29 19:10:37 2007 New Revision: 37825 URL: http://llvm.org/viewvc/llvm-project?rev=37825&view=rev Log: (For Chris): Fix failure where we rejected compiling stubs when lazy compilation is disabled. Modified: llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp Modified: llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp?rev=37825&r1=37824&r2=37825&view=diff ============================================================================== --- llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp (original) +++ llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp Fri Jun 29 19:10:37 2007 @@ -618,25 +618,32 @@ "This is not a known stub!"); Function *F = (--I)->second; - // If disabled, emit a useful error message and abort. - if (TheJIT->isLazyCompilationDisabled()) { - cerr << "LLVM JIT requested to do lazy compilation of function '" - << F->getName() << "' when lazy compiles are disabled!\n"; - abort(); - } + // If we have already code generated the function, just return the address. + void *Result = TheJIT->getPointerToGlobalIfAvailable(F); + + if (!Result) { + // Otherwise we don't have it, do lazy compilation now. + + // If lazy compilation is disabled, emit a useful error message and abort. + if (TheJIT->isLazyCompilationDisabled()) { + cerr << "LLVM JIT requested to do lazy compilation of function '" + << F->getName() << "' when lazy compiles are disabled!\n"; + abort(); + } - // We might like to remove the stub from the StubToFunction map. - // We can't do that! Multiple threads could be stuck, waiting to acquire the - // lock above. As soon as the 1st function finishes compiling the function, - // the next one will be released, and needs to be able to find the function it - // needs to call. - //JR.state.getStubToFunctionMap(locked).erase(I); - - DOUT << "JIT: Lazily resolving function '" << F->getName() - << "' In stub ptr = " << Stub << " actual ptr = " - << I->first << "\n"; + // We might like to remove the stub from the StubToFunction map. + // We can't do that! Multiple threads could be stuck, waiting to acquire the + // lock above. As soon as the 1st function finishes compiling the function, + // the next one will be released, and needs to be able to find the function + // it needs to call. + //JR.state.getStubToFunctionMap(locked).erase(I); + + DOUT << "JIT: Lazily resolving function '" << F->getName() + << "' In stub ptr = " << Stub << " actual ptr = " + << I->first << "\n"; - void *Result = TheJIT->getPointerToFunction(F); + Result = TheJIT->getPointerToFunction(F); + } // We don't need to reuse this stub in the future, as F is now compiled. JR.state.getFunctionToStubMap(locked).erase(F); From sabre at nondot.org Sat Jun 30 01:53:57 2007 From: sabre at nondot.org (Chris Lattner) Date: Sat, 30 Jun 2007 06:53:57 -0000 Subject: [llvm-commits] [llvm] r37826 - /llvm/trunk/CREDITS.TXT Message-ID: <200706300653.l5U6rvQv017946@zion.cs.uiuc.edu> Author: lattner Date: Sat Jun 30 01:53:56 2007 New Revision: 37826 URL: http://llvm.org/viewvc/llvm-project?rev=37826&view=rev Log: test commit Modified: llvm/trunk/CREDITS.TXT Modified: llvm/trunk/CREDITS.TXT URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CREDITS.TXT?rev=37826&r1=37825&r2=37826&view=diff ============================================================================== --- llvm/trunk/CREDITS.TXT (original) +++ llvm/trunk/CREDITS.TXT Sat Jun 30 01:53:56 2007 @@ -231,3 +231,5 @@ W: http://web.mac.com/bwendling/ D: MMX & SSSE3 instructions D: SPEC2006 support + + From reid at x10sys.com Sat Jun 30 01:56:50 2007 From: reid at x10sys.com (Reid Spencer) Date: Sat, 30 Jun 2007 06:56:50 -0000 Subject: [llvm-commits] [llvm] r37827 - /llvm/trunk/CREDITS.TXT Message-ID: <200706300656.l5U6uoFm018077@zion.cs.uiuc.edu> Author: reid Date: Sat Jun 30 01:56:50 2007 New Revision: 37827 URL: http://llvm.org/viewvc/llvm-project?rev=37827&view=rev Log: Be slightly more explanatory about the work I've done on LLVM. Modified: llvm/trunk/CREDITS.TXT Modified: llvm/trunk/CREDITS.TXT URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CREDITS.TXT?rev=37827&r1=37826&r2=37827&view=diff ============================================================================== --- llvm/trunk/CREDITS.TXT (original) +++ llvm/trunk/CREDITS.TXT Sat Jun 30 01:56:50 2007 @@ -215,7 +215,7 @@ N: Reid Spencer E: rspencer at reidspencer.com W: http://reidspencer.com/ -D: http://wiki.llvm.org/index.php/User:Reid +D: Lots of stuff, see: http://wiki.llvm.org/index.php/User:Reid N: Adam Treat E: manyoso at yahoo.com From duraid at octopus.com.au Sat Jun 30 10:47:36 2007 From: duraid at octopus.com.au (Duraid Madina) Date: Sat, 30 Jun 2007 15:47:36 -0000 Subject: [llvm-commits] [llvm] r37828 - /llvm/trunk/CREDITS.TXT Message-ID: <200706301547.l5UFlav7008819@zion.cs.uiuc.edu> Author: duraid Date: Sat Jun 30 10:47:36 2007 New Revision: 37828 URL: http://llvm.org/viewvc/llvm-project?rev=37828&view=rev Log: take blame for bigblock RA (test SVN commit) Modified: llvm/trunk/CREDITS.TXT Modified: llvm/trunk/CREDITS.TXT URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CREDITS.TXT?rev=37828&r1=37827&r2=37828&view=diff ============================================================================== --- llvm/trunk/CREDITS.TXT (original) +++ llvm/trunk/CREDITS.TXT Sat Jun 30 10:47:36 2007 @@ -171,7 +171,7 @@ N: Duraid Madina E: duraid at octopus.com.au W: http://kinoko.c.u-tokyo.ac.jp/~duraid/ -D: IA64 backend +D: IA64 backend, BigBlock register allocator N: Michael McCracken E: michael.mccracken at gmail.com From clattner at apple.com Sat Jun 30 13:35:55 2007 From: clattner at apple.com (clattner at apple.com) Date: Sat, 30 Jun 2007 11:35:55 -0700 (PDT) Subject: [llvm-commits] [129004] Fix an assertion failure on __builtin_ia32_vec_set_v8hi with a literal integer . Message-ID: <20070630183555.5AFA0BBD5E4F@src> Revision: 129004 Author: clattner Date: 2007-06-30 11:35:54 -0700 (Sat, 30 Jun 2007) Log Message: ----------- Fix an assertion failure on __builtin_ia32_vec_set_v8hi with a literal integer. GCC produces this as 32-bit integer, not a 16-bit integer. Modified Paths: -------------- apple-local/branches/llvm/gcc/config/i386/llvm-i386.cpp Modified: apple-local/branches/llvm/gcc/config/i386/llvm-i386.cpp =================================================================== --- apple-local/branches/llvm/gcc/config/i386/llvm-i386.cpp 2007-06-30 11:28:57 UTC (rev 129003) +++ apple-local/branches/llvm/gcc/config/i386/llvm-i386.cpp 2007-06-30 18:35:54 UTC (rev 129004) @@ -448,6 +448,8 @@ Result = Builder.CreateExtractElement(Ops[0], Ops[1], "tmp"); return true; case IX86_BUILTIN_VEC_SET_V8HI: + // GCC sometimes doesn't produce the right element type. + Ops[1] = Builder.CreateIntCast(Ops[1], Type::Int16Ty, false, "tmp"); Result = Builder.CreateInsertElement(Ops[0], Ops[1], Ops[2], "tmp"); return true; case IX86_BUILTIN_CMPEQPS: From nicholas at mxc.ca Sat Jun 30 22:06:30 2007 From: nicholas at mxc.ca (Nick Lewycky) Date: Sun, 01 Jul 2007 03:06:30 -0000 Subject: [llvm-commits] [llvm] r37829 - /llvm/trunk/lib/Support/MemoryBuffer.cpp Message-ID: <200707010306.l6136U2s024560@zion.cs.uiuc.edu> Author: nicholas Date: Sat Jun 30 22:06:30 2007 New Revision: 37829 URL: http://llvm.org/viewvc/llvm-project?rev=37829&view=rev Log: Fix undefined behaviour reported by the new --enable-expensive-checks option. Modified: llvm/trunk/lib/Support/MemoryBuffer.cpp Modified: llvm/trunk/lib/Support/MemoryBuffer.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/MemoryBuffer.cpp?rev=37829&r1=37828&r2=37829&view=diff ============================================================================== --- llvm/trunk/lib/Support/MemoryBuffer.cpp (original) +++ llvm/trunk/lib/Support/MemoryBuffer.cpp Sat Jun 30 22:06:30 2007 @@ -251,8 +251,9 @@ while (size_t ReadBytes = fread(Buffer, 1, 4096*4, stdin)) FileData.insert(FileData.end(), Buffer, Buffer+ReadBytes); + FileData.push_back(0); // &FileData[Size] is invalid. So is &*FileData.end(). size_t Size = FileData.size(); MemoryBuffer *B = new STDINBufferFile(); - B->initCopyOf(&FileData[0], &FileData[Size]); + B->initCopyOf(&FileData[0], &FileData[Size-1]); return B; } From criswell at uiuc.edu Sun Jul 1 09:24:13 2007 From: criswell at uiuc.edu (John Criswell) Date: Sun, 01 Jul 2007 14:24:13 -0000 Subject: [llvm-commits] [poolalloc] r37830 - /poolalloc/trunk/README Message-ID: <200707011424.l61EODcu005373@zion.cs.uiuc.edu> Author: criswell Date: Sun Jul 1 09:24:13 2007 New Revision: 37830 URL: http://llvm.org/viewvc/llvm-project?rev=37830&view=rev Log: Test commit. Modified: poolalloc/trunk/README Modified: poolalloc/trunk/README URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/README?rev=37830&r1=37829&r2=37830&view=diff ============================================================================== --- poolalloc/trunk/README (original) +++ poolalloc/trunk/README Sun Jul 1 09:24:13 2007 @@ -69,3 +69,4 @@ about LLVM. The list is low volume. You can subscribe to it at http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev. + From reid at x10sys.com Sun Jul 1 12:02:22 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 01 Jul 2007 17:02:22 -0000 Subject: [llvm-commits] [llvm] r37835 - /llvm/trunk/docs/index.html Message-ID: <200707011702.l61H2MXO010425@zion.cs.uiuc.edu> Author: reid Date: Sun Jul 1 12:02:22 2007 New Revision: 37835 URL: http://llvm.org/viewvc/llvm-project?rev=37835&view=rev Log: Terminate the document with the right end tags. Modified: llvm/trunk/docs/index.html Modified: llvm/trunk/docs/index.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/index.html?rev=37835&r1=37834&r2=37835&view=diff ============================================================================== --- llvm/trunk/docs/index.html (original) +++ llvm/trunk/docs/index.html Sun Jul 1 12:02:22 2007 @@ -271,4 +271,4 @@ LLVM Compiler Infrastructure
              Last modified: $Date$ - +