[llvm-commits] CVS: llvm/test/Regression/CodeGen/Generic/2006-09-02-LocalAllocCrash.ll
Changes in directory llvm/test/Regression/CodeGen/Generic: 2006-09-02-LocalAllocCrash.ll added (r1.1) --- Log message: Testcase (distilled from crafty) that crashed the local RA on X86. --- Diffs of the changes: (+115 -0) 2006-09-02-LocalAllocCrash.ll | 115 ++ 1 files changed, 115 insertions(+) Index: llvm/test/Regression/CodeGen/Generic/2006-09-02-LocalAllocCrash.ll diff -c /dev/null llvm/test/Regression/CodeGen/Generic/2006-09-02-LocalAllocCrash.ll:1.1 *** /dev/null Sun Sep 3 02:14:57 2006 --- llvm/test/Regression/CodeGen/Generic/2006-09-02-LocalAllocCrash.ll Sun Sep 3 02:14:47 2006 *** *** 0 --- 1,115 + ; RUN: llvm-as < %s | llc -regalloc=local + + %struct.CHESS_POSITION = type { ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, uint, int, sbyte, sbyte, [64 x sbyte], sbyte, sbyte, sbyte, sbyte, sbyte } + %search = external global %struct.CHESS_POSITION ; <%struct.CHESS_POSITION*> [#uses=2] + %bishop_shift_rl45 = external global [64 x int] ; <[64 x int]*> [#uses=1] + %bishop_shift_rr45 = external global [64 x int] ; <[64 x int]*> [#uses=1] + %black_outpost = external global [64 x sbyte] ; <[64 x sbyte]*> [#uses=1] + %bishop_mobility_rl45 = external global [64 x [256 x int]]; <[64 x [256 x int]]*> [#uses=1] + %bishop_mobility_rr45 = external global [64 x [256 x int]]; <[64 x [256 x int]]*> [#uses=1] + + implementation ; Functions: + + declare fastcc int %FirstOne() + + fastcc void %Evaluate() { + entry: + br bool false, label %cond_false186, label %cond_true + + cond_true:; preds = %entry + ret void + + cond_false186:; preds = %entry + br bool false, label %cond_true293, label %bb203 + + bb203:; preds = %cond_false186 + ret void + + cond_true293: ; preds = %cond_false186 + br bool false, label %cond_true298, label %cond_next317 + + cond_true298: ; preds = %cond_true293 + br bool false, label %cond_next518, label %cond_true397.preheader + + cond_next317: ; preds = %cond_true293 + ret void + + cond_true397.preheader: ; preds = %cond_true298 + ret void + + cond_next518: ; preds = %cond_true298 + br bool false, label %bb1069, label %cond_true522 + + cond_true522: ; preds = %cond_next518 + ret void + + bb1069: ; preds = %cond_next518 + br bool false, label %cond_next1131, label %bb1096 + + bb1096: ; preds = %bb1069 + ret void + + cond_next1131:; preds = %bb1069 + br bool false, label %cond_next1207, label %cond_true1150 + + cond_true1150:; preds = %cond_next1131 + ret void + + cond_next1207:; preds = %cond_next1131 + br bool false, label %cond_next1219, label %cond_true1211 + + cond_true1211:; preds = %cond_next1207 + ret void + + cond_next1219:; preds = %cond_next1207 + br bool false, label %cond_true1223, label %cond_next1283 + + cond_true1223:; preds = %cond_next1219 + br bool false, label %cond_true1254, label %cond_true1264 + + cond_true1254:; preds = %cond_true1223 + br bool false, label %bb1567, label %cond_true1369.preheader + + cond_true1264:; preds = %cond_true1223 + ret void + + cond_next1283:; preds = %cond_next1219 + ret void + + cond_true1369.preheader: ; preds = %cond_true1254 + ret void + + bb1567: ; preds = %cond_true1254 + %tmp1580 = load ulong* getelementptr (%struct.CHESS_POSITION* %search, int 0, uint 3) ; [#uses=1] + %tmp1591 = load ulong* getelementptr (%struct.CHESS_POSITION* %search, int 0, uint 4) ; [#uses=1] + %tmp1572 = tail call fastcc int %FirstOne( ); [#uses=5] + %tmp1582 = getelementptr [64 x int]* %bishop_shift_rl45, int 0, int %tmp1572; [#uses=1] + %tmp1583 = load int* %tmp1582 ; [#uses=1] + %tmp1583 = cast int %tmp1583 to ubyte ; [#uses=1] + %tmp1584 = shr ulong %tmp1580, ubyte %tmp1583 ; [#uses=1] + %tmp1584 = cast ulong %tmp1584 to uint ; [#uses=1] + %tmp1585 = and uint %tmp1584, 255 ; [#uses=1] + %tmp1587 = getelementptr [64 x [256 x int]]* %bishop_mobility_rl45, int 0, int %tmp1572, uint %tmp1585 ; [#uses=1] + %tmp1588 = load int* %tmp1587 ; [#uses=1] + %tmp1593 = getelementptr [64 x int]* %bishop_shift_rr45, int 0, int %tmp1572; [#uses=1] + %tmp1594 = load int* %tmp1593 ; [#uses=1] + %tmp1594 = cast int %tmp1594 to ubyte ; [#uses=1]
[llvm-commits] CVS: llvm/lib/CodeGen/RegAllocLocal.cpp
Changes in directory llvm/lib/CodeGen: RegAllocLocal.cpp updated: 1.87 -> 1.88 --- Log message: Fix Regression/CodeGen/Generic/2006-09-02-LocalAllocCrash.ll on X86. Just because an alias of a register is available, it doesn't mean that we can arbitrarily evict the register. --- Diffs of the changes: (+11 -6) RegAllocLocal.cpp | 17 +++-- 1 files changed, 11 insertions(+), 6 deletions(-) Index: llvm/lib/CodeGen/RegAllocLocal.cpp diff -u llvm/lib/CodeGen/RegAllocLocal.cpp:1.87 llvm/lib/CodeGen/RegAllocLocal.cpp:1.88 --- llvm/lib/CodeGen/RegAllocLocal.cpp:1.87 Sat Sep 2 19:06:08 2006 +++ llvm/lib/CodeGen/RegAllocLocal.cpp Sun Sep 3 02:15:37 2006 @@ -103,8 +103,8 @@ } void MarkPhysRegRecentlyUsed(unsigned Reg) { - if(PhysRegsUseOrder.empty() || - PhysRegsUseOrder.back() == Reg) return; // Already most recently used + if (PhysRegsUseOrder.empty() || + PhysRegsUseOrder.back() == Reg) return; // Already most recently used for (unsigned i = PhysRegsUseOrder.size(); i != 0; --i) if (areRegsEqual(Reg, PhysRegsUseOrder[i-1])) { @@ -408,10 +408,15 @@ } else { // If one of the registers aliased to the current register is // compatible, use it. - for (const unsigned *AliasSet = RegInfo->getAliasSet(R); - *AliasSet; ++AliasSet) { -if (RC->contains(*AliasSet)) { - PhysReg = *AliasSet;// Take an aliased register + for (const unsigned *AliasIt = RegInfo->getAliasSet(R); + *AliasIt; ++AliasIt) { +if (RC->contains(*AliasIt) && +// If this is pinned down for some reason, don't use it. For +// example, if CL is pinned, and we run across CH, don't use +// CH as justification for using scavenging ECX (which will +// fail). +PhysRegsUsed[*AliasIt] != 0) { + PhysReg = *AliasIt;// Take an aliased register break; } } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
Changes in directory llvm/lib/CodeGen: LiveIntervalAnalysis.cpp updated: 1.181 -> 1.182 --- Log message: minor speedup --- Diffs of the changes: (+3 -3) LiveIntervalAnalysis.cpp |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp diff -u llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.181 llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.182 --- llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.181 Sat Sep 2 00:32:53 2006 +++ llvm/lib/CodeGen/LiveIntervalAnalysis.cpp Sun Sep 3 02:53:50 2006 @@ -161,7 +161,7 @@ numIntervalsAfter += getNumIntervals(); // perform a final pass over the instructions and compute spill - // weights, coalesce virtual registers and remove identity moves + // weights, coalesce virtual registers and remove identity moves. const LoopInfo& loopInfo = getAnalysis(); for (MachineFunction::iterator mbbi = mf_->begin(), mbbe = mf_->end(); @@ -182,8 +182,8 @@ ++numPeep; } else { -for (unsigned i = 0; i < mii->getNumOperands(); ++i) { - const MachineOperand& mop = mii->getOperand(i); +for (unsigned i = 0, e = mii->getNumOperands(); i != e; ++i) { + const MachineOperand &mop = mii->getOperand(i); if (mop.isRegister() && mop.getReg() && MRegisterInfo::isVirtualRegister(mop.getReg())) { // replace register with representative register ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
Changes in directory llvm/include/llvm/CodeGen: LiveIntervalAnalysis.h updated: 1.60 -> 1.61 --- Log message: Avoid beating on the mi2i map when we know the answer already. --- Diffs of the changes: (+6 -4) LiveIntervalAnalysis.h | 10 ++ 1 files changed, 6 insertions(+), 4 deletions(-) Index: llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h diff -u llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h:1.60 llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h:1.61 --- llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h:1.60 Sat Sep 2 17:27:29 2006 +++ llvm/include/llvm/CodeGen/LiveIntervalAnalysis.hSun Sep 3 03:07:11 2006 @@ -190,20 +190,22 @@ /// handleRegisterDef - update intervals for a register def /// (calls handlePhysicalRegisterDef and /// handleVirtualRegisterDef) -void handleRegisterDef(MachineBasicBlock* mbb, - MachineBasicBlock::iterator mi, +void handleRegisterDef(MachineBasicBlock *MBB, + MachineBasicBlock::iterator MI, unsigned MIIdx, unsigned reg); /// handleVirtualRegisterDef - update intervals for a virtual /// register def -void handleVirtualRegisterDef(MachineBasicBlock* mbb, - MachineBasicBlock::iterator mi, +void handleVirtualRegisterDef(MachineBasicBlock *MBB, + MachineBasicBlock::iterator MI, + unsigned MIIdx, LiveInterval& interval); /// handlePhysicalRegisterDef - update intervals for a physical register /// def. void handlePhysicalRegisterDef(MachineBasicBlock* mbb, MachineBasicBlock::iterator mi, + unsigned MIIdx, LiveInterval &interval, unsigned SrcReg); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
Changes in directory llvm/lib/CodeGen: LiveIntervalAnalysis.cpp updated: 1.182 -> 1.183 --- Log message: Avoid beating on the mi2i map when we know the answer already. --- Diffs of the changes: (+19 -12) LiveIntervalAnalysis.cpp | 31 +++ 1 files changed, 19 insertions(+), 12 deletions(-) Index: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp diff -u llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.182 llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.183 --- llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.182 Sun Sep 3 02:53:50 2006 +++ llvm/lib/CodeGen/LiveIntervalAnalysis.cpp Sun Sep 3 03:07:11 2006 @@ -137,10 +137,10 @@ MachineBasicBlock *Entry = fn.begin(); for (MachineFunction::livein_iterator I = fn.livein_begin(), E = fn.livein_end(); I != E; ++I) { - handlePhysicalRegisterDef(Entry, Entry->begin(), + handlePhysicalRegisterDef(Entry, Entry->begin(), 0, getOrCreateInterval(I->first), 0); for (const unsigned* AS = mri_->getAliasSet(I->first); *AS; ++AS) -handlePhysicalRegisterDef(Entry, Entry->begin(), +handlePhysicalRegisterDef(Entry, Entry->begin(), 0, getOrCreateInterval(*AS), 0); } } @@ -354,6 +354,7 @@ void LiveIntervals::handleVirtualRegisterDef(MachineBasicBlock *mbb, MachineBasicBlock::iterator mi, + unsigned MIIdx, LiveInterval &interval) { DEBUG(std::cerr << "\t\tregister: "; printRegName(interval.reg)); LiveVariables::VarInfo& vi = lv_->getVarInfo(interval.reg); @@ -364,7 +365,7 @@ // time we see a vreg. if (interval.empty()) { // Get the Idx of the defining instructions. -unsigned defIndex = getDefIndex(getInstructionIndex(mi)); +unsigned defIndex = getDefIndex(MIIdx); unsigned ValNum; unsigned SrcReg, DstReg; @@ -451,7 +452,7 @@ // need to take the LiveRegion that defines this register and split it // into two values. unsigned DefIndex = getDefIndex(getInstructionIndex(vi.DefInst)); - unsigned RedefIndex = getDefIndex(getInstructionIndex(mi)); + unsigned RedefIndex = getDefIndex(MIIdx); // Delete the initial value, which should be short and continuous, // because the 2-addr copy must be in the same MBB as the redef. @@ -509,7 +510,7 @@ // In the case of PHI elimination, each variable definition is only // live until the end of the block. We've already taken care of the // rest of the live range. - unsigned defIndex = getDefIndex(getInstructionIndex(mi)); + unsigned defIndex = getDefIndex(MIIdx); unsigned ValNum; unsigned SrcReg, DstReg; @@ -530,6 +531,7 @@ void LiveIntervals::handlePhysicalRegisterDef(MachineBasicBlock *MBB, MachineBasicBlock::iterator mi, + unsigned MIIdx, LiveInterval &interval, unsigned SrcReg) { // A physical register cannot be live across basic block, so its @@ -537,7 +539,7 @@ DEBUG(std::cerr << "\t\tregister: "; printRegName(interval.reg)); typedef LiveVariables::killed_iterator KillIter; - unsigned baseIndex = getInstructionIndex(mi); + unsigned baseIndex = MIIdx; unsigned start = getDefIndex(baseIndex); unsigned end = start; @@ -579,16 +581,17 @@ void LiveIntervals::handleRegisterDef(MachineBasicBlock *MBB, MachineBasicBlock::iterator MI, + unsigned MIIdx, unsigned reg) { if (MRegisterInfo::isVirtualRegister(reg)) -handleVirtualRegisterDef(MBB, MI, getOrCreateInterval(reg)); +handleVirtualRegisterDef(MBB, MI, MIIdx, getOrCreateInterval(reg)); else if (allocatableRegs_[reg]) { unsigned SrcReg, DstReg; if (!tii_->isMoveInstr(*MI, SrcReg, DstReg)) SrcReg = 0; -handlePhysicalRegisterDef(MBB, MI, getOrCreateInterval(reg), SrcReg); +handlePhysicalRegisterDef(MBB, MI, MIIdx, getOrCreateInterval(reg), SrcReg); for (const unsigned* AS = mri_->getAliasSet(reg); *AS; ++AS) - handlePhysicalRegisterDef(MBB, MI, getOrCreateInterval(*AS), 0); + handlePhysicalRegisterDef(MBB, MI, MIIdx, getOrCreateInterval(*AS), 0); } } @@ -602,6 +605,8 @@ << ((Value*)mf_->getFunction())->getName() << '\n'); bool IgnoreFirstInstr = mf_->livein_begin() != mf_->livein_end(); + // Track the index of the current machine instr. + unsigned MIIndex = 0; for (MachineFunction::iterator I = mf_->begin(), E = mf_->end(); I != E; ++I) { MachineBasicBlock* mbb = I; @@ -612,12 +617,12 @@ for (; mi != miEnd; ++mi) { const TargetInstrDescriptor& tid =
[llvm-commits] CVS: llvm/test/Regression/CodeGen/ARM/branch.ll
Changes in directory llvm/test/Regression/CodeGen/ARM: branch.ll updated: 1.2 -> 1.3 --- Log message: add the SETULT condition code --- Diffs of the changes: (+15 -1) branch.ll | 16 +++- 1 files changed, 15 insertions(+), 1 deletion(-) Index: llvm/test/Regression/CodeGen/ARM/branch.ll diff -u llvm/test/Regression/CodeGen/ARM/branch.ll:1.2 llvm/test/Regression/CodeGen/ARM/branch.ll:1.3 --- llvm/test/Regression/CodeGen/ARM/branch.ll:1.2 Sat Sep 2 15:24:25 2006 +++ llvm/test/Regression/CodeGen/ARM/branch.ll Sun Sep 3 08:19:16 2006 @@ -1,7 +1,8 @@ ; RUN: llvm-as < %s | llc -march=arm && ; RUN: llvm-as < %s | llc -march=arm | grep bne && ; RUN: llvm-as < %s | llc -march=arm | grep bge && -; RUN: llvm-as < %s | llc -march=arm | grep bcs +; RUN: llvm-as < %s | llc -march=arm | grep bcs && +; RUN: llvm-as < %s | llc -march=arm | grep bcc void %f1(int %a, int %b, int* %v) { entry: @@ -41,3 +42,16 @@ return:; preds = %entry ret void } + +void %f4(uint %a, uint %b, int* %v) { +entry: + %tmp = setlt uint %a, %b; [#uses=1] + br bool %tmp, label %return, label %cond_true + +cond_true: ; preds = %entry + store int 0, int* %v + ret void + +return:; preds = %entry + ret void +} ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp
Changes in directory llvm/lib/Target/ARM: ARMISelDAGToDAG.cpp updated: 1.39 -> 1.40 --- Log message: add the SETULT condition code --- Diffs of the changes: (+1 -0) ARMISelDAGToDAG.cpp |1 + 1 files changed, 1 insertion(+) Index: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp diff -u llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.39 llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.40 --- llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.39Sat Sep 2 15:24:25 2006 +++ llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Sun Sep 3 08:19:15 2006 @@ -91,6 +91,7 @@ case ISD::SETEQ: return ARMCC::EQ; case ISD::SETGE: return ARMCC::GE; case ISD::SETUGE: return ARMCC::CS; + case ISD::SETULT: return ARMCC::CC; } } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/JIT.cpp
Changes in directory llvm/lib/ExecutionEngine/JIT: JIT.cpp updated: 1.78 -> 1.79 --- Log message: eliminate use of TM.getName() --- Diffs of the changes: (+1 -2) JIT.cpp |3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) Index: llvm/lib/ExecutionEngine/JIT/JIT.cpp diff -u llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.78 llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.79 --- llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.78 Fri Sep 1 13:45:22 2006 +++ llvm/lib/ExecutionEngine/JIT/JIT.cppSun Sep 3 13:37:12 2006 @@ -67,8 +67,7 @@ // Turn the machine code intermediate representation into bytes in memory that // may be executed. if (TM.addPassesToEmitMachineCode(PM, *MCE)) { -std::cerr << "Target '" << TM.getName() - << "' doesn't support machine code emission!\n"; +std::cerr << "Target does not support machine code emission!\n"; abort(); } } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/tools/llc/llc.cpp
Changes in directory llvm/tools/llc: llc.cpp updated: 1.138 -> 1.139 --- Log message: Remove use of target::getName() --- Diffs of the changes: (+2 -2) llc.cpp |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/tools/llc/llc.cpp diff -u llvm/tools/llc/llc.cpp:1.138 llvm/tools/llc/llc.cpp:1.139 --- llvm/tools/llc/llc.cpp:1.138Wed Aug 23 16:29:52 2006 +++ llvm/tools/llc/llc.cpp Sun Sep 3 13:38:30 2006 @@ -222,8 +222,8 @@ // Ask the target to add backend passes as necessary. if (Target.addPassesToEmitFile(Passes, *Out, FileType, Fast)) { - std::cerr << argv[0] << ": target '" << Target.getName() -<< "' does not support generation of this file type!\n"; + std::cerr << argv[0] << ": target does not support generation of this" +<< " file type!\n"; if (Out != &std::cout) delete Out; // And the Out file is empty and useless, so remove it now. sys::Path(OutputFilename).eraseFromDisk(); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/Sparc/SparcTargetMachine.cpp
Changes in directory llvm/lib/Target/Sparc: SparcTargetMachine.cpp updated: 1.48 -> 1.49 --- Log message: Simplify target construction. --- Diffs of the changes: (+1 -1) SparcTargetMachine.cpp |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/Sparc/SparcTargetMachine.cpp diff -u llvm/lib/Target/Sparc/SparcTargetMachine.cpp:1.48 llvm/lib/Target/Sparc/SparcTargetMachine.cpp:1.49 --- llvm/lib/Target/Sparc/SparcTargetMachine.cpp:1.48 Fri Jun 16 13:22:52 2006 +++ llvm/lib/Target/Sparc/SparcTargetMachine.cppSun Sep 3 13:44:02 2006 @@ -31,7 +31,7 @@ /// SparcTargetMachine ctor - Create an ILP32 architecture model /// SparcTargetMachine::SparcTargetMachine(const Module &M, const std::string &FS) - : TargetMachine("Sparc"), DataLayout("E-p:32:32"), + : DataLayout("E-p:32:32"), Subtarget(M, FS), InstrInfo(Subtarget), FrameInfo(TargetFrameInfo::StackGrowsDown, 8, 0) { } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
Changes in directory llvm/lib/Target/PowerPC: PPCTargetMachine.cpp updated: 1.101 -> 1.102 --- Log message: Simplify target construction. --- Diffs of the changes: (+1 -1) PPCTargetMachine.cpp |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/PowerPC/PPCTargetMachine.cpp diff -u llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.101 llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.102 --- llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.101 Mon Aug 28 21:30:59 2006 +++ llvm/lib/Target/PowerPC/PPCTargetMachine.cppSun Sep 3 13:44:02 2006 @@ -85,7 +85,7 @@ PPCTargetMachine::PPCTargetMachine(const Module &M, const std::string &FS, bool is64Bit) - : TargetMachine("PowerPC"), Subtarget(M, FS, is64Bit), + : Subtarget(M, FS, is64Bit), DataLayout(Subtarget.getTargetDataString()), InstrInfo(*this), FrameInfo(*this, false), JITInfo(*this, is64Bit), TLInfo(*this), InstrItins(Subtarget.getInstrItineraryData()) { ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/X86/X86TargetMachine.cpp
Changes in directory llvm/lib/Target/X86: X86TargetMachine.cpp updated: 1.122 -> 1.123 --- Log message: Simplify target construction. --- Diffs of the changes: (+1 -3) X86TargetMachine.cpp |4 +--- 1 files changed, 1 insertion(+), 3 deletions(-) Index: llvm/lib/Target/X86/X86TargetMachine.cpp diff -u llvm/lib/Target/X86/X86TargetMachine.cpp:1.122 llvm/lib/Target/X86/X86TargetMachine.cpp:1.123 --- llvm/lib/Target/X86/X86TargetMachine.cpp:1.122 Tue Aug 29 13:28:33 2006 +++ llvm/lib/Target/X86/X86TargetMachine.cppSun Sep 3 13:44:02 2006 @@ -68,9 +68,7 @@ /// X86TargetMachine ctor - Create an ILP32 architecture model /// X86TargetMachine::X86TargetMachine(const Module &M, const std::string &FS) - : TargetMachine("X86"), -Subtarget(M, FS), -DataLayout("e-p:32:32-d:32-l:32"), + : Subtarget(M, FS), DataLayout("e-p:32:32-d:32-l:32"), FrameInfo(TargetFrameInfo::StackGrowsDown, Subtarget.getStackAlignment(), -4), InstrInfo(*this), JITInfo(*this), TLInfo(*this) { ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/ARM/ARMTargetMachine.cpp
Changes in directory llvm/lib/Target/ARM: ARMTargetMachine.cpp updated: 1.6 -> 1.7 --- Log message: Simplify target construction. --- Diffs of the changes: (+1 -2) ARMTargetMachine.cpp |3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) Index: llvm/lib/Target/ARM/ARMTargetMachine.cpp diff -u llvm/lib/Target/ARM/ARMTargetMachine.cpp:1.6 llvm/lib/Target/ARM/ARMTargetMachine.cpp:1.7 --- llvm/lib/Target/ARM/ARMTargetMachine.cpp:1.6Mon Aug 21 17:00:32 2006 +++ llvm/lib/Target/ARM/ARMTargetMachine.cppSun Sep 3 13:44:02 2006 @@ -33,8 +33,7 @@ /// TargetMachine ctor - Create an ILP32 architecture model /// ARMTargetMachine::ARMTargetMachine(const Module &M, const std::string &FS) - : TargetMachine("ARM"), DataLayout("E-p:32:32"), -FrameInfo() { + : DataLayout("E-p:32:32") { } unsigned ARMTargetMachine::getModuleMatchQuality(const Module &M) { ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/IA64/IA64TargetMachine.cpp
Changes in directory llvm/lib/Target/IA64: IA64TargetMachine.cpp updated: 1.18 -> 1.19 --- Log message: Simplify target construction. --- Diffs of the changes: (+1 -1) IA64TargetMachine.cpp |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/IA64/IA64TargetMachine.cpp diff -u llvm/lib/Target/IA64/IA64TargetMachine.cpp:1.18 llvm/lib/Target/IA64/IA64TargetMachine.cpp:1.19 --- llvm/lib/Target/IA64/IA64TargetMachine.cpp:1.18 Sat Aug 26 16:33:05 2006 +++ llvm/lib/Target/IA64/IA64TargetMachine.cpp Sun Sep 3 13:44:02 2006 @@ -71,7 +71,7 @@ /// IA64TargetMachine ctor - Create an LP64 architecture model /// IA64TargetMachine::IA64TargetMachine(const Module &M, const std::string &FS) - : TargetMachine("IA64"), DataLayout("e"), + : DataLayout("e"), FrameInfo(TargetFrameInfo::StackGrowsDown, 16, 0), TLInfo(*this) { // FIXME? check this stuff } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaTargetMachine.cpp
Changes in directory llvm/lib/Target/Alpha: AlphaTargetMachine.cpp updated: 1.27 -> 1.28 --- Log message: Simplify target construction. --- Diffs of the changes: (+1 -1) AlphaTargetMachine.cpp |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/Alpha/AlphaTargetMachine.cpp diff -u llvm/lib/Target/Alpha/AlphaTargetMachine.cpp:1.27 llvm/lib/Target/Alpha/AlphaTargetMachine.cpp:1.28 --- llvm/lib/Target/Alpha/AlphaTargetMachine.cpp:1.27 Tue Jul 25 15:40:54 2006 +++ llvm/lib/Target/Alpha/AlphaTargetMachine.cppSun Sep 3 13:44:02 2006 @@ -54,7 +54,7 @@ } AlphaTargetMachine::AlphaTargetMachine(const Module &M, const std::string &FS) - : TargetMachine("alpha"), DataLayout("e"), + : DataLayout("e"), FrameInfo(TargetFrameInfo::StackGrowsDown, 16, 0), JITInfo(*this), Subtarget(M, FS) ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/CBackend/CTargetMachine.h
Changes in directory llvm/lib/Target/CBackend: CTargetMachine.h updated: 1.14 -> 1.15 --- Log message: Simplify target construction. --- Diffs of the changes: (+1 -1) CTargetMachine.h |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/CBackend/CTargetMachine.h diff -u llvm/lib/Target/CBackend/CTargetMachine.h:1.14 llvm/lib/Target/CBackend/CTargetMachine.h:1.15 --- llvm/lib/Target/CBackend/CTargetMachine.h:1.14 Fri Jun 16 13:22:52 2006 +++ llvm/lib/Target/CBackend/CTargetMachine.h Sun Sep 3 13:44:02 2006 @@ -23,7 +23,7 @@ const TargetData DataLayout; // Calculates type size & alignment CTargetMachine(const Module &M, const std::string &FS) -: TargetMachine("CBackend", M), DataLayout(&M) {} +: DataLayout(&M) {} // This is the only thing that actually does anything here. virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out, ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/TargetMachine.cpp
Changes in directory llvm/lib/Target: TargetMachine.cpp updated: 1.51 -> 1.52 --- Log message: Simplify target construction. --- Diffs of the changes: (+0 -4) TargetMachine.cpp |4 1 files changed, 4 deletions(-) Index: llvm/lib/Target/TargetMachine.cpp diff -u llvm/lib/Target/TargetMachine.cpp:1.51 llvm/lib/Target/TargetMachine.cpp:1.52 --- llvm/lib/Target/TargetMachine.cpp:1.51 Tue Aug 29 10:13:10 2006 +++ llvm/lib/Target/TargetMachine.cpp Sun Sep 3 13:44:02 2006 @@ -95,10 +95,6 @@ // TargetMachine Class // -TargetMachine::TargetMachine(const std::string &name, const Module &M) - : Name(name) { -} - TargetMachine::~TargetMachine() { } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/Target/TargetMachine.h
Changes in directory llvm/include/llvm/Target: TargetMachine.h updated: 1.67 -> 1.68 --- Log message: Eliminate target name. --- Diffs of the changes: (+3 -14) TargetMachine.h | 17 +++-- 1 files changed, 3 insertions(+), 14 deletions(-) Index: llvm/include/llvm/Target/TargetMachine.h diff -u llvm/include/llvm/Target/TargetMachine.h:1.67 llvm/include/llvm/Target/TargetMachine.h:1.68 --- llvm/include/llvm/Target/TargetMachine.h:1.67 Wed Jul 26 16:12:04 2006 +++ llvm/include/llvm/Target/TargetMachine.hSun Sep 3 13:44:26 2006 @@ -62,18 +62,10 @@ /// through this interface. /// class TargetMachine { - const std::string Name; - TargetMachine(const TargetMachine&); // DO NOT IMPLEMENT void operator=(const TargetMachine&); // DO NOT IMPLEMENT -protected: // Can only create subclasses... - TargetMachine(const std::string &name) : Name(name) { }; - - /// This constructor is used for targets that support arbitrary TargetData - /// layouts, like the C backend. It initializes the TargetData to match that - /// of the specified module. - /// - TargetMachine(const std::string &name, const Module &M); +protected: // Can only create subclasses. + TargetMachine() { } /// getSubtargetImpl - virtual method implemented by subclasses that returns /// a reference to that target's TargetSubtarget-derived member variable. @@ -94,9 +86,6 @@ /// will not be used unless an explicit -march option is used. static unsigned getJITMatchQuality() { return 0; } - - const std::string &getName() const { return Name; } - // Interfaces to the major aspects of target machine information: // -- Instruction opcode and operand information // -- Pipelines and scheduling information @@ -122,7 +111,7 @@ /// not, return null. This is kept separate from RegInfo until RegInfo has /// details of graph coloring register allocation removed from it. /// - virtual const MRegisterInfo* getRegisterInfo() const { return 0; } + virtual const MRegisterInfo *getRegisterInfo() const { return 0; } /// getJITInfo - If this target supports a JIT, return information for it, /// otherwise return null. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/configure
Changes in directory llvm-test: configure updated: 1.38 -> 1.39 --- Log message: Regenerated after adding SPEC2006 support. --- Diffs of the changes: (+112 -29) configure | 141 +- 1 files changed, 112 insertions(+), 29 deletions(-) Index: llvm-test/configure diff -u llvm-test/configure:1.38 llvm-test/configure:1.39 --- llvm-test/configure:1.38Wed Aug 16 17:09:23 2006 +++ llvm-test/configure Sun Sep 3 15:38:14 2006 @@ -798,6 +798,8 @@ USE_SPEC95 SPEC2000_ROOT USE_SPEC2000 +SPEC2006_ROOT +USE_SPEC2006 POVRAY_ROOT USE_POVRAY NAMD_ROOT @@ -1474,6 +1476,7 @@ --with-externals=DIRLocation of External Test code --with-spec95=DIR Use spec95 as a benchmark (srcs in DIR) --with-spec2000=DIR Use spec2000 as a benchmark (srcs in DIR) + --with-spec2006=DIR Use spec2006 as a benchmark (srcs in DIR) --with-povray=DIR Use povray as a benchmark (srcs in DIR) --with-namd=DIR Use namd as a benchmark (srcs in DIR) --with-sweep3d=DIR Use sweep3d as a benchmark (srcs in DIR) @@ -2054,12 +2057,21 @@ ac_config_commands="$ac_config_commands External/SPEC/Makefile.spec" +ac_config_commands="$ac_config_commands External/SPEC/Makefile.spec2006" + + ac_config_commands="$ac_config_commands External/SPEC/Makefile.spec2000" ac_config_commands="$ac_config_commands External/SPEC/Makefile.spec95" +ac_config_commands="$ac_config_commands External/SPEC/CFP2006/Makefile" + + +ac_config_commands="$ac_config_commands External/SPEC/CINT2006/Makefile" + + ac_config_commands="$ac_config_commands External/SPEC/CFP2000/Makefile" @@ -2215,6 +2227,53 @@ +# Check whether --with-spec2006 was given. +if test "${with_spec2006+set}" = set; then + withval=$with_spec2006; checkresult=$withval +else + checkresult=auto +fi + +{ echo "$as_me:$LINENO: checking for spec2006 benchmark sources" >&5 +echo $ECHO_N "checking for spec2006 benchmark sources... $ECHO_C" >&6; } +case "$checkresult" in +auto|yes) + defaultdir=${LLVM_EXTERNALS}/speccpu2006/benchspec + if test -d "$defaultdir"; then +SPEC2006_ROOT=$defaultdir + +USE_SPEC2006=USE_SPEC2006=1 + +checkresult="yes, found in $defaultdir" + else +checkresult=no + fi + ;; +no) + + + checkresult=no + ;; +*) + if test -d "$checkresult" ; then +SPEC2006_ROOT="$checkresult" + +USE_SPEC2006=USE_SPEC2006=1 + +checkresult="yes, in $checkresult" + else + + +checkresult="no, not found in $checkresult" + fi + ;; +esac +{ echo "$as_me:$LINENO: result: $checkresult" >&5 +echo "${ECHO_T}$checkresult" >&6; } + + + + # Check whether --with-povray was given. if test "${with_povray+set}" = set; then withval=$with_povray; checkresult=$withval @@ -2496,6 +2555,19 @@ +if test -n "$SPEC2006_ROOT" ; then + if test -d "$SPEC2006_ROOT" ; then +if test `basename "$SPEC2006_ROOT"` != "benchspec"; then + { { echo "$as_me:$LINENO: error: SPEC 2006 directory must end in 'benchspec'" >&5 +echo "$as_me: error: SPEC 2006 directory must end in 'benchspec'" >&2;} + { (exit 1); exit 1; }; } +fi + else +{ { echo "$as_me:$LINENO: error: SPEC 2006 option must specify a directory" >&5 +echo "$as_me: error: SPEC 2006 option must specify a directory" >&2;} + { (exit 1); exit 1; }; } + fi +fi if test -n "$SPEC2000_ROOT" ; then if test -d "$SPEC2000_ROOT" ; then if test `basename "$SPEC2000_ROOT"` != "benchspec"; then @@ -4460,9 +4532,9 @@ { echo "$as_me:$LINENO: result: $llvm_cv_has_bison" >&5 echo "${ECHO_T}$llvm_cv_has_bison" >&6; } if test "$YACC" != "bison -y"; then - { { echo "$as_me:$LINENO: error: bison not found but required" >&5 -echo "$as_me: error: bison not found but required" >&2;} - { (exit 1); exit 1; }; } + + { echo "$as_me:$LINENO: WARNING: bison not found, can't rebuild grammars" >&5 +echo "$as_me: WARNING: bison not found, can't rebuild grammars" >&2;} else BISON=bison @@ -5262,7 +5334,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 5265 "configure"' > conftest.$ac_ext + echo '#line 5337 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -7427,11 +7499,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7430: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7502: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7434: \$? = $ac_status" >&5 + echo "$as_me:7506: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7695,11 +7767,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conft
[llvm-commits] CVS: llvm-test/Makefile.config.in
Changes in directory llvm-test: Makefile.config.in updated: 1.22 -> 1.23 --- Log message: Reenable this now that the matching configure change has been made --- Diffs of the changes: (+1 -1) Makefile.config.in |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-test/Makefile.config.in diff -u llvm-test/Makefile.config.in:1.22 llvm-test/Makefile.config.in:1.23 --- llvm-test/Makefile.config.in:1.22 Sat Sep 2 02:29:33 2006 +++ llvm-test/Makefile.config.inSun Sep 3 18:10:17 2006 @@ -35,7 +35,7 @@ # SPEC benchmarks: # If these are set then run the SPEC benchmarks. # You must provide the SPEC benchmarks on your own. [EMAIL PROTECTED]@ [EMAIL PROTECTED]@ @USE_SPEC2000@ @USE_SPEC95@ ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/Makefile.rules
Changes in directory llvm: Makefile.rules updated: 1.399 -> 1.400 --- Log message: Rearrange library linkage order. --- Diffs of the changes: (+4 -3) Makefile.rules |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.399 llvm/Makefile.rules:1.400 --- llvm/Makefile.rules:1.399 Sun Aug 27 20:02:49 2006 +++ llvm/Makefile.rules Sun Sep 3 20:02:25 2006 @@ -641,8 +641,7 @@ Link += -dlopen self # Generic JIT libraries -JIT_LIBS := LLVMInterpreter LLVMJIT LLVMSelectionDAG.a LLVMCodeGen.a \ -LLVMExecutionEngine +JIT_LIBS := LLVMInterpreter LLVMJIT # You can enable the X86 JIT on a non-X86 host by setting the flag # ENABLE_X86_JIT on the make command line. If not, it will still be @@ -680,8 +679,10 @@ JIT_LIBS += LLVMAlpha endif +JIT_LIBS += LLVMTarget.a LLVMSelectionDAG.a LLVMCodeGen.a LLVMExecutionEngine + LLVMLIBS := $(JIT_LIBS) LLVMScalarOpts.a LLVMTransformUtils.a LLVMAnalysis.a \ -LLVMBCReader.a LLVMTarget.a LLVMCore.a LLVMSupport.a LLVMbzip2.a \ +LLVMBCReader.a LLVMCore.a LLVMSupport.a LLVMbzip2.a \ LLVMSystem.a $(PLATFORMLIBDL) endif ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/tools/llvm-config/find-cycles.pl
Changes in directory llvm/tools/llvm-config: find-cycles.pl updated: 1.6 -> 1.7 --- Log message: remove message --- Diffs of the changes: (+0 -1) find-cycles.pl |1 - 1 files changed, 1 deletion(-) Index: llvm/tools/llvm-config/find-cycles.pl diff -u llvm/tools/llvm-config/find-cycles.pl:1.6 llvm/tools/llvm-config/find-cycles.pl:1.7 --- llvm/tools/llvm-config/find-cycles.pl:1.6 Fri Aug 4 16:52:23 2006 +++ llvm/tools/llvm-config/find-cycles.pl Sun Sep 3 20:48:32 2006 @@ -61,7 +61,6 @@ $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"; push @modules, @archives; # WORKAROUND: Duplicate *.a files. Ick. } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/tools/llvm-config/Makefile
Changes in directory llvm/tools/llvm-config: Makefile updated: 1.16 -> 1.17 --- Log message: If a cycle exists, don't succeed building the second time around. --- Diffs of the changes: (+1 -1) Makefile |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/tools/llvm-config/Makefile diff -u llvm/tools/llvm-config/Makefile:1.16 llvm/tools/llvm-config/Makefile:1.17 --- llvm/tools/llvm-config/Makefile:1.16Fri Aug 4 17:55:53 2006 +++ llvm/tools/llvm-config/Makefile Sun Sep 3 20:49:10 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) > $@ || rm -f $@ # Rerun our configure substitutions as needed. ConfigInIn = $(PROJ_SRC_DIR)/llvm-config.in.in ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/tools/llc/Makefile
Changes in directory llvm/tools/llc: Makefile updated: 1.88 -> 1.89 --- Log message: rearrange targets to satisfy dependencies. Too bad we aren't using llvm-config. --- Diffs of the changes: (+1 -1) Makefile |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/tools/llc/Makefile diff -u llvm/tools/llc/Makefile:1.88 llvm/tools/llc/Makefile:1.89 --- llvm/tools/llc/Makefile:1.88Thu Aug 3 11:59:17 2006 +++ llvm/tools/llc/Makefile Sun Sep 3 23:04:41 2006 @@ -17,9 +17,9 @@ include $(LEVEL)/Makefile.config USEDLIBS := $(addprefix LLVM,$(TARGETS_TO_BUILD)) \ + LLVMTarget.a \ LLVMCodeGen.a \ LLVMSelectionDAG.a \ - LLVMTarget.a \ LLVMipa.a \ LLVMTransforms.a \ LLVMScalarOpts.a \ ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/TargetMachine.cpp
Changes in directory llvm/lib/Target: TargetMachine.cpp updated: 1.52 -> 1.53 --- Log message: remove #include --- 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.52 llvm/lib/Target/TargetMachine.cpp:1.53 --- llvm/lib/Target/TargetMachine.cpp:1.52 Sun Sep 3 13:44:02 2006 +++ llvm/lib/Target/TargetMachine.cpp Sun Sep 3 23:06:01 2006 @@ -13,7 +13,6 @@ #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetOptions.h" -#include "llvm/Type.h" #include "llvm/Support/CommandLine.h" using namespace llvm; @@ -127,3 +126,4 @@ /// and results are never NaNs or +-Infs. bool FiniteOnlyFPMath() { return UnsafeFPMath || FiniteOnlyFPMathOption; } } + ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/VMCore/Pass.cpp
Changes in directory llvm/lib/VMCore: Pass.cpp updated: 1.71 -> 1.72 --- Log message: Add explicit doInitialization/doFinalization methods instead of making the FunctionPassManager redo this for each function. --- Diffs of the changes: (+14 -1) Pass.cpp | 15 ++- 1 files changed, 14 insertions(+), 1 deletion(-) Index: llvm/lib/VMCore/Pass.cpp diff -u llvm/lib/VMCore/Pass.cpp:1.71 llvm/lib/VMCore/Pass.cpp:1.72 --- llvm/lib/VMCore/Pass.cpp:1.71 Sun Aug 27 17:21:55 2006 +++ llvm/lib/VMCore/Pass.cppSun Sep 3 23:07:39 2006 @@ -94,13 +94,26 @@ FunctionPassManager::~FunctionPassManager() { delete PM; } void FunctionPassManager::add(FunctionPass *P) { PM->add(P); } void FunctionPassManager::add(ImmutablePass *IP) { PM->add(IP); } + +/// doInitialization - Run all of the initializers for the function passes. +/// +bool FunctionPassManager::doInitialization() { + return PM->doInitialization(*MP->getModule()); +} + bool FunctionPassManager::run(Function &F) { std::string errstr; if (MP->materializeFunction(&F, &errstr)) { std::cerr << "Error reading bytecode file: " << errstr << "\n"; abort(); } - return PM->run(F); + return PM->runOnFunction(F); +} + +/// doFinalization - Run all of the initializers for the function passes. +/// +bool FunctionPassManager::doFinalization() { + return PM->doFinalization(*MP->getModule()); } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/PassManager.h
Changes in directory llvm/include/llvm: PassManager.h updated: 1.14 -> 1.15 --- Log message: Add explicit doInitialization/doFinalization methods instead of making the FunctionPassManager redo this for each function. --- Diffs of the changes: (+8 -0) PassManager.h |8 1 files changed, 8 insertions(+) Index: llvm/include/llvm/PassManager.h diff -u llvm/include/llvm/PassManager.h:1.14 llvm/include/llvm/PassManager.h:1.15 --- llvm/include/llvm/PassManager.h:1.14Wed Jan 4 01:47:12 2006 +++ llvm/include/llvm/PassManager.h Sun Sep 3 23:07:39 2006 @@ -70,11 +70,19 @@ /// void add(ImmutablePass *IP); + /// doInitialization - Run all of the initializers for the function passes. + /// + bool doInitialization(); + /// run - Execute all of the passes scheduled for execution. Keep /// track of whether any of the passes modifies the function, and if /// so, return true. /// bool run(Function &F); + + /// doFinalization - Run all of the initializers for the function passes. + /// + bool doFinalization(); }; } // End llvm namespace ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/X86/X86Subtarget.h
Changes in directory llvm/lib/Target/X86: X86Subtarget.h updated: 1.12 -> 1.13 --- Log message: Add accessor --- Diffs of the changes: (+1 -0) X86Subtarget.h |1 + 1 files changed, 1 insertion(+) Index: llvm/lib/Target/X86/X86Subtarget.h diff -u llvm/lib/Target/X86/X86Subtarget.h:1.12 llvm/lib/Target/X86/X86Subtarget.h:1.13 --- llvm/lib/Target/X86/X86Subtarget.h:1.12 Fri Feb 17 18:15:05 2006 +++ llvm/lib/Target/X86/X86Subtarget.h Sun Sep 3 23:08:58 2006 @@ -82,6 +82,7 @@ bool has3DNowA() const { return X863DNowLevel >= ThreeDNowA; } bool isTargetDarwin() const { return TargetType == isDarwin; } + bool isTargetELF() const { return TargetType == isELF; } }; } // End llvm namespace ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/JIT.cpp
Changes in directory llvm/lib/ExecutionEngine/JIT: JIT.cpp updated: 1.79 -> 1.80 --- Log message: Completely rearchitect the interface between targets and the pass manager. This pass: 1. Splits TargetMachine into TargetMachine (generic targets, can be implemented any way, like the CBE) and LLVMTargetMachine (subclass of TM that is used by things using libcodegen and other support). 2. Instead of having each target fully populate the passmgr for file or JIT output, move all this to common code, and give targets hooks they can implement. 3. Commonalize the target population stuff between file emission and JIT emission. 4. All (native code) codegen stuff now happens in a FunctionPassManager, which paves the way for "fast -O0" stuff in the CFE later, and now LLC could lazily stream .bc files from disk to use less memory. 5. There are now many fewer #includes and the targets don't depend on the scalar xforms or libanalysis anymore (but codegen does). 6. Changing common code generator pass ordering stuff no longer requires touching all targets. 7. The JIT now has the option of "-fast" codegen or normal optimized codegen, which is now orthogonal to the fact that JIT'ing is being done. --- Diffs of the changes: (+5 -5) JIT.cpp | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) Index: llvm/lib/ExecutionEngine/JIT/JIT.cpp diff -u llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.79 llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.80 --- llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.79 Sun Sep 3 13:37:12 2006 +++ llvm/lib/ExecutionEngine/JIT/JIT.cppSun Sep 3 23:14:57 2006 @@ -58,18 +58,18 @@ // Add target data MutexGuard locked(lock); - FunctionPassManager& PM = state.getPM(locked); + FunctionPassManager &PM = state.getPM(locked); PM.add(new TargetData(*TM.getTargetData())); - // Compile LLVM Code down to machine code in the intermediate representation - TJI.addPassesToJITCompile(PM); - // Turn the machine code intermediate representation into bytes in memory that // may be executed. - if (TM.addPassesToEmitMachineCode(PM, *MCE)) { + if (TM.addPassesToEmitMachineCode(PM, *MCE, false /*fast*/)) { std::cerr << "Target does not support machine code emission!\n"; abort(); } + + // Initialize passes. + PM.doInitialization(); } JIT::~JIT() { ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/CBackend/CTargetMachine.h Writer.cpp
Changes in directory llvm/lib/Target/CBackend: CTargetMachine.h updated: 1.15 -> 1.16 Writer.cpp updated: 1.267 -> 1.268 --- Log message: Completely rearchitect the interface between targets and the pass manager. This pass: 1. Splits TargetMachine into TargetMachine (generic targets, can be implemented any way, like the CBE) and LLVMTargetMachine (subclass of TM that is used by things using libcodegen and other support). 2. Instead of having each target fully populate the passmgr for file or JIT output, move all this to common code, and give targets hooks they can implement. 3. Commonalize the target population stuff between file emission and JIT emission. 4. All (native code) codegen stuff now happens in a FunctionPassManager, which paves the way for "fast -O0" stuff in the CFE later, and now LLC could lazily stream .bc files from disk to use less memory. 5. There are now many fewer #includes and the targets don't depend on the scalar xforms or libanalysis anymore (but codegen does). 6. Changing common code generator pass ordering stuff no longer requires touching all targets. 7. The JIT now has the option of "-fast" codegen or normal optimized codegen, which is now orthogonal to the fact that JIT'ing is being done. --- Diffs of the changes: (+8 -6) CTargetMachine.h |8 Writer.cpp |6 -- 2 files changed, 8 insertions(+), 6 deletions(-) Index: llvm/lib/Target/CBackend/CTargetMachine.h diff -u llvm/lib/Target/CBackend/CTargetMachine.h:1.15 llvm/lib/Target/CBackend/CTargetMachine.h:1.16 --- llvm/lib/Target/CBackend/CTargetMachine.h:1.15 Sun Sep 3 13:44:02 2006 +++ llvm/lib/Target/CBackend/CTargetMachine.h Sun Sep 3 23:14:57 2006 @@ -25,14 +25,14 @@ CTargetMachine(const Module &M, const std::string &FS) : DataLayout(&M) {} - // This is the only thing that actually does anything here. - virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out, - CodeGenFileType FileType, bool Fast); + virtual bool WantsWholeFile() const { return true; } + virtual bool addPassesToEmitWholeFile(PassManager &PM, std::ostream &Out, +CodeGenFileType FileType, bool Fast); // This class always works, but shouldn't be the default in most cases. static unsigned getModuleMatchQuality(const Module &M) { return 1; } - virtual const TargetData *getTargetData() const { return &DataLayout; } + virtual const TargetData *getTargetData() const { return &DataLayout; } }; } // End llvm namespace Index: llvm/lib/Target/CBackend/Writer.cpp diff -u llvm/lib/Target/CBackend/Writer.cpp:1.267 llvm/lib/Target/CBackend/Writer.cpp:1.268 --- llvm/lib/Target/CBackend/Writer.cpp:1.267 Fri Jul 28 15:58:47 2006 +++ llvm/lib/Target/CBackend/Writer.cpp Sun Sep 3 23:14:57 2006 @@ -2027,8 +2027,10 @@ // External Interface declaration //===--===// -bool CTargetMachine::addPassesToEmitFile(PassManager &PM, std::ostream &o, - CodeGenFileType FileType, bool Fast) { +bool CTargetMachine::addPassesToEmitWholeFile(PassManager &PM, + std::ostream &o, + CodeGenFileType FileType, + bool Fast) { if (FileType != TargetMachine::AssemblyFile) return true; PM.add(createLowerGCPass()); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/Target/TargetJITInfo.h TargetMachine.h
Changes in directory llvm/include/llvm/Target: TargetJITInfo.h updated: 1.10 -> 1.11 TargetMachine.h updated: 1.68 -> 1.69 --- Log message: Completely rearchitect the interface between targets and the pass manager. This pass: 1. Splits TargetMachine into TargetMachine (generic targets, can be implemented any way, like the CBE) and LLVMTargetMachine (subclass of TM that is used by things using libcodegen and other support). 2. Instead of having each target fully populate the passmgr for file or JIT output, move all this to common code, and give targets hooks they can implement. 3. Commonalize the target population stuff between file emission and JIT emission. 4. All (native code) codegen stuff now happens in a FunctionPassManager, which paves the way for "fast -O0" stuff in the CFE later, and now LLC could lazily stream .bc files from disk to use less memory. 5. There are now many fewer #includes and the targets don't depend on the scalar xforms or libanalysis anymore (but codegen does). 6. Changing common code generator pass ordering stuff no longer requires touching all targets. 7. The JIT now has the option of "-fast" codegen or normal optimized codegen, which is now orthogonal to the fact that JIT'ing is being done. --- Diffs of the changes: (+96 -11) TargetJITInfo.h |5 -- TargetMachine.h | 102 2 files changed, 96 insertions(+), 11 deletions(-) Index: llvm/include/llvm/Target/TargetJITInfo.h diff -u llvm/include/llvm/Target/TargetJITInfo.h:1.10 llvm/include/llvm/Target/TargetJITInfo.h:1.11 --- llvm/include/llvm/Target/TargetJITInfo.h:1.10 Thu Jul 27 13:19:24 2006 +++ llvm/include/llvm/Target/TargetJITInfo.hSun Sep 3 23:14:57 2006 @@ -33,11 +33,6 @@ public: virtual ~TargetJITInfo() {} -/// addPassesToJITCompile - Add passes to the specified pass manager to -/// implement a fast code generator for this target. -/// -virtual void addPassesToJITCompile(FunctionPassManager &PM) = 0; - /// replaceMachineCodeForFunction - Make it so that calling the function /// whose machine code is at OLD turns into a call to NEW, perhaps by /// overwriting OLD with a branch to NEW. This is used for self-modifying Index: llvm/include/llvm/Target/TargetMachine.h diff -u llvm/include/llvm/Target/TargetMachine.h:1.68 llvm/include/llvm/Target/TargetMachine.h:1.69 --- llvm/include/llvm/Target/TargetMachine.h:1.68 Sun Sep 3 13:44:26 2006 +++ llvm/include/llvm/Target/TargetMachine.hSun Sep 3 23:14:57 2006 @@ -7,7 +7,7 @@ // //===--===// // -// This file describes the general parts of a Target machine. +// This file defines the TargetMachine and LLVMTargetMachine classes. // //===--===// @@ -62,8 +62,8 @@ /// through this interface. /// class TargetMachine { - TargetMachine(const TargetMachine&); // DO NOT IMPLEMENT - void operator=(const TargetMachine&); // DO NOT IMPLEMENT + TargetMachine(const TargetMachine &); // DO NOT IMPLEMENT + void operator=(const TargetMachine &); // DO NOT IMPLEMENT protected: // Can only create subclasses. TargetMachine() { } @@ -151,19 +151,109 @@ /// code as fast as possible, without regard for compile time. This method /// should return true if emission of this file type is not supported. /// - virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out, + virtual bool addPassesToEmitFile(FunctionPassManager &PM, std::ostream &Out, CodeGenFileType FileType, bool Fast) { return true; } + + /// addPassesToEmitMachineCode - Add passes to the specified pass manager to + /// get machine code emitted. This uses a MachineCodeEmitter object to handle + /// actually outputting the machine code and resolving things like the address + /// of functions. This method returns true if machine code emission is + /// not supported. + /// + virtual bool addPassesToEmitMachineCode(FunctionPassManager &PM, + MachineCodeEmitter &MCE, bool Fast) { +return true; + } + + /// addPassesToEmitWholeFile - This method can be implemented by targets that + /// require having the entire module at once. This is not recommended, do not + /// use this. + virtual bool WantsWholeFile() const { return false; } + virtual bool addPassesToEmitWholeFile(PassManager &PM, std::ostream &Out, +CodeGenFileType FileType, bool Fast) { +return true; + } +}; + +/// LLVMTargetMachine - This class describes a target machine that is +/// implemented with the LLVM target-independent code generator. +/// +class LLVMTargetMachine : public TargetMachine { +protected: // Can only create subclasses. +LLVMTargetMachine() { } +public: + + /// addPasse
[llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaJITInfo.h AlphaTargetMachine.cpp AlphaTargetMachine.h
Changes in directory llvm/lib/Target/Alpha: AlphaJITInfo.h updated: 1.3 -> 1.4 AlphaTargetMachine.cpp updated: 1.28 -> 1.29 AlphaTargetMachine.h updated: 1.14 -> 1.15 --- Log message: Completely rearchitect the interface between targets and the pass manager. This pass: 1. Splits TargetMachine into TargetMachine (generic targets, can be implemented any way, like the CBE) and LLVMTargetMachine (subclass of TM that is used by things using libcodegen and other support). 2. Instead of having each target fully populate the passmgr for file or JIT output, move all this to common code, and give targets hooks they can implement. 3. Commonalize the target population stuff between file emission and JIT emission. 4. All (native code) codegen stuff now happens in a FunctionPassManager, which paves the way for "fast -O0" stuff in the CFE later, and now LLC could lazily stream .bc files from disk to use less memory. 5. There are now many fewer #includes and the targets don't depend on the scalar xforms or libanalysis anymore (but codegen does). 6. Changing common code generator pass ordering stuff no longer requires touching all targets. 7. The JIT now has the option of "-fast" codegen or normal optimized codegen, which is now orthogonal to the fact that JIT'ing is being done. --- Diffs of the changes: (+25 -94) AlphaJITInfo.h |6 --- AlphaTargetMachine.cpp | 95 - AlphaTargetMachine.h | 18 - 3 files changed, 25 insertions(+), 94 deletions(-) Index: llvm/lib/Target/Alpha/AlphaJITInfo.h diff -u llvm/lib/Target/Alpha/AlphaJITInfo.h:1.3 llvm/lib/Target/Alpha/AlphaJITInfo.h:1.4 --- llvm/lib/Target/Alpha/AlphaJITInfo.h:1.3Thu Jul 27 13:20:17 2006 +++ llvm/lib/Target/Alpha/AlphaJITInfo.hSun Sep 3 23:14:57 2006 @@ -29,12 +29,6 @@ AlphaJITInfo(TargetMachine &tm) : TM(tm) { useGOT = true; } -/// addPassesToJITCompile - Add passes to the specified pass manager to -/// implement a fast dynamic compiler for this target. Return true if this -/// is not supported for this target. -/// -virtual void addPassesToJITCompile(FunctionPassManager &PM); - virtual void *emitFunctionStub(void *Fn, MachineCodeEmitter &MCE); virtual LazyResolverFn getLazyResolverFunction(JITCompilerFn); virtual void relocate(void *Function, MachineRelocation *MR, Index: llvm/lib/Target/Alpha/AlphaTargetMachine.cpp diff -u llvm/lib/Target/Alpha/AlphaTargetMachine.cpp:1.28 llvm/lib/Target/Alpha/AlphaTargetMachine.cpp:1.29 --- llvm/lib/Target/Alpha/AlphaTargetMachine.cpp:1.28 Sun Sep 3 13:44:02 2006 +++ llvm/lib/Target/Alpha/AlphaTargetMachine.cppSun Sep 3 23:14:57 2006 @@ -14,12 +14,8 @@ #include "AlphaJITInfo.h" #include "AlphaTargetMachine.h" #include "llvm/Module.h" -#include "llvm/CodeGen/Passes.h" -#include "llvm/Target/TargetOptions.h" +#include "llvm/PassManager.h" #include "llvm/Target/TargetMachineRegistry.h" -#include "llvm/Transforms/Scalar.h" -#include "llvm/Support/Debug.h" -#include using namespace llvm; @@ -57,89 +53,30 @@ : DataLayout("e"), FrameInfo(TargetFrameInfo::StackGrowsDown, 16, 0), JITInfo(*this), -Subtarget(M, FS) -{ - DEBUG(std::cerr << "FS is " << FS << "\n"); -} - -/// addPassesToEmitFile - Add passes to the specified pass manager to implement -/// a static compiler for this target. -/// -bool AlphaTargetMachine::addPassesToEmitFile(PassManager &PM, - std::ostream &Out, - CodeGenFileType FileType, - bool Fast) { - if (FileType != TargetMachine::AssemblyFile) return true; - - PM.add(createLoopStrengthReducePass()); - PM.add(createCFGSimplificationPass()); - - - // FIXME: Implement efficient support for garbage collection intrinsics. - PM.add(createLowerGCPass()); +Subtarget(M, FS) { +} - // FIXME: Implement the invoke/unwind instructions! - PM.add(createLowerInvokePass()); - // Make sure that no unreachable blocks are instruction selected. - PM.add(createUnreachableBlockEliminationPass()); +//===--===// +// Pass Pipeline Configuration +//===--===// +bool AlphaTargetMachine::addInstSelector(FunctionPassManager &PM, bool Fast) { PM.add(createAlphaISelDag(*this)); - - if (PrintMachineCode) -PM.add(createMachineFunctionPrinterPass(&std::cerr)); - - PM.add(createRegisterAllocator()); - - if (PrintMachineCode) -PM.add(createMachineFunctionPrinterPass(&std::cerr)); - - PM.add(createPrologEpilogCodeInserter()); - - // Must run branch selection immediately preceding the asm printer - //PM.add(createAlphaBranchSelectionPass()); - - PM.add(createAlphaCodePrinterPass(Out, *this)); - - PM.add(createMachineCodeDeleter()); return fals
[llvm-commits] CVS: llvm/lib/Target/IA64/IA64TargetMachine.cpp IA64TargetMachine.h
Changes in directory llvm/lib/Target/IA64: IA64TargetMachine.cpp updated: 1.19 -> 1.20 IA64TargetMachine.h updated: 1.12 -> 1.13 --- Log message: Completely rearchitect the interface between targets and the pass manager. This pass: 1. Splits TargetMachine into TargetMachine (generic targets, can be implemented any way, like the CBE) and LLVMTargetMachine (subclass of TM that is used by things using libcodegen and other support). 2. Instead of having each target fully populate the passmgr for file or JIT output, move all this to common code, and give targets hooks they can implement. 3. Commonalize the target population stuff between file emission and JIT emission. 4. All (native code) codegen stuff now happens in a FunctionPassManager, which paves the way for "fast -O0" stuff in the CFE later, and now LLC could lazily stream .bc files from disk to use less memory. 5. There are now many fewer #includes and the targets don't depend on the scalar xforms or libanalysis anymore (but codegen does). 6. Changing common code generator pass ordering stuff no longer requires touching all targets. 7. The JIT now has the option of "-fast" codegen or normal optimized codegen, which is now orthogonal to the fact that JIT'ing is being done. --- Diffs of the changes: (+22 -77) IA64TargetMachine.cpp | 84 -- IA64TargetMachine.h | 15 2 files changed, 22 insertions(+), 77 deletions(-) Index: llvm/lib/Target/IA64/IA64TargetMachine.cpp diff -u llvm/lib/Target/IA64/IA64TargetMachine.cpp:1.19 llvm/lib/Target/IA64/IA64TargetMachine.cpp:1.20 --- llvm/lib/Target/IA64/IA64TargetMachine.cpp:1.19 Sun Sep 3 13:44:02 2006 +++ llvm/lib/Target/IA64/IA64TargetMachine.cpp Sun Sep 3 23:14:57 2006 @@ -7,7 +7,7 @@ // //===--===// // -// This file defines the IA64 specific subclass of TargetMachine. +// This file implements the IA64 specific subclass of TargetMachine. // //===--===// @@ -15,14 +15,7 @@ #include "IA64.h" #include "llvm/Module.h" #include "llvm/PassManager.h" -#include "llvm/CodeGen/MachineFunction.h" -#include "llvm/CodeGen/Passes.h" -#include "llvm/Target/TargetOptions.h" #include "llvm/Target/TargetMachineRegistry.h" -#include "llvm/Transforms/Scalar.h" -#include "llvm/Support/CommandLine.h" -#include "llvm/ADT/Statistic.h" -#include using namespace llvm; /// IA64TargetMachineModule - Note that this is used on hosts that cannot link @@ -33,14 +26,6 @@ int IA64TargetMachineModule = 0; namespace { - cl::opt DisableOutput("disable-ia64-llc-output", cl::Hidden, - cl::desc("Disable the IA64 asm printer, for use " - "when profiling the code generator.")); - - cl::opt EnableDAGIsel("enable-ia64-dag-isel", cl::Hidden, - cl::desc("Enable the IA64 DAG->DAG isel")); - - // Register the target. RegisterTarget X("ia64", " IA-64 (Itanium)"); } @@ -76,65 +61,24 @@ TLInfo(*this) { // FIXME? check this stuff } -// addPassesToEmitFile - We currently use all of the same passes as the JIT -// does to emit statically compiled machine code. -bool IA64TargetMachine::addPassesToEmitFile(PassManager &PM, -std::ostream &Out, -CodeGenFileType FileType, -bool Fast) { - if (FileType != TargetMachine::AssemblyFile) return true; - - // FIXME: Implement efficient support for garbage collection intrinsics. - PM.add(createLowerGCPass()); - - // FIXME: Implement the invoke/unwind instructions! - PM.add(createLowerInvokePass(704, 16)); // on ia64 linux, jmpbufs are 704 - // bytes and must be 16byte aligned - // Make sure that no unreachable blocks are instruction selected. - PM.add(createUnreachableBlockEliminationPass()); +//===--===// +// Pass Pipeline Configuration +//===--===// - // Add an instruction selector -// FIXME: reap this option one day: if(EnableDAGIsel) +bool IA64TargetMachine::addInstSelector(FunctionPassManager &PM, bool Fast) { PM.add(createIA64DAGToDAGInstructionSelector(*this)); - -/* XXX not yet. ;) - // Run optional SSA-based machine code optimizations next... - if (!NoSSAPeephole) -PM.add(createIA64SSAPeepholeOptimizerPass()); -*/ - - // Print the instruction selected machine code... - if (PrintMachineCode) -PM.add(createMachineFunctionPrinterPass(&std::cerr)); - - // Perform register allocation to convert to a concrete IA64 representation - PM.add(createRegisterAllocator()); - - if (PrintMachineCode) -PM.add(createMachineFunct
[llvm-commits] CVS: llvm/lib/Target/Sparc/SparcTargetMachine.cpp SparcTargetMachine.h
Changes in directory llvm/lib/Target/Sparc: SparcTargetMachine.cpp updated: 1.49 -> 1.50 SparcTargetMachine.h updated: 1.14 -> 1.15 --- Log message: Completely rearchitect the interface between targets and the pass manager. This pass: 1. Splits TargetMachine into TargetMachine (generic targets, can be implemented any way, like the CBE) and LLVMTargetMachine (subclass of TM that is used by things using libcodegen and other support). 2. Instead of having each target fully populate the passmgr for file or JIT output, move all this to common code, and give targets hooks they can implement. 3. Commonalize the target population stuff between file emission and JIT emission. 4. All (native code) codegen stuff now happens in a FunctionPassManager, which paves the way for "fast -O0" stuff in the CFE later, and now LLC could lazily stream .bc files from disk to use less memory. 5. There are now many fewer #includes and the targets don't depend on the scalar xforms or libanalysis anymore (but codegen does). 6. Changing common code generator pass ordering stuff no longer requires touching all targets. 7. The JIT now has the option of "-fast" codegen or normal optimized codegen, which is now orthogonal to the fact that JIT'ing is being done. --- Diffs of the changes: (+18 -54) SparcTargetMachine.cpp | 61 - SparcTargetMachine.h | 11 +--- 2 files changed, 18 insertions(+), 54 deletions(-) Index: llvm/lib/Target/Sparc/SparcTargetMachine.cpp diff -u llvm/lib/Target/Sparc/SparcTargetMachine.cpp:1.49 llvm/lib/Target/Sparc/SparcTargetMachine.cpp:1.50 --- llvm/lib/Target/Sparc/SparcTargetMachine.cpp:1.49 Sun Sep 3 13:44:02 2006 +++ llvm/lib/Target/Sparc/SparcTargetMachine.cppSun Sep 3 23:14:57 2006 @@ -12,14 +12,9 @@ #include "SparcTargetMachine.h" #include "Sparc.h" -#include "llvm/Assembly/PrintModulePass.h" #include "llvm/Module.h" #include "llvm/PassManager.h" -#include "llvm/CodeGen/MachineFunction.h" -#include "llvm/CodeGen/Passes.h" -#include "llvm/Target/TargetOptions.h" #include "llvm/Target/TargetMachineRegistry.h" -#include "llvm/Transforms/Scalar.h" #include using namespace llvm; @@ -55,57 +50,23 @@ return 0; } -/// addPassesToEmitFile - Add passes to the specified pass manager -/// to implement a static compiler for this target. -/// -bool SparcTargetMachine::addPassesToEmitFile(PassManager &PM, std::ostream &Out, - CodeGenFileType FileType, - bool Fast) { - if (FileType != TargetMachine::AssemblyFile) return true; - - // Run loop strength reduction before anything else. - if (!Fast) PM.add(createLoopStrengthReducePass()); - - // FIXME: Implement efficient support for garbage collection intrinsics. - PM.add(createLowerGCPass()); - - // FIXME: implement the invoke/unwind instructions! - PM.add(createLowerInvokePass()); - - // Print LLVM code input to instruction selector: - if (PrintMachineCode) -PM.add(new PrintFunctionPass()); - - // Make sure that no unreachable blocks are instruction selected. - PM.add(createUnreachableBlockEliminationPass()); - +bool SparcTargetMachine::addInstSelector(FunctionPassManager &PM, bool Fast) { PM.add(createSparcISelDag(*this)); + return false; +} - // Print machine instructions as they were initially generated. - if (PrintMachineCode) -PM.add(createMachineFunctionPrinterPass(&std::cerr)); - - PM.add(createRegisterAllocator()); - PM.add(createPrologEpilogCodeInserter()); - - // Print machine instructions after register allocation and prolog/epilog - // insertion. - if (PrintMachineCode) -PM.add(createMachineFunctionPrinterPass(&std::cerr)); - +/// addPreEmitPass - This pass may be implemented by targets that want to run +/// passes immediately before machine code is emitted. This should return +/// true if -print-machineinstrs should print out the code after the passes. +bool SparcTargetMachine::addPreEmitPass(FunctionPassManager &PM, bool Fast) { PM.add(createSparcFPMoverPass(*this)); - PM.add(createSparcDelaySlotFillerPass(*this)); + return true; +} - // Print machine instructions after filling delay slots. - if (PrintMachineCode) -PM.add(createMachineFunctionPrinterPass(&std::cerr)); - +bool SparcTargetMachine::addAssemblyEmitter(FunctionPassManager &PM, bool Fast, +std::ostream &Out) { // Output assembly language. PM.add(createSparcCodePrinterPass(Out, *this)); - - // Delete the MachineInstrs we generated, since they're no longer needed. - PM.add(createMachineCodeDeleter()); return false; } - Index: llvm/lib/Target/Sparc/SparcTargetMachine.h diff -u llvm/lib/Target/Sparc/SparcTargetMachine.h:1.14 llvm/lib/Target/Sparc/SparcTargetMachine.h:1.15 --- llvm/lib/Target/Sparc/SparcTargetMachine.h:1.14 Fri May 12 01:33:48 2006 +++ llvm/lib/Target/Sparc/Spa
[llvm-commits] CVS: llvm/tools/llc/llc.cpp
Changes in directory llvm/tools/llc: llc.cpp updated: 1.139 -> 1.140 --- Log message: Completely rearchitect the interface between targets and the pass manager. This pass: 1. Splits TargetMachine into TargetMachine (generic targets, can be implemented any way, like the CBE) and LLVMTargetMachine (subclass of TM that is used by things using libcodegen and other support). 2. Instead of having each target fully populate the passmgr for file or JIT output, move all this to common code, and give targets hooks they can implement. 3. Commonalize the target population stuff between file emission and JIT emission. 4. All (native code) codegen stuff now happens in a FunctionPassManager, which paves the way for "fast -O0" stuff in the CFE later, and now LLC could lazily stream .bc files from disk to use less memory. 5. There are now many fewer #includes and the targets don't depend on the scalar xforms or libanalysis anymore (but codegen does). 6. Changing common code generator pass ordering stuff no longer requires touching all targets. 7. The JIT now has the option of "-fast" codegen or normal optimized codegen, which is now orthogonal to the fact that JIT'ing is being done. --- Diffs of the changes: (+110 -79) llc.cpp | 189 +--- 1 files changed, 110 insertions(+), 79 deletions(-) Index: llvm/tools/llc/llc.cpp diff -u llvm/tools/llc/llc.cpp:1.139 llvm/tools/llc/llc.cpp:1.140 --- llvm/tools/llc/llc.cpp:1.139Sun Sep 3 13:38:30 2006 +++ llvm/tools/llc/llc.cpp Sun Sep 3 23:14:57 2006 @@ -101,6 +101,69 @@ return outputFilename; } +static std::ostream *GetOutputStream(const char *ProgName) { + if (OutputFilename != "") { +if (OutputFilename == "-") + return &std::cout; + +// Specified an output filename? +if (!Force && std::ifstream(OutputFilename.c_str())) { + // If force is not specified, make sure not to overwrite a file! + std::cerr << ProgName << ": error opening '" << OutputFilename +<< "': file exists!\n" +<< "Use -f command line argument to force output\n"; + return 0; +} +// Make sure that the Out file gets unlinked from the disk if we get a +// SIGINT +sys::RemoveFileOnSignal(sys::Path(OutputFilename)); + +return new std::ofstream(OutputFilename.c_str()); + } + + if (InputFilename == "-") { +OutputFilename = "-"; +return &std::cout; + } + + OutputFilename = GetFileNameRoot(InputFilename); + + switch (FileType) { + case TargetMachine::AssemblyFile: +if (MArch->Name[0] != 'c' || MArch->Name[1] != 0) // not CBE + OutputFilename += ".s"; +else + OutputFilename += ".cbe.c"; +break; + case TargetMachine::ObjectFile: +OutputFilename += ".o"; +break; + case TargetMachine::DynamicLibrary: +OutputFilename += LTDL_SHLIB_EXT; +break; + } + + if (!Force && std::ifstream(OutputFilename.c_str())) { +// If force is not specified, make sure not to overwrite a file! +std::cerr << ProgName << ": error opening '" << OutputFilename + << "': file exists!\n" + << "Use -f command line argument to force output\n"; +return 0; + } + + // Make sure that the Out file gets unlinked from the disk if we get a + // SIGINT + sys::RemoveFileOnSignal(sys::Path(OutputFilename)); + + std::ostream *Out = new std::ofstream(OutputFilename.c_str()); + if (!Out->good()) { +std::cerr << ProgName << ": error opening " << OutputFilename << "!\n"; +delete Out; +return 0; + } + + return Out; +} // main - Entry point for the llc compiler. // @@ -148,91 +211,59 @@ assert(target.get() && "Could not allocate target machine!"); TargetMachine &Target = *target.get(); -// Build up all of the passes that we want to do to the module... -PassManager Passes; -Passes.add(new TargetData(*Target.getTargetData())); - -#ifndef NDEBUG -if(!NoVerify) - Passes.add(createVerifierPass()); -#endif - // Figure out where we are going to send the output... -std::ostream *Out = 0; -if (OutputFilename != "") { - if (OutputFilename != "-") { -// Specified an output filename? -if (!Force && std::ifstream(OutputFilename.c_str())) { - // If force is not specified, make sure not to overwrite a file! - std::cerr << argv[0] << ": error opening '" << OutputFilename -<< "': file exists!\n" -<< "Use -f command line argument to force output\n"; - return 1; -} -Out = new std::ofstream(OutputFilename.c_str()); - -// Make sure that the Out file gets unlinked from the disk if we get a -// SIGINT -sys::RemoveFileOnSignal(sys::Path(OutputFilename)); - } else { -Out = &std::cout; +std::ostream *Out = GetOutputStream(argv[0]); +if (Out == 0) return 1; +
[llvm-commits] CVS: llvm/lib/Target/ARM/ARMTargetMachine.cpp ARMTargetMachine.h
Changes in directory llvm/lib/Target/ARM: ARMTargetMachine.cpp updated: 1.7 -> 1.8 ARMTargetMachine.h updated: 1.2 -> 1.3 --- Log message: Completely rearchitect the interface between targets and the pass manager. This pass: 1. Splits TargetMachine into TargetMachine (generic targets, can be implemented any way, like the CBE) and LLVMTargetMachine (subclass of TM that is used by things using libcodegen and other support). 2. Instead of having each target fully populate the passmgr for file or JIT output, move all this to common code, and give targets hooks they can implement. 3. Commonalize the target population stuff between file emission and JIT emission. 4. All (native code) codegen stuff now happens in a FunctionPassManager, which paves the way for "fast -O0" stuff in the CFE later, and now LLC could lazily stream .bc files from disk to use less memory. 5. There are now many fewer #includes and the targets don't depend on the scalar xforms or libanalysis anymore (but codegen does). 6. Changing common code generator pass ordering stuff no longer requires touching all targets. 7. The JIT now has the option of "-fast" codegen or normal optimized codegen, which is now orthogonal to the fact that JIT'ing is being done. --- Diffs of the changes: (+11 -54) ARMTargetMachine.cpp | 56 +-- ARMTargetMachine.h |9 2 files changed, 11 insertions(+), 54 deletions(-) Index: llvm/lib/Target/ARM/ARMTargetMachine.cpp diff -u llvm/lib/Target/ARM/ARMTargetMachine.cpp:1.7 llvm/lib/Target/ARM/ARMTargetMachine.cpp:1.8 --- llvm/lib/Target/ARM/ARMTargetMachine.cpp:1.7Sun Sep 3 13:44:02 2006 +++ llvm/lib/Target/ARM/ARMTargetMachine.cppSun Sep 3 23:14:57 2006 @@ -14,15 +14,9 @@ #include "ARMTargetMachine.h" #include "ARMFrameInfo.h" #include "ARM.h" -#include "llvm/Assembly/PrintModulePass.h" #include "llvm/Module.h" #include "llvm/PassManager.h" -#include "llvm/CodeGen/MachineFunction.h" -#include "llvm/CodeGen/Passes.h" -#include "llvm/Target/TargetOptions.h" #include "llvm/Target/TargetMachineRegistry.h" -#include "llvm/Transforms/Scalar.h" -#include using namespace llvm; namespace { @@ -47,54 +41,16 @@ return 0; } -/// addPassesToEmitFile - Add passes to the specified pass manager -/// to implement a static compiler for this target. -/// -bool ARMTargetMachine::addPassesToEmitFile(PassManager &PM, std::ostream &Out, - CodeGenFileType FileType, - bool Fast) { - if (FileType != TargetMachine::AssemblyFile) -return true; - - // Run loop strength reduction before anything else. - if (!Fast) -PM.add(createLoopStrengthReducePass()); - - if (!Fast) -PM.add(createCFGSimplificationPass()); - - // FIXME: Implement efficient support for garbage collection intrinsics. - PM.add(createLowerGCPass()); - - // FIXME: implement the invoke/unwind instructions! - PM.add(createLowerInvokePass()); - - // Print LLVM code input to instruction selector: - if (PrintMachineCode) -PM.add(new PrintFunctionPass()); - - // Make sure that no unreachable blocks are instruction selected. - PM.add(createUnreachableBlockEliminationPass()); +// Pass Pipeline Configuration +bool ARMTargetMachine::addInstSelector(FunctionPassManager &PM, bool Fast) { PM.add(createARMISelDag(*this)); - - // Print machine instructions as they were initially generated. - if (PrintMachineCode) -PM.add(createMachineFunctionPrinterPass(&std::cerr)); - - PM.add(createRegisterAllocator()); - PM.add(createPrologEpilogCodeInserter()); - - // Print machine instructions after register allocation and prolog/epilog - // insertion. - if (PrintMachineCode) -PM.add(createMachineFunctionPrinterPass(&std::cerr)); - + return false; +} +bool ARMTargetMachine::addAssemblyEmitter(FunctionPassManager &PM, bool Fast, + std::ostream &Out) { // Output assembly language. PM.add(createARMCodePrinterPass(Out, *this)); - - // Delete the MachineInstrs we generated, since they're no longer needed. - PM.add(createMachineCodeDeleter()); return false; } Index: llvm/lib/Target/ARM/ARMTargetMachine.h diff -u llvm/lib/Target/ARM/ARMTargetMachine.h:1.2 llvm/lib/Target/ARM/ARMTargetMachine.h:1.3 --- llvm/lib/Target/ARM/ARMTargetMachine.h:1.2 Wed Aug 16 09:43:33 2006 +++ llvm/lib/Target/ARM/ARMTargetMachine.h Sun Sep 3 23:14:57 2006 @@ -18,7 +18,6 @@ #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetData.h" #include "llvm/Target/TargetFrameInfo.h" -#include "llvm/PassManager.h" #include "ARMInstrInfo.h" #include "ARMFrameInfo.h" @@ -26,7 +25,7 @@ class Module; -class ARMTargetMachine : public TargetMachine { +class ARMTargetMachine : public LLVMTargetMachine { const TargetData DataLayout; // Calculates type size & alignment ARMInstrInfo InstrInfo;
[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC.h PPCJITInfo.h PPCMachOWriter.cpp PPCTargetMachine.cpp PPCTargetMachine.h
Changes in directory llvm/lib/Target/PowerPC: PPC.h updated: 1.31 -> 1.32 PPCJITInfo.h updated: 1.13 -> 1.14 PPCMachOWriter.cpp updated: 1.2 -> 1.3 PPCTargetMachine.cpp updated: 1.102 -> 1.103 PPCTargetMachine.h updated: 1.22 -> 1.23 --- Log message: Completely rearchitect the interface between targets and the pass manager. This pass: 1. Splits TargetMachine into TargetMachine (generic targets, can be implemented any way, like the CBE) and LLVMTargetMachine (subclass of TM that is used by things using libcodegen and other support). 2. Instead of having each target fully populate the passmgr for file or JIT output, move all this to common code, and give targets hooks they can implement. 3. Commonalize the target population stuff between file emission and JIT emission. 4. All (native code) codegen stuff now happens in a FunctionPassManager, which paves the way for "fast -O0" stuff in the CFE later, and now LLC could lazily stream .bc files from disk to use less memory. 5. There are now many fewer #includes and the targets don't depend on the scalar xforms or libanalysis anymore (but codegen does). 6. Changing common code generator pass ordering stuff no longer requires touching all targets. 7. The JIT now has the option of "-fast" codegen or normal optimized codegen, which is now orthogonal to the fact that JIT'ing is being done. --- Diffs of the changes: (+45 -108) PPC.h| 10 ++-- PPCJITInfo.h |6 -- PPCMachOWriter.cpp |2 PPCTargetMachine.cpp | 119 --- PPCTargetMachine.h | 16 -- 5 files changed, 45 insertions(+), 108 deletions(-) Index: llvm/lib/Target/PowerPC/PPC.h diff -u llvm/lib/Target/PowerPC/PPC.h:1.31 llvm/lib/Target/PowerPC/PPC.h:1.32 --- llvm/lib/Target/PowerPC/PPC.h:1.31 Wed Aug 23 16:08:52 2006 +++ llvm/lib/Target/PowerPC/PPC.h Sun Sep 3 23:14:57 2006 @@ -1,4 +1,4 @@ -//===-- PowerPC.h - Top-level interface for PowerPC representation -*- C++ -*-// +//===-- PPC.h - Top-level interface for PowerPC Target --*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -12,15 +12,15 @@ // //===--===// -#ifndef TARGET_POWERPC_H -#define TARGET_POWERPC_H +#ifndef LLVM_TARGET_POWERPC_H +#define LLVM_TARGET_POWERPC_H #include namespace llvm { class PPCTargetMachine; -class PassManager; +class FunctionPassManager; class FunctionPass; class MachineCodeEmitter; @@ -29,7 +29,7 @@ FunctionPass *createDarwinAsmPrinter(std::ostream &OS, PPCTargetMachine &TM); FunctionPass *createPPCCodeEmitterPass(PPCTargetMachine &TM, MachineCodeEmitter &MCE); -void addPPCMachOObjectWriterPass(PassManager &FPM, std::ostream &o, +void addPPCMachOObjectWriterPass(FunctionPassManager &FPM, std::ostream &o, PPCTargetMachine &tm); } // end namespace llvm; Index: llvm/lib/Target/PowerPC/PPCJITInfo.h diff -u llvm/lib/Target/PowerPC/PPCJITInfo.h:1.13 llvm/lib/Target/PowerPC/PPCJITInfo.h:1.14 --- llvm/lib/Target/PowerPC/PPCJITInfo.h:1.13 Mon Aug 28 21:30:59 2006 +++ llvm/lib/Target/PowerPC/PPCJITInfo.hSun Sep 3 23:14:57 2006 @@ -29,12 +29,6 @@ is64Bit = tmIs64Bit; } -/// addPassesToJITCompile - Add passes to the specified pass manager to -/// implement a fast dynamic compiler for this target. Return true if this -/// is not supported for this target. -/// -virtual void addPassesToJITCompile(FunctionPassManager &PM); - virtual void *emitFunctionStub(void *Fn, MachineCodeEmitter &MCE); virtual LazyResolverFn getLazyResolverFunction(JITCompilerFn); virtual void relocate(void *Function, MachineRelocation *MR, Index: llvm/lib/Target/PowerPC/PPCMachOWriter.cpp diff -u llvm/lib/Target/PowerPC/PPCMachOWriter.cpp:1.2 llvm/lib/Target/PowerPC/PPCMachOWriter.cpp:1.3 --- llvm/lib/Target/PowerPC/PPCMachOWriter.cpp:1.2 Sun Aug 27 07:54:01 2006 +++ llvm/lib/Target/PowerPC/PPCMachOWriter.cpp Sun Sep 3 23:14:57 2006 @@ -33,7 +33,7 @@ /// addPPCMachOObjectWriterPass - Returns a pass that outputs the generated code /// as a Mach-O object file. /// -void llvm::addPPCMachOObjectWriterPass(PassManager &FPM, +void llvm::addPPCMachOObjectWriterPass(FunctionPassManager &FPM, std::ostream &O, PPCTargetMachine &TM) { PPCMachOWriter *EW = new PPCMachOWriter(O, TM); FPM.add(EW); Index: llvm/lib/Target/PowerPC/PPCTargetMachine.cpp diff -u llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.102 llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.103 --- llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.102 Sun Sep 3 13:44:02 2006 +++ llvm/lib/Target/PowerPC/PPCTargetMachine.cppSun Sep 3 23:14:57 2006 @@ -12,19 +12,10 @@ //===--===// #in
[llvm-commits] CVS: llvm/lib/Target/X86/X86.h X86ELFWriter.cpp X86JITInfo.h X86TargetMachine.cpp X86TargetMachine.h
Changes in directory llvm/lib/Target/X86: X86.h updated: 1.47 -> 1.48 X86ELFWriter.cpp updated: 1.6 -> 1.7 X86JITInfo.h updated: 1.10 -> 1.11 X86TargetMachine.cpp updated: 1.123 -> 1.124 X86TargetMachine.h updated: 1.37 -> 1.38 --- Log message: Completely rearchitect the interface between targets and the pass manager. This pass: 1. Splits TargetMachine into TargetMachine (generic targets, can be implemented any way, like the CBE) and LLVMTargetMachine (subclass of TM that is used by things using libcodegen and other support). 2. Instead of having each target fully populate the passmgr for file or JIT output, move all this to common code, and give targets hooks they can implement. 3. Commonalize the target population stuff between file emission and JIT emission. 4. All (native code) codegen stuff now happens in a FunctionPassManager, which paves the way for "fast -O0" stuff in the CFE later, and now LLC could lazily stream .bc files from disk to use less memory. 5. There are now many fewer #includes and the targets don't depend on the scalar xforms or libanalysis anymore (but codegen does). 6. Changing common code generator pass ordering stuff no longer requires touching all targets. 7. The JIT now has the option of "-fast" codegen or normal optimized codegen, which is now orthogonal to the fact that JIT'ing is being done. --- Diffs of the changes: (+38 -128) X86.h|4 - X86ELFWriter.cpp |2 X86JITInfo.h |6 -- X86TargetMachine.cpp | 134 --- X86TargetMachine.h | 20 --- 5 files changed, 38 insertions(+), 128 deletions(-) Index: llvm/lib/Target/X86/X86.h diff -u llvm/lib/Target/X86/X86.h:1.47 llvm/lib/Target/X86/X86.h:1.48 --- llvm/lib/Target/X86/X86.h:1.47 Tue Aug 29 13:28:33 2006 +++ llvm/lib/Target/X86/X86.h Sun Sep 3 23:14:57 2006 @@ -20,7 +20,7 @@ namespace llvm { class X86TargetMachine; -class PassManager; +class FunctionPassManager; class FunctionPass; class IntrinsicLowering; class MachineCodeEmitter; @@ -50,7 +50,7 @@ /// addX86ELFObjectWriterPass - Add passes to the FPM that output the generated /// code as an ELF object file. /// -void addX86ELFObjectWriterPass(PassManager &FPM, +void addX86ELFObjectWriterPass(FunctionPassManager &FPM, std::ostream &o, X86TargetMachine &tm); /// createX86EmitCodeToMemory - Returns a pass that converts a register Index: llvm/lib/Target/X86/X86ELFWriter.cpp diff -u llvm/lib/Target/X86/X86ELFWriter.cpp:1.6 llvm/lib/Target/X86/X86ELFWriter.cpp:1.7 --- llvm/lib/Target/X86/X86ELFWriter.cpp:1.6Sun Aug 27 07:54:01 2006 +++ llvm/lib/Target/X86/X86ELFWriter.cppSun Sep 3 23:14:57 2006 @@ -31,7 +31,7 @@ /// addX86ELFObjectWriterPass - Returns a pass that outputs the generated code /// as an ELF object file. /// -void llvm::addX86ELFObjectWriterPass(PassManager &FPM, +void llvm::addX86ELFObjectWriterPass(FunctionPassManager &FPM, std::ostream &O, X86TargetMachine &TM) { X86ELFWriter *EW = new X86ELFWriter(O, TM); FPM.add(EW); Index: llvm/lib/Target/X86/X86JITInfo.h diff -u llvm/lib/Target/X86/X86JITInfo.h:1.10 llvm/lib/Target/X86/X86JITInfo.h:1.11 --- llvm/lib/Target/X86/X86JITInfo.h:1.10 Thu Jul 27 13:21:10 2006 +++ llvm/lib/Target/X86/X86JITInfo.hSun Sep 3 23:14:57 2006 @@ -25,12 +25,6 @@ public: X86JITInfo(X86TargetMachine &tm) : TM(tm) {useGOT = 0;} -/// addPassesToJITCompile - Add passes to the specified pass manager to -/// implement a fast dynamic compiler for this target. Return true if this -/// is not supported for this target. -/// -virtual void addPassesToJITCompile(FunctionPassManager &PM); - /// replaceMachineCodeForFunction - Make it so that calling the function /// whose machine code is at OLD turns into a call to NEW, perhaps by /// overwriting OLD with a branch to NEW. This is used for self-modifying Index: llvm/lib/Target/X86/X86TargetMachine.cpp diff -u llvm/lib/Target/X86/X86TargetMachine.cpp:1.123 llvm/lib/Target/X86/X86TargetMachine.cpp:1.124 --- llvm/lib/Target/X86/X86TargetMachine.cpp:1.123 Sun Sep 3 13:44:02 2006 +++ llvm/lib/Target/X86/X86TargetMachine.cppSun Sep 3 23:14:57 2006 @@ -20,8 +20,6 @@ #include "llvm/Target/TargetOptions.h" #include "llvm/Target/TargetMachineRegistry.h" #include "llvm/Transforms/Scalar.h" -#include "llvm/Support/CommandLine.h" -#include "llvm/ADT/Statistic.h" #include using namespace llvm; @@ -33,9 +31,6 @@ int X86TargetMachineModule = 0; namespace { - cl::opt DisableOutput("disable-x86-llc-output", cl::Hidden, - cl::desc("Disable the X86 asm printer, for use " - "when profiling the code generator.")); // Register the target. RegisterTarget X("x86", " IA-32 (Pentium and above)"); } @@ -79,121 +74,38 @@ setRel
[llvm-commits] CVS: llvm/lib/CodeGen/LLVMTargetMachine.cpp
Changes in directory llvm/lib/CodeGen: LLVMTargetMachine.cpp added (r1.1) --- Log message: new file --- Diffs of the changes: (+154 -0) LLVMTargetMachine.cpp | 154 ++ 1 files changed, 154 insertions(+) Index: llvm/lib/CodeGen/LLVMTargetMachine.cpp diff -c /dev/null llvm/lib/CodeGen/LLVMTargetMachine.cpp:1.1 *** /dev/null Sun Sep 3 23:16:19 2006 --- llvm/lib/CodeGen/LLVMTargetMachine.cpp Sun Sep 3 23:16:09 2006 *** *** 0 --- 1,154 + //===-- LLVMTargetMachine.cpp - Implement the LLVMTargetMachine class -===// + // + // 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 implements the LLVMTargetMachine class. + // + //===--===// + + #include "llvm/Target/TargetMachine.h" + #include "llvm/PassManager.h" + #include "llvm/Pass.h" + #include "llvm/CodeGen/Passes.h" + #include "llvm/Target/TargetOptions.h" + #include "llvm/Transforms/Scalar.h" + #include + using namespace llvm; + + bool LLVMTargetMachine::addPassesToEmitFile(FunctionPassManager &PM, + std::ostream &Out, + CodeGenFileType FileType, + bool Fast) { + // Standard LLVM-Level Passes. + + // Run loop strength reduction before anything else. + if (!Fast) PM.add(createLoopStrengthReducePass(getTargetLowering())); + + // FIXME: Implement efficient support for garbage collection intrinsics. + PM.add(createLowerGCPass()); + + // FIXME: Implement the invoke/unwind instructions! + PM.add(createLowerInvokePass()); + + // Make sure that no unreachable blocks are instruction selected. + PM.add(createUnreachableBlockEliminationPass()); + + + // Ask the target for an isel. + if (addInstSelector(PM, Fast)) + return true; + + + // Print the instruction selected machine code... + if (PrintMachineCode) + PM.add(createMachineFunctionPrinterPass(&std::cerr)); + + // Perform register allocation to convert to a concrete x86 representation + PM.add(createRegisterAllocator()); + + if (PrintMachineCode) + PM.add(createMachineFunctionPrinterPass(&std::cerr)); + + + // Run post-ra passes. + if (addPostRegAlloc(PM, Fast) && PrintMachineCode) + PM.add(createMachineFunctionPrinterPass(&std::cerr)); + + + // Insert prolog/epilog code. Eliminate abstract frame index references... + PM.add(createPrologEpilogCodeInserter()); + + if (PrintMachineCode) // Print the register-allocated code + PM.add(createMachineFunctionPrinterPass(&std::cerr)); + + + if (addPreEmitPass(PM, Fast) && PrintMachineCode) + PM.add(createMachineFunctionPrinterPass(&std::cerr)); + + + switch (FileType) { + default: return true; + case TargetMachine::AssemblyFile: + if (addAssemblyEmitter(PM, Fast, Out)) + return true; + break; + case TargetMachine::ObjectFile: + if (addObjectWriter(PM, Fast, Out)) + return true; + break; + } + + // Delete machine code for this function + PM.add(createMachineCodeDeleter()); + + return false; // success! + } + + /// addPassesToEmitMachineCode - Add passes to the specified pass manager to + /// get machine code emitted. This uses a MachineCodeEmitter object to handle + /// actually outputting the machine code and resolving things like the address + /// of functions. This method should returns true if machine code emission is + /// not supported. + /// + bool LLVMTargetMachine::addPassesToEmitMachineCode(FunctionPassManager &PM, +MachineCodeEmitter &MCE, +bool Fast) { + // Standard LLVM-Level Passes. + + // Run loop strength reduction before anything else. + if (!Fast) PM.add(createLoopStrengthReducePass(getTargetLowering())); + + // FIXME: Implement efficient support for garbage collection intrinsics. + PM.add(createLowerGCPass()); + + // FIXME: Implement the invoke/unwind instructions! + PM.add(createLowerInvokePass()); + + // Make sure that no unreachable blocks are instruction selected. + PM.add(createUnreachableBlockEliminationPass()); + + + // Ask the target for an isel. + if (addInstSelector(PM, Fast)) + return true; + + + // Print the instruction selected machine code... + if (PrintMachineCode) + PM.add(createMachineFunctionPrinterPass(&std::cerr)); + + // Perform register allocation to convert to a concrete x86 representation + PM.add(createRegisterAlloca
[llvm-commits] CVS: llvm/Makefile
Changes in directory llvm: Makefile updated: 1.64 -> 1.65 --- Log message: Document build order dependencies. Make sure that llvm-config is built before tools. --- Diffs of the changes: (+12 -1) Makefile | 13 - 1 files changed, 12 insertions(+), 1 deletion(-) Index: llvm/Makefile diff -u llvm/Makefile:1.64 llvm/Makefile:1.65 --- llvm/Makefile:1.64 Tue Aug 15 19:43:50 2006 +++ llvm/Makefile Sun Sep 3 23:27:07 2006 @@ -8,7 +8,18 @@ #======# LEVEL := . -DIRS := lib/System lib/Support utils lib/VMCore lib tools runtime docs + +# Top-Level LLVM Build Stages: +# 1. Build lib/System and lib/Support, which are used by utils (tblgen). +# 2. Build utils, which is used by VMCore. +# 3. Build VMCore, which builds the Intrinsics.inc file used by libs. +# 4. Build libs, which are needed by llvm-config. +# 5. Build llvm-config, which determines inter-lib dependencies for tools. +# 6. Build tools, runtime, docs. +# +DIRS := lib/System lib/Support utils lib/VMCore lib tools/llvm-config \ +tools runtime docs + OPTIONAL_DIRS := examples projects EXTRA_DIST := test llvm.spec include win32 Xcode ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/tools/llvm-as/Makefile
Changes in directory llvm/tools/llvm-as: Makefile updated: 1.18 -> 1.19 --- Log message: Switch to using llvm-config to select components to link in. --- Diffs of the changes: (+2 -2) Makefile |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/tools/llvm-as/Makefile diff -u llvm/tools/llvm-as/Makefile:1.18 llvm/tools/llvm-as/Makefile:1.19 --- llvm/tools/llvm-as/Makefile:1.18Thu Jul 6 19:46:18 2006 +++ llvm/tools/llvm-as/Makefile Sun Sep 3 23:47:49 2006 @@ -6,10 +6,10 @@ # the University of Illinois Open Source License. See LICENSE.TXT for details. # ##===--===## + LEVEL = ../.. TOOLNAME = llvm-as -USEDLIBS = LLVMAsmParser.a LLVMBCWriter.a LLVMCore.a \ - LLVMSupport.a LLVMbzip2.a LLVMSystem.a +LINK_COMPONENTS := asmparser bcwriter REQUIRES_EH := 1 include $(LEVEL)/Makefile.common ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/Makefile.rules
Changes in directory llvm: Makefile.rules updated: 1.400 -> 1.401 --- Log message: Add a new make option (LINK_COMPONENTS) which tools can use to specify what libraries they need. This uses llvm-config to link the tools. --- Diffs of the changes: (+14 -4) Makefile.rules | 18 ++ 1 files changed, 14 insertions(+), 4 deletions(-) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.400 llvm/Makefile.rules:1.401 --- llvm/Makefile.rules:1.400 Sun Sep 3 20:02:25 2006 +++ llvm/Makefile.rules Sun Sep 3 23:47:21 2006 @@ -297,6 +297,7 @@ TBLGEN := $(LLVMToolDir)/tblgen$(EXEEXT) endif endif +LLVM_CONFIG := $(LLVMToolDir)/llvm-config ifndef GCCAS GCCAS:= $(LLVMToolDir)/gccas$(EXEEXT) endif @@ -629,7 +630,6 @@ # JIT support for a library or a tool that runs JIT. #- ifeq ($(firstword $(LLVMLIBS)),config) -LLVM_CONFIG := $(LLVM_SRC_ROOT)/utils/llvm-config/llvm-config LLVMLIBS := $(shell $(LLVM_CONFIG) --libnames $(wordlist 2,,$(LLVMLIBS))) LLVMLIBS := $(patsubst lib%.a,%.a,$(LLVMLIBS)) LLVMLIBS := $(patsubst %.o,%,$(LLVMLIBS)) @@ -690,17 +690,27 @@ # Define various command line options pertaining to the # libraries needed when linking. There are "Proj" libs # (defined by the user's project) and "LLVM" libs (defined -# by the # LLVM project). +# by the LLVM project). #- +ifdef USEDLIBS ProjLibsOptions := $(patsubst %.a.o, -l%, $(addsuffix .o, $(USEDLIBS))) ProjLibsOptions := $(patsubst %.o, $(LibDir)/%.o, $(ProjLibsOptions)) +ProjUsedLibs:= $(patsubst %.a.o, lib%.a, $(addsuffix .o, $(USEDLIBS))) +ProjLibsPaths := $(addprefix $(LibDir)/,$(ProjUsedLibs)) +endif + +ifdef LLVMLIBS LLVMLibsOptions := $(patsubst %.a.o, -l%, $(addsuffix .o, $(LLVMLIBS))) LLVMLibsOptions := $(patsubst %.o, $(LLVMLibDir)/%.o, $(LLVMLibsOptions)) -ProjUsedLibs:= $(patsubst %.a.o, lib%.a, $(addsuffix .o, $(USEDLIBS))) LLVMUsedLibs:= $(patsubst %.a.o, lib%.a, $(addsuffix .o, $(LLVMLIBS))) -ProjLibsPaths := $(addprefix $(LibDir)/,$(ProjUsedLibs)) LLVMLibsPaths := $(addprefix $(LLVMLibDir)/,$(LLVMUsedLibs)) +endif + +ifdef LINK_COMPONENTS +ProjLibsOptions := $(shell $(LLVM_CONFIG) --libs $(LINK_COMPONENTS)) +ProjLibsPaths := $(shell $(LLVM_CONFIG) --libfiles $(LINK_COMPONENTS)) +endif ### # Library Build Rules: Four ways to build a library ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/Makefile.rules
Changes in directory llvm: Makefile.rules updated: 1.401 -> 1.402 --- Log message: Make LINK_COMPONENTS interact well with make clean --- Diffs of the changes: (+3 -1) Makefile.rules |4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.401 llvm/Makefile.rules:1.402 --- llvm/Makefile.rules:1.401 Sun Sep 3 23:47:21 2006 +++ llvm/Makefile.rules Sun Sep 3 23:50:10 2006 @@ -707,10 +707,12 @@ LLVMLibsPaths := $(addprefix $(LLVMLibDir)/,$(LLVMUsedLibs)) endif +ifneq ($(strip($(filter-out clean clean-local dist-clean,$(MAKECMDGOALS,) ifdef LINK_COMPONENTS ProjLibsOptions := $(shell $(LLVM_CONFIG) --libs $(LINK_COMPONENTS)) ProjLibsPaths := $(shell $(LLVM_CONFIG) --libfiles $(LINK_COMPONENTS)) endif +endif ### # Library Build Rules: Four ways to build a library @@ -1415,7 +1417,7 @@ ifndef DISABLE_AUTO_DEPENDENCIES # If its not one of the cleaning targets -ifneq ($strip($(filter-out clean clean-local dist-clean,$(MAKECMDGOALS))),) +ifneq ($(strip($(filter-out clean clean-local dist-clean,$(MAKECMDGOALS,) # Get the list of dependency files DependFiles := $(basename $(filter %.cpp %.c %.cc, $(Sources))) ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/Makefile.rules
Changes in directory llvm: Makefile.rules updated: 1.402 -> 1.403 --- Log message: Bugfix for llvm-config support --- Diffs of the changes: (+16 -13) Makefile.rules | 29 - 1 files changed, 16 insertions(+), 13 deletions(-) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.402 llvm/Makefile.rules:1.403 --- llvm/Makefile.rules:1.402 Sun Sep 3 23:50:10 2006 +++ llvm/Makefile.rules Mon Sep 4 00:23:20 2006 @@ -73,6 +73,7 @@ ifneq ($(MakefileCommonIn),) PreConditions += $(MakefileCommon) endif + ifneq ($(MakefileConfigIn),) PreConditions += $(MakefileConfig) endif @@ -304,7 +305,7 @@ ifndef GCCLD GCCLD:= $(LLVMToolDir)/gccld$(EXEEXT) endif -ifndef LDIS +ifndef LLVMDIS LLVMDIS := $(LLVMToolDir)/llvm-dis$(EXEEXT) endif ifndef LLI @@ -707,10 +708,19 @@ LLVMLibsPaths := $(addprefix $(LLVMLibDir)/,$(LLVMUsedLibs)) endif -ifneq ($(strip($(filter-out clean clean-local dist-clean,$(MAKECMDGOALS,) +ifeq ($(strip $(filter clean clean-local dist-clean,$(MAKECMDGOALS))),) ifdef LINK_COMPONENTS -ProjLibsOptions := $(shell $(LLVM_CONFIG) --libs $(LINK_COMPONENTS)) -ProjLibsPaths := $(shell $(LLVM_CONFIG) --libfiles $(LINK_COMPONENTS)) + +# If LLVM_CONFIG doesn't exist, build it. This can happen if you do a make +# clean in tools, then do a make in tools (instead of at the top level). +$(LLVM_CONFIG): + @echo "*** llvm-config doesn't exist - rebuilding it." + @$(MAKE) -C $(PROJ_OBJ_ROOT)/tools/llvm-config + +$(ToolDir)/$(strip $(TOOLNAME))$(EXEEXT): $(LLVM_CONFIG) + +ProjLibsOptions = $(shell $(LLVM_CONFIG) --libs $(LINK_COMPONENTS)) +ProjLibsPaths = $(shell $(LLVM_CONFIG) --libfiles $(LINK_COMPONENTS)) endif endif @@ -990,13 +1000,6 @@ endif #- -# Tell make that we need to rebuild subdirectories before -# we can link the tool. This affects things like LLI which -# has library subdirectories. -#- -$(ToolBuildPath): $(addsuffix /.makeall, $(PARALLEL_DIRS)) - -#- # Provide targets for building the tools #- all-local:: $(ToolBuildPath) @@ -1012,7 +1015,7 @@ $(ToolBuildPath): $(ToolDir)/.dir endif -$(ToolBuildPath): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths) +$(ToolBuildPath): $(ObjectsO) $(LLVM_CONFIG) $(ProjLibsPaths) $(LLVMLibsPaths) $(Echo) Linking $(BuildMode) executable $(TOOLNAME) $(StripWarnMsg) $(Verb) $(LTLink) -o $@ $(TOOLLINKOPTS) $(ObjectsO) $(ProjLibsOptions) \ $(LLVMLibsOptions) $(ExtraLibs) $(TOOLLINKOPTSB) $(LIBS) @@ -1417,7 +1420,7 @@ ifndef DISABLE_AUTO_DEPENDENCIES # If its not one of the cleaning targets -ifneq ($(strip($(filter-out clean clean-local dist-clean,$(MAKECMDGOALS,) +ifneq ($(strip $(filter-out clean clean-local dist-clean,$(MAKECMDGOALS,) # Get the list of dependency files DependFiles := $(basename $(filter %.cpp %.c %.cc, $(Sources))) ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/tools/llvm-dis/Makefile
Changes in directory llvm/tools/llvm-dis: Makefile updated: 1.19 -> 1.20 --- Log message: Switch to using llvm-config to build --- Diffs of the changes: (+1 -1) Makefile |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/tools/llvm-dis/Makefile diff -u llvm/tools/llvm-dis/Makefile:1.19 llvm/tools/llvm-dis/Makefile:1.20 --- llvm/tools/llvm-dis/Makefile:1.19 Thu Jul 6 19:46:18 2006 +++ llvm/tools/llvm-dis/MakefileMon Sep 4 00:24:16 2006 @@ -9,7 +9,7 @@ LEVEL = ../.. TOOLNAME = llvm-dis -USEDLIBS = LLVMBCReader.a LLVMCore.a LLVMSupport.a LLVMbzip2.a LLVMSystem.a +LINK_COMPONENTS := bcreader REQUIRES_EH := 1 include $(LEVEL)/Makefile.common ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/tools/llvm-config/llvm-config.in.in
Changes in directory llvm/tools/llvm-config: llvm-config.in.in updated: 1.22 -> 1.23 --- Log message: Allow things like --libs CBackend --- Diffs of the changes: (+3 -0) llvm-config.in.in |3 +++ 1 files changed, 3 insertions(+) Index: llvm/tools/llvm-config/llvm-config.in.in diff -u llvm/tools/llvm-config/llvm-config.in.in:1.22 llvm/tools/llvm-config/llvm-config.in.in:1.23 --- llvm/tools/llvm-config/llvm-config.in.in:1.22 Fri Aug 11 16:50:24 2006 +++ llvm/tools/llvm-config/llvm-config.in.inMon Sep 4 00:35:23 2006 @@ -143,6 +143,9 @@ push @components, 'all'; } +# Force component names to lower case. [EMAIL PROTECTED] = map lc, @components; + # Handle any arguments which require building our dependency graph. if ($want_libs || $want_libnames || $want_libfiles) { my @libs = expand_dependencies(@components); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/tools/llvm-ar/Makefile
Changes in directory llvm/tools/llvm-ar: Makefile updated: 1.10 -> 1.11 --- Log message: Use LINK_COMPONENTS to specify *components* to link against instead of using USED_LIBS to specify *libraries* to link against. --- Diffs of the changes: (+1 -2) Makefile |3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) Index: llvm/tools/llvm-ar/Makefile diff -u llvm/tools/llvm-ar/Makefile:1.10 llvm/tools/llvm-ar/Makefile:1.11 --- llvm/tools/llvm-ar/Makefile:1.10Thu Jul 6 19:46:18 2006 +++ llvm/tools/llvm-ar/Makefile Mon Sep 4 00:59:09 2006 @@ -9,8 +9,7 @@ LEVEL = ../.. TOOLNAME = llvm-ar -USEDLIBS = LLVMArchive.a LLVMBCReader.a \ - LLVMCore.a LLVMSupport.a LLVMbzip2.a LLVMSystem.a +LINK_COMPONENTS = archive bcreader REQUIRES_EH := 1 include $(LEVEL)/Makefile.common ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/tools/llvm-ld/Makefile
Changes in directory llvm/tools/llvm-ld: Makefile updated: 1.9 -> 1.10 --- Log message: Use LINK_COMPONENTS to specify *components* to link against instead of using USED_LIBS to specify *libraries* to link against. --- Diffs of the changes: (+1 -4) Makefile |5 + 1 files changed, 1 insertion(+), 4 deletions(-) Index: llvm/tools/llvm-ld/Makefile diff -u llvm/tools/llvm-ld/Makefile:1.9 llvm/tools/llvm-ld/Makefile:1.10 --- llvm/tools/llvm-ld/Makefile:1.9 Thu Jul 6 19:46:18 2006 +++ llvm/tools/llvm-ld/Makefile Mon Sep 4 00:59:09 2006 @@ -10,10 +10,7 @@ LEVEL = ../.. TOOLNAME = llvm-ld -USEDLIBS = LLVMipo.a LLVMTransforms.a LLVMScalarOpts.a LLVMAnalysis.a \ - LLVMipa.a LLVMTransformUtils.a LLVMTarget.a LLVMLinker.a \ - LLVMArchive.a LLVMBCReader.a LLVMBCWriter.a \ - LLVMCore.a LLVMSupport.a LLVMbzip2.a LLVMSystem.a +LINK_COMPONENTS = ipo scalaropts linker archive bcreader bcwriter REQUIRES_EH := 1 include $(LEVEL)/Makefile.common ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/tools/opt/Makefile
Changes in directory llvm/tools/opt: Makefile updated: 1.58 -> 1.59 --- Log message: Use LINK_COMPONENTS to specify *components* to link against instead of using USED_LIBS to specify *libraries* to link against. --- Diffs of the changes: (+2 -4) Makefile |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) Index: llvm/tools/opt/Makefile diff -u llvm/tools/opt/Makefile:1.58 llvm/tools/opt/Makefile:1.59 --- llvm/tools/opt/Makefile:1.58Sun Aug 27 17:07:01 2006 +++ llvm/tools/opt/Makefile Mon Sep 4 00:59:09 2006 @@ -10,9 +10,7 @@ TOOLNAME = opt REQUIRES_EH := 1 -USEDLIBS = LLVMBCReader.a LLVMBCWriter.a LLVMInstrumentation.a \ - LLVMScalarOpts.a LLVMipo.a LLVMipa.a LLVMDataStructure \ - LLVMTransforms.a LLVMTarget.a LLVMTransformUtils.a LLVMAnalysis.a \ - LLVMCore.a LLVMSupport.a LLVMbzip2.a LLVMSystem.a +LINK_COMPONENTS := bcreader bcwriter instrumentation scalaropts ipo \ + datastructure transforms include $(LEVEL)/Makefile.common ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/tools/llc/Makefile
Changes in directory llvm/tools/llc: Makefile updated: 1.89 -> 1.90 --- Log message: Use LINK_COMPONENTS to specify *components* to link against instead of using USED_LIBS to specify *libraries* to link against. --- Diffs of the changes: (+2 -16) Makefile | 18 ++ 1 files changed, 2 insertions(+), 16 deletions(-) Index: llvm/tools/llc/Makefile diff -u llvm/tools/llc/Makefile:1.89 llvm/tools/llc/Makefile:1.90 --- llvm/tools/llc/Makefile:1.89Sun Sep 3 23:04:41 2006 +++ llvm/tools/llc/Makefile Mon Sep 4 00:59:09 2006 @@ -13,24 +13,10 @@ # Include this here so we can get the configuration of the targets # that have been configured for construction. We have to do this -# early so we can set up USEDLIBS properly before includeing Makefile.rules +# early so we can set up LINK_COMPONENTS before including Makefile.rules include $(LEVEL)/Makefile.config -USEDLIBS := $(addprefix LLVM,$(TARGETS_TO_BUILD)) \ - LLVMTarget.a \ - LLVMCodeGen.a \ - LLVMSelectionDAG.a \ - LLVMipa.a \ - LLVMTransforms.a \ - LLVMScalarOpts.a \ - LLVMTransformUtils.a \ - LLVMAnalysis.a \ - LLVMBCReader.a \ - LLVMBCWriter.a \ - LLVMCore.a \ - LLVMSupport.a \ - LLVMbzip2.a \ - LLVMSystem.a +LINK_COMPONENTS := $(TARGETS_TO_BUILD) bcreader include $(LLVM_SRC_ROOT)/Makefile.rules ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/tools/llvm-link/Makefile
Changes in directory llvm/tools/llvm-link: Makefile updated: 1.14 -> 1.15 --- Log message: Use LINK_COMPONENTS to specify *components* to link against instead of using USED_LIBS to specify *libraries* to link against. --- Diffs of the changes: (+1 -2) Makefile |3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) Index: llvm/tools/llvm-link/Makefile diff -u llvm/tools/llvm-link/Makefile:1.14 llvm/tools/llvm-link/Makefile:1.15 --- llvm/tools/llvm-link/Makefile:1.14 Thu Jul 6 19:46:18 2006 +++ llvm/tools/llvm-link/Makefile Mon Sep 4 00:59:09 2006 @@ -9,8 +9,7 @@ LEVEL = ../.. TOOLNAME = llvm-link -USEDLIBS = LLVMLinker.a LLVMBCReader.a LLVMBCWriter.a \ - LLVMCore.a LLVMSupport.a LLVMbzip2.a LLVMSystem.a +LINK_COMPONENTS = linker bcreader bcwriter REQUIRES_EH := 1 include $(LEVEL)/Makefile.common ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/tools/llvm-nm/Makefile
Changes in directory llvm/tools/llvm-nm: Makefile updated: 1.8 -> 1.9 --- Log message: Use LINK_COMPONENTS to specify *components* to link against instead of using USED_LIBS to specify *libraries* to link against. --- Diffs of the changes: (+1 -2) Makefile |3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) Index: llvm/tools/llvm-nm/Makefile diff -u llvm/tools/llvm-nm/Makefile:1.8 llvm/tools/llvm-nm/Makefile:1.9 --- llvm/tools/llvm-nm/Makefile:1.8 Thu Jul 6 19:46:18 2006 +++ llvm/tools/llvm-nm/Makefile Mon Sep 4 00:59:09 2006 @@ -9,8 +9,7 @@ LEVEL = ../.. TOOLNAME = llvm-nm -USEDLIBS = LLVMArchive.a LLVMBCReader.a \ - LLVMCore.a LLVMSupport.a LLVMbzip2.a LLVMSystem.a +LINK_COMPONENTS = archive bcreader REQUIRES_EH := 1 include $(LEVEL)/Makefile.common ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/tools/llvm-db/Makefile
Changes in directory llvm/tools/llvm-db: Makefile updated: 1.12 -> 1.13 --- Log message: Use LINK_COMPONENTS to specify *components* to link against instead of using USED_LIBS to specify *libraries* to link against. --- Diffs of the changes: (+1 -2) Makefile |3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) Index: llvm/tools/llvm-db/Makefile diff -u llvm/tools/llvm-db/Makefile:1.12 llvm/tools/llvm-db/Makefile:1.13 --- llvm/tools/llvm-db/Makefile:1.12Thu Jul 20 19:10:47 2006 +++ llvm/tools/llvm-db/Makefile Mon Sep 4 00:59:09 2006 @@ -9,8 +9,7 @@ LEVEL = ../.. TOOLNAME = llvm-db -USEDLIBS = LLVMDebugger.a LLVMBCReader.a LLVMCore.a LLVMSupport.a \ - LLVMbzip2.a LLVMSystem.a +LINK_COMPONENTS := debugger bcreader REQUIRES_EH := 1 include $(LEVEL)/Makefile.common ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/tools/bugpoint/Makefile
Changes in directory llvm/tools/bugpoint: Makefile updated: 1.18 -> 1.19 --- Log message: Use LINK_COMPONENTS to specify *components* to link against instead of using USED_LIBS to specify *libraries* to link against. --- Diffs of the changes: (+2 -7) Makefile |9 ++--- 1 files changed, 2 insertions(+), 7 deletions(-) Index: llvm/tools/bugpoint/Makefile diff -u llvm/tools/bugpoint/Makefile:1.18 llvm/tools/bugpoint/Makefile:1.19 --- llvm/tools/bugpoint/Makefile:1.18 Thu Jul 6 19:46:18 2006 +++ llvm/tools/bugpoint/MakefileMon Sep 4 00:59:09 2006 @@ -10,13 +10,8 @@ TOOLNAME = bugpoint -OPTLIBS = LLVMTransforms.a LLVMInstrumentation.a -ANALIBS = LLVMDataStructure LLVMipa.a LLVMTarget.a - -USEDLIBS = LLVMipo.a LLVMScalarOpts.a $(OPTLIBS) $(ANALIBS) LLVMAnalysis.a \ - LLVMTransformUtils.a \ - LLVMAsmParser.a LLVMLinker.a LLVMBCReader.a LLVMBCWriter.a \ - LLVMCore.a LLVMSupport.a LLVMbzip2.a LLVMSystem.a +LINK_COMPONENTS := bcreader bcwriter asmparser instrumentation scalaropts ipo \ + datastructure transforms linker REQUIRES_EH := 1 include $(LEVEL)/Makefile.common ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/tools/llvm2cpp/Makefile
Changes in directory llvm/tools/llvm2cpp: Makefile updated: 1.7 -> 1.8 --- Log message: Use LINK_COMPONENTS to specify *components* to link against instead of using USED_LIBS to specify *libraries* to link against. --- Diffs of the changes: (+1 -2) Makefile |3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) Index: llvm/tools/llvm2cpp/Makefile diff -u llvm/tools/llvm2cpp/Makefile:1.7 llvm/tools/llvm2cpp/Makefile:1.8 --- llvm/tools/llvm2cpp/Makefile:1.7Thu Jul 6 19:46:19 2006 +++ llvm/tools/llvm2cpp/MakefileMon Sep 4 00:59:09 2006 @@ -8,10 +8,9 @@ ##===--===## LEVEL = ../.. TOOLNAME = llvm2cpp -USEDLIBS = LLVMBCReader.a LLVMCore.a LLVMSupport.a LLVMbzip2.a LLVMSystem.a +LINK_COMPONENTS = bcreader REQUIRES_EH := 1 include $(LEVEL)/Makefile.common CompileCommonOpts := $(filter-out -pedantic,$(CompileCommonOpts)) -CompileCommonOpts := $(filter-out -Wno-long-long,$(CompileCommonOpts)) ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/tools/llvm-ranlib/Makefile
Changes in directory llvm/tools/llvm-ranlib: Makefile updated: 1.5 -> 1.6 --- Log message: Use LINK_COMPONENTS to specify *components* to link against instead of using USED_LIBS to specify *libraries* to link against. --- Diffs of the changes: (+1 -2) Makefile |3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) Index: llvm/tools/llvm-ranlib/Makefile diff -u llvm/tools/llvm-ranlib/Makefile:1.5 llvm/tools/llvm-ranlib/Makefile:1.6 --- llvm/tools/llvm-ranlib/Makefile:1.5 Thu Jul 6 19:46:19 2006 +++ llvm/tools/llvm-ranlib/Makefile Mon Sep 4 00:59:09 2006 @@ -9,8 +9,7 @@ LEVEL = ../.. TOOLNAME = llvm-ranlib -USEDLIBS = LLVMArchive.a LLVMBCReader.a \ - LLVMCore.a LLVMSupport.a LLVMbzip2.a LLVMSystem.a +LINK_COMPONENTS = archive bcreader REQUIRES_EH := 1 include $(LEVEL)/Makefile.common ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/tools/llvm-bcanalyzer/Makefile
Changes in directory llvm/tools/llvm-bcanalyzer: Makefile updated: 1.6 -> 1.7 --- Log message: Use LINK_COMPONENTS to specify *components* to link against instead of using USED_LIBS to specify *libraries* to link against. --- Diffs of the changes: (+1 -1) Makefile |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/tools/llvm-bcanalyzer/Makefile diff -u llvm/tools/llvm-bcanalyzer/Makefile:1.6 llvm/tools/llvm-bcanalyzer/Makefile:1.7 --- llvm/tools/llvm-bcanalyzer/Makefile:1.6 Thu Jul 6 19:46:18 2006 +++ llvm/tools/llvm-bcanalyzer/Makefile Mon Sep 4 00:59:09 2006 @@ -9,7 +9,7 @@ LEVEL = ../.. TOOLNAME = llvm-bcanalyzer -USEDLIBS = LLVMBCReader.a LLVMCore.a LLVMSupport.a LLVMbzip2.a LLVMSystem.a +LINK_COMPONENTS := bcreader REQUIRES_EH := 1 include $(LEVEL)/Makefile.common ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/tools/llvmc/Makefile llvmc.cpp
Changes in directory llvm/tools/llvmc: Makefile updated: 1.21 -> 1.22 llvmc.cpp updated: 1.30 -> 1.31 --- Log message: Use LINK_COMPONENTS to specify *components* to link against instead of using USED_LIBS to specify *libraries* to link against. --- Diffs of the changes: (+1 -2) Makefile |2 +- llvmc.cpp |1 - 2 files changed, 1 insertion(+), 2 deletions(-) Index: llvm/tools/llvmc/Makefile diff -u llvm/tools/llvmc/Makefile:1.21 llvm/tools/llvmc/Makefile:1.22 --- llvm/tools/llvmc/Makefile:1.21 Wed Aug 16 15:31:44 2006 +++ llvm/tools/llvmc/Makefile Mon Sep 4 00:59:09 2006 @@ -8,7 +8,7 @@ ##===--===## LEVEL = ../.. TOOLNAME = llvmc -USEDLIBS = LLVMCore.a LLVMSupport.a LLVMSystem.a +LINK_COMPONENTS = support system CONFIG_FILES = c cpp ll EXTRA_DIST = c cpp ll ConfigLexer.cpp.cvs ConfigLexer.l.cvs REQUIRES_EH := 1 Index: llvm/tools/llvmc/llvmc.cpp diff -u llvm/tools/llvmc/llvmc.cpp:1.30 llvm/tools/llvmc/llvmc.cpp:1.31 --- llvm/tools/llvmc/llvmc.cpp:1.30 Mon Aug 21 01:04:45 2006 +++ llvm/tools/llvmc/llvmc.cpp Mon Sep 4 00:59:09 2006 @@ -295,7 +295,6 @@ if (KeepTemps) flags |= CompilerDriver::KEEP_TEMPS_FLAG; if (ShowStats) flags |= CompilerDriver::SHOW_STATS_FLAG; if (TimeActions)flags |= CompilerDriver::TIME_ACTIONS_FLAG; -if (TimePassesIsEnabled) flags |= CompilerDriver::TIME_PASSES_FLAG; if (StripOutput)flags |= CompilerDriver::STRIP_OUTPUT_FLAG; CD->setDriverFlags(flags); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/tools/llvm-prof/Makefile
Changes in directory llvm/tools/llvm-prof: Makefile updated: 1.8 -> 1.9 --- Log message: Use LINK_COMPONENTS to specify *components* to link against instead of using USED_LIBS to specify *libraries* to link against. --- Diffs of the changes: (+1 -2) Makefile |3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) Index: llvm/tools/llvm-prof/Makefile diff -u llvm/tools/llvm-prof/Makefile:1.8 llvm/tools/llvm-prof/Makefile:1.9 --- llvm/tools/llvm-prof/Makefile:1.8 Thu Jul 6 19:46:18 2006 +++ llvm/tools/llvm-prof/Makefile Mon Sep 4 00:59:09 2006 @@ -9,8 +9,7 @@ LEVEL = ../.. TOOLNAME = llvm-prof -USEDLIBS = LLVMAnalysis.a LLVMBCReader.a \ - LLVMCore.a LLVMSupport.a LLVMbzip2.a LLVMSystem.a +LINK_COMPONENTS = bcreader analysis REQUIRES_EH := 1 include $(LEVEL)/Makefile.common ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/tools/gccas/Makefile
Changes in directory llvm/tools/gccas: Makefile updated: 1.26 -> 1.27 --- Log message: Use LINK_COMPONENTS to specify *components* to link against instead of using USED_LIBS to specify *libraries* to link against. --- Diffs of the changes: (+1 -3) Makefile |4 +--- 1 files changed, 1 insertion(+), 3 deletions(-) Index: llvm/tools/gccas/Makefile diff -u llvm/tools/gccas/Makefile:1.26 llvm/tools/gccas/Makefile:1.27 --- llvm/tools/gccas/Makefile:1.26 Thu Jul 6 19:46:18 2006 +++ llvm/tools/gccas/Makefile Mon Sep 4 00:59:09 2006 @@ -9,9 +9,7 @@ LEVEL = ../.. TOOLNAME = gccas -USEDLIBS = LLVMAsmParser.a LLVMBCWriter.a LLVMTransforms.a LLVMipo.a LLVMipa.a \ - LLVMScalarOpts.a LLVMAnalysis.a LLVMTarget.a LLVMTransformUtils.a \ - LLVMCore.a LLVMSupport.a LLVMbzip2.a LLVMSystem.a +LINK_COMPONENTS = asmparser bcwriter scalaropts ipo ipa transforms REQUIRES_EH := 1 include $(LEVEL)/Makefile.common ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/tools/gccld/Makefile
Changes in directory llvm/tools/gccld: Makefile updated: 1.16 -> 1.17 --- Log message: Use LINK_COMPONENTS to specify *components* to link against instead of using USED_LIBS to specify *libraries* to link against. --- Diffs of the changes: (+1 -4) Makefile |5 + 1 files changed, 1 insertion(+), 4 deletions(-) Index: llvm/tools/gccld/Makefile diff -u llvm/tools/gccld/Makefile:1.16 llvm/tools/gccld/Makefile:1.17 --- llvm/tools/gccld/Makefile:1.16 Thu Jul 6 19:46:18 2006 +++ llvm/tools/gccld/Makefile Mon Sep 4 00:59:09 2006 @@ -10,10 +10,7 @@ LEVEL = ../.. TOOLNAME = gccld -USEDLIBS = LLVMipo.a LLVMTransforms.a LLVMScalarOpts.a LLVMAnalysis.a \ - LLVMipa.a LLVMTransformUtils.a LLVMTarget.a LLVMLinker.a \ - LLVMArchive.a LLVMBCReader.a LLVMBCWriter.a \ - LLVMCore.a LLVMSupport.a LLVMbzip2.a LLVMSystem.a +LINK_COMPONENTS = bcreader bcwriter ipo scalaropts ipa linker REQUIRES_EH := 1 include $(LEVEL)/Makefile.common ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/tools/lto/Makefile
Changes in directory llvm/tools/lto: Makefile updated: 1.4 -> 1.5 --- Log message: Use LINK_COMPONENTS to specify *components* to link against instead of using USED_LIBS to specify *libraries* to link against. --- Diffs of the changes: (+2 -6) Makefile |8 ++-- 1 files changed, 2 insertions(+), 6 deletions(-) Index: llvm/tools/lto/Makefile diff -u llvm/tools/lto/Makefile:1.4 llvm/tools/lto/Makefile:1.5 --- llvm/tools/lto/Makefile:1.4 Thu Aug 3 12:26:30 2006 +++ llvm/tools/lto/Makefile Mon Sep 4 00:59:09 2006 @@ -17,14 +17,10 @@ # Include this here so we can get the configuration of the targets # that have been configured for construction. We have to do this -# early so we can set up USEDLIBS properly before includeing Makefile.rules +# early so we can set up LINK_COMPONENTS before includeing Makefile.rules include $(LEVEL)/Makefile.config -USEDLIBS := $(addprefix LLVM,$(TARGETS_TO_BUILD)) \ - LLVMSelectionDAG.a LLVMCodeGen.a LLVMipo.a LLVMTransforms.a \ - LLVMScalarOpts.a LLVMipa.a LLVMTransformUtils.a LLVMAnalysis.a \ - LLVMTarget.a LLVMBCReader.a LLVMBCWriter.a LLVMSystem.a LLVMLinker.a \ - LLVMCore.a LLVMSupport.a LLVMbzip2.a +LINK_COMPONENTS := $(TARGETS_TO_BUILD) ipo scalaropts bcreader bcwriter include $(LEVEL)/Makefile.common ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/tools/llvm-extract/Makefile
Changes in directory llvm/tools/llvm-extract: Makefile updated: 1.5 -> 1.6 --- Log message: Use LINK_COMPONENTS to specify *components* to link against instead of using USED_LIBS to specify *libraries* to link against. --- Diffs of the changes: (+1 -3) Makefile |4 +--- 1 files changed, 1 insertion(+), 3 deletions(-) Index: llvm/tools/llvm-extract/Makefile diff -u llvm/tools/llvm-extract/Makefile:1.5 llvm/tools/llvm-extract/Makefile:1.6 --- llvm/tools/llvm-extract/Makefile:1.5Thu Jul 6 19:46:18 2006 +++ llvm/tools/llvm-extract/MakefileMon Sep 4 00:59:09 2006 @@ -9,9 +9,7 @@ LEVEL = ../.. TOOLNAME = llvm-extract -USEDLIBS = LLVMBCReader.a LLVMBCWriter.a LLVMTransforms.a LLVMipo.a \ - LLVMTarget.a LLVMAnalysis.a LLVMTransformUtils.a LLVMipa.a \ - LLVMCore.a LLVMSupport.a LLVMbzip2.a LLVMSystem.a +LINK_COMPONENTS := bcreader bcwriter ipo REQUIRES_EH := 1 include $(LEVEL)/Makefile.common ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/tools/lli/Makefile
Changes in directory llvm/tools/lli: Makefile updated: 1.49 -> 1.50 --- Log message: Use llvm-config instead of magic JIT thing to link in libs --- Diffs of the changes: (+1 -1) Makefile |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/tools/lli/Makefile diff -u llvm/tools/lli/Makefile:1.49 llvm/tools/lli/Makefile:1.50 --- llvm/tools/lli/Makefile:1.49Thu Jul 6 19:46:18 2006 +++ llvm/tools/lli/Makefile Mon Sep 4 01:01:43 2006 @@ -8,7 +8,7 @@ ##===--===## LEVEL:= ../.. TOOLNAME := lli -LLVMLIBS := JIT +LINK_COMPONENTS := jit interpreter native bcreader REQUIRES_EH := 1 # Enable JIT support ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/examples/Fibonacci/Makefile
Changes in directory llvm/examples/Fibonacci: Makefile updated: 1.7 -> 1.8 --- Log message: Use llvm-config to determine what to link in --- Diffs of the changes: (+2 -2) Makefile |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/examples/Fibonacci/Makefile diff -u llvm/examples/Fibonacci/Makefile:1.7 llvm/examples/Fibonacci/Makefile:1.8 --- llvm/examples/Fibonacci/Makefile:1.7Mon Nov 29 01:17:19 2004 +++ llvm/examples/Fibonacci/MakefileMon Sep 4 01:04:03 2006 @@ -11,7 +11,7 @@ TOOLNAME = Fibonacci EXAMPLE_TOOL = 1 -# Enable JIT support -LLVMLIBS := JIT +# Link in JIT support +LINK_COMPONENTS := jit interpreter native include $(LEVEL)/Makefile.common ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/examples/ParallelJIT/Makefile
Changes in directory llvm/examples/ParallelJIT: Makefile updated: 1.3 -> 1.4 --- Log message: Use llvm-config to determine what to link in --- Diffs of the changes: (+1 -2) Makefile |3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) Index: llvm/examples/ParallelJIT/Makefile diff -u llvm/examples/ParallelJIT/Makefile:1.3 llvm/examples/ParallelJIT/Makefile:1.4 --- llvm/examples/ParallelJIT/Makefile:1.3 Wed Aug 24 05:07:21 2005 +++ llvm/examples/ParallelJIT/Makefile Mon Sep 4 01:04:03 2006 @@ -10,8 +10,7 @@ TOOLNAME = ParallelJIT EXAMPLE_TOOL = 1 -# Enable JIT support -LLVMLIBS := JIT +LINK_COMPONENTS := jit interpreter native include $(LEVEL)/Makefile.common ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/examples/HowToUseJIT/Makefile
Changes in directory llvm/examples/HowToUseJIT: Makefile updated: 1.8 -> 1.9 --- Log message: Use llvm-config to determine what to link in --- Diffs of the changes: (+1 -2) Makefile |3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) Index: llvm/examples/HowToUseJIT/Makefile diff -u llvm/examples/HowToUseJIT/Makefile:1.8 llvm/examples/HowToUseJIT/Makefile:1.9 --- llvm/examples/HowToUseJIT/Makefile:1.8 Mon Nov 29 01:17:19 2004 +++ llvm/examples/HowToUseJIT/Makefile Mon Sep 4 01:04:03 2006 @@ -10,7 +10,6 @@ TOOLNAME = HowToUseJIT EXAMPLE_TOOL = 1 -# Enable JIT support -LLVMLIBS := JIT +LINK_COMPONENTS := jit interpreter native include $(LEVEL)/Makefile.common ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/examples/ModuleMaker/Makefile
Changes in directory llvm/examples/ModuleMaker: Makefile updated: 1.11 -> 1.12 --- Log message: Use llvm-config to determine what to link in --- Diffs of the changes: (+1 -1) Makefile |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/examples/ModuleMaker/Makefile diff -u llvm/examples/ModuleMaker/Makefile:1.11 llvm/examples/ModuleMaker/Makefile:1.12 --- llvm/examples/ModuleMaker/Makefile:1.11 Fri Jul 28 17:08:23 2006 +++ llvm/examples/ModuleMaker/Makefile Mon Sep 4 01:04:03 2006 @@ -9,6 +9,6 @@ LEVEL=../.. TOOLNAME=ModuleMaker EXAMPLE_TOOL = 1 -USEDLIBS= LLVMBCWriter.a LLVMCore.a LLVMSupport.a LLVMbzip2.a LLVMSystem.a +LINK_COMPONENTS := bcwriter include $(LEVEL)/Makefile.common ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/Makefile.rules
Changes in directory llvm: Makefile.rules updated: 1.403 -> 1.404 --- Log message: Remove some dead makefilery --- Diffs of the changes: (+0 -62) Makefile.rules | 62 - 1 files changed, 62 deletions(-) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.403 llvm/Makefile.rules:1.404 --- llvm/Makefile.rules:1.403 Mon Sep 4 00:23:20 2006 +++ llvm/Makefile.rules Mon Sep 4 01:07:12 2006 @@ -626,68 +626,6 @@ ### #- -# Handle the special "JIT" value for LLVM_LIBS which is a -# shorthand for a bunch of libraries that get the correct -# JIT support for a library or a tool that runs JIT. -#- -ifeq ($(firstword $(LLVMLIBS)),config) -LLVMLIBS := $(shell $(LLVM_CONFIG) --libnames $(wordlist 2,,$(LLVMLIBS))) -LLVMLIBS := $(patsubst lib%.a,%.a,$(LLVMLIBS)) -LLVMLIBS := $(patsubst %.o,%,$(LLVMLIBS)) -endif - -ifeq ($(LLVMLIBS),JIT) - -# Make sure we can get our own symbols in the tool -Link += -dlopen self - -# Generic JIT libraries -JIT_LIBS := LLVMInterpreter LLVMJIT - -# You can enable the X86 JIT on a non-X86 host by setting the flag -# ENABLE_X86_JIT on the make command line. If not, it will still be -# enabled automagically on an X86 host. -ifeq ($(ARCH), x86) - ENABLE_X86_JIT = 1 -endif - -# What the X86 JIT requires -ifdef ENABLE_X86_JIT - JIT_LIBS += LLVMX86 -endif - -# You can enable the PowerPC JIT on a non-PowerPC host by setting the flag -# ENABLE_PPC_JIT on the make command line. If not, it will still be -# enabled automagically on an PowerPC host. -ifeq ($(ARCH), PowerPC) - ENABLE_PPC_JIT = 1 -endif - -# What the PowerPC JIT requires -ifdef ENABLE_PPC_JIT - JIT_LIBS += LLVMPowerPC -endif - -# You can enable the Alpha JIT on a non-Alpha host by setting the flag -# ENABLE_ALPHA_JIT on the make command line. If not, it will still be -# enabled automagically on an Alpha host. -ifeq ($(ARCH), Alpha) - ENABLE_ALPHA_JIT = 1 -endif - -# What the Alpha JIT requires -ifdef ENABLE_ALPHA_JIT - JIT_LIBS += LLVMAlpha -endif - -JIT_LIBS += LLVMTarget.a LLVMSelectionDAG.a LLVMCodeGen.a LLVMExecutionEngine - -LLVMLIBS := $(JIT_LIBS) LLVMScalarOpts.a LLVMTransformUtils.a LLVMAnalysis.a \ -LLVMBCReader.a LLVMCore.a LLVMSupport.a LLVMbzip2.a \ -LLVMSystem.a $(PLATFORMLIBDL) -endif - -#- # Define various command line options pertaining to the # libraries needed when linking. There are "Proj" libs # (defined by the user's project) and "LLVM" libs (defined ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/docs/MakefileGuide.html
Changes in directory llvm/docs: MakefileGuide.html updated: 1.37 -> 1.38 --- Log message: Update this to reflect llvm-config usage --- Diffs of the changes: (+11 -25) MakefileGuide.html | 36 +++- 1 files changed, 11 insertions(+), 25 deletions(-) Index: llvm/docs/MakefileGuide.html diff -u llvm/docs/MakefileGuide.html:1.37 llvm/docs/MakefileGuide.html:1.38 --- llvm/docs/MakefileGuide.html:1.37 Mon Aug 7 18:44:59 2006 +++ llvm/docs/MakefileGuide.htmlMon Sep 4 01:12:14 2006 @@ -297,7 +297,7 @@ LIBRARYNAME := MyMod LOADABLE_MODULE := 1 - USEDLIBS := LLVMSupport.a LLVMSystem.a + LINK_COMPONENTS := support system Use of the LOADABLE_MODULE facility implies several things: @@ -323,7 +323,7 @@ TOOLNAME = mytool USEDLIBS = mylib - LLVMLIBS = LLVMSupport.a LLVMSystem.a + LINK_COMPONENTS = support system says that we are to build a tool name mytool and that it requires three libraries: mylib, LLVMSupport.a and @@ -352,36 +352,22 @@ JIT Tools - Many tools will want to use the JIT features of LLVM. However, getting the - right set of libraries to link with is tedious, platform specific, and error - prone. Additionally, the JIT has special linker switch options that it needs. - Consequently, to make it easier to build tools that use the JIT, you can - use a special value for the LLVMLIBS variable: + Many tools will want to use the JIT features of LLVM. To do this, you + simply specify that you want an execution 'engine', and the makefiles will + automatically link in the appropriate JIT for the host or an interpreter + if none is available: TOOLNAME = my_jit_tool USEDLIBS = mylib - LLVMLIBS = JIT + LINK_COMPONENTS = engine - Using a value of JIT for LLVMLIBS tells the makefile - system to construct a special value for LLVMLIBS that gives the program all - the LLVM libraries needed to run the JIT. Any additional libraries needed can - still be specified with USEDLIBS. To get a full understanding of how - this changes the linker command, it is recommended that you: + Of course, any additional libraries may be listed as other components. To + get a full understanding of how this changes the linker command, it is + recommended that you: cd examples/Fibonacci make VERBOSE=1 - By default, using LLVMLIBS=JIT will link in enough to support JIT - code generation for the architecture on which the tool is linked. If you need - additional target architectures linked in, you may specify them on the command - line or in your Makefile. For example: - - ENABLE_X86_JIT=1 - ENABLE_SPARCV9_JIT=1 - ENALBE_PPC_JIT=1 - - will cause the tool to be able to generate code for all three platforms. - @@ -1039,7 +1025,7 @@ mailto:[EMAIL PROTECTED]">Reid Spencer http://llvm.org";>The LLVM Compiler Infrastructure - Last modified: $Date: 2006/08/07 23:44:59 $ + Last modified: $Date: 2006/09/04 06:12:14 $ ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/IA64/IA64ISelLowering.cpp
Changes in directory llvm/lib/Target/IA64: IA64ISelLowering.cpp updated: 1.41 -> 1.42 --- Log message: add setJumpBufSize() and setJumpBufAlignment() to target-lowering. Call these from your backend to enjoy setjmp/longjmp goodness, see lib/Target/IA64/IA64ISelLowering.cpp for an example --- Diffs of the changes: (+3 -0) IA64ISelLowering.cpp |3 +++ 1 files changed, 3 insertions(+) Index: llvm/lib/Target/IA64/IA64ISelLowering.cpp diff -u llvm/lib/Target/IA64/IA64ISelLowering.cpp:1.41 llvm/lib/Target/IA64/IA64ISelLowering.cpp:1.42 --- llvm/lib/Target/IA64/IA64ISelLowering.cpp:1.41 Wed Aug 16 02:28:58 2006 +++ llvm/lib/Target/IA64/IA64ISelLowering.cpp Mon Sep 4 01:21:35 2006 @@ -109,6 +109,9 @@ setStackPointerRegisterToSaveRestore(IA64::r12); + setJumpBufSize(704); // on ia64-linux, jmp_bufs are 704 bytes.. + setJumpBufAlignment(16); // ...and must be 16-byte aligned + computeRegisterProperties(); setOperationAction(ISD::ConstantFP, MVT::f64, Expand); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Transforms/Utils/LowerInvoke.cpp
Changes in directory llvm/lib/Transforms/Utils: LowerInvoke.cpp updated: 1.39 -> 1.40 --- Log message: add setJumpBufSize() and setJumpBufAlignment() to target-lowering. Call these from your backend to enjoy setjmp/longjmp goodness, see lib/Target/IA64/IA64ISelLowering.cpp for an example --- Diffs of the changes: (+10 -10) LowerInvoke.cpp | 20 ++-- 1 files changed, 10 insertions(+), 10 deletions(-) Index: llvm/lib/Transforms/Utils/LowerInvoke.cpp diff -u llvm/lib/Transforms/Utils/LowerInvoke.cpp:1.39 llvm/lib/Transforms/Utils/LowerInvoke.cpp:1.40 --- llvm/lib/Transforms/Utils/LowerInvoke.cpp:1.39 Sun Aug 27 17:42:52 2006 +++ llvm/lib/Transforms/Utils/LowerInvoke.cpp Mon Sep 4 01:21:35 2006 @@ -45,6 +45,7 @@ #include "llvm/ADT/Statistic.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Compiler.h" +#include "llvm/Target/TargetLowering.h" #include using namespace llvm; @@ -67,9 +68,12 @@ const Type *JBLinkTy; GlobalVariable *JBListHead; Function *SetJmpFn, *LongJmpFn; + +// We peek in TLI to grab the target's jmp_buf size and alignment +const TargetLowering *TLI; + public: -LowerInvoke(unsigned Size = 200, unsigned Align = 0) : JumpBufSize(Size), - JumpBufAlign(Align) {} +LowerInvoke(const TargetLowering *tli = NULL) : TLI(tli) { } bool doInitialization(Module &M); bool runOnFunction(Function &F); @@ -89,9 +93,6 @@ void rewriteExpensiveInvoke(InvokeInst *II, unsigned InvokeNo, AllocaInst *InvokeNum, SwitchInst *CatchSwitch); bool insertExpensiveEHSupport(Function &F); - -unsigned JumpBufSize; -unsigned JumpBufAlign; }; RegisterPass @@ -101,9 +102,8 @@ const PassInfo *llvm::LowerInvokePassID = X.getPassInfo(); // Public Interface To the LowerInvoke pass. -FunctionPass *llvm::createLowerInvokePass(unsigned JumpBufSize, - unsigned JumpBufAlign) { - return new LowerInvoke(JumpBufSize, JumpBufAlign); +FunctionPass *llvm::createLowerInvokePass(const TargetLowering *TLI) { + return new LowerInvoke(TLI); } // doInitialization - Make sure that there is a prototype for abort in the @@ -113,7 +113,7 @@ AbortMessage = 0; if (ExpensiveEHSupport) { // Insert a type for the linked list of jump buffers. -const Type *JmpBufTy = ArrayType::get(VoidPtrTy, JumpBufSize); +const Type *JmpBufTy = ArrayType::get(VoidPtrTy, TLI->getJumpBufSize()); { // The type is recursive, so use a type holder. std::vector Elements; @@ -453,7 +453,7 @@ // that needs to be restored on all exits from the function. This is an // alloca because the value needs to be live across invokes. AllocaInst *JmpBuf = - new AllocaInst(JBLinkTy, 0, JumpBufAlign, "jblink", F.begin()->begin()); + new AllocaInst(JBLinkTy, 0, TLI->getJumpBufAlignment(), "jblink", F.begin()->begin()); std::vector Idx; Idx.push_back(Constant::getNullValue(Type::IntTy)); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/Transforms/Scalar.h
Changes in directory llvm/include/llvm/Transforms: Scalar.h updated: 1.67 -> 1.68 --- Log message: add setJumpBufSize() and setJumpBufAlignment() to target-lowering. Call these from your backend to enjoy setjmp/longjmp goodness, see lib/Target/IA64/IA64ISelLowering.cpp for an example --- Diffs of the changes: (+1 -2) Scalar.h |3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) Index: llvm/include/llvm/Transforms/Scalar.h diff -u llvm/include/llvm/Transforms/Scalar.h:1.67 llvm/include/llvm/Transforms/Scalar.h:1.68 --- llvm/include/llvm/Transforms/Scalar.h:1.67 Mon Aug 28 17:44:55 2006 +++ llvm/include/llvm/Transforms/Scalar.h Mon Sep 4 01:21:35 2006 @@ -286,8 +286,7 @@ // "my LLVM-to-LLVM pass doesn't support the invoke instruction yet" lowering // pass. // -FunctionPass *createLowerInvokePass(unsigned JumBufSize = 200, -unsigned JumpBufAlign = 0); +FunctionPass *createLowerInvokePass(const TargetLowering *TLI = NULL); extern const PassInfo *LowerInvokePassID; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/CodeGen/LLVMTargetMachine.cpp
Changes in directory llvm/lib/CodeGen: LLVMTargetMachine.cpp updated: 1.1 -> 1.2 --- Log message: add setJumpBufSize() and setJumpBufAlignment() to target-lowering. Call these from your backend to enjoy setjmp/longjmp goodness, see lib/Target/IA64/IA64ISelLowering.cpp for an example --- Diffs of the changes: (+2 -2) LLVMTargetMachine.cpp |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/CodeGen/LLVMTargetMachine.cpp diff -u llvm/lib/CodeGen/LLVMTargetMachine.cpp:1.1 llvm/lib/CodeGen/LLVMTargetMachine.cpp:1.2 --- llvm/lib/CodeGen/LLVMTargetMachine.cpp:1.1 Sun Sep 3 23:16:09 2006 +++ llvm/lib/CodeGen/LLVMTargetMachine.cpp Mon Sep 4 01:21:35 2006 @@ -33,7 +33,7 @@ PM.add(createLowerGCPass()); // FIXME: Implement the invoke/unwind instructions! - PM.add(createLowerInvokePass()); + PM.add(createLowerInvokePass(getTargetLowering())); // Make sure that no unreachable blocks are instruction selected. PM.add(createUnreachableBlockEliminationPass()); @@ -107,7 +107,7 @@ PM.add(createLowerGCPass()); // FIXME: Implement the invoke/unwind instructions! - PM.add(createLowerInvokePass()); + PM.add(createLowerInvokePass(getTargetLowering())); // Make sure that no unreachable blocks are instruction selected. PM.add(createUnreachableBlockEliminationPass()); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/Target/TargetLowering.h
Changes in directory llvm/include/llvm/Target: TargetLowering.h updated: 1.77 -> 1.78 --- Log message: add setJumpBufSize() and setJumpBufAlignment() to target-lowering. Call these from your backend to enjoy setjmp/longjmp goodness, see lib/Target/IA64/IA64ISelLowering.cpp for an example --- Diffs of the changes: (+31 -0) TargetLowering.h | 31 +++ 1 files changed, 31 insertions(+) Index: llvm/include/llvm/Target/TargetLowering.h diff -u llvm/include/llvm/Target/TargetLowering.h:1.77 llvm/include/llvm/Target/TargetLowering.h:1.78 --- llvm/include/llvm/Target/TargetLowering.h:1.77 Mon Jun 12 11:06:08 2006 +++ llvm/include/llvm/Target/TargetLowering.h Mon Sep 4 01:21:35 2006 @@ -327,6 +327,18 @@ return StackPointerRegisterToSaveRestore; } + /// getJumpBufSize - returns the target's jmp_buf size in bytes (if never + /// set, the default is 200) + unsigned getJumpBufSize() const { +return JumpBufSize; + } + + /// getJumpBufAlignment - returns the target's jmp_buf alignment in bytes + /// (if never set, the default is 0) + unsigned getJumpBufAlignment() const { +return JumpBufAlignment; + } + //======// // TargetLowering Optimization Methods // @@ -537,6 +549,18 @@ TargetDAGCombineArray[NT >> 3] |= 1 << (NT&7); } + /// setJumpBufSize - Set the target's required jmp_buf buffer size (in + /// bytes); default is 200 + void setJumpBufSize(unsigned Size) { +JumpBufSize = Size; + } + + /// setJumpBufAlignment - Set the target's required jmp_buf buffer + /// alignment (in bytes); default is 0 + void setJumpBufAlignment(unsigned Align) { +JumpBufAlignment = Align; + } + public: //======// @@ -718,6 +742,13 @@ /// _longjmp to implement llvm.setjmp/llvm.longjmp. Defaults to false. bool UseUnderscoreSetJmpLongJmp; + /// JumpBufSize - The size, in bytes, of the target's jmp_buf buffers + unsigned JumpBufSize; + + /// JumpBufAlignment - The alignment, in bytes, of the target's jmp_buf + /// buffers + unsigned JumpBufAlignment; + /// StackPointerRegisterToSaveRestore - If set to a physical register, this /// specifies the register that llvm.savestack/llvm.restorestack should save /// and restore. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/Makefile.rules
Changes in directory llvm: Makefile.rules updated: 1.404 -> 1.405 --- Log message: Fix a build problem --- Diffs of the changes: (+3 -2) Makefile.rules |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.404 llvm/Makefile.rules:1.405 --- llvm/Makefile.rules:1.404 Mon Sep 4 01:07:12 2006 +++ llvm/Makefile.rules Mon Sep 4 01:39:52 2006 @@ -658,7 +658,8 @@ $(ToolDir)/$(strip $(TOOLNAME))$(EXEEXT): $(LLVM_CONFIG) ProjLibsOptions = $(shell $(LLVM_CONFIG) --libs $(LINK_COMPONENTS)) -ProjLibsPaths = $(shell $(LLVM_CONFIG) --libfiles $(LINK_COMPONENTS)) +ProjLibsPaths = $(LLVM_CONFIG) \ + $(shell $(LLVM_CONFIG) --libfiles $(LINK_COMPONENTS)) endif endif @@ -953,7 +954,7 @@ $(ToolBuildPath): $(ToolDir)/.dir endif -$(ToolBuildPath): $(ObjectsO) $(LLVM_CONFIG) $(ProjLibsPaths) $(LLVMLibsPaths) +$(ToolBuildPath): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths) $(Echo) Linking $(BuildMode) executable $(TOOLNAME) $(StripWarnMsg) $(Verb) $(LTLink) -o $@ $(TOOLLINKOPTS) $(ObjectsO) $(ProjLibsOptions) \ $(LLVMLibsOptions) $(ExtraLibs) $(TOOLLINKOPTSB) $(LIBS) ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits