From evan.cheng at apple.com Mon Jul 24 02:37:45 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 24 Jul 2006 02:37:45 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/X86/store_op_load_fold2.ll Message-ID: <200607240737.CAA07920@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/X86: store_op_load_fold2.ll updated: 1.1 -> 1.2 --- Log message: XFAIL for now. --- Diffs of the changes: (+1 -0) store_op_load_fold2.ll | 1 + 1 files changed, 1 insertion(+) Index: llvm/test/Regression/CodeGen/X86/store_op_load_fold2.ll diff -u llvm/test/Regression/CodeGen/X86/store_op_load_fold2.ll:1.1 llvm/test/Regression/CodeGen/X86/store_op_load_fold2.ll:1.2 --- llvm/test/Regression/CodeGen/X86/store_op_load_fold2.ll:1.1 Thu Mar 9 13:04:30 2006 +++ llvm/test/Regression/CodeGen/X86/store_op_load_fold2.ll Mon Jul 24 02:37:33 2006 @@ -2,6 +2,7 @@ ; ; FIXME: The number of (store (and (load ..) ..) ..) really should be 2. But the current hack ; only allow one of the folding to happen. +; XFAIL: * %struct.Macroblock = type { int, int, int, int, int, [8 x int], %struct.Macroblock*, %struct.Macroblock*, int, [2 x [4 x [4 x [2 x int]]]], [16 x sbyte], [16 x sbyte], int, long, [4 x int], [4 x int], long, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, short, double, int, int, int, int, int, int, int, int, int } From reid at x10sys.com Tue Jul 25 14:12:21 2006 From: reid at x10sys.com (Reid Spencer) Date: Tue, 25 Jul 2006 14:12:21 -0500 Subject: [llvm-commits] CVS: llvm/utils/GenLibDeps.pl Message-ID: <200607251912.k6PJCLlR010634@zion.cs.uiuc.edu> Changes in directory llvm/utils: GenLibDeps.pl updated: 1.8 -> 1.9 --- Log message: Add a feature for debugging library dependency cycles, -why option. This implies -flat and will produce a list of all the symbols for each library that another library depends on. Run the output through c++filt for better readability. Also, don't generate a temporary file for storing the dependent library names. Perl can handle it in a %hash. --- Diffs of the changes: (+27 -16) GenLibDeps.pl | 43 +++++++++++++++++++++++++++---------------- 1 files changed, 27 insertions(+), 16 deletions(-) Index: llvm/utils/GenLibDeps.pl diff -u llvm/utils/GenLibDeps.pl:1.8 llvm/utils/GenLibDeps.pl:1.9 --- llvm/utils/GenLibDeps.pl:1.8 Fri May 12 21:48:45 2006 +++ llvm/utils/GenLibDeps.pl Tue Jul 25 14:12:06 2006 @@ -10,12 +10,15 @@ # # Parse arguments... +my $FLAT = 0; +my $WHY = 0; while (scalar(@ARGV) and ($_ = $ARGV[0], /^[-+]/)) { shift; last if /^--$/; # Stop processing arguments on -- # List command line options here... if (/^-flat$/) { $FLAT = 1; next; } + if (/^-why/) { $WHY = 1; $FLAT = 1; next; } print "Unknown option: $_ : ignoring!\n"; } @@ -76,46 +79,54 @@ $lib_ns =~ s/(.*)\.[oa]/$1/; if ($FLAT) { print "$lib:"; + if ($WHY) { print "\n"; } } else { print "
$lib
\n"; } From rafael.espindola at gmail.com Tue Jul 25 15:17:37 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Tue, 25 Jul 2006 15:17:37 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Message-ID: <200607252017.k6PKHb8h002130@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMISelDAGToDAG.cpp updated: 1.16 -> 1.17 --- Log message: implement function calling of functions with up to 4 arguments --- Diffs of the changes: (+45 -3) ARMISelDAGToDAG.cpp | 48 +++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 45 insertions(+), 3 deletions(-) Index: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp diff -u llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.16 llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.17 --- llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.16 Sat Jul 15 20:02:57 2006 +++ llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Tue Jul 25 15:17:19 2006 @@ -75,17 +75,38 @@ assert(isTailCall == false && "tail call not supported"); SDOperand Callee = Op.getOperand(4); unsigned NumOps = (Op.getNumOperands() - 5) / 2; - assert(NumOps == 0); // Count how many bytes are to be pushed on the stack. Initially // only the link register. unsigned NumBytes = 4; + assert(NumOps <= 4); //no args on the stack + // Adjust the stack pointer for the new arguments... // These operations are automatically eliminated by the prolog/epilog pass Chain = DAG.getCALLSEQ_START(Chain, DAG.getConstant(NumBytes, MVT::i32)); + static const unsigned regs[] = { + ARM::R0, ARM::R1, ARM::R2, ARM::R3 + }; + + std::vector > RegsToPass; + + for (unsigned i = 0; i != NumOps; ++i) { + SDOperand Arg = Op.getOperand(5+2*i); + RegsToPass.push_back(std::make_pair(regs[i], Arg)); + } + + // Build a sequence of copy-to-reg nodes chained together with token chain + // and flag operands which copy the outgoing args into the appropriate regs. + SDOperand InFlag; + for (unsigned i = 0, e = RegsToPass.size(); i != e; ++i) { + Chain = DAG.getCopyToReg(Chain, RegsToPass[i].first, RegsToPass[i].second, + InFlag); + InFlag = Chain.getValue(1); + } + std::vector NodeTys; NodeTys.push_back(MVT::Other); // Returns a chain NodeTys.push_back(MVT::Flag); // Returns a flag for retval copy to use. @@ -103,14 +124,35 @@ Ops.push_back(Callee); unsigned CallOpc = ARMISD::CALL; + if (InFlag.Val) + Ops.push_back(InFlag); Chain = DAG.getNode(CallOpc, NodeTys, Ops); + InFlag = Chain.getValue(1); + + std::vector ResultVals; + NodeTys.clear(); - assert(Op.Val->getValueType(0) == MVT::Other); + // If the call has results, copy the values out of the ret val registers. + switch (Op.Val->getValueType(0)) { + default: assert(0 && "Unexpected ret value!"); + case MVT::Other: + break; + case MVT::i32: + Chain = DAG.getCopyFromReg(Chain, ARM::R0, MVT::i32, InFlag).getValue(1); + ResultVals.push_back(Chain.getValue(0)); + NodeTys.push_back(MVT::i32); + } Chain = DAG.getNode(ISD::CALLSEQ_END, MVT::Other, Chain, DAG.getConstant(NumBytes, MVT::i32)); + NodeTys.push_back(MVT::Other); + + if (ResultVals.empty()) + return Chain; - return Chain; + ResultVals.push_back(Chain); + SDOperand Res = DAG.getNode(ISD::MERGE_VALUES, NodeTys, ResultVals); + return Res.getValue(Op.ResNo); } static SDOperand LowerRET(SDOperand Op, SelectionDAG &DAG) { From rafael.espindola at gmail.com Tue Jul 25 15:17:37 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Tue, 25 Jul 2006 15:17:37 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/ARM/call.ll Message-ID: <200607252017.k6PKHb2W002133@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/ARM: call.ll added (r1.1) --- Log message: implement function calling of functions with up to 4 arguments --- Diffs of the changes: (+8 -0) call.ll | 8 ++++++++ 1 files changed, 8 insertions(+) Index: llvm/test/Regression/CodeGen/ARM/call.ll diff -c /dev/null llvm/test/Regression/CodeGen/ARM/call.ll:1.1 *** /dev/null Tue Jul 25 15:17:30 2006 --- llvm/test/Regression/CodeGen/ARM/call.ll Tue Jul 25 15:17:20 2006 *************** *** 0 **** --- 1,8 ---- + ; RUN: llvm-as < %s | llc -march=arm + void %f() { + entry: + call void %g( int 1, int 2, int 3, int 4 ) + ret void + } + + declare void %g(int, int, int, int) From evan.cheng at apple.com Tue Jul 25 15:25:54 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 25 Jul 2006 15:25:54 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86InstrInfo.cpp X86InstrSSE.td Message-ID: <200607252025.k6PKPsmI002281@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86InstrInfo.cpp updated: 1.57 -> 1.58 X86InstrSSE.td updated: 1.129 -> 1.130 --- Log message: Can't commute shufps. The high / low parts elements come from different vectors. --- Diffs of the changes: (+1 -20) X86InstrInfo.cpp | 18 ------------------ X86InstrSSE.td | 3 +-- 2 files changed, 1 insertion(+), 20 deletions(-) Index: llvm/lib/Target/X86/X86InstrInfo.cpp diff -u llvm/lib/Target/X86/X86InstrInfo.cpp:1.57 llvm/lib/Target/X86/X86InstrInfo.cpp:1.58 --- llvm/lib/Target/X86/X86InstrInfo.cpp:1.57 Tue May 30 18:34:30 2006 +++ llvm/lib/Target/X86/X86InstrInfo.cpp Tue Jul 25 15:25:40 2006 @@ -207,24 +207,6 @@ /// MachineInstr *X86InstrInfo::commuteInstruction(MachineInstr *MI) const { switch (MI->getOpcode()) { - case X86::SHUFPSrri: { // A = SHUFPSrri B,C, M -> A = SHUFPSrri C,B, rotl(M,4) - unsigned A = MI->getOperand(0).getReg(); - unsigned B = MI->getOperand(1).getReg(); - unsigned C = MI->getOperand(2).getReg(); - unsigned M = MI->getOperand(3).getImmedValue(); - if (B == C) return 0; - return BuildMI(X86::SHUFPSrri, 3, A).addReg(C).addReg(B). - addImm(((M & 0xF) << 4) | ((M & 0xF0) >> 4)); - } - case X86::SHUFPDrri: { // A = SHUFPDrri B,C, M -> A = SHUFPDrri C,B, rotl(M,1) - unsigned A = MI->getOperand(0).getReg(); - unsigned B = MI->getOperand(1).getReg(); - unsigned C = MI->getOperand(2).getReg(); - unsigned M = MI->getOperand(3).getImmedValue(); - if (B == C) return 0; - return BuildMI(X86::SHUFPDrri, 3, A).addReg(C).addReg(B). - addImm(((M & 0x1) << 1) | ((M & 0x2) >> 1)); - } case X86::SHRD16rri8: // A = SHRD16rri8 B, C, I -> A = SHLD16rri8 C, B, (16-I) case X86::SHLD16rri8: // A = SHLD16rri8 B, C, I -> A = SHRD16rri8 C, B, (16-I) case X86::SHRD32rri8: // A = SHRD32rri8 B, C, I -> A = SHLD32rri8 C, B, (32-I) Index: llvm/lib/Target/X86/X86InstrSSE.td diff -u llvm/lib/Target/X86/X86InstrSSE.td:1.129 llvm/lib/Target/X86/X86InstrSSE.td:1.130 --- llvm/lib/Target/X86/X86InstrSSE.td:1.129 Fri Jul 7 03:33:52 2006 +++ llvm/lib/Target/X86/X86InstrSSE.td Tue Jul 25 15:25:40 2006 @@ -1223,7 +1223,7 @@ // Shuffle and unpack instructions let isTwoAddress = 1 in { -let isCommutable = 1, isConvertibleToThreeAddress = 1 in // Convert to pshufd +let isConvertibleToThreeAddress = 1 in // Convert to pshufd def SHUFPSrri : PSIi8<0xC6, MRMSrcReg, (ops VR128:$dst, VR128:$src1, VR128:$src2, i32i8imm:$src3), "shufps {$src3, $src2, $dst|$dst, $src2, $src3}", @@ -1236,7 +1236,6 @@ [(set VR128:$dst, (v4f32 (vector_shuffle VR128:$src1, (load addr:$src2), SHUFP_shuffle_mask:$src3)))]>; -let isCommutable = 1 in def SHUFPDrri : PDIi8<0xC6, MRMSrcReg, (ops VR128:$dst, VR128:$src1, VR128:$src2, i8imm:$src3), "shufpd {$src3, $src2, $dst|$dst, $src2, $src3}", From evan.cheng at apple.com Tue Jul 25 15:41:11 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 25 Jul 2006 15:41:11 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/Alpha/Alpha.h AlphaCodeEmitter.cpp AlphaJITInfo.cpp AlphaJITInfo.h AlphaTargetMachine.cpp Message-ID: <200607252041.k6PKfBZm002663@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/Alpha: Alpha.h updated: 1.5 -> 1.6 AlphaCodeEmitter.cpp updated: 1.15 -> 1.16 AlphaJITInfo.cpp updated: 1.9 -> 1.10 AlphaJITInfo.h updated: 1.1 -> 1.2 AlphaTargetMachine.cpp updated: 1.26 -> 1.27 --- Log message: - Refactor the code that resolve basic block references to a TargetJITInfo method. - Added synchronizeICache() to TargetJITInfo. It is called after each block of code is emitted to flush the icache. This ensures correct execution on targets that have separate dcache and icache. - Added PPC / Mac OS X specific code to do icache flushing. --- Diffs of the changes: (+32 -25) Alpha.h | 4 +++- AlphaCodeEmitter.cpp | 34 +++++++++++----------------------- AlphaJITInfo.cpp | 16 ++++++++++++++++ AlphaJITInfo.h | 1 + AlphaTargetMachine.cpp | 2 +- 5 files changed, 32 insertions(+), 25 deletions(-) Index: llvm/lib/Target/Alpha/Alpha.h diff -u llvm/lib/Target/Alpha/Alpha.h:1.5 llvm/lib/Target/Alpha/Alpha.h:1.6 --- llvm/lib/Target/Alpha/Alpha.h:1.5 Wed Oct 19 19:28:31 2005 +++ llvm/lib/Target/Alpha/Alpha.h Tue Jul 25 15:40:54 2006 @@ -19,6 +19,7 @@ namespace llvm { + class AlphaTargetMachine; class FunctionPass; class TargetMachine; class MachineCodeEmitter; @@ -28,7 +29,8 @@ FunctionPass *createAlphaCodePrinterPass(std::ostream &OS, TargetMachine &TM); FunctionPass *createAlphaPatternInstructionSelector(TargetMachine &TM); - FunctionPass *createAlphaCodeEmitterPass(MachineCodeEmitter &MCE); + FunctionPass *createAlphaCodeEmitterPass(AlphaTargetMachine &TM, + MachineCodeEmitter &MCE); } // end namespace llvm; // Defines symbolic names for Alpha registers. This defines a mapping from Index: llvm/lib/Target/Alpha/AlphaCodeEmitter.cpp diff -u llvm/lib/Target/Alpha/AlphaCodeEmitter.cpp:1.15 llvm/lib/Target/Alpha/AlphaCodeEmitter.cpp:1.16 --- llvm/lib/Target/Alpha/AlphaCodeEmitter.cpp:1.15 Wed May 3 15:30:20 2006 +++ llvm/lib/Target/Alpha/AlphaCodeEmitter.cpp Tue Jul 25 15:40:54 2006 @@ -34,17 +34,19 @@ namespace { class AlphaCodeEmitter : public MachineFunctionPass { const AlphaInstrInfo *II; + TargetMachine &TM; MachineCodeEmitter &MCE; - std::vector > BBRefs; /// getMachineOpValue - evaluates the MachineOperand of a given MachineInstr /// int getMachineOpValue(MachineInstr &MI, MachineOperand &MO); public: - explicit AlphaCodeEmitter(MachineCodeEmitter &mce) : II(0), MCE(mce) {} - AlphaCodeEmitter(MachineCodeEmitter &mce, const AlphaInstrInfo& ii) - : II(&ii), MCE(mce) {} + explicit AlphaCodeEmitter(TargetMachine &tm, MachineCodeEmitter &mce) + : II(0), TM(tm), MCE(mce) {} + AlphaCodeEmitter(TargetMachine &tm, MachineCodeEmitter &mce, + const AlphaInstrInfo& ii) + : II(&ii), TM(tm), MCE(mce) {} bool runOnMachineFunction(MachineFunction &MF); @@ -68,34 +70,20 @@ /// createAlphaCodeEmitterPass - Return a pass that emits the collected Alpha code /// to the specified MCE object. -FunctionPass *llvm::createAlphaCodeEmitterPass(MachineCodeEmitter &MCE) { - return new AlphaCodeEmitter(MCE); +FunctionPass *llvm::createAlphaCodeEmitterPass(AlphaTargetMachine &TM, + MachineCodeEmitter &MCE) { + return new AlphaCodeEmitter(TM, MCE); } bool AlphaCodeEmitter::runOnMachineFunction(MachineFunction &MF) { II = ((AlphaTargetMachine&)MF.getTarget()).getInstrInfo(); do { - BBRefs.clear(); - MCE.startFunction(MF); for (MachineFunction::iterator I = MF.begin(), E = MF.end(); I != E; ++I) emitBasicBlock(*I); } while (MCE.finishFunction(MF)); - // Resolve all forward branches now... - for (unsigned i = 0, e = BBRefs.size(); i != e; ++i) { - unsigned* Location = - (unsigned*)MCE.getMachineBasicBlockAddress(BBRefs[i].first); - unsigned* Ref = (unsigned*)BBRefs[i].second; - intptr_t BranchTargetDisp = - (((unsigned char*)Location - (unsigned char*)Ref) >> 2) - 1; - DEBUG(std::cerr << "Fixup @ " << (void*)Ref << " to " << (void*)Location - << " Disp " << BranchTargetDisp - << " using " << (BranchTargetDisp & ((1 << 22)-1)) << "\n"); - *Ref |= (BranchTargetDisp & ((1 << 21)-1)); - } - BBRefs.clear(); return false; } @@ -227,8 +215,8 @@ Reloc, MO.getConstantPoolIndex(), Offset)); } else if (MO.isMachineBasicBlock()) { - unsigned* CurrPC = (unsigned*)(intptr_t)MCE.getCurrentPCValue(); - BBRefs.push_back(std::make_pair(MO.getMachineBasicBlock(), CurrPC)); + TM.getJITInfo()->addBBRef(MO.getMachineBasicBlock(), + MCE.getCurrentPCValue()); }else { std::cerr << "ERROR: Unknown type of MachineOperand: " << MO << "\n"; abort(); Index: llvm/lib/Target/Alpha/AlphaJITInfo.cpp diff -u llvm/lib/Target/Alpha/AlphaJITInfo.cpp:1.9 llvm/lib/Target/Alpha/AlphaJITInfo.cpp:1.10 --- llvm/lib/Target/Alpha/AlphaJITInfo.cpp:1.9 Tue May 2 14:14:47 2006 +++ llvm/lib/Target/Alpha/AlphaJITInfo.cpp Tue Jul 25 15:40:54 2006 @@ -304,3 +304,19 @@ } } } + +void AlphaJITInfo::resolveBBRefs(MachineCodeEmitter &MCE) { + // Resolve all forward branches now... + for (unsigned i = 0, e = BBRefs.size(); i != e; ++i) { + unsigned* Location = + (unsigned*)MCE.getMachineBasicBlockAddress(BBRefs[i].first); + unsigned* Ref = (unsigned*)BBRefs[i].second; + intptr_t BranchTargetDisp = + (((unsigned char*)Location - (unsigned char*)Ref) >> 2) - 1; + DEBUG(std::cerr << "Fixup @ " << (void*)Ref << " to " << (void*)Location + << " Disp " << BranchTargetDisp + << " using " << (BranchTargetDisp & ((1 << 22)-1)) << "\n"); + *Ref |= (BranchTargetDisp & ((1 << 21)-1)); + } + BBRefs.clear(); +} Index: llvm/lib/Target/Alpha/AlphaJITInfo.h diff -u llvm/lib/Target/Alpha/AlphaJITInfo.h:1.1 llvm/lib/Target/Alpha/AlphaJITInfo.h:1.2 --- llvm/lib/Target/Alpha/AlphaJITInfo.h:1.1 Fri Jul 22 15:52:16 2005 +++ llvm/lib/Target/Alpha/AlphaJITInfo.h Tue Jul 25 15:40:54 2006 @@ -47,6 +47,7 @@ /// virtual void replaceMachineCodeForFunction(void *Old, void *New); + virtual void resolveBBRefs(MachineCodeEmitter &MCE); private: static const unsigned GOToffset = 4096; Index: llvm/lib/Target/Alpha/AlphaTargetMachine.cpp diff -u llvm/lib/Target/Alpha/AlphaTargetMachine.cpp:1.26 llvm/lib/Target/Alpha/AlphaTargetMachine.cpp:1.27 --- llvm/lib/Target/Alpha/AlphaTargetMachine.cpp:1.26 Fri Jun 16 13:22:52 2006 +++ llvm/lib/Target/Alpha/AlphaTargetMachine.cpp Tue Jul 25 15:40:54 2006 @@ -138,7 +138,7 @@ bool AlphaTargetMachine::addPassesToEmitMachineCode(FunctionPassManager &PM, MachineCodeEmitter &MCE) { - PM.add(createAlphaCodeEmitterPass(MCE)); + PM.add(createAlphaCodeEmitterPass(*this, MCE)); // Delete machine code for this function PM.add(createMachineCodeDeleter()); return false; From evan.cheng at apple.com Tue Jul 25 15:41:11 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 25 Jul 2006 15:41:11 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/TargetJITInfo.h Message-ID: <200607252041.k6PKfB1T002668@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Target: TargetJITInfo.h updated: 1.7 -> 1.8 --- Log message: - Refactor the code that resolve basic block references to a TargetJITInfo method. - Added synchronizeICache() to TargetJITInfo. It is called after each block of code is emitted to flush the icache. This ensures correct execution on targets that have separate dcache and icache. - Added PPC / Mac OS X specific code to do icache flushing. --- Diffs of the changes: (+19 -0) TargetJITInfo.h | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+) Index: llvm/include/llvm/Target/TargetJITInfo.h diff -u llvm/include/llvm/Target/TargetJITInfo.h:1.7 llvm/include/llvm/Target/TargetJITInfo.h:1.8 --- llvm/include/llvm/Target/TargetJITInfo.h:1.7 Fri Jul 22 15:46:42 2005 +++ llvm/include/llvm/Target/TargetJITInfo.h Tue Jul 25 15:40:54 2006 @@ -18,10 +18,12 @@ #define LLVM_TARGET_TARGETJITINFO_H #include +#include namespace llvm { class Function; class FunctionPassManager; + class MachineBasicBlock; class MachineCodeEmitter; class MachineRelocation; @@ -81,6 +83,20 @@ assert(NumRelocs == 0 && "This target does not have relocations!"); } + /// resolveBBRefs - Resolve branches to BasicBlocks for the JIT emitted + /// function. + virtual void resolveBBRefs(MachineCodeEmitter &MCE) {} + + /// synchronizeICache - On some targets, the JIT emitted code must be + /// explicitly refetched to ensure correct execution. + virtual void synchronizeICache(const void *Addr, size_t len) {} + + /// addBBRef - Add a BasicBlock reference to be resolved after the function + /// is emitted. + void addBBRef(MachineBasicBlock *BB, intptr_t PC) { + BBRefs.push_back(std::make_pair(BB, PC)); + } + /// needsGOT - Allows a target to specify that it would like the // JIT to manage a GOT for it. bool needsGOT() const { return useGOT; } @@ -88,6 +104,9 @@ protected: bool useGOT; + // Tracks which instruction references which BasicBlock + std::vector > BBRefs; + }; } // End llvm namespace From evan.cheng at apple.com Tue Jul 25 15:41:13 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 25 Jul 2006 15:41:13 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86.h X86CodeEmitter.cpp X86ELFWriter.cpp X86JITInfo.cpp X86JITInfo.h X86TargetMachine.cpp Message-ID: <200607252041.k6PKfDnU002685@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86.h updated: 1.45 -> 1.46 X86CodeEmitter.cpp updated: 1.110 -> 1.111 X86ELFWriter.cpp updated: 1.4 -> 1.5 X86JITInfo.cpp updated: 1.23 -> 1.24 X86JITInfo.h updated: 1.8 -> 1.9 X86TargetMachine.cpp updated: 1.117 -> 1.118 --- Log message: - Refactor the code that resolve basic block references to a TargetJITInfo method. - Added synchronizeICache() to TargetJITInfo. It is called after each block of code is emitted to flush the icache. This ensures correct execution on targets that have separate dcache and icache. - Added PPC / Mac OS X specific code to do icache flushing. --- Diffs of the changes: (+26 -19) X86.h | 3 ++- X86CodeEmitter.cpp | 26 ++++++++++---------------- X86ELFWriter.cpp | 2 +- X86JITInfo.cpp | 10 ++++++++++ X86JITInfo.h | 2 ++ X86TargetMachine.cpp | 2 +- 6 files changed, 26 insertions(+), 19 deletions(-) Index: llvm/lib/Target/X86/X86.h diff -u llvm/lib/Target/X86/X86.h:1.45 llvm/lib/Target/X86/X86.h:1.46 --- llvm/lib/Target/X86/X86.h:1.45 Mon Mar 13 17:20:37 2006 +++ llvm/lib/Target/X86/X86.h Tue Jul 25 15:40:54 2006 @@ -44,7 +44,8 @@ /// createX86CodeEmitterPass - Return a pass that emits the collected X86 code /// to the specified MCE object. -FunctionPass *createX86CodeEmitterPass(MachineCodeEmitter &MCE); +FunctionPass *createX86CodeEmitterPass(X86TargetMachine &TM, + MachineCodeEmitter &MCE); /// addX86ELFObjectWriterPass - Add passes to the FPM that output the generated /// code as an ELF object file. Index: llvm/lib/Target/X86/X86CodeEmitter.cpp diff -u llvm/lib/Target/X86/X86CodeEmitter.cpp:1.110 llvm/lib/Target/X86/X86CodeEmitter.cpp:1.111 --- llvm/lib/Target/X86/X86CodeEmitter.cpp:1.110 Wed Jun 28 18:27:49 2006 +++ llvm/lib/Target/X86/X86CodeEmitter.cpp Tue Jul 25 15:40:54 2006 @@ -35,12 +35,14 @@ namespace { class VISIBILITY_HIDDEN Emitter : public MachineFunctionPass { const X86InstrInfo *II; + TargetMachine &TM; MachineCodeEmitter &MCE; - std::vector > BBRefs; public: - explicit Emitter(MachineCodeEmitter &mce) : II(0), MCE(mce) {} - Emitter(MachineCodeEmitter &mce, const X86InstrInfo& ii) - : II(&ii), MCE(mce) {} + explicit Emitter(TargetMachine &tm, MachineCodeEmitter &mce) + : II(0), TM(tm), MCE(mce) {} + Emitter(TargetMachine &tm, MachineCodeEmitter &mce, + const X86InstrInfo& ii) + : II(&ii), TM(tm), MCE(mce) {} bool runOnMachineFunction(MachineFunction &MF); @@ -71,8 +73,9 @@ /// createX86CodeEmitterPass - Return a pass that emits the collected X86 code /// to the specified MCE object. -FunctionPass *llvm::createX86CodeEmitterPass(MachineCodeEmitter &MCE) { - return new Emitter(MCE); +FunctionPass *llvm::createX86CodeEmitterPass(X86TargetMachine &TM, + MachineCodeEmitter &MCE) { + return new Emitter(TM, MCE); } bool Emitter::runOnMachineFunction(MachineFunction &MF) { @@ -82,8 +85,6 @@ II = ((X86TargetMachine&)MF.getTarget()).getInstrInfo(); do { - BBRefs.clear(); - MCE.startFunction(MF); for (MachineFunction::iterator MBB = MF.begin(), E = MF.end(); MBB != E; ++MBB) { @@ -94,13 +95,6 @@ } } while (MCE.finishFunction(MF)); - // Resolve all forward branches now. - for (unsigned i = 0, e = BBRefs.size(); i != e; ++i) { - unsigned Location = MCE.getMachineBasicBlockAddress(BBRefs[i].first); - unsigned Ref = BBRefs[i].second; - *((unsigned*)(intptr_t)Ref) = Location-Ref-4; - } - BBRefs.clear(); return false; } @@ -117,7 +111,7 @@ void Emitter::emitPCRelativeBlockAddress(MachineBasicBlock *MBB) { // Remember where this reference was and where it is to so we can // deal with it later. - BBRefs.push_back(std::make_pair(MBB, MCE.getCurrentPCValue())); + TM.getJITInfo()->addBBRef(MBB, MCE.getCurrentPCValue()); MCE.emitWordLE(0); } Index: llvm/lib/Target/X86/X86ELFWriter.cpp diff -u llvm/lib/Target/X86/X86ELFWriter.cpp:1.4 llvm/lib/Target/X86/X86ELFWriter.cpp:1.5 --- llvm/lib/Target/X86/X86ELFWriter.cpp:1.4 Wed Jun 28 18:27:49 2006 +++ llvm/lib/Target/X86/X86ELFWriter.cpp Tue Jul 25 15:40:54 2006 @@ -35,5 +35,5 @@ std::ostream &O, X86TargetMachine &TM) { X86ELFWriter *EW = new X86ELFWriter(O, TM); FPM.add(EW); - FPM.add(createX86CodeEmitterPass(EW->getMachineCodeEmitter())); + FPM.add(createX86CodeEmitterPass(TM, EW->getMachineCodeEmitter())); } Index: llvm/lib/Target/X86/X86JITInfo.cpp diff -u llvm/lib/Target/X86/X86JITInfo.cpp:1.23 llvm/lib/Target/X86/X86JITInfo.cpp:1.24 --- llvm/lib/Target/X86/X86JITInfo.cpp:1.23 Wed Jul 5 02:09:13 2006 +++ llvm/lib/Target/X86/X86JITInfo.cpp Tue Jul 25 15:40:54 2006 @@ -203,3 +203,13 @@ } } } + +void X86JITInfo::resolveBBRefs(MachineCodeEmitter &MCE) { + // Resolve all forward branches now. + for (unsigned i = 0, e = BBRefs.size(); i != e; ++i) { + unsigned Location = MCE.getMachineBasicBlockAddress(BBRefs[i].first); + intptr_t Ref = BBRefs[i].second; + *((unsigned*)Ref) = Location-Ref-4; + } + BBRefs.clear(); +} Index: llvm/lib/Target/X86/X86JITInfo.h diff -u llvm/lib/Target/X86/X86JITInfo.h:1.8 llvm/lib/Target/X86/X86JITInfo.h:1.9 --- llvm/lib/Target/X86/X86JITInfo.h:1.8 Mon Mar 13 17:20:37 2006 +++ llvm/lib/Target/X86/X86JITInfo.h Tue Jul 25 15:40:54 2006 @@ -51,6 +51,8 @@ /// referenced global symbols. virtual void relocate(void *Function, MachineRelocation *MR, unsigned NumRelocs, unsigned char* GOTBase); + + virtual void resolveBBRefs(MachineCodeEmitter &MCE); }; } Index: llvm/lib/Target/X86/X86TargetMachine.cpp diff -u llvm/lib/Target/X86/X86TargetMachine.cpp:1.117 llvm/lib/Target/X86/X86TargetMachine.cpp:1.118 --- llvm/lib/Target/X86/X86TargetMachine.cpp:1.117 Fri Jun 16 13:22:52 2006 +++ llvm/lib/Target/X86/X86TargetMachine.cpp Tue Jul 25 15:40:54 2006 @@ -194,7 +194,7 @@ bool X86TargetMachine::addPassesToEmitMachineCode(FunctionPassManager &PM, MachineCodeEmitter &MCE) { - PM.add(createX86CodeEmitterPass(MCE)); + PM.add(createX86CodeEmitterPass(*this, MCE)); // Delete machine code for this function PM.add(createMachineCodeDeleter()); return false; From evan.cheng at apple.com Tue Jul 25 15:41:14 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 25 Jul 2006 15:41:14 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp PPCJITInfo.cpp PPCJITInfo.h Message-ID: <200607252041.k6PKfE0E002696@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCCodeEmitter.cpp updated: 1.63 -> 1.64 PPCJITInfo.cpp updated: 1.24 -> 1.25 PPCJITInfo.h updated: 1.9 -> 1.10 --- Log message: - Refactor the code that resolve basic block references to a TargetJITInfo method. - Added synchronizeICache() to TargetJITInfo. It is called after each block of code is emitted to flush the icache. This ensures correct execution on targets that have separate dcache and icache. - Added PPC / Mac OS X specific code to do icache flushing. --- Diffs of the changes: (+43 -27) PPCCodeEmitter.cpp | 32 +++++--------------------------- PPCJITInfo.cpp | 35 +++++++++++++++++++++++++++++++++++ PPCJITInfo.h | 3 +++ 3 files changed, 43 insertions(+), 27 deletions(-) Index: llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp diff -u llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp:1.63 llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp:1.64 --- llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp:1.63 Wed Jul 12 16:23:20 2006 +++ llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp Tue Jul 25 15:40:54 2006 @@ -32,9 +32,6 @@ TargetMachine &TM; MachineCodeEmitter &MCE; - // Tracks which instruction references which BasicBlock - std::vector > BBRefs; - /// getMachineOpValue - evaluates the MachineOperand of a given MachineInstr /// int getMachineOpValue(MachineInstr &MI, MachineOperand &MO); @@ -80,39 +77,20 @@ return false; } +#ifdef __APPLE__ +extern "C" void sys_icache_invalidate(const void *Addr, size_t len); +#endif + bool PPCCodeEmitter::runOnMachineFunction(MachineFunction &MF) { assert((MF.getTarget().getRelocationModel() != Reloc::Default || MF.getTarget().getRelocationModel() != Reloc::Static) && "JIT relocation model must be set to static or default!"); do { - BBRefs.clear(); - MCE.startFunction(MF); for (MachineFunction::iterator BB = MF.begin(), E = MF.end(); BB != E; ++BB) emitBasicBlock(*BB); } while (MCE.finishFunction(MF)); - // Resolve branches to BasicBlocks for the entire function - for (unsigned i = 0, e = BBRefs.size(); i != e; ++i) { - intptr_t Location = MCE.getMachineBasicBlockAddress(BBRefs[i].first); - unsigned *Ref = BBRefs[i].second; - DEBUG(std::cerr << "Fixup @ " << (void*)Ref << " to " << (void*)Location - << "\n"); - unsigned Instr = *Ref; - intptr_t BranchTargetDisp = (Location - (intptr_t)Ref) >> 2; - - switch (Instr >> 26) { - default: assert(0 && "Unknown branch user!"); - case 18: // This is B or BL - *Ref |= (BranchTargetDisp & ((1 << 24)-1)) << 2; - break; - case 16: // This is BLT,BLE,BEQ,BGE,BGT,BNE, or other bcx instruction - *Ref |= (BranchTargetDisp & ((1 << 14)-1)) << 2; - break; - } - } - BBRefs.clear(); - return false; } @@ -203,7 +181,7 @@ Reloc, MO.getSymbolName(), 0)); } else if (MO.isMachineBasicBlock()) { unsigned* CurrPC = (unsigned*)(intptr_t)MCE.getCurrentPCValue(); - BBRefs.push_back(std::make_pair(MO.getMachineBasicBlock(), CurrPC)); + TM.getJITInfo()->addBBRef(MO.getMachineBasicBlock(), (intptr_t)CurrPC); } else if (MO.isConstantPoolIndex() || MO.isJumpTableIndex()) { if (MO.isConstantPoolIndex()) rv = MCE.getConstantPoolEntryAddress(MO.getConstantPoolIndex()); Index: llvm/lib/Target/PowerPC/PPCJITInfo.cpp diff -u llvm/lib/Target/PowerPC/PPCJITInfo.cpp:1.24 llvm/lib/Target/PowerPC/PPCJITInfo.cpp:1.25 --- llvm/lib/Target/PowerPC/PPCJITInfo.cpp:1.24 Wed Jul 12 16:23:20 2006 +++ llvm/lib/Target/PowerPC/PPCJITInfo.cpp Tue Jul 25 15:40:54 2006 @@ -16,7 +16,9 @@ #include "PPCRelocations.h" #include "llvm/CodeGen/MachineCodeEmitter.h" #include "llvm/Config/alloca.h" +#include "llvm/Support/Debug.h" #include +#include using namespace llvm; static TargetJITInfo::JITCompilerFn JITCompilerFunction; @@ -243,3 +245,36 @@ void PPCJITInfo::replaceMachineCodeForFunction(void *Old, void *New) { EmitBranchToAt(Old, New, false); } + +void PPCJITInfo::resolveBBRefs(MachineCodeEmitter &MCE) { + // Resolve branches to BasicBlocks for the entire function + for (unsigned i = 0, e = BBRefs.size(); i != e; ++i) { + intptr_t Location = MCE.getMachineBasicBlockAddress(BBRefs[i].first); + unsigned *Ref = (unsigned *)BBRefs[i].second; + DEBUG(std::cerr << "Fixup @ " << (void*)Ref << " to " << (void*)Location + << "\n"); + unsigned Instr = *Ref; + intptr_t BranchTargetDisp = (Location - (intptr_t)Ref) >> 2; + + switch (Instr >> 26) { + default: assert(0 && "Unknown branch user!"); + case 18: // This is B or BL + *Ref |= (BranchTargetDisp & ((1 << 24)-1)) << 2; + break; + case 16: // This is BLT,BLE,BEQ,BGE,BGT,BNE, or other bcx instruction + *Ref |= (BranchTargetDisp & ((1 << 14)-1)) << 2; + break; + } + } + BBRefs.clear(); +} + +#ifdef __APPLE__ +extern "C" void sys_icache_invalidate(const void *Addr, size_t len); +#endif + +void PPCJITInfo::synchronizeICache(const void *Addr, size_t Len) { +#ifdef __APPLE__ + sys_icache_invalidate(Addr, Len); +#endif +} Index: llvm/lib/Target/PowerPC/PPCJITInfo.h diff -u llvm/lib/Target/PowerPC/PPCJITInfo.h:1.9 llvm/lib/Target/PowerPC/PPCJITInfo.h:1.10 --- llvm/lib/Target/PowerPC/PPCJITInfo.h:1.9 Mon Mar 13 17:20:37 2006 +++ llvm/lib/Target/PowerPC/PPCJITInfo.h Tue Jul 25 15:40:54 2006 @@ -42,6 +42,9 @@ /// code. /// virtual void replaceMachineCodeForFunction(void *Old, void *New); + + virtual void resolveBBRefs(MachineCodeEmitter &MCE); + virtual void synchronizeICache(const void *Addr, size_t Len); }; } From evan.cheng at apple.com Tue Jul 25 15:41:14 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 25 Jul 2006 15:41:14 -0500 Subject: [llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp Message-ID: <200607252041.k6PKfEuG002701@zion.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine/JIT: JITEmitter.cpp updated: 1.106 -> 1.107 --- Log message: - Refactor the code that resolve basic block references to a TargetJITInfo method. - Added synchronizeICache() to TargetJITInfo. It is called after each block of code is emitted to flush the icache. This ensures correct execution on targets that have separate dcache and icache. - Added PPC / Mac OS X specific code to do icache flushing. --- Diffs of the changes: (+16 -1) JITEmitter.cpp | 17 ++++++++++++++++- 1 files changed, 16 insertions(+), 1 deletion(-) Index: llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp diff -u llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.106 llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.107 --- llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.106 Fri Jul 7 12:31:41 2006 +++ llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp Tue Jul 25 15:40:54 2006 @@ -542,6 +542,10 @@ TheJIT->updateGlobalMapping(F, Stub); } + // Invalidate the icache if necessary. + TheJIT->getJITInfo(). + synchronizeICache(Stub, MCE.getCurrentPCValue()-(intptr_t)Stub); + DEBUG(std::cerr << "JIT: Stub emitted at [" << Stub << "] for function '" << F->getName() << "'\n"); @@ -559,6 +563,11 @@ if (Stub) return Stub; Stub = TheJIT->getJITInfo().emitFunctionStub(FnAddr, MCE); + + // Invalidate the icache if necessary. + TheJIT->getJITInfo(). + synchronizeICache(Stub, MCE.getCurrentPCValue()-(intptr_t)Stub); + DEBUG(std::cerr << "JIT: Stub emitted at [" << Stub << "] for external function at '" << FnAddr << "'\n"); return Stub; @@ -747,7 +756,7 @@ // About to start emitting the machine code for the function. emitAlignment(std::max(F.getFunction()->getAlignment(), 8U)); TheJIT->updateGlobalMapping(F.getFunction(), CurBufferPtr); - + MBBLocations.clear(); } @@ -825,6 +834,12 @@ } } + // Resolve BasicaBlock references. + TheJIT->getJITInfo().resolveBBRefs(*this); + + // Invalidate the icache if necessary. + TheJIT->getJITInfo().synchronizeICache(FnStart, FnEnd-FnStart); + DEBUG(std::cerr << "JIT: Finished CodeGen of [" << (void*)FnStart << "] Function: " << F.getFunction()->getName() << ": " << (FnEnd-FnStart) << " bytes of text, " From reid at x10sys.com Tue Jul 25 15:44:55 2006 From: reid at x10sys.com (Reid Spencer) Date: Tue, 25 Jul 2006 15:44:55 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Message-ID: <200607252044.k6PKit2R002780@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: DAGCombiner.cpp updated: 1.178 -> 1.179 --- Log message: Initialize some variables the compiler warns about. --- Diffs of the changes: (+2 -2) DAGCombiner.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.178 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.179 --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.178 Fri Jul 21 03:25:53 2006 +++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Tue Jul 25 15:44:41 2006 @@ -2603,7 +2603,7 @@ bool isUnary = true; bool isSplat = true; int VecNum = -1; - unsigned BaseIdx; + unsigned BaseIdx = 0; for (unsigned i = 0; i != NumElts; ++i) if (ShufMask.getOperand(i).getOpcode() != ISD::UNDEF) { unsigned Idx = cast(ShufMask.getOperand(i))->getValue(); @@ -2722,7 +2722,7 @@ bool isUnary = true; bool isSplat = true; int VecNum = -1; - unsigned BaseIdx; + unsigned BaseIdx = 0; for (unsigned i = 0; i != NumElts; ++i) if (ShufMask.getOperand(i).getOpcode() != ISD::UNDEF) { unsigned Idx = cast(ShufMask.getOperand(i))->getValue(); From jlaskey at apple.com Tue Jul 25 18:22:14 2006 From: jlaskey at apple.com (Jim Laskey) Date: Tue, 25 Jul 2006 18:22:14 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Type.cpp Message-ID: <200607252322.k6PNME7r005735@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Type.cpp updated: 1.141 -> 1.142 --- Log message: Moving this function to a permanent home to prevent a dependency cycle created by the inline heuristic. Was preventing llvm-gcc4 from building. --- Diffs of the changes: (+19 -0) Type.cpp | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+) Index: llvm/lib/VMCore/Type.cpp diff -u llvm/lib/VMCore/Type.cpp:1.141 llvm/lib/VMCore/Type.cpp:1.142 --- llvm/lib/VMCore/Type.cpp:1.141 Wed Jun 28 16:38:54 2006 +++ llvm/lib/VMCore/Type.cpp Tue Jul 25 18:22:00 2006 @@ -33,6 +33,25 @@ AbstractTypeUser::~AbstractTypeUser() {} + +//===----------------------------------------------------------------------===// +// Type PATypeHolder Implementation +//===----------------------------------------------------------------------===// + +// This routine was moved here to resolve a cyclic dependency caused by +// inline heuristics. + +/// get - This implements the forwarding part of the union-find algorithm for +/// abstract types. Before every access to the Type*, we check to see if the +/// type we are pointing to is forwarding to a new type. If so, we drop our +/// reference to the type. +/// +Type* PATypeHolder::get() const { + const Type *NewTy = Ty->getForwardedType(); + if (!NewTy) return const_cast(Ty); + return *const_cast(this) = NewTy; +} + //===----------------------------------------------------------------------===// // Type Class Implementation //===----------------------------------------------------------------------===// From jlaskey at apple.com Tue Jul 25 18:22:15 2006 From: jlaskey at apple.com (Jim Laskey) Date: Tue, 25 Jul 2006 18:22:15 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Type.h Message-ID: <200607252322.k6PNMF0q005740@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: Type.h updated: 1.87 -> 1.88 --- Log message: Moving this function to a permanent home to prevent a dependency cycle created by the inline heuristic. Was preventing llvm-gcc4 from building. --- Diffs of the changes: (+0 -12) Type.h | 12 ------------ 1 files changed, 12 deletions(-) Index: llvm/include/llvm/Type.h diff -u llvm/include/llvm/Type.h:1.87 llvm/include/llvm/Type.h:1.88 --- llvm/include/llvm/Type.h:1.87 Wed May 31 11:03:20 2006 +++ llvm/include/llvm/Type.h Tue Jul 25 18:22:00 2006 @@ -401,18 +401,6 @@ Ty->dropRef(); } -/// get - This implements the forwarding part of the union-find algorithm for -/// abstract types. Before every access to the Type*, we check to see if the -/// type we are pointing to is forwarding to a new type. If so, we drop our -/// reference to the type. -/// -inline Type* PATypeHolder::get() const { - const Type *NewTy = Ty->getForwardedType(); - if (!NewTy) return const_cast(Ty); - return *const_cast(this) = NewTy; -} - - //===----------------------------------------------------------------------===// // Provide specializations of GraphTraits to be able to treat a type as a From pjenkins at apple.com Tue Jul 25 19:15:18 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Tue, 25 Jul 2006 19:15:18 -0500 Subject: [llvm-commits] CVS: nightlytest-serverside/NightlyTestAccept.cgi Message-ID: <200607260015.k6Q0FIi9006590@zion.cs.uiuc.edu> Changes in directory nightlytest-serverside: NightlyTestAccept.cgi updated: 1.29 -> 1.30 --- Log message: Fixed some syntax errors --- Diffs of the changes: (+6 -5) NightlyTestAccept.cgi | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) Index: nightlytest-serverside/NightlyTestAccept.cgi diff -u nightlytest-serverside/NightlyTestAccept.cgi:1.29 nightlytest-serverside/NightlyTestAccept.cgi:1.30 --- nightlytest-serverside/NightlyTestAccept.cgi:1.29 Sun Jul 23 18:12:30 2006 +++ nightlytest-serverside/NightlyTestAccept.cgi Tue Jul 25 19:15:04 2006 @@ -94,14 +94,16 @@ @ONE = split "\n", $one; @TWO = split "\n", $two; + $value=1; + my %hash_of_diff=(); foreach $x (@TWO){ - $hash_of_diff{$x}=1; + $hash_of_diff{$x}=$value; } $result=""; foreach $x (@ONE){ - if($hash_of_diff{$x}!=1){ + if($hash_of_diff{$x}!=$value){ $result.="$x\n"; } } @@ -381,8 +383,7 @@ if(%$row && ($row->{'loc'} != $_[1] || $row->{'files'} != $_[2] || $row->{'dirs'} != $_[3])){ - my $e = $dbh->prepare("insert into code (added, loc, files, dirs) ". - "values (\"$_[0]\", $_[1], $_[2], $_[3])"); + my $e = $dbh->prepare("insert into code (added, loc, files, dirs) values (\"$_[0]\", \"$_[1]\", \"$_[2]\", \"$_[3]\")"); $e->execute; } } @@ -431,7 +432,7 @@ $olden_tests="" unless $olden_tests; my @OLDEN_TESTS = split $spliton, $singlesource_tests; -my $filesincvs = param('cvs_files_count'); +my $filesincvs = param('cvs_file_count'); my $dirsincvs = param('cvs_dir_count'); my $loc = param('lines_of_code'); my $nickname = param('nickname'); From pjenkins at apple.com Tue Jul 25 20:09:38 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Tue, 25 Jul 2006 20:09:38 -0500 Subject: [llvm-commits] CVS: nightlytest-serverside/NightlyTester.php Message-ID: <200607260109.k6Q19cAd007499@zion.cs.uiuc.edu> Changes in directory nightlytest-serverside: NightlyTester.php updated: 1.2 -> 1.3 --- Log message: Added support for pulling out .a and .o files --- Diffs of the changes: (+65 -2) NightlyTester.php | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 65 insertions(+), 2 deletions(-) Index: nightlytest-serverside/NightlyTester.php diff -u nightlytest-serverside/NightlyTester.php:1.2 nightlytest-serverside/NightlyTester.php:1.3 --- nightlytest-serverside/NightlyTester.php:1.2 Thu Jul 6 13:25:11 2006 +++ nightlytest-serverside/NightlyTester.php Tue Jul 25 20:09:24 2006 @@ -145,16 +145,79 @@ return $time; } +/***************************************************** + * + * Purpose: get all the .a file sizes for a specific test + * Returns: An array with the name of the file being + * the index and the value being an array with the first + * element containing code size and the second element + * containing [debug|release] + * + *****************************************************/ +function get_a_files($mysql_link, $night_id){ + $result = mysql_query("select a_file_size from night WHERE id=$night_id") or die (mysql_error()); + $result=array(); + $files = array(); + $files = explode("\n", $result['a_file_size']); + foreach ($files as $f){ + preg_match("/(.+)\s+(.+)\s+(.+)/", $f, $matches) + $result["{$matches[0]"] = array( "{$matches[1]", "{$matches[2]" ); + } + return $result; +} + +/***************************************************** + * + * Purpose: get all the .o file sizes for a specific test + * Returns: An array with the name of the file being + * the index and the value being an array with the first + * element containing code size and the second element + * containing [debug|release] + * + *****************************************************/ +function get_o_files($mysql_link, $night_id){ + $result = mysql_query("select o_file_size from night WHERE id=$night_id") or die (mysql_error()); + $result=array(); + $files = array(); + $files = explode("\n", $result['o_file_size']); + foreach ($files as $f){ + preg_match("/(.+)\s+(.+)\s+(.+)/", $f, $matches) + $result["{$matches[0]"] = array( "{$matches[1]", "{$matches[2]" ); + } + return $result; +} + +/***************************************************** + * + * Purpose: Get a combined list of .a and .o file sizes + * Returns: + * + *****************************************************/ +function get_file_sizes($mysql_link, $night_id){ + $result = array(); + $result = merge(get_a_files($mysql_link, $night_id), get_o_files($mysql_link, $night_id)); + return $result; +} + + /***************************************************** * * Example uses of each function * *****************************************************/ -/*$mysql_link = mysql_connect("127.0.0.1","llvm","ll2002vm"); +$mysql_link = mysql_connect("127.0.0.1","llvm","ll2002vm"); mysql_select_db("nightlytestresults"); -$machine_info = getMachineInfo(21, $mysql_link); +$night_id = 534; + +$files = get_a_files($mysql_link, $night_id); + +foreach (array_keys($files) as $f){ + print "$f = > {$files['$f'][0]}
\n"; +} + +/*$machine_info = getMachineInfo(21, $mysql_link); foreach (array_keys($machine_info) as $key){ print "$key => {$machine_info["$key"]}
\n"; } From lattner at cs.uiuc.edu Wed Jul 26 01:22:49 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 26 Jul 2006 01:22:49 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/ADT/SmallVector.h Message-ID: <200607260622.k6Q6Mna5012835@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/ADT: SmallVector.h added (r1.1) --- Log message: Add a new llvm::SmallVector template, which is similar to the vector class, but contains optimizations to avoid heap allocation if the vector size is smaller than some threshold. This can significantly improve the performance of code that allocates many small vectors by eliminating tons of small malloc/free's. --- Diffs of the changes: (+196 -0) SmallVector.h | 196 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 196 insertions(+) Index: llvm/include/llvm/ADT/SmallVector.h diff -c /dev/null llvm/include/llvm/ADT/SmallVector.h:1.1 *** /dev/null Wed Jul 26 01:22:40 2006 --- llvm/include/llvm/ADT/SmallVector.h Wed Jul 26 01:22:30 2006 *************** *** 0 **** --- 1,196 ---- + //===- llvm/ADT/SmallVector.h - 'Normally small' vectors --------*- C++ -*-===// + // + // The LLVM Compiler Infrastructure + // + // This file was developed by Chris Lattner and is distributed under + // the University of Illinois Open Source License. See LICENSE.TXT for details. + // + //===----------------------------------------------------------------------===// + // + // This file defines the SmallVector class. + // + //===----------------------------------------------------------------------===// + + #ifndef LLVM_ADT_SMALLVECTOR_H + #define LLVM_ADT_SMALLVECTOR_H + + #include + #include + + namespace llvm { + + /// SmallVector - This is a 'vector' (really, a variable-sized array), optimized + /// for the case when the array is small. It contains some number of elements + /// in-place, which allows it to avoid heap allocation when the actual number of + /// elements is below that threshold. This allows normal "small" cases to be + /// fast without losing generality for large inputs. + /// + /// Note that this does not attempt to be exception safe. + /// + template + class SmallVector { + // Allocate raw space for N elements of type T. If T has a ctor or dtor, we + // don't want it to be automatically run, so we need to represent the space as + // something else. An array of char would work great, but might not be + // aligned sufficiently. Instead, we either use GCC extensions, or some + // number of union instances for the space, which guarantee maximal alignment. + union U { + double D; + long double LD; + long long L; + void *P; + }; + + /// InlineElts - These are the 'N' elements that are stored inline in the body + /// of the vector + U InlineElts[(sizeof(T)*N+sizeof(U)-1)/sizeof(U)]; + T *Begin, *End, *Capacity; + public: + // Default ctor - Initialize to empty. + SmallVector() : Begin((T*)InlineElts), End(Begin), Capacity(Begin+N) { + } + + SmallVector(const SmallVector &RHS) { + unsigned RHSSize = RHS.size(); + Begin = (T*)InlineElts; + + // Doesn't fit in the small case? Allocate space. + if (RHSSize > N) { + End = Capacity = Begin; + grow(RHSSize); + } + End = Begin+RHSSize; + Capacity = Begin+N; + std::uninitialized_copy(RHS.begin(), RHS.end(), Begin); + } + ~SmallVector() { + // If this wasn't grown from the inline copy, deallocate the old space. + if ((void*)Begin != (void*)InlineElts) + delete[] (char*)Begin; + } + + typedef size_t size_type; + typedef T* iterator; + typedef const T* const_iterator; + typedef T& reference; + typedef const T& const_reference; + + bool empty() const { return Begin == End; } + size_type size() const { return End-Begin; } + + iterator begin() { return Begin; } + const_iterator begin() const { return Begin; } + + iterator end() { return End; } + const_iterator end() const { return End; } + + reference operator[](unsigned idx) { + assert(idx < size() && "out of range reference!"); + return Begin[idx]; + } + const_reference operator[](unsigned idx) const { + assert(idx < size() && "out of range reference!"); + return Begin[idx]; + } + + reference back() { + assert(!empty() && "SmallVector is empty!"); + return end()[-1]; + } + const_reference back() const { + assert(!empty() && "SmallVector is empty!"); + return end()[-1]; + } + + void push_back(const_reference Elt) { + if (End < Capacity) { + Retry: + new (End) T(Elt); + ++End; + return; + } + grow(); + goto Retry; + } + + const SmallVector &operator=(const SmallVector &RHS) { + // Avoid self-assignment. + if (this == &RHS) return *this; + + // If we already have sufficient space, assign the common elements, then + // destroy any excess. + unsigned RHSSize = RHS.size(); + unsigned CurSize = size(); + if (CurSize >= RHSSize) { + // Assign common elements. + for (unsigned i = 0; i != RHSSize; ++i) + Begin[i] = RHS.Begin[i]; + + // Destroy excess elements. + for (unsigned i = RHSSize; i != CurSize; ++i) + Begin[i].~T(); + + // Trim. + End = Begin + RHSSize; + return *this; + } + + // If we have to grow to have enough elements, destroy the current elements. + // This allows us to avoid copying them during the grow. + if (Capacity-Begin < RHSSize) { + // Destroy current elements. + for (T *I = Begin, E = End; I != E; ++I) + I->~T(); + End = Begin; + CurSize = 0; + grow(RHSSize); + } else { + // Otherwise, use assignment for the already-constructed elements. + for (unsigned i = 0; i != CurSize; ++i) + Begin[i] = RHS.Begin[i]; + } + + // Copy construct the new elements in place. + std::uninitialized_copy(RHS.Begin+CurSize, RHS.End, Begin+CurSize); + + // Set end. + End = Begin+RHSSize; + } + + private: + /// isSmall - Return true if this is a smallvector which has not had dynamic + /// memory allocated for it. + bool isSmall() const { + return (void*)Begin == (void*)InlineElts; + } + + /// grow - double the size of the allocated memory, guaranteeing space for at + /// least one more element or MinSize if specified. + void grow(unsigned MinSize = 0) { + unsigned CurCapacity = Capacity-Begin; + unsigned CurSize = size(); + unsigned NewCapacity = 2*CurCapacity; + if (NewCapacity < MinSize) + NewCapacity = MinSize; + T *NewElts = reinterpret_cast(new char[NewCapacity*sizeof(T)]); + + // Copy the elements over. + std::uninitialized_copy(Begin, End, NewElts); + + // Destroy the original elements. + for (T *I = Begin, *E = End; I != E; ++I) + I->~T(); + + // If this wasn't grown from the inline copy, deallocate the old space. + if (!isSmall()) + delete[] (char*)Begin; + + Begin = NewElts; + End = NewElts+CurSize; + Capacity = Begin+NewCapacity*2; + } + }; + + } // End llvm namespace + + #endif From jlaskey at apple.com Wed Jul 26 04:59:20 2006 From: jlaskey at apple.com (Jim Laskey) Date: Wed, 26 Jul 2006 04:59:20 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Type.cpp Message-ID: <200607260959.k6Q9xKZ6016594@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Type.cpp updated: 1.142 -> 1.143 --- Log message: No Need to live in the past. --- Diffs of the changes: (+0 -3) Type.cpp | 3 --- 1 files changed, 3 deletions(-) Index: llvm/lib/VMCore/Type.cpp diff -u llvm/lib/VMCore/Type.cpp:1.142 llvm/lib/VMCore/Type.cpp:1.143 --- llvm/lib/VMCore/Type.cpp:1.142 Tue Jul 25 18:22:00 2006 +++ llvm/lib/VMCore/Type.cpp Wed Jul 26 04:59:01 2006 @@ -38,9 +38,6 @@ // Type PATypeHolder Implementation //===----------------------------------------------------------------------===// -// This routine was moved here to resolve a cyclic dependency caused by -// inline heuristics. - /// get - This implements the forwarding part of the union-find algorithm for /// abstract types. Before every access to the Type*, we check to see if the /// type we are pointing to is forwarding to a new type. If so, we drop our From criswell at cs.uiuc.edu Wed Jul 26 10:05:31 2006 From: criswell at cs.uiuc.edu (John Criswell) Date: Wed, 26 Jul 2006 10:05:31 -0500 Subject: [llvm-commits] CVS: llvm-poolalloc/lib/PoolAllocate/PoolAllocate.h Message-ID: <200607261505.KAA11878@choi.cs.uiuc.edu> Changes in directory llvm-poolalloc/lib/PoolAllocate: PoolAllocate.h (r1.50) removed --- Log message: Moved this to llvm-poolalloc/include/poolalloc. This allows it to be publicly accessible for inclusion in other C source files. --- Diffs of the changes: (+0 -0) 0 files changed From criswell at cs.uiuc.edu Wed Jul 26 10:08:05 2006 From: criswell at cs.uiuc.edu (John Criswell) Date: Wed, 26 Jul 2006 10:08:05 -0500 Subject: [llvm-commits] CVS: llvm-poolalloc/lib/PoolAllocate/AccessTrace.cpp Heuristic.cpp PointerCompress.cpp PoolAllocate.cpp TransformFunctionBody.cpp Message-ID: <200607261508.KAA13120@choi.cs.uiuc.edu> Changes in directory llvm-poolalloc/lib/PoolAllocate: AccessTrace.cpp updated: 1.4 -> 1.5 Heuristic.cpp updated: 1.14 -> 1.15 PointerCompress.cpp updated: 1.69 -> 1.70 PoolAllocate.cpp updated: 1.124 -> 1.125 TransformFunctionBody.cpp updated: 1.55 -> 1.56 --- Log message: Changed PoolAllocate.h to poolalloc/PoolAllocate.h since it is now a public header file. --- Diffs of the changes: (+5 -5) AccessTrace.cpp | 2 +- Heuristic.cpp | 2 +- PointerCompress.cpp | 2 +- PoolAllocate.cpp | 2 +- TransformFunctionBody.cpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) Index: llvm-poolalloc/lib/PoolAllocate/AccessTrace.cpp diff -u llvm-poolalloc/lib/PoolAllocate/AccessTrace.cpp:1.4 llvm-poolalloc/lib/PoolAllocate/AccessTrace.cpp:1.5 --- llvm-poolalloc/lib/PoolAllocate/AccessTrace.cpp:1.4 Wed Jan 25 16:07:36 2006 +++ llvm-poolalloc/lib/PoolAllocate/AccessTrace.cpp Wed Jul 26 10:07:40 2006 @@ -12,7 +12,7 @@ //===----------------------------------------------------------------------===// #define DEBUG_TYPE "pointercompress" -#include "PoolAllocate.h" +#include "poolalloc/PoolAllocate.h" #include "llvm/Analysis/DataStructure/DataStructure.h" #include "llvm/Analysis/DataStructure/DSGraph.h" #include "llvm/Instructions.h" Index: llvm-poolalloc/lib/PoolAllocate/Heuristic.cpp diff -u llvm-poolalloc/lib/PoolAllocate/Heuristic.cpp:1.14 llvm-poolalloc/lib/PoolAllocate/Heuristic.cpp:1.15 --- llvm-poolalloc/lib/PoolAllocate/Heuristic.cpp:1.14 Wed Jun 14 16:17:32 2006 +++ llvm-poolalloc/lib/PoolAllocate/Heuristic.cpp Wed Jul 26 10:07:40 2006 @@ -12,7 +12,7 @@ //===----------------------------------------------------------------------===// #include "Heuristic.h" -#include "PoolAllocate.h" +#include "poolalloc/PoolAllocate.h" #include "llvm/Instructions.h" #include "llvm/Module.h" #include "llvm/Analysis/DataStructure/DSGraphTraits.h" Index: llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp diff -u llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp:1.69 llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp:1.70 --- llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp:1.69 Fri Apr 7 16:27:10 2006 +++ llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp Wed Jul 26 10:07:40 2006 @@ -12,7 +12,7 @@ //===----------------------------------------------------------------------===// #define DEBUG_TYPE "pointercompress" -#include "PoolAllocate.h" +#include "poolalloc/PoolAllocate.h" #include "Heuristic.h" #include "llvm/Constants.h" #include "llvm/Instructions.h" Index: llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp diff -u llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.124 llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.125 --- llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.124 Mon Jun 19 09:55:28 2006 +++ llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp Wed Jul 26 10:07:40 2006 @@ -13,7 +13,7 @@ //===----------------------------------------------------------------------===// #define DEBUG_TYPE "poolalloc" -#include "PoolAllocate.h" +#include "poolalloc/PoolAllocate.h" #include "Heuristic.h" #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" Index: llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp diff -u llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.55 llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.56 --- llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.55 Tue Jun 27 22:16:43 2006 +++ llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp Wed Jul 26 10:07:40 2006 @@ -12,7 +12,7 @@ //===----------------------------------------------------------------------===// #define DEBUG_TYPE "PoolAllocator" -#include "PoolAllocate.h" +#include "poolalloc/PoolAllocate.h" #include "llvm/Analysis/DataStructure/DataStructure.h" #include "llvm/Analysis/DataStructure/DSGraph.h" #include "llvm/Analysis/DataStructure/CallTargets.h" From criswell at cs.uiuc.edu Wed Jul 26 10:37:50 2006 From: criswell at cs.uiuc.edu (John Criswell) Date: Wed, 26 Jul 2006 10:37:50 -0500 Subject: [llvm-commits] CVS: llvm-poolalloc/include/poolalloc/PoolAllocate.h Message-ID: <200607261537.KAA21112@choi.cs.uiuc.edu> Changes in directory llvm-poolalloc/include/poolalloc: PoolAllocate.h updated: 1.50 -> 1.51 --- Log message: Fix conditional compilation so that PoolRegister is defined if either SAFECODE, BOUNDS_CHECK, or both are defined. --- Diffs of the changes: (+1 -4) PoolAllocate.h | 5 +---- 1 files changed, 1 insertion(+), 4 deletions(-) Index: llvm-poolalloc/include/poolalloc/PoolAllocate.h diff -u llvm-poolalloc/include/poolalloc/PoolAllocate.h:1.50 llvm-poolalloc/include/poolalloc/PoolAllocate.h:1.51 --- llvm-poolalloc/include/poolalloc/PoolAllocate.h:1.50 Mon Jun 19 09:55:28 2006 +++ llvm-poolalloc/include/poolalloc/PoolAllocate.h Wed Jul 26 10:37:25 2006 @@ -134,10 +134,7 @@ #endif Function *PoolInit, *PoolDestroy, *PoolAlloc, *PoolRealloc, *PoolMemAlign; Function *PoolFree; -#ifdef SAFECODE - Function *PoolRegister; -#endif -#ifdef BOUNDS_CHECK +#if defined(SAFECODE) || defined(BOUNDS_CHECK) Function *PoolRegister; #endif From reid at x10sys.com Wed Jul 26 11:08:49 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 26 Jul 2006 11:08:49 -0500 Subject: [llvm-commits] CVS: nightlytest-serverside/NightlyTester.php Message-ID: <200607261608.k6QG8npR023120@zion.cs.uiuc.edu> Changes in directory nightlytest-serverside: NightlyTester.php updated: 1.3 -> 1.4 --- Log message: Eliminate syntax errors from this file. --- Diffs of the changes: (+7 -6) NightlyTester.php | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) Index: nightlytest-serverside/NightlyTester.php diff -u nightlytest-serverside/NightlyTester.php:1.3 nightlytest-serverside/NightlyTester.php:1.4 --- nightlytest-serverside/NightlyTester.php:1.3 Tue Jul 25 20:09:24 2006 +++ nightlytest-serverside/NightlyTester.php Wed Jul 26 11:08:35 2006 @@ -156,12 +156,13 @@ *****************************************************/ function get_a_files($mysql_link, $night_id){ $result = mysql_query("select a_file_size from night WHERE id=$night_id") or die (mysql_error()); - $result=array(); $files = array(); $files = explode("\n", $result['a_file_size']); + $result = array(); foreach ($files as $f){ - preg_match("/(.+)\s+(.+)\s+(.+)/", $f, $matches) - $result["{$matches[0]"] = array( "{$matches[1]", "{$matches[2]" ); + $matches = array(); + preg_match("/(.+)\s+(.+)\s+(.+)/", $f, $matches); + $result["$matches[1]"] = array("$matches[2]", "$matches[3]"); } return $result; } @@ -181,8 +182,8 @@ $files = array(); $files = explode("\n", $result['o_file_size']); foreach ($files as $f){ - preg_match("/(.+)\s+(.+)\s+(.+)/", $f, $matches) - $result["{$matches[0]"] = array( "{$matches[1]", "{$matches[2]" ); + preg_match("/(.+)\s+(.+)\s+(.+)/", $f, $matches); + $result["$matches[0]"] = array( "$matches[1]", "$matches[2]" ); } return $result; } @@ -251,4 +252,4 @@ */ -?> \ No newline at end of file +?> From reid at x10sys.com Wed Jul 26 11:18:24 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 26 Jul 2006 11:18:24 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/System/IncludeFile.h Memory.h Mutex.h Message-ID: <200607261618.k6QGIOEo023370@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/System: IncludeFile.h updated: 1.3 -> 1.4 Memory.h updated: 1.7 -> 1.8 Mutex.h updated: 1.5 -> 1.6 --- Log message: For PR780: http://llvm.org/PR780 : 1. Move IncludeFile.h to System library 2. Move IncludeFile.cpp to System library 3. #1 and #2 required to prevent cyclic library dependencies for libSystem 4. Convert all existing uses of Support/IncludeFile.h to System/IncludeFile.h 5. Add IncludeFile support to various lib/System classes. 6. Add new lib/System classes to LinkAllVMCore.h All this in an attempt to pull in lib/System to what's required for VMCore --- Diffs of the changes: (+10 -3) IncludeFile.h | 6 +++--- Memory.h | 3 +++ Mutex.h | 4 ++++ 3 files changed, 10 insertions(+), 3 deletions(-) Index: llvm/include/llvm/System/IncludeFile.h diff -u llvm/include/llvm/System/IncludeFile.h:1.3 llvm/include/llvm/System/IncludeFile.h:1.4 --- llvm/include/llvm/System/IncludeFile.h:1.3 Wed Jun 7 17:00:26 2006 +++ llvm/include/llvm/System/IncludeFile.h Wed Jul 26 11:18:00 2006 @@ -1,4 +1,4 @@ -//===- llvm/Support/IncludeFile.h - Ensure Linking Of Library ---*- C++ -*-===// +//===- llvm/System/IncludeFile.h - Ensure Linking Of Library ---*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -12,8 +12,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_SUPPORT_INCLUDEFILE_H -#define LLVM_SUPPORT_INCLUDEFILE_H +#ifndef LLVM_SYSTEM_INCLUDEFILE_H +#define LLVM_SYSTEM_INCLUDEFILE_H /// This macro is the public interface that IncludeFile.h exports. This gives /// us the option to implement the "link the definition" capability in any Index: llvm/include/llvm/System/Memory.h diff -u llvm/include/llvm/System/Memory.h:1.7 llvm/include/llvm/System/Memory.h:1.8 --- llvm/include/llvm/System/Memory.h:1.7 Fri Jul 7 12:31:17 2006 +++ llvm/include/llvm/System/Memory.h Wed Jul 26 11:18:00 2006 @@ -15,6 +15,7 @@ #define LLVM_SYSTEM_MEMORY_H #include +#include "llvm/System/IncludeFile.h" namespace llvm { namespace sys { @@ -70,4 +71,6 @@ } } +FORCE_DEFINING_FILE_TO_BE_LINKED(SystemMemory) + #endif Index: llvm/include/llvm/System/Mutex.h diff -u llvm/include/llvm/System/Mutex.h:1.5 llvm/include/llvm/System/Mutex.h:1.6 --- llvm/include/llvm/System/Mutex.h:1.5 Wed Aug 24 05:07:21 2005 +++ llvm/include/llvm/System/Mutex.h Wed Jul 26 11:18:00 2006 @@ -14,6 +14,8 @@ #ifndef LLVM_SYSTEM_MUTEX_H #define LLVM_SYSTEM_MUTEX_H +#include "llvm/System/IncludeFile.h" + namespace llvm { namespace sys @@ -81,4 +83,6 @@ } } +FORCE_DEFINING_FILE_TO_BE_LINKED(SystemMutex) + #endif From reid at x10sys.com Wed Jul 26 11:18:26 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 26 Jul 2006 11:18:26 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Verifier.cpp Message-ID: <200607261618.k6QGIQJO023390@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Verifier.cpp updated: 1.159 -> 1.160 --- Log message: For PR780: http://llvm.org/PR780 : 1. Move IncludeFile.h to System library 2. Move IncludeFile.cpp to System library 3. #1 and #2 required to prevent cyclic library dependencies for libSystem 4. Convert all existing uses of Support/IncludeFile.h to System/IncludeFile.h 5. Add IncludeFile support to various lib/System classes. 6. Add new lib/System classes to LinkAllVMCore.h All this in an attempt to pull in lib/System to what's required for VMCore --- Diffs of the changes: (+8 -7) Verifier.cpp | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-) Index: llvm/lib/VMCore/Verifier.cpp diff -u llvm/lib/VMCore/Verifier.cpp:1.159 llvm/lib/VMCore/Verifier.cpp:1.160 --- llvm/lib/VMCore/Verifier.cpp:1.159 Tue Jul 11 15:29:49 2006 +++ llvm/lib/VMCore/Verifier.cpp Wed Jul 26 11:18:00 2006 @@ -105,7 +105,7 @@ // returning back to the pass manager, or else the pass manager may try to // run other passes on the broken module. if (RealPass) - abortIfBroken(); + return abortIfBroken(); return false; } @@ -119,7 +119,7 @@ // returning back to the pass manager, or else the pass manager may try to // run other passes on the broken module. if (RealPass) - abortIfBroken(); + return abortIfBroken(); return false; } @@ -138,8 +138,7 @@ visitGlobalVariable(*I); // If the module is broken, abort at this time. - abortIfBroken(); - return false; + return abortIfBroken(); } virtual void getAnalysisUsage(AnalysisUsage &AU) const { @@ -151,7 +150,7 @@ /// abortIfBroken - If the module is broken and we are supposed to abort on /// this condition, do so. /// - void abortIfBroken() { + bool abortIfBroken() { if (Broken) { msgs << "Broken module found, "; switch (action) { @@ -162,11 +161,13 @@ case PrintMessageAction: msgs << "verification continues.\n"; std::cerr << msgs.str(); - break; + return false; case ReturnStatusAction: - break; + msgs << "compilation terminated.\n"; + return Broken; } } + return false; } From reid at x10sys.com Wed Jul 26 11:18:23 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 26 Jul 2006 11:18:23 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Support/Dwarf.h Mangler.h MathExtras.h SlowOperationInformer.h IncludeFile.h Message-ID: <200607261618.k6QGINen023334@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Support: Dwarf.h updated: 1.8 -> 1.9 Mangler.h updated: 1.20 -> 1.21 MathExtras.h updated: 1.33 -> 1.34 SlowOperationInformer.h updated: 1.8 -> 1.9 IncludeFile.h (r1.3) removed --- Log message: For PR780: http://llvm.org/PR780 : 1. Move IncludeFile.h to System library 2. Move IncludeFile.cpp to System library 3. #1 and #2 required to prevent cyclic library dependencies for libSystem 4. Convert all existing uses of Support/IncludeFile.h to System/IncludeFile.h 5. Add IncludeFile support to various lib/System classes. 6. Add new lib/System classes to LinkAllVMCore.h All this in an attempt to pull in lib/System to what's required for VMCore --- Diffs of the changes: (+12 -1) Dwarf.h | 4 ++++ Mangler.h | 2 +- MathExtras.h | 4 ++++ SlowOperationInformer.h | 3 +++ 4 files changed, 12 insertions(+), 1 deletion(-) Index: llvm/include/llvm/Support/Dwarf.h diff -u llvm/include/llvm/Support/Dwarf.h:1.8 llvm/include/llvm/Support/Dwarf.h:1.9 --- llvm/include/llvm/Support/Dwarf.h:1.8 Fri Jun 16 08:14:03 2006 +++ llvm/include/llvm/Support/Dwarf.h Wed Jul 26 11:18:00 2006 @@ -16,6 +16,8 @@ #ifndef LLVM_SUPPORT_DWARF_H #define LLVM_SUPPORT_DWARF_H +#include "llvm/System/IncludeFile.h" + namespace llvm { namespace dwarf { @@ -546,4 +548,6 @@ } // End of namespace llvm +FORCE_DEFINING_FILE_TO_BE_LINKED(SupportDwarf) + #endif Index: llvm/include/llvm/Support/Mangler.h diff -u llvm/include/llvm/Support/Mangler.h:1.20 llvm/include/llvm/Support/Mangler.h:1.21 --- llvm/include/llvm/Support/Mangler.h:1.20 Wed Jun 7 18:03:13 2006 +++ llvm/include/llvm/Support/Mangler.h Wed Jul 26 11:18:00 2006 @@ -14,7 +14,7 @@ #ifndef LLVM_SUPPORT_MANGLER_H #define LLVM_SUPPORT_MANGLER_H -#include "llvm/Support/IncludeFile.h" +#include "llvm/System/IncludeFile.h" #include #include #include Index: llvm/include/llvm/Support/MathExtras.h diff -u llvm/include/llvm/Support/MathExtras.h:1.33 llvm/include/llvm/Support/MathExtras.h:1.34 --- llvm/include/llvm/Support/MathExtras.h:1.33 Mon Jul 17 19:47:10 2006 +++ llvm/include/llvm/Support/MathExtras.h Wed Jul 26 11:18:00 2006 @@ -15,6 +15,7 @@ #define LLVM_SUPPORT_MATHEXTRAS_H #include "llvm/Support/DataTypes.h" +#include "llvm/System/IncludeFile.h" namespace llvm { @@ -306,4 +307,7 @@ } // End llvm namespace +FORCE_DEFINING_FILE_TO_BE_LINKED(SupportIsInf) +FORCE_DEFINING_FILE_TO_BE_LINKED(SupportIsNAN) + #endif Index: llvm/include/llvm/Support/SlowOperationInformer.h diff -u llvm/include/llvm/Support/SlowOperationInformer.h:1.8 llvm/include/llvm/Support/SlowOperationInformer.h:1.9 --- llvm/include/llvm/Support/SlowOperationInformer.h:1.8 Thu Jul 6 17:34:06 2006 +++ llvm/include/llvm/Support/SlowOperationInformer.h Wed Jul 26 11:18:00 2006 @@ -32,6 +32,7 @@ #include #include #include "llvm/Support/DataTypes.h" +#include "llvm/System/IncludeFile.h" namespace llvm { class SlowOperationInformer { @@ -63,3 +64,5 @@ } // end namespace llvm #endif /* SLOW_OPERATION_INFORMER_H */ + +FORCE_DEFINING_FILE_TO_BE_LINKED(SupportSlowOperationInformer) From reid at x10sys.com Wed Jul 26 11:18:24 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 26 Jul 2006 11:18:24 -0500 Subject: [llvm-commits] CVS: llvm/lib/Support/Dwarf.cpp IsInf.cpp IsNAN.cpp SlowOperationInformer.cpp IncludeFile.cpp Message-ID: <200607261618.k6QGIObJ023359@zion.cs.uiuc.edu> Changes in directory llvm/lib/Support: Dwarf.cpp updated: 1.3 -> 1.4 IsInf.cpp updated: 1.8 -> 1.9 IsNAN.cpp updated: 1.5 -> 1.6 SlowOperationInformer.cpp updated: 1.8 -> 1.9 IncludeFile.cpp (r1.1) removed --- Log message: For PR780: http://llvm.org/PR780 : 1. Move IncludeFile.h to System library 2. Move IncludeFile.cpp to System library 3. #1 and #2 required to prevent cyclic library dependencies for libSystem 4. Convert all existing uses of Support/IncludeFile.h to System/IncludeFile.h 5. Add IncludeFile support to various lib/System classes. 6. Add new lib/System classes to LinkAllVMCore.h All this in an attempt to pull in lib/System to what's required for VMCore --- Diffs of the changes: (+13 -0) Dwarf.cpp | 3 +++ IsInf.cpp | 3 +++ IsNAN.cpp | 4 ++++ SlowOperationInformer.cpp | 3 +++ 4 files changed, 13 insertions(+) Index: llvm/lib/Support/Dwarf.cpp diff -u llvm/lib/Support/Dwarf.cpp:1.3 llvm/lib/Support/Dwarf.cpp:1.4 --- llvm/lib/Support/Dwarf.cpp:1.3 Thu Jun 15 15:51:43 2006 +++ llvm/lib/Support/Dwarf.cpp Wed Jul 26 11:18:00 2006 @@ -12,6 +12,7 @@ //===----------------------------------------------------------------------===// #include "llvm/Support/Dwarf.h" +#include "llvm/System/IncludeFile.h" #include @@ -580,3 +581,5 @@ } // End of namespace dwarf. } // End of namespace llvm. + +DEFINING_FILE_FOR(SupportDwarf) Index: llvm/lib/Support/IsInf.cpp diff -u llvm/lib/Support/IsInf.cpp:1.8 llvm/lib/Support/IsInf.cpp:1.9 --- llvm/lib/Support/IsInf.cpp:1.8 Wed May 24 12:04:04 2006 +++ llvm/lib/Support/IsInf.cpp Wed Jul 26 11:18:00 2006 @@ -8,6 +8,7 @@ //===----------------------------------------------------------------------===// #include "llvm/Config/config.h" +#include "llvm/System/IncludeFile.h" #if HAVE_ISINF_IN_MATH_H # include @@ -43,3 +44,5 @@ int IsInf (double d) { return isinf (d); } } // end namespace llvm; + +DEFINING_FILE_FOR(SupportIsInf) Index: llvm/lib/Support/IsNAN.cpp diff -u llvm/lib/Support/IsNAN.cpp:1.5 llvm/lib/Support/IsNAN.cpp:1.6 --- llvm/lib/Support/IsNAN.cpp:1.5 Wed May 24 12:04:04 2006 +++ llvm/lib/Support/IsNAN.cpp Wed Jul 26 11:18:00 2006 @@ -12,6 +12,8 @@ //===----------------------------------------------------------------------===// #include "llvm/Config/config.h" +#include "llvm/System/IncludeFile.h" + #if HAVE_ISNAN_IN_MATH_H # include #elif HAVE_ISNAN_IN_CMATH @@ -32,3 +34,5 @@ int IsNAN (double d) { return isnan (d); } } // end namespace llvm; + +DEFINING_FILE_FOR(SupportIsNAN) Index: llvm/lib/Support/SlowOperationInformer.cpp diff -u llvm/lib/Support/SlowOperationInformer.cpp:1.8 llvm/lib/Support/SlowOperationInformer.cpp:1.9 --- llvm/lib/Support/SlowOperationInformer.cpp:1.8 Thu Jul 6 17:34:06 2006 +++ llvm/lib/Support/SlowOperationInformer.cpp Wed Jul 26 11:18:00 2006 @@ -12,6 +12,7 @@ //===----------------------------------------------------------------------===// #include "llvm/Support/SlowOperationInformer.h" +#include "llvm/System/IncludeFile.h" #include "llvm/System/Alarm.h" #include #include @@ -64,3 +65,5 @@ std::cout << ToPrint+OS.str() << std::flush; return false; } + +DEFINING_FILE_FOR(SupportSlowOperationInformer) From reid at x10sys.com Wed Jul 26 11:18:26 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 26 Jul 2006 11:18:26 -0500 Subject: [llvm-commits] CVS: llvm/lib/System/IncludeFile.cpp Memory.cpp Mutex.cpp Message-ID: <200607261618.k6QGIQMN023385@zion.cs.uiuc.edu> Changes in directory llvm/lib/System: IncludeFile.cpp updated: 1.1 -> 1.2 Memory.cpp updated: 1.5 -> 1.6 Mutex.cpp updated: 1.7 -> 1.8 --- Log message: For PR780: http://llvm.org/PR780 : 1. Move IncludeFile.h to System library 2. Move IncludeFile.cpp to System library 3. #1 and #2 required to prevent cyclic library dependencies for libSystem 4. Convert all existing uses of Support/IncludeFile.h to System/IncludeFile.h 5. Add IncludeFile support to various lib/System classes. 6. Add new lib/System classes to LinkAllVMCore.h All this in an attempt to pull in lib/System to what's required for VMCore --- Diffs of the changes: (+8 -3) IncludeFile.cpp | 6 +++--- Memory.cpp | 2 ++ Mutex.cpp | 3 +++ 3 files changed, 8 insertions(+), 3 deletions(-) Index: llvm/lib/System/IncludeFile.cpp diff -u llvm/lib/System/IncludeFile.cpp:1.1 llvm/lib/System/IncludeFile.cpp:1.2 --- llvm/lib/System/IncludeFile.cpp:1.1 Wed Jun 7 15:00:19 2006 +++ llvm/lib/System/IncludeFile.cpp Wed Jul 26 11:18:00 2006 @@ -1,4 +1,4 @@ -//===- lib/Support/IncludeFile.cpp - Ensure Linking Of Implementation -----===// +//===- lib/System/IncludeFile.cpp - Ensure Linking Of Implementation -----===// // // The LLVM Compiler Infrastructure // @@ -11,10 +11,10 @@ // //===----------------------------------------------------------------------===// -#include "llvm/Support/IncludeFile.h" +#include "llvm/System/IncludeFile.h" using namespace llvm; // This constructor is used to ensure linking of other modules. See the -// llvm/Support/IncludeFile.h header for details. +// llvm/System/IncludeFile.h header for details. IncludeFile::IncludeFile(void*) {} Index: llvm/lib/System/Memory.cpp diff -u llvm/lib/System/Memory.cpp:1.5 llvm/lib/System/Memory.cpp:1.6 --- llvm/lib/System/Memory.cpp:1.5 Thu May 5 17:33:05 2005 +++ llvm/lib/System/Memory.cpp Wed Jul 26 11:18:00 2006 @@ -14,6 +14,7 @@ #include "llvm/System/Memory.h" #include "llvm/Config/config.h" +#include "llvm/System/IncludeFile.h" namespace llvm { using namespace sys; @@ -33,3 +34,4 @@ #include "Win32/Memory.inc" #endif +DEFINING_FILE_FOR(SystemMemory) Index: llvm/lib/System/Mutex.cpp diff -u llvm/lib/System/Mutex.cpp:1.7 llvm/lib/System/Mutex.cpp:1.8 --- llvm/lib/System/Mutex.cpp:1.7 Mon Apr 17 12:55:40 2006 +++ llvm/lib/System/Mutex.cpp Wed Jul 26 11:18:00 2006 @@ -13,6 +13,7 @@ #include "llvm/Config/config.h" #include "llvm/System/Mutex.h" +#include "llvm/System/IncludeFile.h" //===----------------------------------------------------------------------===// //=== WARNING: Implementation here must contain only TRULY operating system @@ -157,3 +158,5 @@ #warning Neither LLVM_ON_UNIX nor LLVM_ON_WIN32 was set in System/Mutex.cpp #endif #endif + +DEFINING_FILE_FOR(SystemMutex) From reid at x10sys.com Wed Jul 26 11:18:23 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 26 Jul 2006 11:18:23 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/Makefile Message-ID: <200607261618.k6QGINet023339@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: Makefile updated: 1.6 -> 1.7 --- Log message: For PR780: http://llvm.org/PR780 : 1. Move IncludeFile.h to System library 2. Move IncludeFile.cpp to System library 3. #1 and #2 required to prevent cyclic library dependencies for libSystem 4. Convert all existing uses of Support/IncludeFile.h to System/IncludeFile.h 5. Add IncludeFile support to various lib/System classes. 6. Add new lib/System classes to LinkAllVMCore.h All this in an attempt to pull in lib/System to what's required for VMCore --- Diffs of the changes: (+1 -0) Makefile | 1 + 1 files changed, 1 insertion(+) Index: llvm/lib/CodeGen/SelectionDAG/Makefile diff -u llvm/lib/CodeGen/SelectionDAG/Makefile:1.6 llvm/lib/CodeGen/SelectionDAG/Makefile:1.7 --- llvm/lib/CodeGen/SelectionDAG/Makefile:1.6 Thu Jul 20 19:10:47 2006 +++ llvm/lib/CodeGen/SelectionDAG/Makefile Wed Jul 26 11:18:00 2006 @@ -10,5 +10,6 @@ LIBRARYNAME = LLVMSelectionDAG PARALLEL_DIRS = BUILD_ARCHIVE = 1 +DONT_BUILD_RELINKED = 1 include $(LEVEL)/Makefile.common From reid at x10sys.com Wed Jul 26 11:18:25 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 26 Jul 2006 11:18:25 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/AliasAnalysis.h Message-ID: <200607261618.k6QGIPGG023375@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: AliasAnalysis.h updated: 1.26 -> 1.27 --- Log message: For PR780: http://llvm.org/PR780 : 1. Move IncludeFile.h to System library 2. Move IncludeFile.cpp to System library 3. #1 and #2 required to prevent cyclic library dependencies for libSystem 4. Convert all existing uses of Support/IncludeFile.h to System/IncludeFile.h 5. Add IncludeFile support to various lib/System classes. 6. Add new lib/System classes to LinkAllVMCore.h All this in an attempt to pull in lib/System to what's required for VMCore --- Diffs of the changes: (+1 -1) AliasAnalysis.h | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/include/llvm/Analysis/AliasAnalysis.h diff -u llvm/include/llvm/Analysis/AliasAnalysis.h:1.26 llvm/include/llvm/Analysis/AliasAnalysis.h:1.27 --- llvm/include/llvm/Analysis/AliasAnalysis.h:1.26 Wed Jun 7 17:00:25 2006 +++ llvm/include/llvm/Analysis/AliasAnalysis.h Wed Jul 26 11:18:00 2006 @@ -31,7 +31,7 @@ #define LLVM_ANALYSIS_ALIAS_ANALYSIS_H #include "llvm/Support/CallSite.h" -#include "llvm/Support/IncludeFile.h" +#include "llvm/System/IncludeFile.h" namespace llvm { From reid at x10sys.com Wed Jul 26 11:18:24 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 26 Jul 2006 11:18:24 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/InlineAsm.h IntrinsicInst.h LinkAllVMCore.h PassSupport.h Message-ID: <200607261618.k6QGIO6w023357@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: InlineAsm.h updated: 1.12 -> 1.13 IntrinsicInst.h updated: 1.17 -> 1.18 LinkAllVMCore.h updated: 1.3 -> 1.4 PassSupport.h updated: 1.23 -> 1.24 --- Log message: For PR780: http://llvm.org/PR780 : 1. Move IncludeFile.h to System library 2. Move IncludeFile.cpp to System library 3. #1 and #2 required to prevent cyclic library dependencies for libSystem 4. Convert all existing uses of Support/IncludeFile.h to System/IncludeFile.h 5. Add IncludeFile support to various lib/System classes. 6. Add new lib/System classes to LinkAllVMCore.h All this in an attempt to pull in lib/System to what's required for VMCore --- Diffs of the changes: (+11 -5) InlineAsm.h | 2 +- IntrinsicInst.h | 2 +- LinkAllVMCore.h | 10 ++++++++-- PassSupport.h | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) Index: llvm/include/llvm/InlineAsm.h diff -u llvm/include/llvm/InlineAsm.h:1.12 llvm/include/llvm/InlineAsm.h:1.13 --- llvm/include/llvm/InlineAsm.h:1.12 Wed Jun 7 18:03:13 2006 +++ llvm/include/llvm/InlineAsm.h Wed Jul 26 11:18:00 2006 @@ -17,7 +17,7 @@ #define LLVM_INLINEASM_H #include "llvm/Value.h" -#include "llvm/Support/IncludeFile.h" +#include "llvm/System/IncludeFile.h" #include namespace llvm { Index: llvm/include/llvm/IntrinsicInst.h diff -u llvm/include/llvm/IntrinsicInst.h:1.17 llvm/include/llvm/IntrinsicInst.h:1.18 --- llvm/include/llvm/IntrinsicInst.h:1.17 Wed Jun 7 17:00:25 2006 +++ llvm/include/llvm/IntrinsicInst.h Wed Jul 26 11:18:00 2006 @@ -28,7 +28,7 @@ #include "llvm/Function.h" #include "llvm/Instructions.h" #include "llvm/Intrinsics.h" -#include "llvm/Support/IncludeFile.h" +#include "llvm/System/IncludeFile.h" namespace llvm { /// IntrinsicInst - A useful wrapper class for inspecting calls to intrinsic Index: llvm/include/llvm/LinkAllVMCore.h diff -u llvm/include/llvm/LinkAllVMCore.h:1.3 llvm/include/llvm/LinkAllVMCore.h:1.4 --- llvm/include/llvm/LinkAllVMCore.h:1.3 Wed Jun 7 18:03:13 2006 +++ llvm/include/llvm/LinkAllVMCore.h Wed Jul 26 11:18:00 2006 @@ -16,13 +16,19 @@ #ifndef LLVM_LINKALLVMCORE_H #define LLVM_LINKALLVMCORE_H -#include "llvm/Support/IncludeFile.h" -#include "llvm/Support/Mangler.h" +#include "llvm/System/IncludeFile.h" + #include "llvm/Module.h" #include "llvm/Instructions.h" #include "llvm/IntrinsicInst.h" #include "llvm/InlineAsm.h" #include "llvm/Analysis/Verifier.h" +#include "llvm/System/Memory.h" +#include "llvm/System/Mutex.h" +#include "llvm/Support/Dwarf.h" +#include "llvm/Support/Mangler.h" +#include "llvm/Support/MathExtras.h" +#include "llvm/Support/SlowOperationInformer.h" namespace { struct ForceVMCoreLinking { Index: llvm/include/llvm/PassSupport.h diff -u llvm/include/llvm/PassSupport.h:1.23 llvm/include/llvm/PassSupport.h:1.24 --- llvm/include/llvm/PassSupport.h:1.23 Wed Jun 7 15:00:19 2006 +++ llvm/include/llvm/PassSupport.h Wed Jul 26 11:18:00 2006 @@ -21,7 +21,7 @@ #ifndef LLVM_PASS_SUPPORT_H #define LLVM_PASS_SUPPORT_H -#include "llvm/Support/IncludeFile.h" +#include "llvm/System/IncludeFile.h" // No need to include Pass.h, we are being included by it! namespace llvm { From reid at x10sys.com Wed Jul 26 11:55:56 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 26 Jul 2006 11:55:56 -0500 Subject: [llvm-commits] CVS: llvm/lib/System/Alarm.cpp DynamicLibrary.cpp MappedFile.cpp Path.cpp Process.cpp Program.cpp Signals.cpp TimeValue.cpp Message-ID: <200607261655.k6QGtuFS024415@zion.cs.uiuc.edu> Changes in directory llvm/lib/System: Alarm.cpp updated: 1.1 -> 1.2 DynamicLibrary.cpp updated: 1.15 -> 1.16 MappedFile.cpp updated: 1.5 -> 1.6 Path.cpp updated: 1.20 -> 1.21 Process.cpp updated: 1.5 -> 1.6 Program.cpp updated: 1.5 -> 1.6 Signals.cpp updated: 1.5 -> 1.6 TimeValue.cpp updated: 1.6 -> 1.7 --- Log message: For PR780: http://llvm.org/PR780 : Put the rest of lib/System into LinkAllVMCore.h. This makes all of lib/System available to programs that #include LinkALlVMCore.h so that loadable modules linked into those programs can depend on all of lib/System being available. --- Diffs of the changes: (+10 -0) Alarm.cpp | 1 + DynamicLibrary.cpp | 2 ++ MappedFile.cpp | 1 + Path.cpp | 2 ++ Process.cpp | 1 + Program.cpp | 1 + Signals.cpp | 1 + TimeValue.cpp | 1 + 8 files changed, 10 insertions(+) Index: llvm/lib/System/Alarm.cpp diff -u llvm/lib/System/Alarm.cpp:1.1 llvm/lib/System/Alarm.cpp:1.2 --- llvm/lib/System/Alarm.cpp:1.1 Wed Dec 21 21:23:46 2005 +++ llvm/lib/System/Alarm.cpp Wed Jul 26 11:55:39 2006 @@ -32,3 +32,4 @@ #include "Win32/Alarm.inc" #endif +DEFINING_FILE_FOR(SystemAlarm) Index: llvm/lib/System/DynamicLibrary.cpp diff -u llvm/lib/System/DynamicLibrary.cpp:1.15 llvm/lib/System/DynamicLibrary.cpp:1.16 --- llvm/lib/System/DynamicLibrary.cpp:1.15 Fri Jul 7 12:12:36 2006 +++ llvm/lib/System/DynamicLibrary.cpp Wed Jul 26 11:55:39 2006 @@ -173,3 +173,5 @@ } #endif // LLVM_ON_WIN32 + +DEFINING_FILE_FOR(SystemDynamicLibrary) Index: llvm/lib/System/MappedFile.cpp diff -u llvm/lib/System/MappedFile.cpp:1.5 llvm/lib/System/MappedFile.cpp:1.6 --- llvm/lib/System/MappedFile.cpp:1.5 Thu May 5 17:33:05 2005 +++ llvm/lib/System/MappedFile.cpp Wed Jul 26 11:55:39 2006 @@ -32,3 +32,4 @@ #include "Win32/MappedFile.inc" #endif +DEFINING_FILE_FOR(SystemMappedFile) Index: llvm/lib/System/Path.cpp diff -u llvm/lib/System/Path.cpp:1.20 llvm/lib/System/Path.cpp:1.21 --- llvm/lib/System/Path.cpp:1.20 Fri Jul 7 13:11:32 2006 +++ llvm/lib/System/Path.cpp Wed Jul 26 11:55:39 2006 @@ -107,3 +107,5 @@ #if defined(LLVM_ON_WIN32) #include "Win32/Path.inc" #endif + +DEFINING_FILE_FOR(SystemPath) Index: llvm/lib/System/Process.cpp diff -u llvm/lib/System/Process.cpp:1.5 llvm/lib/System/Process.cpp:1.6 --- llvm/lib/System/Process.cpp:1.5 Thu May 5 17:33:05 2005 +++ llvm/lib/System/Process.cpp Wed Jul 26 11:55:39 2006 @@ -32,3 +32,4 @@ #include "Win32/Process.inc" #endif +DEFINING_FILE_FOR(SystemProcess) Index: llvm/lib/System/Program.cpp diff -u llvm/lib/System/Program.cpp:1.5 llvm/lib/System/Program.cpp:1.6 --- llvm/lib/System/Program.cpp:1.5 Thu May 5 17:33:05 2005 +++ llvm/lib/System/Program.cpp Wed Jul 26 11:55:39 2006 @@ -32,3 +32,4 @@ #include "Win32/Program.inc" #endif +DEFINING_FILE_FOR(SystemProgram) Index: llvm/lib/System/Signals.cpp diff -u llvm/lib/System/Signals.cpp:1.5 llvm/lib/System/Signals.cpp:1.6 --- llvm/lib/System/Signals.cpp:1.5 Thu May 5 17:33:05 2005 +++ llvm/lib/System/Signals.cpp Wed Jul 26 11:55:39 2006 @@ -33,3 +33,4 @@ #include "Win32/Signals.inc" #endif +DEFINING_FILE_FOR(SystemSignals) Index: llvm/lib/System/TimeValue.cpp diff -u llvm/lib/System/TimeValue.cpp:1.6 llvm/lib/System/TimeValue.cpp:1.7 --- llvm/lib/System/TimeValue.cpp:1.6 Thu May 5 17:33:05 2005 +++ llvm/lib/System/TimeValue.cpp Wed Jul 26 11:55:39 2006 @@ -56,3 +56,4 @@ #include "Win32/TimeValue.inc" #endif +DEFINING_FILE_FOR(SystemTimeValue) From reid at x10sys.com Wed Jul 26 11:55:54 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 26 Jul 2006 11:55:54 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/LinkAllVMCore.h Message-ID: <200607261655.k6QGtsWu024377@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: LinkAllVMCore.h updated: 1.4 -> 1.5 --- Log message: For PR780: http://llvm.org/PR780 : Put the rest of lib/System into LinkAllVMCore.h. This makes all of lib/System available to programs that #include LinkALlVMCore.h so that loadable modules linked into those programs can depend on all of lib/System being available. --- Diffs of the changes: (+8 -0) LinkAllVMCore.h | 8 ++++++++ 1 files changed, 8 insertions(+) Index: llvm/include/llvm/LinkAllVMCore.h diff -u llvm/include/llvm/LinkAllVMCore.h:1.4 llvm/include/llvm/LinkAllVMCore.h:1.5 --- llvm/include/llvm/LinkAllVMCore.h:1.4 Wed Jul 26 11:18:00 2006 +++ llvm/include/llvm/LinkAllVMCore.h Wed Jul 26 11:55:39 2006 @@ -23,8 +23,16 @@ #include "llvm/IntrinsicInst.h" #include "llvm/InlineAsm.h" #include "llvm/Analysis/Verifier.h" +#include "llvm/System/Alarm.h" +#include "llvm/System/DynamicLibrary.h" +#include "llvm/System/MappedFile.h" #include "llvm/System/Memory.h" #include "llvm/System/Mutex.h" +#include "llvm/System/Path.h" +#include "llvm/System/Process.h" +#include "llvm/System/Program.h" +#include "llvm/System/Signals.h" +#include "llvm/System/TimeValue.h" #include "llvm/Support/Dwarf.h" #include "llvm/Support/Mangler.h" #include "llvm/Support/MathExtras.h" From reid at x10sys.com Wed Jul 26 11:55:56 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 26 Jul 2006 11:55:56 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/System/Alarm.h DynamicLibrary.h MappedFile.h Path.h Process.h Program.h Signals.h TimeValue.h Message-ID: <200607261655.k6QGtum3024400@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/System: Alarm.h updated: 1.2 -> 1.3 DynamicLibrary.h updated: 1.7 -> 1.8 MappedFile.h updated: 1.9 -> 1.10 Path.h updated: 1.30 -> 1.31 Process.h updated: 1.9 -> 1.10 Program.h updated: 1.10 -> 1.11 Signals.h updated: 1.16 -> 1.17 TimeValue.h updated: 1.14 -> 1.15 --- Log message: For PR780: http://llvm.org/PR780 : Put the rest of lib/System into LinkAllVMCore.h. This makes all of lib/System available to programs that #include LinkALlVMCore.h so that loadable modules linked into those programs can depend on all of lib/System being available. --- Diffs of the changes: (+21 -0) Alarm.h | 4 ++++ DynamicLibrary.h | 3 +++ MappedFile.h | 2 ++ Path.h | 2 ++ Process.h | 2 ++ Program.h | 2 ++ Signals.h | 3 +++ TimeValue.h | 3 +++ 8 files changed, 21 insertions(+) Index: llvm/include/llvm/System/Alarm.h diff -u llvm/include/llvm/System/Alarm.h:1.2 llvm/include/llvm/System/Alarm.h:1.3 --- llvm/include/llvm/System/Alarm.h:1.2 Wed Dec 21 21:57:15 2005 +++ llvm/include/llvm/System/Alarm.h Wed Jul 26 11:55:39 2006 @@ -17,6 +17,8 @@ #ifndef LLVM_SYSTEM_ALARM_H #define LLVM_SYSTEM_ALARM_H +#include "llvm/System/IncludeFile.h" + namespace llvm { namespace sys { @@ -42,4 +44,6 @@ } // End sys namespace } // End llvm namespace +FORCE_DEFINING_FILE_TO_BE_LINKED(SystemAlarm) + #endif Index: llvm/include/llvm/System/DynamicLibrary.h diff -u llvm/include/llvm/System/DynamicLibrary.h:1.7 llvm/include/llvm/System/DynamicLibrary.h:1.8 --- llvm/include/llvm/System/DynamicLibrary.h:1.7 Fri Jul 7 12:11:51 2006 +++ llvm/include/llvm/System/DynamicLibrary.h Wed Jul 26 11:55:39 2006 @@ -15,6 +15,7 @@ #define LLVM_SYSTEM_DYNAMIC_LIBRARY_H #include "llvm/System/Path.h" +#include "llvm/System/IncludeFile.h" #include namespace llvm { @@ -125,4 +126,6 @@ } // End sys namespace } // End llvm namespace +FORCE_DEFINING_FILE_TO_BE_LINKED(SystemDynamicLibrary) + #endif // LLVM_SYSTEM_DYNAMIC_LIBRARY_H Index: llvm/include/llvm/System/MappedFile.h diff -u llvm/include/llvm/System/MappedFile.h:1.9 llvm/include/llvm/System/MappedFile.h:1.10 --- llvm/include/llvm/System/MappedFile.h:1.9 Wed Feb 22 10:23:43 2006 +++ llvm/include/llvm/System/MappedFile.h Wed Jul 26 11:55:39 2006 @@ -15,6 +15,7 @@ #define LLVM_SYSTEM_MAPPEDFILE_H #include "llvm/System/Path.h" +#include "llvm/System/IncludeFile.h" namespace llvm { namespace sys { @@ -152,5 +153,6 @@ } } +FORCE_DEFINING_FILE_TO_BE_LINKED(SystemMappedFile) #endif Index: llvm/include/llvm/System/Path.h diff -u llvm/include/llvm/System/Path.h:1.30 llvm/include/llvm/System/Path.h:1.31 --- llvm/include/llvm/System/Path.h:1.30 Fri Jul 7 13:10:59 2006 +++ llvm/include/llvm/System/Path.h Wed Jul 26 11:55:39 2006 @@ -15,6 +15,7 @@ #define LLVM_SYSTEM_PATH_H #include "llvm/System/TimeValue.h" +#include "llvm/System/IncludeFile.h" #include #include #include @@ -571,4 +572,5 @@ } +FORCE_DEFINING_FILE_TO_BE_LINKED(SystemPath) #endif Index: llvm/include/llvm/System/Process.h diff -u llvm/include/llvm/System/Process.h:1.9 llvm/include/llvm/System/Process.h:1.10 --- llvm/include/llvm/System/Process.h:1.9 Wed Jul 27 00:53:43 2005 +++ llvm/include/llvm/System/Process.h Wed Jul 26 11:55:39 2006 @@ -15,6 +15,7 @@ #define LLVM_SYSTEM_PROCESS_H #include "llvm/System/TimeValue.h" +#include "llvm/System/IncludeFile.h" namespace llvm { namespace sys { @@ -99,5 +100,6 @@ } } +FORCE_DEFINING_FILE_TO_BE_LINKED(SystemProcess) #endif Index: llvm/include/llvm/System/Program.h diff -u llvm/include/llvm/System/Program.h:1.10 llvm/include/llvm/System/Program.h:1.11 --- llvm/include/llvm/System/Program.h:1.10 Wed Jun 7 18:18:33 2006 +++ llvm/include/llvm/System/Program.h Wed Jul 26 11:55:39 2006 @@ -15,6 +15,7 @@ #define LLVM_SYSTEM_PROGRAM_H #include "llvm/System/Path.h" +#include "llvm/System/IncludeFile.h" #include namespace llvm { @@ -82,5 +83,6 @@ } } +FORCE_DEFINING_FILE_TO_BE_LINKED(SystemProgram) #endif Index: llvm/include/llvm/System/Signals.h diff -u llvm/include/llvm/System/Signals.h:1.16 llvm/include/llvm/System/Signals.h:1.17 --- llvm/include/llvm/System/Signals.h:1.16 Mon Aug 1 22:04:47 2005 +++ llvm/include/llvm/System/Signals.h Wed Jul 26 11:55:39 2006 @@ -16,6 +16,7 @@ #define LLVM_SYSTEM_SIGNALS_H #include "llvm/System/Path.h" +#include "llvm/System/IncludeFile.h" namespace llvm { namespace sys { @@ -49,4 +50,6 @@ } // End sys namespace } // End llvm namespace +FORCE_DEFINING_FILE_TO_BE_LINKED(SystemSignals) + #endif Index: llvm/include/llvm/System/TimeValue.h diff -u llvm/include/llvm/System/TimeValue.h:1.14 llvm/include/llvm/System/TimeValue.h:1.15 --- llvm/include/llvm/System/TimeValue.h:1.14 Wed Feb 22 10:23:43 2006 +++ llvm/include/llvm/System/TimeValue.h Wed Jul 26 11:55:39 2006 @@ -12,6 +12,7 @@ //===----------------------------------------------------------------------===// #include "llvm/Support/DataTypes.h" +#include "llvm/System/IncludeFile.h" #include #ifndef LLVM_SYSTEM_TIMEVALUE_H @@ -380,4 +381,6 @@ } } +FORCE_DEFINING_FILE_TO_BE_LINKED(SystemTimeValue) + #endif From reid at x10sys.com Wed Jul 26 12:06:16 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 26 Jul 2006 12:06:16 -0500 Subject: [llvm-commits] CVS: llvm/tools/Makefile Message-ID: <200607261706.k6QH6G46024675@zion.cs.uiuc.edu> Changes in directory llvm/tools: Makefile updated: 1.48 -> 1.49 --- Log message: Build llvm-config to identify library cycles earlier in the build process. --- Diffs of the changes: (+3 -3) Makefile | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/tools/Makefile diff -u llvm/tools/Makefile:1.48 llvm/tools/Makefile:1.49 --- llvm/tools/Makefile:1.48 Tue May 30 16:20:55 2006 +++ llvm/tools/Makefile Wed Jul 26 12:06:02 2006 @@ -8,9 +8,9 @@ ##===----------------------------------------------------------------------===## LEVEL := .. -PARALLEL_DIRS := llvm-as llvm-dis opt gccas llc llvm-link lli gccld llvm-stub \ - analyze llvm-extract llvm-nm llvm-prof llvm-ar llvm-ranlib \ - llvm-bcanalyzer llvmc llvm-ld llvm-db bugpoint llvm-config +PARALLEL_DIRS := llvm-config llvm-as llvm-dis opt gccas llc llvm-link lli gccld\ + llvm-stub analyze llvm-extract llvm-nm llvm-prof llvm-ar \ + llvm-ranlib llvm-bcanalyzer llvmc llvm-ld llvm-db bugpoint OPTIONAL_DIRS := llvm2cpp From reid at x10sys.com Wed Jul 26 12:11:08 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 26 Jul 2006 12:11:08 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvm-config/Makefile find-cycles.pl Message-ID: <200607261711.k6QHB8rC024761@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-config: Makefile updated: 1.11 -> 1.12 find-cycles.pl updated: 1.2 -> 1.3 --- Log message: Make changes necessary for stopping the build if a cyclic library dependency is found. The find-cycles.pl script now exits with a return code that equals the number of cycles found. The Makefile was changed to ignore the status code of find-cycles.pl. This should be removed once the libraries are free of cyclic dependencies. --- Diffs of the changes: (+4 -2) Makefile | 2 +- find-cycles.pl | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) Index: llvm/tools/llvm-config/Makefile diff -u llvm/tools/llvm-config/Makefile:1.11 llvm/tools/llvm-config/Makefile:1.12 --- llvm/tools/llvm-config/Makefile:1.11 Thu Jul 6 19:46:18 2006 +++ llvm/tools/llvm-config/Makefile Wed Jul 26 12:10:54 2006 @@ -39,7 +39,7 @@ # don't have to process them at runtime. $(FinalLibDeps): find-cycles.pl $(LibDeps) $(Echo) "Finding cyclic dependencies between LLVM libraries." - $(Verb) $(PERL) $< < $(LibDeps) > $@ + -$(Verb) $(PERL) $< < $(LibDeps) > $@ # Rerun our configure substitutions as needed. ConfigInIn = $(PROJ_SRC_DIR)/llvm-config.in.in Index: llvm/tools/llvm-config/find-cycles.pl diff -u llvm/tools/llvm-config/find-cycles.pl:1.2 llvm/tools/llvm-config/find-cycles.pl:1.3 --- llvm/tools/llvm-config/find-cycles.pl:1.2 Thu Mar 23 17:21:29 2006 +++ llvm/tools/llvm-config/find-cycles.pl Wed Jul 26 12:10:54 2006 @@ -40,6 +40,7 @@ # Print out the finished cycles, with their dependencies. my @output; +my $cycles_found = 0; foreach my $cycle (@CYCLES) { my @modules = sort keys %{$cycle}; @@ -57,6 +58,7 @@ # Warn about possible linker problems. my @archives = grep(/\.a$/, @modules); if (@archives > 1) { + $cycles_found = $cycles_found + 1; print STDERR "find-cycles.pl: Circular dependency between *.a files:\n"; print STDERR "find-cycles.pl: ", join(' ', @archives), "\n"; print STDERR "find-cycles.pl: Some linkers may have problems.\n"; @@ -68,7 +70,7 @@ join(' ', sort keys %dependencies) . "\n"); } print sort @output; - +exit $cycles_found; #========================================================================== # Depedency Cycle Support From pjenkins at apple.com Wed Jul 26 12:14:48 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Wed, 26 Jul 2006 12:14:48 -0500 Subject: [llvm-commits] CVS: nightlytest-serverside/NightlyTester.php Message-ID: <200607261714.k6QHEm1Z024904@zion.cs.uiuc.edu> Changes in directory nightlytest-serverside: NightlyTester.php updated: 1.4 -> 1.5 --- Log message: Fixed the get_a_files and get_o_files functions --- Diffs of the changes: (+22 -17) NightlyTester.php | 39 ++++++++++++++++++++++----------------- 1 files changed, 22 insertions(+), 17 deletions(-) Index: nightlytest-serverside/NightlyTester.php diff -u nightlytest-serverside/NightlyTester.php:1.4 nightlytest-serverside/NightlyTester.php:1.5 --- nightlytest-serverside/NightlyTester.php:1.4 Wed Jul 26 11:08:35 2006 +++ nightlytest-serverside/NightlyTester.php Wed Jul 26 12:14:34 2006 @@ -12,6 +12,7 @@ 'teststats_unexpfail' => 'Unexpected Test Failures', 'teststats_expfail' => 'Expected Test Failurs'); + /***************************************************** * * Purpose: Get information about a certain machine @@ -155,14 +156,14 @@ * *****************************************************/ function get_a_files($mysql_link, $night_id){ - $result = mysql_query("select a_file_size from night WHERE id=$night_id") or die (mysql_error()); - $files = array(); - $files = explode("\n", $result['a_file_size']); + $query = mysql_query("select a_file_size from night WHERE id=$night_id") or die (mysql_error()); + $result = mysql_fetch_array($query); + $files = explode("\n", trim($result['a_file_size'])); $result = array(); foreach ($files as $f){ - $matches = array(); + $matches = array(); preg_match("/(.+)\s+(.+)\s+(.+)/", $f, $matches); - $result["$matches[1]"] = array("$matches[2]", "$matches[3]"); + $result["$matches[2]"] = array("$matches[1]", "$matches[3]"); } return $result; } @@ -177,13 +178,14 @@ * *****************************************************/ function get_o_files($mysql_link, $night_id){ - $result = mysql_query("select o_file_size from night WHERE id=$night_id") or die (mysql_error()); - $result=array(); - $files = array(); - $files = explode("\n", $result['o_file_size']); + $query = mysql_query("select o_file_size from night WHERE id=$night_id") or die (mysql_error()); + $result = mysql_fetch_array($query); + $files = explode("\n", trim($result['o_file_size'])); + $result = array(); foreach ($files as $f){ + $matches = array(); preg_match("/(.+)\s+(.+)\s+(.+)/", $f, $matches); - $result["$matches[0]"] = array( "$matches[1]", "$matches[2]" ); + $result["$matches[2]"] = array("$matches[1]", "$matches[3]"); } return $result; } @@ -195,9 +197,12 @@ * *****************************************************/ function get_file_sizes($mysql_link, $night_id){ - $result = array(); - $result = merge(get_a_files($mysql_link, $night_id), get_o_files($mysql_link, $night_id)); - return $result; + $arr1 = get_a_files($mysql_link, $night_id); + $arr2 = get_o_files($mysql_link, $night_id); + foreach (array_keys($arr1) as $f){ + $arr2["$f"] = $arr1["$f"]; + } + return $arr2; } @@ -207,18 +212,18 @@ * Example uses of each function * *****************************************************/ -$mysql_link = mysql_connect("127.0.0.1","llvm","ll2002vm"); +/*$mysql_link = mysql_connect("127.0.0.1","llvm","ll2002vm"); mysql_select_db("nightlytestresults"); $night_id = 534; -$files = get_a_files($mysql_link, $night_id); +$files = get_file_sizes($mysql_link, $night_id); foreach (array_keys($files) as $f){ - print "$f = > {$files['$f'][0]}
\n"; + print "$f = > {$files["$f"][0]}
\n"; } -/*$machine_info = getMachineInfo(21, $mysql_link); +$machine_info = getMachineInfo(21, $mysql_link); foreach (array_keys($machine_info) as $key){ print "$key => {$machine_info["$key"]}
\n"; } From pjenkins at apple.com Wed Jul 26 12:46:01 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Wed, 26 Jul 2006 12:46:01 -0500 Subject: [llvm-commits] CVS: nightlytest-serverside/NightlyTestAccept.cgi Message-ID: <200607261746.k6QHk1jh025523@zion.cs.uiuc.edu> Changes in directory nightlytest-serverside: NightlyTestAccept.cgi updated: 1.30 -> 1.31 --- Log message: Added a check so that if the previous nights build failed, all of the tests wont be reported as newly passing --- Diffs of the changes: (+16 -4) NightlyTestAccept.cgi | 20 ++++++++++++++++---- 1 files changed, 16 insertions(+), 4 deletions(-) Index: nightlytest-serverside/NightlyTestAccept.cgi diff -u nightlytest-serverside/NightlyTestAccept.cgi:1.30 nightlytest-serverside/NightlyTestAccept.cgi:1.31 --- nightlytest-serverside/NightlyTestAccept.cgi:1.30 Tue Jul 25 19:15:04 2006 +++ nightlytest-serverside/NightlyTestAccept.cgi Wed Jul 26 12:45:48 2006 @@ -561,11 +561,23 @@ $yesterdays_passes = $row->{'passing_tests'}; $yesterdays_fails = $row->{'unexpfail_tests'}; $yesterdays_xfails = $row->{'expfail_tests'}; -$newly_passing_tests = Difference $passing_tests, $yesterdays_passes; -$newly_failing_tests = Difference $expfail_tests."\n".$unexpfail_tests, +if($yesterdays_passes ne ""){ + $newly_passing_tests = Difference $passing_tests, $yesterdays_passes; +} +else{ $newly_passing_tests=""; } +if($yesterdays_xfails ne "" and $yesterdays_fails ne ""){ + $newly_failing_tests = Difference $expfail_tests."\n".$unexpfail_tests, $yesterdays_xfails."\n".$yesterdays_fails; -$new_tests = Difference $all_tests, $yesterdays_tests; -$removed_tests = Difference $yesterdays_tests, $all_tests; +} +else{ $newly_failing_tests=""; } +if($yesterdays_tests ne ""){ + $new_tests = Difference $all_tests, $yesterdays_tests; +} +else{ $new_tests=""; } +if($all_tests ne ""){ + $removed_tests = Difference $yesterdays_tests, $all_tests; +} +else{ $removed_tests=""; } #$db_date = $date." ".$time; $db_date = `date "+20%y-%m-%d %H:%M:%S"`; From pjenkins at apple.com Wed Jul 26 12:48:58 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Wed, 26 Jul 2006 12:48:58 -0500 Subject: [llvm-commits] CVS: nightlytest-serverside/NightlyTestAccept.cgi Message-ID: <200607261748.k6QHmwUH025618@zion.cs.uiuc.edu> Changes in directory nightlytest-serverside: NightlyTestAccept.cgi updated: 1.31 -> 1.32 --- Log message: Added some comments to hopefully explain some ambiguous code --- Diffs of the changes: (+9 -0) NightlyTestAccept.cgi | 9 +++++++++ 1 files changed, 9 insertions(+) Index: nightlytest-serverside/NightlyTestAccept.cgi diff -u nightlytest-serverside/NightlyTestAccept.cgi:1.31 nightlytest-serverside/NightlyTestAccept.cgi:1.32 --- nightlytest-serverside/NightlyTestAccept.cgi:1.31 Wed Jul 26 12:45:48 2006 +++ nightlytest-serverside/NightlyTestAccept.cgi Wed Jul 26 12:48:44 2006 @@ -552,6 +552,10 @@ ################################################################################ # # Creating test lists +# All of these if-else statements are to ensure that if the previous +# night's test had a build failure and reported all tests as not passing, +# all failing, etc, etc then we dont report all the tests as newly passing +# or their equivalent. # ################################################################################ my $d = $dbh->prepare("select * from night where machine = $machine_id ORDER BY added DESC"); @@ -579,6 +583,11 @@ } else{ $removed_tests=""; } +################################################################################ +# +# Submitting information to database +# +################################################################################ #$db_date = $date." ".$time; $db_date = `date "+20%y-%m-%d %H:%M:%S"`; chomp($db_date); From pjenkins at apple.com Wed Jul 26 13:49:54 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Wed, 26 Jul 2006 13:49:54 -0500 Subject: [llvm-commits] CVS: nightlytest-serverside/test.php Message-ID: <200607261849.k6QInsEX027026@zion.cs.uiuc.edu> Changes in directory nightlytest-serverside: test.php updated: 1.6 -> 1.7 --- Log message: Added a more obvious link to build log and moved link for full test results up to the top of the page --- Diffs of the changes: (+7 -8) test.php | 15 +++++++-------- 1 files changed, 7 insertions(+), 8 deletions(-) Index: nightlytest-serverside/test.php diff -u nightlytest-serverside/test.php:1.6 nightlytest-serverside/test.php:1.7 --- nightlytest-serverside/test.php:1.6 Fri Jul 21 17:09:17 2006 +++ nightlytest-serverside/test.php Wed Jul 26 13:49:40 2006 @@ -113,6 +113,12 @@ * Printing the times table * ******************************************************/ +print"

See Full Test Results


\n"; + +if(file_exists("machines/$machine_id/$buildfile-Build-Log.txt")){ + print "

". + "View Build Log


\n"; +} if(strpos($today_row['buildstatus'], "OK")===FALSE){ $disp=""; @@ -127,13 +133,7 @@ "('buildStatus');\", id=\"buildStatus_\">$sign Build Status\n"; print "
\n"; print "

Build Status

"; -if(file_exists("machines/$machine_id/$buildfile-Build-Log.txt")){ - print "". - "{$today_row['buildstatus']}
\n"; -} -else{ - print "{$today_row['buildstatus']}
\n"; -} +print "{$today_row['buildstatus']}
\n"; print "


\n"; /***************************************************** @@ -483,7 +483,6 @@ * Finding big changes in results table * ******************************************************/ -print"

See Full Test Results

\n"; $today_results = GetDayResults($today_row['id'], $category_array, $mysql_link); if(isset($yesterday_row['id'])){ From pjenkins at apple.com Wed Jul 26 13:51:03 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Wed, 26 Jul 2006 13:51:03 -0500 Subject: [llvm-commits] CVS: nightlytest-serverside/test.php Message-ID: <200607261851.k6QIp3tN027113@zion.cs.uiuc.edu> Changes in directory nightlytest-serverside: test.php updated: 1.7 -> 1.8 --- Log message: Fixed test to see if build file exists before we link to it --- Diffs of the changes: (+2 -1) test.php | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: nightlytest-serverside/test.php diff -u nightlytest-serverside/test.php:1.7 nightlytest-serverside/test.php:1.8 --- nightlytest-serverside/test.php:1.7 Wed Jul 26 13:49:40 2006 +++ nightlytest-serverside/test.php Wed Jul 26 13:50:49 2006 @@ -115,6 +115,7 @@ ******************************************************/ print"

See Full Test Results


\n"; +$buildfile=str_replace(" ", "_", $cur_date); if(file_exists("machines/$machine_id/$buildfile-Build-Log.txt")){ print "

". "View Build Log


\n"; @@ -128,7 +129,7 @@ $disp="none"; $sign="(-)"; } -$buildfile=str_replace(" ", "_", $cur_date); + print "$sign Build Status\n"; print "
\n"; From pjenkins at apple.com Wed Jul 26 13:51:50 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Wed, 26 Jul 2006 13:51:50 -0500 Subject: [llvm-commits] CVS: nightlytest-serverside/test.php Message-ID: <200607261851.k6QIpovi027185@zion.cs.uiuc.edu> Changes in directory nightlytest-serverside: test.php updated: 1.8 -> 1.9 --- Log message: Eliminated line breaks after links to buildlog and full test results --- Diffs of the changes: (+3 -3) test.php | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: nightlytest-serverside/test.php diff -u nightlytest-serverside/test.php:1.8 nightlytest-serverside/test.php:1.9 --- nightlytest-serverside/test.php:1.8 Wed Jul 26 13:50:49 2006 +++ nightlytest-serverside/test.php Wed Jul 26 13:51:36 2006 @@ -113,12 +113,12 @@ * Printing the times table * ******************************************************/ -print"

See Full Test Results


\n"; +print"

See Full Test Results

\n"; $buildfile=str_replace(" ", "_", $cur_date); if(file_exists("machines/$machine_id/$buildfile-Build-Log.txt")){ - print "

". - "View Build Log


\n"; + print "

". + "View Build Log

\n"; } if(strpos($today_row['buildstatus'], "OK")===FALSE){ From lattner at cs.uiuc.edu Wed Jul 26 14:10:48 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 26 Jul 2006 14:10:48 -0500 Subject: [llvm-commits] CVS: llvm/Makefile Message-ID: <200607261910.k6QJAmtk028330@zion.cs.uiuc.edu> Changes in directory llvm: Makefile updated: 1.62 -> 1.63 --- Log message: Revamp this to use filter-out, which makes the logic simpler and not nested. This restores building of examples and projects! --- Diffs of the changes: (+18 -21) Makefile | 39 ++++++++++++++++++--------------------- 1 files changed, 18 insertions(+), 21 deletions(-) Index: llvm/Makefile diff -u llvm/Makefile:1.62 llvm/Makefile:1.63 --- llvm/Makefile:1.62 Fri Jun 2 17:41:18 2006 +++ llvm/Makefile Wed Jul 26 14:10:34 2006 @@ -7,39 +7,35 @@ # #===------------------------------------------------------------------------===# -LEVEL = . -DIRS = lib/System lib/Support utils lib/VMCore lib +LEVEL := . +DIRS := lib/System lib/Support utils lib/VMCore lib tools runtime docs +OPTIONAL_DIRS := examples projects +EXTRA_DIST := test llvm.spec include win32 Xcode include $(LEVEL)/Makefile.config +# llvm-gcc4 doesn't need runtime libs. +ifeq ($(LLVMGCC_MAJVERS),4) + DIRS := $(filter-out runtime, $(DIRS)) +endif -ifeq ($(MAKECMDGOALS),tools-only) - DIRS += tools -else - ifneq ($(MAKECMDGOALS),libs-only) - DIRS += tools - ifneq ($(LLVMGCC_MAJVERS),4) - DIRS += runtime - else - $(warning Skipping runtime libraries, llvm-gcc 4 detected.) - endif +ifeq ($(MAKECMDGOALS),libs-only) + DIRS := $(filter-out tools runtime docs, $(DIRS)) + OPTIONAL_DIRS := +endif - DIRS += docs - endif +ifeq ($(MAKECMDGOALS),tools-only) + DIRS := $(filter-out runtime docs, $(DIRS)) + OPTIONAL_DIRS := endif -# Don't install utils, they are only used to build LLVM. -# +# Don't install utils, examples, or projects they are only used to +# build LLVM. ifeq ($(MAKECMDGOALS),install) DIRS := $(filter-out utils, $(DIRS)) - - # Don't install examples or projects. OPTIONAL_DIRS := endif - -EXTRA_DIST := test llvm.spec include win32 Xcode - # Include the main makefile machinery. include $(LLVM_SRC_ROOT)/Makefile.rules @@ -103,3 +99,4 @@ check-llvm2cpp: $(MAKE) check TESTSUITE=Feature RUNLLVM2CPP=1 + From pjenkins at apple.com Wed Jul 26 14:11:29 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Wed, 26 Jul 2006 14:11:29 -0500 Subject: [llvm-commits] CVS: nightlytest-serverside/NightlyTester.php Message-ID: <200607261911.k6QJBTUn028412@zion.cs.uiuc.edu> Changes in directory nightlytest-serverside: NightlyTester.php updated: 1.5 -> 1.6 --- Log message: Changed the functions that return information about a files size to fit the new database schema --- Diffs of the changes: (+35 -48) NightlyTester.php | 83 ++++++++++++++++++++++-------------------------------- 1 files changed, 35 insertions(+), 48 deletions(-) Index: nightlytest-serverside/NightlyTester.php diff -u nightlytest-serverside/NightlyTester.php:1.5 nightlytest-serverside/NightlyTester.php:1.6 --- nightlytest-serverside/NightlyTester.php:1.5 Wed Jul 26 12:14:34 2006 +++ nightlytest-serverside/NightlyTester.php Wed Jul 26 14:11:15 2006 @@ -148,76 +148,63 @@ /***************************************************** * - * Purpose: get all the .a file sizes for a specific test - * Returns: An array with the name of the file being - * the index and the value being an array with the first - * element containing code size and the second element - * containing [debug|release] + * Purpose: get file size for a specific file + * Returns: An array with the first element being the + * name of the file, then the file size, then night id, + * then build type. * *****************************************************/ -function get_a_files($mysql_link, $night_id){ - $query = mysql_query("select a_file_size from night WHERE id=$night_id") or die (mysql_error()); - $result = mysql_fetch_array($query); - $files = explode("\n", trim($result['a_file_size'])); - $result = array(); - foreach ($files as $f){ - $matches = array(); - preg_match("/(.+)\s+(.+)\s+(.+)/", $f, $matches); - $result["$matches[2]"] = array("$matches[1]", "$matches[3]"); - } +function get_file($mysql_link, $file, $night_id){ + $query = mysql_query("select * from file WHERE $file=\"$file\" and night=$night_id") or die (mysql_error()); + $file = mysql_fetch_array($query); + $result = array("{$file['file']}","{$file['size']}","{$file['night']}","{$file['type']}"); + mysql_free_result($query); return $result; } /***************************************************** * - * Purpose: get all the .o file sizes for a specific test - * Returns: An array with the name of the file being - * the index and the value being an array with the first - * element containing code size and the second element - * containing [debug|release] + * Purpose: Get a list of all sizes measured on a + * particular machine for a specific file + * Returns: an array with the key being the date and + * the value being an array containing file name, size + * night, and build type * *****************************************************/ -function get_o_files($mysql_link, $night_id){ - $query = mysql_query("select o_file_size from night WHERE id=$night_id") or die (mysql_error()); - $result = mysql_fetch_array($query); - $files = explode("\n", trim($result['o_file_size'])); +function get_file_history($mysql_link, $machine_id, $file_name){ + $nights_select = "select id, added from night WHERE machine=$machine_id ". + "order by added desc"; + $nights_query = mysql_query($nights_select) + or die (mysql_error()); $result = array(); - foreach ($files as $f){ - $matches = array(); - preg_match("/(.+)\s+(.+)\s+(.+)/", $f, $matches); - $result["$matches[2]"] = array("$matches[1]", "$matches[3]"); - } + while($row = mysql_fetch_array($nights_query)){ + $file_select = "select * from file where night={$row['id']} and ". + "file=\"$file_name\""; + $file_query = mysql_query($file_select); + $file_array = mysql_fetch_array($file_query); + if(isset($file_array['file'])){ + $value=get_file($mysql_link, $file_name, "{$row['id']}"); + array_unshift($value, "{$row['added']}"); + array_push($result, $value); + }//end if + mysql_free_result($file_query); + }//end while + mysql_free_result($nights_query); return $result; } /***************************************************** * - * Purpose: Get a combined list of .a and .o file sizes - * Returns: - * - *****************************************************/ -function get_file_sizes($mysql_link, $night_id){ - $arr1 = get_a_files($mysql_link, $night_id); - $arr2 = get_o_files($mysql_link, $night_id); - foreach (array_keys($arr1) as $f){ - $arr2["$f"] = $arr1["$f"]; - } - return $arr2; -} - - - -/***************************************************** - * * Example uses of each function * *****************************************************/ /*$mysql_link = mysql_connect("127.0.0.1","llvm","ll2002vm"); mysql_select_db("nightlytestresults"); -$night_id = 534; +$machine_id = 8; +$file="./test/Regression/Archive/xpg4.a"; -$files = get_file_sizes($mysql_link, $night_id); +$files = get_file_history($mysql_link, $machine_id, $file); foreach (array_keys($files) as $f){ print "$f = > {$files["$f"][0]}
\n"; From lattner at cs.uiuc.edu Wed Jul 26 15:19:20 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 26 Jul 2006 15:19:20 -0500 Subject: [llvm-commits] CVS: llvm/tools/Makefile Message-ID: <200607262019.k6QKJKaR029918@zion.cs.uiuc.edu> Changes in directory llvm/tools: Makefile updated: 1.49 -> 1.50 --- Log message: Add llvm2cpp to DIRs list --- Diffs of the changes: (+2 -3) Makefile | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) Index: llvm/tools/Makefile diff -u llvm/tools/Makefile:1.49 llvm/tools/Makefile:1.50 --- llvm/tools/Makefile:1.49 Wed Jul 26 12:06:02 2006 +++ llvm/tools/Makefile Wed Jul 26 15:19:06 2006 @@ -10,8 +10,7 @@ LEVEL := .. PARALLEL_DIRS := llvm-config llvm-as llvm-dis opt gccas llc llvm-link lli gccld\ llvm-stub analyze llvm-extract llvm-nm llvm-prof llvm-ar \ - llvm-ranlib llvm-bcanalyzer llvmc llvm-ld llvm-db bugpoint - -OPTIONAL_DIRS := llvm2cpp + llvm-ranlib llvm-bcanalyzer llvmc llvm-ld llvm-db bugpoint \ + llvm2cpp include $(LEVEL)/Makefile.common From lattner at cs.uiuc.edu Wed Jul 26 15:22:40 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 26 Jul 2006 15:22:40 -0500 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200607262022.k6QKMeOk030058@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.389 -> 1.390 --- Log message: Reduce work done for directory traversal in srcdir==objdir builds. --- Diffs of the changes: (+16 -0) Makefile.rules | 16 ++++++++++++++++ 1 files changed, 16 insertions(+) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.389 llvm/Makefile.rules:1.390 --- llvm/Makefile.rules:1.389 Fri Jul 21 18:04:48 2006 +++ llvm/Makefile.rules Wed Jul 26 15:22:26 2006 @@ -487,6 +487,8 @@ SubDirs := ifdef DIRS SubDirs += $(DIRS) + +ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT)) $(RecursiveTargets):: $(Verb) for dir in $(DIRS); do \ if [ ! -f $$dir/Makefile ]; then \ @@ -495,6 +497,13 @@ fi; \ ($(MAKE) -C $$dir $@ ) || exit 1; \ done +else +$(RecursiveTargets):: + $(Verb) for dir in $(DIRS); do \ + ($(MAKE) -C $$dir $@ ) || exit 1; \ + done +endif + endif #--------------------------------------------------------- @@ -545,6 +554,7 @@ SubDirs += $(OPTIONAL_DIRS) +ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT)) $(RecursiveTargets):: $(Verb) for dir in $(OPTIONAL_DIRS); do \ if [ -d $(PROJ_SRC_DIR)/$$dir ]; then\ @@ -555,6 +565,12 @@ ($(MAKE) -C$$dir $@ ) || exit 1; \ fi \ done +else +$(RecursiveTargets):: + $(Verb) for dir in $(OPTIONAL_DIRS); do \ + ($(MAKE) -C$$dir $@ ) || exit 1; \ + done +endif endif #--------------------------------------------------------- From lattner at cs.uiuc.edu Wed Jul 26 15:33:34 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 26 Jul 2006 15:33:34 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/ExecutionEngine/parallel.ll Message-ID: <200607262033.k6QKXYIX030343@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/ExecutionEngine: parallel.ll (r1.2) removed --- Log message: Don't test an example --- Diffs of the changes: (+0 -0) 0 files changed From lattner at cs.uiuc.edu Wed Jul 26 15:37:25 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 26 Jul 2006 15:37:25 -0500 Subject: [llvm-commits] CVS: llvm/lib/System/Win32/Memory.inc Message-ID: <200607262037.k6QKbPOU030421@zion.cs.uiuc.edu> Changes in directory llvm/lib/System/Win32: Memory.inc updated: 1.7 -> 1.8 --- Log message: Fix the build on win32 --- Diffs of the changes: (+2 -1) Memory.inc | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/lib/System/Win32/Memory.inc diff -u llvm/lib/System/Win32/Memory.inc:1.7 llvm/lib/System/Win32/Memory.inc:1.8 --- llvm/lib/System/Win32/Memory.inc:1.7 Fri Jul 7 12:32:37 2006 +++ llvm/lib/System/Win32/Memory.inc Wed Jul 26 15:37:11 2006 @@ -47,9 +47,10 @@ } bool Memory::ReleaseRWX(MemoryBlock &M, std::string *ErrMsg) { - if (M.Address == 0 || M.Size == 0) return; + if (M.Address == 0 || M.Size == 0) return false; if (!VirtualFree(M.Address, 0, MEM_RELEASE)) return GetError("Can't release RWX Memory: ", ErrMsg); + return false; } } From lattner at cs.uiuc.edu Wed Jul 26 15:44:38 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 26 Jul 2006 15:44:38 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/X86/fast-cc-callee-pops.ll Message-ID: <200607262044.k6QKicuL030572@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/X86: fast-cc-callee-pops.ll updated: 1.2 -> 1.3 --- Log message: allow this to pass on non-x86 machines --- Diffs of the changes: (+1 -1) fast-cc-callee-pops.ll | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/Regression/CodeGen/X86/fast-cc-callee-pops.ll diff -u llvm/test/Regression/CodeGen/X86/fast-cc-callee-pops.ll:1.2 llvm/test/Regression/CodeGen/X86/fast-cc-callee-pops.ll:1.3 --- llvm/test/Regression/CodeGen/X86/fast-cc-callee-pops.ll:1.2 Sat Mar 18 17:48:54 2006 +++ llvm/test/Regression/CodeGen/X86/fast-cc-callee-pops.ll Wed Jul 26 15:44:24 2006 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel -enable-x86-fastcc | grep 'ret 28' +; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel -enable-x86-fastcc -mcpu=yonah | grep 'ret 28' ; Check that a fastcc function pops its stack variables before returning. From reid at x10sys.com Wed Jul 26 15:45:26 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 26 Jul 2006 15:45:26 -0500 Subject: [llvm-commits] CVS: llvm/autoconf/m4/build_exeext.m4 Message-ID: <200607262045.k6QKjQbH030604@zion.cs.uiuc.edu> Changes in directory llvm/autoconf/m4: build_exeext.m4 added (r1.1) --- Log message: For PR814: http://llvm.org/PR814 : Add a macro for getting the build host extension for executable. Patch contributed by Anton Korobeynikov. Thanks! --- Diffs of the changes: (+42 -0) build_exeext.m4 | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 42 insertions(+) Index: llvm/autoconf/m4/build_exeext.m4 diff -c /dev/null llvm/autoconf/m4/build_exeext.m4:1.1 *** /dev/null Wed Jul 26 15:45:22 2006 --- llvm/autoconf/m4/build_exeext.m4 Wed Jul 26 15:45:12 2006 *************** *** 0 **** --- 1,42 ---- + # Check for the extension used for executables on build platform. + # This is necessary for cross-compiling where the build platform + # may differ from the host platform. + AC_DEFUN([AC_BUILD_EXEEXT], + [ + AC_MSG_CHECKING([for executable suffix on build platform]) + AC_CACHE_VAL(ac_cv_build_exeext, + [if test "$CYGWIN" = yes || test "$MINGW32" = yes; then + ac_cv_build_exeext=.exe + else + ac_build_prefix=${build_alias}- + + AC_CHECK_PROG(BUILD_CC, ${ac_build_prefix}gcc, ${ac_build_prefix}gcc) + if test -z "$BUILD_CC"; then + AC_CHECK_PROG(BUILD_CC, gcc, gcc) + if test -z "$BUILD_CC"; then + AC_CHECK_PROG(BUILD_CC, cc, cc, , , /usr/ucb/cc) + fi + fi + test -z "$BUILD_CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH]) + ac_build_link='${BUILD_CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AS_MESSAGE_LOG_FD' + rm -f conftest* + echo 'int main () { return 0; }' > conftest.$ac_ext + ac_cv_build_exeext= + if AC_TRY_EVAL(ac_build_link); then + for file in conftest.*; do + case $file in + *.c | *.o | *.obj) ;; + *) ac_cv_build_exeext=`echo $file | sed -e s/conftest//` ;; + esac + done + else + AC_MSG_ERROR([installation or configuration problem: compiler cannot create executables.]) + fi + rm -f conftest* + test x"${ac_cv_build_exeext}" = x && ac_cv_build_exeext=blank + fi]) + BUILD_EXEEXT="" + test x"${ac_cv_build_exeext}" != xblank && BUILD_EXEEXT=${ac_cv_build_exeext} + AC_MSG_RESULT(${ac_cv_build_exeext}) + ac_build_exeext=$BUILD_EXEEXT + AC_SUBST(BUILD_EXEEXT)]) From criswell at cs.uiuc.edu Wed Jul 26 15:49:31 2006 From: criswell at cs.uiuc.edu (John Criswell) Date: Wed, 26 Jul 2006 15:49:31 -0500 Subject: [llvm-commits] CVS: llvm-poolalloc/LICENSE.TXT Message-ID: <200607262049.PAA09898@choi.cs.uiuc.edu> Changes in directory llvm-poolalloc: LICENSE.TXT updated: 1.4 -> 1.5 --- Log message: We've made commits this year; time to update the copyright notice. --- Diffs of the changes: (+1 -1) LICENSE.TXT | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-poolalloc/LICENSE.TXT diff -u llvm-poolalloc/LICENSE.TXT:1.4 llvm-poolalloc/LICENSE.TXT:1.5 --- llvm-poolalloc/LICENSE.TXT:1.4 Wed May 18 14:56:19 2005 +++ llvm-poolalloc/LICENSE.TXT Wed Jul 26 15:49:06 2006 @@ -4,7 +4,7 @@ University of Illinois/NCSA Open Source License -Copyright (c) 2003, 2004, 2005 University of Illinois at Urbana-Champaign. +Copyright (c) 2003, 2004, 2005, 2006 University of Illinois at Urbana-Champaign. All rights reserved. Developed by: From reid at x10sys.com Wed Jul 26 16:08:23 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 26 Jul 2006 16:08:23 -0500 Subject: [llvm-commits] CVS: llvm/autoconf/m4/build_exeext.m4 Message-ID: <200607262108.k6QL8N7V030997@zion.cs.uiuc.edu> Changes in directory llvm/autoconf/m4: build_exeext.m4 updated: 1.1 -> 1.2 --- Log message: Remove an extraneous use of ${ac_exeext}. Patch by Anton Korobeynikov. --- Diffs of the changes: (+1 -1) build_exeext.m4 | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/autoconf/m4/build_exeext.m4 diff -u llvm/autoconf/m4/build_exeext.m4:1.1 llvm/autoconf/m4/build_exeext.m4:1.2 --- llvm/autoconf/m4/build_exeext.m4:1.1 Wed Jul 26 15:45:12 2006 +++ llvm/autoconf/m4/build_exeext.m4 Wed Jul 26 16:08:09 2006 @@ -18,7 +18,7 @@ fi fi test -z "$BUILD_CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH]) - ac_build_link='${BUILD_CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AS_MESSAGE_LOG_FD' + ac_build_link='${BUILD_CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AS_MESSAGE_LOG_FD' rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_build_exeext= From lattner at cs.uiuc.edu Wed Jul 26 16:12:20 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 26 Jul 2006 16:12:20 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp PPCISelLowering.cpp PPCTargetMachine.cpp Message-ID: <200607262112.k6QLCKgR031178@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCAsmPrinter.cpp updated: 1.187 -> 1.188 PPCISelLowering.cpp updated: 1.198 -> 1.199 PPCTargetMachine.cpp updated: 1.98 -> 1.99 --- Log message: Rename RelocModel::PIC to PIC_, to avoid conflicts with -DPIC. --- Diffs of the changes: (+7 -7) PPCAsmPrinter.cpp | 6 +++--- PPCISelLowering.cpp | 6 +++--- PPCTargetMachine.cpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp diff -u llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.187 llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.188 --- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.187 Fri Jul 14 20:24:23 2006 +++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp Wed Jul 26 16:12:04 2006 @@ -173,7 +173,7 @@ } else { O << "ha16("; printOp(MI->getOperand(OpNo)); - if (TM.getRelocationModel() == Reloc::PIC) + if (TM.getRelocationModel() == Reloc::PIC_) O << "-\"L" << getFunctionNumber() << "$pb\")"; else O << ')'; @@ -185,7 +185,7 @@ } else { O << "lo16("; printOp(MI->getOperand(OpNo)); - if (TM.getRelocationModel() == Reloc::PIC) + if (TM.getRelocationModel() == Reloc::PIC_) O << "-\"L" << getFunctionNumber() << "$pb\")"; else O << ')'; @@ -599,7 +599,7 @@ bool isPPC64 = TD->getPointerSizeInBits() == 64; // Output stubs for dynamically-linked functions - if (TM.getRelocationModel() == Reloc::PIC) { + if (TM.getRelocationModel() == Reloc::PIC_) { for (std::set::iterator i = FnStubs.begin(), e = FnStubs.end(); i != e; ++i) { SwitchToTextSection(".section __TEXT,__picsymbolstub1,symbol_stubs," Index: llvm/lib/Target/PowerPC/PPCISelLowering.cpp diff -u llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.198 llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.199 --- llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.198 Mon Jul 10 15:56:58 2006 +++ llvm/lib/Target/PowerPC/PPCISelLowering.cpp Wed Jul 26 16:12:04 2006 @@ -619,7 +619,7 @@ return DAG.getNode(ISD::ADD, PtrVT, Hi, Lo); } - if (TM.getRelocationModel() == Reloc::PIC) { + if (TM.getRelocationModel() == Reloc::PIC_) { // With PIC, the first instruction is actually "GR+hi(&G)". Hi = DAG.getNode(ISD::ADD, PtrVT, DAG.getNode(PPCISD::GlobalBaseReg, PtrVT), Hi); @@ -649,7 +649,7 @@ return DAG.getNode(ISD::ADD, PtrVT, Hi, Lo); } - if (TM.getRelocationModel() == Reloc::PIC) { + if (TM.getRelocationModel() == Reloc::PIC_) { // With PIC, the first instruction is actually "GR+hi(&G)". Hi = DAG.getNode(ISD::ADD, PtrVT, DAG.getNode(PPCISD::GlobalBaseReg, MVT::i32), Hi); @@ -680,7 +680,7 @@ return DAG.getNode(ISD::ADD, PtrVT, Hi, Lo); } - if (TM.getRelocationModel() == Reloc::PIC) { + if (TM.getRelocationModel() == Reloc::PIC_) { // With PIC, the first instruction is actually "GR+hi(&G)". Hi = DAG.getNode(ISD::ADD, PtrVT, DAG.getNode(PPCISD::GlobalBaseReg, PtrVT), Hi); Index: llvm/lib/Target/PowerPC/PPCTargetMachine.cpp diff -u llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.98 llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.99 --- llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.98 Fri Jul 14 20:24:23 2006 +++ llvm/lib/Target/PowerPC/PPCTargetMachine.cpp Wed Jul 26 16:12:04 2006 @@ -94,7 +94,7 @@ if (Subtarget.isDarwin()) setRelocationModel(Reloc::DynamicNoPIC); else - setRelocationModel(Reloc::PIC); + setRelocationModel(Reloc::PIC_); } PPC32TargetMachine::PPC32TargetMachine(const Module &M, const std::string &FS) From lattner at cs.uiuc.edu Wed Jul 26 16:12:21 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 26 Jul 2006 16:12:21 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/TargetMachine.cpp Message-ID: <200607262112.k6QLCL53031183@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target: TargetMachine.cpp updated: 1.49 -> 1.50 --- Log message: Rename RelocModel::PIC to PIC_, to avoid conflicts with -DPIC. --- Diffs of the changes: (+1 -1) TargetMachine.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/TargetMachine.cpp diff -u llvm/lib/Target/TargetMachine.cpp:1.49 llvm/lib/Target/TargetMachine.cpp:1.50 --- llvm/lib/Target/TargetMachine.cpp:1.49 Wed Jul 5 20:53:35 2006 +++ llvm/lib/Target/TargetMachine.cpp Wed Jul 26 16:12:04 2006 @@ -66,7 +66,7 @@ "Target default relocation model"), clEnumValN(Reloc::Static, "static", "Non-relocatable code"), - clEnumValN(Reloc::PIC, "pic", + clEnumValN(Reloc::PIC_, "pic", "Fully relocatable, position independent code"), clEnumValN(Reloc::DynamicNoPIC, "dynamic-no-pic", "Relocatable external references, non-relocatable code"), From lattner at cs.uiuc.edu Wed Jul 26 16:12:23 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 26 Jul 2006 16:12:23 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp X86ISelLowering.cpp X86TargetMachine.cpp Message-ID: <200607262112.k6QLCNno031193@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ATTAsmPrinter.cpp updated: 1.53 -> 1.54 X86ISelLowering.cpp updated: 1.239 -> 1.240 X86TargetMachine.cpp updated: 1.118 -> 1.119 --- Log message: Rename RelocModel::PIC to PIC_, to avoid conflicts with -DPIC. --- Diffs of the changes: (+7 -7) X86ATTAsmPrinter.cpp | 4 ++-- X86ISelLowering.cpp | 8 ++++---- X86TargetMachine.cpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) Index: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp diff -u llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.53 llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.54 --- llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.53 Wed Jul 19 06:54:50 2006 +++ llvm/lib/Target/X86/X86ATTAsmPrinter.cpp Wed Jul 26 16:12:04 2006 @@ -152,7 +152,7 @@ O << PrivateGlobalPrefix << "CPI" << getFunctionNumber() << "_" << MO.getConstantPoolIndex(); if (Subtarget->TargetType == X86Subtarget::isDarwin && - TM.getRelocationModel() == Reloc::PIC) + TM.getRelocationModel() == Reloc::PIC_) O << "-\"L" << getFunctionNumber() << "$pb\""; int Offset = MO.getOffset(); if (Offset > 0) @@ -185,7 +185,7 @@ } else { O << Mang->getValueName(GV); } - if (!isCallOp && TM.getRelocationModel() == Reloc::PIC) + if (!isCallOp && TM.getRelocationModel() == Reloc::PIC_) O << "-\"L" << getFunctionNumber() << "$pb\""; } else O << Mang->getValueName(MO.getGlobal()); Index: llvm/lib/Target/X86/X86ISelLowering.cpp diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.239 llvm/lib/Target/X86/X86ISelLowering.cpp:1.240 --- llvm/lib/Target/X86/X86ISelLowering.cpp:1.239 Fri Jul 21 03:26:46 2006 +++ llvm/lib/Target/X86/X86ISelLowering.cpp Wed Jul 26 16:12:04 2006 @@ -2746,7 +2746,7 @@ CP->getAlignment())); if (Subtarget->isTargetDarwin()) { // With PIC, the address is actually $g + Offset. - if (getTargetMachine().getRelocationModel() == Reloc::PIC) + if (getTargetMachine().getRelocationModel() == Reloc::PIC_) Result = DAG.getNode(ISD::ADD, getPointerTy(), DAG.getNode(X86ISD::GlobalBaseReg, getPointerTy()), Result); } @@ -2762,7 +2762,7 @@ getPointerTy())); if (Subtarget->isTargetDarwin()) { // With PIC, the address is actually $g + Offset. - if (getTargetMachine().getRelocationModel() == Reloc::PIC) + if (getTargetMachine().getRelocationModel() == Reloc::PIC_) Result = DAG.getNode(ISD::ADD, getPointerTy(), DAG.getNode(X86ISD::GlobalBaseReg, getPointerTy()), Result); @@ -2788,7 +2788,7 @@ getPointerTy())); if (Subtarget->isTargetDarwin()) { // With PIC, the address is actually $g + Offset. - if (getTargetMachine().getRelocationModel() == Reloc::PIC) + if (getTargetMachine().getRelocationModel() == Reloc::PIC_) Result = DAG.getNode(ISD::ADD, getPointerTy(), DAG.getNode(X86ISD::GlobalBaseReg, getPointerTy()), Result); @@ -3173,7 +3173,7 @@ getPointerTy())); if (Subtarget->isTargetDarwin()) { // With PIC, the address is actually $g + Offset. - if (getTargetMachine().getRelocationModel() == Reloc::PIC) + if (getTargetMachine().getRelocationModel() == Reloc::PIC_) Result = DAG.getNode(ISD::ADD, getPointerTy(), DAG.getNode(X86ISD::GlobalBaseReg, getPointerTy()), Result); Index: llvm/lib/Target/X86/X86TargetMachine.cpp diff -u llvm/lib/Target/X86/X86TargetMachine.cpp:1.118 llvm/lib/Target/X86/X86TargetMachine.cpp:1.119 --- llvm/lib/Target/X86/X86TargetMachine.cpp:1.118 Tue Jul 25 15:40:54 2006 +++ llvm/lib/Target/X86/X86TargetMachine.cpp Wed Jul 26 16:12:04 2006 @@ -78,7 +78,7 @@ if (Subtarget.isTargetDarwin()) setRelocationModel(Reloc::DynamicNoPIC); else - setRelocationModel(Reloc::PIC); + setRelocationModel(Reloc::PIC_); } From lattner at cs.uiuc.edu Wed Jul 26 16:12:24 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 26 Jul 2006 16:12:24 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/TargetMachine.h Message-ID: <200607262112.k6QLCOv8031198@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Target: TargetMachine.h updated: 1.66 -> 1.67 --- Log message: Rename RelocModel::PIC to PIC_, to avoid conflicts with -DPIC. --- Diffs of the changes: (+1 -1) TargetMachine.h | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/include/llvm/Target/TargetMachine.h diff -u llvm/include/llvm/Target/TargetMachine.h:1.66 llvm/include/llvm/Target/TargetMachine.h:1.67 --- llvm/include/llvm/Target/TargetMachine.h:1.66 Wed Jul 5 20:53:36 2006 +++ llvm/include/llvm/Target/TargetMachine.h Wed Jul 26 16:12:04 2006 @@ -39,7 +39,7 @@ enum Model { Default, Static, - PIC, + PIC_, // Cannot be named PIC due to collision with -DPIC DynamicNoPIC }; } From lattner at cs.uiuc.edu Wed Jul 26 16:14:18 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 26 Jul 2006 16:14:18 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvm-config/find-cycles.pl Message-ID: <200607262114.k6QLEIsl031304@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-config: find-cycles.pl updated: 1.3 -> 1.4 --- Log message: Avoid a "scary" make warning for the 1.8 release. This should be reenabled right after 1.8 "ships". --- Diffs of the changes: (+4 -1) find-cycles.pl | 5 ++++- 1 files changed, 4 insertions(+), 1 deletion(-) Index: llvm/tools/llvm-config/find-cycles.pl diff -u llvm/tools/llvm-config/find-cycles.pl:1.3 llvm/tools/llvm-config/find-cycles.pl:1.4 --- llvm/tools/llvm-config/find-cycles.pl:1.3 Wed Jul 26 12:10:54 2006 +++ llvm/tools/llvm-config/find-cycles.pl Wed Jul 26 16:14:04 2006 @@ -70,7 +70,10 @@ join(' ', sort keys %dependencies) . "\n"); } print sort @output; -exit $cycles_found; + +### FIXME: reenable this after 1.8. +#exit $cycles_found; +exit 0; #========================================================================== # Depedency Cycle Support From reid at x10sys.com Wed Jul 26 16:15:12 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 26 Jul 2006 16:15:12 -0500 Subject: [llvm-commits] CVS: llvm/autoconf/configure.ac Message-ID: <200607262115.k6QLFCTj031335@zion.cs.uiuc.edu> Changes in directory llvm/autoconf: configure.ac updated: 1.237 -> 1.238 --- Log message: For PR814: http://llvm.org/PR814 : Provide support for making cross-compiling builds. See the PR for details. Patch provided by Anton Korobeynikov. Thanks, Anton! --- Diffs of the changes: (+10 -2) configure.ac | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.237 llvm/autoconf/configure.ac:1.238 --- llvm/autoconf/configure.ac:1.237 Thu Jul 6 02:45:49 2006 +++ llvm/autoconf/configure.ac Wed Jul 26 16:14:56 2006 @@ -98,9 +98,9 @@ dnl Determine the platform type and cache its value. This helps us configure dnl the System library to the correct build platform. -AC_CACHE_CHECK([type of operating system we're on], +AC_CACHE_CHECK([type of operating system we're going to host on], [llvm_cv_os_type], -[case $build in +[case $host in *-*-aix*) llvm_cv_os_type="AIX" llvm_cv_platform_type="Unix" ;; @@ -188,6 +188,14 @@ dnl Check for the endianness of the target AC_C_BIGENDIAN(AC_SUBST([ENDIAN],[big]),AC_SUBST([ENDIAN],[little])) +dnl Check for build platform executable suffix if we're crosscompiling +if test "$cross_compiling" = yes; then + AC_SUBST(LLVM_CROSS_COMPILING, [1]) + AC_BUILD_EXEEXT +else + AC_SUBST(LLVM_CROSS_COMPILING, [0]) +fi + dnl Check to see if there's a "CVS" directory indicating that this build is dnl being done from a CVS checkout. This sets up several defaults for the dnl command line switches. When we build with a CVS directory, we get a From reid at x10sys.com Wed Jul 26 16:15:12 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 26 Jul 2006 16:15:12 -0500 Subject: [llvm-commits] CVS: llvm/Makefile.config.in Makefile.rules configure Message-ID: <200607262115.k6QLFCoU031344@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.config.in updated: 1.59 -> 1.60 Makefile.rules updated: 1.390 -> 1.391 configure updated: 1.240 -> 1.241 --- Log message: For PR814: http://llvm.org/PR814 : Provide support for making cross-compiling builds. See the PR for details. Patch provided by Anton Korobeynikov. Thanks, Anton! --- Diffs of the changes: (+230 -38) Makefile.config.in | 11 +- Makefile.rules | 6 + configure | 251 +++++++++++++++++++++++++++++++++++++++++++++-------- 3 files changed, 230 insertions(+), 38 deletions(-) Index: llvm/Makefile.config.in diff -u llvm/Makefile.config.in:1.59 llvm/Makefile.config.in:1.60 --- llvm/Makefile.config.in:1.59 Tue Jun 20 17:16:32 2006 +++ llvm/Makefile.config.in Wed Jul 26 16:14:55 2006 @@ -97,6 +97,13 @@ # Target hardware architecture ARCH=@ARCH@ +# Indicates, whether we're cross-compiling LLVM or not +LLVM_CROSS_COMPILING=@LLVM_CROSS_COMPILING@ + +# Executable file extension for build platform (mainly for +# tablegen call if we're cross-compiling). +BUILD_EXEEXT=@BUILD_EXEEXT@ + # Target triple (cpu-vendor-os) for which we should generate code TARGET_TRIPLE=@target@ @@ -214,10 +221,10 @@ # Enable JIT for this platform TARGET_HAS_JIT = @TARGET_HAS_JIT@ -# Shared library extension for this platform. +# Shared library extension for host platform. SHLIBEXT = @SHLIBEXT@ -# Executable file extension for this platform. +# Executable file extension for host platform. EXEEXT = @EXEEXT@ # Things we just assume are "there" Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.390 llvm/Makefile.rules:1.391 --- llvm/Makefile.rules:1.390 Wed Jul 26 15:22:26 2006 +++ llvm/Makefile.rules Wed Jul 26 16:14:55 2006 @@ -281,7 +281,11 @@ LLVMAS := $(LLVMToolDir)/llvm-as$(EXEEXT) endif ifndef TBLGEN -TBLGEN := $(LLVMToolDir)/tblgen$(EXEEXT) + ifeq ($(LLVM_CROSS_COMPILING),1) + TBLGEN := $(LLVMToolDir)/tblgen$(BUILD_EXEEXT) + else + TBLGEN := $(LLVMToolDir)/tblgen$(EXEEXT) + endif endif ifndef GCCAS GCCAS := $(LLVMToolDir)/gccas$(EXEEXT) Index: llvm/configure diff -u llvm/configure:1.240 llvm/configure:1.241 --- llvm/configure:1.240 Thu Jul 6 02:46:33 2006 +++ llvm/configure Wed Jul 26 16:14:55 2006 @@ -477,7 +477,7 @@ # 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 LLVM_COPYRIGHT subdirs build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os OS LLVM_ON_UNIX LLVM_ON_WIN32 ARCH ENDIAN CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CVSBUILD ENABLE_OPTIMIZED DISABLE_ASSERTIONS DEBUG_RUNTIME JIT TARGET_HAS_JIT ENABLE_DOXYGEN ENABLE_THREADS TARGETS_TO_BUILD EXTRA_OPTIONS CPP CXX CXXFLAGS ac_ct_CXX LEX LEXLIB LEX_OUTPUT_ROOT FLEX YACC BISON ifGNUmake LN_S CMP CP DATE FIND GREP MKDIR MV RANLIB ac_ct_RANLIB RM SED TAR GRAPHVIZ DOT GV DOTTY PERL HAVE_PERL INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA BZIP2 DOXYGEN ETAGS GROFF GZIP POD2HTML POD2MAN ! RUNTEST TCLSH ZIP EGREP INSTALL_LTDL_TRUE INSTALL_LTDL_FALSE CONVENIENCE_LTDL_TRUE CONVENIENCE_LTDL_FALSE LIBADD_DL ECHO AR ac_ct_AR STRIP ac_ct_STRIP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL ETAGSFLAGS LLVMGCC LLVMGXX ALLOCA MMAP_FILE LLVMCC1 LLVMCC1PLUS LLVMGCCDIR LLVMGCC_VERSION LLVMGCC_MAJVERS SHLIBEXT LLVM_PREFIX LLVM_BINDIR LLVM_LIBDIR LLVM_DATADIR LLVM_DOCSDIR LLVM_ETCDIR LLVM_INCLUDEDIR LLVM_INFODIR LLVM_MANDIR LLVM_CONFIGTIME 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 datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS LLVM_COPYRIGHT subdirs build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os OS LLVM_ON_UNIX LLVM_ON_WIN32 ARCH ENDIAN CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT LLVM_CROSS_COMPILING BUILD_CC BUILD_EXEEXT CVSBUILD ENABLE_OPTIMIZED DISABLE_ASSERTIONS DEBUG_RUNTIME JIT TARGET_HAS_JIT ENABLE_DOXYGEN ENABLE_THREADS TARGETS_TO_BUILD EXTRA_OPTIONS CPP CXX CXXFLAGS ac_ct_CXX LEX LEXLIB LEX_OUTPUT_ROOT FLEX YACC BISON ifGNUmake LN_S CMP CP DATE FIND GREP MKDIR MV RANLIB ac_ct_RANLIB RM SED TAR GRAPHVIZ DOT GV DOTTY PERL HAVE_PERL INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA BZIP2! DOXYGEN ETAGS GROFF GZIP POD2HTML POD2MAN RUNTEST TCLSH ZIP EGREP INSTALL_LTDL_TRUE INSTALL_LTDL_FALSE CONVENIENCE_LTDL_TRUE CONVENIENCE_LTDL_FALSE LIBADD_DL ECHO AR ac_ct_AR STRIP ac_ct_STRIP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL ETAGSFLAGS LLVMGCC LLVMGXX ALLOCA MMAP_FILE LLVMCC1 LLVMCC1PLUS LLVMGCCDIR LLVMGCC_VERSION LLVMGCC_MAJVERS SHLIBEXT LLVM_PREFIX LLVM_BINDIR LLVM_LIBDIR LLVM_DATADIR LLVM_DOCSDIR LLVM_ETCDIR LLVM_INCLUDEDIR LLVM_INFODIR LLVM_MANDIR LLVM_CONFIGTIME LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -1710,12 +1710,12 @@ NONENONEs,x,x, && program_prefix=${target_alias}- -echo "$as_me:$LINENO: checking type of operating system we're on" >&5 -echo $ECHO_N "checking type of operating system we're on... $ECHO_C" >&6 +echo "$as_me:$LINENO: checking type of operating system we're going to host on" >&5 +echo $ECHO_N "checking type of operating system we're going to host on... $ECHO_C" >&6 if test "${llvm_cv_os_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - case $build in + case $host in *-*-aix*) llvm_cv_os_type="AIX" llvm_cv_platform_type="Unix" ;; @@ -2977,6 +2977,185 @@ esac +if test "$cross_compiling" = yes; then + LLVM_CROSS_COMPILING=1 + + +echo "$as_me:$LINENO: checking for executable suffix on build platform" >&5 +echo $ECHO_N "checking for executable suffix on build platform... $ECHO_C" >&6 +if test "${ac_cv_build_exeext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$CYGWIN" = yes || test "$MINGW32" = yes; then + ac_cv_build_exeext=.exe +else + ac_build_prefix=${build_alias}- + + # Extract the first word of "${ac_build_prefix}gcc", so it can be a program name with args. +set dummy ${ac_build_prefix}gcc; 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_BUILD_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$BUILD_CC"; then + ac_cv_prog_BUILD_CC="$BUILD_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_BUILD_CC="${ac_build_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +BUILD_CC=$ac_cv_prog_BUILD_CC +if test -n "$BUILD_CC"; then + echo "$as_me:$LINENO: result: $BUILD_CC" >&5 +echo "${ECHO_T}$BUILD_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + if test -z "$BUILD_CC"; then + # 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 +if test "${ac_cv_prog_BUILD_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$BUILD_CC"; then + ac_cv_prog_BUILD_CC="$BUILD_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_BUILD_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +BUILD_CC=$ac_cv_prog_BUILD_CC +if test -n "$BUILD_CC"; then + echo "$as_me:$LINENO: result: $BUILD_CC" >&5 +echo "${ECHO_T}$BUILD_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + if test -z "$BUILD_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 +if test "${ac_cv_prog_BUILD_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$BUILD_CC"; then + ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test. +else + ac_prog_rejected=no +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 + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_BUILD_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_BUILD_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set BUILD_CC to just the basename; use the full file name. + shift + ac_cv_prog_BUILD_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +BUILD_CC=$ac_cv_prog_BUILD_CC +if test -n "$BUILD_CC"; then + echo "$as_me:$LINENO: result: $BUILD_CC" >&5 +echo "${ECHO_T}$BUILD_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + fi + fi + test -z "$BUILD_CC" && { { echo "$as_me:$LINENO: error: no acceptable cc found in \$PATH" >&5 +echo "$as_me: error: no acceptable cc found in \$PATH" >&2;} + { (exit 1); exit 1; }; } + ac_build_link='${BUILD_CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' + rm -f conftest* + echo 'int main () { return 0; }' > conftest.$ac_ext + ac_cv_build_exeext= + if { (eval echo "$as_me:$LINENO: \"$ac_build_link\"") >&5 + (eval $ac_build_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for file in conftest.*; do + case $file in + *.c | *.o | *.obj) ;; + *) ac_cv_build_exeext=`echo $file | sed -e s/conftest//` ;; + esac + done + else + { { echo "$as_me:$LINENO: error: installation or configuration problem: compiler cannot create executables." >&5 +echo "$as_me: error: installation or configuration problem: compiler cannot create executables." >&2;} + { (exit 1); exit 1; }; } + fi + rm -f conftest* + test x"${ac_cv_build_exeext}" = x && ac_cv_build_exeext=blank +fi +fi + +BUILD_EXEEXT="" +test x"${ac_cv_build_exeext}" != xblank && BUILD_EXEEXT=${ac_cv_build_exeext} +echo "$as_me:$LINENO: result: ${ac_cv_build_exeext}" >&5 +echo "${ECHO_T}${ac_cv_build_exeext}" >&6 +ac_build_exeext=$BUILD_EXEEXT + +else + LLVM_CROSS_COMPILING=0 + +fi + if test -d "CVS" -o -d "${srcdir}/CVS"; then cvsbuild="yes" optimize="no" @@ -3163,10 +3342,9 @@ esac - # Check whether --with-extra-options or --without-extra-options was given. if test "${with_extra_options+set}" = set; then - extraopts="$with_extra_options" + withval="$with_extra_options" else extraopts=default @@ -8571,7 +8749,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 10743 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -11047,7 +11225,7 @@ # Provide some information about the compiler. -echo "$as_me:11034:" \ +echo "$as_me:11228:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -12104,11 +12282,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12091: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12285: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:12095: \$? = $ac_status" >&5 + echo "$as_me:12289: \$? = $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 @@ -12347,11 +12525,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12334: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12528: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:12338: \$? = $ac_status" >&5 + echo "$as_me:12532: \$? = $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 @@ -12407,11 +12585,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12394: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12588: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:12398: \$? = $ac_status" >&5 + echo "$as_me:12592: \$? = $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 @@ -14592,7 +14770,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:17064: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16874: \$? = $ac_status" >&5 + echo "$as_me:17068: \$? = $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 @@ -16943,11 +17121,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16930: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17124: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:16934: \$? = $ac_status" >&5 + echo "$as_me:17128: \$? = $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 @@ -18304,7 +18482,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:19420: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:19230: \$? = $ac_status" >&5 + echo "$as_me:19424: \$? = $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 @@ -19299,11 +19477,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:19286: $lt_compile\"" >&5) + (eval echo "\"\$as_me:19480: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:19290: \$? = $ac_status" >&5 + echo "$as_me:19484: \$? = $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 @@ -21338,11 +21516,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:21325: $lt_compile\"" >&5) + (eval echo "\"\$as_me:21519: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:21329: \$? = $ac_status" >&5 + echo "$as_me:21523: \$? = $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 @@ -21581,11 +21759,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:21568: $lt_compile\"" >&5) + (eval echo "\"\$as_me:21762: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:21572: \$? = $ac_status" >&5 + echo "$as_me:21766: \$? = $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 @@ -21641,11 +21819,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:21628: $lt_compile\"" >&5) + (eval echo "\"\$as_me:21822: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:21632: \$? = $ac_status" >&5 + echo "$as_me:21826: \$? = $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 @@ -23826,7 +24004,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext < Changes in directory llvm/lib/Target/X86: README.txt updated: 1.121 -> 1.122 --- Log message: New entry. --- Diffs of the changes: (+5 -0) README.txt | 5 +++++ 1 files changed, 5 insertions(+) Index: llvm/lib/Target/X86/README.txt diff -u llvm/lib/Target/X86/README.txt:1.121 llvm/lib/Target/X86/README.txt:1.122 --- llvm/lib/Target/X86/README.txt:1.121 Fri Jul 21 18:07:23 2006 +++ llvm/lib/Target/X86/README.txt Wed Jul 26 16:49:52 2006 @@ -729,3 +729,8 @@ 0000002a flds (%esp,1) 0000002d addl $0x04,%esp 00000030 ret + +//===---------------------------------------------------------------------===// + +When using fastcc abi, align stack slot of argument of type double on 8 byte +boundary to improve performance. From evan.cheng at apple.com Wed Jul 26 18:06:41 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 26 Jul 2006 18:06:41 -0500 Subject: [llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp Message-ID: <200607262306.k6QN6fMT001298@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: DAGISelEmitter.cpp updated: 1.225 -> 1.226 --- Log message: Fix for bug 840: http://llvm.org/PR840 . Only use noinline attribute if gcc version >= 3.4 --- Diffs of the changes: (+6 -3) DAGISelEmitter.cpp | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) Index: llvm/utils/TableGen/DAGISelEmitter.cpp diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.225 llvm/utils/TableGen/DAGISelEmitter.cpp:1.226 --- llvm/utils/TableGen/DAGISelEmitter.cpp:1.225 Fri Jul 21 17:19:51 2006 +++ llvm/utils/TableGen/DAGISelEmitter.cpp Wed Jul 26 18:06:27 2006 @@ -3363,11 +3363,9 @@ } CallerCode += ");"; CalleeCode += ") "; -#ifdef __GNUC__ // Prevent emission routines from being inlined to reduce selection // routines stack frame sizes. - CalleeCode += "__attribute__((noinline)) "; -#endif + CalleeCode += "NOINLINE "; CalleeCode += "{\n" + CalleeDecls; for (int j = LastPred+1; j < CodeSize; ++j) CalleeCode += " " + GeneratedCode[j].second + '\n'; @@ -3632,6 +3630,11 @@ << "// *** instruction selector class. These functions are really " << "methods.\n\n"; + OS << "#if defined(__GNUC__) && \\\n"; + OS << " ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4)))\n"; + OS << "#define NOINLINE __attribute__((noinline))\n"; + OS << "#endif\n\n"; + OS << "// Instance var to keep track of multiply used nodes that have \n" << "// already been selected.\n" << "std::map CodeGenMap;\n"; From pjenkins at apple.com Wed Jul 26 18:23:08 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Wed, 26 Jul 2006 18:23:08 -0500 Subject: [llvm-commits] CVS: nightlytest-serverside/drawfilesizegraph.php Message-ID: <200607262323.k6QNN873001631@zion.cs.uiuc.edu> Changes in directory nightlytest-serverside: drawfilesizegraph.php added (r1.1) --- Log message: Adding a script to create a graph of file sizes. this script hasnt been tested yet and certainly needs debugging. --- Diffs of the changes: (+235 -0) drawfilesizegraph.php | 235 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 235 insertions(+) Index: nightlytest-serverside/drawfilesizegraph.php diff -c /dev/null nightlytest-serverside/drawfilesizegraph.php:1.1 *** /dev/null Wed Jul 26 18:23:04 2006 --- nightlytest-serverside/drawfilesizegraph.php Wed Jul 26 18:22:54 2006 *************** *** 0 **** --- 1,235 ---- + = \"$start\""; + } + + + if(isset($HTTP_GET_VARS['normalize'])){ + if(strcmp($HTTP_GET_VARS['normalize'],"true")==0){ + $NORMALIZE=1; + } + else{ + $NORMALIZE=0; + } + } + else{ + $NORMALIZE=0; + } + + if(isset($HTTP_GET_VARS['showdata'])){ + if(strcmp($HTTP_GET_VARS['showdata'],"true")==0){ + $SHOWDATA=1; + } + else{ + $SHOWDATA=0; + } + } + else{ + $SHOWDATA=0; + } + if(isset($HTTP_GET_VARS['showpoints'])){ + if(strcmp($HTTP_GET_VARS['showpoints'],"true")==0){ + $SHOWPOINTS=1; + } + else{ + $SHOWPOINTS=0; + } + } + else{ + $SHOWPOINTS=0; + } + + /******************************** + * + * printing error image if necessary + * + ********************************/ + if($URL_ERROR==1){ + printErrorMsg("URL Error: $error_msg. Could not draw graph.", $DEBUG); + } + + /******************************** + * + * creating the graph + * + ********************************/ + // Callback formatting function for the X-scale to convert timestamps + // to hour and minutes. + function TimeCallback( $aVal) { + return Date ('m-d-y', $aVal); + } + + $graph = new Graph($xsize,$ysize); + $graph->SetScale("datelin"); + $graph->tabtitle->Set(" $name "); + $graph->xaxis->SetLabelAngle(90); + $graph->SetMargin(50,10,30,110+sizeof($files)*18); + $graph->xaxis->title->Set(""); + $graph->xaxis->title->SetMargin(80); + $graph->yaxis->title->Set(""); + $graph->yaxis->title->SetMargin(30); + $graph->SetFrame(false); + $graph->SetMarginColor("White"); + $graph->legend->SetShadow('gray at 0.4',5); + $graph->legend->SetAbsPos($xsize*.2,$ysize-(40+(sizeof($files)*18)),'top','left'); + $graph->legend->hide(false); + $graph->ygrid->SetFill(true,'#EFEFEF at 0.5','#BBCCFF at 0.5'); + $graph->xgrid->Show(); + $graph->xaxis->scale->SetTimeAlign(MONTHADJ_1); + $graph->xaxis-> SetLabelFormatCallback( 'TimeCallback'); + + /******************************** + * + * executing the query by... + * 1.) finding all the nights associated with the provided machine + * 2.) getting all the correct programs for that night + * + ********************************/ + + $line_arr=array(); + $color_arr = array("red","blue","green","orange","black", "brown","gray"); + + $RELEVANT_DATA=0; + + $index=0; + foreach ($files as $file){ + + $data = get_file_history($mysql_link, $machine_id, $file) + + $xdata=array(); + $values=array(); + $data_max=-1; + + foreach ($data as $d){ + push_array($xdata, $d[0]); + if($d[2] > $data_max){ $data_max=$d[2]; } + push_array($values, $d[2]); + } + + if($NORMALIZE){ + for($i=0; $iSetLegend("$file"); + if($SHOWDATA==1){ + $line_arr[$index]->value->Show(); + } + if($SHOWPOINTS==1){ + $line_arr[$index]->mark->SetType(MARK_UTRIANGLE); + } + $color_index=$index % sizeof($color_arr); + $line_arr[$index]->SetColor($color_arr[$color_index]); + $graph->Add($line_arr[$index]); + $index++; + }#end foreach + + if($RELEVANT_DATA==0){ + printErrorMsg("Error: Graph of $measure contains no data", $DEBUG); + } + + if($DEBUG){ + print "Finished!
$RELEVANT_DATA
\n"; + } + else{ + $graph->Stroke(); + } + + ?> + From lattner at cs.uiuc.edu Wed Jul 26 18:56:10 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 26 Jul 2006 18:56:10 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Message-ID: <200607262356.k6QNuAwl002282@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: LegalizeDAG.cpp updated: 1.382 -> 1.383 --- Log message: Fix a case where LegalizeAllNodesNotLeadingTo could take exponential time. This manifested itself as really long time to compile Regression/CodeGen/Generic/2003-05-28-ManyArgs.ll on ppc. This is PR847: http://llvm.org/PR847 . --- Diffs of the changes: (+21 -6) LegalizeDAG.cpp | 27 +++++++++++++++++++++------ 1 files changed, 21 insertions(+), 6 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.382 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.383 --- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.382 Tue Jul 11 12:58:07 2006 +++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Wed Jul 26 18:55:56 2006 @@ -177,7 +177,8 @@ /// build_vector Mask. If it's not a legal shuffle, it returns null. SDNode *isShuffleLegal(MVT::ValueType VT, SDOperand Mask) const; - bool LegalizeAllNodesNotLeadingTo(SDNode *N, SDNode *Dest); + bool LegalizeAllNodesNotLeadingTo(SDNode *N, SDNode *Dest, + std::set &NodesLeadingTo); void LegalizeSetCCOperands(SDOperand &LHS, SDOperand &RHS, SDOperand &CC); @@ -406,10 +407,18 @@ /// LegalizeAllNodesNotLeadingTo - Recursively walk the uses of N, looking to /// see if any uses can reach Dest. If no dest operands can get to dest, /// legalize them, legalize ourself, and return false, otherwise, return true. -bool SelectionDAGLegalize::LegalizeAllNodesNotLeadingTo(SDNode *N, - SDNode *Dest) { +/// +/// Keep track of the nodes we fine that actually do lead to Dest in +/// NodesLeadingTo. This avoids retraversing them exponential number of times. +/// +bool SelectionDAGLegalize::LegalizeAllNodesNotLeadingTo(SDNode *N, SDNode *Dest, + std::set &NodesLeadingTo) { if (N == Dest) return true; // N certainly leads to Dest :) + // If we've already processed this node and it does lead to Dest, there is no + // need to reprocess it. + if (NodesLeadingTo.count(N)) return true; + // If the first result of this node has been already legalized, then it cannot // reach N. switch (getTypeAction(N->getValueType(0))) { @@ -429,9 +438,12 @@ bool OperandsLeadToDest = false; for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i) OperandsLeadToDest |= // If an operand leads to Dest, so do we. - LegalizeAllNodesNotLeadingTo(N->getOperand(i).Val, Dest); + LegalizeAllNodesNotLeadingTo(N->getOperand(i).Val, Dest, NodesLeadingTo); - if (OperandsLeadToDest) return true; + if (OperandsLeadToDest) { + NodesLeadingTo.insert(N); + return true; + } // Okay, this node looks safe, legalize it and return false. HandleOp(SDOperand(N, 0)); @@ -1043,8 +1055,11 @@ // Recursively Legalize all of the inputs of the call end that do not lead // to this call start. This ensures that any libcalls that need be inserted // are inserted *before* the CALLSEQ_START. + {std::set NodesLeadingTo; for (unsigned i = 0, e = CallEnd->getNumOperands(); i != e; ++i) - LegalizeAllNodesNotLeadingTo(CallEnd->getOperand(i).Val, Node); + LegalizeAllNodesNotLeadingTo(CallEnd->getOperand(i).Val, Node, + NodesLeadingTo); + } // Now that we legalized all of the inputs (which may have inserted // libcalls) create the new CALLSEQ_START node. From lattner at cs.uiuc.edu Wed Jul 26 19:04:28 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 26 Jul 2006 19:04:28 -0500 Subject: [llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/Intercept.cpp Message-ID: <200607270004.k6R04SKE002702@zion.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine/JIT: Intercept.cpp updated: 1.26 -> 1.27 --- Log message: Fix warning on linux --- Diffs of the changes: (+8 -8) Intercept.cpp | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) Index: llvm/lib/ExecutionEngine/JIT/Intercept.cpp diff -u llvm/lib/ExecutionEngine/JIT/Intercept.cpp:1.26 llvm/lib/ExecutionEngine/JIT/Intercept.cpp:1.27 --- llvm/lib/ExecutionEngine/JIT/Intercept.cpp:1.26 Thu Jun 1 12:12:14 2006 +++ llvm/lib/ExecutionEngine/JIT/Intercept.cpp Wed Jul 26 19:04:14 2006 @@ -52,14 +52,14 @@ #include #endif void *FunctionPointers[] = { - (void *) stat, - (void *) fstat, - (void *) lstat, - (void *) stat64, - (void *) fstat64, - (void *) lstat64, - (void *) atexit, - (void *) mknod + (void *)(intptr_t) stat, + (void *)(intptr_t) fstat, + (void *)(intptr_t) lstat, + (void *)(intptr_t) stat64, + (void *)(intptr_t) fstat64, + (void *)(intptr_t) lstat64, + (void *)(intptr_t) atexit, + (void *)(intptr_t) mknod }; #endif // __linux__ From pjenkins at apple.com Wed Jul 26 19:42:20 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Wed, 26 Jul 2006 19:42:20 -0500 Subject: [llvm-commits] CVS: nightlytest-serverside/NightlyTestAccept.cgi Message-ID: <200607270042.k6R0gKoA003505@zion.cs.uiuc.edu> Changes in directory nightlytest-serverside: NightlyTestAccept.cgi updated: 1.32 -> 1.33 --- Log message: Some reformatting of the nightly test results email along with a change to accomodate the new database schema for file sizes. --- Diffs of the changes: (+54 -14) NightlyTestAccept.cgi | 68 +++++++++++++++++++++++++++++++++++++++----------- 1 files changed, 54 insertions(+), 14 deletions(-) Index: nightlytest-serverside/NightlyTestAccept.cgi diff -u nightlytest-serverside/NightlyTestAccept.cgi:1.32 nightlytest-serverside/NightlyTestAccept.cgi:1.33 --- nightlytest-serverside/NightlyTestAccept.cgi:1.32 Wed Jul 26 12:48:44 2006 +++ nightlytest-serverside/NightlyTestAccept.cgi Wed Jul 26 19:42:06 2006 @@ -284,9 +284,7 @@ $y++; $cvsuserupdatelist=$_[$y]; $y++; - $a_file_size=$_[$y]; - $y++; - $o_file_size=$_[$y]; + @@ -298,7 +296,7 @@ " passing_tests, unexpfail_tests, expfail_tests,". " newly_passing_tests, newly_failing_tests, new_tests,". " removed_tests, cvs_added, cvs_removed, cvs_modified,". - " cvs_usersadd, cvs_usersco, a_file_size, o_file_size) values (". + " cvs_usersadd, cvs_usersco) values (". "\"$machine_id\", \"$db_date\", \"$buildstatus\",". "\"$configtime_cpu\", \"$configtime_wall\", \"$cvscheckouttime_cpu\",". "\"$cvscheckouttime_wall\", \"$buildtime_cpu\", \"$buildtime_wall\",". @@ -309,8 +307,7 @@ "\"$expfail_tests\", \"$newly_passing_tests\", \"$newly_failing_tests\",". "\"$new_tests\", \"$removed_tests\",". "\"$cvsaddedfiles\", \"$cvsremovedfiles\", \"$cvsmodifiedfiles\",". - "\"$cvsusercommitlist\", \"$cvsuserupdatelist\",". - "\"$a_file_size\", \"$o_file_size\")"); + "\"$cvsusercommitlist\", \"$cvsuserupdatelist\")"); $d->execute; @@ -354,7 +351,30 @@ # #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sub AddProgram{ #$program, $result, $type, $night - my $d = $dbh->prepare("INSERT INTO program (program, result, type, night) VALUES (\"$_[0]\", \"$_[1]\", \"$_[2]\", $_[3])"); + $query = "INSERT INTO program (program, result, type, night) VALUES". + " (\"$_[0]\", \"$_[1]\", \"$_[2]\", $_[3])"; + my $d = $dbh->prepare($query); + $d->execute; +} + +#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# mysql> describe file; +# +-------+---------+------+-----+---------+-------+ +# | Field | Type | Null | Key | Default | Extra | +# +-------+---------+------+-----+---------+-------+ +# | file | text | | | | | +# | size | int(11) | | | 0 | | +# | night | int(11) | | | 0 | | +# | type | text | YES | | NULL | | +# +-------+---------+------+-----+---------+-------+ +# 4 rows in set (0.00 sec) +# +#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +sub AddFile{ #$file, $size, $night, $type + $query = "INSERT INTO file (file, size, night, type) VALUES (\"$_[0]\", ". + "\"$_[1]\", \"$_[2]\", $_[3])"; + my $d = $dbh->prepare($query); $d->execute; } @@ -432,6 +452,15 @@ $olden_tests="" unless $olden_tests; my @OLDEN_TESTS = split $spliton, $singlesource_tests; +my $o_file_size = param('o_file_sizes'); + $o_file_size="" unless $o_file_size; + chomp($o_file_size); +my @O_FILE_SIZE = split $spliton, $o_file_size; +my $a_file_size = param('a_file_sizes'); + $a_file_size="" unless $o_file_size; + chomp($a_file_size); +my @A_FILE_SIZE = split $spliton, $a_file_size; + my $filesincvs = param('cvs_file_count'); my $dirsincvs = param('cvs_dir_count'); my $loc = param('lines_of_code'); @@ -463,9 +492,7 @@ my $removed_tests=param('removed_tests'); my $gcc_version = param('gcc_version'); my $warnings = param('warnings'); -my $lines_of_code = param('lines_of_code'); -my $o_file_size = param('o_file_sizes'); -my $a_file_size = param('a_file_sizes'); +my $lines_of_code = param('lines_of_code'); ################################################################################ # @@ -601,8 +628,7 @@ $expfail_tests, $newly_passing_tests, $newly_failing_tests, $new_tests, $removed_tests, $cvsaddedfiles, $cvsremovedfiles, $cvsmodifiedfiles, - $cvsusercommitlist, $cvsuserupdatelist, $a_file_size, - $o_file_size; + $cvsusercommitlist, $cvsuserupdatelist; foreach $x(keys %singlesource_processed){ AddProgram $x, $singlesource_processed{$x}, "singlesource", $night_id; @@ -616,6 +642,17 @@ AddProgram $x, $external_processed{$x}, "external", $night_id; } +foreach $x (@O_FILE_SIZE){ + $x =~ m/(.+)\s+(.+)\s+(.+)/gi; + AddFile $2, $1, $night_id, $3; +} + +foreach $x (@A_FILE_SIZE){ + $x =~ m/(.+)\s+(.+)\s+(.+)/gi; + AddFile $2, $1, $night_id, $3; +} + + ################################################################################ # # Adding lines of code @@ -635,16 +672,19 @@ # Sending email to nightly test email archive # ################################################################################ - $link_to_page="http://llvm.org/nightlytest/machine.php?machine=$machine_id"; $email = "$link_to_page\n"; $email .= "Name: $name\n"; $email .= "Nickname: $nickname\n"; $email .= "Buildstatus: $buildstatus\n"; +$newly_passing_tests="None" unless $newly_passing_tests ne ""; $email .= "\nNew Test Passes:\n$newly_passing_tests\n"; +$newly_failing_tests="None" unless $newly_failing_tests ne ""; $email .= "\nNew Test Failures:\n$newly_failing_tests\n"; +$newtests="None" unless $new_tests ne ""; $email .= "\nAdded Tests:\n$new_tests\n"; -$email .= "\nRemoved Tests\n$removed_tests\n"; +$removed_tests="None" unless $removed_tests ne ""; +$email .= "\nRemoved Tests:\n$removed_tests\n"; $email_addr = "llvm-testresults\@cs.uiuc.edu"; `echo "$email" | mail -s '$nickname $hardware nightly tester results' $email_addr`; From pjenkins at apple.com Wed Jul 26 20:04:00 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Wed, 26 Jul 2006 20:04:00 -0500 Subject: [llvm-commits] CVS: llvm/utils/NewNightlyTest.pl Message-ID: <200607270104.k6R140gG003907@zion.cs.uiuc.edu> Changes in directory llvm/utils: NewNightlyTest.pl updated: 1.26 -> 1.27 --- Log message: This change will allow support for SunOS to the testing script. It adds a check to see if we're running on SunOS and if so, then uses gmake instead of make. --- Diffs of the changes: (+39 -17) NewNightlyTest.pl | 56 +++++++++++++++++++++++++++++++++++++----------------- 1 files changed, 39 insertions(+), 17 deletions(-) Index: llvm/utils/NewNightlyTest.pl diff -u llvm/utils/NewNightlyTest.pl:1.26 llvm/utils/NewNightlyTest.pl:1.27 --- llvm/utils/NewNightlyTest.pl:1.26 Sun Jul 23 17:57:28 2006 +++ llvm/utils/NewNightlyTest.pl Wed Jul 26 20:03:46 2006 @@ -178,7 +178,13 @@ $CONFIGUREARGS .= " --enable-jit"; } -die "Must specify 0 or 3 options!" if (@ARGV != 0 and @ARGV != 3); + +if (@ARGV != 0 and @ARGV != 3){ + foreach $x (@ARGV){ + print "$x\n"; + } + print "Must specify 0 or 3 options!"; +} if (@ARGV == 3) { $CVSRootDir = $ARGV[0]; @@ -186,6 +192,13 @@ $WebDir = $ARGV[2]; } +if($CVSRootDir eq "" or + $BuildDir eq "" or + $WebDir eq ""){ + die("please specify a cvs root directory, a build directory, and a ". + "web directory"); + } + if($nickname eq ""){ die ("Please invoke NewNightlyTest.pl with command line option \"-nickname \""); } @@ -193,6 +206,15 @@ $BUILDTYPE = "debug"; } +#FIXME: this is a hack for SunOS, there must be a better way +if(`uname` eq "SunOS"){ + $MAKECMD = "gmake"; +} +else { + $MAKECMD="make"; +} + + ############################################################## # #define the file names we'll use @@ -596,11 +618,11 @@ system "(time -p $NICE ./configure $CONFIGUREARGS $EXTRAFLAGS) > $BuildLog 2>&1"; if ( $VERBOSE ) { - print "BUILD STAGE:\n"; - print "(time -p $NICE make $MAKEOPTS) >> $BuildLog 2>&1\n"; + print "BUILD STAGE:\n"; + print "(time -p $NICE $MAKECMD $MAKEOPTS) >> $BuildLog 2>&1\n"; } # Build the entire tree, capturing the output into $BuildLog - system "(time -p $NICE make $MAKEOPTS) >> $BuildLog 2>&1"; + system "(time -p $NICE $MAKECMD $MAKEOPTS) >> $BuildLog 2>&1"; } @@ -637,8 +659,8 @@ $BuildStatus = "Skipped by user"; $BuildError = 1; } -elsif (`grep '^make[^:]*: .*Error' $BuildLog | wc -l` + 0 || - `grep '^make: \*\*\*.*Stop.' $BuildLog | wc -l`+0) { +elsif (`grep '^$MAKECMD\[^:]*: .*Error' $BuildLog | wc -l` + 0 || + `grep '^$MAKECMD: \*\*\*.*Stop.' $BuildLog | wc -l`+0) { $BuildStatus = "Error: compilation aborted"; $BuildError = 1; print "\n***ERROR BUILDING TREE\n\n"; @@ -683,13 +705,13 @@ if(!$NODEJAGNU) { if($VERBOSE) { - print "DEJAGNU FEATURE/REGRESSION TEST STAGE:\n"; - print "(time -p make $MAKEOPTS check) > $dejagnu_output 2>&1\n"; + print "DEJAGNU FEATURE/REGRESSION TEST STAGE:\n"; + print "(time -p $MAKECMD $MAKEOPTS check) > $dejagnu_output 2>&1\n"; } #Run the feature and regression tests, results are put into testrun.sum #Full log in testrun.log - system "(time -p make $MAKEOPTS check) > $dejagnu_output 2>&1"; + system "(time -p $MAKECMD $MAKEOPTS check) > $dejagnu_output 2>&1"; #Copy the testrun.log and testrun.sum to our webdir CopyFile("test/testrun.log", $DejagnuLog); @@ -766,19 +788,19 @@ # Run the programs tests... creating a report.nightly.csv file if (!$NOTEST) { - print "make -k $MAKEOPTS $PROGTESTOPTS report.nightly.csv " + print "$MAKECMD -k $MAKEOPTS $PROGTESTOPTS report.nightly.csv " . "TEST=nightly > $ProgramTestLog 2>&1\n"; - system "make -k $MAKEOPTS $PROGTESTOPTS report.nightly.csv " + system "$MAKECMD -k $MAKEOPTS $PROGTESTOPTS report.nightly.csv " . "TEST=nightly > $ProgramTestLog 2>&1"; - $llcbeta_options=`make print-llcbeta-option`; + $llcbeta_options=`$MAKECMD print-llcbeta-option`; } my $ProgramsTable; - if (`grep '^make[^:]: .*Error' $ProgramTestLog | wc -l` + 0){ + if (`grep '^$MAKECMD\[^:]: .*Error' $ProgramTestLog | wc -l` + 0){ $TestError = 1; $ProgramsTable="Error running test $SubDir\n"; print "ERROR TESTING\n"; - } elsif (`grep '^make[^:]: .*No rule to make target' $ProgramTestLog | wc -l` + 0) { + } elsif (`grep '^$MAKECMD\[^:]: .*No rule to make target' $ProgramTestLog | wc -l` + 0) { $TestError = 1; $ProgramsTable="Makefile error running tests $SubDir!\n"; print "ERROR TESTING\n"; @@ -925,13 +947,13 @@ "Olden Test Directory"); # Clean out previous results... - system "$NICE make $MAKEOPTS clean > /dev/null 2>&1"; + system "$NICE $MAKECMD $MAKEOPTS clean > /dev/null 2>&1"; # Run the nightly test in this directory, with LARGE_PROBLEM_SIZE and # GET_STABLE_NUMBERS enabled! - if( $VERBOSE ) { print "make -k $MAKEOPTS $PROGTESTOPTS report.nightly.csv.out TEST=nightly " . + if( $VERBOSE ) { print "$MAKECMD -k $MAKEOPTS $PROGTESTOPTS report.nightly.csv.out TEST=nightly " . " LARGE_PROBLEM_SIZE=1 GET_STABLE_NUMBERS=1 > /dev/null 2>&1\n"; } - system "make -k $MAKEOPTS $PROGTESTOPTS report.nightly.csv.out TEST=nightly " . + system "$MAKECMD -k $MAKEOPTS $PROGTESTOPTS report.nightly.csv.out TEST=nightly " . " LARGE_PROBLEM_SIZE=1 GET_STABLE_NUMBERS=1 > /dev/null 2>&1"; system "cp report.nightly.csv $OldenTestsLog"; } #else { From jlaskey at apple.com Wed Jul 26 20:12:39 2006 From: jlaskey at apple.com (Jim Laskey) Date: Wed, 26 Jul 2006 20:12:39 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86AsmPrinter.h Message-ID: <200607270112.k6R1CdqW004054@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86AsmPrinter.h updated: 1.23 -> 1.24 --- Log message: Prevent creation of MachineDebugInfo for intel unless it is darwin. RC842. --- Diffs of the changes: (+3 -1) X86AsmPrinter.h | 4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) Index: llvm/lib/Target/X86/X86AsmPrinter.h diff -u llvm/lib/Target/X86/X86AsmPrinter.h:1.23 llvm/lib/Target/X86/X86AsmPrinter.h:1.24 --- llvm/lib/Target/X86/X86AsmPrinter.h:1.23 Fri Jul 14 18:05:05 2006 +++ llvm/lib/Target/X86/X86AsmPrinter.h Wed Jul 26 20:12:23 2006 @@ -64,7 +64,9 @@ void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); - AU.addRequired(); + if (Subtarget->TargetType == X86Subtarget::isDarwin) { + AU.addRequired(); + } MachineFunctionPass::getAnalysisUsage(AU); } From natebegeman at mac.com Wed Jul 26 20:13:21 2006 From: natebegeman at mac.com (Nate Begeman) Date: Wed, 26 Jul 2006 20:13:21 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp Message-ID: <200607270113.k6R1DLi0004095@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCAsmPrinter.cpp updated: 1.188 -> 1.189 --- Log message: Support jump tables when in PIC relocation model --- Diffs of the changes: (+2 -2) PPCAsmPrinter.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp diff -u llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.188 llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.189 --- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.188 Wed Jul 26 16:12:04 2006 +++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp Wed Jul 26 20:13:04 2006 @@ -282,8 +282,8 @@ Data64bitsDirective = 0; // we can't emit a 64-bit unit AlignmentIsInBytes = false; // Alignment is by power of 2. ConstantPoolSection = "\t.const\t"; - // FIXME: Conditionalize jump table section based on PIC - JumpTableSection = ".const"; + JumpTableDataSection = ".const"; + JumpTableTextSection = "\t.text"; LCOMMDirective = "\t.lcomm\t"; StaticCtorsSection = ".mod_init_func"; StaticDtorsSection = ".mod_term_func"; From natebegeman at mac.com Wed Jul 26 20:13:21 2006 From: natebegeman at mac.com (Nate Begeman) Date: Wed, 26 Jul 2006 20:13:21 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Message-ID: <200607270113.k6R1DLC4004098@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAGISel.cpp updated: 1.259 -> 1.260 --- Log message: Support jump tables when in PIC relocation model --- Diffs of the changes: (+10 -4) SelectionDAGISel.cpp | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.259 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.260 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.259 Thu Jul 20 14:02:21 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Wed Jul 26 20:13:04 2006 @@ -850,9 +850,15 @@ SDOperand Copy = DAG.getCopyFromReg(getRoot(), JT.Reg, PTy); SDOperand IDX = DAG.getNode(ISD::MUL, PTy, Copy, DAG.getConstant(PTyBytes, PTy)); - SDOperand ADD = DAG.getNode(ISD::ADD, PTy, IDX, DAG.getJumpTable(JT.JTI,PTy)); + SDOperand TAB = DAG.getJumpTable(JT.JTI,PTy); + SDOperand ADD = DAG.getNode(ISD::ADD, PTy, IDX, TAB); SDOperand LD = DAG.getLoad(PTy, Copy.getValue(1), ADD, DAG.getSrcValue(0)); - DAG.setRoot(DAG.getNode(ISD::BRIND, MVT::Other, LD.getValue(1), LD)); + if (TLI.getTargetMachine().getRelocationModel() == Reloc::PIC_) { + ADD = DAG.getNode(ISD::ADD, PTy, LD.getValue(0), TAB); + DAG.setRoot(DAG.getNode(ISD::BRIND, MVT::Other, LD.getValue(1), ADD)); + } else { + DAG.setRoot(DAG.getNode(ISD::BRIND, MVT::Other, LD.getValue(1), LD)); + } } void SelectionDAGLowering::visitSwitch(SwitchInst &I) { @@ -896,20 +902,20 @@ // to represent the switch. MachineFunction *CurMF = CurMBB->getParent(); const BasicBlock *LLVMBB = CurMBB->getBasicBlock(); - Reloc::Model Relocs = TLI.getTargetMachine().getRelocationModel(); // If the switch has more than 5 blocks, and at least 31.25% dense, and the // target supports indirect branches, then emit a jump table rather than // lowering the switch to a binary tree of conditional branches. // FIXME: Make this work with PIC code if (TLI.isOperationLegal(ISD::BRIND, TLI.getPointerTy()) && - (Relocs == Reloc::Static || Relocs == Reloc::DynamicNoPIC) && Cases.size() > 5) { uint64_t First = cast(Cases.front().first)->getRawValue(); uint64_t Last = cast(Cases.back().first)->getRawValue(); double Density = (double)Cases.size() / (double)((Last - First) + 1ULL); if (Density >= 0.3125) { + Reloc::Model Relocs = TLI.getTargetMachine().getRelocationModel(); + // Create a new basic block to hold the code for loading the address // of the jump table, and jumping to it. Update successor information; // we will either branch to the default case for the switch, or the jump From natebegeman at mac.com Wed Jul 26 20:13:24 2006 From: natebegeman at mac.com (Nate Begeman) Date: Wed, 26 Jul 2006 20:13:24 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/AsmPrinter.cpp Message-ID: <200607270113.k6R1DOCd004105@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: AsmPrinter.cpp updated: 1.84 -> 1.85 --- Log message: Support jump tables when in PIC relocation model --- Diffs of the changes: (+18 -16) AsmPrinter.cpp | 34 ++++++++++++++++++---------------- 1 files changed, 18 insertions(+), 16 deletions(-) Index: llvm/lib/CodeGen/AsmPrinter.cpp diff -u llvm/lib/CodeGen/AsmPrinter.cpp:1.84 llvm/lib/CodeGen/AsmPrinter.cpp:1.85 --- llvm/lib/CodeGen/AsmPrinter.cpp:1.84 Fri Jul 14 20:34:12 2006 +++ llvm/lib/CodeGen/AsmPrinter.cpp Wed Jul 26 20:13:04 2006 @@ -52,7 +52,8 @@ DataSectionStartSuffix(""), SectionEndDirectiveSuffix(0), ConstantPoolSection("\t.section .rodata\n"), - JumpTableSection("\t.section .rodata\n"), + JumpTableDataSection("\t.section .rodata\n"), + JumpTableTextSection("\t.text\n"), StaticCtorsSection("\t.section .ctors,\"aw\", at progbits"), StaticDtorsSection("\t.section .dtors,\"aw\", at progbits"), FourByteConstantSection(0), @@ -89,7 +90,7 @@ O << CurrentSection << TextSectionStartSuffix << '\n'; } -/// SwitchToTextSection - Switch to the specified text section of the executable +/// SwitchToDataSection - Switch to the specified data section of the executable /// if we are not already in it! /// void AsmPrinter::SwitchToDataSection(const char *NewSection, @@ -209,29 +210,30 @@ const std::vector &JT = MJTI->getJumpTables(); if (JT.empty()) return; const TargetData *TD = TM.getTargetData(); + const char *PtrDataDirective = Data32bitsDirective; - // FIXME: someday we need to handle PIC jump tables - assert((TM.getRelocationModel() == Reloc::Static || - TM.getRelocationModel() == Reloc::DynamicNoPIC) && - "Unhandled relocation model emitting jump table information!"); - - SwitchToDataSection(JumpTableSection, 0); + // Pick the directive to use to print the jump table entries, and switch to + // the appropriate section. + if (TM.getRelocationModel() == Reloc::PIC_) { + SwitchToTextSection(JumpTableTextSection, 0); + } else { + SwitchToDataSection(JumpTableDataSection, 0); + if (TD->getPointerSize() == 8) + PtrDataDirective = Data64bitsDirective; + } EmitAlignment(Log2_32(TD->getPointerAlignment())); - // Pick the directive to use based on the pointer size. FIXME: when we support - // PIC jumptables, this should always use the 32-bit directive for label - // differences. - const char *PtrDataDirective = Data32bitsDirective; - if (TD->getPointerSize() == 8) - PtrDataDirective = Data64bitsDirective; - for (unsigned i = 0, e = JT.size(); i != e; ++i) { O << PrivateGlobalPrefix << "JTI" << getFunctionNumber() << '_' << i << ":\n"; const std::vector &JTBBs = JT[i].MBBs; for (unsigned ii = 0, ee = JTBBs.size(); ii != ee; ++ii) { O << PtrDataDirective << ' '; - printBasicBlockLabel(JTBBs[ii]); + printBasicBlockLabel(JTBBs[ii], false, false); + if (TM.getRelocationModel() == Reloc::PIC_) { + O << '-' << PrivateGlobalPrefix << "JTI" << getFunctionNumber() + << '_' << i; + } O << '\n'; } } From natebegeman at mac.com Wed Jul 26 20:13:24 2006 From: natebegeman at mac.com (Nate Begeman) Date: Wed, 26 Jul 2006 20:13:24 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/AsmPrinter.h Message-ID: <200607270113.k6R1DO3M004111@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: AsmPrinter.h updated: 1.43 -> 1.44 --- Log message: Support jump tables when in PIC relocation model --- Diffs of the changes: (+9 -3) AsmPrinter.h | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) Index: llvm/include/llvm/CodeGen/AsmPrinter.h diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.43 llvm/include/llvm/CodeGen/AsmPrinter.h:1.44 --- llvm/include/llvm/CodeGen/AsmPrinter.h:1.43 Wed Jun 28 19:26:09 2006 +++ llvm/include/llvm/CodeGen/AsmPrinter.h Wed Jul 26 20:13:04 2006 @@ -156,9 +156,15 @@ /// before emitting the constant pool for a function. const char *ConstantPoolSection; // Defaults to "\t.section .rodata\n" - /// JumpTableSection - This is the section that we SwitchToSection right - /// before emitting the jump tables for a function. - const char *JumpTableSection; // Defaults to "\t.section .rodata\n" + /// JumpTableDataSection - This is the section that we SwitchToSection right + /// before emitting the jump tables for a function when the relocation model + /// is not PIC. + const char *JumpTableDataSection; // Defaults to "\t.section .rodata\n" + + /// JumpTableTextSection - This is the section that we SwitchToSection right + /// before emitting the jump tables for a function when the relocation model + /// is PIC. + const char *JumpTableTextSection; // Defaults to "\t.text\n" /// StaticCtorsSection - This is the directive that is emitted to switch to /// a section to emit the static constructor list. From natebegeman at mac.com Wed Jul 26 20:13:24 2006 From: natebegeman at mac.com (Nate Begeman) Date: Wed, 26 Jul 2006 20:13:24 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp X86AsmPrinter.cpp Message-ID: <200607270113.k6R1DOWi004118@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ATTAsmPrinter.cpp updated: 1.54 -> 1.55 X86AsmPrinter.cpp updated: 1.189 -> 1.190 --- Log message: Support jump tables when in PIC relocation model --- Diffs of the changes: (+4 -2) X86ATTAsmPrinter.cpp | 4 +++- X86AsmPrinter.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) Index: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp diff -u llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.54 llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.55 --- llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.54 Wed Jul 26 16:12:04 2006 +++ llvm/lib/Target/X86/X86ATTAsmPrinter.cpp Wed Jul 26 20:13:04 2006 @@ -143,7 +143,9 @@ if (!isMemOp) O << '$'; O << PrivateGlobalPrefix << "JTI" << getFunctionNumber() << "_" << MO.getJumpTableIndex(); - // FIXME: PIC relocation model + if (Subtarget->TargetType == X86Subtarget::isDarwin && + TM.getRelocationModel() == Reloc::PIC_) + O << "-\"L" << getFunctionNumber() << "$pb\""; return; } case MachineOperand::MO_ConstantPoolIndex: { Index: llvm/lib/Target/X86/X86AsmPrinter.cpp diff -u llvm/lib/Target/X86/X86AsmPrinter.cpp:1.189 llvm/lib/Target/X86/X86AsmPrinter.cpp:1.190 --- llvm/lib/Target/X86/X86AsmPrinter.cpp:1.189 Fri Jul 14 18:05:05 2006 +++ llvm/lib/Target/X86/X86AsmPrinter.cpp Wed Jul 26 20:13:04 2006 @@ -62,7 +62,7 @@ ZeroDirective = "\t.space\t"; // ".space N" emits N zeros. PrivateGlobalPrefix = "L"; // Marker for constant pool idxs ConstantPoolSection = "\t.const\n"; - JumpTableSection = "\t.const\n"; // FIXME: depends on PIC mode + JumpTableDataSection = "\t.const\n"; // FIXME: depends on PIC mode FourByteConstantSection = "\t.literal4\n"; EightByteConstantSection = "\t.literal8\n"; LCOMMDirective = "\t.lcomm\t"; From pjenkins at apple.com Wed Jul 26 20:17:31 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Wed, 26 Jul 2006 20:17:31 -0500 Subject: [llvm-commits] CVS: llvm/utils/NewNightlyTest.pl Message-ID: <200607270117.k6R1HVsK004232@zion.cs.uiuc.edu> Changes in directory llvm/utils: NewNightlyTest.pl updated: 1.27 -> 1.28 --- Log message: added support for the -use-gmake option. This will come in handy when running the test on SunOS. --- Diffs of the changes: (+10 -12) NewNightlyTest.pl | 22 ++++++++++------------ 1 files changed, 10 insertions(+), 12 deletions(-) Index: llvm/utils/NewNightlyTest.pl diff -u llvm/utils/NewNightlyTest.pl:1.27 llvm/utils/NewNightlyTest.pl:1.28 --- llvm/utils/NewNightlyTest.pl:1.27 Wed Jul 26 20:03:46 2006 +++ llvm/utils/NewNightlyTest.pl Wed Jul 26 20:17:17 2006 @@ -52,6 +52,8 @@ # the default. # -compileflags Next argument specifies extra options passed to make when # building LLVM. +# -use-gmake Use gmake instead of the default make command to build +# llvm and run tests. # # ---------------- Options to configure llvm-test ---------------------------- # -extraflags Next argument specifies extra options that are passed to @@ -108,6 +110,7 @@ $nickname=""; $NOTEST=0; $NORUNNINGTESTS=0; +$MAKECMD="make"; while (scalar(@ARGV) and ($_ = $ARGV[0], /^[-+]/)) { shift; @@ -122,8 +125,8 @@ if (/^-norunningtests$/) { $NORUNNINGTESTS = 1; next; } if (/^-parallel$/) { $MAKEOPTS = "$MAKEOPTS -j2 -l3.0"; next; } if (/^-release$/) { $MAKEOPTS = "$MAKEOPTS ENABLE_OPTIMIZED=1 ". - "OPTIMIZE_OPTION=-O2"; - $BUILDTYPE="release"; next; } + "OPTIMIZE_OPTION=-O2"; + $BUILDTYPE="release"; next; } if (/^-enable-llcbeta$/) { $PROGTESTOPTS .= " ENABLE_LLCBETA=1"; next; } if (/^-disable-llc$/) { $PROGTESTOPTS .= " DISABLE_LLC=1"; $CONFIGUREARGS .= " --disable-llc_diffs"; next; } @@ -162,6 +165,9 @@ if (/^-compileflags/) { $MAKEOPTS = "$MAKEOPTS $ARGV[0]"; shift; next; } + if (/^-use-gmake/) { + $MAKECMD = "ARGV[0]"; shift; next; + } if (/^-extraflags/) { $PROGTESTOPTS .= " EXTRA_FLAGS=\'$ARGV[0]\'"; shift; next; } @@ -202,19 +208,11 @@ if($nickname eq ""){ die ("Please invoke NewNightlyTest.pl with command line option \"-nickname \""); } -if($BUILDTYPE ne "releaese"){ - $BUILDTYPE = "debug"; -} -#FIXME: this is a hack for SunOS, there must be a better way -if(`uname` eq "SunOS"){ - $MAKECMD = "gmake"; -} -else { - $MAKECMD="make"; +if($BUILDTYPE ne "release"){ + $BUILDTYPE = "debug"; } - ############################################################## # #define the file names we'll use From pjenkins at apple.com Wed Jul 26 20:23:05 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Wed, 26 Jul 2006 20:23:05 -0500 Subject: [llvm-commits] CVS: nightlytest-serverside/NightlyTestAccept.cgi Message-ID: <200607270123.k6R1N5Bm004399@zion.cs.uiuc.edu> Changes in directory nightlytest-serverside: NightlyTestAccept.cgi updated: 1.33 -> 1.34 --- Log message: Some more formatting changes to the nightly test results email. This time we dont print test changes if build fail and instead link to the build log. --- Diffs of the changes: (+17 -8) NightlyTestAccept.cgi | 25 +++++++++++++++++-------- 1 files changed, 17 insertions(+), 8 deletions(-) Index: nightlytest-serverside/NightlyTestAccept.cgi diff -u nightlytest-serverside/NightlyTestAccept.cgi:1.33 nightlytest-serverside/NightlyTestAccept.cgi:1.34 --- nightlytest-serverside/NightlyTestAccept.cgi:1.33 Wed Jul 26 19:42:06 2006 +++ nightlytest-serverside/NightlyTestAccept.cgi Wed Jul 26 20:22:51 2006 @@ -677,14 +677,23 @@ $email .= "Name: $name\n"; $email .= "Nickname: $nickname\n"; $email .= "Buildstatus: $buildstatus\n"; -$newly_passing_tests="None" unless $newly_passing_tests ne ""; -$email .= "\nNew Test Passes:\n$newly_passing_tests\n"; -$newly_failing_tests="None" unless $newly_failing_tests ne ""; -$email .= "\nNew Test Failures:\n$newly_failing_tests\n"; -$newtests="None" unless $new_tests ne ""; -$email .= "\nAdded Tests:\n$new_tests\n"; -$removed_tests="None" unless $removed_tests ne ""; -$email .= "\nRemoved Tests:\n$removed_tests\n"; + +if($buildstatus eq "OK"){ + $newly_passing_tests="None" unless $newly_passing_tests ne ""; + $email .= "\nNew Test Passes:\n$newly_passing_tests\n"; + $newly_failing_tests="None" unless $newly_failing_tests ne ""; + $email .= "\nNew Test Failures:\n$newly_failing_tests\n"; + $new_tests="None" unless $new_tests ne ""; + $email .= "\nAdded Tests:\n$new_tests\n"; + $removed_tests="None" unless $removed_tests ne ""; + $email .= "\nRemoved Tests:\n$removed_tests\n"; +} +else{ + $temp_date = $db_date; + $temp_date =~s/ /\_/g; + $email .= "\nBuildlog available at http://llvm.org/nightlytest/". + "machines/$machine_id/$temp_date-Build-Log.txt"; +} $email_addr = "llvm-testresults\@cs.uiuc.edu"; `echo "$email" | mail -s '$nickname $hardware nightly tester results' $email_addr`; From pjenkins at apple.com Wed Jul 26 20:24:49 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Wed, 26 Jul 2006 20:24:49 -0500 Subject: [llvm-commits] CVS: llvm/utils/NewNightlyTest.pl Message-ID: <200607270124.k6R1OnTk004435@zion.cs.uiuc.edu> Changes in directory llvm/utils: NewNightlyTest.pl updated: 1.28 -> 1.29 --- Log message: I made a stupid mistake when adding support for -use-gmake. ~PJ --- Diffs of the changes: (+1 -1) NewNightlyTest.pl | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/utils/NewNightlyTest.pl diff -u llvm/utils/NewNightlyTest.pl:1.28 llvm/utils/NewNightlyTest.pl:1.29 --- llvm/utils/NewNightlyTest.pl:1.28 Wed Jul 26 20:17:17 2006 +++ llvm/utils/NewNightlyTest.pl Wed Jul 26 20:24:35 2006 @@ -166,7 +166,7 @@ $MAKEOPTS = "$MAKEOPTS $ARGV[0]"; shift; next; } if (/^-use-gmake/) { - $MAKECMD = "ARGV[0]"; shift; next; + $MAKECMD = "gmake"; shift; next; } if (/^-extraflags/) { $PROGTESTOPTS .= " EXTRA_FLAGS=\'$ARGV[0]\'"; shift; next; From jlaskey at apple.com Wed Jul 26 21:05:27 2006 From: jlaskey at apple.com (Jim Laskey) Date: Wed, 26 Jul 2006 21:05:27 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp X86AsmPrinter.cpp X86AsmPrinter.h Message-ID: <200607270205.k6R25RKU005162@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ATTAsmPrinter.cpp updated: 1.55 -> 1.56 X86AsmPrinter.cpp updated: 1.190 -> 1.191 X86AsmPrinter.h updated: 1.24 -> 1.25 --- Log message: Use the predicate. --- Diffs of the changes: (+15 -15) X86ATTAsmPrinter.cpp | 18 +++++++++--------- X86AsmPrinter.cpp | 10 +++++----- X86AsmPrinter.h | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) Index: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp diff -u llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.55 llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.56 --- llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.55 Wed Jul 26 20:13:04 2006 +++ llvm/lib/Target/X86/X86ATTAsmPrinter.cpp Wed Jul 26 21:05:13 2006 @@ -26,7 +26,7 @@ /// method to print assembly for each instruction. /// bool X86ATTAsmPrinter::runOnMachineFunction(MachineFunction &MF) { - if (Subtarget->TargetType == X86Subtarget::isDarwin) { + if (Subtarget->isTargetDarwin()) { // Let PassManager know we need debug information and relay // the MachineDebugInfo address on to DwarfWriter. DW.SetDebugInfo(&getAnalysis()); @@ -56,7 +56,7 @@ break; case Function::WeakLinkage: case Function::LinkOnceLinkage: - if (Subtarget->TargetType == X86Subtarget::isDarwin) { + if (Subtarget->isTargetDarwin()) { SwitchToTextSection( ".section __TEXT,__textcoal_nt,coalesced,pure_instructions", F); O << "\t.globl\t" << CurrentFnName << "\n"; @@ -78,7 +78,7 @@ } O << CurrentFnName << ":\n"; - if (Subtarget->TargetType == X86Subtarget::isDarwin) { + if (Subtarget->isTargetDarwin()) { // Emit pre-function debug information. DW.BeginFunction(&MF); } @@ -101,7 +101,7 @@ if (HasDotTypeDotSizeDirective) O << "\t.size " << CurrentFnName << ", .-" << CurrentFnName << "\n"; - if (Subtarget->TargetType == X86Subtarget::isDarwin) { + if (Subtarget->isTargetDarwin()) { // Emit post-function debug information. DW.EndFunction(); } @@ -143,7 +143,7 @@ if (!isMemOp) O << '$'; O << PrivateGlobalPrefix << "JTI" << getFunctionNumber() << "_" << MO.getJumpTableIndex(); - if (Subtarget->TargetType == X86Subtarget::isDarwin && + if (Subtarget->isTargetDarwin() && TM.getRelocationModel() == Reloc::PIC_) O << "-\"L" << getFunctionNumber() << "$pb\""; return; @@ -153,7 +153,7 @@ if (!isMemOp) O << '$'; O << PrivateGlobalPrefix << "CPI" << getFunctionNumber() << "_" << MO.getConstantPoolIndex(); - if (Subtarget->TargetType == X86Subtarget::isDarwin && + if (Subtarget->isTargetDarwin() && TM.getRelocationModel() == Reloc::PIC_) O << "-\"L" << getFunctionNumber() << "$pb\""; int Offset = MO.getOffset(); @@ -168,7 +168,7 @@ bool isMemOp = Modifier && !strcmp(Modifier, "mem"); if (!isMemOp && !isCallOp) O << '$'; // Darwin block shameless ripped from PPCAsmPrinter.cpp - if (Subtarget->TargetType == X86Subtarget::isDarwin && + if (Subtarget->isTargetDarwin() && TM.getRelocationModel() != Reloc::Static) { GlobalValue *GV = MO.getGlobal(); std::string Name = Mang->getValueName(GV); @@ -201,7 +201,7 @@ case MachineOperand::MO_ExternalSymbol: { bool isCallOp = Modifier && !strcmp(Modifier, "call"); if (isCallOp && - Subtarget->TargetType == X86Subtarget::isDarwin && + Subtarget->isTargetDarwin() && TM.getRelocationModel() != Reloc::Static) { std::string Name(GlobalPrefix); Name += MO.getSymbolName(); @@ -344,7 +344,7 @@ void X86ATTAsmPrinter::printMachineInstruction(const MachineInstr *MI) { ++EmittedInsts; // This works around some Darwin assembler bugs. - if (Subtarget->TargetType == X86Subtarget::isDarwin) { + if (Subtarget->isTargetDarwin()) { switch (MI->getOpcode()) { case X86::REP_MOVSB: O << "rep/movsb (%esi),(%edi)\n"; Index: llvm/lib/Target/X86/X86AsmPrinter.cpp diff -u llvm/lib/Target/X86/X86AsmPrinter.cpp:1.190 llvm/lib/Target/X86/X86AsmPrinter.cpp:1.191 --- llvm/lib/Target/X86/X86AsmPrinter.cpp:1.190 Wed Jul 26 20:13:04 2006 +++ llvm/lib/Target/X86/X86AsmPrinter.cpp Wed Jul 26 21:05:13 2006 @@ -87,7 +87,7 @@ default: break; } - if (Subtarget->TargetType == X86Subtarget::isDarwin) { + if (Subtarget->isTargetDarwin()) { // Emit initial debug information. DW.BeginModule(&M); } @@ -118,7 +118,7 @@ if (C->isNullValue() && /* FIXME: Verify correct */ (I->hasInternalLinkage() || I->hasWeakLinkage() || I->hasLinkOnceLinkage() || - (Subtarget->TargetType == X86Subtarget::isDarwin && + (Subtarget->isTargetDarwin() && I->hasExternalLinkage() && !I->hasSection()))) { if (Size == 0) Size = 1; // .comm Foo, 0 is undefined, avoid it. if (I->hasExternalLinkage()) { @@ -130,7 +130,7 @@ if (LCOMMDirective != NULL) { if (I->hasInternalLinkage()) { O << LCOMMDirective << name << "," << Size; - if (Subtarget->TargetType == X86Subtarget::isDarwin) + if (Subtarget->isTargetDarwin()) O << "," << (AlignmentIsInBytes ? (1 << Align) : Align); } else O << COMMDirective << name << "," << Size; @@ -149,7 +149,7 @@ switch (I->getLinkage()) { case GlobalValue::LinkOnceLinkage: case GlobalValue::WeakLinkage: - if (Subtarget->TargetType == X86Subtarget::isDarwin) { + if (Subtarget->isTargetDarwin()) { O << "\t.globl " << name << "\n" << "\t.weak_definition " << name << "\n"; SwitchToDataSection(".section __DATA,__const_coal,coalesced", I); @@ -186,7 +186,7 @@ } } - if (Subtarget->TargetType == X86Subtarget::isDarwin) { + if (Subtarget->isTargetDarwin()) { SwitchToDataSection("", 0); // Output stubs for dynamically-linked functions Index: llvm/lib/Target/X86/X86AsmPrinter.h diff -u llvm/lib/Target/X86/X86AsmPrinter.h:1.24 llvm/lib/Target/X86/X86AsmPrinter.h:1.25 --- llvm/lib/Target/X86/X86AsmPrinter.h:1.24 Wed Jul 26 20:12:23 2006 +++ llvm/lib/Target/X86/X86AsmPrinter.h Wed Jul 26 21:05:13 2006 @@ -64,7 +64,7 @@ void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); - if (Subtarget->TargetType == X86Subtarget::isDarwin) { + if (Subtarget->isTargetDarwin()) { AU.addRequired(); } MachineFunctionPass::getAnalysisUsage(AU); From lattner at cs.uiuc.edu Wed Jul 26 22:38:22 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 26 Jul 2006 22:38:22 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/ADT/SmallVector.h Message-ID: <200607270338.k6R3cM5C006643@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/ADT: SmallVector.h updated: 1.1 -> 1.2 --- Log message: Use std::copy instead of custom loops to take advantage of STL optimizations. Add a new append method for appending a range. --- Diffs of the changes: (+19 -5) SmallVector.h | 24 +++++++++++++++++++----- 1 files changed, 19 insertions(+), 5 deletions(-) Index: llvm/include/llvm/ADT/SmallVector.h diff -u llvm/include/llvm/ADT/SmallVector.h:1.1 llvm/include/llvm/ADT/SmallVector.h:1.2 --- llvm/include/llvm/ADT/SmallVector.h:1.1 Wed Jul 26 01:22:30 2006 +++ llvm/include/llvm/ADT/SmallVector.h Wed Jul 26 22:38:08 2006 @@ -14,7 +14,9 @@ #ifndef LLVM_ADT_SMALLVECTOR_H #define LLVM_ADT_SMALLVECTOR_H +#include #include +#include #include namespace llvm { @@ -113,6 +115,20 @@ goto Retry; } + /// append - Add the specified range to the end of the SmallVector. + /// + template + void append(in_iter in_start, in_iter in_end) { + unsigned NumInputs = std::distance(in_start, in_end); + // Grow allocated space if needed. + if (End+NumInputs > Capacity) + grow(size()+NumInputs); + + // Copy the new elements over. + std::uninitialized_copy(in_start, in_end, End); + End += NumInputs; + } + const SmallVector &operator=(const SmallVector &RHS) { // Avoid self-assignment. if (this == &RHS) return *this; @@ -123,8 +139,7 @@ unsigned CurSize = size(); if (CurSize >= RHSSize) { // Assign common elements. - for (unsigned i = 0; i != RHSSize; ++i) - Begin[i] = RHS.Begin[i]; + std::copy(RHS.Begin, RHS.Begin+RHSSize, Begin); // Destroy excess elements. for (unsigned i = RHSSize; i != CurSize; ++i) @@ -144,10 +159,9 @@ End = Begin; CurSize = 0; grow(RHSSize); - } else { + } else if (CurSize) { // Otherwise, use assignment for the already-constructed elements. - for (unsigned i = 0; i != CurSize; ++i) - Begin[i] = RHS.Begin[i]; + std::copy(RHS.Begin, RHS.Begin+CurSize, Begin); } // Copy construct the new elements in place. From lattner at cs.uiuc.edu Wed Jul 26 23:24:28 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 26 Jul 2006 23:24:28 -0500 Subject: [llvm-commits] CVS: llvm/docs/CodingStandards.html Message-ID: <200607270424.k6R4OSCq007472@zion.cs.uiuc.edu> Changes in directory llvm/docs: CodingStandards.html updated: 1.27 -> 1.28 --- Log message: Add some advice --- Diffs of the changes: (+27 -9) CodingStandards.html | 36 +++++++++++++++++++++++++++--------- 1 files changed, 27 insertions(+), 9 deletions(-) Index: llvm/docs/CodingStandards.html diff -u llvm/docs/CodingStandards.html:1.27 llvm/docs/CodingStandards.html:1.28 --- llvm/docs/CodingStandards.html:1.27 Mon Mar 13 23:39:39 2006 +++ llvm/docs/CodingStandards.html Wed Jul 26 23:24:14 2006 @@ -44,10 +44,11 @@
  • The Low Level Issues
      -
    1. Assert Liberally
    2. -
    3. Do not use 'using namespace std'
    4. -
    5. Prefer Preincrement
    6. -
    7. Avoid std::endl
    8. +
    9. Assert Liberally
    10. +
    11. Do not use 'using namespace std'
    12. +
    13. Provide a virtual method anchor for clases in headers
    14. +
    15. Prefer Preincrement
    16. +
    17. Avoid std::endl
  • See Also
  • @@ -489,7 +490,7 @@
    @@ -537,7 +538,7 @@
    @@ -572,7 +573,24 @@ + +
    + +

    If a class is defined in a header file and has a v-table (either it has +virtual methods or it derives from classes with virtual methods), it must +always have at least one out-of-line virtual method in the class. Without +this, the compiler will copy the vtable and RTTI into every .o file that +#includes the header, bloating .o file sizes and increasing link times. +

    + +
    + + + +
    @@ -592,7 +610,7 @@
    @@ -654,7 +672,7 @@ Chris Lattner
    LLVM Compiler Infrastructure
    - Last modified: $Date: 2006/03/14 05:39:39 $ + Last modified: $Date: 2006/07/27 04:24:14 $ From tbrethou at cs.uiuc.edu Wed Jul 26 23:54:49 2006 From: tbrethou at cs.uiuc.edu (Tanya Lattner) Date: Wed, 26 Jul 2006 23:54:49 -0500 Subject: [llvm-commits] [release_18] CVS: llvm/autoconf/configure.ac Message-ID: <200607270454.k6R4snhD008313@zion.cs.uiuc.edu> Changes in directory llvm/autoconf: configure.ac updated: 1.238 -> 1.238.2.1 --- Log message: This is the 1.8 release --- Diffs of the changes: (+1 -1) configure.ac | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.238 llvm/autoconf/configure.ac:1.238.2.1 --- llvm/autoconf/configure.ac:1.238 Wed Jul 26 16:14:56 2006 +++ llvm/autoconf/configure.ac Wed Jul 26 23:54:36 2006 @@ -31,7 +31,7 @@ dnl===-----------------------------------------------------------------------=== dnl Initialize autoconf and define the package name, version number and dnl email address for reporting bugs. -AC_INIT([[llvm]],[[1.8cvs]],[llvmbugs at cs.uiuc.edu]) +AC_INIT([[llvm]],[[1.8]],[llvmbugs at cs.uiuc.edu]) dnl Provide a copyright substitution and ensure the copyright notice is included dnl in the output of --version option of the generated configure script. From lattner at cs.uiuc.edu Wed Jul 26 23:58:47 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 26 Jul 2006 23:58:47 -0500 Subject: [llvm-commits] CVS: llvm/autoconf/configure.ac Message-ID: <200607270458.k6R4wlcv008453@zion.cs.uiuc.edu> Changes in directory llvm/autoconf: configure.ac updated: 1.238 -> 1.239 --- Log message: Bump version # --- Diffs of the changes: (+1 -1) configure.ac | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.238 llvm/autoconf/configure.ac:1.239 --- llvm/autoconf/configure.ac:1.238 Wed Jul 26 16:14:56 2006 +++ llvm/autoconf/configure.ac Wed Jul 26 23:58:33 2006 @@ -31,7 +31,7 @@ dnl===-----------------------------------------------------------------------=== dnl Initialize autoconf and define the package name, version number and dnl email address for reporting bugs. -AC_INIT([[llvm]],[[1.8cvs]],[llvmbugs at cs.uiuc.edu]) +AC_INIT([[llvm]],[[1.9cvs]],[llvmbugs at cs.uiuc.edu]) dnl Provide a copyright substitution and ensure the copyright notice is included dnl in the output of --version option of the generated configure script. From reid at x10sys.com Thu Jul 27 00:29:39 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 27 Jul 2006 00:29:39 -0500 Subject: [llvm-commits] CVS: llvm/docs/llvm.css Message-ID: <200607270529.k6R5Td4r008975@zion.cs.uiuc.edu> Changes in directory llvm/docs: llvm.css updated: 1.28 -> 1.29 --- Log message: Reduce the padding on the doc_notes style. It was set to 1em which leaves the shaded box with a large blank border, wasting space. --- Diffs of the changes: (+1 -1) llvm.css | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/docs/llvm.css diff -u llvm/docs/llvm.css:1.28 llvm/docs/llvm.css:1.29 --- llvm/docs/llvm.css:1.28 Mon May 16 11:30:10 2005 +++ llvm/docs/llvm.css Thu Jul 27 00:29:25 2006 @@ -66,7 +66,7 @@ padding: 0 1em 0 1em; display:table; } -.doc_notes { background: #fafafa; border: 1px solid #cecece; padding: 1em } +.doc_notes { background: #fafafa; border: 1px solid #cecece; padding: 0.1em } TABLE.layout { text-align: left; border: none; border-collapse: collapse; padding: 4px 4px 4px 4px; } From reid at x10sys.com Thu Jul 27 00:39:03 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 27 Jul 2006 00:39:03 -0500 Subject: [llvm-commits] [release_18] CVS: llvm/docs/llvm.css Message-ID: <200607270539.k6R5d3Sr009189@zion.cs.uiuc.edu> Changes in directory llvm/docs: llvm.css updated: 1.28 -> 1.28.8.1 --- Log message: Merge from mainline. --- Diffs of the changes: (+1 -1) llvm.css | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/docs/llvm.css diff -u llvm/docs/llvm.css:1.28 llvm/docs/llvm.css:1.28.8.1 --- llvm/docs/llvm.css:1.28 Mon May 16 11:30:10 2005 +++ llvm/docs/llvm.css Thu Jul 27 00:38:49 2006 @@ -66,7 +66,7 @@ padding: 0 1em 0 1em; display:table; } -.doc_notes { background: #fafafa; border: 1px solid #cecece; padding: 1em } +.doc_notes { background: #fafafa; border: 1px solid #cecece; padding: 0.1em } TABLE.layout { text-align: left; border: none; border-collapse: collapse; padding: 4px 4px 4px 4px; } From reid at x10sys.com Thu Jul 27 00:43:44 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 27 Jul 2006 00:43:44 -0500 Subject: [llvm-commits] CVS: llvm/docs/GettingStarted.html Message-ID: <200607270543.k6R5hiDt009322@zion.cs.uiuc.edu> Changes in directory llvm/docs: GettingStarted.html updated: 1.136 -> 1.137 --- Log message: Add instructions for building a cross-compiler. Patch contributed by Anton Korobeynikov. --- Diffs of the changes: (+42 -1) GettingStarted.html | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 42 insertions(+), 1 deletion(-) Index: llvm/docs/GettingStarted.html diff -u llvm/docs/GettingStarted.html:1.136 llvm/docs/GettingStarted.html:1.137 --- llvm/docs/GettingStarted.html:1.136 Thu Jul 20 19:06:27 2006 +++ llvm/docs/GettingStarted.html Thu Jul 27 00:43:30 2006 @@ -31,6 +31,7 @@
  • Install the GCC Front End
  • Local LLVM Configuration
  • Compiling the LLVM Suite Source Code +
  • Compiling LLVM As A Cross-Compiler
  • The Location of LLVM Object Files
  • Optional Configuration Items
  • @@ -988,6 +989,46 @@ + +
    +

    LLVM can be built as a cross-compiler, however some additional steps are + required.1 To build a cross-compiler, use + these instructions:

    +
      +
    1. Configure and build LLVM Suite as a native compiler. You will need + just TableGen from that build. +
        +
      • If you have $LLVM_OBJ_ROOT=$LLVM_SRC_ROOT just execute + make -C utils/TableGen after configuring.
      • +
      • Otherwise you will need to monitor building process and terminate + it just after TableGen was built.
      • +
      +
    2. +
    3. Copy the TableGen binary to somewhere safe (out of your build tree). +
    4. +
    5. Configure LLVM to build as a cross-compiler. To do this, supply the + configure script with --build and --host options that + are different. The values of these options must be legal target triples and + should specify a processor for which LLVM supports code generation.
    6. +
    7. Put the saved TableGen executable into the + into $LLVM_OBJ_ROOT/{BUILD_TYPE}/bin directory (e.g. into + .../Release/bin for a Release build).
    8. +
    9. Build LLVM as usual.
    10. +
    +

    Notes:

    +
    +
      +
    1. Cross-compiling was tested only with Linux as + build platform and Windows as host using mingw32 cross-compiler. Other + combinations have not been tested.
    2. +
    +
    +
    + + + @@ -1549,7 +1590,7 @@ Chris Lattner
    Reid Spencer
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2006/07/21 00:06:27 $ + Last modified: $Date: 2006/07/27 05:43:30 $ From reid at x10sys.com Thu Jul 27 00:44:55 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 27 Jul 2006 00:44:55 -0500 Subject: [llvm-commits] [release_18] CVS: llvm/docs/GettingStarted.html Message-ID: <200607270544.k6R5itJ4009401@zion.cs.uiuc.edu> Changes in directory llvm/docs: GettingStarted.html updated: 1.136 -> 1.136.2.1 --- Log message: Merge documentation change from HEAD. --- Diffs of the changes: (+42 -1) GettingStarted.html | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 42 insertions(+), 1 deletion(-) Index: llvm/docs/GettingStarted.html diff -u llvm/docs/GettingStarted.html:1.136 llvm/docs/GettingStarted.html:1.136.2.1 --- llvm/docs/GettingStarted.html:1.136 Thu Jul 20 19:06:27 2006 +++ llvm/docs/GettingStarted.html Thu Jul 27 00:44:41 2006 @@ -31,6 +31,7 @@
  • Install the GCC Front End
  • Local LLVM Configuration
  • Compiling the LLVM Suite Source Code +
  • Compiling LLVM As A Cross-Compiler
  • The Location of LLVM Object Files
  • Optional Configuration Items
  • @@ -988,6 +989,46 @@ + +
    +

    LLVM can be built as a cross-compiler, however some additional steps are + required.1 To build a cross-compiler, use + these instructions:

    +
      +
    1. Configure and build LLVM Suite as a native compiler. You will need + just TableGen from that build. +
        +
      • If you have $LLVM_OBJ_ROOT=$LLVM_SRC_ROOT just execute + make -C utils/TableGen after configuring.
      • +
      • Otherwise you will need to monitor building process and terminate + it just after TableGen was built.
      • +
      +
    2. +
    3. Copy the TableGen binary to somewhere safe (out of your build tree). +
    4. +
    5. Configure LLVM to build as a cross-compiler. To do this, supply the + configure script with --build and --host options that + are different. The values of these options must be legal target triples and + should specify a processor for which LLVM supports code generation.
    6. +
    7. Put the saved TableGen executable into the + into $LLVM_OBJ_ROOT/{BUILD_TYPE}/bin directory (e.g. into + .../Release/bin for a Release build).
    8. +
    9. Build LLVM as usual.
    10. +
    +

    Notes:

    +
    +
      +
    1. Cross-compiling was tested only with Linux as + build platform and Windows as host using mingw32 cross-compiler. Other + combinations have not been tested.
    2. +
    +
    +
    + + + @@ -1549,7 +1590,7 @@ Chris Lattner
    Reid Spencer
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2006/07/21 00:06:27 $ + Last modified: $Date: 2006/07/27 05:44:41 $ From reid at x10sys.com Thu Jul 27 00:51:48 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 27 Jul 2006 00:51:48 -0500 Subject: [llvm-commits] CVS: llvm/docs/GettingStarted.html Message-ID: <200607270551.k6R5pmVY009568@zion.cs.uiuc.edu> Changes in directory llvm/docs: GettingStarted.html updated: 1.137 -> 1.138 --- Log message: Fix section title to use lower case. --- Diffs of the changes: (+2 -2) GettingStarted.html | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/docs/GettingStarted.html diff -u llvm/docs/GettingStarted.html:1.137 llvm/docs/GettingStarted.html:1.138 --- llvm/docs/GettingStarted.html:1.137 Thu Jul 27 00:43:30 2006 +++ llvm/docs/GettingStarted.html Thu Jul 27 00:51:34 2006 @@ -989,7 +989,7 @@
    @@ -1590,7 +1590,7 @@ Chris Lattner
    Reid Spencer
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2006/07/27 05:43:30 $ + Last modified: $Date: 2006/07/27 05:51:34 $ From reid at x10sys.com Thu Jul 27 00:55:02 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 27 Jul 2006 00:55:02 -0500 Subject: [llvm-commits] [release_18] CVS: llvm/docs/GettingStarted.html Message-ID: <200607270555.k6R5t25N009695@zion.cs.uiuc.edu> Changes in directory llvm/docs: GettingStarted.html updated: 1.136.2.1 -> 1.136.2.2 --- Log message: Merge changes from head. --- Diffs of the changes: (+2 -2) GettingStarted.html | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/docs/GettingStarted.html diff -u llvm/docs/GettingStarted.html:1.136.2.1 llvm/docs/GettingStarted.html:1.136.2.2 --- llvm/docs/GettingStarted.html:1.136.2.1 Thu Jul 27 00:44:41 2006 +++ llvm/docs/GettingStarted.html Thu Jul 27 00:54:48 2006 @@ -989,7 +989,7 @@
    @@ -1590,7 +1590,7 @@ Chris Lattner
    Reid Spencer
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2006/07/27 05:44:41 $ + Last modified: $Date: 2006/07/27 05:54:48 $ From evan.cheng at apple.com Thu Jul 27 01:34:09 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 27 Jul 2006 01:34:09 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/TargetJITInfo.h Message-ID: <200607270634.k6R6Y9Ju010485@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Target: TargetJITInfo.h updated: 1.8 -> 1.9 --- Log message: Move synchronizeICache from TargetJITInfo into a static function in JITEmitter.cpp --- Diffs of the changes: (+0 -4) TargetJITInfo.h | 4 ---- 1 files changed, 4 deletions(-) Index: llvm/include/llvm/Target/TargetJITInfo.h diff -u llvm/include/llvm/Target/TargetJITInfo.h:1.8 llvm/include/llvm/Target/TargetJITInfo.h:1.9 --- llvm/include/llvm/Target/TargetJITInfo.h:1.8 Tue Jul 25 15:40:54 2006 +++ llvm/include/llvm/Target/TargetJITInfo.h Thu Jul 27 01:33:55 2006 @@ -87,10 +87,6 @@ /// function. virtual void resolveBBRefs(MachineCodeEmitter &MCE) {} - /// synchronizeICache - On some targets, the JIT emitted code must be - /// explicitly refetched to ensure correct execution. - virtual void synchronizeICache(const void *Addr, size_t len) {} - /// addBBRef - Add a BasicBlock reference to be resolved after the function /// is emitted. void addBBRef(MachineBasicBlock *BB, intptr_t PC) { From evan.cheng at apple.com Thu Jul 27 01:34:10 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 27 Jul 2006 01:34:10 -0500 Subject: [llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp Message-ID: <200607270634.k6R6YAYF010490@zion.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine/JIT: JITEmitter.cpp updated: 1.107 -> 1.108 --- Log message: Move synchronizeICache from TargetJITInfo into a static function in JITEmitter.cpp --- Diffs of the changes: (+17 -5) JITEmitter.cpp | 22 +++++++++++++++++----- 1 files changed, 17 insertions(+), 5 deletions(-) Index: llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp diff -u llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.107 llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.108 --- llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.107 Tue Jul 25 15:40:54 2006 +++ llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp Thu Jul 27 01:33:55 2006 @@ -516,6 +516,20 @@ return TheJITResolver; } +#if (defined(__POWERPC__) || defined (__ppc__) || defined(_POWER)) && \ + defined(__APPLE__) +extern "C" void sys_icache_invalidate(const void *Addr, size_t len); +#endif + +/// synchronizeICache - On some targets, the JIT emitted code must be +/// explicitly refetched to ensure correct execution. +static void synchronizeICache(const void *Addr, size_t len) { +#if (defined(__POWERPC__) || defined (__ppc__) || defined(_POWER)) && \ + defined(__APPLE__) + sys_icache_invalidate(Addr, Len); +#endif +} + /// getFunctionStub - This returns a pointer to a function stub, creating /// one on demand as needed. void *JITResolver::getFunctionStub(Function *F) { @@ -543,8 +557,7 @@ } // Invalidate the icache if necessary. - TheJIT->getJITInfo(). - synchronizeICache(Stub, MCE.getCurrentPCValue()-(intptr_t)Stub); + synchronizeICache(Stub, MCE.getCurrentPCValue()-(intptr_t)Stub); DEBUG(std::cerr << "JIT: Stub emitted at [" << Stub << "] for function '" << F->getName() << "'\n"); @@ -565,8 +578,7 @@ Stub = TheJIT->getJITInfo().emitFunctionStub(FnAddr, MCE); // Invalidate the icache if necessary. - TheJIT->getJITInfo(). - synchronizeICache(Stub, MCE.getCurrentPCValue()-(intptr_t)Stub); + synchronizeICache(Stub, MCE.getCurrentPCValue()-(intptr_t)Stub); DEBUG(std::cerr << "JIT: Stub emitted at [" << Stub << "] for external function at '" << FnAddr << "'\n"); @@ -838,7 +850,7 @@ TheJIT->getJITInfo().resolveBBRefs(*this); // Invalidate the icache if necessary. - TheJIT->getJITInfo().synchronizeICache(FnStart, FnEnd-FnStart); + synchronizeICache(FnStart, FnEnd-FnStart); DEBUG(std::cerr << "JIT: Finished CodeGen of [" << (void*)FnStart << "] Function: " << F.getFunction()->getName() From evan.cheng at apple.com Thu Jul 27 01:36:25 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 27 Jul 2006 01:36:25 -0500 Subject: [llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp Message-ID: <200607270636.k6R6aPVj010566@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: DAGISelEmitter.cpp updated: 1.226 -> 1.227 --- Log message: Let each target specific isel provide routine to check if a chain producing node is foldable by another. --- Diffs of the changes: (+2 -8) DAGISelEmitter.cpp | 10 ++-------- 1 files changed, 2 insertions(+), 8 deletions(-) Index: llvm/utils/TableGen/DAGISelEmitter.cpp diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.226 llvm/utils/TableGen/DAGISelEmitter.cpp:1.227 --- llvm/utils/TableGen/DAGISelEmitter.cpp:1.226 Wed Jul 26 18:06:27 2006 +++ llvm/utils/TableGen/DAGISelEmitter.cpp Thu Jul 27 01:36:11 2006 @@ -2280,14 +2280,8 @@ PInfo.hasProperty(SDNodeInfo::SDNPHasChain) || PInfo.hasProperty(SDNodeInfo::SDNPInFlag) || PInfo.hasProperty(SDNodeInfo::SDNPOptInFlag)) - if (PInfo.getNumOperands() > 1) { - emitCheck("!isNonImmUse(" + ParentName + ".Val, " + RootName + - ".Val)"); - } else { - emitCheck("(" + ParentName + ".getNumOperands() == 1 || !" + - "isNonImmUse(" + ParentName + ".Val, " + RootName + - ".Val))"); - } + emitCheck("IsFoldableBy(" + RootName + ".Val, " + ParentName + + ".Val)"); } } From evan.cheng at apple.com Thu Jul 27 01:37:03 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 27 Jul 2006 01:37:03 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGISel.h Message-ID: <200607270637.k6R6b3bN010603@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: SelectionDAGISel.h updated: 1.18 -> 1.19 --- Log message: Let each target specific isel provide routine to check if a chain producing node is foldable by another. --- Diffs of the changes: (+5 -1) SelectionDAGISel.h | 6 +++++- 1 files changed, 5 insertions(+), 1 deletion(-) Index: llvm/include/llvm/CodeGen/SelectionDAGISel.h diff -u llvm/include/llvm/CodeGen/SelectionDAGISel.h:1.18 llvm/include/llvm/CodeGen/SelectionDAGISel.h:1.19 --- llvm/include/llvm/CodeGen/SelectionDAGISel.h:1.18 Sun May 7 20:33:11 2006 +++ llvm/include/llvm/CodeGen/SelectionDAGISel.h Thu Jul 27 01:36:49 2006 @@ -62,6 +62,10 @@ SelectionDAG &DAG) { return true; } + + /// IsFoldableBy - Returns true if the specific operand node N of U can be + /// folded during instruction selection? + virtual bool IsFoldableBy(SDNode *N, SDNode *U) { return true; } /// CreateTargetHazardRecognizer - Return a newly allocated hazard recognizer /// to use for this target when scheduling the DAG. @@ -111,7 +115,7 @@ /// by tblgen. Others should not call it. void SelectInlineAsmMemoryOperands(std::vector &Ops, SelectionDAG &DAG); - + private: SDOperand CopyValueToVirtualRegister(SelectionDAGLowering &SDL, Value *V, unsigned Reg); From evan.cheng at apple.com Thu Jul 27 01:38:35 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 27 Jul 2006 01:38:35 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAG.h SelectionDAGNodes.h Message-ID: <200607270638.k6R6cZYP010640@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: SelectionDAG.h updated: 1.102 -> 1.103 SelectionDAGNodes.h updated: 1.136 -> 1.137 --- Log message: Remove NodeDepth; Add NodeId which is a unique id per node per DAG. It can only be set by SelectionDAG. --- Diffs of the changes: (+21 -41) SelectionDAG.h | 6 ++++- SelectionDAGNodes.h | 56 ++++++++++++++-------------------------------------- 2 files changed, 21 insertions(+), 41 deletions(-) Index: llvm/include/llvm/CodeGen/SelectionDAG.h diff -u llvm/include/llvm/CodeGen/SelectionDAG.h:1.102 llvm/include/llvm/CodeGen/SelectionDAG.h:1.103 --- llvm/include/llvm/CodeGen/SelectionDAG.h:1.102 Thu Jun 29 18:57:05 2006 +++ llvm/include/llvm/CodeGen/SelectionDAG.h Thu Jul 27 01:38:21 2006 @@ -421,7 +421,11 @@ /// DeleteNode - Remove the specified node from the system. This node must /// have no referrers. void DeleteNode(SDNode *N); - + + /// AssignNodeIds - Assign a unique node id for each node in the DAG. It + /// returns the maximum id. + int AssignNodeIds(); + void dump() const; /// InsertISelMapEntry - A helper function to insert a key / element pair Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.136 llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.137 --- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.136 Tue Jul 18 19:00:37 2006 +++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h Thu Jul 27 01:38:21 2006 @@ -654,7 +654,6 @@ // Forwarding methods - These forward to the corresponding methods in SDNode. inline unsigned getOpcode() const; - inline unsigned getNodeDepth() const; inline unsigned getNumOperands() const; inline const SDOperand &getOperand(unsigned i) const; inline bool isTargetOpcode() const; @@ -689,10 +688,8 @@ /// unsigned short NodeType; - /// NodeDepth - Node depth is defined as MAX(Node depth of children)+1. This - /// means that leaves have a depth of 1, things that use only leaves have a - /// depth of 2, etc. - unsigned short NodeDepth; + /// NodeId - Unique id per SDNode in the DAG. + int NodeId; /// OperandList - The values that are used by this operation. /// @@ -736,9 +733,9 @@ bool use_empty() const { return Uses.empty(); } bool hasOneUse() const { return Uses.size() == 1; } - /// getNodeDepth - Return the distance from this node to the leaves in the - /// graph. The leaves have a depth of 1. - unsigned getNodeDepth() const { return NodeDepth; } + /// getNodeId - Return the unique node id. + /// + int getNodeId() const { return NodeId; } typedef std::vector::const_iterator use_iterator; use_iterator use_begin() const { return Uses.begin(); } @@ -799,14 +796,14 @@ /// static MVT::ValueType *getValueTypeList(MVT::ValueType VT); - SDNode(unsigned NT, MVT::ValueType VT) : NodeType(NT), NodeDepth(1) { + SDNode(unsigned NT, MVT::ValueType VT) : NodeType(NT), NodeId(-1) { OperandList = 0; NumOperands = 0; ValueList = getValueTypeList(VT); NumValues = 1; Prev = 0; Next = 0; } SDNode(unsigned NT, SDOperand Op) - : NodeType(NT), NodeDepth(Op.Val->getNodeDepth()+1) { + : NodeType(NT), NodeId(-1) { OperandList = new SDOperand[1]; OperandList[0] = Op; NumOperands = 1; @@ -816,11 +813,7 @@ Prev = 0; Next = 0; } SDNode(unsigned NT, SDOperand N1, SDOperand N2) - : NodeType(NT) { - if (N1.Val->getNodeDepth() > N2.Val->getNodeDepth()) - NodeDepth = N1.Val->getNodeDepth()+1; - else - NodeDepth = N2.Val->getNodeDepth()+1; + : NodeType(NT), NodeId(-1) { OperandList = new SDOperand[2]; OperandList[0] = N1; OperandList[1] = N2; @@ -831,14 +824,7 @@ Prev = 0; Next = 0; } SDNode(unsigned NT, SDOperand N1, SDOperand N2, SDOperand N3) - : NodeType(NT) { - unsigned ND = N1.Val->getNodeDepth(); - if (ND < N2.Val->getNodeDepth()) - ND = N2.Val->getNodeDepth(); - if (ND < N3.Val->getNodeDepth()) - ND = N3.Val->getNodeDepth(); - NodeDepth = ND+1; - + : NodeType(NT), NodeId(-1) { OperandList = new SDOperand[3]; OperandList[0] = N1; OperandList[1] = N2; @@ -852,16 +838,7 @@ Prev = 0; Next = 0; } SDNode(unsigned NT, SDOperand N1, SDOperand N2, SDOperand N3, SDOperand N4) - : NodeType(NT) { - unsigned ND = N1.Val->getNodeDepth(); - if (ND < N2.Val->getNodeDepth()) - ND = N2.Val->getNodeDepth(); - if (ND < N3.Val->getNodeDepth()) - ND = N3.Val->getNodeDepth(); - if (ND < N4.Val->getNodeDepth()) - ND = N4.Val->getNodeDepth(); - NodeDepth = ND+1; - + : NodeType(NT), NodeId(-1) { OperandList = new SDOperand[4]; OperandList[0] = N1; OperandList[1] = N2; @@ -875,18 +852,16 @@ NumValues = 0; Prev = 0; Next = 0; } - SDNode(unsigned Opc, const std::vector &Nodes) : NodeType(Opc) { + SDNode(unsigned Opc, const std::vector &Nodes) + : NodeType(Opc), NodeId(-1) { NumOperands = Nodes.size(); OperandList = new SDOperand[NumOperands]; - unsigned ND = 0; for (unsigned i = 0, e = Nodes.size(); i != e; ++i) { OperandList[i] = Nodes[i]; SDNode *N = OperandList[i].Val; N->Uses.push_back(this); - if (ND < N->getNodeDepth()) ND = N->getNodeDepth(); } - NodeDepth = ND+1; ValueList = 0; NumValues = 0; Prev = 0; Next = 0; @@ -1035,6 +1010,10 @@ } } } + + void setNodeId(int Id) { + NodeId = Id; + } }; @@ -1043,9 +1022,6 @@ inline unsigned SDOperand::getOpcode() const { return Val->getOpcode(); } -inline unsigned SDOperand::getNodeDepth() const { - return Val->getNodeDepth(); -} inline MVT::ValueType SDOperand::getValueType() const { return Val->getValueType(ResNo); } From evan.cheng at apple.com Thu Jul 27 01:39:20 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 27 Jul 2006 01:39:20 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Message-ID: <200607270639.k6R6dKEU010664@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAG.cpp updated: 1.311 -> 1.312 --- Log message: AssignNodeIds assign each node in the DAG an unique id. --- Diffs of the changes: (+12 -0) SelectionDAG.cpp | 12 ++++++++++++ 1 files changed, 12 insertions(+) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.311 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.312 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.311 Tue Jul 18 19:00:37 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Thu Jul 27 01:39:06 2006 @@ -2698,6 +2698,18 @@ } +/// AssignNodeIds - Assign a unique node id for each node in the DAG. It returns +/// the maximum id. +int SelectionDAG::AssignNodeIds() { + int Id = 0; + for (allnodes_iterator I = allnodes_begin(), E = allnodes_end(); I != E; ++I){ + SDNode *N = I; + N->setNodeId(Id++); + } + return Id; +} + + //===----------------------------------------------------------------------===// // SDNode Class //===----------------------------------------------------------------------===// From evan.cheng at apple.com Thu Jul 27 01:40:00 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 27 Jul 2006 01:40:00 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp Message-ID: <200607270640.k6R6e0xK010691@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/IA64: IA64ISelDAGToDAG.cpp updated: 1.44 -> 1.45 --- Log message: Remove NodeDepth --- Diffs of the changes: (+1 -6) IA64ISelDAGToDAG.cpp | 7 +------ 1 files changed, 1 insertion(+), 6 deletions(-) Index: llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp diff -u llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.44 llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.45 --- llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.44 Tue Jul 11 13:25:13 2006 +++ llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp Thu Jul 27 01:39:46 2006 @@ -118,12 +118,7 @@ while (!Worklist.empty()) { SDOperand Node = Worklist.back(); Worklist.pop_back(); - - // Chose from the least deep of the top two nodes. - if (!Worklist.empty() && - Worklist.back().Val->getNodeDepth() < Node.Val->getNodeDepth()) - std::swap(Worklist.back(), Node); - + if ((Node.Val->getOpcode() >= ISD::BUILTIN_OP_END && Node.Val->getOpcode() < IA64ISD::FIRST_NUMBER) || CodeGenMap.count(Node)) continue; From evan.cheng at apple.com Thu Jul 27 01:40:29 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 27 Jul 2006 01:40:29 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp Message-ID: <200607270640.k6R6eTPb010719@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCISelDAGToDAG.cpp updated: 1.197 -> 1.198 --- Log message: Remove NodeDepth --- Diffs of the changes: (+1 -6) PPCISelDAGToDAG.cpp | 7 +------ 1 files changed, 1 insertion(+), 6 deletions(-) Index: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp diff -u llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1.197 llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1.198 --- llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1.197 Wed Jun 28 17:00:36 2006 +++ llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp Thu Jul 27 01:40:15 2006 @@ -191,12 +191,7 @@ while (!Worklist.empty()) { SDOperand Node = Worklist.back(); Worklist.pop_back(); - - // Chose from the least deep of the top two nodes. - if (!Worklist.empty() && - Worklist.back().Val->getNodeDepth() < Node.Val->getNodeDepth()) - std::swap(Worklist.back(), Node); - + if ((Node.Val->getOpcode() >= ISD::BUILTIN_OP_END && Node.Val->getOpcode() < PPCISD::FIRST_NUMBER) || CodeGenMap.count(Node)) continue; From reid at x10sys.com Thu Jul 27 01:41:45 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 27 Jul 2006 01:41:45 -0500 Subject: [llvm-commits] CVS: llvm/docs/GettingStarted.html Message-ID: <200607270641.k6R6fj0a010811@zion.cs.uiuc.edu> Changes in directory llvm/docs: GettingStarted.html updated: 1.138 -> 1.139 --- Log message: Correct a misunderstanding about cross-compiling. Anton's changes don't cause LLVM to become a cross-compiler but rather cross-compile LLVM so that it can execute on a platform other than the build host. --- Diffs of the changes: (+14 -9) GettingStarted.html | 23 ++++++++++++++--------- 1 files changed, 14 insertions(+), 9 deletions(-) Index: llvm/docs/GettingStarted.html diff -u llvm/docs/GettingStarted.html:1.138 llvm/docs/GettingStarted.html:1.139 --- llvm/docs/GettingStarted.html:1.138 Thu Jul 27 00:51:34 2006 +++ llvm/docs/GettingStarted.html Thu Jul 27 01:41:31 2006 @@ -31,7 +31,7 @@
  • Install the GCC Front End
  • Local LLVM Configuration
  • Compiling the LLVM Suite Source Code -
  • Compiling LLVM As A Cross-Compiler +
  • Cross-Compiling LLVM
  • The Location of LLVM Object Files
  • Optional Configuration Items
  • @@ -989,15 +989,17 @@
    -

    LLVM can be built as a cross-compiler, however some additional steps are - required.1 To build a cross-compiler, use +

    It is possible to cross-compile LLVM. That is, you can create LLVM + executables and libraries for a platform different than the one one which you + are compiling. To do this, a few additional steps are + required. 1 To cross-compile LLVM, use these instructions:

      -
    1. Configure and build LLVM Suite as a native compiler. You will need +
    2. Configure and build LLVM as a native compiler. You will need just TableGen from that build.
      • If you have $LLVM_OBJ_ROOT=$LLVM_SRC_ROOT just execute @@ -1008,15 +1010,18 @@
      • Copy the TableGen binary to somewhere safe (out of your build tree).
      • -
      • Configure LLVM to build as a cross-compiler. To do this, supply the +
      • Configure LLVM to build with a cross-compiler. To do this, supply the configure script with --build and --host options that - are different. The values of these options must be legal target triples and - should specify a processor for which LLVM supports code generation.
      • + are different. The values of these options must be legal target triples + that your GCC compiler supports.
      • Put the saved TableGen executable into the into $LLVM_OBJ_ROOT/{BUILD_TYPE}/bin directory (e.g. into .../Release/bin for a Release build).
      • Build LLVM as usual.
    +

    The result of such a build will produce executables that are not executable + on your build host (--build option) but can be executed on your compile host + (--host option).

    Notes:

      @@ -1590,7 +1595,7 @@ Chris Lattner
      Reid Spencer
      The LLVM Compiler Infrastructure
      - Last modified: $Date: 2006/07/27 05:51:34 $ + Last modified: $Date: 2006/07/27 06:41:31 $ From reid at x10sys.com Thu Jul 27 01:44:41 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 27 Jul 2006 01:44:41 -0500 Subject: [llvm-commits] [1.136.2] CVS: llvm/docs/GettingStarted.html Message-ID: <200607270644.k6R6if3Z010991@zion.cs.uiuc.edu> Changes in directory llvm/docs: GettingStarted.html updated: 1.136.2.2 -> 1.136.2.3 --- Log message: Merge changes from HEAD. --- Diffs of the changes: (+21 -8) GettingStarted.html | 29 +++++++++++++++++++++-------- 1 files changed, 21 insertions(+), 8 deletions(-) Index: llvm/docs/GettingStarted.html diff -u llvm/docs/GettingStarted.html:1.136.2.2 llvm/docs/GettingStarted.html:1.136.2.3 --- llvm/docs/GettingStarted.html:1.136.2.2 Thu Jul 27 00:54:48 2006 +++ llvm/docs/GettingStarted.html Thu Jul 27 01:44:27 2006 @@ -31,7 +31,11 @@
    1. Install the GCC Front End
    2. Local LLVM Configuration
    3. Compiling the LLVM Suite Source Code +<<<<<<< GettingStarted.html
    4. Compiling LLVM As A Cross-Compiler +======= +
    5. Cross-Compiling LLVM +>>>>>>> 1.139
    6. The Location of LLVM Object Files
    7. Optional Configuration Items
    @@ -989,15 +993,17 @@
    -

    LLVM can be built as a cross-compiler, however some additional steps are - required.1 To build a cross-compiler, use +

    It is possible to cross-compile LLVM. That is, you can create LLVM + executables and libraries for a platform different than the one one which you + are compiling. To do this, a few additional steps are + required. 1 To cross-compile LLVM, use these instructions:

      -
    1. Configure and build LLVM Suite as a native compiler. You will need +
    2. Configure and build LLVM as a native compiler. You will need just TableGen from that build.
      • If you have $LLVM_OBJ_ROOT=$LLVM_SRC_ROOT just execute @@ -1008,15 +1014,18 @@
      • Copy the TableGen binary to somewhere safe (out of your build tree).
      • -
      • Configure LLVM to build as a cross-compiler. To do this, supply the +
      • Configure LLVM to build with a cross-compiler. To do this, supply the configure script with --build and --host options that - are different. The values of these options must be legal target triples and - should specify a processor for which LLVM supports code generation.
      • + are different. The values of these options must be legal target triples + that your GCC compiler supports.
      • Put the saved TableGen executable into the into $LLVM_OBJ_ROOT/{BUILD_TYPE}/bin directory (e.g. into .../Release/bin for a Release build).
      • Build LLVM as usual.
    +

    The result of such a build will produce executables that are not executable + on your build host (--build option) but can be executed on your compile host + (--host option).

    Notes:

      @@ -1590,7 +1599,11 @@ Chris Lattner
      Reid Spencer
      The LLVM Compiler Infrastructure
      - Last modified: $Date: 2006/07/27 05:54:48 $ +<<<<<<< GettingStarted.html + Last modified: $Date: 2006/07/27 06:44:27 $ +======= + Last modified: $Date: 2006/07/27 06:44:27 $ +>>>>>>> 1.139 From reid at x10sys.com Thu Jul 27 01:50:25 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 27 Jul 2006 01:50:25 -0500 Subject: [llvm-commits] [release_18] CVS: llvm/docs/GettingStarted.html Message-ID: <200607270650.k6R6oPIB011146@zion.cs.uiuc.edu> Changes in directory llvm/docs: GettingStarted.html updated: 1.136.2.3 -> 1.136.2.4 --- Log message: Whoops .. don't commit merge conflict markers. --- Diffs of the changes: (+1 -5) GettingStarted.html | 6 +----- 1 files changed, 1 insertion(+), 5 deletions(-) Index: llvm/docs/GettingStarted.html diff -u llvm/docs/GettingStarted.html:1.136.2.3 llvm/docs/GettingStarted.html:1.136.2.4 --- llvm/docs/GettingStarted.html:1.136.2.3 Thu Jul 27 01:44:27 2006 +++ llvm/docs/GettingStarted.html Thu Jul 27 01:50:11 2006 @@ -1599,11 +1599,7 @@ Chris Lattner
      Reid Spencer
      The LLVM Compiler Infrastructure
      -<<<<<<< GettingStarted.html - Last modified: $Date: 2006/07/27 06:44:27 $ -======= - Last modified: $Date: 2006/07/27 06:44:27 $ ->>>>>>> 1.139 + Last modified: $Date: 2006/07/27 06:50:11 $ From reid at x10sys.com Thu Jul 27 02:26:27 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 27 Jul 2006 02:26:27 -0500 Subject: [llvm-commits] [release_18] CVS: llvm/docs/GettingStarted.html Message-ID: <200607270726.k6R7QRKT011830@zion.cs.uiuc.edu> Changes in directory llvm/docs: GettingStarted.html updated: 1.136.2.4 -> 1.136.2.5 --- Log message: Remove another merge conflict marker. --- Diffs of the changes: (+1 -5) GettingStarted.html | 6 +----- 1 files changed, 1 insertion(+), 5 deletions(-) Index: llvm/docs/GettingStarted.html diff -u llvm/docs/GettingStarted.html:1.136.2.4 llvm/docs/GettingStarted.html:1.136.2.5 --- llvm/docs/GettingStarted.html:1.136.2.4 Thu Jul 27 01:50:11 2006 +++ llvm/docs/GettingStarted.html Thu Jul 27 02:26:00 2006 @@ -31,11 +31,7 @@
    1. Install the GCC Front End
    2. Local LLVM Configuration
    3. Compiling the LLVM Suite Source Code -<<<<<<< GettingStarted.html -
    4. Compiling LLVM As A Cross-Compiler -=======
    5. Cross-Compiling LLVM ->>>>>>> 1.139
    6. The Location of LLVM Object Files
    7. Optional Configuration Items
    @@ -1599,7 +1595,7 @@ Chris Lattner
    Reid Spencer
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2006/07/27 06:50:11 $ + Last modified: $Date: 2006/07/27 07:26:00 $ From evan.cheng at apple.com Thu Jul 27 02:37:02 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 27 Jul 2006 02:37:02 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Message-ID: <200607270737.k6R7b2et012048@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAG.cpp updated: 1.312 -> 1.313 --- Log message: AssignNodeIds should return unsigned. --- Diffs of the changes: (+2 -2) SelectionDAG.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.312 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.313 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.312 Thu Jul 27 01:39:06 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Thu Jul 27 02:36:47 2006 @@ -2700,8 +2700,8 @@ /// AssignNodeIds - Assign a unique node id for each node in the DAG. It returns /// the maximum id. -int SelectionDAG::AssignNodeIds() { - int Id = 0; +unsigned SelectionDAG::AssignNodeIds() { + unsigned Id = 0; for (allnodes_iterator I = allnodes_begin(), E = allnodes_end(); I != E; ++I){ SDNode *N = I; N->setNodeId(Id++); From evan.cheng at apple.com Thu Jul 27 02:37:01 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 27 Jul 2006 02:37:01 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAG.h Message-ID: <200607270737.k6R7b1lF012043@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: SelectionDAG.h updated: 1.103 -> 1.104 --- Log message: AssignNodeIds should return unsigned. --- Diffs of the changes: (+1 -1) SelectionDAG.h | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/include/llvm/CodeGen/SelectionDAG.h diff -u llvm/include/llvm/CodeGen/SelectionDAG.h:1.103 llvm/include/llvm/CodeGen/SelectionDAG.h:1.104 --- llvm/include/llvm/CodeGen/SelectionDAG.h:1.103 Thu Jul 27 01:38:21 2006 +++ llvm/include/llvm/CodeGen/SelectionDAG.h Thu Jul 27 02:36:47 2006 @@ -424,7 +424,7 @@ /// AssignNodeIds - Assign a unique node id for each node in the DAG. It /// returns the maximum id. - int AssignNodeIds(); + unsigned AssignNodeIds(); void dump() const; From rafael.espindola at gmail.com Thu Jul 27 06:39:05 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Thu, 27 Jul 2006 06:39:05 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMAsmPrinter.cpp Message-ID: <200607271139.k6RBd5F5017043@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMAsmPrinter.cpp updated: 1.6 -> 1.7 --- Log message: emit global constants --- Diffs of the changes: (+29 -0) ARMAsmPrinter.cpp | 29 +++++++++++++++++++++++++++++ 1 files changed, 29 insertions(+) Index: llvm/lib/Target/ARM/ARMAsmPrinter.cpp diff -u llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.6 llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.7 --- llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.6 Sat Jul 15 20:02:57 2006 +++ llvm/lib/Target/ARM/ARMAsmPrinter.cpp Thu Jul 27 06:38:51 2006 @@ -23,6 +23,7 @@ #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineConstantPool.h" #include "llvm/CodeGen/MachineInstr.h" +#include "llvm/Target/TargetData.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Support/Mangler.h" #include "llvm/ADT/Statistic.h" @@ -190,6 +191,34 @@ } bool ARMAsmPrinter::doFinalization(Module &M) { + const TargetData *TD = TM.getTargetData(); + + for (Module::const_global_iterator I = M.global_begin(), E = M.global_end(); + I != E; ++I) { + if (!I->hasInitializer()) // External global require no code + continue; + + if (EmitSpecialLLVMGlobal(I)) + continue; + + O << "\n\n"; + std::string name = Mang->getValueName(I); + Constant *C = I->getInitializer(); + unsigned Size = TD->getTypeSize(C->getType()); + unsigned Align = TD->getTypeAlignment(C->getType()); + + assert (I->getLinkage() == GlobalValue::ExternalLinkage); + O << "\t.globl " << name << "\n"; + + assert (!C->isNullValue()); + SwitchToDataSection(".data", I); + + EmitAlignment(Align, I); + O << "\t.type " << name << ", %object\n"; + O << "\t.size " << name << ", " << Size << "\n"; + O << name << ":\n"; + EmitGlobalConstant(C); + } AsmPrinter::doFinalization(M); return false; // success } From jlaskey at apple.com Thu Jul 27 08:40:47 2006 From: jlaskey at apple.com (Jim Laskey) Date: Thu, 27 Jul 2006 08:40:47 -0500 Subject: [llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp Message-ID: <200607271340.k6RDeluD019564@zion.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine/JIT: JITEmitter.cpp updated: 1.108 -> 1.109 --- Log message: Fixed a typo in Evan's submisson. --- Diffs of the changes: (+1 -1) JITEmitter.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp diff -u llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.108 llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.109 --- llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.108 Thu Jul 27 01:33:55 2006 +++ llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp Thu Jul 27 08:40:34 2006 @@ -526,7 +526,7 @@ static void synchronizeICache(const void *Addr, size_t len) { #if (defined(__POWERPC__) || defined (__ppc__) || defined(_POWER)) && \ defined(__APPLE__) - sys_icache_invalidate(Addr, Len); + sys_icache_invalidate(Addr, len); #endif } From evan.cheng at apple.com Thu Jul 27 11:44:50 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 27 Jul 2006 11:44:50 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Message-ID: <200607271644.k6RGioa5022907@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ISelDAGToDAG.cpp updated: 1.75 -> 1.76 --- Log message: Use reachbility information to determine whether a node can be folded into another during isel. --- Diffs of the changes: (+118 -3) X86ISelDAGToDAG.cpp | 121 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 118 insertions(+), 3 deletions(-) Index: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp diff -u llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.75 llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.76 --- llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.75 Wed Jun 28 18:27:49 2006 +++ llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Thu Jul 27 11:44:36 2006 @@ -34,6 +34,7 @@ #include "llvm/Support/Visibility.h" #include "llvm/ADT/Statistic.h" #include +#include #include using namespace llvm; @@ -92,12 +93,13 @@ const X86Subtarget *Subtarget; unsigned GlobalBaseReg; + public: X86DAGToDAGISel(X86TargetMachine &TM) : SelectionDAGISel(X86Lowering), - X86Lowering(*TM.getTargetLowering()) { - Subtarget = &TM.getSubtarget(); - } + X86Lowering(*TM.getTargetLowering()), + Subtarget(&TM.getSubtarget()), + DAGSize(0), ReachibilityMatrix(NULL) {} virtual bool runOnFunction(Function &Fn) { // Make sure we re-emit a set of the global base reg if necessary @@ -115,10 +117,15 @@ virtual void EmitFunctionEntryCode(Function &Fn, MachineFunction &MF); + virtual bool IsFoldableBy(SDNode *N, SDNode *U); + // Include the pieces autogenerated from the target description. #include "X86GenDAGISel.inc" private: + void DetermineTopologicalOrdering(); + void DeterminReachibility(); + void Select(SDOperand &Result, SDOperand N); bool MatchAddress(SDOperand N, X86ISelAddressMode &AM, bool isRoot = true); @@ -173,12 +180,116 @@ /// base register. Return the virtual register that holds this value. SDOperand getGlobalBaseReg(); + /// DAGSize - Number of nodes in the DAG. + /// + unsigned DAGSize; + + /// TopOrder - Topological ordering of all nodes in the DAG. + /// + std::vector TopOrder; + + /// ReachibilityMatrix - A N x N matrix representing all pairs reachibility + /// information. One bit per potential edge. + unsigned char *ReachibilityMatrix; + + inline void setReachable(SDNode *f, SDNode *t) { + unsigned Idx = f->getNodeId() * DAGSize + t->getNodeId(); + ReachibilityMatrix[Idx / 8] |= 1 << (Idx % 8); + } + + inline bool isReachable(SDNode *f, SDNode *t) { + unsigned Idx = f->getNodeId() * DAGSize + t->getNodeId(); + return ReachibilityMatrix[Idx / 8] & (1 << (Idx % 8)); + } + #ifndef NDEBUG unsigned Indent; #endif }; } +bool X86DAGToDAGISel::IsFoldableBy(SDNode *N, SDNode *U) { + // If U use can somehow reach N through another path then U can't fold N or + // it will create a cycle. e.g. In the following diagram, U can reach N + // through X. If N is foled into into U, then X is both a predecessor and + // a successor of U. + // + // [ N ] + // ^ ^ + // | | + // / \--- + // / [X] + // | ^ + // [U]--------| + if (!ReachibilityMatrix) + DeterminReachibility(); + assert(isReachable(U, N) && "Attempting to fold a non-operand node?"); + for (SDNode::op_iterator I = U->op_begin(), E = U->op_end(); I != E; ++I) { + SDNode *P = I->Val; + if (P != N && isReachable(P, N)) + return false; + } + return true; +} + +/// DetermineTopologicalOrdering - Determine topological ordering of the nodes +/// in the DAG. +void X86DAGToDAGISel::DetermineTopologicalOrdering() { + DAGSize = CurDAG->AssignNodeIds(); + TopOrder.reserve(DAGSize); + + std::vector InDegree(DAGSize); + std::list Sources; + for (SelectionDAG::allnodes_iterator I = CurDAG->allnodes_begin(), + E = CurDAG->allnodes_end(); I != E; ++I) { + SDNode *N = I; + unsigned Degree = N->use_size(); + InDegree[N->getNodeId()] = Degree; + if (Degree == 0) + Sources.push_back(I); + } + + unsigned Order = 0; + while (!Sources.empty()) { + SDNode *N = Sources.front(); + Sources.pop_front(); + TopOrder[Order] = N; + Order++; + for (SDNode::op_iterator I = N->op_begin(), E = N->op_end(); I != E; ++I) { + SDNode *P = I->Val; + int PId = P->getNodeId(); + unsigned Degree = InDegree[PId] - 1; + if (Degree == 0) + Sources.push_back(P); + InDegree[PId] = Degree; + } + } +} + +void X86DAGToDAGISel::DeterminReachibility() { + DetermineTopologicalOrdering(); + ReachibilityMatrix = new unsigned char[DAGSize * DAGSize]; + memset(ReachibilityMatrix, 0, DAGSize * DAGSize * sizeof(unsigned char)); + + for (unsigned i = 0; i < DAGSize; ++i) { + SDNode *N = TopOrder[i]; + setReachable(N, N); + // If N is a leaf node, there is nothing more to do. + if (N->getNumOperands() == 0) + continue; + + for (unsigned i2 = 0; ; ++i2) { + SDNode *M = TopOrder[i2]; + if (isReachable(M, N)) { + // Update reachibility from M to N's operands. + for (SDNode::op_iterator I = N->op_begin(), E = N->op_end(); I != E;++I) + setReachable(M, I->Val); + } + if (M == N) break; + } + } +} + /// InstructionSelectBasicBlock - This callback is invoked by SelectionDAGISel /// when it has created a SelectionDAG for us to codegen. void X86DAGToDAGISel::InstructionSelectBasicBlock(SelectionDAG &DAG) { @@ -195,6 +306,10 @@ #ifndef NDEBUG DEBUG(std::cerr << "===== Instruction selection ends:\n"); #endif + if (ReachibilityMatrix) { + delete[] ReachibilityMatrix; + ReachibilityMatrix = NULL; + } CodeGenMap.clear(); HandleMap.clear(); ReplaceMap.clear(); From natebegeman at mac.com Thu Jul 27 11:47:15 2006 From: natebegeman at mac.com (Nate Begeman) Date: Thu, 27 Jul 2006 11:47:15 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/AsmPrinter.cpp Message-ID: <200607271647.k6RGlFKw022955@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: AsmPrinter.cpp updated: 1.85 -> 1.86 --- Log message: Code cleanups, per review --- Diffs of the changes: (+7 -3) AsmPrinter.cpp | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) Index: llvm/lib/CodeGen/AsmPrinter.cpp diff -u llvm/lib/CodeGen/AsmPrinter.cpp:1.85 llvm/lib/CodeGen/AsmPrinter.cpp:1.86 --- llvm/lib/CodeGen/AsmPrinter.cpp:1.85 Wed Jul 26 20:13:04 2006 +++ llvm/lib/CodeGen/AsmPrinter.cpp Thu Jul 27 11:46:58 2006 @@ -210,7 +210,11 @@ const std::vector &JT = MJTI->getJumpTables(); if (JT.empty()) return; const TargetData *TD = TM.getTargetData(); - const char *PtrDataDirective = Data32bitsDirective; + + // JTEntryDirective is a string to print sizeof(ptr) for non-PIC jump tables, + // and 32 bits for PIC since PIC jump table entries are differences, not + // pointers to blocks. + const char *JTEntryDirective = Data32bitsDirective; // Pick the directive to use to print the jump table entries, and switch to // the appropriate section. @@ -219,7 +223,7 @@ } else { SwitchToDataSection(JumpTableDataSection, 0); if (TD->getPointerSize() == 8) - PtrDataDirective = Data64bitsDirective; + JTEntryDirective = Data64bitsDirective; } EmitAlignment(Log2_32(TD->getPointerAlignment())); @@ -228,7 +232,7 @@ << ":\n"; const std::vector &JTBBs = JT[i].MBBs; for (unsigned ii = 0, ee = JTBBs.size(); ii != ee; ++ii) { - O << PtrDataDirective << ' '; + O << JTEntryDirective << ' '; printBasicBlockLabel(JTBBs[ii], false, false); if (TM.getRelocationModel() == Reloc::PIC_) { O << '-' << PrivateGlobalPrefix << "JTI" << getFunctionNumber() From natebegeman at mac.com Thu Jul 27 11:47:15 2006 From: natebegeman at mac.com (Nate Begeman) Date: Thu, 27 Jul 2006 11:47:15 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Message-ID: <200607271647.k6RGlFT5022958@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAGISel.cpp updated: 1.260 -> 1.261 --- Log message: Code cleanups, per review --- Diffs of the changes: (+0 -2) SelectionDAGISel.cpp | 2 -- 1 files changed, 2 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.260 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.261 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.260 Wed Jul 26 20:13:04 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Thu Jul 27 11:46:58 2006 @@ -914,8 +914,6 @@ double Density = (double)Cases.size() / (double)((Last - First) + 1ULL); if (Density >= 0.3125) { - Reloc::Model Relocs = TLI.getTargetMachine().getRelocationModel(); - // Create a new basic block to hold the code for loading the address // of the jump table, and jumping to it. Update successor information; // we will either branch to the default case for the switch, or the jump From evan.cheng at apple.com Thu Jul 27 12:34:02 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 27 Jul 2006 12:34:02 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCJITInfo.cpp PPCJITInfo.h Message-ID: <200607271734.k6RHY2JA024081@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCJITInfo.cpp updated: 1.25 -> 1.26 PPCJITInfo.h updated: 1.10 -> 1.11 --- Log message: synchronizeICache removeed from TargetJITInfo. --- Diffs of the changes: (+0 -11) PPCJITInfo.cpp | 10 ---------- PPCJITInfo.h | 1 - 2 files changed, 11 deletions(-) Index: llvm/lib/Target/PowerPC/PPCJITInfo.cpp diff -u llvm/lib/Target/PowerPC/PPCJITInfo.cpp:1.25 llvm/lib/Target/PowerPC/PPCJITInfo.cpp:1.26 --- llvm/lib/Target/PowerPC/PPCJITInfo.cpp:1.25 Tue Jul 25 15:40:54 2006 +++ llvm/lib/Target/PowerPC/PPCJITInfo.cpp Thu Jul 27 12:33:48 2006 @@ -268,13 +268,3 @@ } BBRefs.clear(); } - -#ifdef __APPLE__ -extern "C" void sys_icache_invalidate(const void *Addr, size_t len); -#endif - -void PPCJITInfo::synchronizeICache(const void *Addr, size_t Len) { -#ifdef __APPLE__ - sys_icache_invalidate(Addr, Len); -#endif -} Index: llvm/lib/Target/PowerPC/PPCJITInfo.h diff -u llvm/lib/Target/PowerPC/PPCJITInfo.h:1.10 llvm/lib/Target/PowerPC/PPCJITInfo.h:1.11 --- llvm/lib/Target/PowerPC/PPCJITInfo.h:1.10 Tue Jul 25 15:40:54 2006 +++ llvm/lib/Target/PowerPC/PPCJITInfo.h Thu Jul 27 12:33:48 2006 @@ -44,7 +44,6 @@ virtual void replaceMachineCodeForFunction(void *Old, void *New); virtual void resolveBBRefs(MachineCodeEmitter &MCE); - virtual void synchronizeICache(const void *Addr, size_t Len); }; } From evan.cheng at apple.com Thu Jul 27 13:18:27 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 27 Jul 2006 13:18:27 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineRelocation.h Message-ID: <200607271818.k6RIIRBY025119@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: MachineRelocation.h updated: 1.10 -> 1.11 --- Log message: Add basic block machine relocation. --- Diffs of the changes: (+35 -5) MachineRelocation.h | 40 +++++++++++++++++++++++++++++++++++----- 1 files changed, 35 insertions(+), 5 deletions(-) Index: llvm/include/llvm/CodeGen/MachineRelocation.h diff -u llvm/include/llvm/CodeGen/MachineRelocation.h:1.10 llvm/include/llvm/CodeGen/MachineRelocation.h:1.11 --- llvm/include/llvm/CodeGen/MachineRelocation.h:1.10 Thu Jun 22 20:02:37 2006 +++ llvm/include/llvm/CodeGen/MachineRelocation.h Thu Jul 27 13:18:13 2006 @@ -19,6 +19,7 @@ namespace llvm { class GlobalValue; +class MachineBasicBlock; /// MachineRelocation - This represents a target-specific relocation value, /// produced by the code emitter. This relocation is resolved after the has @@ -38,6 +39,7 @@ enum AddressType { isResult, // Relocation has be transformed into its result pointer. isGV, // The Target.GV field is valid. + isBB, // Relocation of BB address. isExtSym, // The Target.ExtSym field is valid. isConstPool, // Relocation of constant pool address. isJumpTable, // Relocation of jump table address. @@ -52,11 +54,12 @@ intptr_t ConstantVal; union { - void *Result; // If this has been resolved to a resolved pointer - GlobalValue *GV; // If this is a pointer to an LLVM global - const char *ExtSym; // If this is a pointer to a named symbol - unsigned Index; // Constant pool / jump table index - unsigned GOTIndex; // Index in the GOT of this symbol/global + void *Result; // If this has been resolved to a resolved pointer + GlobalValue *GV; // If this is a pointer to an LLVM global + MachineBasicBlock *MBB; // If this is a pointer to a LLVM BB + const char *ExtSym; // If this is a pointer to a named symbol + unsigned Index; // Constant pool / jump table index + unsigned GOTIndex; // Index in the GOT of this symbol/global } Target; unsigned TargetReloType : 6; // The target relocation ID. @@ -83,6 +86,22 @@ return Result; } + /// MachineRelocation::getBB - Return a relocation entry for a BB. + /// + static MachineRelocation getBB(intptr_t offset,unsigned RelocationType, + MachineBasicBlock *MBB, intptr_t cst = 0) { + assert((RelocationType & ~63) == 0 && "Relocation type too large!"); + MachineRelocation Result; + Result.Offset = offset; + Result.ConstantVal = cst; + Result.TargetReloType = RelocationType; + Result.AddrType = isBB; + Result.DoesntNeedFnStub = false; + Result.GOTRelative = false; + Result.Target.MBB = MBB; + return Result; + } + /// MachineRelocation::getExtSym - Return a relocation entry for an external /// symbol, like "free". /// @@ -160,6 +179,12 @@ return AddrType == isGV; } + /// isBasicBlock - Return true if this relocation is a basic block reference. + /// + bool isBasicBlock() const { + return AddrType == isBB; + } + /// isString - Return true if this is a constant string. /// bool isString() const { @@ -200,6 +225,11 @@ return Target.GV; } + MachineBasicBlock *getBasicBlock() const { + assert(isBasicBlock() && "This is not a basic block reference!"); + return Target.MBB; + } + /// getString - If this is a string value, return the string reference. /// const char *getString() const { From evan.cheng at apple.com Thu Jul 27 13:19:39 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 27 Jul 2006 13:19:39 -0500 Subject: [llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp Message-ID: <200607271819.k6RIJdVL025216@zion.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine/JIT: JITEmitter.cpp updated: 1.109 -> 1.110 --- Log message: Resolve BB references with relocation. --- Diffs of the changes: (+2 -5) JITEmitter.cpp | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) Index: llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp diff -u llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.109 llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.110 --- llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.109 Thu Jul 27 08:40:34 2006 +++ llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp Thu Jul 27 13:19:24 2006 @@ -807,13 +807,13 @@ ResultPtr = getPointerToGlobal(MR.getGlobalValue(), BufferBegin+MR.getMachineCodeOffset(), MR.doesntNeedFunctionStub()); + } else if (MR.isBasicBlock()) { + ResultPtr = (void*)getMachineBasicBlockAddress(MR.getBasicBlock()); } else if (MR.isConstantPoolIndex()){ - assert(MR.isConstantPoolIndex()); ResultPtr=(void*)getConstantPoolEntryAddress(MR.getConstantPoolIndex()); } else { assert(MR.isJumpTableIndex()); ResultPtr=(void*)getJumpTableEntryAddress(MR.getJumpTableIndex()); - } MR.setResultPointer(ResultPtr); @@ -846,9 +846,6 @@ } } - // Resolve BasicaBlock references. - TheJIT->getJITInfo().resolveBBRefs(*this); - // Invalidate the icache if necessary. synchronizeICache(FnStart, FnEnd-FnStart); From evan.cheng at apple.com Thu Jul 27 13:19:40 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 27 Jul 2006 13:19:40 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/TargetJITInfo.h Message-ID: <200607271819.k6RIJekj025221@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Target: TargetJITInfo.h updated: 1.9 -> 1.10 --- Log message: Resolve BB references with relocation. --- Diffs of the changes: (+0 -14) TargetJITInfo.h | 14 -------------- 1 files changed, 14 deletions(-) Index: llvm/include/llvm/Target/TargetJITInfo.h diff -u llvm/include/llvm/Target/TargetJITInfo.h:1.9 llvm/include/llvm/Target/TargetJITInfo.h:1.10 --- llvm/include/llvm/Target/TargetJITInfo.h:1.9 Thu Jul 27 01:33:55 2006 +++ llvm/include/llvm/Target/TargetJITInfo.h Thu Jul 27 13:19:24 2006 @@ -83,26 +83,12 @@ assert(NumRelocs == 0 && "This target does not have relocations!"); } - /// resolveBBRefs - Resolve branches to BasicBlocks for the JIT emitted - /// function. - virtual void resolveBBRefs(MachineCodeEmitter &MCE) {} - - /// addBBRef - Add a BasicBlock reference to be resolved after the function - /// is emitted. - void addBBRef(MachineBasicBlock *BB, intptr_t PC) { - BBRefs.push_back(std::make_pair(BB, PC)); - } - /// needsGOT - Allows a target to specify that it would like the // JIT to manage a GOT for it. bool needsGOT() const { return useGOT; } protected: bool useGOT; - - // Tracks which instruction references which BasicBlock - std::vector > BBRefs; - }; } // End llvm namespace From lattner at cs.uiuc.edu Thu Jul 27 13:20:05 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 27 Jul 2006 13:20:05 -0500 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200607271820.k6RIK5Yl025246@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.391 -> 1.392 --- Log message: Pass -fstrict-aliasing to the compiler when building a release build on darwin. Darwin doesn't default to it being on. --- Diffs of the changes: (+8 -3) Makefile.rules | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.391 llvm/Makefile.rules:1.392 --- llvm/Makefile.rules:1.391 Wed Jul 26 16:14:55 2006 +++ llvm/Makefile.rules Thu Jul 27 13:19:51 2006 @@ -214,13 +214,18 @@ else ifdef ENABLE_OPTIMIZED BuildMode := Release - # Don't use -fomit-frame-pointer on FreeBSD + # Don't use -fomit-frame-pointer on Darwin or FreeBSD. ifneq ($(OS),FreeBSD) - # Don't use -fomit-frame-pointer on Darwin, it breaks backtraces. ifneq ($(OS),Darwin) OmitFramePointer := -fomit-frame-pointer endif endif + + # Darwin requires -fstrict-aliasing to be explicitly enabled. + ifeq ($(OS),Darwin) + EXTRA_OPTIONS += -fstrict-aliasing + endif + CXX.Flags := $(OPTIMIZE_OPTION) $(OmitFramePointer) C.Flags := $(OPTIMIZE_OPTION) $(OmitFramePointer) LD.Flags := $(OPTIMIZE_OPTION) @@ -251,7 +256,7 @@ AR.Flags := cru LibTool.Flags := --tag=CXX -#Make Floating point ieee complient on alpha +# Make Floating point IEEE compliant on Alpha. ifeq ($(ARCH),Alpha) CXX.Flags += -mieee -fPIC CPP.BaseFlags += -mieee -fPIC From evan.cheng at apple.com Thu Jul 27 13:20:31 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 27 Jul 2006 13:20:31 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaCodeEmitter.cpp AlphaJITInfo.cpp AlphaJITInfo.h Message-ID: <200607271820.k6RIKVMb025269@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/Alpha: AlphaCodeEmitter.cpp updated: 1.16 -> 1.17 AlphaJITInfo.cpp updated: 1.10 -> 1.11 AlphaJITInfo.h updated: 1.2 -> 1.3 --- Log message: Resolve BB references with relocation. --- Diffs of the changes: (+3 -20) AlphaCodeEmitter.cpp | 5 +++-- AlphaJITInfo.cpp | 16 ---------------- AlphaJITInfo.h | 2 -- 3 files changed, 3 insertions(+), 20 deletions(-) Index: llvm/lib/Target/Alpha/AlphaCodeEmitter.cpp diff -u llvm/lib/Target/Alpha/AlphaCodeEmitter.cpp:1.16 llvm/lib/Target/Alpha/AlphaCodeEmitter.cpp:1.17 --- llvm/lib/Target/Alpha/AlphaCodeEmitter.cpp:1.16 Tue Jul 25 15:40:54 2006 +++ llvm/lib/Target/Alpha/AlphaCodeEmitter.cpp Thu Jul 27 13:20:17 2006 @@ -215,8 +215,9 @@ Reloc, MO.getConstantPoolIndex(), Offset)); } else if (MO.isMachineBasicBlock()) { - TM.getJITInfo()->addBBRef(MO.getMachineBasicBlock(), - MCE.getCurrentPCValue()); + MCE.addRelocation(MachineRelocation::getBB(MCE.getCurrentPCOffset(), + Alpha::reloc_bsr, + MO.getMachineBasicBlock())); }else { std::cerr << "ERROR: Unknown type of MachineOperand: " << MO << "\n"; abort(); Index: llvm/lib/Target/Alpha/AlphaJITInfo.cpp diff -u llvm/lib/Target/Alpha/AlphaJITInfo.cpp:1.10 llvm/lib/Target/Alpha/AlphaJITInfo.cpp:1.11 --- llvm/lib/Target/Alpha/AlphaJITInfo.cpp:1.10 Tue Jul 25 15:40:54 2006 +++ llvm/lib/Target/Alpha/AlphaJITInfo.cpp Thu Jul 27 13:20:17 2006 @@ -304,19 +304,3 @@ } } } - -void AlphaJITInfo::resolveBBRefs(MachineCodeEmitter &MCE) { - // Resolve all forward branches now... - for (unsigned i = 0, e = BBRefs.size(); i != e; ++i) { - unsigned* Location = - (unsigned*)MCE.getMachineBasicBlockAddress(BBRefs[i].first); - unsigned* Ref = (unsigned*)BBRefs[i].second; - intptr_t BranchTargetDisp = - (((unsigned char*)Location - (unsigned char*)Ref) >> 2) - 1; - DEBUG(std::cerr << "Fixup @ " << (void*)Ref << " to " << (void*)Location - << " Disp " << BranchTargetDisp - << " using " << (BranchTargetDisp & ((1 << 22)-1)) << "\n"); - *Ref |= (BranchTargetDisp & ((1 << 21)-1)); - } - BBRefs.clear(); -} Index: llvm/lib/Target/Alpha/AlphaJITInfo.h diff -u llvm/lib/Target/Alpha/AlphaJITInfo.h:1.2 llvm/lib/Target/Alpha/AlphaJITInfo.h:1.3 --- llvm/lib/Target/Alpha/AlphaJITInfo.h:1.2 Tue Jul 25 15:40:54 2006 +++ llvm/lib/Target/Alpha/AlphaJITInfo.h Thu Jul 27 13:20:17 2006 @@ -46,8 +46,6 @@ /// code. /// virtual void replaceMachineCodeForFunction(void *Old, void *New); - - virtual void resolveBBRefs(MachineCodeEmitter &MCE); private: static const unsigned GOToffset = 4096; From evan.cheng at apple.com Thu Jul 27 13:20:46 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 27 Jul 2006 13:20:46 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp PPCJITInfo.cpp PPCJITInfo.h PPCRelocations.h Message-ID: <200607271820.k6RIKkbM025291@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCCodeEmitter.cpp updated: 1.64 -> 1.65 PPCJITInfo.cpp updated: 1.26 -> 1.27 PPCJITInfo.h updated: 1.11 -> 1.12 PPCRelocations.h updated: 1.8 -> 1.9 --- Log message: Resolve BB references with relocation. --- Diffs of the changes: (+22 -27) PPCCodeEmitter.cpp | 12 ++++++++++-- PPCJITInfo.cpp | 31 ++++++++----------------------- PPCJITInfo.h | 2 -- PPCRelocations.h | 4 ++++ 4 files changed, 22 insertions(+), 27 deletions(-) Index: llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp diff -u llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp:1.64 llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp:1.65 --- llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp:1.64 Tue Jul 25 15:40:54 2006 +++ llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp Thu Jul 27 13:20:32 2006 @@ -180,8 +180,16 @@ MCE.addRelocation(MachineRelocation::getExtSym(MCE.getCurrentPCOffset(), Reloc, MO.getSymbolName(), 0)); } else if (MO.isMachineBasicBlock()) { - unsigned* CurrPC = (unsigned*)(intptr_t)MCE.getCurrentPCValue(); - TM.getJITInfo()->addBBRef(MO.getMachineBasicBlock(), (intptr_t)CurrPC); + unsigned Reloc = 0; + unsigned Opcode = MI.getOpcode(); + if (Opcode == PPC::B || Opcode == PPC::BL || Opcode == PPC::BLA) + Reloc = PPC::reloc_pcrel_bx; + else + // BLT,BLE,BEQ,BGE,BGT,BNE, or other bcx instruction + Reloc = PPC::reloc_pcrel_bcx; + MCE.addRelocation(MachineRelocation::getBB(MCE.getCurrentPCOffset(), + Reloc, + MO.getMachineBasicBlock())); } else if (MO.isConstantPoolIndex() || MO.isJumpTableIndex()) { if (MO.isConstantPoolIndex()) rv = MCE.getConstantPoolEntryAddress(MO.getConstantPoolIndex()); Index: llvm/lib/Target/PowerPC/PPCJITInfo.cpp diff -u llvm/lib/Target/PowerPC/PPCJITInfo.cpp:1.26 llvm/lib/Target/PowerPC/PPCJITInfo.cpp:1.27 --- llvm/lib/Target/PowerPC/PPCJITInfo.cpp:1.26 Thu Jul 27 12:33:48 2006 +++ llvm/lib/Target/PowerPC/PPCJITInfo.cpp Thu Jul 27 13:20:32 2006 @@ -206,6 +206,14 @@ "Relocation out of range!"); *RelocPos |= (ResultPtr & ((1 << 24)-1)) << 2; break; + case PPC::reloc_pcrel_bcx: + // PC-relative relocation for BLT,BLE,BEQ,BGE,BGT,BNE, or other + // bcx instructions. + ResultPtr = (ResultPtr-(intptr_t)RelocPos) >> 2; + assert(ResultPtr >= -(1 << 13) && ResultPtr < (1 << 13) && + "Relocation out of range!"); + *RelocPos |= (ResultPtr & ((1 << 14)-1)) << 2; + break; case PPC::reloc_absolute_ptr_high: // Pointer relocations. case PPC::reloc_absolute_ptr_low: case PPC::reloc_absolute_high: // high bits of ref -> low 16 of instr @@ -245,26 +253,3 @@ void PPCJITInfo::replaceMachineCodeForFunction(void *Old, void *New) { EmitBranchToAt(Old, New, false); } - -void PPCJITInfo::resolveBBRefs(MachineCodeEmitter &MCE) { - // Resolve branches to BasicBlocks for the entire function - for (unsigned i = 0, e = BBRefs.size(); i != e; ++i) { - intptr_t Location = MCE.getMachineBasicBlockAddress(BBRefs[i].first); - unsigned *Ref = (unsigned *)BBRefs[i].second; - DEBUG(std::cerr << "Fixup @ " << (void*)Ref << " to " << (void*)Location - << "\n"); - unsigned Instr = *Ref; - intptr_t BranchTargetDisp = (Location - (intptr_t)Ref) >> 2; - - switch (Instr >> 26) { - default: assert(0 && "Unknown branch user!"); - case 18: // This is B or BL - *Ref |= (BranchTargetDisp & ((1 << 24)-1)) << 2; - break; - case 16: // This is BLT,BLE,BEQ,BGE,BGT,BNE, or other bcx instruction - *Ref |= (BranchTargetDisp & ((1 << 14)-1)) << 2; - break; - } - } - BBRefs.clear(); -} Index: llvm/lib/Target/PowerPC/PPCJITInfo.h diff -u llvm/lib/Target/PowerPC/PPCJITInfo.h:1.11 llvm/lib/Target/PowerPC/PPCJITInfo.h:1.12 --- llvm/lib/Target/PowerPC/PPCJITInfo.h:1.11 Thu Jul 27 12:33:48 2006 +++ llvm/lib/Target/PowerPC/PPCJITInfo.h Thu Jul 27 13:20:32 2006 @@ -42,8 +42,6 @@ /// code. /// virtual void replaceMachineCodeForFunction(void *Old, void *New); - - virtual void resolveBBRefs(MachineCodeEmitter &MCE); }; } Index: llvm/lib/Target/PowerPC/PPCRelocations.h diff -u llvm/lib/Target/PowerPC/PPCRelocations.h:1.8 llvm/lib/Target/PowerPC/PPCRelocations.h:1.9 --- llvm/lib/Target/PowerPC/PPCRelocations.h:1.8 Wed Jul 12 16:23:20 2006 +++ llvm/lib/Target/PowerPC/PPCRelocations.h Thu Jul 27 13:20:32 2006 @@ -28,6 +28,10 @@ // reloc_pcrel_bx - PC relative relocation, for the b or bl instructions. reloc_pcrel_bx, + // reloc_pcrel_bcx - PC relative relocation, for BLT,BLE,BEQ,BGE,BGT,BNE, + // and other bcx instructions. + reloc_pcrel_bcx, + // reloc_absolute_high - Absolute relocation, for the loadhi instruction // (which is really addis). Add the high 16-bits of the specified global // address into the low 16-bits of the instruction. From evan.cheng at apple.com Thu Jul 27 13:21:26 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 27 Jul 2006 13:21:26 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86CodeEmitter.cpp X86JITInfo.cpp X86JITInfo.h Message-ID: <200607271821.k6RILQOE025319@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86CodeEmitter.cpp updated: 1.111 -> 1.112 X86JITInfo.cpp updated: 1.24 -> 1.25 X86JITInfo.h updated: 1.9 -> 1.10 --- Log message: Resolve BB references with relocation. --- Diffs of the changes: (+2 -13) X86CodeEmitter.cpp | 3 ++- X86JITInfo.cpp | 10 ---------- X86JITInfo.h | 2 -- 3 files changed, 2 insertions(+), 13 deletions(-) Index: llvm/lib/Target/X86/X86CodeEmitter.cpp diff -u llvm/lib/Target/X86/X86CodeEmitter.cpp:1.111 llvm/lib/Target/X86/X86CodeEmitter.cpp:1.112 --- llvm/lib/Target/X86/X86CodeEmitter.cpp:1.111 Tue Jul 25 15:40:54 2006 +++ llvm/lib/Target/X86/X86CodeEmitter.cpp Thu Jul 27 13:21:10 2006 @@ -111,7 +111,8 @@ void Emitter::emitPCRelativeBlockAddress(MachineBasicBlock *MBB) { // Remember where this reference was and where it is to so we can // deal with it later. - TM.getJITInfo()->addBBRef(MBB, MCE.getCurrentPCValue()); + MCE.addRelocation(MachineRelocation::getBB(MCE.getCurrentPCOffset(), + X86::reloc_pcrel_word, MBB)); MCE.emitWordLE(0); } Index: llvm/lib/Target/X86/X86JITInfo.cpp diff -u llvm/lib/Target/X86/X86JITInfo.cpp:1.24 llvm/lib/Target/X86/X86JITInfo.cpp:1.25 --- llvm/lib/Target/X86/X86JITInfo.cpp:1.24 Tue Jul 25 15:40:54 2006 +++ llvm/lib/Target/X86/X86JITInfo.cpp Thu Jul 27 13:21:10 2006 @@ -203,13 +203,3 @@ } } } - -void X86JITInfo::resolveBBRefs(MachineCodeEmitter &MCE) { - // Resolve all forward branches now. - for (unsigned i = 0, e = BBRefs.size(); i != e; ++i) { - unsigned Location = MCE.getMachineBasicBlockAddress(BBRefs[i].first); - intptr_t Ref = BBRefs[i].second; - *((unsigned*)Ref) = Location-Ref-4; - } - BBRefs.clear(); -} Index: llvm/lib/Target/X86/X86JITInfo.h diff -u llvm/lib/Target/X86/X86JITInfo.h:1.9 llvm/lib/Target/X86/X86JITInfo.h:1.10 --- llvm/lib/Target/X86/X86JITInfo.h:1.9 Tue Jul 25 15:40:54 2006 +++ llvm/lib/Target/X86/X86JITInfo.h Thu Jul 27 13:21:10 2006 @@ -51,8 +51,6 @@ /// referenced global symbols. virtual void relocate(void *Function, MachineRelocation *MR, unsigned NumRelocs, unsigned char* GOTBase); - - virtual void resolveBBRefs(MachineCodeEmitter &MCE); }; } From pjenkins at apple.com Thu Jul 27 13:29:04 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Thu, 27 Jul 2006 13:29:04 -0500 Subject: [llvm-commits] CVS: llvm/utils/NewNightlyTest.pl Message-ID: <200607271829.k6RIT4KX025476@zion.cs.uiuc.edu> Changes in directory llvm/utils: NewNightlyTest.pl updated: 1.29 -> 1.30 --- Log message: Removed some clutter that was left over from development. Changed how changedir worked. Hopefully now when it fails it will tell us why. --- Diffs of the changes: (+39 -48) NewNightlyTest.pl | 87 ++++++++++++++++++++++++------------------------------ 1 files changed, 39 insertions(+), 48 deletions(-) Index: llvm/utils/NewNightlyTest.pl diff -u llvm/utils/NewNightlyTest.pl:1.29 llvm/utils/NewNightlyTest.pl:1.30 --- llvm/utils/NewNightlyTest.pl:1.29 Wed Jul 26 20:24:35 2006 +++ llvm/utils/NewNightlyTest.pl Thu Jul 27 13:28:50 2006 @@ -302,7 +302,11 @@ my ($dir,$name) = @_; chomp($dir); if ( $VERBOSE ) { print "Changing To: $name ($dir)\n"; } - chdir($dir) || (print "Cannot change directory to: $name ($dir) " && return -1); + $result = chdir($dir); + if(!$result){ + print "ERROR!!! Cannot change directory to: $name ($dir) because $!"; + return -1; + } return 0; } @@ -777,57 +781,44 @@ # ############################################################## sub TestDirectory { - my $SubDir = shift; - - ChangeDir( "projects/llvm-test/$SubDir", "Programs Test Subdirectory" ) || return ("", ""); - - my $ProgramTestLog = "$Prefix-$SubDir-ProgramTest.txt"; - #my $ProgramTestLog = "$Prefix-MultiSource-ProgramTest.txt"; #CHANGE ME! - - # Run the programs tests... creating a report.nightly.csv file - if (!$NOTEST) { - print "$MAKECMD -k $MAKEOPTS $PROGTESTOPTS report.nightly.csv " - . "TEST=nightly > $ProgramTestLog 2>&1\n"; - system "$MAKECMD -k $MAKEOPTS $PROGTESTOPTS report.nightly.csv " - . "TEST=nightly > $ProgramTestLog 2>&1"; - $llcbeta_options=`$MAKECMD print-llcbeta-option`; - } + my $SubDir = shift; + + ChangeDir( "projects/llvm-test/$SubDir", "Programs Test Subdirectory" ) || return ("", ""); + + my $ProgramTestLog = "$Prefix-$SubDir-ProgramTest.txt"; + + # Run the programs tests... creating a report.nightly.csv file + if (!$NOTEST) { + print "$MAKECMD -k $MAKEOPTS $PROGTESTOPTS report.nightly.csv ". + "TEST=nightly > $ProgramTestLog 2>&1\n"; + system "$MAKECMD -k $MAKEOPTS $PROGTESTOPTS report.nightly.csv ". + "TEST=nightly > $ProgramTestLog 2>&1"; + $llcbeta_options=`$MAKECMD print-llcbeta-option`; + } - my $ProgramsTable; - if (`grep '^$MAKECMD\[^:]: .*Error' $ProgramTestLog | wc -l` + 0){ - $TestError = 1; - $ProgramsTable="Error running test $SubDir\n"; - print "ERROR TESTING\n"; - } elsif (`grep '^$MAKECMD\[^:]: .*No rule to make target' $ProgramTestLog | wc -l` + 0) { - $TestError = 1; - $ProgramsTable="Makefile error running tests $SubDir!\n"; - print "ERROR TESTING\n"; - } else { - $TestError = 0; + my $ProgramsTable; + if (`grep '^$MAKECMD\[^:]: .*Error' $ProgramTestLog | wc -l` + 0){ + $TestError = 1; + $ProgramsTable="Error running test $SubDir\n"; + print "ERROR TESTING\n"; + } elsif (`grep '^$MAKECMD\[^:]: .*No rule to make target' $ProgramTestLog | wc -l` + 0) { + $TestError = 1; + $ProgramsTable="Makefile error running tests $SubDir!\n"; + print "ERROR TESTING\n"; + } else { + $TestError = 0; + # + # Create a list of the tests which were run... + # + system "egrep 'TEST-(PASS|FAIL)' < $ProgramTestLog ". + "| sort > $Prefix-multisourceprogramstable.txt"; + } + $ProgramsTable = ReadFile "report.nightly.csv"; - # - # Create a list of the tests which were run... - # - system "egrep 'TEST-(PASS|FAIL)' < $ProgramTestLog " - . "| sort > $Prefix-multisourceprogramstable.txt"; - } - $ProgramsTable = ReadFile "report.nightly.csv"; - - ChangeDir( "../../..", "Programs Test Parent Directory" ); - return ($ProgramsTable, $llcbeta_options); + ChangeDir( "../../..", "Programs Test Parent Directory" ); + return ($ProgramsTable, $llcbeta_options); } -$patrickjenkins=1; -if(!$patrickjenkins){ - if ( $VERBOSE ) { - print "Modified Multisource Olden test stage\n"; - } - ($MultiSourceProgramsTable, $multisource_llcbeta_options) = TestDirectory("MultiSource/"); - ChangeDir( "../../..", "Programs Test Parent Directory" ); - - - WriteFile "$WebDir/multisourceprogramstable.txt", $MultiSourceProgramsTable; -} if (!$BuildError && $patrickjenkins) { if ( $VERBOSE ) { print "SingleSource TEST STAGE\n"; From pjenkins at apple.com Thu Jul 27 14:00:15 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Thu, 27 Jul 2006 14:00:15 -0500 Subject: [llvm-commits] CVS: llvm/utils/NewNightlyTest.pl Message-ID: <200607271900.k6RJ0FJ7026139@zion.cs.uiuc.edu> Changes in directory llvm/utils: NewNightlyTest.pl updated: 1.30 -> 1.31 --- Log message: Added more descriptive output to singlesource,multisource tests. --- Diffs of the changes: (+30 -24) NewNightlyTest.pl | 54 ++++++++++++++++++++++++++++++------------------------ 1 files changed, 30 insertions(+), 24 deletions(-) Index: llvm/utils/NewNightlyTest.pl diff -u llvm/utils/NewNightlyTest.pl:1.30 llvm/utils/NewNightlyTest.pl:1.31 --- llvm/utils/NewNightlyTest.pl:1.30 Thu Jul 27 13:28:50 2006 +++ llvm/utils/NewNightlyTest.pl Thu Jul 27 14:00:01 2006 @@ -819,34 +819,40 @@ return ($ProgramsTable, $llcbeta_options); } -if (!$BuildError && $patrickjenkins) { - if ( $VERBOSE ) { - print "SingleSource TEST STAGE\n"; - } - ($SingleSourceProgramsTable, $llcbeta_options) = TestDirectory("SingleSource"); - WriteFile "$Prefix-singlesourceprogramstable.txt", $SingleSourceProgramsTable; - if ( $VERBOSE ) { - print "MultiSource TEST STAGE\n"; - } - ($MultiSourceProgramsTable, $llcbeta_options) = TestDirectory("MultiSource"); - WriteFile "$Prefix-multisourceprogramstable.txt", $MultiSourceProgramsTable; - if ( ! $NOEXTERNALS ) { +if (!$BuildError) { if ( $VERBOSE ) { - print "External TEST STAGE\n"; + print "SingleSource TEST STAGE\n"; } - ($ExternalProgramsTable, $llcbeta_options) = TestDirectory("External"); - WriteFile "$Prefix-externalprogramstable.txt", $ExternalProgramsTable; - system "cat $Prefix-singlesourceprogramstable.txt $Prefix-multisourceprogramstable.txt ". - " $Prefix-externalprogramstable.txt | sort > $Prefix-Tests.txt"; - } else { - $ExternalProgramsTable = "External TEST STAGE SKIPPED\n"; + ($SingleSourceProgramsTable, $llcbeta_options) = TestDirectory("SingleSource"); if ( $VERBOSE ) { - print "External TEST STAGE SKIPPED\n"; + print "SingleSource returned $SingleSourceProgramsTable\n"; } - system "cat $Prefix-singlesourceprogramstable.txt $Prefix-multisourceprogramstable.txt ". - " | sort > $Prefix-Tests.txt"; - } - WriteFile "$Prefix-externalprogramstable.txt", $ExternalProgramsTable; + WriteFile "$Prefix-singlesourceprogramstable.txt", $SingleSourceProgramsTable; + if ( $VERBOSE ) { + print "MultiSource TEST STAGE\n"; + } + ($MultiSourceProgramsTable, $llcbeta_options) = TestDirectory("MultiSource"); + WriteFile "$Prefix-multisourceprogramstable.txt", $MultiSourceProgramsTable; + if ( $VERBOSE ) { + print "MultiSource returned $MultiSourceProgramsTable\n"; + } + if ( ! $NOEXTERNALS ) { + if ( $VERBOSE ) { + print "External TEST STAGE\n"; + } + ($ExternalProgramsTable, $llcbeta_options) = TestDirectory("External"); + WriteFile "$Prefix-externalprogramstable.txt", $ExternalProgramsTable; + system "cat $Prefix-singlesourceprogramstable.txt $Prefix-multisourceprogramstable.txt ". + " $Prefix-externalprogramstable.txt | sort > $Prefix-Tests.txt"; + } else { + $ExternalProgramsTable = "External TEST STAGE SKIPPED\n"; + if ( $VERBOSE ) { + print "External TEST STAGE SKIPPED\n"; + } + system "cat $Prefix-singlesourceprogramstable.txt $Prefix-multisourceprogramstable.txt ". + " | sort > $Prefix-Tests.txt"; + } + WriteFile "$Prefix-externalprogramstable.txt", $ExternalProgramsTable; } ############################################################## From pjenkins at apple.com Thu Jul 27 14:10:43 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Thu, 27 Jul 2006 14:10:43 -0500 Subject: [llvm-commits] CVS: nightlytest-serverside/test.php Message-ID: <200607271910.k6RJAhV7026361@zion.cs.uiuc.edu> Changes in directory nightlytest-serverside: test.php updated: 1.9 -> 1.10 --- Log message: Added some comments to clear up ambiguous code --- Diffs of the changes: (+6 -1) test.php | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletion(-) Index: nightlytest-serverside/test.php diff -u nightlytest-serverside/test.php:1.9 nightlytest-serverside/test.php:1.10 --- nightlytest-serverside/test.php:1.9 Wed Jul 26 13:51:36 2006 +++ nightlytest-serverside/test.php Thu Jul 27 14:10:30 2006 @@ -110,7 +110,7 @@ /***************************************************** * - * Printing the times table + * Printing link to build log * ******************************************************/ print"

    See Full Test Results

    \n"; @@ -121,6 +121,11 @@ "View Build Log\n"; } +/***************************************************** + * + * Printing the times table + * + ******************************************************/ if(strpos($today_row['buildstatus'], "OK")===FALSE){ $disp=""; $sign="(+)"; From pjenkins at apple.com Thu Jul 27 14:11:26 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Thu, 27 Jul 2006 14:11:26 -0500 Subject: [llvm-commits] CVS: nightlytest-serverside/fulltest.php Message-ID: <200607271911.k6RJBQKo026432@zion.cs.uiuc.edu> Changes in directory nightlytest-serverside: fulltest.php updated: 1.4 -> 1.5 --- Log message: Added link to build log --- Diffs of the changes: (+24 -0) fulltest.php | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+) Index: nightlytest-serverside/fulltest.php diff -u nightlytest-serverside/fulltest.php:1.4 nightlytest-serverside/fulltest.php:1.5 --- nightlytest-serverside/fulltest.php:1.4 Wed Jul 19 11:13:30 2006 +++ nightlytest-serverside/fulltest.php Thu Jul 27 14:11:12 2006 @@ -96,6 +96,17 @@ /***************************************************** * + * Printing link to build log + * + ******************************************************/ +$buildfile=str_replace(" ", "_", $cur_date); +if(file_exists("machines/$machine_id/$buildfile-Build-Log.txt")){ + print "

    ". + "View Build Log

    \n"; +} + +/***************************************************** + * * Printing the times table * ******************************************************/ @@ -455,6 +466,19 @@ /***************************************************** * + * Printing file size information + * + ******************************************************/ +print "(-) CVS information\n"; +print "
    \n"; + +print"

    File Size information:


    \n"; + +print "


    \n"; + + +/***************************************************** + * * ending sidebar table here * ******************************************************/ From pjenkins at apple.com Thu Jul 27 14:18:03 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Thu, 27 Jul 2006 14:18:03 -0500 Subject: [llvm-commits] CVS: nightlytest-serverside/machine.php Message-ID: <200607271918.k6RJI3PL026588@zion.cs.uiuc.edu> Changes in directory nightlytest-serverside: machine.php updated: 1.3 -> 1.4 --- Log message: Tweaked the coloring scheme so that we dont consider test submissions with failed builds --- Diffs of the changes: (+6 -1) machine.php | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletion(-) Index: nightlytest-serverside/machine.php diff -u nightlytest-serverside/machine.php:1.3 nightlytest-serverside/machine.php:1.4 --- nightlytest-serverside/machine.php:1.3 Mon Jul 10 14:27:51 2006 +++ nightlytest-serverside/machine.php Thu Jul 27 14:17:49 2006 @@ -360,7 +360,12 @@ print "View details\n"; echo ""; echo ""; - $row = $prev_row; + + #this is to ensure we dont compare a test's statistics against + #a test that failed and has bogus statistics + if($build_ok){ + $row = $prev_row; + } $x++; } #end while From pjenkins at apple.com Thu Jul 27 14:22:20 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Thu, 27 Jul 2006 14:22:20 -0500 Subject: [llvm-commits] CVS: llvm/utils/NewNightlyTest.pl Message-ID: <200607271922.k6RJMKXB026671@zion.cs.uiuc.edu> Changes in directory llvm/utils: NewNightlyTest.pl updated: 1.31 -> 1.32 --- Log message: Fixed a stupid error where changedir returned false upon success. --- Diffs of the changes: (+1 -2) NewNightlyTest.pl | 3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) Index: llvm/utils/NewNightlyTest.pl diff -u llvm/utils/NewNightlyTest.pl:1.31 llvm/utils/NewNightlyTest.pl:1.32 --- llvm/utils/NewNightlyTest.pl:1.31 Thu Jul 27 14:00:01 2006 +++ llvm/utils/NewNightlyTest.pl Thu Jul 27 14:22:06 2006 @@ -307,7 +307,6 @@ print "ERROR!!! Cannot change directory to: $name ($dir) because $!"; return -1; } - return 0; } #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -783,7 +782,7 @@ sub TestDirectory { my $SubDir = shift; - ChangeDir( "projects/llvm-test/$SubDir", "Programs Test Subdirectory" ) || return ("", ""); + ChangeDir( "$BuildDir/llvm/projects/llvm-test/$SubDir", "Programs Test Subdirectory" ) || return ("", ""); my $ProgramTestLog = "$Prefix-$SubDir-ProgramTest.txt"; From pjenkins at apple.com Thu Jul 27 14:29:49 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Thu, 27 Jul 2006 14:29:49 -0500 Subject: [llvm-commits] CVS: nightlytest-serverside/machine.php Message-ID: <200607271929.k6RJTncB026845@zion.cs.uiuc.edu> Changes in directory nightlytest-serverside: machine.php updated: 1.4 -> 1.5 --- Log message: My last commit tried to fix the issue where the coloring of the machine's test table could be bsaed on a comparison to a failed test, and thus bogus data. However that fix didnt work. This one fixes my previous error and hopefully ignores tests that have a failed build. --- Diffs of the changes: (+138 -134) machine.php | 272 ++++++++++++++++++++++++++++++------------------------------ 1 files changed, 138 insertions(+), 134 deletions(-) Index: nightlytest-serverside/machine.php diff -u nightlytest-serverside/machine.php:1.4 nightlytest-serverside/machine.php:1.5 --- nightlytest-serverside/machine.php:1.4 Thu Jul 27 14:17:49 2006 +++ nightlytest-serverside/machine.php Thu Jul 27 14:29:35 2006 @@ -183,17 +183,15 @@ $line=1; $row = mysql_fetch_array($result); $x=0; -while($x<10 && $prev_row = mysql_fetch_array($result)){ -$warnings =""; -if(strcmp($row['warnings'],"")!=0){ - $warnings=$row['warnings']; -} +while($x<10 && $prev_row = mysql_fetch_array($result)){ + $warnings =""; + if(strcmp($row['warnings'],"")!=0){ + $warnings=$row['warnings']; + } + $num_warnings = preg_match_all('/warning/', $warnings, $match); -$num_warnings = preg_match_all('/warning/', $warnings, $match); - - if(strpos($row['buildstatus'],"OK")===FALSE){ print "\t\n"; $build_ok=0; @@ -207,165 +205,171 @@ $build_ok=1; } $line++; + + #this test is to test whether the test that precedes this failed, + #thus the test would have bogus data and we shouldnt color based on its + #results + if(strpos($prev_row['buildstatus'],"OK")===false){ + $prev_build_ok=0; + } + else{ + $prev_build_ok=1; + } - /*~~~~~~~~~~~~ Date of test ~~~~~~~~~~~~*/ + /*~~~~~~~~~~~~ Date of test ~~~~~~~~~~~~*/ - echo ""; - $date = preg_replace("/\s\d\d:\d\d:\d\d/","",$row['added']); - echo "$date"; - echo ""; + echo ""; + $date = preg_replace("/\s\d\d:\d\d:\d\d/","",$row['added']); + echo "$date"; + echo ""; - /*~~~~~~~~~~~~ Get CVS Wall Time ~~~~~~~~~~~~*/ + /*~~~~~~~~~~~~ Get CVS Wall Time ~~~~~~~~~~~~*/ - - echo ""; - echo $row['getcvstime_wall']; - echo ""; - - /*~~~~~~~~~~~~ Configure Time CPU ~~~~~~~~~~~~*/ - if($prev_row['configuretime_cpu']!=0 && $build_ok){ - $delta = round(( ($prev_row['configuretime_cpu'] - $row['configuretime_cpu']) / $prev_row['configuretime_cpu'] ) * 100,2); - if ($delta > 20){ - print "{$row['configuretime_cpu']}"; - } - else if ($delta < -20){ - print "{$row['configuretime_cpu']}"; - } - else{ - print "{$row['configuretime_cpu']}"; - } + + echo ""; + echo $row['getcvstime_wall']; + echo ""; + + /*~~~~~~~~~~~~ Configure Time CPU ~~~~~~~~~~~~*/ + if($prev_row['configuretime_cpu']!=0 && $build_ok && $prev_build_ok){ + $delta = round(( ($prev_row['configuretime_cpu'] - $row['configuretime_cpu']) / $prev_row['configuretime_cpu'] ) * 100,2); + if ($delta > 20){ + print "{$row['configuretime_cpu']}"; + } + else if ($delta < -20){ + print "{$row['configuretime_cpu']}"; } else{ print "{$row['configuretime_cpu']}"; } + } + else{ + print "{$row['configuretime_cpu']}"; + } + + /*~~~~~~~~~~~~ Configure Time Wall ~~~~~~~~~~~~*/ - /*~~~~~~~~~~~~ Configure Time Wall ~~~~~~~~~~~~*/ + echo ""; + echo $row['configuretime_wall']; + echo ""; - echo ""; - echo $row['configuretime_wall']; - echo ""; - - /*~~~~~~~~~~~~ Build Time CPU ~~~~~~~~~~~~*/ - - if($prev_row['buildtime_cpu']!=0 && $build_ok){ - $delta = round(( ($prev_row['buildtime_cpu'] - $row['buildtime_cpu']) / $prev_row['buildtime_cpu'] ) * 100,2); - if ($delta > 10){ - print "{$row['buildtime_cpu']}"; - } - else if ($delta < -10){ - print "{$row['buildtime_cpu']}"; - } - else{ - print "{$row['buildtime_cpu']}"; - } + /*~~~~~~~~~~~~ Build Time CPU ~~~~~~~~~~~~*/ + + if($prev_row['buildtime_cpu']!=0 && $build_ok && $prev_build_ok){ + $delta = round(( ($prev_row['buildtime_cpu'] - $row['buildtime_cpu']) / $prev_row['buildtime_cpu'] ) * 100,2); + if ($delta > 10){ + print "{$row['buildtime_cpu']}"; + } + else if ($delta < -10){ + print "{$row['buildtime_cpu']}"; } else{ print "{$row['buildtime_cpu']}"; } + } + else{ + print "{$row['buildtime_cpu']}"; + } - /*~~~~~~~~~~~~ Build Time Wall ~~~~~~~~~~~~*/ + /*~~~~~~~~~~~~ Build Time Wall ~~~~~~~~~~~~*/ - echo ""; - echo $row['buildtime_wall']; - echo ""; - - /*~~~~~~~~~~~~ Dejagnu Time CPU ~~~~~~~~~~~~*/ + echo ""; + echo $row['buildtime_wall']; + echo ""; + + /*~~~~~~~~~~~~ Dejagnu Time CPU ~~~~~~~~~~~~*/ - if($prev_row['dejagnutime_cpu']!=0 && $build_ok){ - $delta = round( ( ($prev_row['dejagnutime_cpu'] - $row['dejagnutime_cpu']) / $prev_row['dejagnutime_cpu'] ) * 100,2); - if ($delta > 10){ - print "{$row['dejagnutime_cpu']}"; - } - else if ($delta < -10){ - print "{$row['dejagnutime_cpu']}"; - } - else{ - print "{$row['dejagnutime_cpu']}"; - } + if($prev_row['dejagnutime_cpu']!=0 && $build_ok && $prev_build_ok){ + $delta = round( ( ($prev_row['dejagnutime_cpu'] - $row['dejagnutime_cpu']) / $prev_row['dejagnutime_cpu'] ) * 100,2); + if ($delta > 10){ + print "{$row['dejagnutime_cpu']}"; + } + else if ($delta < -10){ + print "{$row['dejagnutime_cpu']}"; } else{ print "{$row['dejagnutime_cpu']}"; } - + } + else{ + print "{$row['dejagnutime_cpu']}"; + } + - /*~~~~~~~~~~~~ Dejagnu Time Wall ~~~~~~~~~~~~*/ + /*~~~~~~~~~~~~ Dejagnu Time Wall ~~~~~~~~~~~~*/ - echo ""; - echo $row['dejagnutime_wall']; - echo ""; + echo ""; + echo $row['dejagnutime_wall']; + echo ""; - /*~~~~~~~~~~~~ # of expected passes ~~~~~~~~~~~~*/ + /*~~~~~~~~~~~~ # of expected passes ~~~~~~~~~~~~*/ - if ($row['teststats_exppass'] > $prev_row['teststats_exppass'] && $build_ok){ - $color="#CCFFCC"; - } - else if ($row['teststats_exppass'] < $prev_row['teststats_exppass'] && $build_ok){ - $color="#FFAAAA"; - } - else{ - $color="white"; - } - if(!$build_ok){ - print "{$row['teststats_exppass']}"; - } - else{ - print "{$row['teststats_exppass']}"; - } - /*~~~~~~~~~~~~ # of unexpected failures ~~~~~~~~~~~~*/ + if ($row['teststats_exppass'] > $prev_row['teststats_exppass'] && $build_ok && $prev_build_ok){ + $color="#CCFFCC"; + } + else if ($row['teststats_exppass'] < $prev_row['teststats_exppass'] && $build_ok && $prev_build_ok){ + $color="#FFAAAA"; + } + else{ + $color="white"; + } + if(!$build_ok){ + print "{$row['teststats_exppass']}"; + } + else{ + print "{$row['teststats_exppass']}"; + } + /*~~~~~~~~~~~~ # of unexpected failures ~~~~~~~~~~~~*/ - if ($row['teststats_unexpfail'] < $prev_row['teststats_unexpfail'] && $build_ok){ - $color="#CCFFCC"; - } - else if ($row['teststats_unexpfail'] > $prev_row['teststats_unexpfail'] && $build_ok){ - $color="#FFAAAA"; - } - else{ - $color="white"; - } + if ($row['teststats_unexpfail'] < $prev_row['teststats_unexpfail'] && $build_ok && $prev_build_ok){ + $color="#CCFFCC"; + } + else if ($row['teststats_unexpfail'] > $prev_row['teststats_unexpfail'] && $build_ok && $prev_build_ok){ + $color="#FFAAAA"; + } + else{ + $color="white"; + } - if(!$build_ok){ - print "{$row['teststats_unexpfail']}"; - } - else if($row['teststats_exppass']!=0){ - print "{$row['teststats_unexpfail']}"; - } - else{ - print "{$row['teststats_unexpfail']}"; - } + if(!$build_ok){ + print "{$row['teststats_unexpfail']}"; + } + else if($row['teststats_exppass']!=0){ + print "{$row['teststats_unexpfail']}"; + } + else{ + print "{$row['teststats_unexpfail']}"; + } - /*~~~~~~~~~~~~ # of expected failures ~~~~~~~~~~~~*/ + /*~~~~~~~~~~~~ # of expected failures ~~~~~~~~~~~~*/ - if ($row['teststats_expfail'] < $prev_row['teststats_expfail'] && $build_ok){ - print "{$row['teststats_expfail']}"; - } - else if ($row['teststats_expfail'] > $prev_row['teststats_expfail'] && $build_ok){ - print "{$row['teststats_expfail']}"; - } - else{ - print "{$row['teststats_expfail']}"; - } + if ($row['teststats_expfail'] < $prev_row['teststats_expfail'] && $build_ok && $prev_build_ok){ + print "{$row['teststats_expfail']}"; + } + else if ($row['teststats_expfail'] > $prev_row['teststats_expfail'] && $build_ok && $prev_build_ok){ + print "{$row['teststats_expfail']}"; + } + else{ + print "{$row['teststats_expfail']}"; + } - /*~~~~~~~~~~~~ Number Of Warnings ~~~~~~~~~~~~*/ - - if($num_warnings>0){ - print "\t$num_warnings\n"; - } - else{ - print "\t$num_warnings\n"; - } + /*~~~~~~~~~~~~ Number Of Warnings ~~~~~~~~~~~~*/ - /*~~~~~~~~~~~~ Link to test page ~~~~~~~~~~~~*/ - - echo ""; - print "View details\n"; - echo ""; + if($num_warnings>0){ + print "\t$num_warnings\n"; + } + else{ + print "\t$num_warnings\n"; + } + + /*~~~~~~~~~~~~ Link to test page ~~~~~~~~~~~~*/ + + echo ""; + print "View details\n"; + echo ""; echo ""; - #this is to ensure we dont compare a test's statistics against - #a test that failed and has bogus statistics - if($build_ok){ - $row = $prev_row; - } + $row = $prev_row; $x++; } #end while From evan.cheng at apple.com Thu Jul 27 14:59:48 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 27 Jul 2006 14:59:48 -0500 Subject: [llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp Message-ID: <200607271959.k6RJxman027304@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: DAGISelEmitter.cpp updated: 1.227 -> 1.228 --- Log message: Remove dead code. --- Diffs of the changes: (+0 -29) DAGISelEmitter.cpp | 29 ----------------------------- 1 files changed, 29 deletions(-) Index: llvm/utils/TableGen/DAGISelEmitter.cpp diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.227 llvm/utils/TableGen/DAGISelEmitter.cpp:1.228 --- llvm/utils/TableGen/DAGISelEmitter.cpp:1.227 Thu Jul 27 01:36:11 2006 +++ llvm/utils/TableGen/DAGISelEmitter.cpp Thu Jul 27 14:59:34 2006 @@ -3644,35 +3644,6 @@ OS << "std::set InFlightSet;\n"; OS << "\n"; - OS << "static void findNonImmUse(SDNode* Use, SDNode* Def, bool &found, " - << "std::set &Visited) {\n"; - OS << " if (found || !Visited.insert(Use).second) return;\n"; - OS << " for (unsigned i = 0, e = Use->getNumOperands(); i != e; ++i) {\n"; - OS << " SDNode *N = Use->getOperand(i).Val;\n"; - OS << " if (N != Def) {\n"; - OS << " findNonImmUse(N, Def, found, Visited);\n"; - OS << " } else {\n"; - OS << " found = true;\n"; - OS << " break;\n"; - OS << " }\n"; - OS << " }\n"; - OS << "}\n"; - - OS << "\n"; - OS << "static bool isNonImmUse(SDNode* Use, SDNode* Def) {\n"; - OS << " std::set Visited;\n"; - OS << " bool found = false;\n"; - OS << " for (unsigned i = 0, e = Use->getNumOperands(); i != e; ++i) {\n"; - OS << " SDNode *N = Use->getOperand(i).Val;\n"; - OS << " if (N != Def) {\n"; - OS << " findNonImmUse(N, Def, found, Visited);\n"; - OS << " if (found) break;\n"; - OS << " }\n"; - OS << " }\n"; - OS << " return found;\n"; - OS << "}\n"; - - OS << "\n"; OS << "// AddHandleReplacement - Note the pending replacement node for a\n" << "// handle node in ReplaceMap.\n"; OS << "void AddHandleReplacement(SDNode *H, unsigned HNum, SDNode *R, " From jlaskey at apple.com Thu Jul 27 15:05:15 2006 From: jlaskey at apple.com (Jim Laskey) Date: Thu, 27 Jul 2006 15:05:15 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/PassSupport.h Message-ID: <200607272005.k6RK5F7D027439@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: PassSupport.h updated: 1.24 -> 1.25 --- Log message: Working toward registration of register allocators. --- Diffs of the changes: (+70 -0) PassSupport.h | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 70 insertions(+) Index: llvm/include/llvm/PassSupport.h diff -u llvm/include/llvm/PassSupport.h:1.24 llvm/include/llvm/PassSupport.h:1.25 --- llvm/include/llvm/PassSupport.h:1.24 Wed Jul 26 11:18:00 2006 +++ llvm/include/llvm/PassSupport.h Thu Jul 27 15:04:59 2006 @@ -368,6 +368,76 @@ virtual void passEnumerate(const PassInfo *P) {} }; + +//===---------------------------------------------------------------------===// +/// +/// RegisterRegAlloc class - Track the registration of register allocators. +/// +class RegisterRegAlloc { + +public: + + typedef FunctionPass *(*FunctionPassCtor)(); + +private: + + static RegisterRegAlloc *List; // Linked list of register allocators. + + RegisterRegAlloc *Next; // Next allocation scheme in list. + const char *Name; // Name of register allocator. + const char *Description; // Description string. + FunctionPassCtor Ctor; // Function to construct register + // allocator pass. +public: + + RegisterRegAlloc(const char *N, const char *D, FunctionPassCtor C) + : Name(N) + , Description(D) + , Ctor(C) { + Add(); + } + + ~RegisterRegAlloc() { + Remove(); + } + + + // Accessors + const char *getName() const { return Name; } + const char *getDescription() const { return Description; } + FunctionPassCtor getCtor() const { return Ctor; } + + + /// Add - Adds a register allocator to the registration list. + /// + void Add() { + Next = List; + List = this; + } + + + /// Remove - Removes a register allocator from the registration list. + /// + void Remove() { + for (RegisterRegAlloc **RA = &List; *RA; RA = &(*RA)->Next) { + if (*RA == this) { + *RA = Next; + break; + } + } + } + + + /// Find - Finds a register allocator in registration list. + /// + static FunctionPassCtor Find(const char *N); + +#ifndef NDEBUG + static void print(); +#endif +}; + + } // End llvm namespace #endif From jlaskey at apple.com Thu Jul 27 15:05:15 2006 From: jlaskey at apple.com (Jim Laskey) Date: Thu, 27 Jul 2006 15:05:15 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/Passes.cpp Message-ID: <200607272005.k6RK5FSZ027434@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: Passes.cpp updated: 1.17 -> 1.18 --- Log message: Working toward registration of register allocators. --- Diffs of the changes: (+47 -11) Passes.cpp | 58 +++++++++++++++++++++++++++++++++++++++++++++++----------- 1 files changed, 47 insertions(+), 11 deletions(-) Index: llvm/lib/CodeGen/Passes.cpp diff -u llvm/lib/CodeGen/Passes.cpp:1.17 llvm/lib/CodeGen/Passes.cpp:1.18 --- llvm/lib/CodeGen/Passes.cpp:1.17 Thu Jul 20 12:28:38 2006 +++ llvm/lib/CodeGen/Passes.cpp Thu Jul 27 15:05:00 2006 @@ -13,6 +13,7 @@ //===---------------------------------------------------------------------===// #include "llvm/CodeGen/Passes.h" +#include "llvm/Pass.h" #include "llvm/Support/CommandLine.h" #include using namespace llvm; @@ -33,17 +34,52 @@ cl::init(linearscan)); } -FunctionPass *llvm::createRegisterAllocator() { - switch (RegAlloc) { - default: - std::cerr << "no register allocator selected"; - abort(); - case simple: - return createSimpleRegisterAllocator(); - case local: - return createLocalRegisterAllocator(); - case linearscan: - return createLinearScanRegisterAllocator(); + +RegisterRegAlloc *RegisterRegAlloc::List = NULL; + +/// Find - Finds a register allocator in registration list. +/// +RegisterRegAlloc::FunctionPassCtor RegisterRegAlloc::Find(const char *N) { + for (RegisterRegAlloc *RA = List; RA; RA = RA->Next) { + if (strcmp(N, RA->Name) == 0) return RA->Ctor; } + return NULL; } + +#ifndef NDEBUG +void RegisterRegAlloc::print() { + for (RegisterRegAlloc *RA = List; RA; RA = RA->Next) { + std::cerr << "RegAlloc:" << RA->Name << "\n"; + } +} +#endif + + +static RegisterRegAlloc + simpleRegAlloc("simple", " simple register allocator", + createSimpleRegisterAllocator); + +static RegisterRegAlloc + localRegAlloc("local", " local register allocator", + createLocalRegisterAllocator); + +static RegisterRegAlloc + linearscanRegAlloc("linearscan", "linear scan register allocator", + createLinearScanRegisterAllocator); + + +FunctionPass *llvm::createRegisterAllocator() { + const char *Names[] = {"simple", "local", "linearscan"}; + const char *DefltName = "linearscan"; + + RegisterRegAlloc::FunctionPassCtor Ctor = + RegisterRegAlloc::Find(Names[RegAlloc]); + if (!Ctor) Ctor = RegisterRegAlloc::Find(DefltName); + + assert(Ctor && "No register allocator found"); + + return Ctor(); +} + + From pjenkins at apple.com Thu Jul 27 15:21:40 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Thu, 27 Jul 2006 15:21:40 -0500 Subject: [llvm-commits] CVS: llvm/utils/NewNightlyTest.pl Message-ID: <200607272021.k6RKLewa027723@zion.cs.uiuc.edu> Changes in directory llvm/utils: NewNightlyTest.pl updated: 1.32 -> 1.33 --- Log message: ChangeDir now returns the correct value --- Diffs of the changes: (+2 -1) NewNightlyTest.pl | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/utils/NewNightlyTest.pl diff -u llvm/utils/NewNightlyTest.pl:1.32 llvm/utils/NewNightlyTest.pl:1.33 --- llvm/utils/NewNightlyTest.pl:1.32 Thu Jul 27 14:22:06 2006 +++ llvm/utils/NewNightlyTest.pl Thu Jul 27 15:21:26 2006 @@ -305,8 +305,9 @@ $result = chdir($dir); if(!$result){ print "ERROR!!! Cannot change directory to: $name ($dir) because $!"; - return -1; + return false; } + return true; } #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From pjenkins at apple.com Thu Jul 27 16:01:53 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Thu, 27 Jul 2006 16:01:53 -0500 Subject: [llvm-commits] CVS: llvm/utils/NewNightlyTest.pl Message-ID: <200607272101.k6RL1r7m028578@zion.cs.uiuc.edu> Changes in directory llvm/utils: NewNightlyTest.pl updated: 1.33 -> 1.34 --- Log message: Removed some unneccesary print statemnts --- Diffs of the changes: (+0 -1) NewNightlyTest.pl | 1 - 1 files changed, 1 deletion(-) Index: llvm/utils/NewNightlyTest.pl diff -u llvm/utils/NewNightlyTest.pl:1.33 llvm/utils/NewNightlyTest.pl:1.34 --- llvm/utils/NewNightlyTest.pl:1.33 Thu Jul 27 15:21:26 2006 +++ llvm/utils/NewNightlyTest.pl Thu Jul 27 16:01:39 2006 @@ -1043,7 +1043,6 @@ } else{ $gcc_version_long = `gcc --version`; - print "gcc --version\n"; } @GCC_VERSION = split '\n', $gcc_version_long; my $gcc_version = $GCC_VERSION[0]; From pjenkins at apple.com Thu Jul 27 16:02:56 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Thu, 27 Jul 2006 16:02:56 -0500 Subject: [llvm-commits] CVS: nightlytest-serverside/index.php Message-ID: <200607272102.k6RL2uBp028654@zion.cs.uiuc.edu> Changes in directory nightlytest-serverside: index.php updated: 1.7 -> 1.8 --- Log message: Changed date added column to read time submitted --- Diffs of the changes: (+1 -1) index.php | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: nightlytest-serverside/index.php diff -u nightlytest-serverside/index.php:1.7 nightlytest-serverside/index.php:1.8 --- nightlytest-serverside/index.php:1.7 Mon Jul 10 13:13:04 2006 +++ nightlytest-serverside/index.php Thu Jul 27 16:02:42 2006 @@ -29,7 +29,7 @@ print "Tests submitted in last 24 hours:
    "; print "\n"; print "\t"; - print "\t\t\n"; + print "\t\t\n"; print "\t\t\n"; print "\t\t\n"; print "\t\t\n"; From pjenkins at apple.com Thu Jul 27 16:12:50 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Thu, 27 Jul 2006 16:12:50 -0500 Subject: [llvm-commits] CVS: nightlytest-serverside/NightlyTestAccept.cgi Message-ID: <200607272112.k6RLCoKa028958@zion.cs.uiuc.edu> Changes in directory nightlytest-serverside: NightlyTestAccept.cgi updated: 1.34 -> 1.35 --- Log message: the file size information shoudl be submitted to the database successfully --- Diffs of the changes: (+3 -7) NightlyTestAccept.cgi | 10 +++------- 1 files changed, 3 insertions(+), 7 deletions(-) Index: nightlytest-serverside/NightlyTestAccept.cgi diff -u nightlytest-serverside/NightlyTestAccept.cgi:1.34 nightlytest-serverside/NightlyTestAccept.cgi:1.35 --- nightlytest-serverside/NightlyTestAccept.cgi:1.34 Wed Jul 26 20:22:51 2006 +++ nightlytest-serverside/NightlyTestAccept.cgi Thu Jul 27 16:12:36 2006 @@ -373,7 +373,7 @@ #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sub AddFile{ #$file, $size, $night, $type $query = "INSERT INTO file (file, size, night, type) VALUES (\"$_[0]\", ". - "\"$_[1]\", \"$_[2]\", $_[3])"; + "\"$_[1]\", \"$_[2]\", \"$_[3]\")"; my $d = $dbh->prepare($query); $d->execute; } @@ -448,10 +448,6 @@ $external_tests = "" unless $external_tests; my @EXTERNAL_TESTS = split $spliton, $external_tests; -my $olden_tests=param('olden_tests'); - $olden_tests="" unless $olden_tests; -my @OLDEN_TESTS = split $spliton, $singlesource_tests; - my $o_file_size = param('o_file_sizes'); $o_file_size="" unless $o_file_size; chomp($o_file_size); @@ -643,12 +639,12 @@ } foreach $x (@O_FILE_SIZE){ - $x =~ m/(.+)\s+(.+)\s+(.+)/gi; + $x =~ m/(.+)\s+(.+)\s+(.+)/; AddFile $2, $1, $night_id, $3; } foreach $x (@A_FILE_SIZE){ - $x =~ m/(.+)\s+(.+)\s+(.+)/gi; + $x =~ m/(.+)\s+(.+)\s+(.+)/; AddFile $2, $1, $night_id, $3; } From evan.cheng at apple.com Thu Jul 27 16:19:24 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 27 Jul 2006 16:19:24 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Message-ID: <200607272119.k6RLJO6X029158@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ISelDAGToDAG.cpp updated: 1.76 -> 1.77 --- Log message: isNonImmUse is replaced by IsFoldableBy --- Diffs of the changes: (+1 -1) X86ISelDAGToDAG.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp diff -u llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.76 llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.77 --- llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.76 Thu Jul 27 11:44:36 2006 +++ llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Thu Jul 27 16:19:10 2006 @@ -640,7 +640,7 @@ if (N.getOpcode() == ISD::LOAD && N.hasOneUse() && !CodeGenMap.count(N.getValue(0)) && - (P.getNumOperands() == 1 || !isNonImmUse(P.Val, N.Val))) + !IsFoldableBy(N.Val, P.Val)) return SelectAddr(N.getOperand(1), Base, Scale, Index, Disp); return false; } From evan.cheng at apple.com Thu Jul 27 17:10:15 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 27 Jul 2006 17:10:15 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Message-ID: <200607272210.k6RMAFcB028621@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ISelDAGToDAG.cpp updated: 1.77 -> 1.78 --- Log message: Calculate the portion of reachbility matrix on demand. --- Diffs of the changes: (+42 -11) X86ISelDAGToDAG.cpp | 53 +++++++++++++++++++++++++++++++++++++++++----------- 1 files changed, 42 insertions(+), 11 deletions(-) Index: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp diff -u llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.77 llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.78 --- llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.77 Thu Jul 27 16:19:10 2006 +++ llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Thu Jul 27 17:10:00 2006 @@ -124,7 +124,7 @@ private: void DetermineTopologicalOrdering(); - void DeterminReachibility(); + void DeterminReachibility(SDNode *f, SDNode *t); void Select(SDOperand &Result, SDOperand N); @@ -186,7 +186,15 @@ /// TopOrder - Topological ordering of all nodes in the DAG. /// - std::vector TopOrder; + SDNode* *TopOrder; + + /// IdToOrder - Node id to topological order map. + /// + unsigned *IdToOrder; + + /// RMRange - The range of reachibility information available for the + /// particular source node. + unsigned *RMRange; /// ReachibilityMatrix - A N x N matrix representing all pairs reachibility /// information. One bit per potential edge. @@ -221,8 +229,7 @@ // / [X] // | ^ // [U]--------| - if (!ReachibilityMatrix) - DeterminReachibility(); + DeterminReachibility(U, N); assert(isReachable(U, N) && "Attempting to fold a non-operand node?"); for (SDNode::op_iterator I = U->op_begin(), E = U->op_end(); I != E; ++I) { SDNode *P = I->Val; @@ -236,7 +243,11 @@ /// in the DAG. void X86DAGToDAGISel::DetermineTopologicalOrdering() { DAGSize = CurDAG->AssignNodeIds(); - TopOrder.reserve(DAGSize); + TopOrder = new SDNode*[DAGSize]; + IdToOrder = new unsigned[DAGSize]; + memset(IdToOrder, 0, DAGSize * sizeof(unsigned)); + RMRange = new unsigned[DAGSize]; + memset(RMRange, 0, DAGSize * sizeof(unsigned)); std::vector InDegree(DAGSize); std::list Sources; @@ -254,6 +265,7 @@ SDNode *N = Sources.front(); Sources.pop_front(); TopOrder[Order] = N; + IdToOrder[N->getNodeId()] = Order; Order++; for (SDNode::op_iterator I = N->op_begin(), E = N->op_end(); I != E; ++I) { SDNode *P = I->Val; @@ -266,19 +278,31 @@ } } -void X86DAGToDAGISel::DeterminReachibility() { - DetermineTopologicalOrdering(); - ReachibilityMatrix = new unsigned char[DAGSize * DAGSize]; - memset(ReachibilityMatrix, 0, DAGSize * DAGSize * sizeof(unsigned char)); +void X86DAGToDAGISel::DeterminReachibility(SDNode *f, SDNode *t) { + if (!ReachibilityMatrix) { + DetermineTopologicalOrdering(); + ReachibilityMatrix = new unsigned char[DAGSize * DAGSize]; + memset(ReachibilityMatrix, 0, DAGSize * DAGSize * sizeof(unsigned char)); + } - for (unsigned i = 0; i < DAGSize; ++i) { + int Idf = f->getNodeId(); + int Idt = t->getNodeId(); + unsigned Orderf = IdToOrder[Idf]; + unsigned Ordert = IdToOrder[Idt]; + unsigned Range = RMRange[Idf]; + if (Range >= Ordert) + return; + if (Range < Orderf) + Range = Orderf; + + for (unsigned i = Range; i < Ordert; ++i) { SDNode *N = TopOrder[i]; setReachable(N, N); // If N is a leaf node, there is nothing more to do. if (N->getNumOperands() == 0) continue; - for (unsigned i2 = 0; ; ++i2) { + for (unsigned i2 = Orderf; ; ++i2) { SDNode *M = TopOrder[i2]; if (isReachable(M, N)) { // Update reachibility from M to N's operands. @@ -288,6 +312,8 @@ if (M == N) break; } } + + RMRange[Idf] = Ordert; } /// InstructionSelectBasicBlock - This callback is invoked by SelectionDAGISel @@ -308,7 +334,12 @@ #endif if (ReachibilityMatrix) { delete[] ReachibilityMatrix; + delete[] TopOrder; + delete[] IdToOrder; + delete[] RMRange; ReachibilityMatrix = NULL; + TopOrder = NULL; + IdToOrder = RMRange = NULL; } CodeGenMap.clear(); HandleMap.clear(); From evan.cheng at apple.com Thu Jul 27 17:35:58 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 27 Jul 2006 17:35:58 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Message-ID: <200607272235.k6RMZwQG001317@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ISelDAGToDAG.cpp updated: 1.78 -> 1.79 --- Log message: Allocating too large an array for ReachibilityMatrix. --- Diffs of the changes: (+5 -2) X86ISelDAGToDAG.cpp | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) Index: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp diff -u llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.78 llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.79 --- llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.78 Thu Jul 27 17:10:00 2006 +++ llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Thu Jul 27 17:35:40 2006 @@ -281,8 +281,11 @@ void X86DAGToDAGISel::DeterminReachibility(SDNode *f, SDNode *t) { if (!ReachibilityMatrix) { DetermineTopologicalOrdering(); - ReachibilityMatrix = new unsigned char[DAGSize * DAGSize]; - memset(ReachibilityMatrix, 0, DAGSize * DAGSize * sizeof(unsigned char)); + unsigned RMSize = DAGSize * DAGSize / 8; + if ((DAGSize * DAGSize) % 8) + RMSize++; + ReachibilityMatrix = new unsigned char[RMSize]; + memset(ReachibilityMatrix, 0, RMSize); } int Idf = f->getNodeId(); From reid at x10sys.com Thu Jul 27 18:00:51 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 27 Jul 2006 18:00:51 -0500 Subject: [llvm-commits] CVS: llvm/utils/GenLibDeps.pl Message-ID: <200607272300.k6RN0p8C014734@zion.cs.uiuc.edu> Changes in directory llvm/utils: GenLibDeps.pl updated: 1.9 -> 1.10 --- Log message: Changes to support cross-compiling LLVM. The GenLibDeps.pl script needs to have a compile-host version of "nm", not build-host. In order to effect this we must use autoconf to determine the correct "nm" to use and propagate that through the makefiles, through llvm-config and finally to GenLibDeps.pl as an optional argument. Patch contributed by Anton Korobeynikov. Thanks! --- Diffs of the changes: (+6 -3) GenLibDeps.pl | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) Index: llvm/utils/GenLibDeps.pl diff -u llvm/utils/GenLibDeps.pl:1.9 llvm/utils/GenLibDeps.pl:1.10 --- llvm/utils/GenLibDeps.pl:1.9 Tue Jul 25 14:12:06 2006 +++ llvm/utils/GenLibDeps.pl Thu Jul 27 18:00:30 2006 @@ -6,7 +6,7 @@ # libraries. The output of this script should periodically replace # the similar content in the UsingLibraries.html document. # -# Syntax: GenLibDeps.pl [-flat] +# Syntax: GenLibDeps.pl [-flat] [path_to_nm_binary] # # Parse arguments... @@ -24,6 +24,7 @@ # Give first option a name. my $Directory = $ARGV[0]; +my $nmPath = $ARGV[1]; # Find the "dot" program my $DotPath=""; @@ -32,8 +33,10 @@ die "Can't find 'dot'" if (! -x "$DotPath"); } -chomp(my $nmPath=`which nm`); -die "Can't find 'nm'" if (! -x "$nmPath"); +if ($nmPath eq "") { + chomp($nmPath=`which nm`); + die "Can't find 'nm'" if (! -x "$nmPath"); +} # Open the directory and read its contents, sorting by name and differentiating # by whether its a library (.a) or an object file (.o) From reid at x10sys.com Thu Jul 27 18:00:50 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 27 Jul 2006 18:00:50 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvm-config/Makefile llvm-config.in.in Message-ID: <200607272300.k6RN0oCs014724@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-config: Makefile updated: 1.12 -> 1.13 llvm-config.in.in updated: 1.18 -> 1.19 --- Log message: Changes to support cross-compiling LLVM. The GenLibDeps.pl script needs to have a compile-host version of "nm", not build-host. In order to effect this we must use autoconf to determine the correct "nm" to use and propagate that through the makefiles, through llvm-config and finally to GenLibDeps.pl as an optional argument. Patch contributed by Anton Korobeynikov. Thanks! --- Diffs of the changes: (+3 -2) Makefile | 2 +- llvm-config.in.in | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) Index: llvm/tools/llvm-config/Makefile diff -u llvm/tools/llvm-config/Makefile:1.12 llvm/tools/llvm-config/Makefile:1.13 --- llvm/tools/llvm-config/Makefile:1.12 Wed Jul 26 12:10:54 2006 +++ llvm/tools/llvm-config/Makefile Thu Jul 27 18:00:30 2006 @@ -33,7 +33,7 @@ $(LibDeps): $(GenLibDeps) $(LibDir) $(wildcard $(LibDir)/*.a $(LibDir)/*.o) $(Echo) "Regenerating LibDeps.txt" - $(Verb) $(GenLibDeps) -flat $(LibDir) | sort > $(LibDeps) + $(Verb) $(GenLibDeps) -flat $(LibDir) $(NM_PATH) | sort > $(LibDeps) # Find all the cyclic dependencies between various LLVM libraries, so we # don't have to process them at runtime. Index: llvm/tools/llvm-config/llvm-config.in.in diff -u llvm/tools/llvm-config/llvm-config.in.in:1.18 llvm/tools/llvm-config/llvm-config.in.in:1.19 --- llvm/tools/llvm-config/llvm-config.in.in:1.18 Tue Jun 6 19:43:18 2006 +++ llvm/tools/llvm-config/llvm-config.in.in Thu Jul 27 18:00:30 2006 @@ -47,6 +47,7 @@ #---- begin Makefile values ---- my $CXXFLAGS = q{@LLVM_CXXFLAGS@}; my $LDFLAGS = q{@LLVM_LDFLAGS@}; +my $SYSTEM_LIBS = q{@LIBS@}; my $LLVM_BUILDMODE = q{@LLVM_BUILDMODE@}; #---- end Makefile values ---- @@ -109,7 +110,7 @@ } elsif ($arg eq "--cxxflags") { $has_opt = 1; print "-I$INCLUDEDIR $CXXFLAGS\n"; } elsif ($arg eq "--ldflags") { - $has_opt = 1; print "-L$LIBDIR $LDFLAGS\n"; + $has_opt = 1; print "-L$LIBDIR $LDFLAGS $SYSTEM_LIBS\n"; } elsif ($arg eq "--libs") { $has_opt = 1; $want_libs = 1; } elsif ($arg eq "--libnames") { From reid at x10sys.com Thu Jul 27 18:00:52 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 27 Jul 2006 18:00:52 -0500 Subject: [llvm-commits] CVS: llvm/Makefile.config.in configure Message-ID: <200607272300.k6RN0qYg014754@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.config.in updated: 1.60 -> 1.61 configure updated: 1.241 -> 1.242 --- Log message: Changes to support cross-compiling LLVM. The GenLibDeps.pl script needs to have a compile-host version of "nm", not build-host. In order to effect this we must use autoconf to determine the correct "nm" to use and propagate that through the makefiles, through llvm-config and finally to GenLibDeps.pl as an optional argument. Patch contributed by Anton Korobeynikov. Thanks! --- Diffs of the changes: (+91 -85) Makefile.config.in | 3 configure | 173 ++++++++++++++++++++++++++--------------------------- 2 files changed, 91 insertions(+), 85 deletions(-) Index: llvm/Makefile.config.in diff -u llvm/Makefile.config.in:1.60 llvm/Makefile.config.in:1.61 --- llvm/Makefile.config.in:1.60 Wed Jul 26 16:14:55 2006 +++ llvm/Makefile.config.in Thu Jul 27 18:00:30 2006 @@ -129,6 +129,9 @@ # Path to the library archiver program. AR_PATH = @AR@ +# Path to the nm program +NM_PATH = @NM@ + # The pathnames of the programs we require to build BISON := @BISON@ CMP := @CMP@ Index: llvm/configure diff -u llvm/configure:1.241 llvm/configure:1.242 --- llvm/configure:1.241 Wed Jul 26 16:14:55 2006 +++ llvm/configure Thu Jul 27 18:00:30 2006 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for llvm 1.8cvs. +# Generated by GNU Autoconf 2.59 for llvm 1.9cvs. # # Report bugs to . # @@ -425,8 +425,8 @@ # Identity of this package. PACKAGE_NAME='llvm' PACKAGE_TARNAME='-llvm-' -PACKAGE_VERSION='1.8cvs' -PACKAGE_STRING='llvm 1.8cvs' +PACKAGE_VERSION='1.9cvs' +PACKAGE_STRING='llvm 1.9cvs' PACKAGE_BUGREPORT='llvmbugs at cs.uiuc.edu' ac_unique_file="lib/VMCore/Module.cpp" @@ -477,7 +477,7 @@ # 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 LLVM_COPYRIGHT subdirs build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os OS LLVM_ON_UNIX LLVM_ON_WIN32 ARCH ENDIAN CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT LLVM_CROSS_COMPILING BUILD_CC BUILD_EXEEXT CVSBUILD ENABLE_OPTIMIZED DISABLE_ASSERTIONS DEBUG_RUNTIME JIT TARGET_HAS_JIT ENABLE_DOXYGEN ENABLE_THREADS TARGETS_TO_BUILD EXTRA_OPTIONS CPP CXX CXXFLAGS ac_ct_CXX LEX LEXLIB LEX_OUTPUT_ROOT FLEX YACC BISON ifGNUmake LN_S CMP CP DATE FIND GREP MKDIR MV RANLIB ac_ct_RANLIB RM SED TAR GRAPHVIZ DOT GV DOTTY PERL HAVE_PERL INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA BZIP2! DOXYGEN ETAGS GROFF GZIP POD2HTML POD2MAN RUNTEST TCLSH ZIP EGREP INSTALL_LTDL_TRUE INSTALL_LTDL_FALSE CONVENIENCE_LTDL_TRUE CONVENIENCE_LTDL_FALSE LIBADD_DL ECHO AR ac_ct_AR STRIP ac_ct_STRIP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL ETAGSFLAGS LLVMGCC LLVMGXX ALLOCA MMAP_FILE LLVMCC1 LLVMCC1PLUS LLVMGCCDIR LLVMGCC_VERSION LLVMGCC_MAJVERS SHLIBEXT LLVM_PREFIX LLVM_BINDIR LLVM_LIBDIR LLVM_DATADIR LLVM_DOCSDIR LLVM_ETCDIR LLVM_INCLUDEDIR LLVM_INFODIR LLVM_MANDIR LLVM_CONFIGTIME 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 datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS LLVM_COPYRIGHT subdirs build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os OS LLVM_ON_UNIX LLVM_ON_WIN32 ARCH ENDIAN CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT LLVM_CROSS_COMPILING BUILD_CC BUILD_EXEEXT CVSBUILD ENABLE_OPTIMIZED DISABLE_ASSERTIONS DEBUG_RUNTIME JIT TARGET_HAS_JIT ENABLE_DOXYGEN ENABLE_THREADS TARGETS_TO_BUILD EXTRA_OPTIONS CPP CXX CXXFLAGS ac_ct_CXX LEX LEXLIB LEX_OUTPUT_ROOT FLEX YACC BISON NM ifGNUmake LN_S CMP CP DATE FIND GREP MKDIR MV RANLIB ac_ct_RANLIB RM SED TAR GRAPHVIZ DOT GV DOTTY PERL HAVE_PERL INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA BZ! IP2 DOXYGEN ETAGS GROFF GZIP POD2HTML POD2MAN RUNTEST TCLSH ZIP EGREP INSTALL_LTDL_TRUE INSTALL_LTDL_FALSE CONVENIENCE_LTDL_TRUE CONVENIENCE_LTDL_FALSE LIBADD_DL ECHO AR ac_ct_AR STRIP ac_ct_STRIP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL ETAGSFLAGS LLVMGCC LLVMGXX ALLOCA MMAP_FILE LLVMCC1 LLVMCC1PLUS LLVMGCCDIR LLVMGCC_VERSION LLVMGCC_MAJVERS SHLIBEXT LLVM_PREFIX LLVM_BINDIR LLVM_LIBDIR LLVM_DATADIR LLVM_DOCSDIR LLVM_ETCDIR LLVM_INCLUDEDIR LLVM_INFODIR LLVM_MANDIR LLVM_CONFIGTIME LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -966,7 +966,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures llvm 1.8cvs to adapt to many kinds of systems. +\`configure' configures llvm 1.9cvs to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1028,7 +1028,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of llvm 1.8cvs:";; + short | recursive ) echo "Configuration of llvm 1.9cvs:";; esac cat <<\_ACEOF @@ -1178,7 +1178,7 @@ test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -llvm configure 1.8cvs +llvm configure 1.9cvs generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -1194,7 +1194,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by llvm $as_me 1.8cvs, which was +It was created by llvm $as_me 1.9cvs, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -4808,6 +4808,54 @@ fi +echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 +echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6 +if test "${lt_cv_path_NM+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/${ac_tool_prefix}nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + esac + fi + done + IFS="$lt_save_ifs" + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm +fi +fi +echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 +echo "${ECHO_T}$lt_cv_path_NM" >&6 +NM="$lt_cv_path_NM" + + + echo "$as_me:$LINENO: checking for GNU make" >&5 echo $ECHO_N "checking for GNU make... $ECHO_C" >&6 if test "${llvm_cv_gnu_make_command+set}" = set; then @@ -7732,52 +7780,6 @@ _ACEOF -echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 -echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6 -if test "${lt_cv_path_NM+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/${ac_tool_prefix}nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - esac - fi - done - IFS="$lt_save_ifs" - test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm -fi -fi -echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 -echo "${ECHO_T}$lt_cv_path_NM" >&6 -NM="$lt_cv_path_NM" - @@ -8749,7 +8751,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 10745 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -11225,7 +11227,7 @@ # Provide some information about the compiler. -echo "$as_me:11228:" \ +echo "$as_me:11230:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -12282,11 +12284,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12285: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12287: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:12289: \$? = $ac_status" >&5 + echo "$as_me:12291: \$? = $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 @@ -12525,11 +12527,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12528: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12530: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:12532: \$? = $ac_status" >&5 + echo "$as_me:12534: \$? = $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 @@ -12585,11 +12587,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12588: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12590: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:12592: \$? = $ac_status" >&5 + echo "$as_me:12594: \$? = $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 @@ -14770,7 +14772,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:17066: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:17068: \$? = $ac_status" >&5 + echo "$as_me:17070: \$? = $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 @@ -17121,11 +17123,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17124: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17126: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:17128: \$? = $ac_status" >&5 + echo "$as_me:17130: \$? = $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 @@ -18482,7 +18484,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:19422: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:19424: \$? = $ac_status" >&5 + echo "$as_me:19426: \$? = $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 @@ -19477,11 +19479,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:19480: $lt_compile\"" >&5) + (eval echo "\"\$as_me:19482: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:19484: \$? = $ac_status" >&5 + echo "$as_me:19486: \$? = $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 @@ -21516,11 +21518,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:21519: $lt_compile\"" >&5) + (eval echo "\"\$as_me:21521: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:21523: \$? = $ac_status" >&5 + echo "$as_me:21525: \$? = $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 @@ -21759,11 +21761,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:21762: $lt_compile\"" >&5) + (eval echo "\"\$as_me:21764: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:21766: \$? = $ac_status" >&5 + echo "$as_me:21768: \$? = $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 @@ -21819,11 +21821,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:21822: $lt_compile\"" >&5) + (eval echo "\"\$as_me:21824: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:21826: \$? = $ac_status" >&5 + echo "$as_me:21828: \$? = $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 @@ -24004,7 +24006,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5 cat >&5 <<_CSEOF -This file was extended by llvm $as_me 1.8cvs, which was +This file was extended by llvm $as_me 1.9cvs, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -31836,7 +31838,7 @@ cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -llvm config.status 1.8cvs +llvm config.status 1.9cvs configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" @@ -32099,6 +32101,7 @@ s, at FLEX@,$FLEX,;t t s, at YACC@,$YACC,;t t s, at BISON@,$BISON,;t t +s, at NM@,$NM,;t t s, at ifGNUmake@,$ifGNUmake,;t t s, at LN_S@,$LN_S,;t t s, at CMP@,$CMP,;t t From reid at x10sys.com Thu Jul 27 18:00:52 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 27 Jul 2006 18:00:52 -0500 Subject: [llvm-commits] CVS: llvm/tools/analyze/Makefile Message-ID: <200607272300.k6RN0qXw014747@zion.cs.uiuc.edu> Changes in directory llvm/tools/analyze: Makefile updated: 1.32 -> 1.33 --- Log message: Changes to support cross-compiling LLVM. The GenLibDeps.pl script needs to have a compile-host version of "nm", not build-host. In order to effect this we must use autoconf to determine the correct "nm" to use and propagate that through the makefiles, through llvm-config and finally to GenLibDeps.pl as an optional argument. Patch contributed by Anton Korobeynikov. Thanks! --- Diffs of the changes: (+2 -0) Makefile | 2 ++ 1 files changed, 2 insertions(+) Index: llvm/tools/analyze/Makefile diff -u llvm/tools/analyze/Makefile:1.32 llvm/tools/analyze/Makefile:1.33 --- llvm/tools/analyze/Makefile:1.32 Thu Jul 6 19:46:18 2006 +++ llvm/tools/analyze/Makefile Thu Jul 27 18:00:30 2006 @@ -8,6 +8,8 @@ ##===----------------------------------------------------------------------===## LEVEL = ../.. TOOLNAME = analyze +#TOOLLINKOPTS = $(LINKALL) +#TOOLLINKOPTSB = $(NOLINKALL) USEDLIBS = LLVMAsmParser.a LLVMBCReader.a LLVMAnalysis.a LLVMipa.a \ LLVMDataStructure \ LLVMScalarOpts.a LLVMTransforms.a LLVMTarget.a LLVMScalarOpts.a \ From reid at x10sys.com Thu Jul 27 18:00:52 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 27 Jul 2006 18:00:52 -0500 Subject: [llvm-commits] CVS: llvm/autoconf/configure.ac Message-ID: <200607272300.k6RN0qQg014757@zion.cs.uiuc.edu> Changes in directory llvm/autoconf: configure.ac updated: 1.239 -> 1.240 --- Log message: Changes to support cross-compiling LLVM. The GenLibDeps.pl script needs to have a compile-host version of "nm", not build-host. In order to effect this we must use autoconf to determine the correct "nm" to use and propagate that through the makefiles, through llvm-config and finally to GenLibDeps.pl as an optional argument. Patch contributed by Anton Korobeynikov. Thanks! --- Diffs of the changes: (+3 -0) configure.ac | 3 +++ 1 files changed, 3 insertions(+) Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.239 llvm/autoconf/configure.ac:1.240 --- llvm/autoconf/configure.ac:1.239 Wed Jul 26 23:58:33 2006 +++ llvm/autoconf/configure.ac Thu Jul 27 18:00:30 2006 @@ -357,6 +357,9 @@ AC_PROG_FLEX AC_PROG_BISON +AC_PROG_NM +AC_SUBST(NM) + dnl Check for the tools that the makefiles require AC_CHECK_GNU_MAKE AC_PROG_LN_S From reid at x10sys.com Thu Jul 27 18:19:16 2006 From: reid at x10sys.com (Reid Spencer) Date: Thu, 27 Jul 2006 18:19:16 -0500 Subject: [llvm-commits] CVS: llvm/tools/analyze/Makefile Message-ID: <200607272319.k6RNJG1M021154@zion.cs.uiuc.edu> Changes in directory llvm/tools/analyze: Makefile updated: 1.33 -> 1.34 --- Log message: Undo last commit, which was committed accidentally. --- Diffs of the changes: (+0 -2) Makefile | 2 -- 1 files changed, 2 deletions(-) Index: llvm/tools/analyze/Makefile diff -u llvm/tools/analyze/Makefile:1.33 llvm/tools/analyze/Makefile:1.34 --- llvm/tools/analyze/Makefile:1.33 Thu Jul 27 18:00:30 2006 +++ llvm/tools/analyze/Makefile Thu Jul 27 18:19:00 2006 @@ -8,8 +8,6 @@ ##===----------------------------------------------------------------------===## LEVEL = ../.. TOOLNAME = analyze -#TOOLLINKOPTS = $(LINKALL) -#TOOLLINKOPTSB = $(NOLINKALL) USEDLIBS = LLVMAsmParser.a LLVMBCReader.a LLVMAnalysis.a LLVMipa.a \ LLVMDataStructure \ LLVMScalarOpts.a LLVMTransforms.a LLVMTarget.a LLVMScalarOpts.a \ From evan.cheng at apple.com Thu Jul 27 18:35:56 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 27 Jul 2006 18:35:56 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Message-ID: <200607272335.k6RNZudV024562@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ISelDAGToDAG.cpp updated: 1.79 -> 1.80 --- Log message: Brain cramp.. --- Diffs of the changes: (+1 -3) X86ISelDAGToDAG.cpp | 4 +--- 1 files changed, 1 insertion(+), 3 deletions(-) Index: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp diff -u llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.79 llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.80 --- llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.79 Thu Jul 27 17:35:40 2006 +++ llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Thu Jul 27 18:35:40 2006 @@ -281,9 +281,7 @@ void X86DAGToDAGISel::DeterminReachibility(SDNode *f, SDNode *t) { if (!ReachibilityMatrix) { DetermineTopologicalOrdering(); - unsigned RMSize = DAGSize * DAGSize / 8; - if ((DAGSize * DAGSize) % 8) - RMSize++; + unsigned RMSize = (DAGSize * DAGSize + 7) / 8; ReachibilityMatrix = new unsigned char[RMSize]; memset(ReachibilityMatrix, 0, RMSize); } From evan.cheng at apple.com Thu Jul 27 19:11:21 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 27 Jul 2006 19:11:21 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Message-ID: <200607280011.k6S0BLeY001877@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ISelDAGToDAG.cpp updated: 1.80 -> 1.81 --- Log message: Another duh. Determine topological order before any target node is added. --- Diffs of the changes: (+13 -13) X86ISelDAGToDAG.cpp | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-) Index: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp diff -u llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.80 llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.81 --- llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.80 Thu Jul 27 18:35:40 2006 +++ llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Thu Jul 27 19:10:59 2006 @@ -99,7 +99,8 @@ : SelectionDAGISel(X86Lowering), X86Lowering(*TM.getTargetLowering()), Subtarget(&TM.getSubtarget()), - DAGSize(0), ReachibilityMatrix(NULL) {} + DAGSize(0), TopOrder(NULL), IdToOrder(NULL), + RMRange(NULL), ReachibilityMatrix(NULL) {} virtual bool runOnFunction(Function &Fn) { // Make sure we re-emit a set of the global base reg if necessary @@ -242,7 +243,6 @@ /// DetermineTopologicalOrdering - Determine topological ordering of the nodes /// in the DAG. void X86DAGToDAGISel::DetermineTopologicalOrdering() { - DAGSize = CurDAG->AssignNodeIds(); TopOrder = new SDNode*[DAGSize]; IdToOrder = new unsigned[DAGSize]; memset(IdToOrder, 0, DAGSize * sizeof(unsigned)); @@ -280,7 +280,6 @@ void X86DAGToDAGISel::DeterminReachibility(SDNode *f, SDNode *t) { if (!ReachibilityMatrix) { - DetermineTopologicalOrdering(); unsigned RMSize = (DAGSize * DAGSize + 7) / 8; ReachibilityMatrix = new unsigned char[RMSize]; memset(ReachibilityMatrix, 0, RMSize); @@ -323,25 +322,26 @@ DEBUG(BB->dump()); MachineFunction::iterator FirstMBB = BB; + DAGSize = DAG.AssignNodeIds(); + DetermineTopologicalOrdering(); + // Codegen the basic block. #ifndef NDEBUG DEBUG(std::cerr << "===== Instruction selection begins:\n"); Indent = 0; #endif DAG.setRoot(SelectRoot(DAG.getRoot())); - assert(InFlightSet.empty() && "ISel InFlightSet has not been emptied!"); #ifndef NDEBUG DEBUG(std::cerr << "===== Instruction selection ends:\n"); #endif - if (ReachibilityMatrix) { - delete[] ReachibilityMatrix; - delete[] TopOrder; - delete[] IdToOrder; - delete[] RMRange; - ReachibilityMatrix = NULL; - TopOrder = NULL; - IdToOrder = RMRange = NULL; - } + + delete[] ReachibilityMatrix; + delete[] TopOrder; + delete[] IdToOrder; + delete[] RMRange; + ReachibilityMatrix = NULL; + TopOrder = NULL; + IdToOrder = RMRange = NULL; CodeGenMap.clear(); HandleMap.clear(); ReplaceMap.clear(); From lattner at cs.uiuc.edu Thu Jul 27 19:17:35 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 27 Jul 2006 19:17:35 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/AsmPrinter.cpp Message-ID: <200607280017.k6S0HZ45003330@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: AsmPrinter.cpp updated: 1.86 -> 1.87 --- Log message: Print empty inline asms as a blank line instead of: # InlineAsm Start # InlineAsm End --- Diffs of the changes: (+8 -1) AsmPrinter.cpp | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletion(-) Index: llvm/lib/CodeGen/AsmPrinter.cpp diff -u llvm/lib/CodeGen/AsmPrinter.cpp:1.86 llvm/lib/CodeGen/AsmPrinter.cpp:1.87 --- llvm/lib/CodeGen/AsmPrinter.cpp:1.86 Thu Jul 27 11:46:58 2006 +++ llvm/lib/CodeGen/AsmPrinter.cpp Thu Jul 27 19:17:20 2006 @@ -615,7 +615,6 @@ /// printInlineAsm - This method formats and prints the specified machine /// instruction that is an inline asm. void AsmPrinter::printInlineAsm(const MachineInstr *MI) const { - O << InlineAsmStart << "\n\t"; unsigned NumOperands = MI->getNumOperands(); // Count the number of register definitions. @@ -628,6 +627,14 @@ // Disassemble the AsmStr, printing out the literal pieces, the operands, etc. const char *AsmStr = MI->getOperand(NumDefs).getSymbolName(); + // If this asmstr is empty, don't bother printing the #APP/#NOAPP markers. + if (AsmStr[0] == 0) { + O << "\n"; // Tab already printed, avoid double indenting next instr. + return; + } + + O << InlineAsmStart << "\n\t"; + // The variant of the current asmprinter: FIXME: change. int AsmPrinterVariant = 0; From evan.cheng at apple.com Thu Jul 27 19:44:10 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 27 Jul 2006 19:44:10 -0500 Subject: [llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp Message-ID: <200607280044.k6S0iA7C007287@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: DAGISelEmitter.cpp updated: 1.228 -> 1.229 --- Log message: Remove InFlightSet hack. No longer needed. --- Diffs of the changes: (+0 -46) DAGISelEmitter.cpp | 46 ---------------------------------------------- 1 files changed, 46 deletions(-) Index: llvm/utils/TableGen/DAGISelEmitter.cpp diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.228 llvm/utils/TableGen/DAGISelEmitter.cpp:1.229 --- llvm/utils/TableGen/DAGISelEmitter.cpp:1.228 Thu Jul 27 14:59:34 2006 +++ llvm/utils/TableGen/DAGISelEmitter.cpp Thu Jul 27 19:43:52 2006 @@ -2106,8 +2106,6 @@ // Names of all the folded nodes which produce chains. std::vector > FoldedChains; std::set Duplicates; - /// These nodes are being marked "in-flight" so they cannot be folded. - std::vector InflightNodes; /// GeneratedCode - This is the buffer that we emit code to. The first bool /// indicates whether this is an exit predicate (something that should be @@ -2231,8 +2229,6 @@ OpNo = 1; if (!isRoot) { const SDNodeInfo &CInfo = ISE.getSDNodeInfo(N->getOperator()); - // Not in flight? - emitCheck("InFlightSet.count(" + RootName + ".Val) == 0"); // Multiple uses of actual result? emitCheck(RootName + ".hasOneUse()"); EmittedUseCheck = true; @@ -2477,24 +2473,9 @@ for (unsigned i = 0; i < NumRes; i++) Code += ", CPTmp" + utostr(i + ResNo); emitCode(Code + ");"); - if (InflightNodes.size()) { - // Remove the in-flight nodes if the ComplexPattern does not match! - emitCode("if (!Match) {"); - for (std::vector::iterator AI = InflightNodes.begin(), - AE = InflightNodes.end(); AI != AE; ++AI) - emitCode(" SelectionDAG::RemoveInFlightSetEntry(InFlightSet, " + - *AI + ".Val);"); - emitCode("}"); - } - emitCheck("Match"); for (unsigned i = 0; i < NumRes; ++i) { - emitCode("SelectionDAG::InsertInFlightSetEntry(InFlightSet, CPTmp" + - utostr(i+ResNo) + ".Val);"); - InflightNodes.push_back("CPTmp" + utostr(i+ResNo)); - } - for (unsigned i = 0; i < NumRes; ++i) { emitDecl("Tmp" + utostr(i+ResNo)); emitCode("Select(Tmp" + utostr(i+ResNo) + ", CPTmp" + utostr(i+ResNo) + ");"); @@ -2608,22 +2589,6 @@ } } - // Make sure these operands which would be selected won't be folded while - // the isel traverses the DAG upward. - for (unsigned i = 0, e = EmitOrder.size(); i != e; ++i) { - TreePatternNode *Child = EmitOrder[i].second; - if (!Child->getName().empty()) { - std::string &Val = VariableMap[Child->getName()]; - assert(!Val.empty() && - "Variable referenced but not defined and not caught earlier!"); - if (Child->isLeaf() && !NodeGetComplexPattern(Child, ISE)) { - emitCode("SelectionDAG::InsertInFlightSetEntry(InFlightSet, " + - Val + ".Val);"); - InflightNodes.push_back(Val); - } - } - } - // Emit all of the operands. std::vector > NumTemps(EmitOrder.size()); for (unsigned i = 0, e = EmitOrder.size(); i != e; ++i) { @@ -2651,14 +2616,6 @@ emitCode(" Select(InFlag, N.getOperand(N.getNumOperands()-1));"); } - if (isRoot) { - // The operands have been selected. Remove them from InFlightSet. - for (std::vector::iterator AI = InflightNodes.begin(), - AE = InflightNodes.end(); AI != AE; ++AI) - emitCode("SelectionDAG::RemoveInFlightSetEntry(InFlightSet, " + - *AI + ".Val);"); - } - unsigned NumResults = Inst.getNumResults(); unsigned ResNo = TmpNo++; if (!isRoot || InputHasChain || NodeHasChain || NodeHasOutFlag || @@ -3639,9 +3596,6 @@ OS << "// Instance var to keep track of mapping of place handle nodes\n" << "// and their replacement nodes.\n"; OS << "std::map ReplaceMap;\n"; - OS << "// Keep track of nodes that are currently being selecte and therefore\n" - << "// should not be folded.\n"; - OS << "std::set InFlightSet;\n"; OS << "\n"; OS << "// AddHandleReplacement - Note the pending replacement node for a\n" From evan.cheng at apple.com Thu Jul 27 19:44:43 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 27 Jul 2006 19:44:43 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAG.h Message-ID: <200607280044.k6S0ihVi007310@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: SelectionDAG.h updated: 1.104 -> 1.105 --- Log message: Remove InFlightSet hack. No longer needed. --- Diffs of the changes: (+0 -10) SelectionDAG.h | 10 ---------- 1 files changed, 10 deletions(-) Index: llvm/include/llvm/CodeGen/SelectionDAG.h diff -u llvm/include/llvm/CodeGen/SelectionDAG.h:1.104 llvm/include/llvm/CodeGen/SelectionDAG.h:1.105 --- llvm/include/llvm/CodeGen/SelectionDAG.h:1.104 Thu Jul 27 02:36:47 2006 +++ llvm/include/llvm/CodeGen/SelectionDAG.h Thu Jul 27 19:44:29 2006 @@ -435,16 +435,6 @@ SDNode *Key, unsigned KeyResNo, SDNode *Element, unsigned ElementResNo); - /// InsertInFlightSetEntry - A helper function to insert a SDNode* to a - /// SDNode* set. This is added to avoid the set insertion operator from being - /// inlined. - static void InsertInFlightSetEntry(std::set &Set, SDNode *N); - - /// RemoveInFlightSetEntry - A helper function to remove a SDNode* from a - /// SDNode* set. This is added to avoid the set removal operator from being - /// inlined. - static void RemoveInFlightSetEntry(std::set &Set, SDNode *N); - private: void RemoveNodeFromCSEMaps(SDNode *N); SDNode *AddNonLeafNodeToCSEMaps(SDNode *N); From evan.cheng at apple.com Thu Jul 27 19:46:07 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 27 Jul 2006 19:46:07 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Message-ID: <200607280046.k6S0k7cC007344@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAG.cpp updated: 1.313 -> 1.314 --- Log message: Remove InFlightSet hack. No longer needed. --- Diffs of the changes: (+0 -14) SelectionDAG.cpp | 14 -------------- 1 files changed, 14 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.313 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.314 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.313 Thu Jul 27 02:36:47 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Thu Jul 27 19:45:53 2006 @@ -3115,17 +3115,3 @@ Map.insert(std::make_pair(SDOperand(Key, KeyResNo), SDOperand(Element, ElementResNo))); } - -/// InsertInFlightSetEntry - A helper function to insert a SDNode* to a -/// SDNode* set. This is added to avoid the set insertion operator from being -/// inlined. -void SelectionDAG::InsertInFlightSetEntry(std::set &Set, SDNode *N) { - Set.insert(N); -} - -/// RemoveInFlightSetEntry - A helper function to remove a SDNode* from a -/// SDNode* set. This is added to avoid the set removal operator from being -/// inlined. -void SelectionDAG::RemoveInFlightSetEntry(std::set &Set, SDNode *N) { - Set.erase(N); -} From evan.cheng at apple.com Thu Jul 27 19:46:29 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 27 Jul 2006 19:46:29 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Message-ID: <200607280046.k6S0kTb3007361@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMISelDAGToDAG.cpp updated: 1.17 -> 1.18 --- Log message: Remove InFlightSet hack. No longer needed. --- Diffs of the changes: (+0 -1) ARMISelDAGToDAG.cpp | 1 - 1 files changed, 1 deletion(-) Index: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp diff -u llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.17 llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.18 --- llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.17 Tue Jul 25 15:17:19 2006 +++ llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Thu Jul 27 19:46:15 2006 @@ -282,7 +282,6 @@ DEBUG(BB->dump()); DAG.setRoot(SelectRoot(DAG.getRoot())); - assert(InFlightSet.empty() && "ISel InFlightSet has not been emptied!"); CodeGenMap.clear(); HandleMap.clear(); ReplaceMap.clear(); From evan.cheng at apple.com Thu Jul 27 19:46:43 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 27 Jul 2006 19:46:43 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp Message-ID: <200607280046.k6S0khhq007377@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/Alpha: AlphaISelDAGToDAG.cpp updated: 1.47 -> 1.48 --- Log message: Remove InFlightSet hack. No longer needed. --- Diffs of the changes: (+0 -1) AlphaISelDAGToDAG.cpp | 1 - 1 files changed, 1 deletion(-) Index: llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp diff -u llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp:1.47 llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp:1.48 --- llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp:1.47 Tue Jul 11 12:58:07 2006 +++ llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp Thu Jul 27 19:46:29 2006 @@ -172,7 +172,6 @@ // Select target instructions for the DAG. DAG.setRoot(SelectRoot(DAG.getRoot())); - assert(InFlightSet.empty() && "ISel InFlightSet has not been emptied!"); CodeGenMap.clear(); HandleMap.clear(); ReplaceMap.clear(); From evan.cheng at apple.com Thu Jul 27 19:46:58 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 27 Jul 2006 19:46:58 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp Message-ID: <200607280046.k6S0kw8u007393@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/IA64: IA64ISelDAGToDAG.cpp updated: 1.45 -> 1.46 --- Log message: Remove InFlightSet hack. No longer needed. --- Diffs of the changes: (+0 -1) IA64ISelDAGToDAG.cpp | 1 - 1 files changed, 1 deletion(-) Index: llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp diff -u llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.45 llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.46 --- llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.45 Thu Jul 27 01:39:46 2006 +++ llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp Thu Jul 27 19:46:44 2006 @@ -142,7 +142,6 @@ // Select target instructions for the DAG. DAG.setRoot(SelectRoot(DAG.getRoot())); - assert(InFlightSet.empty() && "ISel InFlightSet has not been emptied!"); CodeGenMap.clear(); HandleMap.clear(); ReplaceMap.clear(); From evan.cheng at apple.com Thu Jul 27 19:47:18 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 27 Jul 2006 19:47:18 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp Message-ID: <200607280047.k6S0lI1c007410@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCISelDAGToDAG.cpp updated: 1.198 -> 1.199 --- Log message: Remove InFlightSet hack. No longer needed. --- Diffs of the changes: (+0 -1) PPCISelDAGToDAG.cpp | 1 - 1 files changed, 1 deletion(-) Index: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp diff -u llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1.198 llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1.199 --- llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1.198 Thu Jul 27 01:40:15 2006 +++ llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp Thu Jul 27 19:47:04 2006 @@ -215,7 +215,6 @@ // Select target instructions for the DAG. DAG.setRoot(SelectRoot(DAG.getRoot())); - assert(InFlightSet.empty() && "ISel InFlightSet has not been emptied!"); CodeGenMap.clear(); HandleMap.clear(); ReplaceMap.clear(); From evan.cheng at apple.com Thu Jul 27 19:47:33 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 27 Jul 2006 19:47:33 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp Message-ID: <200607280047.k6S0lXXb007426@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/Sparc: SparcISelDAGToDAG.cpp updated: 1.99 -> 1.100 --- Log message: Remove InFlightSet hack. No longer needed. --- Diffs of the changes: (+0 -1) SparcISelDAGToDAG.cpp | 1 - 1 files changed, 1 deletion(-) Index: llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp diff -u llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp:1.99 llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp:1.100 --- llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp:1.99 Thu Jun 15 03:18:06 2006 +++ llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp Thu Jul 27 19:47:19 2006 @@ -1001,7 +1001,6 @@ // Select target instructions for the DAG. DAG.setRoot(SelectRoot(DAG.getRoot())); - assert(InFlightSet.empty() && "ISel InFlightSet has not been emptied!"); CodeGenMap.clear(); HandleMap.clear(); ReplaceMap.clear(); From evan.cheng at apple.com Thu Jul 27 19:49:45 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 27 Jul 2006 19:49:45 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Message-ID: <200607280049.k6S0njNK007470@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ISelDAGToDAG.cpp updated: 1.81 -> 1.82 --- Log message: Node selected into address mode cannot be folded. --- Diffs of the changes: (+39 -0) X86ISelDAGToDAG.cpp | 39 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 39 insertions(+) Index: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp diff -u llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.81 llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.82 --- llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.81 Thu Jul 27 19:10:59 2006 +++ llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Thu Jul 27 19:49:31 2006 @@ -211,6 +211,21 @@ return ReachibilityMatrix[Idx / 8] & (1 << (Idx % 8)); } + /// UnfoldableSet - An boolean array representing nodes which have been + /// folded into addressing modes and therefore should not be folded in + /// another operation. + unsigned char *UnfoldableSet; + + inline void setUnfoldable(SDNode *N) { + unsigned Id = N->getNodeId(); + UnfoldableSet[Id / 8] |= 1 << (Id % 8); + } + + inline bool isUnfoldable(SDNode *N) { + unsigned Id = N->getNodeId(); + return UnfoldableSet[Id / 8] & (1 << (Id % 8)); + } + #ifndef NDEBUG unsigned Indent; #endif @@ -218,6 +233,10 @@ } bool X86DAGToDAGISel::IsFoldableBy(SDNode *N, SDNode *U) { + // Is it already folded by SelectAddr / SelectLEAAddr? + if (isUnfoldable(N)) + return false; + // If U use can somehow reach N through another path then U can't fold N or // it will create a cycle. e.g. In the following diagram, U can reach N // through X. If N is foled into into U, then X is both a predecessor and @@ -323,6 +342,10 @@ MachineFunction::iterator FirstMBB = BB; DAGSize = DAG.AssignNodeIds(); + unsigned NumBytes = (DAGSize+7) / 8; + UnfoldableSet = new unsigned char[NumBytes]; + memset(UnfoldableSet, 0, NumBytes); + DetermineTopologicalOrdering(); // Codegen the basic block. @@ -339,9 +362,11 @@ delete[] TopOrder; delete[] IdToOrder; delete[] RMRange; + delete[] UnfoldableSet; ReachibilityMatrix = NULL; TopOrder = NULL; IdToOrder = RMRange = NULL; + UnfoldableSet = NULL; CodeGenMap.clear(); HandleMap.clear(); ReplaceMap.clear(); @@ -615,6 +640,13 @@ getAddressOperands(AM, Base, Scale, Index, Disp); + int Id = Base.Val ? Base.Val->getNodeId() : -1; + if (Id != -1) + setUnfoldable(Base.Val); + Id = Index.Val ? Index.Val->getNodeId() : -1; + if (Id != -1) + setUnfoldable(Index.Val); + return true; } @@ -663,6 +695,13 @@ return true; } + int Id = Base.Val ? Base.Val->getNodeId() : -1; + if (Id != -1) + setUnfoldable(Base.Val); + Id = Index.Val ? Index.Val->getNodeId() : -1; + if (Id != -1) + setUnfoldable(Index.Val); + return false; } From pjenkins at apple.com Thu Jul 27 19:55:02 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Thu, 27 Jul 2006 19:55:02 -0500 Subject: [llvm-commits] CVS: nightlytest-serverside/NightlyTestAccept.cgi Message-ID: <200607280055.k6S0t2qR007649@zion.cs.uiuc.edu> Changes in directory nightlytest-serverside: NightlyTestAccept.cgi updated: 1.35 -> 1.36 --- Log message: Modified the search through the dejagnu logs for the number of unexpected failures --- Diffs of the changes: (+13 -8) NightlyTestAccept.cgi | 21 +++++++++++++-------- 1 files changed, 13 insertions(+), 8 deletions(-) Index: nightlytest-serverside/NightlyTestAccept.cgi diff -u nightlytest-serverside/NightlyTestAccept.cgi:1.35 nightlytest-serverside/NightlyTestAccept.cgi:1.36 --- nightlytest-serverside/NightlyTestAccept.cgi:1.35 Thu Jul 27 16:12:36 2006 +++ nightlytest-serverside/NightlyTestAccept.cgi Thu Jul 27 19:54:48 2006 @@ -511,7 +511,7 @@ $dejagnutests_log =~ m/\# of expected passes\s*([0-9]+)/; $dejagnu_exp_passes=$1; -$dejagnutests_log =~ m/\# of unexpected failures\s*([0-9]+)/; +$dejagnutests_log =~ m/unexpected failures\s*([0-9]+)/; $dejagnu_unexp_failures=$1; $dejagnutests_log =~ m/\# of expected failures\s*([0-9]+)/; $dejagnu_exp_failures=$1; @@ -638,17 +638,22 @@ AddProgram $x, $external_processed{$x}, "external", $night_id; } -foreach $x (@O_FILE_SIZE){ - $x =~ m/(.+)\s+(.+)\s+(.+)/; - AddFile $2, $1, $night_id, $3; +$len=@AOFILE_SIZE; +if($len>1){ + foreach $x (@O_FILE_SIZE){ + $x =~ m/(.+)\s+(.+)\s+(.+)/; + AddFile $2, $1, $night_id, $3; + } } -foreach $x (@A_FILE_SIZE){ - $x =~ m/(.+)\s+(.+)\s+(.+)/; - AddFile $2, $1, $night_id, $3; +$len=@A_FILE_SIZE; +if($len>1){ + foreach $x (@A_FILE_SIZE){ + $x =~ m/(.+)\s+(.+)\s+(.+)/; + AddFile $2, $1, $night_id, $3; + } } - ################################################################################ # # Adding lines of code From evan.cheng at apple.com Thu Jul 27 20:04:04 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 27 Jul 2006 20:04:04 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGISel.h Message-ID: <200607280104.k6S144j4007834@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: SelectionDAGISel.h updated: 1.19 -> 1.20 --- Log message: Rename IsFoldableBy to CanBeFoldedleBy --- Diffs of the changes: (+2 -2) SelectionDAGISel.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/include/llvm/CodeGen/SelectionDAGISel.h diff -u llvm/include/llvm/CodeGen/SelectionDAGISel.h:1.19 llvm/include/llvm/CodeGen/SelectionDAGISel.h:1.20 --- llvm/include/llvm/CodeGen/SelectionDAGISel.h:1.19 Thu Jul 27 01:36:49 2006 +++ llvm/include/llvm/CodeGen/SelectionDAGISel.h Thu Jul 27 20:03:48 2006 @@ -63,9 +63,9 @@ return true; } - /// IsFoldableBy - Returns true if the specific operand node N of U can be + /// CanBeFoldedBy - Returns true if the specific operand node N of U can be /// folded during instruction selection? - virtual bool IsFoldableBy(SDNode *N, SDNode *U) { return true; } + virtual bool CanBeFoldedBy(SDNode *N, SDNode *U) { return true; } /// CreateTargetHazardRecognizer - Return a newly allocated hazard recognizer /// to use for this target when scheduling the DAG. From evan.cheng at apple.com Thu Jul 27 20:04:05 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 27 Jul 2006 20:04:05 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Message-ID: <200607280104.k6S1451I007839@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ISelDAGToDAG.cpp updated: 1.82 -> 1.83 --- Log message: Rename IsFoldableBy to CanBeFoldedleBy --- Diffs of the changes: (+3 -3) X86ISelDAGToDAG.cpp | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp diff -u llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.82 llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.83 --- llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.82 Thu Jul 27 19:49:31 2006 +++ llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Thu Jul 27 20:03:48 2006 @@ -118,7 +118,7 @@ virtual void EmitFunctionEntryCode(Function &Fn, MachineFunction &MF); - virtual bool IsFoldableBy(SDNode *N, SDNode *U); + virtual bool CanBeFoldedBy(SDNode *N, SDNode *U); // Include the pieces autogenerated from the target description. #include "X86GenDAGISel.inc" @@ -232,7 +232,7 @@ }; } -bool X86DAGToDAGISel::IsFoldableBy(SDNode *N, SDNode *U) { +bool X86DAGToDAGISel::CanBeFoldedBy(SDNode *N, SDNode *U) { // Is it already folded by SelectAddr / SelectLEAAddr? if (isUnfoldable(N)) return false; @@ -711,7 +711,7 @@ if (N.getOpcode() == ISD::LOAD && N.hasOneUse() && !CodeGenMap.count(N.getValue(0)) && - !IsFoldableBy(N.Val, P.Val)) + !CanBeFoldedBy(N.Val, P.Val)) return SelectAddr(N.getOperand(1), Base, Scale, Index, Disp); return false; } From evan.cheng at apple.com Thu Jul 27 20:04:05 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 27 Jul 2006 20:04:05 -0500 Subject: [llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp Message-ID: <200607280104.k6S145XO007844@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: DAGISelEmitter.cpp updated: 1.229 -> 1.230 --- Log message: Rename IsFoldableBy to CanBeFoldedleBy --- Diffs of the changes: (+1 -1) DAGISelEmitter.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/utils/TableGen/DAGISelEmitter.cpp diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.229 llvm/utils/TableGen/DAGISelEmitter.cpp:1.230 --- llvm/utils/TableGen/DAGISelEmitter.cpp:1.229 Thu Jul 27 19:43:52 2006 +++ llvm/utils/TableGen/DAGISelEmitter.cpp Thu Jul 27 20:03:48 2006 @@ -2276,7 +2276,7 @@ PInfo.hasProperty(SDNodeInfo::SDNPHasChain) || PInfo.hasProperty(SDNodeInfo::SDNPInFlag) || PInfo.hasProperty(SDNodeInfo::SDNPOptInFlag)) - emitCheck("IsFoldableBy(" + RootName + ".Val, " + ParentName + + emitCheck("CanBeFoldedBy(" + RootName + ".Val, " + ParentName + ".Val)"); } } From pjenkins at apple.com Thu Jul 27 20:06:32 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Thu, 27 Jul 2006 20:06:32 -0500 Subject: [llvm-commits] CVS: llvm/utils/NewNightlyTest.pl Message-ID: <200607280106.k6S16WeA007891@zion.cs.uiuc.edu> Changes in directory llvm/utils: NewNightlyTest.pl updated: 1.34 -> 1.35 --- Log message: Removed some unneccesary printing from the nightly tester. --- Diffs of the changes: (+0 -6) NewNightlyTest.pl | 6 ------ 1 files changed, 6 deletions(-) Index: llvm/utils/NewNightlyTest.pl diff -u llvm/utils/NewNightlyTest.pl:1.34 llvm/utils/NewNightlyTest.pl:1.35 --- llvm/utils/NewNightlyTest.pl:1.34 Thu Jul 27 16:01:39 2006 +++ llvm/utils/NewNightlyTest.pl Thu Jul 27 20:06:18 2006 @@ -824,13 +824,7 @@ print "SingleSource TEST STAGE\n"; } ($SingleSourceProgramsTable, $llcbeta_options) = TestDirectory("SingleSource"); - if ( $VERBOSE ) { - print "SingleSource returned $SingleSourceProgramsTable\n"; - } WriteFile "$Prefix-singlesourceprogramstable.txt", $SingleSourceProgramsTable; - if ( $VERBOSE ) { - print "MultiSource TEST STAGE\n"; - } ($MultiSourceProgramsTable, $llcbeta_options) = TestDirectory("MultiSource"); WriteFile "$Prefix-multisourceprogramstable.txt", $MultiSourceProgramsTable; if ( $VERBOSE ) { From evan.cheng at apple.com Thu Jul 27 20:19:38 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 27 Jul 2006 20:19:38 -0500 Subject: [llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp Message-ID: <200607280119.k6S1JcKk008083@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: DAGISelEmitter.cpp updated: 1.230 -> 1.231 --- Log message: Clean up. --- Diffs of the changes: (+2 -3) DAGISelEmitter.cpp | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) Index: llvm/utils/TableGen/DAGISelEmitter.cpp diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.230 llvm/utils/TableGen/DAGISelEmitter.cpp:1.231 --- llvm/utils/TableGen/DAGISelEmitter.cpp:1.230 Thu Jul 27 20:03:48 2006 +++ llvm/utils/TableGen/DAGISelEmitter.cpp Thu Jul 27 20:19:22 2006 @@ -2469,11 +2469,10 @@ for (unsigned i = 0; i < NumRes; ++i) emitDecl("CPTmp" + utostr(i+ResNo)); - std::string Code = "bool Match = " + Fn + "(" + Val; + std::string Code = Fn + "(" + Val; for (unsigned i = 0; i < NumRes; i++) Code += ", CPTmp" + utostr(i + ResNo); - emitCode(Code + ");"); - emitCheck("Match"); + emitCheck(Code + ")"); for (unsigned i = 0; i < NumRes; ++i) { emitDecl("Tmp" + utostr(i+ResNo)); From pjenkins at apple.com Thu Jul 27 20:19:42 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Thu, 27 Jul 2006 20:19:42 -0500 Subject: [llvm-commits] CVS: llvm/tools/bugpoint/ExtractFunction.cpp Message-ID: <200607280119.k6S1JgFb008089@zion.cs.uiuc.edu> Changes in directory llvm/tools/bugpoint: ExtractFunction.cpp updated: 1.48 -> 1.49 --- Log message: This commit improves bugpoints speed. On my G4 this changed caused kimwitu++ to run through bugpoint in 1091.15 seconds (user + system time). The time it took to run this on my G4 before I made these changes is 1420.82 seconds (user + system time). This is a speedup of about 5.5 minutes. This is faster because SplitFunctionsOutOfModule no longer calls Clone Module and then removes the functions it doesnt want from the module returned. Instead it creates a module and copies over the specified functions, making changes to the new and old module where neccessary. This reduces the memory demand. --- Diffs of the changes: (+133 -16) ExtractFunction.cpp | 149 ++++++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 133 insertions(+), 16 deletions(-) Index: llvm/tools/bugpoint/ExtractFunction.cpp diff -u llvm/tools/bugpoint/ExtractFunction.cpp:1.48 llvm/tools/bugpoint/ExtractFunction.cpp:1.49 --- llvm/tools/bugpoint/ExtractFunction.cpp:1.48 Fri Jun 16 13:23:48 2006 +++ llvm/tools/bugpoint/ExtractFunction.cpp Thu Jul 27 20:19:28 2006 @@ -18,6 +18,7 @@ #include "llvm/Module.h" #include "llvm/PassManager.h" #include "llvm/Pass.h" +#include "llvm/SymbolTable.h" #include "llvm/Analysis/Verifier.h" #include "llvm/Transforms/IPO.h" #include "llvm/Transforms/Scalar.h" @@ -247,6 +248,67 @@ } } +//// RewriteUsesInNewModule - takes a Module and a reference to a globalvalue +//// (OrigVal) in that module and changes the reference to a different +//// globalvalue (NewVal) in a seperate module. +static void RewriteUsesInNewModule(Constant *OrigVal, Constant *NewVal, + Module *TargetMod) { + assert(OrigVal->getType() == NewVal->getType() && + "Can't replace something with a different type"); + for (Value::use_iterator UI = OrigVal->use_begin(), E = OrigVal->use_end(); + UI != E; ) { + Value::use_iterator TmpUI = UI++; + User *U = *TmpUI; + if (Instruction *Inst = dyn_cast(U)) { + Module *InstM = Inst->getParent()->getParent()->getParent(); + if (InstM != TargetMod) { + TmpUI.getUse() = NewVal; + } + } else if (GlobalVariable *GV = dyn_cast(U)) { + if (GV->getParent() != TargetMod) { + TmpUI.getUse() = NewVal; + } + } else if (ConstantExpr *CE = dyn_cast(U)) { + // If nothing uses this, don't bother making a copy. + if (CE->use_empty()) continue; + Constant *NewCE = CE->getWithOperandReplaced(TmpUI.getOperandNo(), + NewVal); + RewriteUsesInNewModule(CE, NewCE, TargetMod); + } else if (ConstantStruct *CS = dyn_cast(U)) { + // If nothing uses this, don't bother making a copy. + if (CS->use_empty()) continue; + unsigned OpNo = TmpUI.getOperandNo(); + std::vector Ops; + for (unsigned i = 0, e = CS->getNumOperands(); i != e; ++i) + Ops.push_back(i == OpNo ? NewVal : CS->getOperand(i)); + Constant *NewStruct = ConstantStruct::get(Ops); + RewriteUsesInNewModule(CS, NewStruct, TargetMod); + } else if (ConstantPacked *CP = dyn_cast(U)) { + // If nothing uses this, don't bother making a copy. + if (CP->use_empty()) continue; + unsigned OpNo = TmpUI.getOperandNo(); + std::vector Ops; + for (unsigned i = 0, e = CP->getNumOperands(); i != e; ++i) + Ops.push_back(i == OpNo ? NewVal : CP->getOperand(i)); + Constant *NewPacked = ConstantPacked::get(Ops); + RewriteUsesInNewModule(CP, NewPacked, TargetMod); + } else if (ConstantArray *CA = dyn_cast(U)) { + // If nothing uses this, don't bother making a copy. + if (CA->use_empty()) continue; + unsigned OpNo = TmpUI.getOperandNo(); + std::vector Ops; + for (unsigned i = 0, e = CA->getNumOperands(); i != e; ++i) { + Ops.push_back(i == OpNo ? NewVal : CA->getOperand(i)); + } + Constant *NewArray = ConstantArray::get(CA->getType(), Ops); + RewriteUsesInNewModule(CA, NewArray, TargetMod); + } else { + assert(0 && "Unexpected user"); + } + } +} + + /// SplitFunctionsOutOfModule - Given a module and a list of functions in the /// module, split the functions OUT of the specified module, and place them in /// the new module. @@ -265,28 +327,83 @@ I != E; ++I) I->setLinkage(GlobalValue::ExternalLinkage); - Module *New = CloneModule(M); + // First off, we need to create the new module... + Module *New = new Module(M->getModuleIdentifier()); + New->setEndianness(M->getEndianness()); + New->setPointerSize(M->getPointerSize()); + New->setTargetTriple(M->getTargetTriple()); + New->setModuleInlineAsm(M->getModuleInlineAsm()); + + // Copy all of the dependent libraries over. + for (Module::lib_iterator I = M->lib_begin(), E = M->lib_end(); I != E; ++I) + New->addLibrary(*I); - // Make sure global initializers exist only in the safe module (CBE->.so) - for (Module::global_iterator I = New->global_begin(), E = New->global_end(); - I != E; ++I) - I->setInitializer(0); // Delete the initializer to make it external - - // Remove the Test functions from the Safe module + // build a set of the functions to search later... std::set > TestFunctions; for (unsigned i = 0, e = F.size(); i != e; ++i) { - TestFunctions.insert(std::make_pair(F[i]->getName(), F[i]->getType())); - Function *TNOF = M->getFunction(F[i]->getName(), F[i]->getFunctionType()); - DEBUG(std::cerr << "Removing function " << F[i]->getName() << "\n"); - assert(TNOF && "Function doesn't exist in module!"); - DeleteFunctionBody(TNOF); // Function is now external in this module! + TestFunctions.insert(std::make_pair(F[i]->getName(), F[i]->getType())); + } + + std::map GlobalToPrototypeMap; + std::vector OrigGlobals; + + // Adding specified functions to new module... + for (Module::iterator I = M->begin(), E = M->end(); I != E;) { + OrigGlobals.push_back(I); + if(TestFunctions.count(std::make_pair(I->getName(), I->getType()))) { + Module::iterator tempI = I; + I++; + Function * func = new Function(tempI->getFunctionType(), + GlobalValue::ExternalLinkage); + M->getFunctionList().insert(tempI, func); + New->getFunctionList().splice(New->end(), + M->getFunctionList(), + tempI); + func->setName(tempI->getName()); + func->setCallingConv(tempI->getCallingConv()); + GlobalToPrototypeMap[tempI] = func; + // NEW TO OLD + } else { + Function * func = new Function(I->getFunctionType(), + GlobalValue::ExternalLinkage, + I->getName(), + New); + func->setCallingConv(I->getCallingConv()); + GlobalToPrototypeMap[I] = func; + // NEW TO OLD + I++; + } } - // Remove the Safe functions from the Test module - for (Module::iterator I = New->begin(), E = New->end(); I != E; ++I) - if (!TestFunctions.count(std::make_pair(I->getName(), I->getType()))) - DeleteFunctionBody(I); + //copy over global list + for (Module::global_iterator I = M->global_begin(), + E = M->global_end(); I != E; ++I) { + OrigGlobals.push_back(I); + GlobalVariable *glob = new GlobalVariable (I->getType()->getElementType(), + I->isConstant(), + GlobalValue::ExternalLinkage, + 0, + I->getName(), + New); + GlobalToPrototypeMap[I] = glob; + } + // Copy all of the type symbol table entries over. + const SymbolTable &SymTab = M->getSymbolTable(); + SymbolTable::type_const_iterator TypeI = SymTab.type_begin(); + SymbolTable::type_const_iterator TypeE = SymTab.type_end(); + for (; TypeI != TypeE; ++TypeI) + New->addTypeName(TypeI->first, TypeI->second); + + // Loop over globals, rewriting uses in the module the prototype is in to use + // the prototype. + for (unsigned i = 0, e = OrigGlobals.size(); i != e; ++i) { + assert(OrigGlobals[i]->getName() == + GlobalToPrototypeMap[OrigGlobals[i]]->getName()); + RewriteUsesInNewModule(OrigGlobals[i], GlobalToPrototypeMap[OrigGlobals[i]], + OrigGlobals[i]->getParent()); + } + // Make sure that there is a global ctor/dtor array in both halves of the // module if they both have static ctor/dtor functions. SplitStaticCtorDtor("llvm.global_ctors", M, New); From lattner at cs.uiuc.edu Fri Jul 28 00:04:03 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 28 Jul 2006 00:04:03 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/ADT/SmallVector.h Message-ID: <200607280504.k6S543Jt016545@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/ADT: SmallVector.h updated: 1.2 -> 1.3 --- Log message: The smallvector dtor should destroy the elements. Implement pop_back. Chage some code to use 'iterator' instead of T*. This unbreaks operators=. --- Diffs of the changes: (+12 -2) SmallVector.h | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) Index: llvm/include/llvm/ADT/SmallVector.h diff -u llvm/include/llvm/ADT/SmallVector.h:1.2 llvm/include/llvm/ADT/SmallVector.h:1.3 --- llvm/include/llvm/ADT/SmallVector.h:1.2 Wed Jul 26 22:38:08 2006 +++ llvm/include/llvm/ADT/SmallVector.h Fri Jul 28 00:03:42 2006 @@ -66,6 +66,10 @@ std::uninitialized_copy(RHS.begin(), RHS.end(), Begin); } ~SmallVector() { + // Destroy the constructed elements in the vector. + for (iterator I = Begin, E = End; I != E; ++I) + I->~T(); + // If this wasn't grown from the inline copy, deallocate the old space. if ((void*)Begin != (void*)InlineElts) delete[] (char*)Begin; @@ -115,6 +119,12 @@ goto Retry; } + void pop_back() { + assert(!empty() && "SmallVector is empty!"); + --End; + End->~T(); + } + /// append - Add the specified range to the end of the SmallVector. /// template @@ -154,7 +164,7 @@ // This allows us to avoid copying them during the grow. if (Capacity-Begin < RHSSize) { // Destroy current elements. - for (T *I = Begin, E = End; I != E; ++I) + for (iterator I = Begin, E = End; I != E; ++I) I->~T(); End = Begin; CurSize = 0; @@ -192,7 +202,7 @@ std::uninitialized_copy(Begin, End, NewElts); // Destroy the original elements. - for (T *I = Begin, *E = End; I != E; ++I) + for (iterator I = Begin, E = End; I != E; ++I) I->~T(); // If this wasn't grown from the inline copy, deallocate the old space. From reid at x10sys.com Fri Jul 28 00:05:17 2006 From: reid at x10sys.com (Reid Spencer) Date: Fri, 28 Jul 2006 00:05:17 -0500 Subject: [llvm-commits] CVS: llvm/autoconf/configure.ac Message-ID: <200607280505.k6S55HCO016582@zion.cs.uiuc.edu> Changes in directory llvm/autoconf: configure.ac updated: 1.240 -> 1.241 --- Log message: For PR848: http://llvm.org/PR848 : 1. Get the path to the pwd binary (/bin/pwd usually) from configure. 2. Use that path to run pwd in all path variables set in Makefile.config.in The hope is that these changes will resolve symlinks to physical paths. This should work on all platforms where the binary pwd defaults to printing physical paths. The shell version of pwd generally doesn't (it will print the symlink path). --- Diffs of the changes: (+1 -0) configure.ac | 1 + 1 files changed, 1 insertion(+) Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.240 llvm/autoconf/configure.ac:1.241 --- llvm/autoconf/configure.ac:1.240 Thu Jul 27 18:00:30 2006 +++ llvm/autoconf/configure.ac Fri Jul 28 00:05:00 2006 @@ -374,6 +374,7 @@ AC_PATH_PROG(RM, [rm], [rm]) AC_PATH_PROG(SED, [sed], [sed]) AC_PATH_PROG(TAR, [tar], [gtar]) +AC_PATH_PROG(BINPWD,[pwd], [pwd]) dnl Looking for misc. graph plotting software AC_PATH_PROG(GRAPHVIZ, [Graphviz], [echo Graphviz]) From reid at x10sys.com Fri Jul 28 00:05:17 2006 From: reid at x10sys.com (Reid Spencer) Date: Fri, 28 Jul 2006 00:05:17 -0500 Subject: [llvm-commits] CVS: llvm/Makefile.config.in configure Message-ID: <200607280505.k6S55HXc016584@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.config.in updated: 1.61 -> 1.62 configure updated: 1.242 -> 1.243 --- Log message: For PR848: http://llvm.org/PR848 : 1. Get the path to the pwd binary (/bin/pwd usually) from configure. 2. Use that path to run pwd in all path variables set in Makefile.config.in The hope is that these changes will resolve symlinks to physical paths. This should work on all platforms where the binary pwd defaults to printing physical paths. The shell version of pwd generally doesn't (it will print the symlink path). --- Diffs of the changes: (+79 -37) Makefile.config.in | 15 ++++--- configure | 101 +++++++++++++++++++++++++++++++++++++---------------- 2 files changed, 79 insertions(+), 37 deletions(-) Index: llvm/Makefile.config.in diff -u llvm/Makefile.config.in:1.61 llvm/Makefile.config.in:1.62 --- llvm/Makefile.config.in:1.61 Thu Jul 27 18:00:30 2006 +++ llvm/Makefile.config.in Fri Jul 28 00:05:00 2006 @@ -33,19 +33,20 @@ # ########################################################################### +PWD := @BINPWD@ # Set the project name to LLVM if its not defined ifndef PROJECT_NAME PROJECT_NAME := LLVM endif -PROJ_OBJ_DIR := $(shell pwd) -PROJ_OBJ_ROOT := $(subst //,/,$(shell cd $(PROJ_OBJ_DIR)/$(LEVEL); pwd)) +PROJ_OBJ_DIR := $(shell $(PWD)) +PROJ_OBJ_ROOT := $(shell cd $(PROJ_OBJ_DIR)/$(LEVEL); $(PWD)) ifeq ($(PROJECT_NAME),LLVM) -LLVM_SRC_ROOT := @abs_top_srcdir@ -LLVM_OBJ_ROOT := @abs_top_builddir@ -PROJ_SRC_ROOT := $(LLVM_SRC_ROOT) -PROJ_SRC_DIR := $(subst //,/,$(LLVM_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR))) +LLVM_SRC_ROOT := $(shell cd @abs_top_srcdir@; $(PWD)) +LLVM_OBJ_ROOT := $(shell cd @abs_top_builddir@; $(PWD)) +PROJ_SRC_ROOT := $(shell cd $(LLVM_SRC_ROOT); $(PWD)) +PROJ_SRC_DIR := $(shell cd $(LLVM_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR)); $(PWD)) PROJ_prefix := @prefix@ PROJ_bindir := @prefix@/bin PROJ_libdir := @prefix@/lib @@ -72,7 +73,7 @@ ifndef LLVM_OBJ_ROOT $(error Projects must define LLVM_OBJ_ROOT) endif -PROJ_SRC_DIR := $(subst //,/,$(PROJ_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR))) +PROJ_SRC_DIR := $(shell cd $(PROJ_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR)); $(PWD)) PROJ_prefix := $(PROJ_INSTALL_ROOT) PROJ_bindir := $(PROJ_INSTALL_ROOT)/bin PROJ_libdir := $(PROJ_INSTALL_ROOT)/lib Index: llvm/configure diff -u llvm/configure:1.242 llvm/configure:1.243 --- llvm/configure:1.242 Thu Jul 27 18:00:30 2006 +++ llvm/configure Fri Jul 28 00:05:00 2006 @@ -477,7 +477,7 @@ # 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 LLVM_COPYRIGHT subdirs build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os OS LLVM_ON_UNIX LLVM_ON_WIN32 ARCH ENDIAN CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT LLVM_CROSS_COMPILING BUILD_CC BUILD_EXEEXT CVSBUILD ENABLE_OPTIMIZED DISABLE_ASSERTIONS DEBUG_RUNTIME JIT TARGET_HAS_JIT ENABLE_DOXYGEN ENABLE_THREADS TARGETS_TO_BUILD EXTRA_OPTIONS CPP CXX CXXFLAGS ac_ct_CXX LEX LEXLIB LEX_OUTPUT_ROOT FLEX YACC BISON NM ifGNUmake LN_S CMP CP DATE FIND GREP MKDIR MV RANLIB ac_ct_RANLIB RM SED TAR GRAPHVIZ DOT GV DOTTY PERL HAVE_PERL INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA BZ! IP2 DOXYGEN ETAGS GROFF GZIP POD2HTML POD2MAN RUNTEST TCLSH ZIP EGREP INSTALL_LTDL_TRUE INSTALL_LTDL_FALSE CONVENIENCE_LTDL_TRUE CONVENIENCE_LTDL_FALSE LIBADD_DL ECHO AR ac_ct_AR STRIP ac_ct_STRIP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL ETAGSFLAGS LLVMGCC LLVMGXX ALLOCA MMAP_FILE LLVMCC1 LLVMCC1PLUS LLVMGCCDIR LLVMGCC_VERSION LLVMGCC_MAJVERS SHLIBEXT LLVM_PREFIX LLVM_BINDIR LLVM_LIBDIR LLVM_DATADIR LLVM_DOCSDIR LLVM_ETCDIR LLVM_INCLUDEDIR LLVM_INFODIR LLVM_MANDIR LLVM_CONFIGTIME 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 datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS LLVM_COPYRIGHT subdirs build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os OS LLVM_ON_UNIX LLVM_ON_WIN32 ARCH ENDIAN CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT LLVM_CROSS_COMPILING BUILD_CC BUILD_EXEEXT CVSBUILD ENABLE_OPTIMIZED DISABLE_ASSERTIONS DEBUG_RUNTIME JIT TARGET_HAS_JIT ENABLE_DOXYGEN ENABLE_THREADS TARGETS_TO_BUILD EXTRA_OPTIONS CPP CXX CXXFLAGS ac_ct_CXX LEX LEXLIB LEX_OUTPUT_ROOT FLEX YACC BISON NM ifGNUmake LN_S CMP CP DATE FIND GREP MKDIR MV RANLIB ac_ct_RANLIB RM SED TAR BINPWD GRAPHVIZ DOT GV DOTTY PERL HAVE_PERL INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_! DATA BZIP2 DOXYGEN ETAGS GROFF GZIP POD2HTML POD2MAN RUNTEST TCLSH ZIP EGREP INSTALL_LTDL_TRUE INSTALL_LTDL_FALSE CONVENIENCE_LTDL_TRUE CONVENIENCE_LTDL_FALSE LIBADD_DL ECHO AR ac_ct_AR STRIP ac_ct_STRIP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL ETAGSFLAGS LLVMGCC LLVMGXX ALLOCA MMAP_FILE LLVMCC1 LLVMCC1PLUS LLVMGCCDIR LLVMGCC_VERSION LLVMGCC_MAJVERS SHLIBEXT LLVM_PREFIX LLVM_BINDIR LLVM_LIBDIR LLVM_DATADIR LLVM_DOCSDIR LLVM_ETCDIR LLVM_INCLUDEDIR LLVM_INFODIR LLVM_MANDIR LLVM_CONFIGTIME LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -5373,6 +5373,46 @@ echo "${ECHO_T}no" >&6 fi +# Extract the first word of "pwd", so it can be a program name with args. +set dummy pwd; 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_path_BINPWD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $BINPWD in + [\\/]* | ?:[\\/]*) + ac_cv_path_BINPWD="$BINPWD" # Let the user override the test with a path. + ;; + *) + 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_path_BINPWD="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_BINPWD" && ac_cv_path_BINPWD="pwd" + ;; +esac +fi +BINPWD=$ac_cv_path_BINPWD + +if test -n "$BINPWD"; then + echo "$as_me:$LINENO: result: $BINPWD" >&5 +echo "${ECHO_T}$BINPWD" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + # Extract the first word of "Graphviz", so it can be a program name with args. set dummy Graphviz; ac_word=$2 @@ -8751,7 +8791,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 10785 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -11227,7 +11267,7 @@ # Provide some information about the compiler. -echo "$as_me:11230:" \ +echo "$as_me:11270:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -12284,11 +12324,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12287: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12327: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:12291: \$? = $ac_status" >&5 + echo "$as_me:12331: \$? = $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 @@ -12527,11 +12567,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12530: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12570: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:12534: \$? = $ac_status" >&5 + echo "$as_me:12574: \$? = $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 @@ -12587,11 +12627,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12590: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12630: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:12594: \$? = $ac_status" >&5 + echo "$as_me:12634: \$? = $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 @@ -14772,7 +14812,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:17106: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:17070: \$? = $ac_status" >&5 + echo "$as_me:17110: \$? = $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 @@ -17123,11 +17163,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17126: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17166: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:17130: \$? = $ac_status" >&5 + echo "$as_me:17170: \$? = $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 @@ -18484,7 +18524,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:19462: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:19426: \$? = $ac_status" >&5 + echo "$as_me:19466: \$? = $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 @@ -19479,11 +19519,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:19482: $lt_compile\"" >&5) + (eval echo "\"\$as_me:19522: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:19486: \$? = $ac_status" >&5 + echo "$as_me:19526: \$? = $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 @@ -21518,11 +21558,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:21521: $lt_compile\"" >&5) + (eval echo "\"\$as_me:21561: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:21525: \$? = $ac_status" >&5 + echo "$as_me:21565: \$? = $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 @@ -21761,11 +21801,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:21764: $lt_compile\"" >&5) + (eval echo "\"\$as_me:21804: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:21768: \$? = $ac_status" >&5 + echo "$as_me:21808: \$? = $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 @@ -21821,11 +21861,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:21824: $lt_compile\"" >&5) + (eval echo "\"\$as_me:21864: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:21828: \$? = $ac_status" >&5 + echo "$as_me:21868: \$? = $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 @@ -24006,7 +24046,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext < Changes in directory llvm/lib/Target/X86: X86ISelDAGToDAG.cpp updated: 1.83 -> 1.84 --- Log message: Some clean up. --- Diffs of the changes: (+8 -6) X86ISelDAGToDAG.cpp | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) Index: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp diff -u llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.83 llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.84 --- llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.83 Thu Jul 27 20:03:48 2006 +++ llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Fri Jul 28 01:05:06 2006 @@ -33,8 +33,8 @@ #include "llvm/Support/Debug.h" #include "llvm/Support/Visibility.h" #include "llvm/ADT/Statistic.h" +#include #include -#include #include using namespace llvm; @@ -125,7 +125,7 @@ private: void DetermineTopologicalOrdering(); - void DeterminReachibility(SDNode *f, SDNode *t); + void DetermineReachibility(SDNode *f, SDNode *t); void Select(SDOperand &Result, SDOperand N); @@ -239,7 +239,7 @@ // If U use can somehow reach N through another path then U can't fold N or // it will create a cycle. e.g. In the following diagram, U can reach N - // through X. If N is foled into into U, then X is both a predecessor and + // through X. If N is foledd into into U, then X is both a predecessor and // a successor of U. // // [ N ] @@ -249,7 +249,7 @@ // / [X] // | ^ // [U]--------| - DeterminReachibility(U, N); + DetermineReachibility(U, N); assert(isReachable(U, N) && "Attempting to fold a non-operand node?"); for (SDNode::op_iterator I = U->op_begin(), E = U->op_end(); I != E; ++I) { SDNode *P = I->Val; @@ -269,7 +269,7 @@ memset(RMRange, 0, DAGSize * sizeof(unsigned)); std::vector InDegree(DAGSize); - std::list Sources; + std::deque Sources; for (SelectionDAG::allnodes_iterator I = CurDAG->allnodes_begin(), E = CurDAG->allnodes_end(); I != E; ++I) { SDNode *N = I; @@ -297,7 +297,9 @@ } } -void X86DAGToDAGISel::DeterminReachibility(SDNode *f, SDNode *t) { +/// DetermineReachibility - Determine reachibility between all pairs of nodes +/// between f and t in topological order. +void X86DAGToDAGISel::DetermineReachibility(SDNode *f, SDNode *t) { if (!ReachibilityMatrix) { unsigned RMSize = (DAGSize * DAGSize + 7) / 8; ReachibilityMatrix = new unsigned char[RMSize]; From rspencer at reidspencer.com Fri Jul 28 01:08:54 2006 From: rspencer at reidspencer.com (Reid Spencer) Date: Thu, 27 Jul 2006 23:08:54 -0700 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp In-Reply-To: <200607280605.k6S65KSU017564@zion.cs.uiuc.edu> References: <200607280605.k6S65KSU017564@zion.cs.uiuc.edu> Message-ID: <1154066934.2702.136.camel@bashful.x10sys.com> On Fri, 2006-07-28 at 01:05 -0500, Evan Cheng wrote: > + void DetermineReachibility(SDNode *f, SDNode *t); Hate to be pedantic about this, but its "Reachability" (a between h and b) Reid. From evan.cheng at apple.com Fri Jul 28 01:33:55 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Fri, 28 Jul 2006 01:33:55 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Message-ID: <200607280633.k6S6Xt4k017976@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ISelDAGToDAG.cpp updated: 1.84 -> 1.85 --- Log message: Can't spell. --- Diffs of the changes: (+15 -15) X86ISelDAGToDAG.cpp | 30 +++++++++++++++--------------- 1 files changed, 15 insertions(+), 15 deletions(-) Index: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp diff -u llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.84 llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.85 --- llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.84 Fri Jul 28 01:05:06 2006 +++ llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Fri Jul 28 01:33:41 2006 @@ -100,7 +100,7 @@ X86Lowering(*TM.getTargetLowering()), Subtarget(&TM.getSubtarget()), DAGSize(0), TopOrder(NULL), IdToOrder(NULL), - RMRange(NULL), ReachibilityMatrix(NULL) {} + RMRange(NULL), ReachabilityMatrix(NULL) {} virtual bool runOnFunction(Function &Fn) { // Make sure we re-emit a set of the global base reg if necessary @@ -125,7 +125,7 @@ private: void DetermineTopologicalOrdering(); - void DetermineReachibility(SDNode *f, SDNode *t); + void DetermineReachability(SDNode *f, SDNode *t); void Select(SDOperand &Result, SDOperand N); @@ -197,18 +197,18 @@ /// particular source node. unsigned *RMRange; - /// ReachibilityMatrix - A N x N matrix representing all pairs reachibility + /// ReachabilityMatrix - A N x N matrix representing all pairs reachibility /// information. One bit per potential edge. - unsigned char *ReachibilityMatrix; + unsigned char *ReachabilityMatrix; inline void setReachable(SDNode *f, SDNode *t) { unsigned Idx = f->getNodeId() * DAGSize + t->getNodeId(); - ReachibilityMatrix[Idx / 8] |= 1 << (Idx % 8); + ReachabilityMatrix[Idx / 8] |= 1 << (Idx % 8); } inline bool isReachable(SDNode *f, SDNode *t) { unsigned Idx = f->getNodeId() * DAGSize + t->getNodeId(); - return ReachibilityMatrix[Idx / 8] & (1 << (Idx % 8)); + return ReachabilityMatrix[Idx / 8] & (1 << (Idx % 8)); } /// UnfoldableSet - An boolean array representing nodes which have been @@ -239,7 +239,7 @@ // If U use can somehow reach N through another path then U can't fold N or // it will create a cycle. e.g. In the following diagram, U can reach N - // through X. If N is foledd into into U, then X is both a predecessor and + // through X. If N is folded into into U, then X is both a predecessor and // a successor of U. // // [ N ] @@ -249,7 +249,7 @@ // / [X] // | ^ // [U]--------| - DetermineReachibility(U, N); + DetermineReachability(U, N); assert(isReachable(U, N) && "Attempting to fold a non-operand node?"); for (SDNode::op_iterator I = U->op_begin(), E = U->op_end(); I != E; ++I) { SDNode *P = I->Val; @@ -297,13 +297,13 @@ } } -/// DetermineReachibility - Determine reachibility between all pairs of nodes +/// DetermineReachability - Determine reachibility between all pairs of nodes /// between f and t in topological order. -void X86DAGToDAGISel::DetermineReachibility(SDNode *f, SDNode *t) { - if (!ReachibilityMatrix) { +void X86DAGToDAGISel::DetermineReachability(SDNode *f, SDNode *t) { + if (!ReachabilityMatrix) { unsigned RMSize = (DAGSize * DAGSize + 7) / 8; - ReachibilityMatrix = new unsigned char[RMSize]; - memset(ReachibilityMatrix, 0, RMSize); + ReachabilityMatrix = new unsigned char[RMSize]; + memset(ReachabilityMatrix, 0, RMSize); } int Idf = f->getNodeId(); @@ -360,12 +360,12 @@ DEBUG(std::cerr << "===== Instruction selection ends:\n"); #endif - delete[] ReachibilityMatrix; + delete[] ReachabilityMatrix; delete[] TopOrder; delete[] IdToOrder; delete[] RMRange; delete[] UnfoldableSet; - ReachibilityMatrix = NULL; + ReachabilityMatrix = NULL; TopOrder = NULL; IdToOrder = RMRange = NULL; UnfoldableSet = NULL; From lattner at cs.uiuc.edu Fri Jul 28 11:46:06 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 28 Jul 2006 11:46:06 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCISelLowering.cpp Message-ID: <200607281646.k6SGk6oU001800@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCISelLowering.cpp updated: 1.199 -> 1.200 --- Log message: Fix some ppc64 issues with vector code. --- Diffs of the changes: (+7 -4) PPCISelLowering.cpp | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) Index: llvm/lib/Target/PowerPC/PPCISelLowering.cpp diff -u llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.199 llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.200 --- llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.199 Wed Jul 26 16:12:04 2006 +++ llvm/lib/Target/PowerPC/PPCISelLowering.cpp Fri Jul 28 11:45:47 2006 @@ -652,7 +652,7 @@ if (TM.getRelocationModel() == Reloc::PIC_) { // With PIC, the first instruction is actually "GR+hi(&G)". Hi = DAG.getNode(ISD::ADD, PtrVT, - DAG.getNode(PPCISD::GlobalBaseReg, MVT::i32), Hi); + DAG.getNode(PPCISD::GlobalBaseReg, PtrVT), Hi); } Lo = DAG.getNode(ISD::ADD, PtrVT, Hi, Lo); @@ -741,7 +741,8 @@ unsigned VarArgsFrameIndex) { // vastart just stores the address of the VarArgsFrameIndex slot into the // memory location argument. - SDOperand FR = DAG.getFrameIndex(VarArgsFrameIndex, MVT::i32); + MVT::ValueType PtrVT = DAG.getTargetLoweringInfo().getPointerTy(); + SDOperand FR = DAG.getFrameIndex(VarArgsFrameIndex, PtrVT); return DAG.getNode(ISD::STORE, MVT::Other, Op.getOperand(0), FR, Op.getOperand(1), Op.getOperand(2)); } @@ -1388,7 +1389,8 @@ // then lfd it and fcfid it. MachineFrameInfo *FrameInfo = DAG.getMachineFunction().getFrameInfo(); int FrameIdx = FrameInfo->CreateStackObject(8, 8); - SDOperand FIdx = DAG.getFrameIndex(FrameIdx, MVT::i32); + MVT::ValueType PtrVT = DAG.getTargetLoweringInfo().getPointerTy(); + SDOperand FIdx = DAG.getFrameIndex(FrameIdx, PtrVT); SDOperand Ext64 = DAG.getNode(PPCISD::EXTSW_32, MVT::i32, Op.getOperand(0)); @@ -2119,7 +2121,8 @@ // Create a stack slot that is 16-byte aligned. MachineFrameInfo *FrameInfo = DAG.getMachineFunction().getFrameInfo(); int FrameIdx = FrameInfo->CreateStackObject(16, 16); - SDOperand FIdx = DAG.getFrameIndex(FrameIdx, MVT::i32); + MVT::ValueType PtrVT = DAG.getTargetLoweringInfo().getPointerTy(); + SDOperand FIdx = DAG.getFrameIndex(FrameIdx, PtrVT); // Store the input value into Value#0 of the stack slot. SDOperand Store = DAG.getNode(ISD::STORE, MVT::Other, DAG.getEntryNode(), From pjenkins at apple.com Fri Jul 28 13:03:15 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Fri, 28 Jul 2006 13:03:15 -0500 Subject: [llvm-commits] CVS: llvm/tools/bugpoint/ExtractFunction.cpp Message-ID: <200607281803.k6SI3FbQ003303@zion.cs.uiuc.edu> Changes in directory llvm/tools/bugpoint: ExtractFunction.cpp updated: 1.49 -> 1.50 --- Log message: Updating the comments above SplitFunctionsOutOfModule in ExtractFunction.cpp to reflect the changes made to that function. Specifically I am removing the FIXME comment because the issue has been addressed. --- Diffs of the changes: (+0 -5) ExtractFunction.cpp | 5 ----- 1 files changed, 5 deletions(-) Index: llvm/tools/bugpoint/ExtractFunction.cpp diff -u llvm/tools/bugpoint/ExtractFunction.cpp:1.49 llvm/tools/bugpoint/ExtractFunction.cpp:1.50 --- llvm/tools/bugpoint/ExtractFunction.cpp:1.49 Thu Jul 27 20:19:28 2006 +++ llvm/tools/bugpoint/ExtractFunction.cpp Fri Jul 28 13:03:01 2006 @@ -312,11 +312,6 @@ /// SplitFunctionsOutOfModule - Given a module and a list of functions in the /// module, split the functions OUT of the specified module, and place them in /// the new module. -/// -/// FIXME: this could be made DRAMATICALLY more efficient for large programs if -/// we just MOVED functions from one module to the other, instead of cloning the -/// whole module, then proceeding to delete an entire module's worth of stuff. -/// Module *llvm::SplitFunctionsOutOfModule(Module *M, const std::vector &F) { // Make sure functions & globals are all external so that linkage From criswell at cs.uiuc.edu Fri Jul 28 13:16:25 2006 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri, 28 Jul 2006 13:16:25 -0500 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/libc/COPYING.LIB LICENSES LICENSE.TXT qsort.c Message-ID: <200607281816.NAA23591@choi.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/libc: COPYING.LIB added (r1.1) LICENSES added (r1.1) LICENSE.TXT updated: 1.2 -> 1.3 qsort.c updated: 1.2 -> 1.3 --- Log message: Added in the LGPL text and copyright information. This needs to be included in the distribution. Also added the glibc LICENSES file, which should be included as well. --- Diffs of the changes: (+734 -2) COPYING.LIB | 510 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ LICENSE.TXT | 5 LICENSES | 219 +++++++++++++++++++++++++ qsort.c | 2 4 files changed, 734 insertions(+), 2 deletions(-) Index: llvm/runtime/GCCLibraries/libc/COPYING.LIB diff -c /dev/null llvm/runtime/GCCLibraries/libc/COPYING.LIB:1.1 *** /dev/null Fri Jul 28 13:16:10 2006 --- llvm/runtime/GCCLibraries/libc/COPYING.LIB Fri Jul 28 13:16:00 2006 *************** *** 0 **** --- 1,510 ---- + + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + [This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your + freedom to share and change it. By contrast, the GNU General Public + Licenses are intended to guarantee your freedom to share and change + free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some + specially designated software packages--typically libraries--of the + Free Software Foundation and other authors who decide to use it. You + can use it too, but we suggest you first think carefully about whether + this license or the ordinary General Public License is the better + strategy to use in any particular case, based on the explanations + below. + + When we speak of free software, we are referring to freedom of use, + not price. Our General Public Licenses are designed to make sure that + you have the freedom to distribute copies of free software (and charge + for this service if you wish); that you receive source code or can get + it if you want it; that you can change the software and use pieces of + it in new free programs; and that you are informed that you can do + these things. + + To protect your rights, we need to make restrictions that forbid + distributors to deny you these rights or to ask you to surrender these + rights. These restrictions translate to certain responsibilities for + you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis + or for a fee, you must give the recipients all the rights that we gave + you. You must make sure that they, too, receive or can get the source + code. If you link other code with the library, you must provide + complete object files to the recipients, so that they can relink them + with the library after making changes to the library and recompiling + it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the + library, and (2) we offer you this license, which gives you legal + permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that + there is no warranty for the free library. Also, if the library is + modified by someone else and passed on, the recipients should know + that what they have is not the original version, so that the original + author's reputation will not be affected by problems that might be + introduced by others. + ^L + Finally, software patents pose a constant threat to the existence of + any free program. We wish to make sure that a company cannot + effectively restrict the users of a free program by obtaining a + restrictive license from a patent holder. Therefore, we insist that + any patent license obtained for a version of the library must be + consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the + ordinary GNU General Public License. This license, the GNU Lesser + General Public License, applies to certain designated libraries, and + is quite different from the ordinary General Public License. We use + this license for certain libraries in order to permit linking those + libraries into non-free programs. + + When a program is linked with a library, whether statically or using + a shared library, the combination of the two is legally speaking a + combined work, a derivative of the original library. The ordinary + General Public License therefore permits such linking only if the + entire combination fits its criteria of freedom. The Lesser General + Public License permits more lax criteria for linking other code with + the library. + + We call this license the "Lesser" General Public License because it + does Less to protect the user's freedom than the ordinary General + Public License. It also provides other free software developers Less + of an advantage over competing non-free programs. These disadvantages + are the reason we use the ordinary General Public License for many + libraries. However, the Lesser license provides advantages in certain + special circumstances. + + For example, on rare occasions, there may be a special need to + encourage the widest possible use of a certain library, so that it + becomes a de-facto standard. To achieve this, non-free programs must + be allowed to use the library. A more frequent case is that a free + library does the same job as widely used non-free libraries. In this + case, there is little to gain by limiting the free library to free + software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free + programs enables a greater number of people to use a large body of + free software. For example, permission to use the GNU C Library in + non-free programs enables many more people to use the whole GNU + operating system, as well as its variant, the GNU/Linux operating + system. + + Although the Lesser General Public License is Less protective of the + users' freedom, it does ensure that the user of a program that is + linked with the Library has the freedom and the wherewithal to run + that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and + modification follow. Pay close attention to the difference between a + "work based on the library" and a "work that uses the library". The + former contains code derived from the library, whereas the latter must + be combined with the library in order to run. + ^L + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other + program which contains a notice placed by the copyright holder or + other authorized party saying it may be distributed under the terms of + this Lesser General Public License (also called "this License"). + Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data + prepared so as to be conveniently linked with application programs + (which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work + which has been distributed under these terms. A "work based on the + Library" means either the Library or any derivative work under + copyright law: that is to say, a work containing the Library or a + portion of it, either verbatim or with modifications and/or translated + straightforwardly into another language. (Hereinafter, translation is + included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for + making modifications to it. For a library, complete source code means + all the source code for all modules it contains, plus any associated + interface definition files, plus the scripts used to control + compilation and installation of the library. + + Activities other than copying, distribution and modification are not + covered by this License; they are outside its scope. The act of + running a program using the Library is not restricted, and output from + such a program is covered only if its contents constitute a work based + on the Library (independent of the use of the Library in a tool for + writing it). Whether that is true depends on what the Library does + and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's + complete source code as you receive it, in any medium, provided that + you conspicuously and appropriately publish on each copy an + appropriate copyright notice and disclaimer of warranty; keep intact + all the notices that refer to this License and to the absence of any + warranty; and distribute a copy of this License along with the + Library. + + You may charge a fee for the physical act of transferring a copy, + and you may at your option offer warranty protection in exchange for a + fee. + + 2. You may modify your copy or copies of the Library or any portion + of it, thus forming a work based on the Library, and copy and + distribute such modifications or work under the terms of Section 1 + above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + + These requirements apply to the modified work as a whole. If + identifiable sections of that work are not derived from the Library, + and can be reasonably considered independent and separate works in + themselves, then this License, and its terms, do not apply to those + sections when you distribute them as separate works. But when you + distribute the same sections as part of a whole which is a work based + on the Library, the distribution of the whole must be on the terms of + this License, whose permissions for other licensees extend to the + entire whole, and thus to each and every part regardless of who wrote + it. + + Thus, it is not the intent of this section to claim rights or contest + your rights to work written entirely by you; rather, the intent is to + exercise the right to control the distribution of derivative or + collective works based on the Library. + + In addition, mere aggregation of another work not based on the Library + with the Library (or with a work based on the Library) on a volume of + a storage or distribution medium does not bring the other work under + the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public + License instead of this License to a given copy of the Library. To do + this, you must alter all the notices that refer to this License, so + that they refer to the ordinary GNU General Public License, version 2, + instead of to this License. (If a newer version than version 2 of the + ordinary GNU General Public License has appeared, then you can specify + that version instead if you wish.) Do not make any other change in + these notices. + ^L + Once this change is made in a given copy, it is irreversible for + that copy, so the ordinary GNU General Public License applies to all + subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of + the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or + derivative of it, under Section 2) in object code or executable form + under the terms of Sections 1 and 2 above provided that you accompany + it with the complete corresponding machine-readable source code, which + must be distributed under the terms of Sections 1 and 2 above on a + medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy + from a designated place, then offering equivalent access to copy the + source code from the same place satisfies the requirement to + distribute the source code, even though third parties are not + compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the + Library, but is designed to work with the Library by being compiled or + linked with it, is called a "work that uses the Library". Such a + work, in isolation, is not a derivative work of the Library, and + therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library + creates an executable that is a derivative of the Library (because it + contains portions of the Library), rather than a "work that uses the + library". The executable is therefore covered by this License. + Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file + that is part of the Library, the object code for the work may be a + derivative work of the Library even though the source code is not. + Whether this is true is especially significant if the work can be + linked without the Library, or if the work is itself a library. The + threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data + structure layouts and accessors, and small macros and small inline + functions (ten lines or less in length), then the use of the object + file is unrestricted, regardless of whether it is legally a derivative + work. (Executables containing this object code plus portions of the + Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may + distribute the object code for the work under the terms of Section 6. + Any executables containing that work also fall under Section 6, + whether or not they are linked directly with the Library itself. + ^L + 6. As an exception to the Sections above, you may also combine or + link a "work that uses the Library" with the Library to produce a + work containing portions of the Library, and distribute that work + under terms of your choice, provided that the terms permit + modification of the work for the customer's own use and reverse + engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the + Library is used in it and that the Library and its use are covered by + this License. You must supply a copy of this License. If the work + during execution displays copyright notices, you must include the + copyright notice for the Library among them, as well as a reference + directing the user to the copy of this License. Also, you must do one + of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at least + three years, to give the same user the materials specified in + Subsection 6a, above, for a charge no more than the cost of + performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the + Library" must include any data and utility programs needed for + reproducing the executable from it. However, as a special exception, + the materials to be distributed need not include anything that is + normally distributed (in either source or binary form) with the major + components (compiler, kernel, and so on) of the operating system on + which the executable runs, unless that component itself accompanies + the executable. + + It may happen that this requirement contradicts the license + restrictions of other proprietary libraries that do not normally + accompany the operating system. Such a contradiction means you cannot + use both them and the Library together in an executable that you + distribute. + ^L + 7. You may place library facilities that are a work based on the + Library side-by-side in a single library together with other library + facilities not covered by this License, and distribute such a combined + library, provided that the separate distribution of the work based on + the Library and of the other library facilities is otherwise + permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute + the Library except as expressly provided under this License. Any + attempt otherwise to copy, modify, sublicense, link with, or + distribute the Library is void, and will automatically terminate your + rights under this License. However, parties who have received copies, + or rights, from you under this License will not have their licenses + terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not + signed it. However, nothing else grants you permission to modify or + distribute the Library or its derivative works. These actions are + prohibited by law if you do not accept this License. Therefore, by + modifying or distributing the Library (or any work based on the + Library), you indicate your acceptance of this License to do so, and + all its terms and conditions for copying, distributing or modifying + the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the + Library), the recipient automatically receives a license from the + original licensor to copy, distribute, link with or modify the Library + subject to these terms and conditions. You may not impose any further + restrictions on the recipients' exercise of the rights granted herein. + You are not responsible for enforcing compliance by third parties with + this License. + ^L + 11. If, as a consequence of a court judgment or allegation of patent + infringement or for any other reason (not limited to patent issues), + conditions are imposed on you (whether by court order, agreement or + otherwise) that contradict the conditions of this License, they do not + excuse you from the conditions of this License. If you cannot + distribute so as to satisfy simultaneously your obligations under this + License and any other pertinent obligations, then as a consequence you + may not distribute the Library at all. For example, if a patent + license would not permit royalty-free redistribution of the Library by + all those who receive copies directly or indirectly through you, then + the only way you could satisfy both it and this License would be to + refrain entirely from distribution of the Library. + + If any portion of this section is held invalid or unenforceable under + any particular circumstance, the balance of the section is intended to + apply, and the section as a whole is intended to apply in other + circumstances. + + It is not the purpose of this section to induce you to infringe any + patents or other property right claims or to contest validity of any + such claims; this section has the sole purpose of protecting the + integrity of the free software distribution system which is + implemented by public license practices. Many people have made + generous contributions to the wide range of software distributed + through that system in reliance on consistent application of that + system; it is up to the author/donor to decide if he or she is willing + to distribute software through any other system and a licensee cannot + impose that choice. + + This section is intended to make thoroughly clear what is believed to + be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in + certain countries either by patents or by copyrighted interfaces, the + original copyright holder who places the Library under this License + may add an explicit geographical distribution limitation excluding those + countries, so that distribution is permitted only in or among + countries not thus excluded. In such case, this License incorporates + the limitation as if written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new + versions of the Lesser General Public License from time to time. + Such new versions will be similar in spirit to the present version, + but may differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the Library + specifies a version number of this License which applies to it and + "any later version", you have the option of following the terms and + conditions either of that version or of any later version published by + the Free Software Foundation. If the Library does not specify a + license version number, you may choose any version ever published by + the Free Software Foundation. + ^L + 14. If you wish to incorporate parts of the Library into other free + programs whose distribution conditions are incompatible with these, + write to the author to ask for permission. For software which is + copyrighted by the Free Software Foundation, write to the Free + Software Foundation; we sometimes make exceptions for this. Our + decision will be guided by the two goals of preserving the free status + of all derivatives of our free software and of promoting the sharing + and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO + WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. + EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR + OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY + KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE + LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME + THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN + WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY + AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU + FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR + CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE + LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING + RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A + FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF + SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + DAMAGES. + + END OF TERMS AND CONDITIONS + ^L + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest + possible use to the public, we recommend making it free software that + everyone can redistribute and change. You can do so by permitting + redistribution under these terms (or, alternatively, under the terms + of the ordinary General Public License). + + To apply these terms, attach the following notices to the library. + It is safest to attach them to the start of each source file to most + effectively convey the exclusion of warranty; and each file should + have at least the "copyright" line and a pointer to where the full + notice is found. + + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Also add information on how to contact you by electronic and paper mail. + + You should also get your employer (if you work as a programmer) or + your school, if any, to sign a "copyright disclaimer" for the library, + if necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James + Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + + That's all there is to it! + + Index: llvm/runtime/GCCLibraries/libc/LICENSES diff -c /dev/null llvm/runtime/GCCLibraries/libc/LICENSES:1.1 *** /dev/null Fri Jul 28 13:16:25 2006 --- llvm/runtime/GCCLibraries/libc/LICENSES Fri Jul 28 13:16:00 2006 *************** *** 0 **** --- 1,219 ---- + This file contains the copying permission notices for various files in the + GNU C Library distribution that have copyright owners other than the Free + Software Foundation. These notices all require that a copy of the notice + be included in the accompanying documentation and be distributed with + binary distributions of the code, so be sure to include this file along + with any binary distributions derived from the GNU C Library. + + + All code incorporated from 4.4 BSD is distributed under the following + license: + + Copyright (C) 1991 Regents of the University of California. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. [This condition was removed.] + 4. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + The DNS resolver code, taken from BIND 4.9.5, is copyrighted both by + UC Berkeley and by Digital Equipment Corporation. The DEC portions + are under the following license: + + Portions Copyright (C) 1993 by Digital Equipment Corporation. + + Permission to use, copy, modify, and distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies, and + that the name of Digital Equipment Corporation not be used in + advertising or publicity pertaining to distribution of the document or + software without specific, written prior permission. + + THE SOFTWARE IS PROVIDED ``AS IS'' AND DIGITAL EQUIPMENT CORP. + DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL + DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING + FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, + NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION + WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + The Sun RPC support (from rpcsrc-4.0) is covered by the following + license: + + Copyright (C) 1984, Sun Microsystems, Inc. + + Sun RPC is a product of Sun Microsystems, Inc. and is provided for + unrestricted use provided that this legend is included on all tape media + and as a part of the software program in whole or part. Users may copy + or modify Sun RPC without charge, but are not authorized to license or + distribute it to anyone else except as part of a product or program + developed by the user. + + SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE + WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR + PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. + + Sun RPC is provided with no support and without any obligation on the + part of Sun Microsystems, Inc. to assist in its use, correction, + modification or enhancement. + + SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE + INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC + OR ANY PART THEREOF. + + In no event will Sun Microsystems, Inc. be liable for any lost revenue + or profits or other special, indirect and consequential damages, even if + Sun has been advised of the possibility of such damages. + + + The following CMU license covers some of the support code for Mach, + derived from Mach 3.0: + + Mach Operating System + Copyright (C) 1991,1990,1989 Carnegie Mellon University + All Rights Reserved. + + Permission to use, copy, modify and distribute this software and its + documentation is hereby granted, provided that both the copyright + notice and this permission notice appear in all copies of the + software, derivative works or modified versions, and any portions + thereof, and that both notices appear in supporting documentation. + + CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS ``AS IS'' + CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + + Carnegie Mellon requests users of this software to return to + + Software Distribution Coordinator + School of Computer Science + Carnegie Mellon University + Pittsburgh PA 15213-3890 + + or Software.Distribution at CS.CMU.EDU any improvements or + extensions that they make and grant Carnegie Mellon the rights to + redistribute these changes. + + The file if_ppp.h is under the following CMU license: + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY AND + CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The following license covers the files from Intel's "Highly Optimized + Mathematical Functions for Itanium" collection: + + Intel License Agreement + + Copyright (c) 2000, Intel Corporation + + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * The name of Intel Corporation may not be used to endorse or promote + products derived from this software without specific prior written + permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The files inet/getnameinfo.c and sysdeps/posix/getaddrinfo.c are copyright + (C) by Craig Metz and are distributed under the following license: + + /* The Inner Net License, Version 2.00 + + The author(s) grant permission for redistribution and use in source and + binary forms, with or without modification, of the software and documentation + provided that the following conditions are met: + + 0. If you receive a version of the software that is specifically labelled + as not being for redistribution (check the version message and/or README), + you are not permitted to redistribute that version of the software in any + way or form. + 1. All terms of the all other applicable copyrights and licenses must be + followed. + 2. Redistributions of source code must retain the authors' copyright + notice(s), this list of conditions, and the following disclaimer. + 3. Redistributions in binary form must reproduce the authors' copyright + notice(s), this list of conditions, and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 4. [The copyright holder has authorized the removal of this clause.] + 5. Neither the name(s) of the author(s) nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY ITS AUTHORS AND CONTRIBUTORS ``AS IS'' AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + If these license terms cause you a real problem, contact the author. */ Index: llvm/runtime/GCCLibraries/libc/LICENSE.TXT diff -u llvm/runtime/GCCLibraries/libc/LICENSE.TXT:1.2 llvm/runtime/GCCLibraries/libc/LICENSE.TXT:1.3 --- llvm/runtime/GCCLibraries/libc/LICENSE.TXT:1.2 Thu Nov 13 12:03:11 2003 +++ llvm/runtime/GCCLibraries/libc/LICENSE.TXT Fri Jul 28 13:16:00 2006 @@ -1,5 +1,8 @@ libc ------------------------------------------------------------------------------ The stripped down C library found in llvm/runtime/GCCLibraries/libc is licensed -to you under the GNU Lesser General Public License (LGPL). +to you under the GNU Lesser General Public License (LGPL). The license, along +with copyright information, is in COPYING.LIB. +Portions of glibc also contain copyrights and licenses from third parties. +Those are listed in LICENSES. Index: llvm/runtime/GCCLibraries/libc/qsort.c diff -u llvm/runtime/GCCLibraries/libc/qsort.c:1.2 llvm/runtime/GCCLibraries/libc/qsort.c:1.3 --- llvm/runtime/GCCLibraries/libc/qsort.c:1.2 Thu May 29 17:12:35 2003 +++ llvm/runtime/GCCLibraries/libc/qsort.c Fri Jul 28 13:16:00 2006 @@ -21,7 +21,7 @@ Engineering a sort function; Jon Bentley and M. Douglas McIlroy; Software - Practice and Experience; Vol. 23 (11), 1249-1265, 1993. */ -#if 0 +#if 1 #include #include From clattner at apple.com Fri Jul 28 13:28:09 2006 From: clattner at apple.com (Chris Lattner) Date: Fri, 28 Jul 2006 11:28:09 -0700 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/libc/COPYING.LIB LICENSES LICENSE.TXT qsort.c In-Reply-To: <200607281816.NAA23591@choi.cs.uiuc.edu> References: <200607281816.NAA23591@choi.cs.uiuc.edu> Message-ID: <6C79C998-FC5F-44F9-BFE3-26F5275C3CE0@apple.com> Please revert this part of the patch John. -Chris On Jul 28, 2006, at 11:16 AM, John Criswell wrote: > Index: llvm/runtime/GCCLibraries/libc/qsort.c > diff -u llvm/runtime/GCCLibraries/libc/qsort.c:1.2 llvm/runtime/ > GCCLibraries/libc/qsort.c:1.3 > --- llvm/runtime/GCCLibraries/libc/qsort.c:1.2 Thu May 29 17:12:35 > 2003 > +++ llvm/runtime/GCCLibraries/libc/qsort.c Fri Jul 28 13:16:00 2006 > @@ -21,7 +21,7 @@ > Engineering a sort function; Jon Bentley and M. Douglas McIlroy; > Software - Practice and Experience; Vol. 23 (11), 1249-1265, > 1993. */ > > -#if 0 > +#if 1 > > #include > #include > From criswell at cs.uiuc.edu Fri Jul 28 13:31:17 2006 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri, 28 Jul 2006 13:31:17 -0500 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/libc/qsort.c Message-ID: <200607281831.NAA24013@choi.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/libc: qsort.c updated: 1.3 -> 1.4 --- Log message: Reverted previous commit. Thanks, Chris. --- Diffs of the changes: (+1 -1) qsort.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/runtime/GCCLibraries/libc/qsort.c diff -u llvm/runtime/GCCLibraries/libc/qsort.c:1.3 llvm/runtime/GCCLibraries/libc/qsort.c:1.4 --- llvm/runtime/GCCLibraries/libc/qsort.c:1.3 Fri Jul 28 13:16:00 2006 +++ llvm/runtime/GCCLibraries/libc/qsort.c Fri Jul 28 13:30:52 2006 @@ -21,7 +21,7 @@ Engineering a sort function; Jon Bentley and M. Douglas McIlroy; Software - Practice and Experience; Vol. 23 (11), 1249-1265, 1993. */ -#if 1 +#if 0 #include #include From criswell at cs.uiuc.edu Fri Jul 28 13:40:19 2006 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri, 28 Jul 2006 13:40:19 -0500 Subject: [llvm-commits] [release_18] CVS: llvm/runtime/GCCLibraries/libc/COPYING.LIB LICENSES LICENSE.TXT Message-ID: <200607281840.k6SIeJcf004228@zion.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/libc: COPYING.LIB added (r1.1.2.1) LICENSES added (r1.1.2.1) LICENSE.TXT updated: 1.2 -> 1.2.22.1 --- Log message: Addition of copyright and licensing files required by glibc. --- Diffs of the changes: (+733 -1) COPYING.LIB | 510 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ LICENSE.TXT | 5 LICENSES | 219 +++++++++++++++++++++++++ 3 files changed, 733 insertions(+), 1 deletion(-) Index: llvm/runtime/GCCLibraries/libc/COPYING.LIB diff -c /dev/null llvm/runtime/GCCLibraries/libc/COPYING.LIB:1.1.2.1 *** /dev/null Fri Jul 28 13:40:15 2006 --- llvm/runtime/GCCLibraries/libc/COPYING.LIB Fri Jul 28 13:40:05 2006 *************** *** 0 **** --- 1,510 ---- + + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + [This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your + freedom to share and change it. By contrast, the GNU General Public + Licenses are intended to guarantee your freedom to share and change + free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some + specially designated software packages--typically libraries--of the + Free Software Foundation and other authors who decide to use it. You + can use it too, but we suggest you first think carefully about whether + this license or the ordinary General Public License is the better + strategy to use in any particular case, based on the explanations + below. + + When we speak of free software, we are referring to freedom of use, + not price. Our General Public Licenses are designed to make sure that + you have the freedom to distribute copies of free software (and charge + for this service if you wish); that you receive source code or can get + it if you want it; that you can change the software and use pieces of + it in new free programs; and that you are informed that you can do + these things. + + To protect your rights, we need to make restrictions that forbid + distributors to deny you these rights or to ask you to surrender these + rights. These restrictions translate to certain responsibilities for + you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis + or for a fee, you must give the recipients all the rights that we gave + you. You must make sure that they, too, receive or can get the source + code. If you link other code with the library, you must provide + complete object files to the recipients, so that they can relink them + with the library after making changes to the library and recompiling + it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the + library, and (2) we offer you this license, which gives you legal + permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that + there is no warranty for the free library. Also, if the library is + modified by someone else and passed on, the recipients should know + that what they have is not the original version, so that the original + author's reputation will not be affected by problems that might be + introduced by others. + ^L + Finally, software patents pose a constant threat to the existence of + any free program. We wish to make sure that a company cannot + effectively restrict the users of a free program by obtaining a + restrictive license from a patent holder. Therefore, we insist that + any patent license obtained for a version of the library must be + consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the + ordinary GNU General Public License. This license, the GNU Lesser + General Public License, applies to certain designated libraries, and + is quite different from the ordinary General Public License. We use + this license for certain libraries in order to permit linking those + libraries into non-free programs. + + When a program is linked with a library, whether statically or using + a shared library, the combination of the two is legally speaking a + combined work, a derivative of the original library. The ordinary + General Public License therefore permits such linking only if the + entire combination fits its criteria of freedom. The Lesser General + Public License permits more lax criteria for linking other code with + the library. + + We call this license the "Lesser" General Public License because it + does Less to protect the user's freedom than the ordinary General + Public License. It also provides other free software developers Less + of an advantage over competing non-free programs. These disadvantages + are the reason we use the ordinary General Public License for many + libraries. However, the Lesser license provides advantages in certain + special circumstances. + + For example, on rare occasions, there may be a special need to + encourage the widest possible use of a certain library, so that it + becomes a de-facto standard. To achieve this, non-free programs must + be allowed to use the library. A more frequent case is that a free + library does the same job as widely used non-free libraries. In this + case, there is little to gain by limiting the free library to free + software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free + programs enables a greater number of people to use a large body of + free software. For example, permission to use the GNU C Library in + non-free programs enables many more people to use the whole GNU + operating system, as well as its variant, the GNU/Linux operating + system. + + Although the Lesser General Public License is Less protective of the + users' freedom, it does ensure that the user of a program that is + linked with the Library has the freedom and the wherewithal to run + that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and + modification follow. Pay close attention to the difference between a + "work based on the library" and a "work that uses the library". The + former contains code derived from the library, whereas the latter must + be combined with the library in order to run. + ^L + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other + program which contains a notice placed by the copyright holder or + other authorized party saying it may be distributed under the terms of + this Lesser General Public License (also called "this License"). + Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data + prepared so as to be conveniently linked with application programs + (which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work + which has been distributed under these terms. A "work based on the + Library" means either the Library or any derivative work under + copyright law: that is to say, a work containing the Library or a + portion of it, either verbatim or with modifications and/or translated + straightforwardly into another language. (Hereinafter, translation is + included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for + making modifications to it. For a library, complete source code means + all the source code for all modules it contains, plus any associated + interface definition files, plus the scripts used to control + compilation and installation of the library. + + Activities other than copying, distribution and modification are not + covered by this License; they are outside its scope. The act of + running a program using the Library is not restricted, and output from + such a program is covered only if its contents constitute a work based + on the Library (independent of the use of the Library in a tool for + writing it). Whether that is true depends on what the Library does + and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's + complete source code as you receive it, in any medium, provided that + you conspicuously and appropriately publish on each copy an + appropriate copyright notice and disclaimer of warranty; keep intact + all the notices that refer to this License and to the absence of any + warranty; and distribute a copy of this License along with the + Library. + + You may charge a fee for the physical act of transferring a copy, + and you may at your option offer warranty protection in exchange for a + fee. + + 2. You may modify your copy or copies of the Library or any portion + of it, thus forming a work based on the Library, and copy and + distribute such modifications or work under the terms of Section 1 + above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + + These requirements apply to the modified work as a whole. If + identifiable sections of that work are not derived from the Library, + and can be reasonably considered independent and separate works in + themselves, then this License, and its terms, do not apply to those + sections when you distribute them as separate works. But when you + distribute the same sections as part of a whole which is a work based + on the Library, the distribution of the whole must be on the terms of + this License, whose permissions for other licensees extend to the + entire whole, and thus to each and every part regardless of who wrote + it. + + Thus, it is not the intent of this section to claim rights or contest + your rights to work written entirely by you; rather, the intent is to + exercise the right to control the distribution of derivative or + collective works based on the Library. + + In addition, mere aggregation of another work not based on the Library + with the Library (or with a work based on the Library) on a volume of + a storage or distribution medium does not bring the other work under + the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public + License instead of this License to a given copy of the Library. To do + this, you must alter all the notices that refer to this License, so + that they refer to the ordinary GNU General Public License, version 2, + instead of to this License. (If a newer version than version 2 of the + ordinary GNU General Public License has appeared, then you can specify + that version instead if you wish.) Do not make any other change in + these notices. + ^L + Once this change is made in a given copy, it is irreversible for + that copy, so the ordinary GNU General Public License applies to all + subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of + the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or + derivative of it, under Section 2) in object code or executable form + under the terms of Sections 1 and 2 above provided that you accompany + it with the complete corresponding machine-readable source code, which + must be distributed under the terms of Sections 1 and 2 above on a + medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy + from a designated place, then offering equivalent access to copy the + source code from the same place satisfies the requirement to + distribute the source code, even though third parties are not + compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the + Library, but is designed to work with the Library by being compiled or + linked with it, is called a "work that uses the Library". Such a + work, in isolation, is not a derivative work of the Library, and + therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library + creates an executable that is a derivative of the Library (because it + contains portions of the Library), rather than a "work that uses the + library". The executable is therefore covered by this License. + Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file + that is part of the Library, the object code for the work may be a + derivative work of the Library even though the source code is not. + Whether this is true is especially significant if the work can be + linked without the Library, or if the work is itself a library. The + threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data + structure layouts and accessors, and small macros and small inline + functions (ten lines or less in length), then the use of the object + file is unrestricted, regardless of whether it is legally a derivative + work. (Executables containing this object code plus portions of the + Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may + distribute the object code for the work under the terms of Section 6. + Any executables containing that work also fall under Section 6, + whether or not they are linked directly with the Library itself. + ^L + 6. As an exception to the Sections above, you may also combine or + link a "work that uses the Library" with the Library to produce a + work containing portions of the Library, and distribute that work + under terms of your choice, provided that the terms permit + modification of the work for the customer's own use and reverse + engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the + Library is used in it and that the Library and its use are covered by + this License. You must supply a copy of this License. If the work + during execution displays copyright notices, you must include the + copyright notice for the Library among them, as well as a reference + directing the user to the copy of this License. Also, you must do one + of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at least + three years, to give the same user the materials specified in + Subsection 6a, above, for a charge no more than the cost of + performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the + Library" must include any data and utility programs needed for + reproducing the executable from it. However, as a special exception, + the materials to be distributed need not include anything that is + normally distributed (in either source or binary form) with the major + components (compiler, kernel, and so on) of the operating system on + which the executable runs, unless that component itself accompanies + the executable. + + It may happen that this requirement contradicts the license + restrictions of other proprietary libraries that do not normally + accompany the operating system. Such a contradiction means you cannot + use both them and the Library together in an executable that you + distribute. + ^L + 7. You may place library facilities that are a work based on the + Library side-by-side in a single library together with other library + facilities not covered by this License, and distribute such a combined + library, provided that the separate distribution of the work based on + the Library and of the other library facilities is otherwise + permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute + the Library except as expressly provided under this License. Any + attempt otherwise to copy, modify, sublicense, link with, or + distribute the Library is void, and will automatically terminate your + rights under this License. However, parties who have received copies, + or rights, from you under this License will not have their licenses + terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not + signed it. However, nothing else grants you permission to modify or + distribute the Library or its derivative works. These actions are + prohibited by law if you do not accept this License. Therefore, by + modifying or distributing the Library (or any work based on the + Library), you indicate your acceptance of this License to do so, and + all its terms and conditions for copying, distributing or modifying + the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the + Library), the recipient automatically receives a license from the + original licensor to copy, distribute, link with or modify the Library + subject to these terms and conditions. You may not impose any further + restrictions on the recipients' exercise of the rights granted herein. + You are not responsible for enforcing compliance by third parties with + this License. + ^L + 11. If, as a consequence of a court judgment or allegation of patent + infringement or for any other reason (not limited to patent issues), + conditions are imposed on you (whether by court order, agreement or + otherwise) that contradict the conditions of this License, they do not + excuse you from the conditions of this License. If you cannot + distribute so as to satisfy simultaneously your obligations under this + License and any other pertinent obligations, then as a consequence you + may not distribute the Library at all. For example, if a patent + license would not permit royalty-free redistribution of the Library by + all those who receive copies directly or indirectly through you, then + the only way you could satisfy both it and this License would be to + refrain entirely from distribution of the Library. + + If any portion of this section is held invalid or unenforceable under + any particular circumstance, the balance of the section is intended to + apply, and the section as a whole is intended to apply in other + circumstances. + + It is not the purpose of this section to induce you to infringe any + patents or other property right claims or to contest validity of any + such claims; this section has the sole purpose of protecting the + integrity of the free software distribution system which is + implemented by public license practices. Many people have made + generous contributions to the wide range of software distributed + through that system in reliance on consistent application of that + system; it is up to the author/donor to decide if he or she is willing + to distribute software through any other system and a licensee cannot + impose that choice. + + This section is intended to make thoroughly clear what is believed to + be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in + certain countries either by patents or by copyrighted interfaces, the + original copyright holder who places the Library under this License + may add an explicit geographical distribution limitation excluding those + countries, so that distribution is permitted only in or among + countries not thus excluded. In such case, this License incorporates + the limitation as if written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new + versions of the Lesser General Public License from time to time. + Such new versions will be similar in spirit to the present version, + but may differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the Library + specifies a version number of this License which applies to it and + "any later version", you have the option of following the terms and + conditions either of that version or of any later version published by + the Free Software Foundation. If the Library does not specify a + license version number, you may choose any version ever published by + the Free Software Foundation. + ^L + 14. If you wish to incorporate parts of the Library into other free + programs whose distribution conditions are incompatible with these, + write to the author to ask for permission. For software which is + copyrighted by the Free Software Foundation, write to the Free + Software Foundation; we sometimes make exceptions for this. Our + decision will be guided by the two goals of preserving the free status + of all derivatives of our free software and of promoting the sharing + and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO + WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. + EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR + OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY + KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE + LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME + THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN + WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY + AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU + FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR + CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE + LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING + RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A + FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF + SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + DAMAGES. + + END OF TERMS AND CONDITIONS + ^L + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest + possible use to the public, we recommend making it free software that + everyone can redistribute and change. You can do so by permitting + redistribution under these terms (or, alternatively, under the terms + of the ordinary General Public License). + + To apply these terms, attach the following notices to the library. + It is safest to attach them to the start of each source file to most + effectively convey the exclusion of warranty; and each file should + have at least the "copyright" line and a pointer to where the full + notice is found. + + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Also add information on how to contact you by electronic and paper mail. + + You should also get your employer (if you work as a programmer) or + your school, if any, to sign a "copyright disclaimer" for the library, + if necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James + Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + + That's all there is to it! + + Index: llvm/runtime/GCCLibraries/libc/LICENSES diff -c /dev/null llvm/runtime/GCCLibraries/libc/LICENSES:1.1.2.1 *** /dev/null Fri Jul 28 13:40:19 2006 --- llvm/runtime/GCCLibraries/libc/LICENSES Fri Jul 28 13:40:05 2006 *************** *** 0 **** --- 1,219 ---- + This file contains the copying permission notices for various files in the + GNU C Library distribution that have copyright owners other than the Free + Software Foundation. These notices all require that a copy of the notice + be included in the accompanying documentation and be distributed with + binary distributions of the code, so be sure to include this file along + with any binary distributions derived from the GNU C Library. + + + All code incorporated from 4.4 BSD is distributed under the following + license: + + Copyright (C) 1991 Regents of the University of California. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. [This condition was removed.] + 4. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + The DNS resolver code, taken from BIND 4.9.5, is copyrighted both by + UC Berkeley and by Digital Equipment Corporation. The DEC portions + are under the following license: + + Portions Copyright (C) 1993 by Digital Equipment Corporation. + + Permission to use, copy, modify, and distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies, and + that the name of Digital Equipment Corporation not be used in + advertising or publicity pertaining to distribution of the document or + software without specific, written prior permission. + + THE SOFTWARE IS PROVIDED ``AS IS'' AND DIGITAL EQUIPMENT CORP. + DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL + DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING + FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, + NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION + WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + The Sun RPC support (from rpcsrc-4.0) is covered by the following + license: + + Copyright (C) 1984, Sun Microsystems, Inc. + + Sun RPC is a product of Sun Microsystems, Inc. and is provided for + unrestricted use provided that this legend is included on all tape media + and as a part of the software program in whole or part. Users may copy + or modify Sun RPC without charge, but are not authorized to license or + distribute it to anyone else except as part of a product or program + developed by the user. + + SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE + WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR + PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. + + Sun RPC is provided with no support and without any obligation on the + part of Sun Microsystems, Inc. to assist in its use, correction, + modification or enhancement. + + SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE + INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC + OR ANY PART THEREOF. + + In no event will Sun Microsystems, Inc. be liable for any lost revenue + or profits or other special, indirect and consequential damages, even if + Sun has been advised of the possibility of such damages. + + + The following CMU license covers some of the support code for Mach, + derived from Mach 3.0: + + Mach Operating System + Copyright (C) 1991,1990,1989 Carnegie Mellon University + All Rights Reserved. + + Permission to use, copy, modify and distribute this software and its + documentation is hereby granted, provided that both the copyright + notice and this permission notice appear in all copies of the + software, derivative works or modified versions, and any portions + thereof, and that both notices appear in supporting documentation. + + CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS ``AS IS'' + CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + + Carnegie Mellon requests users of this software to return to + + Software Distribution Coordinator + School of Computer Science + Carnegie Mellon University + Pittsburgh PA 15213-3890 + + or Software.Distribution at CS.CMU.EDU any improvements or + extensions that they make and grant Carnegie Mellon the rights to + redistribute these changes. + + The file if_ppp.h is under the following CMU license: + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY AND + CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The following license covers the files from Intel's "Highly Optimized + Mathematical Functions for Itanium" collection: + + Intel License Agreement + + Copyright (c) 2000, Intel Corporation + + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * The name of Intel Corporation may not be used to endorse or promote + products derived from this software without specific prior written + permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The files inet/getnameinfo.c and sysdeps/posix/getaddrinfo.c are copyright + (C) by Craig Metz and are distributed under the following license: + + /* The Inner Net License, Version 2.00 + + The author(s) grant permission for redistribution and use in source and + binary forms, with or without modification, of the software and documentation + provided that the following conditions are met: + + 0. If you receive a version of the software that is specifically labelled + as not being for redistribution (check the version message and/or README), + you are not permitted to redistribute that version of the software in any + way or form. + 1. All terms of the all other applicable copyrights and licenses must be + followed. + 2. Redistributions of source code must retain the authors' copyright + notice(s), this list of conditions, and the following disclaimer. + 3. Redistributions in binary form must reproduce the authors' copyright + notice(s), this list of conditions, and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 4. [The copyright holder has authorized the removal of this clause.] + 5. Neither the name(s) of the author(s) nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY ITS AUTHORS AND CONTRIBUTORS ``AS IS'' AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + If these license terms cause you a real problem, contact the author. */ Index: llvm/runtime/GCCLibraries/libc/LICENSE.TXT diff -u llvm/runtime/GCCLibraries/libc/LICENSE.TXT:1.2 llvm/runtime/GCCLibraries/libc/LICENSE.TXT:1.2.22.1 --- llvm/runtime/GCCLibraries/libc/LICENSE.TXT:1.2 Thu Nov 13 12:03:11 2003 +++ llvm/runtime/GCCLibraries/libc/LICENSE.TXT Fri Jul 28 13:40:05 2006 @@ -1,5 +1,8 @@ libc ------------------------------------------------------------------------------ The stripped down C library found in llvm/runtime/GCCLibraries/libc is licensed -to you under the GNU Lesser General Public License (LGPL). +to you under the GNU Lesser General Public License (LGPL). The license, along +with copyright information, is in COPYING.LIB. +Portions of glibc also contain copyrights and licenses from third parties. +Those are listed in LICENSES. From lattner at cs.uiuc.edu Fri Jul 28 15:59:01 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 28 Jul 2006 15:59:01 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/CBackend/Writer.cpp Message-ID: <200607282059.k6SKx14e006380@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/CBackend: Writer.cpp updated: 1.266 -> 1.267 --- Log message: Make functions with an "asm" name propagate that asm name into the cbe.c file. This fixes link errors on programs with these on targets with prefixes. --- Diffs of the changes: (+6 -0) Writer.cpp | 6 ++++++ 1 files changed, 6 insertions(+) Index: llvm/lib/Target/CBackend/Writer.cpp diff -u llvm/lib/Target/CBackend/Writer.cpp:1.266 llvm/lib/Target/CBackend/Writer.cpp:1.267 --- llvm/lib/Target/CBackend/Writer.cpp:1.266 Tue Jun 20 17:11:12 2006 +++ llvm/lib/Target/CBackend/Writer.cpp Fri Jul 28 15:58:47 2006 @@ -921,6 +921,7 @@ "__builtin_prefetch(addr,rw,locality)\n" << "#define __ATTRIBUTE_CTOR__ __attribute__((constructor))\n" << "#define __ATTRIBUTE_DTOR__ __attribute__((destructor))\n" + << "#define LLVM_ASM __asm__\n" << "#else\n" << "#define LLVM_NAN(NanStr) ((double)0.0) /* Double */\n" << "#define LLVM_NANF(NanStr) 0.0F /* Float */\n" @@ -931,6 +932,7 @@ << "#define LLVM_PREFETCH(addr,rw,locality) /* PREFETCH */\n" << "#define __ATTRIBUTE_CTOR__\n" << "#define __ATTRIBUTE_DTOR__\n" + << "#define LLVM_ASM(X)\n" << "#endif\n\n"; // Output target-specific code that should be inserted into main. @@ -1072,6 +1074,10 @@ Out << " __ATTRIBUTE_CTOR__"; if (StaticDtors.count(I)) Out << " __ATTRIBUTE_DTOR__"; + + if (I->hasName() && I->getName()[0] == 1) + Out << " LLVM_ASM(\"" << I->getName().c_str()+1 << "\")"; + Out << ";\n"; } } From lattner at cs.uiuc.edu Fri Jul 28 16:11:45 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 28 Jul 2006 16:11:45 -0500 Subject: [llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/Intercept.cpp Message-ID: <200607282111.k6SLBjnF006629@zion.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine/JIT: Intercept.cpp updated: 1.27 -> 1.28 --- Log message: Fix handling of asm specifiers for external globals. This unbreaks many programs on leopard in the jit. --- Diffs of the changes: (+12 -1) Intercept.cpp | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletion(-) Index: llvm/lib/ExecutionEngine/JIT/Intercept.cpp diff -u llvm/lib/ExecutionEngine/JIT/Intercept.cpp:1.27 llvm/lib/ExecutionEngine/JIT/Intercept.cpp:1.28 --- llvm/lib/ExecutionEngine/JIT/Intercept.cpp:1.27 Wed Jul 26 19:04:14 2006 +++ llvm/lib/ExecutionEngine/JIT/Intercept.cpp Fri Jul 28 16:11:31 2006 @@ -100,9 +100,20 @@ // but print a warning. if (Name == "__main") return (void*)(intptr_t)&__mainFunc; + const char *NameStr = Name.c_str(); + // If this is an asm specifier, skip the sentinal. + if (NameStr[0] == 1) ++NameStr; + // If it's an external function, look it up in the process image... - void *Ptr = sys::DynamicLibrary::SearchForAddressOfSymbol(Name); + void *Ptr = sys::DynamicLibrary::SearchForAddressOfSymbol(NameStr); if (Ptr) return Ptr; + + // If it wasn't found and if it starts with an underscore ('_') character, and + // has an asm specifier, try again without the underscore. + if (Name[0] == 1 && NameStr[0] == '_') { + Ptr = sys::DynamicLibrary::SearchForAddressOfSymbol(NameStr+1); + if (Ptr) return Ptr; + } std::cerr << "ERROR: Program used external function '" << Name << "' which could not be resolved!\n"; From lattner at cs.uiuc.edu Fri Jul 28 16:56:08 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 28 Jul 2006 16:56:08 -0500 Subject: [llvm-commits] CVS: llvm/examples/ModuleMaker/Makefile Message-ID: <200607282156.k6SLu8p4007400@zion.cs.uiuc.edu> Changes in directory llvm/examples/ModuleMaker: Makefile updated: 1.9 -> 1.10 --- Log message: WriteBytecodeToFile throws, so this needs EH info. --- Diffs of the changes: (+1 -0) Makefile | 1 + 1 files changed, 1 insertion(+) Index: llvm/examples/ModuleMaker/Makefile diff -u llvm/examples/ModuleMaker/Makefile:1.9 llvm/examples/ModuleMaker/Makefile:1.10 --- llvm/examples/ModuleMaker/Makefile:1.9 Wed May 31 20:30:26 2006 +++ llvm/examples/ModuleMaker/Makefile Fri Jul 28 16:55:54 2006 @@ -9,6 +9,7 @@ LEVEL=../.. TOOLNAME=ModuleMaker EXAMPLE_TOOL = 1 +REQUIRES_EH = 1 USEDLIBS= LLVMBCWriter.a LLVMCore.a LLVMSupport.a LLVMbzip2.a LLVMSystem.a include $(LEVEL)/Makefile.common From lattner at cs.uiuc.edu Fri Jul 28 17:00:38 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 28 Jul 2006 17:00:38 -0500 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Archive/Makefile Message-ID: <200607282200.k6SM0cgs007516@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Archive: Makefile updated: 1.4 -> 1.5 --- Log message: Exceptions are thrown by and through this library. --- Diffs of the changes: (+1 -0) Makefile | 1 + 1 files changed, 1 insertion(+) Index: llvm/lib/Bytecode/Archive/Makefile diff -u llvm/lib/Bytecode/Archive/Makefile:1.4 llvm/lib/Bytecode/Archive/Makefile:1.5 --- llvm/lib/Bytecode/Archive/Makefile:1.4 Fri Jul 7 15:56:50 2006 +++ llvm/lib/Bytecode/Archive/Makefile Fri Jul 28 17:00:24 2006 @@ -9,6 +9,7 @@ LEVEL = ../../.. LIBRARYNAME = LLVMArchive +REQUIRES_EH := 1 # We only want an archive so only those modules actually used by a tool are # included. From lattner at cs.uiuc.edu Fri Jul 28 17:01:15 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 28 Jul 2006 17:01:15 -0500 Subject: [llvm-commits] CVS: llvm/lib/Support/Makefile Message-ID: <200607282201.k6SM1FdX007563@zion.cs.uiuc.edu> Changes in directory llvm/lib/Support: Makefile updated: 1.10 -> 1.11 --- Log message: libsupport still throws. --- Diffs of the changes: (+1 -0) Makefile | 1 + 1 files changed, 1 insertion(+) Index: llvm/lib/Support/Makefile diff -u llvm/lib/Support/Makefile:1.10 llvm/lib/Support/Makefile:1.11 --- llvm/lib/Support/Makefile:1.10 Sun Oct 23 21:25:48 2005 +++ llvm/lib/Support/Makefile Fri Jul 28 17:01:01 2006 @@ -11,5 +11,6 @@ PARALLEL_DIRS=bzip2 LIBRARYNAME = LLVMSupport BUILD_ARCHIVE = 1 +REQUIRES_EH := 1 include $(LEVEL)/Makefile.common From lattner at cs.uiuc.edu Fri Jul 28 17:04:07 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 28 Jul 2006 17:04:07 -0500 Subject: [llvm-commits] CVS: llvm/lib/System/Unix/Path.inc Message-ID: <200607282204.k6SM47WO007688@zion.cs.uiuc.edu> Changes in directory llvm/lib/System/Unix: Path.inc updated: 1.45 -> 1.46 --- Log message: Change Path::getStatusInfo to return a boolean and error string on an error instead of throwing an exception. This reduces the amount of code that is exposed to exceptions (e.g. FileUtilities), though it is clearly only one step along the way. --- Diffs of the changes: (+15 -15) Path.inc | 30 +++++++++++++++--------------- 1 files changed, 15 insertions(+), 15 deletions(-) Index: llvm/lib/System/Unix/Path.inc diff -u llvm/lib/System/Unix/Path.inc:1.45 llvm/lib/System/Unix/Path.inc:1.46 --- llvm/lib/System/Unix/Path.inc:1.45 Fri Jul 7 16:21:06 2006 +++ llvm/lib/System/Unix/Path.inc Fri Jul 28 17:03:44 2006 @@ -386,21 +386,22 @@ return path.substr(pos+1); } -void -Path::getStatusInfo(StatusInfo& info) const { +bool +Path::getFileStatus(FileStatus &info, std::string *ErrStr) const { struct stat buf; - if (0 != stat(path.c_str(), &buf)) { - ThrowErrno(path + ": can't determine type of path object: "); - } + if (0 != stat(path.c_str(), &buf)) + return GetErrno(path + ": can't determine type of path object: ", ErrStr); info.fileSize = buf.st_size; info.modTime.fromEpochTime(buf.st_mtime); info.mode = buf.st_mode; info.user = buf.st_uid; info.group = buf.st_gid; - info.isDir = S_ISDIR(buf.st_mode); + info.isDir = S_ISDIR(buf.st_mode); + info.isFile = S_ISREG(buf.st_mode); + return false; } -static bool AddPermissionBits(const std::string& Filename, int bits) { +static bool AddPermissionBits(const Path &File, int bits) { // Get the umask value from the operating system. We want to use it // when changing the file's permissions. Since calling umask() sets // the umask and returns its old value, we must call it a second @@ -409,30 +410,29 @@ umask(mask); // Restore the umask. // Get the file's current mode. - struct stat st; - if ((stat(Filename.c_str(), &st)) == -1) - return false; + FileStatus Stat; + if (File.getFileStatus(Stat)) return false; // Change the file to have whichever permissions bits from 'bits' // that the umask would not disable. - if ((chmod(Filename.c_str(), (st.st_mode | (bits & ~mask)))) == -1) + if ((chmod(File.c_str(), (Stat.getMode() | (bits & ~mask)))) == -1) return false; return true; } void Path::makeReadableOnDisk() { - if (!AddPermissionBits(path,0444)) + if (!AddPermissionBits(*this, 0444)) ThrowErrno(path + ": can't make file readable"); } void Path::makeWriteableOnDisk() { - if (!AddPermissionBits(path,0222)) + if (!AddPermissionBits(*this, 0222)) ThrowErrno(path + ": can't make file writable"); } void Path::makeExecutableOnDisk() { - if (!AddPermissionBits(path,0111)) + if (!AddPermissionBits(*this, 0111)) ThrowErrno(path + ": can't make file executable"); } @@ -642,7 +642,7 @@ } bool -Path::setStatusInfoOnDisk(const StatusInfo& si) const { +Path::setStatusInfoOnDisk(const FileStatus &si) const { struct utimbuf utb; utb.actime = si.modTime.toPosixTime(); utb.modtime = utb.actime; From lattner at cs.uiuc.edu Fri Jul 28 17:04:08 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 28 Jul 2006 17:04:08 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Bytecode/Archive.h Message-ID: <200607282204.k6SM486d007698@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Bytecode: Archive.h updated: 1.16 -> 1.17 --- Log message: Change Path::getStatusInfo to return a boolean and error string on an error instead of throwing an exception. This reduces the amount of code that is exposed to exceptions (e.g. FileUtilities), though it is clearly only one step along the way. --- Diffs of the changes: (+9 -10) Archive.h | 19 +++++++++---------- 1 files changed, 9 insertions(+), 10 deletions(-) Index: llvm/include/llvm/Bytecode/Archive.h diff -u llvm/include/llvm/Bytecode/Archive.h:1.16 llvm/include/llvm/Bytecode/Archive.h:1.17 --- llvm/include/llvm/Bytecode/Archive.h:1.16 Fri Jul 7 15:56:50 2006 +++ llvm/include/llvm/Bytecode/Archive.h Fri Jul 28 17:03:43 2006 @@ -40,7 +40,6 @@ /// of the Archive class instead. /// @brief This class represents a single archive member. class ArchiveMember { - /// @name Types /// @{ public: @@ -75,28 +74,28 @@ /// have any applicability on non-Unix systems but is a required component /// of the "ar" file format. /// @brief Get the user associated with this archive member. - unsigned getUser() const { return info.user; } + unsigned getUser() const { return info.getUser(); } /// The "group" is the owning group of the file per Unix security. This /// may not have any applicability on non-Unix systems but is a required /// component of the "ar" file format. /// @brief Get the group associated with this archive member. - unsigned getGroup() const { return info.group; } + unsigned getGroup() const { return info.getGroup(); } /// The "mode" specifies the access permissions for the file per Unix /// security. This may not have any applicabiity on non-Unix systems but is /// a required component of the "ar" file format. /// @brief Get the permission mode associated with this archive member. - unsigned getMode() const { return info.mode; } + unsigned getMode() const { return info.getMode(); } /// This method returns the time at which the archive member was last /// modified when it was not in the archive. /// @brief Get the time of last modification of the archive member. - sys::TimeValue getModTime() const { return info.modTime; } + sys::TimeValue getModTime() const { return info.getTimestamp(); } /// @returns the size of the archive member in bytes. /// @brief Get the size of the archive member. - unsigned getSize() const { return info.fileSize; } + unsigned getSize() const { return info.getSize(); } /// This method returns the total size of the archive member as it /// appears on disk. This includes the file content, the header, the @@ -162,14 +161,14 @@ /// systems. /// @returns the status info for the archive member /// @brief Obtain the status info for the archive member - const sys::Path::StatusInfo& getStatusInfo() const { return info; } + const sys::FileStatus &getFileStatus() const { return info; } /// This method causes the archive member to be replaced with the contents /// of the file specified by \p File. The contents of \p this will be /// updated to reflect the new data from \p File. The \p File must exist and /// be readable on entry to this method. /// @brief Replace contents of archive member with a new file. - void replaceWith(const sys::Path& aFile); + void replaceWith(const sys::Path &aFile); /// @} /// @name ilist methods - do not use @@ -190,7 +189,7 @@ ArchiveMember* prev; ///< Pointer to previous archive member Archive* parent; ///< Pointer to parent archive sys::Path path; ///< Path of file containing the member - sys::Path::StatusInfo info; ///< Status info (size,mode,date) + sys::FileStatus info; ///< Status info (size,mode,date) unsigned flags; ///< Flags about the archive member const void* data; ///< Data for the member @@ -205,7 +204,7 @@ private: /// Used internally by the Archive class to construct an ArchiveMember. /// The contents of the ArchiveMember are filled out by the Archive class. - ArchiveMember( Archive* PAR ); + ArchiveMember(Archive *PAR); // So Archive can construct an ArchiveMember friend class llvm::Archive; From lattner at cs.uiuc.edu Fri Jul 28 17:04:09 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 28 Jul 2006 17:04:09 -0500 Subject: [llvm-commits] CVS: llvm/lib/Debugger/ProgramInfo.cpp Message-ID: <200607282204.k6SM49Kh007703@zion.cs.uiuc.edu> Changes in directory llvm/lib/Debugger: ProgramInfo.cpp updated: 1.16 -> 1.17 --- Log message: Change Path::getStatusInfo to return a boolean and error string on an error instead of throwing an exception. This reduces the amount of code that is exposed to exceptions (e.g. FileUtilities), though it is clearly only one step along the way. --- Diffs of the changes: (+3 -2) ProgramInfo.cpp | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) Index: llvm/lib/Debugger/ProgramInfo.cpp diff -u llvm/lib/Debugger/ProgramInfo.cpp:1.16 llvm/lib/Debugger/ProgramInfo.cpp:1.17 --- llvm/lib/Debugger/ProgramInfo.cpp:1.16 Thu Jul 6 17:34:06 2006 +++ llvm/lib/Debugger/ProgramInfo.cpp Fri Jul 28 17:03:44 2006 @@ -196,8 +196,9 @@ ProgramInfo::ProgramInfo(Module *m) : M(m), ProgramTimeStamp(0,0) { assert(M && "Cannot create program information with a null module!"); - sys::Path modulePath(M->getModuleIdentifier()); - ProgramTimeStamp = modulePath.getTimestamp(); + sys::FileStatus Stat; + if (!sys::Path(M->getModuleIdentifier()).getFileStatus(Stat)) + ProgramTimeStamp = Stat.getTimestamp(); SourceFilesIsComplete = false; SourceFunctionsIsComplete = false; From lattner at cs.uiuc.edu Fri Jul 28 17:04:08 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 28 Jul 2006 17:04:08 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvm-ar/llvm-ar.cpp Message-ID: <200607282204.k6SM48t0007693@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-ar: llvm-ar.cpp updated: 1.32 -> 1.33 --- Log message: Change Path::getStatusInfo to return a boolean and error string on an error instead of throwing an exception. This reduces the amount of code that is exposed to exceptions (e.g. FileUtilities), though it is clearly only one step along the way. --- Diffs of the changes: (+9 -5) llvm-ar.cpp | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) Index: llvm/tools/llvm-ar/llvm-ar.cpp diff -u llvm/tools/llvm-ar/llvm-ar.cpp:1.32 llvm/tools/llvm-ar/llvm-ar.cpp:1.33 --- llvm/tools/llvm-ar/llvm-ar.cpp:1.32 Fri Jul 7 14:09:14 2006 +++ llvm/tools/llvm-ar/llvm-ar.cpp Fri Jul 28 17:03:44 2006 @@ -299,8 +299,10 @@ if (checkExistence) { if (!aPath.exists()) throw std::string("File does not exist: ") + Members[i]; - sys::Path::StatusInfo si; - aPath.getStatusInfo(si); + sys::FileStatus si; + std::string Err; + if (aPath.getFileStatus(si, &Err)) + throw Err; if (si.isDir) { std::set dirpaths = recurseDirectories(aPath); Paths.insert(dirpaths.begin(),dirpaths.end()); @@ -456,7 +458,7 @@ // If we're supposed to retain the original modification times, etc. do so // now. if (OriginalDates) - I->getPath().setStatusInfoOnDisk(I->getStatusInfo()); + I->getPath().setStatusInfoOnDisk(I->getFileStatus()); } } } @@ -610,8 +612,10 @@ } if (found != remaining.end()) { - sys::Path::StatusInfo si; - found->getStatusInfo(si); + sys::FileStatus si; + std::string Err; + if (found->getFileStatus(si, &Err)) + throw Err; if (si.isDir) { if (OnlyUpdate) { // Replace the item only if it is newer. From lattner at cs.uiuc.edu Fri Jul 28 17:04:09 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 28 Jul 2006 17:04:09 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvm-db/Commands.cpp Message-ID: <200607282204.k6SM49XB007708@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-db: Commands.cpp updated: 1.9 -> 1.10 --- Log message: Change Path::getStatusInfo to return a boolean and error string on an error instead of throwing an exception. This reduces the amount of code that is exposed to exceptions (e.g. FileUtilities), though it is clearly only one step along the way. --- Diffs of the changes: (+6 -2) Commands.cpp | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) Index: llvm/tools/llvm-db/Commands.cpp diff -u llvm/tools/llvm-db/Commands.cpp:1.9 llvm/tools/llvm-db/Commands.cpp:1.10 --- llvm/tools/llvm-db/Commands.cpp:1.9 Thu Apr 21 18:59:36 2005 +++ llvm/tools/llvm-db/Commands.cpp Fri Jul 28 17:03:44 2006 @@ -49,8 +49,12 @@ eliminateRunInfo(); // If the program has been modified, reload it! - sys::Path Program (Dbg.getProgramPath()); - if (TheProgramInfo->getProgramTimeStamp() != Program.getTimestamp()) { + sys::Path Program(Dbg.getProgramPath()); + sys::FileStatus Status; + std::string Err; + if (Program.getFileStatus(Status, &Err)) + throw Err; + if (TheProgramInfo->getProgramTimeStamp() != Status.getTimestamp()) { std::cout << "'" << Program << "' has changed; re-reading program.\n"; // Unload an existing program. This kills the program if necessary. From lattner at cs.uiuc.edu Fri Jul 28 17:04:10 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 28 Jul 2006 17:04:10 -0500 Subject: [llvm-commits] CVS: llvm/lib/Support/FileUtilities.cpp Message-ID: <200607282204.k6SM4Auf007715@zion.cs.uiuc.edu> Changes in directory llvm/lib/Support: FileUtilities.cpp updated: 1.47 -> 1.48 --- Log message: Change Path::getStatusInfo to return a boolean and error string on an error instead of throwing an exception. This reduces the amount of code that is exposed to exceptions (e.g. FileUtilities), though it is clearly only one step along the way. --- Diffs of the changes: (+16 -12) FileUtilities.cpp | 28 ++++++++++++++++------------ 1 files changed, 16 insertions(+), 12 deletions(-) Index: llvm/lib/Support/FileUtilities.cpp diff -u llvm/lib/Support/FileUtilities.cpp:1.47 llvm/lib/Support/FileUtilities.cpp:1.48 --- llvm/lib/Support/FileUtilities.cpp:1.47 Mon May 15 17:12:42 2006 +++ llvm/lib/Support/FileUtilities.cpp Fri Jul 28 17:03:44 2006 @@ -146,19 +146,23 @@ const sys::Path &FileB, double AbsTol, double RelTol, std::string *Error) { - try { - // Check for zero length files because some systems croak when you try to - // mmap an empty file. - size_t A_size = FileA.getSize(); - size_t B_size = FileB.getSize(); - - // If they are both zero sized then they're the same - if (A_size == 0 && B_size == 0) - return 0; - // If only one of them is zero sized then they can't be the same - if ((A_size == 0 || B_size == 0)) - return 1; + sys::FileStatus FileAStat, FileBStat; + if (FileA.getFileStatus(FileAStat, Error) || + FileB.getFileStatus(FileBStat, Error)) + return 2; + // Check for zero length files because some systems croak when you try to + // mmap an empty file. + size_t A_size = FileAStat.getSize(); + size_t B_size = FileBStat.getSize(); + + // If they are both zero sized then they're the same + if (A_size == 0 && B_size == 0) + return 0; + // If only one of them is zero sized then they can't be the same + if ((A_size == 0 || B_size == 0)) + return 1; + try { // Now its safe to mmap the files into memory becasue both files // have a non-zero size. sys::MappedFile F1(FileA); From lattner at cs.uiuc.edu Fri Jul 28 17:04:11 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 28 Jul 2006 17:04:11 -0500 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Archive/Archive.cpp ArchiveWriter.cpp Message-ID: <200607282204.k6SM4Bvg007725@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Archive: Archive.cpp updated: 1.11 -> 1.12 ArchiveWriter.cpp updated: 1.23 -> 1.24 --- Log message: Change Path::getStatusInfo to return a boolean and error string on an error instead of throwing an exception. This reduces the amount of code that is exposed to exceptions (e.g. FileUtilities), though it is clearly only one step along the way. --- Diffs of the changes: (+7 -3) Archive.cpp | 6 ++++-- ArchiveWriter.cpp | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) Index: llvm/lib/Bytecode/Archive/Archive.cpp diff -u llvm/lib/Bytecode/Archive/Archive.cpp:1.11 llvm/lib/Bytecode/Archive/Archive.cpp:1.12 --- llvm/lib/Bytecode/Archive/Archive.cpp:1.11 Sat May 6 18:25:53 2006 +++ llvm/lib/Bytecode/Archive/Archive.cpp Fri Jul 28 17:03:44 2006 @@ -104,12 +104,14 @@ flags &= ~HasLongFilenameFlag; // Get the signature and status info - std::string magic; const char* signature = (const char*) data; + std::string magic; if (!signature) { path.getMagicNumber(magic,4); signature = magic.c_str(); - path.getStatusInfo(info); + std::string err; + if (path.getFileStatus(info, &err)) + throw err; } // Determine what kind of file it is Index: llvm/lib/Bytecode/Archive/ArchiveWriter.cpp diff -u llvm/lib/Bytecode/Archive/ArchiveWriter.cpp:1.23 llvm/lib/Bytecode/Archive/ArchiveWriter.cpp:1.24 --- llvm/lib/Bytecode/Archive/ArchiveWriter.cpp:1.23 Fri Jul 7 15:56:50 2006 +++ llvm/lib/Bytecode/Archive/ArchiveWriter.cpp Fri Jul 28 17:03:44 2006 @@ -159,7 +159,9 @@ mbr->data = 0; mbr->path = filePath; - mbr->path.getStatusInfo(mbr->info); + std::string err; + if (mbr->path.getFileStatus(mbr->info, &err)) + throw err; unsigned flags = 0; bool hasSlash = filePath.toString().find('/') != std::string::npos; From lattner at cs.uiuc.edu Fri Jul 28 17:04:10 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 28 Jul 2006 17:04:10 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/System/Path.h Message-ID: <200607282204.k6SM4AmH007713@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/System: Path.h updated: 1.31 -> 1.32 --- Log message: Change Path::getStatusInfo to return a boolean and error string on an error instead of throwing an exception. This reduces the amount of code that is exposed to exceptions (e.g. FileUtilities), though it is clearly only one step along the way. --- Diffs of the changes: (+44 -56) Path.h | 100 ++++++++++++++++++++++++++++------------------------------------- 1 files changed, 44 insertions(+), 56 deletions(-) Index: llvm/include/llvm/System/Path.h diff -u llvm/include/llvm/System/Path.h:1.31 llvm/include/llvm/System/Path.h:1.32 --- llvm/include/llvm/System/Path.h:1.31 Wed Jul 26 11:55:39 2006 +++ llvm/include/llvm/System/Path.h Fri Jul 28 17:03:44 2006 @@ -24,6 +24,35 @@ namespace llvm { namespace sys { + /// This structure provides basic file system information about a file. It + /// is patterned after the stat(2) Unix operating system call but made + /// platform independent and eliminates many of the unix-specific fields. + /// However, to support llvm-ar, the mode, user, and group fields are + /// retained. These pertain to unix security and may not have a meaningful + /// value on non-Unix platforms. However, the fileSize and modTime fields + /// should always be applicable on all platforms. The structure is + /// filled in by the Path::getFileStatus method. + /// @brief File status structure + class FileStatus { + public: + uint64_t fileSize; ///< Size of the file in bytes + TimeValue modTime; ///< Time of file's modification + uint32_t mode; ///< Mode of the file, if applicable + uint32_t user; ///< User ID of owner, if applicable + uint32_t group; ///< Group ID of owner, if applicable + bool isDir : 1; ///< True if this is a directory. + bool isFile : 1; ///< True if this is a file. + + FileStatus() : fileSize(0), modTime(0,0), mode(0777), user(999), + group(999), isDir(false) { } + + TimeValue getTimestamp() const { return modTime; } + size_t getSize() const { return fileSize; } + uint32_t getMode() const { return mode; } + uint32_t getUser() const { return user; } + uint32_t getGroup() const { return group; } + }; + /// This class provides an abstraction for the path to a file or directory /// in the operating system's filesystem and provides various basic operations /// on it. Note that this class only represents the name of a path to a file @@ -53,30 +82,6 @@ /// @since 1.4 /// @brief An abstraction for operating system paths. class Path { - /// @name Types - /// @{ - public: - /// This structure provides basic file system information about a file. It - /// is patterned after the stat(2) Unix operating system call but made - /// platform independent and eliminates many of the unix-specific fields. - /// However, to support llvm-ar, the mode, user, and group fields are - /// retained. These pertain to unix security and may not have a meaningful - /// value on non-Unix platforms. However, the fileSize and modTime fields - /// should always be applicabe on all platforms. The structure is - /// filled in by the getStatusInfo method. - /// @brief File status structure - struct StatusInfo { - StatusInfo() : fileSize(0), modTime(0,0), mode(0777), user(999), - group(999), isDir(false) { } - uint64_t fileSize; ///< Size of the file in bytes - TimeValue modTime; ///< Time of file's modification - uint32_t mode; ///< Mode of the file, if applicable - uint32_t user; ///< User ID of owner, if applicable - uint32_t group; ///< Group ID of owner, if applicable - bool isDir; ///< True if this is a directory. - }; - - /// @} /// @name Constructors /// @{ public: @@ -175,7 +180,7 @@ /// Makes a copy of \p that to \p this. /// @returns \p this /// @brief Assignment Operator - Path & operator = ( const Path & that ) { + Path &operator=(const Path &that) { path = that.path; return *this; } @@ -183,15 +188,15 @@ /// Compares \p this Path with \p that Path for equality. /// @returns true if \p this and \p that refer to the same thing. /// @brief Equality Operator - bool operator == (const Path& that) const { - return 0 == path.compare(that.path) ; + bool operator==(const Path &that) const { + return 0 == path.compare(that.path); } /// Compares \p this Path with \p that Path for inequality. /// @returns true if \p this and \p that refer to different things. /// @brief Inequality Operator - bool operator !=( const Path & that ) const { - return 0 != path.compare( that.path ); + bool operator!=(const Path &that) const { + return 0 != path.compare(that.path); } /// Determines if \p this Path is less than \p that Path. This is required @@ -200,8 +205,8 @@ /// the std::string::compare method. /// @returns true if \p this path is lexicographically less than \p that. /// @brief Less Than Operator - bool operator< (const Path& that) const { - return 0 > path.compare( that.path ); + bool operator<(const Path& that) const { + return 0 > path.compare(that.path); } /// @} @@ -228,7 +233,7 @@ /// std::string. This allows the underlying path string to be manipulated. /// @returns std::string containing the path name. /// @brief Returns the path as a std::string. - const std::string& toString() const { return path; } + const std::string &toString() const { return path; } /// This function returns the last component of the path name. The last /// component is the file or directory name occuring after the last @@ -248,7 +253,7 @@ /// Obtain a 'C' string for the path name. /// @returns a 'C' string containing the path name. /// @brief Returns the path as a C string. - const char* const c_str() const { return path.c_str(); } + const char *const c_str() const { return path.c_str(); } /// @} /// @name Disk Accessors @@ -362,31 +367,14 @@ /// @returns false if \p this is not a directory, true otherwise /// @throws std::string if the directory cannot be searched /// @brief Build a list of directory's contents. - bool getDirectoryContents(std::set& paths) const; + bool getDirectoryContents(std::set &paths) const; /// This function returns status information about the file. The type of /// path (file or directory) is updated to reflect the actual contents - /// of the file system. If the file does not exist, false is returned. - /// For other (hard I/O) errors, a std::string is thrown indicating the - /// problem. - /// @throws std::string if an error occurs. + /// of the file system. This returns false on success, or true on error + /// and fills in the specified error string if specified. /// @brief Get file status. - void getStatusInfo(StatusInfo& info) const; - - /// This function returns the last modified time stamp for the file - /// referenced by this path. The Path may reference a file or a directory. - /// If the file does not exist, a ZeroTime timestamp is returned. - /// @returns last modified timestamp of the file/directory or ZeroTime - /// @brief Get file timestamp. - inline TimeValue getTimestamp() const { - StatusInfo info; getStatusInfo(info); return info.modTime; - } - - /// This function returns the size of the file referenced by this path. - /// @brief Get file size. - inline size_t getSize() const { - StatusInfo info; getStatusInfo(info); return info.fileSize; - } + bool getFileStatus(FileStatus &Status, std::string *Error = 0) const; /// @} /// @name Path Mutators @@ -475,7 +463,7 @@ /// @throws std::string if an error occurs. /// @returns true /// @brief Set the status information. - bool setStatusInfoOnDisk(const StatusInfo& si) const; + bool setStatusInfoOnDisk(const FileStatus &SI) const; /// This method attempts to create a directory in the file system with the /// same name as the Path object. The \p create_parents parameter controls @@ -538,7 +526,7 @@ /// refers to something that is neither a file nor a directory. /// @throws std::string if there is an error. /// @brief Removes the file or directory from the filesystem. - bool eraseFromDisk( bool destroy_contents = false ) const; + bool eraseFromDisk(bool destroy_contents = false) const; /// @} /// @name Data From lattner at cs.uiuc.edu Fri Jul 28 17:08:08 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 28 Jul 2006 17:08:08 -0500 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Writer/Writer.cpp Message-ID: <200607282208.k6SM88fQ007867@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Writer: Writer.cpp updated: 1.122 -> 1.123 --- Log message: formatting cleanups --- Diffs of the changes: (+11 -12) Writer.cpp | 23 +++++++++++------------ 1 files changed, 11 insertions(+), 12 deletions(-) Index: llvm/lib/Bytecode/Writer/Writer.cpp diff -u llvm/lib/Bytecode/Writer/Writer.cpp:1.122 llvm/lib/Bytecode/Writer/Writer.cpp:1.123 --- llvm/lib/Bytecode/Writer/Writer.cpp:1.122 Wed Jun 7 18:18:33 2006 +++ llvm/lib/Bytecode/Writer/Writer.cpp Fri Jul 28 17:07:54 2006 @@ -131,7 +131,7 @@ inline void BytecodeWriter::output(const std::string &s) { unsigned Len = s.length(); - output_vbr(Len ); // Strings may have an arbitrary length... + output_vbr(Len); // Strings may have an arbitrary length. Out.insert(Out.end(), s.begin(), s.end()); } @@ -143,8 +143,8 @@ /// FIXME: This isn't optimal, it has size problems on some platforms /// where FP is not IEEE. uint32_t i = FloatToBits(FloatVal); - Out.push_back( static_cast( (i & 0xFF ))); - Out.push_back( static_cast( (i >> 8) & 0xFF)); + Out.push_back( static_cast( (i ) & 0xFF)); + Out.push_back( static_cast( (i >> 8 ) & 0xFF)); Out.push_back( static_cast( (i >> 16) & 0xFF)); Out.push_back( static_cast( (i >> 24) & 0xFF)); } @@ -153,8 +153,8 @@ /// FIXME: This isn't optimal, it has size problems on some platforms /// where FP is not IEEE. uint64_t i = DoubleToBits(DoubleVal); - Out.push_back( static_cast( (i & 0xFF ))); - Out.push_back( static_cast( (i >> 8) & 0xFF)); + Out.push_back( static_cast( (i ) & 0xFF)); + Out.push_back( static_cast( (i >> 8 ) & 0xFF)); Out.push_back( static_cast( (i >> 16) & 0xFF)); Out.push_back( static_cast( (i >> 24) & 0xFF)); Out.push_back( static_cast( (i >> 32) & 0xFF)); @@ -800,7 +800,7 @@ : Out(o), Table(M) { // Emit the signature... - static const unsigned char *Sig = (const unsigned char*)"llvm"; + static const unsigned char *Sig = (const unsigned char*)"llvm"; output_data(Sig, Sig+4); // Emit the top level CLASS block. @@ -820,8 +820,8 @@ // The Global type plane comes first { - BytecodeBlock CPool(BytecodeFormat::GlobalTypePlaneBlockID, *this ); - outputTypes(Type::FirstDerivedTyID); + BytecodeBlock CPool(BytecodeFormat::GlobalTypePlaneBlockID, *this); + outputTypes(Type::FirstDerivedTyID); } // The ModuleInfoBlock follows directly after the type information @@ -1133,7 +1133,7 @@ // The compaction types may have been uncompactified back to the // global types. If so, we just write an empty table - if (CTypes.size() == 0 ) { + if (CTypes.size() == 0) { output_vbr(0U); return; } @@ -1180,7 +1180,7 @@ // Write each of the types for (SymbolTable::type_const_iterator TI = MST.type_begin(), - TE = MST.type_end(); TI != TE; ++TI ) { + TE = MST.type_end(); TI != TE; ++TI) { // Symtab entry:[def slot #][name] output_typeid((unsigned)Table.getSlot(TI->second)); output(TI->first); @@ -1215,7 +1215,7 @@ } void llvm::WriteBytecodeToFile(const Module *M, std::ostream &Out, - bool compress ) { + bool compress) { assert(M && "You can't write a null module!!"); // Make sure that std::cout is put into binary mode for systems @@ -1271,4 +1271,3 @@ // make sure it hits disk now Out.flush(); } - From lattner at cs.uiuc.edu Fri Jul 28 17:08:37 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 28 Jul 2006 17:08:37 -0500 Subject: [llvm-commits] CVS: llvm/examples/ModuleMaker/Makefile ModuleMaker.cpp Message-ID: <200607282208.k6SM8bKL007905@zion.cs.uiuc.edu> Changes in directory llvm/examples/ModuleMaker: Makefile updated: 1.10 -> 1.11 ModuleMaker.cpp updated: 1.7 -> 1.8 --- Log message: WriteBytecodeToFile actually can't throw. --- Diffs of the changes: (+1 -7) Makefile | 1 - ModuleMaker.cpp | 7 +------ 2 files changed, 1 insertion(+), 7 deletions(-) Index: llvm/examples/ModuleMaker/Makefile diff -u llvm/examples/ModuleMaker/Makefile:1.10 llvm/examples/ModuleMaker/Makefile:1.11 --- llvm/examples/ModuleMaker/Makefile:1.10 Fri Jul 28 16:55:54 2006 +++ llvm/examples/ModuleMaker/Makefile Fri Jul 28 17:08:23 2006 @@ -9,7 +9,6 @@ LEVEL=../.. TOOLNAME=ModuleMaker EXAMPLE_TOOL = 1 -REQUIRES_EH = 1 USEDLIBS= LLVMBCWriter.a LLVMCore.a LLVMSupport.a LLVMbzip2.a LLVMSystem.a include $(LEVEL)/Makefile.common Index: llvm/examples/ModuleMaker/ModuleMaker.cpp diff -u llvm/examples/ModuleMaker/ModuleMaker.cpp:1.7 llvm/examples/ModuleMaker/ModuleMaker.cpp:1.8 --- llvm/examples/ModuleMaker/ModuleMaker.cpp:1.7 Sun May 14 14:08:39 2006 +++ llvm/examples/ModuleMaker/ModuleMaker.cpp Fri Jul 28 17:08:23 2006 @@ -54,12 +54,7 @@ BB->getInstList().push_back(new ReturnInst(Add)); // Output the bytecode file to stdout - try { - WriteBytecodeToFile(M, std::cout); - } catch (const std::string &Error) { - std::cerr << "Error writing file: " << Error << "\n"; - return 1; - } + WriteBytecodeToFile(M, std::cout); // Delete the module and all of its contents. delete M; From lattner at cs.uiuc.edu Fri Jul 28 17:09:51 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 28 Jul 2006 17:09:51 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Bytecode/Writer.h Message-ID: <200607282209.k6SM9pcp007972@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Bytecode: Writer.h updated: 1.10 -> 1.11 --- Log message: Update comments. --- Diffs of the changes: (+3 -13) Writer.h | 16 +++------------- 1 files changed, 3 insertions(+), 13 deletions(-) Index: llvm/include/llvm/Bytecode/Writer.h diff -u llvm/include/llvm/Bytecode/Writer.h:1.10 llvm/include/llvm/Bytecode/Writer.h:1.11 --- llvm/include/llvm/Bytecode/Writer.h:1.10 Sun May 14 14:10:22 2006 +++ llvm/include/llvm/Bytecode/Writer.h Fri Jul 28 17:09:37 2006 @@ -7,17 +7,8 @@ // //===----------------------------------------------------------------------===// // -// This functionality is implemented by the lib/BytecodeWriter library. -// This library is used to write VM bytecode files to an iostream. First, you -// have to make a BytecodeStream object, which you can then put a class into -// by using operator <<. -// -// This library uses the Analysis library to figure out offsets for -// variables in the method tables... -// -// Note that performance of this library is not as crucial as performance of the -// bytecode reader (which is to be used in JIT type applications), so we have -// designed the bytecode format to support quick reading. +// This functionality is implemented by the lib/Bytecode/Writer library. +// This library is used to write bytecode files to an iostream. // //===----------------------------------------------------------------------===// @@ -30,8 +21,7 @@ class Module; /// WriteBytecodeToFile - Write the specified module to the specified output /// stream. If compress is set to true, try to use compression when writing - /// out the file. This throws an std::string if there is an error writing - /// the file. + /// out the file. This can never fail if M is a well-formed module. void WriteBytecodeToFile(const Module *M, std::ostream &Out, bool compress = true); } // End llvm namespace From lattner at cs.uiuc.edu Fri Jul 28 17:21:16 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 28 Jul 2006 17:21:16 -0500 Subject: [llvm-commits] CVS: llvm/lib/Support/GraphWriter.cpp Message-ID: <200607282221.k6SMLGA3008197@zion.cs.uiuc.edu> Changes in directory llvm/lib/Support: GraphWriter.cpp updated: 1.1 -> 1.2 --- Log message: Finegrainify namespacification, minor cleanups --- Diffs of the changes: (+2 -8) GraphWriter.cpp | 10 ++-------- 1 files changed, 2 insertions(+), 8 deletions(-) Index: llvm/lib/Support/GraphWriter.cpp diff -u llvm/lib/Support/GraphWriter.cpp:1.1 llvm/lib/Support/GraphWriter.cpp:1.2 --- llvm/lib/Support/GraphWriter.cpp:1.1 Tue Jun 27 11:49:46 2006 +++ llvm/lib/Support/GraphWriter.cpp Fri Jul 28 17:21:01 2006 @@ -11,18 +11,14 @@ // //===----------------------------------------------------------------------===// +#include "llvm/Support/GraphWriter.h" #include "llvm/System/Path.h" #include "llvm/System/Program.h" #include "llvm/Config/config.h" - #include - using namespace llvm; -namespace llvm { - -void DisplayGraph(const sys::Path& Filename) -{ +void llvm::DisplayGraph(const sys::Path &Filename) { #if HAVE_GRAPHVIZ sys::Path Graphviz(LLVM_PATH_GRAPHVIZ); @@ -85,5 +81,3 @@ Filename.eraseFromDisk(); } - -} // End llvm namespace From lattner at cs.uiuc.edu Fri Jul 28 17:30:07 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 28 Jul 2006 17:30:07 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Support/FileUtilities.h Message-ID: <200607282230.k6SMU7nF008447@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Support: FileUtilities.h updated: 1.33 -> 1.34 --- Log message: Modify Path::eraseFromDisk to not throw an exception. --- Diffs of the changes: (+4 -4) FileUtilities.h | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) Index: llvm/include/llvm/Support/FileUtilities.h diff -u llvm/include/llvm/Support/FileUtilities.h:1.33 llvm/include/llvm/Support/FileUtilities.h:1.34 --- llvm/include/llvm/Support/FileUtilities.h:1.33 Thu Jul 7 22:08:58 2005 +++ llvm/include/llvm/Support/FileUtilities.h Fri Jul 28 17:29:50 2006 @@ -43,10 +43,10 @@ : Filename(filename), DeleteIt(deleteIt) {} ~FileRemover() { - if (DeleteIt) - try { - Filename.eraseFromDisk(); - } catch (...) {} // Ignore problems deleting the file. + if (DeleteIt) { + // Ignore problems deleting the file. + Filename.eraseFromDisk(); + } } /// releaseFile - Take ownership of the file away from the FileRemover so it From lattner at cs.uiuc.edu Fri Jul 28 17:30:07 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 28 Jul 2006 17:30:07 -0500 Subject: [llvm-commits] CVS: llvm/lib/System/Unix/Path.inc Message-ID: <200607282230.k6SMU7nP008452@zion.cs.uiuc.edu> Changes in directory llvm/lib/System/Unix: Path.inc updated: 1.46 -> 1.47 --- Log message: Modify Path::eraseFromDisk to not throw an exception. --- Diffs of the changes: (+29 -24) Path.inc | 53 +++++++++++++++++++++++++++++------------------------ 1 files changed, 29 insertions(+), 24 deletions(-) Index: llvm/lib/System/Unix/Path.inc diff -u llvm/lib/System/Unix/Path.inc:1.46 llvm/lib/System/Unix/Path.inc:1.47 --- llvm/lib/System/Unix/Path.inc:1.46 Fri Jul 28 17:03:44 2006 +++ llvm/lib/System/Unix/Path.inc Fri Jul 28 17:29:50 2006 @@ -604,33 +604,38 @@ } bool -Path::eraseFromDisk(bool remove_contents) const { - // Make sure we're dealing with a directory +Path::eraseFromDisk(bool remove_contents, std::string *ErrStr) const { + // Make sure we're dealing with a directory. if (isFile()) { - if (0 != unlink(path.c_str())) - ThrowErrno(path + ": can't destroy file"); - } else if (isDirectory()) { - if (remove_contents) { - // Recursively descend the directory to remove its content - std::string cmd("/bin/rm -rf "); - cmd += path; - system(cmd.c_str()); - } else { - // Otherwise, try to just remove the one directory - char pathname[MAXPATHLEN]; - path.copy(pathname,MAXPATHLEN); - int lastchar = path.length() - 1 ; - if (pathname[lastchar] == '/') - pathname[lastchar] = 0; - else - pathname[lastchar+1] = 0; - if ( 0 != rmdir(pathname)) - ThrowErrno(std::string(pathname) + ": can't destroy directory"); - } + if (unlink(path.c_str()) != 0) + return GetErrno(path + ": can't destroy file", ErrStr); + return false; } - else + + if (!isDirectory()) { + if (ErrStr) *ErrStr = "not a file or directory"; + return true; + } + if (remove_contents) { + // Recursively descend the directory to remove its contents. + std::string cmd = "/bin/rm -rf " + path; + system(cmd.c_str()); return false; - return true; + } + + // Otherwise, try to just remove the one directory. + char pathname[MAXPATHLEN]; + path.copy(pathname, MAXPATHLEN); + int lastchar = path.length() - 1 ; + if (pathname[lastchar] == '/') + pathname[lastchar] = 0; + else + pathname[lastchar+1] = 0; + + if (rmdir(pathname) != 0) + return GetErrno(std::string(pathname) + ": can't destroy directory", + ErrStr); + return false; } bool From lattner at cs.uiuc.edu Fri Jul 28 17:30:11 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 28 Jul 2006 17:30:11 -0500 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Archive/ArchiveWriter.cpp Message-ID: <200607282230.k6SMUBQR008462@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Archive: ArchiveWriter.cpp updated: 1.24 -> 1.25 --- Log message: Modify Path::eraseFromDisk to not throw an exception. --- Diffs of the changes: (+5 -6) ArchiveWriter.cpp | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) Index: llvm/lib/Bytecode/Archive/ArchiveWriter.cpp diff -u llvm/lib/Bytecode/Archive/ArchiveWriter.cpp:1.24 llvm/lib/Bytecode/Archive/ArchiveWriter.cpp:1.25 --- llvm/lib/Bytecode/Archive/ArchiveWriter.cpp:1.24 Fri Jul 28 17:03:44 2006 +++ llvm/lib/Bytecode/Archive/ArchiveWriter.cpp Fri Jul 28 17:29:50 2006 @@ -396,7 +396,7 @@ std::ofstream ArchiveFile(TmpArchive.c_str(), io_mode); // Check for errors opening or creating archive file. - if ( !ArchiveFile.is_open() || ArchiveFile.bad() ) { + if (!ArchiveFile.is_open() || ArchiveFile.bad()) { if (TmpArchive.exists()) TmpArchive.eraseFromDisk(); if (error) @@ -415,10 +415,9 @@ // Loop over all member files, and write them out. Note that this also // builds the symbol table, symTab. - for ( MembersList::iterator I = begin(), E = end(); I != E; ++I) { - if (!writeMember(*I,ArchiveFile,CreateSymbolTable, - TruncateNames,Compress,error)) - { + for (MembersList::iterator I = begin(), E = end(); I != E; ++I) { + if (!writeMember(*I, ArchiveFile, CreateSymbolTable, + TruncateNames, Compress, error)) { if (TmpArchive.exists()) TmpArchive.eraseFromDisk(); ArchiveFile.close(); @@ -448,7 +447,7 @@ sys::RemoveFileOnSignal(FinalFilePath); std::ofstream FinalFile(FinalFilePath.c_str(), io_mode); - if ( !FinalFile.is_open() || FinalFile.bad() ) { + if (!FinalFile.is_open() || FinalFile.bad()) { if (TmpArchive.exists()) TmpArchive.eraseFromDisk(); if (error) From lattner at cs.uiuc.edu Fri Jul 28 17:30:12 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 28 Jul 2006 17:30:12 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/System/Path.h Message-ID: <200607282230.k6SMUCoF008467@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/System: Path.h updated: 1.32 -> 1.33 --- Log message: Modify Path::eraseFromDisk to not throw an exception. --- Diffs of the changes: (+4 -6) Path.h | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-) Index: llvm/include/llvm/System/Path.h diff -u llvm/include/llvm/System/Path.h:1.32 llvm/include/llvm/System/Path.h:1.33 --- llvm/include/llvm/System/Path.h:1.32 Fri Jul 28 17:03:44 2006 +++ llvm/include/llvm/System/Path.h Fri Jul 28 17:29:50 2006 @@ -522,17 +522,15 @@ /// \p destroy_contents parameter is ignored. /// @param destroy_contents Indicates whether the contents of a destroyed /// directory should also be destroyed (recursively). - /// @returns true if the file/directory was destroyed, false if the path - /// refers to something that is neither a file nor a directory. - /// @throws std::string if there is an error. + /// @returns false if the file/directory was destroyed, true on error. /// @brief Removes the file or directory from the filesystem. - bool eraseFromDisk(bool destroy_contents = false) const; - + bool eraseFromDisk(bool destroy_contents = false, + std::string *Err = 0) const; /// @} /// @name Data /// @{ private: - mutable std::string path; ///< Storage for the path name. + mutable std::string path; ///< Storage for the path name. /// @} }; From lattner at cs.uiuc.edu Fri Jul 28 17:30:10 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 28 Jul 2006 17:30:10 -0500 Subject: [llvm-commits] CVS: llvm/lib/System/Win32/Path.inc Message-ID: <200607282230.k6SMUAeU008457@zion.cs.uiuc.edu> Changes in directory llvm/lib/System/Win32: Path.inc updated: 1.45 -> 1.46 --- Log message: Modify Path::eraseFromDisk to not throw an exception. --- Diffs of the changes: (+10 -11) Path.inc | 21 ++++++++++----------- 1 files changed, 10 insertions(+), 11 deletions(-) Index: llvm/lib/System/Win32/Path.inc diff -u llvm/lib/System/Win32/Path.inc:1.45 llvm/lib/System/Win32/Path.inc:1.46 --- llvm/lib/System/Win32/Path.inc:1.45 Thu Jun 8 13:08:43 2006 +++ llvm/lib/System/Win32/Path.inc Fri Jul 28 17:29:50 2006 @@ -571,19 +571,19 @@ } bool -Path::eraseFromDisk(bool remove_contents) const { +Path::eraseFromDisk(bool remove_contents, std::string *ErrStr) const { if (isFile()) { DWORD attr = GetFileAttributes(path.c_str()); // If it doesn't exist, we're done. if (attr == INVALID_FILE_ATTRIBUTES) - return true; + return false; // Read-only files cannot be deleted on Windows. Must remove the read-only // attribute first. if (attr & FILE_ATTRIBUTE_READONLY) { if (!SetFileAttributes(path.c_str(), attr & ~FILE_ATTRIBUTE_READONLY)) - ThrowError(path + ": Can't destroy file: "); + return GetError(path + ": Can't destroy file: ", ErrStr); } if (!DeleteFile(path.c_str())) @@ -592,7 +592,7 @@ } else if (isDirectory()) { // If it doesn't exist, we're done. if (!exists()) - return true; + return false; char *pathname = reinterpret_cast(_alloca(path.length()+3)); int lastchar = path.length() - 1 ; @@ -629,7 +629,7 @@ FindClose(h); if (err != ERROR_NO_MORE_FILES) { SetLastError(err); - ThrowError(path + ": Can't read directory: "); + return GetError(path + ": Can't read directory: ", ErrStr); } for (std::vector::iterator I = list.begin(); I != list.end(); @@ -639,17 +639,18 @@ } } else { if (GetLastError() != ERROR_FILE_NOT_FOUND) - ThrowError(path + ": Can't read directory: "); + return GetError(path + ": Can't read directory: ", ErrStr); } } pathname[lastchar] = 0; if (!RemoveDirectory(pathname)) - ThrowError(std::string(pathname) + ": Can't destroy directory: "); - return true; + return GetError(std::string(pathname) + ": Can't destroy directory: ", + ErrStr); + return false; } else { // It appears the path doesn't exist. - return false; + return true; } } @@ -789,5 +790,3 @@ } } - - From lattner at cs.uiuc.edu Fri Jul 28 17:32:23 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 28 Jul 2006 17:32:23 -0500 Subject: [llvm-commits] CVS: llvm/lib/System/Win32/Path.inc Message-ID: <200607282232.k6SMWNh1008586@zion.cs.uiuc.edu> Changes in directory llvm/lib/System/Win32: Path.inc updated: 1.46 -> 1.47 --- Log message: Update win32 for Path::getStatusInfo --- Diffs of the changes: (+6 -4) Path.inc | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) Index: llvm/lib/System/Win32/Path.inc diff -u llvm/lib/System/Win32/Path.inc:1.46 llvm/lib/System/Win32/Path.inc:1.47 --- llvm/lib/System/Win32/Path.inc:1.46 Fri Jul 28 17:29:50 2006 +++ llvm/lib/System/Win32/Path.inc Fri Jul 28 17:32:09 2006 @@ -333,11 +333,12 @@ return path.substr(pos+1); } -void -Path::getStatusInfo(StatusInfo& info) const { +bool +Path::getStatusInfo(FileStatus &info, std::string *ErrStr) const { WIN32_FILE_ATTRIBUTE_DATA fi; if (!GetFileAttributesEx(path.c_str(), GetFileExInfoStandard, &fi)) - ThrowError("getStatusInfo():" + std::string(path) + ": Can't get status: "); + return GetError("getStatusInfo():" + std::string(path) + + ": Can't get status: ", ErrStr); info.fileSize = fi.nFileSizeHigh; info.fileSize <<= sizeof(fi.nFileSizeHigh)*8; @@ -351,6 +352,7 @@ info.modTime.fromWin32Time(ft); info.isDir = fi.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY; + return false; } static bool AddPermissionBits(const std::string& Filename, int bits) { @@ -691,7 +693,7 @@ } bool -Path::setStatusInfoOnDisk(const StatusInfo& si) const { +Path::setStatusInfoOnDisk(const FileStatus &si) const { // FIXME: should work on directories also. if (!isFile()) return false; From lattner at cs.uiuc.edu Fri Jul 28 17:36:33 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 28 Jul 2006 17:36:33 -0500 Subject: [llvm-commits] CVS: llvm/lib/System/Win32/Path.inc Message-ID: <200607282236.k6SMaXlT008715@zion.cs.uiuc.edu> Changes in directory llvm/lib/System/Win32: Path.inc updated: 1.47 -> 1.48 --- Log message: Modify setStatusInfoOnDisk to not throw an exception. --- Diffs of the changes: (+8 -8) Path.inc | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) Index: llvm/lib/System/Win32/Path.inc diff -u llvm/lib/System/Win32/Path.inc:1.47 llvm/lib/System/Win32/Path.inc:1.48 --- llvm/lib/System/Win32/Path.inc:1.47 Fri Jul 28 17:32:09 2006 +++ llvm/lib/System/Win32/Path.inc Fri Jul 28 17:36:17 2006 @@ -693,9 +693,9 @@ } bool -Path::setStatusInfoOnDisk(const FileStatus &si) const { +Path::setStatusInfoOnDisk(const FileStatus &si, std::string *ErrStr) const { // FIXME: should work on directories also. - if (!isFile()) return false; + if (!isFile()) return true; HANDLE h = CreateFile(path.c_str(), FILE_READ_ATTRIBUTES | FILE_WRITE_ATTRIBUTES, @@ -705,14 +705,14 @@ FILE_ATTRIBUTE_NORMAL, NULL); if (h == INVALID_HANDLE_VALUE) - return false; + return true; BY_HANDLE_FILE_INFORMATION bhfi; if (!GetFileInformationByHandle(h, &bhfi)) { DWORD err = GetLastError(); CloseHandle(h); SetLastError(err); - ThrowError(path + ": GetFileInformationByHandle: "); + return GetError(path + ": GetFileInformationByHandle: ", ErrStr); } FILETIME ft; @@ -722,7 +722,7 @@ CloseHandle(h); if (!ret) { SetLastError(err); - ThrowError(path + ": SetFileTime: "); + return GetError(path + ": SetFileTime: ", ErrStr); } // Best we can do with Unix permission bits is to interpret the owner @@ -731,17 +731,17 @@ if (bhfi.dwFileAttributes & FILE_ATTRIBUTE_READONLY) { if (!SetFileAttributes(path.c_str(), bhfi.dwFileAttributes & ~FILE_ATTRIBUTE_READONLY)) - ThrowError(path + ": SetFileAttributes: "); + return GetError(path + ": SetFileAttributes: ", ErrStr); } } else { if (!(bhfi.dwFileAttributes & FILE_ATTRIBUTE_READONLY)) { if (!SetFileAttributes(path.c_str(), bhfi.dwFileAttributes | FILE_ATTRIBUTE_READONLY)) - ThrowError(path + ": SetFileAttributes: "); + return GetError(path + ": SetFileAttributes: ", ErrStr); } } - return true; + return false; } void From lattner at cs.uiuc.edu Fri Jul 28 17:36:34 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 28 Jul 2006 17:36:34 -0500 Subject: [llvm-commits] CVS: llvm/lib/System/Unix/Path.inc Message-ID: <200607282236.k6SMaY3t008726@zion.cs.uiuc.edu> Changes in directory llvm/lib/System/Unix: Path.inc updated: 1.47 -> 1.48 --- Log message: Modify setStatusInfoOnDisk to not throw an exception. --- Diffs of the changes: (+4 -4) Path.inc | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) Index: llvm/lib/System/Unix/Path.inc diff -u llvm/lib/System/Unix/Path.inc:1.47 llvm/lib/System/Unix/Path.inc:1.48 --- llvm/lib/System/Unix/Path.inc:1.47 Fri Jul 28 17:29:50 2006 +++ llvm/lib/System/Unix/Path.inc Fri Jul 28 17:36:17 2006 @@ -647,15 +647,15 @@ } bool -Path::setStatusInfoOnDisk(const FileStatus &si) const { +Path::setStatusInfoOnDisk(const FileStatus &si, std::string *ErrStr) const { struct utimbuf utb; utb.actime = si.modTime.toPosixTime(); utb.modtime = utb.actime; if (0 != ::utime(path.c_str(),&utb)) - ThrowErrno(path + ": can't set file modification time"); + return GetErrno(path + ": can't set file modification time", ErrStr); if (0 != ::chmod(path.c_str(),si.mode)) - ThrowErrno(path + ": can't set mode"); - return true; + return GetErrno(path + ": can't set mode", ErrStr); + return false; } void From lattner at cs.uiuc.edu Fri Jul 28 17:36:34 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 28 Jul 2006 17:36:34 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/System/Path.h Message-ID: <200607282236.k6SMaY0p008721@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/System: Path.h updated: 1.33 -> 1.34 --- Log message: Modify setStatusInfoOnDisk to not throw an exception. --- Diffs of the changes: (+3 -2) Path.h | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) Index: llvm/include/llvm/System/Path.h diff -u llvm/include/llvm/System/Path.h:1.33 llvm/include/llvm/System/Path.h:1.34 --- llvm/include/llvm/System/Path.h:1.33 Fri Jul 28 17:29:50 2006 +++ llvm/include/llvm/System/Path.h Fri Jul 28 17:36:17 2006 @@ -461,9 +461,10 @@ /// This method allows the last modified time stamp and permission bits /// to be set on the disk object referenced by the Path. /// @throws std::string if an error occurs. - /// @returns true + /// @returns true on error. /// @brief Set the status information. - bool setStatusInfoOnDisk(const FileStatus &SI) const; + bool setStatusInfoOnDisk(const FileStatus &SI, + std::string *ErrStr = 0) const; /// This method attempts to create a directory in the file system with the /// same name as the Path object. The \p create_parents parameter controls From reid at x10sys.com Fri Jul 28 17:50:21 2006 From: reid at x10sys.com (Reid Spencer) Date: Fri, 28 Jul 2006 17:50:21 -0500 Subject: [llvm-commits] CVS: llvm/configure Message-ID: <200607282250.k6SMoLnv008996@zion.cs.uiuc.edu> Changes in directory llvm: configure updated: 1.243 -> 1.244 --- Log message: Fix the --with-extra-options to use the correct variable. --- Diffs of the changes: (+3 -3) configure | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/configure diff -u llvm/configure:1.243 llvm/configure:1.244 --- llvm/configure:1.243 Fri Jul 28 00:05:00 2006 +++ llvm/configure Fri Jul 28 17:50:07 2006 @@ -3347,11 +3347,11 @@ withval="$with_extra_options" else - extraopts=default + withval=default fi; -case "$extraopts" in +case "$withval" in default) EXTRA_OPTIONS= ;; - *) EXTRA_OPTIONS=$extraopts ;; + *) EXTRA_OPTIONS=$withval ;; esac EXTRA_OPTIONS=$EXTRA_OPTIONS From reid at x10sys.com Fri Jul 28 17:50:22 2006 From: reid at x10sys.com (Reid Spencer) Date: Fri, 28 Jul 2006 17:50:22 -0500 Subject: [llvm-commits] CVS: llvm/autoconf/configure.ac Message-ID: <200607282250.k6SMoMab009002@zion.cs.uiuc.edu> Changes in directory llvm/autoconf: configure.ac updated: 1.241 -> 1.242 --- Log message: Fix the --with-extra-options to use the correct variable. --- Diffs of the changes: (+3 -3) configure.ac | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.241 llvm/autoconf/configure.ac:1.242 --- llvm/autoconf/configure.ac:1.241 Fri Jul 28 00:05:00 2006 +++ llvm/autoconf/configure.ac Fri Jul 28 17:50:07 2006 @@ -337,10 +337,10 @@ AC_ARG_WITH(extra-options, AS_HELP_STRING([--with-extra-options], [Specify addtional options to compile LLVM with]),, - extraopts=default) -case "$extraopts" in + withval=default) +case "$withval" in default) EXTRA_OPTIONS= ;; - *) EXTRA_OPTIONS=$extraopts ;; + *) EXTRA_OPTIONS=$withval ;; esac AC_SUBST(EXTRA_OPTIONS,$EXTRA_OPTIONS) From evan.cheng at apple.com Fri Jul 28 17:51:15 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Fri, 28 Jul 2006 17:51:15 -0500 Subject: [llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp Message-ID: <200607282251.k6SMpFYt009024@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: DAGISelEmitter.cpp updated: 1.231 -> 1.232 --- Log message: Split each select function for a particular opcode into multiple ones. One per possible ValueType of the node. e.g. Select_add is split into Select_add_i8, Select_add_i16, etc. For opcodes which do not produce a non-chain result, it is split on the ValueType of its first non-chain operand. e.g. Select_store. On X86 / Mac OS X, Select_store used to be the largest function. It had a stack frame size of 8.5k. Now the largest one is Store_i32 with a frame size of 3.1k. --- Diffs of the changes: (+259 -178) DAGISelEmitter.cpp | 437 +++++++++++++++++++++++++++++++---------------------- 1 files changed, 259 insertions(+), 178 deletions(-) Index: llvm/utils/TableGen/DAGISelEmitter.cpp diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.231 llvm/utils/TableGen/DAGISelEmitter.cpp:1.232 --- llvm/utils/TableGen/DAGISelEmitter.cpp:1.231 Thu Jul 27 20:19:22 2006 +++ llvm/utils/TableGen/DAGISelEmitter.cpp Fri Jul 28 17:51:01 2006 @@ -3190,7 +3190,12 @@ } } } - + + // For each opcode, there might be multiple select functions, one per + // ValueType of the node (or its first operand if it doesn't produce a + // non-chain result. + std::map > OpcodeVTMap; + // Emit one Select_* method for each top-level opcode. We do this instead of // emitting one giant switch statement to support compilers where this will // result in the recursive functions taking less stack space. @@ -3202,204 +3207,241 @@ bool OptSlctOrder = (OpcodeInfo.hasProperty(SDNodeInfo::SDNPHasChain) && OpcodeInfo.getNumResults() > 0); - std::vector &Patterns = PBOI->second; - assert(!Patterns.empty() && "No patterns but map has entry?"); - + std::vector &PatternsOfOp = PBOI->second; + assert(!PatternsOfOp.empty() && "No patterns but map has entry?"); + // We want to emit all of the matching code now. However, we want to emit // the matches in order of minimal cost. Sort the patterns so the least // cost one is at the start. - std::stable_sort(Patterns.begin(), Patterns.end(), + std::stable_sort(PatternsOfOp.begin(), PatternsOfOp.end(), PatternSortingPredicate(*this)); - typedef std::vector > CodeList; - typedef std::vector >::iterator CodeListI; - - std::vector > CodeForPatterns; - std::vector > PatternOpcodes; - std::vector > PatternVTs; - std::vector > > PatternDecls; - std::set > AllGenDecls; - for (unsigned i = 0, e = Patterns.size(); i != e; ++i) { - CodeList GeneratedCode; - std::set > GeneratedDecl; - std::vector TargetOpcodes; - std::vector TargetVTs; - GenerateCodeForPattern(*Patterns[i], GeneratedCode, GeneratedDecl, - TargetOpcodes, TargetVTs, OptSlctOrder); - for (std::set >::iterator - si = GeneratedDecl.begin(), se = GeneratedDecl.end(); si!=se; ++si) - AllGenDecls.insert(*si); - CodeForPatterns.push_back(std::make_pair(Patterns[i], GeneratedCode)); - PatternDecls.push_back(GeneratedDecl); - PatternOpcodes.push_back(TargetOpcodes); - PatternVTs.push_back(TargetVTs); + // Split them into groups by type. + std::map > PatternsByType; + for (unsigned i = 0, e = PatternsOfOp.size(); i != e; ++i) { + PatternToMatch *Pat = PatternsOfOp[i]; + TreePatternNode *SrcPat = Pat->getSrcPattern(); + if (OpcodeInfo.getNumResults() == 0 && SrcPat->getNumChildren() > 0) + SrcPat = SrcPat->getChild(0); + MVT::ValueType VT = SrcPat->getTypeNum(0); + std::map >::iterator TI = + PatternsByType.find(VT); + if (TI != PatternsByType.end()) + TI->second.push_back(Pat); + else { + std::vector PVec; + PVec.push_back(Pat); + PatternsByType.insert(std::make_pair(VT, PVec)); + } } + + for (std::map >::iterator + II = PatternsByType.begin(), EE = PatternsByType.end(); II != EE; + ++II) { + MVT::ValueType OpVT = II->first; + std::vector &Patterns = II->second; + typedef std::vector > CodeList; + typedef std::vector >::iterator CodeListI; - // Scan the code to see if all of the patterns are reachable and if it is - // possible that the last one might not match. - bool mightNotMatch = true; - for (unsigned i = 0, e = CodeForPatterns.size(); i != e; ++i) { - CodeList &GeneratedCode = CodeForPatterns[i].second; - mightNotMatch = false; - - for (unsigned j = 0, e = GeneratedCode.size(); j != e; ++j) { - if (GeneratedCode[j].first) { // predicate. - mightNotMatch = true; - break; - } + std::vector > CodeForPatterns; + std::vector > PatternOpcodes; + std::vector > PatternVTs; + std::vector > > PatternDecls; + std::set > AllGenDecls; + for (unsigned i = 0, e = Patterns.size(); i != e; ++i) { + CodeList GeneratedCode; + std::set > GeneratedDecl; + std::vector TargetOpcodes; + std::vector TargetVTs; + GenerateCodeForPattern(*Patterns[i], GeneratedCode, GeneratedDecl, + TargetOpcodes, TargetVTs, OptSlctOrder); + for (std::set >::iterator + si = GeneratedDecl.begin(), se = GeneratedDecl.end(); si!=se; ++si) + AllGenDecls.insert(*si); + CodeForPatterns.push_back(std::make_pair(Patterns[i], GeneratedCode)); + PatternDecls.push_back(GeneratedDecl); + PatternOpcodes.push_back(TargetOpcodes); + PatternVTs.push_back(TargetVTs); } + + // Scan the code to see if all of the patterns are reachable and if it is + // possible that the last one might not match. + bool mightNotMatch = true; + for (unsigned i = 0, e = CodeForPatterns.size(); i != e; ++i) { + CodeList &GeneratedCode = CodeForPatterns[i].second; + mightNotMatch = false; + + for (unsigned j = 0, e = GeneratedCode.size(); j != e; ++j) { + if (GeneratedCode[j].first) { // predicate. + mightNotMatch = true; + break; + } + } - // If this pattern definitely matches, and if it isn't the last one, the - // patterns after it CANNOT ever match. Error out. - if (mightNotMatch == false && i != CodeForPatterns.size()-1) { - std::cerr << "Pattern '"; - CodeForPatterns[i+1].first->getSrcPattern()->print(OS); - std::cerr << "' is impossible to select!\n"; - exit(1); - } - } - - // Factor target node emission code (emitted by EmitResultCode) into - // separate functions. Uniquing and share them among all instruction - // selection routines. - for (unsigned i = 0, e = CodeForPatterns.size(); i != e; ++i) { - CodeList &GeneratedCode = CodeForPatterns[i].second; - std::vector &TargetOpcodes = PatternOpcodes[i]; - std::vector &TargetVTs = PatternVTs[i]; - std::set > Decls = PatternDecls[i]; - int CodeSize = (int)GeneratedCode.size(); - int LastPred = -1; - for (int j = CodeSize-1; j >= 0; --j) { - if (GeneratedCode[j].first) { - LastPred = j; - break; + // If this pattern definitely matches, and if it isn't the last one, the + // patterns after it CANNOT ever match. Error out. + if (mightNotMatch == false && i != CodeForPatterns.size()-1) { + std::cerr << "Pattern '"; + CodeForPatterns[i+1].first->getSrcPattern()->print(OS); + std::cerr << "' is impossible to select!\n"; + exit(1); } } - std::string CalleeDecls; - std::string CalleeCode = "(SDOperand &Result, SDOperand &N"; - std::string CallerCode = "(Result, N"; - for (unsigned j = 0, e = TargetOpcodes.size(); j != e; ++j) { - CalleeCode += ", unsigned Opc" + utostr(j); - CallerCode += ", " + TargetOpcodes[j]; - } - for (unsigned j = 0, e = TargetVTs.size(); j != e; ++j) { - CalleeCode += ", MVT::ValueType VT" + utostr(j); - CallerCode += ", " + TargetVTs[j]; - } - for (std::set >::iterator - I = Decls.begin(), E = Decls.end(); I != E; ++I) { - std::string Name = I->second; - if (I->first == 0) { - if (Name == "InFlag" || - (Name.size() > 3 && - Name[0] == 'T' && Name[1] == 'm' && Name[2] == 'p')) { - CalleeDecls += " SDOperand " + Name + "(0, 0);\n"; - continue; + // Factor target node emission code (emitted by EmitResultCode) into + // separate functions. Uniquing and share them among all instruction + // selection routines. + for (unsigned i = 0, e = CodeForPatterns.size(); i != e; ++i) { + CodeList &GeneratedCode = CodeForPatterns[i].second; + std::vector &TargetOpcodes = PatternOpcodes[i]; + std::vector &TargetVTs = PatternVTs[i]; + std::set > Decls = PatternDecls[i]; + int CodeSize = (int)GeneratedCode.size(); + int LastPred = -1; + for (int j = CodeSize-1; j >= 0; --j) { + if (GeneratedCode[j].first) { + LastPred = j; + break; } - CalleeCode += ", SDOperand &" + Name; - CallerCode += ", " + Name; - } else if (I->first == 1) { - if (Name == "ResNode") { - CalleeDecls += " SDNode *" + Name + " = NULL;\n"; - continue; + } + + std::string CalleeDecls; + std::string CalleeCode = "(SDOperand &Result, SDOperand &N"; + std::string CallerCode = "(Result, N"; + for (unsigned j = 0, e = TargetOpcodes.size(); j != e; ++j) { + CalleeCode += ", unsigned Opc" + utostr(j); + CallerCode += ", " + TargetOpcodes[j]; + } + for (unsigned j = 0, e = TargetVTs.size(); j != e; ++j) { + CalleeCode += ", MVT::ValueType VT" + utostr(j); + CallerCode += ", " + TargetVTs[j]; + } + for (std::set >::iterator + I = Decls.begin(), E = Decls.end(); I != E; ++I) { + std::string Name = I->second; + if (I->first == 0) { + if (Name == "InFlag" || + (Name.size() > 3 && + Name[0] == 'T' && Name[1] == 'm' && Name[2] == 'p')) { + CalleeDecls += " SDOperand " + Name + "(0, 0);\n"; + continue; + } + CalleeCode += ", SDOperand &" + Name; + CallerCode += ", " + Name; + } else if (I->first == 1) { + if (Name == "ResNode") { + CalleeDecls += " SDNode *" + Name + " = NULL;\n"; + continue; + } + CalleeCode += ", SDNode *" + Name; + CallerCode += ", " + Name; + } else { + CalleeCode += ", bool " + Name; + CallerCode += ", " + Name; } - CalleeCode += ", SDNode *" + Name; - CallerCode += ", " + Name; + } + CallerCode += ");"; + CalleeCode += ") "; + // Prevent emission routines from being inlined to reduce selection + // routines stack frame sizes. + CalleeCode += "NOINLINE "; + CalleeCode += "{\n" + CalleeDecls; + for (int j = LastPred+1; j < CodeSize; ++j) + CalleeCode += " " + GeneratedCode[j].second + '\n'; + for (int j = LastPred+1; j < CodeSize; ++j) + GeneratedCode.pop_back(); + CalleeCode += "}\n"; + + // Uniquing the emission routines. + unsigned EmitFuncNum; + std::map::iterator EFI = + EmitFunctions.find(CalleeCode); + if (EFI != EmitFunctions.end()) { + EmitFuncNum = EFI->second; } else { - CalleeCode += ", bool " + Name; - CallerCode += ", " + Name; + EmitFuncNum = EmitFunctions.size(); + EmitFunctions.insert(std::make_pair(CalleeCode, EmitFuncNum)); + OS << "void " << "Emit_" << utostr(EmitFuncNum) << CalleeCode; } - } - CallerCode += ");"; - CalleeCode += ") "; - // Prevent emission routines from being inlined to reduce selection - // routines stack frame sizes. - CalleeCode += "NOINLINE "; - CalleeCode += "{\n" + CalleeDecls; - for (int j = LastPred+1; j < CodeSize; ++j) - CalleeCode += " " + GeneratedCode[j].second + '\n'; - for (int j = LastPred+1; j < CodeSize; ++j) - GeneratedCode.pop_back(); - CalleeCode += "}\n"; - - // Uniquing the emission routines. - unsigned EmitFuncNum; - std::map::iterator EFI = - EmitFunctions.find(CalleeCode); - if (EFI != EmitFunctions.end()) { - EmitFuncNum = EFI->second; - } else { - EmitFuncNum = EmitFunctions.size(); - EmitFunctions.insert(std::make_pair(CalleeCode, EmitFuncNum)); - OS << "void " << "Emit_" << utostr(EmitFuncNum) << CalleeCode; - } - - // Replace the emission code within selection routines with calls to the - // emission functions. - CallerCode = "Emit_" + utostr(EmitFuncNum) + CallerCode; - GeneratedCode.push_back(std::make_pair(false, CallerCode)); - GeneratedCode.push_back(std::make_pair(false, "return;")); - } - // Print function. - OS << "void Select_" << OpName << "(SDOperand &Result, SDOperand N) {\n"; - if (OptSlctOrder) { - OS << " if (N.ResNo == " << OpcodeInfo.getNumResults() - << " && N.getValue(0).hasOneUse()) {\n" - << " SDOperand Dummy = " - << "CurDAG->getNode(ISD::HANDLENODE, MVT::Other, N);\n" - << " SelectionDAG::InsertISelMapEntry(CodeGenMap, N.Val, " - << OpcodeInfo.getNumResults() << ", Dummy.Val, 0);\n" - << " SelectionDAG::InsertISelMapEntry(HandleMap, N.Val, " - << OpcodeInfo.getNumResults() << ", Dummy.Val, 0);\n" - << " Result = Dummy;\n" - << " return;\n" - << " }\n"; - } + // Replace the emission code within selection routines with calls to the + // emission functions. + CallerCode = "Emit_" + utostr(EmitFuncNum) + CallerCode; + GeneratedCode.push_back(std::make_pair(false, CallerCode)); + GeneratedCode.push_back(std::make_pair(false, "return;")); + } - // Print all declarations. - for (std::set >::iterator - I = AllGenDecls.begin(), E = AllGenDecls.end(); I != E; ++I) - if (I->first == 0) - OS << " SDOperand " << I->second << "(0, 0);\n"; - else if (I->first == 1) - OS << " SDNode *" << I->second << " = NULL;\n"; - else - OS << " bool " << I->second << " = false;\n"; + // Print function. + std::string OpVTStr = (OpVT != MVT::isVoid && OpVT != MVT::iPTR) + ? getEnumName(OpVT).substr(5) : "" ; + std::map >::iterator OpVTI = + OpcodeVTMap.find(OpName); + if (OpVTI == OpcodeVTMap.end()) { + std::vector VTSet; + VTSet.push_back(OpVTStr); + OpcodeVTMap.insert(std::make_pair(OpName, VTSet)); + } else + OpVTI->second.push_back(OpVTStr); + + OS << "void Select_" << OpName << (OpVTStr != "" ? "_" : "") + << OpVTStr << "(SDOperand &Result, SDOperand N) {\n"; + if (OptSlctOrder) { + OS << " if (N.ResNo == " << OpcodeInfo.getNumResults() + << " && N.getValue(0).hasOneUse()) {\n" + << " SDOperand Dummy = " + << "CurDAG->getNode(ISD::HANDLENODE, MVT::Other, N);\n" + << " SelectionDAG::InsertISelMapEntry(CodeGenMap, N.Val, " + << OpcodeInfo.getNumResults() << ", Dummy.Val, 0);\n" + << " SelectionDAG::InsertISelMapEntry(HandleMap, N.Val, " + << OpcodeInfo.getNumResults() << ", Dummy.Val, 0);\n" + << " Result = Dummy;\n" + << " return;\n" + << " }\n"; + } - // Loop through and reverse all of the CodeList vectors, as we will be - // accessing them from their logical front, but accessing the end of a - // vector is more efficient. - for (unsigned i = 0, e = CodeForPatterns.size(); i != e; ++i) { - CodeList &GeneratedCode = CodeForPatterns[i].second; - std::reverse(GeneratedCode.begin(), GeneratedCode.end()); - } + // Print all declarations. + for (std::set >::iterator + I = AllGenDecls.begin(), E = AllGenDecls.end(); I != E; ++I) + if (I->first == 0) + OS << " SDOperand " << I->second << "(0, 0);\n"; + else if (I->first == 1) + OS << " SDNode *" << I->second << " = NULL;\n"; + else + OS << " bool " << I->second << " = false;\n"; + + // Loop through and reverse all of the CodeList vectors, as we will be + // accessing them from their logical front, but accessing the end of a + // vector is more efficient. + for (unsigned i = 0, e = CodeForPatterns.size(); i != e; ++i) { + CodeList &GeneratedCode = CodeForPatterns[i].second; + std::reverse(GeneratedCode.begin(), GeneratedCode.end()); + } - // Next, reverse the list of patterns itself for the same reason. - std::reverse(CodeForPatterns.begin(), CodeForPatterns.end()); + // Next, reverse the list of patterns itself for the same reason. + std::reverse(CodeForPatterns.begin(), CodeForPatterns.end()); - // Emit all of the patterns now, grouped together to share code. - EmitPatterns(CodeForPatterns, 2, OS); + // Emit all of the patterns now, grouped together to share code. + EmitPatterns(CodeForPatterns, 2, OS); - // If the last pattern has predicates (which could fail) emit code to catch - // the case where nothing handles a pattern. - if (mightNotMatch) { - OS << " std::cerr << \"Cannot yet select: \";\n"; - if (OpcodeInfo.getEnumName() != "ISD::INTRINSIC_W_CHAIN" && - OpcodeInfo.getEnumName() != "ISD::INTRINSIC_WO_CHAIN" && - OpcodeInfo.getEnumName() != "ISD::INTRINSIC_VOID") { - OS << " N.Val->dump(CurDAG);\n"; - } else { - OS << " unsigned iid = cast(N.getOperand(" - "N.getOperand(0).getValueType() == MVT::Other))->getValue();\n" - << " std::cerr << \"intrinsic %\"<< " - "Intrinsic::getName((Intrinsic::ID)iid);\n"; + // If the last pattern has predicates (which could fail) emit code to catch + // the case where nothing handles a pattern. + if (mightNotMatch) { + OS << " std::cerr << \"Cannot yet select: \";\n"; + if (OpcodeInfo.getEnumName() != "ISD::INTRINSIC_W_CHAIN" && + OpcodeInfo.getEnumName() != "ISD::INTRINSIC_WO_CHAIN" && + OpcodeInfo.getEnumName() != "ISD::INTRINSIC_VOID") { + OS << " N.Val->dump(CurDAG);\n"; + } else { + OS << " unsigned iid = cast(N.getOperand(" + "N.getOperand(0).getValueType() == MVT::Other))->getValue();\n" + << " std::cerr << \"intrinsic %\"<< " + "Intrinsic::getName((Intrinsic::ID)iid);\n"; + } + OS << " std::cerr << '\\n';\n" + << " abort();\n"; } - OS << " std::cerr << '\\n';\n" - << " abort();\n"; + OS << "}\n\n"; } - OS << "}\n\n"; } // Emit boilerplate. @@ -3550,9 +3592,48 @@ CompareByRecordName>::iterator PBOI = PatternsByOpcode.begin(), E = PatternsByOpcode.end(); PBOI != E; ++PBOI) { const SDNodeInfo &OpcodeInfo = getSDNodeInfo(PBOI->first); - OS << " case " << OpcodeInfo.getEnumName() << ": " - << std::string(std::max(0, int(24-OpcodeInfo.getEnumName().size())), ' ') - << "Select_" << PBOI->first->getName() << "(Result, N); return;\n"; + const std::string &OpName = PBOI->first->getName(); + // Potentially multiple versions of select for this opcode. One for each + // ValueType of the node (or its first true operand if it doesn't produce a + // result. + std::map >::iterator OpVTI = + OpcodeVTMap.find(OpName); + std::vector &OpVTs = OpVTI->second; + OS << " case " << OpcodeInfo.getEnumName() << ": {\n"; + if (OpVTs.size() == 1) { + std::string &VTStr = OpVTs[0]; + OS << " Select_" << OpName + << (VTStr != "" ? "_" : "") << VTStr << "(Result, N);\n"; + } else { + if (OpcodeInfo.getNumResults()) + OS << " MVT::ValueType NVT = N.Val->getValueType(0);\n"; + else if (OpcodeInfo.hasProperty(SDNodeInfo::SDNPHasChain)) + OS << " MVT::ValueType NVT = (N.getNumOperands() > 1) ?" + << " N.getOperand(1).Val->getValueType(0) : MVT::isVoid;\n"; + else + OS << " MVT::ValueType NVT = (N.getNumOperands() > 0) ?" + << " N.getOperand(0).Val->getValueType(0) : MVT::isVoid;\n"; + int ElseCase = -1; + bool First = true; + for (unsigned i = 0, e = OpVTs.size(); i < e; ++i) { + std::string &VTStr = OpVTs[i]; + if (VTStr == "") { + ElseCase = i; + continue; + } + OS << (First ? " if" : " else if") + << " (NVT == MVT::" << VTStr << ")\n" + << " Select_" << OpName + << "_" << VTStr << "(Result, N);\n"; + First = false; + } + if (ElseCase != -1) + OS << " else\n" << " Select_" << OpName << "(Result, N);\n"; + else + OS << " else\n" << " break;\n"; + } + OS << " return;\n"; + OS << " }\n"; } OS << " } // end of big switch.\n\n" From lattner at cs.uiuc.edu Fri Jul 28 17:52:25 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 28 Jul 2006 17:52:25 -0500 Subject: [llvm-commits] CVS: llvm/lib/Linker/Linker.cpp Message-ID: <200607282252.k6SMqPqA009078@zion.cs.uiuc.edu> Changes in directory llvm/lib/Linker: Linker.cpp updated: 1.10 -> 1.11 --- Log message: Remove a redundant syscall. --- Diffs of the changes: (+20 -24) Linker.cpp | 44 ++++++++++++++++++++------------------------ 1 files changed, 20 insertions(+), 24 deletions(-) Index: llvm/lib/Linker/Linker.cpp diff -u llvm/lib/Linker/Linker.cpp:1.10 llvm/lib/Linker/Linker.cpp:1.11 --- llvm/lib/Linker/Linker.cpp:1.10 Tue Jan 17 16:01:57 2006 +++ llvm/lib/Linker/Linker.cpp Fri Jul 28 17:52:11 2006 @@ -119,31 +119,27 @@ sys::Path FullPath(Directory); - // Make sure the directory actually is a directory in the file system. - if (FullPath.isDirectory()) - { - // Try the libX.a form - FullPath.appendComponent("lib" + Name); - FullPath.appendSuffix("a"); - if (FullPath.isArchive()) - return FullPath; - - // Try the libX.bca form - FullPath.eraseSuffix(); - FullPath.appendSuffix("bca"); - if (FullPath.isArchive()) - return FullPath; + // Try the libX.a form + FullPath.appendComponent("lib" + Name); + FullPath.appendSuffix("a"); + if (FullPath.isArchive()) + return FullPath; + + // Try the libX.bca form + FullPath.eraseSuffix(); + FullPath.appendSuffix("bca"); + if (FullPath.isArchive()) + return FullPath; + + // Try the libX.so (or .dylib) form + FullPath.eraseSuffix(); + FullPath.appendSuffix(&(LTDL_SHLIB_EXT[1])); + if (FullPath.isDynamicLibrary()) // Native shared library? + return FullPath; + if (FullPath.isBytecodeFile()) // .so file containing bytecode? + return FullPath; - // Try the libX.so (or .dylib) form - FullPath.eraseSuffix(); - FullPath.appendSuffix(&(LTDL_SHLIB_EXT[1])); - if (FullPath.isDynamicLibrary()) // Native shared library? - return FullPath; - if (FullPath.isBytecodeFile()) // .so file containing bytecode? - return FullPath; - - // Not found .. fall through - } + // Not found .. fall through // Indicate that the library was not found in the directory. FullPath.clear(); From pjenkins at apple.com Fri Jul 28 18:04:11 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Fri, 28 Jul 2006 18:04:11 -0500 Subject: [llvm-commits] CVS: nightlytest-serverside/NightlyTestAccept.cgi Message-ID: <200607282304.k6SN4BV0009384@zion.cs.uiuc.edu> Changes in directory nightlytest-serverside: NightlyTestAccept.cgi updated: 1.36 -> 1.37 --- Log message: Fixed errors were .o file sizes were not being entered into the databaes --- Diffs of the changes: (+1 -1) NightlyTestAccept.cgi | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: nightlytest-serverside/NightlyTestAccept.cgi diff -u nightlytest-serverside/NightlyTestAccept.cgi:1.36 nightlytest-serverside/NightlyTestAccept.cgi:1.37 --- nightlytest-serverside/NightlyTestAccept.cgi:1.36 Thu Jul 27 19:54:48 2006 +++ nightlytest-serverside/NightlyTestAccept.cgi Fri Jul 28 18:03:57 2006 @@ -638,7 +638,7 @@ AddProgram $x, $external_processed{$x}, "external", $night_id; } -$len=@AOFILE_SIZE; +$len=@O_FILE_SIZE; if($len>1){ foreach $x (@O_FILE_SIZE){ $x =~ m/(.+)\s+(.+)\s+(.+)/; From lattner at cs.uiuc.edu Fri Jul 28 20:51:07 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 28 Jul 2006 20:51:07 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/X86/2006-07-28-AsmPrint-Long-As-Pointer.ll Message-ID: <200607290151.k6T1p7EU012405@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/X86: 2006-07-28-AsmPrint-Long-As-Pointer.ll added (r1.1) --- Log message: New testcase for PR853: http://llvm.org/PR853 --- Diffs of the changes: (+5 -0) 2006-07-28-AsmPrint-Long-As-Pointer.ll | 5 +++++ 1 files changed, 5 insertions(+) Index: llvm/test/Regression/CodeGen/X86/2006-07-28-AsmPrint-Long-As-Pointer.ll diff -c /dev/null llvm/test/Regression/CodeGen/X86/2006-07-28-AsmPrint-Long-As-Pointer.ll:1.1 *** /dev/null Fri Jul 28 20:51:03 2006 --- llvm/test/Regression/CodeGen/X86/2006-07-28-AsmPrint-Long-As-Pointer.ll Fri Jul 28 20:50:53 2006 *************** *** 0 **** --- 1,5 ---- + ; RUN: llvm-as < %s | llc -march=x86 | grep 4294967240 + ; PR853 + + %X = global int* cast (ulong 18446744073709551560 to int*) + From lattner at cs.uiuc.edu Fri Jul 28 20:57:33 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 28 Jul 2006 20:57:33 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/AsmPrinter.cpp Message-ID: <200607290157.k6T1vX9r012524@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: AsmPrinter.cpp updated: 1.87 -> 1.88 --- Log message: Instead of blindly looking past constantexpr casts, actually constant fold them. This correctly truncates constants that are too large for the destination slot and makes the code easier to understand. This fixes PR853: http://llvm.org/PR853 and Regression/CodeGen/X86/2006-07-28-AsmPrint-Long-As-Pointer.ll --- Diffs of the changes: (+20 -14) AsmPrinter.cpp | 34 ++++++++++++++++++++-------------- 1 files changed, 20 insertions(+), 14 deletions(-) Index: llvm/lib/CodeGen/AsmPrinter.cpp diff -u llvm/lib/CodeGen/AsmPrinter.cpp:1.87 llvm/lib/CodeGen/AsmPrinter.cpp:1.88 --- llvm/lib/CodeGen/AsmPrinter.cpp:1.87 Thu Jul 27 19:17:20 2006 +++ llvm/lib/CodeGen/AsmPrinter.cpp Fri Jul 28 20:57:19 2006 @@ -385,23 +385,29 @@ break; } case Instruction::Cast: { - // Support only non-converting or widening casts for now, that is, ones - // that do not involve a change in value. This assertion is really gross, - // and may not even be a complete check. + // Support only foldable casts to/from pointers that can be eliminated by + // changing the pointer to the appropriately sized integer type. Constant *Op = CE->getOperand(0); const Type *OpTy = Op->getType(), *Ty = CE->getType(); - // Remember, kids, pointers can be losslessly converted back and forth - // into 32-bit or wider integers, regardless of signedness. :-P - assert(((isa(OpTy) - && (Ty == Type::LongTy || Ty == Type::ULongTy - || Ty == Type::IntTy || Ty == Type::UIntTy)) - || (isa(Ty) - && (OpTy == Type::LongTy || OpTy == Type::ULongTy - || OpTy == Type::IntTy || OpTy == Type::UIntTy)) - || (((TD->getTypeSize(Ty) >= TD->getTypeSize(OpTy)) - && OpTy->isLosslesslyConvertibleTo(Ty)))) - && "FIXME: Don't yet support this kind of constant cast expr"); + // Handle casts to pointers by changing them into casts to the appropriate + // integer type. This promotes constant folding and simplifies this code. + if (isa(Ty)) { + const Type *IntPtrTy = TD->getIntPtrType(); + Op = ConstantExpr::getCast(Op, IntPtrTy); + return EmitConstantValueOnly(Op); + } + + // We know the dest type is not a pointer. Is the src value a pointer or + // integral? + if (isa(OpTy) || OpTy->isIntegral()) { + // We can emit the pointer value into this slot if the slot is an + // integer slot greater or equal to the size of the pointer. + if (Ty->isIntegral() && TD->getTypeSize(Ty) >= TD->getTypeSize(OpTy)) + return EmitConstantValueOnly(Op); + } + + assert(0 && "FIXME: Don't yet support this kind of constant cast expr"); EmitConstantValueOnly(Op); break; } From alenhar2 at cs.uiuc.edu Fri Jul 28 23:27:48 2006 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Fri, 28 Jul 2006 23:27:48 -0500 Subject: [llvm-commits] CVS: llvm/utils/NewNightlyTest.pl Message-ID: <200607290427.k6T4Rmv3014844@zion.cs.uiuc.edu> Changes in directory llvm/utils: NewNightlyTest.pl updated: 1.35 -> 1.36 --- Log message: fix externals --- Diffs of the changes: (+2 -2) NewNightlyTest.pl | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/utils/NewNightlyTest.pl diff -u llvm/utils/NewNightlyTest.pl:1.35 llvm/utils/NewNightlyTest.pl:1.36 --- llvm/utils/NewNightlyTest.pl:1.35 Thu Jul 27 20:06:18 2006 +++ llvm/utils/NewNightlyTest.pl Fri Jul 28 23:27:34 2006 @@ -138,8 +138,8 @@ if (/^-f2c$/) { $CONFIGUREARGS .= " --with-f2c=$ARGV[0]"; shift; next; } - if (/^-with-externals/) { - $CONFIGUREARGS .= "--with-externals=$ARGV[0]"; shift; next; + if (/^-with-externals$/) { + $CONFIGUREARGS .= " --with-externals=$ARGV[0]"; shift; next; } if (/^-nickname$/) { $nickname = "$ARGV[0]"; shift; next; } if (/^-gccpath/) { $CONFIGUREARGS .= From lattner at cs.uiuc.edu Sun Jul 30 12:46:56 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 30 Jul 2006 12:46:56 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/X86/div_const.ll Message-ID: <200607301746.k6UHkukc004965@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/X86: div_const.ll added (r1.1) --- Log message: Testcase for GCC bug28417: http://llvm.org/PR28417 , ensuring that we don't start getting it wrong somehow. --- Diffs of the changes: (+7 -0) div_const.ll | 7 +++++++ 1 files changed, 7 insertions(+) Index: llvm/test/Regression/CodeGen/X86/div_const.ll diff -c /dev/null llvm/test/Regression/CodeGen/X86/div_const.ll:1.1 *** /dev/null Sun Jul 30 12:46:47 2006 --- llvm/test/Regression/CodeGen/X86/div_const.ll Sun Jul 30 12:46:37 2006 *************** *** 0 **** --- 1,7 ---- + ; RUN: llvm-as < %s | llc -march=x86 | grep 365384439 + + uint %f9188_mul365384439_shift27(uint %A) { + %tmp1 = div uint %A, 1577682821 ; [#uses=1] + ret uint %tmp1 + } + From lattner at cs.uiuc.edu Sun Jul 30 13:02:21 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 30 Jul 2006 13:02:21 -0500 Subject: [llvm-commits] CVS: nightlytest-serverside/NightlyTestAccept.cgi Message-ID: <200607301802.k6UI2LrX005338@zion.cs.uiuc.edu> Changes in directory nightlytest-serverside: NightlyTestAccept.cgi updated: 1.37 -> 1.38 --- Log message: Compactify accept emails a bit. --- Diffs of the changes: (+25 -9) NightlyTestAccept.cgi | 34 +++++++++++++++++++++++++--------- 1 files changed, 25 insertions(+), 9 deletions(-) Index: nightlytest-serverside/NightlyTestAccept.cgi diff -u nightlytest-serverside/NightlyTestAccept.cgi:1.37 nightlytest-serverside/NightlyTestAccept.cgi:1.38 --- nightlytest-serverside/NightlyTestAccept.cgi:1.37 Fri Jul 28 18:03:57 2006 +++ nightlytest-serverside/NightlyTestAccept.cgi Sun Jul 30 13:02:07 2006 @@ -679,15 +679,31 @@ $email .= "Nickname: $nickname\n"; $email .= "Buildstatus: $buildstatus\n"; -if($buildstatus eq "OK"){ - $newly_passing_tests="None" unless $newly_passing_tests ne ""; - $email .= "\nNew Test Passes:\n$newly_passing_tests\n"; - $newly_failing_tests="None" unless $newly_failing_tests ne ""; - $email .= "\nNew Test Failures:\n$newly_failing_tests\n"; - $new_tests="None" unless $new_tests ne ""; - $email .= "\nAdded Tests:\n$new_tests\n"; - $removed_tests="None" unless $removed_tests ne ""; - $email .= "\nRemoved Tests:\n$removed_tests\n"; +if($buildstatus eq "OK") { + if ($newly_passing_tests ne "") { + $newly_passing_tests = "\n$newly_passing_tests\n"; + } else { + $newly_passing_tests = "None"; + } + $email .= "\nNew Test Passes: $newly_passing_tests"; + if ($newly_failing_tests ne "") { + $newly_failing_tests = "\n$newly_failing_tests\n"; + } else { + $newly_failing_tests = "None"; + } + $email .= "\nNew Test Failures: $newly_failing_tests"; + if ($new_tests ne "") { + $new_tests = "\n$new_tests\n"; + } else { + $new_tests = "None"; + } + $email .= "\nAdded Tests: $new_tests"; + if ($removed_tests ne "") { + $removed_tests = "\n$removed_tests\n"; + } else { + $removed_tests = "None"; + } + $email .= "\nRemoved Tests: $removed_tests\n"; } else{ $temp_date = $db_date;
    Date addedTime submittedMachine nameBuild status# of expected test passes