From pjenkins at apple.com Mon Jul 10 11:36:32 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Mon, 10 Jul 2006 11:36:32 -0500 Subject: [llvm-commits] CVS: llvm/utils/NewNightlyTest.pl Message-ID: <200607101636.LAA07639@zion.cs.uiuc.edu> Changes in directory llvm/utils: NewNightlyTest.pl updated: 1.7 -> 1.8 --- Log message: Fixed an issue that tried to cat externalprogramstable.txt from the testresults directory when it doesnt exist. --- Diffs of the changes: (+1 -0) NewNightlyTest.pl | 1 + 1 files changed, 1 insertion(+) Index: llvm/utils/NewNightlyTest.pl diff -u llvm/utils/NewNightlyTest.pl:1.7 llvm/utils/NewNightlyTest.pl:1.8 --- llvm/utils/NewNightlyTest.pl:1.7 Fri Jul 7 16:47:24 2006 +++ llvm/utils/NewNightlyTest.pl Mon Jul 10 11:36:19 2006 @@ -777,6 +777,7 @@ print "External TEST STAGE\n"; } ($ExternalProgramsTable, $externalsource_llcbeta_options) = TestDirectory("External"); + WriteFile "$Prefix-externalprogramstable.txt", $ExternalProgramsTable; system "cat $Prefix-singlesourceprogramstable.txt $Prefix-multisourceprogramstable.txt ". " $Prefix-externalprogramstable.txt | sort > $Prefix-Tests.txt"; } else { From pjenkins at apple.com Mon Jul 10 13:13:16 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Mon, 10 Jul 2006 13:13:16 -0500 Subject: [llvm-commits] CVS: nightlytest-serverside/index.php Message-ID: <200607101813.NAA08405@zion.cs.uiuc.edu> Changes in directory nightlytest-serverside: index.php updated: 1.6 -> 1.7 --- Log message: testing email script --- Diffs of the changes: (+0 -1) index.php | 1 - 1 files changed, 1 deletion(-) Index: nightlytest-serverside/index.php diff -u nightlytest-serverside/index.php:1.6 nightlytest-serverside/index.php:1.7 --- nightlytest-serverside/index.php:1.6 Thu Jul 6 13:35:06 2006 +++ nightlytest-serverside/index.php Mon Jul 10 13:13:04 2006 @@ -94,6 +94,5 @@ - \ No newline at end of file From pjenkins at apple.com Mon Jul 10 13:35:53 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Mon, 10 Jul 2006 13:35:53 -0500 Subject: [llvm-commits] CVS: llvm/utils/NewNightlyTest.pl Message-ID: <200607101835.NAA11314@zion.cs.uiuc.edu> Changes in directory llvm/utils: NewNightlyTest.pl updated: 1.8 -> 1.9 --- Log message: Fixed some output issues where newlines were not being printed after error messages --- Diffs of the changes: (+4 -3) NewNightlyTest.pl | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) Index: llvm/utils/NewNightlyTest.pl diff -u llvm/utils/NewNightlyTest.pl:1.8 llvm/utils/NewNightlyTest.pl:1.9 --- llvm/utils/NewNightlyTest.pl:1.8 Mon Jul 10 11:36:19 2006 +++ llvm/utils/NewNightlyTest.pl Mon Jul 10 13:35:41 2006 @@ -281,7 +281,7 @@ $/ = '\n'; return $Ret; } else { - print "Could not open file '$_[0]' for reading!"; + print "Could not open file '$_[0]' for reading!\n"; return ""; } } @@ -289,7 +289,7 @@ #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sub WriteFile { # (filename, contents) - open (FILE, ">$_[0]") or die "Could not open file '$_[0]' for writing!"; + open (FILE, ">$_[0]") or die "Could not open file '$_[0]' for writing!\n"; print FILE $_[1]; close FILE; } @@ -429,7 +429,8 @@ my $sentdata=""; foreach $x (keys (%$variables)){ - $sentdata.= "$x => $hash_of_data{$x}\n"; + $value = $variables->{$x}; + $sentdata.= "$x => $value\n"; } WriteFile "$Prefix-sentdata.txt", $sentdata; From resistor at mac.com Mon Jul 10 14:04:03 2006 From: resistor at mac.com (Owen Anderson) Date: Mon, 10 Jul 2006 14:04:03 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200607101904.OAA32515@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.494 -> 1.495 --- Log message: Make instcombine not remove Phi nodes when LCSSA is live. --- Diffs of the changes: (+50 -46) InstructionCombining.cpp | 96 ++++++++++++++++++++++++----------------------- 1 files changed, 50 insertions(+), 46 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.494 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.495 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.494 Wed Jun 28 17:08:15 2006 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Mon Jul 10 14:03:49 2006 @@ -96,6 +96,7 @@ virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired(); + AU.addPreservedID(LCSSAID); AU.setPreservesCFG(); } @@ -6251,56 +6252,59 @@ // PHINode simplification // Instruction *InstCombiner::visitPHINode(PHINode &PN) { - if (Value *V = PN.hasConstantValue()) - return ReplaceInstUsesWith(PN, V); + // If LCSSA is around, don't nuke PHIs. + if (!mustPreserveAnalysisID(LCSSAID)) { + if (Value *V = PN.hasConstantValue()) + return ReplaceInstUsesWith(PN, V); + + // If the only user of this instruction is a cast instruction, and all of + //the incoming values are constants, change this PHI to merge together the + // casted constants. + if (PN.hasOneUse()) + if (CastInst *CI = dyn_cast(PN.use_back())) + if (CI->getType() != PN.getType()) { // noop casts will be folded + bool AllConstant = true; + for (unsigned i = 0, e = PN.getNumIncomingValues(); i != e; ++i) + if (!isa(PN.getIncomingValue(i))) { + AllConstant = false; + break; + } + if (AllConstant) { + // Make a new PHI with all casted values. + PHINode *New = new PHINode(CI->getType(), PN.getName(), &PN); + for (unsigned i = 0, e = PN.getNumIncomingValues(); i != e; ++i) { + Constant *OldArg = cast(PN.getIncomingValue(i)); + New->addIncoming(ConstantExpr::getCast(OldArg, New->getType()), + PN.getIncomingBlock(i)); + } - // If the only user of this instruction is a cast instruction, and all of the - // incoming values are constants, change this PHI to merge together the casted - // constants. - if (PN.hasOneUse()) - if (CastInst *CI = dyn_cast(PN.use_back())) - if (CI->getType() != PN.getType()) { // noop casts will be folded - bool AllConstant = true; - for (unsigned i = 0, e = PN.getNumIncomingValues(); i != e; ++i) - if (!isa(PN.getIncomingValue(i))) { - AllConstant = false; - break; + // Update the cast instruction. + CI->setOperand(0, New); + WorkList.push_back(CI); // revisit the cast instruction to fold. + WorkList.push_back(New); // Make sure to revisit the new Phi + return &PN; // PN is now dead! } - if (AllConstant) { - // Make a new PHI with all casted values. - PHINode *New = new PHINode(CI->getType(), PN.getName(), &PN); - for (unsigned i = 0, e = PN.getNumIncomingValues(); i != e; ++i) { - Constant *OldArg = cast(PN.getIncomingValue(i)); - New->addIncoming(ConstantExpr::getCast(OldArg, New->getType()), - PN.getIncomingBlock(i)); - } - - // Update the cast instruction. - CI->setOperand(0, New); - WorkList.push_back(CI); // revisit the cast instruction to fold. - WorkList.push_back(New); // Make sure to revisit the new Phi - return &PN; // PN is now dead! } - } - - // If all PHI operands are the same operation, pull them through the PHI, - // reducing code size. - if (isa(PN.getIncomingValue(0)) && - PN.getIncomingValue(0)->hasOneUse()) - if (Instruction *Result = FoldPHIArgOpIntoPHI(PN)) - return Result; - - // If this is a trivial cycle in the PHI node graph, remove it. Basically, if - // this PHI only has a single use (a PHI), and if that PHI only has one use (a - // PHI)... break the cycle. - if (PN.hasOneUse()) - if (PHINode *PU = dyn_cast(PN.use_back())) { - std::set PotentiallyDeadPHIs; - PotentiallyDeadPHIs.insert(&PN); - if (DeadPHICycle(PU, PotentiallyDeadPHIs)) - return ReplaceInstUsesWith(PN, UndefValue::get(PN.getType())); - } + // If all PHI operands are the same operation, pull them through the PHI, + // reducing code size. + if (isa(PN.getIncomingValue(0)) && + PN.getIncomingValue(0)->hasOneUse()) + if (Instruction *Result = FoldPHIArgOpIntoPHI(PN)) + return Result; + + // If this is a trivial cycle in the PHI node graph, remove it. Basically, + // if this PHI only has a single use (a PHI), and if that PHI only has one + // use (a PHI)... break the cycle. + if (PN.hasOneUse()) + if (PHINode *PU = dyn_cast(PN.use_back())) { + std::set PotentiallyDeadPHIs; + PotentiallyDeadPHIs.insert(&PN); + if (DeadPHICycle(PU, PotentiallyDeadPHIs)) + return ReplaceInstUsesWith(PN, UndefValue::get(PN.getType())); + } + } + return 0; } From pjenkins at apple.com Mon Jul 10 14:28:04 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Mon, 10 Jul 2006 14:28:04 -0500 Subject: [llvm-commits] CVS: nightlytest-serverside/machine.php Message-ID: <200607101928.OAA07260@zion.cs.uiuc.edu> Changes in directory nightlytest-serverside: machine.php updated: 1.2 -> 1.3 --- Log message: fixed a problem where trying to generate a graph of configure cpu time from the machine page produced a cvs checkout cpu graph. --- Diffs of the changes: (+1 -1) machine.php | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: nightlytest-serverside/machine.php diff -u nightlytest-serverside/machine.php:1.2 nightlytest-serverside/machine.php:1.3 --- nightlytest-serverside/machine.php:1.2 Fri Jul 7 19:32:18 2006 +++ nightlytest-serverside/machine.php Mon Jul 10 14:27:51 2006 @@ -138,7 +138,7 @@ echo ""; echo ""; echo "Configure time cpu"; - print "
\n"; + print "
\n"; echo ""; echo ""; echo "Configure time wall"; From llvm at cs.uiuc.edu Mon Jul 10 14:28:22 2006 From: llvm at cs.uiuc.edu (LLVM) Date: Mon, 10 Jul 2006 14:28:22 -0500 Subject: [llvm-commits] CVS: nightlytest-serverside/machines/ Message-ID: <200607101928.OAA07679@zion.cs.uiuc.edu> Changes in directory nightlytest-serverside/machines: --- Log message: Directory /var/cvs/llvm/nightlytest-serverside/machines added to the repository --- Diffs of the changes: (+0 -0) 0 files changed From lattner at cs.uiuc.edu Mon Jul 10 14:53:39 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 10 Jul 2006 14:53:39 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp Message-ID: <200607101953.OAA12009@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ISelLowering.cpp updated: 1.233 -> 1.234 --- Log message: Mark internal function static --- Diffs of the changes: (+1 -1) X86ISelLowering.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/X86/X86ISelLowering.cpp diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.233 llvm/lib/Target/X86/X86ISelLowering.cpp:1.234 --- llvm/lib/Target/X86/X86ISelLowering.cpp:1.233 Fri Jul 7 03:33:52 2006 +++ llvm/lib/Target/X86/X86ISelLowering.cpp Mon Jul 10 14:53:12 2006 @@ -4056,7 +4056,7 @@ return false; } -bool isBaseAlignment16(SDNode *Base, MachineFrameInfo *MFI) { +static bool isBaseAlignment16(SDNode *Base, MachineFrameInfo *MFI) { GlobalValue *GV; int64_t Offset; if (isGAPlusOffset(Base, GV, Offset)) From lattner at cs.uiuc.edu Mon Jul 10 15:25:14 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 10 Jul 2006 15:25:14 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/InstCombine/bswap.ll Message-ID: <200607102025.PAA23568@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/InstCombine: bswap.ll updated: 1.1 -> 1.2 --- Log message: Add tests for 16-bit byteswaps. --- Diffs of the changes: (+15 -1) bswap.ll | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletion(-) Index: llvm/test/Regression/Transforms/InstCombine/bswap.ll diff -u llvm/test/Regression/Transforms/InstCombine/bswap.ll:1.1 llvm/test/Regression/Transforms/InstCombine/bswap.ll:1.2 --- llvm/test/Regression/Transforms/InstCombine/bswap.ll:1.1 Thu Jun 15 14:06:42 2006 +++ llvm/test/Regression/Transforms/InstCombine/bswap.ll Mon Jul 10 15:25:01 2006 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep 'call.*llvm.bswap' | wc -l | grep 2 +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep 'call.*llvm.bswap' | wc -l | grep 4 uint %test1(uint %i) { %tmp1 = shr uint %i, ubyte 24 ; [#uses=1] @@ -26,3 +26,17 @@ ret uint %tmp14 } +ushort %test3(ushort %s) { + %tmp2 = shr ushort %s, ubyte 8 + %tmp4 = shl ushort %s, ubyte 8 + %tmp5 = or ushort %tmp2, %tmp4 + ret ushort %tmp5 +} + +ushort %test4(ushort %s) { + %tmp2 = shr ushort %s, ubyte 8 + %tmp4 = shl ushort %s, ubyte 8 + %tmp5 = or ushort %tmp4, %tmp2 + ret ushort %tmp5 +} + From lattner at cs.uiuc.edu Mon Jul 10 15:25:37 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 10 Jul 2006 15:25:37 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200607102025.PAA24313@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.495 -> 1.496 --- Log message: Recognize 16-bit bswaps by relaxing overconstrained pattern. This implements Transforms/InstCombine/bswap.ll:test[34]. --- Diffs of the changes: (+5 -2) InstructionCombining.cpp | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.495 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.496 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.495 Mon Jul 10 14:03:49 2006 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Mon Jul 10 15:25:24 2006 @@ -2976,9 +2976,12 @@ if (A == Op0 || B == Op0) // A | (A & ?) --> A return ReplaceInstUsesWith(I, Op0); - // (A | B) | C and A | (B | C) -> bswap if possible. + // (A | B) | C and A | (B | C) -> bswap if possible. + // (A >> B) | (C << D) and (A << B) | (B >> C) -> bswap if possible. if (match(Op0, m_Or(m_Value(), m_Value())) || - match(Op1, m_Or(m_Value(), m_Value()))) { + match(Op1, m_Or(m_Value(), m_Value())) || + (match(Op0, m_Shift(m_Value(), m_Value())) && + match(Op1, m_Shift(m_Value(), m_Value())))) { if (Instruction *BSwap = MatchBSwap(I)) return BSwap; } From lattner at cs.uiuc.edu Mon Jul 10 15:54:05 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 10 Jul 2006 15:54:05 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/PowerPC/bswap-load-store.ll Message-ID: <200607102054.PAA01449@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/PowerPC: bswap-load-store.ll added (r1.1) --- Log message: New testcase for folding bswaps into i16/i32 loads and stores. --- Diffs of the changes: (+42 -0) bswap-load-store.ll | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 42 insertions(+) Index: llvm/test/Regression/CodeGen/PowerPC/bswap-load-store.ll diff -c /dev/null llvm/test/Regression/CodeGen/PowerPC/bswap-load-store.ll:1.1 *** /dev/null Mon Jul 10 15:54:03 2006 --- llvm/test/Regression/CodeGen/PowerPC/bswap-load-store.ll Mon Jul 10 15:53:53 2006 *************** *** 0 **** --- 1,42 ---- + ; RUN: llvm-as < %s | llc -march=ppc32 | grep 'stwbrx\|lwbrx\|sthbrx\|lhbrx' | wc -l | grep 4 && + ; RUN: llvm-as < %s | llc -march=ppc32 | not grep rlwinm && + ; RUN: llvm-as < %s | llc -march=ppc32 | not grep rlwimi && + ; RUN: llvm-as < %s | llc -march=ppc64 | grep 'stwbrx\|lwbrx\|sthbrx\|lhbrx' | wc -l | grep 4 && + ; RUN: llvm-as < %s | llc -march=ppc64 | not grep rlwinm && + ; RUN: llvm-as < %s | llc -march=ppc64 | not grep rlwimi + + void %STWBRX(uint %i, sbyte* %ptr, int %off) { + %tmp1 = getelementptr sbyte* %ptr, int %off + %tmp1 = cast sbyte* %tmp1 to uint* + %tmp13 = tail call uint %llvm.bswap.i32(uint %i) + store uint %tmp13, uint* %tmp1 + ret void + } + + uint %LWBRX(sbyte* %ptr, int %off) { + %tmp1 = getelementptr sbyte* %ptr, int %off + %tmp1 = cast sbyte* %tmp1 to uint* + %tmp = load uint* %tmp1 + %tmp14 = tail call uint %llvm.bswap.i32( uint %tmp ) + ret uint %tmp14 + } + + void %STHBRX(ushort %s, sbyte* %ptr, int %off) { + %tmp1 = getelementptr sbyte* %ptr, int %off + %tmp1 = cast sbyte* %tmp1 to ushort* + %tmp5 = call ushort %llvm.bswap.i16( ushort %s ) + store ushort %tmp5, ushort* %tmp1 + ret void + } + + ushort %LHBRX(sbyte* %ptr, int %off) { + %tmp1 = getelementptr sbyte* %ptr, int %off + %tmp1 = cast sbyte* %tmp1 to ushort* + %tmp = load ushort* %tmp1 + %tmp6 = call ushort %llvm.bswap.i16(ushort %tmp) + ret ushort %tmp6 + } + + declare uint %llvm.bswap.i32(uint) + + declare ushort %llvm.bswap.i16(ushort) From lattner at cs.uiuc.edu Mon Jul 10 15:57:12 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 10 Jul 2006 15:57:12 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/README.txt PPCInstrInfo.td PPCISelLowering.cpp PPCISelLowering.h PPCHazardRecognizers.cpp Message-ID: <200607102057.PAA01632@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: README.txt updated: 1.92 -> 1.93 PPCInstrInfo.td updated: 1.237 -> 1.238 PPCISelLowering.cpp updated: 1.197 -> 1.198 PPCISelLowering.h updated: 1.50 -> 1.51 PPCHazardRecognizers.cpp updated: 1.12 -> 1.13 --- Log message: Implement Regression/CodeGen/PowerPC/bswap-load-store.ll by folding bswaps into i16/i32 load/stores. --- Diffs of the changes: (+103 -6) PPCHazardRecognizers.cpp | 4 +++ PPCISelLowering.cpp | 59 +++++++++++++++++++++++++++++++++++++++++++++++ PPCISelLowering.h | 14 ++++++++++- PPCInstrInfo.td | 27 +++++++++++++++++++++ README.txt | 5 --- 5 files changed, 103 insertions(+), 6 deletions(-) Index: llvm/lib/Target/PowerPC/README.txt diff -u llvm/lib/Target/PowerPC/README.txt:1.92 llvm/lib/Target/PowerPC/README.txt:1.93 --- llvm/lib/Target/PowerPC/README.txt:1.92 Wed May 17 14:02:25 2006 +++ llvm/lib/Target/PowerPC/README.txt Mon Jul 10 15:56:58 2006 @@ -3,7 +3,6 @@ TODO: * gpr0 allocation * implement do-loop -> bdnz transform -* implement powerpc-64 for darwin ===-------------------------------------------------------------------------=== @@ -238,10 +237,6 @@ ===-------------------------------------------------------------------------=== -Generate lwbrx and other byteswapping load/store instructions when reasonable. - -===-------------------------------------------------------------------------=== - Compile this: int foo(int a) { Index: llvm/lib/Target/PowerPC/PPCInstrInfo.td diff -u llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.237 llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.238 --- llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.237 Tue Jun 27 13:36:44 2006 +++ llvm/lib/Target/PowerPC/PPCInstrInfo.td Mon Jul 10 15:56:58 2006 @@ -37,6 +37,13 @@ SDTCisVT<1, i32>, SDTCisVT<2, OtherVT> ]>; +def SDT_PPClbrx : SDTypeProfile<1, 3, [ + SDTCisVT<0, i32>, SDTCisPtrTy<1>, SDTCisVT<2, OtherVT>, SDTCisVT<3, OtherVT> +]>; +def SDT_PPCstbrx : SDTypeProfile<0, 4, [ + SDTCisVT<0, i32>, SDTCisPtrTy<1>, SDTCisVT<2, OtherVT>, SDTCisVT<3, OtherVT> +]>; + //===----------------------------------------------------------------------===// // PowerPC specific DAG Nodes. // @@ -88,6 +95,9 @@ def PPCcondbranch : SDNode<"PPCISD::COND_BRANCH", SDT_PPCcondbr, [SDNPHasChain, SDNPOptInFlag]>; +def PPClbrx : SDNode<"PPCISD::LBRX", SDT_PPClbrx, [SDNPHasChain]>; +def PPCstbrx : SDNode<"PPCISD::STBRX", SDT_PPCstbrx, [SDNPHasChain]>; + //===----------------------------------------------------------------------===// // PowerPC specific transformation functions and pattern fragments. // @@ -464,6 +474,15 @@ def LWZX : XForm_1<31, 23, (ops GPRC:$rD, memrr:$src), "lwzx $rD, $src", LdStGeneral, [(set GPRC:$rD, (load xaddr:$src))]>; + + +def LHBRX : XForm_1<31, 790, (ops GPRC:$rD, memrr:$src), + "lhbrx $rD, $src", LdStGeneral, + [(set GPRC:$rD, (PPClbrx xaddr:$src,srcvalue:$dummy, i16))]>; +def LWBRX : XForm_1<31, 534, (ops GPRC:$rD, memrr:$src), + "lwbrx $rD, $src", LdStGeneral, + [(set GPRC:$rD, (PPClbrx xaddr:$src,srcvalue:$dummy, i32))]>; + } let PPC970_Unit = 1 in { // FXU Operations. @@ -517,6 +536,14 @@ def STWUX : XForm_8<31, 183, (ops GPRC:$rS, GPRC:$rA, GPRC:$rB), "stwux $rS, $rA, $rB", LdStGeneral, []>; +def STHBRX: XForm_8<31, 918, (ops GPRC:$rS, memrr:$dst), + "sthbrx $rS, $dst", LdStGeneral, + [(PPCstbrx GPRC:$rS, xaddr:$dst, srcvalue:$dummy, i16)]>, + PPC970_DGroup_Cracked; +def STWBRX: XForm_8<31, 662, (ops GPRC:$rS, memrr:$dst), + "stwbrx $rS, $dst", LdStGeneral, + [(PPCstbrx GPRC:$rS, xaddr:$dst, srcvalue:$dummy, i32)]>, + PPC970_DGroup_Cracked; } let PPC970_Unit = 1 in { // FXU Operations. def SRAWI : XForm_10<31, 824, (ops GPRC:$rA, GPRC:$rS, u5imm:$SH), Index: llvm/lib/Target/PowerPC/PPCISelLowering.cpp diff -u llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.197 llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.198 --- llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.197 Tue Jun 27 15:14:52 2006 +++ llvm/lib/Target/PowerPC/PPCISelLowering.cpp Mon Jul 10 15:56:58 2006 @@ -266,6 +266,7 @@ setTargetDAGCombine(ISD::SINT_TO_FP); setTargetDAGCombine(ISD::STORE); setTargetDAGCombine(ISD::BR_CC); + setTargetDAGCombine(ISD::BSWAP); computeRegisterProperties(); } @@ -296,6 +297,8 @@ case PPCISD::MFCR: return "PPCISD::MFCR"; case PPCISD::VCMP: return "PPCISD::VCMP"; case PPCISD::VCMPo: return "PPCISD::VCMPo"; + case PPCISD::LBRX: return "PPCISD::LBRX"; + case PPCISD::STBRX: return "PPCISD::STBRX"; case PPCISD::COND_BRANCH: return "PPCISD::COND_BRANCH"; } } @@ -2344,6 +2347,56 @@ DCI.AddToWorklist(Val.Val); return Val; } + + // Turn STORE (BSWAP) -> sthbrx/stwbrx. + if (N->getOperand(1).getOpcode() == ISD::BSWAP && + N->getOperand(1).Val->hasOneUse() && + (N->getOperand(1).getValueType() == MVT::i32 || + N->getOperand(1).getValueType() == MVT::i16)) { + SDOperand BSwapOp = N->getOperand(1).getOperand(0); + // Do an any-extend to 32-bits if this is a half-word input. + if (BSwapOp.getValueType() == MVT::i16) + BSwapOp = DAG.getNode(ISD::ANY_EXTEND, MVT::i32, BSwapOp); + + return DAG.getNode(PPCISD::STBRX, MVT::Other, N->getOperand(0), BSwapOp, + N->getOperand(2), N->getOperand(3), + DAG.getValueType(N->getOperand(1).getValueType())); + } + break; + case ISD::BSWAP: + // Turn BSWAP (LOAD) -> lhbrx/lwbrx. + if (N->getOperand(0).getOpcode() == ISD::LOAD && + N->getOperand(0).hasOneUse() && + (N->getValueType(0) == MVT::i32 || N->getValueType(0) == MVT::i16)) { + SDOperand Load = N->getOperand(0); + // Create the byte-swapping load. + std::vector VTs; + VTs.push_back(MVT::i32); + VTs.push_back(MVT::Other); + std::vector Ops; + Ops.push_back(Load.getOperand(0)); // Chain + Ops.push_back(Load.getOperand(1)); // Ptr + Ops.push_back(Load.getOperand(2)); // SrcValue + Ops.push_back(DAG.getValueType(N->getValueType(0))); // VT + SDOperand BSLoad = DAG.getNode(PPCISD::LBRX, VTs, Ops); + + // If this is an i16 load, insert the truncate. + SDOperand ResVal = BSLoad; + if (N->getValueType(0) == MVT::i16) + ResVal = DAG.getNode(ISD::TRUNCATE, MVT::i16, BSLoad); + + // First, combine the bswap away. This makes the value produced by the + // load dead. + DCI.CombineTo(N, ResVal); + + // Next, combine the load away, we give it a bogus result value but a real + // chain result. The result value is dead because the bswap is dead. + DCI.CombineTo(Load.Val, ResVal, BSLoad.getValue(1)); + + // Return N so it doesn't get rechecked! + return SDOperand(N, 0); + } + break; case PPCISD::VCMP: { // If a VCMPo node already exists with exactly the same operands as this @@ -2477,6 +2530,12 @@ KnownOne = 0; switch (Op.getOpcode()) { default: break; + case PPCISD::LBRX: { + // lhbrx is known to have the top bits cleared out. + if (cast(Op.getOperand(3))->getVT() == MVT::i16) + KnownZero = 0xFFFF0000; + break; + } case ISD::INTRINSIC_WO_CHAIN: { switch (cast(Op.getOperand(0))->getValue()) { default: break; Index: llvm/lib/Target/PowerPC/PPCISelLowering.h diff -u llvm/lib/Target/PowerPC/PPCISelLowering.h:1.50 llvm/lib/Target/PowerPC/PPCISelLowering.h:1.51 --- llvm/lib/Target/PowerPC/PPCISelLowering.h:1.50 Wed May 17 14:00:46 2006 +++ llvm/lib/Target/PowerPC/PPCISelLowering.h Mon Jul 10 15:56:58 2006 @@ -111,7 +111,19 @@ /// condition register to branch on, OPC is the branch opcode to use (e.g. /// PPC::BLE), DESTBB is the destination block to branch to, and INFLAG is /// an optional input flag argument. - COND_BRANCH + COND_BRANCH, + + /// CHAIN = STBRX CHAIN, GPRC, Ptr, SRCVALUE, Type - This is a + /// byte-swapping store instruction. It byte-swaps the low "Type" bits of + /// the GPRC input, then stores it through Ptr. Type can be either i16 or + /// i32. + STBRX, + + /// GPRC, CHAIN = LBRX CHAIN, Ptr, SRCVALUE, Type - This is a + /// byte-swapping load instruction. It loads "Type" bits, byte swaps it, + /// then puts it in the bottom bits of the GPRC. TYPE can be either i16 + /// or i32. + LBRX }; } Index: llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp diff -u llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp:1.12 llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp:1.13 --- llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp:1.12 Tue Mar 21 23:30:33 2006 +++ llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp Mon Jul 10 15:56:58 2006 @@ -178,6 +178,7 @@ case PPC::LHZ: case PPC::LHZX: case PPC::LVEHX: + case PPC::LHBRX: LoadSize = 2; break; case PPC::LFS: @@ -188,6 +189,7 @@ case PPC::LWA: case PPC::LWAX: case PPC::LVEWX: + case PPC::LWBRX: LoadSize = 4; break; case PPC::LFD: @@ -233,6 +235,7 @@ case PPC::STHX: case PPC::STH: case PPC::STVEHX: + case PPC::STHBRX: ThisStoreSize = 2; break; case PPC::STFS: @@ -243,6 +246,7 @@ case PPC::STW: case PPC::STVEWX: case PPC::STFIWX: + case PPC::STWBRX: ThisStoreSize = 4; break; case PPC::STD_32: From evan.cheng at apple.com Mon Jul 10 16:37:56 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 10 Jul 2006 16:37:56 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp Message-ID: <200607102137.QAA11665@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ISelLowering.cpp updated: 1.234 -> 1.235 --- Log message: Fixed stack objects do not specify alignments, but their offsets are known. Use that information when doing the transformation to merge multiple loads into a 128-bit load. --- Diffs of the changes: (+12 -5) X86ISelLowering.cpp | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-) Index: llvm/lib/Target/X86/X86ISelLowering.cpp diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.234 llvm/lib/Target/X86/X86ISelLowering.cpp:1.235 --- llvm/lib/Target/X86/X86ISelLowering.cpp:1.234 Mon Jul 10 14:53:12 2006 +++ llvm/lib/Target/X86/X86ISelLowering.cpp Mon Jul 10 16:37:44 2006 @@ -4056,7 +4056,8 @@ return false; } -static bool isBaseAlignment16(SDNode *Base, MachineFrameInfo *MFI) { +static bool isBaseAlignment16(SDNode *Base, MachineFrameInfo *MFI, + const X86Subtarget *Subtarget) { GlobalValue *GV; int64_t Offset; if (isGAPlusOffset(Base, GV, Offset)) @@ -4064,7 +4065,12 @@ else { assert(Base->getOpcode() == ISD::FrameIndex && "Unexpected base node!"); int BFI = dyn_cast(Base)->getIndex(); - return MFI->getObjectAlignment(BFI) >= 16; + if (BFI < 0) + // Fixed objects do not specify alignment, however the offsets are known. + return ((Subtarget->getStackAlignment() % 16) == 0 && + (MFI->getObjectOffset(BFI) % 16) == 0); + else + return MFI->getObjectAlignment(BFI) >= 16; } return false; } @@ -4074,7 +4080,8 @@ /// build_vector load1, load2, load3, load4, <0, 1, 2, 3> into a 128-bit load /// if the load addresses are consecutive, non-overlapping, and in the right /// order. -static SDOperand PerformShuffleCombine(SDNode *N, SelectionDAG &DAG) { +static SDOperand PerformShuffleCombine(SDNode *N, SelectionDAG &DAG, + const X86Subtarget *Subtarget) { MachineFunction &MF = DAG.getMachineFunction(); MachineFrameInfo *MFI = MF.getFrameInfo(); MVT::ValueType VT = N->getValueType(0); @@ -4099,7 +4106,7 @@ } } - bool isAlign16 = isBaseAlignment16(Base->getOperand(1).Val, MFI); + bool isAlign16 = isBaseAlignment16(Base->getOperand(1).Val, MFI, Subtarget); if (isAlign16) return DAG.getLoad(VT, Base->getOperand(0), Base->getOperand(1), Base->getOperand(2)); @@ -4118,7 +4125,7 @@ switch (N->getOpcode()) { default: break; case ISD::VECTOR_SHUFFLE: - return PerformShuffleCombine(N, DAG); + return PerformShuffleCombine(N, DAG, Subtarget); } return SDOperand(); From evan.cheng at apple.com Mon Jul 10 16:42:28 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 10 Jul 2006 16:42:28 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/README-SSE.txt Message-ID: <200607102142.QAA12701@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: README-SSE.txt updated: 1.3 -> 1.4 --- Log message: New entry. --- Diffs of the changes: (+3 -0) README-SSE.txt | 3 +++ 1 files changed, 3 insertions(+) Index: llvm/lib/Target/X86/README-SSE.txt diff -u llvm/lib/Target/X86/README-SSE.txt:1.3 llvm/lib/Target/X86/README-SSE.txt:1.4 --- llvm/lib/Target/X86/README-SSE.txt:1.3 Wed Jun 14 16:26:18 2006 +++ llvm/lib/Target/X86/README-SSE.txt Mon Jul 10 16:42:16 2006 @@ -693,3 +693,6 @@ } //===---------------------------------------------------------------------===// + +Apply the same transformation that merged four float into a single 128-bit load +to loads from constant pool. From evan.cheng at apple.com Mon Jul 10 16:49:22 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 10 Jul 2006 16:49:22 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/X86/vec_shuffle-6.ll Message-ID: <200607102149.QAA13414@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/X86: vec_shuffle-6.ll updated: 1.1 -> 1.2 --- Log message: Update. --- Diffs of the changes: (+13 -3) vec_shuffle-6.ll | 16 +++++++++++++--- 1 files changed, 13 insertions(+), 3 deletions(-) Index: llvm/test/Regression/CodeGen/X86/vec_shuffle-6.ll diff -u llvm/test/Regression/CodeGen/X86/vec_shuffle-6.ll:1.1 llvm/test/Regression/CodeGen/X86/vec_shuffle-6.ll:1.2 --- llvm/test/Regression/CodeGen/X86/vec_shuffle-6.ll:1.1 Fri Jul 7 12:54:24 2006 +++ llvm/test/Regression/CodeGen/X86/vec_shuffle-6.ll Mon Jul 10 16:49:09 2006 @@ -1,4 +1,6 @@ -; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movups | wc -l | grep 3 +; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movapd | wc -l | grep 1 +; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movaps | wc -l | grep 1 +; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movups | wc -l | grep 2 %x = global [4 x int] [ int 1, int 2, int 3, int 4 ] @@ -15,7 +17,7 @@ ret <2 x long> %tmp16 } -<4 x float> %test2(float %a, float %b, float %c, float %d) { +<4 x float> %test2(int %dummy, float %a, float %b, float %c, float %d) { %tmp = insertelement <4 x float> undef, float %a, uint 0 %tmp11 = insertelement <4 x float> %tmp, float %b, uint 1 %tmp12 = insertelement <4 x float> %tmp11, float %c, uint 2 @@ -23,7 +25,15 @@ ret <4 x float> %tmp13 } -<2 x double> %test3(double %a, double %b) { +<4 x float> %test3(float %a, float %b, float %c, float %d) { + %tmp = insertelement <4 x float> undef, float %a, uint 0 + %tmp11 = insertelement <4 x float> %tmp, float %b, uint 1 + %tmp12 = insertelement <4 x float> %tmp11, float %c, uint 2 + %tmp13 = insertelement <4 x float> %tmp12, float %d, uint 3 + ret <4 x float> %tmp13 +} + +<2 x double> %test4(double %a, double %b) { %tmp = insertelement <2 x double> undef, double %a, uint 0 %tmp7 = insertelement <2 x double> %tmp, double %b, uint 1 ret <2 x double> %tmp7 From resistor at mac.com Mon Jul 10 17:03:31 2006 From: resistor at mac.com (Owen Anderson) Date: Mon, 10 Jul 2006 17:03:31 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200607102203.RAA15784@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.496 -> 1.497 --- Log message: Don't indent the entire function. --- Diffs of the changes: (+48 -49) InstructionCombining.cpp | 97 +++++++++++++++++++++++------------------------ 1 files changed, 48 insertions(+), 49 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.496 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.497 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.496 Mon Jul 10 15:25:24 2006 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Mon Jul 10 17:03:18 2006 @@ -6255,59 +6255,58 @@ // PHINode simplification // Instruction *InstCombiner::visitPHINode(PHINode &PN) { - // If LCSSA is around, don't nuke PHIs. - if (!mustPreserveAnalysisID(LCSSAID)) { - if (Value *V = PN.hasConstantValue()) - return ReplaceInstUsesWith(PN, V); - - // If the only user of this instruction is a cast instruction, and all of - //the incoming values are constants, change this PHI to merge together the - // casted constants. - if (PN.hasOneUse()) - if (CastInst *CI = dyn_cast(PN.use_back())) - if (CI->getType() != PN.getType()) { // noop casts will be folded - bool AllConstant = true; - for (unsigned i = 0, e = PN.getNumIncomingValues(); i != e; ++i) - if (!isa(PN.getIncomingValue(i))) { - AllConstant = false; - break; - } - if (AllConstant) { - // Make a new PHI with all casted values. - PHINode *New = new PHINode(CI->getType(), PN.getName(), &PN); - for (unsigned i = 0, e = PN.getNumIncomingValues(); i != e; ++i) { - Constant *OldArg = cast(PN.getIncomingValue(i)); - New->addIncoming(ConstantExpr::getCast(OldArg, New->getType()), - PN.getIncomingBlock(i)); - } + if (mustPreservePassID(LCSSAID)) return 0; + + if (Value *V = PN.hasConstantValue()) + return ReplaceInstUsesWith(PN, V); - // Update the cast instruction. - CI->setOperand(0, New); - WorkList.push_back(CI); // revisit the cast instruction to fold. - WorkList.push_back(New); // Make sure to revisit the new Phi - return &PN; // PN is now dead! + // If the only user of this instruction is a cast instruction, and all of the + // incoming values are constants, change this PHI to merge together the casted + // constants. + if (PN.hasOneUse()) + if (CastInst *CI = dyn_cast(PN.use_back())) + if (CI->getType() != PN.getType()) { // noop casts will be folded + bool AllConstant = true; + for (unsigned i = 0, e = PN.getNumIncomingValues(); i != e; ++i) + if (!isa(PN.getIncomingValue(i))) { + AllConstant = false; + break; + } + if (AllConstant) { + // Make a new PHI with all casted values. + PHINode *New = new PHINode(CI->getType(), PN.getName(), &PN); + for (unsigned i = 0, e = PN.getNumIncomingValues(); i != e; ++i) { + Constant *OldArg = cast(PN.getIncomingValue(i)); + New->addIncoming(ConstantExpr::getCast(OldArg, New->getType()), + PN.getIncomingBlock(i)); } - } - // If all PHI operands are the same operation, pull them through the PHI, - // reducing code size. - if (isa(PN.getIncomingValue(0)) && - PN.getIncomingValue(0)->hasOneUse()) - if (Instruction *Result = FoldPHIArgOpIntoPHI(PN)) - return Result; - - // If this is a trivial cycle in the PHI node graph, remove it. Basically, - // if this PHI only has a single use (a PHI), and if that PHI only has one - // use (a PHI)... break the cycle. - if (PN.hasOneUse()) - if (PHINode *PU = dyn_cast(PN.use_back())) { - std::set PotentiallyDeadPHIs; - PotentiallyDeadPHIs.insert(&PN); - if (DeadPHICycle(PU, PotentiallyDeadPHIs)) - return ReplaceInstUsesWith(PN, UndefValue::get(PN.getType())); + // Update the cast instruction. + CI->setOperand(0, New); + WorkList.push_back(CI); // revisit the cast instruction to fold. + WorkList.push_back(New); // Make sure to revisit the new Phi + return &PN; // PN is now dead! + } } - } - + + // If all PHI operands are the same operation, pull them through the PHI, + // reducing code size. + if (isa(PN.getIncomingValue(0)) && + PN.getIncomingValue(0)->hasOneUse()) + if (Instruction *Result = FoldPHIArgOpIntoPHI(PN)) + return Result; + + // If this is a trivial cycle in the PHI node graph, remove it. Basically, if + // this PHI only has a single use (a PHI), and if that PHI only has one use (a + // PHI)... break the cycle. + if (PN.hasOneUse()) + if (PHINode *PU = dyn_cast(PN.use_back())) { + std::set PotentiallyDeadPHIs; + PotentiallyDeadPHIs.insert(&PN); + if (DeadPHICycle(PU, PotentiallyDeadPHIs)) + return ReplaceInstUsesWith(PN, UndefValue::get(PN.getType())); + } + return 0; } From resistor at mac.com Mon Jul 10 17:15:37 2006 From: resistor at mac.com (Owen Anderson) Date: Mon, 10 Jul 2006 17:15:37 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200607102215.RAA16312@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.497 -> 1.498 --- Log message: Add a comment, and fix a typo that broke the build. --- Diffs of the changes: (+2 -1) InstructionCombining.cpp | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.497 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.498 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.497 Mon Jul 10 17:03:18 2006 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Mon Jul 10 17:15:25 2006 @@ -6255,7 +6255,8 @@ // PHINode simplification // Instruction *InstCombiner::visitPHINode(PHINode &PN) { - if (mustPreservePassID(LCSSAID)) return 0; + // If LCSSA is around, don't mess with Phi nodes + if (mustPreserveAnalysisID(LCSSAID)) return 0; if (Value *V = PN.hasConstantValue()) return ReplaceInstUsesWith(PN, V); From pjenkins at apple.com Mon Jul 10 17:25:45 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Mon, 10 Jul 2006 17:25:45 -0500 Subject: [llvm-commits] CVS: nightlytest-serverside/NightlyTestAccept.cgi Message-ID: <200607102225.RAA16449@zion.cs.uiuc.edu> Changes in directory nightlytest-serverside: NightlyTestAccept.cgi updated: 1.10 -> 1.11 --- Log message: Hopefully fixed the code that creates a file of the buildlog for each nightly test --- Diffs of the changes: (+9 -7) NightlyTestAccept.cgi | 16 +++++++++------- 1 files changed, 9 insertions(+), 7 deletions(-) Index: nightlytest-serverside/NightlyTestAccept.cgi diff -u nightlytest-serverside/NightlyTestAccept.cgi:1.10 nightlytest-serverside/NightlyTestAccept.cgi:1.11 --- nightlytest-serverside/NightlyTestAccept.cgi:1.10 Fri Jul 7 13:36:01 2006 +++ nightlytest-serverside/NightlyTestAccept.cgi Mon Jul 10 17:25:32 2006 @@ -451,15 +451,17 @@ # writing logs to directory # ###################################################################################################### +$curr=`pwd`; +chomp($curr); + if(! -d "machines"){ - mkdir "machines", 0777 or print("couldnt create directory $base"); -} -ChangeDir("machines", "Moving into machines directory"); + mkdir "$curr/machines", 0777 or print("couldnt create directory $base"); + } +ChangeDir("$curr/machines", "Moving into machines directory"); if(! -d "$machine_id"){ - mkdir "$machine_id", 0777 or print("couldnt create directory $machine_id because $!"); -} -ChangeDir("$machine_id", "Moving into machine $machine_id 's directory"); - + mkdir "$curr/machines/$machine_id", 0777 or print("couldnt create directory $machine_id because $!"); + } +ChangeDir("$curr/machines/$machine_id", "Moving into machine $machine_id 's directory"); $db_date =~ s/ /\_/g; my $build_file = "$db_date-Build-Log.txt"; From lattner at cs.uiuc.edu Mon Jul 10 19:48:36 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 10 Jul 2006 19:48:36 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCInstrInfo.cpp PPCRegisterInfo.cpp PPCRegisterInfo.h Message-ID: <200607110048.TAA19912@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCInstrInfo.cpp updated: 1.22 -> 1.23 PPCRegisterInfo.cpp updated: 1.71 -> 1.72 PPCRegisterInfo.h updated: 1.15 -> 1.16 --- Log message: In 64-bit mode, 64-bit GPRs are callee saved, not 32-bit ones. --- Diffs of the changes: (+99 -62) PPCInstrInfo.cpp | 3 - PPCRegisterInfo.cpp | 153 +++++++++++++++++++++++++++++++--------------------- PPCRegisterInfo.h | 5 + 3 files changed, 99 insertions(+), 62 deletions(-) Index: llvm/lib/Target/PowerPC/PPCInstrInfo.cpp diff -u llvm/lib/Target/PowerPC/PPCInstrInfo.cpp:1.22 llvm/lib/Target/PowerPC/PPCInstrInfo.cpp:1.23 --- llvm/lib/Target/PowerPC/PPCInstrInfo.cpp:1.22 Tue Jun 20 18:18:58 2006 +++ llvm/lib/Target/PowerPC/PPCInstrInfo.cpp Mon Jul 10 19:48:23 2006 @@ -19,7 +19,8 @@ using namespace llvm; PPCInstrInfo::PPCInstrInfo(PPCTargetMachine &tm) - : TargetInstrInfo(PPCInsts, sizeof(PPCInsts)/sizeof(PPCInsts[0])), TM(tm) {} + : TargetInstrInfo(PPCInsts, sizeof(PPCInsts)/sizeof(PPCInsts[0])), TM(tm), + RI(*TM.getSubtargetImpl()) {} /// getPointerRegClass - Return the register class to use to hold pointers. /// This is used for addressing modes. Index: llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp diff -u llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.71 llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.72 --- llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.71 Tue Jun 27 13:55:49 2006 +++ llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp Mon Jul 10 19:48:23 2006 @@ -15,6 +15,7 @@ #include "PPC.h" #include "PPCInstrBuilder.h" #include "PPCRegisterInfo.h" +#include "PPCSubtarget.h" #include "llvm/Constants.h" #include "llvm/Type.h" #include "llvm/CodeGen/ValueTypes.h" @@ -78,8 +79,9 @@ } } -PPCRegisterInfo::PPCRegisterInfo() - : PPCGenRegisterInfo(PPC::ADJCALLSTACKDOWN, PPC::ADJCALLSTACKUP) { +PPCRegisterInfo::PPCRegisterInfo(const PPCSubtarget &ST) + : PPCGenRegisterInfo(PPC::ADJCALLSTACKDOWN, PPC::ADJCALLSTACKUP), + Subtarget(ST) { ImmToIdxMap[PPC::LD] = PPC::LDX; ImmToIdxMap[PPC::STD] = PPC::STDX; ImmToIdxMap[PPC::LBZ] = PPC::LBZX; ImmToIdxMap[PPC::STB] = PPC::STBX; ImmToIdxMap[PPC::LHZ] = PPC::LHZX; ImmToIdxMap[PPC::LHA] = PPC::LHAX; @@ -207,70 +209,103 @@ } const unsigned* PPCRegisterInfo::getCalleeSaveRegs() const { - static const unsigned CalleeSaveRegs[] = { - PPC::R1, PPC::R13, - PPC::R14, PPC::R15, - PPC::R16, PPC::R17, - PPC::R18, PPC::R19, - PPC::R20, PPC::R21, - PPC::R22, PPC::R23, - PPC::R24, PPC::R25, - PPC::R26, PPC::R27, - PPC::R28, PPC::R29, - PPC::R30, PPC::R31, - PPC::F14, PPC::F15, - PPC::F16, PPC::F17, - PPC::F18, PPC::F19, - PPC::F20, PPC::F21, - PPC::F22, PPC::F23, - PPC::F24, PPC::F25, - PPC::F26, PPC::F27, - PPC::F28, PPC::F29, + // 32-bit Darwin calling convention. + static const unsigned Darwin32_CalleeSaveRegs[] = { + PPC::R1 , PPC::R13, PPC::R14, PPC::R15, + PPC::R16, PPC::R17, PPC::R18, PPC::R19, + PPC::R20, PPC::R21, PPC::R22, PPC::R23, + PPC::R24, PPC::R25, PPC::R26, PPC::R27, + PPC::R28, PPC::R29, PPC::R30, PPC::R31, + + PPC::F14, PPC::F15, PPC::F16, PPC::F17, + PPC::F18, PPC::F19, PPC::F20, PPC::F21, + PPC::F22, PPC::F23, PPC::F24, PPC::F25, + PPC::F26, PPC::F27, PPC::F28, PPC::F29, PPC::F30, PPC::F31, - PPC::CR2, PPC::CR3, - PPC::CR4, PPC::V20, - PPC::V21, PPC::V22, - PPC::V23, PPC::V24, - PPC::V25, PPC::V26, - PPC::V27, PPC::V28, - PPC::V29, PPC::V30, - PPC::V31, PPC::LR, 0 + + PPC::CR2, PPC::CR3, PPC::CR4, + PPC::V20, PPC::V21, PPC::V22, PPC::V23, + PPC::V24, PPC::V25, PPC::V26, PPC::V27, + PPC::V28, PPC::V29, PPC::V30, PPC::V31, + + PPC::LR, 0 }; - return CalleeSaveRegs; + // 64-bit Darwin calling convention. + static const unsigned Darwin64_CalleeSaveRegs[] = { + PPC::X1 , PPC::X13, PPC::X14, PPC::X15, + PPC::X16, PPC::X17, PPC::X18, PPC::X19, + PPC::X20, PPC::X21, PPC::X22, PPC::X23, + PPC::X24, PPC::X25, PPC::X26, PPC::X27, + PPC::X28, PPC::X29, PPC::X30, PPC::X31, + + PPC::F14, PPC::F15, PPC::F16, PPC::F17, + PPC::F18, PPC::F19, PPC::F20, PPC::F21, + PPC::F22, PPC::F23, PPC::F24, PPC::F25, + PPC::F26, PPC::F27, PPC::F28, PPC::F29, + PPC::F30, PPC::F31, + + PPC::CR2, PPC::CR3, PPC::CR4, + PPC::V20, PPC::V21, PPC::V22, PPC::V23, + PPC::V24, PPC::V25, PPC::V26, PPC::V27, + PPC::V28, PPC::V29, PPC::V30, PPC::V31, + + PPC::LR, 0 + }; + + return Subtarget.isPPC64() ? Darwin64_CalleeSaveRegs : + Darwin32_CalleeSaveRegs; } const TargetRegisterClass* const* PPCRegisterInfo::getCalleeSaveRegClasses() const { - static const TargetRegisterClass * const CalleeSaveRegClasses[] = { - &PPC::GPRCRegClass, &PPC::GPRCRegClass, - &PPC::GPRCRegClass, &PPC::GPRCRegClass, - &PPC::GPRCRegClass, &PPC::GPRCRegClass, - &PPC::GPRCRegClass, &PPC::GPRCRegClass, - &PPC::GPRCRegClass, &PPC::GPRCRegClass, - &PPC::GPRCRegClass, &PPC::GPRCRegClass, - &PPC::GPRCRegClass, &PPC::GPRCRegClass, - &PPC::GPRCRegClass, &PPC::GPRCRegClass, - &PPC::GPRCRegClass, &PPC::GPRCRegClass, - &PPC::GPRCRegClass, &PPC::GPRCRegClass, - &PPC::F8RCRegClass, &PPC::F8RCRegClass, - &PPC::F8RCRegClass, &PPC::F8RCRegClass, - &PPC::F8RCRegClass, &PPC::F8RCRegClass, - &PPC::F8RCRegClass, &PPC::F8RCRegClass, - &PPC::F8RCRegClass, &PPC::F8RCRegClass, - &PPC::F8RCRegClass, &PPC::F8RCRegClass, - &PPC::F8RCRegClass, &PPC::F8RCRegClass, - &PPC::F8RCRegClass, &PPC::F8RCRegClass, - &PPC::F8RCRegClass, &PPC::F8RCRegClass, - &PPC::CRRCRegClass, &PPC::CRRCRegClass, - &PPC::CRRCRegClass, &PPC::VRRCRegClass, - &PPC::VRRCRegClass, &PPC::VRRCRegClass, - &PPC::VRRCRegClass, &PPC::VRRCRegClass, - &PPC::VRRCRegClass, &PPC::VRRCRegClass, - &PPC::VRRCRegClass, &PPC::VRRCRegClass, - &PPC::VRRCRegClass, &PPC::VRRCRegClass, - &PPC::VRRCRegClass, &PPC::GPRCRegClass, 0 + // 32-bit Darwin calling convention. + static const TargetRegisterClass * const Darwin32_CalleeSaveRegClasses[] = { + &PPC::GPRCRegClass,&PPC::GPRCRegClass,&PPC::GPRCRegClass,&PPC::GPRCRegClass, + &PPC::GPRCRegClass,&PPC::GPRCRegClass,&PPC::GPRCRegClass,&PPC::GPRCRegClass, + &PPC::GPRCRegClass,&PPC::GPRCRegClass,&PPC::GPRCRegClass,&PPC::GPRCRegClass, + &PPC::GPRCRegClass,&PPC::GPRCRegClass,&PPC::GPRCRegClass,&PPC::GPRCRegClass, + &PPC::GPRCRegClass,&PPC::GPRCRegClass,&PPC::GPRCRegClass,&PPC::GPRCRegClass, + + &PPC::F8RCRegClass,&PPC::F8RCRegClass,&PPC::F8RCRegClass,&PPC::F8RCRegClass, + &PPC::F8RCRegClass,&PPC::F8RCRegClass,&PPC::F8RCRegClass,&PPC::F8RCRegClass, + &PPC::F8RCRegClass,&PPC::F8RCRegClass,&PPC::F8RCRegClass,&PPC::F8RCRegClass, + &PPC::F8RCRegClass,&PPC::F8RCRegClass,&PPC::F8RCRegClass,&PPC::F8RCRegClass, + &PPC::F8RCRegClass,&PPC::F8RCRegClass, + + &PPC::CRRCRegClass,&PPC::CRRCRegClass,&PPC::CRRCRegClass, + + &PPC::VRRCRegClass,&PPC::VRRCRegClass,&PPC::VRRCRegClass,&PPC::VRRCRegClass, + &PPC::VRRCRegClass,&PPC::VRRCRegClass,&PPC::VRRCRegClass,&PPC::VRRCRegClass, + &PPC::VRRCRegClass,&PPC::VRRCRegClass,&PPC::VRRCRegClass,&PPC::VRRCRegClass, + + &PPC::GPRCRegClass, 0 + }; + + // 64-bit Darwin calling convention. + static const TargetRegisterClass * const Darwin64_CalleeSaveRegClasses[] = { + &PPC::G8RCRegClass,&PPC::G8RCRegClass,&PPC::G8RCRegClass,&PPC::G8RCRegClass, + &PPC::G8RCRegClass,&PPC::G8RCRegClass,&PPC::G8RCRegClass,&PPC::G8RCRegClass, + &PPC::G8RCRegClass,&PPC::G8RCRegClass,&PPC::G8RCRegClass,&PPC::G8RCRegClass, + &PPC::G8RCRegClass,&PPC::G8RCRegClass,&PPC::G8RCRegClass,&PPC::G8RCRegClass, + &PPC::G8RCRegClass,&PPC::G8RCRegClass,&PPC::G8RCRegClass,&PPC::G8RCRegClass, + + &PPC::F8RCRegClass,&PPC::F8RCRegClass,&PPC::F8RCRegClass,&PPC::F8RCRegClass, + &PPC::F8RCRegClass,&PPC::F8RCRegClass,&PPC::F8RCRegClass,&PPC::F8RCRegClass, + &PPC::F8RCRegClass,&PPC::F8RCRegClass,&PPC::F8RCRegClass,&PPC::F8RCRegClass, + &PPC::F8RCRegClass,&PPC::F8RCRegClass,&PPC::F8RCRegClass,&PPC::F8RCRegClass, + &PPC::F8RCRegClass,&PPC::F8RCRegClass, + + &PPC::CRRCRegClass,&PPC::CRRCRegClass,&PPC::CRRCRegClass, + + &PPC::VRRCRegClass,&PPC::VRRCRegClass,&PPC::VRRCRegClass,&PPC::VRRCRegClass, + &PPC::VRRCRegClass,&PPC::VRRCRegClass,&PPC::VRRCRegClass,&PPC::VRRCRegClass, + &PPC::VRRCRegClass,&PPC::VRRCRegClass,&PPC::VRRCRegClass,&PPC::VRRCRegClass, + + &PPC::GPRCRegClass, 0 }; - return CalleeSaveRegClasses; + + return Subtarget.isPPC64() ? Darwin64_CalleeSaveRegClasses : + Darwin32_CalleeSaveRegClasses; } /// foldMemoryOperand - PowerPC (like most RISC's) can only fold spills into Index: llvm/lib/Target/PowerPC/PPCRegisterInfo.h diff -u llvm/lib/Target/PowerPC/PPCRegisterInfo.h:1.15 llvm/lib/Target/PowerPC/PPCRegisterInfo.h:1.16 --- llvm/lib/Target/PowerPC/PPCRegisterInfo.h:1.15 Wed May 17 19:12:25 2006 +++ llvm/lib/Target/PowerPC/PPCRegisterInfo.h Mon Jul 10 19:48:23 2006 @@ -19,13 +19,14 @@ #include namespace llvm { - +class PPCSubtarget; class Type; class PPCRegisterInfo : public PPCGenRegisterInfo { std::map ImmToIdxMap; + const PPCSubtarget &Subtarget; public: - PPCRegisterInfo(); + PPCRegisterInfo(const PPCSubtarget &SubTarget); /// getRegisterNumbering - Given the enum value for some register, e.g. /// PPC::F14, return the number that it corresponds to (e.g. 14). From jlaskey at apple.com Mon Jul 10 20:26:13 2006 From: jlaskey at apple.com (Jim Laskey) Date: Mon, 10 Jul 2006 20:26:13 -0500 Subject: [llvm-commits] CVS: llvm/utils/TableGen/CodeEmitterGen.cpp Message-ID: <200607110126.UAA30496@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: CodeEmitterGen.cpp updated: 1.44 -> 1.45 --- Log message: Reduce bloat in target libraries by removing per machine instruction assertion from code emitter generation. --- Diffs of the changes: (+1 -3) CodeEmitterGen.cpp | 4 +--- 1 files changed, 1 insertion(+), 3 deletions(-) Index: llvm/utils/TableGen/CodeEmitterGen.cpp diff -u llvm/utils/TableGen/CodeEmitterGen.cpp:1.44 llvm/utils/TableGen/CodeEmitterGen.cpp:1.45 --- llvm/utils/TableGen/CodeEmitterGen.cpp:1.44 Fri Mar 17 18:40:36 2006 +++ llvm/utils/TableGen/CodeEmitterGen.cpp Mon Jul 10 20:25:59 2006 @@ -82,7 +82,6 @@ o << "unsigned " << Target.getName() << "CodeEmitter::" << "getBinaryCodeForInstr(MachineInstr &MI) {\n" << " unsigned Value = 0;\n" - << " DEBUG(std::cerr << MI);\n" << " switch (MI.getOpcode()) {\n"; // Emit a case statement for each opcode @@ -91,8 +90,7 @@ Record *R = *I; if (R->getName() == "PHI" || R->getName() == "INLINEASM") continue; - o << " case " << Namespace << R->getName() << ": {\n" - << " DEBUG(std::cerr << \"Emitting " << R->getName() << "\\n\");\n"; + o << " case " << Namespace << R->getName() << ": {\n"; BitsInit *BI = R->getValueAsBitsInit("Inst"); From lattner at cs.uiuc.edu Mon Jul 10 20:39:42 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 10 Jul 2006 20:39:42 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/Alpha/2006-07-03-ASMFormalLowering.ll Message-ID: <200607110139.UAA03377@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/Alpha: 2006-07-03-ASMFormalLowering.ll updated: 1.2 -> 1.3 --- Log message: This is fixed --- Diffs of the changes: (+0 -1) 2006-07-03-ASMFormalLowering.ll | 1 - 1 files changed, 1 deletion(-) Index: llvm/test/Regression/CodeGen/Alpha/2006-07-03-ASMFormalLowering.ll diff -u llvm/test/Regression/CodeGen/Alpha/2006-07-03-ASMFormalLowering.ll:1.2 llvm/test/Regression/CodeGen/Alpha/2006-07-03-ASMFormalLowering.ll:1.3 --- llvm/test/Regression/CodeGen/Alpha/2006-07-03-ASMFormalLowering.ll:1.2 Thu Jul 6 23:43:24 2006 +++ llvm/test/Regression/CodeGen/Alpha/2006-07-03-ASMFormalLowering.ll Mon Jul 10 20:39:30 2006 @@ -1,5 +1,4 @@ ; RUN: llvm-as < %s | llc -march=alpha -; XFAIL: * target endian = little target pointersize = 64 From lattner at cs.uiuc.edu Mon Jul 10 20:40:21 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 10 Jul 2006 20:40:21 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Message-ID: <200607110140.UAA03430@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: LegalizeDAG.cpp updated: 1.380 -> 1.381 --- Log message: Fix CodeGen/Alpha/2006-07-03-ASMFormalLowering.ll and PR818: http://llvm.org/PR818 . --- Diffs of the changes: (+29 -12) LegalizeDAG.cpp | 41 +++++++++++++++++++++++++++++------------ 1 files changed, 29 insertions(+), 12 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.380 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.381 --- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.380 Wed Jun 28 16:58:30 2006 +++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Mon Jul 10 20:40:09 2006 @@ -1163,25 +1163,42 @@ AddLegalizedOperand(SDOperand(Node, 1), Tmp2); return Op.ResNo ? Tmp2 : Tmp1; } - case ISD::INLINEASM: - Tmp1 = LegalizeOp(Node->getOperand(0)); // Legalize Chain. - Tmp2 = Node->getOperand(Node->getNumOperands()-1); - if (Tmp2.getValueType() == MVT::Flag) // Legalize Flag if it exists. - Tmp2 = Tmp3 = SDOperand(0, 0); - else - Tmp3 = LegalizeOp(Tmp2); + case ISD::INLINEASM: { + std::vector Ops(Node->op_begin(), Node->op_end()); + bool Changed = false; + // Legalize all of the operands of the inline asm, in case they are nodes + // that need to be expanded or something. Note we skip the asm string and + // all of the TargetConstant flags. + SDOperand Op = LegalizeOp(Ops[0]); + Changed = Op != Ops[0]; + Ops[0] = Op; + + bool HasInFlag = Ops.back().getValueType() == MVT::Flag; + for (unsigned i = 2, e = Ops.size()-HasInFlag; i < e; ) { + unsigned NumVals = cast(Ops[i])->getValue() >> 3; + for (++i; NumVals; ++i, --NumVals) { + SDOperand Op = LegalizeOp(Ops[i]); + if (Op != Ops[i]) { + Changed = true; + Ops[i] = Op; + } + } + } + + if (HasInFlag) { + Op = LegalizeOp(Ops.back()); + Changed |= Op != Ops.back(); + Ops.back() = Op; + } - if (Tmp1 != Node->getOperand(0) || Tmp2 != Tmp3) { - std::vector Ops(Node->op_begin(), Node->op_end()); - Ops[0] = Tmp1; - if (Tmp3.Val) Ops.back() = Tmp3; + if (Changed) Result = DAG.UpdateNodeOperands(Result, Ops); - } // INLINE asm returns a chain and flag, make sure to add both to the map. AddLegalizedOperand(SDOperand(Node, 0), Result.getValue(0)); AddLegalizedOperand(SDOperand(Node, 1), Result.getValue(1)); return Result.getValue(Op.ResNo); + } case ISD::BR: Tmp1 = LegalizeOp(Node->getOperand(0)); // Legalize the chain. // Ensure that libcalls are emitted before a branch. From lattner at cs.uiuc.edu Mon Jul 10 21:52:50 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 10 Jul 2006 21:52:50 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/X86/2006-07-10-InlineAsmAConstraint.ll Message-ID: <200607110252.VAA23677@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/X86: 2006-07-10-InlineAsmAConstraint.ll added (r1.1) --- Log message: New testcase for PR825: http://llvm.org/PR825 . --- Diffs of the changes: (+7 -0) 2006-07-10-InlineAsmAConstraint.ll | 7 +++++++ 1 files changed, 7 insertions(+) Index: llvm/test/Regression/CodeGen/X86/2006-07-10-InlineAsmAConstraint.ll diff -c /dev/null llvm/test/Regression/CodeGen/X86/2006-07-10-InlineAsmAConstraint.ll:1.1 *** /dev/null Mon Jul 10 21:52:47 2006 --- llvm/test/Regression/CodeGen/X86/2006-07-10-InlineAsmAConstraint.ll Mon Jul 10 21:52:37 2006 *************** *** 0 **** --- 1,7 ---- + ; RUN: llvm-as < %s | llc -march=x86 + ; PR825 + + long %test() { + %tmp.i5 = call long asm sideeffect "rdtsc", "=A,~{dirflag},~{fpsr},~{flags}"( ) ; [#uses=0] + ret long %tmp.i5 + } From lattner at cs.uiuc.edu Mon Jul 10 21:54:16 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 10 Jul 2006 21:54:16 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp X86ISelLowering.h Message-ID: <200607110254.VAA24108@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ISelLowering.cpp updated: 1.235 -> 1.236 X86ISelLowering.h updated: 1.68 -> 1.69 --- Log message: Implement the inline asm 'A' constraint. This implements PR825: http://llvm.org/PR825 and CodeGen/X86/2006-07-10-InlineAsmAConstraint.ll --- Diffs of the changes: (+17 -1) X86ISelLowering.cpp | 16 +++++++++++++++- X86ISelLowering.h | 2 ++ 2 files changed, 17 insertions(+), 1 deletion(-) Index: llvm/lib/Target/X86/X86ISelLowering.cpp diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.235 llvm/lib/Target/X86/X86ISelLowering.cpp:1.236 --- llvm/lib/Target/X86/X86ISelLowering.cpp:1.235 Mon Jul 10 16:37:44 2006 +++ llvm/lib/Target/X86/X86ISelLowering.cpp Mon Jul 10 21:54:03 2006 @@ -4135,6 +4135,16 @@ // X86 Inline Assembly Support //===----------------------------------------------------------------------===// +/// getConstraintType - Given a constraint letter, return the type of +/// constraint it is for this target. +X86TargetLowering::ConstraintType +X86TargetLowering::getConstraintType(char ConstraintLetter) const { + switch (ConstraintLetter) { + case 'A': return C_RegisterClass; + default: return TargetLowering::getConstraintType(ConstraintLetter); + } +} + std::vector X86TargetLowering:: getRegClassForInlineAsmConstraint(const std::string &Constraint, MVT::ValueType VT) const { @@ -4142,7 +4152,11 @@ // FIXME: not handling fp-stack yet! // FIXME: not handling MMX registers yet ('y' constraint). switch (Constraint[0]) { // GCC X86 Constraint Letters - default: break; // Unknown constriant letter + default: break; // Unknown constraint letter + case 'A': // EAX/EDX + if (VT == MVT::i32 || VT == MVT::i64) + return make_vector(X86::EAX, X86::EDX, 0); + break; case 'r': // GENERAL_REGS case 'R': // LEGACY_REGS if (VT == MVT::i32) Index: llvm/lib/Target/X86/X86ISelLowering.h diff -u llvm/lib/Target/X86/X86ISelLowering.h:1.68 llvm/lib/Target/X86/X86ISelLowering.h:1.69 --- llvm/lib/Target/X86/X86ISelLowering.h:1.68 Fri Jul 7 03:33:52 2006 +++ llvm/lib/Target/X86/X86ISelLowering.h Mon Jul 10 21:54:03 2006 @@ -310,6 +310,8 @@ SDOperand getReturnAddressFrameIndex(SelectionDAG &DAG); + ConstraintType getConstraintType(char ConstraintLetter) const; + std::vector getRegClassForInlineAsmConstraint(const std::string &Constraint, MVT::ValueType VT) const; From resistor at mac.com Tue Jul 11 02:25:46 2006 From: resistor at mac.com (Owen Anderson) Date: Tue, 11 Jul 2006 02:25:46 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp Message-ID: <200607110725.CAA10519@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: IndVarSimplify.cpp updated: 1.84 -> 1.85 --- Log message: Revert my indvars changes because they were breaking things. Unfortunately this didn't start showing up until after the recent instcombine fixes. --- Diffs of the changes: (+15 -29) IndVarSimplify.cpp | 44 +++++++++++++++----------------------------- 1 files changed, 15 insertions(+), 29 deletions(-) Index: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp diff -u llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.84 llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.85 --- llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.84 Mon Jun 26 21:17:08 2006 +++ llvm/lib/Transforms/Scalar/IndVarSimplify.cpp Tue Jul 11 02:25:33 2006 @@ -325,8 +325,20 @@ for (Value::use_iterator UI = I->use_begin(), E = I->use_end(); UI != E; ++UI) { Instruction *User = cast(*UI); - if (!L->contains(User->getParent())) + if (!L->contains(User->getParent())) { + // If this is a PHI node in the exit block and we're inserting, + // into the exit block, it must have a single entry. In this + // case, we can't insert the code after the PHI and have the PHI + // still use it. Instead, don't insert the the PHI. + if (PHINode *PN = dyn_cast(User)) { + // FIXME: This is a case where LCSSA pessimizes code, this + // should be fixed better. + if (PN->getNumOperands() == 2 && + PN->getParent() == BlockToInsertInto) + continue; + } ExtraLoopUsers.push_back(User); + } } if (!ExtraLoopUsers.empty()) { @@ -346,34 +358,8 @@ // Rewrite any users of the computed value outside of the loop // with the newly computed value. - for (unsigned i = 0, e = ExtraLoopUsers.size(); i != e; ++i) { - PHINode* PN = dyn_cast(ExtraLoopUsers[i]); - if (PN && PN->getParent() == BlockToInsertInto) { - // We're dealing with an LCSSA Phi. Handle it specially. - Instruction* LCSSAInsertPt = BlockToInsertInto->begin(); - - Instruction* NewInstr = dyn_cast(NewVal); - if (Instruction* NewInstr = dyn_cast(NewVal)) - for (unsigned j = 0; j < NewInstr->getNumOperands(); ++j){ - Instruction* PredI = - dyn_cast(NewInstr->getOperand(j)); - if (PredI && L->contains(PredI->getParent())) { - PHINode* NewLCSSA = new PHINode(PredI->getType(), - PredI->getName() + ".lcssa", - LCSSAInsertPt); - NewLCSSA->addIncoming(PredI, - BlockToInsertInto->getSinglePredecessor()); - - NewInstr->replaceUsesOfWith(PredI, NewLCSSA); - } - } - - PN->replaceAllUsesWith(NewVal); - PN->eraseFromParent(); - } else { - ExtraLoopUsers[i]->replaceUsesOfWith(I, NewVal); - } - } + for (unsigned i = 0, e = ExtraLoopUsers.size(); i != e; ++i) + ExtraLoopUsers[i]->replaceUsesOfWith(I, NewVal); // If this instruction is dead now, schedule it to be removed. if (I->use_empty()) From rafael.espindola at gmail.com Tue Jul 11 06:37:17 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Tue, 11 Jul 2006 06:37:17 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMAsmPrinter.cpp ARMISelDAGToDAG.cpp ARMInstrInfo.td ARMRegisterInfo.cpp Message-ID: <200607111137.GAA16122@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMAsmPrinter.cpp updated: 1.4 -> 1.5 ARMISelDAGToDAG.cpp updated: 1.14 -> 1.15 ARMInstrInfo.td updated: 1.6 -> 1.7 ARMRegisterInfo.cpp updated: 1.6 -> 1.7 --- Log message: add the memri memory operand this makes it possible for ldr instructions with non-zero immediate --- Diffs of the changes: (+42 -14) ARMAsmPrinter.cpp | 6 ++++++ ARMISelDAGToDAG.cpp | 7 +++++-- ARMInstrInfo.td | 17 +++++++++++++---- ARMRegisterInfo.cpp | 26 ++++++++++++++++++-------- 4 files changed, 42 insertions(+), 14 deletions(-) Index: llvm/lib/Target/ARM/ARMAsmPrinter.cpp diff -u llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.4 llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.5 --- llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.4 Fri May 26 05:56:17 2006 +++ llvm/lib/Target/ARM/ARMAsmPrinter.cpp Tue Jul 11 06:36:48 2006 @@ -58,6 +58,12 @@ return "ARM Assembly Printer"; } + void printMemRegImm(const MachineInstr *MI, unsigned OpNo) { + printOperand(MI, OpNo + 1); + O << ", "; + printOperand(MI, OpNo); + } + void printOperand(const MachineInstr *MI, int opNum); void printMemOperand(const MachineInstr *MI, int opNum, const char *Modifier = 0); Index: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp diff -u llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.14 llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.15 --- llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.14 Sun Jul 9 20:41:35 2006 +++ llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Tue Jul 11 06:36:48 2006 @@ -164,7 +164,7 @@ void Select(SDOperand &Result, SDOperand Op); virtual void InstructionSelectBasicBlock(SelectionDAG &DAG); - bool SelectAddrReg(SDOperand N, SDOperand &Base); + bool SelectAddrRegImm(SDOperand N, SDOperand &Offset, SDOperand &Base); // Include the pieces autogenerated from the target description. #include "ARMGenDAGISel.inc" @@ -183,7 +183,10 @@ ScheduleAndEmitDAG(DAG); } -bool ARMDAGToDAGISel::SelectAddrReg(SDOperand N, SDOperand &Base) { +//register plus/minus 12 bit offset +bool ARMDAGToDAGISel::SelectAddrRegImm(SDOperand N, SDOperand &Offset, + SDOperand &Base) { + Offset = CurDAG->getTargetConstant(0, MVT::i32); if (FrameIndexSDNode *FI = dyn_cast(N)) { Base = CurDAG->getTargetFrameIndex(FI->getIndex(), N.getValueType()); } Index: llvm/lib/Target/ARM/ARMInstrInfo.td diff -u llvm/lib/Target/ARM/ARMInstrInfo.td:1.6 llvm/lib/Target/ARM/ARMInstrInfo.td:1.7 --- llvm/lib/Target/ARM/ARMInstrInfo.td:1.6 Sun Jul 9 20:41:35 2006 +++ llvm/lib/Target/ARM/ARMInstrInfo.td Tue Jul 11 06:36:48 2006 @@ -12,9 +12,18 @@ // //===----------------------------------------------------------------------===// +// Address operands +def memri : Operand { + let PrintMethod = "printMemRegImm"; + let NumMIOperands = 2; + let MIOperandInfo = (ops i32imm, ptr_rc); +} + // Define ARM specific addressing mode. - //register or frame index -def raddr : ComplexPattern; +//register plus/minus 12 bit offset +def iaddr : ComplexPattern; +//register plus scaled register +//def raddr : ComplexPattern; //===----------------------------------------------------------------------===// // Instructions @@ -42,9 +51,9 @@ def bxr: InstARM<(ops IntRegs:$dst), "bx $dst", [(brind IntRegs:$dst)]>; -def ldr : InstARM<(ops IntRegs:$dst, IntRegs:$addr), +def ldr : InstARM<(ops IntRegs:$dst, memri:$addr), "ldr $dst, [$addr]", - [(set IntRegs:$dst, (load raddr:$addr))]>; + [(set IntRegs:$dst, (load iaddr:$addr))]>; def str : InstARM<(ops IntRegs:$src, IntRegs:$addr), "str $src, [$addr]", Index: llvm/lib/Target/ARM/ARMRegisterInfo.cpp diff -u llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.6 llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.7 --- llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.6 Sun Jul 9 20:41:35 2006 +++ llvm/lib/Target/ARM/ARMRegisterInfo.cpp Tue Jul 11 06:36:48 2006 @@ -83,23 +83,33 @@ assert (MI.getOpcode() == ARM::ldr); - unsigned FrameIdx = 1; + unsigned FrameIdx = 2; + unsigned OffIdx = 1; int FrameIndex = MI.getOperand(FrameIdx).getFrameIndex(); int Offset = MF.getFrameInfo()->getObjectOffset(FrameIndex); + assert (MI.getOperand(OffIdx).getImmedValue() == 0); unsigned StackSize = MF.getFrameInfo()->getStackSize(); Offset += StackSize; - // Insert a set of r12 with the full address - // r12 = r13 + offset - MachineBasicBlock *MBB2 = MI.getParent(); - BuildMI(*MBB2, II, ARM::addri, 2, ARM::R12).addReg(ARM::R13).addImm(Offset); - - // Replace the FrameIndex with r12 - MI.getOperand(FrameIdx).ChangeToRegister(ARM::R12); + assert (Offset >= 0); + if (Offset < 4096) { + // Replace the FrameIndex with r13 + MI.getOperand(FrameIdx).ChangeToRegister(ARM::R13); + // Replace the ldr offset with Offset + MI.getOperand(OffIdx).ChangeToImmediate(Offset); + } else { + // Insert a set of r12 with the full address + // r12 = r13 + offset + MachineBasicBlock *MBB2 = MI.getParent(); + BuildMI(*MBB2, II, ARM::addri, 2, ARM::R12).addReg(ARM::R13).addImm(Offset); + + // Replace the FrameIndex with r12 + MI.getOperand(FrameIdx).ChangeToRegister(ARM::R12); + } } void ARMRegisterInfo:: From jlaskey at apple.com Tue Jul 11 10:58:22 2006 From: jlaskey at apple.com (Jim Laskey) Date: Tue, 11 Jul 2006 10:58:22 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineDebugInfo.h Message-ID: <200607111558.KAA17252@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: MachineDebugInfo.h updated: 1.37 -> 1.38 --- Log message: 1. Support for c++ mangled names. 2. Support for private/protected class members. --- Diffs of the changes: (+18 -1) MachineDebugInfo.h | 19 ++++++++++++++++++- 1 files changed, 18 insertions(+), 1 deletion(-) Index: llvm/include/llvm/CodeGen/MachineDebugInfo.h diff -u llvm/include/llvm/CodeGen/MachineDebugInfo.h:1.37 llvm/include/llvm/CodeGen/MachineDebugInfo.h:1.38 --- llvm/include/llvm/CodeGen/MachineDebugInfo.h:1.37 Fri Jun 23 07:51:53 2006 +++ llvm/include/llvm/CodeGen/MachineDebugInfo.h Tue Jul 11 10:58:09 2006 @@ -57,7 +57,8 @@ // Debug info constants. enum { - LLVMDebugVersion = (4 << 16), // Current version of debug information. + LLVMDebugVersion = (5 << 16), // Current version of debug information. + LLVMDebugVersion4 = (4 << 16), // Constant for version 4. LLVMDebugVersionMask = 0xffff0000 // Mask for version number. }; @@ -276,6 +277,10 @@ /// class TypeDesc : public DebugInfoDesc { private: + enum { + FlagPrivate = 1 << 0, + FlagProtected = 1 << 1 + }; DebugInfoDesc *Context; // Context debug descriptor. std::string Name; // Type name (may be empty.) DebugInfoDesc *File; // Defined compile unit (may be NULL.) @@ -283,6 +288,7 @@ uint64_t Size; // Type bit size (may be zero.) uint64_t Align; // Type bit alignment (may be zero.) uint64_t Offset; // Type bit offset (may be zero.) + unsigned Flags; // Miscellaneous flags. public: TypeDesc(unsigned T); @@ -297,6 +303,12 @@ uint64_t getSize() const { return Size; } uint64_t getAlign() const { return Align; } uint64_t getOffset() const { return Offset; } + bool isPrivate() const { + return (Flags & FlagPrivate) != 0; + } + bool isProtected() const { + return (Flags & FlagProtected) != 0; + } void setContext(DebugInfoDesc *C) { Context = C; } void setName(const std::string &N) { Name = N; } void setFile(CompileUnitDesc *U) { @@ -306,6 +318,8 @@ void setSize(uint64_t S) { Size = S; } void setAlign(uint64_t A) { Align = A; } void setOffset(uint64_t O) { Offset = O; } + void setIsPrivate() { Flags |= FlagPrivate; } + void setIsProtected() { Flags |= FlagProtected; } /// ApplyToFields - Target the visitor to the fields of the TypeDesc. /// @@ -572,6 +586,7 @@ private: DebugInfoDesc *Context; // Context debug descriptor. std::string Name; // Global name. + std::string DisplayName; // C++ unmangled name. DebugInfoDesc *File; // Defined compile unit (may be NULL.) unsigned Line; // Defined line# (may be zero.) DebugInfoDesc *TyDesc; // Type debug descriptor. @@ -585,6 +600,7 @@ // Accessors DebugInfoDesc *getContext() const { return Context; } const std::string &getName() const { return Name; } + const std::string &getDisplayName() const { return DisplayName; } CompileUnitDesc *getFile() const { return static_cast(File); } @@ -596,6 +612,7 @@ bool isDefinition() const { return IsDefinition; } void setContext(DebugInfoDesc *C) { Context = C; } void setName(const std::string &N) { Name = N; } + void setDisplayName(const std::string &N) { DisplayName = N; } void setFile(CompileUnitDesc *U) { File = static_cast(U); } From jlaskey at apple.com Tue Jul 11 10:58:23 2006 From: jlaskey at apple.com (Jim Laskey) Date: Tue, 11 Jul 2006 10:58:23 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/IntrinsicInst.cpp Message-ID: <200607111558.KAA17262@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: IntrinsicInst.cpp updated: 1.8 -> 1.9 --- Log message: 1. Support for c++ mangled names. 2. Support for private/protected class members. --- Diffs of the changes: (+2 -2) IntrinsicInst.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/VMCore/IntrinsicInst.cpp diff -u llvm/lib/VMCore/IntrinsicInst.cpp:1.8 llvm/lib/VMCore/IntrinsicInst.cpp:1.9 --- llvm/lib/VMCore/IntrinsicInst.cpp:1.8 Mon Jun 19 07:54:15 2006 +++ llvm/lib/VMCore/IntrinsicInst.cpp Tue Jul 11 10:58:09 2006 @@ -61,7 +61,7 @@ std::string DbgStopPointInst::getFileName() const { // Once the operand indices are verified, update this assert - assert(LLVMDebugVersion == (4 << 16) && "Verify operand indices"); + assert(LLVMDebugVersion == (5 << 16) && "Verify operand indices"); GlobalVariable *GV = cast(getContext()); ConstantStruct *CS = cast(GV->getInitializer()); return CS->getOperand(3)->getStringValue(); @@ -69,7 +69,7 @@ std::string DbgStopPointInst::getDirectory() const { // Once the operand indices are verified, update this assert - assert(LLVMDebugVersion == (4 << 16) && "Verify operand indices"); + assert(LLVMDebugVersion == (5 << 16) && "Verify operand indices"); GlobalVariable *GV = cast(getContext()); ConstantStruct *CS = cast(GV->getInitializer()); return CS->getOperand(4)->getStringValue(); From jlaskey at apple.com Tue Jul 11 10:58:23 2006 From: jlaskey at apple.com (Jim Laskey) Date: Tue, 11 Jul 2006 10:58:23 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp MachineDebugInfo.cpp Message-ID: <200607111558.KAA17258@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: DwarfWriter.cpp updated: 1.67 -> 1.68 MachineDebugInfo.cpp updated: 1.44 -> 1.45 --- Log message: 1. Support for c++ mangled names. 2. Support for private/protected class members. --- Diffs of the changes: (+14 -1) DwarfWriter.cpp | 6 ++++++ MachineDebugInfo.cpp | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) Index: llvm/lib/CodeGen/DwarfWriter.cpp diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.67 llvm/lib/CodeGen/DwarfWriter.cpp:1.68 --- llvm/lib/CodeGen/DwarfWriter.cpp:1.67 Fri Jun 23 07:51:53 2006 +++ llvm/lib/CodeGen/DwarfWriter.cpp Tue Jul 11 10:58:09 2006 @@ -1383,6 +1383,12 @@ Block->AddUInt(DW_FORM_udata, FieldOffset >> 3); Block->ComputeSize(*this); Member->AddBlock(DW_AT_data_member_location, 0, Block); + + if (MemberDesc->isProtected()) { + Member->AddUInt(DW_AT_accessibility, 0, DW_ACCESS_protected); + } else if (MemberDesc->isPrivate()) { + Member->AddUInt(DW_AT_accessibility, 0, DW_ACCESS_private); + } Ty->AddChild(Member); } Index: llvm/lib/CodeGen/MachineDebugInfo.cpp diff -u llvm/lib/CodeGen/MachineDebugInfo.cpp:1.44 llvm/lib/CodeGen/MachineDebugInfo.cpp:1.45 --- llvm/lib/CodeGen/MachineDebugInfo.cpp:1.44 Tue Jun 20 14:41:06 2006 +++ llvm/lib/CodeGen/MachineDebugInfo.cpp Tue Jul 11 10:58:09 2006 @@ -671,6 +671,7 @@ , Size(0) , Align(0) , Offset(0) +, Flags(0) {} /// ApplyToFields - Target the visitor to the fields of the TypeDesc. @@ -685,6 +686,7 @@ Visitor->Apply(Size); Visitor->Apply(Align); Visitor->Apply(Offset); + if (getVersion() > LLVMDebugVersion4) Visitor->Apply(Flags); } /// getDescString - Return a string used to compose global names and labels. @@ -710,7 +712,8 @@ << "Line(" << Line << "), " << "Size(" << Size << "), " << "Align(" << Align << "), " - << "Offset(" << Offset << ")\n"; + << "Offset(" << Offset << "), " + << "Flags(" << Flags << ")\n"; } #endif @@ -1029,6 +1032,7 @@ : AnchoredDesc(T) , Context(0) , Name("") +, DisplayName("") , File(NULL) , Line(0) , TyDesc(NULL) @@ -1043,6 +1047,7 @@ Visitor->Apply(Context); Visitor->Apply(Name); + if (getVersion() > LLVMDebugVersion4) Visitor->Apply(DisplayName); Visitor->Apply(File); Visitor->Apply(Line); Visitor->Apply(TyDesc); @@ -1096,6 +1101,7 @@ << "Tag(" << getTag() << "), " << "Anchor(" << getAnchor() << "), " << "Name(\"" << getName() << "\"), " + << "DisplayName(\"" << getDisplayName() << "\"), " << "File(" << getFile() << ")," << "Line(" << getLine() << ")," << "Type(\"" << getType() << "\"), " @@ -1148,6 +1154,7 @@ << "Tag(" << getTag() << "), " << "Anchor(" << getAnchor() << "), " << "Name(\"" << getName() << "\"), " + << "DisplayName(\"" << getDisplayName() << "\"), " << "File(" << getFile() << ")," << "Line(" << getLine() << ")," << "Type(\"" << getType() << "\"), " From jlaskey at apple.com Tue Jul 11 12:58:22 2006 From: jlaskey at apple.com (Jim Laskey) Date: Tue, 11 Jul 2006 12:58:22 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp ScheduleDAG.cpp Message-ID: <200607111758.MAA18485@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: LegalizeDAG.cpp updated: 1.381 -> 1.382 ScheduleDAG.cpp updated: 1.96 -> 1.97 --- Log message: Ensure that dump calls that are associated with asserts are removed from non-debug build. --- Diffs of the changes: (+14 -2) LegalizeDAG.cpp | 14 +++++++++++++- ScheduleDAG.cpp | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.381 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.382 --- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.381 Mon Jul 10 20:40:09 2006 +++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Tue Jul 11 12:58:07 2006 @@ -540,7 +540,9 @@ return Result.getValue(Op.ResNo); } // Otherwise this is an unhandled builtin node. splat. +#ifndef NDEBUG std::cerr << "NODE: "; Node->dump(); std::cerr << "\n"; +#endif assert(0 && "Do not know how to legalize this operator!"); abort(); case ISD::GlobalAddress: @@ -2865,7 +2867,9 @@ case ISD::CopyFromReg: assert(0 && "CopyFromReg must be legal!"); default: +#ifndef NDEBUG std::cerr << "NODE: "; Node->dump(); std::cerr << "\n"; +#endif assert(0 && "Do not know how to promote this operator!"); abort(); case ISD::UNDEF: @@ -4205,7 +4209,9 @@ case ISD::CopyFromReg: assert(0 && "CopyFromReg must be legal!"); default: +#ifndef NDEBUG std::cerr << "NODE: "; Node->dump(); std::cerr << "\n"; +#endif assert(0 && "Do not know how to expand this operator!"); abort(); case ISD::UNDEF: @@ -4703,7 +4709,11 @@ } switch (Node->getOpcode()) { - default: Node->dump(); assert(0 && "Unhandled operation in SplitVectorOp!"); + default: +#ifndef NDEBUG + Node->dump(); +#endif + assert(0 && "Unhandled operation in SplitVectorOp!"); case ISD::VBUILD_VECTOR: { std::vector LoOps(Node->op_begin(), Node->op_begin()+NewNumElts); LoOps.push_back(NewNumEltsNode); @@ -4820,7 +4830,9 @@ SDOperand Result; switch (Node->getOpcode()) { default: +#ifndef NDEBUG Node->dump(); std::cerr << "\n"; +#endif assert(0 && "Unknown vector operation in PackVectorOp!"); case ISD::VADD: case ISD::VSUB: Index: llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.96 llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.97 --- llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.96 Thu Jun 15 02:22:16 2006 +++ llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp Tue Jul 11 12:58:07 2006 @@ -421,7 +421,7 @@ } else { switch (Node->getOpcode()) { default: - Node->dump(); + DEBUG(Node->dump()); assert(0 && "This target-independent node should have been selected!"); case ISD::EntryToken: // fall thru case ISD::TokenFactor: From jlaskey at apple.com Tue Jul 11 12:58:23 2006 From: jlaskey at apple.com (Jim Laskey) Date: Tue, 11 Jul 2006 12:58:23 -0500 Subject: [llvm-commits] CVS: llvm/lib/Analysis/IPA/Andersens.cpp Message-ID: <200607111758.MAA18489@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/IPA: Andersens.cpp updated: 1.28 -> 1.29 --- Log message: Ensure that dump calls that are associated with asserts are removed from non-debug build. --- Diffs of the changes: (+2 -3) Andersens.cpp | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) Index: llvm/lib/Analysis/IPA/Andersens.cpp diff -u llvm/lib/Analysis/IPA/Andersens.cpp:1.28 llvm/lib/Analysis/IPA/Andersens.cpp:1.29 --- llvm/lib/Analysis/IPA/Andersens.cpp:1.28 Wed May 24 12:04:04 2006 +++ llvm/lib/Analysis/IPA/Andersens.cpp Tue Jul 11 12:58:07 2006 @@ -260,9 +260,8 @@ std::map::iterator I = ValueNodes.find(V); if (I == ValueNodes.end()) { - V->dump(); - assert(I != ValueNodes.end() && - "Value does not have a node in the points-to graph!"); + DEBUG(V->dump()); + assert(0 && "Value does not have a node in the points-to graph!"); } return &GraphNodes[I->second]; } From jlaskey at apple.com Tue Jul 11 12:58:23 2006 From: jlaskey at apple.com (Jim Laskey) Date: Tue, 11 Jul 2006 12:58:23 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp Message-ID: <200607111758.MAA18495@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCCodeEmitter.cpp updated: 1.61 -> 1.62 --- Log message: Ensure that dump calls that are associated with asserts are removed from non-debug build. --- Diffs of the changes: (+1 -1) PPCCodeEmitter.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp diff -u llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp:1.61 llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp:1.62 --- llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp:1.61 Wed Jun 28 18:17:23 2006 +++ llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp Tue Jul 11 12:58:07 2006 @@ -160,7 +160,7 @@ Reloc = PPC::reloc_pcrel_bx; else { switch (MI.getOpcode()) { - default: MI.dump(); assert(0 && "Unknown instruction for relocation!"); + default: DEBUG(MI.dump()); assert(0 && "Unknown instruction for relocation!"); case PPC::LIS: Reloc = PPC::reloc_absolute_high; // Pointer to symbol break; From jlaskey at apple.com Tue Jul 11 12:58:23 2006 From: jlaskey at apple.com (Jim Laskey) Date: Tue, 11 Jul 2006 12:58:23 -0500 Subject: [llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp Message-ID: <200607111758.MAA18493@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: DAGISelEmitter.cpp updated: 1.217 -> 1.218 --- Log message: Ensure that dump calls that are associated with asserts are removed from non-debug build. --- Diffs of the changes: (+4 -4) DAGISelEmitter.cpp | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) Index: llvm/utils/TableGen/DAGISelEmitter.cpp diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.217 llvm/utils/TableGen/DAGISelEmitter.cpp:1.218 --- llvm/utils/TableGen/DAGISelEmitter.cpp:1.217 Thu Jun 29 18:57:05 2006 +++ llvm/utils/TableGen/DAGISelEmitter.cpp Tue Jul 11 12:58:07 2006 @@ -2136,7 +2136,7 @@ if (DefInit *Pred = dynamic_cast(Predicates->getElement(i))) { Record *Def = Pred->getDef(); if (!Def->isSubClassOf("Predicate")) { - Def->dump(); + DEBUG(Def->dump()); assert(0 && "Unknown predicate type!"); } if (!PredicateCheck.empty()) @@ -2344,7 +2344,7 @@ emitCheck("cast(" + RootName + utostr(OpNo) + ")->get() == ISD::" + LeafRec->getName()); } else { - Child->dump(); + DEBUG(Child->dump()); std::cerr << " "; assert(0 && "Unknown leaf type!"); } @@ -2357,7 +2357,7 @@ emitCheck("CN" + utostr(CTmp) + " == " +itostr(II->getValue())); } else { - Child->dump(); + DEBUG(Child->dump()); assert(0 && "Unknown leaf type!"); } } @@ -2510,7 +2510,7 @@ return std::make_pair(1, ResNo); } - N->dump(); + DEBUG(N->dump()); assert(0 && "Unknown leaf type!"); return std::make_pair(1, ~0U); } From jlaskey at apple.com Tue Jul 11 12:58:24 2006 From: jlaskey at apple.com (Jim Laskey) Date: Tue, 11 Jul 2006 12:58:24 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp Message-ID: <200607111758.MAA18503@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/Alpha: AlphaISelDAGToDAG.cpp updated: 1.46 -> 1.47 --- Log message: Ensure that dump calls that are associated with asserts are removed from non-debug build. --- Diffs of the changes: (+1 -1) AlphaISelDAGToDAG.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp diff -u llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp:1.46 llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp:1.47 --- llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp:1.46 Wed Jun 21 10:42:36 2006 +++ llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp Tue Jul 11 12:58:07 2006 @@ -303,7 +303,7 @@ bool rev = false; bool isNE = false; switch(CC) { - default: N->dump(); assert(0 && "Unknown FP comparison!"); + default: DEBUG(N->dump()); assert(0 && "Unknown FP comparison!"); case ISD::SETEQ: case ISD::SETOEQ: case ISD::SETUEQ: Opc = Alpha::CMPTEQ; break; case ISD::SETLT: case ISD::SETOLT: case ISD::SETULT: Opc = Alpha::CMPTLT; break; case ISD::SETLE: case ISD::SETOLE: case ISD::SETULE: Opc = Alpha::CMPTLE; break; From jlaskey at apple.com Tue Jul 11 12:58:24 2006 From: jlaskey at apple.com (Jim Laskey) Date: Tue, 11 Jul 2006 12:58:24 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp Message-ID: <200607111758.MAA18501@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/IA64: IA64ISelDAGToDAG.cpp updated: 1.42 -> 1.43 --- Log message: Ensure that dump calls that are associated with asserts are removed from non-debug build. --- Diffs of the changes: (+1 -1) IA64ISelDAGToDAG.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp diff -u llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.42 llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.43 --- llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.42 Wed May 24 19:24:28 2006 +++ llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp Tue Jul 11 12:58:07 2006 @@ -511,7 +511,7 @@ N->getValueType(0) : cast(N->getOperand(3))->getVT(); unsigned Opc; switch (TypeBeingLoaded) { - default: N->dump(); assert(0 && "Cannot load this type!"); + default: DEBUG(N->dump()); assert(0 && "Cannot load this type!"); case MVT::i1: { // this is a bool Opc = IA64::LD1; // first we load a byte, then compare for != 0 if(N->getValueType(0) == MVT::i1) { // XXX: early exit! From jlaskey at apple.com Tue Jul 11 13:25:27 2006 From: jlaskey at apple.com (Jim Laskey) Date: Tue, 11 Jul 2006 13:25:27 -0500 Subject: [llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp Message-ID: <200607111825.NAA18752@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: DAGISelEmitter.cpp updated: 1.218 -> 1.219 --- Log message: It was pointed out that DEBUG() is only available with -debug. --- Diffs of the changes: (+12 -4) DAGISelEmitter.cpp | 16 ++++++++++++---- 1 files changed, 12 insertions(+), 4 deletions(-) Index: llvm/utils/TableGen/DAGISelEmitter.cpp diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.218 llvm/utils/TableGen/DAGISelEmitter.cpp:1.219 --- llvm/utils/TableGen/DAGISelEmitter.cpp:1.218 Tue Jul 11 12:58:07 2006 +++ llvm/utils/TableGen/DAGISelEmitter.cpp Tue Jul 11 13:25:13 2006 @@ -2136,7 +2136,9 @@ if (DefInit *Pred = dynamic_cast(Predicates->getElement(i))) { Record *Def = Pred->getDef(); if (!Def->isSubClassOf("Predicate")) { - DEBUG(Def->dump()); +#ifndef NDEBUG + Def->dump(); +#endif assert(0 && "Unknown predicate type!"); } if (!PredicateCheck.empty()) @@ -2344,8 +2346,10 @@ emitCheck("cast(" + RootName + utostr(OpNo) + ")->get() == ISD::" + LeafRec->getName()); } else { - DEBUG(Child->dump()); +#ifndef NDEBUG + Child->dump(); std::cerr << " "; +#endif assert(0 && "Unknown leaf type!"); } } else if (IntInit *II = @@ -2357,7 +2361,9 @@ emitCheck("CN" + utostr(CTmp) + " == " +itostr(II->getValue())); } else { - DEBUG(Child->dump()); +#ifndef NDEBUG + Child->dump(); +#endif assert(0 && "Unknown leaf type!"); } } @@ -2510,7 +2516,9 @@ return std::make_pair(1, ResNo); } - DEBUG(N->dump()); +#ifndef NDEBUG + N->dump(); +#endif assert(0 && "Unknown leaf type!"); return std::make_pair(1, ~0U); } From jlaskey at apple.com Tue Jul 11 13:25:28 2006 From: jlaskey at apple.com (Jim Laskey) Date: Tue, 11 Jul 2006 13:25:28 -0500 Subject: [llvm-commits] CVS: llvm/lib/Analysis/IPA/Andersens.cpp Message-ID: <200607111825.NAA18760@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/IPA: Andersens.cpp updated: 1.29 -> 1.30 --- Log message: It was pointed out that DEBUG() is only available with -debug. --- Diffs of the changes: (+3 -1) Andersens.cpp | 4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) Index: llvm/lib/Analysis/IPA/Andersens.cpp diff -u llvm/lib/Analysis/IPA/Andersens.cpp:1.29 llvm/lib/Analysis/IPA/Andersens.cpp:1.30 --- llvm/lib/Analysis/IPA/Andersens.cpp:1.29 Tue Jul 11 12:58:07 2006 +++ llvm/lib/Analysis/IPA/Andersens.cpp Tue Jul 11 13:25:13 2006 @@ -260,7 +260,9 @@ std::map::iterator I = ValueNodes.find(V); if (I == ValueNodes.end()) { - DEBUG(V->dump()); +#ifndef NDEBUG + V->dump(); +#endif assert(0 && "Value does not have a node in the points-to graph!"); } return &GraphNodes[I->second]; From jlaskey at apple.com Tue Jul 11 13:25:27 2006 From: jlaskey at apple.com (Jim Laskey) Date: Tue, 11 Jul 2006 13:25:27 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp Message-ID: <200607111825.NAA18748@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/IA64: IA64ISelDAGToDAG.cpp updated: 1.43 -> 1.44 --- Log message: It was pointed out that DEBUG() is only available with -debug. --- Diffs of the changes: (+5 -1) IA64ISelDAGToDAG.cpp | 6 +++++- 1 files changed, 5 insertions(+), 1 deletion(-) Index: llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp diff -u llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.43 llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.44 --- llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.43 Tue Jul 11 12:58:07 2006 +++ llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp Tue Jul 11 13:25:13 2006 @@ -511,7 +511,11 @@ N->getValueType(0) : cast(N->getOperand(3))->getVT(); unsigned Opc; switch (TypeBeingLoaded) { - default: DEBUG(N->dump()); assert(0 && "Cannot load this type!"); + default: +#ifndef NDEBUG + N->dump(); +#endif + assert(0 && "Cannot load this type!"); case MVT::i1: { // this is a bool Opc = IA64::LD1; // first we load a byte, then compare for != 0 if(N->getValueType(0) == MVT::i1) { // XXX: early exit! From jlaskey at apple.com Tue Jul 11 13:25:28 2006 From: jlaskey at apple.com (Jim Laskey) Date: Tue, 11 Jul 2006 13:25:28 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp Message-ID: <200607111825.NAA18756@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: ScheduleDAG.cpp updated: 1.97 -> 1.98 --- Log message: It was pointed out that DEBUG() is only available with -debug. --- Diffs of the changes: (+3 -1) ScheduleDAG.cpp | 4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) Index: llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.97 llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.98 --- llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.97 Tue Jul 11 12:58:07 2006 +++ llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp Tue Jul 11 13:25:13 2006 @@ -421,7 +421,9 @@ } else { switch (Node->getOpcode()) { default: - DEBUG(Node->dump()); +#ifndef NDEBUG + Node->dump(); +#endif assert(0 && "This target-independent node should have been selected!"); case ISD::EntryToken: // fall thru case ISD::TokenFactor: From dpatel at apple.com Tue Jul 11 13:26:09 2006 From: dpatel at apple.com (Devang Patel) Date: Tue, 11 Jul 2006 13:26:09 -0500 Subject: [llvm-commits] CVS: llvm/docs/MakefileGuide.html Message-ID: <200607111826.NAA18821@zion.cs.uiuc.edu> Changes in directory llvm/docs: MakefileGuide.html updated: 1.34 -> 1.35 --- Log message: Fix typo. --- Diffs of the changes: (+2 -2) MakefileGuide.html | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/docs/MakefileGuide.html diff -u llvm/docs/MakefileGuide.html:1.34 llvm/docs/MakefileGuide.html:1.35 --- llvm/docs/MakefileGuide.html:1.34 Sat Jun 3 13:55:33 2006 +++ llvm/docs/MakefileGuide.html Tue Jul 11 13:25:57 2006 @@ -237,7 +237,7 @@ LIBRARYNAME = mylib SHARED_LIBRARY = 1 ARCHIVE_LIBRARY = 1 - DONT_BUILT_RELINKED = 1 + DONT_BUILD_RELINKED = 1

says to build a library named "mylib" with both a shared library (mylib.so) and an archive library (mylib.a) version but @@ -1004,7 +1004,7 @@ Reid Spencer
The LLVM Compiler Infrastructure
- Last modified: $Date: 2006/06/03 18:55:33 $ + Last modified: $Date: 2006/07/11 18:25:57 $ From lattner at cs.uiuc.edu Tue Jul 11 13:31:38 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 11 Jul 2006 13:31:38 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200607111831.NAA18907@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.498 -> 1.499 --- Log message: Silence a warning produced in assertions-disabled mode --- Diffs of the changes: (+1 -1) InstructionCombining.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.498 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.499 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.498 Mon Jul 10 17:15:25 2006 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Tue Jul 11 13:31:26 2006 @@ -2902,7 +2902,7 @@ // If they do then *success* we can turn this into a bswap. Figure out what // bswap to make it into. Module *M = I.getParent()->getParent()->getParent(); - const char *FnName; + const char *FnName = 0; if (I.getType() == Type::UShortTy) FnName = "llvm.bswap.i16"; else if (I.getType() == Type::UIntTy) From lattner at cs.uiuc.edu Tue Jul 11 13:34:03 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 11 Jul 2006 13:34:03 -0500 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200607111834.NAA18972@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.384 -> 1.385 --- Log message: Profile builds should always have debug info enabled. --- Diffs of the changes: (+3 -3) Makefile.rules | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.384 llvm/Makefile.rules:1.385 --- llvm/Makefile.rules:1.384 Thu Jun 29 14:38:04 2006 +++ llvm/Makefile.rules Tue Jul 11 13:33:50 2006 @@ -208,9 +208,9 @@ ifdef ENABLE_PROFILING BuildMode := Profile - CXX.Flags := $(OPTIMIZE_OPTION) -pg - C.Flags := $(OPTIMIZE_OPTION) -pg - LD.Flags := $(OPTIMIZE_OPTION) -pg + CXX.Flags := $(OPTIMIZE_OPTION) -pg -g + C.Flags := $(OPTIMIZE_OPTION) -pg -g + LD.Flags := $(OPTIMIZE_OPTION) -pg -g else ifdef ENABLE_OPTIMIZED BuildMode := Release From evan.cheng at apple.com Tue Jul 11 14:50:01 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 11 Jul 2006 14:50:01 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86InstrInfo.td Message-ID: <200607111950.OAA19951@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86InstrInfo.td updated: 1.278 -> 1.279 --- Log message: Emit inc / dec of registers as one byte instruction. --- Diffs of the changes: (+4 -4) X86InstrInfo.td | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) Index: llvm/lib/Target/X86/X86InstrInfo.td diff -u llvm/lib/Target/X86/X86InstrInfo.td:1.278 llvm/lib/Target/X86/X86InstrInfo.td:1.279 --- llvm/lib/Target/X86/X86InstrInfo.td:1.278 Wed Jun 28 19:36:51 2006 +++ llvm/lib/Target/X86/X86InstrInfo.td Tue Jul 11 14:49:49 2006 @@ -1095,9 +1095,9 @@ def INC8r : I<0xFE, MRM0r, (ops GR8 :$dst, GR8 :$src), "inc{b} $dst", [(set GR8:$dst, (add GR8:$src, 1))]>; let isConvertibleToThreeAddress = 1 in { // Can transform into LEA. -def INC16r : I<0xFF, MRM0r, (ops GR16:$dst, GR16:$src), "inc{w} $dst", +def INC16r : I<0x40, AddRegFrm, (ops GR16:$dst, GR16:$src), "inc{w} $dst", [(set GR16:$dst, (add GR16:$src, 1))]>, OpSize; -def INC32r : I<0xFF, MRM0r, (ops GR32:$dst, GR32:$src), "inc{l} $dst", +def INC32r : I<0x40, AddRegFrm, (ops GR32:$dst, GR32:$src), "inc{l} $dst", [(set GR32:$dst, (add GR32:$src, 1))]>; } let isTwoAddress = 0 in { @@ -1112,9 +1112,9 @@ def DEC8r : I<0xFE, MRM1r, (ops GR8 :$dst, GR8 :$src), "dec{b} $dst", [(set GR8:$dst, (add GR8:$src, -1))]>; let isConvertibleToThreeAddress = 1 in { // Can transform into LEA. -def DEC16r : I<0xFF, MRM1r, (ops GR16:$dst, GR16:$src), "dec{w} $dst", +def DEC16r : I<0x48, AddRegFrm, (ops GR16:$dst, GR16:$src), "dec{w} $dst", [(set GR16:$dst, (add GR16:$src, -1))]>, OpSize; -def DEC32r : I<0xFF, MRM1r, (ops GR32:$dst, GR32:$src), "dec{l} $dst", +def DEC32r : I<0x48, AddRegFrm, (ops GR32:$dst, GR32:$src), "dec{l} $dst", [(set GR32:$dst, (add GR32:$src, -1))]>; } From lattner at cs.uiuc.edu Tue Jul 11 15:29:33 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 11 Jul 2006 15:29:33 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/Verifier/2006-07-11-StoreStruct.ll Message-ID: <200607112029.PAA20277@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Verifier: 2006-07-11-StoreStruct.ll added (r1.1) --- Log message: Testcase for PR826: http://llvm.org/PR826 --- Diffs of the changes: (+11 -0) 2006-07-11-StoreStruct.ll | 11 +++++++++++ 1 files changed, 11 insertions(+) Index: llvm/test/Regression/Verifier/2006-07-11-StoreStruct.ll diff -c /dev/null llvm/test/Regression/Verifier/2006-07-11-StoreStruct.ll:1.1 *** /dev/null Tue Jul 11 15:29:31 2006 --- llvm/test/Regression/Verifier/2006-07-11-StoreStruct.ll Tue Jul 11 15:29:21 2006 *************** *** 0 **** --- 1,11 ---- + ; RUN: not llvm-as %s -o /dev/null -f + ; PR826 + + %struct_4 = type { int } + + implementation ; Functions: + + void %test() { + store %struct_4 zeroinitializer, %struct_4* null + unreachable + } From lattner at cs.uiuc.edu Tue Jul 11 15:30:02 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 11 Jul 2006 15:30:02 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Verifier.cpp Message-ID: <200607112030.PAA20324@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Verifier.cpp updated: 1.158 -> 1.159 --- Log message: Fix PR826: http://llvm.org/PR826 , testcase here: Regression/Verifier/2006-07-11-StoreStruct.ll --- Diffs of the changes: (+8 -2) Verifier.cpp | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) Index: llvm/lib/VMCore/Verifier.cpp diff -u llvm/lib/VMCore/Verifier.cpp:1.158 llvm/lib/VMCore/Verifier.cpp:1.159 --- llvm/lib/VMCore/Verifier.cpp:1.158 Thu Jul 6 13:01:23 2006 +++ llvm/lib/VMCore/Verifier.cpp Tue Jul 11 15:29:49 2006 @@ -652,10 +652,16 @@ } for (unsigned i = 0, e = I.getNumOperands(); i != e; ++i) { - // Check to make sure that the "address of" an intrinsic function is never - // taken. Assert1(I.getOperand(i) != 0, "Instruction has null operand!", &I); + + // Check to make sure that only first-class-values are operands to + // instructions. + Assert1(I.getOperand(i)->getType()->isFirstClassType(), + "Instruction operands must be first-class values!", &I); + if (Function *F = dyn_cast(I.getOperand(i))) { + // Check to make sure that the "address of" an intrinsic function is never + // taken. Assert1(!F->isIntrinsic() || (i == 0 && isa(I)), "Cannot take the address of an intrinsic!", &I); } else if (BasicBlock *OpBB = dyn_cast(I.getOperand(i))) { From lattner at cs.uiuc.edu Tue Jul 11 15:47:12 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 11 Jul 2006 15:47:12 -0500 Subject: [llvm-commits] CVS: llvm/docs/CFEBuildInstrs.html Message-ID: <200607112047.PAA20514@zion.cs.uiuc.edu> Changes in directory llvm/docs: CFEBuildInstrs.html updated: 1.57 -> 1.58 --- Log message: Revamp this doc to be accurate w.r.t. building llvmgcc4 --- Diffs of the changes: (+36 -53) CFEBuildInstrs.html | 89 +++++++++++++++++++++------------------------------- 1 files changed, 36 insertions(+), 53 deletions(-) Index: llvm/docs/CFEBuildInstrs.html diff -u llvm/docs/CFEBuildInstrs.html:1.57 llvm/docs/CFEBuildInstrs.html:1.58 --- llvm/docs/CFEBuildInstrs.html:1.57 Fri Jun 16 18:34:49 2006 +++ llvm/docs/CFEBuildInstrs.html Tue Jul 11 15:47:00 2006 @@ -19,7 +19,8 @@

  • Building under AIX
  • -
  • Instructions
  • +
  • llvm-gcc4 Instructions
  • +
  • llvm-gcc3 Instructions
  • License Information
  • @@ -36,9 +37,10 @@

    This document is intended to explain the process of building the -LLVM C/C++ front-end, based on GCC 3.4, from its source code. You -would have to do this, for example, if you are porting LLVM to a new -architecture or operating system.

    +LLVM C/C++ front-end from its source code. You have to do this, for example, if +you are porting LLVM to a new architecture or operating system, if you are +working from Top-Of-Tree CVS/SVN, or if there is no precompiled snapshot +available.

    NOTE: This is currently a somewhat fragile, error-prone process, and you should only try to do it if:

    @@ -71,7 +73,8 @@ versions is incapable of compiling the LLVM GCC front-end correctly. If your Cygwin installation includes GCC 3.3.3, we strongly recommend that you download -GCC 3.4.3, build it separately, and use it for compiling the LLVM GCC front-end. This has been +GCC 3.4.3, build it separately, and use it for compiling the LLVM GCC front-end. + This has been shown to work correctly.

    Some versions of Cygwin utilize an experimental version of GNU binutils that will cause the GNU ld linker to fail an assertion when linking @@ -94,18 +97,24 @@

    -

    + +

    This section describes how to aquire and build llvm-gcc4, which is based on +the GCC 4.0.1 front-end. This front-end supports C, C++, Objective-C, and +Objective-C++. Note that the instructions for building this front-end are +completely different than those for building llvm-gcc3. +

    +
    1. Retrieve the appropriate llvm-gcc4-x.y.source.tar.gz archive from the llvm web site.

      It is also possible to download the sources of the llvm-gcc4 front end from -a read-only mirror using subversion. To check out the code the first time use; +a read-only mirror using subversion. To check out the code the first time use:

      svn co svn://anonsvn.opensource.apple.com/svn/llvm dst-directory @@ -117,6 +126,23 @@

      The mirror is brought up to date every evening.

    2. + +
    3. Follow the directions in the top-level README.LLVM file for up-to-date + instructions on how to build llvm-gcc4.
    4. +
    +
    + + + + + +
    +
      +
    1. Aquire llvm-gcc3 from LLVM CVS or +from a release tarball.
    2. +
    3. Configure and build the LLVM libraries and tools. There are two ways to do this: either with objdir == srcdir or objdir != srcdir. It is recommended @@ -314,51 +340,8 @@

      -The software also has the following additional copyrights: +More information is available in the FAQ.

      - -
      -
      -Copyright (c) 2003, 2004, 2005 University of Illinois at Urbana-Champaign.
      -All rights reserved.
      -
      -Developed by:
      -
      -    LLVM Team
      -
      -    University of Illinois at Urbana-Champaign
      -
      -    http://llvm.org
      -
      -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
      -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
      -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
      -CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
      -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
      -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
      -SOFTWARE.
      -
      -Copyright (c) 1994
      -Hewlett-Packard Company
      -
      -Permission to use, copy, modify, distribute and sell this software
      -and its documentation for any purpose is hereby granted without fee,
      -provided that the above copyright notice appear in all copies and
      -that both that copyright notice and this permission notice appear
      -in supporting documentation.  Hewlett-Packard Company makes no
      -representations about the suitability of this software for any
      -purpose.  It is provided "as is" without express or implied warranty.
      -
      -Copyright (c) 1996, 1997, 1998, 1999
      -Silicon Graphics Computer Systems, Inc.
      -
      -Permission to use, copy, modify, distribute and sell this software
      -and its documentation for any purpose is hereby granted without fee,
      -provided that the above copyright notice appear in all copies and
      -that both that copyright notice and this permission notice appear
      -in supporting documentation.  Silicon Graphics makes no
      -representations about the suitability of this software for any
      -purpose.  It is provided "as is" without express or implied warranty.
       
    @@ -373,7 +356,7 @@ Brian Gaeke
    LLVM Compiler Infrastructure
    - Last modified: $Date: 2006/06/16 23:34:49 $ + Last modified: $Date: 2006/07/11 20:47:00 $ From lattner at cs.uiuc.edu Tue Jul 11 15:54:08 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 11 Jul 2006 15:54:08 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp Message-ID: <200607112054.PAA20603@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCRegisterInfo.cpp updated: 1.72 -> 1.73 --- Log message: The PPC64 JIT needs register numbers to encode instructions. --- Diffs of the changes: (+36 -35) PPCRegisterInfo.cpp | 71 ++++++++++++++++++++++++++-------------------------- 1 files changed, 36 insertions(+), 35 deletions(-) Index: llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp diff -u llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.72 llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.73 --- llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.72 Mon Jul 10 19:48:23 2006 +++ llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp Tue Jul 11 15:53:55 2006 @@ -40,42 +40,43 @@ /// getRegisterNumbering - Given the enum value for some register, e.g. /// PPC::F14, return the number that it corresponds to (e.g. 14). unsigned PPCRegisterInfo::getRegisterNumbering(unsigned RegEnum) { + using namespace PPC; switch (RegEnum) { - case PPC::R0 : case PPC::F0 : case PPC::V0 : case PPC::CR0: return 0; - case PPC::R1 : case PPC::F1 : case PPC::V1 : case PPC::CR1: return 1; - case PPC::R2 : case PPC::F2 : case PPC::V2 : case PPC::CR2: return 2; - case PPC::R3 : case PPC::F3 : case PPC::V3 : case PPC::CR3: return 3; - case PPC::R4 : case PPC::F4 : case PPC::V4 : case PPC::CR4: return 4; - case PPC::R5 : case PPC::F5 : case PPC::V5 : case PPC::CR5: return 5; - case PPC::R6 : case PPC::F6 : case PPC::V6 : case PPC::CR6: return 6; - case PPC::R7 : case PPC::F7 : case PPC::V7 : case PPC::CR7: return 7; - case PPC::R8 : case PPC::F8 : case PPC::V8 : return 8; - case PPC::R9 : case PPC::F9 : case PPC::V9 : return 9; - case PPC::R10: case PPC::F10: case PPC::V10: return 10; - case PPC::R11: case PPC::F11: case PPC::V11: return 11; - case PPC::R12: case PPC::F12: case PPC::V12: return 12; - case PPC::R13: case PPC::F13: case PPC::V13: return 13; - case PPC::R14: case PPC::F14: case PPC::V14: return 14; - case PPC::R15: case PPC::F15: case PPC::V15: return 15; - case PPC::R16: case PPC::F16: case PPC::V16: return 16; - case PPC::R17: case PPC::F17: case PPC::V17: return 17; - case PPC::R18: case PPC::F18: case PPC::V18: return 18; - case PPC::R19: case PPC::F19: case PPC::V19: return 19; - case PPC::R20: case PPC::F20: case PPC::V20: return 20; - case PPC::R21: case PPC::F21: case PPC::V21: return 21; - case PPC::R22: case PPC::F22: case PPC::V22: return 22; - case PPC::R23: case PPC::F23: case PPC::V23: return 23; - case PPC::R24: case PPC::F24: case PPC::V24: return 24; - case PPC::R25: case PPC::F25: case PPC::V25: return 25; - case PPC::R26: case PPC::F26: case PPC::V26: return 26; - case PPC::R27: case PPC::F27: case PPC::V27: return 27; - case PPC::R28: case PPC::F28: case PPC::V28: return 28; - case PPC::R29: case PPC::F29: case PPC::V29: return 29; - case PPC::R30: case PPC::F30: case PPC::V30: return 30; - case PPC::R31: case PPC::F31: case PPC::V31: return 31; - default: - std::cerr << "Unhandled reg in PPCRegisterInfo::getRegisterNumbering!\n"; - abort(); + case R0 : case X0 : case F0 : case V0 : case CR0: return 0; + case R1 : case X1 : case F1 : case V1 : case CR1: return 1; + case R2 : case X2 : case F2 : case V2 : case CR2: return 2; + case R3 : case X3 : case F3 : case V3 : case CR3: return 3; + case R4 : case X4 : case F4 : case V4 : case CR4: return 4; + case R5 : case X5 : case F5 : case V5 : case CR5: return 5; + case R6 : case X6 : case F6 : case V6 : case CR6: return 6; + case R7 : case X7 : case F7 : case V7 : case CR7: return 7; + case R8 : case X8 : case F8 : case V8 : return 8; + case R9 : case X9 : case F9 : case V9 : return 9; + case R10: case X10: case F10: case V10: return 10; + case R11: case X11: case F11: case V11: return 11; + case R12: case X12: case F12: case V12: return 12; + case R13: case X13: case F13: case V13: return 13; + case R14: case X14: case F14: case V14: return 14; + case R15: case X15: case F15: case V15: return 15; + case R16: case X16: case F16: case V16: return 16; + case R17: case X17: case F17: case V17: return 17; + case R18: case X18: case F18: case V18: return 18; + case R19: case X19: case F19: case V19: return 19; + case R20: case X20: case F20: case V20: return 20; + case R21: case X21: case F21: case V21: return 21; + case R22: case X22: case F22: case V22: return 22; + case R23: case X23: case F23: case V23: return 23; + case R24: case X24: case F24: case V24: return 24; + case R25: case X25: case F25: case V25: return 25; + case R26: case X26: case F26: case V26: return 26; + case R27: case X27: case F27: case V27: return 27; + case R28: case X28: case F28: case V28: return 28; + case R29: case X29: case F29: case V29: return 29; + case R30: case X30: case F30: case V30: return 30; + case R31: case X31: case F31: case V31: return 31; + default: + std::cerr << "Unhandled reg in PPCRegisterInfo::getRegisterNumbering!\n"; + abort(); } } From lattner at cs.uiuc.edu Tue Jul 11 19:32:00 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 11 Jul 2006 19:32:00 -0500 Subject: [llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/JIT.cpp Message-ID: <200607120032.TAA21702@zion.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine/JIT: JIT.cpp updated: 1.68 -> 1.69 --- Log message: Remove non-portable optimization that isn't worth it --- Diffs of the changes: (+1 -5) JIT.cpp | 6 +----- 1 files changed, 1 insertion(+), 5 deletions(-) Index: llvm/lib/ExecutionEngine/JIT/JIT.cpp diff -u llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.68 llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.69 --- llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.68 Fri Jul 7 12:18:09 2006 +++ llvm/lib/ExecutionEngine/JIT/JIT.cpp Tue Jul 11 19:31:47 2006 @@ -309,11 +309,7 @@ // space. Ptr = malloc(S+A); unsigned MisAligned = ((intptr_t)Ptr & (A-1)); - unsigned Offset = MisAligned ? (A-MisAligned) : 0; - - // Trim the tail off the memory block. - realloc(Ptr, S+Offset); - Ptr = (char*)Ptr + Offset; + Ptr = (char*)Ptr + (MisAligned ? (A-MisAligned) : 0); } state.getPendingGlobals(locked).push_back(GV); } From evan.cheng at apple.com Wed Jul 12 01:49:00 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 12 Jul 2006 01:49:00 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/X86/vec_shuffle-6.ll Message-ID: <200607120649.BAA26661@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/X86: vec_shuffle-6.ll updated: 1.2 -> 1.3 --- Log message: Fix test failure on non-Apple systems. --- Diffs of the changes: (+2 -0) vec_shuffle-6.ll | 2 ++ 1 files changed, 2 insertions(+) Index: llvm/test/Regression/CodeGen/X86/vec_shuffle-6.ll diff -u llvm/test/Regression/CodeGen/X86/vec_shuffle-6.ll:1.2 llvm/test/Regression/CodeGen/X86/vec_shuffle-6.ll:1.3 --- llvm/test/Regression/CodeGen/X86/vec_shuffle-6.ll:1.2 Mon Jul 10 16:49:09 2006 +++ llvm/test/Regression/CodeGen/X86/vec_shuffle-6.ll Wed Jul 12 01:48:47 2006 @@ -2,6 +2,8 @@ ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movaps | wc -l | grep 1 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movups | wc -l | grep 2 +target triple = "i686-apple-darwin" + %x = global [4 x int] [ int 1, int 2, int 3, int 4 ] <2 x long> %test1() { From lattner at cs.uiuc.edu Wed Jul 12 11:59:36 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 12 Jul 2006 11:59:36 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/X86/2006-07-12-InlineAsmQConstraint.ll Message-ID: <200607121659.LAA08480@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/X86: 2006-07-12-InlineAsmQConstraint.ll added (r1.1) --- Log message: Testcase for PR828: http://llvm.org/PR828 . --- Diffs of the changes: (+18 -0) 2006-07-12-InlineAsmQConstraint.ll | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+) Index: llvm/test/Regression/CodeGen/X86/2006-07-12-InlineAsmQConstraint.ll diff -c /dev/null llvm/test/Regression/CodeGen/X86/2006-07-12-InlineAsmQConstraint.ll:1.1 *** /dev/null Wed Jul 12 11:59:19 2006 --- llvm/test/Regression/CodeGen/X86/2006-07-12-InlineAsmQConstraint.ll Wed Jul 12 11:59:09 2006 *************** *** 0 **** --- 1,18 ---- + ; RUN: llvm-as < %s | llc -march=x86 + ; PR828 + + target endian = little + target pointersize = 32 + target triple = "i686-pc-linux-gnu" + + implementation ; Functions: + + void %_ZN5() { + + cond_true9: ; preds = %entry + %tmp3.i.i = call int asm sideeffect "lock; cmpxchg $1,$2", + "={ax},q,m,0,~{dirflag},~{fpsr},~{flags},~{memory}"( int 0, int* null, int 0 ) + ; [#uses=0] + ret void + } + From lattner at cs.uiuc.edu Wed Jul 12 12:00:01 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 12 Jul 2006 12:00:01 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp Message-ID: <200607121700.MAA08516@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ISelLowering.cpp updated: 1.236 -> 1.237 --- Log message: Add information preventing several register class constraints from working. This implements PR828: http://llvm.org/PR828 and CodeGen/X86/2006-07-12-InlineAsmQConstraint.ll --- Diffs of the changes: (+9 -1) X86ISelLowering.cpp | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletion(-) Index: llvm/lib/Target/X86/X86ISelLowering.cpp diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.236 llvm/lib/Target/X86/X86ISelLowering.cpp:1.237 --- llvm/lib/Target/X86/X86ISelLowering.cpp:1.236 Mon Jul 10 21:54:03 2006 +++ llvm/lib/Target/X86/X86ISelLowering.cpp Wed Jul 12 11:59:49 2006 @@ -4140,7 +4140,15 @@ X86TargetLowering::ConstraintType X86TargetLowering::getConstraintType(char ConstraintLetter) const { switch (ConstraintLetter) { - case 'A': return C_RegisterClass; + case 'A': + case 'r': + case 'R': + case 'l': + case 'q': + case 'Q': + case 'x': + case 'Y': + return C_RegisterClass; default: return TargetLowering::getConstraintType(ConstraintLetter); } } From lattner at cs.uiuc.edu Wed Jul 12 13:27:26 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 12 Jul 2006 13:27:26 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/Inline/2006-07-12-InlinePruneCGUpdate.ll Message-ID: <200607121827.NAA09163@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/Inline: 2006-07-12-InlinePruneCGUpdate.ll added (r1.1) --- Log message: testcase for PR827: http://llvm.org/PR827 --- Diffs of the changes: (+843 -0) 2006-07-12-InlinePruneCGUpdate.ll | 843 ++++++++++++++++++++++++++++++++++++++ 1 files changed, 843 insertions(+) Index: llvm/test/Regression/Transforms/Inline/2006-07-12-InlinePruneCGUpdate.ll diff -c /dev/null llvm/test/Regression/Transforms/Inline/2006-07-12-InlinePruneCGUpdate.ll:1.1 *** /dev/null Wed Jul 12 13:27:23 2006 --- llvm/test/Regression/Transforms/Inline/2006-07-12-InlinePruneCGUpdate.ll Wed Jul 12 13:27:13 2006 *************** *** 0 **** --- 1,843 ---- + ; RUN: llvm-as < %s | opt -inline -prune-eh -disable-output + ; PR827 + + %_ZTV8CRjii = internal global [1 x int (...)*] [ int (...)* %_ZN8CRjii12NlFeeEPN5Jr7sE ] ; <[1 x int (...)*]*> [#uses=0] + + implementation ; Functions: + + internal int %_ZN8CRjii12NlFeeEPN5Jr7sE(...) { + entry: + br bool false, label %cond_true, label %cond_false179 + + cond_true: ; preds = %entry + br label %bb9 + + bb: ; preds = %cond_true14 + br label %bb9 + + bb9: ; preds = %bb, %cond_true + br bool false, label %cond_true14, label %cond_false + + cond_true14: ; preds = %bb9 + br label %bb + + cond_false: ; preds = %bb9 + br label %bb15 + + cond_next: ; No predecessors! + br label %bb15 + + bb15: ; preds = %cond_next, %cond_false + br label %bb24 + + bb17: ; preds = %cond_true29 + br label %bb24 + + bb24: ; preds = %bb17, %bb15 + br bool false, label %cond_true29, label %cond_false30 + + cond_true29: ; preds = %bb24 + br label %bb17 + + cond_false30: ; preds = %bb24 + br label %bb32 + + cond_next31: ; No predecessors! + br label %bb32 + + bb32: ; preds = %cond_next31, %cond_false30 + br label %bb41 + + bb34: ; preds = %cond_true46 + br label %bb41 + + bb41: ; preds = %bb34, %bb32 + br bool false, label %cond_true46, label %cond_false47 + + cond_true46: ; preds = %bb41 + br label %bb34 + + cond_false47: ; preds = %bb41 + br label %bb49 + + cond_next48: ; No predecessors! + br label %bb49 + + bb49: ; preds = %cond_next48, %cond_false47 + br label %bb58 + + bb51: ; preds = %cond_true63 + br label %bb58 + + bb58: ; preds = %bb51, %bb49 + br bool false, label %cond_true63, label %cond_false64 + + cond_true63: ; preds = %bb58 + br label %bb51 + + cond_false64: ; preds = %bb58 + br label %bb66 + + cond_next65: ; No predecessors! + br label %bb66 + + bb66: ; preds = %cond_next65, %cond_false64 + br label %bb76 + + bb68: ; preds = %cond_true81 + br label %bb76 + + bb76: ; preds = %bb68, %bb66 + br bool false, label %cond_true81, label %cond_false82 + + cond_true81: ; preds = %bb76 + br label %bb68 + + cond_false82: ; preds = %bb76 + br label %bb84 + + cond_next83: ; No predecessors! + br label %bb84 + + bb84: ; preds = %cond_next83, %cond_false82 + br label %bb94 + + bb86: ; preds = %cond_true99 + br label %bb94 + + bb94: ; preds = %bb86, %bb84 + br bool false, label %cond_true99, label %cond_false100 + + cond_true99: ; preds = %bb94 + br label %bb86 + + cond_false100: ; preds = %bb94 + br label %bb102 + + cond_next101: ; No predecessors! + br label %bb102 + + bb102: ; preds = %cond_next101, %cond_false100 + br label %bb112 + + bb104: ; preds = %cond_true117 + br label %bb112 + + bb112: ; preds = %bb104, %bb102 + br bool false, label %cond_true117, label %cond_false118 + + cond_true117: ; preds = %bb112 + br label %bb104 + + cond_false118: ; preds = %bb112 + br label %bb120 + + cond_next119: ; No predecessors! + br label %bb120 + + bb120: ; preds = %cond_next119, %cond_false118 + br label %bb130 + + bb122: ; preds = %cond_true135 + br label %bb130 + + bb130: ; preds = %bb122, %bb120 + br bool false, label %cond_true135, label %cond_false136 + + cond_true135: ; preds = %bb130 + br label %bb122 + + cond_false136: ; preds = %bb130 + br label %bb138 + + cond_next137: ; No predecessors! + br label %bb138 + + bb138: ; preds = %cond_next137, %cond_false136 + br label %bb148 + + bb140: ; preds = %cond_true153 + call fastcc void %_Zjrf1( ) + br label %bb148 + + bb148: ; preds = %bb140, %bb138 + br bool false, label %cond_true153, label %cond_false154 + + cond_true153: ; preds = %bb148 + br label %bb140 + + cond_false154: ; preds = %bb148 + br label %bb156 + + cond_next155: ; No predecessors! + br label %bb156 + + bb156: ; preds = %cond_next155, %cond_false154 + br label %bb166 + + bb158: ; preds = %cond_true171 + br label %bb166 + + bb166: ; preds = %bb158, %bb156 + br bool false, label %cond_true171, label %cond_false172 + + cond_true171: ; preds = %bb166 + br label %bb158 + + cond_false172: ; preds = %bb166 + br label %bb174 + + cond_next173: ; No predecessors! + br label %bb174 + + bb174: ; preds = %cond_next173, %cond_false172 + br label %cleanup + + cleanup: ; preds = %bb174 + br label %finally + + finally: ; preds = %cleanup + br label %cond_next180 + + cond_false179: ; preds = %entry + br label %cond_next180 + + cond_next180: ; preds = %cond_false179, %finally + br label %return + + return: ; preds = %cond_next180 + ret int 0 + } + + internal fastcc void %_Zjrf2() { + entry: + br label %bb3 + + bb: ; preds = %cond_true + br label %bb3 + + bb3: ; preds = %bb, %entry + %tmp5 = load ubyte** null ; [#uses=1] + %tmp = setne ubyte* null, %tmp5 ; [#uses=1] + br bool %tmp, label %cond_true, label %cond_false + + cond_true: ; preds = %bb3 + br label %bb + + cond_false: ; preds = %bb3 + br label %bb6 + + cond_next: ; No predecessors! + br label %bb6 + + bb6: ; preds = %cond_next, %cond_false + br label %return + + return: ; preds = %bb6 + ret void + } + + internal fastcc void %_Zjrf3() { + entry: + call fastcc void %_Zjrf2( ) + br label %return + + return: ; preds = %entry + ret void + } + + internal fastcc void %_Zjrf4() { + entry: + br label %bb6 + + bb: ; preds = %cond_true + br label %bb6 + + bb6: ; preds = %bb, %entry + br bool false, label %cond_true, label %cond_false + + cond_true: ; preds = %bb6 + br label %bb + + cond_false: ; preds = %bb6 + br label %bb8 + + cond_next: ; No predecessors! + br label %bb8 + + bb8: ; preds = %cond_next, %cond_false + br bool false, label %cond_true9, label %cond_false12 + + cond_true9: ; preds = %bb8 + call fastcc void %_Zjrf3( ) + br label %cond_next13 + + cond_false12: ; preds = %bb8 + br label %cond_next13 + + cond_next13: ; preds = %cond_false12, %cond_true9 + br label %return + + return: ; preds = %cond_next13 + ret void + } + + internal fastcc void %_Zjrf5() { + entry: + call fastcc void %_Zjrf4( ) + br label %return + + return: ; preds = %entry + ret void + } + + internal fastcc void %_Zjrf6() { + entry: + call fastcc void %_Zjrf5( ) + br label %return + + return: ; preds = %entry + ret void + } + + internal fastcc void %_Zjrf7() { + entry: + br label %cleanup + + cleanup: ; preds = %entry + br label %finally + + finally: ; preds = %cleanup + call fastcc void %_Zjrf6( ) + br label %cleanup9 + + cleanup9: ; preds = %finally + br label %finally8 + + finally8: ; preds = %cleanup9 + br label %cleanup11 + + cleanup11: ; preds = %finally8 + br label %finally10 + + finally10: ; preds = %cleanup11 + br label %finally23 + + finally23: ; preds = %finally10 + br label %return + + return: ; preds = %finally23 + ret void + } + + internal fastcc void %_Zjrf11() { + entry: + br label %bb7 + + bb: ; preds = %cond_true + br label %bb7 + + bb7: ; preds = %bb, %entry + br bool false, label %cond_true, label %cond_false + + cond_true: ; preds = %bb7 + br label %bb + + cond_false: ; preds = %bb7 + br label %bb9 + + cond_next: ; No predecessors! + br label %bb9 + + bb9: ; preds = %cond_next, %cond_false + br label %return + ; No predecessors! + br bool false, label %cond_true12, label %cond_false15 + + cond_true12: ; preds = %0 + call fastcc void %_Zjrf3( ) + br label %cond_next16 + + cond_false15: ; preds = %0 + br label %cond_next16 + + cond_next16: ; preds = %cond_false15, %cond_true12 + br label %return + + return: ; preds = %cond_next16, %bb9 + ret void + } + + internal fastcc void %_Zjrf9() { + entry: + call fastcc void %_Zjrf11( ) + br label %return + + return: ; preds = %entry + ret void + } + + internal fastcc void %_Zjrf10() { + entry: + call fastcc void %_Zjrf9( ) + br label %return + + return: ; preds = %entry + ret void + } + + internal fastcc void %_Zjrf8() { + entry: + br bool false, label %cond_true, label %cond_false201 + + cond_true: ; preds = %entry + br bool false, label %cond_true36, label %cond_false + + cond_true36: ; preds = %cond_true + br label %cleanup + + cleanup: ; preds = %cond_true36 + br label %finally + + finally: ; preds = %cleanup + br label %cond_next189 + + cond_false: ; preds = %cond_true + br bool false, label %cond_true99, label %cond_false137 + + cond_true99: ; preds = %cond_false + br label %cleanup136 + + cleanup136: ; preds = %cond_true99 + br label %finally135 + + finally135: ; preds = %cleanup136 + br label %cond_next + + cond_false137: ; preds = %cond_false + call fastcc void %_Zjrf10( ) + br label %cleanup188 + + cleanup188: ; preds = %cond_false137 + br label %finally187 + + finally187: ; preds = %cleanup188 + br label %cond_next + + cond_next: ; preds = %finally187, %finally135 + br label %cond_next189 + + cond_next189: ; preds = %cond_next, %finally + br label %cond_next202 + + cond_false201: ; preds = %entry + br label %cond_next202 + + cond_next202: ; preds = %cond_false201, %cond_next189 + br label %return + + return: ; preds = %cond_next202 + ret void + } + + internal fastcc void %_Zjrf1() { + entry: + br label %bb492 + + bb: ; preds = %cond_true499 + br label %cleanup + + cleanup: ; preds = %bb + br label %finally + + finally: ; preds = %cleanup + br label %cleanup11 + + cleanup11: ; preds = %finally + br label %finally10 + + finally10: ; preds = %cleanup11 + br bool false, label %cond_true, label %cond_false286 + + cond_true: ; preds = %finally10 + br label %cleanup26 + + cleanup26: ; preds = %cond_true + br label %finally25 + + finally25: ; preds = %cleanup26 + br label %bb30 + + bb27: ; preds = %cond_true37 + br label %bb30 + + bb30: ; preds = %bb27, %finally25 + br bool false, label %cond_true37, label %cond_false + + cond_true37: ; preds = %bb30 + br label %bb27 + + cond_false: ; preds = %bb30 + br label %bb38 + + cond_next: ; No predecessors! + br label %bb38 + + bb38: ; preds = %cond_next, %cond_false + br label %bb148 + + bb40: ; preds = %cond_true156 + br label %bb139 + + bb41: ; preds = %cond_true142 + call fastcc void %_Zjrf7( ) + br label %bb105 + + bb44: ; preds = %cond_true112 + br label %bb74 + + bb66: ; preds = %cond_true80 + br label %bb74 + + bb74: ; preds = %bb66, %bb44 + br bool false, label %cond_true80, label %cond_false81 + + cond_true80: ; preds = %bb74 + br label %bb66 + + cond_false81: ; preds = %bb74 + br label %bb83 + + cond_next82: ; No predecessors! + br label %bb83 + + bb83: ; preds = %cond_next82, %cond_false81 + br label %cleanup97 + + cleanup97: ; preds = %bb83 + br label %finally96 + + finally96: ; preds = %cleanup97 + br label %cleanup99 + + cleanup99: ; preds = %finally96 + br label %finally98 + + finally98: ; preds = %cleanup99 + br label %bb105 + + bb105: ; preds = %finally98, %bb41 + br bool false, label %cond_true112, label %cond_false113 + + cond_true112: ; preds = %bb105 + br label %bb44 + + cond_false113: ; preds = %bb105 + br label %bb115 + + cond_next114: ; No predecessors! + br label %bb115 + + bb115: ; preds = %cond_next114, %cond_false113 + br bool false, label %cond_true119, label %cond_false123 + + cond_true119: ; preds = %bb115 + call fastcc void %_Zjrf8( ) + br label %cond_next124 + + cond_false123: ; preds = %bb115 + br label %cond_next124 + + cond_next124: ; preds = %cond_false123, %cond_true119 + br bool false, label %cond_true131, label %cond_false132 + + cond_true131: ; preds = %cond_next124 + br label %cleanup135 + + cond_false132: ; preds = %cond_next124 + br label %cond_next133 + + cond_next133: ; preds = %cond_false132 + br label %cleanup136 + + cleanup135: ; preds = %cond_true131 + br label %done + + cleanup136: ; preds = %cond_next133 + br label %finally134 + + finally134: ; preds = %cleanup136 + br label %bb139 + + bb139: ; preds = %finally134, %bb40 + br bool false, label %cond_true142, label %cond_false143 + + cond_true142: ; preds = %bb139 + br label %bb41 + + cond_false143: ; preds = %bb139 + br label %bb145 + + cond_next144: ; No predecessors! + br label %bb145 + + bb145: ; preds = %cond_next144, %cond_false143 + br label %bb148 + + bb148: ; preds = %bb145, %bb38 + br bool false, label %cond_true156, label %cond_false157 + + cond_true156: ; preds = %bb148 + br label %bb40 + + cond_false157: ; preds = %bb148 + br label %bb159 + + cond_next158: ; No predecessors! + br label %bb159 + + bb159: ; preds = %cond_next158, %cond_false157 + br label %done + + done: ; preds = %bb159, %cleanup135 + br label %bb214 + + bb185: ; preds = %cond_true218 + br bool false, label %cond_true193, label %cond_false206 + + cond_true193: ; preds = %bb185 + br label %cond_next211 + + cond_false206: ; preds = %bb185 + br label %cond_next211 + + cond_next211: ; preds = %cond_false206, %cond_true193 + br label %bb214 + + bb214: ; preds = %cond_next211, %done + br bool false, label %cond_true218, label %cond_false219 + + cond_true218: ; preds = %bb214 + br label %bb185 + + cond_false219: ; preds = %bb214 + br label %bb221 + + cond_next220: ; No predecessors! + br label %bb221 + + bb221: ; preds = %cond_next220, %cond_false219 + br bool false, label %cond_true236, label %cond_false245 + + cond_true236: ; preds = %bb221 + br label %cond_next249 + + cond_false245: ; preds = %bb221 + br label %cond_next249 + + cond_next249: ; preds = %cond_false245, %cond_true236 + br bool false, label %cond_true272, label %cond_false277 + + cond_true272: ; preds = %cond_next249 + br label %cond_next278 + + cond_false277: ; preds = %cond_next249 + br label %cond_next278 + + cond_next278: ; preds = %cond_false277, %cond_true272 + br label %cleanup285 + + cleanup285: ; preds = %cond_next278 + br label %finally284 + + finally284: ; preds = %cleanup285 + br label %cond_next287 + + cond_false286: ; preds = %finally10 + br label %cond_next287 + + cond_next287: ; preds = %cond_false286, %finally284 + br bool false, label %cond_true317, label %cond_false319 + + cond_true317: ; preds = %cond_next287 + br label %cond_next321 + + cond_false319: ; preds = %cond_next287 + br label %cond_next321 + + cond_next321: ; preds = %cond_false319, %cond_true317 + br label %bb348 + + bb335: ; preds = %cond_true355 + br label %bb348 + + bb348: ; preds = %bb335, %cond_next321 + br bool false, label %cond_true355, label %cond_false356 + + cond_true355: ; preds = %bb348 + br label %bb335 + + cond_false356: ; preds = %bb348 + br label %bb358 + + cond_next357: ; No predecessors! + br label %bb358 + + bb358: ; preds = %cond_next357, %cond_false356 + br bool false, label %cond_true363, label %cond_false364 + + cond_true363: ; preds = %bb358 + br label %bb388 + + cond_false364: ; preds = %bb358 + br label %cond_next365 + + cond_next365: ; preds = %cond_false364 + br bool false, label %cond_true370, label %cond_false371 + + cond_true370: ; preds = %cond_next365 + br label %bb388 + + cond_false371: ; preds = %cond_next365 + br label %cond_next372 + + cond_next372: ; preds = %cond_false371 + br bool false, label %cond_true385, label %cond_false386 + + cond_true385: ; preds = %cond_next372 + br label %bb388 + + cond_false386: ; preds = %cond_next372 + br label %cond_next387 + + cond_next387: ; preds = %cond_false386 + br label %bb389 + + bb388: ; preds = %cond_true385, %cond_true370, %cond_true363 + br label %bb389 + + bb389: ; preds = %bb388, %cond_next387 + br bool false, label %cond_true392, label %cond_false443 + + cond_true392: ; preds = %bb389 + br label %bb419 + + bb402: ; preds = %cond_true425 + br bool false, label %cond_true406, label %cond_false412 + + cond_true406: ; preds = %bb402 + br label %cond_next416 + + cond_false412: ; preds = %bb402 + br label %cond_next416 + + cond_next416: ; preds = %cond_false412, %cond_true406 + br label %bb419 + + bb419: ; preds = %cond_next416, %cond_true392 + br bool false, label %cond_true425, label %cond_false426 + + cond_true425: ; preds = %bb419 + br label %bb402 + + cond_false426: ; preds = %bb419 + br label %bb428 + + cond_next427: ; No predecessors! + br label %bb428 + + bb428: ; preds = %cond_next427, %cond_false426 + br label %cond_next478 + + cond_false443: ; preds = %bb389 + br label %bb460 + + bb450: ; preds = %cond_true466 + br label %bb460 + + bb460: ; preds = %bb450, %cond_false443 + br bool false, label %cond_true466, label %cond_false467 + + cond_true466: ; preds = %bb460 + br label %bb450 + + cond_false467: ; preds = %bb460 + br label %bb469 + + cond_next468: ; No predecessors! + br label %bb469 + + bb469: ; preds = %cond_next468, %cond_false467 + br label %cond_next478 + + cond_next478: ; preds = %bb469, %bb428 + br label %cleanup485 + + cleanup485: ; preds = %cond_next478 + br label %finally484 + + finally484: ; preds = %cleanup485 + br label %cleanup487 + + cleanup487: ; preds = %finally484 + br label %finally486 + + finally486: ; preds = %cleanup487 + br label %cleanup489 + + cleanup489: ; preds = %finally486 + br label %finally488 + + finally488: ; preds = %cleanup489 + br label %bb492 + + bb492: ; preds = %finally488, %entry + br bool false, label %cond_true499, label %cond_false500 + + cond_true499: ; preds = %bb492 + br label %bb + + cond_false500: ; preds = %bb492 + br label %bb502 + + cond_next501: ; No predecessors! + br label %bb502 + + bb502: ; preds = %cond_next501, %cond_false500 + br label %return + + return: ; preds = %bb502 + ret void + } + + internal fastcc void %_ZSt26__unguarded_insertion_sortIN9__gnu_cxx17__normal_iteratorIPSsSt6vectorISsSaISsEEEEEvT_S7_() { + entry: + br label %bb12 + + bb: ; preds = %cond_true + br label %cleanup + + cleanup: ; preds = %bb + br label %finally + + finally: ; preds = %cleanup + br label %bb12 + + bb12: ; preds = %finally, %entry + br bool false, label %cond_true, label %cond_false + + cond_true: ; preds = %bb12 + br label %bb + + cond_false: ; preds = %bb12 + br label %bb14 + + cond_next: ; No predecessors! + br label %bb14 + + bb14: ; preds = %cond_next, %cond_false + br label %return + + return: ; preds = %bb14 + ret void + } From lattner at cs.uiuc.edu Wed Jul 12 13:29:51 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 12 Jul 2006 13:29:51 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/IPO/Inliner.cpp Message-ID: <200607121829.NAA09214@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/IPO: Inliner.cpp updated: 1.28 -> 1.29 --- Log message: Change the callgraph representation to store the callsite along with the target CG node. This allows the inliner to properly update the callgraph when using the pruning inliner. The pruning inliner may not copy over all call sites from a callee to a caller, so the edges corresponding to those call sites should not be copied over either. This fixes PR827: http://llvm.org/PR827 and Transforms/Inline/2006-07-12-InlinePruneCGUpdate.ll --- Diffs of the changes: (+2 -2) Inliner.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/Transforms/IPO/Inliner.cpp diff -u llvm/lib/Transforms/IPO/Inliner.cpp:1.28 llvm/lib/Transforms/IPO/Inliner.cpp:1.29 --- llvm/lib/Transforms/IPO/Inliner.cpp:1.28 Fri May 12 18:35:26 2006 +++ llvm/lib/Transforms/IPO/Inliner.cpp Wed Jul 12 13:29:36 2006 @@ -54,7 +54,7 @@ // Remove any call graph edges from the callee to its callees. CallGraphNode *CalleeNode = CG[Callee]; while (CalleeNode->begin() != CalleeNode->end()) - CalleeNode->removeCallEdgeTo(*(CalleeNode->end()-1)); + CalleeNode->removeCallEdgeTo((CalleeNode->end()-1)->second); // Removing the node for callee from the call graph and delete it. delete CG.removeFunctionFromModule(CalleeNode); @@ -168,7 +168,7 @@ // Remove any call graph edges from the function to its callees. while (CGN->begin() != CGN->end()) - CGN->removeCallEdgeTo(*(CGN->end()-1)); + CGN->removeCallEdgeTo((CGN->end()-1)->second); // Remove any edges from the external node to the function's call graph // node. These edges might have been made irrelegant due to From lattner at cs.uiuc.edu Wed Jul 12 13:29:51 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 12 Jul 2006 13:29:51 -0500 Subject: [llvm-commits] CVS: llvm/lib/Analysis/IPA/CallGraph.cpp GlobalsModRef.cpp Message-ID: <200607121829.NAA09220@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/IPA: CallGraph.cpp updated: 1.54 -> 1.55 GlobalsModRef.cpp updated: 1.18 -> 1.19 --- Log message: Change the callgraph representation to store the callsite along with the target CG node. This allows the inliner to properly update the callgraph when using the pruning inliner. The pruning inliner may not copy over all call sites from a callee to a caller, so the edges corresponding to those call sites should not be copied over either. This fixes PR827: http://llvm.org/PR827 and Transforms/Inline/2006-07-12-InlinePruneCGUpdate.ll --- Diffs of the changes: (+20 -18) CallGraph.cpp | 36 +++++++++++++++++++----------------- GlobalsModRef.cpp | 2 +- 2 files changed, 20 insertions(+), 18 deletions(-) Index: llvm/lib/Analysis/IPA/CallGraph.cpp diff -u llvm/lib/Analysis/IPA/CallGraph.cpp:1.54 llvm/lib/Analysis/IPA/CallGraph.cpp:1.55 --- llvm/lib/Analysis/IPA/CallGraph.cpp:1.54 Wed Jun 7 17:00:26 2006 +++ llvm/lib/Analysis/IPA/CallGraph.cpp Wed Jul 12 13:29:36 2006 @@ -112,9 +112,9 @@ void addToCallGraph(Function *F) { CallGraphNode *Node = getOrInsertFunction(F); - // If this function has external linkage, anything could call it... + // If this function has external linkage, anything could call it. if (!F->hasInternalLinkage()) { - ExternalCallingNode->addCalledFunction(Node); + ExternalCallingNode->addCalledFunction(CallSite(), Node); // Found the entry point? if (F->getName() == "main") { @@ -128,27 +128,29 @@ // If this function is not defined in this translation unit, it could call // anything. if (F->isExternal() && !F->getIntrinsicID()) - Node->addCalledFunction(CallsExternalNode); + Node->addCalledFunction(CallSite(), CallsExternalNode); // Loop over all of the users of the function... looking for callers... // bool isUsedExternally = false; for (Value::use_iterator I = F->use_begin(), E = F->use_end(); I != E; ++I){ if (Instruction *Inst = dyn_cast(*I)) { - if (isOnlyADirectCall(F, CallSite::get(Inst))) + CallSite CS = CallSite::get(Inst); + if (isOnlyADirectCall(F, CS)) getOrInsertFunction(Inst->getParent()->getParent()) - ->addCalledFunction(Node); + ->addCalledFunction(CS, Node); else isUsedExternally = true; } else if (GlobalValue *GV = dyn_cast(*I)) { for (Value::use_iterator I = GV->use_begin(), E = GV->use_end(); I != E; ++I) if (Instruction *Inst = dyn_cast(*I)) { - if (isOnlyADirectCall(F, CallSite::get(Inst))) - getOrInsertFunction(Inst->getParent()->getParent()) - ->addCalledFunction(Node); - else - isUsedExternally = true; + CallSite CS = CallSite::get(Inst); + if (isOnlyADirectCall(F, CS)) + getOrInsertFunction(Inst->getParent()->getParent()) + ->addCalledFunction(CS, Node); + else + isUsedExternally = true; } else { isUsedExternally = true; } @@ -157,15 +159,15 @@ } } if (isUsedExternally) - ExternalCallingNode->addCalledFunction(Node); + ExternalCallingNode->addCalledFunction(CallSite(), Node); - // Look for an indirect function call... + // Look for an indirect function call. for (Function::iterator BB = F->begin(), BBE = F->end(); BB != BBE; ++BB) for (BasicBlock::iterator II = BB->begin(), IE = BB->end(); II != IE; ++II) { CallSite CS = CallSite::get(II); if (CS.getInstruction() && !CS.getCalledFunction()) - Node->addCalledFunction(CallsExternalNode); + Node->addCalledFunction(CS, CallsExternalNode); } } @@ -261,8 +263,8 @@ OS << "Call graph node <>:\n"; for (const_iterator I = begin(), E = end(); I != E; ++I) - if ((*I)->getFunction()) - OS << " Calls function '" << (*I)->getFunction()->getName() << "'\n"; + if (I->second->getFunction()) + OS << " Calls function '" << I->second->getFunction()->getName() <<"'\n"; else OS << " Calls external node\n"; OS << "\n"; @@ -273,7 +275,7 @@ void CallGraphNode::removeCallEdgeTo(CallGraphNode *Callee) { for (unsigned i = CalledFunctions.size(); ; --i) { assert(i && "Cannot find callee to remove!"); - if (CalledFunctions[i-1] == Callee) { + if (CalledFunctions[i-1].second == Callee) { CalledFunctions.erase(CalledFunctions.begin()+i-1); return; } @@ -285,7 +287,7 @@ // removeCallEdgeTo, so it should not be used unless necessary. void CallGraphNode::removeAnyCallEdgeTo(CallGraphNode *Callee) { for (unsigned i = 0, e = CalledFunctions.size(); i != e; ++i) - if (CalledFunctions[i] == Callee) { + if (CalledFunctions[i].second == Callee) { CalledFunctions[i] = CalledFunctions.back(); CalledFunctions.pop_back(); --i; --e; Index: llvm/lib/Analysis/IPA/GlobalsModRef.cpp diff -u llvm/lib/Analysis/IPA/GlobalsModRef.cpp:1.18 llvm/lib/Analysis/IPA/GlobalsModRef.cpp:1.19 --- llvm/lib/Analysis/IPA/GlobalsModRef.cpp:1.18 Fri Apr 22 00:36:59 2005 +++ llvm/lib/Analysis/IPA/GlobalsModRef.cpp Wed Jul 12 13:29:36 2006 @@ -263,7 +263,7 @@ for (unsigned i = 0, e = SCC.size(); i != e && !CallsExternal; ++i) for (CallGraphNode::iterator CI = SCC[i]->begin(), E = SCC[i]->end(); CI != E; ++CI) - if (Function *Callee = (*CI)->getFunction()) { + if (Function *Callee = CI->second->getFunction()) { if (FunctionRecord *CalleeFR = getFunctionInfo(Callee)) { // Propagate function effect up. FunctionEffect |= CalleeFR->FunctionEffect; From lattner at cs.uiuc.edu Wed Jul 12 13:29:51 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 12 Jul 2006 13:29:51 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/CallGraph.h Message-ID: <200607121829.NAA09222@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: CallGraph.h updated: 1.49 -> 1.50 --- Log message: Change the callgraph representation to store the callsite along with the target CG node. This allows the inliner to properly update the callgraph when using the pruning inliner. The pruning inliner may not copy over all call sites from a callee to a caller, so the edges corresponding to those call sites should not be copied over either. This fixes PR827: http://llvm.org/PR827 and Transforms/Inline/2006-07-12-InlinePruneCGUpdate.ll --- Diffs of the changes: (+30 -13) CallGraph.h | 43 ++++++++++++++++++++++++++++++------------- 1 files changed, 30 insertions(+), 13 deletions(-) Index: llvm/include/llvm/Analysis/CallGraph.h diff -u llvm/include/llvm/Analysis/CallGraph.h:1.49 llvm/include/llvm/Analysis/CallGraph.h:1.50 --- llvm/include/llvm/Analysis/CallGraph.h:1.49 Wed Jun 7 17:00:25 2006 +++ llvm/include/llvm/Analysis/CallGraph.h Wed Jul 12 13:29:36 2006 @@ -54,6 +54,7 @@ #include "llvm/ADT/GraphTraits.h" #include "llvm/ADT/STLExtras.h" #include "llvm/Pass.h" +#include "llvm/Support/CallSite.h" namespace llvm { @@ -167,7 +168,8 @@ // class CallGraphNode { Function *F; - std::vector CalledFunctions; + typedef std::pair CallRecord; + std::vector CalledFunctions; CallGraphNode(const CallGraphNode &); // Do not implement public: @@ -175,8 +177,8 @@ // Accessor methods... // - typedef std::vector::iterator iterator; - typedef std::vector::const_iterator const_iterator; + typedef std::vector::iterator iterator; + typedef std::vector::const_iterator const_iterator; // getFunction - Return the function that this call graph node represents... Function *getFunction() const { return F; } @@ -189,7 +191,9 @@ // Subscripting operator - Return the i'th called function... // - CallGraphNode *operator[](unsigned i) const { return CalledFunctions[i];} + CallGraphNode *operator[](unsigned i) const { + return CalledFunctions[i].second; + } /// dump - Print out this call graph node. /// @@ -209,8 +213,8 @@ /// addCalledFunction add a function to the list of functions called by this /// one. - void addCalledFunction(CallGraphNode *M) { - CalledFunctions.push_back(M); + void addCalledFunction(CallSite CS, CallGraphNode *M) { + CalledFunctions.push_back(std::make_pair(CS, M)); } /// removeCallEdgeTo - This method removes a *single* edge to the specified @@ -225,24 +229,38 @@ friend class CallGraph; - // CallGraphNode ctor - Create a node for the specified function... + // CallGraphNode ctor - Create a node for the specified function. inline CallGraphNode(Function *f) : F(f) {} }; //===----------------------------------------------------------------------===// // GraphTraits specializations for call graphs so that they can be treated as -// graphs by the generic graph algorithms... +// graphs by the generic graph algorithms. // // Provide graph traits for tranversing call graphs using standard graph // traversals. template <> struct GraphTraits { typedef CallGraphNode NodeType; - typedef NodeType::iterator ChildIteratorType; + typedef std::pair CGNPairTy; + typedef std::pointer_to_unary_function CGNDerefFun; + static NodeType *getEntryNode(CallGraphNode *CGN) { return CGN; } - static inline ChildIteratorType child_begin(NodeType *N) { return N->begin();} - static inline ChildIteratorType child_end (NodeType *N) { return N->end(); } + + typedef mapped_iterator ChildIteratorType; + + static inline ChildIteratorType child_begin(NodeType *N) { + return map_iterator(N->begin(), CGNDerefFun(CGNDeref)); + } + static inline ChildIteratorType child_end (NodeType *N) { + return map_iterator(N->end(), CGNDerefFun(CGNDeref)); + } + + static CallGraphNode *CGNDeref(CGNPairTy P) { + return P.second; + } + }; template <> struct GraphTraits { @@ -270,8 +288,7 @@ return map_iterator(CG->end(), DerefFun(CGdereference)); } - static CallGraphNode &CGdereference (std::pair P) { + static CallGraphNode &CGdereference(PairTy P) { return *P.second; } }; From lattner at cs.uiuc.edu Wed Jul 12 13:29:51 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 12 Jul 2006 13:29:51 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Utils/InlineFunction.cpp Message-ID: <200607121829.NAA09228@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Utils: InlineFunction.cpp updated: 1.42 -> 1.43 --- Log message: Change the callgraph representation to store the callsite along with the target CG node. This allows the inliner to properly update the callgraph when using the pruning inliner. The pruning inliner may not copy over all call sites from a callee to a caller, so the edges corresponding to those call sites should not be copied over either. This fixes PR827: http://llvm.org/PR827 and Transforms/Inline/2006-07-12-InlinePruneCGUpdate.ll --- Diffs of the changes: (+46 -37) InlineFunction.cpp | 83 +++++++++++++++++++++++++++++------------------------ 1 files changed, 46 insertions(+), 37 deletions(-) Index: llvm/lib/Transforms/Utils/InlineFunction.cpp diff -u llvm/lib/Transforms/Utils/InlineFunction.cpp:1.42 llvm/lib/Transforms/Utils/InlineFunction.cpp:1.43 --- llvm/lib/Transforms/Utils/InlineFunction.cpp:1.42 Fri May 26 20:28:04 2006 +++ llvm/lib/Transforms/Utils/InlineFunction.cpp Wed Jul 12 13:29:36 2006 @@ -136,22 +136,32 @@ InvokeDest->removePredecessor(II->getParent()); } -/// UpdateCallGraphAfterInlining - Once we have finished inlining a call from -/// caller to callee, update the specified callgraph to reflect the changes we -/// made. -static void UpdateCallGraphAfterInlining(const Function *Caller, +/// UpdateCallGraphAfterInlining - Once we have cloned code over from a callee +/// into the caller, update the specified callgraph to reflect the changes we +/// made. Note that it's possible that not all code was copied over, so only +/// some edges of the callgraph will be remain. +static void UpdateCallGraphAfterInlining(const Function *Caller, const Function *Callee, + Function::iterator FirstNewBlock, + std::map &ValueMap, CallGraph &CG) { // Update the call graph by deleting the edge from Callee to Caller CallGraphNode *CalleeNode = CG[Callee]; CallGraphNode *CallerNode = CG[Caller]; CallerNode->removeCallEdgeTo(CalleeNode); - // Since we inlined all uninlined call sites in the callee into the caller, + // Since we inlined some uninlined call sites in the callee into the caller, // add edges from the caller to all of the callees of the callee. for (CallGraphNode::iterator I = CalleeNode->begin(), - E = CalleeNode->end(); I != E; ++I) - CallerNode->addCalledFunction(*I); + E = CalleeNode->end(); I != E; ++I) { + const Instruction *OrigCall = I->first.getInstruction(); + + std::map::iterator VMI = ValueMap.find(OrigCall); + if (VMI != ValueMap.end()) { // Only copy the edge if the call was inlined! + Instruction *NewCall = cast(VMI->second); + CallerNode->addCalledFunction(CallSite::get(NewCall), I->second); + } + } } @@ -192,6 +202,8 @@ // function. std::vector Returns; ClonedCodeInfo InlinedFunctionInfo; + Function::iterator FirstNewBlock; + { // Scope to destroy ValueMap after cloning. std::map ValueMap; @@ -211,11 +223,16 @@ // happy with whatever the cloner can do. CloneAndPruneFunctionInto(Caller, CalledFunc, ValueMap, Returns, ".i", &InlinedFunctionInfo); + + // Remember the first block that is newly cloned over. + FirstNewBlock = LastBlock; ++FirstNewBlock; + + // Update the callgraph if requested. + if (CG) + UpdateCallGraphAfterInlining(Caller, CalledFunc, FirstNewBlock, ValueMap, + *CG); } - - // Remember the first block that is newly cloned over. - Function::iterator FirstNewBlock = LastBlock; ++FirstNewBlock; - + // If there are any alloca instructions in the block that used to be the entry // block for the callee, move them to the entry block of the caller. First // calculate which instruction they should be inserted before. We insert the @@ -252,15 +269,27 @@ StackSave = M->getOrInsertFunction("llvm.stacksave", SBytePtr, NULL); StackRestore = M->getOrInsertFunction("llvm.stackrestore", Type::VoidTy, SBytePtr, NULL); - + + // If we are preserving the callgraph, add edges to the stacksave/restore + // functions for the calls we insert. + CallGraphNode *StackSaveCGN, *StackRestoreCGN, *CallerNode; + if (CG) { + StackSaveCGN = CG->getOrInsertFunction(StackSave); + StackRestoreCGN = CG->getOrInsertFunction(StackRestore); + CallerNode = (*CG)[Caller]; + } + // Insert the llvm.stacksave. - Value *SavedPtr = new CallInst(StackSave, "savedstack", - FirstNewBlock->begin()); - + CallInst *SavedPtr = new CallInst(StackSave, "savedstack", + FirstNewBlock->begin()); + if (CG) CallerNode->addCalledFunction(SavedPtr, StackSaveCGN); + // Insert a call to llvm.stackrestore before any return instructions in the // inlined function. - for (unsigned i = 0, e = Returns.size(); i != e; ++i) - new CallInst(StackRestore, SavedPtr, "", Returns[i]); + for (unsigned i = 0, e = Returns.size(); i != e; ++i) { + CallInst *CI = new CallInst(StackRestore, SavedPtr, "", Returns[i]); + if (CG) CallerNode->addCalledFunction(CI, StackRestoreCGN); + } // Count the number of StackRestore calls we insert. unsigned NumStackRestores = Returns.size(); @@ -275,20 +304,6 @@ ++NumStackRestores; } } - - // If we are supposed to update the callgraph, do so now. - if (CG) { - CallGraphNode *StackSaveCGN = CG->getOrInsertFunction(StackSave); - CallGraphNode *StackRestoreCGN = CG->getOrInsertFunction(StackRestore); - CallGraphNode *CallerNode = (*CG)[Caller]; - - // 'Caller' now calls llvm.stacksave one more time. - CallerNode->addCalledFunction(StackSaveCGN); - - // 'Caller' now calls llvm.stackrestore the appropriate number of times. - for (unsigned i = 0; i != NumStackRestores; ++i) - CallerNode->addCalledFunction(StackRestoreCGN); - } } // If we are inlining tail call instruction through a call site that isn't @@ -334,9 +349,6 @@ // Since we are now done with the return instruction, delete it also. Returns[0]->getParent()->getInstList().erase(Returns[0]); - // Update the callgraph if requested. - if (CG) UpdateCallGraphAfterInlining(Caller, CalledFunc, *CG); - // We are now done with the inlining. return true; } @@ -463,8 +475,5 @@ // Now we can remove the CalleeEntry block, which is now empty. Caller->getBasicBlockList().erase(CalleeEntry); - // Update the callgraph if requested. - if (CG) UpdateCallGraphAfterInlining(Caller, CalledFunc, *CG); - return true; } From lattner at cs.uiuc.edu Wed Jul 12 13:37:31 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 12 Jul 2006 13:37:31 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Utils/InlineFunction.cpp Message-ID: <200607121837.NAA09352@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Utils: InlineFunction.cpp updated: 1.43 -> 1.44 --- Log message: In addition to deleting calls, the inliner can constant fold them as well. Handle this case, which doesn't require a new callgraph edge. This fixes a crash compiling MallocBench/gs. --- Diffs of the changes: (+4 -2) InlineFunction.cpp | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) Index: llvm/lib/Transforms/Utils/InlineFunction.cpp diff -u llvm/lib/Transforms/Utils/InlineFunction.cpp:1.43 llvm/lib/Transforms/Utils/InlineFunction.cpp:1.44 --- llvm/lib/Transforms/Utils/InlineFunction.cpp:1.43 Wed Jul 12 13:29:36 2006 +++ llvm/lib/Transforms/Utils/InlineFunction.cpp Wed Jul 12 13:37:18 2006 @@ -158,8 +158,10 @@ std::map::iterator VMI = ValueMap.find(OrigCall); if (VMI != ValueMap.end()) { // Only copy the edge if the call was inlined! - Instruction *NewCall = cast(VMI->second); - CallerNode->addCalledFunction(CallSite::get(NewCall), I->second); + // If the call was inlined, but then constant folded, there is no edge to + // add. Check for this case. + if (Instruction *NewCall = dyn_cast(VMI->second)) + CallerNode->addCalledFunction(CallSite::get(NewCall), I->second); } } } From jlaskey at apple.com Wed Jul 12 14:15:55 2006 From: jlaskey at apple.com (Jim Laskey) Date: Wed, 12 Jul 2006 14:15:55 -0500 Subject: [llvm-commits] CVS: llvm/utils/TableGen/CodeEmitterGen.cpp Message-ID: <200607121915.OAA09719@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: CodeEmitterGen.cpp updated: 1.45 -> 1.46 --- Log message: Move base value of instruction to lookup table to prepare for case reduction. --- Diffs of the changes: (+37 -17) CodeEmitterGen.cpp | 54 ++++++++++++++++++++++++++++++++++++----------------- 1 files changed, 37 insertions(+), 17 deletions(-) Index: llvm/utils/TableGen/CodeEmitterGen.cpp diff -u llvm/utils/TableGen/CodeEmitterGen.cpp:1.45 llvm/utils/TableGen/CodeEmitterGen.cpp:1.46 --- llvm/utils/TableGen/CodeEmitterGen.cpp:1.45 Mon Jul 10 20:25:59 2006 +++ llvm/utils/TableGen/CodeEmitterGen.cpp Wed Jul 12 14:15:43 2006 @@ -77,21 +77,30 @@ EmitSourceFileHeader("Machine Code Emitter", o); std::string Namespace = Insts[0]->getValueAsString("Namespace") + "::"; + + std::vector NumberedInstructions; + Target.getInstructionsByEnumValue(NumberedInstructions); // Emit function declaration o << "unsigned " << Target.getName() << "CodeEmitter::" - << "getBinaryCodeForInstr(MachineInstr &MI) {\n" - << " unsigned Value = 0;\n" - << " switch (MI.getOpcode()) {\n"; + << "getBinaryCodeForInstr(MachineInstr &MI) {\n"; - // Emit a case statement for each opcode - for (std::vector::iterator I = Insts.begin(), E = Insts.end(); - I != E; ++I) { - Record *R = *I; - if (R->getName() == "PHI" || R->getName() == "INLINEASM") continue; + // Emit instruction base values + o << " static const unsigned InstBits[] = {\n"; + for (std::vector::iterator + IN = NumberedInstructions.begin(), + EN = NumberedInstructions.end(); + IN != EN; ++IN) { + const CodeGenInstruction *CGI = *IN; + Record *R = CGI->TheDef; + + if (IN != NumberedInstructions.begin()) o << ",\n"; + + if (R->getName() == "PHI" || R->getName() == "INLINEASM") { + o << " 0U"; + continue; + } - o << " case " << Namespace << R->getName() << ": {\n"; - BitsInit *BI = R->getValueAsBitsInit("Inst"); // For little-endian instruction bit encodings, reverse the bit order @@ -119,20 +128,31 @@ unsigned Value = 0; const std::vector &Vals = R->getValues(); - DEBUG(o << " // prefilling: "); // Start by filling in fixed values... for (unsigned i = 0, e = BI->getNumBits(); i != e; ++i) { if (BitInit *B = dynamic_cast(BI->getBit(e-i-1))) { Value |= B->getValue() << (e-i-1); - DEBUG(o << B->getValue()); - } else { - DEBUG(o << "0"); } } - DEBUG(o << "\n"); + o << " " << Value << "U"; + } + o << "\n };\n"; - DEBUG(o << " // " << *R->getValue("Inst") << "\n"); - o << " Value = " << Value << "U;\n\n"; + // Emit initial function code + o << " const unsigned opcode = MI.getOpcode();\n" + << " unsigned Value = InstBits[opcode];\n" + << " switch (opcode) {\n"; + + // Emit a case statement for each opcode + for (std::vector::iterator I = Insts.begin(), E = Insts.end(); + I != E; ++I) { + Record *R = *I; + if (R->getName() == "PHI" || R->getName() == "INLINEASM") continue; + + o << " case " << Namespace << R->getName() << ": {\n"; + + BitsInit *BI = R->getValueAsBitsInit("Inst"); + const std::vector &Vals = R->getValues(); // Loop over all of the fields in the instruction, determining which are the // operands to the instruction. From lattner at cs.uiuc.edu Wed Jul 12 15:42:22 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 12 Jul 2006 15:42:22 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCTargetMachine.cpp Message-ID: <200607122042.PAA10556@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCTargetMachine.cpp updated: 1.96 -> 1.97 --- Log message: An overaggressive #ifdef allows a function to fall off the bottom of the function instead of returning a value. This sometimes allowed the ppc32 jit to be used in 64-bit mode. --- Diffs of the changes: (+1 -2) PPCTargetMachine.cpp | 3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) Index: llvm/lib/Target/PowerPC/PPCTargetMachine.cpp diff -u llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.96 llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.97 --- llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.96 Thu Jul 6 12:10:42 2006 +++ llvm/lib/Target/PowerPC/PPCTargetMachine.cpp Wed Jul 12 15:42:10 2006 @@ -39,9 +39,8 @@ #if defined(__POWERPC__) || defined (__ppc__) || defined(_POWER) if (sizeof(void*) == 4) return 10; -#else - return 0; #endif + return 0; } unsigned PPC64TargetMachine::getJITMatchQuality() { #if defined(__POWERPC__) || defined (__ppc__) || defined(_POWER) From evan.cheng at apple.com Wed Jul 12 16:05:21 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 12 Jul 2006 16:05:21 -0500 Subject: [llvm-commits] CVS: llvm-test/MultiSource/Applications/d/d.h symtab.c util.c write_ctables.c Message-ID: <200607122105.QAA10810@zion.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Applications/d: d.h updated: 1.1 -> 1.2 symtab.c updated: 1.1 -> 1.2 util.c updated: 1.1 -> 1.2 write_ctables.c updated: 1.2 -> 1.3 --- Log message: Fix some non-64-bit-clean code that causes mismatch between gcc / llvm. --- Diffs of the changes: (+4 -3) d.h | 1 + symtab.c | 2 +- util.c | 2 +- write_ctables.c | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) Index: llvm-test/MultiSource/Applications/d/d.h diff -u llvm-test/MultiSource/Applications/d/d.h:1.1 llvm-test/MultiSource/Applications/d/d.h:1.2 --- llvm-test/MultiSource/Applications/d/d.h:1.1 Thu Jan 1 10:50:35 2004 +++ llvm-test/MultiSource/Applications/d/d.h Wed Jul 12 16:05:09 2006 @@ -77,6 +77,7 @@ typedef short int16; typedef unsigned short uint16; /* typedef uint32 uint; * already part of most systems */ +typedef unsigned long ulong; #include "dparse.h" #include "arg.h" Index: llvm-test/MultiSource/Applications/d/symtab.c diff -u llvm-test/MultiSource/Applications/d/symtab.c:1.1 llvm-test/MultiSource/Applications/d/symtab.c:1.2 --- llvm-test/MultiSource/Applications/d/symtab.c:1.1 Thu Jan 1 10:50:36 2004 +++ llvm-test/MultiSource/Applications/d/symtab.c Wed Jul 12 16:05:09 2006 @@ -303,7 +303,7 @@ void print_scope(D_Scope *st) { - printf("SCOPE %X: ", (int)st); + printf("SCOPE %X: ", (long)st); printf(" owned: %d, kind: %d, ", st->owned_by_user, st->kind); if (st->ll) printf(" LL\n"); if (st->hash) printf(" HASH\n"); Index: llvm-test/MultiSource/Applications/d/util.c diff -u llvm-test/MultiSource/Applications/d/util.c:1.1 llvm-test/MultiSource/Applications/d/util.c:1.2 --- llvm-test/MultiSource/Applications/d/util.c:1.1 Thu Jan 1 10:50:36 2004 +++ llvm-test/MultiSource/Applications/d/util.c Wed Jul 12 16:05:09 2006 @@ -148,7 +148,7 @@ int j, n = v->n; uint i; if (n) { - uint h = ((uint)t); + ulong h = ((ulong)t); h = h % n; for (i = h, j = 0; i < v->n && j < SET_MAX_SEQUENTIAL; Index: llvm-test/MultiSource/Applications/d/write_ctables.c diff -u llvm-test/MultiSource/Applications/d/write_ctables.c:1.2 llvm-test/MultiSource/Applications/d/write_ctables.c:1.3 --- llvm-test/MultiSource/Applications/d/write_ctables.c:1.2 Fri Oct 21 01:38:55 2005 +++ llvm-test/MultiSource/Applications/d/write_ctables.c Wed Jul 12 16:05:09 2006 @@ -385,7 +385,7 @@ static void write_goto_data_as_C(FILE *fp, Grammar *g, char *tag) { - Vec(int) vgoto; + Vec(long) vgoto; State *s; uint8 *goto_valid = NULL; int i, j, x, again, lowest, nvalid_bytes, sym, lowest_sym; From lattner at cs.uiuc.edu Wed Jul 12 16:23:33 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 12 Jul 2006 16:23:33 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp PPCJITInfo.cpp PPCRelocations.h Message-ID: <200607122123.QAA11045@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCCodeEmitter.cpp updated: 1.62 -> 1.63 PPCJITInfo.cpp updated: 1.23 -> 1.24 PPCRelocations.h updated: 1.7 -> 1.8 --- Log message: Implement PPC64 relocations types --- Diffs of the changes: (+36 -5) PPCCodeEmitter.cpp | 23 ++++++++++++++++++++--- PPCJITInfo.cpp | 12 +++++++++++- PPCRelocations.h | 6 +++++- 3 files changed, 36 insertions(+), 5 deletions(-) Index: llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp diff -u llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp:1.62 llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp:1.63 --- llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp:1.62 Tue Jul 11 12:58:07 2006 +++ llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp Wed Jul 12 16:23:20 2006 @@ -162,16 +162,23 @@ switch (MI.getOpcode()) { default: DEBUG(MI.dump()); assert(0 && "Unknown instruction for relocation!"); case PPC::LIS: + case PPC::LIS8: + case PPC::ADDIS8: Reloc = PPC::reloc_absolute_high; // Pointer to symbol break; case PPC::LI: + case PPC::LI8: case PPC::LA: + // Loads. case PPC::LBZ: case PPC::LHA: case PPC::LHZ: case PPC::LWZ: case PPC::LFS: case PPC::LFD: + case PPC::LWZ8: + + // Stores. case PPC::STB: case PPC::STH: case PPC::STW: @@ -179,6 +186,13 @@ case PPC::STFD: Reloc = PPC::reloc_absolute_low; break; + + case PPC::LWA: + case PPC::LD: + case PPC::STD: + case PPC::STD_32: + Reloc = PPC::reloc_absolute_low_ix; + break; } } if (MO.isGlobalAddress()) @@ -197,16 +211,19 @@ rv = MCE.getJumpTableEntryAddress(MO.getJumpTableIndex()); unsigned Opcode = MI.getOpcode(); - if (Opcode == PPC::LIS || Opcode == PPC::ADDIS) { + if (Opcode == PPC::LIS || Opcode == PPC::LIS8 || + Opcode == PPC::ADDIS || Opcode == PPC::ADDIS8) { // lis wants hi16(addr) if ((short)rv < 0) rv += 1 << 16; rv >>= 16; - } else if (Opcode == PPC::LWZ || Opcode == PPC::LA || - Opcode == PPC::LI || + } else if (Opcode == PPC::LWZ || Opcode == PPC::LWZ8 || + Opcode == PPC::LA || + Opcode == PPC::LI || Opcode == PPC::LI8 || Opcode == PPC::LFS || Opcode == PPC::LFD) { // These load opcodes want lo16(addr) rv &= 0xffff; } else { + MI.dump(); assert(0 && "Unknown constant pool or jump table using instruction!"); } } else { Index: llvm/lib/Target/PowerPC/PPCJITInfo.cpp diff -u llvm/lib/Target/PowerPC/PPCJITInfo.cpp:1.23 llvm/lib/Target/PowerPC/PPCJITInfo.cpp:1.24 --- llvm/lib/Target/PowerPC/PPCJITInfo.cpp:1.23 Thu Jun 1 12:17:06 2006 +++ llvm/lib/Target/PowerPC/PPCJITInfo.cpp Wed Jul 12 16:23:20 2006 @@ -207,7 +207,7 @@ case PPC::reloc_absolute_ptr_high: // Pointer relocations. case PPC::reloc_absolute_ptr_low: case PPC::reloc_absolute_high: // high bits of ref -> low 16 of instr - case PPC::reloc_absolute_low: // low bits of ref -> low 16 of instr + case PPC::reloc_absolute_low: { // low bits of ref -> low 16 of instr ResultPtr += MR->getConstantVal(); // If this is a high-part access, get the high-part. @@ -227,6 +227,16 @@ *RelocPos = LowBits | HighBits; // Slam into low 16-bits break; } + case PPC::reloc_absolute_low_ix: { // low bits of ref -> low 14 of instr + ResultPtr += MR->getConstantVal(); + // Do the addition then mask, so the addition does not overflow the 16-bit + // immediate section of the instruction. + unsigned LowBits = (*RelocPos + ResultPtr) & 0xFFFC; + unsigned HighBits = *RelocPos & 0xFFFF0003; + *RelocPos = LowBits | HighBits; // Slam into low 14-bits. + break; + } + } } } Index: llvm/lib/Target/PowerPC/PPCRelocations.h diff -u llvm/lib/Target/PowerPC/PPCRelocations.h:1.7 llvm/lib/Target/PowerPC/PPCRelocations.h:1.8 --- llvm/lib/Target/PowerPC/PPCRelocations.h:1.7 Wed May 24 12:04:04 2006 +++ llvm/lib/Target/PowerPC/PPCRelocations.h Wed Jul 12 16:23:20 2006 @@ -34,9 +34,13 @@ reloc_absolute_high, // reloc_absolute_low - Absolute relocation, for the la instruction (which - // is really an addi). Add the low 16-bits of teh specified global + // is really an addi). Add the low 16-bits of the specified global // address into the low 16-bits of the instruction. reloc_absolute_low, + + // reloc_absolute_low_ix - Absolute relocation for the 64-bit load/store + // instruction which have two implicit zero bits. + reloc_absolute_low_ix, // reloc_absolute_ptr_high - Absolute relocation for references to lazy // pointer stubs. In this case, the relocated instruction should be From resistor at mac.com Wed Jul 12 16:29:26 2006 From: resistor at mac.com (Owen Anderson) Date: Wed, 12 Jul 2006 16:29:26 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp Message-ID: <200607122129.QAA11067@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: IndVarSimplify.cpp updated: 1.85 -> 1.86 --- Log message: IndVars now (correctly) preserves LCSSA form. --- Diffs of the changes: (+31 -15) IndVarSimplify.cpp | 46 +++++++++++++++++++++++++++++++--------------- 1 files changed, 31 insertions(+), 15 deletions(-) Index: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp diff -u llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.85 llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.86 --- llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.85 Tue Jul 11 02:25:33 2006 +++ llvm/lib/Transforms/Scalar/IndVarSimplify.cpp Wed Jul 12 16:29:14 2006 @@ -79,6 +79,7 @@ AU.addRequired(); AU.addRequired(); AU.addPreservedID(LoopSimplifyID); + AU.addPreservedID(LCSSAID); AU.setPreservesCFG(); } private: @@ -325,20 +326,8 @@ for (Value::use_iterator UI = I->use_begin(), E = I->use_end(); UI != E; ++UI) { Instruction *User = cast(*UI); - if (!L->contains(User->getParent())) { - // If this is a PHI node in the exit block and we're inserting, - // into the exit block, it must have a single entry. In this - // case, we can't insert the code after the PHI and have the PHI - // still use it. Instead, don't insert the the PHI. - if (PHINode *PN = dyn_cast(User)) { - // FIXME: This is a case where LCSSA pessimizes code, this - // should be fixed better. - if (PN->getNumOperands() == 2 && - PN->getParent() == BlockToInsertInto) - continue; - } + if (!L->contains(User->getParent())) ExtraLoopUsers.push_back(User); - } } if (!ExtraLoopUsers.empty()) { @@ -358,8 +347,35 @@ // Rewrite any users of the computed value outside of the loop // with the newly computed value. - for (unsigned i = 0, e = ExtraLoopUsers.size(); i != e; ++i) - ExtraLoopUsers[i]->replaceUsesOfWith(I, NewVal); + for (unsigned i = 0, e = ExtraLoopUsers.size(); i != e; ++i) { + PHINode* PN = dyn_cast(ExtraLoopUsers[i]); + if (PN && !L->contains(PN->getParent())) { + // We're dealing with an LCSSA Phi. Handle it specially. + Instruction* LCSSAInsertPt = BlockToInsertInto->begin(); + + Instruction* NewInstr = dyn_cast(NewVal); + if (NewInstr && !isa(NewInstr) && + !L->contains(NewInstr->getParent())) + for (unsigned j = 0; j < NewInstr->getNumOperands(); ++j){ + Instruction* PredI = + dyn_cast(NewInstr->getOperand(j)); + if (PredI && L->contains(PredI->getParent())) { + PHINode* NewLCSSA = new PHINode(PredI->getType(), + PredI->getName() + ".lcssa", + LCSSAInsertPt); + NewLCSSA->addIncoming(PredI, + BlockToInsertInto->getSinglePredecessor()); + + NewInstr->replaceUsesOfWith(PredI, NewLCSSA); + } + } + + PN->replaceAllUsesWith(NewVal); + PN->eraseFromParent(); + } else { + ExtraLoopUsers[i]->replaceUsesOfWith(I, NewVal); + } + } // If this instruction is dead now, schedule it to be removed. if (I->use_empty()) From lattner at cs.uiuc.edu Wed Jul 12 16:37:23 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 12 Jul 2006 16:37:23 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Utils/InlineFunction.cpp Message-ID: <200607122137.QAA11162@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Utils: InlineFunction.cpp updated: 1.44 -> 1.45 --- Log message: Handle instructions in the map, but that map to a null pointer. This unbreaks smg2000. --- Diffs of the changes: (+2 -1) InlineFunction.cpp | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/lib/Transforms/Utils/InlineFunction.cpp diff -u llvm/lib/Transforms/Utils/InlineFunction.cpp:1.44 llvm/lib/Transforms/Utils/InlineFunction.cpp:1.45 --- llvm/lib/Transforms/Utils/InlineFunction.cpp:1.44 Wed Jul 12 13:37:18 2006 +++ llvm/lib/Transforms/Utils/InlineFunction.cpp Wed Jul 12 16:37:11 2006 @@ -157,7 +157,8 @@ const Instruction *OrigCall = I->first.getInstruction(); std::map::iterator VMI = ValueMap.find(OrigCall); - if (VMI != ValueMap.end()) { // Only copy the edge if the call was inlined! + // Only copy the edge if the call was inlined! + if (VMI != ValueMap.end() && VMI->second) { // If the call was inlined, but then constant folded, there is no edge to // add. Check for this case. if (Instruction *NewCall = dyn_cast(VMI->second)) From lattner at cs.uiuc.edu Wed Jul 12 17:08:26 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 12 Jul 2006 17:08:26 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCInstrFormats.td Message-ID: <200607122208.RAA11421@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCInstrFormats.td updated: 1.77 -> 1.78 --- Log message: Fix encoding of rotates, such as rldicl --- Diffs of the changes: (+3 -3) PPCInstrFormats.td | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/lib/Target/PowerPC/PPCInstrFormats.td diff -u llvm/lib/Target/PowerPC/PPCInstrFormats.td:1.77 llvm/lib/Target/PowerPC/PPCInstrFormats.td:1.78 --- llvm/lib/Target/PowerPC/PPCInstrFormats.td:1.77 Tue Jun 27 15:07:26 2006 +++ llvm/lib/Target/PowerPC/PPCInstrFormats.td Wed Jul 12 17:08:13 2006 @@ -619,10 +619,10 @@ let Inst{6-10} = RS; let Inst{11-15} = RA; - let Inst{16-20} = SH{1-5}; - let Inst{21-26} = MBE; + let Inst{16-20} = { SH{4}, SH{3}, SH{2}, SH{1}, SH{0} }; + let Inst{21-26} = { MBE{4}, MBE{3}, MBE{2}, MBE{1}, MBE{0}, MBE{5} }; let Inst{27-29} = xo; - let Inst{30} = SH{0}; + let Inst{30} = SH{5}; let Inst{31} = RC; } From lattner at cs.uiuc.edu Wed Jul 12 17:37:30 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 12 Jul 2006 17:37:30 -0500 Subject: [llvm-commits] CVS: llvm/lib/System/Unix/Program.inc Message-ID: <200607122237.RAA11675@zion.cs.uiuc.edu> Changes in directory llvm/lib/System/Unix: Program.inc updated: 1.18 -> 1.19 --- Log message: Turn an if into an else if. --- Diffs of the changes: (+2 -2) Program.inc | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/System/Unix/Program.inc diff -u llvm/lib/System/Unix/Program.inc:1.18 llvm/lib/System/Unix/Program.inc:1.19 --- llvm/lib/System/Unix/Program.inc:1.18 Fri Jun 9 15:43:11 2006 +++ llvm/lib/System/Unix/Program.inc Wed Jul 12 17:37:18 2006 @@ -208,12 +208,12 @@ // Return the proper exit status. 0=success, >0 is programs' exit status, // <0 means a signal was returned, -9999999 means the program dumped core. int result = 0; - if (WIFEXITED (status)) + if (WIFEXITED(status)) result = WEXITSTATUS(status); else if (WIFSIGNALED(status)) result = 0 - WTERMSIG(status); #ifdef WCOREDUMP - if (WCOREDUMP(status)) + else if (WCOREDUMP(status)) result |= 0x01000000; #endif return result; From lattner at cs.uiuc.edu Wed Jul 12 18:24:14 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 12 Jul 2006 18:24:14 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp Message-ID: <200607122324.SAA12057@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCAsmPrinter.cpp updated: 1.185 -> 1.186 --- Log message: Print negative immediates as negative values instead of large constants when using the immshifted addressing mode. --- Diffs of the changes: (+1 -1) PPCAsmPrinter.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp diff -u llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.185 llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.186 --- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.185 Wed Jun 28 18:17:23 2006 +++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp Wed Jul 12 18:24:02 2006 @@ -125,7 +125,7 @@ O << (unsigned short)MI->getOperand(OpNo).getImmedValue(); } void printS16X4ImmOperand(const MachineInstr *MI, unsigned OpNo) { - O << (short)MI->getOperand(OpNo).getImmedValue()*4; + O << (short)(MI->getOperand(OpNo).getImmedValue()*4); } void printBranchOperand(const MachineInstr *MI, unsigned OpNo) { // Branches can take an immediate operand. This is used by the branch From jlaskey at apple.com Thu Jul 13 10:28:08 2006 From: jlaskey at apple.com (Jim Laskey) Date: Thu, 13 Jul 2006 10:28:08 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp MachineDebugInfo.cpp Message-ID: <200607131528.KAA28001@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: DwarfWriter.cpp updated: 1.68 -> 1.69 MachineDebugInfo.cpp updated: 1.45 -> 1.46 --- Log message: Fixed a bug handling void function types. Requires rebuild of llvm-gcc4 (touch llvm-debug.cpp.) --- Diffs of the changes: (+21 -12) DwarfWriter.cpp | 2 +- MachineDebugInfo.cpp | 31 ++++++++++++++++++++----------- 2 files changed, 21 insertions(+), 12 deletions(-) Index: llvm/lib/CodeGen/DwarfWriter.cpp diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.68 llvm/lib/CodeGen/DwarfWriter.cpp:1.69 --- llvm/lib/CodeGen/DwarfWriter.cpp:1.68 Tue Jul 11 10:58:09 2006 +++ llvm/lib/CodeGen/DwarfWriter.cpp Thu Jul 13 10:27:42 2006 @@ -1413,7 +1413,7 @@ Ty->AddUInt(DW_AT_prototyped, DW_FORM_flag, 1); // Add return type. Ty->AddDIEntry(DW_AT_type, DW_FORM_ref4, - NewType(Context, cast(Elements[0]), Unit)); + NewType(Context, dyn_cast(Elements[0]), Unit)); // Add arguments. for(unsigned i = 1, N = Elements.size(); i < N; ++i) { Index: llvm/lib/CodeGen/MachineDebugInfo.cpp diff -u llvm/lib/CodeGen/MachineDebugInfo.cpp:1.45 llvm/lib/CodeGen/MachineDebugInfo.cpp:1.46 --- llvm/lib/CodeGen/MachineDebugInfo.cpp:1.45 Tue Jul 11 10:58:09 2006 +++ llvm/lib/CodeGen/MachineDebugInfo.cpp Thu Jul 13 10:27:42 2006 @@ -223,16 +223,21 @@ Field = getGlobalVariable(C); } virtual void Apply(std::vector &Field) { + Field.resize(0); Constant *C = CI->getOperand(I++); GlobalVariable *GV = getGlobalVariable(C); - Field.resize(0); - // Have to be able to deal with the empty array case (zero initializer) - if (!GV->hasInitializer()) return; - if (ConstantArray *CA = dyn_cast(GV->getInitializer())) { - for (unsigned i = 0, N = CA->getNumOperands(); i < N; ++i) { - GlobalVariable *GVE = getGlobalVariable(CA->getOperand(i)); - DebugInfoDesc *DE = DR.Deserialize(GVE); - Field.push_back(DE); + if (GV->hasInitializer()) { + if (ConstantArray *CA = dyn_cast(GV->getInitializer())) { + for (unsigned i = 0, N = CA->getNumOperands(); i < N; ++i) { + GlobalVariable *GVE = getGlobalVariable(CA->getOperand(i)); + DebugInfoDesc *DE = DR.Deserialize(GVE); + Field.push_back(DE); + } + } else if (GV->getInitializer()->isNullValue()) { + if (const ArrayType *T = + dyn_cast(GV->getType()->getElementType())) { + Field.resize(T->getNumElements()); + } } } } @@ -305,9 +310,13 @@ std::vector ArrayElements; for (unsigned i = 0, N = Field.size(); i < N; ++i) { - GlobalVariable *GVE = SR.Serialize(Field[i]); - Constant *CE = ConstantExpr::getCast(GVE, EmptyTy); - ArrayElements.push_back(cast(CE)); + if (DebugInfoDesc *Element = Field[i]) { + GlobalVariable *GVE = SR.Serialize(Element); + Constant *CE = ConstantExpr::getCast(GVE, EmptyTy); + ArrayElements.push_back(cast(CE)); + } else { + ArrayElements.push_back(ConstantPointerNull::get(EmptyTy)); + } } Constant *CA = ConstantArray::get(AT, ArrayElements); From pjenkins at apple.com Thu Jul 13 11:57:00 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Thu, 13 Jul 2006 11:57:00 -0500 Subject: [llvm-commits] CVS: llvm/utils/NewNightlyTest.pl Message-ID: <200607131657.LAA28462@zion.cs.uiuc.edu> Changes in directory llvm/utils: NewNightlyTest.pl updated: 1.9 -> 1.10 --- Log message: Fixed some small bugs exposed when trying to get a sparc machine to run the script. Specifically some misnamed variables. --- Diffs of the changes: (+6 -6) NewNightlyTest.pl | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) Index: llvm/utils/NewNightlyTest.pl diff -u llvm/utils/NewNightlyTest.pl:1.9 llvm/utils/NewNightlyTest.pl:1.10 --- llvm/utils/NewNightlyTest.pl:1.9 Mon Jul 10 13:35:41 2006 +++ llvm/utils/NewNightlyTest.pl Thu Jul 13 11:56:48 2006 @@ -542,7 +542,7 @@ $ModifiedFiles{$Filename} = 1; $UsersCommitted{$UID} = 1; } elsif ($Type eq 'A') { # Added - $Addediles{$Filename} = 1; + $AddedFiles{$Filename} = 1; $UsersCommitted{$UID} = 1; } elsif ($Type eq 'R') { # Removed $RemovedFiles{$Filename} = 1; @@ -569,7 +569,7 @@ # ############################################################## if (!$NOCHECKOUT && !$NOBUILD) { - my $EXTRAFLAGS = "--enable-spec --with-objroot=.$LLVMTESTCONFIGARGS"; + my $EXTRAFLAGS = "--enable-spec --with-objroot=."; if ( $VERBOSE ) { print "CONFIGURE STAGE:\n"; @@ -766,18 +766,18 @@ if ( $VERBOSE ) { print "SingleSource TEST STAGE\n"; } - ($SingleSourceProgramsTable, $singlesource_llcbeta_options) = TestDirectory("SingleSource"); + ($SingleSourceProgramsTable, $llcbeta_options) = TestDirectory("SingleSource"); WriteFile "$Prefix-singlesourceprogramstable.txt", $SingleSourceProgramsTable; if ( $VERBOSE ) { print "MultiSource TEST STAGE\n"; } - ($MultiSourceProgramsTable, $multisource_llcbeta_options) = TestDirectory("MultiSource"); + ($MultiSourceProgramsTable, $llcbeta_options) = TestDirectory("MultiSource"); WriteFile "$Prefix-multisourceprogramstable.txt", $MultiSourceProgramsTable; if ( ! $NOEXTERNALS ) { if ( $VERBOSE ) { print "External TEST STAGE\n"; } - ($ExternalProgramsTable, $externalsource_llcbeta_options) = TestDirectory("External"); + ($ExternalProgramsTable, llcbeta_options) = TestDirectory("External"); WriteFile "$Prefix-externalprogramstable.txt", $ExternalProgramsTable; system "cat $Prefix-singlesourceprogramstable.txt $Prefix-multisourceprogramstable.txt ". " $Prefix-externalprogramstable.txt | sort > $Prefix-Tests.txt"; @@ -1025,6 +1025,6 @@ # ############################################################## system ( "$NICE rm -rf $BuildDir") if (!$NOCHECKOUT and !$NOREMOVE); -system ( "$NICE rm -rf $WebDir") if (!$NOCHECKOUT and !$NOREMOVE and !NOREMOVERESULTS); +system ( "$NICE rm -rf $WebDir") if (!$NOCHECKOUT and !$NOREMOVE and !$NOREMOVERESULTS); From pjenkins at apple.com Thu Jul 13 11:58:55 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Thu, 13 Jul 2006 11:58:55 -0500 Subject: [llvm-commits] CVS: llvm/utils/NewNightlyTest.pl Message-ID: <200607131658.LAA28478@zion.cs.uiuc.edu> Changes in directory llvm/utils: NewNightlyTest.pl updated: 1.10 -> 1.11 --- Log message: Syntax error. I will run perl -c before commiting perl scripts. --- Diffs of the changes: (+1 -1) NewNightlyTest.pl | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/utils/NewNightlyTest.pl diff -u llvm/utils/NewNightlyTest.pl:1.10 llvm/utils/NewNightlyTest.pl:1.11 --- llvm/utils/NewNightlyTest.pl:1.10 Thu Jul 13 11:56:48 2006 +++ llvm/utils/NewNightlyTest.pl Thu Jul 13 11:58:42 2006 @@ -777,7 +777,7 @@ if ( $VERBOSE ) { print "External TEST STAGE\n"; } - ($ExternalProgramsTable, llcbeta_options) = TestDirectory("External"); + ($ExternalProgramsTable, $llcbeta_options) = TestDirectory("External"); WriteFile "$Prefix-externalprogramstable.txt", $ExternalProgramsTable; system "cat $Prefix-singlesourceprogramstable.txt $Prefix-multisourceprogramstable.txt ". " $Prefix-externalprogramstable.txt | sort > $Prefix-Tests.txt"; From lattner at cs.uiuc.edu Thu Jul 13 14:05:32 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 13 Jul 2006 14:05:32 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp Message-ID: <200607131905.OAA29513@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: IndVarSimplify.cpp updated: 1.86 -> 1.87 --- Log message: Revert this patch temporarily until PR831: http://llvm.org/PR831 is fixed. --- Diffs of the changes: (+15 -31) IndVarSimplify.cpp | 46 +++++++++++++++------------------------------- 1 files changed, 15 insertions(+), 31 deletions(-) Index: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp diff -u llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.86 llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.87 --- llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.86 Wed Jul 12 16:29:14 2006 +++ llvm/lib/Transforms/Scalar/IndVarSimplify.cpp Thu Jul 13 14:05:20 2006 @@ -79,7 +79,6 @@ AU.addRequired(); AU.addRequired(); AU.addPreservedID(LoopSimplifyID); - AU.addPreservedID(LCSSAID); AU.setPreservesCFG(); } private: @@ -326,8 +325,20 @@ for (Value::use_iterator UI = I->use_begin(), E = I->use_end(); UI != E; ++UI) { Instruction *User = cast(*UI); - if (!L->contains(User->getParent())) + if (!L->contains(User->getParent())) { + // If this is a PHI node in the exit block and we're inserting, + // into the exit block, it must have a single entry. In this + // case, we can't insert the code after the PHI and have the PHI + // still use it. Instead, don't insert the the PHI. + if (PHINode *PN = dyn_cast(User)) { + // FIXME: This is a case where LCSSA pessimizes code, this + // should be fixed better. + if (PN->getNumOperands() == 2 && + PN->getParent() == BlockToInsertInto) + continue; + } ExtraLoopUsers.push_back(User); + } } if (!ExtraLoopUsers.empty()) { @@ -347,35 +358,8 @@ // Rewrite any users of the computed value outside of the loop // with the newly computed value. - for (unsigned i = 0, e = ExtraLoopUsers.size(); i != e; ++i) { - PHINode* PN = dyn_cast(ExtraLoopUsers[i]); - if (PN && !L->contains(PN->getParent())) { - // We're dealing with an LCSSA Phi. Handle it specially. - Instruction* LCSSAInsertPt = BlockToInsertInto->begin(); - - Instruction* NewInstr = dyn_cast(NewVal); - if (NewInstr && !isa(NewInstr) && - !L->contains(NewInstr->getParent())) - for (unsigned j = 0; j < NewInstr->getNumOperands(); ++j){ - Instruction* PredI = - dyn_cast(NewInstr->getOperand(j)); - if (PredI && L->contains(PredI->getParent())) { - PHINode* NewLCSSA = new PHINode(PredI->getType(), - PredI->getName() + ".lcssa", - LCSSAInsertPt); - NewLCSSA->addIncoming(PredI, - BlockToInsertInto->getSinglePredecessor()); - - NewInstr->replaceUsesOfWith(PredI, NewLCSSA); - } - } - - PN->replaceAllUsesWith(NewVal); - PN->eraseFromParent(); - } else { - ExtraLoopUsers[i]->replaceUsesOfWith(I, NewVal); - } - } + for (unsigned i = 0, e = ExtraLoopUsers.size(); i != e; ++i) + ExtraLoopUsers[i]->replaceUsesOfWith(I, NewVal); // If this instruction is dead now, schedule it to be removed. if (I->use_empty()) From jlaskey at apple.com Thu Jul 13 16:03:05 2006 From: jlaskey at apple.com (Jim Laskey) Date: Thu, 13 Jul 2006 16:03:05 -0500 Subject: [llvm-commits] CVS: llvm/utils/TableGen/CodeEmitterGen.h CodeEmitterGen.cpp Message-ID: <200607132103.QAA30336@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: CodeEmitterGen.h updated: 1.12 -> 1.13 CodeEmitterGen.cpp updated: 1.46 -> 1.47 --- Log message: 1. Simplfy bit operations. 2. Coalesce instruction cases. --- Diffs of the changes: (+118 -183) CodeEmitterGen.cpp | 293 ++++++++++++++++++++--------------------------------- CodeEmitterGen.h | 8 - 2 files changed, 118 insertions(+), 183 deletions(-) Index: llvm/utils/TableGen/CodeEmitterGen.h diff -u llvm/utils/TableGen/CodeEmitterGen.h:1.12 llvm/utils/TableGen/CodeEmitterGen.h:1.13 --- llvm/utils/TableGen/CodeEmitterGen.h:1.12 Thu Apr 21 19:00:35 2005 +++ llvm/utils/TableGen/CodeEmitterGen.h Thu Jul 13 16:02:53 2006 @@ -17,10 +17,12 @@ #include "TableGenBackend.h" #include #include +#include namespace llvm { class RecordVal; +class BitsInit; class CodeEmitterGen : public TableGenBackend { RecordKeeper &Records; @@ -32,10 +34,8 @@ private: void emitMachineOpEmitter(std::ostream &o, const std::string &Namespace); void emitGetValueBit(std::ostream &o, const std::string &Namespace); - void emitInstrOpBits(std::ostream &o, - const std::vector &Vals, - std::map &OpOrder, - std::map &OpContinuous); + void reverseBits(std::vector &Insts); + int getVariableBit(const std::string &VarName, BitsInit *BI, int bit); }; } // End llvm namespace Index: llvm/utils/TableGen/CodeEmitterGen.cpp diff -u llvm/utils/TableGen/CodeEmitterGen.cpp:1.46 llvm/utils/TableGen/CodeEmitterGen.cpp:1.47 --- llvm/utils/TableGen/CodeEmitterGen.cpp:1.46 Wed Jul 12 14:15:43 2006 +++ llvm/utils/TableGen/CodeEmitterGen.cpp Thu Jul 13 16:02:53 2006 @@ -16,64 +16,58 @@ #include "CodeEmitterGen.h" #include "CodeGenTarget.h" #include "Record.h" +#include "llvm/ADT/StringExtras.h" #include "llvm/Support/Debug.h" using namespace llvm; -void CodeEmitterGen::emitInstrOpBits(std::ostream &o, - const std::vector &Vals, - std::map &OpOrder, - std::map &OpContinuous) -{ - for (unsigned f = 0, e = Vals.size(); f != e; ++f) { - if (Vals[f].getPrefix()) { - BitsInit *FieldInitializer = (BitsInit*)Vals[f].getValue(); - - // Scan through the field looking for bit initializers of the current - // variable... - for (int i = FieldInitializer->getNumBits()-1; i >= 0; --i) { - Init *I = FieldInitializer->getBit(i); - if (BitInit *BI = dynamic_cast(I)) { - DEBUG(o << " // bit init: f: " << f << ", i: " << i << "\n"); - } else if (UnsetInit *UI = dynamic_cast(I)) { - DEBUG(o << " // unset init: f: " << f << ", i: " << i << "\n"); - } else if (VarBitInit *VBI = dynamic_cast(I)) { - TypedInit *TI = VBI->getVariable(); - if (VarInit *VI = dynamic_cast(TI)) { - // If the bits of the field are laid out consecutively in the - // instruction, then instead of separately ORing in bits, just - // mask and shift the entire field for efficiency. - if (OpContinuous[VI->getName()]) { - // already taken care of in the loop above, thus there is no - // need to individually OR in the bits - - // for debugging, output the regular version anyway, commented - DEBUG(o << " // Value |= getValueBit(op" - << OpOrder[VI->getName()] << ", " << VBI->getBitNum() - << ")" << " << " << i << ";\n"); - } else { - o << " Value |= getValueBit(op" << OpOrder[VI->getName()] - << ", " << VBI->getBitNum() - << ")" << " << " << i << ";\n"; - } - } else if (FieldInit *FI = dynamic_cast(TI)) { - // FIXME: implement this! - std::cerr << "Error: FieldInit not implemented!\n"; - abort(); - } else { - std::cerr << "Error: unimplemented case in " - << "CodeEmitterGen::emitInstrOpBits()\n"; - abort(); - } - } - } +void CodeEmitterGen::reverseBits(std::vector &Insts) { + for (std::vector::iterator I = Insts.begin(), E = Insts.end(); + I != E; ++I) { + Record *R = *I; + if (R->getName() == "PHI" || R->getName() == "INLINEASM") continue; + + BitsInit *BI = R->getValueAsBitsInit("Inst"); + + unsigned numBits = BI->getNumBits(); + BitsInit *NewBI = new BitsInit(numBits); + for (unsigned bit = 0, end = numBits / 2; bit != end; ++bit) { + unsigned bitSwapIdx = numBits - bit - 1; + Init *OrigBit = BI->getBit(bit); + Init *BitSwap = BI->getBit(bitSwapIdx); + NewBI->setBit(bit, BitSwap); + NewBI->setBit(bitSwapIdx, OrigBit); + } + if (numBits % 2) { + unsigned middle = (numBits + 1) / 2; + NewBI->setBit(middle, BI->getBit(middle)); } + + // Update the bits in reversed order so that emitInstrOpBits will get the + // correct endianness. + R->getValue("Inst")->setValue(NewBI); } } +int CodeEmitterGen::getVariableBit(const std::string &VarName, BitsInit *BI, int bit){ + if (VarBitInit *VBI = dynamic_cast(BI->getBit(bit))) { + TypedInit *TI = VBI->getVariable(); + + if (VarInit *VI = dynamic_cast(TI)) { + if (VI->getName() == VarName) return VBI->getBitNum(); + } + } + + return -1; +} + + void CodeEmitterGen::run(std::ostream &o) { CodeGenTarget Target; std::vector Insts = Records.getAllDerivedDefinitions("Instruction"); + + // For little-endian instruction bit encodings, reverse the bit order + if (Target.isLittleEndianEncoding()) reverseBits(Insts); EmitSourceFileHeader("Machine Code Emitter", o); std::string Namespace = Insts[0]->getValueAsString("Namespace") + "::"; @@ -103,28 +97,6 @@ BitsInit *BI = R->getValueAsBitsInit("Inst"); - // For little-endian instruction bit encodings, reverse the bit order - if (Target.isLittleEndianEncoding()) { - unsigned numBits = BI->getNumBits(); - BitsInit *NewBI = new BitsInit(numBits); - for (unsigned bit = 0, end = numBits / 2; bit != end; ++bit) { - unsigned bitSwapIdx = numBits - bit - 1; - Init *OrigBit = BI->getBit(bit); - Init *BitSwap = BI->getBit(bitSwapIdx); - NewBI->setBit(bit, BitSwap); - NewBI->setBit(bitSwapIdx, OrigBit); - } - if (numBits % 2) { - unsigned middle = (numBits + 1) / 2; - NewBI->setBit(middle, BI->getBit(middle)); - } - BI = NewBI; - - // Update the bits in reversed order so that emitInstrOpBits will get the - // correct endianness. - R->getValue("Inst")->setValue(NewBI); - } - unsigned Value = 0; const std::vector &Vals = R->getValues(); @@ -137,136 +109,99 @@ o << " " << Value << "U"; } o << "\n };\n"; - - // Emit initial function code - o << " const unsigned opcode = MI.getOpcode();\n" - << " unsigned Value = InstBits[opcode];\n" - << " switch (opcode) {\n"; - - // Emit a case statement for each opcode - for (std::vector::iterator I = Insts.begin(), E = Insts.end(); - I != E; ++I) { - Record *R = *I; - if (R->getName() == "PHI" || R->getName() == "INLINEASM") continue; + + // Map to accumulate all the cases. + std::map > CaseMap; + + // Construct all cases statement for each opcode + for (std::vector::iterator IC = Insts.begin(), EC = Insts.end(); + IC != EC; ++IC) { + Record *R = *IC; + const std::string &InstName = R->getName(); + std::string Case(""); + + if (InstName == "PHI" || InstName == "INLINEASM") continue; - o << " case " << Namespace << R->getName() << ": {\n"; - BitsInit *BI = R->getValueAsBitsInit("Inst"); const std::vector &Vals = R->getValues(); // Loop over all of the fields in the instruction, determining which are the // operands to the instruction. unsigned op = 0; - std::map OpOrder; - std::map OpContinuous; for (unsigned i = 0, e = Vals.size(); i != e; ++i) { if (!Vals[i].getPrefix() && !Vals[i].getValue()->isComplete()) { // Is the operand continuous? If so, we can just mask and OR it in // instead of doing it bit-by-bit, saving a lot in runtime cost. - BitsInit *InstInit = BI; - int beginBitInVar = -1, endBitInVar = -1; - int beginBitInInst = -1, endBitInInst = -1; - bool continuous = true; - - for (int bit = InstInit->getNumBits()-1; bit >= 0; --bit) { - if (VarBitInit *VBI = - dynamic_cast(InstInit->getBit(bit))) { - TypedInit *TI = VBI->getVariable(); - if (VarInit *VI = dynamic_cast(TI)) { - // only process the current variable - if (VI->getName() != Vals[i].getName()) - continue; - - if (beginBitInVar == -1) - beginBitInVar = VBI->getBitNum(); - - if (endBitInVar == -1) - endBitInVar = VBI->getBitNum(); - else { - if (endBitInVar == (int)VBI->getBitNum() + 1) - endBitInVar = VBI->getBitNum(); - else { - continuous = false; - break; - } - } - - if (beginBitInInst == -1) - beginBitInInst = bit; - if (endBitInInst == -1) - endBitInInst = bit; - else { - if (endBitInInst == bit + 1) - endBitInInst = bit; - else { - continuous = false; - break; - } - } - - // maintain same distance between bits in field and bits in - // instruction. if the relative distances stay the same - // throughout, - if (beginBitInVar - (int)VBI->getBitNum() != - beginBitInInst - bit) { - continuous = false; - break; - } + const std::string &VarName = Vals[i].getName(); + bool gotOp = false; + + for (int bit = BI->getNumBits()-1; bit >= 0; ) { + int varBit = getVariableBit(VarName, BI, bit); + + if (varBit == -1) { + --bit; + } else { + int beginInstBit = bit; + int beginVarBit = varBit; + int N = 1; + + for (--bit; bit >= 0;) { + varBit = getVariableBit(VarName, BI, bit); + if (varBit == -1 || varBit != (beginVarBit - N)) break; + ++N; + --bit; } - } - } - // If we have found no bit in "Inst" which comes from this field, then - // this is not an operand!! - if (beginBitInInst != -1) { - o << " // op" << op << ": " << Vals[i].getName() << "\n" - << " int op" << op - <<" = getMachineOpValue(MI, MI.getOperand("<= 0 && "Negative shift amount in masking!"); - if (endBitInVar != 0) { - o << " op" << OpOrder[Vals[i].getName()] - << " >>= " << endBitInVar << ";\n"; - beginBitInVar -= endBitInVar; - endBitInVar = 0; + if (!gotOp) { + Case += " // op: " + VarName + "\n" + + " op = getMachineOpValue(MI, MI.getOperand(" + + utostr(op++) + + "));\n"; + gotOp = true; + } + + unsigned opMask = (1 << N) - 1; + int opShift = beginVarBit - N + 1; + opMask <<= opShift; + opShift = beginInstBit - beginVarBit; + + if (opShift > 0) { + Case += " Value |= (op & " + utostr(opMask) + "U) << " + + itostr(opShift) + ";\n"; + } else if (opShift < 0) { + Case += " Value |= (op & " + utostr(opMask) + "U) >> " + + itostr(-opShift) + ";\n"; + } else { + Case += " Value |= op & " + utostr(opMask) + "U;\n"; } - - // High mask - o << " op" << OpOrder[Vals[i].getName()] - << " &= (1<<" << beginBitInVar+1 << ") - 1;\n"; - - // Shift the value to the correct place (according to place in inst) - assert(endBitInInst >= 0 && "Negative shift amount!"); - if (endBitInInst != 0) - o << " op" << OpOrder[Vals[i].getName()] - << " <<= " << endBitInInst << ";\n"; - - // Just OR in the result - o << " Value |= op" << OpOrder[Vals[i].getName()] << ";\n"; } - - // otherwise, will be taken care of in the loop below using this - // value: - OpContinuous[Vals[i].getName()] = continuous; } } } - emitInstrOpBits(o, Vals, OpOrder, OpContinuous); + std::vector &InstList = CaseMap[Case]; + InstList.push_back(InstName); + } + + // Emit initial function code + o << " const unsigned opcode = MI.getOpcode();\n" + << " unsigned Value = InstBits[opcode];\n" + << " unsigned op;\n" + << " switch (opcode) {\n"; + + // Emit each case statement + std::map >::iterator IE, EE; + for (IE = CaseMap.begin(), EE = CaseMap.end(); IE != EE; ++IE) { + const std::string &Case = IE->first; + std::vector &InstList = IE->second; + + for (int i = 0, N = InstList.size(); i < N; i++) { + if (i) o << "\n"; + o << " case " << Namespace << InstList[i] << ":"; + } + o << " {\n"; + o << Case; o << " break;\n" << " }\n"; } From lattner at cs.uiuc.edu Thu Jul 13 16:52:54 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 13 Jul 2006 16:52:54 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCInstrFormats.td Message-ID: <200607132152.QAA30585@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCInstrFormats.td updated: 1.78 -> 1.79 --- Log message: Another fix in the rotate encodings, needed when the first two operands are not the same. --- Diffs of the changes: (+1 -1) PPCInstrFormats.td | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/PowerPC/PPCInstrFormats.td diff -u llvm/lib/Target/PowerPC/PPCInstrFormats.td:1.78 llvm/lib/Target/PowerPC/PPCInstrFormats.td:1.79 --- llvm/lib/Target/PowerPC/PPCInstrFormats.td:1.78 Wed Jul 12 17:08:13 2006 +++ llvm/lib/Target/PowerPC/PPCInstrFormats.td Thu Jul 13 16:52:41 2006 @@ -608,8 +608,8 @@ class MDForm_1 opcode, bits<3> xo, dag OL, string asmstr, InstrItinClass itin, list pattern> : I { - bits<5> RS; bits<5> RA; + bits<5> RS; bits<6> SH; bits<6> MBE; From jlaskey at apple.com Thu Jul 13 17:17:21 2006 From: jlaskey at apple.com (Jim Laskey) Date: Thu, 13 Jul 2006 17:17:21 -0500 Subject: [llvm-commits] CVS: llvm/utils/TableGen/CodeEmitterGen.cpp Message-ID: <200607132217.RAA30819@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: CodeEmitterGen.cpp updated: 1.47 -> 1.48 --- Log message: Clean up. --- Diffs of the changes: (+4 -1) CodeEmitterGen.cpp | 5 ++++- 1 files changed, 4 insertions(+), 1 deletion(-) Index: llvm/utils/TableGen/CodeEmitterGen.cpp diff -u llvm/utils/TableGen/CodeEmitterGen.cpp:1.47 llvm/utils/TableGen/CodeEmitterGen.cpp:1.48 --- llvm/utils/TableGen/CodeEmitterGen.cpp:1.47 Thu Jul 13 16:02:53 2006 +++ llvm/utils/TableGen/CodeEmitterGen.cpp Thu Jul 13 17:17:08 2006 @@ -49,7 +49,10 @@ } -int CodeEmitterGen::getVariableBit(const std::string &VarName, BitsInit *BI, int bit){ +// If the VarBitInit at position 'bit' matches the specified variable then +// return the variable bit position. Otherwise return -1. +int CodeEmitterGen::getVariableBit(const std::string &VarName, + BitsInit *BI, int bit) { if (VarBitInit *VBI = dynamic_cast(BI->getBit(bit))) { TypedInit *TI = VBI->getVariable(); From jlaskey at apple.com Thu Jul 13 17:18:11 2006 From: jlaskey at apple.com (Jim Laskey) Date: Thu, 13 Jul 2006 17:18:11 -0500 Subject: [llvm-commits] CVS: llvm/Xcode/LLVM.xcodeproj/project.pbxproj Message-ID: <200607132218.RAA30831@zion.cs.uiuc.edu> Changes in directory llvm/Xcode/LLVM.xcodeproj: project.pbxproj updated: 1.20 -> 1.21 --- Log message: Bring the Xcode project up to date. --- Diffs of the changes: (+130 -437) project.pbxproj | 567 ++++++++++++-------------------------------------------- 1 files changed, 130 insertions(+), 437 deletions(-) Index: llvm/Xcode/LLVM.xcodeproj/project.pbxproj diff -u llvm/Xcode/LLVM.xcodeproj/project.pbxproj:1.20 llvm/Xcode/LLVM.xcodeproj/project.pbxproj:1.21 --- llvm/Xcode/LLVM.xcodeproj/project.pbxproj:1.20 Sat Apr 8 01:04:56 2006 +++ llvm/Xcode/LLVM.xcodeproj/project.pbxproj Thu Jul 13 17:17:58 2006 @@ -12,19 +12,6 @@ buildConfigurationList = CF0329C708D1BEC40030FD33 /* Build configuration list for PBXAggregateTarget "LLVM full llc" */; buildPhases = ( ); - buildSettings = { - OPTIMIZATION_CFLAGS = ""; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM full llc"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; dependencies = ( CF0329BE08D1BE970030FD33 /* PBXTargetDependency */, CF0329C008D1BE9B0030FD33 /* PBXTargetDependency */, @@ -34,32 +21,6 @@ }; /* End PBXAggregateTarget section */ -/* Begin PBXBuildStyle section */ - 014CEA520018CE5811CA2923 /* Debug */ = { - isa = PBXBuildStyle; - buildSettings = { - COPY_PHASE_STRIP = NO; - DEBUGGING_SYMBOLS = YES; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - OPTIMIZATION_CFLAGS = "-O0"; - ZERO_LINK = YES; - }; - name = Debug; - }; - 014CEA530018CE5811CA2923 /* Release */ = { - isa = PBXBuildStyle; - buildSettings = { - COPY_PHASE_STRIP = YES; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - ZERO_LINK = NO; - }; - name = Release; - }; -/* End PBXBuildStyle section */ - /* Begin PBXContainerItemProxy section */ CF0329BD08D1BE970030FD33 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; @@ -80,37 +41,8 @@ /* Begin PBXFileReference section */ CF1ACC9709C9DE4400D3C5EB /* IntrinsicInst.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IntrinsicInst.cpp; path = ../lib/VMCore/IntrinsicInst.cpp; sourceTree = ""; }; CF26835B09178F5500C5F253 /* TargetInstrItineraries.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TargetInstrItineraries.h; sourceTree = ""; }; - CF490CD50903C9260072DB1C /* PPC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPC.h; sourceTree = ""; }; - CF490CD60903C9260072DB1C /* PPCAsmPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCAsmPrinter.cpp; sourceTree = ""; }; - CF490CD70903C9260072DB1C /* PPCBranchSelector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCBranchSelector.cpp; sourceTree = ""; }; - CF490CD80903C9260072DB1C /* PPCCodeEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCCodeEmitter.cpp; sourceTree = ""; }; - CF490CD90903C9260072DB1C /* PPCFrameInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCFrameInfo.h; sourceTree = ""; }; - CF490CDA0903C9260072DB1C /* PPCInstrBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCInstrBuilder.h; sourceTree = ""; }; - CF490CDB0903C9260072DB1C /* PPCInstrFormats.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPCInstrFormats.td; sourceTree = ""; }; - CF490CDC0903C9260072DB1C /* PPCInstrInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCInstrInfo.cpp; sourceTree = ""; }; - CF490CDD0903C9260072DB1C /* PPCInstrInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCInstrInfo.h; sourceTree = ""; }; - CF490CDE0903C9260072DB1C /* PPCInstrInfo.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPCInstrInfo.td; sourceTree = ""; }; - CF490CDF0903C9260072DB1C /* PPCISelDAGToDAG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCISelDAGToDAG.cpp; sourceTree = ""; }; - CF490CE00903C9260072DB1C /* PPCISelLowering.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCISelLowering.cpp; sourceTree = ""; }; - CF490CE10903C9260072DB1C /* PPCISelLowering.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCISelLowering.h; sourceTree = ""; }; - CF490CE30903C9260072DB1C /* PPCJITInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCJITInfo.cpp; sourceTree = ""; }; - CF490CE40903C9260072DB1C /* PPCJITInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCJITInfo.h; sourceTree = ""; }; - CF490CE50903C9260072DB1C /* PPCRegisterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCRegisterInfo.cpp; sourceTree = ""; }; - CF490CE60903C9260072DB1C /* PPCRegisterInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCRegisterInfo.h; sourceTree = ""; }; - CF490CE70903C9260072DB1C /* PPCRegisterInfo.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPCRegisterInfo.td; sourceTree = ""; }; - CF490CE80903C9260072DB1C /* PPCRelocations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCRelocations.h; sourceTree = ""; }; - CF490CE90903C9260072DB1C /* PPCSubtarget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCSubtarget.cpp; sourceTree = ""; }; - CF490CEA0903C9260072DB1C /* PPCSubtarget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCSubtarget.h; sourceTree = ""; }; - CF490CEB0903C9260072DB1C /* PPCTargetMachine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCTargetMachine.cpp; sourceTree = ""; }; - CF490CEC0903C9260072DB1C /* PPCTargetMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCTargetMachine.h; sourceTree = ""; }; - CF490D0E090541A30072DB1C /* PPCSchedule.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPCSchedule.td; sourceTree = ""; }; - CF490D0F090541A30072DB1C /* PPCScheduleG3.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPCScheduleG3.td; sourceTree = ""; }; - CF490D10090541A30072DB1C /* PPCScheduleG4.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPCScheduleG4.td; sourceTree = ""; }; - CF490D11090541A30072DB1C /* PPCScheduleG4Plus.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPCScheduleG4Plus.td; sourceTree = ""; }; - CF490D12090541A30072DB1C /* PPCScheduleG5.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPCScheduleG5.td; sourceTree = ""; }; CF490D14090541D30072DB1C /* TargetSchedule.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TargetSchedule.td; sourceTree = ""; }; CF490D15090541D30072DB1C /* TargetSelectionDAG.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TargetSelectionDAG.td; sourceTree = ""; }; - CF490D890906A78C0072DB1C /* PPC.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPC.td; sourceTree = ""; }; CF490E2F0907BBF80072DB1C /* SubtargetEmitter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SubtargetEmitter.h; sourceTree = ""; }; CF490E300907BBF80072DB1C /* SubtargetEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SubtargetEmitter.cpp; sourceTree = ""; }; CF65223409CA39B800C4B521 /* Intrinsics.gen */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Intrinsics.gen; sourceTree = ""; }; @@ -185,6 +117,67 @@ CFC244BF0959F2E3009F8C47 /* IA64ISelDAGToDAG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IA64ISelDAGToDAG.cpp; sourceTree = ""; }; CFC244C00959F2E3009F8C47 /* IA64ISelLowering.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IA64ISelLowering.cpp; sourceTree = ""; }; CFC244C10959F2E3009F8C47 /* IA64ISelLowering.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IA64ISelLowering.h; sourceTree = ""; }; + CFE420FA0A66F67300AB4BF6 /* CallTargets.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CallTargets.h; sourceTree = ""; }; + CFE420FB0A66F67300AB4BF6 /* MachineJumpTableInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MachineJumpTableInfo.h; sourceTree = ""; }; + CFE420FC0A66F67300AB4BF6 /* ValueTypes.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ValueTypes.td; sourceTree = ""; }; + CFE420FD0A66F67300AB4BF6 /* Interpreter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Interpreter.h; sourceTree = ""; }; + CFE420FE0A66F67300AB4BF6 /* JIT.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JIT.h; sourceTree = ""; }; + CFE420FF0A66F67300AB4BF6 /* IntrinsicsPowerPC.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IntrinsicsPowerPC.td; sourceTree = ""; }; + CFE421000A66F67300AB4BF6 /* IntrinsicsX86.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IntrinsicsX86.td; sourceTree = ""; }; + CFE421010A66F67300AB4BF6 /* LinkAllVMCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LinkAllVMCore.h; sourceTree = ""; }; + CFE421020A66F67300AB4BF6 /* IncludeFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IncludeFile.h; sourceTree = ""; }; + CFE421030A66F67300AB4BF6 /* Visibility.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Visibility.h; sourceTree = ""; }; + CFE421040A66F7AB00AB4BF6 /* ConstantRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ConstantRange.cpp; sourceTree = ""; }; + CFE421050A66F7D800AB4BF6 /* CallTargets.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CallTargets.cpp; sourceTree = ""; }; + CFE421060A66F86D00AB4BF6 /* ScheduleDAGRRList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScheduleDAGRRList.cpp; sourceTree = ""; }; + CFE421070A66F8DC00AB4BF6 /* GraphWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GraphWriter.cpp; sourceTree = ""; }; + CFE421080A66F8DC00AB4BF6 /* IncludeFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IncludeFile.cpp; sourceTree = ""; }; + CFE421090A66F93300AB4BF6 /* Alarm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Alarm.cpp; sourceTree = ""; }; + CFE4210A0A66F93300AB4BF6 /* Alarm.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; path = Alarm.inc; sourceTree = ""; }; + CFE4210B0A66F96400AB4BF6 /* AlphaSchedule.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AlphaSchedule.td; sourceTree = ""; }; + CFE421130A66FA2D00AB4BF6 /* LICENSE.TXT */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE.TXT; sourceTree = ""; }; + CFE421140A66FA2D00AB4BF6 /* PPC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPC.h; sourceTree = ""; }; + CFE421150A66FA2D00AB4BF6 /* PPC.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPC.td; sourceTree = ""; }; + CFE421160A66FA2D00AB4BF6 /* PPCAsmPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCAsmPrinter.cpp; sourceTree = ""; }; + CFE421170A66FA2D00AB4BF6 /* PPCBranchSelector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCBranchSelector.cpp; sourceTree = ""; }; + CFE421180A66FA2D00AB4BF6 /* PPCCodeEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCCodeEmitter.cpp; sourceTree = ""; }; + CFE421190A66FA2D00AB4BF6 /* PPCFrameInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCFrameInfo.h; sourceTree = ""; }; + CFE4211A0A66FA2D00AB4BF6 /* PPCHazardRecognizers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCHazardRecognizers.cpp; sourceTree = ""; }; + CFE4211B0A66FA2D00AB4BF6 /* PPCHazardRecognizers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCHazardRecognizers.h; sourceTree = ""; }; + CFE4211C0A66FA2D00AB4BF6 /* PPCInstr64Bit.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPCInstr64Bit.td; sourceTree = ""; }; + CFE4211D0A66FA2D00AB4BF6 /* PPCInstrAltivec.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPCInstrAltivec.td; sourceTree = ""; }; + CFE4211E0A66FA2D00AB4BF6 /* PPCInstrBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCInstrBuilder.h; sourceTree = ""; }; + CFE4211F0A66FA2D00AB4BF6 /* PPCInstrFormats.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPCInstrFormats.td; sourceTree = ""; }; + CFE421200A66FA2D00AB4BF6 /* PPCInstrInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCInstrInfo.cpp; sourceTree = ""; }; + CFE421210A66FA2D00AB4BF6 /* PPCInstrInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCInstrInfo.h; sourceTree = ""; }; + CFE421220A66FA2D00AB4BF6 /* PPCInstrInfo.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPCInstrInfo.td; sourceTree = ""; }; + CFE421230A66FA2D00AB4BF6 /* PPCISelDAGToDAG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCISelDAGToDAG.cpp; sourceTree = ""; }; + CFE421240A66FA2D00AB4BF6 /* PPCISelLowering.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCISelLowering.cpp; sourceTree = ""; }; + CFE421250A66FA2D00AB4BF6 /* PPCISelLowering.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCISelLowering.h; sourceTree = ""; }; + CFE421260A66FA2D00AB4BF6 /* PPCJITInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCJITInfo.cpp; sourceTree = ""; }; + CFE421270A66FA2D00AB4BF6 /* PPCJITInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCJITInfo.h; sourceTree = ""; }; + CFE421280A66FA2D00AB4BF6 /* PPCPerfectShuffle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCPerfectShuffle.h; sourceTree = ""; }; + CFE421290A66FA2D00AB4BF6 /* PPCRegisterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCRegisterInfo.cpp; sourceTree = ""; }; + CFE4212A0A66FA2D00AB4BF6 /* PPCRegisterInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCRegisterInfo.h; sourceTree = ""; }; + CFE4212B0A66FA2D00AB4BF6 /* PPCRegisterInfo.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPCRegisterInfo.td; sourceTree = ""; }; + CFE4212C0A66FA2D00AB4BF6 /* PPCRelocations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCRelocations.h; sourceTree = ""; }; + CFE4212D0A66FA2D00AB4BF6 /* PPCSchedule.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPCSchedule.td; sourceTree = ""; }; + CFE4212E0A66FA2D00AB4BF6 /* PPCScheduleG3.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPCScheduleG3.td; sourceTree = ""; }; + CFE4212F0A66FA2D00AB4BF6 /* PPCScheduleG4.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPCScheduleG4.td; sourceTree = ""; }; + CFE421300A66FA2D00AB4BF6 /* PPCScheduleG4Plus.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPCScheduleG4Plus.td; sourceTree = ""; }; + CFE421310A66FA2D00AB4BF6 /* PPCScheduleG5.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PPCScheduleG5.td; sourceTree = ""; }; + CFE421320A66FA2E00AB4BF6 /* PPCSubtarget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCSubtarget.cpp; sourceTree = ""; }; + CFE421330A66FA2E00AB4BF6 /* PPCSubtarget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCSubtarget.h; sourceTree = ""; }; + CFE421340A66FA2E00AB4BF6 /* PPCTargetMachine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PPCTargetMachine.cpp; sourceTree = ""; }; + CFE421350A66FA2E00AB4BF6 /* PPCTargetMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PPCTargetMachine.h; sourceTree = ""; }; + CFE421360A66FA2E00AB4BF6 /* README_ALTIVEC.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README_ALTIVEC.txt; sourceTree = ""; }; + CFE421370A66FA2E00AB4BF6 /* README.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.txt; sourceTree = ""; }; + CFE421380A66FA8000AB4BF6 /* README-FPStack.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "README-FPStack.txt"; sourceTree = ""; }; + CFE421390A66FA8000AB4BF6 /* README-SSE.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "README-SSE.txt"; sourceTree = ""; }; + CFE4213A0A66FA8000AB4BF6 /* README.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.txt; sourceTree = ""; }; + CFE4213B0A66FA8000AB4BF6 /* X86MachineFunctionInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = X86MachineFunctionInfo.h; sourceTree = ""; }; + CFE4213D0A66FAE100AB4BF6 /* Hello.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Hello.cpp; sourceTree = ""; }; + CFE4213F0A66FB5E00AB4BF6 /* IndMemRemoval.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IndMemRemoval.cpp; sourceTree = ""; }; CFF0DE6309BF6C360031957F /* X86InstrFPStack.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = X86InstrFPStack.td; sourceTree = ""; }; CFF0DE6409BF6C360031957F /* X86InstrMMX.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = X86InstrMMX.td; sourceTree = ""; }; CFF0DE6509BF6C360031957F /* X86InstrSSE.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = X86InstrSSE.td; sourceTree = ""; }; @@ -193,42 +186,12 @@ DE4DA03C091147920012D44B /* LiveInterval.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = LiveInterval.h; path = ../include/llvm/CodeGen/LiveInterval.h; sourceTree = SOURCE_ROOT; }; DE4DA03D091147920012D44B /* LiveIntervalAnalysis.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = LiveIntervalAnalysis.h; path = ../include/llvm/CodeGen/LiveIntervalAnalysis.h; sourceTree = SOURCE_ROOT; }; DE4DA03E091147C00012D44B /* PrintSCC.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = PrintSCC.cpp; path = ../tools/analyze/PrintSCC.cpp; sourceTree = SOURCE_ROOT; }; - DE4DA03F091147DD0012D44B /* PPC.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PPC.h; path = ../lib/Target/PowerPC/PPC.h; sourceTree = SOURCE_ROOT; }; - DE4DA040091147DD0012D44B /* PPC.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = PPC.td; path = ../lib/Target/PowerPC/PPC.td; sourceTree = SOURCE_ROOT; }; - DE4DA041091147DD0012D44B /* PPCAsmPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = PPCAsmPrinter.cpp; path = ../lib/Target/PowerPC/PPCAsmPrinter.cpp; sourceTree = SOURCE_ROOT; }; - DE4DA042091147DD0012D44B /* PPCBranchSelector.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = PPCBranchSelector.cpp; path = ../lib/Target/PowerPC/PPCBranchSelector.cpp; sourceTree = SOURCE_ROOT; }; - DE4DA043091147DD0012D44B /* PPCCodeEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = PPCCodeEmitter.cpp; path = ../lib/Target/PowerPC/PPCCodeEmitter.cpp; sourceTree = SOURCE_ROOT; }; - DE4DA044091147DD0012D44B /* PPCFrameInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PPCFrameInfo.h; path = ../lib/Target/PowerPC/PPCFrameInfo.h; sourceTree = SOURCE_ROOT; }; - DE4DA045091147ED0012D44B /* PPCInstrBuilder.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PPCInstrBuilder.h; path = ../lib/Target/PowerPC/PPCInstrBuilder.h; sourceTree = SOURCE_ROOT; }; - DE4DA046091147ED0012D44B /* PPCInstrFormats.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = PPCInstrFormats.td; path = ../lib/Target/PowerPC/PPCInstrFormats.td; sourceTree = SOURCE_ROOT; }; - DE4DA047091147ED0012D44B /* PPCInstrInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = PPCInstrInfo.cpp; path = ../lib/Target/PowerPC/PPCInstrInfo.cpp; sourceTree = SOURCE_ROOT; }; - DE4DA048091147ED0012D44B /* PPCInstrInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PPCInstrInfo.h; path = ../lib/Target/PowerPC/PPCInstrInfo.h; sourceTree = SOURCE_ROOT; }; - DE4DA049091147ED0012D44B /* PPCInstrInfo.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = PPCInstrInfo.td; path = ../lib/Target/PowerPC/PPCInstrInfo.td; sourceTree = SOURCE_ROOT; }; - DE4DA04A091147ED0012D44B /* PPCISelDAGToDAG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = PPCISelDAGToDAG.cpp; path = ../lib/Target/PowerPC/PPCISelDAGToDAG.cpp; sourceTree = SOURCE_ROOT; }; - DE4DA04B091147ED0012D44B /* PPCISelLowering.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = PPCISelLowering.cpp; path = ../lib/Target/PowerPC/PPCISelLowering.cpp; sourceTree = SOURCE_ROOT; }; - DE4DA04C091147ED0012D44B /* PPCISelLowering.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PPCISelLowering.h; path = ../lib/Target/PowerPC/PPCISelLowering.h; sourceTree = SOURCE_ROOT; }; - DE4DA04E091147ED0012D44B /* PPCJITInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = PPCJITInfo.cpp; path = ../lib/Target/PowerPC/PPCJITInfo.cpp; sourceTree = SOURCE_ROOT; }; - DE4DA04F091147ED0012D44B /* PPCJITInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PPCJITInfo.h; path = ../lib/Target/PowerPC/PPCJITInfo.h; sourceTree = SOURCE_ROOT; }; - DE4DA050091147ED0012D44B /* PPCRegisterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = PPCRegisterInfo.cpp; path = ../lib/Target/PowerPC/PPCRegisterInfo.cpp; sourceTree = SOURCE_ROOT; }; - DE4DA051091147ED0012D44B /* PPCRegisterInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PPCRegisterInfo.h; path = ../lib/Target/PowerPC/PPCRegisterInfo.h; sourceTree = SOURCE_ROOT; }; - DE4DA052091147ED0012D44B /* PPCRegisterInfo.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = PPCRegisterInfo.td; path = ../lib/Target/PowerPC/PPCRegisterInfo.td; sourceTree = SOURCE_ROOT; }; - DE4DA053091147ED0012D44B /* PPCRelocations.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PPCRelocations.h; path = ../lib/Target/PowerPC/PPCRelocations.h; sourceTree = SOURCE_ROOT; }; - DE4DA054091147ED0012D44B /* PPCSchedule.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = PPCSchedule.td; path = ../lib/Target/PowerPC/PPCSchedule.td; sourceTree = SOURCE_ROOT; }; - DE4DA055091147ED0012D44B /* PPCScheduleG3.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = PPCScheduleG3.td; path = ../lib/Target/PowerPC/PPCScheduleG3.td; sourceTree = SOURCE_ROOT; }; - DE4DA056091147ED0012D44B /* PPCScheduleG4.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = PPCScheduleG4.td; path = ../lib/Target/PowerPC/PPCScheduleG4.td; sourceTree = SOURCE_ROOT; }; - DE4DA057091147ED0012D44B /* PPCScheduleG4Plus.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = PPCScheduleG4Plus.td; path = ../lib/Target/PowerPC/PPCScheduleG4Plus.td; sourceTree = SOURCE_ROOT; }; - DE4DA058091147ED0012D44B /* PPCScheduleG5.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = PPCScheduleG5.td; path = ../lib/Target/PowerPC/PPCScheduleG5.td; sourceTree = SOURCE_ROOT; }; - DE4DA059091147ED0012D44B /* PPCSubtarget.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = PPCSubtarget.cpp; path = ../lib/Target/PowerPC/PPCSubtarget.cpp; sourceTree = SOURCE_ROOT; }; - DE4DA05A091147ED0012D44B /* PPCSubtarget.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PPCSubtarget.h; path = ../lib/Target/PowerPC/PPCSubtarget.h; sourceTree = SOURCE_ROOT; }; - DE4DA05B091147ED0012D44B /* PPCTargetMachine.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = PPCTargetMachine.cpp; path = ../lib/Target/PowerPC/PPCTargetMachine.cpp; sourceTree = SOURCE_ROOT; }; - DE4DA05C091147ED0012D44B /* PPCTargetMachine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PPCTargetMachine.h; path = ../lib/Target/PowerPC/PPCTargetMachine.h; sourceTree = SOURCE_ROOT; }; DE4DA065091148520012D44B /* SubtargetEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = SubtargetEmitter.cpp; path = ../utils/TableGen/SubtargetEmitter.cpp; sourceTree = SOURCE_ROOT; }; DE4DA066091148520012D44B /* SubtargetEmitter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SubtargetEmitter.h; path = ../utils/TableGen/SubtargetEmitter.h; sourceTree = SOURCE_ROOT; }; DE66EC5B08ABE86900323D32 /* AsmWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = AsmWriter.cpp; path = ../lib/VMCore/AsmWriter.cpp; sourceTree = SOURCE_ROOT; }; DE66EC5C08ABE86A00323D32 /* BasicBlock.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = BasicBlock.cpp; path = ../lib/VMCore/BasicBlock.cpp; sourceTree = SOURCE_ROOT; }; DE66EC5D08ABE86A00323D32 /* ConstantFolding.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ConstantFolding.cpp; path = ../lib/VMCore/ConstantFolding.cpp; sourceTree = SOURCE_ROOT; }; DE66EC5E08ABE86A00323D32 /* ConstantFolding.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ConstantFolding.h; path = ../lib/VMCore/ConstantFolding.h; sourceTree = SOURCE_ROOT; }; - DE66EC5F08ABE86A00323D32 /* ConstantRange.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ConstantRange.cpp; path = ../lib/VMCore/ConstantRange.cpp; sourceTree = SOURCE_ROOT; }; DE66EC6008ABE86A00323D32 /* Constants.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Constants.cpp; path = ../lib/VMCore/Constants.cpp; sourceTree = SOURCE_ROOT; }; DE66EC6108ABE86A00323D32 /* Dominators.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Dominators.cpp; path = ../lib/VMCore/Dominators.cpp; sourceTree = SOURCE_ROOT; }; DE66EC6208ABE86A00323D32 /* Function.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Function.cpp; path = ../lib/VMCore/Function.cpp; sourceTree = SOURCE_ROOT; }; @@ -307,7 +270,6 @@ DE66ED7308ABEC2B00323D32 /* LiveIntervalAnalysis.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LiveIntervalAnalysis.cpp; sourceTree = ""; }; DE66ED7508ABEC2B00323D32 /* LiveVariables.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LiveVariables.cpp; sourceTree = ""; }; DE66ED7608ABEC2B00323D32 /* MachineBasicBlock.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MachineBasicBlock.cpp; sourceTree = ""; }; - DE66ED7708ABEC2B00323D32 /* MachineCodeEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MachineCodeEmitter.cpp; sourceTree = ""; }; DE66ED7808ABEC2B00323D32 /* MachineFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MachineFunction.cpp; sourceTree = ""; }; DE66ED7908ABEC2B00323D32 /* MachineInstr.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MachineInstr.cpp; sourceTree = ""; }; DE66ED7B08ABEC2B00323D32 /* Passes.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Passes.cpp; sourceTree = ""; }; @@ -327,8 +289,6 @@ DE66ED9808ABEC2B00323D32 /* VirtRegMap.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = VirtRegMap.cpp; sourceTree = ""; }; DE66ED9908ABEC2B00323D32 /* VirtRegMap.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = VirtRegMap.h; sourceTree = ""; }; DE66EDB108ABEC7300323D32 /* Debugger.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Debugger.cpp; sourceTree = ""; }; - DE66EDB208ABEC7300323D32 /* FDHandle.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FDHandle.cpp; sourceTree = ""; }; - DE66EDB308ABEC7300323D32 /* FDHandle.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FDHandle.h; sourceTree = ""; }; DE66EDB508ABEC7300323D32 /* ProgramInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ProgramInfo.cpp; sourceTree = ""; }; DE66EDB608ABEC7300323D32 /* README.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = README.txt; sourceTree = ""; }; DE66EDB708ABEC7300323D32 /* RuntimeInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RuntimeInfo.cpp; sourceTree = ""; }; @@ -337,7 +297,6 @@ DE66EDBA08ABEC7300323D32 /* SourceLanguage-CPlusPlus.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = "SourceLanguage-CPlusPlus.cpp"; sourceTree = ""; }; DE66EDBB08ABEC7300323D32 /* SourceLanguage-Unknown.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = "SourceLanguage-Unknown.cpp"; sourceTree = ""; }; DE66EDBC08ABEC7300323D32 /* SourceLanguage.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SourceLanguage.cpp; sourceTree = ""; }; - DE66EDBD08ABEC7300323D32 /* UnixLocalInferiorProcess.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = UnixLocalInferiorProcess.cpp; sourceTree = ""; }; DE66EDC408ABEC9000323D32 /* ExecutionEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ExecutionEngine.cpp; sourceTree = ""; }; DE66EDCE08ABEC9000323D32 /* Execution.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Execution.cpp; sourceTree = ""; }; DE66EDCF08ABEC9000323D32 /* ExternalFunctions.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ExternalFunctions.cpp; sourceTree = ""; }; @@ -379,7 +338,6 @@ DE66EE4508ABEDE700323D32 /* StringExtras.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = StringExtras.cpp; sourceTree = ""; }; DE66EE4608ABEDE700323D32 /* SystemUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SystemUtils.cpp; sourceTree = ""; }; DE66EE4708ABEDE700323D32 /* Timer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Timer.cpp; sourceTree = ""; }; - DE66EE4808ABEDE700323D32 /* ToolRunner.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ToolRunner.cpp; sourceTree = ""; }; DE66EE6008ABEE3400323D32 /* DynamicLibrary.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DynamicLibrary.cpp; sourceTree = ""; }; DE66EE6108ABEE3400323D32 /* LICENSE.TXT */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = LICENSE.TXT; sourceTree = ""; }; DE66EE6208ABEE3400323D32 /* ltdl.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ltdl.c; sourceTree = ""; }; @@ -448,92 +406,6 @@ DE66EF0C08ABEE5E00323D32 /* IA64TargetMachine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IA64TargetMachine.h; sourceTree = ""; }; DE66EF0E08ABEE5E00323D32 /* README */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = README; sourceTree = ""; }; DE66EF1008ABEE5E00323D32 /* MRegisterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MRegisterInfo.cpp; sourceTree = ""; }; - DE66EF3D08ABEE5F00323D32 /* LICENSE.TXT */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = LICENSE.TXT; sourceTree = ""; }; - DE66EF6F08ABEE5F00323D32 /* README.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = README.txt; sourceTree = ""; }; - DE66EFFA08ABEE6000323D32 /* DecomposeMultiDimRefs.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DecomposeMultiDimRefs.cpp; sourceTree = ""; }; - DE66EFFB08ABEE6000323D32 /* EmitBytecodeToAssembly.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = EmitBytecodeToAssembly.cpp; sourceTree = ""; }; - DE66F00708ABEE6000323D32 /* InstrScheduling.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = InstrScheduling.cpp; sourceTree = ""; }; - DE66F00908ABEE6000323D32 /* SchedGraph.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SchedGraph.cpp; sourceTree = ""; }; - DE66F00A08ABEE6000323D32 /* SchedGraph.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SchedGraph.h; sourceTree = ""; }; - DE66F00B08ABEE6000323D32 /* SchedGraphCommon.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SchedGraphCommon.cpp; sourceTree = ""; }; - DE66F00C08ABEE6000323D32 /* SchedPriorities.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SchedPriorities.cpp; sourceTree = ""; }; - DE66F00D08ABEE6000323D32 /* SchedPriorities.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SchedPriorities.h; sourceTree = ""; }; - DE66F00E08ABEE6000323D32 /* InternalGlobalMapper.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = InternalGlobalMapper.cpp; sourceTree = ""; }; - DE66F01008ABEE6000323D32 /* BBLiveVar.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BBLiveVar.cpp; sourceTree = ""; }; - DE66F01108ABEE6000323D32 /* BBLiveVar.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = BBLiveVar.h; sourceTree = ""; }; - DE66F01A08ABEE6000323D32 /* FunctionLiveVarInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FunctionLiveVarInfo.cpp; sourceTree = ""; }; - DE66F01B08ABEE6000323D32 /* FunctionLiveVarInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FunctionLiveVarInfo.h; sourceTree = ""; }; - DE66F01D08ABEE6000323D32 /* ValueSet.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ValueSet.cpp; sourceTree = ""; }; - DE66F01E08ABEE6000323D32 /* MachineCodeForInstruction.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MachineCodeForInstruction.cpp; sourceTree = ""; }; - DE66F01F08ABEE6000323D32 /* MachineCodeForInstruction.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MachineCodeForInstruction.h; sourceTree = ""; }; - DE66F02008ABEE6000323D32 /* MachineFunctionInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MachineFunctionInfo.cpp; sourceTree = ""; }; - DE66F02108ABEE6000323D32 /* MachineFunctionInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MachineFunctionInfo.h; sourceTree = ""; }; - DE66F02208ABEE6000323D32 /* MachineInstrAnnot.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MachineInstrAnnot.h; sourceTree = ""; }; - DE66F02408ABEE6000323D32 /* MappingInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MappingInfo.cpp; sourceTree = ""; }; - DE66F02508ABEE6000323D32 /* MappingInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MappingInfo.h; sourceTree = ""; }; - DE66F03708ABEE6000323D32 /* DependenceAnalyzer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DependenceAnalyzer.cpp; sourceTree = ""; }; - DE66F03808ABEE6000323D32 /* DependenceAnalyzer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DependenceAnalyzer.h; sourceTree = ""; }; - DE66F03A08ABEE6000323D32 /* ModuloScheduling.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ModuloScheduling.cpp; sourceTree = ""; }; - DE66F03B08ABEE6000323D32 /* ModuloScheduling.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ModuloScheduling.h; sourceTree = ""; }; - DE66F03C08ABEE6000323D32 /* ModuloSchedulingSuperBlock.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ModuloSchedulingSuperBlock.cpp; sourceTree = ""; }; - DE66F03D08ABEE6000323D32 /* ModuloSchedulingSuperBlock.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ModuloSchedulingSuperBlock.h; sourceTree = ""; }; - DE66F03E08ABEE6000323D32 /* MSchedGraph.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MSchedGraph.cpp; sourceTree = ""; }; - DE66F03F08ABEE6000323D32 /* MSchedGraph.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MSchedGraph.h; sourceTree = ""; }; - DE66F04008ABEE6000323D32 /* MSchedGraphSB.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MSchedGraphSB.cpp; sourceTree = ""; }; - DE66F04108ABEE6000323D32 /* MSchedGraphSB.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MSchedGraphSB.h; sourceTree = ""; }; - DE66F04208ABEE6000323D32 /* MSSchedule.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MSSchedule.cpp; sourceTree = ""; }; - DE66F04308ABEE6000323D32 /* MSSchedule.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MSSchedule.h; sourceTree = ""; }; - DE66F04408ABEE6000323D32 /* MSScheduleSB.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MSScheduleSB.cpp; sourceTree = ""; }; - DE66F04508ABEE6000323D32 /* MSScheduleSB.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MSScheduleSB.h; sourceTree = ""; }; - DE66F04708ABEE6000323D32 /* AllocInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AllocInfo.h; sourceTree = ""; }; - DE66F05408ABEE6000323D32 /* IGNode.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = IGNode.cpp; sourceTree = ""; }; - DE66F05508ABEE6000323D32 /* IGNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IGNode.h; sourceTree = ""; }; - DE66F05608ABEE6000323D32 /* InterferenceGraph.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = InterferenceGraph.cpp; sourceTree = ""; }; - DE66F05708ABEE6000323D32 /* InterferenceGraph.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = InterferenceGraph.h; sourceTree = ""; }; - DE66F05808ABEE6000323D32 /* LiveRange.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = LiveRange.h; sourceTree = ""; }; - DE66F05908ABEE6000323D32 /* LiveRangeInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LiveRangeInfo.cpp; sourceTree = ""; }; - DE66F05A08ABEE6000323D32 /* LiveRangeInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = LiveRangeInfo.h; sourceTree = ""; }; - DE66F05D08ABEE6000323D32 /* PhyRegAlloc.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PhyRegAlloc.cpp; sourceTree = ""; }; - DE66F05E08ABEE6000323D32 /* PhyRegAlloc.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PhyRegAlloc.h; sourceTree = ""; }; - DE66F05F08ABEE6000323D32 /* RegAllocCommon.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RegAllocCommon.h; sourceTree = ""; }; - DE66F06008ABEE6000323D32 /* RegClass.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RegClass.cpp; sourceTree = ""; }; - DE66F06108ABEE6000323D32 /* RegClass.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RegClass.h; sourceTree = ""; }; - DE66F06208ABEE6000323D32 /* SparcV9.burg.in */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SparcV9.burg.in; sourceTree = ""; }; - DE66F06608ABEE6000323D32 /* SparcV9.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SparcV9.td; sourceTree = ""; }; - DE66F06708ABEE6000323D32 /* SparcV9_F2.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SparcV9_F2.td; sourceTree = ""; }; - DE66F06808ABEE6000323D32 /* SparcV9_F3.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SparcV9_F3.td; sourceTree = ""; }; - DE66F06908ABEE6000323D32 /* SparcV9_F4.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SparcV9_F4.td; sourceTree = ""; }; - DE66F06A08ABEE6000323D32 /* SparcV9AsmPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SparcV9AsmPrinter.cpp; sourceTree = ""; }; - DE66F06B08ABEE6000323D32 /* SparcV9BurgISel.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SparcV9BurgISel.cpp; sourceTree = ""; }; - DE66F06C08ABEE6000323D32 /* SparcV9BurgISel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SparcV9BurgISel.h; sourceTree = ""; }; - DE66F06D08ABEE6000323D32 /* SparcV9CodeEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SparcV9CodeEmitter.cpp; sourceTree = ""; }; - DE66F06E08ABEE6000323D32 /* SparcV9CodeEmitter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SparcV9CodeEmitter.h; sourceTree = ""; }; - DE66F06F08ABEE6000323D32 /* SparcV9FrameInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SparcV9FrameInfo.cpp; sourceTree = ""; }; - DE66F07008ABEE6000323D32 /* SparcV9FrameInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SparcV9FrameInfo.h; sourceTree = ""; }; - DE66F07208ABEE6000323D32 /* SparcV9Instr.def */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SparcV9Instr.def; sourceTree = ""; }; - DE66F07308ABEE6000323D32 /* SparcV9InstrForest.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SparcV9InstrForest.h; sourceTree = ""; }; - DE66F07408ABEE6000323D32 /* SparcV9InstrInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SparcV9InstrInfo.h; sourceTree = ""; }; - DE66F07508ABEE6000323D32 /* SparcV9InstrInfo.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SparcV9InstrInfo.td; sourceTree = ""; }; - DE66F07608ABEE6000323D32 /* SparcV9Internals.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SparcV9Internals.h; sourceTree = ""; }; - DE66F07708ABEE6000323D32 /* SparcV9JITInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SparcV9JITInfo.cpp; sourceTree = ""; }; - DE66F07808ABEE6000323D32 /* SparcV9JITInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SparcV9JITInfo.h; sourceTree = ""; }; - DE66F07908ABEE6000323D32 /* SparcV9PeepholeOpts.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SparcV9PeepholeOpts.cpp; sourceTree = ""; }; - DE66F07A08ABEE6000323D32 /* SparcV9PreSelection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SparcV9PreSelection.cpp; sourceTree = ""; }; - DE66F07B08ABEE6000323D32 /* SparcV9PrologEpilogInserter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SparcV9PrologEpilogInserter.cpp; sourceTree = ""; }; - DE66F07C08ABEE6000323D32 /* SparcV9RegClassInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SparcV9RegClassInfo.cpp; sourceTree = ""; }; - DE66F07D08ABEE6000323D32 /* SparcV9RegClassInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SparcV9RegClassInfo.h; sourceTree = ""; }; - DE66F07E08ABEE6000323D32 /* SparcV9RegInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SparcV9RegInfo.cpp; sourceTree = ""; }; - DE66F07F08ABEE6000323D32 /* SparcV9RegInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SparcV9RegInfo.h; sourceTree = ""; }; - DE66F08008ABEE6000323D32 /* SparcV9RegisterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SparcV9RegisterInfo.cpp; sourceTree = ""; }; - DE66F08108ABEE6000323D32 /* SparcV9RegisterInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SparcV9RegisterInfo.h; sourceTree = ""; }; - DE66F08208ABEE6000323D32 /* SparcV9RegisterInfo.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SparcV9RegisterInfo.td; sourceTree = ""; }; - DE66F08308ABEE6000323D32 /* SparcV9Relocations.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SparcV9Relocations.h; sourceTree = ""; }; - DE66F08408ABEE6000323D32 /* SparcV9SchedInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SparcV9SchedInfo.cpp; sourceTree = ""; }; - DE66F08508ABEE6000323D32 /* SparcV9StackSlots.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SparcV9StackSlots.cpp; sourceTree = ""; }; - DE66F08608ABEE6000323D32 /* SparcV9TargetMachine.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SparcV9TargetMachine.cpp; sourceTree = ""; }; - DE66F08708ABEE6000323D32 /* SparcV9TargetMachine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SparcV9TargetMachine.h; sourceTree = ""; }; - DE66F08808ABEE6000323D32 /* SparcV9TmpInstr.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SparcV9TmpInstr.cpp; sourceTree = ""; }; - DE66F08908ABEE6000323D32 /* SparcV9TmpInstr.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SparcV9TmpInstr.h; sourceTree = ""; }; DE66F08A08ABEE6000323D32 /* Target.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Target.td; sourceTree = ""; }; DE66F08B08ABEE6000323D32 /* TargetData.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TargetData.cpp; sourceTree = ""; }; DE66F08C08ABEE6000323D32 /* TargetFrameInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TargetFrameInfo.cpp; sourceTree = ""; }; @@ -541,7 +413,6 @@ DE66F08E08ABEE6000323D32 /* TargetLowering.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TargetLowering.cpp; sourceTree = ""; }; DE66F08F08ABEE6000323D32 /* TargetMachine.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TargetMachine.cpp; sourceTree = ""; }; DE66F09008ABEE6000323D32 /* TargetMachineRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TargetMachineRegistry.cpp; sourceTree = ""; }; - DE66F09108ABEE6000323D32 /* TargetSchedInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TargetSchedInfo.cpp; sourceTree = ""; }; DE66F09208ABEE6000323D32 /* TargetSubtarget.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TargetSubtarget.cpp; sourceTree = ""; }; DE66F0BC08ABEE6000323D32 /* X86.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = X86.h; sourceTree = ""; }; DE66F0BD08ABEE6000323D32 /* X86.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = X86.td; sourceTree = ""; }; @@ -783,7 +654,6 @@ DE66F28B08ABF03200323D32 /* StableBasicBlockNumbering.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = StableBasicBlockNumbering.h; sourceTree = ""; }; DE66F28C08ABF03200323D32 /* SystemUtils.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SystemUtils.h; sourceTree = ""; }; DE66F28E08ABF03200323D32 /* Timer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Timer.h; sourceTree = ""; }; - DE66F28F08ABF03200323D32 /* ToolRunner.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ToolRunner.h; sourceTree = ""; }; DE66F29008ABF03200323D32 /* type_traits.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = type_traits.h; sourceTree = ""; }; DE66F29108ABF03200323D32 /* TypeInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TypeInfo.h; sourceTree = ""; }; DE66F29208ABF03200323D32 /* SymbolTable.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SymbolTable.h; sourceTree = ""; }; @@ -807,7 +677,6 @@ DE66F2A608ABF03200323D32 /* TargetMachine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetMachine.h; sourceTree = ""; }; DE66F2A708ABF03200323D32 /* TargetMachineRegistry.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetMachineRegistry.h; sourceTree = ""; }; DE66F2A808ABF03200323D32 /* TargetOptions.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetOptions.h; sourceTree = ""; }; - DE66F2A908ABF03200323D32 /* TargetSchedInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetSchedInfo.h; sourceTree = ""; }; DE66F2AA08ABF03200323D32 /* TargetSubtarget.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetSubtarget.h; sourceTree = ""; }; DE66F2AC08ABF03200323D32 /* Instrumentation.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Instrumentation.h; sourceTree = ""; }; DE66F2AD08ABF03200323D32 /* IPO.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IPO.h; sourceTree = ""; }; @@ -924,7 +793,6 @@ DE66F3EC08ABF35D00323D32 /* LangRef.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = LangRef.html; sourceTree = ""; }; DE66F3ED08ABF35D00323D32 /* Lexicon.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = Lexicon.html; sourceTree = ""; }; DE66F3EE08ABF35D00323D32 /* llvm.css */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = llvm.css; sourceTree = ""; }; - DE66F3EF08ABF35D00323D32 /* LLVMVsTheWorld.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = LLVMVsTheWorld.html; sourceTree = ""; }; DE66F3F108ABF35D00323D32 /* MakefileGuide.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = MakefileGuide.html; sourceTree = ""; }; DE66F3F208ABF35D00323D32 /* ProgrammersManual.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = ProgrammersManual.html; sourceTree = ""; }; DE66F3F308ABF35D00323D32 /* Projects.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = Projects.html; sourceTree = ""; }; @@ -998,6 +866,14 @@ name = LLVM; sourceTree = ""; }; + CFE4213C0A66FAE100AB4BF6 /* Hello */ = { + isa = PBXGroup; + children = ( + CFE4213D0A66FAE100AB4BF6 /* Hello.cpp */, + ); + path = Hello; + sourceTree = ""; + }; DE66EC7508ABE8EF00323D32 /* lib/VMCore */ = { isa = PBXGroup; children = ( @@ -1006,7 +882,6 @@ DE66EC5C08ABE86A00323D32 /* BasicBlock.cpp */, DE66EC5D08ABE86A00323D32 /* ConstantFolding.cpp */, DE66EC5E08ABE86A00323D32 /* ConstantFolding.h */, - DE66EC5F08ABE86A00323D32 /* ConstantRange.cpp */, DE66EC6008ABE86A00323D32 /* Constants.cpp */, DE66EC6108ABE86A00323D32 /* Dominators.cpp */, DE66EC6208ABE86A00323D32 /* Function.cpp */, @@ -1102,6 +977,7 @@ DE66ECC208ABEC0700323D32 /* BasicAliasAnalysis.cpp */, DE66ECC308ABEC0700323D32 /* CFGPrinter.cpp */, CF73C0B0098A523C00627152 /* ConstantFolding.cpp */, + CFE421040A66F7AB00AB4BF6 /* ConstantRange.cpp */, DE66ED1708ABEC0800323D32 /* InstCount.cpp */, DE66ED1808ABEC0800323D32 /* Interval.cpp */, DE66ED1908ABEC0800323D32 /* IntervalPartition.cpp */, @@ -1124,6 +1000,7 @@ isa = PBXGroup; children = ( DE66ECC508ABEC0700323D32 /* BottomUpClosure.cpp */, + CFE421050A66F7D800AB4BF6 /* CallTargets.cpp */, DE66ECC608ABEC0700323D32 /* CompleteBottomUp.cpp */, DE66ECC708ABEC0700323D32 /* DataStructure.cpp */, DE66ECC808ABEC0700323D32 /* DataStructureAA.cpp */, @@ -1165,7 +1042,6 @@ DE66ED7308ABEC2B00323D32 /* LiveIntervalAnalysis.cpp */, DE66ED7508ABEC2B00323D32 /* LiveVariables.cpp */, DE66ED7608ABEC2B00323D32 /* MachineBasicBlock.cpp */, - DE66ED7708ABEC2B00323D32 /* MachineCodeEmitter.cpp */, CF6529A6095B21A8007F884E /* MachineDebugInfo.cpp */, DE66ED7808ABEC2B00323D32 /* MachineFunction.cpp */, DE66ED7908ABEC2B00323D32 /* MachineInstr.cpp */, @@ -1197,6 +1073,7 @@ DE66ED9208ABEC2B00323D32 /* SelectionDAG.cpp */, DE66ED9308ABEC2B00323D32 /* SelectionDAGISel.cpp */, DE66ED9408ABEC2B00323D32 /* SelectionDAGPrinter.cpp */, + CFE421060A66F86D00AB4BF6 /* ScheduleDAGRRList.cpp */, ); path = SelectionDAG; sourceTree = ""; @@ -1205,8 +1082,6 @@ isa = PBXGroup; children = ( DE66EDB108ABEC7300323D32 /* Debugger.cpp */, - DE66EDB208ABEC7300323D32 /* FDHandle.cpp */, - DE66EDB308ABEC7300323D32 /* FDHandle.h */, DE66EDB508ABEC7300323D32 /* ProgramInfo.cpp */, DE66EDB608ABEC7300323D32 /* README.txt */, DE66EDB708ABEC7300323D32 /* RuntimeInfo.cpp */, @@ -1215,7 +1090,6 @@ DE66EDBA08ABEC7300323D32 /* SourceLanguage-CPlusPlus.cpp */, DE66EDBB08ABEC7300323D32 /* SourceLanguage-Unknown.cpp */, DE66EDBC08ABEC7300323D32 /* SourceLanguage.cpp */, - DE66EDBD08ABEC7300323D32 /* UnixLocalInferiorProcess.cpp */, ); name = lib/Debugger; path = ../lib/Debugger; @@ -1277,6 +1151,8 @@ DE66EE3D08ABEDE600323D32 /* Debug.cpp */, CF79495D09B326D4005ADFCA /* Dwarf.cpp */, DE66EE3E08ABEDE600323D32 /* FileUtilities.cpp */, + CFE421070A66F8DC00AB4BF6 /* GraphWriter.cpp */, + CFE421080A66F8DC00AB4BF6 /* IncludeFile.cpp */, DE66EE3F08ABEDE600323D32 /* IsInf.cpp */, DE66EE4008ABEDE600323D32 /* IsNAN.cpp */, DE66EE4208ABEDE600323D32 /* PluginLoader.cpp */, @@ -1285,7 +1161,6 @@ DE66EE4508ABEDE700323D32 /* StringExtras.cpp */, DE66EE4608ABEDE700323D32 /* SystemUtils.cpp */, DE66EE4708ABEDE700323D32 /* Timer.cpp */, - DE66EE4808ABEDE700323D32 /* ToolRunner.cpp */, ); name = lib/Support; path = ../lib/Support; @@ -1317,6 +1192,7 @@ children = ( DE66EE7E08ABEE3500323D32 /* Unix */, DE66EE8B08ABEE3500323D32 /* Win32 */, + CFE421090A66F93300AB4BF6 /* Alarm.cpp */, DE66EE6008ABEE3400323D32 /* DynamicLibrary.cpp */, DE66EE6108ABEE3400323D32 /* LICENSE.TXT */, DE66EE6208ABEE3400323D32 /* ltdl.c */, @@ -1364,6 +1240,7 @@ DE66EE8B08ABEE3500323D32 /* Win32 */ = { isa = PBXGroup; children = ( + CFE4210A0A66F93300AB4BF6 /* Alarm.inc */, DE66EE8C08ABEE3500323D32 /* DynamicLibrary.inc */, DE66EE8D08ABEE3500323D32 /* MappedFile.inc */, DE66EE8E08ABEE3500323D32 /* Memory.inc */, @@ -1386,7 +1263,6 @@ DE66EEE508ABEE5E00323D32 /* IA64 */, DE66EF1108ABEE5E00323D32 /* PowerPC */, DE66EF7008ABEE5F00323D32 /* Sparc */, - DE66EFC908ABEE5F00323D32 /* SparcV9 */, DE66F09308ABEE6000323D32 /* X86 */, DE66EF1008ABEE5E00323D32 /* MRegisterInfo.cpp */, CF9BCD1508C75070001E7011 /* SubtargetFeature.cpp */, @@ -1397,7 +1273,6 @@ DE66F08E08ABEE6000323D32 /* TargetLowering.cpp */, DE66F08F08ABEE6000323D32 /* TargetMachine.cpp */, DE66F09008ABEE6000323D32 /* TargetMachineRegistry.cpp */, - DE66F09108ABEE6000323D32 /* TargetSchedInfo.cpp */, CF490D14090541D30072DB1C /* TargetSchedule.td */, CF490D15090541D30072DB1C /* TargetSelectionDAG.td */, DE66F09208ABEE6000323D32 /* TargetSubtarget.cpp */, @@ -1424,6 +1299,7 @@ DE66EEA608ABEE5E00323D32 /* AlphaInstrInfo.td */, DE66EEA908ABEE5E00323D32 /* AlphaJITInfo.cpp */, DE66EEAA08ABEE5E00323D32 /* AlphaJITInfo.h */, + CFE4210B0A66F96400AB4BF6 /* AlphaSchedule.td */, DE66EEAB08ABEE5E00323D32 /* AlphaRegisterInfo.cpp */, DE66EEAC08ABEE5E00323D32 /* AlphaRegisterInfo.h */, DE66EEAD08ABEE5E00323D32 /* AlphaRegisterInfo.td */, @@ -1472,66 +1348,43 @@ DE66EF1108ABEE5E00323D32 /* PowerPC */ = { isa = PBXGroup; children = ( - CF490D890906A78C0072DB1C /* PPC.td */, - CF490CD50903C9260072DB1C /* PPC.h */, - CF490CD60903C9260072DB1C /* PPCAsmPrinter.cpp */, - CF490CD70903C9260072DB1C /* PPCBranchSelector.cpp */, - CF490CD80903C9260072DB1C /* PPCCodeEmitter.cpp */, - CF490CD90903C9260072DB1C /* PPCFrameInfo.h */, - CF490CDA0903C9260072DB1C /* PPCInstrBuilder.h */, - CF490CDB0903C9260072DB1C /* PPCInstrFormats.td */, - CF490CDC0903C9260072DB1C /* PPCInstrInfo.cpp */, - CF490CDD0903C9260072DB1C /* PPCInstrInfo.h */, - CF490CDE0903C9260072DB1C /* PPCInstrInfo.td */, - CF490CDF0903C9260072DB1C /* PPCISelDAGToDAG.cpp */, - CF490CE00903C9260072DB1C /* PPCISelLowering.cpp */, - CF490CE10903C9260072DB1C /* PPCISelLowering.h */, - CF490CE30903C9260072DB1C /* PPCJITInfo.cpp */, - CF490CE40903C9260072DB1C /* PPCJITInfo.h */, - CF490CE50903C9260072DB1C /* PPCRegisterInfo.cpp */, - CF490CE60903C9260072DB1C /* PPCRegisterInfo.h */, - CF490CE70903C9260072DB1C /* PPCRegisterInfo.td */, - CF490CE80903C9260072DB1C /* PPCRelocations.h */, - CF490D0E090541A30072DB1C /* PPCSchedule.td */, - CF490D0F090541A30072DB1C /* PPCScheduleG3.td */, - CF490D10090541A30072DB1C /* PPCScheduleG4.td */, - CF490D11090541A30072DB1C /* PPCScheduleG4Plus.td */, - CF490D12090541A30072DB1C /* PPCScheduleG5.td */, - CF490CE90903C9260072DB1C /* PPCSubtarget.cpp */, - CF490CEA0903C9260072DB1C /* PPCSubtarget.h */, - CF490CEB0903C9260072DB1C /* PPCTargetMachine.cpp */, - CF490CEC0903C9260072DB1C /* PPCTargetMachine.h */, - DE66EF3D08ABEE5F00323D32 /* LICENSE.TXT */, - DE4DA03F091147DD0012D44B /* PPC.h */, - DE4DA040091147DD0012D44B /* PPC.td */, - DE4DA041091147DD0012D44B /* PPCAsmPrinter.cpp */, - DE4DA042091147DD0012D44B /* PPCBranchSelector.cpp */, - DE4DA043091147DD0012D44B /* PPCCodeEmitter.cpp */, - DE4DA044091147DD0012D44B /* PPCFrameInfo.h */, - DE4DA045091147ED0012D44B /* PPCInstrBuilder.h */, - DE4DA046091147ED0012D44B /* PPCInstrFormats.td */, - DE4DA047091147ED0012D44B /* PPCInstrInfo.cpp */, - DE4DA048091147ED0012D44B /* PPCInstrInfo.h */, - DE4DA049091147ED0012D44B /* PPCInstrInfo.td */, - DE4DA04A091147ED0012D44B /* PPCISelDAGToDAG.cpp */, - DE4DA04B091147ED0012D44B /* PPCISelLowering.cpp */, - DE4DA04C091147ED0012D44B /* PPCISelLowering.h */, - DE4DA04E091147ED0012D44B /* PPCJITInfo.cpp */, - DE4DA04F091147ED0012D44B /* PPCJITInfo.h */, - DE4DA050091147ED0012D44B /* PPCRegisterInfo.cpp */, - DE4DA051091147ED0012D44B /* PPCRegisterInfo.h */, - DE4DA052091147ED0012D44B /* PPCRegisterInfo.td */, - DE4DA053091147ED0012D44B /* PPCRelocations.h */, - DE4DA054091147ED0012D44B /* PPCSchedule.td */, - DE4DA055091147ED0012D44B /* PPCScheduleG3.td */, - DE4DA056091147ED0012D44B /* PPCScheduleG4.td */, - DE4DA057091147ED0012D44B /* PPCScheduleG4Plus.td */, - DE4DA058091147ED0012D44B /* PPCScheduleG5.td */, - DE4DA059091147ED0012D44B /* PPCSubtarget.cpp */, - DE4DA05A091147ED0012D44B /* PPCSubtarget.h */, - DE4DA05B091147ED0012D44B /* PPCTargetMachine.cpp */, - DE4DA05C091147ED0012D44B /* PPCTargetMachine.h */, - DE66EF6F08ABEE5F00323D32 /* README.txt */, + CFE421130A66FA2D00AB4BF6 /* LICENSE.TXT */, + CFE421140A66FA2D00AB4BF6 /* PPC.h */, + CFE421150A66FA2D00AB4BF6 /* PPC.td */, + CFE421160A66FA2D00AB4BF6 /* PPCAsmPrinter.cpp */, + CFE421170A66FA2D00AB4BF6 /* PPCBranchSelector.cpp */, + CFE421180A66FA2D00AB4BF6 /* PPCCodeEmitter.cpp */, + CFE421190A66FA2D00AB4BF6 /* PPCFrameInfo.h */, + CFE4211A0A66FA2D00AB4BF6 /* PPCHazardRecognizers.cpp */, + CFE4211B0A66FA2D00AB4BF6 /* PPCHazardRecognizers.h */, + CFE4211C0A66FA2D00AB4BF6 /* PPCInstr64Bit.td */, + CFE4211D0A66FA2D00AB4BF6 /* PPCInstrAltivec.td */, + CFE4211E0A66FA2D00AB4BF6 /* PPCInstrBuilder.h */, + CFE4211F0A66FA2D00AB4BF6 /* PPCInstrFormats.td */, + CFE421200A66FA2D00AB4BF6 /* PPCInstrInfo.cpp */, + CFE421210A66FA2D00AB4BF6 /* PPCInstrInfo.h */, + CFE421220A66FA2D00AB4BF6 /* PPCInstrInfo.td */, + CFE421230A66FA2D00AB4BF6 /* PPCISelDAGToDAG.cpp */, + CFE421240A66FA2D00AB4BF6 /* PPCISelLowering.cpp */, + CFE421250A66FA2D00AB4BF6 /* PPCISelLowering.h */, + CFE421260A66FA2D00AB4BF6 /* PPCJITInfo.cpp */, + CFE421270A66FA2D00AB4BF6 /* PPCJITInfo.h */, + CFE421280A66FA2D00AB4BF6 /* PPCPerfectShuffle.h */, + CFE421290A66FA2D00AB4BF6 /* PPCRegisterInfo.cpp */, + CFE4212A0A66FA2D00AB4BF6 /* PPCRegisterInfo.h */, + CFE4212B0A66FA2D00AB4BF6 /* PPCRegisterInfo.td */, + CFE4212C0A66FA2D00AB4BF6 /* PPCRelocations.h */, + CFE4212D0A66FA2D00AB4BF6 /* PPCSchedule.td */, + CFE4212E0A66FA2D00AB4BF6 /* PPCScheduleG3.td */, + CFE4212F0A66FA2D00AB4BF6 /* PPCScheduleG4.td */, + CFE421300A66FA2D00AB4BF6 /* PPCScheduleG4Plus.td */, + CFE421310A66FA2D00AB4BF6 /* PPCScheduleG5.td */, + CFE421320A66FA2E00AB4BF6 /* PPCSubtarget.cpp */, + CFE421330A66FA2E00AB4BF6 /* PPCSubtarget.h */, + CFE421340A66FA2E00AB4BF6 /* PPCTargetMachine.cpp */, + CFE421350A66FA2E00AB4BF6 /* PPCTargetMachine.h */, + CFE421360A66FA2E00AB4BF6 /* README_ALTIVEC.txt */, + CFE421370A66FA2E00AB4BF6 /* README.txt */, ); path = PowerPC; sourceTree = ""; @@ -1571,132 +1424,12 @@ path = Skeleton; sourceTree = ""; }; - DE66EFC908ABEE5F00323D32 /* SparcV9 */ = { - isa = PBXGroup; - children = ( - DE66EFFC08ABEE6000323D32 /* InstrSched */, - DE66F00F08ABEE6000323D32 /* LiveVar */, - DE66F02608ABEE6000323D32 /* ModuloScheduling */, - DE66F04608ABEE6000323D32 /* RegAlloc */, - DE66EFFA08ABEE6000323D32 /* DecomposeMultiDimRefs.cpp */, - DE66EFFB08ABEE6000323D32 /* EmitBytecodeToAssembly.cpp */, - DE66F00E08ABEE6000323D32 /* InternalGlobalMapper.cpp */, - DE66F01E08ABEE6000323D32 /* MachineCodeForInstruction.cpp */, - DE66F01F08ABEE6000323D32 /* MachineCodeForInstruction.h */, - DE66F02008ABEE6000323D32 /* MachineFunctionInfo.cpp */, - DE66F02108ABEE6000323D32 /* MachineFunctionInfo.h */, - DE66F02208ABEE6000323D32 /* MachineInstrAnnot.h */, - DE66F02408ABEE6000323D32 /* MappingInfo.cpp */, - DE66F02508ABEE6000323D32 /* MappingInfo.h */, - DE66F06208ABEE6000323D32 /* SparcV9.burg.in */, - DE66F06608ABEE6000323D32 /* SparcV9.td */, - DE66F06708ABEE6000323D32 /* SparcV9_F2.td */, - DE66F06808ABEE6000323D32 /* SparcV9_F3.td */, - DE66F06908ABEE6000323D32 /* SparcV9_F4.td */, - DE66F06A08ABEE6000323D32 /* SparcV9AsmPrinter.cpp */, - DE66F06B08ABEE6000323D32 /* SparcV9BurgISel.cpp */, - DE66F06C08ABEE6000323D32 /* SparcV9BurgISel.h */, - DE66F06D08ABEE6000323D32 /* SparcV9CodeEmitter.cpp */, - DE66F06E08ABEE6000323D32 /* SparcV9CodeEmitter.h */, - DE66F06F08ABEE6000323D32 /* SparcV9FrameInfo.cpp */, - DE66F07008ABEE6000323D32 /* SparcV9FrameInfo.h */, - DE66F07208ABEE6000323D32 /* SparcV9Instr.def */, - DE66F07308ABEE6000323D32 /* SparcV9InstrForest.h */, - DE66F07408ABEE6000323D32 /* SparcV9InstrInfo.h */, - DE66F07508ABEE6000323D32 /* SparcV9InstrInfo.td */, - DE66F07608ABEE6000323D32 /* SparcV9Internals.h */, - DE66F07708ABEE6000323D32 /* SparcV9JITInfo.cpp */, - DE66F07808ABEE6000323D32 /* SparcV9JITInfo.h */, - DE66F07908ABEE6000323D32 /* SparcV9PeepholeOpts.cpp */, - DE66F07A08ABEE6000323D32 /* SparcV9PreSelection.cpp */, - DE66F07B08ABEE6000323D32 /* SparcV9PrologEpilogInserter.cpp */, - DE66F07C08ABEE6000323D32 /* SparcV9RegClassInfo.cpp */, - DE66F07D08ABEE6000323D32 /* SparcV9RegClassInfo.h */, - DE66F07E08ABEE6000323D32 /* SparcV9RegInfo.cpp */, - DE66F07F08ABEE6000323D32 /* SparcV9RegInfo.h */, - DE66F08008ABEE6000323D32 /* SparcV9RegisterInfo.cpp */, - DE66F08108ABEE6000323D32 /* SparcV9RegisterInfo.h */, - DE66F08208ABEE6000323D32 /* SparcV9RegisterInfo.td */, - DE66F08308ABEE6000323D32 /* SparcV9Relocations.h */, - DE66F08408ABEE6000323D32 /* SparcV9SchedInfo.cpp */, - DE66F08508ABEE6000323D32 /* SparcV9StackSlots.cpp */, - DE66F08608ABEE6000323D32 /* SparcV9TargetMachine.cpp */, - DE66F08708ABEE6000323D32 /* SparcV9TargetMachine.h */, - DE66F08808ABEE6000323D32 /* SparcV9TmpInstr.cpp */, - DE66F08908ABEE6000323D32 /* SparcV9TmpInstr.h */, - ); - path = SparcV9; - sourceTree = ""; - }; - DE66EFFC08ABEE6000323D32 /* InstrSched */ = { - isa = PBXGroup; - children = ( - DE66F00708ABEE6000323D32 /* InstrScheduling.cpp */, - DE66F00908ABEE6000323D32 /* SchedGraph.cpp */, - DE66F00A08ABEE6000323D32 /* SchedGraph.h */, - DE66F00B08ABEE6000323D32 /* SchedGraphCommon.cpp */, - DE66F00C08ABEE6000323D32 /* SchedPriorities.cpp */, - DE66F00D08ABEE6000323D32 /* SchedPriorities.h */, - ); - path = InstrSched; - sourceTree = ""; - }; - DE66F00F08ABEE6000323D32 /* LiveVar */ = { - isa = PBXGroup; - children = ( - DE66F01008ABEE6000323D32 /* BBLiveVar.cpp */, - DE66F01108ABEE6000323D32 /* BBLiveVar.h */, - DE66F01A08ABEE6000323D32 /* FunctionLiveVarInfo.cpp */, - DE66F01B08ABEE6000323D32 /* FunctionLiveVarInfo.h */, - DE66F01D08ABEE6000323D32 /* ValueSet.cpp */, - ); - path = LiveVar; - sourceTree = ""; - }; - DE66F02608ABEE6000323D32 /* ModuloScheduling */ = { - isa = PBXGroup; - children = ( - DE66F03708ABEE6000323D32 /* DependenceAnalyzer.cpp */, - DE66F03808ABEE6000323D32 /* DependenceAnalyzer.h */, - DE66F03A08ABEE6000323D32 /* ModuloScheduling.cpp */, - DE66F03B08ABEE6000323D32 /* ModuloScheduling.h */, - DE66F03C08ABEE6000323D32 /* ModuloSchedulingSuperBlock.cpp */, - DE66F03D08ABEE6000323D32 /* ModuloSchedulingSuperBlock.h */, - DE66F03E08ABEE6000323D32 /* MSchedGraph.cpp */, - DE66F03F08ABEE6000323D32 /* MSchedGraph.h */, - DE66F04008ABEE6000323D32 /* MSchedGraphSB.cpp */, - DE66F04108ABEE6000323D32 /* MSchedGraphSB.h */, - DE66F04208ABEE6000323D32 /* MSSchedule.cpp */, - DE66F04308ABEE6000323D32 /* MSSchedule.h */, - DE66F04408ABEE6000323D32 /* MSScheduleSB.cpp */, - DE66F04508ABEE6000323D32 /* MSScheduleSB.h */, - ); - path = ModuloScheduling; - sourceTree = ""; - }; - DE66F04608ABEE6000323D32 /* RegAlloc */ = { - isa = PBXGroup; - children = ( - DE66F04708ABEE6000323D32 /* AllocInfo.h */, - DE66F05408ABEE6000323D32 /* IGNode.cpp */, - DE66F05508ABEE6000323D32 /* IGNode.h */, - DE66F05608ABEE6000323D32 /* InterferenceGraph.cpp */, - DE66F05708ABEE6000323D32 /* InterferenceGraph.h */, - DE66F05808ABEE6000323D32 /* LiveRange.h */, - DE66F05908ABEE6000323D32 /* LiveRangeInfo.cpp */, - DE66F05A08ABEE6000323D32 /* LiveRangeInfo.h */, - DE66F05D08ABEE6000323D32 /* PhyRegAlloc.cpp */, - DE66F05E08ABEE6000323D32 /* PhyRegAlloc.h */, - DE66F05F08ABEE6000323D32 /* RegAllocCommon.h */, - DE66F06008ABEE6000323D32 /* RegClass.cpp */, - DE66F06108ABEE6000323D32 /* RegClass.h */, - ); - path = RegAlloc; - sourceTree = ""; - }; DE66F09308ABEE6000323D32 /* X86 */ = { isa = PBXGroup; children = ( + CFE421380A66FA8000AB4BF6 /* README-FPStack.txt */, + CFE421390A66FA8000AB4BF6 /* README-SSE.txt */, + CFE4213A0A66FA8000AB4BF6 /* README.txt */, CFF0DE6309BF6C360031957F /* X86InstrFPStack.td */, CFF0DE6409BF6C360031957F /* X86InstrMMX.td */, CFF0DE6509BF6C360031957F /* X86InstrSSE.td */, @@ -1717,6 +1450,7 @@ DE66F0D108ABEE6100323D32 /* X86IntelAsmPrinter.h */, DE66F0D508ABEE6100323D32 /* X86JITInfo.cpp */, DE66F0D608ABEE6100323D32 /* X86JITInfo.h */, + CFE4213B0A66FA8000AB4BF6 /* X86MachineFunctionInfo.h */, DE66F0D808ABEE6100323D32 /* X86RegisterInfo.cpp */, DE66F0D908ABEE6100323D32 /* X86RegisterInfo.h */, DE66F0DA08ABEE6100323D32 /* X86RegisterInfo.td */, @@ -1736,6 +1470,7 @@ isa = PBXGroup; children = ( DE66F0EE08ABEFB300323D32 /* Instrumentation */, + CFE4213C0A66FAE100AB4BF6 /* Hello */, DE66F11F08ABEFB300323D32 /* IPO */, DE66F15C08ABEFB400323D32 /* Scalar */, DE66F1BD08ABEFB400323D32 /* Utils */, @@ -1775,6 +1510,7 @@ DE66F14B08ABEFB400323D32 /* FunctionResolution.cpp */, DE66F14C08ABEFB400323D32 /* GlobalDCE.cpp */, DE66F14D08ABEFB400323D32 /* GlobalOpt.cpp */, + CFE4213F0A66FB5E00AB4BF6 /* IndMemRemoval.cpp */, DE66F14E08ABEFB400323D32 /* Inliner.cpp */, DE66F14F08ABEFB400323D32 /* Inliner.h */, DE66F15008ABEFB400323D32 /* InlineSimple.cpp */, @@ -1881,7 +1617,10 @@ DE66F26508ABF03100323D32 /* IntrinsicInst.h */, DE66F26608ABF03100323D32 /* Intrinsics.h */, CF65223409CA39B800C4B521 /* Intrinsics.gen */, + CFE420FF0A66F67300AB4BF6 /* IntrinsicsPowerPC.td */, + CFE421000A66F67300AB4BF6 /* IntrinsicsX86.td */, CF8D62FA09C2226F006017BA /* Intrinsics.td */, + CFE421010A66F67300AB4BF6 /* LinkAllVMCore.h */, DE66F26708ABF03100323D32 /* Linker.h */, DE66F26808ABF03100323D32 /* Module.h */, DE66F26908ABF03200323D32 /* ModuleProvider.h */, @@ -1966,6 +1705,7 @@ DE66F20908ABF03100323D32 /* DataStructure */ = { isa = PBXGroup; children = ( + CFE420FA0A66F67300AB4BF6 /* CallTargets.h */, DE66F20A08ABF03100323D32 /* DataStructure.h */, DE66F20B08ABF03100323D32 /* DSGraph.h */, DE66F20C08ABF03100323D32 /* DSGraphTraits.h */, @@ -2022,6 +1762,7 @@ DE66F24008ABF03100323D32 /* MachineFunctionPass.h */, DE66F24108ABF03100323D32 /* MachineInstr.h */, DE66F24208ABF03100323D32 /* MachineInstrBuilder.h */, + CFE420FB0A66F67300AB4BF6 /* MachineJumpTableInfo.h */, CF6527D909D1A53400C4B521 /* MachineLocation.h */, DE66F24308ABF03100323D32 /* MachineRelocation.h */, DE66F24408ABF03100323D32 /* Passes.h */, @@ -2033,6 +1774,7 @@ DE66F24908ABF03100323D32 /* SSARegMap.h */, DE66F24A08ABF03100323D32 /* ValueSet.h */, DE66F24B08ABF03100323D32 /* ValueTypes.h */, + CFE420FC0A66F67300AB4BF6 /* ValueTypes.td */, ); path = CodeGen; sourceTree = ""; @@ -2065,6 +1807,8 @@ children = ( DE66F25C08ABF03100323D32 /* ExecutionEngine.h */, DE66F25D08ABF03100323D32 /* GenericValue.h */, + CFE420FD0A66F67300AB4BF6 /* Interpreter.h */, + CFE420FE0A66F67300AB4BF6 /* JIT.h */, ); path = ExecutionEngine; sourceTree = ""; @@ -2090,6 +1834,7 @@ DE66F27E08ABF03200323D32 /* FileUtilities.h */, DE66F27F08ABF03200323D32 /* GetElementPtrTypeIterator.h */, DE66F28008ABF03200323D32 /* GraphWriter.h */, + CFE421020A66F67300AB4BF6 /* IncludeFile.h */, DE66F28108ABF03200323D32 /* InstIterator.h */, DE66F28208ABF03200323D32 /* InstVisitor.h */, DE66F28308ABF03200323D32 /* LeakDetector.h */, @@ -2103,9 +1848,9 @@ DE66F28B08ABF03200323D32 /* StableBasicBlockNumbering.h */, DE66F28C08ABF03200323D32 /* SystemUtils.h */, DE66F28E08ABF03200323D32 /* Timer.h */, - DE66F28F08ABF03200323D32 /* ToolRunner.h */, DE66F29008ABF03200323D32 /* type_traits.h */, DE66F29108ABF03200323D32 /* TypeInfo.h */, + CFE421030A66F67300AB4BF6 /* Visibility.h */, ); path = Support; sourceTree = ""; @@ -2142,7 +1887,6 @@ DE66F2A608ABF03200323D32 /* TargetMachine.h */, DE66F2A708ABF03200323D32 /* TargetMachineRegistry.h */, DE66F2A808ABF03200323D32 /* TargetOptions.h */, - DE66F2A908ABF03200323D32 /* TargetSchedInfo.h */, DE66F2AA08ABF03200323D32 /* TargetSubtarget.h */, ); path = Target; @@ -2306,7 +2050,6 @@ DE66F3EC08ABF35D00323D32 /* LangRef.html */, DE66F3ED08ABF35D00323D32 /* Lexicon.html */, DE66F3EE08ABF35D00323D32 /* llvm.css */, - DE66F3EF08ABF35D00323D32 /* LLVMVsTheWorld.html */, DE66F3F108ABF35D00323D32 /* MakefileGuide.html */, DE66F3F208ABF35D00323D32 /* ProgrammersManual.html */, DE66F3F308ABF35D00323D32 /* Projects.html */, @@ -2435,19 +2178,6 @@ buildConfigurationList = CF0329B708D1BE530030FD33 /* Build configuration list for PBXLegacyTarget "LLVM lib" */; buildPhases = ( ); - buildSettings = { - OPTIMIZATION_CFLAGS = ""; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM lib"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; buildToolPath = /usr/bin/make; buildWorkingDirectory = "$(SRCROOT)/../lib"; dependencies = ( @@ -2462,19 +2192,6 @@ buildConfigurationList = CF0329C308D1BEC40030FD33 /* Build configuration list for PBXLegacyTarget "LLVM llc" */; buildPhases = ( ); - buildSettings = { - OPTIMIZATION_CFLAGS = ""; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM llc"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; buildToolPath = /usr/bin/make; buildWorkingDirectory = "$(SRCROOT)/../tools/llc"; dependencies = ( @@ -2489,19 +2206,6 @@ buildConfigurationList = CF490E840907CDAB0072DB1C /* Build configuration list for PBXLegacyTarget "LLVM TableGen" */; buildPhases = ( ); - buildSettings = { - OPTIMIZATION_CFLAGS = ""; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "LLVM llc"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - }; buildToolPath = /usr/bin/make; buildWorkingDirectory = /llvm/llvm/utils/TableGen; dependencies = ( @@ -2516,11 +2220,6 @@ buildConfigurationList = DE66EC4C08ABE78900323D32 /* Build configuration list for PBXLegacyTarget "LLVM" */; buildPhases = ( ); - buildSettings = { - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - PRODUCT_NAME = LLVM; - }; buildToolPath = /usr/bin/make; buildWorkingDirectory = /Volumes/Big2/llvm/llvm; dependencies = ( @@ -2535,12 +2234,6 @@ 08FB7793FE84155DC02AAC07 /* Project object */ = { isa = PBXProject; buildConfigurationList = DE66EC5008ABE78900323D32 /* Build configuration list for PBXProject "LLVM" */; - buildSettings = { - }; - buildStyles = ( - 014CEA520018CE5811CA2923 /* Debug */, - 014CEA530018CE5811CA2923 /* Release */, - ); hasScannedForEncodings = 1; mainGroup = 08FB7794FE84155DC02AAC07 /* LLVM */; projectDirPath = ""; From lattner at cs.uiuc.edu Thu Jul 13 23:07:41 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 13 Jul 2006 23:07:41 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/README.txt Message-ID: <200607140407.XAA32753@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: README.txt updated: 1.93 -> 1.94 --- Log message: Add a note --- Diffs of the changes: (+9 -0) README.txt | 9 +++++++++ 1 files changed, 9 insertions(+) Index: llvm/lib/Target/PowerPC/README.txt diff -u llvm/lib/Target/PowerPC/README.txt:1.93 llvm/lib/Target/PowerPC/README.txt:1.94 --- llvm/lib/Target/PowerPC/README.txt:1.93 Mon Jul 10 15:56:58 2006 +++ llvm/lib/Target/PowerPC/README.txt Thu Jul 13 23:07:29 2006 @@ -530,3 +530,12 @@ or r2, r2, r4 stw r2, 0(r3) blr + +===-------------------------------------------------------------------------=== + +On PPC64, this results in a truncate followed by a truncstore. These should +be folded together. + +unsigned short G; +void foo(unsigned long H) { G = H; } + From lattner at cs.uiuc.edu Thu Jul 13 23:42:14 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 13 Jul 2006 23:42:14 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp PPCInstr64Bit.td Message-ID: <200607140442.XAA00552@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCHazardRecognizers.cpp updated: 1.13 -> 1.14 PPCInstr64Bit.td updated: 1.17 -> 1.18 --- Log message: Add missing PPC64 extload/truncstores --- Diffs of the changes: (+99 -9) PPCHazardRecognizers.cpp | 18 ++++++++- PPCInstr64Bit.td | 90 +++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 99 insertions(+), 9 deletions(-) Index: llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp diff -u llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp:1.13 llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp:1.14 --- llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp:1.13 Mon Jul 10 15:56:58 2006 +++ llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp Thu Jul 13 23:42:02 2006 @@ -170,6 +170,8 @@ default: assert(0 && "Unknown load!"); case PPC::LBZ: case PPC::LBZX: + case PPC::LBZ8: + case PPC::LBZX8: case PPC::LVEBX: LoadSize = 1; break; @@ -179,6 +181,10 @@ case PPC::LHZX: case PPC::LVEHX: case PPC::LHBRX: + case PPC::LHA8: + case PPC::LHAX8: + case PPC::LHZ8: + case PPC::LHZX8: LoadSize = 2; break; case PPC::LFS: @@ -190,6 +196,8 @@ case PPC::LWAX: case PPC::LVEWX: case PPC::LWBRX: + case PPC::LWZ8: + case PPC::LWZX8: LoadSize = 4; break; case PPC::LFD: @@ -227,13 +235,17 @@ unsigned ThisStoreSize; switch (Opcode) { default: assert(0 && "Unknown store instruction!"); - case PPC::STBX: case PPC::STB: + case PPC::STBX: + case PPC::STB8: + case PPC::STBX8: case PPC::STVEBX: ThisStoreSize = 1; break; - case PPC::STHX: case PPC::STH: + case PPC::STHX: + case PPC::STH8: + case PPC::STHX8: case PPC::STVEHX: case PPC::STHBRX: ThisStoreSize = 2; @@ -244,6 +256,8 @@ case PPC::STWX: case PPC::STWUX: case PPC::STW: + case PPC::STW8: + case PPC::STWX8: case PPC::STVEWX: case PPC::STFIWX: case PPC::STWBRX: Index: llvm/lib/Target/PowerPC/PPCInstr64Bit.td diff -u llvm/lib/Target/PowerPC/PPCInstr64Bit.td:1.17 llvm/lib/Target/PowerPC/PPCInstr64Bit.td:1.18 --- llvm/lib/Target/PowerPC/PPCInstr64Bit.td:1.17 Tue Jun 27 16:08:52 2006 +++ llvm/lib/Target/PowerPC/PPCInstr64Bit.td Thu Jul 13 23:42:02 2006 @@ -230,26 +230,57 @@ let isLoad = 1, PPC970_Unit = 2 in { +// Sign extending loads. +def LHA8: DForm_1<42, (ops G8RC:$rD, memri:$src), + "lha $rD, $src", LdStLHA, + [(set G8RC:$rD, (sextload iaddr:$src, i16))]>, + PPC970_DGroup_Cracked; def LWA : DSForm_1<58, 2, (ops G8RC:$rD, memrix:$src), "lwa $rD, $src", LdStLWA, [(set G8RC:$rD, (sextload ixaddr:$src, i32))]>, isPPC64, PPC970_DGroup_Cracked; -def LD : DSForm_2<58, 0, (ops G8RC:$rD, memrix:$src), - "ld $rD, $src", LdStLD, - [(set G8RC:$rD, (load ixaddr:$src))]>, isPPC64; - +def LHAX8: XForm_1<31, 343, (ops G8RC:$rD, memrr:$src), + "lhax $rD, $src", LdStLHA, + [(set G8RC:$rD, (sextload xaddr:$src, i16))]>, + PPC970_DGroup_Cracked; def LWAX : XForm_1<31, 341, (ops G8RC:$rD, memrr:$src), "lwax $rD, $src", LdStLHA, [(set G8RC:$rD, (sextload xaddr:$src, i32))]>, isPPC64, PPC970_DGroup_Cracked; -def LDX : XForm_1<31, 21, (ops G8RC:$rD, memrr:$src), - "ldx $rD, $src", LdStLD, - [(set G8RC:$rD, (load xaddr:$src))]>, isPPC64; + +// Zero extending loads. +def LBZ8 : DForm_1<34, (ops G8RC:$rD, memri:$src), + "lbz $rD, $src", LdStGeneral, + [(set G8RC:$rD, (zextload iaddr:$src, i8))]>; +def LHZ8 : DForm_1<40, (ops G8RC:$rD, memri:$src), + "lhz $rD, $src", LdStGeneral, + [(set G8RC:$rD, (zextload iaddr:$src, i16))]>; def LWZ8 : DForm_1<32, (ops G8RC:$rD, memri:$src), "lwz $rD, $src", LdStGeneral, [(set G8RC:$rD, (zextload iaddr:$src, i32))]>, isPPC64; + +def LBZX8 : XForm_1<31, 87, (ops G8RC:$rD, memrr:$src), + "lbzx $rD, $src", LdStGeneral, + [(set G8RC:$rD, (zextload xaddr:$src, i8))]>; +def LHZX8 : XForm_1<31, 279, (ops G8RC:$rD, memrr:$src), + "lhzx $rD, $src", LdStGeneral, + [(set G8RC:$rD, (zextload xaddr:$src, i16))]>; +def LWZX8 : XForm_1<31, 23, (ops G8RC:$rD, memrr:$src), + "lwzx $rD, $src", LdStGeneral, + [(set G8RC:$rD, (zextload xaddr:$src, i32))]>; + + +// Full 8-byte loads. +def LD : DSForm_2<58, 0, (ops G8RC:$rD, memrix:$src), + "ld $rD, $src", LdStLD, + [(set G8RC:$rD, (load ixaddr:$src))]>, isPPC64; +def LDX : XForm_1<31, 21, (ops G8RC:$rD, memrr:$src), + "ldx $rD, $src", LdStLD, + [(set G8RC:$rD, (load xaddr:$src))]>, isPPC64; } + let isStore = 1, noResults = 1, PPC970_Unit = 2 in { +// Normal stores. def STD : DSForm_2<62, 0, (ops G8RC:$rS, memrix:$dst), "std $rS, $dst", LdStSTD, [(store G8RC:$rS, ixaddr:$dst)]>, isPPC64; @@ -269,6 +300,29 @@ "stdx $rT, $dst", LdStSTD, [(PPCstd_32 GPRC:$rT, xaddr:$dst)]>, isPPC64, PPC970_DGroup_Cracked; + +// Truncating stores. +def STB8 : DForm_3<38, (ops G8RC:$rS, memri:$src), + "stb $rS, $src", LdStGeneral, + [(truncstore G8RC:$rS, iaddr:$src, i8)]>; +def STH8 : DForm_3<44, (ops G8RC:$rS, memri:$src), + "sth $rS, $src", LdStGeneral, + [(truncstore G8RC:$rS, iaddr:$src, i16)]>; +def STW8 : DForm_3<36, (ops G8RC:$rS, memri:$src), + "stw $rS, $src", LdStGeneral, + [(truncstore G8RC:$rS, iaddr:$src, i32)]>; +def STBX8 : XForm_8<31, 215, (ops G8RC:$rS, memrr:$dst), + "stbx $rS, $dst", LdStGeneral, + [(truncstore G8RC:$rS, xaddr:$dst, i8)]>, + PPC970_DGroup_Cracked; +def STHX8 : XForm_8<31, 407, (ops G8RC:$rS, memrr:$dst), + "sthx $rS, $dst", LdStGeneral, + [(truncstore G8RC:$rS, xaddr:$dst, i16)]>, + PPC970_DGroup_Cracked; +def STWX8 : XForm_8<31, 151, (ops G8RC:$rS, memrr:$dst), + "stwx $rS, $dst", LdStGeneral, + [(truncstore G8RC:$rS, xaddr:$dst, i32)]>, + PPC970_DGroup_Cracked; } @@ -342,6 +396,28 @@ def : Pat<(i32 (trunc G8RC:$in)), (OR8To4 G8RC:$in, G8RC:$in)>; +// Extending loads with i64 targets. +def : Pat<(zextload iaddr:$src, i1), + (LBZ8 iaddr:$src)>; +def : Pat<(zextload xaddr:$src, i1), + (LBZX8 xaddr:$src)>; +def : Pat<(extload iaddr:$src, i1), + (LBZ8 iaddr:$src)>; +def : Pat<(extload xaddr:$src, i1), + (LBZX8 xaddr:$src)>; +def : Pat<(extload iaddr:$src, i8), + (LBZ8 iaddr:$src)>; +def : Pat<(extload xaddr:$src, i8), + (LBZX8 xaddr:$src)>; +def : Pat<(extload iaddr:$src, i16), + (LHZ8 iaddr:$src)>; +def : Pat<(extload xaddr:$src, i16), + (LHZX8 xaddr:$src)>; +def : Pat<(extload iaddr:$src, i32), + (LWZ8 iaddr:$src)>; +def : Pat<(extload xaddr:$src, i32), + (LWZX8 xaddr:$src)>; + // SHL/SRL def : Pat<(shl G8RC:$in, (i32 imm:$imm)), (RLDICR G8RC:$in, imm:$imm, (SHL64 imm:$imm))>; From resistor at mac.com Fri Jul 14 13:49:27 2006 From: resistor at mac.com (Owen Anderson) Date: Fri, 14 Jul 2006 13:49:27 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp Message-ID: <200607141849.NAA03366@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: IndVarSimplify.cpp updated: 1.87 -> 1.88 --- Log message: Hopefully the final attempt at making IndVars preserve LCSSA. This should fix PR 831: http://llvm.org/PR831 . --- Diffs of the changes: (+30 -2) IndVarSimplify.cpp | 32 ++++++++++++++++++++++++++++++-- 1 files changed, 30 insertions(+), 2 deletions(-) Index: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp diff -u llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.87 llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.88 --- llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.87 Thu Jul 13 14:05:20 2006 +++ llvm/lib/Transforms/Scalar/IndVarSimplify.cpp Fri Jul 14 13:49:15 2006 @@ -358,8 +358,36 @@ // Rewrite any users of the computed value outside of the loop // with the newly computed value. - for (unsigned i = 0, e = ExtraLoopUsers.size(); i != e; ++i) - ExtraLoopUsers[i]->replaceUsesOfWith(I, NewVal); + for (unsigned i = 0, e = ExtraLoopUsers.size(); i != e; ++i) { + PHINode* PN = dyn_cast(ExtraLoopUsers[i]); + if (PN && PN->getNumOperands() == 2 && + !L->contains(PN->getParent())) { + // We're dealing with an LCSSA Phi. Handle it specially. + Instruction* LCSSAInsertPt = BlockToInsertInto->begin(); + + Instruction* NewInstr = dyn_cast(NewVal); + if (NewInstr && !isa(NewInstr) && + !L->contains(NewInstr->getParent())) + for (unsigned j = 0; j < NewInstr->getNumOperands(); ++j){ + Instruction* PredI = + dyn_cast(NewInstr->getOperand(j)); + if (PredI && L->contains(PredI->getParent())) { + PHINode* NewLCSSA = new PHINode(PredI->getType(), + PredI->getName() + ".lcssa", + LCSSAInsertPt); + NewLCSSA->addIncoming(PredI, + BlockToInsertInto->getSinglePredecessor()); + + NewInstr->replaceUsesOfWith(PredI, NewLCSSA); + } + } + + PN->replaceAllUsesWith(NewVal); + PN->eraseFromParent(); + } else { + ExtraLoopUsers[i]->replaceUsesOfWith(I, NewVal); + } + } // If this instruction is dead now, schedule it to be removed. if (I->use_empty()) From lattner at cs.uiuc.edu Fri Jul 14 14:37:13 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 14 Jul 2006 14:37:13 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Constants.h Message-ID: <200607141937.OAA22489@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: Constants.h updated: 1.83 -> 1.84 --- Log message: Add a new method for bugpoint to use. --- Diffs of the changes: (+5 -0) Constants.h | 5 +++++ 1 files changed, 5 insertions(+) Index: llvm/include/llvm/Constants.h diff -u llvm/include/llvm/Constants.h:1.83 llvm/include/llvm/Constants.h:1.84 --- llvm/include/llvm/Constants.h:1.83 Tue May 30 13:15:07 2006 +++ llvm/include/llvm/Constants.h Fri Jul 14 14:37:01 2006 @@ -614,6 +614,11 @@ /// getOpcodeName - Return a string representation for an opcode. const char *getOpcodeName() const; + /// getWithOperandReplaced - Return a constant expression identical to this + /// one, but with the specified operand set to the specified value. + Constant *getWithOperandReplaced(unsigned OpNo, Constant *Op) const; + + virtual void destroyConstant(); virtual void replaceUsesOfWithOnConstant(Value *From, Value *To, Use *U); From lattner at cs.uiuc.edu Fri Jul 14 14:37:53 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 14 Jul 2006 14:37:53 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Constants.cpp Message-ID: <200607141937.OAA22607@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Constants.cpp updated: 1.155 -> 1.156 --- Log message: Add a new method for bugpoint to use --- Diffs of the changes: (+51 -0) Constants.cpp | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 51 insertions(+) Index: llvm/lib/VMCore/Constants.cpp diff -u llvm/lib/VMCore/Constants.cpp:1.155 llvm/lib/VMCore/Constants.cpp:1.156 --- llvm/lib/VMCore/Constants.cpp:1.155 Wed Jun 28 16:38:54 2006 +++ llvm/lib/VMCore/Constants.cpp Fri Jul 14 14:37:40 2006 @@ -497,6 +497,57 @@ C1->getType()->getSignedVersion()), C2), C1->getType()); } +/// getWithOperandReplaced - Return a constant expression identical to this +/// one, but with the specified operand set to the specified value. +Constant *ConstantExpr::getWithOperandReplaced(unsigned OpNo, + Constant *Op) const { + assert(OpNo < getNumOperands() && "Operand num is out of range!"); + assert(Op->getType() == getOperand(OpNo)->getType() && + "Replacing operand with value of different type!"); + if (getOperand(OpNo) == Op) return const_cast(this); + + switch (getOpcode()) { + case Instruction::Cast: + return ConstantExpr::getCast(Op, getType()); + case Instruction::GetElementPtr: { + std::vector Ops; + for (unsigned i = 1, e = getNumOperands(); i != e; ++i) + Ops.push_back(getOperand(i)); + if (OpNo == 0) + return ConstantExpr::getGetElementPtr(Op, Ops); + Ops[OpNo-1] = Op; + return ConstantExpr::getGetElementPtr(getOperand(0), Ops); + } + case Instruction::Select: + if (OpNo == 0) + return ConstantExpr::getSelect(Op, getOperand(1), getOperand(2)); + if (OpNo == 1) + return ConstantExpr::getSelect(getOperand(0), Op, getOperand(2)); + return ConstantExpr::getSelect(getOperand(0), getOperand(1), Op); + case Instruction::InsertElement: + if (OpNo == 0) + return ConstantExpr::getInsertElement(Op, getOperand(1), getOperand(2)); + if (OpNo == 1) + return ConstantExpr::getInsertElement(getOperand(0), Op, getOperand(2)); + return ConstantExpr::getInsertElement(getOperand(0), getOperand(1), Op); + case Instruction::ExtractElement: + if (OpNo == 0) + return ConstantExpr::getExtractElement(Op, getOperand(1)); + return ConstantExpr::getExtractElement(getOperand(0), Op); + case Instruction::ShuffleVector: + if (OpNo == 0) + return ConstantExpr::getShuffleVector(Op, getOperand(1), getOperand(2)); + if (OpNo == 1) + return ConstantExpr::getShuffleVector(getOperand(0), Op, getOperand(2)); + return ConstantExpr::getShuffleVector(getOperand(0), getOperand(1), Op); + default: + assert(getNumOperands() == 2 && "Must be binary operator?"); + if (OpNo == 0) + return ConstantExpr::get(getOpcode(), Op, getOperand(1)); + return ConstantExpr::get(getOpcode(), getOperand(0), Op); + } +} + //===----------------------------------------------------------------------===// // isValueValidForType implementations From pjenkins at apple.com Fri Jul 14 15:44:22 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Fri, 14 Jul 2006 15:44:22 -0500 Subject: [llvm-commits] CVS: llvm/utils/NewNightlyTest.pl Message-ID: <200607142044.PAA04316@zion.cs.uiuc.edu> Changes in directory llvm/utils: NewNightlyTest.pl updated: 1.11 -> 1.12 --- Log message: Fixed an issue where the user specified gcc was not the gcc we report to the nightly test server. --- Diffs of the changes: (+10 -2) NewNightlyTest.pl | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) Index: llvm/utils/NewNightlyTest.pl diff -u llvm/utils/NewNightlyTest.pl:1.11 llvm/utils/NewNightlyTest.pl:1.12 --- llvm/utils/NewNightlyTest.pl:1.11 Thu Jul 13 11:58:42 2006 +++ llvm/utils/NewNightlyTest.pl Fri Jul 14 15:44:09 2006 @@ -138,7 +138,10 @@ $CONFIGUREARGS .= "--with-externals=$ARGV[0]"; shift; next; } if (/^-nickname$/) { $nickname = "$ARGV[0]"; shift; next; } - if (/^-gccpath/) { $CONFIGUREARGS .= " CC=$ARGV[0]/gcc CXX=$ARGV[0]/g++"; shift; next;} + if (/^-gccpath/) { $CONFIGUREARGS .= " CC=$ARGV[0]/gcc CXX=$ARGV[0]/g++"; + $GCCPATH=$ARGV[0]; + shift; + next;} if (/^-cvstag/) { $CVSCOOPT .= " -r $ARGV[0]"; shift; next; } else{ $CVSCOOPT="";} if (/^-target/) { $CONFIGUREARGS .= " --target=$ARGV[0]"; shift; next; @@ -953,7 +956,12 @@ @DEJAGNULOG_FULL = ReadFile "$DejagnuTestsLog"; $dejagnulog_full = join("\n", @DEJAGNULOG_FULL); -my $gcc_version_long = `gcc --version`; +if($GCCPATH){ + my $gcc_version_long = `$ARGV[0]/gcc --version`; +} +else{ + my $gcc_version_long = `gcc --version`; +} @GCC_VERSION = split "\n", $gcc_version_long; my $gcc_version = $GCC_VERSION[0]; From pjenkins at apple.com Fri Jul 14 16:11:55 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Fri, 14 Jul 2006 16:11:55 -0500 Subject: [llvm-commits] CVS: nightlytest-serverside/NightlyTestAccept.cgi Message-ID: <200607142111.QAA08024@zion.cs.uiuc.edu> Changes in directory nightlytest-serverside: NightlyTestAccept.cgi updated: 1.11 -> 1.12 --- Log message: We will now send out an email to the nightly test email archive about submitted tests --- Diffs of the changes: (+11 -0) NightlyTestAccept.cgi | 11 +++++++++++ 1 files changed, 11 insertions(+) Index: nightlytest-serverside/NightlyTestAccept.cgi diff -u nightlytest-serverside/NightlyTestAccept.cgi:1.11 nightlytest-serverside/NightlyTestAccept.cgi:1.12 --- nightlytest-serverside/NightlyTestAccept.cgi:1.11 Mon Jul 10 17:25:32 2006 +++ nightlytest-serverside/NightlyTestAccept.cgi Fri Jul 14 16:11:41 2006 @@ -475,3 +475,14 @@ #WriteFile "$this_days_logs/$dejagnu_testrun_log_file",$dejagnutests_log; #WriteFile "$this_days_logs/$dejagnu_testrun_sum_file",$dejagnutests_sum; #WriteFile "$this_days_logs/$warnings_file",$buildwarnings; + +###################################################################################################### +# +# Sending email to nightly test email archive +# +###################################################################################################### + +$email = "$machine_data\n\n$dejagnutests_log\n\ncvs user commit list:\n$cvsusercommitlist\n\ncvs user ". + "update list:\n$cvsuserupdatelist\n\ncvs changed files:\n$cvsmodifiedfiles\n"; +$email_addr = "llvm-testresults\@cs.uiuc.edu"; +$themail = `mail -s 'X86 nightly tester results' $email_addr < $email`; From pjenkins at apple.com Fri Jul 14 16:13:38 2006 From: pjenkins at apple.com (Patrick Jenkins) Date: Fri, 14 Jul 2006 16:13:38 -0500 Subject: [llvm-commits] CVS: nightlytest-serverside/NightlyTestAccept.cgi Message-ID: <200607142113.QAA08128@zion.cs.uiuc.edu> Changes in directory nightlytest-serverside: NightlyTestAccept.cgi updated: 1.12 -> 1.13 --- Log message: made the title of the email to the nightly test email archive more descriptive --- Diffs of the changes: (+1 -1) NightlyTestAccept.cgi | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: nightlytest-serverside/NightlyTestAccept.cgi diff -u nightlytest-serverside/NightlyTestAccept.cgi:1.12 nightlytest-serverside/NightlyTestAccept.cgi:1.13 --- nightlytest-serverside/NightlyTestAccept.cgi:1.12 Fri Jul 14 16:11:41 2006 +++ nightlytest-serverside/NightlyTestAccept.cgi Fri Jul 14 16:13:25 2006 @@ -485,4 +485,4 @@ $email = "$machine_data\n\n$dejagnutests_log\n\ncvs user commit list:\n$cvsusercommitlist\n\ncvs user ". "update list:\n$cvsuserupdatelist\n\ncvs changed files:\n$cvsmodifiedfiles\n"; $email_addr = "llvm-testresults\@cs.uiuc.edu"; -$themail = `mail -s 'X86 nightly tester results' $email_addr < $email`; +`mail -s '$nickname $hardware nightly tester results' $email_addr < $email`; From lattner at cs.uiuc.edu Fri Jul 14 17:19:30 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 14 Jul 2006 17:19:30 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Constants.h Message-ID: <200607142219.RAA08622@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: Constants.h updated: 1.84 -> 1.85 --- Log message: Add another helper method. --- Diffs of the changes: (+4 -0) Constants.h | 4 ++++ 1 files changed, 4 insertions(+) Index: llvm/include/llvm/Constants.h diff -u llvm/include/llvm/Constants.h:1.84 llvm/include/llvm/Constants.h:1.85 --- llvm/include/llvm/Constants.h:1.84 Fri Jul 14 14:37:01 2006 +++ llvm/include/llvm/Constants.h Fri Jul 14 17:19:18 2006 @@ -618,6 +618,10 @@ /// one, but with the specified operand set to the specified value. Constant *getWithOperandReplaced(unsigned OpNo, Constant *Op) const; + /// getWithOperands - This returns the current constant expression with the + /// operands replaced with the specified values. The specified operands must + /// match count and type with the existing ones. + Constant *getWithOperands(const std::vector &Ops) const; virtual void destroyConstant(); virtual void replaceUsesOfWithOnConstant(Value *From, Value *To, Use *U); From lattner at cs.uiuc.edu Fri Jul 14 17:20:13 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 14 Jul 2006 17:20:13 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Constants.cpp Message-ID: <200607142220.RAA08685@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Constants.cpp updated: 1.156 -> 1.157 --- Log message: Add a new helper, simplify ConstantExpr::getWithOperandReplaced at Gabor's request :) --- Diffs of the changes: (+57 -22) Constants.cpp | 79 +++++++++++++++++++++++++++++++++++++++++----------------- 1 files changed, 57 insertions(+), 22 deletions(-) Index: llvm/lib/VMCore/Constants.cpp diff -u llvm/lib/VMCore/Constants.cpp:1.156 llvm/lib/VMCore/Constants.cpp:1.157 --- llvm/lib/VMCore/Constants.cpp:1.156 Fri Jul 14 14:37:40 2006 +++ llvm/lib/VMCore/Constants.cpp Fri Jul 14 17:20:01 2006 @@ -504,11 +504,32 @@ assert(OpNo < getNumOperands() && "Operand num is out of range!"); assert(Op->getType() == getOperand(OpNo)->getType() && "Replacing operand with value of different type!"); - if (getOperand(OpNo) == Op) return const_cast(this); + if (getOperand(OpNo) == Op) + return const_cast(this); + Constant *Op0, *Op1, *Op2; switch (getOpcode()) { case Instruction::Cast: return ConstantExpr::getCast(Op, getType()); + case Instruction::Select: + Op0 = (OpNo == 0) ? Op : getOperand(0); + Op1 = (OpNo == 1) ? Op : getOperand(1); + Op2 = (OpNo == 2) ? Op : getOperand(2); + return ConstantExpr::getSelect(Op0, Op1, Op2); + case Instruction::InsertElement: + Op0 = (OpNo == 0) ? Op : getOperand(0); + Op1 = (OpNo == 1) ? Op : getOperand(1); + Op2 = (OpNo == 2) ? Op : getOperand(2); + return ConstantExpr::getInsertElement(Op0, Op1, Op2); + case Instruction::ExtractElement: + Op0 = (OpNo == 0) ? Op : getOperand(0); + Op1 = (OpNo == 1) ? Op : getOperand(1); + return ConstantExpr::getExtractElement(Op0, Op1); + case Instruction::ShuffleVector: + Op0 = (OpNo == 0) ? Op : getOperand(0); + Op1 = (OpNo == 1) ? Op : getOperand(1); + Op2 = (OpNo == 2) ? Op : getOperand(2); + return ConstantExpr::getShuffleVector(Op0, Op1, Op2); case Instruction::GetElementPtr: { std::vector Ops; for (unsigned i = 1, e = getNumOperands(); i != e; ++i) @@ -518,33 +539,47 @@ Ops[OpNo-1] = Op; return ConstantExpr::getGetElementPtr(getOperand(0), Ops); } + default: + assert(getNumOperands() == 2 && "Must be binary operator?"); + Op0 = (OpNo == 0) ? Op : getOperand(0); + Op1 = (OpNo == 1) ? Op : getOperand(1); + return ConstantExpr::get(getOpcode(), Op0, Op1); + } +} + +/// getWithOperands - This returns the current constant expression with the +/// operands replaced with the specified values. The specified operands must +/// match count and type with the existing ones. +Constant *ConstantExpr:: +getWithOperands(const std::vector &Ops) const { + assert(Ops.size() == getNumOperands() && "Operand count mismatch!"); + bool AnyChange = false; + for (unsigned i = 0, e = Ops.size(); i != e; ++i) { + assert(Ops[i]->getType() == getOperand(i)->getType() && + "Operand type mismatch!"); + AnyChange |= Ops[i] != getOperand(i); + } + if (!AnyChange) // No operands changed, return self. + return const_cast(this); + + switch (getOpcode()) { + case Instruction::Cast: + return ConstantExpr::getCast(Ops[0], getType()); case Instruction::Select: - if (OpNo == 0) - return ConstantExpr::getSelect(Op, getOperand(1), getOperand(2)); - if (OpNo == 1) - return ConstantExpr::getSelect(getOperand(0), Op, getOperand(2)); - return ConstantExpr::getSelect(getOperand(0), getOperand(1), Op); + return ConstantExpr::getSelect(Ops[0], Ops[1], Ops[2]); case Instruction::InsertElement: - if (OpNo == 0) - return ConstantExpr::getInsertElement(Op, getOperand(1), getOperand(2)); - if (OpNo == 1) - return ConstantExpr::getInsertElement(getOperand(0), Op, getOperand(2)); - return ConstantExpr::getInsertElement(getOperand(0), getOperand(1), Op); + return ConstantExpr::getInsertElement(Ops[0], Ops[1], Ops[2]); case Instruction::ExtractElement: - if (OpNo == 0) - return ConstantExpr::getExtractElement(Op, getOperand(1)); - return ConstantExpr::getExtractElement(getOperand(0), Op); + return ConstantExpr::getExtractElement(Ops[0], Ops[1]); case Instruction::ShuffleVector: - if (OpNo == 0) - return ConstantExpr::getShuffleVector(Op, getOperand(1), getOperand(2)); - if (OpNo == 1) - return ConstantExpr::getShuffleVector(getOperand(0), Op, getOperand(2)); - return ConstantExpr::getShuffleVector(getOperand(0), getOperand(1), Op); + return ConstantExpr::getShuffleVector(Ops[0], Ops[1], Ops[2]); + case Instruction::GetElementPtr: { + std::vector ActualOps(Ops.begin()+1, Ops.end()); + return ConstantExpr::getGetElementPtr(Ops[0], ActualOps); + } default: assert(getNumOperands() == 2 && "Must be binary operator?"); - if (OpNo == 0) - return ConstantExpr::get(getOpcode(), Op, getOperand(1)); - return ConstantExpr::get(getOpcode(), getOperand(0), Op); + return ConstantExpr::get(getOpcode(), Ops[0], Ops[1]); } } From lattner at cs.uiuc.edu Fri Jul 14 17:21:25 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 14 Jul 2006 17:21:25 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Utils/ValueMapper.cpp Message-ID: <200607142221.RAA08771@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Utils: ValueMapper.cpp updated: 1.26 -> 1.27 --- Log message: eliminate some ugly code, using ConstantExpr::getWithOperands instead. --- Diffs of the changes: (+4 -35) ValueMapper.cpp | 39 ++++----------------------------------- 1 files changed, 4 insertions(+), 35 deletions(-) Index: llvm/lib/Transforms/Utils/ValueMapper.cpp diff -u llvm/lib/Transforms/Utils/ValueMapper.cpp:1.26 llvm/lib/Transforms/Utils/ValueMapper.cpp:1.27 --- llvm/lib/Transforms/Utils/ValueMapper.cpp:1.26 Fri May 26 20:22:24 2006 +++ llvm/lib/Transforms/Utils/ValueMapper.cpp Fri Jul 14 17:21:13 2006 @@ -71,41 +71,10 @@ return VMSlot = C; } else if (ConstantExpr *CE = dyn_cast(C)) { - if (CE->getOpcode() == Instruction::Cast) { - Constant *MV = cast(MapValue(CE->getOperand(0), VM)); - return VMSlot = ConstantExpr::getCast(MV, CE->getType()); - } else if (CE->getOpcode() == Instruction::GetElementPtr) { - std::vector Idx; - Constant *MV = cast(MapValue(CE->getOperand(0), VM)); - for (unsigned i = 1, e = CE->getNumOperands(); i != e; ++i) - Idx.push_back(cast(MapValue(CE->getOperand(i), VM))); - return VMSlot = ConstantExpr::getGetElementPtr(MV, Idx); - } else if (CE->getOpcode() == Instruction::Select) { - Constant *MV1 = cast(MapValue(CE->getOperand(0), VM)); - Constant *MV2 = cast(MapValue(CE->getOperand(1), VM)); - Constant *MV3 = cast(MapValue(CE->getOperand(2), VM)); - return VMSlot = ConstantExpr::getSelect(MV1, MV2, MV3); - } else if (CE->getOpcode() == Instruction::InsertElement) { - Constant *MV1 = cast(MapValue(CE->getOperand(0), VM)); - Constant *MV2 = cast(MapValue(CE->getOperand(1), VM)); - Constant *MV3 = cast(MapValue(CE->getOperand(2), VM)); - return VMSlot = ConstantExpr::getInsertElement(MV1, MV2, MV3); - } else if (CE->getOpcode() == Instruction::ExtractElement) { - Constant *MV1 = cast(MapValue(CE->getOperand(0), VM)); - Constant *MV2 = cast(MapValue(CE->getOperand(1), VM)); - return VMSlot = ConstantExpr::getExtractElement(MV1, MV2); - } else if (CE->getOpcode() == Instruction::ShuffleVector) { - Constant *MV1 = cast(MapValue(CE->getOperand(0), VM)); - Constant *MV2 = cast(MapValue(CE->getOperand(1), VM)); - Constant *MV3 = cast(CE->getOperand(2)); - return VMSlot = ConstantExpr::getShuffleVector(MV1, MV2, MV3); - } else { - assert(CE->getNumOperands() == 2 && "Must be binary operator?"); - Constant *MV1 = cast(MapValue(CE->getOperand(0), VM)); - Constant *MV2 = cast(MapValue(CE->getOperand(1), VM)); - return VMSlot = ConstantExpr::get(CE->getOpcode(), MV1, MV2); - } - + std::vector Ops; + for (unsigned i = 0, e = CE->getNumOperands(); i != e; ++i) + Ops.push_back(cast(MapValue(CE->getOperand(i), VM))); + return VMSlot = CE->getWithOperands(Ops); } else if (ConstantPacked *CP = dyn_cast(C)) { for (unsigned i = 0, e = CP->getNumOperands(); i != e; ++i) { Value *MV = MapValue(CP->getOperand(i), VM); From lattner at cs.uiuc.edu Fri Jul 14 17:21:43 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 14 Jul 2006 17:21:43 -0500 Subject: [llvm-commits] CVS: llvm/lib/Linker/LinkModules.cpp Message-ID: <200607142221.RAA08804@zion.cs.uiuc.edu> Changes in directory llvm/lib/Linker: LinkModules.cpp updated: 1.115 -> 1.116 --- Log message: eliminate some ugly code, using ConstantExpr::getWithOperands instead. --- Diffs of the changes: (+4 -51) LinkModules.cpp | 55 ++++--------------------------------------------------- 1 files changed, 4 insertions(+), 51 deletions(-) Index: llvm/lib/Linker/LinkModules.cpp diff -u llvm/lib/Linker/LinkModules.cpp:1.115 llvm/lib/Linker/LinkModules.cpp:1.116 --- llvm/lib/Linker/LinkModules.cpp:1.115 Thu Jun 15 20:24:04 2006 +++ llvm/lib/Linker/LinkModules.cpp Fri Jul 14 17:21:31 2006 @@ -295,57 +295,10 @@ Operands[i] = cast(RemapOperand(CP->getOperand(i), ValueMap)); Result = ConstantPacked::get(Operands); } else if (const ConstantExpr *CE = dyn_cast(CPV)) { - if (CE->getOpcode() == Instruction::GetElementPtr) { - Value *Ptr = RemapOperand(CE->getOperand(0), ValueMap); - std::vector Indices; - Indices.reserve(CE->getNumOperands()-1); - for (unsigned i = 1, e = CE->getNumOperands(); i != e; ++i) - Indices.push_back(cast(RemapOperand(CE->getOperand(i), - ValueMap))); - - Result = ConstantExpr::getGetElementPtr(cast(Ptr), Indices); - } else if (CE->getOpcode() == Instruction::ExtractElement) { - Value *Ptr = RemapOperand(CE->getOperand(0), ValueMap); - Value *Idx = RemapOperand(CE->getOperand(1), ValueMap); - Result = ConstantExpr::getExtractElement(cast(Ptr), - cast(Idx)); - } else if (CE->getOpcode() == Instruction::InsertElement) { - Value *Ptr = RemapOperand(CE->getOperand(0), ValueMap); - Value *Elt = RemapOperand(CE->getOperand(1), ValueMap); - Value *Idx = RemapOperand(CE->getOperand(2), ValueMap); - Result = ConstantExpr::getInsertElement(cast(Ptr), - cast(Elt), - cast(Idx)); - } else if (CE->getOpcode() == Instruction::ShuffleVector) { - Value *V1 = RemapOperand(CE->getOperand(0), ValueMap); - Value *V2 = RemapOperand(CE->getOperand(1), ValueMap); - Result = ConstantExpr::getShuffleVector(cast(V1), - cast(V2), - cast(CE->getOperand(2))); - } else if (CE->getNumOperands() == 1) { - // Cast instruction - assert(CE->getOpcode() == Instruction::Cast); - Value *V = RemapOperand(CE->getOperand(0), ValueMap); - Result = ConstantExpr::getCast(cast(V), CE->getType()); - } else if (CE->getNumOperands() == 3) { - // Select instruction - assert(CE->getOpcode() == Instruction::Select); - Value *V1 = RemapOperand(CE->getOperand(0), ValueMap); - Value *V2 = RemapOperand(CE->getOperand(1), ValueMap); - Value *V3 = RemapOperand(CE->getOperand(2), ValueMap); - Result = ConstantExpr::getSelect(cast(V1), cast(V2), - cast(V3)); - } else if (CE->getNumOperands() == 2) { - // Binary operator... - Value *V1 = RemapOperand(CE->getOperand(0), ValueMap); - Value *V2 = RemapOperand(CE->getOperand(1), ValueMap); - - Result = ConstantExpr::get(CE->getOpcode(), cast(V1), - cast(V2)); - } else { - assert(0 && "Unknown constant expr type!"); - } - + std::vector Ops; + for (unsigned i = 0, e = CE->getNumOperands(); i != e; ++i) + Ops.push_back(cast(RemapOperand(CE->getOperand(i),ValueMap))); + Result = CE->getWithOperands(Ops); } else { assert(0 && "Unknown type of derived type constant value!"); } From lattner at cs.uiuc.edu Fri Jul 14 17:54:18 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 14 Jul 2006 17:54:18 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/ADT/StringExtras.h Message-ID: <200607142254.RAA09099@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/ADT: StringExtras.h updated: 1.33 -> 1.34 --- Log message: Add two helper functions --- Diffs of the changes: (+9 -0) StringExtras.h | 9 +++++++++ 1 files changed, 9 insertions(+) Index: llvm/include/llvm/ADT/StringExtras.h diff -u llvm/include/llvm/ADT/StringExtras.h:1.33 llvm/include/llvm/ADT/StringExtras.h:1.34 --- llvm/include/llvm/ADT/StringExtras.h:1.33 Thu Jun 1 02:03:53 2006 +++ llvm/include/llvm/ADT/StringExtras.h Fri Jul 14 17:54:06 2006 @@ -129,6 +129,15 @@ std::string getToken(std::string &Source, const char *Delimiters = " \t\n\v\f\r"); +/// UnescapeString - Modify the argument string, turning two character sequences +/// like '\\' 'n' into '\n'. This handles: \e \a \b \f \n \r \t \v \' \\ and +/// \num (where num is a 1-3 byte octal value). +void UnescapeString(std::string &Str); + +/// EscapeString - Modify the argument string, turning '\\' and anything that +/// doesn't satisfy std::isprint into an escape sequence. +void EscapeString(std::string &Str); + } // End llvm namespace #endif From lattner at cs.uiuc.edu Fri Jul 14 17:54:51 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 14 Jul 2006 17:54:51 -0500 Subject: [llvm-commits] CVS: llvm/lib/Support/StringExtras.cpp Message-ID: <200607142254.RAA09139@zion.cs.uiuc.edu> Changes in directory llvm/lib/Support: StringExtras.cpp updated: 1.3 -> 1.4 --- Log message: Add two helpers for escaping and unescaping strings. --- Diffs of the changes: (+50 -0) StringExtras.cpp | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 50 insertions(+) Index: llvm/lib/Support/StringExtras.cpp diff -u llvm/lib/Support/StringExtras.cpp:1.3 llvm/lib/Support/StringExtras.cpp:1.4 --- llvm/lib/Support/StringExtras.cpp:1.3 Thu Apr 21 17:52:05 2005 +++ llvm/lib/Support/StringExtras.cpp Fri Jul 14 17:54:39 2006 @@ -41,3 +41,53 @@ return Result; } + + +/// UnescapeString - Modify the argument string, turning two character sequences +/// like '\\' 'n' into '\n'. This handles: \e \a \b \f \n \r \t \v \' \\ and +/// \num (where num is a 1-3 byte octal value). +void llvm::UnescapeString(std::string &Str) { + for (unsigned i = 0; i != Str.size(); ++i) { + if (Str[i] == '\\' && i != Str.size()-1) { + switch (Str[i+1]) { + default: continue; // Don't execute the code after the switch. + case 'a': Str[i] = '\a'; break; + case 'b': Str[i] = '\b'; break; + case 'e': Str[i] = 27; break; + case 'f': Str[i] = '\f'; break; + case 'n': Str[i] = '\n'; break; + case 'r': Str[i] = '\r'; break; + case 't': Str[i] = '\t'; break; + case 'v': Str[i] = '\v'; break; + case '\'': Str[i] = '\''; break; + case '\\': Str[i] = '\\'; break; + } + // Nuke the second character. + Str.erase(Str.begin()+i+1); + } + } +} + +/// EscapeString - Modify the argument string, turning '\\' and anything that +/// doesn't satisfy std::isprint into an escape sequence. +void llvm::EscapeString(std::string &Str) { + for (unsigned i = 0; i != Str.size(); ++i) { + if (Str[i] == '\\') { + ++i; + Str.insert(Str.begin()+i, '\\'); + } else if (Str[i] == '\t') { + Str[i++] = '\\'; + Str.insert(Str.begin()+i, 't'); + } else if (Str[i] == '\n') { + Str[i++] = '\\'; + Str.insert(Str.begin()+i, 'n'); + } else if (!std::isprint(Str[i])) { + // Always expand to a 3-digit octal escape. + unsigned Char = Str[i]; + Str[i++] = '\\'; + Str.insert(Str.begin()+i++, '0'+((Char/64) & 7)); + Str.insert(Str.begin()+i++, '0'+((Char/8) & 7)); + Str.insert(Str.begin()+i , '0'+( Char & 7)); + } + } +} From lattner at cs.uiuc.edu Fri Jul 14 17:59:23 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 14 Jul 2006 17:59:23 -0500 Subject: [llvm-commits] CVS: llvm/utils/TableGen/AsmWriterEmitter.cpp Message-ID: <200607142259.RAA09221@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: AsmWriterEmitter.cpp updated: 1.28 -> 1.29 --- Log message: Emit the string information for the asm writer as a single large string and index into it, instead of emitting it like this: static const char * const OpStrs[] = { "PHINODE\n", // PHI 0, // INLINEASM "adc ", // ADC32mi "adc ", // ADC32mi8 ... The old way required thousands of relocations that slows down link time and dynamic load times. This also cuts about 10K off each of the X86 asmprinters, and should shrink the others as well. --- Diffs of the changes: (+69 -36) AsmWriterEmitter.cpp | 105 +++++++++++++++++++++++++++++++++------------------ 1 files changed, 69 insertions(+), 36 deletions(-) Index: llvm/utils/TableGen/AsmWriterEmitter.cpp diff -u llvm/utils/TableGen/AsmWriterEmitter.cpp:1.28 llvm/utils/TableGen/AsmWriterEmitter.cpp:1.29 --- llvm/utils/TableGen/AsmWriterEmitter.cpp:1.28 Mon May 1 12:01:17 2006 +++ llvm/utils/TableGen/AsmWriterEmitter.cpp Fri Jul 14 17:59:11 2006 @@ -15,6 +15,7 @@ #include "AsmWriterEmitter.h" #include "CodeGenTarget.h" #include "Record.h" +#include "llvm/ADT/StringExtras.h" #include #include using namespace llvm; @@ -346,49 +347,81 @@ if (!I->second.AsmString.empty()) Instructions.push_back(AsmWriterInst(I->second, Variant)); - // If all of the instructions start with a constant string (a very very common - // occurance), emit all of the constant strings as a big table lookup instead - // of requiring a switch for them. - bool AllStartWithString = true; - - for (unsigned i = 0, e = Instructions.size(); i != e; ++i) - if (Instructions[i].Operands.empty() || - Instructions[i].Operands[0].OperandType != - AsmWriterOperand::isLiteralTextOperand) { - AllStartWithString = false; - break; - } - std::vector NumberedInstructions; Target.getInstructionsByEnumValue(NumberedInstructions); - if (AllStartWithString) { - // Compute the CodeGenInstruction -> AsmWriterInst mapping. Note that not - // all machine instructions are necessarily being printed, so there may be - // target instructions not in this map. - std::map CGIAWIMap; - for (unsigned i = 0, e = Instructions.size(); i != e; ++i) - CGIAWIMap.insert(std::make_pair(Instructions[i].CGI, &Instructions[i])); - - // Emit a table of constant strings. - O << " static const char * const OpStrs[] = {\n"; - for (unsigned i = 0, e = NumberedInstructions.size(); i != e; ++i) { - AsmWriterInst *AWI = CGIAWIMap[NumberedInstructions[i]]; - if (AWI == 0) { - // Something not handled by the asmwriter printer. - O << " 0,\t// "; + // Compute the CodeGenInstruction -> AsmWriterInst mapping. Note that not + // all machine instructions are necessarily being printed, so there may be + // target instructions not in this map. + std::map CGIAWIMap; + for (unsigned i = 0, e = Instructions.size(); i != e; ++i) + CGIAWIMap.insert(std::make_pair(Instructions[i].CGI, &Instructions[i])); + + // Build an aggregate string, and build a table of offsets into it. + std::map StringOffset; + std::string AggregateString; + AggregateString += '\0'; + + O << " static unsigned short OpStrIdxs[] = {\n"; + for (unsigned i = 0, e = NumberedInstructions.size(); i != e; ++i) { + AsmWriterInst *AWI = CGIAWIMap[NumberedInstructions[i]]; + unsigned Idx; + if (AWI == 0 || AWI->Operands[0].Str.empty()) { + // Something not handled by the asmwriter printer. + Idx = 0; + } else { + unsigned &Entry = StringOffset[AWI->Operands[0].Str]; + if (Entry == 0) { + // Add the string to the aggregate if this is the first time found. + Entry = AggregateString.size(); + std::string Str = AWI->Operands[0].Str; + UnescapeString(Str); + AggregateString += Str; + AggregateString += '\0'; + } + Idx = Entry; + assert(Entry < 65536 && "Must not use unsigned short for table idx!"); + + // Nuke the string from the operand list. It is now handled! + AWI->Operands.erase(AWI->Operands.begin()); + } + O << " " << Idx << ",\t// " << NumberedInstructions[i]->TheDef->getName() + << "\n"; + } + O << " };\n\n"; + + // Emit the string itself. + O << " const char *AsmStrs = \n \""; + unsigned CharsPrinted = 0; + EscapeString(AggregateString); + for (unsigned i = 0, e = AggregateString.size(); i != e; ++i) { + if (CharsPrinted > 70) { + O << "\"\n \""; + CharsPrinted = 0; + } + O << AggregateString[i]; + ++CharsPrinted; + + // Print escape sequences all together. + if (AggregateString[i] == '\\') { + assert(i+1 < AggregateString.size() && "Incomplete escape sequence!"); + if (isdigit(AggregateString[i+1])) { + assert(isdigit(AggregateString[i+2]) && isdigit(AggregateString[i+3]) && + "Expected 3 digit octal escape!"); + O << AggregateString[++i]; + O << AggregateString[++i]; + O << AggregateString[++i]; + CharsPrinted += 3; } else { - O << " \"" << AWI->Operands[0].Str << "\",\t// "; - // Nuke the string from the operand list. It is now handled! - AWI->Operands.erase(AWI->Operands.begin()); + O << AggregateString[++i]; + ++CharsPrinted; } - O << NumberedInstructions[i]->TheDef->getName() << "\n"; } - O << " };\n\n" - << " // Emit the opcode for the instruction.\n" - << " if (const char *AsmStr = OpStrs[MI->getOpcode()])\n" - << " O << AsmStr;\n\n"; } + O << "\";\n\n"; + + O << " // Emit the opcode for the instruction.\n" + << " O << AsmStrs+OpStrIdxs[MI->getOpcode()];\n\n"; // Because this is a vector we want to emit from the end. Reverse all of the // elements in the vector. From lattner at cs.uiuc.edu Fri Jul 14 18:05:17 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 14 Jul 2006 18:05:17 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86AsmPrinter.cpp X86AsmPrinter.h Message-ID: <200607142305.SAA09361@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86AsmPrinter.cpp updated: 1.188 -> 1.189 X86AsmPrinter.h updated: 1.22 -> 1.23 --- Log message: Add an out-of-line virtual method for X86DwarfWriter to give it a home. --- Diffs of the changes: (+21 -19) X86AsmPrinter.cpp | 4 ++++ X86AsmPrinter.h | 36 +++++++++++++++++------------------- 2 files changed, 21 insertions(+), 19 deletions(-) Index: llvm/lib/Target/X86/X86AsmPrinter.cpp diff -u llvm/lib/Target/X86/X86AsmPrinter.cpp:1.188 llvm/lib/Target/X86/X86AsmPrinter.cpp:1.189 --- llvm/lib/Target/X86/X86AsmPrinter.cpp:1.188 Wed Jun 28 19:33:06 2006 +++ llvm/lib/Target/X86/X86AsmPrinter.cpp Fri Jul 14 18:05:05 2006 @@ -44,6 +44,10 @@ #endif ); +// Out of line virtual function to home classes. +void X86DwarfWriter::virtfn() {} + + /// doInitialization bool X86SharedAsmPrinter::doInitialization(Module &M) { PrivateGlobalPrefix = ".L"; Index: llvm/lib/Target/X86/X86AsmPrinter.h diff -u llvm/lib/Target/X86/X86AsmPrinter.h:1.22 llvm/lib/Target/X86/X86AsmPrinter.h:1.23 --- llvm/lib/Target/X86/X86AsmPrinter.h:1.22 Wed Jun 28 19:33:06 2006 +++ llvm/lib/Target/X86/X86AsmPrinter.h Fri Jul 14 18:05:05 2006 @@ -32,25 +32,23 @@ /// X86DwarfWriter - Dwarf debug info writer customized for Darwin/Mac OS X /// struct X86DwarfWriter : public DwarfWriter { - // Ctor. -X86DwarfWriter(std::ostream &o, AsmPrinter *ap) - : DwarfWriter(o, ap) - { - needsSet = true; - DwarfAbbrevSection = ".section __DWARFA,__debug_abbrev"; - DwarfInfoSection = ".section __DWARFA,__debug_info"; - DwarfLineSection = ".section __DWARFA,__debug_line"; - DwarfFrameSection = ".section __DWARFA,__debug_frame"; - DwarfPubNamesSection = ".section __DWARFA,__debug_pubnames"; - DwarfPubTypesSection = ".section __DWARFA,__debug_pubtypes"; - DwarfStrSection = ".section __DWARFA,__debug_str"; - DwarfLocSection = ".section __DWARFA,__debug_loc"; - DwarfARangesSection = ".section __DWARFA,__debug_aranges"; - DwarfRangesSection = ".section __DWARFA,__debug_ranges"; - DwarfMacInfoSection = ".section __DWARFA,__debug_macinfo"; - TextSection = ".text"; - DataSection = ".data"; - } + X86DwarfWriter(std::ostream &o, AsmPrinter *ap) : DwarfWriter(o, ap) { + needsSet = true; + DwarfAbbrevSection = ".section __DWARFA,__debug_abbrev"; + DwarfInfoSection = ".section __DWARFA,__debug_info"; + DwarfLineSection = ".section __DWARFA,__debug_line"; + DwarfFrameSection = ".section __DWARFA,__debug_frame"; + DwarfPubNamesSection = ".section __DWARFA,__debug_pubnames"; + DwarfPubTypesSection = ".section __DWARFA,__debug_pubtypes"; + DwarfStrSection = ".section __DWARFA,__debug_str"; + DwarfLocSection = ".section __DWARFA,__debug_loc"; + DwarfARangesSection = ".section __DWARFA,__debug_aranges"; + DwarfRangesSection = ".section __DWARFA,__debug_ranges"; + DwarfMacInfoSection = ".section __DWARFA,__debug_macinfo"; + TextSection = ".text"; + DataSection = ".data"; + } + virtual void virtfn(); // out of line virtual fn. }; struct X86SharedAsmPrinter : public AsmPrinter { From lattner at cs.uiuc.edu Fri Jul 14 18:09:01 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 14 Jul 2006 18:09:01 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/MachineFunction.cpp Message-ID: <200607142309.SAA09485@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: MachineFunction.cpp updated: 1.95 -> 1.96 --- Log message: Add an out-of-line virtual function to home class. --- Diffs of the changes: (+2 -0) MachineFunction.cpp | 2 ++ 1 files changed, 2 insertions(+) Index: llvm/lib/CodeGen/MachineFunction.cpp diff -u llvm/lib/CodeGen/MachineFunction.cpp:1.95 llvm/lib/CodeGen/MachineFunction.cpp:1.96 --- llvm/lib/CodeGen/MachineFunction.cpp:1.95 Wed Jun 28 17:17:39 2006 +++ llvm/lib/CodeGen/MachineFunction.cpp Fri Jul 14 18:08:47 2006 @@ -38,6 +38,8 @@ static AnnotationID MF_AID( AnnotationManager::getID("CodeGen::MachineCodeForFunction")); +// Out of line virtual function to home classes. +void MachineFunctionPass::virtfn() {} namespace { struct VISIBILITY_HIDDEN Printer : public MachineFunctionPass { From lattner at cs.uiuc.edu Fri Jul 14 18:09:01 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 14 Jul 2006 18:09:01 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineFunctionPass.h Message-ID: <200607142309.SAA09481@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: MachineFunctionPass.h updated: 1.4 -> 1.5 --- Log message: Add an out-of-line virtual function to home class. --- Diffs of the changes: (+2 -1) MachineFunctionPass.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/include/llvm/CodeGen/MachineFunctionPass.h diff -u llvm/include/llvm/CodeGen/MachineFunctionPass.h:1.4 llvm/include/llvm/CodeGen/MachineFunctionPass.h:1.5 --- llvm/include/llvm/CodeGen/MachineFunctionPass.h:1.4 Thu Apr 21 15:38:00 2005 +++ llvm/include/llvm/CodeGen/MachineFunctionPass.h Fri Jul 14 18:08:47 2006 @@ -33,10 +33,11 @@ // FIXME: This pass should declare that the pass does not invalidate any LLVM // passes. - virtual bool runOnFunction(Function &F) { return runOnMachineFunction(MachineFunction::get(&F)); } + + virtual void virtfn(); // out of line virtual fn to give class a home. }; } // End llvm namespace From lattner at cs.uiuc.edu Fri Jul 14 18:14:14 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 14 Jul 2006 18:14:14 -0500 Subject: [llvm-commits] CVS: llvm/utils/TableGen/AsmWriterEmitter.cpp Message-ID: <200607142314.SAA09563@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: AsmWriterEmitter.cpp updated: 1.29 -> 1.30 --- Log message: The generated index array should be const. --- Diffs of the changes: (+1 -1) AsmWriterEmitter.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/utils/TableGen/AsmWriterEmitter.cpp diff -u llvm/utils/TableGen/AsmWriterEmitter.cpp:1.29 llvm/utils/TableGen/AsmWriterEmitter.cpp:1.30 --- llvm/utils/TableGen/AsmWriterEmitter.cpp:1.29 Fri Jul 14 17:59:11 2006 +++ llvm/utils/TableGen/AsmWriterEmitter.cpp Fri Jul 14 18:14:02 2006 @@ -362,7 +362,7 @@ std::string AggregateString; AggregateString += '\0'; - O << " static unsigned short OpStrIdxs[] = {\n"; + O << " static const unsigned short OpStrIdxs[] = {\n"; for (unsigned i = 0, e = NumberedInstructions.size(); i != e; ++i) { AsmWriterInst *AWI = CGIAWIMap[NumberedInstructions[i]]; unsigned Idx; From lattner at cs.uiuc.edu Fri Jul 14 20:24:36 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 14 Jul 2006 20:24:36 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC.h PPCAsmPrinter.cpp PPCSubtarget.cpp PPCSubtarget.h PPCTargetMachine.cpp Message-ID: <200607150124.UAA10081@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPC.h updated: 1.29 -> 1.30 PPCAsmPrinter.cpp updated: 1.186 -> 1.187 PPCSubtarget.cpp updated: 1.24 -> 1.25 PPCSubtarget.h updated: 1.16 -> 1.17 PPCTargetMachine.cpp updated: 1.97 -> 1.98 --- Log message: Remove what little AIX support we have. It has never been tested and isn't complete. --- Diffs of the changes: (+2 -169) PPC.h | 1 PPCAsmPrinter.cpp | 154 --------------------------------------------------- PPCSubtarget.cpp | 7 -- PPCSubtarget.h | 2 PPCTargetMachine.cpp | 7 -- 5 files changed, 2 insertions(+), 169 deletions(-) Index: llvm/lib/Target/PowerPC/PPC.h diff -u llvm/lib/Target/PowerPC/PPC.h:1.29 llvm/lib/Target/PowerPC/PPC.h:1.30 --- llvm/lib/Target/PowerPC/PPC.h:1.29 Fri Jun 16 13:50:48 2006 +++ llvm/lib/Target/PowerPC/PPC.h Fri Jul 14 20:24:23 2006 @@ -24,7 +24,6 @@ FunctionPass *createPPCBranchSelectionPass(); FunctionPass *createPPCISelDag(PPCTargetMachine &TM); FunctionPass *createDarwinAsmPrinter(std::ostream &OS, PPCTargetMachine &TM); -FunctionPass *createAIXAsmPrinter(std::ostream &OS, PPCTargetMachine &TM); } // end namespace llvm; // GCC #defines PPC on Linux but we use it as our namespace name Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp diff -u llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.186 llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.187 --- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.186 Wed Jul 12 18:24:02 2006 +++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp Fri Jul 14 20:24:23 2006 @@ -306,32 +306,6 @@ } }; - - /// AIXAsmPrinter - PowerPC assembly printer, customized for AIX - /// - struct VISIBILITY_HIDDEN AIXAsmPrinter : public PPCAsmPrinter { - /// Map for labels corresponding to global variables - /// - std::map GVToLabelMap; - - AIXAsmPrinter(std::ostream &O, TargetMachine &TM) - : PPCAsmPrinter(O, TM) { - CommentString = "#"; - GlobalPrefix = "."; - ZeroDirective = "\t.space\t"; // ".space N" emits N zeros. - Data64bitsDirective = 0; // we can't emit a 64-bit unit - AlignmentIsInBytes = false; // Alignment is by power of 2. - ConstantPoolSection = "\t.const\t"; - } - - virtual const char *getPassName() const { - return "AIX PPC Assembly Printer"; - } - - bool runOnMachineFunction(MachineFunction &F); - bool doInitialization(Module &M); - bool doFinalization(Module &M); - }; } // end of anonymous namespace /// createDarwinAsmPrinterPass - Returns a pass that prints the PPC assembly @@ -343,14 +317,6 @@ return new DarwinAsmPrinter(o, tm); } -/// createAIXAsmPrinterPass - Returns a pass that prints the PPC assembly code -/// for a MachineFunction to the given output stream, in a format that the -/// AIX 5L assembler can deal with. -/// -FunctionPass *llvm::createAIXAsmPrinter(std::ostream &o, PPCTargetMachine &tm) { - return new AIXAsmPrinter(o, tm); -} - // Include the auto-generated portion of the assembly writer #include "PPCGenAsmWriter.inc" @@ -717,123 +683,3 @@ return false; // success } -/// runOnMachineFunction - This uses the printMachineInstruction() -/// method to print assembly for each instruction. -/// -bool AIXAsmPrinter::runOnMachineFunction(MachineFunction &MF) { - SetupMachineFunction(MF); - - // Print out constants referenced by the function - EmitConstantPool(MF.getConstantPool()); - - // Print out header for the function. - O << "\t.csect .text[PR]\n" - << "\t.align 2\n" - << "\t.globl " << CurrentFnName << '\n' - << "\t.globl ." << CurrentFnName << '\n' - << "\t.csect " << CurrentFnName << "[DS],3\n" - << CurrentFnName << ":\n" - << "\t.llong ." << CurrentFnName << ", TOC[tc0], 0\n" - << "\t.csect .text[PR]\n" - << '.' << CurrentFnName << ":\n"; - - // Print out code for the function. - for (MachineFunction::const_iterator I = MF.begin(), E = MF.end(); - I != E; ++I) { - printBasicBlockLabel(I); - O << '\n'; - for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end(); - II != E; ++II) { - // Print the assembly for the instruction. - O << "\t"; - printMachineInstruction(II); - } - } - - O << "LT.." << CurrentFnName << ":\n" - << "\t.long 0\n" - << "\t.byte 0,0,32,65,128,0,0,0\n" - << "\t.long LT.." << CurrentFnName << "-." << CurrentFnName << '\n' - << "\t.short 3\n" - << "\t.byte \"" << CurrentFnName << "\"\n" - << "\t.align 2\n"; - - // We didn't modify anything. - return false; -} - -bool AIXAsmPrinter::doInitialization(Module &M) { - SwitchToDataSection("", 0); - - O << "\t.machine \"ppc64\"\n" - << "\t.toc\n" - << "\t.csect .text[PR]\n"; - - // Print out module-level global variables - for (Module::const_global_iterator I = M.global_begin(), E = M.global_end(); - I != E; ++I) { - if (!I->hasInitializer()) - continue; - - std::string Name = I->getName(); - Constant *C = I->getInitializer(); - // N.B.: We are defaulting to writable strings - if (I->hasExternalLinkage()) { - O << "\t.globl " << Name << '\n' - << "\t.csect .data[RW],3\n"; - } else { - O << "\t.csect _global.rw_c[RW],3\n"; - } - O << Name << ":\n"; - EmitGlobalConstant(C); - } - - // Output labels for globals - if (M.global_begin() != M.global_end()) O << "\t.toc\n"; - for (Module::const_global_iterator I = M.global_begin(), E = M.global_end(); - I != E; ++I) { - const GlobalVariable *GV = I; - // Do not output labels for unused variables - if (GV->isExternal() && GV->use_begin() == GV->use_end()) - continue; - - IncrementFunctionNumber(); - std::string Name = GV->getName(); - std::string Label = "LC.." + utostr(getFunctionNumber()); - GVToLabelMap[GV] = Label; - O << Label << ":\n" - << "\t.tc " << Name << "[TC]," << Name; - if (GV->isExternal()) O << "[RW]"; - O << '\n'; - } - - AsmPrinter::doInitialization(M); - return false; // success -} - -bool AIXAsmPrinter::doFinalization(Module &M) { - const TargetData *TD = TM.getTargetData(); - // Print out module-level global variables - for (Module::const_global_iterator I = M.global_begin(), E = M.global_end(); - I != E; ++I) { - if (I->hasInitializer() || I->hasExternalLinkage()) - continue; - - std::string Name = I->getName(); - if (I->hasInternalLinkage()) { - O << "\t.lcomm " << Name << ",16,_global.bss_c"; - } else { - O << "\t.comm " << Name << "," << TD->getTypeSize(I->getType()) - << "," << Log2_32((unsigned)TD->getTypeAlignment(I->getType())); - } - O << "\t\t" << CommentString << " "; - WriteAsOperand(O, I, false, true, &M); - O << "\n"; - } - - O << "_section_.text:\n" - << "\t.csect .data[RW],3\n" - << "\t.llong _section_.text\n"; - AsmPrinter::doFinalization(M); - return false; // success -} Index: llvm/lib/Target/PowerPC/PPCSubtarget.cpp diff -u llvm/lib/Target/PowerPC/PPCSubtarget.cpp:1.24 llvm/lib/Target/PowerPC/PPCSubtarget.cpp:1.25 --- llvm/lib/Target/PowerPC/PPCSubtarget.cpp:1.24 Fri Jun 16 15:05:06 2006 +++ llvm/lib/Target/PowerPC/PPCSubtarget.cpp Fri Jul 14 20:24:23 2006 @@ -66,7 +66,6 @@ , HasAltivec(false) , HasFSQRT(false) , HasSTFIWX(false) - , IsAIX(false) , IsDarwin(false) { // Determine default and user specified characteristics @@ -102,12 +101,8 @@ const std::string& TT = M.getTargetTriple(); if (TT.length() > 5) { IsDarwin = TT.find("-darwin") != std::string::npos; - if (!IsDarwin) - IsAIX = TT.find("-aix") != std::string::npos; } else if (TT.empty()) { -#if defined(_POWER) - IsAIX = true; -#elif defined(__APPLE__) +#if defined(__APPLE__) IsDarwin = true; #endif } Index: llvm/lib/Target/PowerPC/PPCSubtarget.h diff -u llvm/lib/Target/PowerPC/PPCSubtarget.h:1.16 llvm/lib/Target/PowerPC/PPCSubtarget.h:1.17 --- llvm/lib/Target/PowerPC/PPCSubtarget.h:1.16 Fri Jun 16 12:50:12 2006 +++ llvm/lib/Target/PowerPC/PPCSubtarget.h Fri Jul 14 20:24:23 2006 @@ -39,7 +39,6 @@ bool HasAltivec; bool HasFSQRT; bool HasSTFIWX; - bool IsAIX; bool IsDarwin; public: /// This constructor initializes the data members to match that @@ -86,7 +85,6 @@ bool hasAltivec() const { return HasAltivec; } bool isGigaProcessor() const { return IsGigaProcessor; } - bool isAIX() const { return IsAIX; } bool isDarwin() const { return IsDarwin; } }; } // End llvm namespace Index: llvm/lib/Target/PowerPC/PPCTargetMachine.cpp diff -u llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.97 llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.98 --- llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:1.97 Wed Jul 12 15:42:10 2006 +++ llvm/lib/Target/PowerPC/PPCTargetMachine.cpp Fri Jul 14 20:24:23 2006 @@ -146,12 +146,7 @@ // Must run branch selection immediately preceding the asm printer PM.add(createPPCBranchSelectionPass()); - // Decide which asm printer to use. If the user has not specified one on - // the command line, choose whichever one matches the default (current host). - if (Subtarget.isAIX()) - PM.add(createAIXAsmPrinter(Out, *this)); - else - PM.add(createDarwinAsmPrinter(Out, *this)); + PM.add(createDarwinAsmPrinter(Out, *this)); PM.add(createMachineCodeDeleter()); return false; From lattner at cs.uiuc.edu Fri Jul 14 20:34:24 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 14 Jul 2006 20:34:24 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/AsmPrinter.cpp Message-ID: <200607150134.UAA10165@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: AsmPrinter.cpp updated: 1.83 -> 1.84 --- Log message: On 64-bit targets like ppc64, we should use .quad to output pointer directives, not .long. --- Diffs of the changes: (+9 -1) AsmPrinter.cpp | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletion(-) Index: llvm/lib/CodeGen/AsmPrinter.cpp diff -u llvm/lib/CodeGen/AsmPrinter.cpp:1.83 llvm/lib/CodeGen/AsmPrinter.cpp:1.84 --- llvm/lib/CodeGen/AsmPrinter.cpp:1.83 Wed Jun 28 19:26:09 2006 +++ llvm/lib/CodeGen/AsmPrinter.cpp Fri Jul 14 20:34:12 2006 @@ -217,12 +217,20 @@ SwitchToDataSection(JumpTableSection, 0); EmitAlignment(Log2_32(TD->getPointerAlignment())); + + // Pick the directive to use based on the pointer size. FIXME: when we support + // PIC jumptables, this should always use the 32-bit directive for label + // differences. + const char *PtrDataDirective = Data32bitsDirective; + if (TD->getPointerSize() == 8) + PtrDataDirective = Data64bitsDirective; + for (unsigned i = 0, e = JT.size(); i != e; ++i) { O << PrivateGlobalPrefix << "JTI" << getFunctionNumber() << '_' << i << ":\n"; const std::vector &JTBBs = JT[i].MBBs; for (unsigned ii = 0, ee = JTBBs.size(); ii != ee; ++ii) { - O << Data32bitsDirective << ' '; + O << PtrDataDirective << ' '; printBasicBlockLabel(JTBBs[ii]); O << '\n'; } From evan.cheng at apple.com Sat Jul 15 03:45:33 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Sat, 15 Jul 2006 03:45:33 -0500 Subject: [llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp DAGISelEmitter.h Message-ID: <200607150845.DAA14873@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: DAGISelEmitter.cpp updated: 1.219 -> 1.220 DAGISelEmitter.h updated: 1.64 -> 1.65 --- Log message: Reduce instruction selection code size and stack frame size by factoring code that emit target specific nodes into emit functions that are uniquified and shared among selection routines. e.g. This reduces X86ISelDAGToDAG.o (release) from ~2M to ~1.5M. Stack frame size of Select_store from ~13k down to ~8k. This is the first step. Further work to enable more sharing will follow. --- Diffs of the changes: (+135 -43) DAGISelEmitter.cpp | 175 ++++++++++++++++++++++++++++++++++++++++------------- DAGISelEmitter.h | 3 2 files changed, 135 insertions(+), 43 deletions(-) Index: llvm/utils/TableGen/DAGISelEmitter.cpp diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.219 llvm/utils/TableGen/DAGISelEmitter.cpp:1.220 --- llvm/utils/TableGen/DAGISelEmitter.cpp:1.219 Tue Jul 11 13:25:13 2006 +++ llvm/utils/TableGen/DAGISelEmitter.cpp Sat Jul 15 03:45:20 2006 @@ -2094,11 +2094,15 @@ /// GeneratedDecl - This is the set of all SDOperand declarations needed for /// the set of patterns for each top-level opcode. std::set > &GeneratedDecl; + /// TargetOpcodes - The target specific opcodes used by the resulting + /// instructions. + std::vector &TargetOpcodes; std::string ChainName; bool NewTF; bool DoReplace; unsigned TmpNo; + unsigned OpcNo; void emitCheck(const std::string &S) { if (!S.empty()) @@ -2112,15 +2116,20 @@ assert(!S.empty() && "Invalid declaration"); GeneratedDecl.insert(std::make_pair(isSDNode, S)); } + void emitOpcode(const std::string &Opc) { + TargetOpcodes.push_back(Opc); + OpcNo++; + } public: PatternCodeEmitter(DAGISelEmitter &ise, ListInit *preds, TreePatternNode *pattern, TreePatternNode *instr, std::vector > &gc, std::set > &gd, + std::vector &to, bool dorep) : ISE(ise), Predicates(preds), Pattern(pattern), Instruction(instr), - GeneratedCode(gc), GeneratedDecl(gd), - NewTF(false), DoReplace(dorep), TmpNo(0) {} + GeneratedCode(gc), GeneratedDecl(gd), TargetOpcodes(to), + NewTF(false), DoReplace(dorep), TmpNo(0), OpcNo(0) {} /// EmitMatchCode - Emit a matcher for N, going to the label for PatternNo /// if the match fails. At this point, we already know that the opcode for N @@ -2403,12 +2412,11 @@ case MVT::i32: CastType = "unsigned"; break; case MVT::i64: CastType = "uint64_t"; break; } - emitCode(CastType + " Tmp" + utostr(ResNo) + "C = (" + CastType + - ")cast(" + Val + ")->getValue();"); emitDecl("Tmp" + utostr(ResNo)); emitCode("Tmp" + utostr(ResNo) + - " = CurDAG->getTargetConstant(Tmp" + utostr(ResNo) + - "C, " + getEnumName(N->getTypeNum(0)) + ");"); + " = CurDAG->getTargetConstant(((" + CastType + + ") cast(" + Val + ")->getValue()), " + + getEnumName(N->getTypeNum(0)) + ");"); } else if (!N->isLeaf() && N->getOperator()->getName() == "texternalsym"){ Record *Op = OperatorMap[N->getName()]; // Transform ExternalSymbol to TargetExternalSymbol @@ -2551,9 +2559,13 @@ if (NodeHasInFlag || NodeHasOutFlag || NodeHasOptInFlag || HasImpInputs) emitDecl("InFlag"); - if (NodeHasOptInFlag) - emitCode("bool HasInFlag = " - "N.getOperand(N.getNumOperands()-1).getValueType() == MVT::Flag;"); + if (NodeHasOptInFlag) { + // FIXME: This is ugly. We are using a SDNode* in place of a bool. + emitDecl("HasInFlag", true); + emitCode("HasInFlag = " + "(N.getOperand(N.getNumOperands()-1).getValueType() == MVT::Flag) " + "? (SDNode*)1 : (SDNode*)0;"); + } if (HasVarOps) emitCode("std::vector Ops;"); @@ -2647,8 +2659,8 @@ emitDecl(NodeName, true); Code2 = NodeName + " = "; } - Code = "CurDAG->getTargetNode(" + - II.Namespace + "::" + II.TheDef->getName(); + Code = "CurDAG->getTargetNode(Opc" + utostr(OpcNo); + emitOpcode(II.Namespace + "::" + II.TheDef->getName()); // Output order: results, chain, flags // Result types. @@ -2672,8 +2684,8 @@ emitCode("for (unsigned i = 2, e = N.getNumOperands()-1; " "i != e; ++i) {"); else if (NodeHasOptInFlag) - emitCode("for (unsigned i = 2, e = N.getNumOperands()-HasInFlag; " - "i != e; ++i) {"); + emitCode("for (unsigned i = 2, e = N.getNumOperands()-" + "(HasInFlag?1:0); i != e; ++i) {"); else emitCode("for (unsigned i = 2, e = N.getNumOperands(); " "i != e; ++i) {"); @@ -2800,8 +2812,8 @@ // If this instruction is the root, and if there is only one use of it, // use SelectNodeTo instead of getTargetNode to avoid an allocation. emitCode("if (N.Val->hasOneUse()) {"); - std::string Code = " Result = CurDAG->SelectNodeTo(N.Val, " + - II.Namespace + "::" + II.TheDef->getName(); + std::string Code = " Result = CurDAG->SelectNodeTo(N.Val, Opc" + + utostr(OpcNo); if (N->getTypeNum(0) != MVT::isVoid) Code += ", " + getEnumName(N->getTypeNum(0)); if (NodeHasOutFlag) @@ -2813,8 +2825,8 @@ emitCode(Code + ");"); emitCode("} else {"); emitDecl("ResNode", true); - Code = " ResNode = CurDAG->getTargetNode(" + - II.Namespace + "::" + II.TheDef->getName(); + Code = " ResNode = CurDAG->getTargetNode(Opc" + utostr(OpcNo); + emitOpcode(II.Namespace + "::" + II.TheDef->getName()); if (N->getTypeNum(0) != MVT::isVoid) Code += ", " + getEnumName(N->getTypeNum(0)); if (NodeHasOutFlag) @@ -2955,8 +2967,8 @@ ChainEmitted = true; ChainName = "Chain"; } - emitCode("ResNode = CurDAG->getCopyFromReg(" + ChainName + ", " + - ISE.getQualifiedName(RR) + ", " + getEnumName(RVT) + + emitCode("ResNode = CurDAG->getCopyFromReg(" + ChainName + + ", " + ISE.getQualifiedName(RR) + ", " + getEnumName(RVT) + ", InFlag).Val;"); emitCode(ChainName + " = SDOperand(ResNode, 1);"); emitCode("InFlag = SDOperand(ResNode, 2);"); @@ -2975,10 +2987,12 @@ void DAGISelEmitter::GenerateCodeForPattern(PatternToMatch &Pattern, std::vector > &GeneratedCode, std::set > &GeneratedDecl, + std::vector &TargetOpcodes, bool DoReplace) { PatternCodeEmitter Emitter(*this, Pattern.getPredicates(), Pattern.getSrcPattern(), Pattern.getDstPattern(), - GeneratedCode, GeneratedDecl, DoReplace); + GeneratedCode, GeneratedDecl, TargetOpcodes, + DoReplace); // Emit the matcher, capturing named arguments in VariableMap. bool FoundChain = false; @@ -3173,6 +3187,8 @@ // Group the patterns by their top-level opcodes. std::map, CompareByRecordName> PatternsByOpcode; + // All unique target node emission functions. + std::map EmitFunctions; for (unsigned i = 0, e = PatternsToMatch.size(); i != e; ++i) { TreePatternNode *Node = PatternsToMatch[i].getSrcPattern(); if (!Node->isLeaf()) { @@ -3207,27 +3223,10 @@ CompareByRecordName>::iterator PBOI = PatternsByOpcode.begin(), E = PatternsByOpcode.end(); PBOI != E; ++PBOI) { const std::string &OpName = PBOI->first->getName(); - OS << "void Select_" << OpName << "(SDOperand &Result, SDOperand N) {\n"; - const SDNodeInfo &OpcodeInfo = getSDNodeInfo(PBOI->first); bool OptSlctOrder = (OpcodeInfo.hasProperty(SDNodeInfo::SDNPHasChain) && OpcodeInfo.getNumResults() > 0); - - if (OptSlctOrder) { - OS << " if (N.ResNo == " << OpcodeInfo.getNumResults() - << " && N.getValue(0).hasOneUse()) {\n" - << " SDOperand Dummy = " - << "CurDAG->getNode(ISD::HANDLENODE, MVT::Other, N);\n" - << " SelectionDAG::InsertISelMapEntry(CodeGenMap, N.Val, " - << OpcodeInfo.getNumResults() << ", Dummy.Val, 0);\n" - << " SelectionDAG::InsertISelMapEntry(HandleMap, N.Val, " - << OpcodeInfo.getNumResults() << ", Dummy.Val, 0);\n" - << " Result = Dummy;\n" - << " return;\n" - << " }\n"; - } - std::vector &Patterns = PBOI->second; assert(!Patterns.empty() && "No patterns but map has entry?"); @@ -3238,15 +3237,24 @@ PatternSortingPredicate(*this)); typedef std::vector > CodeList; - typedef std::set DeclSet; + typedef std::vector >::iterator CodeListI; std::vector > CodeForPatterns; - std::set > GeneratedDecl; + std::vector > PatternOpcodes; + std::vector > > PatternDecls; + std::set > AllGenDecls; for (unsigned i = 0, e = Patterns.size(); i != e; ++i) { CodeList GeneratedCode; + std::set > GeneratedDecl; + std::vector TargetOpcodes; GenerateCodeForPattern(*Patterns[i], GeneratedCode, GeneratedDecl, - OptSlctOrder); + TargetOpcodes, OptSlctOrder); + for (std::set >::iterator + si = GeneratedDecl.begin(), se = GeneratedDecl.end(); si!=se; ++si) + AllGenDecls.insert(*si); CodeForPatterns.push_back(std::make_pair(Patterns[i], GeneratedCode)); + PatternDecls.push_back(GeneratedDecl); + PatternOpcodes.push_back(TargetOpcodes); } // Scan the code to see if all of the patterns are reachable and if it is @@ -3273,11 +3281,94 @@ } } + // Factor target node emission code (emitted by EmitResultCode) into + // separate functions. Uniquing and share them among all instruction + // selection routines. + for (unsigned i = 0, e = CodeForPatterns.size(); i != e; ++i) { + CodeList &GeneratedCode = CodeForPatterns[i].second; + std::vector &TargetOpcodes = PatternOpcodes[i]; + std::set > Decls = PatternDecls[i]; + int CodeSize = (int)GeneratedCode.size(); + int LastPred = -1; + for (int j = CodeSize-1; j >= 0; --j) { + if (GeneratedCode[j].first) { + LastPred = j; + break; + } + } + + std::string CalleeDecls; + std::string CalleeCode = "(SDOperand &Result, SDOperand &N"; + std::string CallerCode = "(Result, N"; + for (unsigned j = 0, e = TargetOpcodes.size(); j != e; ++j) { + CalleeCode += ", unsigned Opc" + utostr(j); + CallerCode += ", " + TargetOpcodes[j]; + } + for (std::set >::iterator + I = Decls.begin(), E = Decls.end(); I != E; ++I) { + std::string Name = I->second; + if (I->first) { + CalleeCode += ", SDNode *" + Name; + CallerCode += ", " + Name; + } else { + CalleeCode += ", SDOperand &" + Name; + CallerCode += ", " + Name; + } + } + CallerCode += ");"; + CalleeCode += ") "; +#ifndef _MSC_VER + // Prevent emission routines from being inlined to reduce selection + // routines stack frame sizes. + CalleeCode += "__attribute__((noinline)) "; +#endif + CalleeCode += "{\n" + CalleeDecls; + for (int j = LastPred+1; j < CodeSize; ++j) + CalleeCode += " " + GeneratedCode[j].second + '\n'; + for (int j = LastPred+1; j < CodeSize; ++j) + GeneratedCode.pop_back(); + CalleeCode += "}\n"; + + // Uniquing the emission routines. + unsigned EmitFuncNum; + std::map::iterator EFI = + EmitFunctions.find(CalleeCode); + if (EFI != EmitFunctions.end()) { + EmitFuncNum = EFI->second; + } else { + EmitFuncNum = EmitFunctions.size(); + EmitFunctions.insert(std::make_pair(CalleeCode, EmitFuncNum)); + OS << "void " << "Emit_" << utostr(EmitFuncNum) << CalleeCode; + } + + // Replace the emission code within selection routines with calls to the + // emission functions. + CallerCode = "Emit_" + utostr(EmitFuncNum) + CallerCode; + GeneratedCode.push_back(std::make_pair(false, CallerCode)); + GeneratedCode.push_back(std::make_pair(false, "return;")); + } + + // Print function. + OS << "void Select_" << OpName << "(SDOperand &Result, SDOperand N) {\n"; + if (OptSlctOrder) { + OS << " if (N.ResNo == " << OpcodeInfo.getNumResults() + << " && N.getValue(0).hasOneUse()) {\n" + << " SDOperand Dummy = " + << "CurDAG->getNode(ISD::HANDLENODE, MVT::Other, N);\n" + << " SelectionDAG::InsertISelMapEntry(CodeGenMap, N.Val, " + << OpcodeInfo.getNumResults() << ", Dummy.Val, 0);\n" + << " SelectionDAG::InsertISelMapEntry(HandleMap, N.Val, " + << OpcodeInfo.getNumResults() << ", Dummy.Val, 0);\n" + << " Result = Dummy;\n" + << " return;\n" + << " }\n"; + } + // Print all declarations. for (std::set >::iterator - I = GeneratedDecl.begin(), E = GeneratedDecl.end(); I != E; ++I) + I = AllGenDecls.begin(), E = AllGenDecls.end(); I != E; ++I) if (I->first) - OS << " SDNode *" << I->second << ";\n"; + OS << " SDNode *" << I->second << " = NULL;\n"; else OS << " SDOperand " << I->second << "(0, 0);\n"; Index: llvm/utils/TableGen/DAGISelEmitter.h diff -u llvm/utils/TableGen/DAGISelEmitter.h:1.64 llvm/utils/TableGen/DAGISelEmitter.h:1.65 --- llvm/utils/TableGen/DAGISelEmitter.h:1.64 Wed May 17 15:37:59 2006 +++ llvm/utils/TableGen/DAGISelEmitter.h Sat Jul 15 03:45:20 2006 @@ -522,7 +522,8 @@ void GenerateCodeForPattern(PatternToMatch &Pattern, std::vector > &GeneratedCode, std::set > &GeneratedDecl, - bool UseGoto); + std::vector &TargetOpcodes, + bool DoReplace); void EmitPatterns(std::vector > > > &Patterns, unsigned Indent, std::ostream &OS); From rafael.espindola at gmail.com Sat Jul 15 20:03:27 2006 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Sat, 15 Jul 2006 20:03:27 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMAsmPrinter.cpp ARMISelDAGToDAG.cpp ARMInstrInfo.td Message-ID: <200607160103.UAA03649@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMAsmPrinter.cpp updated: 1.5 -> 1.6 ARMISelDAGToDAG.cpp updated: 1.15 -> 1.16 ARMInstrInfo.td updated: 1.7 -> 1.8 --- Log message: skeleton of a lowerCall implementation for ARM --- Diffs of the changes: (+79 -5) ARMAsmPrinter.cpp | 8 +++-- ARMISelDAGToDAG.cpp | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++-- ARMInstrInfo.td | 6 ++++ 3 files changed, 79 insertions(+), 5 deletions(-) Index: llvm/lib/Target/ARM/ARMAsmPrinter.cpp diff -u llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.5 llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.6 --- llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.5 Tue Jul 11 06:36:48 2006 +++ llvm/lib/Target/ARM/ARMAsmPrinter.cpp Sat Jul 15 20:02:57 2006 @@ -156,9 +156,11 @@ assert(0 && "not implemented"); abort(); return; - case MachineOperand::MO_GlobalAddress: - assert(0 && "not implemented"); - abort(); + case MachineOperand::MO_GlobalAddress: { + GlobalValue *GV = MO.getGlobal(); + std::string Name = Mang->getValueName(GV); + O << Name; + } break; case MachineOperand::MO_ExternalSymbol: assert(0 && "not implemented"); Index: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp diff -u llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.15 llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.16 --- llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.15 Tue Jul 11 06:36:48 2006 +++ llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Sat Jul 15 20:02:57 2006 @@ -13,6 +13,7 @@ #include "ARM.h" #include "ARMTargetMachine.h" +#include "llvm/CallingConv.h" #include "llvm/DerivedTypes.h" #include "llvm/Function.h" #include "llvm/Intrinsics.h" @@ -33,6 +34,7 @@ public: ARMTargetLowering(TargetMachine &TM); virtual SDOperand LowerOperation(SDOperand Op, SelectionDAG &DAG); + virtual const char *getTargetNodeName(unsigned Opcode) const; }; } @@ -42,9 +44,73 @@ setOperationAction(ISD::RET, MVT::Other, Custom); } +namespace llvm { + namespace ARMISD { + enum NodeType { + // Start the numbering where the builting ops and target ops leave off. + FIRST_NUMBER = ISD::BUILTIN_OP_END+ARM::INSTRUCTION_LIST_END, + /// CALL - A direct function call. + CALL + }; + } +} + +const char *ARMTargetLowering::getTargetNodeName(unsigned Opcode) const { + switch (Opcode) { + default: return 0; + case ARMISD::CALL: return "ARMISD::CALL"; + } +} + +// This transforms a ISD::CALL node into a +// callseq_star <- ARMISD:CALL <- callseq_end +// chain static SDOperand LowerCALL(SDOperand Op, SelectionDAG &DAG) { - assert(0 && "Not implemented"); - abort(); + SDOperand Chain = Op.getOperand(0); + unsigned CallConv = cast(Op.getOperand(1))->getValue(); + assert(CallConv == CallingConv::C && "unknown calling convention"); + bool isVarArg = cast(Op.getOperand(2))->getValue() != 0; + assert(isVarArg == false && "VarArg not supported"); + bool isTailCall = cast(Op.getOperand(3))->getValue() != 0; + assert(isTailCall == false && "tail call not supported"); + SDOperand Callee = Op.getOperand(4); + unsigned NumOps = (Op.getNumOperands() - 5) / 2; + assert(NumOps == 0); + + // Count how many bytes are to be pushed on the stack. Initially + // only the link register. + unsigned NumBytes = 4; + + // Adjust the stack pointer for the new arguments... + // These operations are automatically eliminated by the prolog/epilog pass + Chain = DAG.getCALLSEQ_START(Chain, + DAG.getConstant(NumBytes, MVT::i32)); + + std::vector NodeTys; + NodeTys.push_back(MVT::Other); // Returns a chain + NodeTys.push_back(MVT::Flag); // Returns a flag for retval copy to use. + + // If the callee is a GlobalAddress/ExternalSymbol node (quite common, every + // direct call is) turn it into a TargetGlobalAddress/TargetExternalSymbol + // node so that legalize doesn't hack it. + if (GlobalAddressSDNode *G = dyn_cast(Callee)) + Callee = DAG.getTargetGlobalAddress(G->getGlobal(), Callee.getValueType()); + + // If this is a direct call, pass the chain and the callee. + assert (Callee.Val); + std::vector Ops; + Ops.push_back(Chain); + Ops.push_back(Callee); + + unsigned CallOpc = ARMISD::CALL; + Chain = DAG.getNode(CallOpc, NodeTys, Ops); + + assert(Op.Val->getValueType(0) == MVT::Other); + + Chain = DAG.getNode(ISD::CALLSEQ_END, MVT::Other, Chain, + DAG.getConstant(NumBytes, MVT::i32)); + + return Chain; } static SDOperand LowerRET(SDOperand Op, SelectionDAG &DAG) { Index: llvm/lib/Target/ARM/ARMInstrInfo.td diff -u llvm/lib/Target/ARM/ARMInstrInfo.td:1.7 llvm/lib/Target/ARM/ARMInstrInfo.td:1.8 --- llvm/lib/Target/ARM/ARMInstrInfo.td:1.7 Tue Jul 11 06:36:48 2006 +++ llvm/lib/Target/ARM/ARMInstrInfo.td Sat Jul 15 20:02:57 2006 @@ -41,6 +41,10 @@ def callseq_start : SDNode<"ISD::CALLSEQ_START", SDT_ARMCallSeq, [SDNPHasChain]>; def callseq_end : SDNode<"ISD::CALLSEQ_END", SDT_ARMCallSeq, [SDNPHasChain]>; +def SDT_ARMcall : SDTypeProfile<0, -1, [SDTCisInt<0>]>; +def ARMcall : SDNode<"ARMISD::CALL", SDT_ARMcall, + [SDNPHasChain, SDNPOptInFlag, SDNPOutFlag]>; + def ADJCALLSTACKUP : InstARM<(ops i32imm:$amt), "!ADJCALLSTACKUP $amt", [(callseq_end imm:$amt)]>; @@ -51,6 +55,8 @@ def bxr: InstARM<(ops IntRegs:$dst), "bx $dst", [(brind IntRegs:$dst)]>; +def bl: InstARM<(ops i32imm:$func, variable_ops), "bl $func", [(ARMcall tglobaladdr:$func)]>; + def ldr : InstARM<(ops IntRegs:$dst, memri:$addr), "ldr $dst, [$addr]", [(set IntRegs:$dst, (load iaddr:$addr))]>; From evan.cheng at apple.com Sun Jul 16 01:13:04 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Sun, 16 Jul 2006 01:13:04 -0500 Subject: [llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp DAGISelEmitter.h Message-ID: <200607160613.BAA05270@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: DAGISelEmitter.cpp updated: 1.220 -> 1.221 DAGISelEmitter.h updated: 1.65 -> 1.66 --- Log message: Parameterize target node ValueType to allow more sharing of emit functions. Also reduce the number of arguments passed to emit functions and removed a hack. --- Diffs of the changes: (+67 -32) DAGISelEmitter.cpp | 96 +++++++++++++++++++++++++++++++++++------------------ DAGISelEmitter.h | 3 + 2 files changed, 67 insertions(+), 32 deletions(-) Index: llvm/utils/TableGen/DAGISelEmitter.cpp diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.220 llvm/utils/TableGen/DAGISelEmitter.cpp:1.221 --- llvm/utils/TableGen/DAGISelEmitter.cpp:1.220 Sat Jul 15 03:45:20 2006 +++ llvm/utils/TableGen/DAGISelEmitter.cpp Sun Jul 16 01:12:52 2006 @@ -2093,16 +2093,18 @@ std::vector > &GeneratedCode; /// GeneratedDecl - This is the set of all SDOperand declarations needed for /// the set of patterns for each top-level opcode. - std::set > &GeneratedDecl; + std::set > &GeneratedDecl; /// TargetOpcodes - The target specific opcodes used by the resulting /// instructions. std::vector &TargetOpcodes; + std::vector &TargetVTs; std::string ChainName; bool NewTF; bool DoReplace; unsigned TmpNo; unsigned OpcNo; + unsigned VTNo; void emitCheck(const std::string &S) { if (!S.empty()) @@ -2112,24 +2114,29 @@ if (!S.empty()) GeneratedCode.push_back(std::make_pair(false, S)); } - void emitDecl(const std::string &S, bool isSDNode=false) { + void emitDecl(const std::string &S, unsigned T=0) { assert(!S.empty() && "Invalid declaration"); - GeneratedDecl.insert(std::make_pair(isSDNode, S)); + GeneratedDecl.insert(std::make_pair(T, S)); } void emitOpcode(const std::string &Opc) { TargetOpcodes.push_back(Opc); OpcNo++; } + void emitVT(const std::string &VT) { + TargetVTs.push_back(VT); + VTNo++; + } public: PatternCodeEmitter(DAGISelEmitter &ise, ListInit *preds, TreePatternNode *pattern, TreePatternNode *instr, std::vector > &gc, - std::set > &gd, + std::set > &gd, std::vector &to, + std::vector &tv, bool dorep) : ISE(ise), Predicates(preds), Pattern(pattern), Instruction(instr), - GeneratedCode(gc), GeneratedDecl(gd), TargetOpcodes(to), - NewTF(false), DoReplace(dorep), TmpNo(0), OpcNo(0) {} + GeneratedCode(gc), GeneratedDecl(gd), TargetOpcodes(to), TargetVTs(tv), + NewTF(false), DoReplace(dorep), TmpNo(0), OpcNo(0), VTNo(0) {} /// EmitMatchCode - Emit a matcher for N, going to the label for PatternNo /// if the match fails. At this point, we already know that the opcode for N @@ -2269,7 +2276,7 @@ // FIXME: temporary workaround for a common case where chain // is a TokenFactor and the previous "inner" chain is an operand. NewTF = true; - emitDecl("OldTF", true); + emitDecl("OldTF", 1); emitCheck("(" + ChainName + " = UpdateFoldedChain(CurDAG, " + RootName + ".Val, Chain.Val, OldTF)).Val"); } else { @@ -2560,11 +2567,9 @@ if (NodeHasInFlag || NodeHasOutFlag || NodeHasOptInFlag || HasImpInputs) emitDecl("InFlag"); if (NodeHasOptInFlag) { - // FIXME: This is ugly. We are using a SDNode* in place of a bool. - emitDecl("HasInFlag", true); + emitDecl("HasInFlag", 2); emitCode("HasInFlag = " - "(N.getOperand(N.getNumOperands()-1).getValueType() == MVT::Flag) " - "? (SDNode*)1 : (SDNode*)0;"); + "(N.getOperand(N.getNumOperands()-1).getValueType() == MVT::Flag);"); } if (HasVarOps) emitCode("std::vector Ops;"); @@ -2664,8 +2669,10 @@ // Output order: results, chain, flags // Result types. - if (NumResults > 0 && N->getTypeNum(0) != MVT::isVoid) - Code += ", " + getEnumName(N->getTypeNum(0)); + if (NumResults > 0 && N->getTypeNum(0) != MVT::isVoid) { + Code += ", VT" + utostr(VTNo); + emitVT(getEnumName(N->getTypeNum(0))); + } if (NodeHasChain) Code += ", MVT::Other"; if (NodeHasOutFlag) @@ -2815,7 +2822,7 @@ std::string Code = " Result = CurDAG->SelectNodeTo(N.Val, Opc" + utostr(OpcNo); if (N->getTypeNum(0) != MVT::isVoid) - Code += ", " + getEnumName(N->getTypeNum(0)); + Code += ", VT" + utostr(VTNo); if (NodeHasOutFlag) Code += ", MVT::Flag"; for (unsigned i = 0, e = Ops.size(); i != e; ++i) @@ -2824,11 +2831,13 @@ Code += ", InFlag"; emitCode(Code + ");"); emitCode("} else {"); - emitDecl("ResNode", true); + emitDecl("ResNode", 1); Code = " ResNode = CurDAG->getTargetNode(Opc" + utostr(OpcNo); emitOpcode(II.Namespace + "::" + II.TheDef->getName()); - if (N->getTypeNum(0) != MVT::isVoid) - Code += ", " + getEnumName(N->getTypeNum(0)); + if (N->getTypeNum(0) != MVT::isVoid) { + Code += ", VT" + utostr(VTNo); + emitVT(getEnumName(N->getTypeNum(0))); + } if (NodeHasOutFlag) Code += ", MVT::Flag"; for (unsigned i = 0, e = Ops.size(); i != e; ++i) @@ -2986,12 +2995,14 @@ /// succeeds. Returns true if the pattern is not guaranteed to match. void DAGISelEmitter::GenerateCodeForPattern(PatternToMatch &Pattern, std::vector > &GeneratedCode, - std::set > &GeneratedDecl, + std::set > &GeneratedDecl, std::vector &TargetOpcodes, + std::vector &TargetVTs, bool DoReplace) { PatternCodeEmitter Emitter(*this, Pattern.getPredicates(), Pattern.getSrcPattern(), Pattern.getDstPattern(), - GeneratedCode, GeneratedDecl, TargetOpcodes, + GeneratedCode, GeneratedDecl, + TargetOpcodes, TargetVTs, DoReplace); // Emit the matcher, capturing named arguments in VariableMap. @@ -3241,20 +3252,23 @@ std::vector > CodeForPatterns; std::vector > PatternOpcodes; - std::vector > > PatternDecls; - std::set > AllGenDecls; + std::vector > PatternVTs; + std::vector > > PatternDecls; + std::set > AllGenDecls; for (unsigned i = 0, e = Patterns.size(); i != e; ++i) { CodeList GeneratedCode; - std::set > GeneratedDecl; + std::set > GeneratedDecl; std::vector TargetOpcodes; + std::vector TargetVTs; GenerateCodeForPattern(*Patterns[i], GeneratedCode, GeneratedDecl, - TargetOpcodes, OptSlctOrder); - for (std::set >::iterator + TargetOpcodes, TargetVTs, OptSlctOrder); + for (std::set >::iterator si = GeneratedDecl.begin(), se = GeneratedDecl.end(); si!=se; ++si) AllGenDecls.insert(*si); CodeForPatterns.push_back(std::make_pair(Patterns[i], GeneratedCode)); PatternDecls.push_back(GeneratedDecl); PatternOpcodes.push_back(TargetOpcodes); + PatternVTs.push_back(TargetVTs); } // Scan the code to see if all of the patterns are reachable and if it is @@ -3287,7 +3301,8 @@ for (unsigned i = 0, e = CodeForPatterns.size(); i != e; ++i) { CodeList &GeneratedCode = CodeForPatterns[i].second; std::vector &TargetOpcodes = PatternOpcodes[i]; - std::set > Decls = PatternDecls[i]; + std::vector &TargetVTs = PatternVTs[i]; + std::set > Decls = PatternDecls[i]; int CodeSize = (int)GeneratedCode.size(); int LastPred = -1; for (int j = CodeSize-1; j >= 0; --j) { @@ -3304,14 +3319,31 @@ CalleeCode += ", unsigned Opc" + utostr(j); CallerCode += ", " + TargetOpcodes[j]; } - for (std::set >::iterator + for (unsigned j = 0, e = TargetVTs.size(); j != e; ++j) { + CalleeCode += ", MVT::ValueType VT" + utostr(j); + CallerCode += ", " + TargetVTs[j]; + } + for (std::set >::iterator I = Decls.begin(), E = Decls.end(); I != E; ++I) { std::string Name = I->second; - if (I->first) { + if (I->first == 0) { + if (Name == "InFlag" || + (Name.size() > 3 && + Name[0] == 'T' && Name[1] == 'm' && Name[2] == 'p')) { + CalleeDecls += " SDOperand " + Name + "(0, 0);\n"; + continue; + } + CalleeCode += ", SDOperand &" + Name; + CallerCode += ", " + Name; + } else if (I->first == 1) { + if (Name == "ResNode") { + CalleeDecls += " SDNode *" + Name + " = NULL;\n"; + continue; + } CalleeCode += ", SDNode *" + Name; CallerCode += ", " + Name; } else { - CalleeCode += ", SDOperand &" + Name; + CalleeCode += ", bool " + Name; CallerCode += ", " + Name; } } @@ -3365,12 +3397,14 @@ } // Print all declarations. - for (std::set >::iterator + for (std::set >::iterator I = AllGenDecls.begin(), E = AllGenDecls.end(); I != E; ++I) - if (I->first) + if (I->first == 0) + OS << " SDOperand " << I->second << "(0, 0);\n"; + else if (I->first == 1) OS << " SDNode *" << I->second << " = NULL;\n"; else - OS << " SDOperand " << I->second << "(0, 0);\n"; + OS << " bool " << I->second << " = false;\n"; // Loop through and reverse all of the CodeList vectors, as we will be // accessing them from their logical front, but accessing the end of a Index: llvm/utils/TableGen/DAGISelEmitter.h diff -u llvm/utils/TableGen/DAGISelEmitter.h:1.65 llvm/utils/TableGen/DAGISelEmitter.h:1.66 --- llvm/utils/TableGen/DAGISelEmitter.h:1.65 Sat Jul 15 03:45:20 2006 +++ llvm/utils/TableGen/DAGISelEmitter.h Sun Jul 16 01:12:52 2006 @@ -521,8 +521,9 @@ std::vector &InstImpResults); void GenerateCodeForPattern(PatternToMatch &Pattern, std::vector > &GeneratedCode, - std::set > &GeneratedDecl, + std::set > &GeneratedDecl, std::vector &TargetOpcodes, + std::vector &TargetVTs, bool DoReplace); void EmitPatterns(std::vector > > > &Patterns, From evan.cheng at apple.com Sun Jul 16 01:14:50 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Sun, 16 Jul 2006 01:14:50 -0500 Subject: [llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp Message-ID: <200607160614.BAA05293@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: DAGISelEmitter.cpp updated: 1.221 -> 1.222 --- Log message: Use __attribute__((noinline)) only if compiled by gcc. --- Diffs of the changes: (+1 -1) DAGISelEmitter.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/utils/TableGen/DAGISelEmitter.cpp diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.221 llvm/utils/TableGen/DAGISelEmitter.cpp:1.222 --- llvm/utils/TableGen/DAGISelEmitter.cpp:1.221 Sun Jul 16 01:12:52 2006 +++ llvm/utils/TableGen/DAGISelEmitter.cpp Sun Jul 16 01:14:37 2006 @@ -3349,7 +3349,7 @@ } CallerCode += ");"; CalleeCode += ") "; -#ifndef _MSC_VER +#ifdef __GNUC__ // Prevent emission routines from being inlined to reduce selection // routines stack frame sizes. CalleeCode += "__attribute__((noinline)) ";