From lattner at cs.uiuc.edu Mon Aug 8 00:21:45 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 8 Aug 2005 00:21:45 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Instruction.h Message-ID: <200508080521.AAA03358@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: Instruction.h updated: 1.67 -> 1.68 --- Log message: add a new helper method --- Diffs of the changes: (+5 -0) Instruction.h | 5 +++++ 1 files changed, 5 insertions(+) Index: llvm/include/llvm/Instruction.h diff -u llvm/include/llvm/Instruction.h:1.67 llvm/include/llvm/Instruction.h:1.68 --- llvm/include/llvm/Instruction.h:1.67 Thu Apr 21 15:11:51 2005 +++ llvm/include/llvm/Instruction.h Mon Aug 8 00:21:33 2005 @@ -93,6 +93,11 @@ /// void eraseFromParent(); + /// moveBefore - Unlink this instruction from its current basic block and + /// insert it into the basic block that MovePos lives in, right before + /// MovePos. + void moveBefore(Instruction *MovePos); + // --------------------------------------------------------------------------- /// Subclass classification... getOpcode() returns a member of /// one of the enums that is coming soon (down below)... From lattner at cs.uiuc.edu Mon Aug 8 00:22:02 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 8 Aug 2005 00:22:02 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Instruction.cpp Message-ID: <200508080522.AAA03626@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Instruction.cpp updated: 1.47 -> 1.48 --- Log message: add new helper function --- Diffs of the changes: (+9 -0) Instruction.cpp | 9 +++++++++ 1 files changed, 9 insertions(+) Index: llvm/lib/VMCore/Instruction.cpp diff -u llvm/lib/VMCore/Instruction.cpp:1.47 llvm/lib/VMCore/Instruction.cpp:1.48 --- llvm/lib/VMCore/Instruction.cpp:1.47 Sat Jun 18 13:34:52 2005 +++ llvm/lib/VMCore/Instruction.cpp Mon Aug 8 00:21:50 2005 @@ -65,6 +65,15 @@ getParent()->getInstList().erase(this); } +/// moveBefore - Unlink this instruction from its current basic block and +/// insert it into the basic block that MovePos lives in, right before +/// MovePos. +void Instruction::moveBefore(Instruction *MovePos) { + MovePos->getParent()->getInstList().splice(MovePos,getParent()->getInstList(), + this); +} + + const char *Instruction::getOpcodeName(unsigned OpCode) { switch (OpCode) { // Terminators From lattner at cs.uiuc.edu Mon Aug 8 00:28:33 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 8 Aug 2005 00:28:33 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Message-ID: <200508080528.AAA08847@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: LoopStrengthReduce.cpp updated: 1.37 -> 1.38 --- Log message: Implement a simple optimization for the termination condition of the loop. The termination condition actually wants to use the post-incremented value of the loop, not a new indvar with an unusual base. On PPC, for example, this allows us to compile LoopStrengthReduce/exit_compare_live_range.ll to: _foo: li r2, 0 .LBB_foo_1: ; no_exit li r5, 0 stw r5, 0(r3) addi r2, r2, 1 cmpw cr0, r2, r4 bne .LBB_foo_1 ; no_exit blr instead of: _foo: li r2, 1 ;; IV starts at 1, not 0 .LBB_foo_1: ; no_exit li r5, 0 stw r5, 0(r3) addi r5, r2, 1 cmpw cr0, r2, r4 or r2, r5, r5 ;; Reg-reg copy, extra live range bne .LBB_foo_1 ; no_exit blr This implements LoopStrengthReduce/exit_compare_live_range.ll --- Diffs of the changes: (+107 -6) LoopStrengthReduce.cpp | 113 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 107 insertions(+), 6 deletions(-) Index: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp diff -u llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.37 llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.38 --- llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.37 Thu Aug 4 20:30:11 2005 +++ llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Mon Aug 8 00:28:22 2005 @@ -46,9 +46,16 @@ SCEVHandle Offset; Instruction *User; Value *OperandValToReplace; + + // isUseOfPostIncrementedValue - True if this should use the + // post-incremented version of this IV, not the preincremented version. + // This can only be set in special cases, such as the terminating setcc + // instruction for a loop. + bool isUseOfPostIncrementedValue; IVStrideUse(const SCEVHandle &Offs, Instruction *U, Value *O) - : Offset(Offs), User(U), OperandValToReplace(O) {} + : Offset(Offs), User(U), OperandValToReplace(O), + isUseOfPostIncrementedValue(false) {} }; /// IVUsersOfOneStride - This structure keeps track of all instructions that @@ -127,6 +134,7 @@ std::set &Processed); SCEVHandle GetExpressionSCEV(Instruction *E, Loop *L); + void OptimizeIndvars(Loop *L); void StrengthReduceStridedIVUsers(Value *Stride, IVUsersOfOneStride &Uses, Loop *L, bool isOnlyStride); @@ -353,8 +361,15 @@ /// operation. This is null if we should just use zero so far. Value *EmittedBase; - BasedUser(Instruction *I, Value *Op, const SCEVHandle &IMM) - : Inst(I), OperandValToReplace(Op), Imm(IMM), EmittedBase(0) {} + // isUseOfPostIncrementedValue - True if this should use the + // post-incremented version of this IV, not the preincremented version. + // This can only be set in special cases, such as the terminating setcc + // instruction for a loop. + bool isUseOfPostIncrementedValue; + + BasedUser(Instruction *I, Value *Op, const SCEVHandle &IMM, bool iUOPIV) + : Inst(I), OperandValToReplace(Op), Imm(IMM), EmittedBase(0), + isUseOfPostIncrementedValue(iUOPIV) {} // Once we rewrite the code to insert the new IVs we want, update the // operands of Inst to use the new expression 'NewBase', with 'Imm' added @@ -505,7 +520,8 @@ UsersToProcess.push_back(std::make_pair(Uses.Users[i].Offset, BasedUser(Uses.Users[i].User, Uses.Users[i].OperandValToReplace, - ZeroBase))); + ZeroBase, + Uses.Users[i].isUseOfPostIncrementedValue))); // First pass, figure out what we can represent in the immediate fields of // instructions. If we can represent anything there, move it to the imm @@ -586,7 +602,15 @@ // Now that we know what we need to do, insert code before User for the // immediate and any loop-variant expressions. - User.RewriteInstructionToUseNewBase(NewPHI, Rewriter); + Value *NewBase = NewPHI; + + // If this instruction wants to use the post-incremented value, move it + // after the post-inc and use its value instead of the PHI. + if (User.isUseOfPostIncrementedValue) { + NewBase = IncV; + User.Inst->moveBefore(LatchBlock->getTerminator()); + } + User.RewriteInstructionToUseNewBase(NewBase, Rewriter); // Mark old value we replaced as possibly dead, so that it is elminated // if we just replaced the last use of that value. @@ -602,6 +626,76 @@ // different starting values, into different PHIs. } +// OptimizeIndvars - Now that IVUsesByStride is set up with all of the indvar +// uses in the loop, look to see if we can eliminate some, in favor of using +// common indvars for the different uses. +void LoopStrengthReduce::OptimizeIndvars(Loop *L) { + // TODO: implement optzns here. + + + + + // Finally, get the terminating condition for the loop if possible. If we + // can, we want to change it to use a post-incremented version of its + // induction variable, to allow coallescing the live ranges for the IV into + // one register value. + PHINode *SomePHI = cast(L->getHeader()->begin()); + BasicBlock *Preheader = L->getLoopPreheader(); + BasicBlock *LatchBlock = + SomePHI->getIncomingBlock(SomePHI->getIncomingBlock(0) == Preheader); + BranchInst *TermBr = dyn_cast(LatchBlock->getTerminator()); + if (!TermBr || TermBr->isUnconditional() || + !isa(TermBr->getCondition())) + return; + SetCondInst *Cond = cast(TermBr->getCondition()); + + // Search IVUsesByStride to find Cond's IVUse if there is one. + IVStrideUse *CondUse = 0; + Value *CondStride = 0; + + for (std::map::iterator I =IVUsesByStride.begin(), + E = IVUsesByStride.end(); I != E && !CondUse; ++I) + for (std::vector::iterator UI = I->second.Users.begin(), + E = I->second.Users.end(); UI != E; ++UI) + if (UI->User == Cond) { + CondUse = &*UI; + CondStride = I->first; + // NOTE: we could handle setcc instructions with multiple uses here, but + // InstCombine does it as well for simple uses, it's not clear that it + // occurs enough in real life to handle. + break; + } + if (!CondUse) return; // setcc doesn't use the IV. + + // setcc stride is complex, don't mess with users. + if (!isa(CondStride)) return; + + // It's possible for the setcc instruction to be anywhere in the loop, and + // possible for it to have multiple users. If it is not immediately before + // the latch block branch, move it. + if (&*++BasicBlock::iterator(Cond) != (Instruction*)TermBr) { + if (Cond->hasOneUse()) { // Condition has a single use, just move it. + Cond->moveBefore(TermBr); + } else { + // Otherwise, clone the terminating condition and insert into the loopend. + Cond = cast(Cond->clone()); + Cond->setName(L->getHeader()->getName() + ".termcond"); + LatchBlock->getInstList().insert(TermBr, Cond); + + // Clone the IVUse, as the old use still exists! + IVUsesByStride[CondStride].addUser(CondUse->Offset, Cond, + CondUse->OperandValToReplace); + CondUse = &IVUsesByStride[CondStride].Users.back(); + } + } + + // If we get to here, we know that we can transform the setcc instruction to + // use the post-incremented version of the IV, allowing us to coallesce the + // live ranges for the IV correctly. + CondUse->Offset = SCEV::getMinusSCEV(CondUse->Offset, + SCEVUnknown::get(CondStride)); + CondUse->isUseOfPostIncrementedValue = true; +} void LoopStrengthReduce::runOnLoop(Loop *L) { // First step, transform all loops nesting inside of this loop. @@ -616,7 +710,14 @@ AddUsersIfInteresting(I, L, Processed); // If we have nothing to do, return. - //if (IVUsesByStride.empty()) return; + if (IVUsesByStride.empty()) return; + + // Optimize induction variables. Some indvar uses can be transformed to use + // strides that will be needed for other purposes. A common example of this + // is the exit test for the loop, which can often be rewritten to use the + // computation of some other indvar to decide when to terminate the loop. + OptimizeIndvars(L); + // FIXME: We can widen subreg IV's here for RISC targets. e.g. instead of // doing computation in byte values, promote to 32-bit values if safe. From lattner at cs.uiuc.edu Mon Aug 8 00:30:02 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 8 Aug 2005 00:30:02 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/LoopStrengthReduce/exit_compare_live_range.ll related_indvars.ll Message-ID: <200508080530.AAA12315@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/LoopStrengthReduce: exit_compare_live_range.ll updated: 1.1 -> 1.2 related_indvars.ll updated: 1.1 -> 1.2 --- Log message: These are both implemented by a recent LSR patch --- Diffs of the changes: (+0 -2) exit_compare_live_range.ll | 1 - related_indvars.ll | 1 - 2 files changed, 2 deletions(-) Index: llvm/test/Regression/Transforms/LoopStrengthReduce/exit_compare_live_range.ll diff -u llvm/test/Regression/Transforms/LoopStrengthReduce/exit_compare_live_range.ll:1.1 llvm/test/Regression/Transforms/LoopStrengthReduce/exit_compare_live_range.ll:1.2 --- llvm/test/Regression/Transforms/LoopStrengthReduce/exit_compare_live_range.ll:1.1 Fri Aug 5 14:47:39 2005 +++ llvm/test/Regression/Transforms/LoopStrengthReduce/exit_compare_live_range.ll Mon Aug 8 00:29:51 2005 @@ -3,7 +3,6 @@ ; immediately before the conditional branch. ; ; RUN: llvm-as < %s | opt -loop-reduce | llvm-dis | %prcontext 'br bool' 1 | grep set -; XFAIL: * void %foo(float* %D, uint %E) { entry: Index: llvm/test/Regression/Transforms/LoopStrengthReduce/related_indvars.ll diff -u llvm/test/Regression/Transforms/LoopStrengthReduce/related_indvars.ll:1.1 llvm/test/Regression/Transforms/LoopStrengthReduce/related_indvars.ll:1.2 --- llvm/test/Regression/Transforms/LoopStrengthReduce/related_indvars.ll:1.1 Fri Aug 5 14:47:39 2005 +++ llvm/test/Regression/Transforms/LoopStrengthReduce/related_indvars.ll Mon Aug 8 00:29:51 2005 @@ -1,7 +1,6 @@ ; RUN: llvm-as < %s | opt -loop-reduce | llvm-dis | grep phi | wc -l | grep 1 ; This should only result in one PHI node! -; XFAIL: * ; void foo(double *D, double *E, double F) { ; while (D != E) From lattner at cs.uiuc.edu Mon Aug 8 00:47:02 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 8 Aug 2005 00:47:02 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/LoopStrengthReduce/share_code_in_preheader.ll Message-ID: <200508080547.AAA13620@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/LoopStrengthReduce: share_code_in_preheader.ll added (r1.1) --- Log message: It is better to not depend on CSE to share multiplies due to IV insertion. This testcase checks that only one mul is present in the output code, as it should be. --- Diffs of the changes: (+28 -0) share_code_in_preheader.ll | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+) Index: llvm/test/Regression/Transforms/LoopStrengthReduce/share_code_in_preheader.ll diff -c /dev/null llvm/test/Regression/Transforms/LoopStrengthReduce/share_code_in_preheader.ll:1.1 *** /dev/null Mon Aug 8 00:47:01 2005 --- llvm/test/Regression/Transforms/LoopStrengthReduce/share_code_in_preheader.ll Mon Aug 8 00:46:51 2005 *************** *** 0 **** --- 1,28 ---- + ; RUN: llvm-as < %s | opt -loop-reduce | llvm-dis | grep mul | wc -l | grep 1 + ; LSR should not make two copies of the Q*L expression in the preheader! + + sbyte %test(sbyte* %A, sbyte* %B, int %L, int %Q, int %N) { + entry: + %tmp.6 = mul int %Q, %L ; [#uses=1] + %N = cast int %N to uint ; [#uses=1] + br label %no_exit + + no_exit: ; preds = %no_exit, %no_exit.preheader + %indvar = phi uint [ 0, %entry], [ %indvar.next, %no_exit ] ; [#uses=2] + %Sum.0.0 = phi sbyte [ 0, %entry], [ %tmp.21, %no_exit ] ; [#uses=1] + %indvar = cast uint %indvar to int ; [#uses=1] + %N_addr.0.0 = sub int %N, %indvar ; [#uses=1] + %tmp.8 = add int %N_addr.0.0, %tmp.6 ; [#uses=2] + %tmp.9 = getelementptr sbyte* %A, int %tmp.8 ; [#uses=1] + %tmp.10 = load sbyte* %tmp.9 ; [#uses=1] + %tmp.17 = getelementptr sbyte* %B, int %tmp.8 ; [#uses=1] + %tmp.18 = load sbyte* %tmp.17 ; [#uses=1] + %tmp.19 = sub sbyte %tmp.10, %tmp.18 ; [#uses=1] + %tmp.21 = add sbyte %tmp.19, %Sum.0.0 ; [#uses=2] + %indvar.next = add uint %indvar, 1 ; [#uses=2] + %exitcond = seteq uint %indvar.next, %N ; [#uses=1] + br bool %exitcond, label %loopexit, label %no_exit + + loopexit: + ret sbyte %tmp.21 + } From lattner at cs.uiuc.edu Mon Aug 8 00:48:00 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 8 Aug 2005 00:48:00 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Message-ID: <200508080548.AAA13633@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: LoopStrengthReduce.cpp updated: 1.38 -> 1.39 --- Log message: Implement LoopStrengthReduce/share_code_in_preheader.ll by having one rewriter for all code inserted into the preheader, which is never flushed. --- Diffs of the changes: (+4 -1) LoopStrengthReduce.cpp | 5 ++++- 1 files changed, 4 insertions(+), 1 deletion(-) Index: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp diff -u llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.38 llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.39 --- llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.38 Mon Aug 8 00:28:22 2005 +++ llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Mon Aug 8 00:47:49 2005 @@ -542,6 +542,8 @@ } SCEVExpander Rewriter(*SE, *LI); + SCEVExpander PreheaderRewriter(*SE, *LI); + BasicBlock *Preheader = L->getLoopPreheader(); Instruction *PreInsertPt = Preheader->getTerminator(); Instruction *PhiInsertBefore = L->getHeader()->begin(); @@ -578,7 +580,8 @@ // Emit the initial base value into the loop preheader, and add it to the // Phi node. - Value *BaseV = Rewriter.expandCodeFor(Base, PreInsertPt, ReplacedTy); + Value *BaseV = PreheaderRewriter.expandCodeFor(Base, PreInsertPt, + ReplacedTy); NewPHI->addIncoming(BaseV, Preheader); // Emit the increment of the base value before the terminator of the loop From lattner at cs.uiuc.edu Mon Aug 8 01:23:58 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 8 Aug 2005 01:23:58 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/LoopStrengthReduce/share_ivs.ll Message-ID: <200508080623.BAA14724@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/LoopStrengthReduce: share_ivs.ll added (r1.1) --- Log message: new testcase, not implemented yet --- Diffs of the changes: (+26 -0) share_ivs.ll | 26 ++++++++++++++++++++++++++ 1 files changed, 26 insertions(+) Index: llvm/test/Regression/Transforms/LoopStrengthReduce/share_ivs.ll diff -c /dev/null llvm/test/Regression/Transforms/LoopStrengthReduce/share_ivs.ll:1.1 *** /dev/null Mon Aug 8 01:23:57 2005 --- llvm/test/Regression/Transforms/LoopStrengthReduce/share_ivs.ll Mon Aug 8 01:23:47 2005 *************** *** 0 **** --- 1,26 ---- + ; RUN: llvm-as < %s | opt -loop-reduce | llvm-dis | grep phi | wc -l | grep 1 + + ; This testcase should have ONE stride 18 indvar, the other use should have a + ; loop invariant value (B) added to it inside of the loop, instead of having + ; a whole indvar based on B for it. + + ; XFAIL: * + + declare bool %cond(uint) + + void %test(uint %B) { + br label %Loop + Loop: + %IV = phi uint [0, %0], [%IVn, %Loop] + + %C = mul uint %IV, 18 + %D = mul uint %IV, 18 + %E = add uint %D, %B + + %cnd = call bool %cond(uint %E) + call bool %cond(uint %C) + %IVn = add uint %IV, 1 + br bool %cnd, label %Loop, label %Out + Out: + ret void + } From lattner at cs.uiuc.edu Mon Aug 8 01:26:02 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 8 Aug 2005 01:26:02 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Message-ID: <200508080626.BAA14750@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: LoopStrengthReduce.cpp updated: 1.39 -> 1.40 --- Log message: Not all constants are legal immediates in load/store instructions. --- Diffs of the changes: (+7 -1) LoopStrengthReduce.cpp | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletion(-) Index: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp diff -u llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.39 llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.40 --- llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.39 Mon Aug 8 00:47:49 2005 +++ llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Mon Aug 8 01:25:50 2005 @@ -435,7 +435,13 @@ static bool isTargetConstant(const SCEVHandle &V) { // FIXME: Look at the target to decide if &GV is a legal constant immediate. - if (isa(V)) return true; + if (SCEVConstant *SC = dyn_cast(V)) { + // PPC allows a sign-extended 16-bit immediate field. + if ((int64_t)SC->getValue()->getRawValue() > -(1 << 16) && + (int64_t)SC->getValue()->getRawValue() < (1 << 16)-1) + return true; + return false; + } return false; // ENABLE this for x86 From lattner at cs.uiuc.edu Mon Aug 8 12:25:50 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 8 Aug 2005 12:25:50 -0500 Subject: [llvm-commits] CVS: llvm/lib/Support/CommandLine.cpp Message-ID: <200508081725.MAA15260@zion.cs.uiuc.edu> Changes in directory llvm/lib/Support: CommandLine.cpp updated: 1.61 -> 1.62 --- Log message: Reject command lines that have too many positional arguments passed (e.g., 'opt x y'). This fixes PR493: http://llvm.cs.uiuc.edu/PR493 . Patch contributed by Owen Anderson! --- Diffs of the changes: (+15 -1) CommandLine.cpp | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletion(-) Index: llvm/lib/Support/CommandLine.cpp diff -u llvm/lib/Support/CommandLine.cpp:1.61 llvm/lib/Support/CommandLine.cpp:1.62 --- llvm/lib/Support/CommandLine.cpp:1.61 Fri May 13 14:49:09 2005 +++ llvm/lib/Support/CommandLine.cpp Mon Aug 8 12:25:38 2005 @@ -297,6 +297,10 @@ // Check out the positional arguments to collect information about them. unsigned NumPositionalRequired = 0; + + // Determine whether or not there are an unlimited number of positionals + bool HasUnlimitedPositionals = false; + Option *ConsumeAfterOpt = 0; if (!PositionalOpts.empty()) { if (PositionalOpts[0]->getNumOccurrencesFlag() == cl::ConsumeAfter) { @@ -331,6 +335,10 @@ " does not require a value!"); } UnboundedFound |= EatsUnboundedNumberOfValues(Opt); + + if (Opt->getNumOccurrencesFlag() == cl::ZeroOrMore + || Opt->getNumOccurrencesFlag() == cl::OneOrMore) + HasUnlimitedPositionals = true; } } @@ -484,7 +492,13 @@ << "Must specify at least " << NumPositionalRequired << " positional arguments: See: " << argv[0] << " --help\n"; ErrorParsing = true; - + } else if (!HasUnlimitedPositionals + && PositionalVals.size() > PositionalOpts.size()) { + std::cerr << ProgramName + << ": Too many positional arguments specified!\n" + << "Can specify at most " << PositionalOpts.size() + << " positional arguments: See: " << argv[0] << " --help\n"; + ErrorParsing = true; } else if (ConsumeAfterOpt == 0) { // Positional args have already been handled if ConsumeAfter is specified... From lattner at cs.uiuc.edu Mon Aug 8 14:12:08 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 8 Aug 2005 14:12:08 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Reassociate.cpp TailRecursionElimination.cpp Message-ID: <200508081912.OAA16128@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.364 -> 1.365 Reassociate.cpp updated: 1.50 -> 1.51 TailRecursionElimination.cpp updated: 1.20 -> 1.21 --- Log message: Use the new 'moveBefore' method to simplify some code. Really, which is easier to understand? :) --- Diffs of the changes: (+4 -6) InstructionCombining.cpp | 3 +-- Reassociate.cpp | 5 ++--- TailRecursionElimination.cpp | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.364 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.365 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.364 Sun Aug 7 02:03:10 2005 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Mon Aug 8 14:11:57 2005 @@ -5238,8 +5238,7 @@ BasicBlock::iterator InsertPos = DestBlock->begin(); while (isa(InsertPos)) ++InsertPos; - BasicBlock *SrcBlock = I->getParent(); - DestBlock->getInstList().splice(InsertPos, SrcBlock->getInstList(), I); + I->moveBefore(InsertPos); ++NumSunkInst; return true; } Index: llvm/lib/Transforms/Scalar/Reassociate.cpp diff -u llvm/lib/Transforms/Scalar/Reassociate.cpp:1.50 llvm/lib/Transforms/Scalar/Reassociate.cpp:1.51 --- llvm/lib/Transforms/Scalar/Reassociate.cpp:1.50 Wed Jul 27 01:12:34 2005 +++ llvm/lib/Transforms/Scalar/Reassociate.cpp Mon Aug 8 14:11:57 2005 @@ -184,7 +184,7 @@ // Move the RHS instruction to live immediately before I, avoiding breaking // dominator properties. - I->getParent()->getInstList().splice(I, RHS->getParent()->getInstList(), RHS); + RHS->moveBefore(I); // Move operands around to do the linearization. I->setOperand(1, RHS->getOperand(0)); @@ -261,8 +261,7 @@ // Move LHS right before I to make sure that the tree expression dominates all // values. - I->getParent()->getInstList().splice(I, - LHSBO->getParent()->getInstList(), LHSBO); + LHSBO->moveBefore(I); // Linearize the expression tree on the LHS. LinearizeExprTree(LHSBO, Ops); Index: llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp diff -u llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:1.20 llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:1.21 --- llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:1.20 Sun Aug 7 02:00:52 2005 +++ llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp Mon Aug 8 14:11:57 2005 @@ -363,7 +363,7 @@ NEBI = NewEntry->begin(); OEBI != E; ) if (AllocaInst *AI = dyn_cast(OEBI++)) if (isa(AI->getArraySize())) - NewEntry->getInstList().splice(NEBI, OldEntry->getInstList(), AI); + AI->moveBefore(NEBI); // Now that we have created a new block, which jumps to the entry // block, insert a PHI node for each argument of the function. From natebegeman at mac.com Mon Aug 8 15:05:03 2005 From: natebegeman at mac.com (Nate Begeman) Date: Mon, 8 Aug 2005 15:05:03 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PowerPCInstrFormats.td PowerPCInstrInfo.td Message-ID: <200508082005.PAA16628@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PowerPCInstrFormats.td updated: 1.43 -> 1.44 PowerPCInstrInfo.td updated: 1.75 -> 1.76 --- Log message: Fix JIT encoding of ppc mfocrf instruction; the operands were reversed --- Diffs of the changes: (+20 -6) PowerPCInstrFormats.td | 20 +++++++++++++++++--- PowerPCInstrInfo.td | 6 +++--- 2 files changed, 20 insertions(+), 6 deletions(-) Index: llvm/lib/Target/PowerPC/PowerPCInstrFormats.td diff -u llvm/lib/Target/PowerPC/PowerPCInstrFormats.td:1.43 llvm/lib/Target/PowerPC/PowerPCInstrFormats.td:1.44 --- llvm/lib/Target/PowerPC/PowerPCInstrFormats.td:1.43 Tue Apr 19 00:21:30 2005 +++ llvm/lib/Target/PowerPC/PowerPCInstrFormats.td Mon Aug 8 15:04:51 2005 @@ -378,19 +378,33 @@ let Inst{31} = 0; } -class XFXForm_5 opcode, bit mfcrf, bits<10> xo, - dag OL, string asmstr> : I { +class XFXForm_5 opcode, bits<10> xo, dag OL, string asmstr> + : I { bits<8> FXM; bits<5> ST; let Inst{6-10} = ST; - let Inst{11} = mfcrf; + let Inst{11} = 0; let Inst{12-19} = FXM; let Inst{20} = 0; let Inst{21-30} = xo; let Inst{31} = 0; } +class XFXForm_5a opcode, bits<10> xo, dag OL, string asmstr> + : I { + bits<5> ST; + bits<8> FXM; + + let Inst{6-10} = ST; + let Inst{11} = 1; + let Inst{12-19} = FXM; + let Inst{20} = 0; + let Inst{21-30} = xo; + let Inst{31} = 0; +} + + class XFXForm_7 opcode, bits<10> xo, dag OL, string asmstr> : XFXForm_1; Index: llvm/lib/Target/PowerPC/PowerPCInstrInfo.td diff -u llvm/lib/Target/PowerPC/PowerPCInstrInfo.td:1.75 llvm/lib/Target/PowerPC/PowerPCInstrInfo.td:1.76 --- llvm/lib/Target/PowerPC/PowerPCInstrInfo.td:1.75 Thu Jul 21 15:44:43 2005 +++ llvm/lib/Target/PowerPC/PowerPCInstrInfo.td Mon Aug 8 15:04:52 2005 @@ -364,10 +364,10 @@ def MFCTR : XFXForm_1_ext<31, 339, 288, (ops GPRC:$rT), "mfctr $rT">; def MFLR : XFXForm_1_ext<31, 339, 256, (ops GPRC:$rT), "mflr $rT">; def MFCR : XFXForm_3<31, 19, (ops GPRC:$rT), "mfcr $rT">; -def MTCRF : XFXForm_5<31, 0, 144, (ops CRRC:$FXM, GPRC:$rS), +def MTCRF : XFXForm_5<31, 144, (ops CRRC:$FXM, GPRC:$rS), "mtcrf $FXM, $rS">; -def MFOCRF : XFXForm_5<31, 1, 19, (ops GPRC:$rT, crbitm:$FXM), - "mfcr $rT, $FXM">; +def MFOCRF : XFXForm_5a<31, 19, (ops GPRC:$rT, crbitm:$FXM), + "mfcr $rT, $FXM">; def MTCTR : XFXForm_7_ext<31, 467, 288, (ops GPRC:$rS), "mtctr $rS">; def MTLR : XFXForm_7_ext<31, 467, 256, (ops GPRC:$rS), "mtlr $rS">; From lattner at cs.uiuc.edu Mon Aug 8 16:08:22 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 8 Aug 2005 16:08:22 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Message-ID: <200508082108.QAA17030@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPC32ISelPattern.cpp updated: 1.115 -> 1.116 --- Log message: Move IsRunOfOnes to a more logical place and rename to a proper predicate form (lowercase isXXX). Patch by Jim Laskey. --- Diffs of the changes: (+24 -24) PPC32ISelPattern.cpp | 48 ++++++++++++++++++++++++------------------------ 1 files changed, 24 insertions(+), 24 deletions(-) Index: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp diff -u llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.115 llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.116 --- llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.115 Fri Aug 5 17:05:03 2005 +++ llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Mon Aug 8 16:08:09 2005 @@ -36,28 +36,6 @@ using namespace llvm; -// IsRunOfOnes - Returns true iff Val consists of one contiguous run of 1s with -// any number of 0s on either side. The 1s are allowed to wrap from LSB to -// MSB, so 0x000FFF0, 0x0000FFFF, and 0xFF0000FF are all runs. 0x0F0F0000 is -// not, since all 1s are not contiguous. -static bool IsRunOfOnes(unsigned Val, unsigned &MB, unsigned &ME) { - if (isShiftedMask_32(Val)) { - // look for the first non-zero bit - MB = CountLeadingZeros_32(Val); - // look for the first zero bit after the run of ones - ME = CountLeadingZeros_32((Val - 1) ^ Val); - return true; - } else if (isShiftedMask_32(Val = ~Val)) { // invert mask - // effectively look for the first zero bit - ME = CountLeadingZeros_32(Val) - 1; - // effectively look for the first one bit after the run of zeros - MB = CountLeadingZeros_32((Val - 1) ^ Val) + 1; - return true; - } - // no run present - return false; -} - //===----------------------------------------------------------------------===// // PPC32TargetLowering - PPC32 Implementation of the TargetLowering interface namespace { @@ -602,6 +580,28 @@ } }; +// isRunOfOnes - Returns true iff Val consists of one contiguous run of 1s with +// any number of 0s on either side. The 1s are allowed to wrap from LSB to +// MSB, so 0x000FFF0, 0x0000FFFF, and 0xFF0000FF are all runs. 0x0F0F0000 is +// not, since all 1s are not contiguous. +static bool isRunOfOnes(unsigned Val, unsigned &MB, unsigned &ME) { + if (isShiftedMask_32(Val)) { + // look for the first non-zero bit + MB = CountLeadingZeros_32(Val); + // look for the first zero bit after the run of ones + ME = CountLeadingZeros_32((Val - 1) ^ Val); + return true; + } else if (isShiftedMask_32(Val = ~Val)) { // invert mask + // effectively look for the first zero bit + ME = CountLeadingZeros_32(Val) - 1; + // effectively look for the first one bit after the run of zeros + MB = CountLeadingZeros_32((Val - 1) ^ Val) + 1; + return true; + } + // no run present + return false; +} + /// getImmediateForOpcode - This method returns a value indicating whether /// the ConstantSDNode N can be used as an immediate to Opcode. The return /// values are either 0, 1 or 2. 0 indicates that either N is not a @@ -627,7 +627,7 @@ break; case ISD::AND: { unsigned MB, ME; - if (IsRunOfOnes(v, MB, ME)) { Imm = MB << 16 | ME & 0xFFFF; return 5; } + if (isRunOfOnes(v, MB, ME)) { Imm = MB << 16 | ME & 0xFFFF; return 5; } if (isUInt16(v)) { Imm = v & 0xFFFF; return 1; } if ((v & 0x0000FFFF) == 0) { Imm = v >> 16; return 2; } break; @@ -1036,7 +1036,7 @@ // of set bits). Given that, Select the arguments and generate the rlwimi // instruction. unsigned MB, ME; - if (((TgtMask & InsMask) == 0) && IsRunOfOnes(InsMask, MB, ME)) { + if (((TgtMask & InsMask) == 0) && isRunOfOnes(InsMask, MB, ME)) { unsigned Tmp1, Tmp2; bool fullMask = (TgtMask ^ InsMask) == 0xFFFFFFFF; // Check for rotlwi / rotrwi here, a special case of bitfield insert From lattner at cs.uiuc.edu Mon Aug 8 16:10:39 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 8 Aug 2005 16:10:39 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Message-ID: <200508082110.QAA17082@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPC32ISelPattern.cpp updated: 1.116 -> 1.117 --- Log message: Add support predicates for future immediate constant changes. Patch by Jim Laskey --- Diffs of the changes: (+71 -0) PPC32ISelPattern.cpp | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 71 insertions(+) Index: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp diff -u llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.116 llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.117 --- llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.116 Mon Aug 8 16:08:09 2005 +++ llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Mon Aug 8 16:10:27 2005 @@ -602,6 +602,77 @@ return false; } +// isRotateAndMask - Returns true if Mask and Shift can be folded in to a rotate +// and mask opcode and mask operation. +static bool isRotateAndMask(unsigned Opcode, unsigned Shift, unsigned Mask, + bool IsShiftMask, + unsigned &SH, unsigned &MB, unsigned &ME) { + if (Shift > 31) return false; + unsigned Indeterminant = ~0; // bit mask marking indeterminant results + + if (Opcode == ISD::SHL) { // shift left + // apply shift to mask if it comes first + if (IsShiftMask) Mask = Mask << Shift; + // determine which bits are made indeterminant by shift + Indeterminant = ~(0xFFFFFFFFu << Shift); + } else if (Opcode == ISD::SRA || Opcode == ISD::SRL) { // shift rights + // apply shift to mask if it comes first + if (IsShiftMask) Mask = Mask >> Shift; + // determine which bits are made indeterminant by shift + Indeterminant = ~(0xFFFFFFFFu >> Shift); + // adjust for the left rotate + Shift = 32 - Shift; + } + + // if the mask doesn't intersect any Indeterminant bits + if (!(Mask & Indeterminant)) { + SH = Shift; + // make sure the mask is still a mask (wrap arounds may not be) + return isRunOfOnes(Mask, MB, ME); + } + + // can't do it + return false; +} + +// isImmediate - This method tests to see if a constant operand. +// If so Imm will receive the 32 bit value. +static bool isImmediate(SDOperand N, unsigned& Imm) { + // test for constant + if (N.getOpcode() == ISD::Constant) { + // retrieve value + Imm = (unsigned)cast(N)->getSignExtended(); + // passes muster + return true; + } + // not a constant + return false; +} + +// isOprShiftImm - Returns true if the specified operand is a shift opcode with +// a immediate shift count less than 32. +static bool isOprShiftImm(SDOperand N, unsigned& Opc, unsigned& SH) { + Opc = N.getOpcode(); + return (Opc == ISD::SHL || Opc == ISD::SRL || Opc == ISD::SRA) && + isImmediate(N.getOperand(1), SH) && SH < 32; +} + +// isOprNot - Returns true if the specified operand is an xor with immediate -1. +static bool isOprNot(SDOperand N) { + unsigned Imm; + return N.getOpcode() == ISD::XOR && + isImmediate(N.getOperand(1), Imm) && (signed)Imm == -1; +} + +// Immediate constant composers. +// Lo16 - grabs the lo 16 bits from a 32 bit constant. +// Hi16 - grabs the hi 16 bits from a 32 bit constant. +// HA16 - computes the hi bits required if the lo bits are add/subtracted in +// arithmethically. +static unsigned Lo16(unsigned x) { return x & 0x0000FFFF; } +static unsigned Hi16(unsigned x) { return Lo16(x >> 16); } +static unsigned HA16(unsigned x) { return Hi16((signed)x - (signed short)x); } + /// getImmediateForOpcode - This method returns a value indicating whether /// the ConstantSDNode N can be used as an immediate to Opcode. The return /// values are either 0, 1 or 2. 0 indicates that either N is not a From lattner at cs.uiuc.edu Mon Aug 8 16:12:46 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 8 Aug 2005 16:12:46 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Message-ID: <200508082112.QAA17125@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPC32ISelPattern.cpp updated: 1.117 -> 1.118 --- Log message: Modify existing support functions to use new immediate constant predicates. Patch by Jim Laskey --- Diffs of the changes: (+9 -10) PPC32ISelPattern.cpp | 19 +++++++++---------- 1 files changed, 9 insertions(+), 10 deletions(-) Index: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp diff -u llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.117 llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.118 --- llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.117 Mon Aug 8 16:10:27 2005 +++ llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Mon Aug 8 16:12:35 2005 @@ -1136,11 +1136,10 @@ /// wider than the implicit mask, then we can get rid of the AND and let the /// shift do the mask. unsigned ISel::FoldIfWideZeroExtend(SDOperand N) { - unsigned C; + unsigned C, MB, ME; if (N.getOpcode() == ISD::AND && - 5 == getImmediateForOpcode(N.getOperand(1), ISD::AND, C) && // isMask - 31 == (C & 0xFFFF) && // ME - 26 >= (C >> 16)) // MB + isImmediate(N.getOperand(1), C) && isRunOfOnes(C, MB, ME) && + MB <= 26 && ME == 31) return SelectExpr(N.getOperand(0)); else return SelectExpr(N); @@ -1162,10 +1161,10 @@ Opc = getBCCForSetCC(SetCC->getCondition(), U); Idx = getCRIdxForSetCC(SetCC->getCondition(), Inv); - // Pass the optional argument U to getImmediateForOpcode for SETCC, - // so that it knows whether the SETCC immediate range is signed or not. - if (1 == getImmediateForOpcode(SetCC->getOperand(1), ISD::SETCC, - Tmp2, U)) { + // Use U to determine whether the SETCC immediate range is signed or not. + if (isImmediate(SetCC->getOperand(1), Tmp2) && + ((U && isUInt16(Tmp2)) || (!U && isInt16(Tmp2)))) { + Tmp2 = Lo16(Tmp2); // For comparisons against zero, we can implicity set CR0 if a recording // variant (e.g. 'or.' instead of 'or') of the instruction that defines // operand zero of the SetCC node is available. @@ -1252,8 +1251,8 @@ unsigned imm = 0, opcode = N.getOpcode(); if (N.getOpcode() == ISD::ADD) { bool isFrame = N.getOperand(0).getOpcode() == ISD::FrameIndex; - if (1 == getImmediateForOpcode(N.getOperand(1), opcode, imm)) { - offset = imm; + if (isImmediate(N.getOperand(1), imm) && isInt16(imm)) { + offset = Lo16(imm); if (isFrame) { ++FrameOff; Reg = cast(N.getOperand(0))->getIndex(); From lattner at cs.uiuc.edu Mon Aug 8 16:21:15 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 8 Aug 2005 16:21:15 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Message-ID: <200508082121.QAA17298@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPC32ISelPattern.cpp updated: 1.118 -> 1.119 --- Log message: Modify the ISD::ADD opcode case to use new immediate constant predicates. Includes support for 32-bit constants using addi/addis. Patch by Jim Laskey. --- Diffs of the changes: (+15 -11) PPC32ISelPattern.cpp | 26 +++++++++++++++----------- 1 files changed, 15 insertions(+), 11 deletions(-) Index: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp diff -u llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.118 llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.119 --- llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.118 Mon Aug 8 16:12:35 2005 +++ llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Mon Aug 8 16:21:03 2005 @@ -1689,19 +1689,23 @@ return Result; } Tmp1 = SelectExpr(N.getOperand(0)); - switch(getImmediateForOpcode(N.getOperand(1), opcode, Tmp2)) { - default: assert(0 && "unhandled result code"); - case 0: // No immediate - Tmp2 = SelectExpr(N.getOperand(1)); - BuildMI(BB, PPC::ADD, 2, Result).addReg(Tmp1).addReg(Tmp2); - break; - case 1: // Low immediate + if (isImmediate(N.getOperand(1), Tmp2)) { + Tmp3 = HA16(Tmp2); + Tmp2 = Lo16(Tmp2); + if (Tmp2 && Tmp3) { + unsigned Reg = MakeReg(MVT::i32); + BuildMI(BB, PPC::ADDI, 2, Reg).addReg(Tmp1).addSImm(Tmp2); + BuildMI(BB, PPC::ADDIS, 2, Result).addReg(Reg).addSImm(Tmp3); + } else if (Tmp2) { BuildMI(BB, PPC::ADDI, 2, Result).addReg(Tmp1).addSImm(Tmp2); - break; - case 2: // Shifted immediate - BuildMI(BB, PPC::ADDIS, 2, Result).addReg(Tmp1).addSImm(Tmp2); - break; + } else { + BuildMI(BB, PPC::ADDIS, 2, Result).addReg(Tmp1).addSImm(Tmp3); + } + return Result; } + + Tmp2 = SelectExpr(N.getOperand(1)); + BuildMI(BB, PPC::ADD, 2, Result).addReg(Tmp1).addReg(Tmp2); return Result; case ISD::AND: From lattner at cs.uiuc.edu Mon Aug 8 16:25:09 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 8 Aug 2005 16:25:09 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Message-ID: <200508082125.QAA17376@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPC32ISelPattern.cpp updated: 1.119 -> 1.120 --- Log message: Modify the ISD::AND opcode case to use new immediate constant predicates. Includes wider support for rotate and mask cases. Patch by Jim Laskey. I've requested that Jim add new regression tests the newly handled cases. --- Diffs of the changes: (+36 -45) PPC32ISelPattern.cpp | 81 ++++++++++++++++++++++----------------------------- 1 files changed, 36 insertions(+), 45 deletions(-) Index: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp diff -u llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.119 llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.120 --- llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.119 Mon Aug 8 16:21:03 2005 +++ llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Mon Aug 8 16:24:57 2005 @@ -1709,58 +1709,49 @@ return Result; case ISD::AND: - switch(getImmediateForOpcode(N.getOperand(1), opcode, Tmp2)) { - default: assert(0 && "unhandled result code"); - case 0: // No immediate - // Check for andc: and, (xor a, -1), b - if (N.getOperand(0).getOpcode() == ISD::XOR && - N.getOperand(0).getOperand(1).getOpcode() == ISD::Constant && - cast(N.getOperand(0).getOperand(1))->isAllOnesValue()) { + if (isImmediate(N.getOperand(1), Tmp2)) { + if (isShiftedMask_32(Tmp2) || isShiftedMask_32(~Tmp2)) { + unsigned SH, MB, ME; + Opc = Recording ? PPC::RLWINMo : PPC::RLWINM; + unsigned OprOpc; + if (isOprShiftImm(N.getOperand(0), OprOpc, Tmp3) && + isRotateAndMask(OprOpc, Tmp3, Tmp2, false, SH, MB, ME)) { Tmp1 = SelectExpr(N.getOperand(0).getOperand(0)); - Tmp2 = SelectExpr(N.getOperand(1)); - BuildMI(BB, PPC::ANDC, 2, Result).addReg(Tmp2).addReg(Tmp1); - return Result; + } else { + Tmp1 = SelectExpr(N.getOperand(0)); + isRunOfOnes(Tmp2, MB, ME); + SH = 0; } - // It wasn't and-with-complement, emit a regular and - Tmp1 = SelectExpr(N.getOperand(0)); - Tmp2 = SelectExpr(N.getOperand(1)); - Opc = Recording ? PPC::ANDo : PPC::AND; - BuildMI(BB, Opc, 2, Result).addReg(Tmp1).addReg(Tmp2); - break; - case 1: // Low immediate + BuildMI(BB, Opc, 4, Result).addReg(Tmp1).addImm(SH) + .addImm(MB).addImm(ME); + RecordSuccess = true; + return Result; + } else if (isUInt16(Tmp2)) { + Tmp2 = Lo16(Tmp2); Tmp1 = SelectExpr(N.getOperand(0)); BuildMI(BB, PPC::ANDIo, 2, Result).addReg(Tmp1).addImm(Tmp2); - break; - case 2: // Shifted immediate + RecordSuccess = true; + return Result; + } else if (isUInt16(Tmp2)) { + Tmp2 = Hi16(Tmp2); Tmp1 = SelectExpr(N.getOperand(0)); BuildMI(BB, PPC::ANDISo, 2, Result).addReg(Tmp1).addImm(Tmp2); - break; - case 5: // Bitfield mask - Opc = Recording ? PPC::RLWINMo : PPC::RLWINM; - Tmp3 = Tmp2 >> 16; // MB - Tmp2 &= 0xFFFF; // ME - - // FIXME: Catch SHL-AND in addition to SRL-AND in this block. - if (N.getOperand(0).getOpcode() == ISD::SRL) - if (ConstantSDNode *SA = - dyn_cast(N.getOperand(0).getOperand(1))) { - - // We can fold the RLWINM and the SRL together if the mask is - // clearing the top bits which are rotated around. - unsigned RotAmt = 32-(SA->getValue() & 31); - if (Tmp2 <= RotAmt) { - Tmp1 = SelectExpr(N.getOperand(0).getOperand(0)); - BuildMI(BB, Opc, 4, Result).addReg(Tmp1).addImm(RotAmt) - .addImm(Tmp3).addImm(Tmp2); - break; - } - } - - Tmp1 = SelectExpr(N.getOperand(0)); - BuildMI(BB, Opc, 4, Result).addReg(Tmp1).addImm(0) - .addImm(Tmp3).addImm(Tmp2); - break; + RecordSuccess = true; + return Result; + } + } + if (isOprNot(N.getOperand(0))) { + Tmp1 = SelectExpr(N.getOperand(0).getOperand(0)); + Tmp2 = SelectExpr(N.getOperand(1)); + BuildMI(BB, PPC::ANDC, 2, Result).addReg(Tmp2).addReg(Tmp1); + RecordSuccess = false; + return Result; } + // emit a regular and + Tmp1 = SelectExpr(N.getOperand(0)); + Tmp2 = SelectExpr(N.getOperand(1)); + Opc = Recording ? PPC::ANDo : PPC::AND; + BuildMI(BB, Opc, 2, Result).addReg(Tmp1).addReg(Tmp2); RecordSuccess = true; return Result; From criswell at cs.uiuc.edu Mon Aug 8 16:26:29 2005 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon, 8 Aug 2005 16:26:29 -0500 Subject: [llvm-commits] CVS: llvm-test/configure Makefile.config.in Message-ID: <200508082126.QAA16750@choi.cs.uiuc.edu> Changes in directory llvm-test: configure updated: 1.27 -> 1.28 Makefile.config.in updated: 1.18 -> 1.19 --- Log message: Added the configure option for the ALPBench benchmark suite. --- Diffs of the changes: (+83 -29) Makefile.config.in | 4 + configure | 108 ++++++++++++++++++++++++++++++++++++++--------------- 2 files changed, 83 insertions(+), 29 deletions(-) Index: llvm-test/configure diff -u llvm-test/configure:1.27 llvm-test/configure:1.28 --- llvm-test/configure:1.27 Mon Jul 25 15:30:35 2005 +++ llvm-test/configure Mon Aug 8 16:26:07 2005 @@ -465,7 +465,7 @@ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS LLVM_SRC LLVM_OBJ DISABLE_LLC_DIFFS CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT CC CFLAGS ac_ct_CC CPP ifGNUmake LEX LEXLIB LEX_OUTPUT_ROOT FLEX YACC BISON build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL USE_F2C F2C F2C_BIN F2C_DIR F2C_INC F2C_LIB USE_F95 F95 F95_BIN F95_DIR F95_INC F95_LIB HAVE_RE_COMP SPEC95_ROOT USE_SPEC95 SPEC2000_ROOT USE_SPEC2000 POVRAY_ROOT USE_POVRAY NAMD_ROOT USE_NAMD SWEEP3D_ROOT USE_SWEEP3D FPGROWTH_ROOT USE_FPGROWTH LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS LLVM_SRC LLVM_OBJ DISABLE_LLC_DIFFS CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT CC CFLAGS ac_ct_CC CPP ifGNUmake LEX LEXLIB LEX_OUTPUT_ROOT FLEX YACC BISON build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL USE_F2C F2C F2C_BIN F2C_DIR F2C_INC F2C_LIB USE_F95 F95 F95_BIN F95_DIR F95_INC F95_LIB HAVE_RE_COMP SPEC95_ROOT USE_SPEC95 SPEC2000_ROOT USE_SPEC2000 POVRAY_ROOT USE_POVRAY NAMD_ROOT USE_NAMD SWEEP3D_ROOT USE_SWEEP3D FPGROWTH_ROOT USE_FPGROWTH ALP_ROOT USE_ALP LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -1036,6 +1036,7 @@ --enable-namd=ARG Use namd as a benchmark (srcs in DIR) --enable-sweep3d=ARG Use sweep3d as a benchmark (srcs in DIR) --enable-fpgrowth=ARG Use fpgrowth as a benchmark (srcs in DIR) + --enable-alp=ARG Use alp as a benchmark (srcs in DIR) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -3987,7 +3988,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 3990 "configure"' > conftest.$ac_ext + echo '#line 3991 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -4861,7 +4862,7 @@ # Provide some information about the compiler. -echo "$as_me:4864:" \ +echo "$as_me:4865:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -5918,11 +5919,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:5921: $lt_compile\"" >&5) + (eval echo "\"\$as_me:5922: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:5925: \$? = $ac_status" >&5 + echo "$as_me:5926: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6161,11 +6162,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6164: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6165: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6168: \$? = $ac_status" >&5 + echo "$as_me:6169: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6221,11 +6222,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6224: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6225: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:6228: \$? = $ac_status" >&5 + echo "$as_me:6229: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8406,7 +8407,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:10701: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:10704: \$? = $ac_status" >&5 + echo "$as_me:10705: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -10757,11 +10758,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:10760: $lt_compile\"" >&5) + (eval echo "\"\$as_me:10761: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:10764: \$? = $ac_status" >&5 + echo "$as_me:10765: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12118,7 +12119,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:13057: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13060: \$? = $ac_status" >&5 + echo "$as_me:13061: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -13113,11 +13114,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13116: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13117: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13120: \$? = $ac_status" >&5 + echo "$as_me:13121: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15152,11 +15153,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15155: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15156: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15159: \$? = $ac_status" >&5 + echo "$as_me:15160: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -15395,11 +15396,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15398: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15399: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15402: \$? = $ac_status" >&5 + echo "$as_me:15403: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -15455,11 +15456,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15458: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15459: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15462: \$? = $ac_status" >&5 + echo "$as_me:15463: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17640,7 +17641,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5 +echo $ECHO_N "checking for alp benchmark sources... $ECHO_C" >&6 +case "$checkresult" in +auto|yes) + defaultdir=/home/vadve/shared/benchmarks/ALP + if test -d "$defaultdir" + then + ALP_ROOT=$defaultdir + + USE_ALP=USE_ALP=1 + + checkresult="yes, found in $defaultdir" + else + checkresult=no + fi + ;; +no) + + + checkresult=no + ;; +*) if test -d "$checkresult" + then + ALP_ROOT="$checkresult" + + USE_ALP=USE_ALP=1 + + checkresult="yes, in $checkresult" + else + + + checkresult="no, not found in $checkresult" + fi + ;; +esac +echo "$as_me:$LINENO: result: $checkresult" >&5 +echo "${ECHO_T}$checkresult" >&6 + + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -20744,6 +20792,8 @@ s, at USE_SWEEP3D@,$USE_SWEEP3D,;t t s, at FPGROWTH_ROOT@,$FPGROWTH_ROOT,;t t s, at USE_FPGROWTH@,$USE_FPGROWTH,;t t +s, at ALP_ROOT@,$ALP_ROOT,;t t +s, at USE_ALP@,$USE_ALP,;t t s, at LIBOBJS@,$LIBOBJS,;t t s, at LTLIBOBJS@,$LTLIBOBJS,;t t CEOF Index: llvm-test/Makefile.config.in diff -u llvm-test/Makefile.config.in:1.18 llvm-test/Makefile.config.in:1.19 --- llvm-test/Makefile.config.in:1.18 Sat Jul 16 19:58:54 2005 +++ llvm-test/Makefile.config.in Mon Aug 8 16:26:08 2005 @@ -72,6 +72,10 @@ @USE_FPGROWTH@ FPGROWTH_ROOT := @FPGROWTH_ROOT@ +# Path to the ALP source code + at USE_ALP@ +ALP_ROOT := @ALP_ROOT@ + # Disable LLC diffs for testing. @DISABLE_LLC_DIFFS@ From criswell at cs.uiuc.edu Mon Aug 8 16:26:30 2005 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon, 8 Aug 2005 16:26:30 -0500 Subject: [llvm-commits] CVS: llvm-test/autoconf/configure.ac Message-ID: <200508082126.QAA16754@choi.cs.uiuc.edu> Changes in directory llvm-test/autoconf: configure.ac updated: 1.26 -> 1.27 --- Log message: Added the configure option for the ALPBench benchmark suite. --- Diffs of the changes: (+1 -0) configure.ac | 1 + 1 files changed, 1 insertion(+) Index: llvm-test/autoconf/configure.ac diff -u llvm-test/autoconf/configure.ac:1.26 llvm-test/autoconf/configure.ac:1.27 --- llvm-test/autoconf/configure.ac:1.26 Sun Jul 17 00:37:51 2005 +++ llvm-test/autoconf/configure.ac Mon Aug 8 16:26:12 2005 @@ -115,6 +115,7 @@ EXTERNAL_BENCHMARK(namd,/home/vadve/shared/benchmarks/spec_namd) EXTERNAL_BENCHMARK(sweep3d,/home/vadve/criswell/umt2k) EXTERNAL_BENCHMARK(fpgrowth,/home/vadve/shared/benchmarks/fpgrowth) +EXTERNAL_BENCHMARK(alp,/home/vadve/shared/benchmarks/ALP) dnl Create the output files AC_OUTPUT From lattner at cs.uiuc.edu Mon Aug 8 16:30:40 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 8 Aug 2005 16:30:40 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Message-ID: <200508082130.QAA17437@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPC32ISelPattern.cpp updated: 1.120 -> 1.121 --- Log message: Add support for OR/XOR/SUB immediates that are handled with the new immediate way. This allows ORI/ORIS pairs, for example. --- Diffs of the changes: (+55 -37) PPC32ISelPattern.cpp | 92 ++++++++++++++++++++++++++++++--------------------- 1 files changed, 55 insertions(+), 37 deletions(-) Index: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp diff -u llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.120 llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.121 --- llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.120 Mon Aug 8 16:24:57 2005 +++ llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Mon Aug 8 16:30:29 2005 @@ -1758,37 +1758,40 @@ case ISD::OR: if (SelectBitfieldInsert(N, Result)) return Result; + Tmp1 = SelectExpr(N.getOperand(0)); - switch(getImmediateForOpcode(N.getOperand(1), opcode, Tmp2)) { - default: assert(0 && "unhandled result code"); - case 0: // No immediate - Tmp2 = SelectExpr(N.getOperand(1)); - Opc = Recording ? PPC::ORo : PPC::OR; - RecordSuccess = true; - BuildMI(BB, Opc, 2, Result).addReg(Tmp1).addReg(Tmp2); - break; - case 1: // Low immediate + if (isImmediate(N.getOperand(1), Tmp2)) { + Tmp3 = Hi16(Tmp2); + Tmp2 = Lo16(Tmp2); + if (Tmp2 && Tmp3) { + unsigned Reg = MakeReg(MVT::i32); + BuildMI(BB, PPC::ORI, 2, Reg).addReg(Tmp1).addImm(Tmp2); + BuildMI(BB, PPC::ORIS, 2, Result).addReg(Reg).addImm(Tmp3); + } else if (Tmp2) { BuildMI(BB, PPC::ORI, 2, Result).addReg(Tmp1).addImm(Tmp2); - break; - case 2: // Shifted immediate - BuildMI(BB, PPC::ORIS, 2, Result).addReg(Tmp1).addImm(Tmp2); - break; + } else { + BuildMI(BB, PPC::ORIS, 2, Result).addReg(Tmp1).addImm(Tmp3); + } + } else { + Tmp2 = SelectExpr(N.getOperand(1)); + Opc = Recording ? PPC::ORo : PPC::OR; + RecordSuccess = true; + BuildMI(BB, Opc, 2, Result).addReg(Tmp1).addReg(Tmp2); } return Result; case ISD::XOR: { // Check for EQV: xor, (xor a, -1), b if (N.getOperand(0).getOpcode() == ISD::XOR && - N.getOperand(0).getOperand(1).getOpcode() == ISD::Constant && - cast(N.getOperand(0).getOperand(1))->isAllOnesValue()) { + isImmediate(N.getOperand(0).getOperand(1), Tmp2) && + (signed)Tmp2 == -1) { Tmp1 = SelectExpr(N.getOperand(0).getOperand(0)); Tmp2 = SelectExpr(N.getOperand(1)); BuildMI(BB, PPC::EQV, 2, Result).addReg(Tmp1).addReg(Tmp2); return Result; } // Check for NOT, NOR, EQV, and NAND: xor (copy, or, xor, and), -1 - if (N.getOperand(1).getOpcode() == ISD::Constant && - cast(N.getOperand(1))->isAllOnesValue()) { + if (isOprNot(N)) { switch(N.getOperand(0).getOpcode()) { case ISD::OR: Tmp1 = SelectExpr(N.getOperand(0).getOperand(0)); @@ -1813,23 +1816,26 @@ return Result; } Tmp1 = SelectExpr(N.getOperand(0)); - switch(getImmediateForOpcode(N.getOperand(1), opcode, Tmp2)) { - default: assert(0 && "unhandled result code"); - case 0: // No immediate - Tmp2 = SelectExpr(N.getOperand(1)); - BuildMI(BB, PPC::XOR, 2, Result).addReg(Tmp1).addReg(Tmp2); - break; - case 1: // Low immediate + if (isImmediate(N.getOperand(1), Tmp2)) { + Tmp3 = Hi16(Tmp2); + Tmp2 = Lo16(Tmp2); + if (Tmp2 && Tmp3) { + unsigned Reg = MakeReg(MVT::i32); + BuildMI(BB, PPC::XORI, 2, Reg).addReg(Tmp1).addImm(Tmp2); + BuildMI(BB, PPC::XORIS, 2, Result).addReg(Reg).addImm(Tmp3); + } else if (Tmp2) { BuildMI(BB, PPC::XORI, 2, Result).addReg(Tmp1).addImm(Tmp2); - break; - case 2: // Shifted immediate - BuildMI(BB, PPC::XORIS, 2, Result).addReg(Tmp1).addImm(Tmp2); - break; + } else { + BuildMI(BB, PPC::XORIS, 2, Result).addReg(Tmp1).addImm(Tmp3); + } + } else { + Tmp2 = SelectExpr(N.getOperand(1)); + BuildMI(BB, PPC::XOR, 2, Result).addReg(Tmp1).addReg(Tmp2); } return Result; } - case ISD::SUB: + case ISD::SUB: if (!MVT::isInteger(DestType)) { if (!NoExcessFPPrecision && N.getOperand(0).getOpcode() == ISD::MUL && N.getOperand(0).Val->hasOneUse()) { @@ -1857,17 +1863,29 @@ BuildMI(BB, Opc, 2, Result).addReg(Tmp1).addReg(Tmp2); return Result; } - if (1 == getImmediateForOpcode(N.getOperand(0), opcode, Tmp1, true)) { + if (isImmediate(N.getOperand(0), Tmp1) && isInt16(Tmp1)) { Tmp2 = SelectExpr(N.getOperand(1)); BuildMI(BB, PPC::SUBFIC, 2, Result).addReg(Tmp2).addSImm(Tmp1); - } else if (1 == getImmediateForOpcode(N.getOperand(1), opcode, Tmp2)) { - Tmp1 = SelectExpr(N.getOperand(0)); - BuildMI(BB, PPC::ADDI, 2, Result).addReg(Tmp1).addSImm(Tmp2); - } else { + return Result; + } else if (isImmediate(N.getOperand(1), Tmp2)) { Tmp1 = SelectExpr(N.getOperand(0)); - Tmp2 = SelectExpr(N.getOperand(1)); - BuildMI(BB, PPC::SUBF, 2, Result).addReg(Tmp2).addReg(Tmp1); - } + Tmp2 = -Tmp2; + Tmp3 = HA16(Tmp2); + Tmp2 = Lo16(Tmp2); + if (Tmp2 && Tmp3) { + unsigned Reg = MakeReg(MVT::i32); + BuildMI(BB, PPC::ADDI, 2, Reg).addReg(Tmp1).addSImm(Tmp2); + BuildMI(BB, PPC::ADDIS, 2, Result).addReg(Reg).addSImm(Tmp3); + } else if (Tmp2) { + BuildMI(BB, PPC::ADDI, 2, Result).addReg(Tmp1).addSImm(Tmp2); + } else { + BuildMI(BB, PPC::ADDIS, 2, Result).addReg(Tmp1).addSImm(Tmp3); + } + return Result; + } + Tmp1 = SelectExpr(N.getOperand(0)); + Tmp2 = SelectExpr(N.getOperand(1)); + BuildMI(BB, PPC::SUBF, 2, Result).addReg(Tmp2).addReg(Tmp1); return Result; case ISD::MUL: From lattner at cs.uiuc.edu Mon Aug 8 16:33:34 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 8 Aug 2005 16:33:34 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Message-ID: <200508082133.QAA17482@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPC32ISelPattern.cpp updated: 1.121 -> 1.122 --- Log message: Add new immediate handling support for mul/div. Patch by Jim Laskey! --- Diffs of the changes: (+30 -21) PPC32ISelPattern.cpp | 51 ++++++++++++++++++++++++++++++--------------------- 1 files changed, 30 insertions(+), 21 deletions(-) Index: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp diff -u llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.121 llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.122 --- llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.121 Mon Aug 8 16:30:29 2005 +++ llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Mon Aug 8 16:33:23 2005 @@ -1890,9 +1890,10 @@ case ISD::MUL: Tmp1 = SelectExpr(N.getOperand(0)); - if (1 == getImmediateForOpcode(N.getOperand(1), opcode, Tmp2)) + if (isImmediate(N.getOperand(1), Tmp2) && isInt16(Tmp2)) { + Tmp2 = Lo16(Tmp2); BuildMI(BB, PPC::MULLI, 2, Result).addReg(Tmp1).addSImm(Tmp2); - else { + } else { Tmp2 = SelectExpr(N.getOperand(1)); switch (DestType) { default: assert(0 && "Unknown type to ISD::MUL"); break; @@ -1913,31 +1914,39 @@ return Result; case ISD::SDIV: - case ISD::UDIV: - switch (getImmediateForOpcode(N.getOperand(1), opcode, Tmp3)) { - default: break; - // If this is an sdiv by a power of two, we can use an srawi/addze pair. - case 3: - Tmp1 = MakeReg(MVT::i32); - Tmp2 = SelectExpr(N.getOperand(0)); - if ((int)Tmp3 < 0) { + if (isImmediate(N.getOperand(1), Tmp3)) { + if ((signed)Tmp3 > 0 && isPowerOf2_32(Tmp3)) { + Tmp3 = Log2_32(Tmp3); + Tmp1 = MakeReg(MVT::i32); + Tmp2 = SelectExpr(N.getOperand(0)); + BuildMI(BB, PPC::SRAWI, 2, Tmp1).addReg(Tmp2).addImm(Tmp3); + BuildMI(BB, PPC::ADDZE, 1, Result).addReg(Tmp1); + return Result; + } else if ((signed)Tmp3 < 0 && isPowerOf2_32(-Tmp3)) { + Tmp3 = Log2_32(-Tmp3); unsigned Tmp4 = MakeReg(MVT::i32); - BuildMI(BB, PPC::SRAWI, 2, Tmp1).addReg(Tmp2).addImm(-Tmp3); + BuildMI(BB, PPC::SRAWI, 2, Tmp1).addReg(Tmp2).addImm(Tmp3); BuildMI(BB, PPC::ADDZE, 1, Tmp4).addReg(Tmp1); BuildMI(BB, PPC::NEG, 1, Result).addReg(Tmp4); - } else { - BuildMI(BB, PPC::SRAWI, 2, Tmp1).addReg(Tmp2).addImm(Tmp3); - BuildMI(BB, PPC::ADDZE, 1, Result).addReg(Tmp1); + return Result; } - return Result; + } + // fall thru + case ISD::UDIV: // If this is a divide by constant, we can emit code using some magic // constants to implement it as a multiply instead. - case 4: - ExprMap.erase(N); - if (opcode == ISD::SDIV) - return SelectExpr(BuildSDIVSequence(N)); - else - return SelectExpr(BuildUDIVSequence(N)); + if (isImmediate(N.getOperand(1), Tmp3)) { + if (opcode == ISD::SDIV) { + if ((signed)Tmp3 < -1 || (signed)Tmp3 > 1) { + ExprMap.erase(N); + return SelectExpr(BuildSDIVSequence(N)); + } + } else { + if ((signed)Tmp3 > 1) { + ExprMap.erase(N); + return SelectExpr(BuildUDIVSequence(N)); + } + } } Tmp1 = SelectExpr(N.getOperand(0)); Tmp2 = SelectExpr(N.getOperand(1)); From lattner at cs.uiuc.edu Mon Aug 8 16:34:24 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 8 Aug 2005 16:34:24 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Message-ID: <200508082134.QAA17515@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPC32ISelPattern.cpp updated: 1.122 -> 1.123 --- Log message: Remove getImmediateForOpcode, which is now dead. Patch by Jim Laskey. --- Diffs of the changes: (+0 -59) PPC32ISelPattern.cpp | 59 --------------------------------------------------- 1 files changed, 59 deletions(-) Index: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp diff -u llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.122 llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.123 --- llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.122 Mon Aug 8 16:33:23 2005 +++ llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Mon Aug 8 16:34:13 2005 @@ -673,65 +673,6 @@ static unsigned Hi16(unsigned x) { return Lo16(x >> 16); } static unsigned HA16(unsigned x) { return Hi16((signed)x - (signed short)x); } -/// getImmediateForOpcode - This method returns a value indicating whether -/// the ConstantSDNode N can be used as an immediate to Opcode. The return -/// values are either 0, 1 or 2. 0 indicates that either N is not a -/// ConstantSDNode, or is not suitable for use by that opcode. -/// Return value codes for turning into an enum someday: -/// 1: constant may be used in normal immediate form. -/// 2: constant may be used in shifted immediate form. -/// 3: log base 2 of the constant may be used. -/// 4: constant is suitable for integer division conversion -/// 5: constant is a bitfield mask -/// -static unsigned getImmediateForOpcode(SDOperand N, unsigned Opcode, - unsigned& Imm, bool U = false) { - if (N.getOpcode() != ISD::Constant) return 0; - - int v = (int)cast(N)->getSignExtended(); - - switch(Opcode) { - default: return 0; - case ISD::ADD: - if (isInt16(v)) { Imm = v & 0xFFFF; return 1; } - if ((v & 0x0000FFFF) == 0) { Imm = v >> 16; return 2; } - break; - case ISD::AND: { - unsigned MB, ME; - if (isRunOfOnes(v, MB, ME)) { Imm = MB << 16 | ME & 0xFFFF; return 5; } - if (isUInt16(v)) { Imm = v & 0xFFFF; return 1; } - if ((v & 0x0000FFFF) == 0) { Imm = v >> 16; return 2; } - break; - } - case ISD::XOR: - case ISD::OR: - if (isUInt16(v)) { Imm = v & 0xFFFF; return 1; } - if ((v & 0x0000FFFF) == 0) { Imm = v >> 16; return 2; } - break; - case ISD::MUL: - if (isInt16(v)) { Imm = v & 0xFFFF; return 1; } - break; - case ISD::SUB: - // handle subtract-from separately from subtract, since subi is really addi - if (U && isInt16(v)) { Imm = v & 0xFFFF; return 1; } - if (!U && isInt16(-v)) { Imm = (-v) & 0xFFFF; return 1; } - break; - case ISD::SETCC: - if (U && isUInt16(v)) { Imm = v & 0xFFFF; return 1; } - if (!U && isInt16(v)) { Imm = v & 0xFFFF; return 1; } - break; - case ISD::SDIV: - if (isPowerOf2_32(v)) { Imm = Log2_32(v); return 3; } - if (isPowerOf2_32(-v)) { Imm = Log2_32(-v); return 3; } - if (v <= -2 || v >= 2) { return 4; } - break; - case ISD::UDIV: - if (v > 1) { return 4; } - break; - } - return 0; -} - /// NodeHasRecordingVariant - If SelectExpr can always produce code for /// NodeOpcode that also sets CR0 as a side effect, return true. Otherwise, /// return false. From lattner at cs.uiuc.edu Mon Aug 8 16:57:38 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 8 Aug 2005 16:57:38 -0500 Subject: [llvm-commits] CVS: llvm/lib/Support/CommandLine.cpp Message-ID: <200508082157.QAA17724@zion.cs.uiuc.edu> Changes in directory llvm/lib/Support: CommandLine.cpp updated: 1.62 -> 1.63 --- Log message: Allow tools with "consume after" options (like lli) to take more positional opts than they take directly. Thanks to John C for pointing this problem out to me! --- Diffs of the changes: (+1 -4) CommandLine.cpp | 5 +---- 1 files changed, 1 insertion(+), 4 deletions(-) Index: llvm/lib/Support/CommandLine.cpp diff -u llvm/lib/Support/CommandLine.cpp:1.62 llvm/lib/Support/CommandLine.cpp:1.63 --- llvm/lib/Support/CommandLine.cpp:1.62 Mon Aug 8 12:25:38 2005 +++ llvm/lib/Support/CommandLine.cpp Mon Aug 8 16:57:27 2005 @@ -335,11 +335,8 @@ " does not require a value!"); } UnboundedFound |= EatsUnboundedNumberOfValues(Opt); - - if (Opt->getNumOccurrencesFlag() == cl::ZeroOrMore - || Opt->getNumOccurrencesFlag() == cl::OneOrMore) - HasUnlimitedPositionals = true; } + HasUnlimitedPositionals = UnboundedFound || ConsumeAfterOpt; } // PositionalVals - A vector of "positional" arguments we accumulate into From lattner at cs.uiuc.edu Mon Aug 8 17:14:02 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 8 Aug 2005 17:14:02 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/LoopStrengthReduce/different-type-ivs.ll Message-ID: <200508082214.RAA17977@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/LoopStrengthReduce: different-type-ivs.ll added (r1.1) --- Log message: A testcase I don't want to break in the future --- Diffs of the changes: (+26 -0) different-type-ivs.ll | 26 ++++++++++++++++++++++++++ 1 files changed, 26 insertions(+) Index: llvm/test/Regression/Transforms/LoopStrengthReduce/different-type-ivs.ll diff -c /dev/null llvm/test/Regression/Transforms/LoopStrengthReduce/different-type-ivs.ll:1.1 *** /dev/null Mon Aug 8 17:13:59 2005 --- llvm/test/Regression/Transforms/LoopStrengthReduce/different-type-ivs.ll Mon Aug 8 17:13:49 2005 *************** *** 0 **** --- 1,26 ---- + ; RUN: llvm-as < %s | opt -loop-reduce -disable-output + ; Test to make sure that loop-reduce never crashes on IV's + ; with different types but identical strides. + + void %foo() { + entry: + br label %no_exit + + no_exit: ; preds = %no_exit, %entry + %indvar = phi uint [ 0, %entry ], [ %indvar.next, %no_exit ] ; [#uses=3] + %indvar = cast uint %indvar to short ; [#uses=1] + %X.0.0 = mul short %indvar, 1234 ; [#uses=1] + %tmp. = mul uint %indvar, 1234 ; [#uses=1] + %tmp.5 = cast short %X.0.0 to int ; [#uses=1] + %tmp.3 = call int (...)* %bar( int %tmp.5, uint %tmp. ) ; [#uses=0] + %tmp.0 = call bool %pred( ) ; [#uses=1] + %indvar.next = add uint %indvar, 1 ; [#uses=1] + br bool %tmp.0, label %return, label %no_exit + + return: + ret void + } + + declare bool %pred() + + declare int %bar(...) From natebegeman at mac.com Mon Aug 8 17:23:07 2005 From: natebegeman at mac.com (Nate Begeman) Date: Mon, 8 Aug 2005 17:23:07 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Message-ID: <200508082223.RAA18047@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPC32ISelPattern.cpp updated: 1.123 -> 1.124 --- Log message: Factor out some common code, and be smarter about when to emit load hi/lo code sequences. --- Diffs of the changes: (+27 -31) PPC32ISelPattern.cpp | 58 +++++++++++++++++++++++---------------------------- 1 files changed, 27 insertions(+), 31 deletions(-) Index: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp diff -u llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.123 llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.124 --- llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.123 Mon Aug 8 16:34:13 2005 +++ llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Mon Aug 8 17:22:56 2005 @@ -1186,7 +1186,7 @@ return Result; } -/// Check to see if the load is a constant offset from a base register +/// Check to see if the load is a constant offset from a base register. unsigned ISel::SelectAddr(SDOperand N, unsigned& Reg, int& offset) { unsigned imm = 0, opcode = N.getOpcode(); @@ -1208,6 +1208,22 @@ return 2; } } + // Now check if we're dealing with a global, and whether or not we should emit + // an optimized load or store for statics. + if(GlobalAddressSDNode *GN = dyn_cast(N)) { + GlobalValue *GV = GN->getGlobal(); + if (!GV->hasWeakLinkage() && !GV->isExternal()) { + unsigned GlobalHi = MakeReg(MVT::i32); + if (PICEnabled) + BuildMI(BB, PPC::ADDIS, 2, GlobalHi).addReg(getGlobalBaseReg()) + .addGlobalAddress(GV); + else + BuildMI(BB, PPC::LIS, 1, GlobalHi).addGlobalAddress(GV); + Reg = GlobalHi; + offset = 0; + return 3; + } + } Reg = SelectExpr(N); offset = 0; return 0; @@ -1410,21 +1426,6 @@ } else if (Address.getOpcode() == ISD::FrameIndex) { Tmp1 = cast(Address)->getIndex(); addFrameReference(BuildMI(BB, Opc, 2, Result), (int)Tmp1); - } else if(GlobalAddressSDNode *GN = dyn_cast(Address)){ - GlobalValue *GV = GN->getGlobal(); - Tmp1 = MakeReg(MVT::i32); - if (PICEnabled) - BuildMI(BB, PPC::ADDIS, 2, Tmp1).addReg(getGlobalBaseReg()) - .addGlobalAddress(GV); - else - BuildMI(BB, PPC::LIS, 1, Tmp1).addGlobalAddress(GV); - if (GV->hasWeakLinkage() || GV->isExternal()) { - Tmp2 = MakeReg(MVT::i32); - BuildMI(BB, PPC::LWZ, 2, Tmp2).addGlobalAddress(GV).addReg(Tmp1); - BuildMI(BB, Opc, 2, Result).addSImm(0).addReg(Tmp2); - } else { - BuildMI(BB, Opc, 2, Result).addGlobalAddress(GV).addReg(Tmp1); - } } else { int offset; switch(SelectAddr(Address, Tmp1, offset)) { @@ -1439,6 +1440,11 @@ Opc = IndexedOpForOp(Opc); BuildMI(BB, Opc, 2, Result).addReg(Tmp1).addReg(offset); break; + case 3: { + GlobalAddressSDNode *GN = cast(Address); + GlobalValue *GV = GN->getGlobal(); + BuildMI(BB, Opc, 2, Result).addGlobalAddress(GV).addReg(Tmp1); + } } } return Result; @@ -2490,21 +2496,6 @@ if(Address.getOpcode() == ISD::FrameIndex) { Tmp2 = cast(Address)->getIndex(); addFrameReference(BuildMI(BB, Opc, 3).addReg(Tmp1), (int)Tmp2); - } else if(GlobalAddressSDNode *GN = dyn_cast(Address)){ - GlobalValue *GV = GN->getGlobal(); - Tmp2 = MakeReg(MVT::i32); - if (PICEnabled) - BuildMI(BB, PPC::ADDIS, 2, Tmp2).addReg(getGlobalBaseReg()) - .addGlobalAddress(GV); - else - BuildMI(BB, PPC::LIS, 1, Tmp2).addGlobalAddress(GV); - if (GV->hasWeakLinkage() || GV->isExternal()) { - Tmp3 = MakeReg(MVT::i32); - BuildMI(BB, PPC::LWZ, 2, Tmp3).addGlobalAddress(GV).addReg(Tmp2); - BuildMI(BB, Opc, 3).addReg(Tmp1).addSImm(0).addReg(Tmp3); - } else { - BuildMI(BB, Opc, 3).addReg(Tmp1).addGlobalAddress(GV).addReg(Tmp2); - } } else { int offset; switch(SelectAddr(Address, Tmp2, offset)) { @@ -2519,6 +2510,11 @@ Opc = IndexedOpForOp(Opc); BuildMI(BB, Opc, 3).addReg(Tmp1).addReg(Tmp2).addReg(offset); break; + case 3: { + GlobalAddressSDNode *GN = cast(Address); + GlobalValue *GV = GN->getGlobal(); + BuildMI(BB, Opc, 3).addReg(Tmp1).addGlobalAddress(GV).addReg(Tmp2); + } } } return; From lattner at cs.uiuc.edu Mon Aug 8 17:32:45 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 8 Aug 2005 17:32:45 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Message-ID: <200508082232.RAA18144@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: LoopStrengthReduce.cpp updated: 1.40 -> 1.41 --- Log message: Split MoveLoopVariantsToImediateField out from MoveImmediateValues. The first is a correctness thing, and the later is an optzn thing. This also is needed to support a future change. --- Diffs of the changes: (+65 -23) LoopStrengthReduce.cpp | 88 ++++++++++++++++++++++++++++++++++++------------- 1 files changed, 65 insertions(+), 23 deletions(-) Index: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp diff -u llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.40 llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.41 --- llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.40 Mon Aug 8 01:25:50 2005 +++ llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Mon Aug 8 17:32:34 2005 @@ -454,6 +454,45 @@ return false; } +/// MoveLoopVariantsToImediateField - Move any subexpressions from Val that are +/// loop varying to the Imm operand. +static void MoveLoopVariantsToImediateField(SCEVHandle &Val, SCEVHandle &Imm, + Loop *L) { + if (Val->isLoopInvariant(L)) return; // Nothing to do. + + if (SCEVAddExpr *SAE = dyn_cast(Val)) { + std::vector NewOps; + NewOps.reserve(SAE->getNumOperands()); + + for (unsigned i = 0; i != SAE->getNumOperands(); ++i) + if (!SAE->getOperand(i)->isLoopInvariant(L)) { + // If this is a loop-variant expression, it must stay in the immediate + // field of the expression. + Imm = SCEVAddExpr::get(Imm, SAE->getOperand(i)); + } else { + NewOps.push_back(SAE->getOperand(i)); + } + + if (NewOps.empty()) + Val = SCEVUnknown::getIntegerSCEV(0, Val->getType()); + else + Val = SCEVAddExpr::get(NewOps); + } else if (SCEVAddRecExpr *SARE = dyn_cast(Val)) { + // Try to pull immediates out of the start value of nested addrec's. + SCEVHandle Start = SARE->getStart(); + MoveLoopVariantsToImediateField(Start, Imm, L); + + std::vector Ops(SARE->op_begin(), SARE->op_end()); + Ops[0] = Start; + Val = SCEVAddRecExpr::get(Ops, SARE->getLoop()); + } else { + // Otherwise, all of Val is variant, move the whole thing over. + Imm = SCEVAddExpr::get(Imm, Val); + Val = SCEVUnknown::getIntegerSCEV(0, Val->getType()); + } +} + + /// MoveImmediateValues - Look at Val, and pull out any additions of constants /// that can fit into the immediate field of instructions in the target. /// Accumulate these immediate values into the Imm value. @@ -504,6 +543,7 @@ // Otherwise, no immediates to move. } + /// StrengthReduceStridedIVUsers - Strength reduce all of the users of a single /// stride of IV. All of the users may have different starting values, and this /// may not be the only stride (we know it is if isOnlyStride is true). @@ -528,25 +568,17 @@ Uses.Users[i].OperandValToReplace, ZeroBase, Uses.Users[i].isUseOfPostIncrementedValue))); - - // First pass, figure out what we can represent in the immediate fields of - // instructions. If we can represent anything there, move it to the imm - // fields of the BasedUsers. + + // Move any loop invariant operands from the offset field to the immediate + // field of the use, so that we don't try to use something before it is + // computed. for (unsigned i = 0, e = UsersToProcess.size(); i != e; ++i) { - // Addressing modes can be folded into loads and stores. Be careful that - // the store is through the expression, not of the expression though. - bool isAddress = isa(UsersToProcess[i].second.Inst); - if (StoreInst *SI = dyn_cast(UsersToProcess[i].second.Inst)) - if (SI->getOperand(1) == UsersToProcess[i].second.OperandValToReplace) - isAddress = true; - - MoveImmediateValues(UsersToProcess[i].first, UsersToProcess[i].second.Imm, - isAddress, L); - + MoveLoopVariantsToImediateField(UsersToProcess[i].first, + UsersToProcess[i].second.Imm, L); assert(UsersToProcess[i].first->isLoopInvariant(L) && "Base value is not loop invariant!"); } - + SCEVExpander Rewriter(*SE, *LI); SCEVExpander PreheaderRewriter(*SE, *LI); @@ -561,16 +593,26 @@ "This loop isn't canonicalized right"); BasicBlock *LatchBlock = SomeLoopPHI->getIncomingBlock(SomeLoopPHI->getIncomingBlock(0) == Preheader); - + + // Next, figure out what we can represent in the immediate fields of + // instructions. If we can represent anything there, move it to the imm + // fields of the BasedUsers. + for (unsigned i = 0, e = UsersToProcess.size(); i != e; ++i) { + // Addressing modes can be folded into loads and stores. Be careful that + // the store is through the expression, not of the expression though. + bool isAddress = isa(UsersToProcess[i].second.Inst); + if (StoreInst *SI = dyn_cast(UsersToProcess[i].second.Inst)) + if (SI->getOperand(1) == UsersToProcess[i].second.OperandValToReplace) + isAddress = true; + + MoveImmediateValues(UsersToProcess[i].first, UsersToProcess[i].second.Imm, + isAddress, L); + } + + + DEBUG(std::cerr << "INSERTING IVs of STRIDE " << *Stride << ":\n"); - // FIXME: This loop needs increasing levels of intelligence. - // STAGE 0: just emit everything as its own base. - // STAGE 1: factor out common vars from bases, and try and push resulting - // constants into Imm field. <-- We are here - // STAGE 2: factor out large constants to try and make more constants - // acceptable for target loads and stores. - // Sort by the base value, so that all IVs with identical bases are next to // each other. std::sort(UsersToProcess.begin(), UsersToProcess.end()); From lattner at cs.uiuc.edu Mon Aug 8 17:56:32 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 8 Aug 2005 17:56:32 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Message-ID: <200508082256.RAA18285@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: LoopStrengthReduce.cpp updated: 1.41 -> 1.42 --- Log message: Suck the base value out of the UsersToProcess vector into the BasedUser class to simplify the code. Fuse two loops. --- Diffs of the changes: (+38 -38) LoopStrengthReduce.cpp | 76 ++++++++++++++++++++++++------------------------- 1 files changed, 38 insertions(+), 38 deletions(-) Index: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp diff -u llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.41 llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.42 --- llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.41 Mon Aug 8 17:32:34 2005 +++ llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Mon Aug 8 17:56:21 2005 @@ -345,6 +345,12 @@ /// BasedUser - For a particular base value, keep information about how we've /// partitioned the expression so far. struct BasedUser { + /// Base - The Base value for the PHI node that needs to be inserted for + /// this use. As the use is processed, information gets moved from this + /// field to the Imm field (below). BasedUser values are sorted by this + /// field. + SCEVHandle Base; + /// Inst - The instruction using the induction variable. Instruction *Inst; @@ -366,24 +372,27 @@ // This can only be set in special cases, such as the terminating setcc // instruction for a loop. bool isUseOfPostIncrementedValue; - - BasedUser(Instruction *I, Value *Op, const SCEVHandle &IMM, bool iUOPIV) - : Inst(I), OperandValToReplace(Op), Imm(IMM), EmittedBase(0), - isUseOfPostIncrementedValue(iUOPIV) {} + + BasedUser(IVStrideUse &IVSU) + : Base(IVSU.Offset), Inst(IVSU.User), + OperandValToReplace(IVSU.OperandValToReplace), + Imm(SCEVUnknown::getIntegerSCEV(0, Base->getType())), EmittedBase(0), + isUseOfPostIncrementedValue(IVSU.isUseOfPostIncrementedValue) {} // Once we rewrite the code to insert the new IVs we want, update the // operands of Inst to use the new expression 'NewBase', with 'Imm' added // to it. void RewriteInstructionToUseNewBase(Value *NewBase, SCEVExpander &Rewriter); - // No need to compare these. - bool operator<(const BasedUser &BU) const { return 0; } + // Sort by the Base field. + bool operator<(const BasedUser &BU) const { return Base < BU.Base; } void dump() const; }; } void BasedUser::dump() const { + std::cerr << " Base=" << *Base; std::cerr << " Imm=" << *Imm; if (EmittedBase) std::cerr << " EB=" << *EmittedBase; @@ -543,7 +552,6 @@ // Otherwise, no immediates to move. } - /// StrengthReduceStridedIVUsers - Strength reduce all of the users of a single /// stride of IV. All of the users may have different starting values, and this /// may not be the only stride (we know it is if isOnlyStride is true). @@ -552,30 +560,21 @@ Loop *L, bool isOnlyStride) { // Transform our list of users and offsets to a bit more complex table. In - // this new vector, the first entry for each element is the base of the - // strided access, and the second is the BasedUser object for the use. We - // progressively move information from the first to the second entry, until we - // eventually emit the object. - std::vector > UsersToProcess; + // this new vector, each 'BasedUser' contains 'Base' the base of the + // strided accessas well as the old information from Uses. We progressively + // move information from the Base field to the Imm field, until we eventually + // have the full access expression to rewrite the use. + std::vector UsersToProcess; UsersToProcess.reserve(Uses.Users.size()); - - SCEVHandle ZeroBase = SCEVUnknown::getIntegerSCEV(0, - Uses.Users[0].Offset->getType()); - - for (unsigned i = 0, e = Uses.Users.size(); i != e; ++i) - UsersToProcess.push_back(std::make_pair(Uses.Users[i].Offset, - BasedUser(Uses.Users[i].User, - Uses.Users[i].OperandValToReplace, - ZeroBase, - Uses.Users[i].isUseOfPostIncrementedValue))); - - // Move any loop invariant operands from the offset field to the immediate - // field of the use, so that we don't try to use something before it is - // computed. - for (unsigned i = 0, e = UsersToProcess.size(); i != e; ++i) { - MoveLoopVariantsToImediateField(UsersToProcess[i].first, - UsersToProcess[i].second.Imm, L); - assert(UsersToProcess[i].first->isLoopInvariant(L) && + for (unsigned i = 0, e = Uses.Users.size(); i != e; ++i) { + UsersToProcess.push_back(Uses.Users[i]); + + // Move any loop invariant operands from the offset field to the immediate + // field of the use, so that we don't try to use something before it is + // computed. + MoveLoopVariantsToImediateField(UsersToProcess.back().Base, + UsersToProcess.back().Imm, L); + assert(UsersToProcess.back().Base->isLoopInvariant(L) && "Base value is not loop invariant!"); } @@ -593,19 +592,20 @@ "This loop isn't canonicalized right"); BasicBlock *LatchBlock = SomeLoopPHI->getIncomingBlock(SomeLoopPHI->getIncomingBlock(0) == Preheader); - + + // Next, figure out what we can represent in the immediate fields of // instructions. If we can represent anything there, move it to the imm // fields of the BasedUsers. for (unsigned i = 0, e = UsersToProcess.size(); i != e; ++i) { // Addressing modes can be folded into loads and stores. Be careful that // the store is through the expression, not of the expression though. - bool isAddress = isa(UsersToProcess[i].second.Inst); - if (StoreInst *SI = dyn_cast(UsersToProcess[i].second.Inst)) - if (SI->getOperand(1) == UsersToProcess[i].second.OperandValToReplace) + bool isAddress = isa(UsersToProcess[i].Inst); + if (StoreInst *SI = dyn_cast(UsersToProcess[i].Inst)) + if (SI->getOperand(1) == UsersToProcess[i].OperandValToReplace) isAddress = true; - MoveImmediateValues(UsersToProcess[i].first, UsersToProcess[i].second.Imm, + MoveImmediateValues(UsersToProcess[i].Base, UsersToProcess[i].Imm, isAddress, L); } @@ -617,7 +617,7 @@ // each other. std::sort(UsersToProcess.begin(), UsersToProcess.end()); while (!UsersToProcess.empty()) { - SCEVHandle Base = UsersToProcess.front().first; + SCEVHandle Base = UsersToProcess.front().Base; DEBUG(std::cerr << " INSERTING PHI with BASE = " << *Base << ":\n"); @@ -644,8 +644,8 @@ // Emit the code to add the immediate offset to the Phi value, just before // the instructions that we identified as using this stride and base. - while (!UsersToProcess.empty() && UsersToProcess.front().first == Base) { - BasedUser &User = UsersToProcess.front().second; + while (!UsersToProcess.empty() && UsersToProcess.front().Base == Base) { + BasedUser &User = UsersToProcess.front(); // Clear the SCEVExpander's expression map so that we are guaranteed // to have the code emitted where we expect it. From lattner at cs.uiuc.edu Mon Aug 8 19:18:20 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 8 Aug 2005 19:18:20 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Message-ID: <200508090018.TAA18784@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: LoopStrengthReduce.cpp updated: 1.42 -> 1.43 --- Log message: Implement: LoopStrengthReduce/share_ivs.ll Two changes: * Only insert one PHI node for each stride. Other values are live in values. This cannot introduce higher register pressure than the previous approach, and can take advantage of reg+reg addressing modes. * Factor common base values out of uses before moving values from the base to the immediate fields. This improves codegen by starting the stride-specific PHI node out at a common place for each IV use. As an example, we used to generate this for a loop in swim: .LBB_main_no_exit_2E_6_2E_i_no_exit_2E_7_2E_i_2: ; no_exit.7.i lfd f0, 0(r8) stfd f0, 0(r3) lfd f0, 0(r6) stfd f0, 0(r7) lfd f0, 0(r2) stfd f0, 0(r5) addi r9, r9, 1 addi r2, r2, 8 addi r5, r5, 8 addi r6, r6, 8 addi r7, r7, 8 addi r8, r8, 8 addi r3, r3, 8 cmpw cr0, r9, r4 bgt .LBB_main_no_exit_2E_6_2E_i_no_exit_2E_7_2E_i_1 now we emit: .LBB_main_no_exit_2E_6_2E_i_no_exit_2E_7_2E_i_2: ; no_exit.7.i lfdx f0, r8, r2 stfdx f0, r9, r2 lfdx f0, r5, r2 stfdx f0, r7, r2 lfdx f0, r3, r2 stfdx f0, r6, r2 addi r10, r10, 1 addi r2, r2, 8 cmpw cr0, r10, r4 bgt .LBB_main_no_exit_2E_6_2E_i_no_exit_2E_7_2E_i_1 As another more dramatic example, we used to emit this: .LBB_main_L_90_no_exit_2E_0_2E_i16_no_exit_2E_1_2E_i19_2: ; no_exit.1.i19 lfd f0, 8(r21) lfd f4, 8(r3) lfd f5, 8(r27) lfd f6, 8(r22) lfd f7, 8(r5) lfd f8, 8(r6) lfd f9, 8(r30) lfd f10, 8(r11) lfd f11, 8(r12) fsub f10, f10, f11 fadd f5, f4, f5 fmul f5, f5, f1 fadd f6, f6, f7 fadd f6, f6, f8 fadd f6, f6, f9 fmadd f0, f5, f6, f0 fnmsub f0, f10, f2, f0 stfd f0, 8(r4) lfd f0, 8(r25) lfd f5, 8(r26) lfd f6, 8(r23) lfd f9, 8(r28) lfd f10, 8(r10) lfd f12, 8(r9) lfd f13, 8(r29) fsub f11, f13, f11 fadd f4, f4, f5 fmul f4, f4, f1 fadd f5, f6, f9 fadd f5, f5, f10 fadd f5, f5, f12 fnmsub f0, f4, f5, f0 fnmsub f0, f11, f3, f0 stfd f0, 8(r24) lfd f0, 8(r8) fsub f4, f7, f8 fsub f5, f12, f10 fnmsub f0, f5, f2, f0 fnmsub f0, f4, f3, f0 stfd f0, 8(r2) addi r20, r20, 1 addi r2, r2, 8 addi r8, r8, 8 addi r10, r10, 8 addi r12, r12, 8 addi r6, r6, 8 addi r29, r29, 8 addi r28, r28, 8 addi r26, r26, 8 addi r25, r25, 8 addi r24, r24, 8 addi r5, r5, 8 addi r23, r23, 8 addi r22, r22, 8 addi r3, r3, 8 addi r9, r9, 8 addi r11, r11, 8 addi r30, r30, 8 addi r27, r27, 8 addi r21, r21, 8 addi r4, r4, 8 cmpw cr0, r20, r7 bgt .LBB_main_L_90_no_exit_2E_0_2E_i16_no_exit_2E_1_2E_i19_1 we now emit: .LBB_main_L_90_no_exit_2E_0_2E_i16_no_exit_2E_1_2E_i19_2: ; no_exit.1.i19 lfdx f0, r21, r20 lfdx f4, r3, r20 lfdx f5, r27, r20 lfdx f6, r22, r20 lfdx f7, r5, r20 lfdx f8, r6, r20 lfdx f9, r30, r20 lfdx f10, r11, r20 lfdx f11, r12, r20 fsub f10, f10, f11 fadd f5, f4, f5 fmul f5, f5, f1 fadd f6, f6, f7 fadd f6, f6, f8 fadd f6, f6, f9 fmadd f0, f5, f6, f0 fnmsub f0, f10, f2, f0 stfdx f0, r4, r20 lfdx f0, r25, r20 lfdx f5, r26, r20 lfdx f6, r23, r20 lfdx f9, r28, r20 lfdx f10, r10, r20 lfdx f12, r9, r20 lfdx f13, r29, r20 fsub f11, f13, f11 fadd f4, f4, f5 fmul f4, f4, f1 fadd f5, f6, f9 fadd f5, f5, f10 fadd f5, f5, f12 fnmsub f0, f4, f5, f0 fnmsub f0, f11, f3, f0 stfdx f0, r24, r20 lfdx f0, r8, r20 fsub f4, f7, f8 fsub f5, f12, f10 fnmsub f0, f5, f2, f0 fnmsub f0, f4, f3, f0 stfdx f0, r2, r20 addi r19, r19, 1 addi r20, r20, 8 cmpw cr0, r19, r7 bgt .LBB_main_L_90_no_exit_2E_0_2E_i16_no_exit_2E_1_2E_i19_1 --- Diffs of the changes: (+153 -53) LoopStrengthReduce.cpp | 206 ++++++++++++++++++++++++++++++++++++------------- 1 files changed, 153 insertions(+), 53 deletions(-) Index: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp diff -u llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.42 llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.43 --- llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.42 Mon Aug 8 17:56:21 2005 +++ llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Mon Aug 8 19:18:09 2005 @@ -382,7 +382,8 @@ // Once we rewrite the code to insert the new IVs we want, update the // operands of Inst to use the new expression 'NewBase', with 'Imm' added // to it. - void RewriteInstructionToUseNewBase(Value *NewBase, SCEVExpander &Rewriter); + void RewriteInstructionToUseNewBase(const SCEVHandle &NewBase, + SCEVExpander &Rewriter); // Sort by the Base field. bool operator<(const BasedUser &BU) const { return Base < BU.Base; } @@ -403,10 +404,10 @@ // Once we rewrite the code to insert the new IVs we want, update the // operands of Inst to use the new expression 'NewBase', with 'Imm' added // to it. -void BasedUser::RewriteInstructionToUseNewBase(Value *NewBase, +void BasedUser::RewriteInstructionToUseNewBase(const SCEVHandle &NewBase, SCEVExpander &Rewriter) { if (!isa(Inst)) { - SCEVHandle NewValSCEV = SCEVAddExpr::get(SCEVUnknown::get(NewBase), Imm); + SCEVHandle NewValSCEV = SCEVAddExpr::get(NewBase, Imm); Value *NewVal = Rewriter.expandCodeFor(NewValSCEV, Inst, OperandValToReplace->getType()); @@ -426,7 +427,7 @@ // Insert the code into the end of the predecessor block. BasicBlock::iterator InsertPt = PN->getIncomingBlock(i)->getTerminator(); - SCEVHandle NewValSCEV = SCEVAddExpr::get(SCEVUnknown::get(NewBase), Imm); + SCEVHandle NewValSCEV = SCEVAddExpr::get(NewBase, Imm); Value *NewVal = Rewriter.expandCodeFor(NewValSCEV, InsertPt, OperandValToReplace->getType()); @@ -552,6 +553,73 @@ // Otherwise, no immediates to move. } +/// RemoveCommonExpressionsFromUseBases - Look through all of the uses in Bases, +/// removing any common subexpressions from it. Anything truly common is +/// removed, accumulated, and returned. This looks for things like (a+b+c) and +/// (a+c+d) -> (a+c). The common expression is *removed* from the Bases. +static SCEVHandle +RemoveCommonExpressionsFromUseBases(std::vector &Uses) { + unsigned NumUses = Uses.size(); + + // Only one use? Use its base, regardless of what it is! + SCEVHandle Zero = SCEVUnknown::getIntegerSCEV(0, Uses[0].Base->getType()); + SCEVHandle Result = Zero; + if (NumUses == 1) { + std::swap(Result, Uses[0].Base); + return Result; + } + + // To find common subexpressions, count how many of Uses use each expression. + // If any subexpressions are used Uses.size() times, they are common. + std::map SubExpressionUseCounts; + + for (unsigned i = 0; i != NumUses; ++i) + if (SCEVAddExpr *AE = dyn_cast(Uses[i].Base)) { + for (unsigned j = 0, e = AE->getNumOperands(); j != e; ++j) + SubExpressionUseCounts[AE->getOperand(j)]++; + } else { + // If the base is zero (which is common), return zero now, there are no + // CSEs we can find. + if (Uses[i].Base == Zero) return Result; + SubExpressionUseCounts[Uses[i].Base]++; + } + + // Now that we know how many times each is used, build Result. + for (std::map::iterator I = + SubExpressionUseCounts.begin(), E = SubExpressionUseCounts.end(); + I != E; ) + if (I->second == NumUses) { // Found CSE! + Result = SCEVAddExpr::get(Result, I->first); + ++I; + } else { + // Remove non-cse's from SubExpressionUseCounts. + SubExpressionUseCounts.erase(I++); + } + + // If we found no CSE's, return now. + if (Result == Zero) return Result; + + // Otherwise, remove all of the CSE's we found from each of the base values. + for (unsigned i = 0; i != NumUses; ++i) + if (SCEVAddExpr *AE = dyn_cast(Uses[i].Base)) { + std::vector NewOps; + + // Remove all of the values that are now in SubExpressionUseCounts. + for (unsigned j = 0, e = AE->getNumOperands(); j != e; ++j) + if (!SubExpressionUseCounts.count(AE->getOperand(j))) + NewOps.push_back(AE->getOperand(j)); + Uses[i].Base = SCEVAddExpr::get(NewOps); + } else { + // If the base is zero (which is common), return zero now, there are no + // CSEs we can find. + assert(Uses[i].Base == Result); + Uses[i].Base = Zero; + } + + return Result; +} + + /// StrengthReduceStridedIVUsers - Strength reduce all of the users of a single /// stride of IV. All of the users may have different starting values, and this /// may not be the only stride (we know it is if isOnlyStride is true). @@ -578,25 +646,19 @@ "Base value is not loop invariant!"); } - SCEVExpander Rewriter(*SE, *LI); - SCEVExpander PreheaderRewriter(*SE, *LI); - - BasicBlock *Preheader = L->getLoopPreheader(); - Instruction *PreInsertPt = Preheader->getTerminator(); - Instruction *PhiInsertBefore = L->getHeader()->begin(); - - assert(isa(PhiInsertBefore) && - "How could this loop have IV's without any phis?"); - PHINode *SomeLoopPHI = cast(PhiInsertBefore); - assert(SomeLoopPHI->getNumIncomingValues() == 2 && - "This loop isn't canonicalized right"); - BasicBlock *LatchBlock = - SomeLoopPHI->getIncomingBlock(SomeLoopPHI->getIncomingBlock(0) == Preheader); - - + // We now have a whole bunch of uses of like-strided induction variables, but + // they might all have different bases. We want to emit one PHI node for this + // stride which we fold as many common expressions (between the IVs) into as + // possible. Start by identifying the common expressions in the base values + // for the strides (e.g. if we have "A+C+B" and "A+B+D" as our bases, find + // "A+B"), emit it to the preheader, then remove the expression from the + // UsersToProcess base values. + SCEVHandle CommonExprs = RemoveCommonExpressionsFromUseBases(UsersToProcess); + // Next, figure out what we can represent in the immediate fields of // instructions. If we can represent anything there, move it to the imm - // fields of the BasedUsers. + // fields of the BasedUsers. We do this so that it increases the commonality + // of the remaining uses. for (unsigned i = 0, e = UsersToProcess.size(); i != e; ++i) { // Addressing modes can be folded into loads and stores. Be careful that // the store is through the expression, not of the expression though. @@ -609,59 +671,95 @@ isAddress, L); } + // Now that we know what we need to do, insert the PHI node itself. + // + DEBUG(std::cerr << "INSERTING IV of STRIDE " << *Stride << " and BASE " + << *CommonExprs << " :\n"); + + SCEVExpander Rewriter(*SE, *LI); + SCEVExpander PreheaderRewriter(*SE, *LI); + BasicBlock *Preheader = L->getLoopPreheader(); + Instruction *PreInsertPt = Preheader->getTerminator(); + Instruction *PhiInsertBefore = L->getHeader()->begin(); - DEBUG(std::cerr << "INSERTING IVs of STRIDE " << *Stride << ":\n"); + assert(isa(PhiInsertBefore) && + "How could this loop have IV's without any phis?"); + PHINode *SomeLoopPHI = cast(PhiInsertBefore); + assert(SomeLoopPHI->getNumIncomingValues() == 2 && + "This loop isn't canonicalized right"); + BasicBlock *LatchBlock = + SomeLoopPHI->getIncomingBlock(SomeLoopPHI->getIncomingBlock(0) == Preheader); + // Create a new Phi for this base, and stick it in the loop header. + const Type *ReplacedTy = CommonExprs->getType(); + PHINode *NewPHI = new PHINode(ReplacedTy, "iv.", PhiInsertBefore); + ++NumInserted; + + // Emit the initial base value into the loop preheader, and add it to the + // Phi node. + Value *PHIBaseV = PreheaderRewriter.expandCodeFor(CommonExprs, PreInsertPt, + ReplacedTy); + NewPHI->addIncoming(PHIBaseV, Preheader); + + // Emit the increment of the base value before the terminator of the loop + // latch block, and add it to the Phi node. + SCEVHandle IncExp = SCEVAddExpr::get(SCEVUnknown::get(NewPHI), + SCEVUnknown::get(Stride)); + + Value *IncV = Rewriter.expandCodeFor(IncExp, LatchBlock->getTerminator(), + ReplacedTy); + IncV->setName(NewPHI->getName()+".inc"); + NewPHI->addIncoming(IncV, LatchBlock); + // Sort by the base value, so that all IVs with identical bases are next to - // each other. + // each other. std::sort(UsersToProcess.begin(), UsersToProcess.end()); while (!UsersToProcess.empty()) { SCEVHandle Base = UsersToProcess.front().Base; - DEBUG(std::cerr << " INSERTING PHI with BASE = " << *Base << ":\n"); + DEBUG(std::cerr << " INSERTING code for BASE = " << *Base << ":\n"); - // Create a new Phi for this base, and stick it in the loop header. - const Type *ReplacedTy = Base->getType(); - PHINode *NewPHI = new PHINode(ReplacedTy, "iv.", PhiInsertBefore); - ++NumInserted; - - // Emit the initial base value into the loop preheader, and add it to the - // Phi node. + // Emit the code for Base into the preheader. Value *BaseV = PreheaderRewriter.expandCodeFor(Base, PreInsertPt, ReplacedTy); - NewPHI->addIncoming(BaseV, Preheader); - - // Emit the increment of the base value before the terminator of the loop - // latch block, and add it to the Phi node. - SCEVHandle Inc = SCEVAddExpr::get(SCEVUnknown::get(NewPHI), - SCEVUnknown::get(Stride)); - - Value *IncV = Rewriter.expandCodeFor(Inc, LatchBlock->getTerminator(), - ReplacedTy); - IncV->setName(NewPHI->getName()+".inc"); - NewPHI->addIncoming(IncV, LatchBlock); - + + // If BaseV is a constant other than 0, make sure that it gets inserted into + // the preheader, instead of being forward substituted into the uses. We do + // this by forcing a noop cast to be inserted into the preheader in this + // case. + if (Constant *C = dyn_cast(BaseV)) + if (!C->isNullValue()) { + // We want this constant emitted into the preheader! + BaseV = new CastInst(BaseV, BaseV->getType(), "preheaderinsert", + PreInsertPt); + } + // Emit the code to add the immediate offset to the Phi value, just before // the instructions that we identified as using this stride and base. while (!UsersToProcess.empty() && UsersToProcess.front().Base == Base) { BasedUser &User = UsersToProcess.front(); - // Clear the SCEVExpander's expression map so that we are guaranteed - // to have the code emitted where we expect it. - Rewriter.clear(); - - // Now that we know what we need to do, insert code before User for the - // immediate and any loop-variant expressions. - Value *NewBase = NewPHI; - // If this instruction wants to use the post-incremented value, move it // after the post-inc and use its value instead of the PHI. + Value *RewriteOp = NewPHI; if (User.isUseOfPostIncrementedValue) { - NewBase = IncV; + RewriteOp = IncV; User.Inst->moveBefore(LatchBlock->getTerminator()); } - User.RewriteInstructionToUseNewBase(NewBase, Rewriter); + SCEVHandle RewriteExpr = SCEVUnknown::get(RewriteOp); + + // Clear the SCEVExpander's expression map so that we are guaranteed + // to have the code emitted where we expect it. + Rewriter.clear(); + + // Now that we know what we need to do, insert code before User for the + // immediate and any loop-variant expressions. + if (!isa(BaseV) || !cast(BaseV)->isNullValue()) + // Add BaseV to the PHI value if needed. + RewriteExpr = SCEVAddExpr::get(RewriteExpr, SCEVUnknown::get(BaseV)); + + User.RewriteInstructionToUseNewBase(RewriteExpr, Rewriter); // Mark old value we replaced as possibly dead, so that it is elminated // if we just replaced the last use of that value. @@ -782,6 +880,8 @@ // If we only have one stride, we can more aggressively eliminate some things. bool HasOneStride = IVUsesByStride.size() == 1; + // Note: this processes each stride/type pair individually. All users passed + // into StrengthReduceStridedIVUsers have the same type AND stride. for (std::map::iterator SI = IVUsesByStride.begin(), E = IVUsesByStride.end(); SI != E; ++SI) StrengthReduceStridedIVUsers(SI->first, SI->second, L, HasOneStride); From lattner at cs.uiuc.edu Mon Aug 8 19:19:55 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 8 Aug 2005 19:19:55 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/LoopStrengthReduce/share_ivs.ll Message-ID: <200508090019.TAA18825@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/LoopStrengthReduce: share_ivs.ll updated: 1.1 -> 1.2 --- Log message: This is now implemented --- Diffs of the changes: (+0 -2) share_ivs.ll | 2 -- 1 files changed, 2 deletions(-) Index: llvm/test/Regression/Transforms/LoopStrengthReduce/share_ivs.ll diff -u llvm/test/Regression/Transforms/LoopStrengthReduce/share_ivs.ll:1.1 llvm/test/Regression/Transforms/LoopStrengthReduce/share_ivs.ll:1.2 --- llvm/test/Regression/Transforms/LoopStrengthReduce/share_ivs.ll:1.1 Mon Aug 8 01:23:47 2005 +++ llvm/test/Regression/Transforms/LoopStrengthReduce/share_ivs.ll Mon Aug 8 19:19:44 2005 @@ -4,8 +4,6 @@ ; loop invariant value (B) added to it inside of the loop, instead of having ; a whole indvar based on B for it. -; XFAIL: * - declare bool %cond(uint) void %test(uint %B) { From lattner at cs.uiuc.edu Mon Aug 8 20:13:58 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 8 Aug 2005 20:13:58 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Message-ID: <200508090113.UAA19288@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: LoopStrengthReduce.cpp updated: 1.43 -> 1.44 --- Log message: SCEVAddExpr::get() of an empty list is invalid. --- Diffs of the changes: (+4 -1) LoopStrengthReduce.cpp | 5 ++++- 1 files changed, 4 insertions(+), 1 deletion(-) Index: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp diff -u llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.43 llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.44 --- llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.43 Mon Aug 8 19:18:09 2005 +++ llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Mon Aug 8 20:13:47 2005 @@ -608,7 +608,10 @@ for (unsigned j = 0, e = AE->getNumOperands(); j != e; ++j) if (!SubExpressionUseCounts.count(AE->getOperand(j))) NewOps.push_back(AE->getOperand(j)); - Uses[i].Base = SCEVAddExpr::get(NewOps); + if (NewOps.size() == 0) + Uses[i].Base = Zero; + else + Uses[i].Base = SCEVAddExpr::get(NewOps); } else { // If the base is zero (which is common), return zero now, there are no // CSEs we can find. From lattner at cs.uiuc.edu Tue Aug 9 13:07:58 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 9 Aug 2005 13:07:58 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/Generic/div-neg-power-2.ll Message-ID: <200508091807.NAA28310@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/Generic: div-neg-power-2.ll added (r1.1) --- Log message: new reg test for a failure last night on ppc/darwin --- Diffs of the changes: (+6 -0) div-neg-power-2.ll | 6 ++++++ 1 files changed, 6 insertions(+) Index: llvm/test/Regression/CodeGen/Generic/div-neg-power-2.ll diff -c /dev/null llvm/test/Regression/CodeGen/Generic/div-neg-power-2.ll:1.1 *** /dev/null Tue Aug 9 13:07:55 2005 --- llvm/test/Regression/CodeGen/Generic/div-neg-power-2.ll Tue Aug 9 13:07:45 2005 *************** *** 0 **** --- 1,6 ---- + ; RUN: llvm-as < %s | llc + + int %test(int %X) { + %Y = div int %X, -2 + ret int %Y + } From lattner at cs.uiuc.edu Tue Aug 9 13:08:52 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 9 Aug 2005 13:08:52 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Message-ID: <200508091808.NAA28372@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPC32ISelPattern.cpp updated: 1.124 -> 1.125 --- Log message: Fix CodeGen/Generic/div-neg-power-2.ll, a regression from last night. --- Diffs of the changes: (+2 -0) PPC32ISelPattern.cpp | 2 ++ 1 files changed, 2 insertions(+) Index: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp diff -u llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.124 llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.125 --- llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.124 Mon Aug 8 17:22:56 2005 +++ llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Tue Aug 9 13:08:41 2005 @@ -1871,6 +1871,8 @@ return Result; } else if ((signed)Tmp3 < 0 && isPowerOf2_32(-Tmp3)) { Tmp3 = Log2_32(-Tmp3); + Tmp2 = SelectExpr(N.getOperand(0)); + Tmp1 = MakeReg(MVT::i32); unsigned Tmp4 = MakeReg(MVT::i32); BuildMI(BB, PPC::SRAWI, 2, Tmp1).addReg(Tmp2).addImm(Tmp3); BuildMI(BB, PPC::ADDZE, 1, Tmp4).addReg(Tmp1); From lattner at cs.uiuc.edu Tue Aug 9 13:30:06 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 9 Aug 2005 13:30:06 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Message-ID: <200508091830.NAA28744@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPC32ISelPattern.cpp updated: 1.125 -> 1.126 --- Log message: Minor cleanup patch, no functionality changes. Written by Jim Laskey. --- Diffs of the changes: (+19 -19) PPC32ISelPattern.cpp | 38 +++++++++++++++++++------------------- 1 files changed, 19 insertions(+), 19 deletions(-) Index: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp diff -u llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.125 llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.126 --- llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.125 Tue Aug 9 13:08:41 2005 +++ llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Tue Aug 9 13:29:55 2005 @@ -635,13 +635,13 @@ return false; } -// isImmediate - This method tests to see if a constant operand. +// isIntImmediate - This method tests to see if a constant operand. // If so Imm will receive the 32 bit value. -static bool isImmediate(SDOperand N, unsigned& Imm) { +static bool isIntImmediate(SDOperand N, unsigned& Imm) { // test for constant - if (N.getOpcode() == ISD::Constant) { + if (ConstantSDNode *CN = dyn_cast(N)) { // retrieve value - Imm = (unsigned)cast(N)->getSignExtended(); + Imm = (unsigned)CN->getSignExtended(); // passes muster return true; } @@ -654,14 +654,14 @@ static bool isOprShiftImm(SDOperand N, unsigned& Opc, unsigned& SH) { Opc = N.getOpcode(); return (Opc == ISD::SHL || Opc == ISD::SRL || Opc == ISD::SRA) && - isImmediate(N.getOperand(1), SH) && SH < 32; + isIntImmediate(N.getOperand(1), SH) && SH < 32; } // isOprNot - Returns true if the specified operand is an xor with immediate -1. static bool isOprNot(SDOperand N) { unsigned Imm; return N.getOpcode() == ISD::XOR && - isImmediate(N.getOperand(1), Imm) && (signed)Imm == -1; + isIntImmediate(N.getOperand(1), Imm) && (signed)Imm == -1; } // Immediate constant composers. @@ -1079,7 +1079,7 @@ unsigned ISel::FoldIfWideZeroExtend(SDOperand N) { unsigned C, MB, ME; if (N.getOpcode() == ISD::AND && - isImmediate(N.getOperand(1), C) && isRunOfOnes(C, MB, ME) && + isIntImmediate(N.getOperand(1), C) && isRunOfOnes(C, MB, ME) && MB <= 26 && ME == 31) return SelectExpr(N.getOperand(0)); else @@ -1103,7 +1103,7 @@ Idx = getCRIdxForSetCC(SetCC->getCondition(), Inv); // Use U to determine whether the SETCC immediate range is signed or not. - if (isImmediate(SetCC->getOperand(1), Tmp2) && + if (isIntImmediate(SetCC->getOperand(1), Tmp2) && ((U && isUInt16(Tmp2)) || (!U && isInt16(Tmp2)))) { Tmp2 = Lo16(Tmp2); // For comparisons against zero, we can implicity set CR0 if a recording @@ -1192,7 +1192,7 @@ unsigned imm = 0, opcode = N.getOpcode(); if (N.getOpcode() == ISD::ADD) { bool isFrame = N.getOperand(0).getOpcode() == ISD::FrameIndex; - if (isImmediate(N.getOperand(1), imm) && isInt16(imm)) { + if (isIntImmediate(N.getOperand(1), imm) && isInt16(imm)) { offset = Lo16(imm); if (isFrame) { ++FrameOff; @@ -1636,7 +1636,7 @@ return Result; } Tmp1 = SelectExpr(N.getOperand(0)); - if (isImmediate(N.getOperand(1), Tmp2)) { + if (isIntImmediate(N.getOperand(1), Tmp2)) { Tmp3 = HA16(Tmp2); Tmp2 = Lo16(Tmp2); if (Tmp2 && Tmp3) { @@ -1656,7 +1656,7 @@ return Result; case ISD::AND: - if (isImmediate(N.getOperand(1), Tmp2)) { + if (isIntImmediate(N.getOperand(1), Tmp2)) { if (isShiftedMask_32(Tmp2) || isShiftedMask_32(~Tmp2)) { unsigned SH, MB, ME; Opc = Recording ? PPC::RLWINMo : PPC::RLWINM; @@ -1707,7 +1707,7 @@ return Result; Tmp1 = SelectExpr(N.getOperand(0)); - if (isImmediate(N.getOperand(1), Tmp2)) { + if (isIntImmediate(N.getOperand(1), Tmp2)) { Tmp3 = Hi16(Tmp2); Tmp2 = Lo16(Tmp2); if (Tmp2 && Tmp3) { @@ -1730,7 +1730,7 @@ case ISD::XOR: { // Check for EQV: xor, (xor a, -1), b if (N.getOperand(0).getOpcode() == ISD::XOR && - isImmediate(N.getOperand(0).getOperand(1), Tmp2) && + isIntImmediate(N.getOperand(0).getOperand(1), Tmp2) && (signed)Tmp2 == -1) { Tmp1 = SelectExpr(N.getOperand(0).getOperand(0)); Tmp2 = SelectExpr(N.getOperand(1)); @@ -1763,7 +1763,7 @@ return Result; } Tmp1 = SelectExpr(N.getOperand(0)); - if (isImmediate(N.getOperand(1), Tmp2)) { + if (isIntImmediate(N.getOperand(1), Tmp2)) { Tmp3 = Hi16(Tmp2); Tmp2 = Lo16(Tmp2); if (Tmp2 && Tmp3) { @@ -1810,11 +1810,11 @@ BuildMI(BB, Opc, 2, Result).addReg(Tmp1).addReg(Tmp2); return Result; } - if (isImmediate(N.getOperand(0), Tmp1) && isInt16(Tmp1)) { + if (isIntImmediate(N.getOperand(0), Tmp1) && isInt16(Tmp1)) { Tmp2 = SelectExpr(N.getOperand(1)); BuildMI(BB, PPC::SUBFIC, 2, Result).addReg(Tmp2).addSImm(Tmp1); return Result; - } else if (isImmediate(N.getOperand(1), Tmp2)) { + } else if (isIntImmediate(N.getOperand(1), Tmp2)) { Tmp1 = SelectExpr(N.getOperand(0)); Tmp2 = -Tmp2; Tmp3 = HA16(Tmp2); @@ -1837,7 +1837,7 @@ case ISD::MUL: Tmp1 = SelectExpr(N.getOperand(0)); - if (isImmediate(N.getOperand(1), Tmp2) && isInt16(Tmp2)) { + if (isIntImmediate(N.getOperand(1), Tmp2) && isInt16(Tmp2)) { Tmp2 = Lo16(Tmp2); BuildMI(BB, PPC::MULLI, 2, Result).addReg(Tmp1).addSImm(Tmp2); } else { @@ -1861,7 +1861,7 @@ return Result; case ISD::SDIV: - if (isImmediate(N.getOperand(1), Tmp3)) { + if (isIntImmediate(N.getOperand(1), Tmp3)) { if ((signed)Tmp3 > 0 && isPowerOf2_32(Tmp3)) { Tmp3 = Log2_32(Tmp3); Tmp1 = MakeReg(MVT::i32); @@ -1884,7 +1884,7 @@ case ISD::UDIV: // If this is a divide by constant, we can emit code using some magic // constants to implement it as a multiply instead. - if (isImmediate(N.getOperand(1), Tmp3)) { + if (isIntImmediate(N.getOperand(1), Tmp3)) { if (opcode == ISD::SDIV) { if ((signed)Tmp3 < -1 || (signed)Tmp3 > 1) { ExprMap.erase(N); From lattner at cs.uiuc.edu Tue Aug 9 15:19:45 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 9 Aug 2005 15:19:45 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAG.h SelectionDAGNodes.h Message-ID: <200508092019.PAA30068@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: SelectionDAG.h updated: 1.30 -> 1.31 SelectionDAGNodes.h updated: 1.45 -> 1.46 --- Log message: Eliminate the SetCCSDNode in favor of a CondCodeSDNode class. This pulls the CC out of the SetCC operation, making SETCC a standard ternary operation and CC's a standard DAG leaf. This will make it possible for other node to use CC's as operands in the future... --- Diffs of the changes: (+26 -17) SelectionDAG.h | 23 ++++++++++++++++------- SelectionDAGNodes.h | 20 ++++++++++---------- 2 files changed, 26 insertions(+), 17 deletions(-) Index: llvm/include/llvm/CodeGen/SelectionDAG.h diff -u llvm/include/llvm/CodeGen/SelectionDAG.h:1.30 llvm/include/llvm/CodeGen/SelectionDAG.h:1.31 --- llvm/include/llvm/CodeGen/SelectionDAG.h:1.30 Sat Jul 9 20:55:14 2005 +++ llvm/include/llvm/CodeGen/SelectionDAG.h Tue Aug 9 15:19:34 2005 @@ -152,9 +152,7 @@ return NN; } - - SDOperand getSetCC(ISD::CondCode, MVT::ValueType VT, - SDOperand LHS, SDOperand RHS); + SDOperand getCondCode(ISD::CondCode Cond); /// getZeroExtendInReg - Return the expression required to zero extend the Op /// value assuming it was the smaller SrcTy value. @@ -178,7 +176,14 @@ SDOperand getNode(unsigned Opcode, std::vector &ResultTys, std::vector &Ops); - + /// getSetCC - Helper function to make it easier to build SetCC's if you just + /// have an ISD::CondCode instead of an SDOperand. + /// + SDOperand getSetCC(MVT::ValueType VT, SDOperand LHS, SDOperand RHS, + ISD::CondCode Cond) { + return getNode(ISD::SETCC, VT, LHS, RHS, getCondCode(Cond)); + } + /// getLoad - Loads are not normal binary operators: their result type is not /// determined by their operands, and they produce a value AND a token chain. /// @@ -199,16 +204,20 @@ private: void DeleteNodeIfDead(SDNode *N, void *NodeSet); + + // Try to simplify a setcc built with the specified operands and cc. If + // unable to simplify it, return a null SDOperand. + SDOperand SimplfySetCC(MVT::ValueType VT, SDOperand N1, + SDOperand N2, ISD::CondCode Cond); + // Maps to auto-CSE operations. std::map >, SDNode *> UnaryOps; std::map >, SDNode *> BinaryOps; - std::map, - std::pair >, - SetCCSDNode*> SetCCs; + std::vector CondCodeNodes; std::map >, SDNode *> Loads; Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.45 llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.46 --- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.45 Wed Jul 27 00:53:43 2005 +++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h Tue Aug 9 15:19:34 2005 @@ -55,7 +55,7 @@ // Various leaf nodes. Constant, ConstantFP, GlobalAddress, FrameIndex, ConstantPool, - BasicBlock, ExternalSymbol, VALUETYPE, + BasicBlock, ExternalSymbol, VALUETYPE, CONDCODE, // CopyToReg - This node has chain and child nodes, and an associated // register number. The instruction selector must guarantee that the value @@ -107,9 +107,9 @@ SELECT, // SetCC operator - This evaluates to a boolean (i1) true value if the - // condition is true. These nodes are instances of the - // SetCCSDNode class, which contains the condition code as extra - // state. + // condition is true. The operands to this are the left and right operands + // to compare (ops #0, and #1) and the condition code to compare them with + // (op #2) as a CondCodeSDNode. SETCC, // ADD_PARTS/SUB_PARTS - These operators take two logical operands which are @@ -827,20 +827,20 @@ } }; -class SetCCSDNode : public SDNode { +class CondCodeSDNode : public SDNode { ISD::CondCode Condition; protected: friend class SelectionDAG; - SetCCSDNode(ISD::CondCode Cond, SDOperand LHS, SDOperand RHS) - : SDNode(ISD::SETCC, LHS, RHS), Condition(Cond) { + CondCodeSDNode(ISD::CondCode Cond) + : SDNode(ISD::CONDCODE, MVT::Other), Condition(Cond) { } public: - ISD::CondCode getCondition() const { return Condition; } + ISD::CondCode get() const { return Condition; } - static bool classof(const SetCCSDNode *) { return true; } + static bool classof(const CondCodeSDNode *) { return true; } static bool classof(const SDNode *N) { - return N->getOpcode() == ISD::SETCC; + return N->getOpcode() == ISD::CONDCODE; } }; From lattner at cs.uiuc.edu Tue Aug 9 15:20:30 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 9 Aug 2005 15:20:30 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp SelectionDAG.cpp SelectionDAGISel.cpp Message-ID: <200508092020.PAA30136@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: LegalizeDAG.cpp updated: 1.155 -> 1.156 SelectionDAG.cpp updated: 1.129 -> 1.130 SelectionDAGISel.cpp updated: 1.67 -> 1.68 --- Log message: Eliminate the SetCCSDNode in favor of a CondCodeSDNode class. This pulls the CC out of the SetCC operation, making SETCC a standard ternary operation and CC's a standard DAG leaf. This will make it possible for other node to use CC's as operands in the future... --- Diffs of the changes: (+185 -175) LegalizeDAG.cpp | 86 ++++++++-------- SelectionDAG.cpp | 266 ++++++++++++++++++++++++++------------------------- SelectionDAGISel.cpp | 8 - 3 files changed, 185 insertions(+), 175 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.155 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.156 --- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.155 Fri Aug 5 13:10:27 2005 +++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Tue Aug 9 15:20:18 2005 @@ -163,10 +163,9 @@ MVT::ValueType DestVT) { SDOperand Tmp1 = DAG.getNode(ISD::SINT_TO_FP, DestVT, Op0); - SDOperand SignSet = DAG.getSetCC(ISD::SETLT, TLI.getSetCCResultTy(), - Op0, - DAG.getConstant(0, - Op0.getValueType())); + SDOperand SignSet = DAG.getSetCC(TLI.getSetCCResultTy(), Op0, + DAG.getConstant(0, Op0.getValueType()), + ISD::SETLT); SDOperand Zero = getIntPtrConstant(0), Four = getIntPtrConstant(4); SDOperand CstOffset = DAG.getNode(ISD::SELECT, Zero.getValueType(), SignSet, Four, Zero); @@ -945,8 +944,8 @@ Tmp1 = LegalizeOp(Node->getOperand(0)); // LHS Tmp2 = LegalizeOp(Node->getOperand(1)); // RHS if (Tmp1 != Node->getOperand(0) || Tmp2 != Node->getOperand(1)) - Result = DAG.getSetCC(cast(Node)->getCondition(), - Node->getValueType(0), Tmp1, Tmp2); + Result = DAG.getNode(ISD::SETCC, Node->getValueType(0), Tmp1, Tmp2, + Node->getOperand(2)); break; case Promote: Tmp1 = PromoteOp(Node->getOperand(0)); // LHS @@ -961,7 +960,7 @@ // that we could insert sign extends for ALL conditions, but zero extend // is cheaper on many machines (an AND instead of two shifts), so prefer // it. - switch (cast(Node)->getCondition()) { + switch (cast(Node->getOperand(2))->get()) { default: assert(0 && "Unknown integer comparison!"); case ISD::SETEQ: case ISD::SETNE: @@ -987,14 +986,14 @@ } } - Result = DAG.getSetCC(cast(Node)->getCondition(), - Node->getValueType(0), Tmp1, Tmp2); + Result = DAG.getNode(ISD::SETCC, Node->getValueType(0), Tmp1, Tmp2, + Node->getOperand(2)); break; case Expand: SDOperand LHSLo, LHSHi, RHSLo, RHSHi; ExpandOp(Node->getOperand(0), LHSLo, LHSHi); ExpandOp(Node->getOperand(1), RHSLo, RHSHi); - switch (cast(Node)->getCondition()) { + switch (cast(Node->getOperand(2))->get()) { case ISD::SETEQ: case ISD::SETNE: if (RHSLo == RHSHi) @@ -1002,32 +1001,32 @@ if (RHSCST->isAllOnesValue()) { // Comparison to -1. Tmp1 = DAG.getNode(ISD::AND, LHSLo.getValueType(), LHSLo, LHSHi); - Result = DAG.getSetCC(cast(Node)->getCondition(), - Node->getValueType(0), Tmp1, RHSLo); + Result = DAG.getNode(ISD::SETCC, Node->getValueType(0), Tmp1, + RHSLo, Node->getOperand(2)); break; } Tmp1 = DAG.getNode(ISD::XOR, LHSLo.getValueType(), LHSLo, RHSLo); Tmp2 = DAG.getNode(ISD::XOR, LHSLo.getValueType(), LHSHi, RHSHi); Tmp1 = DAG.getNode(ISD::OR, Tmp1.getValueType(), Tmp1, Tmp2); - Result = DAG.getSetCC(cast(Node)->getCondition(), - Node->getValueType(0), Tmp1, - DAG.getConstant(0, Tmp1.getValueType())); + Result = DAG.getNode(ISD::SETCC, Node->getValueType(0), Tmp1, + DAG.getConstant(0, Tmp1.getValueType()), + Node->getOperand(2)); break; default: // If this is a comparison of the sign bit, just look at the top part. // X > -1, x < 0 if (ConstantSDNode *CST = dyn_cast(Node->getOperand(1))) - if ((cast(Node)->getCondition() == ISD::SETLT && + if ((cast(Node->getOperand(2))->get() == ISD::SETLT && CST->getValue() == 0) || // X < 0 - (cast(Node)->getCondition() == ISD::SETGT && + (cast(Node->getOperand(2))->get() == ISD::SETGT && (CST->isAllOnesValue()))) // X > -1 - return DAG.getSetCC(cast(Node)->getCondition(), - Node->getValueType(0), LHSHi, RHSHi); + return DAG.getNode(ISD::SETCC, Node->getValueType(0), LHSHi, RHSHi, + Node->getOperand(2)); // FIXME: This generated code sucks. ISD::CondCode LowCC; - switch (cast(Node)->getCondition()) { + switch (cast(Node->getOperand(2))->get()) { default: assert(0 && "Unknown integer setcc!"); case ISD::SETLT: case ISD::SETULT: LowCC = ISD::SETULT; break; @@ -1045,10 +1044,10 @@ // NOTE: on targets without efficient SELECT of bools, we can always use // this identity: (B1 ? B2 : B3) --> (B1 & B2)|(!B1&B3) - Tmp1 = DAG.getSetCC(LowCC, Node->getValueType(0), LHSLo, RHSLo); - Tmp2 = DAG.getSetCC(cast(Node)->getCondition(), - Node->getValueType(0), LHSHi, RHSHi); - Result = DAG.getSetCC(ISD::SETEQ, Node->getValueType(0), LHSHi, RHSHi); + Tmp1 = DAG.getSetCC(Node->getValueType(0), LHSLo, RHSLo, LowCC); + Tmp2 = DAG.getNode(ISD::SETCC, Node->getValueType(0), LHSHi, RHSHi, + Node->getOperand(2)); + Result = DAG.getSetCC(Node->getValueType(0), LHSHi, RHSHi, ISD::SETEQ); Result = DAG.getNode(ISD::SELECT, Tmp1.getValueType(), Result, Tmp1, Tmp2); break; @@ -1348,8 +1347,9 @@ break; case ISD::CTTZ: //if Tmp1 == sizeinbits(NVT) then Tmp1 = sizeinbits(Old VT) - Tmp2 = DAG.getSetCC(ISD::SETEQ, TLI.getSetCCResultTy(), Tmp1, - DAG.getConstant(getSizeInBits(NVT), NVT)); + Tmp2 = DAG.getSetCC(TLI.getSetCCResultTy(), Tmp1, + DAG.getConstant(getSizeInBits(NVT), NVT), + ISD::SETEQ); Result = DAG.getNode(ISD::SELECT, NVT, Tmp2, DAG.getConstant(getSizeInBits(OVT),NVT), Tmp1); break; @@ -1469,7 +1469,7 @@ // Expand Y = FABS(X) -> Y = (X >u 0.0) ? X : fneg(X). MVT::ValueType VT = Node->getValueType(0); Tmp2 = DAG.getConstantFP(0.0, VT); - Tmp2 = DAG.getSetCC(ISD::SETUGT, TLI.getSetCCResultTy(), Tmp1, Tmp2); + Tmp2 = DAG.getSetCC(TLI.getSetCCResultTy(), Tmp1, Tmp2, ISD::SETUGT); Tmp3 = DAG.getNode(ISD::FNEG, VT, Tmp1); Result = DAG.getNode(ISD::SELECT, VT, Tmp2, Tmp1, Tmp3); Result = LegalizeOp(Result); @@ -1764,9 +1764,8 @@ case ISD::SETCC: assert(getTypeAction(TLI.getSetCCResultTy()) == Legal && "SetCC type is not legal??"); - Result = DAG.getSetCC(cast(Node)->getCondition(), - TLI.getSetCCResultTy(), Node->getOperand(0), - Node->getOperand(1)); + Result = DAG.getNode(ISD::SETCC, TLI.getSetCCResultTy(),Node->getOperand(0), + Node->getOperand(1), Node->getOperand(2)); Result = LegalizeOp(Result); break; @@ -2038,8 +2037,8 @@ break; case ISD::CTTZ: //if Tmp1 == sizeinbits(NVT) then Tmp1 = sizeinbits(Old VT) - Tmp2 = DAG.getSetCC(ISD::SETEQ, MVT::i1, Tmp1, - DAG.getConstant(getSizeInBits(NVT), NVT)); + Tmp2 = DAG.getSetCC(MVT::i1, Tmp1, + DAG.getConstant(getSizeInBits(NVT), NVT), ISD::SETEQ); Result = DAG.getNode(ISD::SELECT, NVT, Tmp2, DAG.getConstant(getSizeInBits(VT),NVT), Tmp1); break; @@ -2216,8 +2215,8 @@ DAG.getConstant(NVTBits, ShTy), ShAmt); // Compare the unmasked shift amount against 32. - SDOperand Cond = DAG.getSetCC(ISD::SETGE, TLI.getSetCCResultTy(), ShAmt, - DAG.getConstant(NVTBits, ShTy)); + SDOperand Cond = DAG.getSetCC(TLI.getSetCCResultTy(), ShAmt, + DAG.getConstant(NVTBits, ShTy), ISD::SETGE); if (TLI.getShiftAmountFlavor() != TargetLowering::Mask) { ShAmt = DAG.getNode(ISD::AND, ShTy, ShAmt, // ShAmt &= 31 @@ -2236,9 +2235,9 @@ Lo = DAG.getNode(ISD::SELECT, NVT, Cond, DAG.getConstant(0, NVT), T2); } else { SDOperand HiLoPart = DAG.getNode(ISD::SELECT, NVT, - DAG.getSetCC(ISD::SETEQ, - TLI.getSetCCResultTy(), NAmt, - DAG.getConstant(32, ShTy)), + DAG.getSetCC(TLI.getSetCCResultTy(), NAmt, + DAG.getConstant(32, ShTy), + ISD::SETEQ), DAG.getConstant(0, NVT), DAG.getNode(ISD::SHL, NVT, InH, NAmt)); SDOperand T1 = DAG.getNode(ISD::OR, NVT,// T1 = (Hi << NAmt) | (Lo >> Amt) @@ -2468,8 +2467,9 @@ SDOperand SignedConv = ExpandIntToFP(true, DestTy, DAG.getNode(ISD::BUILD_PAIR, Source.getValueType(), Lo, Hi)); - SDOperand SignSet = DAG.getSetCC(ISD::SETLT, TLI.getSetCCResultTy(), Hi, - DAG.getConstant(0, Hi.getValueType())); + SDOperand SignSet = DAG.getSetCC(TLI.getSetCCResultTy(), Hi, + DAG.getConstant(0, Hi.getValueType()), + ISD::SETLT); SDOperand Zero = getIntPtrConstant(0), Four = getIntPtrConstant(4); SDOperand CstOffset = DAG.getNode(ISD::SELECT, Zero.getValueType(), SignSet, Four, Zero); @@ -2627,8 +2627,8 @@ ExpandOp(Node->getOperand(0), Lo, Hi); SDOperand BitsC = DAG.getConstant(MVT::getSizeInBits(NVT), NVT); SDOperand HLZ = DAG.getNode(ISD::CTLZ, NVT, Hi); - SDOperand TopNotZero = DAG.getSetCC(ISD::SETNE, TLI.getSetCCResultTy(), - HLZ, BitsC); + SDOperand TopNotZero = DAG.getSetCC(TLI.getSetCCResultTy(), HLZ, BitsC, + ISD::SETNE); SDOperand LowPart = DAG.getNode(ISD::CTLZ, NVT, Lo); LowPart = DAG.getNode(ISD::ADD, NVT, LowPart, BitsC); @@ -2642,8 +2642,8 @@ ExpandOp(Node->getOperand(0), Lo, Hi); SDOperand BitsC = DAG.getConstant(MVT::getSizeInBits(NVT), NVT); SDOperand LTZ = DAG.getNode(ISD::CTTZ, NVT, Lo); - SDOperand BotNotZero = DAG.getSetCC(ISD::SETNE, TLI.getSetCCResultTy(), - LTZ, BitsC); + SDOperand BotNotZero = DAG.getSetCC(TLI.getSetCCResultTy(), LTZ, BitsC, + ISD::SETNE); SDOperand HiPart = DAG.getNode(ISD::CTTZ, NVT, Hi); HiPart = DAG.getNode(ISD::ADD, NVT, HiPart, BitsC); Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.129 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.130 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.129 Sun Aug 7 00:00:44 2005 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Tue Aug 9 15:20:18 2005 @@ -50,7 +50,7 @@ // inverse of this node. static bool isInvertibleForFree(SDOperand N) { if (isa(N.Val)) return true; - if (isa(N.Val) && N.Val->hasOneUse()) + if (N.Val->getOpcode() == ISD::SETCC && N.Val->hasOneUse()) return true; return false; } @@ -197,6 +197,11 @@ ConstantFPs.erase(std::make_pair(IV, N->getValueType(0))); break; } + case ISD::CONDCODE: + assert(CondCodeNodes[cast(N)->get()] && + "Cond code doesn't exist!"); + CondCodeNodes[cast(N)->get()] = 0; + break; case ISD::GlobalAddress: GlobalValues.erase(cast(N)->getGlobal()); break; @@ -225,13 +230,6 @@ std::make_pair(N->getOperand(0), N->getValueType(0)))); break; - case ISD::SETCC: - SetCCs.erase(std::make_pair(std::make_pair(N->getOperand(0), - N->getOperand(1)), - std::make_pair( - cast(N)->getCondition(), - N->getValueType(0)))); - break; default: if (N->getNumOperands() == 1) UnaryOps.erase(std::make_pair(N->getOpcode(), @@ -377,8 +375,17 @@ return SDOperand(N, 0); } -SDOperand SelectionDAG::getSetCC(ISD::CondCode Cond, MVT::ValueType VT, - SDOperand N1, SDOperand N2) { +SDOperand SelectionDAG::getCondCode(ISD::CondCode Cond) { + if ((unsigned)Cond >= CondCodeNodes.size()) + CondCodeNodes.resize(Cond+1); + + if (CondCodeNodes[Cond] == 0) + CondCodeNodes[Cond] = new CondCodeSDNode(Cond); + return SDOperand(CondCodeNodes[Cond], 0); +} + +SDOperand SelectionDAG::SimplfySetCC(MVT::ValueType VT, SDOperand N1, + SDOperand N2, ISD::CondCode Cond) { // These setcc operations always fold. switch (Cond) { default: break; @@ -450,14 +457,14 @@ case ISD::SETUGE: case ISD::SETULT: case ISD::SETULE: - return getSetCC(Cond, VT, N1.getOperand(0), - getConstant(C2, N1.getOperand(0).getValueType())); + return getSetCC(VT, N1.getOperand(0), + getConstant(C2, N1.getOperand(0).getValueType()), + Cond); default: break; // todo, be more careful with signed comparisons } } - uint64_t MinVal, MaxVal; unsigned OperandBitSize = MVT::getSizeInBits(N2C->getValueType(0)); if (ISD::isSignedIntSetCC(Cond)) { @@ -493,16 +500,16 @@ // Canonicalize setgt X, Min --> setne X, Min if ((Cond == ISD::SETGT || Cond == ISD::SETUGT) && C2 == MinVal) - return getSetCC(ISD::SETNE, VT, N1, N2); + return getSetCC(VT, N1, N2, ISD::SETNE); // If we have setult X, 1, turn it into seteq X, 0 if ((Cond == ISD::SETLT || Cond == ISD::SETULT) && C2 == MinVal+1) - return getSetCC(ISD::SETEQ, VT, N1, - getConstant(MinVal, N1.getValueType())); + return getSetCC(VT, N1, getConstant(MinVal, N1.getValueType()), + ISD::SETEQ); // If we have setugt X, Max-1, turn it into seteq X, Max else if ((Cond == ISD::SETGT || Cond == ISD::SETUGT) && C2 == MaxVal-1) - return getSetCC(ISD::SETEQ, VT, N1, - getConstant(MaxVal, N1.getValueType())); + return getSetCC(VT, N1, getConstant(MaxVal, N1.getValueType()), + ISD::SETEQ); // If we have "setcc X, C1", check to see if we can shrink the immediate // by changing cc. @@ -510,7 +517,7 @@ // SETUGT X, SINTMAX -> SETLT X, 0 if (Cond == ISD::SETUGT && OperandBitSize != 1 && C2 == (~0ULL >> (65-OperandBitSize))) - return getSetCC(ISD::SETLT, VT, N1, getConstant(0, N2.getValueType())); + return getSetCC(VT, N1, getConstant(0, N2.getValueType()), ISD::SETLT); // FIXME: Implement the rest of these. @@ -539,7 +546,7 @@ } } else if (isa(N1.Val)) { // Ensure that the constant occurs on the RHS. - return getSetCC(ISD::getSetCCSwappedOperands(Cond), VT, N2, N1); + return getSetCC(VT, N2, N1, ISD::getSetCCSwappedOperands(Cond)); } if (ConstantFPSDNode *N1C = dyn_cast(N1.Val)) @@ -582,15 +589,15 @@ // Simplify (X+Y) == (X+Z) --> Y == Z if (N1.getOpcode() == N2.getOpcode()) { if (N1.getOperand(0) == N2.getOperand(0)) - return getSetCC(Cond, VT, N1.getOperand(1), N2.getOperand(1)); + return getSetCC(VT, N1.getOperand(1), N2.getOperand(1), Cond); if (N1.getOperand(1) == N2.getOperand(1)) - return getSetCC(Cond, VT, N1.getOperand(0), N2.getOperand(0)); + return getSetCC(VT, N1.getOperand(0), N2.getOperand(0), Cond); if (isCommutativeBinOp(N1.getOpcode())) { // If X op Y == Y op X, try other combinations. if (N1.getOperand(0) == N2.getOperand(1)) - return getSetCC(Cond, VT, N1.getOperand(1), N2.getOperand(0)); + return getSetCC(VT, N1.getOperand(1), N2.getOperand(0), Cond); if (N1.getOperand(1) == N2.getOperand(0)) - return getSetCC(Cond, VT, N1.getOperand(1), N2.getOperand(1)); + return getSetCC(VT, N1.getOperand(1), N2.getOperand(1), Cond); } } @@ -598,18 +605,19 @@ // Simplify (X+Z) == X --> Z == 0 if (N1.getOperand(0) == N2) - return getSetCC(Cond, VT, N1.getOperand(1), - getConstant(0, N1.getValueType())); + return getSetCC(VT, N1.getOperand(1), + getConstant(0, N1.getValueType()), Cond); if (N1.getOperand(1) == N2) { if (isCommutativeBinOp(N1.getOpcode())) - return getSetCC(Cond, VT, N1.getOperand(0), - getConstant(0, N1.getValueType())); + return getSetCC(VT, N1.getOperand(0), + getConstant(0, N1.getValueType()), Cond); else { assert(N1.getOpcode() == ISD::SUB && "Unexpected operation!"); // (Z-X) == X --> Z == X<<1 - return getSetCC(Cond, VT, N1.getOperand(0), + return getSetCC(VT, N1.getOperand(0), getNode(ISD::SHL, N2.getValueType(), - N2, getConstant(1, TLI.getShiftAmountTy()))); + N2, getConstant(1, TLI.getShiftAmountTy())), + Cond); } } } @@ -618,11 +626,11 @@ N2.getOpcode() == ISD::XOR) { // Simplify X == (X+Z) --> Z == 0 if (N2.getOperand(0) == N1) - return getSetCC(Cond, VT, N2.getOperand(1), - getConstant(0, N2.getValueType())); + return getSetCC(VT, N2.getOperand(1), + getConstant(0, N2.getValueType()), Cond); else if (N2.getOperand(1) == N1) - return getSetCC(Cond, VT, N2.getOperand(0), - getConstant(0, N2.getValueType())); + return getSetCC(VT, N2.getOperand(0), getConstant(0, N2.getValueType()), + Cond); } } @@ -664,14 +672,8 @@ return N1; } - - SetCCSDNode *&N = SetCCs[std::make_pair(std::make_pair(N1, N2), - std::make_pair(Cond, VT))]; - if (N) return SDOperand(N, 0); - N = new SetCCSDNode(Cond, N1, N2); - N->setValueTypes(VT); - AllNodes.push_back(N); - return SDOperand(N, 0); + // Could not fold it. + return SDOperand(); } @@ -1059,12 +1061,14 @@ case ISD::XOR: if (!C2) return N1; // X xor 0 -> X if (N2C->isAllOnesValue()) { - if (SetCCSDNode *SetCC = dyn_cast(N1.Val)){ + if (N1.Val->getOpcode() == ISD::SETCC){ + SDNode *SetCC = N1.Val; // !(X op Y) -> (X !op Y) bool isInteger = MVT::isInteger(SetCC->getOperand(0).getValueType()); - return getSetCC(ISD::getSetCCInverse(SetCC->getCondition(),isInteger), - SetCC->getValueType(0), - SetCC->getOperand(0), SetCC->getOperand(1)); + ISD::CondCode CC = cast(SetCC->getOperand(2))->get(); + return getSetCC(SetCC->getValueType(0), + SetCC->getOperand(0), SetCC->getOperand(1), + ISD::getSetCCInverse(CC, isInteger)); } else if (N1.getOpcode() == ISD::AND || N1.getOpcode() == ISD::OR) { SDNode *Op = N1.Val; // !(X or Y) -> (!X and !Y) iff X or Y are freely invertible @@ -1131,60 +1135,60 @@ case ISD::AND: case ISD::OR: - if (SetCCSDNode *LHS = dyn_cast(N1.Val)) - if (SetCCSDNode *RHS = dyn_cast(N2.Val)) { - SDOperand LL = LHS->getOperand(0), RL = RHS->getOperand(0); - SDOperand LR = LHS->getOperand(1), RR = RHS->getOperand(1); - ISD::CondCode Op2 = RHS->getCondition(); - - if (LR == RR && isa(LR) && - Op2 == LHS->getCondition() && MVT::isInteger(LL.getValueType())) { - // (X != 0) | (Y != 0) -> (X|Y != 0) - // (X == 0) & (Y == 0) -> (X|Y == 0) - // (X < 0) | (Y < 0) -> (X|Y < 0) - if (cast(LR)->getValue() == 0 && - ((Op2 == ISD::SETEQ && Opcode == ISD::AND) || - (Op2 == ISD::SETNE && Opcode == ISD::OR) || - (Op2 == ISD::SETLT && Opcode == ISD::OR))) - return getSetCC(Op2, VT, - getNode(ISD::OR, LR.getValueType(), LL, RL), LR); - - if (cast(LR)->isAllOnesValue()) { - // (X == -1) & (Y == -1) -> (X&Y == -1) - // (X != -1) | (Y != -1) -> (X&Y != -1) - // (X > -1) | (Y > -1) -> (X&Y > -1) - if ((Opcode == ISD::AND && Op2 == ISD::SETEQ) || - (Opcode == ISD::OR && Op2 == ISD::SETNE) || - (Opcode == ISD::OR && Op2 == ISD::SETGT)) - return getSetCC(Op2, VT, - getNode(ISD::AND, LR.getValueType(), LL, RL), LR); - // (X > -1) & (Y > -1) -> (X|Y > -1) - if (Opcode == ISD::AND && Op2 == ISD::SETGT) - return getSetCC(Op2, VT, - getNode(ISD::OR, LR.getValueType(), LL, RL), LR); - } + if (N1.Val->getOpcode() == ISD::SETCC && N2.Val->getOpcode() == ISD::SETCC){ + SDNode *LHS = N1.Val, *RHS = N2.Val; + SDOperand LL = LHS->getOperand(0), RL = RHS->getOperand(0); + SDOperand LR = LHS->getOperand(1), RR = RHS->getOperand(1); + ISD::CondCode Op1 = cast(LHS->getOperand(2))->get(); + ISD::CondCode Op2 = cast(RHS->getOperand(2))->get(); + + if (LR == RR && isa(LR) && + Op2 == Op1 && MVT::isInteger(LL.getValueType())) { + // (X != 0) | (Y != 0) -> (X|Y != 0) + // (X == 0) & (Y == 0) -> (X|Y == 0) + // (X < 0) | (Y < 0) -> (X|Y < 0) + if (cast(LR)->getValue() == 0 && + ((Op2 == ISD::SETEQ && Opcode == ISD::AND) || + (Op2 == ISD::SETNE && Opcode == ISD::OR) || + (Op2 == ISD::SETLT && Opcode == ISD::OR))) + return getSetCC(VT, getNode(ISD::OR, LR.getValueType(), LL, RL), LR, + Op2); + + if (cast(LR)->isAllOnesValue()) { + // (X == -1) & (Y == -1) -> (X&Y == -1) + // (X != -1) | (Y != -1) -> (X&Y != -1) + // (X > -1) | (Y > -1) -> (X&Y > -1) + if ((Opcode == ISD::AND && Op2 == ISD::SETEQ) || + (Opcode == ISD::OR && Op2 == ISD::SETNE) || + (Opcode == ISD::OR && Op2 == ISD::SETGT)) + return getSetCC(VT, getNode(ISD::AND, LR.getValueType(), LL, RL), + LR, Op2); + // (X > -1) & (Y > -1) -> (X|Y > -1) + if (Opcode == ISD::AND && Op2 == ISD::SETGT) + return getSetCC(VT, getNode(ISD::OR, LR.getValueType(), LL, RL), + LR, Op2); } + } - // (X op1 Y) | (Y op2 X) -> (X op1 Y) | (X swapop2 Y) - if (LL == RR && LR == RL) { - Op2 = ISD::getSetCCSwappedOperands(Op2); - goto MatchedBackwards; - } + // (X op1 Y) | (Y op2 X) -> (X op1 Y) | (X swapop2 Y) + if (LL == RR && LR == RL) { + Op2 = ISD::getSetCCSwappedOperands(Op2); + goto MatchedBackwards; + } - if (LL == RL && LR == RR) { - MatchedBackwards: - ISD::CondCode Result; - bool isInteger = MVT::isInteger(LL.getValueType()); - if (Opcode == ISD::OR) - Result = ISD::getSetCCOrOperation(LHS->getCondition(), Op2, - isInteger); - else - Result = ISD::getSetCCAndOperation(LHS->getCondition(), Op2, - isInteger); - if (Result != ISD::SETCC_INVALID) - return getSetCC(Result, LHS->getValueType(0), LL, LR); - } + if (LL == RL && LR == RR) { + MatchedBackwards: + ISD::CondCode Result; + bool isInteger = MVT::isInteger(LL.getValueType()); + if (Opcode == ISD::OR) + Result = ISD::getSetCCOrOperation(Op1, Op2, isInteger); + else + Result = ISD::getSetCCAndOperation(Op1, Op2, isInteger); + + if (Result != ISD::SETCC_INVALID) + return getSetCC(LHS->getValueType(0), LL, LR, Result); } + } // and/or zext(a), zext(b) -> zext(and/or a, b) if (N1.getOpcode() == ISD::ZERO_EXTEND && @@ -1348,6 +1352,12 @@ ConstantSDNode *N2C = dyn_cast(N2.Val); ConstantSDNode *N3C = dyn_cast(N3.Val); switch (Opcode) { + case ISD::SETCC: { + // Use SimplifySetCC to simplify SETCC's. + SDOperand Simp = SimplfySetCC(VT, N1, N2, cast(N3)->get()); + if (Simp.Val) return Simp; + break; + } case ISD::SELECT: if (N1C) if (N1C->getValue()) @@ -1381,20 +1391,20 @@ } // If this is a selectcc, check to see if we can simplify the result. - if (SetCCSDNode *SetCC = dyn_cast(N1)) { + if (N1.Val->getOpcode() == ISD::SETCC) { + SDNode *SetCC = N1.Val; + ISD::CondCode CC = cast(SetCC->getOperand(2))->get(); if (ConstantFPSDNode *CFP = dyn_cast(SetCC->getOperand(1))) if (CFP->getValue() == 0.0) { // Allow either -0.0 or 0.0 // select (setg[te] X, +/-0.0), X, fneg(X) -> fabs - if ((SetCC->getCondition() == ISD::SETGE || - SetCC->getCondition() == ISD::SETGT) && + if ((CC == ISD::SETGE || CC == ISD::SETGT) && N2 == SetCC->getOperand(0) && N3.getOpcode() == ISD::FNEG && N3.getOperand(0) == N2) return getNode(ISD::FABS, VT, N2); // select (setl[te] X, +/-0.0), fneg(X), X -> fabs - if ((SetCC->getCondition() == ISD::SETLT || - SetCC->getCondition() == ISD::SETLE) && + if ((CC == ISD::SETLT || CC == ISD::SETLE) && N3 == SetCC->getOperand(0) && N2.getOpcode() == ISD::FNEG && N2.getOperand(0) == N3) return getNode(ISD::FABS, VT, N3); @@ -1403,7 +1413,7 @@ if (ConstantSDNode *CN = dyn_cast(SetCC->getOperand(1))) if (CN->getValue() == 0 && N3C && N3C->getValue() == 0) - if (SetCC->getCondition() == ISD::SETLT) { + if (CC == ISD::SETLT) { MVT::ValueType XType = SetCC->getOperand(0).getValueType(); MVT::ValueType AType = N2.getValueType(); if (XType >= AType) { @@ -1680,7 +1690,8 @@ case ISD::SRA: return "sra"; case ISD::SRL: return "srl"; - case ISD::SELECT: return "select"; + case ISD::SETCC: return "setcc"; + case ISD::SELECT: return "select"; case ISD::ADD_PARTS: return "add_parts"; case ISD::SUB_PARTS: return "sub_parts"; case ISD::SHL_PARTS: return "shl_parts"; @@ -1737,32 +1748,31 @@ case ISD::READIO: return "readio"; case ISD::WRITEIO: return "writeio"; - case ISD::SETCC: - const SetCCSDNode *SetCC = cast(this); - switch (SetCC->getCondition()) { + case ISD::CONDCODE: + switch (cast(this)->get()) { default: assert(0 && "Unknown setcc condition!"); - case ISD::SETOEQ: return "setcc:setoeq"; - case ISD::SETOGT: return "setcc:setogt"; - case ISD::SETOGE: return "setcc:setoge"; - case ISD::SETOLT: return "setcc:setolt"; - case ISD::SETOLE: return "setcc:setole"; - case ISD::SETONE: return "setcc:setone"; - - case ISD::SETO: return "setcc:seto"; - case ISD::SETUO: return "setcc:setuo"; - case ISD::SETUEQ: return "setcc:setue"; - case ISD::SETUGT: return "setcc:setugt"; - case ISD::SETUGE: return "setcc:setuge"; - case ISD::SETULT: return "setcc:setult"; - case ISD::SETULE: return "setcc:setule"; - case ISD::SETUNE: return "setcc:setune"; - - case ISD::SETEQ: return "setcc:seteq"; - case ISD::SETGT: return "setcc:setgt"; - case ISD::SETGE: return "setcc:setge"; - case ISD::SETLT: return "setcc:setlt"; - case ISD::SETLE: return "setcc:setle"; - case ISD::SETNE: return "setcc:setne"; + case ISD::SETOEQ: return "setoeq"; + case ISD::SETOGT: return "setogt"; + case ISD::SETOGE: return "setoge"; + case ISD::SETOLT: return "setolt"; + case ISD::SETOLE: return "setole"; + case ISD::SETONE: return "setone"; + + case ISD::SETO: return "seto"; + case ISD::SETUO: return "setuo"; + case ISD::SETUEQ: return "setue"; + case ISD::SETUGT: return "setugt"; + case ISD::SETUGE: return "setuge"; + case ISD::SETULT: return "setult"; + case ISD::SETULE: return "setule"; + case ISD::SETUNE: return "setune"; + + case ISD::SETEQ: return "seteq"; + case ISD::SETGT: return "setgt"; + case ISD::SETGE: return "setge"; + case ISD::SETLT: return "setlt"; + case ISD::SETLE: return "setle"; + case ISD::SETNE: return "setne"; } } } Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.67 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.68 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.67 Wed Jul 27 01:12:33 2005 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Tue Aug 9 15:20:18 2005 @@ -482,7 +482,7 @@ ISD::CondCode Opcode = SignedOpcode; if (I.getOperand(0)->getType()->isUnsigned()) Opcode = UnsignedOpcode; - setValue(&I, DAG.getSetCC(Opcode, MVT::i1, Op1, Op2)); + setValue(&I, DAG.getSetCC(MVT::i1, Op1, Op2, Opcode)); } void SelectionDAGLowering::visitSelect(User &I) { @@ -504,7 +504,7 @@ // Cast to bool is a comparison against zero, not truncation to zero. SDOperand Zero = isInteger(SrcTy) ? DAG.getConstant(0, N.getValueType()) : DAG.getConstantFP(0.0, N.getValueType()); - setValue(&I, DAG.getSetCC(ISD::SETNE, MVT::i1, N, Zero)); + setValue(&I, DAG.getSetCC(MVT::i1, N, Zero, ISD::SETNE)); } else if (isInteger(SrcTy)) { if (isInteger(DestTy)) { // Int -> Int cast if (DestTy < SrcTy) // Truncating cast? @@ -738,8 +738,8 @@ return; case Intrinsic::isunordered: - setValue(&I, DAG.getSetCC(ISD::SETUO, MVT::i1,getValue(I.getOperand(1)), - getValue(I.getOperand(2)))); + setValue(&I, DAG.getSetCC(MVT::i1,getValue(I.getOperand(1)), + getValue(I.getOperand(2)), ISD::SETUO)); return; case Intrinsic::sqrt: From lattner at cs.uiuc.edu Tue Aug 9 15:21:22 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 9 Aug 2005 15:21:22 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/IA64/IA64ISelPattern.cpp Message-ID: <200508092021.PAA30210@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/IA64: IA64ISelPattern.cpp updated: 1.51 -> 1.52 --- Log message: Update the targets to the new SETCC/CondCodeSDNode interfaces. --- Diffs of the changes: (+91 -97) IA64ISelPattern.cpp | 188 +++++++++++++++++++++++++--------------------------- 1 files changed, 91 insertions(+), 97 deletions(-) Index: llvm/lib/Target/IA64/IA64ISelPattern.cpp diff -u llvm/lib/Target/IA64/IA64ISelPattern.cpp:1.51 llvm/lib/Target/IA64/IA64ISelPattern.cpp:1.52 --- llvm/lib/Target/IA64/IA64ISelPattern.cpp:1.51 Tue Aug 2 14:25:03 2005 +++ llvm/lib/Target/IA64/IA64ISelPattern.cpp Tue Aug 9 15:21:09 2005 @@ -1809,109 +1809,103 @@ case ISD::SETCC: { Tmp1 = SelectExpr(N.getOperand(0)); + ISD::CondCode CC = cast(Node->getOperand(2))->get(); + if (MVT::isInteger(N.getOperand(0).getValueType())) { - if (SetCCSDNode *SetCC = dyn_cast(Node)) { - if (MVT::isInteger(SetCC->getOperand(0).getValueType())) { - - if(ConstantSDNode *CSDN = - dyn_cast(N.getOperand(1))) { - // if we are comparing against a constant zero - if(CSDN->getValue()==0) - Tmp2 = IA64::r0; // then we can just compare against r0 - else - Tmp2 = SelectExpr(N.getOperand(1)); - } else // not comparing against a constant - Tmp2 = SelectExpr(N.getOperand(1)); - - switch (SetCC->getCondition()) { - default: assert(0 && "Unknown integer comparison!"); - case ISD::SETEQ: - BuildMI(BB, IA64::CMPEQ, 2, Result).addReg(Tmp1).addReg(Tmp2); - break; - case ISD::SETGT: - BuildMI(BB, IA64::CMPGT, 2, Result).addReg(Tmp1).addReg(Tmp2); - break; - case ISD::SETGE: - BuildMI(BB, IA64::CMPGE, 2, Result).addReg(Tmp1).addReg(Tmp2); - break; - case ISD::SETLT: - BuildMI(BB, IA64::CMPLT, 2, Result).addReg(Tmp1).addReg(Tmp2); - break; - case ISD::SETLE: - BuildMI(BB, IA64::CMPLE, 2, Result).addReg(Tmp1).addReg(Tmp2); - break; - case ISD::SETNE: - BuildMI(BB, IA64::CMPNE, 2, Result).addReg(Tmp1).addReg(Tmp2); - break; - case ISD::SETULT: - BuildMI(BB, IA64::CMPLTU, 2, Result).addReg(Tmp1).addReg(Tmp2); - break; - case ISD::SETUGT: - BuildMI(BB, IA64::CMPGTU, 2, Result).addReg(Tmp1).addReg(Tmp2); - break; - case ISD::SETULE: - BuildMI(BB, IA64::CMPLEU, 2, Result).addReg(Tmp1).addReg(Tmp2); - break; - case ISD::SETUGE: - BuildMI(BB, IA64::CMPGEU, 2, Result).addReg(Tmp1).addReg(Tmp2); - break; - } + if(ConstantSDNode *CSDN = + dyn_cast(N.getOperand(1))) { + // if we are comparing against a constant zero + if(CSDN->getValue()==0) + Tmp2 = IA64::r0; // then we can just compare against r0 + else + Tmp2 = SelectExpr(N.getOperand(1)); + } else // not comparing against a constant + Tmp2 = SelectExpr(N.getOperand(1)); + + switch (CC) { + default: assert(0 && "Unknown integer comparison!"); + case ISD::SETEQ: + BuildMI(BB, IA64::CMPEQ, 2, Result).addReg(Tmp1).addReg(Tmp2); + break; + case ISD::SETGT: + BuildMI(BB, IA64::CMPGT, 2, Result).addReg(Tmp1).addReg(Tmp2); + break; + case ISD::SETGE: + BuildMI(BB, IA64::CMPGE, 2, Result).addReg(Tmp1).addReg(Tmp2); + break; + case ISD::SETLT: + BuildMI(BB, IA64::CMPLT, 2, Result).addReg(Tmp1).addReg(Tmp2); + break; + case ISD::SETLE: + BuildMI(BB, IA64::CMPLE, 2, Result).addReg(Tmp1).addReg(Tmp2); + break; + case ISD::SETNE: + BuildMI(BB, IA64::CMPNE, 2, Result).addReg(Tmp1).addReg(Tmp2); + break; + case ISD::SETULT: + BuildMI(BB, IA64::CMPLTU, 2, Result).addReg(Tmp1).addReg(Tmp2); + break; + case ISD::SETUGT: + BuildMI(BB, IA64::CMPGTU, 2, Result).addReg(Tmp1).addReg(Tmp2); + break; + case ISD::SETULE: + BuildMI(BB, IA64::CMPLEU, 2, Result).addReg(Tmp1).addReg(Tmp2); + break; + case ISD::SETUGE: + BuildMI(BB, IA64::CMPGEU, 2, Result).addReg(Tmp1).addReg(Tmp2); + break; } - else { // if not integer, should be FP. FIXME: what about bools? ;) - assert(SetCC->getOperand(0).getValueType() != MVT::f32 && - "error: SETCC should have had incoming f32 promoted to f64!\n"); - - if(ConstantFPSDNode *CFPSDN = - dyn_cast(N.getOperand(1))) { - - // if we are comparing against a constant +0.0 or +1.0 - if(CFPSDN->isExactlyValue(+0.0)) - Tmp2 = IA64::F0; // then we can just compare against f0 - else if(CFPSDN->isExactlyValue(+1.0)) - Tmp2 = IA64::F1; // or f1 - else - Tmp2 = SelectExpr(N.getOperand(1)); - } else // not comparing against a constant + } else { // if not integer, should be FP. + assert(N.getOperand(0).getValueType() != MVT::f32 && + "error: SETCC should have had incoming f32 promoted to f64!\n"); + + if(ConstantFPSDNode *CFPSDN = + dyn_cast(N.getOperand(1))) { + + // if we are comparing against a constant +0.0 or +1.0 + if(CFPSDN->isExactlyValue(+0.0)) + Tmp2 = IA64::F0; // then we can just compare against f0 + else if(CFPSDN->isExactlyValue(+1.0)) + Tmp2 = IA64::F1; // or f1 + else Tmp2 = SelectExpr(N.getOperand(1)); + } else // not comparing against a constant + Tmp2 = SelectExpr(N.getOperand(1)); - switch (SetCC->getCondition()) { - default: assert(0 && "Unknown FP comparison!"); - case ISD::SETEQ: - BuildMI(BB, IA64::FCMPEQ, 2, Result).addReg(Tmp1).addReg(Tmp2); - break; - case ISD::SETGT: - BuildMI(BB, IA64::FCMPGT, 2, Result).addReg(Tmp1).addReg(Tmp2); - break; - case ISD::SETGE: - BuildMI(BB, IA64::FCMPGE, 2, Result).addReg(Tmp1).addReg(Tmp2); - break; - case ISD::SETLT: - BuildMI(BB, IA64::FCMPLT, 2, Result).addReg(Tmp1).addReg(Tmp2); - break; - case ISD::SETLE: - BuildMI(BB, IA64::FCMPLE, 2, Result).addReg(Tmp1).addReg(Tmp2); - break; - case ISD::SETNE: - BuildMI(BB, IA64::FCMPNE, 2, Result).addReg(Tmp1).addReg(Tmp2); - break; - case ISD::SETULT: - BuildMI(BB, IA64::FCMPLTU, 2, Result).addReg(Tmp1).addReg(Tmp2); - break; - case ISD::SETUGT: - BuildMI(BB, IA64::FCMPGTU, 2, Result).addReg(Tmp1).addReg(Tmp2); - break; - case ISD::SETULE: - BuildMI(BB, IA64::FCMPLEU, 2, Result).addReg(Tmp1).addReg(Tmp2); - break; - case ISD::SETUGE: - BuildMI(BB, IA64::FCMPGEU, 2, Result).addReg(Tmp1).addReg(Tmp2); - break; - } + switch (CC) { + default: assert(0 && "Unknown FP comparison!"); + case ISD::SETEQ: + BuildMI(BB, IA64::FCMPEQ, 2, Result).addReg(Tmp1).addReg(Tmp2); + break; + case ISD::SETGT: + BuildMI(BB, IA64::FCMPGT, 2, Result).addReg(Tmp1).addReg(Tmp2); + break; + case ISD::SETGE: + BuildMI(BB, IA64::FCMPGE, 2, Result).addReg(Tmp1).addReg(Tmp2); + break; + case ISD::SETLT: + BuildMI(BB, IA64::FCMPLT, 2, Result).addReg(Tmp1).addReg(Tmp2); + break; + case ISD::SETLE: + BuildMI(BB, IA64::FCMPLE, 2, Result).addReg(Tmp1).addReg(Tmp2); + break; + case ISD::SETNE: + BuildMI(BB, IA64::FCMPNE, 2, Result).addReg(Tmp1).addReg(Tmp2); + break; + case ISD::SETULT: + BuildMI(BB, IA64::FCMPLTU, 2, Result).addReg(Tmp1).addReg(Tmp2); + break; + case ISD::SETUGT: + BuildMI(BB, IA64::FCMPGTU, 2, Result).addReg(Tmp1).addReg(Tmp2); + break; + case ISD::SETULE: + BuildMI(BB, IA64::FCMPLEU, 2, Result).addReg(Tmp1).addReg(Tmp2); + break; + case ISD::SETUGE: + BuildMI(BB, IA64::FCMPGEU, 2, Result).addReg(Tmp1).addReg(Tmp2); + break; } } - else - assert(0 && "this setcc not implemented yet"); - return Result; } From lattner at cs.uiuc.edu Tue Aug 9 15:21:22 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 9 Aug 2005 15:21:22 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelPattern.cpp Message-ID: <200508092021.PAA30218@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ISelPattern.cpp updated: 1.165 -> 1.166 --- Log message: Update the targets to the new SETCC/CondCodeSDNode interfaces. --- Diffs of the changes: (+55 -54) X86ISelPattern.cpp | 109 ++++++++++++++++++++++++++--------------------------- 1 files changed, 55 insertions(+), 54 deletions(-) Index: llvm/lib/Target/X86/X86ISelPattern.cpp diff -u llvm/lib/Target/X86/X86ISelPattern.cpp:1.165 llvm/lib/Target/X86/X86ISelPattern.cpp:1.166 --- llvm/lib/Target/X86/X86ISelPattern.cpp:1.165 Fri Aug 5 16:54:27 2005 +++ llvm/lib/Target/X86/X86ISelPattern.cpp Tue Aug 9 15:21:10 2005 @@ -1663,15 +1663,15 @@ return false; } - SetCCSDNode *SetCC = dyn_cast(Cond); - if (SetCC == 0) + if (Cond.getOpcode() != ISD::SETCC) return true; // Can only handle simple setcc's so far. + ISD::CondCode CC = cast(Cond.getOperand(2))->get(); unsigned Opc; // Handle integer conditions first. - if (MVT::isInteger(SetCC->getOperand(0).getValueType())) { - switch (SetCC->getCondition()) { + if (MVT::isInteger(Cond.getOperand(0).getValueType())) { + switch (CC) { default: assert(0 && "Illegal integer SetCC!"); case ISD::SETEQ: Opc = X86::JE; break; case ISD::SETGT: Opc = X86::JG; break; @@ -1685,7 +1685,7 @@ case ISD::SETUGE: Opc = X86::JAE; break; } Select(Chain); - EmitCMP(SetCC->getOperand(0), SetCC->getOperand(1), SetCC->hasOneUse()); + EmitCMP(Cond.getOperand(0), Cond.getOperand(1), Cond.hasOneUse()); BuildMI(BB, Opc, 1).addMBB(Dest); return false; } @@ -1699,7 +1699,7 @@ // 1 | 0 | 0 | X == Y // 1 | 1 | 1 | unordered // - switch (SetCC->getCondition()) { + switch (CC) { default: assert(0 && "Invalid FP setcc!"); case ISD::SETUEQ: case ISD::SETEQ: Opc = X86::JE; break; // True if ZF = 1 @@ -1742,7 +1742,7 @@ } Select(Chain); - EmitCMP(SetCC->getOperand(0), SetCC->getOperand(1), SetCC->hasOneUse()); + EmitCMP(Cond.getOperand(0), Cond.getOperand(1), Cond.hasOneUse()); BuildMI(BB, Opc, 1).addMBB(Dest); if (Opc2) BuildMI(BB, Opc2, 1).addMBB(Dest); @@ -1781,10 +1781,10 @@ /*CMPNLE*/ 6, /*CMPNLT*/ 5, /*CMPUNORD*/ 3, /*CMPORD*/ 7 }; - SetCCSDNode *SetCC; - if ((SetCC = dyn_cast(Cond))) { - if (MVT::isInteger(SetCC->getOperand(0).getValueType())) { - switch (SetCC->getCondition()) { + if (Cond.getOpcode() == ISD::SETCC) { + ISD::CondCode CC = cast(Cond.getOperand(2))->get(); + if (MVT::isInteger(Cond.getOperand(0).getValueType())) { + switch (CC) { default: assert(0 && "Unknown integer comparison!"); case ISD::SETEQ: CondCode = EQ; break; case ISD::SETGT: CondCode = GT; break; @@ -1805,7 +1805,7 @@ // 1 | 0 | 0 | X == Y // 1 | 1 | 1 | unordered // - switch (SetCC->getCondition()) { + switch (CC) { default: assert(0 && "Unknown FP comparison!"); case ISD::SETUEQ: case ISD::SETEQ: CondCode = EQ; break; // True if ZF = 1 @@ -1831,49 +1831,50 @@ break; } } - } + - // There's no SSE equivalent of FCMOVE. For cases where we set a condition - // code above and one of the results of the select is +0.0, then we can fake - // it up through a clever AND with mask. Otherwise, we will fall through to - // the code below that will use a PHI node to select the right value. - if (X86ScalarSSE && (SVT == MVT::f32 || SVT == MVT::f64)) { - if (SetCC && SetCC->getOperand(0).getValueType() == SVT && - NOT_SET != CondCode) { - ConstantFPSDNode *CT = dyn_cast(True); - ConstantFPSDNode *CF = dyn_cast(False); - bool TrueZero = CT && CT->isExactlyValue(0.0); - bool FalseZero = CF && CF->isExactlyValue(0.0); - if (TrueZero || FalseZero) { - SDOperand LHS = Cond.getOperand(0); - SDOperand RHS = Cond.getOperand(1); - - // Select the two halves of the condition - unsigned RLHS, RRHS; - if (getRegPressure(LHS) > getRegPressure(RHS)) { - RLHS = SelectExpr(LHS); - RRHS = SelectExpr(RHS); - } else { - RRHS = SelectExpr(RHS); - RLHS = SelectExpr(LHS); - } - - // Emit the comparison and generate a mask from it - unsigned MaskReg = MakeReg(SVT); - unsigned Opc = (SVT == MVT::f32) ? X86::CMPSSrr : X86::CMPSDrr; - BuildMI(BB, Opc, 3, MaskReg).addReg(RLHS).addReg(RRHS) - .addImm(SSE_CMOVTAB[CondCode]); - - if (TrueZero) { - RFalse = SelectExpr(False); - Opc = (SVT == MVT::f32) ? X86::ANDNPSrr : X86::ANDNPDrr; - BuildMI(BB, Opc, 2, RDest).addReg(MaskReg).addReg(RFalse); - } else { - RTrue = SelectExpr(True); - Opc = (SVT == MVT::f32) ? X86::ANDPSrr : X86::ANDPDrr; - BuildMI(BB, Opc, 2, RDest).addReg(MaskReg).addReg(RTrue); + // There's no SSE equivalent of FCMOVE. For cases where we set a condition + // code above and one of the results of the select is +0.0, then we can fake + // it up through a clever AND with mask. Otherwise, we will fall through to + // the code below that will use a PHI node to select the right value. + if (X86ScalarSSE && (SVT == MVT::f32 || SVT == MVT::f64)) { + if (Cond.getOperand(0).getValueType() == SVT && + NOT_SET != CondCode) { + ConstantFPSDNode *CT = dyn_cast(True); + ConstantFPSDNode *CF = dyn_cast(False); + bool TrueZero = CT && CT->isExactlyValue(0.0); + bool FalseZero = CF && CF->isExactlyValue(0.0); + if (TrueZero || FalseZero) { + SDOperand LHS = Cond.getOperand(0); + SDOperand RHS = Cond.getOperand(1); + + // Select the two halves of the condition + unsigned RLHS, RRHS; + if (getRegPressure(LHS) > getRegPressure(RHS)) { + RLHS = SelectExpr(LHS); + RRHS = SelectExpr(RHS); + } else { + RRHS = SelectExpr(RHS); + RLHS = SelectExpr(LHS); + } + + // Emit the comparison and generate a mask from it + unsigned MaskReg = MakeReg(SVT); + unsigned Opc = (SVT == MVT::f32) ? X86::CMPSSrr : X86::CMPSDrr; + BuildMI(BB, Opc, 3, MaskReg).addReg(RLHS).addReg(RRHS) + .addImm(SSE_CMOVTAB[CondCode]); + + if (TrueZero) { + RFalse = SelectExpr(False); + Opc = (SVT == MVT::f32) ? X86::ANDNPSrr : X86::ANDNPDrr; + BuildMI(BB, Opc, 2, RDest).addReg(MaskReg).addReg(RFalse); + } else { + RTrue = SelectExpr(True); + Opc = (SVT == MVT::f32) ? X86::ANDPSrr : X86::ANDPDrr; + BuildMI(BB, Opc, 2, RDest).addReg(MaskReg).addReg(RTrue); + } + return; } - return; } } } @@ -3281,7 +3282,7 @@ case ISD::SETCC: EmitCMP(N.getOperand(0), N.getOperand(1), Node->hasOneUse()); - EmitSetCC(BB, Result, cast(N)->getCondition(), + EmitSetCC(BB, Result, cast(N.getOperand(2))->get(), MVT::isFloatingPoint(N.getOperand(1).getValueType())); return Result; case ISD::LOAD: From lattner at cs.uiuc.edu Tue Aug 9 15:21:22 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 9 Aug 2005 15:21:22 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaISelPattern.cpp Message-ID: <200508092021.PAA30214@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/Alpha: AlphaISelPattern.cpp updated: 1.159 -> 1.160 --- Log message: Update the targets to the new SETCC/CondCodeSDNode interfaces. --- Diffs of the changes: (+95 -100) AlphaISelPattern.cpp | 195 ++++++++++++++++++++++++--------------------------- 1 files changed, 95 insertions(+), 100 deletions(-) Index: llvm/lib/Target/Alpha/AlphaISelPattern.cpp diff -u llvm/lib/Target/Alpha/AlphaISelPattern.cpp:1.159 llvm/lib/Target/Alpha/AlphaISelPattern.cpp:1.160 --- llvm/lib/Target/Alpha/AlphaISelPattern.cpp:1.159 Tue Aug 2 14:35:29 2005 +++ llvm/lib/Target/Alpha/AlphaISelPattern.cpp Tue Aug 9 15:21:09 2005 @@ -437,8 +437,8 @@ //if fp && Offset < 6*8, then subtract 6*8 from DataPtr SDOperand FPDataPtr = DAG.getNode(ISD::SUB, MVT::i64, DataPtr, DAG.getConstant(8*6, MVT::i64)); - SDOperand CC = DAG.getSetCC(ISD::SETLT, MVT::i64, - Offset, DAG.getConstant(8*6, MVT::i64)); + SDOperand CC = DAG.getSetCC(MVT::i64, Offset, + DAG.getConstant(8*6, MVT::i64), ISD::SETLT); DataPtr = DAG.getNode(ISD::SELECT, MVT::i64, CC, FPDataPtr, DataPtr); } @@ -896,15 +896,14 @@ bool AlphaISel::SelectFPSetCC(SDOperand N, unsigned dst) { - SDNode *Node = N.Val; + SDNode *SetCC = N.Val; unsigned Opc, Tmp1, Tmp2, Tmp3; - SetCCSDNode *SetCC = dyn_cast(Node); - + ISD::CondCode CC = cast(SetCC->getOperand(2))->get(); bool rev = false; bool inv = false; - switch (SetCC->getCondition()) { - default: Node->dump(); assert(0 && "Unknown FP comparison!"); + switch (CC) { + default: SetCC->dump(); assert(0 && "Unknown FP comparison!"); case ISD::SETEQ: Opc = Alpha::CMPTEQ; break; case ISD::SETLT: Opc = Alpha::CMPTLT; break; case ISD::SETLE: Opc = Alpha::CMPTLE; break; @@ -978,16 +977,14 @@ if (CC.getOpcode() == ISD::SETCC) { - SetCCSDNode* SetCC = dyn_cast(CC.Val); - if (MVT::isInteger(SetCC->getOperand(0).getValueType())) { + ISD::CondCode cCode= cast(CC.getOperand(2))->get(); + if (MVT::isInteger(CC.getOperand(0).getValueType())) { //Dropping the CC is only useful if we are comparing to 0 - bool RightZero = SetCC->getOperand(1).getOpcode() == ISD::Constant && - cast(SetCC->getOperand(1))->getValue() == 0; + bool RightZero = CC.getOperand(1).getOpcode() == ISD::Constant && + cast(CC.getOperand(1))->getValue() == 0; bool isNE = false; //Fix up CC - ISD::CondCode cCode= SetCC->getCondition(); - if(cCode == ISD::SETNE) isNE = true; @@ -1006,7 +1003,7 @@ case ISD::SETUGE: assert(0 && "x (unsgined >= 0 is always true"); break; case ISD::SETNE: Opc = Alpha::BNE; break; } - unsigned Tmp1 = SelectExpr(SetCC->getOperand(0)); //Cond + unsigned Tmp1 = SelectExpr(CC.getOperand(0)); //Cond BuildMI(BB, Opc, 2).addReg(Tmp1).addMBB(Dest); return; } else { @@ -1029,26 +1026,26 @@ unsigned Tmp3; ConstantFPSDNode *CN; - if ((CN = dyn_cast(SetCC->getOperand(1))) + if ((CN = dyn_cast(CC.getOperand(1))) && (CN->isExactlyValue(+0.0) || CN->isExactlyValue(-0.0))) - Tmp3 = SelectExpr(SetCC->getOperand(0)); - else if ((CN = dyn_cast(SetCC->getOperand(0))) + Tmp3 = SelectExpr(CC.getOperand(0)); + else if ((CN = dyn_cast(CC.getOperand(0))) && (CN->isExactlyValue(+0.0) || CN->isExactlyValue(-0.0))) { - Tmp3 = SelectExpr(SetCC->getOperand(1)); + Tmp3 = SelectExpr(CC.getOperand(1)); invTest = true; } else { - unsigned Tmp1 = SelectExpr(SetCC->getOperand(0)); - unsigned Tmp2 = SelectExpr(SetCC->getOperand(1)); - bool isD = SetCC->getOperand(0).getValueType() == MVT::f64; + unsigned Tmp1 = SelectExpr(CC.getOperand(0)); + unsigned Tmp2 = SelectExpr(CC.getOperand(1)); + bool isD = CC.getOperand(0).getValueType() == MVT::f64; Tmp3 = MakeReg(isD ? MVT::f64 : MVT::f32); BuildMI(BB, isD ? Alpha::SUBT : Alpha::SUBS, 2, Tmp3) .addReg(Tmp1).addReg(Tmp2); } - switch (SetCC->getCondition()) { + switch (cCode) { default: CC.Val->dump(); assert(0 && "Unknown FP comparison!"); case ISD::SETEQ: Opc = invTest ? Alpha::FBNE : Alpha::FBEQ; break; case ISD::SETLT: Opc = invTest ? Alpha::FBGT : Alpha::FBLT; break; @@ -1533,71 +1530,70 @@ case ISD::SETCC: { - if (SetCCSDNode *SetCC = dyn_cast(Node)) { - if (MVT::isInteger(SetCC->getOperand(0).getValueType())) { - bool isConst = false; - int dir; - - //Tmp1 = SelectExpr(N.getOperand(0)); - if(N.getOperand(1).getOpcode() == ISD::Constant && - cast(N.getOperand(1))->getValue() <= 255) - isConst = true; - - switch (SetCC->getCondition()) { - default: Node->dump(); assert(0 && "Unknown integer comparison!"); - case ISD::SETEQ: - Opc = isConst ? Alpha::CMPEQi : Alpha::CMPEQ; dir=1; break; - case ISD::SETLT: - Opc = isConst ? Alpha::CMPLTi : Alpha::CMPLT; dir = 1; break; - case ISD::SETLE: - Opc = isConst ? Alpha::CMPLEi : Alpha::CMPLE; dir = 1; break; - case ISD::SETGT: Opc = Alpha::CMPLT; dir = 2; break; - case ISD::SETGE: Opc = Alpha::CMPLE; dir = 2; break; - case ISD::SETULT: - Opc = isConst ? Alpha::CMPULTi : Alpha::CMPULT; dir = 1; break; - case ISD::SETUGT: Opc = Alpha::CMPULT; dir = 2; break; - case ISD::SETULE: - Opc = isConst ? Alpha::CMPULEi : Alpha::CMPULE; dir = 1; break; - case ISD::SETUGE: Opc = Alpha::CMPULE; dir = 2; break; - case ISD::SETNE: {//Handle this one special - //std::cerr << "Alpha does not have a setne.\n"; - //abort(); - Tmp1 = SelectExpr(N.getOperand(0)); + ISD::CondCode CC = cast(N.getOperand(2))->get(); + if (MVT::isInteger(N.getOperand(0).getValueType())) { + bool isConst = false; + int dir; + + //Tmp1 = SelectExpr(N.getOperand(0)); + if(N.getOperand(1).getOpcode() == ISD::Constant && + cast(N.getOperand(1))->getValue() <= 255) + isConst = true; + + switch (CC) { + default: Node->dump(); assert(0 && "Unknown integer comparison!"); + case ISD::SETEQ: + Opc = isConst ? Alpha::CMPEQi : Alpha::CMPEQ; dir=1; break; + case ISD::SETLT: + Opc = isConst ? Alpha::CMPLTi : Alpha::CMPLT; dir = 1; break; + case ISD::SETLE: + Opc = isConst ? Alpha::CMPLEi : Alpha::CMPLE; dir = 1; break; + case ISD::SETGT: Opc = Alpha::CMPLT; dir = 2; break; + case ISD::SETGE: Opc = Alpha::CMPLE; dir = 2; break; + case ISD::SETULT: + Opc = isConst ? Alpha::CMPULTi : Alpha::CMPULT; dir = 1; break; + case ISD::SETUGT: Opc = Alpha::CMPULT; dir = 2; break; + case ISD::SETULE: + Opc = isConst ? Alpha::CMPULEi : Alpha::CMPULE; dir = 1; break; + case ISD::SETUGE: Opc = Alpha::CMPULE; dir = 2; break; + case ISD::SETNE: {//Handle this one special + //std::cerr << "Alpha does not have a setne.\n"; + //abort(); + Tmp1 = SelectExpr(N.getOperand(0)); + Tmp2 = SelectExpr(N.getOperand(1)); + Tmp3 = MakeReg(MVT::i64); + BuildMI(BB, Alpha::CMPEQ, 2, Tmp3).addReg(Tmp1).addReg(Tmp2); + //Remeber we have the Inv for this CC + CCInvMap[N] = Tmp3; + //and invert + BuildMI(BB, Alpha::CMPEQ, 2, Result).addReg(Alpha::R31).addReg(Tmp3); + return Result; + } + } + if (dir == 1) { + Tmp1 = SelectExpr(N.getOperand(0)); + if (isConst) { + Tmp2 = cast(N.getOperand(1))->getValue(); + BuildMI(BB, Opc, 2, Result).addReg(Tmp1).addImm(Tmp2); + } else { Tmp2 = SelectExpr(N.getOperand(1)); - Tmp3 = MakeReg(MVT::i64); - BuildMI(BB, Alpha::CMPEQ, 2, Tmp3).addReg(Tmp1).addReg(Tmp2); - //Remeber we have the Inv for this CC - CCInvMap[N] = Tmp3; - //and invert - BuildMI(BB, Alpha::CMPEQ, 2, Result).addReg(Alpha::R31).addReg(Tmp3); - return Result; - } - } - if (dir == 1) { - Tmp1 = SelectExpr(N.getOperand(0)); - if (isConst) { - Tmp2 = cast(N.getOperand(1))->getValue(); - BuildMI(BB, Opc, 2, Result).addReg(Tmp1).addImm(Tmp2); - } else { - Tmp2 = SelectExpr(N.getOperand(1)); - BuildMI(BB, Opc, 2, Result).addReg(Tmp1).addReg(Tmp2); - } - } else { //if (dir == 2) { - Tmp1 = SelectExpr(N.getOperand(1)); - Tmp2 = SelectExpr(N.getOperand(0)); BuildMI(BB, Opc, 2, Result).addReg(Tmp1).addReg(Tmp2); } - } else { - //do the comparison - Tmp1 = MakeReg(MVT::f64); - bool inv = SelectFPSetCC(N, Tmp1); - - //now arrange for Result (int) to have a 1 or 0 - Tmp2 = MakeReg(MVT::i64); - BuildMI(BB, Alpha::ADDQi, 2, Tmp2).addReg(Alpha::R31).addImm(1); - Opc = inv?Alpha::CMOVNEi_FP:Alpha::CMOVEQi_FP; - BuildMI(BB, Opc, 3, Result).addReg(Tmp2).addImm(0).addReg(Tmp1); + } else { //if (dir == 2) { + Tmp1 = SelectExpr(N.getOperand(1)); + Tmp2 = SelectExpr(N.getOperand(0)); + BuildMI(BB, Opc, 2, Result).addReg(Tmp1).addReg(Tmp2); } + } else { + //do the comparison + Tmp1 = MakeReg(MVT::f64); + bool inv = SelectFPSetCC(N, Tmp1); + + //now arrange for Result (int) to have a 1 or 0 + Tmp2 = MakeReg(MVT::i64); + BuildMI(BB, Alpha::ADDQi, 2, Tmp2).addReg(Alpha::R31).addImm(1); + Opc = inv?Alpha::CMOVNEi_FP:Alpha::CMOVEQi_FP; + BuildMI(BB, Opc, 3, Result).addReg(Tmp2).addImm(0).addReg(Tmp1); } return Result; } @@ -1927,10 +1923,10 @@ unsigned FV = SelectExpr(N.getOperand(2)); //Use if FALSE SDOperand CC = N.getOperand(0); - SetCCSDNode* SetCC = dyn_cast(CC.Val); - if (SetCC && !MVT::isInteger(SetCC->getOperand(0).getValueType())) - { //FP Setcc -> Select yay! + if (CC.getOpcode() == ISD::SETCC && + !MVT::isInteger(CC.getOperand(0).getValueType())) { + //FP Setcc -> Select yay! //for a cmp b: c = a - b; @@ -1942,26 +1938,26 @@ unsigned Tmp3; ConstantFPSDNode *CN; - if ((CN = dyn_cast(SetCC->getOperand(1))) + if ((CN = dyn_cast(CC.getOperand(1))) && (CN->isExactlyValue(+0.0) || CN->isExactlyValue(-0.0))) - Tmp3 = SelectExpr(SetCC->getOperand(0)); - else if ((CN = dyn_cast(SetCC->getOperand(0))) + Tmp3 = SelectExpr(CC.getOperand(0)); + else if ((CN = dyn_cast(CC.getOperand(0))) && (CN->isExactlyValue(+0.0) || CN->isExactlyValue(-0.0))) { - Tmp3 = SelectExpr(SetCC->getOperand(1)); + Tmp3 = SelectExpr(CC.getOperand(1)); invTest = true; } else { - unsigned Tmp1 = SelectExpr(SetCC->getOperand(0)); - unsigned Tmp2 = SelectExpr(SetCC->getOperand(1)); - bool isD = SetCC->getOperand(0).getValueType() == MVT::f64; + unsigned Tmp1 = SelectExpr(CC.getOperand(0)); + unsigned Tmp2 = SelectExpr(CC.getOperand(1)); + bool isD = CC.getOperand(0).getValueType() == MVT::f64; Tmp3 = MakeReg(isD ? MVT::f64 : MVT::f32); BuildMI(BB, isD ? Alpha::SUBT : Alpha::SUBS, 2, Tmp3) .addReg(Tmp1).addReg(Tmp2); } - switch (SetCC->getCondition()) { + switch (cast(CC.getOperand(2))->get()) { default: CC.Val->dump(); assert(0 && "Unknown FP comparison!"); case ISD::SETEQ: Opc = invTest ? Alpha::FCMOVNE : Alpha::FCMOVEQ; break; case ISD::SETLT: Opc = invTest ? Alpha::FCMOVGT : Alpha::FCMOVLT; break; @@ -1996,10 +1992,9 @@ //BuildMI(BB, Alpha::CMOVEQ, 2, Result).addReg(Tmp2).addReg(Tmp3).addReg(Tmp1); SDOperand CC = N.getOperand(0); - SetCCSDNode* SetCC = dyn_cast(CC.Val); if (CC.getOpcode() == ISD::SETCC && - !MVT::isInteger(SetCC->getOperand(0).getValueType())) + !MVT::isInteger(CC.getOperand(0).getValueType())) { //FP Setcc -> Int Select Tmp1 = MakeReg(MVT::f64); Tmp2 = SelectExpr(N.getOperand(1)); //Use if TRUE @@ -2012,15 +2007,15 @@ if (CC.getOpcode() == ISD::SETCC) { //Int SetCC -> Select //Dropping the CC is only useful if we are comparing to 0 - if((SetCC->getOperand(1).getOpcode() == ISD::Constant && - cast(SetCC->getOperand(1))->getValue() == 0)) + if((CC.getOperand(1).getOpcode() == ISD::Constant && + cast(CC.getOperand(1))->getValue() == 0)) { //figure out a few things bool useImm = N.getOperand(2).getOpcode() == ISD::Constant && cast(N.getOperand(2))->getValue() <= 255; //Fix up CC - ISD::CondCode cCode= SetCC->getCondition(); + ISD::CondCode cCode= cast(CC.getOperand(2))->get(); if (useImm) //Invert sense to get Imm field right cCode = ISD::getSetCCInverse(cCode, true); @@ -2039,7 +2034,7 @@ case ISD::SETUGE: assert(0 && "unsgined >= 0 is always true"); break; case ISD::SETNE: Opc = useImm?Alpha::CMOVNEi:Alpha::CMOVNE; break; } - Tmp1 = SelectExpr(SetCC->getOperand(0)); //Cond + Tmp1 = SelectExpr(CC.getOperand(0)); //Cond if (useImm) { Tmp3 = SelectExpr(N.getOperand(1)); //Use if FALSE From lattner at cs.uiuc.edu Tue Aug 9 15:21:22 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 9 Aug 2005 15:21:22 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp PPC64ISelPattern.cpp Message-ID: <200508092021.PAA30216@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPC32ISelPattern.cpp updated: 1.126 -> 1.127 PPC64ISelPattern.cpp updated: 1.27 -> 1.28 --- Log message: Update the targets to the new SETCC/CondCodeSDNode interfaces. --- Diffs of the changes: (+166 -175) PPC32ISelPattern.cpp | 212 ++++++++++++++++++++++++--------------------------- PPC64ISelPattern.cpp | 129 +++++++++++++++---------------- 2 files changed, 166 insertions(+), 175 deletions(-) Index: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp diff -u llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.126 llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.127 --- llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.126 Tue Aug 9 13:29:55 2005 +++ llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Tue Aug 9 15:21:09 2005 @@ -1086,7 +1086,7 @@ return SelectExpr(N); } -unsigned ISel::SelectCC(SDOperand CC, unsigned& Opc, bool &Inv, unsigned& Idx) { +unsigned ISel::SelectCC(SDOperand Cond, unsigned& Opc, bool &Inv, unsigned& Idx) { unsigned Result, Tmp1, Tmp2; bool AlreadySelected = false; static const unsigned CompareOpcodes[] = @@ -1097,23 +1097,24 @@ // If the first operand to the select is a SETCC node, then we can fold it // into the branch that selects which value to return. - if (SetCCSDNode* SetCC = dyn_cast(CC.Val)) { + if (Cond.getOpcode() == ISD::SETCC) { + ISD::CondCode CC = cast(Cond.getOperand(2))->get(); bool U; - Opc = getBCCForSetCC(SetCC->getCondition(), U); - Idx = getCRIdxForSetCC(SetCC->getCondition(), Inv); + Opc = getBCCForSetCC(CC, U); + Idx = getCRIdxForSetCC(CC, Inv); // Use U to determine whether the SETCC immediate range is signed or not. - if (isIntImmediate(SetCC->getOperand(1), Tmp2) && + if (isIntImmediate(Cond.getOperand(1), Tmp2) && ((U && isUInt16(Tmp2)) || (!U && isInt16(Tmp2)))) { Tmp2 = Lo16(Tmp2); // For comparisons against zero, we can implicity set CR0 if a recording // variant (e.g. 'or.' instead of 'or') of the instruction that defines // operand zero of the SetCC node is available. - if (0 == Tmp2 && - NodeHasRecordingVariant(SetCC->getOperand(0).getOpcode()) && - SetCC->getOperand(0).Val->hasOneUse()) { + if (Tmp2 == 0 && + NodeHasRecordingVariant(Cond.getOperand(0).getOpcode()) && + Cond.getOperand(0).Val->hasOneUse()) { RecordSuccess = false; - Tmp1 = SelectExpr(SetCC->getOperand(0), true); + Tmp1 = SelectExpr(Cond.getOperand(0), true); if (RecordSuccess) { ++Recorded; BuildMI(BB, PPC::MCRF, 1, Result).addReg(PPC::CR0); @@ -1123,16 +1124,16 @@ } // If we could not implicitly set CR0, then emit a compare immediate // instead. - if (!AlreadySelected) Tmp1 = SelectExpr(SetCC->getOperand(0)); + if (!AlreadySelected) Tmp1 = SelectExpr(Cond.getOperand(0)); if (U) BuildMI(BB, PPC::CMPLWI, 2, Result).addReg(Tmp1).addImm(Tmp2); else BuildMI(BB, PPC::CMPWI, 2, Result).addReg(Tmp1).addSImm(Tmp2); } else { - bool IsInteger = MVT::isInteger(SetCC->getOperand(0).getValueType()); + bool IsInteger = MVT::isInteger(Cond.getOperand(0).getValueType()); unsigned CompareOpc = CompareOpcodes[2 * IsInteger + U]; - Tmp1 = SelectExpr(SetCC->getOperand(0)); - Tmp2 = SelectExpr(SetCC->getOperand(1)); + Tmp1 = SelectExpr(Cond.getOperand(0)); + Tmp2 = SelectExpr(Cond.getOperand(1)); BuildMI(BB, CompareOpc, 2, Result).addReg(Tmp1).addReg(Tmp2); } } else { @@ -1140,7 +1141,7 @@ // treating it as if it were a boolean. Opc = PPC::BNE; Idx = getCRIdxForSetCC(ISD::SETNE, Inv); - Tmp1 = SelectExpr(CC); + Tmp1 = SelectExpr(Cond); BuildMI(BB, PPC::CMPLWI, 2, Result).addReg(Tmp1).addImm(0); } return Result; @@ -2057,111 +2058,105 @@ return 0; } - case ISD::SETCC: - if (SetCCSDNode *SetCC = dyn_cast(Node)) { - if (ConstantSDNode *CN = - dyn_cast(SetCC->getOperand(1).Val)) { - // We can codegen setcc op, imm very efficiently compared to a brcond. - // Check for those cases here. - // setcc op, 0 - if (CN->getValue() == 0) { - Tmp1 = SelectExpr(SetCC->getOperand(0)); - switch (SetCC->getCondition()) { - default: SetCC->dump(); assert(0 && "Unhandled SetCC condition"); abort(); - case ISD::SETEQ: - Tmp2 = MakeReg(MVT::i32); - BuildMI(BB, PPC::CNTLZW, 1, Tmp2).addReg(Tmp1); - BuildMI(BB, PPC::RLWINM, 4, Result).addReg(Tmp2).addImm(27) - .addImm(5).addImm(31); - break; - case ISD::SETNE: - Tmp2 = MakeReg(MVT::i32); - BuildMI(BB, PPC::ADDIC, 2, Tmp2).addReg(Tmp1).addSImm(-1); - BuildMI(BB, PPC::SUBFE, 2, Result).addReg(Tmp2).addReg(Tmp1); - break; - case ISD::SETLT: - BuildMI(BB, PPC::RLWINM, 4, Result).addReg(Tmp1).addImm(1) - .addImm(31).addImm(31); - break; - case ISD::SETGT: - Tmp2 = MakeReg(MVT::i32); - Tmp3 = MakeReg(MVT::i32); - BuildMI(BB, PPC::NEG, 2, Tmp2).addReg(Tmp1); - BuildMI(BB, PPC::ANDC, 2, Tmp3).addReg(Tmp2).addReg(Tmp1); - BuildMI(BB, PPC::RLWINM, 4, Result).addReg(Tmp3).addImm(1) - .addImm(31).addImm(31); - break; - } - return Result; + case ISD::SETCC: { + ISD::CondCode CC = cast(Node->getOperand(2))->get(); + if (isIntImmediate(Node->getOperand(1), Tmp3)) { + // We can codegen setcc op, imm very efficiently compared to a brcond. + // Check for those cases here. + // setcc op, 0 + if (Tmp3 == 0) { + Tmp1 = SelectExpr(Node->getOperand(0)); + switch (CC) { + default: Node->dump(); assert(0 && "Unhandled SetCC condition"); abort(); + case ISD::SETEQ: + Tmp2 = MakeReg(MVT::i32); + BuildMI(BB, PPC::CNTLZW, 1, Tmp2).addReg(Tmp1); + BuildMI(BB, PPC::RLWINM, 4, Result).addReg(Tmp2).addImm(27) + .addImm(5).addImm(31); + break; + case ISD::SETNE: + Tmp2 = MakeReg(MVT::i32); + BuildMI(BB, PPC::ADDIC, 2, Tmp2).addReg(Tmp1).addSImm(-1); + BuildMI(BB, PPC::SUBFE, 2, Result).addReg(Tmp2).addReg(Tmp1); + break; + case ISD::SETLT: + BuildMI(BB, PPC::RLWINM, 4, Result).addReg(Tmp1).addImm(1) + .addImm(31).addImm(31); + break; + case ISD::SETGT: + Tmp2 = MakeReg(MVT::i32); + Tmp3 = MakeReg(MVT::i32); + BuildMI(BB, PPC::NEG, 2, Tmp2).addReg(Tmp1); + BuildMI(BB, PPC::ANDC, 2, Tmp3).addReg(Tmp2).addReg(Tmp1); + BuildMI(BB, PPC::RLWINM, 4, Result).addReg(Tmp3).addImm(1) + .addImm(31).addImm(31); + break; } - // setcc op, -1 - if (CN->isAllOnesValue()) { - Tmp1 = SelectExpr(SetCC->getOperand(0)); - switch (SetCC->getCondition()) { - default: assert(0 && "Unhandled SetCC condition"); abort(); - case ISD::SETEQ: - Tmp2 = MakeReg(MVT::i32); - Tmp3 = MakeReg(MVT::i32); - BuildMI(BB, PPC::ADDIC, 2, Tmp2).addReg(Tmp1).addSImm(1); - BuildMI(BB, PPC::LI, 1, Tmp3).addSImm(0); - BuildMI(BB, PPC::ADDZE, 1, Result).addReg(Tmp3); - break; - case ISD::SETNE: - Tmp2 = MakeReg(MVT::i32); - Tmp3 = MakeReg(MVT::i32); - BuildMI(BB, PPC::NOR, 2, Tmp2).addReg(Tmp1).addReg(Tmp1); - BuildMI(BB, PPC::ADDIC, 2, Tmp3).addReg(Tmp2).addSImm(-1); - BuildMI(BB, PPC::SUBFE, 2, Result).addReg(Tmp3).addReg(Tmp2); - break; - case ISD::SETLT: - Tmp2 = MakeReg(MVT::i32); - Tmp3 = MakeReg(MVT::i32); - BuildMI(BB, PPC::ADDI, 2, Tmp2).addReg(Tmp1).addSImm(1); - BuildMI(BB, PPC::AND, 2, Tmp3).addReg(Tmp2).addReg(Tmp1); - BuildMI(BB, PPC::RLWINM, 4, Result).addReg(Tmp3).addImm(1) - .addImm(31).addImm(31); - break; - case ISD::SETGT: - Tmp2 = MakeReg(MVT::i32); - BuildMI(BB, PPC::RLWINM, 4, Tmp2).addReg(Tmp1).addImm(1) - .addImm(31).addImm(31); - BuildMI(BB, PPC::XORI, 2, Result).addReg(Tmp2).addImm(1); - break; - } - return Result; + return Result; + } else if (Tmp3 == ~0U) { // setcc op, -1 + Tmp1 = SelectExpr(Node->getOperand(0)); + switch (CC) { + default: assert(0 && "Unhandled SetCC condition"); abort(); + case ISD::SETEQ: + Tmp2 = MakeReg(MVT::i32); + Tmp3 = MakeReg(MVT::i32); + BuildMI(BB, PPC::ADDIC, 2, Tmp2).addReg(Tmp1).addSImm(1); + BuildMI(BB, PPC::LI, 1, Tmp3).addSImm(0); + BuildMI(BB, PPC::ADDZE, 1, Result).addReg(Tmp3); + break; + case ISD::SETNE: + Tmp2 = MakeReg(MVT::i32); + Tmp3 = MakeReg(MVT::i32); + BuildMI(BB, PPC::NOR, 2, Tmp2).addReg(Tmp1).addReg(Tmp1); + BuildMI(BB, PPC::ADDIC, 2, Tmp3).addReg(Tmp2).addSImm(-1); + BuildMI(BB, PPC::SUBFE, 2, Result).addReg(Tmp3).addReg(Tmp2); + break; + case ISD::SETLT: + Tmp2 = MakeReg(MVT::i32); + Tmp3 = MakeReg(MVT::i32); + BuildMI(BB, PPC::ADDI, 2, Tmp2).addReg(Tmp1).addSImm(1); + BuildMI(BB, PPC::AND, 2, Tmp3).addReg(Tmp2).addReg(Tmp1); + BuildMI(BB, PPC::RLWINM, 4, Result).addReg(Tmp3).addImm(1) + .addImm(31).addImm(31); + break; + case ISD::SETGT: + Tmp2 = MakeReg(MVT::i32); + BuildMI(BB, PPC::RLWINM, 4, Tmp2).addReg(Tmp1).addImm(1) + .addImm(31).addImm(31); + BuildMI(BB, PPC::XORI, 2, Result).addReg(Tmp2).addImm(1); + break; } + return Result; } - - bool Inv; - unsigned CCReg = SelectCC(N, Opc, Inv, Tmp2); - MoveCRtoGPR(CCReg, Inv, Tmp2, Result); - return Result; } - assert(0 && "Is this legal?"); - return 0; + bool Inv; + unsigned CCReg = SelectCC(N, Opc, Inv, Tmp2); + MoveCRtoGPR(CCReg, Inv, Tmp2, Result); + return Result; + } case ISD::SELECT: { - SetCCSDNode* SetCC = dyn_cast(N.getOperand(0).Val); - if (SetCC && N.getOperand(0).getOpcode() == ISD::SETCC && - !MVT::isInteger(SetCC->getOperand(0).getValueType()) && + SDNode *Cond = N.getOperand(0).Val; + ISD::CondCode CC; + if (Cond->getOpcode() == ISD::SETCC && !MVT::isInteger(N.getOperand(1).getValueType()) && - !MVT::isInteger(N.getOperand(2).getValueType()) && - SetCC->getCondition() != ISD::SETEQ && - SetCC->getCondition() != ISD::SETNE) { - MVT::ValueType VT = SetCC->getOperand(0).getValueType(); + cast(Cond->getOperand(2))->get() != ISD::SETEQ && + cast(Cond->getOperand(2))->get() != ISD::SETNE) { + MVT::ValueType VT = Cond->getOperand(0).getValueType(); + ISD::CondCode CC = cast(Cond->getOperand(2))->get(); unsigned TV = SelectExpr(N.getOperand(1)); // Use if TRUE unsigned FV = SelectExpr(N.getOperand(2)); // Use if FALSE - ConstantFPSDNode *CN = dyn_cast(SetCC->getOperand(1)); + ConstantFPSDNode *CN = dyn_cast(Cond->getOperand(1)); if (CN && (CN->isExactlyValue(-0.0) || CN->isExactlyValue(0.0))) { - switch(SetCC->getCondition()) { + switch(CC) { default: assert(0 && "Invalid FSEL condition"); abort(); case ISD::SETULT: case ISD::SETLT: std::swap(TV, FV); // fsel is natively setge, swap operands for setlt case ISD::SETUGE: case ISD::SETGE: - Tmp1 = SelectExpr(SetCC->getOperand(0)); // Val to compare against + Tmp1 = SelectExpr(Cond->getOperand(0)); // Val to compare against BuildMI(BB, PPC::FSEL, 3, Result).addReg(Tmp1).addReg(TV).addReg(FV); return Result; case ISD::SETUGT: @@ -2169,11 +2164,11 @@ std::swap(TV, FV); // fsel is natively setge, swap operands for setlt case ISD::SETULE: case ISD::SETLE: { - if (SetCC->getOperand(0).getOpcode() == ISD::FNEG) { - Tmp2 = SelectExpr(SetCC->getOperand(0).getOperand(0)); + if (Cond->getOperand(0).getOpcode() == ISD::FNEG) { + Tmp2 = SelectExpr(Cond->getOperand(0).getOperand(0)); } else { Tmp2 = MakeReg(VT); - Tmp1 = SelectExpr(SetCC->getOperand(0)); // Val to compare against + Tmp1 = SelectExpr(Cond->getOperand(0)); // Val to compare against BuildMI(BB, PPC::FNEG, 1, Tmp2).addReg(Tmp1); } BuildMI(BB, PPC::FSEL, 3, Result).addReg(Tmp2).addReg(TV).addReg(FV); @@ -2182,10 +2177,10 @@ } } else { Opc = (MVT::f64 == VT) ? PPC::FSUB : PPC::FSUBS; - Tmp1 = SelectExpr(SetCC->getOperand(0)); // Val to compare against - Tmp2 = SelectExpr(SetCC->getOperand(1)); + Tmp1 = SelectExpr(Cond->getOperand(0)); // Val to compare against + Tmp2 = SelectExpr(Cond->getOperand(1)); Tmp3 = MakeReg(VT); - switch(SetCC->getCondition()) { + switch(CC) { default: assert(0 && "Invalid FSEL condition"); abort(); case ISD::SETULT: case ISD::SETLT: @@ -2210,7 +2205,6 @@ } } assert(0 && "Should never get here"); - return 0; } bool Inv; Index: llvm/lib/Target/PowerPC/PPC64ISelPattern.cpp diff -u llvm/lib/Target/PowerPC/PPC64ISelPattern.cpp:1.27 llvm/lib/Target/PowerPC/PPC64ISelPattern.cpp:1.28 --- llvm/lib/Target/PowerPC/PPC64ISelPattern.cpp:1.27 Tue Aug 2 14:25:03 2005 +++ llvm/lib/Target/PowerPC/PPC64ISelPattern.cpp Tue Aug 9 15:21:09 2005 @@ -565,24 +565,23 @@ // If the first operand to the select is a SETCC node, then we can fold it // into the branch that selects which value to return. - SetCCSDNode* SetCC = dyn_cast(CC.Val); - if (SetCC && CC.getOpcode() == ISD::SETCC) { + if (CC.getOpcode() == ISD::SETCC) { bool U; - Opc = getBCCForSetCC(SetCC->getCondition(), U); - Tmp1 = SelectExpr(SetCC->getOperand(0)); + Opc = getBCCForSetCC(cast(CC.getOperand(2))->get(), U); + Tmp1 = SelectExpr(CC.getOperand(0)); // Pass the optional argument U to getImmediateForOpcode for SETCC, // so that it knows whether the SETCC immediate range is signed or not. - if (1 == getImmediateForOpcode(SetCC->getOperand(1), ISD::SETCC, + if (1 == getImmediateForOpcode(CC.getOperand(1), ISD::SETCC, Tmp2, U)) { if (U) BuildMI(BB, PPC::CMPLWI, 2, PPC::CR0).addReg(Tmp1).addImm(Tmp2); else BuildMI(BB, PPC::CMPWI, 2, PPC::CR0).addReg(Tmp1).addSImm(Tmp2); } else { - bool IsInteger = MVT::isInteger(SetCC->getOperand(0).getValueType()); + bool IsInteger = MVT::isInteger(CC.getOperand(0).getValueType()); unsigned CompareOpc = CompareOpcodes[2 * IsInteger + U]; - Tmp2 = SelectExpr(SetCC->getOperand(1)); + Tmp2 = SelectExpr(CC.getOperand(1)); BuildMI(BB, CompareOpc, 2, PPC::CR0).addReg(Tmp1).addReg(Tmp2); } } else { @@ -650,21 +649,22 @@ assert(0 && "Node not handled!\n"); case ISD::SELECT: { + SDNode *Cond = N.getOperand(0).Val; // Attempt to generate FSEL. We can do this whenever we have an FP result, // and an FP comparison in the SetCC node. - SetCCSDNode* SetCC = dyn_cast(N.getOperand(0).Val); - if (SetCC && N.getOperand(0).getOpcode() == ISD::SETCC && - !MVT::isInteger(SetCC->getOperand(0).getValueType()) && - SetCC->getCondition() != ISD::SETEQ && - SetCC->getCondition() != ISD::SETNE) { - MVT::ValueType VT = SetCC->getOperand(0).getValueType(); - Tmp1 = SelectExpr(SetCC->getOperand(0)); // Val to compare against + if (Cond->getOpcode() == ISD::SETCC && + !MVT::isInteger(N.getOperand(1).getValueType()) && + cast(Cond->getOperand(2))->get() != ISD::SETEQ && + cast(Cond->getOperand(2))->get() != ISD::SETNE) { + MVT::ValueType VT = Cond->getOperand(0).getValueType(); + ISD::CondCode CC = cast(Cond->getOperand(2))->get(); + Tmp1 = SelectExpr(Cond->getOperand(0)); // Val to compare against unsigned TV = SelectExpr(N.getOperand(1)); // Use if TRUE unsigned FV = SelectExpr(N.getOperand(2)); // Use if FALSE - ConstantFPSDNode *CN = dyn_cast(SetCC->getOperand(1)); + ConstantFPSDNode *CN = dyn_cast(Cond->getOperand(1)); if (CN && (CN->isExactlyValue(-0.0) || CN->isExactlyValue(0.0))) { - switch(SetCC->getCondition()) { + switch(CC) { default: assert(0 && "Invalid FSEL condition"); abort(); case ISD::SETULT: case ISD::SETLT: @@ -691,9 +691,9 @@ } } else { Opc = (MVT::f64 == VT) ? PPC::FSUB : PPC::FSUBS; - Tmp2 = SelectExpr(SetCC->getOperand(1)); + Tmp2 = SelectExpr(Cond->getOperand(1)); Tmp3 = MakeReg(VT); - switch(SetCC->getCondition()) { + switch(CC) { default: assert(0 && "Invalid FSEL condition"); abort(); case ISD::SETULT: case ISD::SETLT: @@ -1357,54 +1357,51 @@ return Result; } - case ISD::SETCC: - if (SetCCSDNode *SetCC = dyn_cast(Node)) { - Opc = SelectSetCR0(N); - - unsigned TrueValue = MakeReg(MVT::i32); - BuildMI(BB, PPC::LI, 1, TrueValue).addSImm(1); - unsigned FalseValue = MakeReg(MVT::i32); - BuildMI(BB, PPC::LI, 1, FalseValue).addSImm(0); - - // Create an iterator with which to insert the MBB for copying the false - // value and the MBB to hold the PHI instruction for this SetCC. - MachineBasicBlock *thisMBB = BB; - const BasicBlock *LLVM_BB = BB->getBasicBlock(); - ilist::iterator It = BB; - ++It; - - // thisMBB: - // ... - // cmpTY cr0, r1, r2 - // %TrueValue = li 1 - // bCC sinkMBB - MachineBasicBlock *copy0MBB = new MachineBasicBlock(LLVM_BB); - MachineBasicBlock *sinkMBB = new MachineBasicBlock(LLVM_BB); - BuildMI(BB, Opc, 2).addReg(PPC::CR0).addMBB(sinkMBB); - MachineFunction *F = BB->getParent(); - F->getBasicBlockList().insert(It, copy0MBB); - F->getBasicBlockList().insert(It, sinkMBB); - // Update machine-CFG edges - BB->addSuccessor(copy0MBB); - BB->addSuccessor(sinkMBB); - - // copy0MBB: - // %FalseValue = li 0 - // fallthrough - BB = copy0MBB; - // Update machine-CFG edges - BB->addSuccessor(sinkMBB); - - // sinkMBB: - // %Result = phi [ %FalseValue, copy0MBB ], [ %TrueValue, thisMBB ] - // ... - BB = sinkMBB; - BuildMI(BB, PPC::PHI, 4, Result).addReg(FalseValue) - .addMBB(copy0MBB).addReg(TrueValue).addMBB(thisMBB); - return Result; - } - assert(0 && "Is this legal?"); - return 0; + case ISD::SETCC: { + Opc = SelectSetCR0(N); + + unsigned TrueValue = MakeReg(MVT::i32); + BuildMI(BB, PPC::LI, 1, TrueValue).addSImm(1); + unsigned FalseValue = MakeReg(MVT::i32); + BuildMI(BB, PPC::LI, 1, FalseValue).addSImm(0); + + // Create an iterator with which to insert the MBB for copying the false + // value and the MBB to hold the PHI instruction for this SetCC. + MachineBasicBlock *thisMBB = BB; + const BasicBlock *LLVM_BB = BB->getBasicBlock(); + ilist::iterator It = BB; + ++It; + + // thisMBB: + // ... + // cmpTY cr0, r1, r2 + // %TrueValue = li 1 + // bCC sinkMBB + MachineBasicBlock *copy0MBB = new MachineBasicBlock(LLVM_BB); + MachineBasicBlock *sinkMBB = new MachineBasicBlock(LLVM_BB); + BuildMI(BB, Opc, 2).addReg(PPC::CR0).addMBB(sinkMBB); + MachineFunction *F = BB->getParent(); + F->getBasicBlockList().insert(It, copy0MBB); + F->getBasicBlockList().insert(It, sinkMBB); + // Update machine-CFG edges + BB->addSuccessor(copy0MBB); + BB->addSuccessor(sinkMBB); + + // copy0MBB: + // %FalseValue = li 0 + // fallthrough + BB = copy0MBB; + // Update machine-CFG edges + BB->addSuccessor(sinkMBB); + + // sinkMBB: + // %Result = phi [ %FalseValue, copy0MBB ], [ %TrueValue, thisMBB ] + // ... + BB = sinkMBB; + BuildMI(BB, PPC::PHI, 4, Result).addReg(FalseValue) + .addMBB(copy0MBB).addReg(TrueValue).addMBB(thisMBB); + return Result; + } case ISD::SELECT: { unsigned TrueValue = SelectExpr(N.getOperand(1)); //Use if TRUE From lattner at cs.uiuc.edu Tue Aug 9 15:24:27 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 9 Aug 2005 15:24:27 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/PowerPC/rlwinm.ll Message-ID: <200508092024.PAA30366@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/PowerPC: rlwinm.ll updated: 1.1 -> 1.2 --- Log message: Add testcases for new rlwinm cases handled, patch by Jim Laskey! --- Diffs of the changes: (+44 -1) rlwinm.ll | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 44 insertions(+), 1 deletion(-) Index: llvm/test/Regression/CodeGen/PowerPC/rlwinm.ll diff -u llvm/test/Regression/CodeGen/PowerPC/rlwinm.ll:1.1 llvm/test/Regression/CodeGen/PowerPC/rlwinm.ll:1.2 --- llvm/test/Regression/CodeGen/PowerPC/rlwinm.ll:1.1 Wed Aug 3 13:27:17 2005 +++ llvm/test/Regression/CodeGen/PowerPC/rlwinm.ll Tue Aug 9 15:24:16 2005 @@ -1,6 +1,6 @@ ; All of these ands and shifts should be folded into rlwimi's ; RUN: llvm-as < rlwinm.ll | llc -march=ppc32 | not grep and && -; RUN: llvm-as < rlwinm.ll | llc -march=ppc32 | grep rlwinm | wc -l | grep 2 +; RUN: llvm-as < rlwinm.ll | llc -march=ppc32 | grep rlwinm | wc -l | grep 8 implementation ; Functions: @@ -15,3 +15,46 @@ %tmp.1 = and int %a, -268435441 ; [#uses=1] ret int %tmp.1 } + +int %test3(int %a) { +entry: + %tmp.2 = shr int %a, ubyte 8 ; [#uses=1] + %tmp.3 = and int %tmp.2, 255 ; [#uses=1] + ret int %tmp.3 +} + +uint %test4(uint %a) { +entry: + %tmp.3 = shr uint %a, ubyte 8 ; [#uses=1] + %tmp.4 = and uint %tmp.3, 255 ; [#uses=1] + ret uint %tmp.4 +} + +int %test5(int %a) { +entry: + %tmp.2 = shl int %a, ubyte 8 ; [#uses=1] + %tmp.3 = and int %tmp.2, -8388608 ; [#uses=1] + ret int %tmp.3 +} + +int %test6(int %a) { +entry: + %tmp.1 = and int %a, 65280 ; [#uses=1] + %tmp.2 = shr int %tmp.1, ubyte 8 ; [#uses=1] + ret int %tmp.2 +} + +uint %test7(uint %a) { +entry: + %tmp.1 = and uint %a, 65280 ; [#uses=1] + %tmp.2 = shr uint %tmp.1, ubyte 8 ; [#uses=1] + ret uint %tmp.2 +} + +int %test8(int %a) { +entry: + %tmp.1 = and int %a, 16711680 ; [#uses=1] + %tmp.2 = shl int %tmp.1, ubyte 8 ; [#uses=1] + ret int %tmp.2 +} + From lattner at cs.uiuc.edu Tue Aug 9 15:40:13 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 9 Aug 2005 15:40:13 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Message-ID: <200508092040.PAA30563@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAG.cpp updated: 1.130 -> 1.131 --- Log message: add cc nodes to the AllNodes list so they show up in Graphviz output --- Diffs of the changes: (+3 -1) SelectionDAG.cpp | 4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.130 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.131 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.130 Tue Aug 9 15:20:18 2005 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Tue Aug 9 15:40:02 2005 @@ -379,8 +379,10 @@ if ((unsigned)Cond >= CondCodeNodes.size()) CondCodeNodes.resize(Cond+1); - if (CondCodeNodes[Cond] == 0) + if (CondCodeNodes[Cond] == 0) { CondCodeNodes[Cond] = new CondCodeSDNode(Cond); + AllNodes.push_back(CondCodeNodes[Cond]); + } return SDOperand(CondCodeNodes[Cond], 0); } From lattner at persephone.cs.uiuc.edu Tue Aug 9 17:31:19 2005 From: lattner at persephone.cs.uiuc.edu (Chris Lattner) Date: Tue, 9 Aug 2005 17:31:19 -0500 (CDT) Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/README.txt Message-ID: <20050809223119.6B43C1370D45@persephone.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: README.txt updated: 1.26 -> 1.27 --- Log message: add a optimization note --- Diffs of the changes: (+18 -0) README.txt | 18 ++++++++++++++++++ 1 files changed, 18 insertions Index: llvm/lib/Target/PowerPC/README.txt diff -u llvm/lib/Target/PowerPC/README.txt:1.26 llvm/lib/Target/PowerPC/README.txt:1.27 --- llvm/lib/Target/PowerPC/README.txt:1.26 Fri Aug 5 14:18:32 2005 +++ llvm/lib/Target/PowerPC/README.txt Tue Aug 9 17:30:57 2005 @@ -11,6 +11,24 @@ * Support 'update' load/store instructions. These are cracked on the G5, but are still a codesize win. +* Add a custom legalizer for the GlobalAddress node, to move the funky darwin + stub stuff from the instruction selector to the legalizer (exposing low-level + operations to the dag for optzn. For example, we want to codegen this: + + int A = 0; + void B() { A++; } + as: + lis r9,ha16(_A) + lwz r2,lo16(_A)(r9) + addi r2,r2,1 + stw r2,lo16(_A)(r9) + not: + lis r2, ha16(_A) + lwz r2, lo16(_A)(r2) + addi r2, r2, 1 + lis r3, ha16(_A) + stw r2, lo16(_A)(r3) + * should hint to the branch select pass that it doesn't need to print the second unconditional branch, so we don't end up with things like: b .LBBl42__2E_expand_function_8_674 ; loopentry.24 From lattner at cs.uiuc.edu Tue Aug 9 18:09:04 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 9 Aug 2005 18:09:04 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAG.h Message-ID: <200508092309.SAA03916@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: SelectionDAG.h updated: 1.31 -> 1.32 --- Log message: I can't believe I caught this before Misha! :) --- Diffs of the changes: (+2 -2) SelectionDAG.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/include/llvm/CodeGen/SelectionDAG.h diff -u llvm/include/llvm/CodeGen/SelectionDAG.h:1.31 llvm/include/llvm/CodeGen/SelectionDAG.h:1.32 --- llvm/include/llvm/CodeGen/SelectionDAG.h:1.31 Tue Aug 9 15:19:34 2005 +++ llvm/include/llvm/CodeGen/SelectionDAG.h Tue Aug 9 18:08:53 2005 @@ -207,8 +207,8 @@ // Try to simplify a setcc built with the specified operands and cc. If // unable to simplify it, return a null SDOperand. - SDOperand SimplfySetCC(MVT::ValueType VT, SDOperand N1, - SDOperand N2, ISD::CondCode Cond); + SDOperand SimplifySetCC(MVT::ValueType VT, SDOperand N1, + SDOperand N2, ISD::CondCode Cond); // Maps to auto-CSE operations. From lattner at cs.uiuc.edu Tue Aug 9 18:09:16 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 9 Aug 2005 18:09:16 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Message-ID: <200508092309.SAA03927@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAG.cpp updated: 1.131 -> 1.132 --- Log message: Fix spelling, fix some broken canonicalizations by my last patch --- Diffs of the changes: (+11 -12) SelectionDAG.cpp | 23 +++++++++++------------ 1 files changed, 11 insertions(+), 12 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.131 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.132 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.131 Tue Aug 9 15:40:02 2005 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Tue Aug 9 18:09:05 2005 @@ -386,8 +386,8 @@ return SDOperand(CondCodeNodes[Cond], 0); } -SDOperand SelectionDAG::SimplfySetCC(MVT::ValueType VT, SDOperand N1, - SDOperand N2, ISD::CondCode Cond) { +SDOperand SelectionDAG::SimplifySetCC(MVT::ValueType VT, SDOperand N1, + SDOperand N2, ISD::CondCode Cond) { // These setcc operations always fold. switch (Cond) { default: break; @@ -484,17 +484,15 @@ if (Cond == ISD::SETGE || Cond == ISD::SETUGE) { if (C2 == MinVal) return getConstant(1, VT); // X >= MIN --> true --C2; // X >= C1 --> X > (C1-1) - Cond = (Cond == ISD::SETGE) ? ISD::SETGT : ISD::SETUGT; - N2 = getConstant(C2, N2.getValueType()); - N2C = cast(N2.Val); + return getSetCC(VT, N1, getConstant(C2, N2.getValueType()), + (Cond == ISD::SETGE) ? ISD::SETGT : ISD::SETUGT); } if (Cond == ISD::SETLE || Cond == ISD::SETULE) { if (C2 == MaxVal) return getConstant(1, VT); // X <= MAX --> true ++C2; // X <= C1 --> X < (C1+1) - Cond = (Cond == ISD::SETLE) ? ISD::SETLT : ISD::SETULT; - N2 = getConstant(C2, N2.getValueType()); - N2C = cast(N2.Val); + return getSetCC(VT, N1, getConstant(C2, N2.getValueType()), + (Cond == ISD::SETLE) ? ISD::SETLT : ISD::SETULT); } if ((Cond == ISD::SETLT || Cond == ISD::SETULT) && C2 == MinVal) @@ -566,8 +564,7 @@ } } else { // Ensure that the constant occurs on the RHS. - Cond = ISD::getSetCCSwappedOperands(Cond); - std::swap(N1, N2); + return getSetCC(VT, N2, N1, ISD::getSetCCSwappedOperands(Cond)); } if (N1 == N2) { @@ -581,7 +578,9 @@ return getConstant(UOF, VT); // Otherwise, we can't fold it. However, we can simplify it to SETUO/SETO // if it is not already. - Cond = UOF == 0 ? ISD::SETUO : ISD::SETO; + ISD::CondCode NewCond = UOF == 0 ? ISD::SETUO : ISD::SETO; + if (NewCond != Cond) + return getSetCC(VT, N1, N2, NewCond); } if ((Cond == ISD::SETEQ || Cond == ISD::SETNE) && @@ -1356,7 +1355,7 @@ switch (Opcode) { case ISD::SETCC: { // Use SimplifySetCC to simplify SETCC's. - SDOperand Simp = SimplfySetCC(VT, N1, N2, cast(N3)->get()); + SDOperand Simp = SimplifySetCC(VT, N1, N2, cast(N3)->get()); if (Simp.Val) return Simp; break; } From lattner at cs.uiuc.edu Tue Aug 9 18:36:29 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 9 Aug 2005 18:36:29 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/ScalarEvolution.h Message-ID: <200508092336.SAA13655@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: ScalarEvolution.h updated: 1.10 -> 1.11 --- Log message: add two helper methods --- Diffs of the changes: (+8 -0) ScalarEvolution.h | 8 ++++++++ 1 files changed, 8 insertions(+) Index: llvm/include/llvm/Analysis/ScalarEvolution.h diff -u llvm/include/llvm/Analysis/ScalarEvolution.h:1.10 llvm/include/llvm/Analysis/ScalarEvolution.h:1.11 --- llvm/include/llvm/Analysis/ScalarEvolution.h:1.10 Thu Apr 21 15:16:32 2005 +++ llvm/include/llvm/Analysis/ScalarEvolution.h Tue Aug 9 18:36:18 2005 @@ -195,6 +195,14 @@ /// specified expression. SCEVHandle getSCEV(Value *V) const; + /// hasSCEV - Return true if the SCEV for this value has already been + /// computed. + bool hasSCEV(Value *V) const; + + /// setSCEV - Insert the specified SCEV into the map of current SCEVs for + /// the specified value. + void setSCEV(Value *V, const SCEVHandle &H); + /// getSCEVAtScope - Return a SCEV expression handle for the specified value /// at the specified scope in the program. The L value specifies a loop /// nest to evaluate the expression at, where null is the top-level or a From lattner at cs.uiuc.edu Tue Aug 9 18:36:44 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 9 Aug 2005 18:36:44 -0500 Subject: [llvm-commits] CVS: llvm/lib/Analysis/ScalarEvolution.cpp Message-ID: <200508092336.SAA13665@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis: ScalarEvolution.cpp updated: 1.38 -> 1.39 --- Log message: implement two helper methods --- Diffs of the changes: (+28 -0) ScalarEvolution.cpp | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+) Index: llvm/lib/Analysis/ScalarEvolution.cpp diff -u llvm/lib/Analysis/ScalarEvolution.cpp:1.38 llvm/lib/Analysis/ScalarEvolution.cpp:1.39 --- llvm/lib/Analysis/ScalarEvolution.cpp:1.38 Thu Apr 21 16:04:58 2005 +++ llvm/lib/Analysis/ScalarEvolution.cpp Tue Aug 9 18:36:33 2005 @@ -1095,6 +1095,20 @@ /// expression and create a new one. SCEVHandle getSCEV(Value *V); + /// hasSCEV - Return true if the SCEV for this value has already been + /// computed. + bool hasSCEV(Value *V) const { + return Scalars.count(V); + } + + /// setSCEV - Insert the specified SCEV into the map of current SCEVs for + /// the specified value. + void setSCEV(Value *V, const SCEVHandle &H) { + bool isNew = Scalars.insert(std::make_pair(V, H)).second; + assert(isNew && "This entry already existed!"); + } + + /// getSCEVAtScope - Compute the value of the specified expression within /// the indicated loop (which may be null to indicate in no loop). If the /// expression cannot be evaluated, return UnknownValue itself. @@ -2327,6 +2341,20 @@ return ((ScalarEvolutionsImpl*)Impl)->getSCEV(V); } +/// hasSCEV - Return true if the SCEV for this value has already been +/// computed. +bool ScalarEvolution::hasSCEV(Value *V) const { + ((ScalarEvolutionsImpl*)Impl)->hasSCEV(V); +} + + +/// setSCEV - Insert the specified SCEV into the map of current SCEVs for +/// the specified value. +void ScalarEvolution::setSCEV(Value *V, const SCEVHandle &H) { + ((ScalarEvolutionsImpl*)Impl)->setSCEV(V, H); +} + + SCEVHandle ScalarEvolution::getIterationCount(const Loop *L) const { return ((ScalarEvolutionsImpl*)Impl)->getIterationCount(L); } From lattner at cs.uiuc.edu Tue Aug 9 18:39:47 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 9 Aug 2005 18:39:47 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Message-ID: <200508092339.SAA13691@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: LoopStrengthReduce.cpp updated: 1.44 -> 1.45 --- Log message: Fix some 80 column violations. Once we compute the evolution for a GEP, tell SE about it. This allows users of the GEP to know it, if the users are not direct. This allows us to compile this testcase: void fbSolidFillmmx(int w, unsigned char *d) { while (w >= 64) { *(unsigned long long *) (d + 0) = 0; *(unsigned long long *) (d + 8) = 0; *(unsigned long long *) (d + 16) = 0; *(unsigned long long *) (d + 24) = 0; *(unsigned long long *) (d + 32) = 0; *(unsigned long long *) (d + 40) = 0; *(unsigned long long *) (d + 48) = 0; *(unsigned long long *) (d + 56) = 0; w -= 64; d += 64; } } into: .LBB_fbSolidFillmmx_2: ; no_exit li r2, 0 stw r2, 0(r4) stw r2, 4(r4) stw r2, 8(r4) stw r2, 12(r4) stw r2, 16(r4) stw r2, 20(r4) stw r2, 24(r4) stw r2, 28(r4) stw r2, 32(r4) stw r2, 36(r4) stw r2, 40(r4) stw r2, 44(r4) stw r2, 48(r4) stw r2, 52(r4) stw r2, 56(r4) stw r2, 60(r4) addi r4, r4, 64 addi r3, r3, -64 cmpwi cr0, r3, 63 bgt .LBB_fbSolidFillmmx_2 ; no_exit instead of: .LBB_fbSolidFillmmx_2: ; no_exit li r11, 0 stw r11, 0(r4) stw r11, 4(r4) stwx r11, r10, r4 add r12, r10, r4 stw r11, 4(r12) stwx r11, r9, r4 add r12, r9, r4 stw r11, 4(r12) stwx r11, r8, r4 add r12, r8, r4 stw r11, 4(r12) stwx r11, r7, r4 add r12, r7, r4 stw r11, 4(r12) stwx r11, r6, r4 add r12, r6, r4 stw r11, 4(r12) stwx r11, r5, r4 add r12, r5, r4 stw r11, 4(r12) stwx r11, r2, r4 add r12, r2, r4 stw r11, 4(r12) addi r4, r4, 64 addi r3, r3, -64 cmpwi cr0, r3, 63 bgt .LBB_fbSolidFillmmx_2 ; no_exit --- Diffs of the changes: (+11 -6) LoopStrengthReduce.cpp | 17 +++++++++++------ 1 files changed, 11 insertions(+), 6 deletions(-) Index: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp diff -u llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.44 llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.45 --- llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.44 Mon Aug 8 20:13:47 2005 +++ llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Tue Aug 9 18:39:36 2005 @@ -204,8 +204,12 @@ /// GetExpressionSCEV - Compute and return the SCEV for the specified /// instruction. SCEVHandle LoopStrengthReduce::GetExpressionSCEV(Instruction *Exp, Loop *L) { + // Scalar Evolutions doesn't know how to compute SCEV's for GEP instructions. + // If this is a GEP that SE doesn't know about, compute it now and insert it. + // If this is not a GEP, or if we have already done this computation, just let + // SE figure it out. GetElementPtrInst *GEP = dyn_cast(Exp); - if (!GEP) + if (!GEP || SE->hasSCEV(GEP)) return SE->getSCEV(Exp); // Analyze all of the subscripts of this getelementptr instruction, looking @@ -241,6 +245,7 @@ } } + SE->setSCEV(GEP, GEPVal); return GEPVal; } @@ -692,7 +697,7 @@ assert(SomeLoopPHI->getNumIncomingValues() == 2 && "This loop isn't canonicalized right"); BasicBlock *LatchBlock = - SomeLoopPHI->getIncomingBlock(SomeLoopPHI->getIncomingBlock(0) == Preheader); + SomeLoopPHI->getIncomingBlock(SomeLoopPHI->getIncomingBlock(0) == Preheader); // Create a new Phi for this base, and stick it in the loop header. const Type *ReplacedTy = CommonExprs->getType(); @@ -898,10 +903,10 @@ while ((PN = dyn_cast(I))) { ++I; // Preincrement iterator to avoid invalidating it when deleting PN. - // At this point, we know that we have killed one or more GEP instructions. - // It is worth checking to see if the cann indvar is also dead, so that we - // can remove it as well. The requirements for the cann indvar to be - // considered dead are: + // At this point, we know that we have killed one or more GEP + // instructions. It is worth checking to see if the cann indvar is also + // dead, so that we can remove it as well. The requirements for the cann + // indvar to be considered dead are: // 1. the cann indvar has one use // 2. the use is an add instruction // 3. the add has one use From lattner at cs.uiuc.edu Tue Aug 9 19:33:15 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 9 Aug 2005 19:33:15 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/LoopStrengthReduce/phi_node_update_multiple_preds.ll Message-ID: <200508100033.TAA16620@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/LoopStrengthReduce: phi_node_update_multiple_preds.ll added (r1.1) --- Log message: new testcase --- Diffs of the changes: (+29 -0) phi_node_update_multiple_preds.ll | 29 +++++++++++++++++++++++++++++ 1 files changed, 29 insertions(+) Index: llvm/test/Regression/Transforms/LoopStrengthReduce/phi_node_update_multiple_preds.ll diff -c /dev/null llvm/test/Regression/Transforms/LoopStrengthReduce/phi_node_update_multiple_preds.ll:1.1 *** /dev/null Tue Aug 9 19:33:11 2005 --- llvm/test/Regression/Transforms/LoopStrengthReduce/phi_node_update_multiple_preds.ll Tue Aug 9 19:33:01 2005 *************** *** 0 **** --- 1,29 ---- + ; RUN: llvm-as < %s | opt -loop-reduce -disable-output + ; LSR should not crash on this. + + fastcc void %loadloop() { + entry: + switch sbyte 0, label %shortcirc_next [ + sbyte 32, label %loopexit.2 + sbyte 59, label %loopexit.2 + ] + + shortcirc_next: ; preds = %no_exit.2, %entry + %indvar37 = phi uint [ 0, %entry ], [ %indvar.next38, %no_exit.2 ] ; [#uses=3] + %wp.2.4 = getelementptr sbyte* null, uint %indvar37 ; [#uses=1] + br bool false, label %loopexit.2, label %no_exit.2 + + no_exit.2: ; preds = %shortcirc_next + %wp.2.4.rec = cast uint %indvar37 to int ; [#uses=1] + %inc.1.rec = add int %wp.2.4.rec, 1 ; [#uses=1] + %inc.1 = getelementptr sbyte* null, int %inc.1.rec ; [#uses=2] + %indvar.next38 = add uint %indvar37, 1 ; [#uses=1] + switch sbyte 0, label %shortcirc_next [ + sbyte 32, label %loopexit.2 + sbyte 59, label %loopexit.2 + ] + + loopexit.2: ; preds = %no_exit.2, %no_exit.2, %shortcirc_next, %entry, %entry + %wp.2.7 = phi sbyte* [ null, %entry ], [ null, %entry ], [ %wp.2.4, %shortcirc_next ], [ %inc.1, %no_exit.2 ], [ %inc.1, %no_exit.2 ] ; [#uses=0] + ret void + } From lattner at cs.uiuc.edu Tue Aug 9 19:35:43 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 9 Aug 2005 19:35:43 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Message-ID: <200508100035.TAA16921@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: LoopStrengthReduce.cpp updated: 1.45 -> 1.46 --- Log message: Fix Regression/Transforms/LoopStrengthReduce/phi_node_update_multiple_preds.ll by being more careful about updating PHI nodes --- Diffs of the changes: (+14 -7) LoopStrengthReduce.cpp | 21 ++++++++++++++------- 1 files changed, 14 insertions(+), 7 deletions(-) Index: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp diff -u llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.45 llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.46 --- llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.45 Tue Aug 9 18:39:36 2005 +++ llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Tue Aug 9 19:35:32 2005 @@ -423,21 +423,28 @@ } // PHI nodes are more complex. We have to insert one copy of the NewBase+Imm - // expression into each operand block that uses it. + // expression into each operand block that uses it. Note that PHI nodes can + // have multiple entries for the same predecessor. We use a map to make sure + // that a PHI node only has a single Value* for each predecessor (which also + // prevents us from inserting duplicate code in some blocks). + std::map InsertedCode; PHINode *PN = cast(Inst); for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i) { if (PN->getIncomingValue(i) == OperandValToReplace) { // FIXME: this should split any critical edges. - // Insert the code into the end of the predecessor block. - BasicBlock::iterator InsertPt = PN->getIncomingBlock(i)->getTerminator(); + Value *&Code = InsertedCode[PN->getIncomingBlock(i)]; + if (!Code) { + // Insert the code into the end of the predecessor block. + BasicBlock::iterator InsertPt =PN->getIncomingBlock(i)->getTerminator(); - SCEVHandle NewValSCEV = SCEVAddExpr::get(NewBase, Imm); - Value *NewVal = Rewriter.expandCodeFor(NewValSCEV, InsertPt, - OperandValToReplace->getType()); + SCEVHandle NewValSCEV = SCEVAddExpr::get(NewBase, Imm); + Code = Rewriter.expandCodeFor(NewValSCEV, InsertPt, + OperandValToReplace->getType()); + } // Replace the use of the operand Value with the new Phi we just created. - PN->setIncomingValue(i, NewVal); + PN->setIncomingValue(i, Code); Rewriter.clear(); } } From lattner at cs.uiuc.edu Tue Aug 9 19:45:32 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 9 Aug 2005 19:45:32 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Message-ID: <200508100045.TAA18092@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: LoopStrengthReduce.cpp updated: 1.46 -> 1.47 --- Log message: Teach LSR to strength reduce IVs that have a loop-invariant but non-constant stride. For code like this: void foo(float *a, float *b, int n, int stride_a, int stride_b) { int i; for (i=0; i NumReduced ("loop-reduce", "Number of GEPs strength reduced"); Statistic<> NumInserted("loop-reduce", "Number of PHIs inserted"); + Statistic<> NumVariable("loop-reduce","Number of PHIs with variable strides"); /// IVStrideUse - Keep track of one use of a strided induction variable, where /// the stride is stored externally. The Offset member keeps track of the @@ -87,7 +88,7 @@ /// IVUsesByStride - Keep track of all uses of induction variables that we /// are interested in. The key of the map is the stride of the access. - std::map IVUsesByStride; + std::map IVUsesByStride; /// CastedValues - As we need to cast values to uintptr_t, this keeps track /// of the casted version of each value. This is accessed by @@ -136,7 +137,8 @@ void OptimizeIndvars(Loop *L); - void StrengthReduceStridedIVUsers(Value *Stride, IVUsersOfOneStride &Uses, + void StrengthReduceStridedIVUsers(const SCEVHandle &Stride, + IVUsersOfOneStride &Uses, Loop *L, bool isOnlyStride); void DeleteTriviallyDeadInstructions(std::set &Insts); }; @@ -254,7 +256,7 @@ /// is. The stride must be a loop invariant expression, but the start may be /// a mix of loop invariant and loop variant expressions. static bool getSCEVStartAndStride(const SCEVHandle &SH, Loop *L, - SCEVHandle &Start, Value *&Stride) { + SCEVHandle &Start, SCEVHandle &Stride) { SCEVHandle TheAddRec = Start; // Initialize to zero. // If the outer level is an AddExpr, the operands are all start values except @@ -285,16 +287,17 @@ Start = SCEVAddExpr::get(Start, AddRec->getOperand(0)); - // FIXME: generalize to IV's with more complex strides (must emit stride - // expression outside of loop!) if (!isa(AddRec->getOperand(1))) - return false; - - SCEVConstant *StrideC = cast(AddRec->getOperand(1)); - Stride = StrideC->getValue(); + DEBUG(std::cerr << "[" << L->getHeader()->getName() + << "] Variable stride: " << *AddRec << "\n"); - assert(Stride->getType()->isUnsigned() && + Stride = AddRec->getOperand(1); + // Check that all constant strides are the unsigned type, we don't want to + // have two IV's one of signed stride 4 and one of unsigned stride 4 to not be + // merged. + assert((!isa(Stride) || Stride->getType()->isUnsigned()) && "Constants should be canonicalized to unsigned!"); + return true; } @@ -313,7 +316,7 @@ // Get the start and stride for this expression. SCEVHandle Start = SCEVUnknown::getIntegerSCEV(0, ISE->getType()); - Value *Stride = 0; + SCEVHandle Stride = Start; if (!getSCEVStartAndStride(ISE, L, Start, Stride)) return false; // Non-reducible symbolic expression, bail out. @@ -638,7 +641,7 @@ /// StrengthReduceStridedIVUsers - Strength reduce all of the users of a single /// stride of IV. All of the users may have different starting values, and this /// may not be the only stride (we know it is if isOnlyStride is true). -void LoopStrengthReduce::StrengthReduceStridedIVUsers(Value *Stride, +void LoopStrengthReduce::StrengthReduceStridedIVUsers(const SCEVHandle &Stride, IVUsersOfOneStride &Uses, Loop *L, bool isOnlyStride) { @@ -711,6 +714,12 @@ PHINode *NewPHI = new PHINode(ReplacedTy, "iv.", PhiInsertBefore); ++NumInserted; + // Insert the stride into the preheader. + Value *StrideV = PreheaderRewriter.expandCodeFor(Stride, PreInsertPt, + ReplacedTy); + if (!isa(StrideV)) ++NumVariable; + + // Emit the initial base value into the loop preheader, and add it to the // Phi node. Value *PHIBaseV = PreheaderRewriter.expandCodeFor(CommonExprs, PreInsertPt, @@ -720,7 +729,7 @@ // Emit the increment of the base value before the terminator of the loop // latch block, and add it to the Phi node. SCEVHandle IncExp = SCEVAddExpr::get(SCEVUnknown::get(NewPHI), - SCEVUnknown::get(Stride)); + SCEVUnknown::get(StrideV)); Value *IncV = Rewriter.expandCodeFor(IncExp, LatchBlock->getTerminator(), ReplacedTy); @@ -815,15 +824,16 @@ // Search IVUsesByStride to find Cond's IVUse if there is one. IVStrideUse *CondUse = 0; - Value *CondStride = 0; + const SCEVHandle *CondStride = 0; - for (std::map::iterator I =IVUsesByStride.begin(), - E = IVUsesByStride.end(); I != E && !CondUse; ++I) + for (std::map::iterator + I = IVUsesByStride.begin(), E = IVUsesByStride.end(); + I != E && !CondUse; ++I) for (std::vector::iterator UI = I->second.Users.begin(), E = I->second.Users.end(); UI != E; ++UI) if (UI->User == Cond) { CondUse = &*UI; - CondStride = I->first; + CondStride = &I->first; // NOTE: we could handle setcc instructions with multiple uses here, but // InstCombine does it as well for simple uses, it's not clear that it // occurs enough in real life to handle. @@ -832,7 +842,8 @@ if (!CondUse) return; // setcc doesn't use the IV. // setcc stride is complex, don't mess with users. - if (!isa(CondStride)) return; + // FIXME: Evaluate whether this is a good idea or not. + if (!isa(*CondStride)) return; // It's possible for the setcc instruction to be anywhere in the loop, and // possible for it to have multiple users. If it is not immediately before @@ -847,17 +858,16 @@ LatchBlock->getInstList().insert(TermBr, Cond); // Clone the IVUse, as the old use still exists! - IVUsesByStride[CondStride].addUser(CondUse->Offset, Cond, + IVUsesByStride[*CondStride].addUser(CondUse->Offset, Cond, CondUse->OperandValToReplace); - CondUse = &IVUsesByStride[CondStride].Users.back(); + CondUse = &IVUsesByStride[*CondStride].Users.back(); } } // If we get to here, we know that we can transform the setcc instruction to // use the post-incremented version of the IV, allowing us to coallesce the // live ranges for the IV correctly. - CondUse->Offset = SCEV::getMinusSCEV(CondUse->Offset, - SCEVUnknown::get(CondStride)); + CondUse->Offset = SCEV::getMinusSCEV(CondUse->Offset, *CondStride); CondUse->isUseOfPostIncrementedValue = true; } @@ -897,7 +907,7 @@ // Note: this processes each stride/type pair individually. All users passed // into StrengthReduceStridedIVUsers have the same type AND stride. - for (std::map::iterator SI + for (std::map::iterator SI = IVUsesByStride.begin(), E = IVUsesByStride.end(); SI != E; ++SI) StrengthReduceStridedIVUsers(SI->first, SI->second, L, HasOneStride); From lattner at cs.uiuc.edu Tue Aug 9 19:48:23 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 9 Aug 2005 19:48:23 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/LoopStrengthReduce/variable_stride.ll Message-ID: <200508100048.TAA18134@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/LoopStrengthReduce: variable_stride.ll added (r1.1) --- Log message: new testcase we handle --- Diffs of the changes: (+17 -0) variable_stride.ll | 17 +++++++++++++++++ 1 files changed, 17 insertions(+) Index: llvm/test/Regression/Transforms/LoopStrengthReduce/variable_stride.ll diff -c /dev/null llvm/test/Regression/Transforms/LoopStrengthReduce/variable_stride.ll:1.1 *** /dev/null Tue Aug 9 19:48:21 2005 --- llvm/test/Regression/Transforms/LoopStrengthReduce/variable_stride.ll Tue Aug 9 19:48:11 2005 *************** *** 0 **** --- 1,17 ---- + ; Check that variable strides are reduced to adds instead of multiplies. + ; RUN: llvm-as < %s | opt -loop-reduce | llvm-dis | not grep 'mul' + + declare bool %pred(int) + + void %test([10000 x int]* %P, int %STRIDE) { + br label %Loop + Loop: + %INDVAR = phi int [0, %0], [%INDVAR2, %Loop] + %Idx = mul int %INDVAR, %STRIDE + + %cond = call bool %pred(int %Idx) + %INDVAR2 = add int %INDVAR, 1 + br bool %cond, label %Loop, label %Out + Out: + ret void + } From lattner at cs.uiuc.edu Tue Aug 9 19:59:51 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 9 Aug 2005 19:59:51 -0500 Subject: [llvm-commits] CVS: llvm/lib/Analysis/ScalarEvolution.cpp Message-ID: <200508100059.TAA18560@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis: ScalarEvolution.cpp updated: 1.39 -> 1.40 --- Log message: Fix an obvious oops --- Diffs of the changes: (+1 -1) ScalarEvolution.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Analysis/ScalarEvolution.cpp diff -u llvm/lib/Analysis/ScalarEvolution.cpp:1.39 llvm/lib/Analysis/ScalarEvolution.cpp:1.40 --- llvm/lib/Analysis/ScalarEvolution.cpp:1.39 Tue Aug 9 18:36:33 2005 +++ llvm/lib/Analysis/ScalarEvolution.cpp Tue Aug 9 19:59:40 2005 @@ -2344,7 +2344,7 @@ /// hasSCEV - Return true if the SCEV for this value has already been /// computed. bool ScalarEvolution::hasSCEV(Value *V) const { - ((ScalarEvolutionsImpl*)Impl)->hasSCEV(V); + return ((ScalarEvolutionsImpl*)Impl)->hasSCEV(V); } From lattner at cs.uiuc.edu Tue Aug 9 20:11:35 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 9 Aug 2005 20:11:35 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/IndVarsSimplify/variable-stride-ivs.ll Message-ID: <200508100111.UAA19943@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/IndVarsSimplify: variable-stride-ivs.ll added (r1.1) --- Log message: new testcase --- Diffs of the changes: (+41 -0) variable-stride-ivs.ll | 41 +++++++++++++++++++++++++++++++++++++++++ 1 files changed, 41 insertions(+) Index: llvm/test/Regression/Transforms/IndVarsSimplify/variable-stride-ivs.ll diff -c /dev/null llvm/test/Regression/Transforms/IndVarsSimplify/variable-stride-ivs.ll:1.1 *** /dev/null Tue Aug 9 20:11:34 2005 --- llvm/test/Regression/Transforms/IndVarsSimplify/variable-stride-ivs.ll Tue Aug 9 20:11:24 2005 *************** *** 0 **** --- 1,41 ---- + ; RUN: llvm-as < %s | opt -indvars -instcombine | llvm-dis | grep 'store int 0' + ; Test that -indvars can reduce variable stride IVs. If it can reduce variable + ; stride iv's, it will make %iv. and %m.0.0 isomorphic to each other without + ; cycles, allowing the tmp.21 subtraction to be eliminated. + + void %vnum_test8(int* %data) { + entry: + %tmp.1 = getelementptr int* %data, int 3 ; [#uses=1] + %tmp.2 = load int* %tmp.1 ; [#uses=2] + %tmp.4 = getelementptr int* %data, int 4 ; [#uses=1] + %tmp.5 = load int* %tmp.4 ; [#uses=2] + %tmp.8 = getelementptr int* %data, int 2 ; [#uses=1] + %tmp.9 = load int* %tmp.8 ; [#uses=3] + %tmp.125 = setgt int %tmp.2, 0 ; [#uses=1] + br bool %tmp.125, label %no_exit.preheader, label %return + + no_exit.preheader: ; preds = %entry + %tmp.16 = getelementptr int* %data, int %tmp.9 ; [#uses=1] + br label %no_exit + + no_exit: ; preds = %no_exit, %no_exit.preheader + %iv. = phi uint [ 0, %no_exit.preheader ], [ %iv..inc, %no_exit ] ; [#uses=1] + %iv. = phi int [ %tmp.5, %no_exit.preheader ], [ %iv..inc, %no_exit ] ; [#uses=2] + %m.0.0 = phi int [ %tmp.5, %no_exit.preheader ], [ %tmp.24, %no_exit ] ; [#uses=2] + store int 2, int* %tmp.16 + %tmp.21 = sub int %m.0.0, %iv. ; [#uses=1] + store int %tmp.21, int* %data + %tmp.24 = add int %m.0.0, %tmp.9 ; [#uses=1] + %iv..inc = add int %tmp.9, %iv. ; [#uses=1] + %iv..inc = add uint %iv., 1 ; [#uses=2] + %iv..inc1 = cast uint %iv..inc to int ; [#uses=1] + %tmp.12 = setlt int %iv..inc1, %tmp.2 ; [#uses=1] + br bool %tmp.12, label %no_exit, label %return.loopexit + + return.loopexit: ; preds = %no_exit + br label %return + + return: ; preds = %return.loopexit, %entry + ret void + } + From lattner at cs.uiuc.edu Tue Aug 9 20:12:17 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 9 Aug 2005 20:12:17 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp Message-ID: <200508100112.UAA19957@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: IndVarSimplify.cpp updated: 1.79 -> 1.80 --- Log message: Allow indvar simplify to canonicalize ANY affine IV, not just affine IVs with constant stride. This implements Transforms/IndVarsSimplify/variable-stride-ivs.ll --- Diffs of the changes: (+8 -8) IndVarSimplify.cpp | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) Index: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp diff -u llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.79 llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.80 --- llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.79 Fri Jul 29 19:12:19 2005 +++ llvm/lib/Transforms/Scalar/IndVarSimplify.cpp Tue Aug 9 20:12:06 2005 @@ -128,9 +128,9 @@ unsigned PreheaderIdx = PN->getBasicBlockIndex(Preheader); unsigned BackedgeIdx = PreheaderIdx^1; if (GetElementPtrInst *GEPI = - dyn_cast(PN->getIncomingValue(BackedgeIdx))) + dyn_cast(PN->getIncomingValue(BackedgeIdx))) if (GEPI->getOperand(0) == PN) { - assert(GEPI->getNumOperands() == 2 && "GEP types must mismatch!"); + assert(GEPI->getNumOperands() == 2 && "GEP types must match!"); // Okay, we found a pointer recurrence. Transform this pointer // recurrence into an integer recurrence. Compute the value that gets @@ -407,13 +407,13 @@ if (PN->getType()->isInteger()) { // FIXME: when we have fast-math, enable! SCEVHandle SCEV = SE->getSCEV(PN); if (SCEV->hasComputableLoopEvolution(L)) - // FIXME: Without a strength reduction pass, it is an extremely bad idea - // to indvar substitute anything more complex than a linear induction - // variable. Doing so will put expensive multiply instructions inside - // of the loop. For now just disable indvar subst on anything more - // complex than a linear addrec. + // FIXME: It is an extremely bad idea to indvar substitute anything more + // complex than affine induction variables. Doing so will put expensive + // polynomial evaluations inside of the loop, and the str reduction pass + // currently can only reduce affine polynomials. For now just disable + // indvar subst on anything more complex than an affine addrec. if (SCEVAddRecExpr *AR = dyn_cast(SCEV)) - if (AR->getNumOperands() == 2 && isa(AR->getOperand(1))) + if (AR->isAffine()) IndVars.push_back(std::make_pair(PN, SCEV)); } } From lattner at cs.uiuc.edu Tue Aug 9 21:06:48 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 9 Aug 2005 21:06:48 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/LoopSimplify/phi-node-simplify.ll Message-ID: <200508100206.VAA21482@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/LoopSimplify: phi-node-simplify.ll added (r1.1) --- Log message: New testcase --- Diffs of the changes: (+59 -0) phi-node-simplify.ll | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 59 insertions(+) Index: llvm/test/Regression/Transforms/LoopSimplify/phi-node-simplify.ll diff -c /dev/null llvm/test/Regression/Transforms/LoopSimplify/phi-node-simplify.ll:1.1 *** /dev/null Tue Aug 9 21:06:45 2005 --- llvm/test/Regression/Transforms/LoopSimplify/phi-node-simplify.ll Tue Aug 9 21:06:35 2005 *************** *** 0 **** --- 1,59 ---- + ; Loop Simplify should turn phi nodes like X = phi [X, Y] into just Y, eliminating them. + ; RUN: llvm-as < %s | opt -loopsimplify | llvm-dis | grep phi | wc -l | grep 6 + + %A = weak global [3000000 x int] zeroinitializer ; <[3000000 x int]*> [#uses=1] + %B = weak global [20000 x int] zeroinitializer ; <[20000 x int]*> [#uses=1] + %C = weak global [100 x int] zeroinitializer ; <[100 x int]*> [#uses=1] + %Z = weak global int 0 ; [#uses=2] + + implementation ; Functions: + + int %main() { + entry: + tail call void %__main( ) + br label %loopentry.1 + + loopentry.1: ; preds = %loopexit.1, %entry + %indvar20 = phi uint [ 0, %entry ], [ %indvar.next21, %loopexit.1 ] ; [#uses=1] + %a.1 = phi int* [ getelementptr ([3000000 x int]* %A, int 0, int 0), %entry ], [ %inc.0, %loopexit.1 ] ; [#uses=1] + br label %no_exit.2 + + no_exit.2: ; preds = %loopexit.2, %no_exit.2, %loopentry.1 + %a.0.4.ph = phi int* [ %a.1, %loopentry.1 ], [ %inc.0, %loopexit.2 ], [ %a.0.4.ph, %no_exit.2 ] ; [#uses=3] + %b.1.4.ph = phi int* [ getelementptr ([20000 x int]* %B, int 0, int 0), %loopentry.1 ], [ %inc.1, %loopexit.2 ], [ %b.1.4.ph, %no_exit.2 ] ; [#uses=3] + %indvar17 = phi uint [ 0, %loopentry.1 ], [ %indvar.next18, %loopexit.2 ], [ %indvar17, %no_exit.2 ] ; [#uses=2] + %indvar = phi uint [ %indvar.next, %no_exit.2 ], [ 0, %loopexit.2 ], [ 0, %loopentry.1 ] ; [#uses=5] + %b.1.4.rec = cast uint %indvar to int ; [#uses=1] + %c.2.4 = getelementptr [100 x int]* %C, int 0, uint %indvar ; [#uses=1] + %a.0.4 = getelementptr int* %a.0.4.ph, uint %indvar ; [#uses=1] + %b.1.4 = getelementptr int* %b.1.4.ph, uint %indvar ; [#uses=1] + %inc.0.rec = add int %b.1.4.rec, 1 ; [#uses=2] + %inc.0 = getelementptr int* %a.0.4.ph, int %inc.0.rec ; [#uses=2] + %tmp.13 = load int* %a.0.4 ; [#uses=1] + %inc.1 = getelementptr int* %b.1.4.ph, int %inc.0.rec ; [#uses=1] + %tmp.15 = load int* %b.1.4 ; [#uses=1] + %tmp.18 = load int* %c.2.4 ; [#uses=1] + %tmp.16 = mul int %tmp.15, %tmp.13 ; [#uses=1] + %tmp.19 = mul int %tmp.16, %tmp.18 ; [#uses=1] + %tmp.20 = load int* %Z ; [#uses=1] + %tmp.21 = add int %tmp.19, %tmp.20 ; [#uses=1] + store int %tmp.21, int* %Z + %indvar.next = add uint %indvar, 1 ; [#uses=2] + %exitcond = seteq uint %indvar.next, 100 ; [#uses=1] + br bool %exitcond, label %loopexit.2, label %no_exit.2 + + loopexit.2: ; preds = %no_exit.2 + %indvar.next18 = add uint %indvar17, 1 ; [#uses=2] + %exitcond19 = seteq uint %indvar.next18, 200 ; [#uses=1] + br bool %exitcond19, label %loopexit.1, label %no_exit.2 + + loopexit.1: ; preds = %loopexit.2 + %indvar.next21 = add uint %indvar20, 1 ; [#uses=2] + %exitcond22 = seteq uint %indvar.next21, 300 ; [#uses=1] + br bool %exitcond22, label %return, label %loopentry.1 + + return: ; preds = %loopexit.1 + ret int undef + } + + declare void %__main() From lattner at cs.uiuc.edu Tue Aug 9 21:07:43 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 9 Aug 2005 21:07:43 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopSimplify.cpp Message-ID: <200508100207.VAA21684@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: LoopSimplify.cpp updated: 1.58 -> 1.59 --- Log message: Make loop-simplify produce better loops by turning PHI nodes like X = phi [X, Y] into just Y. This often occurs when it seperates loops that have collapsed loop headers. This implements LoopSimplify/phi-node-simplify.ll --- Diffs of the changes: (+16 -1) LoopSimplify.cpp | 17 ++++++++++++++++- 1 files changed, 16 insertions(+), 1 deletion(-) Index: llvm/lib/Transforms/Scalar/LoopSimplify.cpp diff -u llvm/lib/Transforms/Scalar/LoopSimplify.cpp:1.58 llvm/lib/Transforms/Scalar/LoopSimplify.cpp:1.59 --- llvm/lib/Transforms/Scalar/LoopSimplify.cpp:1.58 Thu Aug 4 19:56:55 2005 +++ llvm/lib/Transforms/Scalar/LoopSimplify.cpp Tue Aug 9 21:07:32 2005 @@ -71,7 +71,7 @@ AU.addPreserved(); AU.addPreserved(); AU.addPreserved(); - AU.addPreservedID(BreakCriticalEdgesID); // No crit edges added.... + AU.addPreservedID(BreakCriticalEdgesID); // No critical edges added. } private: bool ProcessLoop(Loop *L); @@ -190,8 +190,23 @@ Changed = true; } + // Scan over the PHI nodes in the loop header. Since they now have only two + // incoming values (the loop is canonicalized), we may have simplified the PHI + // down to 'X = phi [X, Y]', which should be replaced with 'Y'. + PHINode *PN; + DominatorSet &DS = getAnalysis(); + for (BasicBlock::iterator I = L->getHeader()->begin(); + (PN = dyn_cast(I++)); ) + if (Value *V = PN->hasConstantValue(true)) + if (!isa(V) || + DS.dominates(cast(V)->getParent(), L->getHeader())) { + PN->replaceAllUsesWith(V); + PN->eraseFromParent(); + } + for (Loop::iterator I = L->begin(), E = L->end(); I != E; ++I) Changed |= ProcessLoop(*I); + return Changed; } From lattner at persephone.cs.uiuc.edu Tue Aug 9 22:40:31 2005 From: lattner at persephone.cs.uiuc.edu (Chris Lattner) Date: Tue, 9 Aug 2005 22:40:31 -0500 (CDT) Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Message-ID: <20050810034031.C896613732A8@persephone.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPC32ISelPattern.cpp updated: 1.127 -> 1.128 --- Log message: Fix a bug compiling: select (i32 < i32), f32, f32 --- Diffs of the changes: (+1 -0) PPC32ISelPattern.cpp | 1 + 1 files changed, 1 insertion Index: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp diff -u llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.127 llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.128 --- llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.127 Tue Aug 9 15:21:09 2005 +++ llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Tue Aug 9 22:40:09 2005 @@ -2140,6 +2140,7 @@ ISD::CondCode CC; if (Cond->getOpcode() == ISD::SETCC && !MVT::isInteger(N.getOperand(1).getValueType()) && + !MVT::isInteger(Cond->getOperand(1).getValueType()) && cast(Cond->getOperand(2))->get() != ISD::SETEQ && cast(Cond->getOperand(2))->get() != ISD::SETNE) { MVT::ValueType VT = Cond->getOperand(0).getValueType(); From duraid at octopus.com.au Wed Aug 10 07:39:10 2005 From: duraid at octopus.com.au (Duraid Madina) Date: Wed, 10 Aug 2005 07:39:10 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/IA64/IA64ISelPattern.cpp Message-ID: <200508101239.HAA20484@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/IA64: IA64ISelPattern.cpp updated: 1.52 -> 1.53 --- Log message: sorry!! this is temporary; for some reason the nasty constmul code seems to be an infinite loop when using g++-4.0.1*, this kills the ia64 nightly tester. A proper fix shall be forthcoming!!! thanks for not killing me. :) --- Diffs of the changes: (+4 -3) IA64ISelPattern.cpp | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) Index: llvm/lib/Target/IA64/IA64ISelPattern.cpp diff -u llvm/lib/Target/IA64/IA64ISelPattern.cpp:1.52 llvm/lib/Target/IA64/IA64ISelPattern.cpp:1.53 --- llvm/lib/Target/IA64/IA64ISelPattern.cpp:1.52 Tue Aug 9 15:21:09 2005 +++ llvm/lib/Target/IA64/IA64ISelPattern.cpp Wed Aug 10 07:38:57 2005 @@ -1322,7 +1322,8 @@ case ISD::MUL: { if(DestType != MVT::f64) { // TODO: speed! - if(N.getOperand(1).getOpcode() != ISD::Constant) { // if not a const mul +/* FIXME if(N.getOperand(1).getOpcode() != ISD::Constant) { // if not a const mul + */ // boring old integer multiply with xma Tmp1 = SelectExpr(N.getOperand(0)); Tmp2 = SelectExpr(N.getOperand(1)); @@ -1336,9 +1337,9 @@ .addReg(IA64::F0); BuildMI(BB, IA64::GETFSIG, 1, Result).addReg(TempFR3); return Result; // early exit - } else { // we are multiplying by an integer constant! yay + /* FIXME } else { // we are multiplying by an integer constant! yay return Reg = SelectExpr(BuildConstmulSequence(N)); // avert your eyes! - } + } */ } else { // floating point multiply Tmp1 = SelectExpr(N.getOperand(0)); From lattner at cs.uiuc.edu Wed Aug 10 11:35:03 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 10 Aug 2005 11:35:03 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Message-ID: <200508101635.LAA24291@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPC32ISelPattern.cpp updated: 1.128 -> 1.129 --- Log message: 1. Refactored handling of integer immediate values for add, or, xor and sub. New routine: ISel::SelectIntImmediateExpr 2. Now checking use counts of large constants. If use count is > 2 then drop thru so that the constant gets loaded into a register. Source: int %test1(int %a) { entry: %tmp.1 = add int %a, 123456789 ; [#uses=1] %tmp.2 = or int %tmp.1, 123456789 ; [#uses=1] %tmp.3 = xor int %tmp.2, 123456789 ; [#uses=1] %tmp.4 = sub int %tmp.3, -123456789 ; [#uses=1] ret int %tmp.4 } Did Emit: .machine ppc970 .text .align 2 .globl _test1 _test1: .LBB_test1_0: ; entry addi r2, r3, -13035 addis r2, r2, 1884 ori r2, r2, 52501 oris r2, r2, 1883 xori r2, r2, 52501 xoris r2, r2, 1883 addi r2, r2, 52501 addis r3, r2, 1883 blr Now Emits: .machine ppc970 .text .align 2 .globl _test1 _test1: .LBB_test1_0: ; entry lis r2, 1883 ori r2, r2, 52501 add r3, r3, r2 or r3, r3, r2 xor r3, r3, r2 add r3, r3, r2 blr Patch by Jim Laskey! --- Diffs of the changes: (+61 -60) PPC32ISelPattern.cpp | 121 +++++++++++++++++++++++++-------------------------- 1 files changed, 61 insertions(+), 60 deletions(-) Index: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp diff -u llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.128 llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.129 --- llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.128 Tue Aug 9 22:40:09 2005 +++ llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Wed Aug 10 11:34:52 2005 @@ -569,6 +569,9 @@ unsigned FoldIfWideZeroExtend(SDOperand N); unsigned SelectCC(SDOperand CC, unsigned &Opc, bool &Inv, unsigned &Idx); unsigned SelectCCExpr(SDOperand N, unsigned& Opc, bool &Inv, unsigned &Idx); + bool SelectIntImmediateExpr(SDOperand N, unsigned Result, unsigned C, + unsigned OCHi, unsigned OCLo, + bool IsArithmetic); unsigned SelectExpr(SDOperand N, bool Recording=false); void Select(SDOperand N); @@ -1275,6 +1278,45 @@ return; } +// SelectIntImmediateExpr - Choose code for opcodes with immediate value. +// Note: immediate constant must be second operand so that the use count can be +// determined. +bool ISel::SelectIntImmediateExpr(SDOperand N, unsigned Result, unsigned C, + unsigned OCHi, unsigned OCLo, + bool IsArithmetic) { + // get the hi and lo portions of constant + unsigned Hi = IsArithmetic ? HA16(C) : Hi16(C); + unsigned Lo = Lo16(C); + // assume no intermediate result from lo instruction (same as final result) + unsigned Tmp = Result; + // check if two instructions are needed + if (Hi && Lo) { + // exit if usage indicates it would be better to load immediate into a + // register + if (dyn_cast(N.getOperand(1))->use_size() > 2) + return false; + // need intermediate result for two instructions + Tmp = MakeReg(MVT::i32); + } + // get first operand + unsigned Opr0 = SelectExpr(N.getOperand(0)); + // is a lo instruction needed + if (Lo) { + // generate instruction for hi portion + const MachineInstrBuilder &MIBLo = BuildMI(BB, OCLo, 2, Tmp).addReg(Opr0); + if (IsArithmetic) MIBLo.addSImm(Lo); else MIBLo.addImm(Lo); + // need to switch out first operand for hi instruction + Opr0 = Tmp; + } + // is a ho instruction needed + if (Hi) { + // generate instruction for hi portion + const MachineInstrBuilder &MIBHi = BuildMI(BB, OCHi, 2, Result).addReg(Opr0); + if (IsArithmetic) MIBHi.addSImm(Hi); else MIBHi.addImm(Hi); + } + return true; +} + unsigned ISel::SelectExpr(SDOperand N, bool Recording) { unsigned Result; unsigned Tmp1, Tmp2, Tmp3; @@ -1636,22 +1678,12 @@ BuildMI(BB, Opc, 2, Result).addReg(Tmp1).addReg(Tmp2); return Result; } - Tmp1 = SelectExpr(N.getOperand(0)); if (isIntImmediate(N.getOperand(1), Tmp2)) { - Tmp3 = HA16(Tmp2); - Tmp2 = Lo16(Tmp2); - if (Tmp2 && Tmp3) { - unsigned Reg = MakeReg(MVT::i32); - BuildMI(BB, PPC::ADDI, 2, Reg).addReg(Tmp1).addSImm(Tmp2); - BuildMI(BB, PPC::ADDIS, 2, Result).addReg(Reg).addSImm(Tmp3); - } else if (Tmp2) { - BuildMI(BB, PPC::ADDI, 2, Result).addReg(Tmp1).addSImm(Tmp2); - } else { - BuildMI(BB, PPC::ADDIS, 2, Result).addReg(Tmp1).addSImm(Tmp3); - } - return Result; + if (SelectIntImmediateExpr(N, Result, Tmp2, PPC::ADDIS, PPC::ADDI, true)) + return Result; } + Tmp1 = SelectExpr(N.getOperand(0)); Tmp2 = SelectExpr(N.getOperand(1)); BuildMI(BB, PPC::ADD, 2, Result).addReg(Tmp1).addReg(Tmp2); return Result; @@ -1706,26 +1738,16 @@ case ISD::OR: if (SelectBitfieldInsert(N, Result)) return Result; - - Tmp1 = SelectExpr(N.getOperand(0)); if (isIntImmediate(N.getOperand(1), Tmp2)) { - Tmp3 = Hi16(Tmp2); - Tmp2 = Lo16(Tmp2); - if (Tmp2 && Tmp3) { - unsigned Reg = MakeReg(MVT::i32); - BuildMI(BB, PPC::ORI, 2, Reg).addReg(Tmp1).addImm(Tmp2); - BuildMI(BB, PPC::ORIS, 2, Result).addReg(Reg).addImm(Tmp3); - } else if (Tmp2) { - BuildMI(BB, PPC::ORI, 2, Result).addReg(Tmp1).addImm(Tmp2); - } else { - BuildMI(BB, PPC::ORIS, 2, Result).addReg(Tmp1).addImm(Tmp3); - } - } else { - Tmp2 = SelectExpr(N.getOperand(1)); - Opc = Recording ? PPC::ORo : PPC::OR; - RecordSuccess = true; - BuildMI(BB, Opc, 2, Result).addReg(Tmp1).addReg(Tmp2); + if (SelectIntImmediateExpr(N, Result, Tmp2, PPC::ORIS, PPC::ORI, false)) + return Result; } + // emit regular or + Tmp1 = SelectExpr(N.getOperand(0)); + Tmp2 = SelectExpr(N.getOperand(1)); + Opc = Recording ? PPC::ORo : PPC::OR; + RecordSuccess = true; + BuildMI(BB, Opc, 2, Result).addReg(Tmp1).addReg(Tmp2); return Result; case ISD::XOR: { @@ -1763,23 +1785,14 @@ } return Result; } - Tmp1 = SelectExpr(N.getOperand(0)); if (isIntImmediate(N.getOperand(1), Tmp2)) { - Tmp3 = Hi16(Tmp2); - Tmp2 = Lo16(Tmp2); - if (Tmp2 && Tmp3) { - unsigned Reg = MakeReg(MVT::i32); - BuildMI(BB, PPC::XORI, 2, Reg).addReg(Tmp1).addImm(Tmp2); - BuildMI(BB, PPC::XORIS, 2, Result).addReg(Reg).addImm(Tmp3); - } else if (Tmp2) { - BuildMI(BB, PPC::XORI, 2, Result).addReg(Tmp1).addImm(Tmp2); - } else { - BuildMI(BB, PPC::XORIS, 2, Result).addReg(Tmp1).addImm(Tmp3); - } - } else { - Tmp2 = SelectExpr(N.getOperand(1)); - BuildMI(BB, PPC::XOR, 2, Result).addReg(Tmp1).addReg(Tmp2); + if (SelectIntImmediateExpr(N, Result, Tmp2, PPC::XORIS, PPC::XORI, false)) + return Result; } + // emit regular xor + Tmp1 = SelectExpr(N.getOperand(0)); + Tmp2 = SelectExpr(N.getOperand(1)); + BuildMI(BB, PPC::XOR, 2, Result).addReg(Tmp1).addReg(Tmp2); return Result; } @@ -1816,20 +1829,8 @@ BuildMI(BB, PPC::SUBFIC, 2, Result).addReg(Tmp2).addSImm(Tmp1); return Result; } else if (isIntImmediate(N.getOperand(1), Tmp2)) { - Tmp1 = SelectExpr(N.getOperand(0)); - Tmp2 = -Tmp2; - Tmp3 = HA16(Tmp2); - Tmp2 = Lo16(Tmp2); - if (Tmp2 && Tmp3) { - unsigned Reg = MakeReg(MVT::i32); - BuildMI(BB, PPC::ADDI, 2, Reg).addReg(Tmp1).addSImm(Tmp2); - BuildMI(BB, PPC::ADDIS, 2, Result).addReg(Reg).addSImm(Tmp3); - } else if (Tmp2) { - BuildMI(BB, PPC::ADDI, 2, Result).addReg(Tmp1).addSImm(Tmp2); - } else { - BuildMI(BB, PPC::ADDIS, 2, Result).addReg(Tmp1).addSImm(Tmp3); - } - return Result; + if (SelectIntImmediateExpr(N, Result, -Tmp2, PPC::ADDIS, PPC::ADDI, true)) + return Result; } Tmp1 = SelectExpr(N.getOperand(0)); Tmp2 = SelectExpr(N.getOperand(1)); From lattner at cs.uiuc.edu Wed Aug 10 11:35:57 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 10 Aug 2005 11:35:57 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Message-ID: <200508101635.LAA24351@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPC32ISelPattern.cpp updated: 1.129 -> 1.130 --- Log message: Changed the XOR case to use the isOprNot predicate. Patch by Jim Laskey! --- Diffs of the changes: (+1 -3) PPC32ISelPattern.cpp | 4 +--- 1 files changed, 1 insertion(+), 3 deletions(-) Index: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp diff -u llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.129 llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.130 --- llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.129 Wed Aug 10 11:34:52 2005 +++ llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Wed Aug 10 11:35:46 2005 @@ -1752,9 +1752,7 @@ case ISD::XOR: { // Check for EQV: xor, (xor a, -1), b - if (N.getOperand(0).getOpcode() == ISD::XOR && - isIntImmediate(N.getOperand(0).getOperand(1), Tmp2) && - (signed)Tmp2 == -1) { + if (isOprNot(N.getOperand(0))) { Tmp1 = SelectExpr(N.getOperand(0).getOperand(0)); Tmp2 = SelectExpr(N.getOperand(1)); BuildMI(BB, PPC::EQV, 2, Result).addReg(Tmp1).addReg(Tmp2); From lattner at cs.uiuc.edu Wed Aug 10 12:15:31 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 10 Aug 2005 12:15:31 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopSimplify.cpp Message-ID: <200508101715.MAA24632@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: LoopSimplify.cpp updated: 1.59 -> 1.60 --- Log message: remove some trickiness that broke yacr2 and some other programs last night --- Diffs of the changes: (+1 -3) LoopSimplify.cpp | 4 +--- 1 files changed, 1 insertion(+), 3 deletions(-) Index: llvm/lib/Transforms/Scalar/LoopSimplify.cpp diff -u llvm/lib/Transforms/Scalar/LoopSimplify.cpp:1.59 llvm/lib/Transforms/Scalar/LoopSimplify.cpp:1.60 --- llvm/lib/Transforms/Scalar/LoopSimplify.cpp:1.59 Tue Aug 9 21:07:32 2005 +++ llvm/lib/Transforms/Scalar/LoopSimplify.cpp Wed Aug 10 12:15:20 2005 @@ -197,9 +197,7 @@ DominatorSet &DS = getAnalysis(); for (BasicBlock::iterator I = L->getHeader()->begin(); (PN = dyn_cast(I++)); ) - if (Value *V = PN->hasConstantValue(true)) - if (!isa(V) || - DS.dominates(cast(V)->getParent(), L->getHeader())) { + if (Value *V = PN->hasConstantValue()) { PN->replaceAllUsesWith(V); PN->eraseFromParent(); } From lattner at cs.uiuc.edu Wed Aug 10 12:17:57 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 10 Aug 2005 12:17:57 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/IndVarsSimplify/subtract.ll Message-ID: <200508101717.MAA24682@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/IndVarsSimplify: subtract.ll updated: 1.2 -> 1.3 --- Log message: now that we handle non-constant strides, this testcase passes --- Diffs of the changes: (+0 -1) subtract.ll | 1 - 1 files changed, 1 deletion(-) Index: llvm/test/Regression/Transforms/IndVarsSimplify/subtract.ll diff -u llvm/test/Regression/Transforms/IndVarsSimplify/subtract.ll:1.2 llvm/test/Regression/Transforms/IndVarsSimplify/subtract.ll:1.3 --- llvm/test/Regression/Transforms/IndVarsSimplify/subtract.ll:1.2 Sat Nov 6 14:38:27 2004 +++ llvm/test/Regression/Transforms/IndVarsSimplify/subtract.ll Wed Aug 10 12:17:45 2005 @@ -1,4 +1,3 @@ -; XFAIL: * ; RUN: llvm-as < %s | opt -indvars | llvm-dis | grep indvar %G = global long 0 From lattner at cs.uiuc.edu Wed Aug 10 12:38:05 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 10 Aug 2005 12:38:05 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Message-ID: <200508101738.MAA24958@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAG.cpp updated: 1.132 -> 1.133 --- Log message: Fix an oversight that may be causing PR617: http://llvm.cs.uiuc.edu/PR617 . --- Diffs of the changes: (+13 -4) SelectionDAG.cpp | 17 +++++++++++++---- 1 files changed, 13 insertions(+), 4 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.132 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.133 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.132 Tue Aug 9 18:09:05 2005 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Wed Aug 10 12:37:53 2005 @@ -626,12 +626,21 @@ if (N2.getOpcode() == ISD::ADD || N2.getOpcode() == ISD::SUB || N2.getOpcode() == ISD::XOR) { // Simplify X == (X+Z) --> Z == 0 - if (N2.getOperand(0) == N1) + if (N2.getOperand(0) == N1) { return getSetCC(VT, N2.getOperand(1), getConstant(0, N2.getValueType()), Cond); - else if (N2.getOperand(1) == N1) - return getSetCC(VT, N2.getOperand(0), getConstant(0, N2.getValueType()), - Cond); + } else if (N2.getOperand(1) == N1) { + if (isCommutativeBinOp(N2.getOpcode())) { + return getSetCC(VT, N2.getOperand(0), + getConstant(0, N2.getValueType()), Cond); + } else { + assert(N2.getOpcode() == ISD::SUB && "Unexpected operation!"); + // X == (Z-X) --> X<<1 == Z + return getSetCC(VT, getNode(ISD::SHL, N2.getValueType(), N1, + getConstant(1, TLI.getShiftAmountTy())), + N2.getOperand(0), Cond); + } + } } } From lattner at cs.uiuc.edu Wed Aug 10 13:11:44 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 10 Aug 2005 13:11:44 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Message-ID: <200508101811.NAA25436@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPC32ISelPattern.cpp updated: 1.130 -> 1.131 --- Log message: Changes for PPC32ISelPattern.cpp 1. Clean up how SelectIntImmediateExpr handles use counts. 2. "Subtract from" was not clearing hi 16 bits. Patch by Jim Laskey --- Diffs of the changes: (+22 -24) PPC32ISelPattern.cpp | 46 ++++++++++++++++++++++------------------------ 1 files changed, 22 insertions(+), 24 deletions(-) Index: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp diff -u llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.130 llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.131 --- llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.130 Wed Aug 10 11:35:46 2005 +++ llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Wed Aug 10 13:11:33 2005 @@ -569,9 +569,9 @@ unsigned FoldIfWideZeroExtend(SDOperand N); unsigned SelectCC(SDOperand CC, unsigned &Opc, bool &Inv, unsigned &Idx); unsigned SelectCCExpr(SDOperand N, unsigned& Opc, bool &Inv, unsigned &Idx); - bool SelectIntImmediateExpr(SDOperand N, unsigned Result, unsigned C, + bool SelectIntImmediateExpr(SDOperand N, unsigned Result, unsigned OCHi, unsigned OCLo, - bool IsArithmetic); + bool IsArithmetic = false, bool Negate = false); unsigned SelectExpr(SDOperand N, bool Recording=false); void Select(SDOperand N); @@ -1279,11 +1279,17 @@ } // SelectIntImmediateExpr - Choose code for opcodes with immediate value. -// Note: immediate constant must be second operand so that the use count can be -// determined. -bool ISel::SelectIntImmediateExpr(SDOperand N, unsigned Result, unsigned C, +bool ISel::SelectIntImmediateExpr(SDOperand N, unsigned Result, unsigned OCHi, unsigned OCLo, - bool IsArithmetic) { + bool IsArithmetic, bool Negate) { + // check constant + ConstantSDNode *CN = dyn_cast(N.getOperand(1)); + // exit if not a constant + if (!CN) return false; + // extract immediate + unsigned C = (unsigned)CN->getSignExtended(); + // negate if required (ISD::SUB) + if (Negate) C = -C; // get the hi and lo portions of constant unsigned Hi = IsArithmetic ? HA16(C) : Hi16(C); unsigned Lo = Lo16(C); @@ -1293,8 +1299,7 @@ if (Hi && Lo) { // exit if usage indicates it would be better to load immediate into a // register - if (dyn_cast(N.getOperand(1))->use_size() > 2) - return false; + if (CN->use_size() > 2) return false; // need intermediate result for two instructions Tmp = MakeReg(MVT::i32); } @@ -1678,11 +1683,8 @@ BuildMI(BB, Opc, 2, Result).addReg(Tmp1).addReg(Tmp2); return Result; } - if (isIntImmediate(N.getOperand(1), Tmp2)) { - if (SelectIntImmediateExpr(N, Result, Tmp2, PPC::ADDIS, PPC::ADDI, true)) - return Result; - } - + if (SelectIntImmediateExpr(N, Result, PPC::ADDIS, PPC::ADDI, true)) + return Result; Tmp1 = SelectExpr(N.getOperand(0)); Tmp2 = SelectExpr(N.getOperand(1)); BuildMI(BB, PPC::ADD, 2, Result).addReg(Tmp1).addReg(Tmp2); @@ -1738,10 +1740,8 @@ case ISD::OR: if (SelectBitfieldInsert(N, Result)) return Result; - if (isIntImmediate(N.getOperand(1), Tmp2)) { - if (SelectIntImmediateExpr(N, Result, Tmp2, PPC::ORIS, PPC::ORI, false)) - return Result; - } + if (SelectIntImmediateExpr(N, Result, PPC::ORIS, PPC::ORI)) + return Result; // emit regular or Tmp1 = SelectExpr(N.getOperand(0)); Tmp2 = SelectExpr(N.getOperand(1)); @@ -1783,10 +1783,8 @@ } return Result; } - if (isIntImmediate(N.getOperand(1), Tmp2)) { - if (SelectIntImmediateExpr(N, Result, Tmp2, PPC::XORIS, PPC::XORI, false)) - return Result; - } + if (SelectIntImmediateExpr(N, Result, PPC::XORIS, PPC::XORI)) + return Result; // emit regular xor Tmp1 = SelectExpr(N.getOperand(0)); Tmp2 = SelectExpr(N.getOperand(1)); @@ -1823,13 +1821,13 @@ return Result; } if (isIntImmediate(N.getOperand(0), Tmp1) && isInt16(Tmp1)) { + Tmp1 = Lo16(Tmp1); Tmp2 = SelectExpr(N.getOperand(1)); BuildMI(BB, PPC::SUBFIC, 2, Result).addReg(Tmp2).addSImm(Tmp1); return Result; - } else if (isIntImmediate(N.getOperand(1), Tmp2)) { - if (SelectIntImmediateExpr(N, Result, -Tmp2, PPC::ADDIS, PPC::ADDI, true)) + } + if (SelectIntImmediateExpr(N, Result, PPC::ADDIS, PPC::ADDI, true, true)) return Result; - } Tmp1 = SelectExpr(N.getOperand(0)); Tmp2 = SelectExpr(N.getOperand(1)); BuildMI(BB, PPC::SUBF, 2, Result).addReg(Tmp2).addReg(Tmp1); From natebegeman at mac.com Wed Aug 10 15:50:53 2005 From: natebegeman at mac.com (Nate Begeman) Date: Wed, 10 Aug 2005 15:50:53 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAG.h SelectionDAGNodes.h Message-ID: <200508102050.PAA26817@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: SelectionDAG.h updated: 1.32 -> 1.33 SelectionDAGNodes.h updated: 1.46 -> 1.47 --- Log message: Add new node, SELECT_CC. This node is for targets that don't natively implement SELECT. --- Diffs of the changes: (+21 -2) SelectionDAG.h | 13 +++++++++++++ SelectionDAGNodes.h | 10 ++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) Index: llvm/include/llvm/CodeGen/SelectionDAG.h diff -u llvm/include/llvm/CodeGen/SelectionDAG.h:1.32 llvm/include/llvm/CodeGen/SelectionDAG.h:1.33 --- llvm/include/llvm/CodeGen/SelectionDAG.h:1.32 Tue Aug 9 18:08:53 2005 +++ llvm/include/llvm/CodeGen/SelectionDAG.h Wed Aug 10 15:50:42 2005 @@ -183,6 +183,19 @@ ISD::CondCode Cond) { return getNode(ISD::SETCC, VT, LHS, RHS, getCondCode(Cond)); } + + /// getSelectCC - Helper function to make it easier to build SelectCC's if you + /// just have an ISD::CondCode instead of an SDOperand. + /// + SDOperand getSelectCC(SDOperand LHS, SDOperand RHS, + SDOperand True, SDOperand False, ISD::CondCode Cond) { + MVT::ValueType VT = True.getValueType(); + assert(LHS.getValueType() == RHS.getValueType() && + "LHS and RHS of condition must have same type!"); + assert(True.getValueType() == False.getValueType() && + "True and False arms of SelectCC must have same type!"); + return getNode(ISD::SELECT_CC, VT, LHS, RHS, True, False,getCondCode(Cond)); + } /// getLoad - Loads are not normal binary operators: their result type is not /// determined by their operands, and they produce a value AND a token chain. Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.46 llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.47 --- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.46 Tue Aug 9 15:19:34 2005 +++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h Wed Aug 10 15:50:42 2005 @@ -103,8 +103,14 @@ // Counting operators CTTZ, CTLZ, CTPOP, - // Select operator. - SELECT, + // Select + SELECT, + + // Select with condition operator - This selects between a true value and + // a false value (ops #2 and #3) based on the boolean result of comparing + // the lhs and rhs (ops #0 and #1) of a conditional expression with the + // condition code in op #4, a CondCodeSDNode. + SELECT_CC, // SetCC operator - This evaluates to a boolean (i1) true value if the // condition is true. The operands to this are the left and right operands From natebegeman at mac.com Wed Aug 10 15:51:23 2005 From: natebegeman at mac.com (Nate Begeman) Date: Wed, 10 Aug 2005 15:51:23 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp SelectionDAG.cpp Message-ID: <200508102051.PAA26833@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: LegalizeDAG.cpp updated: 1.156 -> 1.157 SelectionDAG.cpp updated: 1.133 -> 1.134 --- Log message: Add new node, SELECT_CC. This node is for targets that don't natively implement SELECT. --- Diffs of the changes: (+53 -3) LegalizeDAG.cpp | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++- SelectionDAG.cpp | 3 +-- 2 files changed, 53 insertions(+), 3 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.156 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.157 --- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.156 Tue Aug 9 15:20:18 2005 +++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Wed Aug 10 15:51:12 2005 @@ -362,7 +362,7 @@ std::map::iterator I = LegalizedNodes.find(Op); if (I != LegalizedNodes.end()) return I->second; - SDOperand Tmp1, Tmp2, Tmp3; + SDOperand Tmp1, Tmp2, Tmp3, Tmp4; SDOperand Result = Op; @@ -911,6 +911,17 @@ switch (TLI.getOperationAction(Node->getOpcode(), Tmp2.getValueType())) { default: assert(0 && "This action is not supported yet!"); + case TargetLowering::Expand: + if (Tmp1.getOpcode() == ISD::SETCC) { + Result = DAG.getSelectCC(Tmp1.getOperand(0), Tmp1.getOperand(1), + Tmp2, Tmp3, + cast(Tmp1.getOperand(2))->get()); + } else { + Result = DAG.getSelectCC(Tmp1, + DAG.getConstant(0, Tmp1.getValueType()), + Tmp2, Tmp3, ISD::SETNE); + } + break; case TargetLowering::Legal: if (Tmp1 != Node->getOperand(0) || Tmp2 != Node->getOperand(1) || Tmp3 != Node->getOperand(2)) @@ -938,6 +949,29 @@ } } break; + case ISD::SELECT_CC: + Tmp3 = LegalizeOp(Node->getOperand(2)); // True + Tmp4 = LegalizeOp(Node->getOperand(3)); // False + + if (getTypeAction(Node->getOperand(0).getValueType()) == Legal) { + Tmp1 = LegalizeOp(Node->getOperand(0)); // LHS + Tmp2 = LegalizeOp(Node->getOperand(1)); // RHS + if (Tmp1 != Node->getOperand(0) || Tmp2 != Node->getOperand(1) || + Tmp3 != Node->getOperand(2) || Tmp4 != Node->getOperand(3)) { + Result = DAG.getNode(ISD::SELECT_CC, Node->getValueType(0), Tmp1, Tmp2, + Tmp3, Tmp4, Node->getOperand(4)); + } + break; + } else { + Tmp1 = LegalizeOp(DAG.getNode(ISD::SETCC, TLI.getSetCCResultTy(), + Node->getOperand(0), // LHS + Node->getOperand(1), // RHS + Node->getOperand(4))); + Result = DAG.getSelectCC(Tmp1, + DAG.getConstant(0, Tmp1.getValueType()), + Tmp3, Tmp4, ISD::SETNE); + } + break; case ISD::SETCC: switch (getTypeAction(Node->getOperand(0).getValueType())) { case Legal: @@ -1999,6 +2033,13 @@ Tmp3 = PromoteOp(Node->getOperand(2)); // Legalize the op1 Result = DAG.getNode(ISD::SELECT, NVT, Tmp1, Tmp2, Tmp3); break; + case ISD::SELECT_CC: + Tmp2 = PromoteOp(Node->getOperand(2)); // True + Tmp3 = PromoteOp(Node->getOperand(3)); // False + Result = DAG.getNode(ISD::SELECT_CC, NVT, Node->getOperand(0), + Node->getOperand(1), Tmp2, Tmp3, + Node->getOperand(4)); + break; case ISD::TAILCALL: case ISD::CALL: { Tmp1 = LegalizeOp(Node->getOperand(0)); // Legalize the chain. @@ -2733,6 +2774,16 @@ Hi = DAG.getNode(ISD::SELECT, NVT, C, LH, RH); break; } + case ISD::SELECT_CC: { + SDOperand TL, TH, FL, FH; + ExpandOp(Node->getOperand(2), TL, TH); + ExpandOp(Node->getOperand(3), FL, FH); + Lo = DAG.getNode(ISD::SELECT_CC, NVT, Node->getOperand(0), + Node->getOperand(1), TL, FL, Node->getOperand(4)); + Hi = DAG.getNode(ISD::SELECT_CC, NVT, Node->getOperand(0), + Node->getOperand(1), TH, FH, Node->getOperand(4)); + break; + } case ISD::SIGN_EXTEND: { SDOperand In; switch (getTypeAction(Node->getOperand(0).getValueType())) { Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.133 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.134 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.133 Wed Aug 10 12:37:53 2005 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Wed Aug 10 15:51:12 2005 @@ -686,8 +686,6 @@ return SDOperand(); } - - /// getNode - Gets or creates the specified node. /// SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT) { @@ -1702,6 +1700,7 @@ case ISD::SETCC: return "setcc"; case ISD::SELECT: return "select"; + case ISD::SELECT_CC: return "select_cc"; case ISD::ADD_PARTS: return "add_parts"; case ISD::SUB_PARTS: return "sub_parts"; case ISD::SHL_PARTS: return "shl_parts"; From natebegeman at mac.com Wed Aug 10 15:52:20 2005 From: natebegeman at mac.com (Nate Begeman) Date: Wed, 10 Aug 2005 15:52:20 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Message-ID: <200508102052.PAA26848@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPC32ISelPattern.cpp updated: 1.131 -> 1.132 --- Log message: Make SELECT illegal on PPC32, switch to using SELECT_CC, which more closely reflects what the hardware is capable of. This significantly simplifies the CC handling logic throughout the ISel. --- Diffs of the changes: (+90 -135) PPC32ISelPattern.cpp | 225 ++++++++++++++++++++------------------------------- 1 files changed, 90 insertions(+), 135 deletions(-) Index: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp diff -u llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.131 llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.132 --- llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.131 Wed Aug 10 13:11:33 2005 +++ llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Wed Aug 10 15:52:09 2005 @@ -79,9 +79,14 @@ setOperationAction(ISD::FSQRT, MVT::f32, Expand); } - //PowerPC does not have CTPOP or CTTZ + // PowerPC does not have CTPOP or CTTZ setOperationAction(ISD::CTPOP, MVT::i32 , Expand); setOperationAction(ISD::CTTZ , MVT::i32 , Expand); + + // PowerPC does not have Select + setOperationAction(ISD::SELECT, MVT::i32, Expand); + setOperationAction(ISD::SELECT, MVT::f32, Expand); + setOperationAction(ISD::SELECT, MVT::f64, Expand); setSetCCResultContents(ZeroOrOneSetCCResult); addLegalFPImmediate(+0.0); // Necessary for FSEL @@ -564,11 +569,10 @@ unsigned getGlobalBaseReg(); unsigned getConstDouble(double floatVal, unsigned Result); - void MoveCRtoGPR(unsigned CCReg, bool Inv, unsigned Idx, unsigned Result); + void MoveCRtoGPR(unsigned CCReg, ISD::CondCode CC, unsigned Result); bool SelectBitfieldInsert(SDOperand OR, unsigned Result); unsigned FoldIfWideZeroExtend(SDOperand N); - unsigned SelectCC(SDOperand CC, unsigned &Opc, bool &Inv, unsigned &Idx); - unsigned SelectCCExpr(SDOperand N, unsigned& Opc, bool &Inv, unsigned &Idx); + unsigned SelectCC(SDOperand LHS, SDOperand RHS, ISD::CondCode CC); bool SelectIntImmediateExpr(SDOperand N, unsigned Result, unsigned OCHi, unsigned OCLo, bool IsArithmetic = false, bool Negate = false); @@ -689,21 +693,19 @@ } /// getBCCForSetCC - Returns the PowerPC condition branch mnemonic corresponding -/// to Condition. If the Condition is unordered or unsigned, the bool argument -/// U is set to true, otherwise it is set to false. -static unsigned getBCCForSetCC(unsigned Condition, bool& U) { - U = false; - switch (Condition) { +/// to Condition. +static unsigned getBCCForSetCC(ISD::CondCode CC) { + switch (CC) { default: assert(0 && "Unknown condition!"); abort(); case ISD::SETEQ: return PPC::BEQ; case ISD::SETNE: return PPC::BNE; - case ISD::SETULT: U = true; + case ISD::SETULT: case ISD::SETLT: return PPC::BLT; - case ISD::SETULE: U = true; + case ISD::SETULE: case ISD::SETLE: return PPC::BLE; - case ISD::SETUGT: U = true; + case ISD::SETUGT: case ISD::SETGT: return PPC::BGT; - case ISD::SETUGE: U = true; + case ISD::SETUGE: case ISD::SETGE: return PPC::BGE; } return 0; @@ -729,8 +731,8 @@ /// getCRIdxForSetCC - Return the index of the condition register field /// associated with the SetCC condition, and whether or not the field is /// treated as inverted. That is, lt = 0; ge = 0 inverted. -static unsigned getCRIdxForSetCC(unsigned Condition, bool& Inv) { - switch (Condition) { +static unsigned getCRIdxForSetCC(ISD::CondCode CC, bool& Inv) { + switch (CC) { default: assert(0 && "Unknown condition!"); abort(); case ISD::SETULT: case ISD::SETLT: Inv = false; return 0; @@ -942,8 +944,10 @@ /// MoveCRtoGPR - Move CCReg[Idx] to the least significant bit of Result. If /// Inv is true, then invert the result. -void ISel::MoveCRtoGPR(unsigned CCReg, bool Inv, unsigned Idx, unsigned Result){ +void ISel::MoveCRtoGPR(unsigned CCReg, ISD::CondCode CC, unsigned Result){ + bool Inv; unsigned IntCR = MakeReg(MVT::i32); + unsigned Idx = getCRIdxForSetCC(CC, Inv); BuildMI(BB, PPC::MCRF, 1, PPC::CR7).addReg(CCReg); bool GPOpt = TLI.getTargetMachine().getSubtarget().isGigaProcessor(); @@ -1089,7 +1093,7 @@ return SelectExpr(N); } -unsigned ISel::SelectCC(SDOperand Cond, unsigned& Opc, bool &Inv, unsigned& Idx) { +unsigned ISel::SelectCC(SDOperand LHS, SDOperand RHS, ISD::CondCode CC) { unsigned Result, Tmp1, Tmp2; bool AlreadySelected = false; static const unsigned CompareOpcodes[] = @@ -1098,94 +1102,38 @@ // Allocate a condition register for this expression Result = RegMap->createVirtualRegister(PPC32::CRRCRegisterClass); - // If the first operand to the select is a SETCC node, then we can fold it - // into the branch that selects which value to return. - if (Cond.getOpcode() == ISD::SETCC) { - ISD::CondCode CC = cast(Cond.getOperand(2))->get(); - bool U; - Opc = getBCCForSetCC(CC, U); - Idx = getCRIdxForSetCC(CC, Inv); - - // Use U to determine whether the SETCC immediate range is signed or not. - if (isIntImmediate(Cond.getOperand(1), Tmp2) && - ((U && isUInt16(Tmp2)) || (!U && isInt16(Tmp2)))) { - Tmp2 = Lo16(Tmp2); - // For comparisons against zero, we can implicity set CR0 if a recording - // variant (e.g. 'or.' instead of 'or') of the instruction that defines - // operand zero of the SetCC node is available. - if (Tmp2 == 0 && - NodeHasRecordingVariant(Cond.getOperand(0).getOpcode()) && - Cond.getOperand(0).Val->hasOneUse()) { - RecordSuccess = false; - Tmp1 = SelectExpr(Cond.getOperand(0), true); - if (RecordSuccess) { - ++Recorded; - BuildMI(BB, PPC::MCRF, 1, Result).addReg(PPC::CR0); - return Result; - } - AlreadySelected = true; + // Use U to determine whether the SETCC immediate range is signed or not. + bool U = ISD::isUnsignedIntSetCC(CC); + if (isIntImmediate(RHS, Tmp2) && + ((U && isUInt16(Tmp2)) || (!U && isInt16(Tmp2)))) { + Tmp2 = Lo16(Tmp2); + // For comparisons against zero, we can implicity set CR0 if a recording + // variant (e.g. 'or.' instead of 'or') of the instruction that defines + // operand zero of the SetCC node is available. + if (Tmp2 == 0 && + NodeHasRecordingVariant(LHS.getOpcode()) && LHS.Val->hasOneUse()) { + RecordSuccess = false; + Tmp1 = SelectExpr(LHS, true); + if (RecordSuccess) { + ++Recorded; + BuildMI(BB, PPC::MCRF, 1, Result).addReg(PPC::CR0); + return Result; } - // If we could not implicitly set CR0, then emit a compare immediate - // instead. - if (!AlreadySelected) Tmp1 = SelectExpr(Cond.getOperand(0)); - if (U) - BuildMI(BB, PPC::CMPLWI, 2, Result).addReg(Tmp1).addImm(Tmp2); - else - BuildMI(BB, PPC::CMPWI, 2, Result).addReg(Tmp1).addSImm(Tmp2); - } else { - bool IsInteger = MVT::isInteger(Cond.getOperand(0).getValueType()); - unsigned CompareOpc = CompareOpcodes[2 * IsInteger + U]; - Tmp1 = SelectExpr(Cond.getOperand(0)); - Tmp2 = SelectExpr(Cond.getOperand(1)); - BuildMI(BB, CompareOpc, 2, Result).addReg(Tmp1).addReg(Tmp2); + AlreadySelected = true; } + // If we could not implicitly set CR0, then emit a compare immediate + // instead. + if (!AlreadySelected) Tmp1 = SelectExpr(LHS); + if (U) + BuildMI(BB, PPC::CMPLWI, 2, Result).addReg(Tmp1).addImm(Tmp2); + else + BuildMI(BB, PPC::CMPWI, 2, Result).addReg(Tmp1).addSImm(Tmp2); } else { - // If this isn't a SetCC, then select the value and compare it against zero, - // treating it as if it were a boolean. - Opc = PPC::BNE; - Idx = getCRIdxForSetCC(ISD::SETNE, Inv); - Tmp1 = SelectExpr(Cond); - BuildMI(BB, PPC::CMPLWI, 2, Result).addReg(Tmp1).addImm(0); - } - return Result; -} - -unsigned ISel::SelectCCExpr(SDOperand N, unsigned& Opc, bool &Inv, - unsigned &Idx) { - bool Inv0, Inv1; - unsigned Idx0, Idx1, CROpc, Opc1, Tmp1, Tmp2; - - // Allocate a condition register for this expression - unsigned Result = RegMap->createVirtualRegister(PPC32::CRRCRegisterClass); - - // Check for the operations we support: - switch(N.getOpcode()) { - default: - Opc = PPC::BNE; - Idx = getCRIdxForSetCC(ISD::SETNE, Inv); - Tmp1 = SelectExpr(N); - BuildMI(BB, PPC::CMPLWI, 2, Result).addReg(Tmp1).addImm(0); - break; - case ISD::OR: - case ISD::AND: - Tmp1 = SelectCCExpr(N.getOperand(0), Opc, Inv0, Idx0); - Tmp2 = SelectCCExpr(N.getOperand(1), Opc1, Inv1, Idx1); - CROpc = getCROpForSetCC(N.getOpcode(), Inv0, Inv1); - if (Inv0 && !Inv1) { - std::swap(Tmp1, Tmp2); - std::swap(Idx0, Idx1); - Opc = Opc1; - } - if (Inv0 && Inv1) Opc = PPC32InstrInfo::invertPPCBranchOpcode(Opc); - BuildMI(BB, CROpc, 5, Result).addImm(Idx0).addReg(Tmp1).addImm(Idx0) - .addReg(Tmp2).addImm(Idx1); - Inv = false; - Idx = Idx0; - break; - case ISD::SETCC: - Tmp1 = SelectCC(N, Opc, Inv, Idx); - Result = Tmp1; - break; + bool IsInteger = MVT::isInteger(LHS.getValueType()); + unsigned CompareOpc = CompareOpcodes[2 * IsInteger + U]; + Tmp1 = SelectExpr(LHS); + Tmp2 = SelectExpr(RHS); + BuildMI(BB, CompareOpc, 2, Result).addReg(Tmp1).addReg(Tmp2); } return Result; } @@ -1238,10 +1186,21 @@ MachineBasicBlock *Dest = cast(N.getOperand(2))->getBasicBlock(); - bool Inv; - unsigned Opc, CCReg, Idx; Select(N.getOperand(0)); //chain - CCReg = SelectCC(N.getOperand(1), Opc, Inv, Idx); + + // FIXME: Until we have Branch_CC and Branch_Twoway_CC, we're going to have to + // Fake it up by hand by checking to see if op 1 is a SetCC, or a boolean. + unsigned CCReg; + ISD::CondCode CC; + SDOperand Cond = N.getOperand(1); + if (Cond.getOpcode() == ISD::SETCC) { + CC = cast(Cond.getOperand(2))->get(); + CCReg = SelectCC(Cond.getOperand(0), Cond.getOperand(1), CC); + } else { + CC = ISD::SETNE; + CCReg = SelectCC(Cond, ISelDAG->getConstant(0, Cond.getValueType()), CC); + } + unsigned Opc = getBCCForSetCC(CC); // Iterate to the next basic block ilist::iterator It = BB; @@ -1374,7 +1333,7 @@ switch (opcode) { default: Node->dump(); - assert(0 && "Node not handled!\n"); + assert(0 && "\nNode not handled!\n"); case ISD::UNDEF: BuildMI(BB, PPC::IMPLICIT_DEF, 0, Result); return Result; @@ -2127,25 +2086,21 @@ } } - bool Inv; - unsigned CCReg = SelectCC(N, Opc, Inv, Tmp2); - MoveCRtoGPR(CCReg, Inv, Tmp2, Result); - return Result; - } - case ISD::SELECT: { - SDNode *Cond = N.getOperand(0).Val; - ISD::CondCode CC; - if (Cond->getOpcode() == ISD::SETCC && - !MVT::isInteger(N.getOperand(1).getValueType()) && - !MVT::isInteger(Cond->getOperand(1).getValueType()) && - cast(Cond->getOperand(2))->get() != ISD::SETEQ && - cast(Cond->getOperand(2))->get() != ISD::SETNE) { - MVT::ValueType VT = Cond->getOperand(0).getValueType(); - ISD::CondCode CC = cast(Cond->getOperand(2))->get(); - unsigned TV = SelectExpr(N.getOperand(1)); // Use if TRUE - unsigned FV = SelectExpr(N.getOperand(2)); // Use if FALSE + unsigned CCReg = SelectCC(N.getOperand(0), N.getOperand(1), CC); + MoveCRtoGPR(CCReg, CC, Result); + return Result; + } + + case ISD::SELECT_CC: { + ISD::CondCode CC = cast(N.getOperand(4))->get(); + if (!MVT::isInteger(N.getOperand(0).getValueType()) && + !MVT::isInteger(N.getOperand(2).getValueType()) && + CC != ISD::SETEQ && CC != ISD::SETNE) { + MVT::ValueType VT = N.getOperand(0).getValueType(); + unsigned TV = SelectExpr(N.getOperand(2)); // Use if TRUE + unsigned FV = SelectExpr(N.getOperand(3)); // Use if FALSE - ConstantFPSDNode *CN = dyn_cast(Cond->getOperand(1)); + ConstantFPSDNode *CN = dyn_cast(N.getOperand(1)); if (CN && (CN->isExactlyValue(-0.0) || CN->isExactlyValue(0.0))) { switch(CC) { default: assert(0 && "Invalid FSEL condition"); abort(); @@ -2154,7 +2109,7 @@ std::swap(TV, FV); // fsel is natively setge, swap operands for setlt case ISD::SETUGE: case ISD::SETGE: - Tmp1 = SelectExpr(Cond->getOperand(0)); // Val to compare against + Tmp1 = SelectExpr(N.getOperand(0)); // Val to compare against BuildMI(BB, PPC::FSEL, 3, Result).addReg(Tmp1).addReg(TV).addReg(FV); return Result; case ISD::SETUGT: @@ -2162,11 +2117,11 @@ std::swap(TV, FV); // fsel is natively setge, swap operands for setlt case ISD::SETULE: case ISD::SETLE: { - if (Cond->getOperand(0).getOpcode() == ISD::FNEG) { - Tmp2 = SelectExpr(Cond->getOperand(0).getOperand(0)); + if (N.getOperand(0).getOpcode() == ISD::FNEG) { + Tmp2 = SelectExpr(N.getOperand(0).getOperand(0)); } else { Tmp2 = MakeReg(VT); - Tmp1 = SelectExpr(Cond->getOperand(0)); // Val to compare against + Tmp1 = SelectExpr(N.getOperand(0)); // Val to compare against BuildMI(BB, PPC::FNEG, 1, Tmp2).addReg(Tmp1); } BuildMI(BB, PPC::FSEL, 3, Result).addReg(Tmp2).addReg(TV).addReg(FV); @@ -2175,8 +2130,8 @@ } } else { Opc = (MVT::f64 == VT) ? PPC::FSUB : PPC::FSUBS; - Tmp1 = SelectExpr(Cond->getOperand(0)); // Val to compare against - Tmp2 = SelectExpr(Cond->getOperand(1)); + Tmp1 = SelectExpr(N.getOperand(0)); // Val to compare against + Tmp2 = SelectExpr(N.getOperand(1)); Tmp3 = MakeReg(VT); switch(CC) { default: assert(0 && "Invalid FSEL condition"); abort(); @@ -2205,11 +2160,11 @@ assert(0 && "Should never get here"); } - bool Inv; - unsigned TrueValue = SelectExpr(N.getOperand(1)); //Use if TRUE - unsigned FalseValue = SelectExpr(N.getOperand(2)); //Use if FALSE - unsigned CCReg = SelectCC(N.getOperand(0), Opc, Inv, Tmp3); - + unsigned TrueValue = SelectExpr(N.getOperand(2)); //Use if TRUE + unsigned FalseValue = SelectExpr(N.getOperand(3)); //Use if FALSE + unsigned CCReg = SelectCC(N.getOperand(0), N.getOperand(1), CC); + Opc = getBCCForSetCC(CC); + // Create an iterator with which to insert the MBB for copying the false // value and the MBB to hold the PHI instruction for this SetCC. MachineBasicBlock *thisMBB = BB; From natebegeman at mac.com Wed Aug 10 20:12:31 2005 From: natebegeman at mac.com (Nate Begeman) Date: Wed, 10 Aug 2005 20:12:31 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAG.h Message-ID: <200508110112.UAA28394@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: SelectionDAG.h updated: 1.33 -> 1.34 --- Log message: Some SELECT_CC cleanups: 1. move assertions for node creation to getNode() 2. legalize the values returned in ExpandOp immediately 3. Move select_cc optimizations from SELECT's getNode() to SELECT_CC's, allowing them to be cleaned up significantly. This paves the way to pick up additional optimizations on SELECT_CC, such as sum-of-absolute-differences. --- Diffs of the changes: (+0 -4) SelectionDAG.h | 4 ---- 1 files changed, 4 deletions(-) Index: llvm/include/llvm/CodeGen/SelectionDAG.h diff -u llvm/include/llvm/CodeGen/SelectionDAG.h:1.33 llvm/include/llvm/CodeGen/SelectionDAG.h:1.34 --- llvm/include/llvm/CodeGen/SelectionDAG.h:1.33 Wed Aug 10 15:50:42 2005 +++ llvm/include/llvm/CodeGen/SelectionDAG.h Wed Aug 10 20:12:20 2005 @@ -190,10 +190,6 @@ SDOperand getSelectCC(SDOperand LHS, SDOperand RHS, SDOperand True, SDOperand False, ISD::CondCode Cond) { MVT::ValueType VT = True.getValueType(); - assert(LHS.getValueType() == RHS.getValueType() && - "LHS and RHS of condition must have same type!"); - assert(True.getValueType() == False.getValueType() && - "True and False arms of SelectCC must have same type!"); return getNode(ISD::SELECT_CC, VT, LHS, RHS, True, False,getCondCode(Cond)); } From natebegeman at mac.com Wed Aug 10 20:12:31 2005 From: natebegeman at mac.com (Nate Begeman) Date: Wed, 10 Aug 2005 20:12:31 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp SelectionDAG.cpp Message-ID: <200508110112.UAA28400@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: LegalizeDAG.cpp updated: 1.157 -> 1.158 SelectionDAG.cpp updated: 1.134 -> 1.135 --- Log message: Some SELECT_CC cleanups: 1. move assertions for node creation to getNode() 2. legalize the values returned in ExpandOp immediately 3. Move select_cc optimizations from SELECT's getNode() to SELECT_CC's, allowing them to be cleaned up significantly. This paves the way to pick up additional optimizations on SELECT_CC, such as sum-of-absolute-differences. --- Diffs of the changes: (+61 -53) LegalizeDAG.cpp | 2 SelectionDAG.cpp | 112 ++++++++++++++++++++++++++++--------------------------- 2 files changed, 61 insertions(+), 53 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.157 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.158 --- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.157 Wed Aug 10 15:51:12 2005 +++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Wed Aug 10 20:12:20 2005 @@ -2782,6 +2782,8 @@ Node->getOperand(1), TL, FL, Node->getOperand(4)); Hi = DAG.getNode(ISD::SELECT_CC, NVT, Node->getOperand(0), Node->getOperand(1), TH, FH, Node->getOperand(4)); + Lo = LegalizeOp(Lo); + Hi = LegalizeOp(Hi); break; } case ISD::SIGN_EXTEND: { Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.134 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.135 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.134 Wed Aug 10 15:51:12 2005 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Wed Aug 10 20:12:20 2005 @@ -1397,59 +1397,6 @@ if (N1 == N3) // X ? Y : X --> X ? Y : 0 --> X & Y return getNode(ISD::AND, VT, N1, N2); } - - // If this is a selectcc, check to see if we can simplify the result. - if (N1.Val->getOpcode() == ISD::SETCC) { - SDNode *SetCC = N1.Val; - ISD::CondCode CC = cast(SetCC->getOperand(2))->get(); - if (ConstantFPSDNode *CFP = - dyn_cast(SetCC->getOperand(1))) - if (CFP->getValue() == 0.0) { // Allow either -0.0 or 0.0 - // select (setg[te] X, +/-0.0), X, fneg(X) -> fabs - if ((CC == ISD::SETGE || CC == ISD::SETGT) && - N2 == SetCC->getOperand(0) && N3.getOpcode() == ISD::FNEG && - N3.getOperand(0) == N2) - return getNode(ISD::FABS, VT, N2); - - // select (setl[te] X, +/-0.0), fneg(X), X -> fabs - if ((CC == ISD::SETLT || CC == ISD::SETLE) && - N3 == SetCC->getOperand(0) && N2.getOpcode() == ISD::FNEG && - N2.getOperand(0) == N3) - return getNode(ISD::FABS, VT, N3); - } - // select (setlt X, 0), A, 0 -> and (sra X, size(X)-1), A - if (ConstantSDNode *CN = - dyn_cast(SetCC->getOperand(1))) - if (CN->getValue() == 0 && N3C && N3C->getValue() == 0) - if (CC == ISD::SETLT) { - MVT::ValueType XType = SetCC->getOperand(0).getValueType(); - MVT::ValueType AType = N2.getValueType(); - if (XType >= AType) { - // and (sra X, size(X)-1, A) -> "and (srl X, C2), A" iff A is a - // single-bit constant. FIXME: remove once the dag combiner - // exists. - if (ConstantSDNode *AC = dyn_cast(N2)) - if ((AC->getValue() & (AC->getValue()-1)) == 0) { - unsigned ShCtV = Log2_64(AC->getValue()); - ShCtV = MVT::getSizeInBits(XType)-ShCtV-1; - SDOperand ShCt = getConstant(ShCtV, TLI.getShiftAmountTy()); - SDOperand Shift = getNode(ISD::SRL, XType, - SetCC->getOperand(0), ShCt); - if (XType > AType) - Shift = getNode(ISD::TRUNCATE, AType, Shift); - return getNode(ISD::AND, AType, Shift, N2); - } - - - SDOperand Shift = getNode(ISD::SRA, XType, SetCC->getOperand(0), - getConstant(MVT::getSizeInBits(XType)-1, - TLI.getShiftAmountTy())); - if (XType > AType) - Shift = getNode(ISD::TRUNCATE, AType, Shift); - return getNode(ISD::AND, AType, Shift, N2); - } - } - } break; case ISD::BRCOND: if (N2C) @@ -1491,6 +1438,65 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT, SDOperand N1, SDOperand N2, SDOperand N3, SDOperand N4, SDOperand N5) { + if (ISD::SELECT_CC == Opcode) { + assert(N1.getValueType() == N2.getValueType() && + "LHS and RHS of condition must have same type!"); + assert(N3.getValueType() == N4.getValueType() && + "True and False arms of SelectCC must have same type!"); + + ConstantSDNode *N2C = dyn_cast(N2.Val); + ConstantSDNode *N3C = dyn_cast(N3.Val); + ConstantSDNode *N4C = dyn_cast(N4.Val); + ISD::CondCode CC = cast(N5)->get(); + + // Check to see if we can simplify the select into an fabs node + if (ConstantFPSDNode *CFP = dyn_cast(N2)) { + // Allow either -0.0 or 0.0 + if (CFP->getValue() == 0.0) { + // select (setg[te] X, +/-0.0), X, fneg(X) -> fabs + if ((CC == ISD::SETGE || CC == ISD::SETGT) && + N1 == N3 && N4.getOpcode() == ISD::FNEG && + N1 == N4.getOperand(0)) + return getNode(ISD::FABS, VT, N1); + + // select (setl[te] X, +/-0.0), fneg(X), X -> fabs + if ((CC == ISD::SETLT || CC == ISD::SETLE) && + N1 == N4 && N3.getOpcode() == ISD::FNEG && + N3.getOperand(0) == N4) + return getNode(ISD::FABS, VT, N4); + } + } + + // Check to see if we can perform the "gzip trick", transforming + // select_cc setlt X, 0, A, 0 -> and (sra X, size(X)-1), A + if (N2C && N2C->isNullValue() && N4C && N4C->isNullValue() && + MVT::isInteger(N1.getValueType()) && + MVT::isInteger(N3.getValueType()) && CC == ISD::SETLT) { + MVT::ValueType XType = N1.getValueType(); + MVT::ValueType AType = N3.getValueType(); + if (XType >= AType) { + // and (sra X, size(X)-1, A) -> "and (srl X, C2), A" iff A is a + // single-bit constant. FIXME: remove once the dag combiner + // exists. + if (N3C && ((N3C->getValue() & (N3C->getValue()-1)) == 0)) { + unsigned ShCtV = Log2_64(N3C->getValue()); + ShCtV = MVT::getSizeInBits(XType)-ShCtV-1; + SDOperand ShCt = getConstant(ShCtV, TLI.getShiftAmountTy()); + SDOperand Shift = getNode(ISD::SRL, XType, N1, ShCt); + if (XType > AType) + Shift = getNode(ISD::TRUNCATE, AType, Shift); + return getNode(ISD::AND, AType, Shift, N3); + } + SDOperand Shift = getNode(ISD::SRA, XType, N1, + getConstant(MVT::getSizeInBits(XType)-1, + TLI.getShiftAmountTy())); + if (XType > AType) + Shift = getNode(ISD::TRUNCATE, AType, Shift); + return getNode(ISD::AND, AType, Shift, N3); + } + } + } + std::vector Ops; Ops.reserve(5); Ops.push_back(N1); From natebegeman at mac.com Wed Aug 10 21:18:27 2005 From: natebegeman at mac.com (Nate Begeman) Date: Wed, 10 Aug 2005 21:18:27 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Message-ID: <200508110218.VAA28747@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAG.cpp updated: 1.135 -> 1.136 --- Log message: Add a select_cc optimization for recognizing abs(int). This speeds up an integer MPEG encoding loop by a factor of two. --- Diffs of the changes: (+16 -0) SelectionDAG.cpp | 16 ++++++++++++++++ 1 files changed, 16 insertions(+) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.135 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.136 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.135 Wed Aug 10 20:12:20 2005 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Wed Aug 10 21:18:13 2005 @@ -1495,6 +1495,22 @@ return getNode(ISD::AND, AType, Shift, N3); } } + + // Check to see if this is an integer abs. select_cc setl[te] X, 0, -X, X -> + // Y = sra (X, size(X)-1); xor (add (X, Y), Y) + if (N2C && N2C->isNullValue() && (CC == ISD::SETLT || CC == ISD::SETLE) && + N1 == N4 && N3.getOpcode() == ISD::SUB && N1 == N3.getOperand(1)) { + if (ConstantSDNode *SubC = dyn_cast(N3.getOperand(0))) { + MVT::ValueType XType = N1.getValueType(); + if (SubC->isNullValue() && MVT::isInteger(XType)) { + SDOperand Shift = getNode(ISD::SRA, XType, N1, + getConstant(MVT::getSizeInBits(XType)-1, + TLI.getShiftAmountTy())); + return getNode(ISD::XOR, XType, getNode(ISD::ADD, XType, N1, Shift), + Shift); + } + } + } } std::vector Ops; From lattner at cs.uiuc.edu Thu Aug 11 12:15:44 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 11 Aug 2005 12:15:44 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Message-ID: <200508111715.MAA02326@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPC32ISelPattern.cpp updated: 1.132 -> 1.133 --- Log message: Use a more efficient method of creating integer and float virtual registers (avoids an extra level of indirection in MakeReg). defined MakeIntReg using RegMap->createVirtualRegister(PPC32::GPRCRegisterClass) defined MakeFPReg using RegMap->createVirtualRegister(PPC32::FPRCRegisterClass) s/MakeReg(MVT::i32)/MakeIntReg/ s/MakeReg(MVT::f64)/MakeFPReg/ Patch by Jim Laskey! --- Diffs of the changes: (+52 -44) PPC32ISelPattern.cpp | 96 +++++++++++++++++++++++++++------------------------ 1 files changed, 52 insertions(+), 44 deletions(-) Index: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp diff -u llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.132 llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.133 --- llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.132 Wed Aug 10 15:52:09 2005 +++ llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Thu Aug 11 12:15:31 2005 @@ -563,6 +563,14 @@ ISelDAG = 0; } + // convenience functions for virtual register creation + inline unsigned MakeIntReg() { + return RegMap->createVirtualRegister(PPC32::GPRCRegisterClass); + } + inline unsigned MakeFPReg() { + return RegMap->createVirtualRegister(PPC32::FPRCRegisterClass); + } + // dag -> dag expanders for integer divide by constant SDOperand BuildSDIVSequence(SDOperand N); SDOperand BuildUDIVSequence(SDOperand N); @@ -917,7 +925,7 @@ // Insert the set of GlobalBaseReg into the first MBB of the function MachineBasicBlock &FirstMBB = BB->getParent()->front(); MachineBasicBlock::iterator MBBI = FirstMBB.begin(); - GlobalBaseReg = MakeReg(MVT::i32); + GlobalBaseReg = MakeIntReg(); BuildMI(FirstMBB, MBBI, PPC::MovePCtoLR, 0, PPC::LR); BuildMI(FirstMBB, MBBI, PPC::MFLR, 1, GlobalBaseReg).addReg(PPC::LR); GlobalBaseInitialized = true; @@ -928,8 +936,8 @@ /// getConstDouble - Loads a floating point value into a register, via the /// Constant Pool. Optionally takes a register in which to load the value. unsigned ISel::getConstDouble(double doubleVal, unsigned Result=0) { - unsigned Tmp1 = MakeReg(MVT::i32); - if (0 == Result) Result = MakeReg(MVT::f64); + unsigned Tmp1 = MakeIntReg(); + if (0 == Result) Result = MakeFPReg(); MachineConstantPool *CP = BB->getParent()->getConstantPool(); ConstantFP *CFP = ConstantFP::get(Type::DoubleTy, doubleVal); unsigned CPI = CP->getConstantPoolIndex(CFP); @@ -946,14 +954,14 @@ /// Inv is true, then invert the result. void ISel::MoveCRtoGPR(unsigned CCReg, ISD::CondCode CC, unsigned Result){ bool Inv; - unsigned IntCR = MakeReg(MVT::i32); + unsigned IntCR = MakeIntReg(); unsigned Idx = getCRIdxForSetCC(CC, Inv); BuildMI(BB, PPC::MCRF, 1, PPC::CR7).addReg(CCReg); bool GPOpt = TLI.getTargetMachine().getSubtarget().isGigaProcessor(); BuildMI(BB, GPOpt ? PPC::MFOCRF : PPC::MFCR, 1, IntCR).addReg(PPC::CR7); if (Inv) { - unsigned Tmp1 = MakeReg(MVT::i32); + unsigned Tmp1 = MakeIntReg(); BuildMI(BB, PPC::RLWINM, 4, Tmp1).addReg(IntCR).addImm(32-(3-Idx)) .addImm(31).addImm(31); BuildMI(BB, PPC::XORI, 2, Result).addReg(Tmp1).addImm(1); @@ -1165,7 +1173,7 @@ if(GlobalAddressSDNode *GN = dyn_cast(N)) { GlobalValue *GV = GN->getGlobal(); if (!GV->hasWeakLinkage() && !GV->isExternal()) { - unsigned GlobalHi = MakeReg(MVT::i32); + unsigned GlobalHi = MakeIntReg(); if (PICEnabled) BuildMI(BB, PPC::ADDIS, 2, GlobalHi).addReg(getGlobalBaseReg()) .addGlobalAddress(GV); @@ -1260,7 +1268,7 @@ // register if (CN->use_size() > 2) return false; // need intermediate result for two instructions - Tmp = MakeReg(MVT::i32); + Tmp = MakeIntReg(); } // get first operand unsigned Opr0 = SelectExpr(N.getOperand(0)); @@ -1363,7 +1371,7 @@ case ISD::ConstantPool: Tmp1 = cast(N)->getIndex(); - Tmp2 = MakeReg(MVT::i32); + Tmp2 = MakeIntReg(); if (PICEnabled) BuildMI(BB, PPC::ADDIS, 2, Tmp2).addReg(getGlobalBaseReg()) .addConstantPoolIndex(Tmp1); @@ -1379,7 +1387,7 @@ case ISD::GlobalAddress: { GlobalValue *GV = cast(N)->getGlobal(); - Tmp1 = MakeReg(MVT::i32); + Tmp1 = MakeIntReg(); if (PICEnabled) BuildMI(BB, PPC::ADDIS, 2, Tmp1).addReg(getGlobalBaseReg()) .addGlobalAddress(GV); @@ -1422,7 +1430,7 @@ } if (ConstantPoolSDNode *CP = dyn_cast(Address)) { - Tmp1 = MakeReg(MVT::i32); + Tmp1 = MakeIntReg(); int CPI = CP->getIndex(); if (PICEnabled) BuildMI(BB, PPC::ADDIS, 2, Tmp1).addReg(getGlobalBaseReg()) @@ -1821,7 +1829,7 @@ if (isIntImmediate(N.getOperand(1), Tmp3)) { if ((signed)Tmp3 > 0 && isPowerOf2_32(Tmp3)) { Tmp3 = Log2_32(Tmp3); - Tmp1 = MakeReg(MVT::i32); + Tmp1 = MakeIntReg(); Tmp2 = SelectExpr(N.getOperand(0)); BuildMI(BB, PPC::SRAWI, 2, Tmp1).addReg(Tmp2).addImm(Tmp3); BuildMI(BB, PPC::ADDZE, 1, Result).addReg(Tmp1); @@ -1829,8 +1837,8 @@ } else if ((signed)Tmp3 < 0 && isPowerOf2_32(-Tmp3)) { Tmp3 = Log2_32(-Tmp3); Tmp2 = SelectExpr(N.getOperand(0)); - Tmp1 = MakeReg(MVT::i32); - unsigned Tmp4 = MakeReg(MVT::i32); + Tmp1 = MakeIntReg(); + unsigned Tmp4 = MakeIntReg(); BuildMI(BB, PPC::SRAWI, 2, Tmp1).addReg(Tmp2).addImm(Tmp3); BuildMI(BB, PPC::ADDZE, 1, Tmp4).addReg(Tmp1); BuildMI(BB, PPC::NEG, 1, Result).addReg(Tmp4); @@ -1891,12 +1899,12 @@ unsigned ShiftOpLo = SelectExpr(N.getOperand(0)); unsigned ShiftOpHi = SelectExpr(N.getOperand(1)); unsigned SHReg = FoldIfWideZeroExtend(N.getOperand(2)); - Tmp1 = MakeReg(MVT::i32); - Tmp2 = MakeReg(MVT::i32); - Tmp3 = MakeReg(MVT::i32); - unsigned Tmp4 = MakeReg(MVT::i32); - unsigned Tmp5 = MakeReg(MVT::i32); - unsigned Tmp6 = MakeReg(MVT::i32); + Tmp1 = MakeIntReg(); + Tmp2 = MakeIntReg(); + Tmp3 = MakeIntReg(); + unsigned Tmp4 = MakeIntReg(); + unsigned Tmp5 = MakeIntReg(); + unsigned Tmp6 = MakeIntReg(); BuildMI(BB, PPC::SUBFIC, 2, Tmp1).addReg(SHReg).addSImm(32); if (ISD::SHL_PARTS == opcode) { BuildMI(BB, PPC::SLW, 2, Tmp2).addReg(ShiftOpHi).addReg(SHReg); @@ -1933,7 +1941,7 @@ BuildMI(BB, PPC::BLE, 2).addReg(PPC::CR0).addMBB(PhiMBB); // Select correct least significant half if the shift amount > 32 BB = TmpMBB; - unsigned Tmp7 = MakeReg(MVT::i32); + unsigned Tmp7 = MakeIntReg(); BuildMI(BB, PPC::OR, 2, Tmp7).addReg(Tmp6).addReg(Tmp6); TmpMBB->addSuccessor(PhiMBB); BB = PhiMBB; @@ -1948,7 +1956,7 @@ bool U = (ISD::FP_TO_UINT == opcode); Tmp1 = SelectExpr(N.getOperand(0)); if (!U) { - Tmp2 = MakeReg(MVT::f64); + Tmp2 = MakeFPReg(); BuildMI(BB, PPC::FCTIWZ, 1, Tmp2).addReg(Tmp1); int FrameIdx = BB->getParent()->getFrameInfo()->CreateStackObject(8, 8); addFrameReference(BuildMI(BB, PPC::STFD, 3).addReg(Tmp2), FrameIdx); @@ -1958,14 +1966,14 @@ unsigned Zero = getConstDouble(0.0); unsigned MaxInt = getConstDouble((1LL << 32) - 1); unsigned Border = getConstDouble(1LL << 31); - unsigned UseZero = MakeReg(MVT::f64); - unsigned UseMaxInt = MakeReg(MVT::f64); - unsigned UseChoice = MakeReg(MVT::f64); - unsigned TmpReg = MakeReg(MVT::f64); - unsigned TmpReg2 = MakeReg(MVT::f64); - unsigned ConvReg = MakeReg(MVT::f64); - unsigned IntTmp = MakeReg(MVT::i32); - unsigned XorReg = MakeReg(MVT::i32); + unsigned UseZero = MakeFPReg(); + unsigned UseMaxInt = MakeFPReg(); + unsigned UseChoice = MakeFPReg(); + unsigned TmpReg = MakeFPReg(); + unsigned TmpReg2 = MakeFPReg(); + unsigned ConvReg = MakeFPReg(); + unsigned IntTmp = MakeIntReg(); + unsigned XorReg = MakeIntReg(); MachineFunction *F = BB->getParent(); int FrameIdx = F->getFrameInfo()->CreateStackObject(8, 8); // Update machine-CFG edges @@ -2025,13 +2033,13 @@ switch (CC) { default: Node->dump(); assert(0 && "Unhandled SetCC condition"); abort(); case ISD::SETEQ: - Tmp2 = MakeReg(MVT::i32); + Tmp2 = MakeIntReg(); BuildMI(BB, PPC::CNTLZW, 1, Tmp2).addReg(Tmp1); BuildMI(BB, PPC::RLWINM, 4, Result).addReg(Tmp2).addImm(27) .addImm(5).addImm(31); break; case ISD::SETNE: - Tmp2 = MakeReg(MVT::i32); + Tmp2 = MakeIntReg(); BuildMI(BB, PPC::ADDIC, 2, Tmp2).addReg(Tmp1).addSImm(-1); BuildMI(BB, PPC::SUBFE, 2, Result).addReg(Tmp2).addReg(Tmp1); break; @@ -2040,8 +2048,8 @@ .addImm(31).addImm(31); break; case ISD::SETGT: - Tmp2 = MakeReg(MVT::i32); - Tmp3 = MakeReg(MVT::i32); + Tmp2 = MakeIntReg(); + Tmp3 = MakeIntReg(); BuildMI(BB, PPC::NEG, 2, Tmp2).addReg(Tmp1); BuildMI(BB, PPC::ANDC, 2, Tmp3).addReg(Tmp2).addReg(Tmp1); BuildMI(BB, PPC::RLWINM, 4, Result).addReg(Tmp3).addImm(1) @@ -2054,29 +2062,29 @@ switch (CC) { default: assert(0 && "Unhandled SetCC condition"); abort(); case ISD::SETEQ: - Tmp2 = MakeReg(MVT::i32); - Tmp3 = MakeReg(MVT::i32); + Tmp2 = MakeIntReg(); + Tmp3 = MakeIntReg(); BuildMI(BB, PPC::ADDIC, 2, Tmp2).addReg(Tmp1).addSImm(1); BuildMI(BB, PPC::LI, 1, Tmp3).addSImm(0); BuildMI(BB, PPC::ADDZE, 1, Result).addReg(Tmp3); break; case ISD::SETNE: - Tmp2 = MakeReg(MVT::i32); - Tmp3 = MakeReg(MVT::i32); + Tmp2 = MakeIntReg(); + Tmp3 = MakeIntReg(); BuildMI(BB, PPC::NOR, 2, Tmp2).addReg(Tmp1).addReg(Tmp1); BuildMI(BB, PPC::ADDIC, 2, Tmp3).addReg(Tmp2).addSImm(-1); BuildMI(BB, PPC::SUBFE, 2, Result).addReg(Tmp3).addReg(Tmp2); break; case ISD::SETLT: - Tmp2 = MakeReg(MVT::i32); - Tmp3 = MakeReg(MVT::i32); + Tmp2 = MakeIntReg(); + Tmp3 = MakeIntReg(); BuildMI(BB, PPC::ADDI, 2, Tmp2).addReg(Tmp1).addSImm(1); BuildMI(BB, PPC::AND, 2, Tmp3).addReg(Tmp2).addReg(Tmp1); BuildMI(BB, PPC::RLWINM, 4, Result).addReg(Tmp3).addImm(1) .addImm(31).addImm(31); break; case ISD::SETGT: - Tmp2 = MakeReg(MVT::i32); + Tmp2 = MakeIntReg(); BuildMI(BB, PPC::RLWINM, 4, Tmp2).addReg(Tmp1).addImm(1) .addImm(31).addImm(31); BuildMI(BB, PPC::XORI, 2, Result).addReg(Tmp2).addImm(1); @@ -2217,7 +2225,7 @@ if (v < 32768 && v >= -32768) { BuildMI(BB, PPC::LI, 1, Result).addSImm(v); } else { - Tmp1 = MakeReg(MVT::i32); + Tmp1 = MakeIntReg(); BuildMI(BB, PPC::LIS, 1, Tmp1).addSImm(v >> 16); BuildMI(BB, PPC::ORI, 2, Result).addReg(Tmp1).addImm(v & 0xFFFF); } @@ -2296,8 +2304,8 @@ && "int to float must operate on i32"); bool IsUnsigned = (ISD::UINT_TO_FP == opcode); Tmp1 = SelectExpr(N.getOperand(0)); // Get the operand register - Tmp2 = MakeReg(MVT::f64); // temp reg to load the integer value into - Tmp3 = MakeReg(MVT::i32); // temp reg to hold the conversion constant + Tmp2 = MakeFPReg(); // temp reg to load the integer value into + Tmp3 = MakeIntReg(); // temp reg to hold the conversion constant int FrameIdx = BB->getParent()->getFrameInfo()->CreateStackObject(8, 8); MachineConstantPool *CP = BB->getParent()->getConstantPool(); @@ -2313,7 +2321,7 @@ BuildMI(BB, PPC::FSUB, 2, Result).addReg(Tmp2).addReg(ConstF); } else { unsigned ConstF = getConstDouble(0x1.000008p52); - unsigned TmpL = MakeReg(MVT::i32); + unsigned TmpL = MakeIntReg(); // Store the hi & low halves of the fp value, currently in int regs BuildMI(BB, PPC::LIS, 1, Tmp3).addSImm(0x4330); addFrameReference(BuildMI(BB, PPC::STW, 3).addReg(Tmp3), FrameIdx); From lattner at cs.uiuc.edu Thu Aug 11 12:57:02 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 11 Aug 2005 12:57:02 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Message-ID: <200508111757.MAA02587@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPC32ISelPattern.cpp updated: 1.133 -> 1.134 --- Log message: Tidied up the use of dyn_cast by using isIntImmediate more. Patch by Jim Laskey. --- Diffs of the changes: (+19 -22) PPC32ISelPattern.cpp | 41 +++++++++++++++++++---------------------- 1 files changed, 19 insertions(+), 22 deletions(-) Index: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp diff -u llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.133 llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.134 --- llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.133 Thu Aug 11 12:15:31 2005 +++ llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Thu Aug 11 12:56:50 2005 @@ -983,6 +983,7 @@ bool ISel::SelectBitfieldInsert(SDOperand OR, unsigned Result) { bool IsRotate = false; unsigned TgtMask = 0xFFFFFFFF, InsMask = 0xFFFFFFFF, Amount = 0; + unsigned Value; SDOperand Op0 = OR.getOperand(0); SDOperand Op1 = OR.getOperand(1); @@ -997,34 +998,32 @@ return false; // Generate Mask value for Target - if (ConstantSDNode *CN = - dyn_cast(Op0.getOperand(1).Val)) { + if (isIntImmediate(Op0.getOperand(1), Value)) { switch(Op0Opc) { - case ISD::SHL: TgtMask <<= (unsigned)CN->getValue(); break; - case ISD::SRL: TgtMask >>= (unsigned)CN->getValue(); break; - case ISD::AND: TgtMask &= (unsigned)CN->getValue(); break; + case ISD::SHL: TgtMask <<= Value; break; + case ISD::SRL: TgtMask >>= Value; break; + case ISD::AND: TgtMask &= Value; break; } } else { return false; } // Generate Mask value for Insert - if (ConstantSDNode *CN = - dyn_cast(Op1.getOperand(1).Val)) { + if (isIntImmediate(Op1.getOperand(1), Value)) { switch(Op1Opc) { case ISD::SHL: - Amount = CN->getValue(); + Amount = Value; InsMask <<= Amount; if (Op0Opc == ISD::SRL) IsRotate = true; break; case ISD::SRL: - Amount = CN->getValue(); + Amount = Value; InsMask >>= Amount; Amount = 32-Amount; if (Op0Opc == ISD::SHL) IsRotate = true; break; case ISD::AND: - InsMask &= (unsigned)CN->getValue(); + InsMask &= Value; break; } } else { @@ -1039,20 +1038,18 @@ if (Op0Opc == ISD::AND && Op1Opc == ISD::AND) { if (Op1.getOperand(0).getOpcode() == ISD::SHL || Op1.getOperand(0).getOpcode() == ISD::SRL) { - if (ConstantSDNode *CN = - dyn_cast(Op1.getOperand(0).getOperand(1).Val)) { + if (isIntImmediate(Op1.getOperand(0).getOperand(1), Value)) { Amount = Op1.getOperand(0).getOpcode() == ISD::SHL ? - CN->getValue() : 32 - CN->getValue(); + Value : 32 - Value; Tmp3 = SelectExpr(Op1.getOperand(0).getOperand(0)); } } else if (Op0.getOperand(0).getOpcode() == ISD::SHL || Op0.getOperand(0).getOpcode() == ISD::SRL) { - if (ConstantSDNode *CN = - dyn_cast(Op0.getOperand(0).getOperand(1).Val)) { + if (isIntImmediate(Op0.getOperand(0).getOperand(1), Value)) { std::swap(Op0, Op1); std::swap(TgtMask, InsMask); Amount = Op1.getOperand(0).getOpcode() == ISD::SHL ? - CN->getValue() : 32 - CN->getValue(); + Value : 32 - Value; Tmp3 = SelectExpr(Op1.getOperand(0).getOperand(0)); } } @@ -1584,8 +1581,8 @@ case ISD::SHL: Tmp1 = SelectExpr(N.getOperand(0)); - if (ConstantSDNode *CN = dyn_cast(N.getOperand(1))) { - Tmp2 = CN->getValue() & 0x1F; + if (isIntImmediate(N.getOperand(1), Tmp2)) { + Tmp2 &= 0x1F; BuildMI(BB, PPC::RLWINM, 4, Result).addReg(Tmp1).addImm(Tmp2).addImm(0) .addImm(31-Tmp2); } else { @@ -1596,8 +1593,8 @@ case ISD::SRL: Tmp1 = SelectExpr(N.getOperand(0)); - if (ConstantSDNode *CN = dyn_cast(N.getOperand(1))) { - Tmp2 = CN->getValue() & 0x1F; + if (isIntImmediate(N.getOperand(1), Tmp2)) { + Tmp2 &= 0x1F; BuildMI(BB, PPC::RLWINM, 4, Result).addReg(Tmp1).addImm(32-Tmp2) .addImm(Tmp2).addImm(31); } else { @@ -1608,8 +1605,8 @@ case ISD::SRA: Tmp1 = SelectExpr(N.getOperand(0)); - if (ConstantSDNode *CN = dyn_cast(N.getOperand(1))) { - Tmp2 = CN->getValue() & 0x1F; + if (isIntImmediate(N.getOperand(1), Tmp2)) { + Tmp2 &= 0x1F; BuildMI(BB, PPC::SRAWI, 2, Result).addReg(Tmp1).addImm(Tmp2); } else { Tmp2 = FoldIfWideZeroExtend(N.getOperand(1)); From lattner at cs.uiuc.edu Thu Aug 11 17:16:35 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 11 Aug 2005 17:16:35 -0500 Subject: [llvm-commits] CVS: llvm/Xcode/ Message-ID: <200508112216.RAA04709@zion.cs.uiuc.edu> Changes in directory llvm/Xcode: --- Log message: Directory /var/cvs/llvm/llvm/Xcode added to the repository --- Diffs of the changes: (+0 -0) 0 files changed From lattner at cs.uiuc.edu Thu Aug 11 17:19:01 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 11 Aug 2005 17:19:01 -0500 Subject: [llvm-commits] CVS: llvm/Xcode/LLVM.xcodeproj/ Message-ID: <200508112219.RAA04769@zion.cs.uiuc.edu> Changes in directory llvm/Xcode/LLVM.xcodeproj: --- Log message: Directory /var/cvs/llvm/llvm/Xcode/LLVM.xcodeproj added to the repository --- Diffs of the changes: (+0 -0) 0 files changed From lattner at cs.uiuc.edu Thu Aug 11 17:19:39 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 11 Aug 2005 17:19:39 -0500 Subject: [llvm-commits] CVS: llvm/Xcode/README.txt Message-ID: <200508112219.RAA04831@zion.cs.uiuc.edu> Changes in directory llvm/Xcode: README.txt added (r1.1) --- Log message: First rev of Xcode 2.1 project --- Diffs of the changes: (+1 -0) README.txt | 1 + 1 files changed, 1 insertion(+) Index: llvm/Xcode/README.txt diff -c /dev/null llvm/Xcode/README.txt:1.1 *** /dev/null Thu Aug 11 17:19:36 2005 --- llvm/Xcode/README.txt Thu Aug 11 17:19:26 2005 *************** *** 0 **** --- 1 ---- + Xcode project files for LLVM, for Xcode 2.1 From lattner at cs.uiuc.edu Thu Aug 11 17:19:39 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 11 Aug 2005 17:19:39 -0500 Subject: [llvm-commits] CVS: llvm/Xcode/LLVM.xcodeproj/project.pbxproj Message-ID: <200508112219.RAA04835@zion.cs.uiuc.edu> Changes in directory llvm/Xcode/LLVM.xcodeproj: project.pbxproj added (r1.1) --- Log message: First rev of Xcode 2.1 project --- Diffs of the changes: (+2395 -0) project.pbxproj | 2395 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 2395 insertions(+) Index: llvm/Xcode/LLVM.xcodeproj/project.pbxproj diff -c /dev/null llvm/Xcode/LLVM.xcodeproj/project.pbxproj:1.1 *** /dev/null Thu Aug 11 17:19:36 2005 --- llvm/Xcode/LLVM.xcodeproj/project.pbxproj Thu Aug 11 17:19:26 2005 *************** *** 0 **** --- 1,2395 ---- + // !$*UTF8*$! + { + archiveVersion = 1; + classes = { + }; + objectVersion = 42; + objects = { + + /* 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 PBXFileReference section */ + 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; }; + DE66EC6308ABE86A00323D32 /* Globals.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Globals.cpp; path = ../lib/VMCore/Globals.cpp; sourceTree = SOURCE_ROOT; }; + DE66EC6408ABE86A00323D32 /* Instruction.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Instruction.cpp; path = ../lib/VMCore/Instruction.cpp; sourceTree = SOURCE_ROOT; }; + DE66EC6508ABE86A00323D32 /* Instructions.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Instructions.cpp; path = ../lib/VMCore/Instructions.cpp; sourceTree = SOURCE_ROOT; }; + DE66EC6608ABE86A00323D32 /* LeakDetector.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = LeakDetector.cpp; path = ../lib/VMCore/LeakDetector.cpp; sourceTree = SOURCE_ROOT; }; + DE66EC6708ABE86A00323D32 /* Mangler.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Mangler.cpp; path = ../lib/VMCore/Mangler.cpp; sourceTree = SOURCE_ROOT; }; + DE66EC6808ABE86A00323D32 /* Module.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Module.cpp; path = ../lib/VMCore/Module.cpp; sourceTree = SOURCE_ROOT; }; + DE66EC6908ABE86A00323D32 /* ModuleProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ModuleProvider.cpp; path = ../lib/VMCore/ModuleProvider.cpp; sourceTree = SOURCE_ROOT; }; + DE66EC6A08ABE86A00323D32 /* Pass.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Pass.cpp; path = ../lib/VMCore/Pass.cpp; sourceTree = SOURCE_ROOT; }; + DE66EC6B08ABE86A00323D32 /* PassManagerT.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PassManagerT.h; path = ../lib/VMCore/PassManagerT.h; sourceTree = SOURCE_ROOT; }; + DE66EC6C08ABE86A00323D32 /* SymbolTable.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = SymbolTable.cpp; path = ../lib/VMCore/SymbolTable.cpp; sourceTree = SOURCE_ROOT; }; + DE66EC6D08ABE86A00323D32 /* SymbolTableListTraitsImpl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SymbolTableListTraitsImpl.h; path = ../lib/VMCore/SymbolTableListTraitsImpl.h; sourceTree = SOURCE_ROOT; }; + DE66EC6E08ABE86A00323D32 /* Type.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Type.cpp; path = ../lib/VMCore/Type.cpp; sourceTree = SOURCE_ROOT; }; + DE66EC6F08ABE86A00323D32 /* Value.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Value.cpp; path = ../lib/VMCore/Value.cpp; sourceTree = SOURCE_ROOT; }; + DE66EC7008ABE86A00323D32 /* Verifier.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Verifier.cpp; path = ../lib/VMCore/Verifier.cpp; sourceTree = SOURCE_ROOT; }; + DE66EC8A08ABEAF000323D32 /* Lexer.l */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.lex; name = Lexer.l; path = ../lib/AsmParser/Lexer.l; sourceTree = SOURCE_ROOT; }; + DE66EC8E08ABEAF000323D32 /* llvmAsmParser.y */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.yacc; name = llvmAsmParser.y; path = ../lib/AsmParser/llvmAsmParser.y; sourceTree = SOURCE_ROOT; }; + DE66EC8F08ABEAF000323D32 /* Parser.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Parser.cpp; path = ../lib/AsmParser/Parser.cpp; sourceTree = SOURCE_ROOT; }; + DE66EC9008ABEAF000323D32 /* ParserInternals.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ParserInternals.h; path = ../lib/AsmParser/ParserInternals.h; sourceTree = SOURCE_ROOT; }; + DE66EC9408ABEB3900323D32 /* Analyzer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Analyzer.cpp; sourceTree = ""; }; + DE66EC9E08ABEB3900323D32 /* Reader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Reader.cpp; sourceTree = ""; }; + DE66EC9F08ABEB3900323D32 /* Reader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Reader.h; sourceTree = ""; }; + DE66ECA008ABEB3900323D32 /* ReaderWrappers.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ReaderWrappers.cpp; sourceTree = ""; }; + DE66ECA208ABEB8000323D32 /* Archive.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Archive.cpp; sourceTree = ""; }; + DE66ECA308ABEB8000323D32 /* ArchiveInternals.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ArchiveInternals.h; sourceTree = ""; }; + DE66ECA408ABEB8000323D32 /* ArchiveReader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ArchiveReader.cpp; sourceTree = ""; }; + DE66ECA508ABEB8000323D32 /* ArchiveWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ArchiveWriter.cpp; sourceTree = ""; }; + DE66ECB708ABEB8000323D32 /* SlotCalculator.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SlotCalculator.cpp; sourceTree = ""; }; + DE66ECB808ABEB8000323D32 /* SlotCalculator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SlotCalculator.h; sourceTree = ""; }; + DE66ECB908ABEB8000323D32 /* SlotTable.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SlotTable.h; sourceTree = ""; }; + DE66ECBA08ABEB8000323D32 /* Writer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Writer.cpp; sourceTree = ""; }; + DE66ECBB08ABEB8000323D32 /* WriterInternals.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WriterInternals.h; sourceTree = ""; }; + DE66ECBE08ABEC0700323D32 /* AliasAnalysis.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AliasAnalysis.cpp; sourceTree = ""; }; + DE66ECBF08ABEC0700323D32 /* AliasAnalysisCounter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AliasAnalysisCounter.cpp; sourceTree = ""; }; + DE66ECC008ABEC0700323D32 /* AliasAnalysisEvaluator.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AliasAnalysisEvaluator.cpp; sourceTree = ""; }; + DE66ECC108ABEC0700323D32 /* AliasSetTracker.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AliasSetTracker.cpp; sourceTree = ""; }; + DE66ECC208ABEC0700323D32 /* BasicAliasAnalysis.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BasicAliasAnalysis.cpp; sourceTree = ""; }; + DE66ECC308ABEC0700323D32 /* CFGPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CFGPrinter.cpp; sourceTree = ""; }; + DE66ECC508ABEC0700323D32 /* BottomUpClosure.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BottomUpClosure.cpp; sourceTree = ""; }; + DE66ECC608ABEC0700323D32 /* CompleteBottomUp.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CompleteBottomUp.cpp; sourceTree = ""; }; + DE66ECC708ABEC0700323D32 /* DataStructure.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DataStructure.cpp; sourceTree = ""; }; + DE66ECC808ABEC0700323D32 /* DataStructureAA.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DataStructureAA.cpp; sourceTree = ""; }; + DE66ECC908ABEC0700323D32 /* DataStructureOpt.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DataStructureOpt.cpp; sourceTree = ""; }; + DE66ECCA08ABEC0700323D32 /* DataStructureStats.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DataStructureStats.cpp; sourceTree = ""; }; + DE66ECE508ABEC0700323D32 /* EquivClassGraphs.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = EquivClassGraphs.cpp; sourceTree = ""; }; + DE66ECE608ABEC0700323D32 /* GraphChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = GraphChecker.cpp; sourceTree = ""; }; + DE66ECE708ABEC0700323D32 /* Local.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Local.cpp; sourceTree = ""; }; + DE66ECE908ABEC0700323D32 /* Printer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Printer.cpp; sourceTree = ""; }; + DE66ECEA08ABEC0700323D32 /* Steensgaard.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Steensgaard.cpp; sourceTree = ""; }; + DE66ECEB08ABEC0700323D32 /* TopDownClosure.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TopDownClosure.cpp; sourceTree = ""; }; + DE66ED1608ABEC0800323D32 /* Expressions.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Expressions.cpp; sourceTree = ""; }; + DE66ED1708ABEC0800323D32 /* InstCount.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = InstCount.cpp; sourceTree = ""; }; + DE66ED1808ABEC0800323D32 /* Interval.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Interval.cpp; sourceTree = ""; }; + DE66ED1908ABEC0800323D32 /* IntervalPartition.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = IntervalPartition.cpp; sourceTree = ""; }; + DE66ED1B08ABEC0800323D32 /* Andersens.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Andersens.cpp; sourceTree = ""; }; + DE66ED1C08ABEC0800323D32 /* CallGraph.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CallGraph.cpp; sourceTree = ""; }; + DE66ED1D08ABEC0800323D32 /* CallGraphSCCPass.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CallGraphSCCPass.cpp; sourceTree = ""; }; + DE66ED2E08ABEC0800323D32 /* FindUnsafePointerTypes.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FindUnsafePointerTypes.cpp; sourceTree = ""; }; + DE66ED2F08ABEC0800323D32 /* FindUsedTypes.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FindUsedTypes.cpp; sourceTree = ""; }; + DE66ED3008ABEC0800323D32 /* GlobalsModRef.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = GlobalsModRef.cpp; sourceTree = ""; }; + DE66ED3208ABEC0800323D32 /* PrintSCC.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PrintSCC.cpp; sourceTree = ""; }; + DE66ED3308ABEC0800323D32 /* LoadValueNumbering.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LoadValueNumbering.cpp; sourceTree = ""; }; + DE66ED3408ABEC0800323D32 /* LoopInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LoopInfo.cpp; sourceTree = ""; }; + DE66ED3608ABEC0800323D32 /* PostDominators.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PostDominators.cpp; sourceTree = ""; }; + DE66ED3708ABEC0800323D32 /* ProfileInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ProfileInfo.cpp; sourceTree = ""; }; + DE66ED3808ABEC0800323D32 /* ProfileInfoLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ProfileInfoLoader.cpp; sourceTree = ""; }; + DE66ED3908ABEC0800323D32 /* ProfileInfoLoaderPass.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ProfileInfoLoaderPass.cpp; sourceTree = ""; }; + DE66ED3A08ABEC0800323D32 /* ScalarEvolution.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ScalarEvolution.cpp; sourceTree = ""; }; + DE66ED3B08ABEC0800323D32 /* ScalarEvolutionExpander.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ScalarEvolutionExpander.cpp; sourceTree = ""; }; + DE66ED3C08ABEC0800323D32 /* Trace.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Trace.cpp; sourceTree = ""; }; + DE66ED3D08ABEC0800323D32 /* ValueNumbering.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ValueNumbering.cpp; sourceTree = ""; }; + DE66ED3F08ABEC2A00323D32 /* AsmPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AsmPrinter.cpp; sourceTree = ""; }; + DE66ED4008ABEC2A00323D32 /* BranchFolding.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BranchFolding.cpp; sourceTree = ""; }; + DE66ED6F08ABEC2B00323D32 /* ELFWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ELFWriter.cpp; sourceTree = ""; }; + DE66ED7008ABEC2B00323D32 /* IntrinsicLowering.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = IntrinsicLowering.cpp; sourceTree = ""; }; + DE66ED7108ABEC2B00323D32 /* LiveInterval.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LiveInterval.cpp; sourceTree = ""; }; + DE66ED7208ABEC2B00323D32 /* LiveInterval.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = LiveInterval.h; sourceTree = ""; }; + DE66ED7308ABEC2B00323D32 /* LiveIntervalAnalysis.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LiveIntervalAnalysis.cpp; sourceTree = ""; }; + DE66ED7408ABEC2B00323D32 /* LiveIntervalAnalysis.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = LiveIntervalAnalysis.h; 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 = ""; }; + DE66ED7C08ABEC2B00323D32 /* PHIElimination.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PHIElimination.cpp; sourceTree = ""; }; + DE66ED7D08ABEC2B00323D32 /* PhysRegTracker.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PhysRegTracker.h; sourceTree = ""; }; + DE66ED7E08ABEC2B00323D32 /* PrologEpilogInserter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PrologEpilogInserter.cpp; sourceTree = ""; }; + DE66ED7F08ABEC2B00323D32 /* RegAllocIterativeScan.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RegAllocIterativeScan.cpp; sourceTree = ""; }; + DE66ED8008ABEC2B00323D32 /* RegAllocLinearScan.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RegAllocLinearScan.cpp; sourceTree = ""; }; + DE66ED8108ABEC2B00323D32 /* RegAllocLocal.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RegAllocLocal.cpp; sourceTree = ""; }; + DE66ED8208ABEC2B00323D32 /* RegAllocSimple.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RegAllocSimple.cpp; sourceTree = ""; }; + DE66ED9008ABEC2B00323D32 /* LegalizeDAG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LegalizeDAG.cpp; sourceTree = ""; }; + DE66ED9208ABEC2B00323D32 /* SelectionDAG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SelectionDAG.cpp; sourceTree = ""; }; + DE66ED9308ABEC2B00323D32 /* SelectionDAGISel.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SelectionDAGISel.cpp; sourceTree = ""; }; + DE66ED9408ABEC2B00323D32 /* SelectionDAGPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SelectionDAGPrinter.cpp; sourceTree = ""; }; + DE66ED9508ABEC2B00323D32 /* TwoAddressInstructionPass.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TwoAddressInstructionPass.cpp; sourceTree = ""; }; + DE66ED9608ABEC2B00323D32 /* UnreachableBlockElim.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = UnreachableBlockElim.cpp; sourceTree = ""; }; + DE66ED9708ABEC2B00323D32 /* ValueTypes.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ValueTypes.cpp; sourceTree = ""; }; + 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 = ""; }; + DE66EDB808ABEC7300323D32 /* SourceFile.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SourceFile.cpp; sourceTree = ""; }; + DE66EDB908ABEC7300323D32 /* SourceLanguage-CFamily.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = "SourceLanguage-CFamily.cpp"; sourceTree = ""; }; + 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 = ""; }; + DE66EDD008ABEC9000323D32 /* Interpreter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Interpreter.cpp; sourceTree = ""; }; + DE66EDD108ABEC9000323D32 /* Interpreter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Interpreter.h; sourceTree = ""; }; + DE66EDDE08ABEC9100323D32 /* Intercept.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Intercept.cpp; sourceTree = ""; }; + DE66EDDF08ABEC9100323D32 /* JIT.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JIT.cpp; sourceTree = ""; }; + DE66EDE008ABEC9100323D32 /* JIT.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JIT.h; sourceTree = ""; }; + DE66EDE108ABEC9100323D32 /* JITEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JITEmitter.cpp; sourceTree = ""; }; + DE66EDE308ABEC9100323D32 /* TargetSelect.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TargetSelect.cpp; sourceTree = ""; }; + DE66EDF608ABEDD300323D32 /* LinkArchives.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LinkArchives.cpp; sourceTree = ""; }; + DE66EDF708ABEDD300323D32 /* Linker.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Linker.cpp; sourceTree = ""; }; + DE66EDF808ABEDD300323D32 /* LinkItems.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LinkItems.cpp; sourceTree = ""; }; + DE66EDF908ABEDD300323D32 /* LinkModules.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LinkModules.cpp; sourceTree = ""; }; + DE66EDFC08ABEDE600323D32 /* Annotation.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Annotation.cpp; sourceTree = ""; }; + DE66EDFE08ABEDE600323D32 /* blocksort.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = blocksort.c; sourceTree = ""; }; + DE66EDFF08ABEDE600323D32 /* bzlib.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = bzlib.c; sourceTree = ""; }; + DE66EE0008ABEDE600323D32 /* bzlib.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = bzlib.h; sourceTree = ""; }; + DE66EE0108ABEDE600323D32 /* bzlib_private.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = bzlib_private.h; sourceTree = ""; }; + DE66EE0208ABEDE600323D32 /* CHANGES */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CHANGES; sourceTree = ""; }; + DE66EE0308ABEDE600323D32 /* compress.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = compress.c; sourceTree = ""; }; + DE66EE0408ABEDE600323D32 /* crctable.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = crctable.c; sourceTree = ""; }; + DE66EE1508ABEDE600323D32 /* decompress.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = decompress.c; sourceTree = ""; }; + DE66EE1608ABEDE600323D32 /* huffman.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = huffman.c; sourceTree = ""; }; + DE66EE1708ABEDE600323D32 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; + DE66EE1908ABEDE600323D32 /* randtable.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = randtable.c; sourceTree = ""; }; + DE66EE1A08ABEDE600323D32 /* README */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = README; sourceTree = ""; }; + DE66EE1B08ABEDE600323D32 /* README.COMPILATION.PROBLEMS */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = README.COMPILATION.PROBLEMS; sourceTree = ""; }; + DE66EE1C08ABEDE600323D32 /* Y2K_INFO */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Y2K_INFO; sourceTree = ""; }; + DE66EE1D08ABEDE600323D32 /* CommandLine.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CommandLine.cpp; sourceTree = ""; }; + DE66EE1E08ABEDE600323D32 /* Compressor.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Compressor.cpp; sourceTree = ""; }; + DE66EE3D08ABEDE600323D32 /* Debug.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Debug.cpp; sourceTree = ""; }; + DE66EE3E08ABEDE600323D32 /* FileUtilities.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FileUtilities.cpp; sourceTree = ""; }; + DE66EE3F08ABEDE600323D32 /* IsInf.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = IsInf.cpp; sourceTree = ""; }; + DE66EE4008ABEDE600323D32 /* IsNAN.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = IsNAN.cpp; sourceTree = ""; }; + DE66EE4208ABEDE600323D32 /* PluginLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PluginLoader.cpp; sourceTree = ""; }; + DE66EE4308ABEDE600323D32 /* SlowOperationInformer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SlowOperationInformer.cpp; sourceTree = ""; }; + DE66EE4408ABEDE600323D32 /* Statistic.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Statistic.cpp; sourceTree = ""; }; + 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 = ""; }; + DE66EE6308ABEE3400323D32 /* ltdl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ltdl.h; sourceTree = ""; }; + DE66EE6508ABEE3400323D32 /* MappedFile.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MappedFile.cpp; sourceTree = ""; }; + DE66EE6608ABEE3400323D32 /* Memory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Memory.cpp; sourceTree = ""; }; + DE66EE6708ABEE3400323D32 /* Mutex.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Mutex.cpp; sourceTree = ""; }; + DE66EE6808ABEE3400323D32 /* Path.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Path.cpp; sourceTree = ""; }; + DE66EE6908ABEE3400323D32 /* Process.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Process.cpp; sourceTree = ""; }; + DE66EE6A08ABEE3400323D32 /* Program.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Program.cpp; sourceTree = ""; }; + DE66EE6B08ABEE3400323D32 /* README.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = README.txt; sourceTree = ""; }; + DE66EE7C08ABEE3400323D32 /* Signals.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Signals.cpp; sourceTree = ""; }; + DE66EE7D08ABEE3400323D32 /* TimeValue.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TimeValue.cpp; sourceTree = ""; }; + DE66EE7F08ABEE3500323D32 /* MappedFile.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = MappedFile.inc; sourceTree = ""; }; + DE66EE8008ABEE3500323D32 /* Memory.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Memory.inc; sourceTree = ""; }; + DE66EE8108ABEE3500323D32 /* Mutex.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Mutex.inc; sourceTree = ""; }; + DE66EE8208ABEE3500323D32 /* Path.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Path.inc; sourceTree = ""; }; + DE66EE8308ABEE3500323D32 /* Process.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Process.inc; sourceTree = ""; }; + DE66EE8408ABEE3500323D32 /* Program.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Program.inc; sourceTree = ""; }; + DE66EE8508ABEE3500323D32 /* README.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = README.txt; sourceTree = ""; }; + DE66EE8608ABEE3500323D32 /* Signals.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Signals.inc; sourceTree = ""; }; + DE66EE8808ABEE3500323D32 /* Process.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Process.cpp; sourceTree = ""; }; + DE66EE8908ABEE3500323D32 /* TimeValue.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = TimeValue.inc; sourceTree = ""; }; + DE66EE8A08ABEE3500323D32 /* Unix.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Unix.h; sourceTree = ""; }; + DE66EE8C08ABEE3500323D32 /* DynamicLibrary.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = DynamicLibrary.inc; sourceTree = ""; }; + DE66EE8D08ABEE3500323D32 /* MappedFile.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = MappedFile.inc; sourceTree = ""; }; + DE66EE8E08ABEE3500323D32 /* Memory.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Memory.inc; sourceTree = ""; }; + DE66EE8F08ABEE3500323D32 /* Mutex.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Mutex.inc; sourceTree = ""; }; + DE66EE9008ABEE3500323D32 /* Path.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Path.inc; sourceTree = ""; }; + DE66EE9108ABEE3500323D32 /* Process.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Process.inc; sourceTree = ""; }; + DE66EE9208ABEE3500323D32 /* Program.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Program.inc; sourceTree = ""; }; + DE66EE9308ABEE3500323D32 /* Signals.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Signals.inc; sourceTree = ""; }; + DE66EE9408ABEE3500323D32 /* TimeValue.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = TimeValue.inc; sourceTree = ""; }; + DE66EE9508ABEE3500323D32 /* Win32.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Win32.h; sourceTree = ""; }; + DE66EE9808ABEE5E00323D32 /* Alpha.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Alpha.h; sourceTree = ""; }; + DE66EE9908ABEE5E00323D32 /* Alpha.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Alpha.td; sourceTree = ""; }; + DE66EE9A08ABEE5E00323D32 /* AlphaAsmPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaAsmPrinter.cpp; sourceTree = ""; }; + DE66EE9B08ABEE5E00323D32 /* AlphaCodeEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaCodeEmitter.cpp; sourceTree = ""; }; + DE66EEA308ABEE5E00323D32 /* AlphaInstrFormats.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = AlphaInstrFormats.td; sourceTree = ""; }; + DE66EEA408ABEE5E00323D32 /* AlphaInstrInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaInstrInfo.cpp; sourceTree = ""; }; + DE66EEA508ABEE5E00323D32 /* AlphaInstrInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AlphaInstrInfo.h; sourceTree = ""; }; + DE66EEA608ABEE5E00323D32 /* AlphaInstrInfo.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = AlphaInstrInfo.td; sourceTree = ""; }; + DE66EEA708ABEE5E00323D32 /* AlphaISelPattern.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaISelPattern.cpp; sourceTree = ""; }; + DE66EEA808ABEE5E00323D32 /* AlphaISelPattern.cpp.orig */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = AlphaISelPattern.cpp.orig; sourceTree = ""; }; + DE66EEA908ABEE5E00323D32 /* AlphaJITInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaJITInfo.cpp; sourceTree = ""; }; + DE66EEAA08ABEE5E00323D32 /* AlphaJITInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AlphaJITInfo.h; sourceTree = ""; }; + DE66EEAB08ABEE5E00323D32 /* AlphaRegisterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaRegisterInfo.cpp; sourceTree = ""; }; + DE66EEAC08ABEE5E00323D32 /* AlphaRegisterInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AlphaRegisterInfo.h; sourceTree = ""; }; + DE66EEAD08ABEE5E00323D32 /* AlphaRegisterInfo.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = AlphaRegisterInfo.td; sourceTree = ""; }; + DE66EEAE08ABEE5E00323D32 /* AlphaRelocations.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AlphaRelocations.h; sourceTree = ""; }; + DE66EEAF08ABEE5E00323D32 /* AlphaTargetMachine.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AlphaTargetMachine.cpp; sourceTree = ""; }; + DE66EEB008ABEE5E00323D32 /* AlphaTargetMachine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AlphaTargetMachine.h; sourceTree = ""; }; + DE66EECA08ABEE5E00323D32 /* CTargetMachine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CTargetMachine.h; sourceTree = ""; }; + DE66EED008ABEE5E00323D32 /* Writer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Writer.cpp; sourceTree = ""; }; + DE66EEF808ABEE5E00323D32 /* IA64.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IA64.h; sourceTree = ""; }; + DE66EEF908ABEE5E00323D32 /* IA64.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = IA64.td; sourceTree = ""; }; + DE66EEFA08ABEE5E00323D32 /* IA64AsmPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = IA64AsmPrinter.cpp; sourceTree = ""; }; + DE66EF0108ABEE5E00323D32 /* IA64InstrBuilder.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IA64InstrBuilder.h; sourceTree = ""; }; + DE66EF0208ABEE5E00323D32 /* IA64InstrFormats.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = IA64InstrFormats.td; sourceTree = ""; }; + DE66EF0308ABEE5E00323D32 /* IA64InstrInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = IA64InstrInfo.cpp; sourceTree = ""; }; + DE66EF0408ABEE5E00323D32 /* IA64InstrInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IA64InstrInfo.h; sourceTree = ""; }; + DE66EF0508ABEE5E00323D32 /* IA64InstrInfo.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = IA64InstrInfo.td; sourceTree = ""; }; + DE66EF0608ABEE5E00323D32 /* IA64ISelPattern.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = IA64ISelPattern.cpp; sourceTree = ""; }; + DE66EF0708ABEE5E00323D32 /* IA64MachineFunctionInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IA64MachineFunctionInfo.h; sourceTree = ""; }; + DE66EF0808ABEE5E00323D32 /* IA64RegisterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = IA64RegisterInfo.cpp; sourceTree = ""; }; + DE66EF0908ABEE5E00323D32 /* IA64RegisterInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IA64RegisterInfo.h; sourceTree = ""; }; + DE66EF0A08ABEE5E00323D32 /* IA64RegisterInfo.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = IA64RegisterInfo.td; sourceTree = ""; }; + DE66EF0B08ABEE5E00323D32 /* IA64TargetMachine.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = IA64TargetMachine.cpp; sourceTree = ""; }; + 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 = ""; }; + DE66EF1208ABEE5E00323D32 /* .cvsignore */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = .cvsignore; sourceTree = ""; }; + DE66EF3D08ABEE5F00323D32 /* LICENSE.TXT */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = LICENSE.TXT; sourceTree = ""; }; + DE66EF3F08ABEE5F00323D32 /* PowerPC.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PowerPC.h; sourceTree = ""; }; + DE66EF4008ABEE5F00323D32 /* PowerPC.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = PowerPC.td; sourceTree = ""; }; + DE66EF4108ABEE5F00323D32 /* PowerPCAsmPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PowerPCAsmPrinter.cpp; sourceTree = ""; }; + DE66EF4208ABEE5F00323D32 /* PowerPCBranchSelector.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PowerPCBranchSelector.cpp; sourceTree = ""; }; + DE66EF4308ABEE5F00323D32 /* PowerPCFrameInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PowerPCFrameInfo.h; sourceTree = ""; }; + DE66EF4708ABEE5F00323D32 /* PowerPCInstrBuilder.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PowerPCInstrBuilder.h; sourceTree = ""; }; + DE66EF4808ABEE5F00323D32 /* PowerPCInstrFormats.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = PowerPCInstrFormats.td; sourceTree = ""; }; + DE66EF4908ABEE5F00323D32 /* PowerPCInstrInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PowerPCInstrInfo.h; sourceTree = ""; }; + DE66EF4A08ABEE5F00323D32 /* PowerPCInstrInfo.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = PowerPCInstrInfo.td; sourceTree = ""; }; + DE66EF4B08ABEE5F00323D32 /* PowerPCJITInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PowerPCJITInfo.h; sourceTree = ""; }; + DE66EF4C08ABEE5F00323D32 /* PowerPCRegisterInfo.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = PowerPCRegisterInfo.td; sourceTree = ""; }; + DE66EF4D08ABEE5F00323D32 /* PowerPCSubtarget.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PowerPCSubtarget.cpp; sourceTree = ""; }; + DE66EF4E08ABEE5F00323D32 /* PowerPCSubtarget.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PowerPCSubtarget.h; sourceTree = ""; }; + DE66EF4F08ABEE5F00323D32 /* PowerPCTargetMachine.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PowerPCTargetMachine.cpp; sourceTree = ""; }; + DE66EF5008ABEE5F00323D32 /* PowerPCTargetMachine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PowerPCTargetMachine.h; sourceTree = ""; }; + DE66EF5108ABEE5F00323D32 /* PPC32.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = PPC32.td; sourceTree = ""; }; + DE66EF5208ABEE5F00323D32 /* PPC32CodeEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PPC32CodeEmitter.cpp; sourceTree = ""; }; + DE66EF5708ABEE5F00323D32 /* PPC32InstrInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PPC32InstrInfo.cpp; sourceTree = ""; }; + DE66EF5808ABEE5F00323D32 /* PPC32InstrInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PPC32InstrInfo.h; sourceTree = ""; }; + DE66EF5908ABEE5F00323D32 /* PPC32ISelPattern.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PPC32ISelPattern.cpp; sourceTree = ""; }; + DE66EF5A08ABEE5F00323D32 /* PPC32ISelSimple.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PPC32ISelSimple.cpp; sourceTree = ""; }; + DE66EF5B08ABEE5F00323D32 /* PPC32JITInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PPC32JITInfo.cpp; sourceTree = ""; }; + DE66EF5C08ABEE5F00323D32 /* PPC32JITInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PPC32JITInfo.h; sourceTree = ""; }; + DE66EF5D08ABEE5F00323D32 /* PPC32RegisterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PPC32RegisterInfo.cpp; sourceTree = ""; }; + DE66EF5E08ABEE5F00323D32 /* PPC32RegisterInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PPC32RegisterInfo.h; sourceTree = ""; }; + DE66EF5F08ABEE5F00323D32 /* PPC32RegisterInfo.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = PPC32RegisterInfo.td; sourceTree = ""; }; + DE66EF6008ABEE5F00323D32 /* PPC32Relocations.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PPC32Relocations.h; sourceTree = ""; }; + DE66EF6108ABEE5F00323D32 /* PPC32TargetMachine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PPC32TargetMachine.h; sourceTree = ""; }; + DE66EF6208ABEE5F00323D32 /* PPC64.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = PPC64.td; sourceTree = ""; }; + DE66EF6308ABEE5F00323D32 /* PPC64CodeEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PPC64CodeEmitter.cpp; sourceTree = ""; }; + DE66EF6708ABEE5F00323D32 /* PPC64InstrInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PPC64InstrInfo.cpp; sourceTree = ""; }; + DE66EF6808ABEE5F00323D32 /* PPC64InstrInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PPC64InstrInfo.h; sourceTree = ""; }; + DE66EF6908ABEE5F00323D32 /* PPC64ISelPattern.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PPC64ISelPattern.cpp; sourceTree = ""; }; + DE66EF6A08ABEE5F00323D32 /* PPC64JITInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PPC64JITInfo.h; sourceTree = ""; }; + DE66EF6B08ABEE5F00323D32 /* PPC64RegisterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PPC64RegisterInfo.cpp; sourceTree = ""; }; + DE66EF6C08ABEE5F00323D32 /* PPC64RegisterInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PPC64RegisterInfo.h; sourceTree = ""; }; + DE66EF6D08ABEE5F00323D32 /* PPC64RegisterInfo.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = PPC64RegisterInfo.td; sourceTree = ""; }; + DE66EF6E08ABEE5F00323D32 /* PPC64TargetMachine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PPC64TargetMachine.h; sourceTree = ""; }; + DE66EF6F08ABEE5F00323D32 /* README.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = README.txt; sourceTree = ""; }; + DE66EF7108ABEE5F00323D32 /* .cvsignore */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = .cvsignore; sourceTree = ""; }; + DE66EF8208ABEE5F00323D32 /* README.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = README.txt; sourceTree = ""; }; + DE66EF8308ABEE5F00323D32 /* Skeleton.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Skeleton.h; sourceTree = ""; }; + DE66EF8408ABEE5F00323D32 /* Skeleton.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Skeleton.td; sourceTree = ""; }; + DE66EF8A08ABEE5F00323D32 /* SkeletonInstrInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SkeletonInstrInfo.cpp; sourceTree = ""; }; + DE66EF8B08ABEE5F00323D32 /* SkeletonInstrInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SkeletonInstrInfo.h; sourceTree = ""; }; + DE66EF8C08ABEE5F00323D32 /* SkeletonInstrInfo.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SkeletonInstrInfo.td; sourceTree = ""; }; + DE66EF8D08ABEE5F00323D32 /* SkeletonJITInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SkeletonJITInfo.cpp; sourceTree = ""; }; + DE66EF8E08ABEE5F00323D32 /* SkeletonJITInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SkeletonJITInfo.h; sourceTree = ""; }; + DE66EF8F08ABEE5F00323D32 /* SkeletonRegisterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SkeletonRegisterInfo.cpp; sourceTree = ""; }; + DE66EF9008ABEE5F00323D32 /* SkeletonRegisterInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SkeletonRegisterInfo.h; sourceTree = ""; }; + DE66EF9108ABEE5F00323D32 /* SkeletonRegisterInfo.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SkeletonRegisterInfo.td; sourceTree = ""; }; + DE66EF9208ABEE5F00323D32 /* SkeletonTargetMachine.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SkeletonTargetMachine.cpp; sourceTree = ""; }; + DE66EF9308ABEE5F00323D32 /* SkeletonTargetMachine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SkeletonTargetMachine.h; sourceTree = ""; }; + DE66EFAF08ABEE5F00323D32 /* DelaySlotFiller.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DelaySlotFiller.cpp; sourceTree = ""; }; + DE66EFB008ABEE5F00323D32 /* FPMover.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FPMover.cpp; sourceTree = ""; }; + DE66EFB208ABEE5F00323D32 /* README.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = README.txt; sourceTree = ""; }; + DE66EFB308ABEE5F00323D32 /* SparcV8.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SparcV8.h; sourceTree = ""; }; + DE66EFB408ABEE5F00323D32 /* SparcV8.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SparcV8.td; sourceTree = ""; }; + DE66EFB508ABEE5F00323D32 /* SparcV8AsmPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SparcV8AsmPrinter.cpp; sourceTree = ""; }; + DE66EFB608ABEE5F00323D32 /* SparcV8CodeEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SparcV8CodeEmitter.cpp; sourceTree = ""; }; + DE66EFBD08ABEE5F00323D32 /* SparcV8InstrFormats.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SparcV8InstrFormats.td; sourceTree = ""; }; + DE66EFBE08ABEE5F00323D32 /* SparcV8InstrInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SparcV8InstrInfo.cpp; sourceTree = ""; }; + DE66EFBF08ABEE5F00323D32 /* SparcV8InstrInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SparcV8InstrInfo.h; sourceTree = ""; }; + DE66EFC008ABEE5F00323D32 /* SparcV8InstrInfo.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SparcV8InstrInfo.td; sourceTree = ""; }; + DE66EFC108ABEE5F00323D32 /* SparcV8ISelPattern.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SparcV8ISelPattern.cpp; sourceTree = ""; }; + DE66EFC208ABEE5F00323D32 /* SparcV8ISelSimple.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SparcV8ISelSimple.cpp; sourceTree = ""; }; + DE66EFC308ABEE5F00323D32 /* SparcV8JITInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SparcV8JITInfo.h; sourceTree = ""; }; + DE66EFC408ABEE5F00323D32 /* SparcV8RegisterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SparcV8RegisterInfo.cpp; sourceTree = ""; }; + DE66EFC508ABEE5F00323D32 /* SparcV8RegisterInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SparcV8RegisterInfo.h; sourceTree = ""; }; + DE66EFC608ABEE5F00323D32 /* SparcV8RegisterInfo.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SparcV8RegisterInfo.td; sourceTree = ""; }; + DE66EFC708ABEE5F00323D32 /* SparcV8TargetMachine.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SparcV8TargetMachine.cpp; sourceTree = ""; }; + DE66EFC808ABEE5F00323D32 /* SparcV8TargetMachine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SparcV8TargetMachine.h; sourceTree = ""; }; + DE66EFCA08ABEE5F00323D32 /* .cvsignore */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = .cvsignore; 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 = ""; }; + DE66F05C08ABEE6000323D32 /* Notes.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Notes.txt; 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 = ""; }; + DE66F06308ABEE6000323D32 /* SparcV9.burg.in1 */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SparcV9.burg.in1; sourceTree = ""; }; + DE66F06408ABEE6000323D32 /* SparcV9.burm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SparcV9.burm; sourceTree = ""; }; + DE66F06508ABEE6000323D32 /* SparcV9.burm.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SparcV9.burm.cpp; 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 = ""; }; + DE66F08D08ABEE6000323D32 /* TargetInstrInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TargetInstrInfo.cpp; sourceTree = ""; }; + 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 = ""; }; + DE66F09408ABEE6000323D32 /* .cvsignore */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = .cvsignore; 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 = ""; }; + DE66F0BE08ABEE6000323D32 /* X86AsmPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = X86AsmPrinter.cpp; sourceTree = ""; }; + DE66F0BF08ABEE6000323D32 /* X86AsmPrinter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = X86AsmPrinter.h; sourceTree = ""; }; + DE66F0C008ABEE6000323D32 /* X86ATTAsmPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = X86ATTAsmPrinter.cpp; sourceTree = ""; }; + DE66F0C108ABEE6000323D32 /* X86ATTAsmPrinter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = X86ATTAsmPrinter.h; sourceTree = ""; }; + DE66F0C208ABEE6000323D32 /* X86CodeEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = X86CodeEmitter.cpp; sourceTree = ""; }; + DE66F0C308ABEE6000323D32 /* X86ELFWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = X86ELFWriter.cpp; sourceTree = ""; }; + DE66F0C408ABEE6000323D32 /* X86FloatingPoint.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = X86FloatingPoint.cpp; sourceTree = ""; }; + DE66F0CC08ABEE6000323D32 /* X86InstrBuilder.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = X86InstrBuilder.h; sourceTree = ""; }; + DE66F0CD08ABEE6000323D32 /* X86InstrInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = X86InstrInfo.cpp; sourceTree = ""; }; + DE66F0CE08ABEE6000323D32 /* X86InstrInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = X86InstrInfo.h; sourceTree = ""; }; + DE66F0CF08ABEE6100323D32 /* X86InstrInfo.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = X86InstrInfo.td; sourceTree = ""; }; + DE66F0D008ABEE6100323D32 /* X86IntelAsmPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = X86IntelAsmPrinter.cpp; sourceTree = ""; }; + DE66F0D108ABEE6100323D32 /* X86IntelAsmPrinter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = X86IntelAsmPrinter.h; sourceTree = ""; }; + DE66F0D208ABEE6100323D32 /* X86ISelPattern.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = X86ISelPattern.cpp; sourceTree = ""; }; + DE66F0D308ABEE6100323D32 /* X86ISelPattern.cpp.orig */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = X86ISelPattern.cpp.orig; sourceTree = ""; }; + DE66F0D408ABEE6100323D32 /* X86ISelSimple.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = X86ISelSimple.cpp; sourceTree = ""; }; + DE66F0D508ABEE6100323D32 /* X86JITInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = X86JITInfo.cpp; sourceTree = ""; }; + DE66F0D608ABEE6100323D32 /* X86JITInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = X86JITInfo.h; sourceTree = ""; }; + DE66F0D708ABEE6100323D32 /* X86PeepholeOpt.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = X86PeepholeOpt.cpp; sourceTree = ""; }; + DE66F0D808ABEE6100323D32 /* X86RegisterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = X86RegisterInfo.cpp; sourceTree = ""; }; + DE66F0D908ABEE6100323D32 /* X86RegisterInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = X86RegisterInfo.h; sourceTree = ""; }; + DE66F0DA08ABEE6100323D32 /* X86RegisterInfo.td */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = X86RegisterInfo.td; sourceTree = ""; }; + DE66F0DB08ABEE6100323D32 /* X86Relocations.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = X86Relocations.h; sourceTree = ""; }; + DE66F0DC08ABEE6100323D32 /* X86Subtarget.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = X86Subtarget.cpp; sourceTree = ""; }; + DE66F0DD08ABEE6100323D32 /* X86Subtarget.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = X86Subtarget.h; sourceTree = ""; }; + DE66F0DE08ABEE6100323D32 /* X86TargetMachine.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = X86TargetMachine.cpp; sourceTree = ""; }; + DE66F0DF08ABEE6100323D32 /* X86TargetMachine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = X86TargetMachine.h; sourceTree = ""; }; + DE66F0EA08ABEFB300323D32 /* ExprTypeConvert.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ExprTypeConvert.cpp; sourceTree = ""; }; + DE66F0EF08ABEFB300323D32 /* BlockProfiling.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BlockProfiling.cpp; sourceTree = ""; }; + DE66F0FE08ABEFB300323D32 /* EdgeProfiling.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = EdgeProfiling.cpp; sourceTree = ""; }; + DE66F0FF08ABEFB300323D32 /* EmitFunctions.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = EmitFunctions.cpp; sourceTree = ""; }; + DE66F10208ABEFB300323D32 /* CombineBranch.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CombineBranch.cpp; sourceTree = ""; }; + DE66F11308ABEFB300323D32 /* EdgeCode.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = EdgeCode.cpp; sourceTree = ""; }; + DE66F11408ABEFB300323D32 /* Graph.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Graph.cpp; sourceTree = ""; }; + DE66F11508ABEFB300323D32 /* Graph.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Graph.h; sourceTree = ""; }; + DE66F11608ABEFB300323D32 /* GraphAuxiliary.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = GraphAuxiliary.cpp; sourceTree = ""; }; + DE66F11708ABEFB300323D32 /* InstLoops.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = InstLoops.cpp; sourceTree = ""; }; + DE66F11908ABEFB300323D32 /* ProfilePaths.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ProfilePaths.cpp; sourceTree = ""; }; + DE66F11A08ABEFB300323D32 /* RetracePath.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RetracePath.cpp; sourceTree = ""; }; + DE66F11B08ABEFB300323D32 /* ProfilingUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ProfilingUtils.cpp; sourceTree = ""; }; + DE66F11C08ABEFB300323D32 /* ProfilingUtils.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ProfilingUtils.h; sourceTree = ""; }; + DE66F11D08ABEFB300323D32 /* TraceBasicBlocks.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TraceBasicBlocks.cpp; sourceTree = ""; }; + DE66F11E08ABEFB300323D32 /* TraceValues.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TraceValues.cpp; sourceTree = ""; }; + DE66F12008ABEFB300323D32 /* ArgumentPromotion.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ArgumentPromotion.cpp; sourceTree = ""; }; + DE66F12108ABEFB300323D32 /* ConstantMerge.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ConstantMerge.cpp; sourceTree = ""; }; + DE66F12208ABEFB300323D32 /* DeadArgumentElimination.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DeadArgumentElimination.cpp; sourceTree = ""; }; + DE66F12308ABEFB300323D32 /* DeadTypeElimination.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DeadTypeElimination.cpp; sourceTree = ""; }; + DE66F14A08ABEFB400323D32 /* ExtractFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ExtractFunction.cpp; sourceTree = ""; }; + DE66F14B08ABEFB400323D32 /* FunctionResolution.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FunctionResolution.cpp; sourceTree = ""; }; + DE66F14C08ABEFB400323D32 /* GlobalDCE.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = GlobalDCE.cpp; sourceTree = ""; }; + DE66F14D08ABEFB400323D32 /* GlobalOpt.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = GlobalOpt.cpp; sourceTree = ""; }; + DE66F14E08ABEFB400323D32 /* Inliner.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Inliner.cpp; sourceTree = ""; }; + DE66F14F08ABEFB400323D32 /* Inliner.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Inliner.h; sourceTree = ""; }; + DE66F15008ABEFB400323D32 /* InlineSimple.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = InlineSimple.cpp; sourceTree = ""; }; + DE66F15108ABEFB400323D32 /* Internalize.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Internalize.cpp; sourceTree = ""; }; + DE66F15208ABEFB400323D32 /* IPConstantPropagation.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = IPConstantPropagation.cpp; sourceTree = ""; }; + DE66F15308ABEFB400323D32 /* LoopExtractor.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LoopExtractor.cpp; sourceTree = ""; }; + DE66F15408ABEFB400323D32 /* LowerSetJmp.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LowerSetJmp.cpp; sourceTree = ""; }; + DE66F15608ABEFB400323D32 /* PruneEH.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PruneEH.cpp; sourceTree = ""; }; + DE66F15708ABEFB400323D32 /* RaiseAllocations.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RaiseAllocations.cpp; sourceTree = ""; }; + DE66F15808ABEFB400323D32 /* SimplifyLibCalls.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SimplifyLibCalls.cpp; sourceTree = ""; }; + DE66F15908ABEFB400323D32 /* StripSymbols.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = StripSymbols.cpp; sourceTree = ""; }; + DE66F15A08ABEFB400323D32 /* LevelRaise.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LevelRaise.cpp; sourceTree = ""; }; + DE66F15E08ABEFB400323D32 /* ADCE.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ADCE.cpp; sourceTree = ""; }; + DE66F15F08ABEFB400323D32 /* BasicBlockPlacement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BasicBlockPlacement.cpp; sourceTree = ""; }; + DE66F16008ABEFB400323D32 /* CondPropagate.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CondPropagate.cpp; sourceTree = ""; }; + DE66F16108ABEFB400323D32 /* ConstantProp.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ConstantProp.cpp; sourceTree = ""; }; + DE66F16208ABEFB400323D32 /* CorrelatedExprs.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CorrelatedExprs.cpp; sourceTree = ""; }; + DE66F16308ABEFB400323D32 /* DCE.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DCE.cpp; sourceTree = ""; }; + DE66F16408ABEFB400323D32 /* DeadStoreElimination.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DeadStoreElimination.cpp; sourceTree = ""; }; + DE66F1A308ABEFB400323D32 /* GCSE.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = GCSE.cpp; sourceTree = ""; }; + DE66F1A408ABEFB400323D32 /* IndVarSimplify.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = IndVarSimplify.cpp; sourceTree = ""; }; + DE66F1A508ABEFB400323D32 /* InstructionCombining.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = InstructionCombining.cpp; sourceTree = ""; }; + DE66F1A608ABEFB400323D32 /* LICM.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LICM.cpp; sourceTree = ""; }; + DE66F1A708ABEFB400323D32 /* LoopSimplify.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LoopSimplify.cpp; sourceTree = ""; }; + DE66F1A808ABEFB400323D32 /* LoopStrengthReduce.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LoopStrengthReduce.cpp; sourceTree = ""; }; + DE66F1A908ABEFB400323D32 /* LoopUnroll.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LoopUnroll.cpp; sourceTree = ""; }; + DE66F1AA08ABEFB400323D32 /* LoopUnswitch.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LoopUnswitch.cpp; sourceTree = ""; }; + DE66F1AB08ABEFB400323D32 /* LowerAllocations.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LowerAllocations.cpp; sourceTree = ""; }; + DE66F1AC08ABEFB400323D32 /* LowerConstantExprs.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LowerConstantExprs.cpp; sourceTree = ""; }; + DE66F1AD08ABEFB400323D32 /* LowerGC.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LowerGC.cpp; sourceTree = ""; }; + DE66F1AE08ABEFB400323D32 /* LowerInvoke.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LowerInvoke.cpp; sourceTree = ""; }; + DE66F1AF08ABEFB400323D32 /* LowerPacked.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LowerPacked.cpp; sourceTree = ""; }; + DE66F1B008ABEFB400323D32 /* LowerSelect.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LowerSelect.cpp; sourceTree = ""; }; + DE66F1B108ABEFB400323D32 /* LowerSwitch.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LowerSwitch.cpp; sourceTree = ""; }; + DE66F1B308ABEFB400323D32 /* Mem2Reg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Mem2Reg.cpp; sourceTree = ""; }; + DE66F1B408ABEFB400323D32 /* PRE.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PRE.cpp; sourceTree = ""; }; + DE66F1B508ABEFB400323D32 /* Reassociate.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Reassociate.cpp; sourceTree = ""; }; + DE66F1B608ABEFB400323D32 /* ScalarReplAggregates.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ScalarReplAggregates.cpp; sourceTree = ""; }; + DE66F1B708ABEFB400323D32 /* SCCP.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SCCP.cpp; sourceTree = ""; }; + DE66F1B808ABEFB400323D32 /* SimplifyCFG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SimplifyCFG.cpp; sourceTree = ""; }; + DE66F1B908ABEFB400323D32 /* TailDuplication.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TailDuplication.cpp; sourceTree = ""; }; + DE66F1BA08ABEFB400323D32 /* TailRecursionElimination.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TailRecursionElimination.cpp; sourceTree = ""; }; + DE66F1BB08ABEFB400323D32 /* TransformInternals.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TransformInternals.cpp; sourceTree = ""; }; + DE66F1BC08ABEFB400323D32 /* TransformInternals.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TransformInternals.h; sourceTree = ""; }; + DE66F1BE08ABEFB400323D32 /* BasicBlockUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BasicBlockUtils.cpp; sourceTree = ""; }; + DE66F1BF08ABEFB400323D32 /* BreakCriticalEdges.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BreakCriticalEdges.cpp; sourceTree = ""; }; + DE66F1C008ABEFB400323D32 /* CloneFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CloneFunction.cpp; sourceTree = ""; }; + DE66F1C108ABEFB400323D32 /* CloneModule.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CloneModule.cpp; sourceTree = ""; }; + DE66F1C208ABEFB400323D32 /* CloneTrace.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CloneTrace.cpp; sourceTree = ""; }; + DE66F1C308ABEFB400323D32 /* CodeExtractor.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CodeExtractor.cpp; sourceTree = ""; }; + DE66F1E008ABEFB400323D32 /* DemoteRegToStack.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DemoteRegToStack.cpp; sourceTree = ""; }; + DE66F1E108ABEFB400323D32 /* InlineFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = InlineFunction.cpp; sourceTree = ""; }; + DE66F1E208ABEFB400323D32 /* Local.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Local.cpp; sourceTree = ""; }; + DE66F1E408ABEFB400323D32 /* PromoteMemoryToRegister.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PromoteMemoryToRegister.cpp; sourceTree = ""; }; + DE66F1E508ABEFB400323D32 /* SimplifyCFG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SimplifyCFG.cpp; sourceTree = ""; }; + DE66F1E608ABEFB400323D32 /* UnifyFunctionExitNodes.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = UnifyFunctionExitNodes.cpp; sourceTree = ""; }; + DE66F1E708ABEFB400323D32 /* ValueMapper.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ValueMapper.cpp; sourceTree = ""; }; + DE66F1E808ABEFB400323D32 /* ValueMapper.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ValueMapper.h; sourceTree = ""; }; + DE66F1EA08ABF03100323D32 /* AbstractTypeUser.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AbstractTypeUser.h; sourceTree = ""; }; + DE66F1EC08ABF03100323D32 /* .cvsignore */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = .cvsignore; sourceTree = ""; }; + DE66F1ED08ABF03100323D32 /* BitSetVector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = BitSetVector.h; sourceTree = ""; }; + DE66F1EE08ABF03100323D32 /* DenseMap.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DenseMap.h; sourceTree = ""; }; + DE66F1EF08ABF03100323D32 /* DepthFirstIterator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DepthFirstIterator.h; sourceTree = ""; }; + DE66F1F008ABF03100323D32 /* EquivalenceClasses.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = EquivalenceClasses.h; sourceTree = ""; }; + DE66F1F108ABF03100323D32 /* GraphTraits.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = GraphTraits.h; sourceTree = ""; }; + DE66F1F208ABF03100323D32 /* hash_map */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = hash_map; sourceTree = ""; }; + DE66F1F308ABF03100323D32 /* hash_map.in */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = hash_map.in; sourceTree = ""; }; + DE66F1F408ABF03100323D32 /* hash_set */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = hash_set; sourceTree = ""; }; + DE66F1F508ABF03100323D32 /* hash_set.in */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = hash_set.in; sourceTree = ""; }; + DE66F1F608ABF03100323D32 /* HashExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HashExtras.h; sourceTree = ""; }; + DE66F1F708ABF03100323D32 /* ilist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = ilist; sourceTree = ""; }; + DE66F1F808ABF03100323D32 /* iterator */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = iterator; sourceTree = ""; }; + DE66F1F908ABF03100323D32 /* iterator.in */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = iterator.in; sourceTree = ""; }; + DE66F1FA08ABF03100323D32 /* PostOrderIterator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PostOrderIterator.h; sourceTree = ""; }; + DE66F1FB08ABF03100323D32 /* SCCIterator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SCCIterator.h; sourceTree = ""; }; + DE66F1FC08ABF03100323D32 /* SetOperations.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SetOperations.h; sourceTree = ""; }; + DE66F1FD08ABF03100323D32 /* SetVector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SetVector.h; sourceTree = ""; }; + DE66F1FE08ABF03100323D32 /* Statistic.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Statistic.h; sourceTree = ""; }; + DE66F1FF08ABF03100323D32 /* STLExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = STLExtras.h; sourceTree = ""; }; + DE66F20008ABF03100323D32 /* StringExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = StringExtras.h; sourceTree = ""; }; + DE66F20108ABF03100323D32 /* Tree.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Tree.h; sourceTree = ""; }; + DE66F20208ABF03100323D32 /* VectorExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = VectorExtras.h; sourceTree = ""; }; + DE66F20408ABF03100323D32 /* AliasAnalysis.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AliasAnalysis.h; sourceTree = ""; }; + DE66F20508ABF03100323D32 /* AliasSetTracker.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AliasSetTracker.h; sourceTree = ""; }; + DE66F20608ABF03100323D32 /* CallGraph.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CallGraph.h; sourceTree = ""; }; + DE66F20708ABF03100323D32 /* CFGPrinter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CFGPrinter.h; sourceTree = ""; }; + DE66F20808ABF03100323D32 /* ConstantsScanner.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ConstantsScanner.h; sourceTree = ""; }; + DE66F20A08ABF03100323D32 /* DataStructure.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DataStructure.h; sourceTree = ""; }; + DE66F20B08ABF03100323D32 /* DSGraph.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DSGraph.h; sourceTree = ""; }; + DE66F20C08ABF03100323D32 /* DSGraphTraits.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DSGraphTraits.h; sourceTree = ""; }; + DE66F20D08ABF03100323D32 /* DSNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DSNode.h; sourceTree = ""; }; + DE66F20E08ABF03100323D32 /* DSSupport.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DSSupport.h; sourceTree = ""; }; + DE66F20F08ABF03100323D32 /* Dominators.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Dominators.h; sourceTree = ""; }; + DE66F21008ABF03100323D32 /* Expressions.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Expressions.h; sourceTree = ""; }; + DE66F21108ABF03100323D32 /* FindUnsafePointerTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FindUnsafePointerTypes.h; sourceTree = ""; }; + DE66F21208ABF03100323D32 /* FindUsedTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FindUsedTypes.h; sourceTree = ""; }; + DE66F21308ABF03100323D32 /* Interval.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Interval.h; sourceTree = ""; }; + DE66F21408ABF03100323D32 /* IntervalIterator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IntervalIterator.h; sourceTree = ""; }; + DE66F21508ABF03100323D32 /* IntervalPartition.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IntervalPartition.h; sourceTree = ""; }; + DE66F21608ABF03100323D32 /* LoadValueNumbering.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = LoadValueNumbering.h; sourceTree = ""; }; + DE66F21708ABF03100323D32 /* LoopInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = LoopInfo.h; sourceTree = ""; }; + DE66F21808ABF03100323D32 /* Passes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Passes.h; sourceTree = ""; }; + DE66F21908ABF03100323D32 /* PostDominators.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PostDominators.h; sourceTree = ""; }; + DE66F21A08ABF03100323D32 /* ProfileInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ProfileInfo.h; sourceTree = ""; }; + DE66F21B08ABF03100323D32 /* ProfileInfoLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ProfileInfoLoader.h; sourceTree = ""; }; + DE66F21C08ABF03100323D32 /* ProfileInfoTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ProfileInfoTypes.h; sourceTree = ""; }; + DE66F21D08ABF03100323D32 /* ScalarEvolution.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ScalarEvolution.h; sourceTree = ""; }; + DE66F21E08ABF03100323D32 /* ScalarEvolutionExpander.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ScalarEvolutionExpander.h; sourceTree = ""; }; + DE66F21F08ABF03100323D32 /* ScalarEvolutionExpressions.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ScalarEvolutionExpressions.h; sourceTree = ""; }; + DE66F22008ABF03100323D32 /* Trace.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Trace.h; sourceTree = ""; }; + DE66F22108ABF03100323D32 /* ValueNumbering.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ValueNumbering.h; sourceTree = ""; }; + DE66F22208ABF03100323D32 /* Verifier.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Verifier.h; sourceTree = ""; }; + DE66F22308ABF03100323D32 /* Argument.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Argument.h; sourceTree = ""; }; + DE66F22508ABF03100323D32 /* AsmAnnotationWriter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AsmAnnotationWriter.h; sourceTree = ""; }; + DE66F22608ABF03100323D32 /* CachedWriter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CachedWriter.h; sourceTree = ""; }; + DE66F22708ABF03100323D32 /* Parser.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Parser.h; sourceTree = ""; }; + DE66F22808ABF03100323D32 /* PrintModulePass.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PrintModulePass.h; sourceTree = ""; }; + DE66F22908ABF03100323D32 /* Writer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Writer.h; sourceTree = ""; }; + DE66F22A08ABF03100323D32 /* BasicBlock.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = BasicBlock.h; sourceTree = ""; }; + DE66F22C08ABF03100323D32 /* Analyzer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Analyzer.h; sourceTree = ""; }; + DE66F22D08ABF03100323D32 /* Archive.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Archive.h; sourceTree = ""; }; + DE66F22E08ABF03100323D32 /* BytecodeHandler.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = BytecodeHandler.h; sourceTree = ""; }; + DE66F22F08ABF03100323D32 /* Format.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Format.h; sourceTree = ""; }; + DE66F23008ABF03100323D32 /* Reader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Reader.h; sourceTree = ""; }; + DE66F23108ABF03100323D32 /* WriteBytecodePass.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WriteBytecodePass.h; sourceTree = ""; }; + DE66F23208ABF03100323D32 /* Writer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Writer.h; sourceTree = ""; }; + DE66F23308ABF03100323D32 /* CallGraphSCCPass.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CallGraphSCCPass.h; sourceTree = ""; }; + DE66F23408ABF03100323D32 /* CallingConv.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CallingConv.h; sourceTree = ""; }; + DE66F23608ABF03100323D32 /* AsmPrinter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AsmPrinter.h; sourceTree = ""; }; + DE66F23708ABF03100323D32 /* ELFWriter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ELFWriter.h; sourceTree = ""; }; + DE66F23808ABF03100323D32 /* InstrScheduling.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = InstrScheduling.h; sourceTree = ""; }; + DE66F23908ABF03100323D32 /* IntrinsicLowering.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IntrinsicLowering.h; sourceTree = ""; }; + DE66F23A08ABF03100323D32 /* LiveVariables.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = LiveVariables.h; sourceTree = ""; }; + DE66F23B08ABF03100323D32 /* MachineBasicBlock.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MachineBasicBlock.h; sourceTree = ""; }; + DE66F23C08ABF03100323D32 /* MachineCodeEmitter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MachineCodeEmitter.h; sourceTree = ""; }; + DE66F23D08ABF03100323D32 /* MachineConstantPool.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MachineConstantPool.h; sourceTree = ""; }; + DE66F23E08ABF03100323D32 /* MachineFrameInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MachineFrameInfo.h; sourceTree = ""; }; + DE66F23F08ABF03100323D32 /* MachineFunction.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MachineFunction.h; sourceTree = ""; }; + DE66F24008ABF03100323D32 /* MachineFunctionPass.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MachineFunctionPass.h; sourceTree = ""; }; + DE66F24108ABF03100323D32 /* MachineInstr.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MachineInstr.h; sourceTree = ""; }; + DE66F24208ABF03100323D32 /* MachineInstrBuilder.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MachineInstrBuilder.h; sourceTree = ""; }; + DE66F24308ABF03100323D32 /* MachineRelocation.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MachineRelocation.h; sourceTree = ""; }; + DE66F24408ABF03100323D32 /* Passes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Passes.h; sourceTree = ""; }; + DE66F24508ABF03100323D32 /* SchedGraphCommon.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SchedGraphCommon.h; sourceTree = ""; }; + DE66F24608ABF03100323D32 /* SelectionDAG.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SelectionDAG.h; sourceTree = ""; }; + DE66F24708ABF03100323D32 /* SelectionDAGISel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SelectionDAGISel.h; sourceTree = ""; }; + DE66F24808ABF03100323D32 /* SelectionDAGNodes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SelectionDAGNodes.h; sourceTree = ""; }; + DE66F24908ABF03100323D32 /* SSARegMap.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SSARegMap.h; sourceTree = ""; }; + DE66F24A08ABF03100323D32 /* ValueSet.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ValueSet.h; sourceTree = ""; }; + DE66F24B08ABF03100323D32 /* ValueTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ValueTypes.h; sourceTree = ""; }; + DE66F24D08ABF03100323D32 /* .cvsignore */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = .cvsignore; sourceTree = ""; }; + DE66F24E08ABF03100323D32 /* alloca.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = alloca.h; sourceTree = ""; }; + DE66F24F08ABF03100323D32 /* config.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = ""; }; + DE66F25008ABF03100323D32 /* config.h.in */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = config.h.in; sourceTree = ""; }; + DE66F25108ABF03100323D32 /* Constant.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Constant.h; sourceTree = ""; }; + DE66F25208ABF03100323D32 /* Constants.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Constants.h; sourceTree = ""; }; + DE66F25408ABF03100323D32 /* Debugger.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Debugger.h; sourceTree = ""; }; + DE66F25508ABF03100323D32 /* InferiorProcess.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = InferiorProcess.h; sourceTree = ""; }; + DE66F25608ABF03100323D32 /* ProgramInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ProgramInfo.h; sourceTree = ""; }; + DE66F25708ABF03100323D32 /* RuntimeInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RuntimeInfo.h; sourceTree = ""; }; + DE66F25808ABF03100323D32 /* SourceFile.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SourceFile.h; sourceTree = ""; }; + DE66F25908ABF03100323D32 /* SourceLanguage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SourceLanguage.h; sourceTree = ""; }; + DE66F25A08ABF03100323D32 /* DerivedTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DerivedTypes.h; sourceTree = ""; }; + DE66F25C08ABF03100323D32 /* ExecutionEngine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ExecutionEngine.h; sourceTree = ""; }; + DE66F25D08ABF03100323D32 /* GenericValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = GenericValue.h; sourceTree = ""; }; + DE66F25E08ABF03100323D32 /* Function.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Function.h; sourceTree = ""; }; + DE66F25F08ABF03100323D32 /* GlobalValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = GlobalValue.h; sourceTree = ""; }; + DE66F26008ABF03100323D32 /* GlobalVariable.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = GlobalVariable.h; sourceTree = ""; }; + DE66F26108ABF03100323D32 /* InstrTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = InstrTypes.h; sourceTree = ""; }; + DE66F26208ABF03100323D32 /* Instruction.def */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Instruction.def; sourceTree = ""; }; + DE66F26308ABF03100323D32 /* Instruction.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Instruction.h; sourceTree = ""; }; + DE66F26408ABF03100323D32 /* Instructions.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Instructions.h; sourceTree = ""; }; + DE66F26508ABF03100323D32 /* IntrinsicInst.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IntrinsicInst.h; sourceTree = ""; }; + DE66F26608ABF03100323D32 /* Intrinsics.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Intrinsics.h; sourceTree = ""; }; + DE66F26708ABF03100323D32 /* Linker.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Linker.h; sourceTree = ""; }; + DE66F26808ABF03100323D32 /* Module.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Module.h; sourceTree = ""; }; + DE66F26908ABF03200323D32 /* ModuleProvider.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ModuleProvider.h; sourceTree = ""; }; + DE66F26A08ABF03200323D32 /* Pass.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Pass.h; sourceTree = ""; }; + DE66F26B08ABF03200323D32 /* PassAnalysisSupport.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PassAnalysisSupport.h; sourceTree = ""; }; + DE66F26C08ABF03200323D32 /* PassManager.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PassManager.h; sourceTree = ""; }; + DE66F26D08ABF03200323D32 /* PassSupport.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PassSupport.h; sourceTree = ""; }; + DE66F26F08ABF03200323D32 /* .cvsignore */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = .cvsignore; sourceTree = ""; }; + DE66F27008ABF03200323D32 /* AIXDataTypesFix.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AIXDataTypesFix.h; sourceTree = ""; }; + DE66F27108ABF03200323D32 /* Annotation.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Annotation.h; sourceTree = ""; }; + DE66F27208ABF03200323D32 /* CallSite.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CallSite.h; sourceTree = ""; }; + DE66F27308ABF03200323D32 /* Casting.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Casting.h; sourceTree = ""; }; + DE66F27408ABF03200323D32 /* CFG.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CFG.h; sourceTree = ""; }; + DE66F27508ABF03200323D32 /* CommandLine.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CommandLine.h; sourceTree = ""; }; + DE66F27608ABF03200323D32 /* Compressor.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Compressor.h; sourceTree = ""; }; + DE66F27708ABF03200323D32 /* ConstantRange.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ConstantRange.h; sourceTree = ""; }; + DE66F27808ABF03200323D32 /* DataTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DataTypes.h; sourceTree = ""; }; + DE66F27908ABF03200323D32 /* DataTypes.h.in */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = DataTypes.h.in; sourceTree = ""; }; + DE66F27A08ABF03200323D32 /* Debug.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Debug.h; sourceTree = ""; }; + DE66F27B08ABF03200323D32 /* DOTGraphTraits.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOTGraphTraits.h; sourceTree = ""; }; + DE66F27C08ABF03200323D32 /* DynamicLinker.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DynamicLinker.h; sourceTree = ""; }; + DE66F27D08ABF03200323D32 /* ELF.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ELF.h; sourceTree = ""; }; + DE66F27E08ABF03200323D32 /* FileUtilities.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FileUtilities.h; sourceTree = ""; }; + DE66F27F08ABF03200323D32 /* GetElementPtrTypeIterator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = GetElementPtrTypeIterator.h; sourceTree = ""; }; + DE66F28008ABF03200323D32 /* GraphWriter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = GraphWriter.h; sourceTree = ""; }; + DE66F28108ABF03200323D32 /* InstIterator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = InstIterator.h; sourceTree = ""; }; + DE66F28208ABF03200323D32 /* InstVisitor.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = InstVisitor.h; sourceTree = ""; }; + DE66F28308ABF03200323D32 /* LeakDetector.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = LeakDetector.h; sourceTree = ""; }; + DE66F28408ABF03200323D32 /* Mangler.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Mangler.h; sourceTree = ""; }; + DE66F28508ABF03200323D32 /* MathExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MathExtras.h; sourceTree = ""; }; + DE66F28608ABF03200323D32 /* MutexGuard.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MutexGuard.h; sourceTree = ""; }; + DE66F28708ABF03200323D32 /* PassNameParser.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PassNameParser.h; sourceTree = ""; }; + DE66F28808ABF03200323D32 /* PatternMatch.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PatternMatch.h; sourceTree = ""; }; + DE66F28908ABF03200323D32 /* PluginLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PluginLoader.h; sourceTree = ""; }; + DE66F28A08ABF03200323D32 /* SlowOperationInformer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SlowOperationInformer.h; sourceTree = ""; }; + 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 = ""; }; + DE66F28D08ABF03200323D32 /* ThreadSupport.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ThreadSupport.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 = ""; }; + DE66F29308ABF03200323D32 /* SymbolTableListTraits.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SymbolTableListTraits.h; sourceTree = ""; }; + DE66F29508ABF03200323D32 /* DynamicLibrary.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DynamicLibrary.h; sourceTree = ""; }; + DE66F29608ABF03200323D32 /* LICENSE.TXT */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = LICENSE.TXT; sourceTree = ""; }; + DE66F29708ABF03200323D32 /* MappedFile.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MappedFile.h; sourceTree = ""; }; + DE66F29808ABF03200323D32 /* Memory.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Memory.h; sourceTree = ""; }; + DE66F29908ABF03200323D32 /* Mutex.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Mutex.h; sourceTree = ""; }; + DE66F29A08ABF03200323D32 /* Path.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Path.h; sourceTree = ""; }; + DE66F29B08ABF03200323D32 /* Process.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Process.h; sourceTree = ""; }; + DE66F29C08ABF03200323D32 /* Program.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Program.h; sourceTree = ""; }; + DE66F29D08ABF03200323D32 /* Signals.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Signals.h; sourceTree = ""; }; + DE66F29E08ABF03200323D32 /* TimeValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TimeValue.h; sourceTree = ""; }; + DE66F2A008ABF03200323D32 /* MRegisterInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MRegisterInfo.h; sourceTree = ""; }; + DE66F2A108ABF03200323D32 /* TargetData.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetData.h; sourceTree = ""; }; + DE66F2A208ABF03200323D32 /* TargetFrameInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetFrameInfo.h; sourceTree = ""; }; + DE66F2A308ABF03200323D32 /* TargetInstrInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetInstrInfo.h; sourceTree = ""; }; + DE66F2A408ABF03200323D32 /* TargetJITInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetJITInfo.h; sourceTree = ""; }; + DE66F2A508ABF03200323D32 /* TargetLowering.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetLowering.h; sourceTree = ""; }; + 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 = ""; }; + DE66F2AE08ABF03200323D32 /* LinkAllPasses.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = LinkAllPasses.h; sourceTree = ""; }; + DE66F2AF08ABF03200323D32 /* Scalar.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Scalar.h; sourceTree = ""; }; + DE66F2B108ABF03200323D32 /* BasicBlockUtils.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = BasicBlockUtils.h; sourceTree = ""; }; + DE66F2B208ABF03200323D32 /* Cloning.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Cloning.h; sourceTree = ""; }; + DE66F2B308ABF03200323D32 /* FunctionUtils.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FunctionUtils.h; sourceTree = ""; }; + DE66F2B408ABF03200323D32 /* Local.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Local.h; sourceTree = ""; }; + DE66F2B508ABF03200323D32 /* PromoteMemToReg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PromoteMemToReg.h; sourceTree = ""; }; + DE66F2B608ABF03200323D32 /* UnifyFunctionExitNodes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = UnifyFunctionExitNodes.h; sourceTree = ""; }; + DE66F2B708ABF03200323D32 /* Type.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Type.h; sourceTree = ""; }; + DE66F2B808ABF03200323D32 /* Use.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Use.h; sourceTree = ""; }; + DE66F2B908ABF03200323D32 /* User.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = User.h; sourceTree = ""; }; + DE66F2BA08ABF03200323D32 /* Value.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Value.h; sourceTree = ""; }; + DE66F2BF08ABF14400323D32 /* AnalysisWrappers.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AnalysisWrappers.cpp; sourceTree = ""; }; + DE66F2C008ABF14400323D32 /* analyze.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = analyze.cpp; sourceTree = ""; }; + DE66F2C908ABF14400323D32 /* GraphPrinters.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = GraphPrinters.cpp; sourceTree = ""; }; + DE66F2CC08ABF14400323D32 /* BugDriver.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BugDriver.cpp; sourceTree = ""; }; + DE66F2CD08ABF14400323D32 /* BugDriver.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = BugDriver.h; sourceTree = ""; }; + DE66F2CE08ABF14400323D32 /* bugpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = bugpoint.cpp; sourceTree = ""; }; + DE66F2CF08ABF14400323D32 /* CrashDebugger.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CrashDebugger.cpp; sourceTree = ""; }; + DE66F2E208ABF14400323D32 /* ExecutionDriver.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ExecutionDriver.cpp; sourceTree = ""; }; + DE66F2E308ABF14400323D32 /* ExtractFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ExtractFunction.cpp; sourceTree = ""; }; + DE66F2E408ABF14400323D32 /* ListReducer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ListReducer.h; sourceTree = ""; }; + DE66F2E608ABF14400323D32 /* Miscompilation.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Miscompilation.cpp; sourceTree = ""; }; + DE66F2E708ABF14400323D32 /* OptimizerDriver.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = OptimizerDriver.cpp; sourceTree = ""; }; + DE66F2E808ABF14400323D32 /* TestPasses.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TestPasses.cpp; sourceTree = ""; }; + DE66F2EE08ABF14400323D32 /* gccas.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = gccas.cpp; path = gccas/gccas.cpp; sourceTree = ""; }; + DE66F2F708ABF14400323D32 /* gccld.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = gccld.cpp; sourceTree = ""; }; + DE66F2F808ABF14400323D32 /* gccld.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = gccld.h; sourceTree = ""; }; + DE66F2F908ABF14400323D32 /* GenerateCode.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = GenerateCode.cpp; sourceTree = ""; }; + DE66F30008ABF14400323D32 /* llc.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = llc.cpp; path = llc/llc.cpp; sourceTree = ""; }; + DE66F30708ABF14400323D32 /* lli.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = lli.cpp; path = lli/lli.cpp; sourceTree = ""; }; + DE66F30E08ABF14400323D32 /* llvm-ar.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = "llvm-ar.cpp"; path = "llvm-ar/llvm-ar.cpp"; sourceTree = ""; }; + DE66F31508ABF14400323D32 /* llvm-as.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = "llvm-as.cpp"; path = "llvm-as/llvm-as.cpp"; sourceTree = ""; }; + DE66F31C08ABF14400323D32 /* llvm-bcanalyzer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = "llvm-bcanalyzer.cpp"; path = "llvm-bcanalyzer/llvm-bcanalyzer.cpp"; sourceTree = ""; }; + DE66F31F08ABF14400323D32 /* CLICommand.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CLICommand.h; sourceTree = ""; }; + DE66F32008ABF14400323D32 /* CLIDebugger.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CLIDebugger.cpp; sourceTree = ""; }; + DE66F32108ABF14400323D32 /* CLIDebugger.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CLIDebugger.h; sourceTree = ""; }; + DE66F32208ABF14400323D32 /* Commands.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Commands.cpp; sourceTree = ""; }; + DE66F32B08ABF14400323D32 /* llvm-db.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = "llvm-db.cpp"; sourceTree = ""; }; + DE66F33208ABF14400323D32 /* llvm-dis.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = "llvm-dis.cpp"; path = "llvm-dis/llvm-dis.cpp"; sourceTree = ""; }; + DE66F33908ABF14400323D32 /* llvm-extract.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = "llvm-extract.cpp"; path = "llvm-extract/llvm-extract.cpp"; sourceTree = ""; }; + DE66F34208ABF14400323D32 /* llvm-ld.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = "llvm-ld.cpp"; sourceTree = ""; }; + DE66F34408ABF14400323D32 /* Optimize.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Optimize.cpp; sourceTree = ""; }; + DE66F34A08ABF14400323D32 /* llvm-link.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = "llvm-link.cpp"; path = "llvm-link/llvm-link.cpp"; sourceTree = ""; }; + DE66F35108ABF14400323D32 /* llvm-nm.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = "llvm-nm.cpp"; path = "llvm-nm/llvm-nm.cpp"; sourceTree = ""; }; + DE66F35808ABF14500323D32 /* llvm-prof.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = "llvm-prof.cpp"; path = "llvm-prof/llvm-prof.cpp"; sourceTree = ""; }; + DE66F35F08ABF14500323D32 /* llvm-ranlib.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = "llvm-ranlib.cpp"; path = "llvm-ranlib/llvm-ranlib.cpp"; sourceTree = ""; }; + DE66F36908ABF14500323D32 /* c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = c; sourceTree = ""; }; + DE66F36A08ABF14500323D32 /* CompilerDriver.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CompilerDriver.cpp; sourceTree = ""; }; + DE66F36B08ABF14500323D32 /* CompilerDriver.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CompilerDriver.h; sourceTree = ""; }; + DE66F36C08ABF14500323D32 /* ConfigLexer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ConfigLexer.cpp; sourceTree = ""; }; + DE66F36D08ABF14500323D32 /* ConfigLexer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ConfigLexer.h; sourceTree = ""; }; + DE66F36E08ABF14500323D32 /* ConfigLexer.l */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.lex; path = ConfigLexer.l; sourceTree = ""; }; + DE66F36F08ABF14500323D32 /* Configuration.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Configuration.cpp; sourceTree = ""; }; + DE66F37008ABF14500323D32 /* Configuration.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Configuration.h; sourceTree = ""; }; + DE66F37108ABF14500323D32 /* cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = cpp; sourceTree = ""; }; + DE66F37D08ABF14500323D32 /* ll */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = ll; sourceTree = ""; }; + DE66F37E08ABF14500323D32 /* llvmc.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = llvmc.cpp; sourceTree = ""; }; + DE66F38708ABF14500323D32 /* opt.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = opt.cpp; path = opt/opt.cpp; sourceTree = ""; }; + DE66F38C08ABF35300323D32 /* CREDITS.TXT */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = CREDITS.TXT; path = ../CREDITS.TXT; sourceTree = SOURCE_ROOT; }; + DE66F38E08ABF35C00323D32 /* .cvsignore */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = .cvsignore; sourceTree = ""; }; + DE66F38F08ABF35C00323D32 /* AliasAnalysis.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = AliasAnalysis.html; sourceTree = ""; }; + DE66F39008ABF35C00323D32 /* Bugpoint.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = Bugpoint.html; sourceTree = ""; }; + DE66F39108ABF35C00323D32 /* BytecodeFormat.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = BytecodeFormat.html; sourceTree = ""; }; + DE66F39208ABF35C00323D32 /* CFEBuildInstrs.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = CFEBuildInstrs.html; sourceTree = ""; }; + DE66F39308ABF35C00323D32 /* CodeGenerator.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = CodeGenerator.html; sourceTree = ""; }; + DE66F39408ABF35C00323D32 /* CodingStandards.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = CodingStandards.html; sourceTree = ""; }; + DE66F39608ABF35C00323D32 /* .cvsignore */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = .cvsignore; sourceTree = ""; }; + DE66F39708ABF35C00323D32 /* analyze.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = analyze.pod; sourceTree = ""; }; + DE66F39808ABF35C00323D32 /* bugpoint.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = bugpoint.pod; sourceTree = ""; }; + DE66F39908ABF35C00323D32 /* gccas.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = gccas.pod; sourceTree = ""; }; + DE66F39A08ABF35C00323D32 /* gccld.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = gccld.pod; sourceTree = ""; }; + DE66F39E08ABF35C00323D32 /* index.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = index.html; sourceTree = ""; }; + DE66F39F08ABF35C00323D32 /* llc.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = llc.pod; sourceTree = ""; }; + DE66F3A008ABF35C00323D32 /* lli.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = lli.pod; sourceTree = ""; }; + DE66F3A108ABF35C00323D32 /* llvm-ar.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "llvm-ar.pod"; sourceTree = ""; }; + DE66F3A208ABF35C00323D32 /* llvm-as.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "llvm-as.pod"; sourceTree = ""; }; + DE66F3A308ABF35C00323D32 /* llvm-bcanalyzer.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "llvm-bcanalyzer.pod"; sourceTree = ""; }; + DE66F3A408ABF35C00323D32 /* llvm-db.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "llvm-db.pod"; sourceTree = ""; }; + DE66F3A508ABF35C00323D32 /* llvm-dis.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "llvm-dis.pod"; sourceTree = ""; }; + DE66F3A608ABF35C00323D32 /* llvm-extract.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "llvm-extract.pod"; sourceTree = ""; }; + DE66F3A708ABF35C00323D32 /* llvm-ld.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "llvm-ld.pod"; sourceTree = ""; }; + DE66F3A808ABF35C00323D32 /* llvm-link.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "llvm-link.pod"; sourceTree = ""; }; + DE66F3A908ABF35C00323D32 /* llvm-nm.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "llvm-nm.pod"; sourceTree = ""; }; + DE66F3AA08ABF35C00323D32 /* llvm-prof.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "llvm-prof.pod"; sourceTree = ""; }; + DE66F3AB08ABF35C00323D32 /* llvm-ranlib.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "llvm-ranlib.pod"; sourceTree = ""; }; + DE66F3AC08ABF35C00323D32 /* llvmc.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = llvmc.pod; sourceTree = ""; }; + DE66F3AD08ABF35C00323D32 /* llvmgcc.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = llvmgcc.pod; sourceTree = ""; }; + DE66F3AE08ABF35C00323D32 /* llvmgxx.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = llvmgxx.pod; sourceTree = ""; }; + DE66F3AF08ABF35C00323D32 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; + DE66F3B408ABF35D00323D32 /* manpage.css */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = manpage.css; sourceTree = ""; }; + DE66F3B508ABF35D00323D32 /* opt.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = opt.pod; sourceTree = ""; }; + DE66F3B808ABF35D00323D32 /* stkrc.pod */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = stkrc.pod; sourceTree = ""; }; + DE66F3B908ABF35D00323D32 /* CommandLine.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = CommandLine.html; sourceTree = ""; }; + DE66F3BA08ABF35D00323D32 /* CompilerDriver.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = CompilerDriver.html; sourceTree = ""; }; + DE66F3BB08ABF35D00323D32 /* CompilerWriterInfo.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = CompilerWriterInfo.html; sourceTree = ""; }; + DE66F3BC08ABF35D00323D32 /* doxygen.cfg */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = doxygen.cfg; sourceTree = ""; }; + DE66F3BD08ABF35D00323D32 /* doxygen.cfg.in */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = doxygen.cfg.in; sourceTree = ""; }; + DE66F3BE08ABF35D00323D32 /* doxygen.css */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = doxygen.css; sourceTree = ""; }; + DE66F3BF08ABF35D00323D32 /* doxygen.footer */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = doxygen.footer; sourceTree = ""; }; + DE66F3C008ABF35D00323D32 /* doxygen.header */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = doxygen.header; sourceTree = ""; }; + DE66F3C108ABF35D00323D32 /* doxygen.intro */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = doxygen.intro; sourceTree = ""; }; + DE66F3C208ABF35D00323D32 /* ExtendingLLVM.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = ExtendingLLVM.html; sourceTree = ""; }; + DE66F3C308ABF35D00323D32 /* FAQ.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = FAQ.html; sourceTree = ""; }; + DE66F3C408ABF35D00323D32 /* GarbageCollection.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = GarbageCollection.html; sourceTree = ""; }; + DE66F3C508ABF35D00323D32 /* GettingStarted.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = GettingStarted.html; sourceTree = ""; }; + DE66F3C608ABF35D00323D32 /* GettingStartedVS.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = GettingStartedVS.html; sourceTree = ""; }; + DE66F3E408ABF35D00323D32 /* HowToSubmitABug.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = HowToSubmitABug.html; sourceTree = ""; }; + DE66F3E608ABF35D00323D32 /* Debugging.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = Debugging.gif; sourceTree = ""; }; + DE66F3E708ABF35D00323D32 /* libdeps.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = libdeps.gif; sourceTree = ""; }; + DE66F3E808ABF35D00323D32 /* lines.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = lines.gif; sourceTree = ""; }; + DE66F3E908ABF35D00323D32 /* objdeps.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = objdeps.gif; sourceTree = ""; }; + DE66F3EA08ABF35D00323D32 /* venusflytrap.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = venusflytrap.jpg; sourceTree = ""; }; + DE66F3EB08ABF35D00323D32 /* index.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = index.html; sourceTree = ""; }; + DE66F3EC08ABF35D00323D32 /* LangRef.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = LangRef.html; sourceTree = ""; }; + DE66F3ED08ABF35D00323D32 /* Lexicon.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = Lexicon.html; sourceTree = ""; }; + DE66F3EE08ABF35D00323D32 /* llvm.css */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = llvm.css; sourceTree = ""; }; + DE66F3EF08ABF35D00323D32 /* LLVMVsTheWorld.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = LLVMVsTheWorld.html; sourceTree = ""; }; + DE66F3F108ABF35D00323D32 /* MakefileGuide.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = MakefileGuide.html; sourceTree = ""; }; + DE66F3F208ABF35D00323D32 /* ProgrammersManual.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = ProgrammersManual.html; sourceTree = ""; }; + DE66F3F308ABF35D00323D32 /* Projects.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = Projects.html; sourceTree = ""; }; + DE66F3F408ABF35D00323D32 /* ReleaseNotes.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = ReleaseNotes.html; sourceTree = ""; }; + DE66F3F508ABF35D00323D32 /* SourceLevelDebugging.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = SourceLevelDebugging.html; sourceTree = ""; }; + DE66F3F608ABF35D00323D32 /* Stacker.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = Stacker.html; sourceTree = ""; }; + DE66F3F708ABF35D00323D32 /* SystemLibrary.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = SystemLibrary.html; sourceTree = ""; }; + DE66F3F808ABF35D00323D32 /* TableGenFundamentals.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = TableGenFundamentals.html; sourceTree = ""; }; + DE66F3F908ABF35D00323D32 /* TestingGuide.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = TestingGuide.html; sourceTree = ""; }; + DE66F3FA08ABF35D00323D32 /* UsingLibraries.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = UsingLibraries.html; sourceTree = ""; }; + DE66F3FB08ABF35D00323D32 /* WritingAnLLVMBackend.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = WritingAnLLVMBackend.html; sourceTree = ""; }; + DE66F3FC08ABF35D00323D32 /* WritingAnLLVMPass.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = WritingAnLLVMPass.html; sourceTree = ""; }; + DE66F3FF08ABF37000323D32 /* BFtoLLVM.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = BFtoLLVM.cpp; path = BFtoLLVM/BFtoLLVM.cpp; sourceTree = ""; }; + DE66F40E08ABF37000323D32 /* fibonacci.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = fibonacci.cpp; path = Fibonacci/fibonacci.cpp; sourceTree = ""; }; + DE66F41508ABF37000323D32 /* HowToUseJIT.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = HowToUseJIT.cpp; path = HowToUseJIT/HowToUseJIT.cpp; sourceTree = ""; }; + DE66F41E08ABF37000323D32 /* ModuleMaker.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ModuleMaker.cpp; path = ModuleMaker/ModuleMaker.cpp; sourceTree = ""; }; + DE66F42608ABF37000323D32 /* ParallelJIT.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ParallelJIT.cpp; path = ParallelJIT/ParallelJIT.cpp; sourceTree = ""; }; + /* End PBXFileReference section */ + + /* Begin PBXGroup section */ + 08FB7794FE84155DC02AAC07 /* LLVM */ = { + isa = PBXGroup; + children = ( + DE66F1E908ABF03100323D32 /* include/llvm */, + DE66ECBD08ABEC0700323D32 /* lib/Analysis */, + DE66EC8808ABEAC900323D32 /* lib/AsmParser */, + DE66ECBC08ABEB8E00323D32 /* lib/Bytecode */, + DE66ED3E08ABEC2A00323D32 /* lib/CodeGen */, + DE66ED9A08ABEC7200323D32 /* lib/Debugger */, + DE66EDBF08ABEC8F00323D32 /* lib/ExecutionEngine */, + DE66EDEB08ABEDD300323D32 /* lib/Linker */, + DE66EDFB08ABEDE600323D32 /* lib/Support */, + DE66EE4908ABEE3400323D32 /* lib/System */, + DE66EE9608ABEE5D00323D32 /* lib/Target */, + DE66F0E108ABEFB300323D32 /* lib/Transforms */, + DE66EC7508ABE8EF00323D32 /* lib/VMCore */, + DE66F2BD08ABF14400323D32 /* tools */, + DE66F38D08ABF35C00323D32 /* docs */, + DE66F3FD08ABF37000323D32 /* examples */, + DE66F38C08ABF35300323D32 /* CREDITS.TXT */, + ); + name = LLVM; + sourceTree = ""; + }; + DE66EC7508ABE8EF00323D32 /* lib/VMCore */ = { + isa = PBXGroup; + children = ( + DE66EC5B08ABE86900323D32 /* AsmWriter.cpp */, + DE66EC5C08ABE86A00323D32 /* BasicBlock.cpp */, + DE66EC5D08ABE86A00323D32 /* ConstantFolding.cpp */, + DE66EC5E08ABE86A00323D32 /* ConstantFolding.h */, + DE66EC5F08ABE86A00323D32 /* ConstantRange.cpp */, + DE66EC6008ABE86A00323D32 /* Constants.cpp */, + DE66EC6108ABE86A00323D32 /* Dominators.cpp */, + DE66EC6208ABE86A00323D32 /* Function.cpp */, + DE66EC6308ABE86A00323D32 /* Globals.cpp */, + DE66EC6408ABE86A00323D32 /* Instruction.cpp */, + DE66EC6508ABE86A00323D32 /* Instructions.cpp */, + DE66EC6608ABE86A00323D32 /* LeakDetector.cpp */, + DE66EC6708ABE86A00323D32 /* Mangler.cpp */, + DE66EC6808ABE86A00323D32 /* Module.cpp */, + DE66EC6908ABE86A00323D32 /* ModuleProvider.cpp */, + DE66EC6A08ABE86A00323D32 /* Pass.cpp */, + DE66EC6B08ABE86A00323D32 /* PassManagerT.h */, + DE66EC6C08ABE86A00323D32 /* SymbolTable.cpp */, + DE66EC6D08ABE86A00323D32 /* SymbolTableListTraitsImpl.h */, + DE66EC6E08ABE86A00323D32 /* Type.cpp */, + DE66EC6F08ABE86A00323D32 /* Value.cpp */, + DE66EC7008ABE86A00323D32 /* Verifier.cpp */, + ); + name = lib/VMCore; + sourceTree = ""; + }; + DE66EC8808ABEAC900323D32 /* lib/AsmParser */ = { + isa = PBXGroup; + children = ( + DE66EC8A08ABEAF000323D32 /* Lexer.l */, + DE66EC8E08ABEAF000323D32 /* llvmAsmParser.y */, + DE66EC8F08ABEAF000323D32 /* Parser.cpp */, + DE66EC9008ABEAF000323D32 /* ParserInternals.h */, + ); + name = lib/AsmParser; + sourceTree = ""; + }; + DE66EC9308ABEB3900323D32 /* Reader */ = { + isa = PBXGroup; + children = ( + DE66EC9408ABEB3900323D32 /* Analyzer.cpp */, + DE66EC9E08ABEB3900323D32 /* Reader.cpp */, + DE66EC9F08ABEB3900323D32 /* Reader.h */, + DE66ECA008ABEB3900323D32 /* ReaderWrappers.cpp */, + ); + name = Reader; + path = ../lib/Bytecode/Reader; + sourceTree = SOURCE_ROOT; + }; + DE66ECA108ABEB8000323D32 /* Archive */ = { + isa = PBXGroup; + children = ( + DE66ECA208ABEB8000323D32 /* Archive.cpp */, + DE66ECA308ABEB8000323D32 /* ArchiveInternals.h */, + DE66ECA408ABEB8000323D32 /* ArchiveReader.cpp */, + DE66ECA508ABEB8000323D32 /* ArchiveWriter.cpp */, + ); + name = Archive; + path = ../lib/Bytecode/Archive; + sourceTree = SOURCE_ROOT; + }; + DE66ECAF08ABEB8000323D32 /* Writer */ = { + isa = PBXGroup; + children = ( + DE66ECB708ABEB8000323D32 /* SlotCalculator.cpp */, + DE66ECB808ABEB8000323D32 /* SlotCalculator.h */, + DE66ECB908ABEB8000323D32 /* SlotTable.h */, + DE66ECBA08ABEB8000323D32 /* Writer.cpp */, + DE66ECBB08ABEB8000323D32 /* WriterInternals.h */, + ); + name = Writer; + path = ../lib/Bytecode/Writer; + sourceTree = SOURCE_ROOT; + }; + DE66ECBC08ABEB8E00323D32 /* lib/Bytecode */ = { + isa = PBXGroup; + children = ( + DE66ECA108ABEB8000323D32 /* Archive */, + DE66EC9308ABEB3900323D32 /* Reader */, + DE66ECAF08ABEB8000323D32 /* Writer */, + ); + name = lib/Bytecode; + sourceTree = ""; + }; + DE66ECBD08ABEC0700323D32 /* lib/Analysis */ = { + isa = PBXGroup; + children = ( + DE66ECC408ABEC0700323D32 /* DataStructure */, + DE66ED1A08ABEC0800323D32 /* IPA */, + DE66ECBE08ABEC0700323D32 /* AliasAnalysis.cpp */, + DE66ECBF08ABEC0700323D32 /* AliasAnalysisCounter.cpp */, + DE66ECC008ABEC0700323D32 /* AliasAnalysisEvaluator.cpp */, + DE66ECC108ABEC0700323D32 /* AliasSetTracker.cpp */, + DE66ECC208ABEC0700323D32 /* BasicAliasAnalysis.cpp */, + DE66ECC308ABEC0700323D32 /* CFGPrinter.cpp */, + DE66ED1608ABEC0800323D32 /* Expressions.cpp */, + DE66ED1708ABEC0800323D32 /* InstCount.cpp */, + DE66ED1808ABEC0800323D32 /* Interval.cpp */, + DE66ED1908ABEC0800323D32 /* IntervalPartition.cpp */, + DE66ED3308ABEC0800323D32 /* LoadValueNumbering.cpp */, + DE66ED3408ABEC0800323D32 /* LoopInfo.cpp */, + DE66ED3608ABEC0800323D32 /* PostDominators.cpp */, + DE66ED3708ABEC0800323D32 /* ProfileInfo.cpp */, + DE66ED3808ABEC0800323D32 /* ProfileInfoLoader.cpp */, + DE66ED3908ABEC0800323D32 /* ProfileInfoLoaderPass.cpp */, + DE66ED3A08ABEC0800323D32 /* ScalarEvolution.cpp */, + DE66ED3B08ABEC0800323D32 /* ScalarEvolutionExpander.cpp */, + DE66ED3C08ABEC0800323D32 /* Trace.cpp */, + DE66ED3D08ABEC0800323D32 /* ValueNumbering.cpp */, + ); + name = lib/Analysis; + path = ../lib/Analysis; + sourceTree = SOURCE_ROOT; + }; + DE66ECC408ABEC0700323D32 /* DataStructure */ = { + isa = PBXGroup; + children = ( + DE66ECC508ABEC0700323D32 /* BottomUpClosure.cpp */, + DE66ECC608ABEC0700323D32 /* CompleteBottomUp.cpp */, + DE66ECC708ABEC0700323D32 /* DataStructure.cpp */, + DE66ECC808ABEC0700323D32 /* DataStructureAA.cpp */, + DE66ECC908ABEC0700323D32 /* DataStructureOpt.cpp */, + DE66ECCA08ABEC0700323D32 /* DataStructureStats.cpp */, + DE66ECE508ABEC0700323D32 /* EquivClassGraphs.cpp */, + DE66ECE608ABEC0700323D32 /* GraphChecker.cpp */, + DE66ECE708ABEC0700323D32 /* Local.cpp */, + DE66ECE908ABEC0700323D32 /* Printer.cpp */, + DE66ECEA08ABEC0700323D32 /* Steensgaard.cpp */, + DE66ECEB08ABEC0700323D32 /* TopDownClosure.cpp */, + ); + path = DataStructure; + sourceTree = ""; + }; + DE66ED1A08ABEC0800323D32 /* IPA */ = { + isa = PBXGroup; + children = ( + DE66ED1B08ABEC0800323D32 /* Andersens.cpp */, + DE66ED1C08ABEC0800323D32 /* CallGraph.cpp */, + DE66ED1D08ABEC0800323D32 /* CallGraphSCCPass.cpp */, + DE66ED2E08ABEC0800323D32 /* FindUnsafePointerTypes.cpp */, + DE66ED2F08ABEC0800323D32 /* FindUsedTypes.cpp */, + DE66ED3008ABEC0800323D32 /* GlobalsModRef.cpp */, + DE66ED3208ABEC0800323D32 /* PrintSCC.cpp */, + ); + path = IPA; + sourceTree = ""; + }; + DE66ED3E08ABEC2A00323D32 /* lib/CodeGen */ = { + isa = PBXGroup; + children = ( + DE66ED8308ABEC2B00323D32 /* SelectionDAG */, + DE66ED3F08ABEC2A00323D32 /* AsmPrinter.cpp */, + DE66ED4008ABEC2A00323D32 /* BranchFolding.cpp */, + DE66ED6F08ABEC2B00323D32 /* ELFWriter.cpp */, + DE66ED7008ABEC2B00323D32 /* IntrinsicLowering.cpp */, + DE66ED7108ABEC2B00323D32 /* LiveInterval.cpp */, + DE66ED7208ABEC2B00323D32 /* LiveInterval.h */, + DE66ED7308ABEC2B00323D32 /* LiveIntervalAnalysis.cpp */, + DE66ED7408ABEC2B00323D32 /* LiveIntervalAnalysis.h */, + DE66ED7508ABEC2B00323D32 /* LiveVariables.cpp */, + DE66ED7608ABEC2B00323D32 /* MachineBasicBlock.cpp */, + DE66ED7708ABEC2B00323D32 /* MachineCodeEmitter.cpp */, + DE66ED7808ABEC2B00323D32 /* MachineFunction.cpp */, + DE66ED7908ABEC2B00323D32 /* MachineInstr.cpp */, + DE66ED7B08ABEC2B00323D32 /* Passes.cpp */, + DE66ED7C08ABEC2B00323D32 /* PHIElimination.cpp */, + DE66ED7D08ABEC2B00323D32 /* PhysRegTracker.h */, + DE66ED7E08ABEC2B00323D32 /* PrologEpilogInserter.cpp */, + DE66ED7F08ABEC2B00323D32 /* RegAllocIterativeScan.cpp */, + DE66ED8008ABEC2B00323D32 /* RegAllocLinearScan.cpp */, + DE66ED8108ABEC2B00323D32 /* RegAllocLocal.cpp */, + DE66ED8208ABEC2B00323D32 /* RegAllocSimple.cpp */, + DE66ED9508ABEC2B00323D32 /* TwoAddressInstructionPass.cpp */, + DE66ED9608ABEC2B00323D32 /* UnreachableBlockElim.cpp */, + DE66ED9708ABEC2B00323D32 /* ValueTypes.cpp */, + DE66ED9808ABEC2B00323D32 /* VirtRegMap.cpp */, + DE66ED9908ABEC2B00323D32 /* VirtRegMap.h */, + ); + name = lib/CodeGen; + path = ../lib/CodeGen; + sourceTree = SOURCE_ROOT; + }; + DE66ED8308ABEC2B00323D32 /* SelectionDAG */ = { + isa = PBXGroup; + children = ( + DE66ED9008ABEC2B00323D32 /* LegalizeDAG.cpp */, + DE66ED9208ABEC2B00323D32 /* SelectionDAG.cpp */, + DE66ED9308ABEC2B00323D32 /* SelectionDAGISel.cpp */, + DE66ED9408ABEC2B00323D32 /* SelectionDAGPrinter.cpp */, + ); + path = SelectionDAG; + sourceTree = ""; + }; + DE66ED9A08ABEC7200323D32 /* lib/Debugger */ = { + isa = PBXGroup; + children = ( + DE66EDB108ABEC7300323D32 /* Debugger.cpp */, + DE66EDB208ABEC7300323D32 /* FDHandle.cpp */, + DE66EDB308ABEC7300323D32 /* FDHandle.h */, + DE66EDB508ABEC7300323D32 /* ProgramInfo.cpp */, + DE66EDB608ABEC7300323D32 /* README.txt */, + DE66EDB708ABEC7300323D32 /* RuntimeInfo.cpp */, + DE66EDB808ABEC7300323D32 /* SourceFile.cpp */, + DE66EDB908ABEC7300323D32 /* SourceLanguage-CFamily.cpp */, + DE66EDBA08ABEC7300323D32 /* SourceLanguage-CPlusPlus.cpp */, + DE66EDBB08ABEC7300323D32 /* SourceLanguage-Unknown.cpp */, + DE66EDBC08ABEC7300323D32 /* SourceLanguage.cpp */, + DE66EDBD08ABEC7300323D32 /* UnixLocalInferiorProcess.cpp */, + ); + name = lib/Debugger; + path = ../lib/Debugger; + sourceTree = SOURCE_ROOT; + }; + DE66EDBF08ABEC8F00323D32 /* lib/ExecutionEngine */ = { + isa = PBXGroup; + children = ( + DE66EDC508ABEC9000323D32 /* Interpreter */, + DE66EDD308ABEC9000323D32 /* JIT */, + DE66EDC408ABEC9000323D32 /* ExecutionEngine.cpp */, + ); + name = lib/ExecutionEngine; + path = ../lib/ExecutionEngine; + sourceTree = SOURCE_ROOT; + }; + DE66EDC508ABEC9000323D32 /* Interpreter */ = { + isa = PBXGroup; + children = ( + DE66EDCE08ABEC9000323D32 /* Execution.cpp */, + DE66EDCF08ABEC9000323D32 /* ExternalFunctions.cpp */, + DE66EDD008ABEC9000323D32 /* Interpreter.cpp */, + DE66EDD108ABEC9000323D32 /* Interpreter.h */, + ); + path = Interpreter; + sourceTree = ""; + }; + DE66EDD308ABEC9000323D32 /* JIT */ = { + isa = PBXGroup; + children = ( + DE66EDDE08ABEC9100323D32 /* Intercept.cpp */, + DE66EDDF08ABEC9100323D32 /* JIT.cpp */, + DE66EDE008ABEC9100323D32 /* JIT.h */, + DE66EDE108ABEC9100323D32 /* JITEmitter.cpp */, + DE66EDE308ABEC9100323D32 /* TargetSelect.cpp */, + ); + path = JIT; + sourceTree = ""; + }; + DE66EDEB08ABEDD300323D32 /* lib/Linker */ = { + isa = PBXGroup; + children = ( + DE66EDF608ABEDD300323D32 /* LinkArchives.cpp */, + DE66EDF708ABEDD300323D32 /* Linker.cpp */, + DE66EDF808ABEDD300323D32 /* LinkItems.cpp */, + DE66EDF908ABEDD300323D32 /* LinkModules.cpp */, + ); + name = lib/Linker; + path = ../lib/Linker; + sourceTree = SOURCE_ROOT; + }; + DE66EDFB08ABEDE600323D32 /* lib/Support */ = { + isa = PBXGroup; + children = ( + DE66EDFD08ABEDE600323D32 /* bzip2 */, + DE66EDFC08ABEDE600323D32 /* Annotation.cpp */, + DE66EE1D08ABEDE600323D32 /* CommandLine.cpp */, + DE66EE1E08ABEDE600323D32 /* Compressor.cpp */, + DE66EE3D08ABEDE600323D32 /* Debug.cpp */, + DE66EE3E08ABEDE600323D32 /* FileUtilities.cpp */, + DE66EE3F08ABEDE600323D32 /* IsInf.cpp */, + DE66EE4008ABEDE600323D32 /* IsNAN.cpp */, + DE66EE4208ABEDE600323D32 /* PluginLoader.cpp */, + DE66EE4308ABEDE600323D32 /* SlowOperationInformer.cpp */, + DE66EE4408ABEDE600323D32 /* Statistic.cpp */, + DE66EE4508ABEDE700323D32 /* StringExtras.cpp */, + DE66EE4608ABEDE700323D32 /* SystemUtils.cpp */, + DE66EE4708ABEDE700323D32 /* Timer.cpp */, + DE66EE4808ABEDE700323D32 /* ToolRunner.cpp */, + ); + name = lib/Support; + path = ../lib/Support; + sourceTree = SOURCE_ROOT; + }; + DE66EDFD08ABEDE600323D32 /* bzip2 */ = { + isa = PBXGroup; + children = ( + DE66EDFE08ABEDE600323D32 /* blocksort.c */, + DE66EDFF08ABEDE600323D32 /* bzlib.c */, + DE66EE0008ABEDE600323D32 /* bzlib.h */, + DE66EE0108ABEDE600323D32 /* bzlib_private.h */, + DE66EE0208ABEDE600323D32 /* CHANGES */, + DE66EE0308ABEDE600323D32 /* compress.c */, + DE66EE0408ABEDE600323D32 /* crctable.c */, + DE66EE1508ABEDE600323D32 /* decompress.c */, + DE66EE1608ABEDE600323D32 /* huffman.c */, + DE66EE1708ABEDE600323D32 /* LICENSE */, + DE66EE1908ABEDE600323D32 /* randtable.c */, + DE66EE1A08ABEDE600323D32 /* README */, + DE66EE1B08ABEDE600323D32 /* README.COMPILATION.PROBLEMS */, + DE66EE1C08ABEDE600323D32 /* Y2K_INFO */, + ); + path = bzip2; + sourceTree = ""; + }; + DE66EE4908ABEE3400323D32 /* lib/System */ = { + isa = PBXGroup; + children = ( + DE66EE7E08ABEE3500323D32 /* Unix */, + DE66EE8B08ABEE3500323D32 /* Win32 */, + DE66EE6008ABEE3400323D32 /* DynamicLibrary.cpp */, + DE66EE6108ABEE3400323D32 /* LICENSE.TXT */, + DE66EE6208ABEE3400323D32 /* ltdl.c */, + DE66EE6308ABEE3400323D32 /* ltdl.h */, + DE66EE6508ABEE3400323D32 /* MappedFile.cpp */, + DE66EE6608ABEE3400323D32 /* Memory.cpp */, + DE66EE6708ABEE3400323D32 /* Mutex.cpp */, + DE66EE6808ABEE3400323D32 /* Path.cpp */, + DE66EE6908ABEE3400323D32 /* Process.cpp */, + DE66EE6A08ABEE3400323D32 /* Program.cpp */, + DE66EE6B08ABEE3400323D32 /* README.txt */, + DE66EE7C08ABEE3400323D32 /* Signals.cpp */, + DE66EE7D08ABEE3400323D32 /* TimeValue.cpp */, + ); + name = lib/System; + path = ../lib/System; + sourceTree = SOURCE_ROOT; + }; + DE66EE7E08ABEE3500323D32 /* Unix */ = { + isa = PBXGroup; + children = ( + DE66EE7F08ABEE3500323D32 /* MappedFile.inc */, + DE66EE8008ABEE3500323D32 /* Memory.inc */, + DE66EE8108ABEE3500323D32 /* Mutex.inc */, + DE66EE8208ABEE3500323D32 /* Path.inc */, + DE66EE8308ABEE3500323D32 /* Process.inc */, + DE66EE8408ABEE3500323D32 /* Program.inc */, + DE66EE8508ABEE3500323D32 /* README.txt */, + DE66EE8608ABEE3500323D32 /* Signals.inc */, + DE66EE8708ABEE3500323D32 /* SUS */, + DE66EE8908ABEE3500323D32 /* TimeValue.inc */, + DE66EE8A08ABEE3500323D32 /* Unix.h */, + ); + path = Unix; + sourceTree = ""; + }; + DE66EE8708ABEE3500323D32 /* SUS */ = { + isa = PBXGroup; + children = ( + DE66EE8808ABEE3500323D32 /* Process.cpp */, + ); + path = SUS; + sourceTree = ""; + }; + DE66EE8B08ABEE3500323D32 /* Win32 */ = { + isa = PBXGroup; + children = ( + DE66EE8C08ABEE3500323D32 /* DynamicLibrary.inc */, + DE66EE8D08ABEE3500323D32 /* MappedFile.inc */, + DE66EE8E08ABEE3500323D32 /* Memory.inc */, + DE66EE8F08ABEE3500323D32 /* Mutex.inc */, + DE66EE9008ABEE3500323D32 /* Path.inc */, + DE66EE9108ABEE3500323D32 /* Process.inc */, + DE66EE9208ABEE3500323D32 /* Program.inc */, + DE66EE9308ABEE3500323D32 /* Signals.inc */, + DE66EE9408ABEE3500323D32 /* TimeValue.inc */, + DE66EE9508ABEE3500323D32 /* Win32.h */, + ); + path = Win32; + sourceTree = ""; + }; + DE66EE9608ABEE5D00323D32 /* lib/Target */ = { + isa = PBXGroup; + children = ( + DE66EE9708ABEE5D00323D32 /* Alpha */, + DE66EEC908ABEE5E00323D32 /* CBackend */, + DE66EEE508ABEE5E00323D32 /* IA64 */, + DE66EF1108ABEE5E00323D32 /* PowerPC */, + DE66EF7008ABEE5F00323D32 /* Skeleton */, + DE66EF9408ABEE5F00323D32 /* SparcV8 */, + DE66EFC908ABEE5F00323D32 /* SparcV9 */, + DE66F09308ABEE6000323D32 /* X86 */, + DE66EF1008ABEE5E00323D32 /* MRegisterInfo.cpp */, + DE66F08A08ABEE6000323D32 /* Target.td */, + DE66F08B08ABEE6000323D32 /* TargetData.cpp */, + DE66F08C08ABEE6000323D32 /* TargetFrameInfo.cpp */, + DE66F08D08ABEE6000323D32 /* TargetInstrInfo.cpp */, + DE66F08E08ABEE6000323D32 /* TargetLowering.cpp */, + DE66F08F08ABEE6000323D32 /* TargetMachine.cpp */, + DE66F09008ABEE6000323D32 /* TargetMachineRegistry.cpp */, + DE66F09108ABEE6000323D32 /* TargetSchedInfo.cpp */, + DE66F09208ABEE6000323D32 /* TargetSubtarget.cpp */, + ); + name = lib/Target; + path = ../lib/Target; + sourceTree = SOURCE_ROOT; + }; + DE66EE9708ABEE5D00323D32 /* Alpha */ = { + isa = PBXGroup; + children = ( + DE66EE9808ABEE5E00323D32 /* Alpha.h */, + DE66EE9908ABEE5E00323D32 /* Alpha.td */, + DE66EE9A08ABEE5E00323D32 /* AlphaAsmPrinter.cpp */, + DE66EE9B08ABEE5E00323D32 /* AlphaCodeEmitter.cpp */, + DE66EEA308ABEE5E00323D32 /* AlphaInstrFormats.td */, + DE66EEA408ABEE5E00323D32 /* AlphaInstrInfo.cpp */, + DE66EEA508ABEE5E00323D32 /* AlphaInstrInfo.h */, + DE66EEA608ABEE5E00323D32 /* AlphaInstrInfo.td */, + DE66EEA708ABEE5E00323D32 /* AlphaISelPattern.cpp */, + DE66EEA808ABEE5E00323D32 /* AlphaISelPattern.cpp.orig */, + DE66EEA908ABEE5E00323D32 /* AlphaJITInfo.cpp */, + DE66EEAA08ABEE5E00323D32 /* AlphaJITInfo.h */, + DE66EEAB08ABEE5E00323D32 /* AlphaRegisterInfo.cpp */, + DE66EEAC08ABEE5E00323D32 /* AlphaRegisterInfo.h */, + DE66EEAD08ABEE5E00323D32 /* AlphaRegisterInfo.td */, + DE66EEAE08ABEE5E00323D32 /* AlphaRelocations.h */, + DE66EEAF08ABEE5E00323D32 /* AlphaTargetMachine.cpp */, + DE66EEB008ABEE5E00323D32 /* AlphaTargetMachine.h */, + ); + path = Alpha; + sourceTree = ""; + }; + DE66EEC908ABEE5E00323D32 /* CBackend */ = { + isa = PBXGroup; + children = ( + DE66EECA08ABEE5E00323D32 /* CTargetMachine.h */, + DE66EED008ABEE5E00323D32 /* Writer.cpp */, + ); + path = CBackend; + sourceTree = ""; + }; + DE66EEE508ABEE5E00323D32 /* IA64 */ = { + isa = PBXGroup; + children = ( + DE66EEF808ABEE5E00323D32 /* IA64.h */, + DE66EEF908ABEE5E00323D32 /* IA64.td */, + DE66EEFA08ABEE5E00323D32 /* IA64AsmPrinter.cpp */, + DE66EF0108ABEE5E00323D32 /* IA64InstrBuilder.h */, + DE66EF0208ABEE5E00323D32 /* IA64InstrFormats.td */, + DE66EF0308ABEE5E00323D32 /* IA64InstrInfo.cpp */, + DE66EF0408ABEE5E00323D32 /* IA64InstrInfo.h */, + DE66EF0508ABEE5E00323D32 /* IA64InstrInfo.td */, + DE66EF0608ABEE5E00323D32 /* IA64ISelPattern.cpp */, + DE66EF0708ABEE5E00323D32 /* IA64MachineFunctionInfo.h */, + DE66EF0808ABEE5E00323D32 /* IA64RegisterInfo.cpp */, + DE66EF0908ABEE5E00323D32 /* IA64RegisterInfo.h */, + DE66EF0A08ABEE5E00323D32 /* IA64RegisterInfo.td */, + DE66EF0B08ABEE5E00323D32 /* IA64TargetMachine.cpp */, + DE66EF0C08ABEE5E00323D32 /* IA64TargetMachine.h */, + DE66EF0E08ABEE5E00323D32 /* README */, + ); + path = IA64; + sourceTree = ""; + }; + DE66EF1108ABEE5E00323D32 /* PowerPC */ = { + isa = PBXGroup; + children = ( + DE66EF1208ABEE5E00323D32 /* .cvsignore */, + DE66EF3D08ABEE5F00323D32 /* LICENSE.TXT */, + DE66EF3F08ABEE5F00323D32 /* PowerPC.h */, + DE66EF4008ABEE5F00323D32 /* PowerPC.td */, + DE66EF4108ABEE5F00323D32 /* PowerPCAsmPrinter.cpp */, + DE66EF4208ABEE5F00323D32 /* PowerPCBranchSelector.cpp */, + DE66EF4308ABEE5F00323D32 /* PowerPCFrameInfo.h */, + DE66EF4708ABEE5F00323D32 /* PowerPCInstrBuilder.h */, + DE66EF4808ABEE5F00323D32 /* PowerPCInstrFormats.td */, + DE66EF4908ABEE5F00323D32 /* PowerPCInstrInfo.h */, + DE66EF4A08ABEE5F00323D32 /* PowerPCInstrInfo.td */, + DE66EF4B08ABEE5F00323D32 /* PowerPCJITInfo.h */, + DE66EF4C08ABEE5F00323D32 /* PowerPCRegisterInfo.td */, + DE66EF4D08ABEE5F00323D32 /* PowerPCSubtarget.cpp */, + DE66EF4E08ABEE5F00323D32 /* PowerPCSubtarget.h */, + DE66EF4F08ABEE5F00323D32 /* PowerPCTargetMachine.cpp */, + DE66EF5008ABEE5F00323D32 /* PowerPCTargetMachine.h */, + DE66EF5108ABEE5F00323D32 /* PPC32.td */, + DE66EF5208ABEE5F00323D32 /* PPC32CodeEmitter.cpp */, + DE66EF5708ABEE5F00323D32 /* PPC32InstrInfo.cpp */, + DE66EF5808ABEE5F00323D32 /* PPC32InstrInfo.h */, + DE66EF5908ABEE5F00323D32 /* PPC32ISelPattern.cpp */, + DE66EF5A08ABEE5F00323D32 /* PPC32ISelSimple.cpp */, + DE66EF5B08ABEE5F00323D32 /* PPC32JITInfo.cpp */, + DE66EF5C08ABEE5F00323D32 /* PPC32JITInfo.h */, + DE66EF5D08ABEE5F00323D32 /* PPC32RegisterInfo.cpp */, + DE66EF5E08ABEE5F00323D32 /* PPC32RegisterInfo.h */, + DE66EF5F08ABEE5F00323D32 /* PPC32RegisterInfo.td */, + DE66EF6008ABEE5F00323D32 /* PPC32Relocations.h */, + DE66EF6108ABEE5F00323D32 /* PPC32TargetMachine.h */, + DE66EF6208ABEE5F00323D32 /* PPC64.td */, + DE66EF6308ABEE5F00323D32 /* PPC64CodeEmitter.cpp */, + DE66EF6708ABEE5F00323D32 /* PPC64InstrInfo.cpp */, + DE66EF6808ABEE5F00323D32 /* PPC64InstrInfo.h */, + DE66EF6908ABEE5F00323D32 /* PPC64ISelPattern.cpp */, + DE66EF6A08ABEE5F00323D32 /* PPC64JITInfo.h */, + DE66EF6B08ABEE5F00323D32 /* PPC64RegisterInfo.cpp */, + DE66EF6C08ABEE5F00323D32 /* PPC64RegisterInfo.h */, + DE66EF6D08ABEE5F00323D32 /* PPC64RegisterInfo.td */, + DE66EF6E08ABEE5F00323D32 /* PPC64TargetMachine.h */, + DE66EF6F08ABEE5F00323D32 /* README.txt */, + ); + path = PowerPC; + sourceTree = ""; + }; + DE66EF7008ABEE5F00323D32 /* Skeleton */ = { + isa = PBXGroup; + children = ( + DE66EF7108ABEE5F00323D32 /* .cvsignore */, + DE66EF8208ABEE5F00323D32 /* README.txt */, + DE66EF8308ABEE5F00323D32 /* Skeleton.h */, + DE66EF8408ABEE5F00323D32 /* Skeleton.td */, + DE66EF8A08ABEE5F00323D32 /* SkeletonInstrInfo.cpp */, + DE66EF8B08ABEE5F00323D32 /* SkeletonInstrInfo.h */, + DE66EF8C08ABEE5F00323D32 /* SkeletonInstrInfo.td */, + DE66EF8D08ABEE5F00323D32 /* SkeletonJITInfo.cpp */, + DE66EF8E08ABEE5F00323D32 /* SkeletonJITInfo.h */, + DE66EF8F08ABEE5F00323D32 /* SkeletonRegisterInfo.cpp */, + DE66EF9008ABEE5F00323D32 /* SkeletonRegisterInfo.h */, + DE66EF9108ABEE5F00323D32 /* SkeletonRegisterInfo.td */, + DE66EF9208ABEE5F00323D32 /* SkeletonTargetMachine.cpp */, + DE66EF9308ABEE5F00323D32 /* SkeletonTargetMachine.h */, + ); + path = Skeleton; + sourceTree = ""; + }; + DE66EF9408ABEE5F00323D32 /* SparcV8 */ = { + isa = PBXGroup; + children = ( + DE66EFAF08ABEE5F00323D32 /* DelaySlotFiller.cpp */, + DE66EFB008ABEE5F00323D32 /* FPMover.cpp */, + DE66EFB208ABEE5F00323D32 /* README.txt */, + DE66EFB308ABEE5F00323D32 /* SparcV8.h */, + DE66EFB408ABEE5F00323D32 /* SparcV8.td */, + DE66EFB508ABEE5F00323D32 /* SparcV8AsmPrinter.cpp */, + DE66EFB608ABEE5F00323D32 /* SparcV8CodeEmitter.cpp */, + DE66EFBD08ABEE5F00323D32 /* SparcV8InstrFormats.td */, + DE66EFBE08ABEE5F00323D32 /* SparcV8InstrInfo.cpp */, + DE66EFBF08ABEE5F00323D32 /* SparcV8InstrInfo.h */, + DE66EFC008ABEE5F00323D32 /* SparcV8InstrInfo.td */, + DE66EFC108ABEE5F00323D32 /* SparcV8ISelPattern.cpp */, + DE66EFC208ABEE5F00323D32 /* SparcV8ISelSimple.cpp */, + DE66EFC308ABEE5F00323D32 /* SparcV8JITInfo.h */, + DE66EFC408ABEE5F00323D32 /* SparcV8RegisterInfo.cpp */, + DE66EFC508ABEE5F00323D32 /* SparcV8RegisterInfo.h */, + DE66EFC608ABEE5F00323D32 /* SparcV8RegisterInfo.td */, + DE66EFC708ABEE5F00323D32 /* SparcV8TargetMachine.cpp */, + DE66EFC808ABEE5F00323D32 /* SparcV8TargetMachine.h */, + ); + path = SparcV8; + sourceTree = ""; + }; + DE66EFC908ABEE5F00323D32 /* SparcV9 */ = { + isa = PBXGroup; + children = ( + DE66EFFC08ABEE6000323D32 /* InstrSched */, + DE66F00F08ABEE6000323D32 /* LiveVar */, + DE66F02608ABEE6000323D32 /* ModuloScheduling */, + DE66F04608ABEE6000323D32 /* RegAlloc */, + DE66EFCA08ABEE5F00323D32 /* .cvsignore */, + 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 */, + DE66F06308ABEE6000323D32 /* SparcV9.burg.in1 */, + DE66F06408ABEE6000323D32 /* SparcV9.burm */, + DE66F06508ABEE6000323D32 /* SparcV9.burm.cpp */, + 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 */, + DE66F05C08ABEE6000323D32 /* Notes.txt */, + DE66F05D08ABEE6000323D32 /* PhyRegAlloc.cpp */, + DE66F05E08ABEE6000323D32 /* PhyRegAlloc.h */, + DE66F05F08ABEE6000323D32 /* RegAllocCommon.h */, + DE66F06008ABEE6000323D32 /* RegClass.cpp */, + DE66F06108ABEE6000323D32 /* RegClass.h */, + ); + path = RegAlloc; + sourceTree = ""; + }; + DE66F09308ABEE6000323D32 /* X86 */ = { + isa = PBXGroup; + children = ( + DE66F09408ABEE6000323D32 /* .cvsignore */, + DE66F0BC08ABEE6000323D32 /* X86.h */, + DE66F0BD08ABEE6000323D32 /* X86.td */, + DE66F0BE08ABEE6000323D32 /* X86AsmPrinter.cpp */, + DE66F0BF08ABEE6000323D32 /* X86AsmPrinter.h */, + DE66F0C008ABEE6000323D32 /* X86ATTAsmPrinter.cpp */, + DE66F0C108ABEE6000323D32 /* X86ATTAsmPrinter.h */, + DE66F0C208ABEE6000323D32 /* X86CodeEmitter.cpp */, + DE66F0C308ABEE6000323D32 /* X86ELFWriter.cpp */, + DE66F0C408ABEE6000323D32 /* X86FloatingPoint.cpp */, + DE66F0CC08ABEE6000323D32 /* X86InstrBuilder.h */, + DE66F0CD08ABEE6000323D32 /* X86InstrInfo.cpp */, + DE66F0CE08ABEE6000323D32 /* X86InstrInfo.h */, + DE66F0CF08ABEE6100323D32 /* X86InstrInfo.td */, + DE66F0D008ABEE6100323D32 /* X86IntelAsmPrinter.cpp */, + DE66F0D108ABEE6100323D32 /* X86IntelAsmPrinter.h */, + DE66F0D208ABEE6100323D32 /* X86ISelPattern.cpp */, + DE66F0D308ABEE6100323D32 /* X86ISelPattern.cpp.orig */, + DE66F0D408ABEE6100323D32 /* X86ISelSimple.cpp */, + DE66F0D508ABEE6100323D32 /* X86JITInfo.cpp */, + DE66F0D608ABEE6100323D32 /* X86JITInfo.h */, + DE66F0D708ABEE6100323D32 /* X86PeepholeOpt.cpp */, + DE66F0D808ABEE6100323D32 /* X86RegisterInfo.cpp */, + DE66F0D908ABEE6100323D32 /* X86RegisterInfo.h */, + DE66F0DA08ABEE6100323D32 /* X86RegisterInfo.td */, + DE66F0DB08ABEE6100323D32 /* X86Relocations.h */, + DE66F0DC08ABEE6100323D32 /* X86Subtarget.cpp */, + DE66F0DD08ABEE6100323D32 /* X86Subtarget.h */, + DE66F0DE08ABEE6100323D32 /* X86TargetMachine.cpp */, + DE66F0DF08ABEE6100323D32 /* X86TargetMachine.h */, + ); + path = X86; + sourceTree = ""; + }; + DE66F0E108ABEFB300323D32 /* lib/Transforms */ = { + isa = PBXGroup; + children = ( + DE66F0EE08ABEFB300323D32 /* Instrumentation */, + DE66F11F08ABEFB300323D32 /* IPO */, + DE66F15C08ABEFB400323D32 /* Scalar */, + DE66F1BD08ABEFB400323D32 /* Utils */, + DE66F0EA08ABEFB300323D32 /* ExprTypeConvert.cpp */, + DE66F15A08ABEFB400323D32 /* LevelRaise.cpp */, + DE66F1BB08ABEFB400323D32 /* TransformInternals.cpp */, + DE66F1BC08ABEFB400323D32 /* TransformInternals.h */, + ); + name = lib/Transforms; + path = ../lib/Transforms; + sourceTree = SOURCE_ROOT; + }; + DE66F0EE08ABEFB300323D32 /* Instrumentation */ = { + isa = PBXGroup; + children = ( + DE66F10108ABEFB300323D32 /* ProfilePaths */, + DE66F0EF08ABEFB300323D32 /* BlockProfiling.cpp */, + DE66F0FE08ABEFB300323D32 /* EdgeProfiling.cpp */, + DE66F0FF08ABEFB300323D32 /* EmitFunctions.cpp */, + DE66F11B08ABEFB300323D32 /* ProfilingUtils.cpp */, + DE66F11C08ABEFB300323D32 /* ProfilingUtils.h */, + DE66F11D08ABEFB300323D32 /* TraceBasicBlocks.cpp */, + DE66F11E08ABEFB300323D32 /* TraceValues.cpp */, + ); + path = Instrumentation; + sourceTree = ""; + }; + DE66F10108ABEFB300323D32 /* ProfilePaths */ = { + isa = PBXGroup; + children = ( + DE66F10208ABEFB300323D32 /* CombineBranch.cpp */, + DE66F11308ABEFB300323D32 /* EdgeCode.cpp */, + DE66F11408ABEFB300323D32 /* Graph.cpp */, + DE66F11508ABEFB300323D32 /* Graph.h */, + DE66F11608ABEFB300323D32 /* GraphAuxiliary.cpp */, + DE66F11708ABEFB300323D32 /* InstLoops.cpp */, + DE66F11908ABEFB300323D32 /* ProfilePaths.cpp */, + DE66F11A08ABEFB300323D32 /* RetracePath.cpp */, + ); + path = ProfilePaths; + sourceTree = ""; + }; + DE66F11F08ABEFB300323D32 /* IPO */ = { + isa = PBXGroup; + children = ( + DE66F12008ABEFB300323D32 /* ArgumentPromotion.cpp */, + DE66F12108ABEFB300323D32 /* ConstantMerge.cpp */, + DE66F12208ABEFB300323D32 /* DeadArgumentElimination.cpp */, + DE66F12308ABEFB300323D32 /* DeadTypeElimination.cpp */, + DE66F14A08ABEFB400323D32 /* ExtractFunction.cpp */, + DE66F14B08ABEFB400323D32 /* FunctionResolution.cpp */, + DE66F14C08ABEFB400323D32 /* GlobalDCE.cpp */, + DE66F14D08ABEFB400323D32 /* GlobalOpt.cpp */, + DE66F14E08ABEFB400323D32 /* Inliner.cpp */, + DE66F14F08ABEFB400323D32 /* Inliner.h */, + DE66F15008ABEFB400323D32 /* InlineSimple.cpp */, + DE66F15108ABEFB400323D32 /* Internalize.cpp */, + DE66F15208ABEFB400323D32 /* IPConstantPropagation.cpp */, + DE66F15308ABEFB400323D32 /* LoopExtractor.cpp */, + DE66F15408ABEFB400323D32 /* LowerSetJmp.cpp */, + DE66F15608ABEFB400323D32 /* PruneEH.cpp */, + DE66F15708ABEFB400323D32 /* RaiseAllocations.cpp */, + DE66F15808ABEFB400323D32 /* SimplifyLibCalls.cpp */, + DE66F15908ABEFB400323D32 /* StripSymbols.cpp */, + ); + path = IPO; + sourceTree = ""; + }; + DE66F15C08ABEFB400323D32 /* Scalar */ = { + isa = PBXGroup; + children = ( + DE66F15E08ABEFB400323D32 /* ADCE.cpp */, + DE66F15F08ABEFB400323D32 /* BasicBlockPlacement.cpp */, + DE66F16008ABEFB400323D32 /* CondPropagate.cpp */, + DE66F16108ABEFB400323D32 /* ConstantProp.cpp */, + DE66F16208ABEFB400323D32 /* CorrelatedExprs.cpp */, + DE66F16308ABEFB400323D32 /* DCE.cpp */, + DE66F16408ABEFB400323D32 /* DeadStoreElimination.cpp */, + DE66F1A308ABEFB400323D32 /* GCSE.cpp */, + DE66F1A408ABEFB400323D32 /* IndVarSimplify.cpp */, + DE66F1A508ABEFB400323D32 /* InstructionCombining.cpp */, + DE66F1A608ABEFB400323D32 /* LICM.cpp */, + DE66F1A708ABEFB400323D32 /* LoopSimplify.cpp */, + DE66F1A808ABEFB400323D32 /* LoopStrengthReduce.cpp */, + DE66F1A908ABEFB400323D32 /* LoopUnroll.cpp */, + DE66F1AA08ABEFB400323D32 /* LoopUnswitch.cpp */, + DE66F1AB08ABEFB400323D32 /* LowerAllocations.cpp */, + DE66F1AC08ABEFB400323D32 /* LowerConstantExprs.cpp */, + DE66F1AD08ABEFB400323D32 /* LowerGC.cpp */, + DE66F1AE08ABEFB400323D32 /* LowerInvoke.cpp */, + DE66F1AF08ABEFB400323D32 /* LowerPacked.cpp */, + DE66F1B008ABEFB400323D32 /* LowerSelect.cpp */, + DE66F1B108ABEFB400323D32 /* LowerSwitch.cpp */, + DE66F1B308ABEFB400323D32 /* Mem2Reg.cpp */, + DE66F1B408ABEFB400323D32 /* PRE.cpp */, + DE66F1B508ABEFB400323D32 /* Reassociate.cpp */, + DE66F1B608ABEFB400323D32 /* ScalarReplAggregates.cpp */, + DE66F1B708ABEFB400323D32 /* SCCP.cpp */, + DE66F1B808ABEFB400323D32 /* SimplifyCFG.cpp */, + DE66F1B908ABEFB400323D32 /* TailDuplication.cpp */, + DE66F1BA08ABEFB400323D32 /* TailRecursionElimination.cpp */, + ); + path = Scalar; + sourceTree = ""; + }; + DE66F1BD08ABEFB400323D32 /* Utils */ = { + isa = PBXGroup; + children = ( + DE66F1BE08ABEFB400323D32 /* BasicBlockUtils.cpp */, + DE66F1BF08ABEFB400323D32 /* BreakCriticalEdges.cpp */, + DE66F1C008ABEFB400323D32 /* CloneFunction.cpp */, + DE66F1C108ABEFB400323D32 /* CloneModule.cpp */, + DE66F1C208ABEFB400323D32 /* CloneTrace.cpp */, + DE66F1C308ABEFB400323D32 /* CodeExtractor.cpp */, + DE66F1E008ABEFB400323D32 /* DemoteRegToStack.cpp */, + DE66F1E108ABEFB400323D32 /* InlineFunction.cpp */, + DE66F1E208ABEFB400323D32 /* Local.cpp */, + DE66F1E408ABEFB400323D32 /* PromoteMemoryToRegister.cpp */, + DE66F1E508ABEFB400323D32 /* SimplifyCFG.cpp */, + DE66F1E608ABEFB400323D32 /* UnifyFunctionExitNodes.cpp */, + DE66F1E708ABEFB400323D32 /* ValueMapper.cpp */, + DE66F1E808ABEFB400323D32 /* ValueMapper.h */, + ); + path = Utils; + sourceTree = ""; + }; + DE66F1E908ABF03100323D32 /* include/llvm */ = { + isa = PBXGroup; + children = ( + DE66F1EB08ABF03100323D32 /* ADT */, + DE66F20308ABF03100323D32 /* Analysis */, + DE66F22408ABF03100323D32 /* Assembly */, + DE66F22B08ABF03100323D32 /* Bytecode */, + DE66F23508ABF03100323D32 /* CodeGen */, + DE66F24C08ABF03100323D32 /* Config */, + DE66F25308ABF03100323D32 /* Debugger */, + DE66F25B08ABF03100323D32 /* ExecutionEngine */, + DE66F26E08ABF03200323D32 /* Support */, + DE66F29408ABF03200323D32 /* System */, + DE66F29F08ABF03200323D32 /* Target */, + DE66F2AB08ABF03200323D32 /* Transforms */, + DE66F1EA08ABF03100323D32 /* AbstractTypeUser.h */, + DE66F22308ABF03100323D32 /* Argument.h */, + DE66F22A08ABF03100323D32 /* BasicBlock.h */, + DE66F23308ABF03100323D32 /* CallGraphSCCPass.h */, + DE66F23408ABF03100323D32 /* CallingConv.h */, + DE66F25108ABF03100323D32 /* Constant.h */, + DE66F25208ABF03100323D32 /* Constants.h */, + DE66F25A08ABF03100323D32 /* DerivedTypes.h */, + DE66F25E08ABF03100323D32 /* Function.h */, + DE66F25F08ABF03100323D32 /* GlobalValue.h */, + DE66F26008ABF03100323D32 /* GlobalVariable.h */, + DE66F26108ABF03100323D32 /* InstrTypes.h */, + DE66F26208ABF03100323D32 /* Instruction.def */, + DE66F26308ABF03100323D32 /* Instruction.h */, + DE66F26408ABF03100323D32 /* Instructions.h */, + DE66F26508ABF03100323D32 /* IntrinsicInst.h */, + DE66F26608ABF03100323D32 /* Intrinsics.h */, + DE66F26708ABF03100323D32 /* Linker.h */, + DE66F26808ABF03100323D32 /* Module.h */, + DE66F26908ABF03200323D32 /* ModuleProvider.h */, + DE66F26A08ABF03200323D32 /* Pass.h */, + DE66F26B08ABF03200323D32 /* PassAnalysisSupport.h */, + DE66F26C08ABF03200323D32 /* PassManager.h */, + DE66F26D08ABF03200323D32 /* PassSupport.h */, + DE66F29208ABF03200323D32 /* SymbolTable.h */, + DE66F29308ABF03200323D32 /* SymbolTableListTraits.h */, + DE66F2B708ABF03200323D32 /* Type.h */, + DE66F2B808ABF03200323D32 /* Use.h */, + DE66F2B908ABF03200323D32 /* User.h */, + DE66F2BA08ABF03200323D32 /* Value.h */, + ); + name = include/llvm; + path = ../include/llvm; + sourceTree = SOURCE_ROOT; + }; + DE66F1EB08ABF03100323D32 /* ADT */ = { + isa = PBXGroup; + children = ( + DE66F1EC08ABF03100323D32 /* .cvsignore */, + DE66F1ED08ABF03100323D32 /* BitSetVector.h */, + DE66F1EE08ABF03100323D32 /* DenseMap.h */, + DE66F1EF08ABF03100323D32 /* DepthFirstIterator.h */, + DE66F1F008ABF03100323D32 /* EquivalenceClasses.h */, + DE66F1F108ABF03100323D32 /* GraphTraits.h */, + DE66F1F208ABF03100323D32 /* hash_map */, + DE66F1F308ABF03100323D32 /* hash_map.in */, + DE66F1F408ABF03100323D32 /* hash_set */, + DE66F1F508ABF03100323D32 /* hash_set.in */, + DE66F1F608ABF03100323D32 /* HashExtras.h */, + DE66F1F708ABF03100323D32 /* ilist */, + DE66F1F808ABF03100323D32 /* iterator */, + DE66F1F908ABF03100323D32 /* iterator.in */, + DE66F1FA08ABF03100323D32 /* PostOrderIterator.h */, + DE66F1FB08ABF03100323D32 /* SCCIterator.h */, + DE66F1FC08ABF03100323D32 /* SetOperations.h */, + DE66F1FD08ABF03100323D32 /* SetVector.h */, + DE66F1FE08ABF03100323D32 /* Statistic.h */, + DE66F1FF08ABF03100323D32 /* STLExtras.h */, + DE66F20008ABF03100323D32 /* StringExtras.h */, + DE66F20108ABF03100323D32 /* Tree.h */, + DE66F20208ABF03100323D32 /* VectorExtras.h */, + ); + path = ADT; + sourceTree = ""; + }; + DE66F20308ABF03100323D32 /* Analysis */ = { + isa = PBXGroup; + children = ( + DE66F20408ABF03100323D32 /* AliasAnalysis.h */, + DE66F20508ABF03100323D32 /* AliasSetTracker.h */, + DE66F20608ABF03100323D32 /* CallGraph.h */, + DE66F20708ABF03100323D32 /* CFGPrinter.h */, + DE66F20808ABF03100323D32 /* ConstantsScanner.h */, + DE66F20908ABF03100323D32 /* DataStructure */, + DE66F20F08ABF03100323D32 /* Dominators.h */, + DE66F21008ABF03100323D32 /* Expressions.h */, + DE66F21108ABF03100323D32 /* FindUnsafePointerTypes.h */, + DE66F21208ABF03100323D32 /* FindUsedTypes.h */, + DE66F21308ABF03100323D32 /* Interval.h */, + DE66F21408ABF03100323D32 /* IntervalIterator.h */, + DE66F21508ABF03100323D32 /* IntervalPartition.h */, + DE66F21608ABF03100323D32 /* LoadValueNumbering.h */, + DE66F21708ABF03100323D32 /* LoopInfo.h */, + DE66F21808ABF03100323D32 /* Passes.h */, + DE66F21908ABF03100323D32 /* PostDominators.h */, + DE66F21A08ABF03100323D32 /* ProfileInfo.h */, + DE66F21B08ABF03100323D32 /* ProfileInfoLoader.h */, + DE66F21C08ABF03100323D32 /* ProfileInfoTypes.h */, + DE66F21D08ABF03100323D32 /* ScalarEvolution.h */, + DE66F21E08ABF03100323D32 /* ScalarEvolutionExpander.h */, + DE66F21F08ABF03100323D32 /* ScalarEvolutionExpressions.h */, + DE66F22008ABF03100323D32 /* Trace.h */, + DE66F22108ABF03100323D32 /* ValueNumbering.h */, + DE66F22208ABF03100323D32 /* Verifier.h */, + ); + path = Analysis; + sourceTree = ""; + }; + DE66F20908ABF03100323D32 /* DataStructure */ = { + isa = PBXGroup; + children = ( + DE66F20A08ABF03100323D32 /* DataStructure.h */, + DE66F20B08ABF03100323D32 /* DSGraph.h */, + DE66F20C08ABF03100323D32 /* DSGraphTraits.h */, + DE66F20D08ABF03100323D32 /* DSNode.h */, + DE66F20E08ABF03100323D32 /* DSSupport.h */, + ); + path = DataStructure; + sourceTree = ""; + }; + DE66F22408ABF03100323D32 /* Assembly */ = { + isa = PBXGroup; + children = ( + DE66F22508ABF03100323D32 /* AsmAnnotationWriter.h */, + DE66F22608ABF03100323D32 /* CachedWriter.h */, + DE66F22708ABF03100323D32 /* Parser.h */, + DE66F22808ABF03100323D32 /* PrintModulePass.h */, + DE66F22908ABF03100323D32 /* Writer.h */, + ); + path = Assembly; + sourceTree = ""; + }; + DE66F22B08ABF03100323D32 /* Bytecode */ = { + isa = PBXGroup; + children = ( + DE66F22C08ABF03100323D32 /* Analyzer.h */, + DE66F22D08ABF03100323D32 /* Archive.h */, + DE66F22E08ABF03100323D32 /* BytecodeHandler.h */, + DE66F22F08ABF03100323D32 /* Format.h */, + DE66F23008ABF03100323D32 /* Reader.h */, + DE66F23108ABF03100323D32 /* WriteBytecodePass.h */, + DE66F23208ABF03100323D32 /* Writer.h */, + ); + path = Bytecode; + sourceTree = ""; + }; + DE66F23508ABF03100323D32 /* CodeGen */ = { + isa = PBXGroup; + children = ( + DE66F23608ABF03100323D32 /* AsmPrinter.h */, + DE66F23708ABF03100323D32 /* ELFWriter.h */, + DE66F23808ABF03100323D32 /* InstrScheduling.h */, + DE66F23908ABF03100323D32 /* IntrinsicLowering.h */, + DE66F23A08ABF03100323D32 /* LiveVariables.h */, + DE66F23B08ABF03100323D32 /* MachineBasicBlock.h */, + DE66F23C08ABF03100323D32 /* MachineCodeEmitter.h */, + DE66F23D08ABF03100323D32 /* MachineConstantPool.h */, + DE66F23E08ABF03100323D32 /* MachineFrameInfo.h */, + DE66F23F08ABF03100323D32 /* MachineFunction.h */, + DE66F24008ABF03100323D32 /* MachineFunctionPass.h */, + DE66F24108ABF03100323D32 /* MachineInstr.h */, + DE66F24208ABF03100323D32 /* MachineInstrBuilder.h */, + DE66F24308ABF03100323D32 /* MachineRelocation.h */, + DE66F24408ABF03100323D32 /* Passes.h */, + DE66F24508ABF03100323D32 /* SchedGraphCommon.h */, + DE66F24608ABF03100323D32 /* SelectionDAG.h */, + DE66F24708ABF03100323D32 /* SelectionDAGISel.h */, + DE66F24808ABF03100323D32 /* SelectionDAGNodes.h */, + DE66F24908ABF03100323D32 /* SSARegMap.h */, + DE66F24A08ABF03100323D32 /* ValueSet.h */, + DE66F24B08ABF03100323D32 /* ValueTypes.h */, + ); + path = CodeGen; + sourceTree = ""; + }; + DE66F24C08ABF03100323D32 /* Config */ = { + isa = PBXGroup; + children = ( + DE66F24D08ABF03100323D32 /* .cvsignore */, + DE66F24E08ABF03100323D32 /* alloca.h */, + DE66F24F08ABF03100323D32 /* config.h */, + DE66F25008ABF03100323D32 /* config.h.in */, + ); + path = Config; + sourceTree = ""; + }; + DE66F25308ABF03100323D32 /* Debugger */ = { + isa = PBXGroup; + children = ( + DE66F25408ABF03100323D32 /* Debugger.h */, + DE66F25508ABF03100323D32 /* InferiorProcess.h */, + DE66F25608ABF03100323D32 /* ProgramInfo.h */, + DE66F25708ABF03100323D32 /* RuntimeInfo.h */, + DE66F25808ABF03100323D32 /* SourceFile.h */, + DE66F25908ABF03100323D32 /* SourceLanguage.h */, + ); + path = Debugger; + sourceTree = ""; + }; + DE66F25B08ABF03100323D32 /* ExecutionEngine */ = { + isa = PBXGroup; + children = ( + DE66F25C08ABF03100323D32 /* ExecutionEngine.h */, + DE66F25D08ABF03100323D32 /* GenericValue.h */, + ); + path = ExecutionEngine; + sourceTree = ""; + }; + DE66F26E08ABF03200323D32 /* Support */ = { + isa = PBXGroup; + children = ( + DE66F26F08ABF03200323D32 /* .cvsignore */, + DE66F27008ABF03200323D32 /* AIXDataTypesFix.h */, + DE66F27108ABF03200323D32 /* Annotation.h */, + DE66F27208ABF03200323D32 /* CallSite.h */, + DE66F27308ABF03200323D32 /* Casting.h */, + DE66F27408ABF03200323D32 /* CFG.h */, + DE66F27508ABF03200323D32 /* CommandLine.h */, + DE66F27608ABF03200323D32 /* Compressor.h */, + DE66F27708ABF03200323D32 /* ConstantRange.h */, + DE66F27808ABF03200323D32 /* DataTypes.h */, + DE66F27908ABF03200323D32 /* DataTypes.h.in */, + DE66F27A08ABF03200323D32 /* Debug.h */, + DE66F27B08ABF03200323D32 /* DOTGraphTraits.h */, + DE66F27C08ABF03200323D32 /* DynamicLinker.h */, + DE66F27D08ABF03200323D32 /* ELF.h */, + DE66F27E08ABF03200323D32 /* FileUtilities.h */, + DE66F27F08ABF03200323D32 /* GetElementPtrTypeIterator.h */, + DE66F28008ABF03200323D32 /* GraphWriter.h */, + DE66F28108ABF03200323D32 /* InstIterator.h */, + DE66F28208ABF03200323D32 /* InstVisitor.h */, + DE66F28308ABF03200323D32 /* LeakDetector.h */, + DE66F28408ABF03200323D32 /* Mangler.h */, + DE66F28508ABF03200323D32 /* MathExtras.h */, + DE66F28608ABF03200323D32 /* MutexGuard.h */, + DE66F28708ABF03200323D32 /* PassNameParser.h */, + DE66F28808ABF03200323D32 /* PatternMatch.h */, + DE66F28908ABF03200323D32 /* PluginLoader.h */, + DE66F28A08ABF03200323D32 /* SlowOperationInformer.h */, + DE66F28B08ABF03200323D32 /* StableBasicBlockNumbering.h */, + DE66F28C08ABF03200323D32 /* SystemUtils.h */, + DE66F28D08ABF03200323D32 /* ThreadSupport.h */, + DE66F28E08ABF03200323D32 /* Timer.h */, + DE66F28F08ABF03200323D32 /* ToolRunner.h */, + DE66F29008ABF03200323D32 /* type_traits.h */, + DE66F29108ABF03200323D32 /* TypeInfo.h */, + ); + path = Support; + sourceTree = ""; + }; + DE66F29408ABF03200323D32 /* System */ = { + isa = PBXGroup; + children = ( + DE66F29508ABF03200323D32 /* DynamicLibrary.h */, + DE66F29608ABF03200323D32 /* LICENSE.TXT */, + DE66F29708ABF03200323D32 /* MappedFile.h */, + DE66F29808ABF03200323D32 /* Memory.h */, + DE66F29908ABF03200323D32 /* Mutex.h */, + DE66F29A08ABF03200323D32 /* Path.h */, + DE66F29B08ABF03200323D32 /* Process.h */, + DE66F29C08ABF03200323D32 /* Program.h */, + DE66F29D08ABF03200323D32 /* Signals.h */, + DE66F29E08ABF03200323D32 /* TimeValue.h */, + ); + path = System; + sourceTree = ""; + }; + DE66F29F08ABF03200323D32 /* Target */ = { + isa = PBXGroup; + children = ( + DE66F2A008ABF03200323D32 /* MRegisterInfo.h */, + DE66F2A108ABF03200323D32 /* TargetData.h */, + DE66F2A208ABF03200323D32 /* TargetFrameInfo.h */, + DE66F2A308ABF03200323D32 /* TargetInstrInfo.h */, + DE66F2A408ABF03200323D32 /* TargetJITInfo.h */, + DE66F2A508ABF03200323D32 /* TargetLowering.h */, + DE66F2A608ABF03200323D32 /* TargetMachine.h */, + DE66F2A708ABF03200323D32 /* TargetMachineRegistry.h */, + DE66F2A808ABF03200323D32 /* TargetOptions.h */, + DE66F2A908ABF03200323D32 /* TargetSchedInfo.h */, + DE66F2AA08ABF03200323D32 /* TargetSubtarget.h */, + ); + path = Target; + sourceTree = ""; + }; + DE66F2AB08ABF03200323D32 /* Transforms */ = { + isa = PBXGroup; + children = ( + DE66F2AC08ABF03200323D32 /* Instrumentation.h */, + DE66F2AD08ABF03200323D32 /* IPO.h */, + DE66F2AE08ABF03200323D32 /* LinkAllPasses.h */, + DE66F2AF08ABF03200323D32 /* Scalar.h */, + DE66F2B008ABF03200323D32 /* Utils */, + ); + path = Transforms; + sourceTree = ""; + }; + DE66F2B008ABF03200323D32 /* Utils */ = { + isa = PBXGroup; + children = ( + DE66F2B108ABF03200323D32 /* BasicBlockUtils.h */, + DE66F2B208ABF03200323D32 /* Cloning.h */, + DE66F2B308ABF03200323D32 /* FunctionUtils.h */, + DE66F2B408ABF03200323D32 /* Local.h */, + DE66F2B508ABF03200323D32 /* PromoteMemToReg.h */, + DE66F2B608ABF03200323D32 /* UnifyFunctionExitNodes.h */, + ); + path = Utils; + sourceTree = ""; + }; + DE66F2BD08ABF14400323D32 /* tools */ = { + isa = PBXGroup; + children = ( + DE66F2BE08ABF14400323D32 /* analyze */, + DE66F2CB08ABF14400323D32 /* bugpoint */, + DE66F2F008ABF14400323D32 /* gccld */, + DE66F31E08ABF14400323D32 /* llvm-db */, + DE66F33B08ABF14400323D32 /* llvm-ld */, + DE66F36808ABF14500323D32 /* llvmc */, + DE66F2EE08ABF14400323D32 /* gccas.cpp */, + DE66F30008ABF14400323D32 /* llc.cpp */, + DE66F30708ABF14400323D32 /* lli.cpp */, + DE66F30E08ABF14400323D32 /* llvm-ar.cpp */, + DE66F31508ABF14400323D32 /* llvm-as.cpp */, + DE66F31C08ABF14400323D32 /* llvm-bcanalyzer.cpp */, + DE66F33208ABF14400323D32 /* llvm-dis.cpp */, + DE66F33908ABF14400323D32 /* llvm-extract.cpp */, + DE66F34A08ABF14400323D32 /* llvm-link.cpp */, + DE66F35108ABF14400323D32 /* llvm-nm.cpp */, + DE66F35808ABF14500323D32 /* llvm-prof.cpp */, + DE66F35F08ABF14500323D32 /* llvm-ranlib.cpp */, + DE66F38708ABF14500323D32 /* opt.cpp */, + ); + name = tools; + path = ../tools; + sourceTree = SOURCE_ROOT; + }; + DE66F2BE08ABF14400323D32 /* analyze */ = { + isa = PBXGroup; + children = ( + DE66F2BF08ABF14400323D32 /* AnalysisWrappers.cpp */, + DE66F2C008ABF14400323D32 /* analyze.cpp */, + DE66F2C908ABF14400323D32 /* GraphPrinters.cpp */, + ); + path = analyze; + sourceTree = ""; + }; + DE66F2CB08ABF14400323D32 /* bugpoint */ = { + isa = PBXGroup; + children = ( + DE66F2CC08ABF14400323D32 /* BugDriver.cpp */, + DE66F2CD08ABF14400323D32 /* BugDriver.h */, + DE66F2CE08ABF14400323D32 /* bugpoint.cpp */, + DE66F2CF08ABF14400323D32 /* CrashDebugger.cpp */, + DE66F2E208ABF14400323D32 /* ExecutionDriver.cpp */, + DE66F2E308ABF14400323D32 /* ExtractFunction.cpp */, + DE66F2E408ABF14400323D32 /* ListReducer.h */, + DE66F2E608ABF14400323D32 /* Miscompilation.cpp */, + DE66F2E708ABF14400323D32 /* OptimizerDriver.cpp */, + DE66F2E808ABF14400323D32 /* TestPasses.cpp */, + ); + path = bugpoint; + sourceTree = ""; + }; + DE66F2F008ABF14400323D32 /* gccld */ = { + isa = PBXGroup; + children = ( + DE66F2F708ABF14400323D32 /* gccld.cpp */, + DE66F2F808ABF14400323D32 /* gccld.h */, + DE66F2F908ABF14400323D32 /* GenerateCode.cpp */, + ); + path = gccld; + sourceTree = ""; + }; + DE66F31E08ABF14400323D32 /* llvm-db */ = { + isa = PBXGroup; + children = ( + DE66F31F08ABF14400323D32 /* CLICommand.h */, + DE66F32008ABF14400323D32 /* CLIDebugger.cpp */, + DE66F32108ABF14400323D32 /* CLIDebugger.h */, + DE66F32208ABF14400323D32 /* Commands.cpp */, + DE66F32B08ABF14400323D32 /* llvm-db.cpp */, + ); + path = "llvm-db"; + sourceTree = ""; + }; + DE66F33B08ABF14400323D32 /* llvm-ld */ = { + isa = PBXGroup; + children = ( + DE66F34208ABF14400323D32 /* llvm-ld.cpp */, + DE66F34408ABF14400323D32 /* Optimize.cpp */, + ); + path = "llvm-ld"; + sourceTree = ""; + }; + DE66F36808ABF14500323D32 /* llvmc */ = { + isa = PBXGroup; + children = ( + DE66F36908ABF14500323D32 /* c */, + DE66F36A08ABF14500323D32 /* CompilerDriver.cpp */, + DE66F36B08ABF14500323D32 /* CompilerDriver.h */, + DE66F36C08ABF14500323D32 /* ConfigLexer.cpp */, + DE66F36D08ABF14500323D32 /* ConfigLexer.h */, + DE66F36E08ABF14500323D32 /* ConfigLexer.l */, + DE66F36F08ABF14500323D32 /* Configuration.cpp */, + DE66F37008ABF14500323D32 /* Configuration.h */, + DE66F37108ABF14500323D32 /* cpp */, + DE66F37D08ABF14500323D32 /* ll */, + DE66F37E08ABF14500323D32 /* llvmc.cpp */, + ); + path = llvmc; + sourceTree = ""; + }; + DE66F38D08ABF35C00323D32 /* docs */ = { + isa = PBXGroup; + children = ( + DE66F38E08ABF35C00323D32 /* .cvsignore */, + DE66F38F08ABF35C00323D32 /* AliasAnalysis.html */, + DE66F39008ABF35C00323D32 /* Bugpoint.html */, + DE66F39108ABF35C00323D32 /* BytecodeFormat.html */, + DE66F39208ABF35C00323D32 /* CFEBuildInstrs.html */, + DE66F39308ABF35C00323D32 /* CodeGenerator.html */, + DE66F39408ABF35C00323D32 /* CodingStandards.html */, + DE66F39508ABF35C00323D32 /* CommandGuide */, + DE66F3B908ABF35D00323D32 /* CommandLine.html */, + DE66F3BA08ABF35D00323D32 /* CompilerDriver.html */, + DE66F3BB08ABF35D00323D32 /* CompilerWriterInfo.html */, + DE66F3BC08ABF35D00323D32 /* doxygen.cfg */, + DE66F3BD08ABF35D00323D32 /* doxygen.cfg.in */, + DE66F3BE08ABF35D00323D32 /* doxygen.css */, + DE66F3BF08ABF35D00323D32 /* doxygen.footer */, + DE66F3C008ABF35D00323D32 /* doxygen.header */, + DE66F3C108ABF35D00323D32 /* doxygen.intro */, + DE66F3C208ABF35D00323D32 /* ExtendingLLVM.html */, + DE66F3C308ABF35D00323D32 /* FAQ.html */, + DE66F3C408ABF35D00323D32 /* GarbageCollection.html */, + DE66F3C508ABF35D00323D32 /* GettingStarted.html */, + DE66F3C608ABF35D00323D32 /* GettingStartedVS.html */, + DE66F3E408ABF35D00323D32 /* HowToSubmitABug.html */, + DE66F3E508ABF35D00323D32 /* img */, + DE66F3EB08ABF35D00323D32 /* index.html */, + DE66F3EC08ABF35D00323D32 /* LangRef.html */, + DE66F3ED08ABF35D00323D32 /* Lexicon.html */, + DE66F3EE08ABF35D00323D32 /* llvm.css */, + DE66F3EF08ABF35D00323D32 /* LLVMVsTheWorld.html */, + DE66F3F108ABF35D00323D32 /* MakefileGuide.html */, + DE66F3F208ABF35D00323D32 /* ProgrammersManual.html */, + DE66F3F308ABF35D00323D32 /* Projects.html */, + DE66F3F408ABF35D00323D32 /* ReleaseNotes.html */, + DE66F3F508ABF35D00323D32 /* SourceLevelDebugging.html */, + DE66F3F608ABF35D00323D32 /* Stacker.html */, + DE66F3F708ABF35D00323D32 /* SystemLibrary.html */, + DE66F3F808ABF35D00323D32 /* TableGenFundamentals.html */, + DE66F3F908ABF35D00323D32 /* TestingGuide.html */, + DE66F3FA08ABF35D00323D32 /* UsingLibraries.html */, + DE66F3FB08ABF35D00323D32 /* WritingAnLLVMBackend.html */, + DE66F3FC08ABF35D00323D32 /* WritingAnLLVMPass.html */, + ); + name = docs; + path = ../docs; + sourceTree = SOURCE_ROOT; + }; + DE66F39508ABF35C00323D32 /* CommandGuide */ = { + isa = PBXGroup; + children = ( + DE66F39608ABF35C00323D32 /* .cvsignore */, + DE66F39708ABF35C00323D32 /* analyze.pod */, + DE66F39808ABF35C00323D32 /* bugpoint.pod */, + DE66F39908ABF35C00323D32 /* gccas.pod */, + DE66F39A08ABF35C00323D32 /* gccld.pod */, + DE66F39E08ABF35C00323D32 /* index.html */, + DE66F39F08ABF35C00323D32 /* llc.pod */, + DE66F3A008ABF35C00323D32 /* lli.pod */, + DE66F3A108ABF35C00323D32 /* llvm-ar.pod */, + DE66F3A208ABF35C00323D32 /* llvm-as.pod */, + DE66F3A308ABF35C00323D32 /* llvm-bcanalyzer.pod */, + DE66F3A408ABF35C00323D32 /* llvm-db.pod */, + DE66F3A508ABF35C00323D32 /* llvm-dis.pod */, + DE66F3A608ABF35C00323D32 /* llvm-extract.pod */, + DE66F3A708ABF35C00323D32 /* llvm-ld.pod */, + DE66F3A808ABF35C00323D32 /* llvm-link.pod */, + DE66F3A908ABF35C00323D32 /* llvm-nm.pod */, + DE66F3AA08ABF35C00323D32 /* llvm-prof.pod */, + DE66F3AB08ABF35C00323D32 /* llvm-ranlib.pod */, + DE66F3AC08ABF35C00323D32 /* llvmc.pod */, + DE66F3AD08ABF35C00323D32 /* llvmgcc.pod */, + DE66F3AE08ABF35C00323D32 /* llvmgxx.pod */, + DE66F3AF08ABF35C00323D32 /* Makefile */, + DE66F3B408ABF35D00323D32 /* manpage.css */, + DE66F3B508ABF35D00323D32 /* opt.pod */, + DE66F3B808ABF35D00323D32 /* stkrc.pod */, + ); + path = CommandGuide; + sourceTree = ""; + }; + DE66F3E508ABF35D00323D32 /* img */ = { + isa = PBXGroup; + children = ( + DE66F3E608ABF35D00323D32 /* Debugging.gif */, + DE66F3E708ABF35D00323D32 /* libdeps.gif */, + DE66F3E808ABF35D00323D32 /* lines.gif */, + DE66F3E908ABF35D00323D32 /* objdeps.gif */, + DE66F3EA08ABF35D00323D32 /* venusflytrap.jpg */, + ); + path = img; + sourceTree = ""; + }; + DE66F3FD08ABF37000323D32 /* examples */ = { + isa = PBXGroup; + children = ( + DE66F3FF08ABF37000323D32 /* BFtoLLVM.cpp */, + DE66F40E08ABF37000323D32 /* fibonacci.cpp */, + DE66F41508ABF37000323D32 /* HowToUseJIT.cpp */, + DE66F41E08ABF37000323D32 /* ModuleMaker.cpp */, + DE66F42608ABF37000323D32 /* ParallelJIT.cpp */, + ); + name = examples; + path = ../examples; + sourceTree = SOURCE_ROOT; + }; + /* End PBXGroup section */ + + /* Begin PBXLegacyTarget section */ + D28A88AD04BDD90700651E21 /* LLVM */ = { + isa = PBXLegacyTarget; + buildArgumentsString = "$(ACTION)"; + buildConfigurationList = DE66EC4C08ABE78900323D32 /* Build configuration list for PBXLegacyTarget "LLVM" */; + buildPhases = ( + ); + buildSettings = { + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + PRODUCT_NAME = LLVM; + }; + buildToolPath = /usr/bin/make; + buildWorkingDirectory = ..; + dependencies = ( + ); + name = LLVM; + passBuildSettingsInEnvironment = 1; + productName = LLVM; + }; + /* End PBXLegacyTarget section */ + + /* Begin PBXProject section */ + 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 = ""; + targets = ( + D28A88AD04BDD90700651E21 /* LLVM */, + ); + }; + /* End PBXProject section */ + + /* Begin XCBuildConfiguration section */ + DE66EC4D08ABE78900323D32 /* Debug */ = { + isa = XCBuildConfiguration; + 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"; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + PRODUCT_NAME = LLVM; + ZERO_LINK = YES; + }; + name = Debug; + }; + DE66EC4E08ABE78900323D32 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + ENABLE_OPTIMIZED = 1; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + PRODUCT_NAME = LLVM; + ZERO_LINK = NO; + }; + name = Release; + }; + DE66EC4F08ABE78900323D32 /* Default */ = { + isa = XCBuildConfiguration; + buildSettings = { + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + PRODUCT_NAME = LLVM; + }; + name = Default; + }; + DE66EC5108ABE78900323D32 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + }; + name = Debug; + }; + DE66EC5208ABE78900323D32 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + }; + name = Release; + }; + DE66EC5308ABE78900323D32 /* Default */ = { + isa = XCBuildConfiguration; + buildSettings = { + }; + name = Default; + }; + /* End XCBuildConfiguration section */ + + /* Begin XCConfigurationList section */ + DE66EC4C08ABE78900323D32 /* Build configuration list for PBXLegacyTarget "LLVM" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DE66EC4D08ABE78900323D32 /* Debug */, + DE66EC4E08ABE78900323D32 /* Release */, + DE66EC4F08ABE78900323D32 /* Default */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Default; + }; + DE66EC5008ABE78900323D32 /* Build configuration list for PBXProject "LLVM" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DE66EC5108ABE78900323D32 /* Debug */, + DE66EC5208ABE78900323D32 /* Release */, + DE66EC5308ABE78900323D32 /* Default */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Default; + }; + /* End XCConfigurationList section */ + }; + rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; + } From jlaskey at apple.com Thu Aug 11 18:00:22 2005 From: jlaskey at apple.com (Jim Laskey) Date: Thu, 11 Aug 2005 20:00:22 -0300 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Message-ID: Changes in directory llvm/lib/Target/PowerPC: PPC32ISelPattern.cpp updated: 1.134 -> 1.135 --- Log message: 1. Added the function isOpcWithIntImmediate to simplify testing of operand with specified opcode and an integer constant right operand. 2. Modified ISD::SHL, ISD::SRL, ISD::SRA to use rlwinm when applied after a mask. Test Cases ========== int %test6(int %a) { entry: %tmp.1 = and int %a, 65280 ; [#uses=1] %tmp.2 = shr int %tmp.1, ubyte 8 ; [#uses=1] ret int %tmp.2 } uint %test7(uint %a) { entry: %tmp.1 = and uint %a, 65280 ; [#uses=1] %tmp.2 = shr uint %tmp.1, ubyte 8 ; [#uses=1] ret uint %tmp.2 } int %test8(int %a) { entry: %tmp.1 = and int %a, 16711680 ; [#uses=1] %tmp.2 = shl int %tmp.1, ubyte 8 ; [#uses=1] ret int %tmp.2 } Old Result ========== .text .align 2 .globl _test6 _test6: .LBB_test6_0: ; entry rlwinm r2, r3, 0, 16, 23 srawi r3, r2, 8 blr .text .align 2 .globl _test7 _test7: .LBB_test7_0: ; entry rlwinm r2, r3, 0, 16, 23 srwi r3, r2, 8 blr .text .align 2 .globl _test8 _test8: .LBB_test8_0: ; entry rlwinm r2, r3, 0, 8, 15 slwi r3, r2, 8 blr New Result ========== .text .align 2 .globl _test6 _test6: .LBB_test6_0: ; entry rlwinm r3, r3, 24, 24, 31 blr .text .align 2 .globl _test7 _test7: .LBB_test7_0: ; entry rlwinm r3, r3, 24, 24, 31 blr .text .align 2 .globl _test8 _test8: .LBB_test8_0: ; entry rlwinm r3, r3, 8, 0, 7 blr --- Diffs of the changes: (+40 -9) PPC32ISelPattern.cpp 1 files changed, 40 insertions(+), 9 deletions(-) Index: lib/Target/PowerPC/PPC32ISelPattern.cpp =================================================================== RCS file: /var/cvs/llvm/llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp,v retrieving revision 1.134 diff -u -d -b -w -r1.134 PPC32ISelPattern.cpp --- lib/Target/PowerPC/PPC32ISelPattern.cpp 11 Aug 2005 17:56:50 -0000 1.134 +++ lib/Target/PowerPC/PPC32ISelPattern.cpp 11 Aug 2005 21:48:56 -0000 @@ -664,6 +664,13 @@ return false; } +// isOpcWithIntImmediate - This method tests to see if the node is a specific +// opcode and that it has a immediate integer right operand. +// If so Imm will receive the 32 bit value. +static bool isOpcWithIntImmediate(SDOperand N, unsigned Opc, unsigned& Imm) { + return N.getOpcode() == Opc && isIntImmediate(N.getOperand(1), Imm); +} + // isOprShiftImm - Returns true if the specified operand is a shift opcode with // a immediate shift count less than 32. static bool isOprShiftImm(SDOperand N, unsigned& Opc, unsigned& SH) { @@ -675,8 +682,7 @@ // isOprNot - Returns true if the specified operand is an xor with immediate -1. static bool isOprNot(SDOperand N) { unsigned Imm; - return N.getOpcode() == ISD::XOR && - isIntImmediate(N.getOperand(1), Imm) && (signed)Imm == -1; + return isOpcWithIntImmediate(N, ISD::XOR, Imm) && (signed)Imm == -1; } // Immediate constant composers. @@ -1089,10 +1095,8 @@ /// wider than the implicit mask, then we can get rid of the AND and let the /// shift do the mask. unsigned ISel::FoldIfWideZeroExtend(SDOperand N) { - unsigned C, MB, ME; - if (N.getOpcode() == ISD::AND && - isIntImmediate(N.getOperand(1), C) && isRunOfOnes(C, MB, ME) && - MB <= 26 && ME == 31) + unsigned C; + if (isOpcWithIntImmediate(N, ISD::AND, C) && isMask_32(C) && C > 63) return SelectExpr(N.getOperand(0)); else return SelectExpr(N); @@ -1580,35 +1584,62 @@ return Result; case ISD::SHL: - Tmp1 = SelectExpr(N.getOperand(0)); if (isIntImmediate(N.getOperand(1), Tmp2)) { + unsigned SH, MB, ME; + if (isOpcWithIntImmediate(N.getOperand(0), ISD::AND, Tmp3) && + isRotateAndMask(ISD::SHL, Tmp2, Tmp3, true, SH, MB, ME)) { + Tmp1 = SelectExpr(N.getOperand(0).getOperand(0)); + BuildMI(BB, PPC::RLWINM, 4, Result).addReg(Tmp1).addImm(SH) + .addImm(MB).addImm(ME); + return Result; + } + Tmp1 = SelectExpr(N.getOperand(0)); Tmp2 &= 0x1F; BuildMI(BB, PPC::RLWINM, 4, Result).addReg(Tmp1).addImm (Tmp2).addImm(0) .addImm(31-Tmp2); } else { + Tmp1 = SelectExpr(N.getOperand(0)); Tmp2 = FoldIfWideZeroExtend(N.getOperand(1)); BuildMI(BB, PPC::SLW, 2, Result).addReg(Tmp1).addReg(Tmp2); } return Result; case ISD::SRL: - Tmp1 = SelectExpr(N.getOperand(0)); if (isIntImmediate(N.getOperand(1), Tmp2)) { + unsigned SH, MB, ME; + if (isOpcWithIntImmediate(N.getOperand(0), ISD::AND, Tmp3) && + isRotateAndMask(ISD::SRL, Tmp2, Tmp3, true, SH, MB, ME)) { + Tmp1 = SelectExpr(N.getOperand(0).getOperand(0)); + BuildMI(BB, PPC::RLWINM, 4, Result).addReg(Tmp1).addImm(SH) + .addImm(MB).addImm(ME); + return Result; + } + Tmp1 = SelectExpr(N.getOperand(0)); Tmp2 &= 0x1F; BuildMI(BB, PPC::RLWINM, 4, Result).addReg(Tmp1).addImm(32-Tmp2) .addImm(Tmp2).addImm(31); } else { + Tmp1 = SelectExpr(N.getOperand(0)); Tmp2 = FoldIfWideZeroExtend(N.getOperand(1)); BuildMI(BB, PPC::SRW, 2, Result).addReg(Tmp1).addReg(Tmp2); } return Result; case ISD::SRA: - Tmp1 = SelectExpr(N.getOperand(0)); if (isIntImmediate(N.getOperand(1), Tmp2)) { + unsigned SH, MB, ME; + if (isOpcWithIntImmediate(N.getOperand(0), ISD::AND, Tmp3) && + isRotateAndMask(ISD::SRA, Tmp2, Tmp3, true, SH, MB, ME)) { + Tmp1 = SelectExpr(N.getOperand(0).getOperand(0)); + BuildMI(BB, PPC::RLWINM, 4, Result).addReg(Tmp1).addImm(SH) + .addImm(MB).addImm(ME); + return Result; + } + Tmp1 = SelectExpr(N.getOperand(0)); Tmp2 &= 0x1F; BuildMI(BB, PPC::SRAWI, 2, Result).addReg(Tmp1).addImm(Tmp2); } else { + Tmp1 = SelectExpr(N.getOperand(0)); Tmp2 = FoldIfWideZeroExtend(N.getOperand(1)); BuildMI(BB, PPC::SRAW, 2, Result).addReg(Tmp1).addReg(Tmp2); } From jlaskey at apple.com Thu Aug 11 18:00:24 2005 From: jlaskey at apple.com (Jim Laskey) Date: Thu, 11 Aug 2005 20:00:24 -0300 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/PowerPC/rlwinm.ll Message-ID: <7E550744-67DB-41BD-A956-C852E1510A34@apple.com> Changes in directory llvm/test/Regression/CodeGen/PowerPC/rlwinm.ll rlwinm.ll: 1.2 -> 1.3 --- Log message: 1. Changed the tests to guarantee that only rlwinm instructions are generated. Test Cases ========== int %test6(int %a) { entry: %tmp.1 = and int %a, 65280 ; [#uses=1] %tmp.2 = shr int %tmp.1, ubyte 8 ; [#uses=1] ret int %tmp.2 } uint %test7(uint %a) { entry: %tmp.1 = and uint %a, 65280 ; [#uses=1] %tmp.2 = shr uint %tmp.1, ubyte 8 ; [#uses=1] ret uint %tmp.2 } int %test8(int %a) { entry: %tmp.1 = and int %a, 16711680 ; [#uses=1] %tmp.2 = shl int %tmp.1, ubyte 8 ; [#uses=1] ret int %tmp.2 } Old Result ========== .text .align 2 .globl _test6 _test6: .LBB_test6_0: ; entry rlwinm r2, r3, 0, 16, 23 srawi r3, r2, 8 blr .text .align 2 .globl _test7 _test7: .LBB_test7_0: ; entry rlwinm r2, r3, 0, 16, 23 srwi r3, r2, 8 blr .text .align 2 .globl _test8 _test8: .LBB_test8_0: ; entry rlwinm r2, r3, 0, 8, 15 slwi r3, r2, 8 blr New Result ========== .text .align 2 .globl _test6 _test6: .LBB_test6_0: ; entry rlwinm r3, r3, 24, 24, 31 blr .text .align 2 .globl _test7 _test7: .LBB_test7_0: ; entry rlwinm r3, r3, 24, 24, 31 blr .text .align 2 .globl _test8 _test8: .LBB_test8_0: ; entry rlwinm r3, r3, 8, 0, 7 blr --- Diffs of the changes: (+3 -0) PPC32ISelPattern.cpp 1 files changed, 3 insertions(+), 0 deletions(-) Index: test/Regression/CodeGen/PowerPC/rlwinm.ll =================================================================== RCS file: /var/cvs/llvm/llvm/test/Regression/CodeGen/PowerPC/rlwinm.ll,v retrieving revision 1.2 diff -u -d -b -w -r1.2 rlwinm.ll --- test/Regression/CodeGen/PowerPC/rlwinm.ll 9 Aug 2005 20:24:16 -0000 1.2 +++ test/Regression/CodeGen/PowerPC/rlwinm.ll 11 Aug 2005 21:48:56 -0000 @@ -1,5 +1,8 @@ ; All of these ands and shifts should be folded into rlwimi's ; RUN: llvm-as < rlwinm.ll | llc -march=ppc32 | not grep and && +; RUN: llvm-as < rlwinm.ll | llc -march=ppc32 | not grep srawi && +; RUN: llvm-as < rlwinm.ll | llc -march=ppc32 | not grep srwi && +; RUN: llvm-as < rlwinm.ll | llc -march=ppc32 | not grep slwi && ; RUN: llvm-as < rlwinm.ll | llc -march=ppc32 | grep rlwinm | wc -l | grep 8 From alenhar2 at cs.uiuc.edu Fri Aug 12 10:30:25 2005 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Fri, 12 Aug 2005 10:30:25 -0500 Subject: [llvm-commits] Re: llvm-commits Digest, Vol 14, Issue 18 In-Reply-To: <200508111700.j7BH0KT0018883@dcs-maillist.cs.uiuc.edu> References: <200508111700.j7BH0KT0018883@dcs-maillist.cs.uiuc.edu> Message-ID: <1123860625.21114.3.camel@narya.cs.uiuc.edu> > Message: 10 > Date: Wed, 10 Aug 2005 21:18:27 -0500 > From: Nate Begeman > Subject: [llvm-commits] CVS: > llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp > To: llvm-commits at cs.uiuc.edu > Message-ID: <200508110218.VAA28747 at zion.cs.uiuc.edu> > > > > Changes in directory llvm/lib/CodeGen/SelectionDAG: > > SelectionDAG.cpp updated: 1.135 -> 1.136 > --- > Log message: > > Add a select_cc optimization for recognizing abs(int). This speeds up an > integer MPEG encoding loop by a factor of two. 1) Should this be replicated in select? 2) What warrents select_cc being its own node? > > --- > Diffs of the changes: (+16 -0) > > SelectionDAG.cpp | 16 ++++++++++++++++ > 1 files changed, 16 insertions(+) > > > Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp > diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.135 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.136 > --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.135 Wed Aug 10 20:12:20 2005 > +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Wed Aug 10 21:18:13 2005 > @@ -1495,6 +1495,22 @@ > return getNode(ISD::AND, AType, Shift, N3); > } > } > + > + // Check to see if this is an integer abs. select_cc setl[te] X, 0, -X, X -> > + // Y = sra (X, size(X)-1); xor (add (X, Y), Y) > + if (N2C && N2C->isNullValue() && (CC == ISD::SETLT || CC == ISD::SETLE) && > + N1 == N4 && N3.getOpcode() == ISD::SUB && N1 == N3.getOperand(1)) { > + if (ConstantSDNode *SubC = dyn_cast(N3.getOperand(0))) { > + MVT::ValueType XType = N1.getValueType(); > + if (SubC->isNullValue() && MVT::isInteger(XType)) { > + SDOperand Shift = getNode(ISD::SRA, XType, N1, > + getConstant(MVT::getSizeInBits(XType)-1, > + TLI.getShiftAmountTy())); > + return getNode(ISD::XOR, XType, getNode(ISD::ADD, XType, N1, Shift), > + Shift); > + } > + } > + } > } > > std::vector Ops; > > > > > > ------------------------------ > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > > > End of llvm-commits Digest, Vol 14, Issue 18 > ******************************************** -- Andrew Lenharth -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20050812/5d9f7513/attachment.bin From alenhar2 at cs.uiuc.edu Fri Aug 12 11:13:59 2005 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Fri, 12 Aug 2005 11:13:59 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp Message-ID: <200508121613.LAA23353@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/Alpha: AlphaAsmPrinter.cpp updated: 1.18 -> 1.19 --- Log message: .section cleanup, patch from Nicholas Riley --- Diffs of the changes: (+3 -3) AlphaAsmPrinter.cpp | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp diff -u llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.18 llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.19 --- llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.18 Fri Jul 22 15:52:16 2005 +++ llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp Fri Aug 12 11:13:43 2005 @@ -222,7 +222,7 @@ if (CP.empty()) return; - SwitchSection(O, "section .rodata"); + SwitchSection(O, "rodata"); for (unsigned i = 0, e = CP.size(); i != e; ++i) { // SwitchSection(O, "section .rodata, \"dr\""); emitAlignment(TD.getTypeAlignmentShift(CP[i]->getType())); @@ -252,7 +252,7 @@ if (CurSection != NewSection) { CurSection = NewSection; if (!CurSection.empty()) - OS << "\t." << NewSection << "\n"; + OS << "\t.section ." << NewSection << "\n"; } } @@ -297,7 +297,7 @@ // FALL THROUGH case GlobalValue::InternalLinkage: if (C->isNullValue()) - SwitchSection(O, "bss"); //was .bss + SwitchSection(O, "bss"); else SwitchSection(O, "data"); break; From alenhar2 at cs.uiuc.edu Fri Aug 12 11:14:20 2005 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Fri, 12 Aug 2005 11:14:20 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaInstrInfo.td Message-ID: <200508121614.LAA23580@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/Alpha: AlphaInstrInfo.td updated: 1.56 -> 1.57 --- Log message: match gcc's use of tabs, makes diffs easier --- Diffs of the changes: (+17 -17) AlphaInstrInfo.td | 34 +++++++++++++++++----------------- 1 files changed, 17 insertions(+), 17 deletions(-) Index: llvm/lib/Target/Alpha/AlphaInstrInfo.td diff -u llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.56 llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.57 --- llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.56 Mon Aug 1 15:06:01 2005 +++ llvm/lib/Target/Alpha/AlphaInstrInfo.td Fri Aug 12 11:14:08 2005 @@ -299,36 +299,36 @@ //Loads, int, Rellocated Low form -def LDLr : MForm<0x28, "ldl $RA,$DISP($RB) !gprellow">; // Load sign-extended longword -def LDQr : MForm<0x29, "ldq $RA,$DISP($RB) !gprellow">; //Load quadword -def LDBUr : MForm<0x0A, "ldbu $RA,$DISP($RB) !gprellow">; //Load zero-extended byte -def LDWUr : MForm<0x0C, "ldwu $RA,$DISP($RB) !gprellow">; //Load zero-extended word +def LDLr : MForm<0x28, "ldl $RA,$DISP($RB)\t\t!gprellow">; // Load sign-extended longword +def LDQr : MForm<0x29, "ldq $RA,$DISP($RB)\t\t!gprellow">; //Load quadword +def LDBUr : MForm<0x0A, "ldbu $RA,$DISP($RB)\t\t!gprellow">; //Load zero-extended byte +def LDWUr : MForm<0x0C, "ldwu $RA,$DISP($RB)\t\t!gprellow">; //Load zero-extended word //Loads, float, Rellocated Low form -def LDSr : MForm<0x22, "lds $RA,$DISP($RB) !gprellow">; //Load S_floating -def LDTr : MForm<0x23, "ldt $RA,$DISP($RB) !gprellow">; //Load T_floating +def LDSr : MForm<0x22, "lds $RA,$DISP($RB)\t\t!gprellow">; //Load S_floating +def LDTr : MForm<0x23, "ldt $RA,$DISP($RB)\t\t!gprellow">; //Load T_floating //Load address, rellocated low and high form -def LDAr : MForm<0x08, "lda $RA,$DISP($RB) !gprellow">; //Load address -def LDAHr : MForm<0x09, "ldah $RA,$DISP($RB) !gprelhigh">; //Load address high +def LDAr : MForm<0x08, "lda $RA,$DISP($RB)\t\t!gprellow">; //Load address +def LDAHr : MForm<0x09, "ldah $RA,$DISP($RB)\t\t!gprelhigh">; //Load address high //load address, rellocated gpdist form -def LDAg : MgForm<0x08, "lda $RA,0($RB) !gpdisp!$NUM">; //Load address -def LDAHg : MgForm<0x09, "ldah $RA,0($RB) !gpdisp!$NUM">; //Load address +def LDAg : MgForm<0x08, "lda $RA,0($RB)\t\t!gpdisp!$NUM">; //Load address +def LDAHg : MgForm<0x09, "ldah $RA,0($RB)\t\t!gpdisp!$NUM">; //Load address //Load quad, rellocated literal form -def LDQl : MForm<0x29, "ldq $RA,$DISP($RB) !literal">; //Load quadword +def LDQl : MForm<0x29, "ldq $RA,$DISP($RB)\t\t!literal">; //Load quadword //Stores, int -def STBr : MForm<0x0E, "stb $RA,$DISP($RB) !gprellow">; // Store byte -def STWr : MForm<0x0D, "stw $RA,$DISP($RB) !gprellow">; // Store word -def STLr : MForm<0x2C, "stl $RA,$DISP($RB) !gprellow">; // Store longword -def STQr : MForm<0x2D, "stq $RA,$DISP($RB) !gprellow">; //Store quadword +def STBr : MForm<0x0E, "stb $RA,$DISP($RB)\t\t!gprellow">; // Store byte +def STWr : MForm<0x0D, "stw $RA,$DISP($RB)\t\t!gprellow">; // Store word +def STLr : MForm<0x2C, "stl $RA,$DISP($RB)\t\t!gprellow">; // Store longword +def STQr : MForm<0x2D, "stq $RA,$DISP($RB)\t\t!gprellow">; //Store quadword //Stores, float -def STSr : MForm<0x26, "sts $RA,$DISP($RB) !gprellow">; //Store S_floating -def STTr : MForm<0x27, "stt $RA,$DISP($RB) !gprellow">; //Store T_floating +def STSr : MForm<0x26, "sts $RA,$DISP($RB)\t\t!gprellow">; //Store S_floating +def STTr : MForm<0x27, "stt $RA,$DISP($RB)\t\t!gprellow">; //Store T_floating //Branches, int From sabre at nondot.org Fri Aug 12 11:26:50 2005 From: sabre at nondot.org (Chris Lattner) Date: Fri, 12 Aug 2005 11:26:50 -0500 (CDT) Subject: [llvm-commits] Re: llvm-commits Digest, Vol 14, Issue 18 In-Reply-To: <1123860625.21114.3.camel@narya.cs.uiuc.edu> References: <200508111700.j7BH0KT0018883@dcs-maillist.cs.uiuc.edu> <1123860625.21114.3.camel@narya.cs.uiuc.edu> Message-ID: On Fri, 12 Aug 2005, Andrew Lenharth wrote: >> Add a select_cc optimization for recognizing abs(int). This speeds up an >> integer MPEG encoding loop by a factor of two. > > 1) Should this be replicated in select? Yes, this is on Nate's todo list. :) > 2) What warrents select_cc being its own node? It fits the target semantics of PPC and X86 more closely. PPC for example doesn't have either setcc or select, but does can do selectcc in most cases. X86 doesn't have select, but does have setcc and select_cc. -Chris >> Diffs of the changes: (+16 -0) >> >> SelectionDAG.cpp | 16 ++++++++++++++++ >> 1 files changed, 16 insertions(+) >> >> >> Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp >> diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.135 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.136 >> --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.135 Wed Aug 10 20:12:20 2005 >> +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Wed Aug 10 21:18:13 2005 >> @@ -1495,6 +1495,22 @@ >> return getNode(ISD::AND, AType, Shift, N3); >> } >> } >> + >> + // Check to see if this is an integer abs. select_cc setl[te] X, 0, -X, X -> >> + // Y = sra (X, size(X)-1); xor (add (X, Y), Y) >> + if (N2C && N2C->isNullValue() && (CC == ISD::SETLT || CC == ISD::SETLE) && >> + N1 == N4 && N3.getOpcode() == ISD::SUB && N1 == N3.getOperand(1)) { >> + if (ConstantSDNode *SubC = dyn_cast(N3.getOperand(0))) { >> + MVT::ValueType XType = N1.getValueType(); >> + if (SubC->isNullValue() && MVT::isInteger(XType)) { >> + SDOperand Shift = getNode(ISD::SRA, XType, N1, >> + getConstant(MVT::getSizeInBits(XType)-1, >> + TLI.getShiftAmountTy())); >> + return getNode(ISD::XOR, XType, getNode(ISD::ADD, XType, N1, Shift), >> + Shift); >> + } >> + } >> + } >> } >> >> std::vector Ops; >> >> >> >> >> >> ------------------------------ >> >> _______________________________________________ >> llvm-commits mailing list >> llvm-commits at cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits >> >> >> End of llvm-commits Digest, Vol 14, Issue 18 >> ******************************************** > -Chris -- http://nondot.org/sabre/ http://llvm.org/ From lattner at cs.uiuc.edu Fri Aug 12 16:58:23 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 12 Aug 2005 16:58:23 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp Message-ID: <200508122158.QAA08524@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Utils: BreakCriticalEdges.cpp updated: 1.26 -> 1.27 --- Log message: Change break critical edges to not remove, then insert, PHI node entries. Instead, just update the BB in-place. This is both faster, and it prevents split-critical-edges from shuffling the PHI argument list unneccesarily. --- Diffs of the changes: (+2 -2) BreakCriticalEdges.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp diff -u llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp:1.26 llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp:1.27 --- llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp:1.26 Thu Apr 21 18:45:33 2005 +++ llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp Fri Aug 12 16:58:07 2005 @@ -124,8 +124,8 @@ // We no longer enter through TIBB, now we come in through NewBB. Revector // exactly one entry in the PHI node that used to come from TIBB to come // from NewBB. - Value *InVal = PN->removeIncomingValue(TIBB, false); - PN->addIncoming(InVal, NewBB); + int BBIdx = PN->getBasicBlockIndex(TIBB); + PN->setIncomingBlock(BBIdx, NewBB); } // If we don't have a pass object, we can't update anything... From lattner at cs.uiuc.edu Fri Aug 12 17:06:22 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 12 Aug 2005 17:06:22 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Message-ID: <200508122206.RAA08660@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: LoopStrengthReduce.cpp updated: 1.47 -> 1.48 --- Log message: Fix a FIXME: if we are inserting code for a PHI argument, split the critical edge so that the code is not always executed for both operands. This prevents LSR from inserting code into loops whose exit blocks contain PHI uses of IV expressions (which are outside of loops). On gzip, for example, we turn this ugly code: .LBB_test_1: ; loopentry add r27, r3, r28 lhz r27, 3(r27) add r26, r4, r28 lhz r26, 3(r26) add r25, r30, r28 ;; Only live if exiting the loop add r24, r29, r28 ;; Only live if exiting the loop cmpw cr0, r27, r26 bne .LBB_test_5 ; loopexit into this: .LBB_test_1: ; loopentry or r27, r28, r28 add r28, r3, r27 lhz r28, 3(r28) add r26, r4, r27 lhz r26, 3(r26) cmpw cr0, r28, r26 beq .LBB_test_3 ; shortcirc_next.0 .LBB_test_2: ; loopentry.loopexit_crit_edge add r2, r30, r27 add r8, r29, r27 b .LBB_test_9 ; loopexit .LBB_test_2: ; shortcirc_next.0 ... blt .LBB_test_1 into this: .LBB_test_1: ; loopentry or r27, r28, r28 add r28, r3, r27 lhz r28, 3(r28) add r26, r4, r27 lhz r26, 3(r26) cmpw cr0, r28, r26 beq .LBB_test_3 ; shortcirc_next.0 .LBB_test_2: ; loopentry.loopexit_crit_edge add r2, r30, r27 add r8, r29, r27 b .LBB_t_3: ; shortcirc_next.0 .LBB_test_3: ; shortcirc_next.0 ... blt .LBB_test_1 Next step: get the block out of the loop so that the loop is all fall-throughs again. --- Diffs of the changes: (+19 -6) LoopStrengthReduce.cpp | 25 +++++++++++++++++++------ 1 files changed, 19 insertions(+), 6 deletions(-) Index: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp diff -u llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.47 llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.48 --- llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.47 Tue Aug 9 19:45:21 2005 +++ llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Fri Aug 12 17:06:11 2005 @@ -26,6 +26,7 @@ #include "llvm/Analysis/ScalarEvolutionExpander.h" #include "llvm/Support/CFG.h" #include "llvm/Support/GetElementPtrTypeIterator.h" +#include "llvm/Transforms/Utils/BasicBlockUtils.h" #include "llvm/Transforms/Utils/Local.h" #include "llvm/Target/TargetData.h" #include "llvm/ADT/Statistic.h" @@ -391,7 +392,7 @@ // operands of Inst to use the new expression 'NewBase', with 'Imm' added // to it. void RewriteInstructionToUseNewBase(const SCEVHandle &NewBase, - SCEVExpander &Rewriter); + SCEVExpander &Rewriter, Pass *P); // Sort by the Base field. bool operator<(const BasedUser &BU) const { return Base < BU.Base; } @@ -413,12 +414,12 @@ // operands of Inst to use the new expression 'NewBase', with 'Imm' added // to it. void BasedUser::RewriteInstructionToUseNewBase(const SCEVHandle &NewBase, - SCEVExpander &Rewriter) { + SCEVExpander &Rewriter, + Pass *P) { if (!isa(Inst)) { SCEVHandle NewValSCEV = SCEVAddExpr::get(NewBase, Imm); Value *NewVal = Rewriter.expandCodeFor(NewValSCEV, Inst, OperandValToReplace->getType()); - // Replace the use of the operand Value with the new Phi we just created. Inst->replaceUsesOfWith(OperandValToReplace, NewVal); DEBUG(std::cerr << " CHANGED: IMM =" << *Imm << " Inst = " << *Inst); @@ -434,7 +435,19 @@ PHINode *PN = cast(Inst); for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i) { if (PN->getIncomingValue(i) == OperandValToReplace) { - // FIXME: this should split any critical edges. + // If this is a critical edge, split the edge so that we do not insert the + // code on all predecessor/successor paths. + if (e != 1 && + PN->getIncomingBlock(i)->getTerminator()->getNumSuccessors() > 1) { + TerminatorInst *PredTI = PN->getIncomingBlock(i)->getTerminator(); + for (unsigned Succ = 0; ; ++Succ) { + assert(Succ != PredTI->getNumSuccessors() &&"Didn't find successor?"); + if (PredTI->getSuccessor(Succ) == PN->getParent()) { + SplitCriticalEdge(PredTI, Succ, P); + break; + } + } + } Value *&Code = InsertedCode[PN->getIncomingBlock(i)]; if (!Code) { @@ -623,7 +636,7 @@ for (unsigned j = 0, e = AE->getNumOperands(); j != e; ++j) if (!SubExpressionUseCounts.count(AE->getOperand(j))) NewOps.push_back(AE->getOperand(j)); - if (NewOps.size() == 0) + if (NewOps.empty()) Uses[i].Base = Zero; else Uses[i].Base = SCEVAddExpr::get(NewOps); @@ -783,7 +796,7 @@ // Add BaseV to the PHI value if needed. RewriteExpr = SCEVAddExpr::get(RewriteExpr, SCEVUnknown::get(BaseV)); - User.RewriteInstructionToUseNewBase(RewriteExpr, Rewriter); + User.RewriteInstructionToUseNewBase(RewriteExpr, Rewriter, this); // Mark old value we replaced as possibly dead, so that it is elminated // if we just replaced the last use of that value. From lattner at cs.uiuc.edu Fri Aug 12 17:13:38 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 12 Aug 2005 17:13:38 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/BasicBlock.h Message-ID: <200508122213.RAA08736@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: BasicBlock.h updated: 1.55 -> 1.56 --- Log message: add a helper method --- Diffs of the changes: (+5 -0) BasicBlock.h | 5 +++++ 1 files changed, 5 insertions(+) Index: llvm/include/llvm/BasicBlock.h diff -u llvm/include/llvm/BasicBlock.h:1.55 llvm/include/llvm/BasicBlock.h:1.56 --- llvm/include/llvm/BasicBlock.h:1.55 Wed Jul 27 00:53:43 2005 +++ llvm/include/llvm/BasicBlock.h Fri Aug 12 17:13:27 2005 @@ -101,6 +101,11 @@ /// and deletes it. /// void eraseFromParent(); + + /// moveBefore - Unlink this instruction from its current function and + /// insert it into the function that MovePos lives in, right before + /// MovePos. + void moveBefore(BasicBlock *MovePos); /// getSinglePredecessor - If this basic block has a single predecessor block, /// return the block, otherwise return a null pointer. From lattner at cs.uiuc.edu Fri Aug 12 17:14:18 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 12 Aug 2005 17:14:18 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/BasicBlock.cpp Message-ID: <200508122214.RAA08798@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: BasicBlock.cpp updated: 1.67 -> 1.68 --- Log message: Add a helper method --- Diffs of the changes: (+8 -0) BasicBlock.cpp | 8 ++++++++ 1 files changed, 8 insertions(+) Index: llvm/lib/VMCore/BasicBlock.cpp diff -u llvm/lib/VMCore/BasicBlock.cpp:1.67 llvm/lib/VMCore/BasicBlock.cpp:1.68 --- llvm/lib/VMCore/BasicBlock.cpp:1.67 Fri Aug 5 10:34:10 2005 +++ llvm/lib/VMCore/BasicBlock.cpp Fri Aug 12 17:14:06 2005 @@ -102,6 +102,14 @@ getParent()->getBasicBlockList().erase(this); } +/// moveBefore - Unlink this instruction from its current function and +/// insert it into the function that MovePos lives in, right before +/// MovePos. +void BasicBlock::moveBefore(BasicBlock *MovePos) { + MovePos->getParent()->getBasicBlockList().splice(MovePos, + getParent()->getBasicBlockList(), this); +} + TerminatorInst *BasicBlock::getTerminator() { if (InstList.empty()) return 0; From lattner at cs.uiuc.edu Fri Aug 12 17:22:29 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 12 Aug 2005 17:22:29 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Message-ID: <200508122222.RAA08880@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: LoopStrengthReduce.cpp updated: 1.48 -> 1.49 --- Log message: When splitting critical edges, make sure not to leave the new block in the middle of the loop. This turns a critical loop in gzip into this: .LBB_test_1: ; loopentry or r27, r28, r28 add r28, r3, r27 lhz r28, 3(r28) add r26, r4, r27 lhz r26, 3(r26) cmpw cr0, r28, r26 bne .LBB_test_8 ; loopentry.loopexit_crit_edge .LBB_test_2: ; shortcirc_next.0 add r28, r3, r27 lhz r28, 5(r28) add r26, r4, r27 lhz r26, 5(r26) cmpw cr0, r28, r26 bne .LBB_test_7 ; shortcirc_next.0.loopexit_crit_edge .LBB_test_3: ; shortcirc_next.1 add r28, r3, r27 lhz r28, 7(r28) add r26, r4, r27 lhz r26, 7(r26) cmpw cr0, r28, r26 bne .LBB_test_6 ; shortcirc_next.1.loopexit_crit_edge .LBB_test_4: ; shortcirc_next.2 add r28, r3, r27 lhz r26, 9(r28) add r28, r4, r27 lhz r25, 9(r28) addi r28, r27, 8 cmpw cr7, r26, r25 mfcr r26, 1 rlwinm r26, r26, 31, 31, 31 add r25, r8, r27 cmpw cr7, r25, r7 mfcr r25, 1 rlwinm r25, r25, 29, 31, 31 and. r26, r26, r25 bne .LBB_test_1 ; loopentry instead of this: .LBB_test_1: ; loopentry or r27, r28, r28 add r28, r3, r27 lhz r28, 3(r28) add r26, r4, r27 lhz r26, 3(r26) cmpw cr0, r28, r26 beq .LBB_test_3 ; shortcirc_next.0 .LBB_test_2: ; loopentry.loopexit_crit_edge add r2, r30, r27 add r8, r29, r27 b .LBB_test_9 ; loopexit .LBB_test_3: ; shortcirc_next.0 add r28, r3, r27 lhz r28, 5(r28) add r26, r4, r27 lhz r26, 5(r26) cmpw cr0, r28, r26 beq .LBB_test_5 ; shortcirc_next.1 .LBB_test_4: ; shortcirc_next.0.loopexit_crit_edge add r2, r11, r27 add r8, r12, r27 b .LBB_test_9 ; loopexit .LBB_test_5: ; shortcirc_next.1 add r28, r3, r27 lhz r28, 7(r28) add r26, r4, r27 lhz r26, 7(r26) cmpw cr0, r28, r26 beq .LBB_test_7 ; shortcirc_next.2 .LBB_test_6: ; shortcirc_next.1.loopexit_crit_edge add r2, r9, r27 add r8, r10, r27 b .LBB_test_9 ; loopexit .LBB_test_7: ; shortcirc_next.2 add r28, r3, r27 lhz r26, 9(r28) add r28, r4, r27 lhz r25, 9(r28) addi r28, r27, 8 cmpw cr7, r26, r25 mfcr r26, 1 rlwinm r26, r26, 31, 31, 31 add r25, r8, r27 cmpw cr7, r25, r7 mfcr r25, 1 rlwinm r25, r25, 29, 31, 31 and. r26, r26, r25 bne .LBB_test_1 ; loopentry Next up, improve the code for the loop. --- Diffs of the changes: (+15 -3) LoopStrengthReduce.cpp | 18 +++++++++++++++--- 1 files changed, 15 insertions(+), 3 deletions(-) Index: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp diff -u llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.48 llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.49 --- llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.48 Fri Aug 12 17:06:11 2005 +++ llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Fri Aug 12 17:22:17 2005 @@ -392,7 +392,8 @@ // operands of Inst to use the new expression 'NewBase', with 'Imm' added // to it. void RewriteInstructionToUseNewBase(const SCEVHandle &NewBase, - SCEVExpander &Rewriter, Pass *P); + SCEVExpander &Rewriter, Loop *L, + Pass *P); // Sort by the Base field. bool operator<(const BasedUser &BU) const { return Base < BU.Base; } @@ -415,7 +416,7 @@ // to it. void BasedUser::RewriteInstructionToUseNewBase(const SCEVHandle &NewBase, SCEVExpander &Rewriter, - Pass *P) { + Loop *L, Pass *P) { if (!isa(Inst)) { SCEVHandle NewValSCEV = SCEVAddExpr::get(NewBase, Imm); Value *NewVal = Rewriter.expandCodeFor(NewValSCEV, Inst, @@ -443,7 +444,18 @@ for (unsigned Succ = 0; ; ++Succ) { assert(Succ != PredTI->getNumSuccessors() &&"Didn't find successor?"); if (PredTI->getSuccessor(Succ) == PN->getParent()) { + // First step, split the critical edge. SplitCriticalEdge(PredTI, Succ, P); + + // Next step: move the basic block. In particular, if the PHI node + // is outside of the loop, and PredTI is in the loop, we want to + // move the block to be immediately before the PHI block, not + // immediately after PredTI. + if (L->contains(PredTI->getParent()) && + !L->contains(PN->getParent())) { + BasicBlock *NewBB = PN->getIncomingBlock(i); + NewBB->moveBefore(PN->getParent()); + } break; } } @@ -796,7 +808,7 @@ // Add BaseV to the PHI value if needed. RewriteExpr = SCEVAddExpr::get(RewriteExpr, SCEVUnknown::get(BaseV)); - User.RewriteInstructionToUseNewBase(RewriteExpr, Rewriter, this); + User.RewriteInstructionToUseNewBase(RewriteExpr, Rewriter, L, this); // Mark old value we replaced as possibly dead, so that it is elminated // if we just replaced the last use of that value. From lattner at cs.uiuc.edu Fri Aug 12 18:34:14 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 12 Aug 2005 18:34:14 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/PowerPC/2005-08-12-rlwimi-crash.ll Message-ID: <200508122334.SAA09160@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/PowerPC: 2005-08-12-rlwimi-crash.ll added (r1.1) --- Log message: testcase that crashed the ppc backend, distilled from crafty --- Diffs of the changes: (+12 -0) 2005-08-12-rlwimi-crash.ll | 12 ++++++++++++ 1 files changed, 12 insertions(+) Index: llvm/test/Regression/CodeGen/PowerPC/2005-08-12-rlwimi-crash.ll diff -c /dev/null llvm/test/Regression/CodeGen/PowerPC/2005-08-12-rlwimi-crash.ll:1.1 *** /dev/null Fri Aug 12 18:34:13 2005 --- llvm/test/Regression/CodeGen/PowerPC/2005-08-12-rlwimi-crash.ll Fri Aug 12 18:34:03 2005 *************** *** 0 **** --- 1,12 ---- + ; this should not crash the ppc backend + + ; RUN: llvm-as < %s | llc -march=ppc32 + + uint %test( int %j.0.0.i) { + %tmp.85.i = and int %j.0.0.i, 7 + %tmp.161278.i = cast int %tmp.85.i to uint + %tmp.5.i77.i = shr uint %tmp.161278.i, ubyte 3 + ret uint %tmp.5.i77.i + } + + From jlaskey at apple.com Fri Aug 12 18:38:13 2005 From: jlaskey at apple.com (Jim Laskey) Date: Fri, 12 Aug 2005 18:38:13 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Message-ID: <200508122338.SAA09187@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPC32ISelPattern.cpp updated: 1.135 -> 1.136 --- Log message: 1. This changes handles the cases of (~x)&y and x&(~y) yielding ANDC, and (~x)|y and x|(~y) yielding ORC. --- Diffs of the changes: (+24 -3) PPC32ISelPattern.cpp | 27 ++++++++++++++++++++++++--- 1 files changed, 24 insertions(+), 3 deletions(-) Index: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp diff -u llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.135 llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.136 --- llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.135 Thu Aug 11 16:59:22 2005 +++ llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Fri Aug 12 18:38:02 2005 @@ -1717,10 +1717,17 @@ return Result; } } + if (isOprNot(N.getOperand(1))) { + Tmp1 = SelectExpr(N.getOperand(0)); + Tmp2 = SelectExpr(N.getOperand(1).getOperand(0)); + BuildMI(BB, PPC::ANDC, 2, Result).addReg(Tmp1).addReg(Tmp2); + RecordSuccess = false; + return Result; + } if (isOprNot(N.getOperand(0))) { - Tmp1 = SelectExpr(N.getOperand(0).getOperand(0)); - Tmp2 = SelectExpr(N.getOperand(1)); - BuildMI(BB, PPC::ANDC, 2, Result).addReg(Tmp2).addReg(Tmp1); + Tmp1 = SelectExpr(N.getOperand(1)); + Tmp2 = SelectExpr(N.getOperand(0).getOperand(0)); + BuildMI(BB, PPC::ANDC, 2, Result).addReg(Tmp1).addReg(Tmp2); RecordSuccess = false; return Result; } @@ -1737,6 +1744,20 @@ return Result; if (SelectIntImmediateExpr(N, Result, PPC::ORIS, PPC::ORI)) return Result; + if (isOprNot(N.getOperand(1))) { + Tmp1 = SelectExpr(N.getOperand(0)); + Tmp2 = SelectExpr(N.getOperand(1).getOperand(0)); + BuildMI(BB, PPC::ORC, 2, Result).addReg(Tmp1).addReg(Tmp2); + RecordSuccess = false; + return Result; + } + if (isOprNot(N.getOperand(0))) { + Tmp1 = SelectExpr(N.getOperand(1)); + Tmp2 = SelectExpr(N.getOperand(0).getOperand(0)); + BuildMI(BB, PPC::ORC, 2, Result).addReg(Tmp1).addReg(Tmp2); + RecordSuccess = false; + return Result; + } // emit regular or Tmp1 = SelectExpr(N.getOperand(0)); Tmp2 = SelectExpr(N.getOperand(1)); From jlaskey at apple.com Fri Aug 12 18:40:25 2005 From: jlaskey at apple.com (Jim Laskey) Date: Fri, 12 Aug 2005 18:40:25 -0500 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/PowerPC/eqv.ll Message-ID: <200508122340.SAA09211@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/PowerPC: eqv.ll updated: 1.1 -> 1.2 --- Log message: Added test cases to guarantee use of ORC and ANDC. --- Diffs of the changes: (+27 -1) eqv.ll | 28 +++++++++++++++++++++++++++- 1 files changed, 27 insertions(+), 1 deletion(-) Index: llvm/test/Regression/CodeGen/PowerPC/eqv.ll diff -u llvm/test/Regression/CodeGen/PowerPC/eqv.ll:1.1 llvm/test/Regression/CodeGen/PowerPC/eqv.ll:1.2 --- llvm/test/Regression/CodeGen/PowerPC/eqv.ll:1.1 Thu Apr 21 16:10:07 2005 +++ llvm/test/Regression/CodeGen/PowerPC/eqv.ll Fri Aug 12 18:40:14 2005 @@ -1,4 +1,6 @@ -; RUN: llvm-as < %s | llc -march=ppc32 | grep eqv | wc -l | grep 2 +; RUN: llvm-as < %s | llc -march=ppc32 | grep eqv | wc -l | grep 2 && +; RUN: llvm-as < %s | llc -march=ppc32 | grep andc | wc -l | grep 2 && +; RUN: llvm-as < %s | llc -march=ppc32 | grep orc | wc -l | grep 2 int %test1(int %X, int %Y) { %A = xor int %X, %Y @@ -11,3 +13,27 @@ %B = xor int %A, -1 ret int %B } + +int %test3(int %X, int %Y) { + %A = xor int %Y, -1 + %B = and int %X, %A + ret int %B +} + +int %test4(int %X, int %Y) { + %A = xor int %Y, -1 + %B = or int %X, %A + ret int %B +} + +int %test5(int %X, int %Y) { + %A = xor int %X, -1 + %B = and int %A, %Y + ret int %B +} + +int %test6(int %X, int %Y) { + %A = xor int %X, -1 + %B = or int %A, %Y + ret int %B +} From jlaskey at apple.com Fri Aug 12 18:52:58 2005 From: jlaskey at apple.com (Jim Laskey) Date: Fri, 12 Aug 2005 18:52:58 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Message-ID: <200508122352.SAA09364@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPC32ISelPattern.cpp updated: 1.136 -> 1.137 --- Log message: Fix for 2005-08-12-rlwimi-crash.ll. Make allowance for masks being shifted to zero. --- Diffs of the changes: (+1 -1) PPC32ISelPattern.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp diff -u llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.136 llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.137 --- llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.136 Fri Aug 12 18:38:02 2005 +++ llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Fri Aug 12 18:52:46 2005 @@ -640,7 +640,7 @@ } // if the mask doesn't intersect any Indeterminant bits - if (!(Mask & Indeterminant)) { + if (Mask && !(Mask & Indeterminant)) { SH = Shift; // make sure the mask is still a mask (wrap arounds may not be) return isRunOfOnes(Mask, MB, ME); From lattner at cs.uiuc.edu Fri Aug 12 18:55:09 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 12 Aug 2005 18:55:09 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Message-ID: <200508122355.SAA09434@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAG.cpp updated: 1.136 -> 1.137 --- Log message: implement a couple of simple shift foldings. e.g. (X & 7) >> 3 -> 0 --- Diffs of the changes: (+18 -0) SelectionDAG.cpp | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.136 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.137 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.136 Wed Aug 10 21:18:13 2005 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Fri Aug 12 18:54:58 2005 @@ -993,6 +993,24 @@ return getNode(ISD::UNDEF, N1.getValueType()); } if (C2 == 0) return N1; + + if (Opcode == ISD::SRA) { + // If the sign bit is known to be zero, switch this to a SRL. + if (MaskedValueIsZero(N1, + 1ULL << MVT::getSizeInBits(N1.getValueType())-1, + TLI)) + return getNode(ISD::SRL, N1.getValueType(), N1, N2); + } else { + // If the part left over is known to be zero, the whole thing is zero. + uint64_t TypeMask = ~0ULL >> (64-MVT::getSizeInBits(N1.getValueType())); + if (Opcode == ISD::SRL) { + if (MaskedValueIsZero(N1, TypeMask << C2, TLI)) + return getConstant(0, N1.getValueType()); + } else if (Opcode == ISD::SHL) { + if (MaskedValueIsZero(N1, TypeMask >> C2, TLI)) + return getConstant(0, N1.getValueType()); + } + } if (Opcode == ISD::SHL && N1.getNumOperands() == 2) if (ConstantSDNode *OpSA = dyn_cast(N1.getOperand(1))) { From lattner at cs.uiuc.edu Fri Aug 12 20:30:48 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 12 Aug 2005 20:30:48 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopSimplify.cpp Message-ID: <200508130130.UAA10156@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: LoopSimplify.cpp updated: 1.60 -> 1.61 --- Log message: remove dead code. The exit block list is computed on demand, thus does not need to be updated. This code is a relic from when it did. --- Diffs of the changes: (+0 -15) LoopSimplify.cpp | 15 --------------- 1 files changed, 15 deletions(-) Index: llvm/lib/Transforms/Scalar/LoopSimplify.cpp diff -u llvm/lib/Transforms/Scalar/LoopSimplify.cpp:1.60 llvm/lib/Transforms/Scalar/LoopSimplify.cpp:1.61 --- llvm/lib/Transforms/Scalar/LoopSimplify.cpp:1.60 Wed Aug 10 12:15:20 2005 +++ llvm/lib/Transforms/Scalar/LoopSimplify.cpp Fri Aug 12 20:30:36 2005 @@ -325,21 +325,6 @@ if (Loop *Parent = L->getParentLoop()) Parent->addBasicBlockToLoop(NewBB, getAnalysis()); - // If the header for the loop used to be an exit node for another loop, then - // we need to update this to know that the loop-preheader is now the exit - // node. Note that the only loop that could have our header as an exit node - // is a sibling loop, ie, one with the same parent loop, or one if it's - // children. - // - LoopInfo::iterator ParentLoops, ParentLoopsE; - if (Loop *Parent = L->getParentLoop()) { - ParentLoops = Parent->begin(); - ParentLoopsE = Parent->end(); - } else { // Must check top-level loops... - ParentLoops = getAnalysis().begin(); - ParentLoopsE = getAnalysis().end(); - } - DominatorSet &DS = getAnalysis(); // Update dominator info DominatorTree &DT = getAnalysis(); From lattner at cs.uiuc.edu Fri Aug 12 20:38:54 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 12 Aug 2005 20:38:54 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp Message-ID: <200508130138.UAA10305@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Utils: BreakCriticalEdges.cpp updated: 1.27 -> 1.28 --- Log message: Teach SplitCriticalEdge to update LoopInfo if it is alive. This fixes a problem in LoopStrengthReduction, where it would split critical edges then confused itself with outdated loop information. --- Diffs of the changes: (+31 -0) BreakCriticalEdges.cpp | 31 +++++++++++++++++++++++++++++++ 1 files changed, 31 insertions(+) Index: llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp diff -u llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp:1.27 llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp:1.28 --- llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp:1.27 Fri Aug 12 16:58:07 2005 +++ llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp Fri Aug 12 20:38:43 2005 @@ -19,6 +19,7 @@ #include "llvm/Transforms/Scalar.h" #include "llvm/Transforms/Utils/BasicBlockUtils.h" #include "llvm/Analysis/Dominators.h" +#include "llvm/Analysis/LoopInfo.h" #include "llvm/Function.h" #include "llvm/Instructions.h" #include "llvm/Type.h" @@ -37,6 +38,7 @@ AU.addPreserved(); AU.addPreserved(); AU.addPreserved(); + AU.addPreserved(); // No loop canonicalization guarantees are broken by this pass. AU.addPreservedID(LoopSimplifyID); @@ -171,5 +173,34 @@ NewDFSet.insert(DestBB); DF->addBasicBlock(NewBB, NewDFSet); } + + // Update LoopInfo if it is around. + if (LoopInfo *LI = P->getAnalysisToUpdate()) { + // If one or the other blocks were not in a loop, the new block is not + // either, and thus LI doesn't need to be updated. + if (Loop *TIL = LI->getLoopFor(TIBB)) + if (Loop *DestLoop = LI->getLoopFor(DestBB)) { + if (TIL == DestLoop) { + // Both in the same loop, the NewBB joins loop. + DestLoop->addBasicBlockToLoop(NewBB, *LI); + } else if (TIL->contains(DestLoop->getHeader())) { + // Edge from an outer loop to an inner loop. Add to the outer lopo. + TIL->addBasicBlockToLoop(NewBB, *LI); + } else if (DestLoop->contains(TIL->getHeader())) { + // Edge from an inner loop to an outer loop. Add to the outer lopo. + DestLoop->addBasicBlockToLoop(NewBB, *LI); + } else { + // Edge from two loops with no containment relation. Because these + // are natural loops, we know that the destination block must be the + // header of its loop (adding a branch into a loop elsewhere would + // create an irreducible loop). + assert(DestLoop->getHeader() == DestBB && + "Should not create irreducible loops!"); + if (Loop *P = DestLoop->getParentLoop()) + P->addBasicBlockToLoop(NewBB, *LI); + } + } + + } return true; } From alenhar2 at cs.uiuc.edu Sat Aug 13 00:10:02 2005 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Sat, 13 Aug 2005 00:10:02 -0500 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200508130510.AAA10966@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.317 -> 1.318 --- Log message: Fix oversized GOT problem with gcc-4 on alpha --- Diffs of the changes: (+6 -0) Makefile.rules | 6 ++++++ 1 files changed, 6 insertions(+) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.317 llvm/Makefile.rules:1.318 --- llvm/Makefile.rules:1.317 Fri Jul 22 17:43:40 2005 +++ llvm/Makefile.rules Sat Aug 13 00:09:50 2005 @@ -625,6 +625,12 @@ # (defined by the user's project) and "LLVM" libs (defined # by the # LLVM project). #--------------------------------------------------------- +#some versions of gcc on alpha produce to many symbols, so use a .a file +ifeq ($(ARCH),Alpha) +USEDLIBS := $(subst LLVMCore, LLVMCore.a, $(USEDLIBS)) +LLVMLIBS := $(subst LLVMCore, LLVMCore.a, $(LLVMLIBS)) +endif + ProjLibsOptions := $(patsubst %.a.o, -l%, $(addsuffix .o, $(USEDLIBS))) ProjLibsOptions := $(patsubst %.o, $(LibDir)/%.o, $(ProjLibsOptions)) LLVMLibsOptions := $(patsubst %.a.o, -l%, $(addsuffix .o, $(LLVMLIBS))) From alenhar2 at cs.uiuc.edu Sat Aug 13 00:10:02 2005 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Sat, 13 Aug 2005 00:10:02 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Makefile Message-ID: <200508130510.AAA10968@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Makefile updated: 1.4 -> 1.5 --- Log message: Fix oversized GOT problem with gcc-4 on alpha --- Diffs of the changes: (+4 -0) Makefile | 4 ++++ 1 files changed, 4 insertions(+) Index: llvm/lib/VMCore/Makefile diff -u llvm/lib/VMCore/Makefile:1.4 llvm/lib/VMCore/Makefile:1.5 --- llvm/lib/VMCore/Makefile:1.4 Wed Oct 27 18:18:45 2004 +++ llvm/lib/VMCore/Makefile Sat Aug 13 00:09:50 2005 @@ -9,5 +9,9 @@ LEVEL = ../.. LIBRARYNAME = LLVMCore +ifeq ($(ARCH),Alpha) +BUILD_ARCHIVE = 1 +endif + include $(LEVEL)/Makefile.common From natebegeman at mac.com Sat Aug 13 00:59:27 2005 From: natebegeman at mac.com (Nate Begeman) Date: Sat, 13 Aug 2005 00:59:27 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/Makefile PowerPCTargetMachine.cpp PPC64CodeEmitter.cpp PPC64ISelPattern.cpp PPC64InstrInfo.cpp PPC64InstrInfo.h PPC64JITInfo.h PPC64RegisterInfo.cpp PPC64RegisterInfo.h PPC64TargetMachine.h Message-ID: <200508130559.AAA21168@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: Makefile updated: 1.17 -> 1.18 PowerPCTargetMachine.cpp updated: 1.61 -> 1.62 PPC64CodeEmitter.cpp (r1.4) removed PPC64ISelPattern.cpp (r1.28) removed PPC64InstrInfo.cpp (r1.2) removed PPC64InstrInfo.h (r1.2) removed PPC64JITInfo.h (r1.4) removed PPC64RegisterInfo.cpp (r1.10) removed PPC64RegisterInfo.h (r1.2) removed PPC64TargetMachine.h (r1.4) removed --- Log message: Remove support for 64b PPC, it's been broken for a long time. It'll be back once a DAG->DAG ISel exists. --- Diffs of the changes: (+4 -39) Makefile | 5 ++--- PowerPCTargetMachine.cpp | 38 ++------------------------------------ 2 files changed, 4 insertions(+), 39 deletions(-) Index: llvm/lib/Target/PowerPC/Makefile diff -u llvm/lib/Target/PowerPC/Makefile:1.17 llvm/lib/Target/PowerPC/Makefile:1.18 --- llvm/lib/Target/PowerPC/Makefile:1.17 Thu Dec 16 11:26:44 2004 +++ llvm/lib/Target/PowerPC/Makefile Sat Aug 13 00:59:16 2005 @@ -8,12 +8,11 @@ ##===----------------------------------------------------------------------===## LEVEL = ../../.. LIBRARYNAME = LLVMPowerPC -TARGET = PowerPC PPC32 PPC64 +TARGET = PowerPC PPC32 # Make sure that tblgen is run, first thing. BUILT_SOURCES = PowerPCGenInstrNames.inc PowerPCGenRegisterNames.inc \ PowerPCGenAsmWriter.inc PPC32GenCodeEmitter.inc \ - PPC32GenRegisterInfo.h.inc PPC32GenRegisterInfo.inc PPC32GenInstrInfo.inc \ - PPC64GenRegisterInfo.h.inc PPC64GenRegisterInfo.inc PPC64GenInstrInfo.inc + PPC32GenRegisterInfo.h.inc PPC32GenRegisterInfo.inc PPC32GenInstrInfo.inc include $(LEVEL)/Makefile.common Index: llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp diff -u llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp:1.61 llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp:1.62 --- llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp:1.61 Fri Aug 5 17:05:03 2005 +++ llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp Sat Aug 13 00:59:16 2005 @@ -14,9 +14,7 @@ #include "PowerPCTargetMachine.h" #include "PowerPCFrameInfo.h" #include "PPC32TargetMachine.h" -#include "PPC64TargetMachine.h" #include "PPC32JITInfo.h" -#include "PPC64JITInfo.h" #include "llvm/Module.h" #include "llvm/PassManager.h" #include "llvm/Analysis/Verifier.h" @@ -35,16 +33,10 @@ namespace { const std::string PPC32ID = "PowerPC/32bit"; - const std::string PPC64ID = "PowerPC/64bit"; // Register the targets RegisterTarget X("ppc32", " PowerPC 32-bit"); - -#if 0 - RegisterTarget - Y("ppc64", " PowerPC 64-bit (unimplemented)"); -#endif } PowerPCTargetMachine::PowerPCTargetMachine(const std::string &name, @@ -75,8 +67,6 @@ CodeGenFileType FileType) { if (FileType != TargetMachine::AssemblyFile) return true; - bool LP64 = (0 != dynamic_cast(this)); - if (EnablePPCLSR) { PM.add(createLoopStrengthReducePass()); PM.add(createVerifierPass()); @@ -98,9 +88,7 @@ PM.add(createUnreachableBlockEliminationPass()); // Default to pattern ISel - if (LP64) - PM.add(createPPC64ISelPattern(*this)); - else if (PatternISelTriState == 0) + if (PatternISelTriState == 0) PM.add(createPPC32ISelSimple(*this)); else PM.add(createPPC32ISelPattern(*this)); @@ -138,8 +126,6 @@ // The JIT does not support or need PIC. PICEnabled = false; - bool LP64 = (0 != dynamic_cast(&TM)); - if (EnablePPCLSR) { PM.add(createLoopStrengthReducePass()); PM.add(createCFGSimplificationPass()); @@ -160,9 +146,7 @@ PM.add(createUnreachableBlockEliminationPass()); // Default to pattern ISel - if (LP64) - PM.add(createPPC64ISelPattern(TM)); - else if (PatternISelTriState == 0) + if (PatternISelTriState == 0) PM.add(createPPC32ISelSimple(TM)); else PM.add(createPPC32ISelPattern(TM)); @@ -184,13 +168,6 @@ TargetData(PPC32ID,false,4,4,4,4,4,4,2,1,1), PowerPCFrameInfo(*this, false)), JITInfo(*this) {} -/// PPC64TargetMachine ctor - Create a LP64 architecture model -/// -PPC64TargetMachine::PPC64TargetMachine(const Module &M, IntrinsicLowering *IL) - : PowerPCTargetMachine(PPC64ID, IL, M, - TargetData(PPC64ID,false,8,4,4,4,4,4,2,1,1), - PowerPCFrameInfo(*this, true)) {} - unsigned PPC32TargetMachine::getModuleMatchQuality(const Module &M) { // We strongly match "powerpc-*". std::string TT = M.getTargetTriple(); @@ -206,14 +183,3 @@ return getJITMatchQuality()/2; } - -unsigned PPC64TargetMachine::getModuleMatchQuality(const Module &M) { - if (M.getEndianness() == Module::BigEndian && - M.getPointerSize() == Module::Pointer64) - return 10; // Direct match - else if (M.getEndianness() != Module::AnyEndianness || - M.getPointerSize() != Module::AnyPointerSize) - return 0; // Match for some other target - - return getJITMatchQuality()/2; -} From natebegeman at mac.com Sat Aug 13 01:00:32 2005 From: natebegeman at mac.com (Nate Begeman) Date: Sat, 13 Aug 2005 01:00:32 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAG.h Message-ID: <200508130600.BAA21218@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: SelectionDAG.h updated: 1.34 -> 1.35 --- Log message: Fix the fabs regression on x86 by abstracting the select_cc optimization out into SimplifySelectCC. This allows both ISD::SELECT and ISD::SELECT_CC to use the same set of simplifying folds. --- Diffs of the changes: (+9 -3) SelectionDAG.h | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) Index: llvm/include/llvm/CodeGen/SelectionDAG.h diff -u llvm/include/llvm/CodeGen/SelectionDAG.h:1.34 llvm/include/llvm/CodeGen/SelectionDAG.h:1.35 --- llvm/include/llvm/CodeGen/SelectionDAG.h:1.34 Wed Aug 10 20:12:20 2005 +++ llvm/include/llvm/CodeGen/SelectionDAG.h Sat Aug 13 01:00:21 2005 @@ -214,12 +214,18 @@ private: void DeleteNodeIfDead(SDNode *N, void *NodeSet); - // Try to simplify a setcc built with the specified operands and cc. If - // unable to simplify it, return a null SDOperand. + /// SimplifySetCC - Try to simplify a setcc built with the specified operands + /// and cc. If unable to simplify it, return a null SDOperand. SDOperand SimplifySetCC(MVT::ValueType VT, SDOperand N1, SDOperand N2, ISD::CondCode Cond); - + /// SimplifySelectCC - Try to simplify a select_cc built with the specified + /// operands and cc. This can be used to simplify both the select_cc node, + /// and a select node whose first operand is a setcc. + SDOperand SimplifySelectCC(MVT::ValueType VT, ISD::CondCode CC, + SDOperand N1, SDOperand N2, SDOperand N3, + SDOperand N4); + // Maps to auto-CSE operations. std::map >, SDNode *> UnaryOps; From natebegeman at mac.com Sat Aug 13 01:00:33 2005 From: natebegeman at mac.com (Nate Begeman) Date: Sat, 13 Aug 2005 01:00:33 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Message-ID: <200508130600.BAA21222@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAG.cpp updated: 1.137 -> 1.138 --- Log message: Fix the fabs regression on x86 by abstracting the select_cc optimization out into SimplifySelectCC. This allows both ISD::SELECT and ISD::SELECT_CC to use the same set of simplifying folds. --- Diffs of the changes: (+83 -68) SelectionDAG.cpp | 151 ++++++++++++++++++++++++++++++------------------------- 1 files changed, 83 insertions(+), 68 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.137 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.138 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.137 Fri Aug 12 18:54:58 2005 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Sat Aug 13 01:00:21 2005 @@ -686,6 +686,80 @@ return SDOperand(); } +SDOperand SelectionDAG::SimplifySelectCC(MVT::ValueType VT, ISD::CondCode CC, + SDOperand N1, SDOperand N2, SDOperand N3, + SDOperand N4) { + ConstantSDNode *N2C = dyn_cast(N2.Val); + ConstantSDNode *N3C = dyn_cast(N3.Val); + ConstantSDNode *N4C = dyn_cast(N4.Val); + + // Check to see if we can simplify the select into an fabs node + if (ConstantFPSDNode *CFP = dyn_cast(N2)) { + // Allow either -0.0 or 0.0 + if (CFP->getValue() == 0.0) { + // select (setg[te] X, +/-0.0), X, fneg(X) -> fabs + if ((CC == ISD::SETGE || CC == ISD::SETGT) && + N1 == N3 && N4.getOpcode() == ISD::FNEG && + N1 == N4.getOperand(0)) + return getNode(ISD::FABS, VT, N1); + + // select (setl[te] X, +/-0.0), fneg(X), X -> fabs + if ((CC == ISD::SETLT || CC == ISD::SETLE) && + N1 == N4 && N3.getOpcode() == ISD::FNEG && + N3.getOperand(0) == N4) + return getNode(ISD::FABS, VT, N4); + } + } + + // Check to see if we can perform the "gzip trick", transforming + // select_cc setlt X, 0, A, 0 -> and (sra X, size(X)-1), A + if (N2C && N2C->isNullValue() && N4C && N4C->isNullValue() && + MVT::isInteger(N1.getValueType()) && + MVT::isInteger(N3.getValueType()) && CC == ISD::SETLT) { + MVT::ValueType XType = N1.getValueType(); + MVT::ValueType AType = N3.getValueType(); + if (XType >= AType) { + // and (sra X, size(X)-1, A) -> "and (srl X, C2), A" iff A is a + // single-bit constant. FIXME: remove once the dag combiner + // exists. + if (N3C && ((N3C->getValue() & (N3C->getValue()-1)) == 0)) { + unsigned ShCtV = Log2_64(N3C->getValue()); + ShCtV = MVT::getSizeInBits(XType)-ShCtV-1; + SDOperand ShCt = getConstant(ShCtV, TLI.getShiftAmountTy()); + SDOperand Shift = getNode(ISD::SRL, XType, N1, ShCt); + if (XType > AType) + Shift = getNode(ISD::TRUNCATE, AType, Shift); + return getNode(ISD::AND, AType, Shift, N3); + } + SDOperand Shift = getNode(ISD::SRA, XType, N1, + getConstant(MVT::getSizeInBits(XType)-1, + TLI.getShiftAmountTy())); + if (XType > AType) + Shift = getNode(ISD::TRUNCATE, AType, Shift); + return getNode(ISD::AND, AType, Shift, N3); + } + } + + // Check to see if this is an integer abs. select_cc setl[te] X, 0, -X, X -> + // Y = sra (X, size(X)-1); xor (add (X, Y), Y) + if (N2C && N2C->isNullValue() && (CC == ISD::SETLT || CC == ISD::SETLE) && + N1 == N4 && N3.getOpcode() == ISD::SUB && N1 == N3.getOperand(1)) { + if (ConstantSDNode *SubC = dyn_cast(N3.getOperand(0))) { + MVT::ValueType XType = N1.getValueType(); + if (SubC->isNullValue() && MVT::isInteger(XType)) { + SDOperand Shift = getNode(ISD::SRA, XType, N1, + getConstant(MVT::getSizeInBits(XType)-1, + TLI.getShiftAmountTy())); + return getNode(ISD::XOR, XType, getNode(ISD::ADD, XType, N1, Shift), + Shift); + } + } + } + + // Could not fold it. + return SDOperand(); +} + /// getNode - Gets or creates the specified node. /// SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT) { @@ -1415,6 +1489,12 @@ if (N1 == N3) // X ? Y : X --> X ? Y : 0 --> X & Y return getNode(ISD::AND, VT, N1, N2); } + if (N1.getOpcode() == ISD::SETCC) { + SDOperand Simp = SimplifySelectCC(VT, + cast(N1.getOperand(2))->get(), + N1.getOperand(0), N1.getOperand(1), N2, N3); + if (Simp.Val) return Simp; + } break; case ISD::BRCOND: if (N2C) @@ -1461,74 +1541,9 @@ "LHS and RHS of condition must have same type!"); assert(N3.getValueType() == N4.getValueType() && "True and False arms of SelectCC must have same type!"); - - ConstantSDNode *N2C = dyn_cast(N2.Val); - ConstantSDNode *N3C = dyn_cast(N3.Val); - ConstantSDNode *N4C = dyn_cast(N4.Val); - ISD::CondCode CC = cast(N5)->get(); - - // Check to see if we can simplify the select into an fabs node - if (ConstantFPSDNode *CFP = dyn_cast(N2)) { - // Allow either -0.0 or 0.0 - if (CFP->getValue() == 0.0) { - // select (setg[te] X, +/-0.0), X, fneg(X) -> fabs - if ((CC == ISD::SETGE || CC == ISD::SETGT) && - N1 == N3 && N4.getOpcode() == ISD::FNEG && - N1 == N4.getOperand(0)) - return getNode(ISD::FABS, VT, N1); - - // select (setl[te] X, +/-0.0), fneg(X), X -> fabs - if ((CC == ISD::SETLT || CC == ISD::SETLE) && - N1 == N4 && N3.getOpcode() == ISD::FNEG && - N3.getOperand(0) == N4) - return getNode(ISD::FABS, VT, N4); - } - } - - // Check to see if we can perform the "gzip trick", transforming - // select_cc setlt X, 0, A, 0 -> and (sra X, size(X)-1), A - if (N2C && N2C->isNullValue() && N4C && N4C->isNullValue() && - MVT::isInteger(N1.getValueType()) && - MVT::isInteger(N3.getValueType()) && CC == ISD::SETLT) { - MVT::ValueType XType = N1.getValueType(); - MVT::ValueType AType = N3.getValueType(); - if (XType >= AType) { - // and (sra X, size(X)-1, A) -> "and (srl X, C2), A" iff A is a - // single-bit constant. FIXME: remove once the dag combiner - // exists. - if (N3C && ((N3C->getValue() & (N3C->getValue()-1)) == 0)) { - unsigned ShCtV = Log2_64(N3C->getValue()); - ShCtV = MVT::getSizeInBits(XType)-ShCtV-1; - SDOperand ShCt = getConstant(ShCtV, TLI.getShiftAmountTy()); - SDOperand Shift = getNode(ISD::SRL, XType, N1, ShCt); - if (XType > AType) - Shift = getNode(ISD::TRUNCATE, AType, Shift); - return getNode(ISD::AND, AType, Shift, N3); - } - SDOperand Shift = getNode(ISD::SRA, XType, N1, - getConstant(MVT::getSizeInBits(XType)-1, - TLI.getShiftAmountTy())); - if (XType > AType) - Shift = getNode(ISD::TRUNCATE, AType, Shift); - return getNode(ISD::AND, AType, Shift, N3); - } - } - - // Check to see if this is an integer abs. select_cc setl[te] X, 0, -X, X -> - // Y = sra (X, size(X)-1); xor (add (X, Y), Y) - if (N2C && N2C->isNullValue() && (CC == ISD::SETLT || CC == ISD::SETLE) && - N1 == N4 && N3.getOpcode() == ISD::SUB && N1 == N3.getOperand(1)) { - if (ConstantSDNode *SubC = dyn_cast(N3.getOperand(0))) { - MVT::ValueType XType = N1.getValueType(); - if (SubC->isNullValue() && MVT::isInteger(XType)) { - SDOperand Shift = getNode(ISD::SRA, XType, N1, - getConstant(MVT::getSizeInBits(XType)-1, - TLI.getShiftAmountTy())); - return getNode(ISD::XOR, XType, getNode(ISD::ADD, XType, N1, Shift), - Shift); - } - } - } + SDOperand Simp = SimplifySelectCC(VT, cast(N5)->get(), N1, + N2, N3, N4); + if (Simp.Val) return Simp; } std::vector Ops; From natebegeman at mac.com Sat Aug 13 01:14:29 2005 From: natebegeman at mac.com (Nate Begeman) Date: Sat, 13 Aug 2005 01:14:29 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Message-ID: <200508130614.BAA22342@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAG.cpp updated: 1.138 -> 1.139 --- Log message: Remove an unncessary argument to SimplifySelectCC and add an additional assert when creating a select_cc node. --- Diffs of the changes: (+10 -8) SelectionDAG.cpp | 18 ++++++++++-------- 1 files changed, 10 insertions(+), 8 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.138 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.139 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.138 Sat Aug 13 01:00:21 2005 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Sat Aug 13 01:14:17 2005 @@ -686,9 +686,10 @@ return SDOperand(); } -SDOperand SelectionDAG::SimplifySelectCC(MVT::ValueType VT, ISD::CondCode CC, - SDOperand N1, SDOperand N2, SDOperand N3, - SDOperand N4) { +SDOperand SelectionDAG::SimplifySelectCC(SDOperand N1, SDOperand N2, + SDOperand N3, SDOperand N4, + ISD::CondCode CC) { + MVT::ValueType VT = N3.getValueType(); ConstantSDNode *N2C = dyn_cast(N2.Val); ConstantSDNode *N3C = dyn_cast(N3.Val); ConstantSDNode *N4C = dyn_cast(N4.Val); @@ -1490,9 +1491,8 @@ return getNode(ISD::AND, VT, N1, N2); } if (N1.getOpcode() == ISD::SETCC) { - SDOperand Simp = SimplifySelectCC(VT, - cast(N1.getOperand(2))->get(), - N1.getOperand(0), N1.getOperand(1), N2, N3); + SDOperand Simp = SimplifySelectCC(N1.getOperand(0), N1.getOperand(1), N2, + N3, cast(N1.getOperand(2))->get()); if (Simp.Val) return Simp; } break; @@ -1541,8 +1541,10 @@ "LHS and RHS of condition must have same type!"); assert(N3.getValueType() == N4.getValueType() && "True and False arms of SelectCC must have same type!"); - SDOperand Simp = SimplifySelectCC(VT, cast(N5)->get(), N1, - N2, N3, N4); + assert(N3.getValueType() == VT && + "select_cc node must be of same type as true and false value!"); + SDOperand Simp = SimplifySelectCC(N1, N2, N3, N4, + cast(N5)->get()); if (Simp.Val) return Simp; } From natebegeman at mac.com Sat Aug 13 01:14:29 2005 From: natebegeman at mac.com (Nate Begeman) Date: Sat, 13 Aug 2005 01:14:29 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAG.h Message-ID: <200508130614.BAA22338@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: SelectionDAG.h updated: 1.35 -> 1.36 --- Log message: Remove an unncessary argument to SimplifySelectCC and add an additional assert when creating a select_cc node. --- Diffs of the changes: (+2 -3) SelectionDAG.h | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) Index: llvm/include/llvm/CodeGen/SelectionDAG.h diff -u llvm/include/llvm/CodeGen/SelectionDAG.h:1.35 llvm/include/llvm/CodeGen/SelectionDAG.h:1.36 --- llvm/include/llvm/CodeGen/SelectionDAG.h:1.35 Sat Aug 13 01:00:21 2005 +++ llvm/include/llvm/CodeGen/SelectionDAG.h Sat Aug 13 01:14:17 2005 @@ -222,9 +222,8 @@ /// SimplifySelectCC - Try to simplify a select_cc built with the specified /// operands and cc. This can be used to simplify both the select_cc node, /// and a select node whose first operand is a setcc. - SDOperand SimplifySelectCC(MVT::ValueType VT, ISD::CondCode CC, - SDOperand N1, SDOperand N2, SDOperand N3, - SDOperand N4); + SDOperand SimplifySelectCC(SDOperand N1, SDOperand N2, SDOperand N3, + SDOperand N4, ISD::CondCode CC); // Maps to auto-CSE operations. std::map >, From lattner at cs.uiuc.edu Sat Aug 13 02:27:30 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 13 Aug 2005 02:27:30 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Message-ID: <200508130727.CAA23236@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: LoopStrengthReduce.cpp updated: 1.49 -> 1.50 --- Log message: Recursively scan scev expressions for common subexpressions. This allows us to handle nested loops much better, for example, by being able to tell that these two expressions: {( 8 + ( 16 * ( 1 + %Tmp11 + %Tmp12)) + %c_),+,( 16 * %Tmp 12)} {(( 16 * ( 1 + %Tmp11 + %Tmp12)) + %c_),+,( 16 * %Tmp12)} Have the following common part that can be shared: {(( 16 * ( 1 + %Tmp11 + %Tmp12)) + %c_),+,( 16 * %Tmp12)} This allows us to codegen an important inner loop in 168.wupwise as: .LBB_foo_4: ; no_exit.1 lfd f2, 16(r9) fmul f3, f0, f2 fmul f2, f1, f2 fadd f4, f3, f2 stfd f4, 8(r9) fsub f2, f3, f2 stfd f2, 16(r9) addi r8, r8, 1 addi r9, r9, 16 cmpw cr0, r8, r4 ble .LBB_foo_4 ; no_exit.1 instead of: .LBB_foo_3: ; no_exit.1 lfdx f2, r6, r9 add r10, r6, r9 lfd f3, 8(r10) fmul f4, f1, f2 fmadd f4, f0, f3, f4 stfd f4, 8(r10) fmul f3, f1, f3 fmsub f2, f0, f2, f3 stfdx f2, r6, r9 addi r9, r9, 16 addi r8, r8, 1 cmpw cr0, r8, r4 ble .LBB_foo_3 ; no_exit.1 --- Diffs of the changes: (+61 -28) LoopStrengthReduce.cpp | 89 +++++++++++++++++++++++++++++++++---------------- 1 files changed, 61 insertions(+), 28 deletions(-) Index: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp diff -u llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.49 llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.50 --- llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.49 Fri Aug 12 17:22:17 2005 +++ llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Sat Aug 13 02:27:18 2005 @@ -593,6 +593,36 @@ // Otherwise, no immediates to move. } + +/// IncrementAddExprUses - Decompose the specified expression into its added +/// subexpressions, and increment SubExpressionUseCounts for each of these +/// decomposed parts. +static void SeparateSubExprs(std::vector &SubExprs, + SCEVHandle Expr) { + if (SCEVAddExpr *AE = dyn_cast(Expr)) { + for (unsigned j = 0, e = AE->getNumOperands(); j != e; ++j) + SeparateSubExprs(SubExprs, AE->getOperand(j)); + } else if (SCEVAddRecExpr *SARE = dyn_cast(Expr)) { + SCEVHandle Zero = SCEVUnknown::getIntegerSCEV(0, Expr->getType()); + if (SARE->getOperand(0) == Zero) { + SubExprs.push_back(Expr); + } else { + // Compute the addrec with zero as its base. + std::vector Ops(SARE->op_begin(), SARE->op_end()); + Ops[0] = Zero; // Start with zero base. + SubExprs.push_back(SCEVAddRecExpr::get(Ops, SARE->getLoop())); + + + SeparateSubExprs(SubExprs, SARE->getOperand(0)); + } + } else if (!isa(Expr) || + !cast(Expr)->getValue()->isNullValue()) { + // Do not add zero. + SubExprs.push_back(Expr); + } +} + + /// RemoveCommonExpressionsFromUseBases - Look through all of the uses in Bases, /// removing any common subexpressions from it. Anything truly common is /// removed, accumulated, and returned. This looks for things like (a+b+c) and @@ -613,17 +643,21 @@ // If any subexpressions are used Uses.size() times, they are common. std::map SubExpressionUseCounts; - for (unsigned i = 0; i != NumUses; ++i) - if (SCEVAddExpr *AE = dyn_cast(Uses[i].Base)) { - for (unsigned j = 0, e = AE->getNumOperands(); j != e; ++j) - SubExpressionUseCounts[AE->getOperand(j)]++; - } else { - // If the base is zero (which is common), return zero now, there are no - // CSEs we can find. - if (Uses[i].Base == Zero) return Result; - SubExpressionUseCounts[Uses[i].Base]++; - } - + std::vector SubExprs; + for (unsigned i = 0; i != NumUses; ++i) { + // If the base is zero (which is common), return zero now, there are no + // CSEs we can find. + if (Uses[i].Base == Zero) return Zero; + + // Split the expression into subexprs. + SeparateSubExprs(SubExprs, Uses[i].Base); + // Add one to SubExpressionUseCounts for each subexpr present. + for (unsigned j = 0, e = SubExprs.size(); j != e; ++j) + SubExpressionUseCounts[SubExprs[j]]++; + SubExprs.clear(); + } + + // Now that we know how many times each is used, build Result. for (std::map::iterator I = SubExpressionUseCounts.begin(), E = SubExpressionUseCounts.end(); @@ -640,24 +674,23 @@ if (Result == Zero) return Result; // Otherwise, remove all of the CSE's we found from each of the base values. - for (unsigned i = 0; i != NumUses; ++i) - if (SCEVAddExpr *AE = dyn_cast(Uses[i].Base)) { - std::vector NewOps; - - // Remove all of the values that are now in SubExpressionUseCounts. - for (unsigned j = 0, e = AE->getNumOperands(); j != e; ++j) - if (!SubExpressionUseCounts.count(AE->getOperand(j))) - NewOps.push_back(AE->getOperand(j)); - if (NewOps.empty()) - Uses[i].Base = Zero; - else - Uses[i].Base = SCEVAddExpr::get(NewOps); - } else { - // If the base is zero (which is common), return zero now, there are no - // CSEs we can find. - assert(Uses[i].Base == Result); + for (unsigned i = 0; i != NumUses; ++i) { + // Split the expression into subexprs. + SeparateSubExprs(SubExprs, Uses[i].Base); + + // Remove any common subexpressions. + for (unsigned j = 0, e = SubExprs.size(); j != e; ++j) + if (SubExpressionUseCounts.count(SubExprs[j])) { + SubExprs.erase(SubExprs.begin()+j); + --j; --e; + } + + // Finally, the non-shared expressions together. + if (SubExprs.empty()) Uses[i].Base = Zero; - } + else + Uses[i].Base = SCEVAddExpr::get(SubExprs); + } return Result; } From lattner at cs.uiuc.edu Sat Aug 13 02:42:25 2005 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 13 Aug 2005 02:42:25 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Message-ID: <200508130742.CAA23821@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: LoopStrengthReduce.cpp updated: 1.50 -> 1.51 --- Log message: Ooops, don't forget to clear this. The real inner loop is now: .LBB_foo_3: ; no_exit.1 lfd f2, 0(r9) lfd f3, 8(r9) fmul f4, f1, f2 fmadd f4, f0, f3, f4 stfd f4, 8(r9) fmul f3, f1, f3 fmsub f2, f0, f2, f3 stfd f2, 0(r9) addi r9, r9, 16 addi r8, r8, 1 cmpw cr0, r8, r4 ble .LBB_foo_3 ; no_exit.1 --- Diffs of the changes: (+1 -0) LoopStrengthReduce.cpp | 1 + 1 files changed, 1 insertion(+) Index: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp diff -u llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.50 llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.51 --- llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.50 Sat Aug 13 02:27:18 2005 +++ llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Sat Aug 13 02:42:01 2005 @@ -690,6 +690,7 @@ Uses[i].Base = Zero; else Uses[i].Base = SCEVAddExpr::get(SubExprs); + SubExprs.clear(); } return Result; From alenhar2 at cs.uiuc.edu Sat Aug 13 09:58:34 2005 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Sat, 13 Aug 2005 09:58:34 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Makefile Message-ID: <200508131458.JAA22097@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Makefile updated: 1.5 -> 1.6 --- Log message: Testing a variable before it is defined doesn't work so well. It is a fairly small thing, so just let everyone build the .a file --- Diffs of the changes: (+0 -3) Makefile | 3 --- 1 files changed, 3 deletions(-) Index: llvm/lib/VMCore/Makefile diff -u llvm/lib/VMCore/Makefile:1.5 llvm/lib/VMCore/Makefile:1.6 --- llvm/lib/VMCore/Makefile:1.5 Sat Aug 13 00:09:50 2005 +++ llvm/lib/VMCore/Makefile Sat Aug 13 09:58:23 2005 @@ -8,10 +8,7 @@ ##===----------------------------------------------------------------------===## LEVEL = ../.. LIBRARYNAME = LLVMCore - -ifeq ($(ARCH),Alpha) BUILD_ARCHIVE = 1 -endif include $(LEVEL)/Makefile.common From natebegeman at mac.com Sat Aug 13 20:17:30 2005 From: natebegeman at mac.com (Nate Begeman) Date: Sat, 13 Aug 2005 20:17:30 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp README.txt Message-ID: <200508140117.UAA24085@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPC32ISelPattern.cpp updated: 1.137 -> 1.138 README.txt updated: 1.27 -> 1.28 --- Log message: Make FP_TO_UINT Illegal. This allows us to generate significantly better codegen for FP_TO_UINT by using the legalizer's SELECT variant. Implement a codegen improvement for SELECT_CC, selecting the false node in the MBB that feeds the phi node. This allows us to codegen: void foo(int *a, int b, int c) { int d = (a < b) ? 5 : 9; *a = d; } as: _foo: li r2, 5 cmpw cr0, r4, r3 bgt .LBB_foo_2 ; entry .LBB_foo_1: ; entry li r2, 9 .LBB_foo_2: ; entry stw r2, 0(r3) blr insted of: _foo: li r2, 5 li r5, 9 cmpw cr0, r4, r3 bgt .LBB_foo_2 ; entry .LBB_foo_1: ; entry or r2, r5, r5 .LBB_foo_2: ; entry stw r2, 0(r3) blr --- Diffs of the changes: (+35 -71) PPC32ISelPattern.cpp | 89 ++++++++++----------------------------------------- README.txt | 17 +++++++++ 2 files changed, 35 insertions(+), 71 deletions(-) Index: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp diff -u llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.137 llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.138 --- llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.137 Fri Aug 12 18:52:46 2005 +++ llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Sat Aug 13 20:17:16 2005 @@ -88,6 +88,9 @@ setOperationAction(ISD::SELECT, MVT::f32, Expand); setOperationAction(ISD::SELECT, MVT::f64, Expand); + // PowerPC does not have FP_TO_UINT + setOperationAction(ISD::FP_TO_UINT, MVT::i32, Expand); + setSetCCResultContents(ZeroOrOneSetCCResult); addLegalFPImmediate(+0.0); // Necessary for FSEL addLegalFPImmediate(-0.0); // @@ -1341,8 +1344,8 @@ switch (opcode) { default: - Node->dump(); - assert(0 && "\nNode not handled!\n"); + Node->dump(); std::cerr << '\n'; + assert(0 && "Node not handled!\n"); case ISD::UNDEF: BuildMI(BB, PPC::IMPLICIT_DEF, 0, Result); return Result; @@ -2000,75 +2003,14 @@ return Result+N.ResNo; } - case ISD::FP_TO_UINT: case ISD::FP_TO_SINT: { - bool U = (ISD::FP_TO_UINT == opcode); Tmp1 = SelectExpr(N.getOperand(0)); - if (!U) { - Tmp2 = MakeFPReg(); - BuildMI(BB, PPC::FCTIWZ, 1, Tmp2).addReg(Tmp1); - int FrameIdx = BB->getParent()->getFrameInfo()->CreateStackObject(8, 8); - addFrameReference(BuildMI(BB, PPC::STFD, 3).addReg(Tmp2), FrameIdx); - addFrameReference(BuildMI(BB, PPC::LWZ, 2, Result), FrameIdx, 4); - return Result; - } else { - unsigned Zero = getConstDouble(0.0); - unsigned MaxInt = getConstDouble((1LL << 32) - 1); - unsigned Border = getConstDouble(1LL << 31); - unsigned UseZero = MakeFPReg(); - unsigned UseMaxInt = MakeFPReg(); - unsigned UseChoice = MakeFPReg(); - unsigned TmpReg = MakeFPReg(); - unsigned TmpReg2 = MakeFPReg(); - unsigned ConvReg = MakeFPReg(); - unsigned IntTmp = MakeIntReg(); - unsigned XorReg = MakeIntReg(); - MachineFunction *F = BB->getParent(); - int FrameIdx = F->getFrameInfo()->CreateStackObject(8, 8); - // Update machine-CFG edges - MachineBasicBlock *XorMBB = new MachineBasicBlock(BB->getBasicBlock()); - MachineBasicBlock *PhiMBB = new MachineBasicBlock(BB->getBasicBlock()); - MachineBasicBlock *OldMBB = BB; - ilist::iterator It = BB; ++It; - F->getBasicBlockList().insert(It, XorMBB); - F->getBasicBlockList().insert(It, PhiMBB); - BB->addSuccessor(XorMBB); - BB->addSuccessor(PhiMBB); - // Convert from floating point to unsigned 32-bit value - // Use 0 if incoming value is < 0.0 - BuildMI(BB, PPC::FSEL, 3, UseZero).addReg(Tmp1).addReg(Tmp1).addReg(Zero); - // Use 2**32 - 1 if incoming value is >= 2**32 - BuildMI(BB, PPC::FSUB, 2, UseMaxInt).addReg(MaxInt).addReg(Tmp1); - BuildMI(BB, PPC::FSEL, 3, UseChoice).addReg(UseMaxInt).addReg(UseZero) - .addReg(MaxInt); - // Subtract 2**31 - BuildMI(BB, PPC::FSUB, 2, TmpReg).addReg(UseChoice).addReg(Border); - // Use difference if >= 2**31 - BuildMI(BB, PPC::FCMPU, 2, PPC::CR0).addReg(UseChoice).addReg(Border); - BuildMI(BB, PPC::FSEL, 3, TmpReg2).addReg(TmpReg).addReg(TmpReg) - .addReg(UseChoice); - // Convert to integer - BuildMI(BB, PPC::FCTIWZ, 1, ConvReg).addReg(TmpReg2); - addFrameReference(BuildMI(BB, PPC::STFD, 3).addReg(ConvReg), FrameIdx); - addFrameReference(BuildMI(BB, PPC::LWZ, 2, IntTmp), FrameIdx, 4); - BuildMI(BB, PPC::BLT, 2).addReg(PPC::CR0).addMBB(PhiMBB); - BuildMI(BB, PPC::B, 1).addMBB(XorMBB); - - // XorMBB: - // add 2**31 if input was >= 2**31 - BB = XorMBB; - BuildMI(BB, PPC::XORIS, 2, XorReg).addReg(IntTmp).addImm(0x8000); - XorMBB->addSuccessor(PhiMBB); - - // PhiMBB: - // DestReg = phi [ IntTmp, OldMBB ], [ XorReg, XorMBB ] - BB = PhiMBB; - BuildMI(BB, PPC::PHI, 4, Result).addReg(IntTmp).addMBB(OldMBB) - .addReg(XorReg).addMBB(XorMBB); - return Result; - } - assert(0 && "Should never get here"); - return 0; + Tmp2 = MakeFPReg(); + BuildMI(BB, PPC::FCTIWZ, 1, Tmp2).addReg(Tmp1); + int FrameIdx = BB->getParent()->getFrameInfo()->CreateStackObject(8, 8); + addFrameReference(BuildMI(BB, PPC::STFD, 3).addReg(Tmp2), FrameIdx); + addFrameReference(BuildMI(BB, PPC::LWZ, 2, Result), FrameIdx, 4); + return Result; } case ISD::SETCC: { @@ -2217,8 +2159,12 @@ assert(0 && "Should never get here"); } - unsigned TrueValue = SelectExpr(N.getOperand(2)); //Use if TRUE - unsigned FalseValue = SelectExpr(N.getOperand(3)); //Use if FALSE + // If the False value only has one use, we can generate better code by + // selecting it in the fallthrough basic block rather than here, which + // increases register pressure. + bool FalseHasOneUse = N.getOperand(3).Val->hasOneUse(); + unsigned TrueValue = SelectExpr(N.getOperand(2)); + unsigned FalseValue = FalseHasOneUse ? 0 : SelectExpr(N.getOperand(3)); unsigned CCReg = SelectCC(N.getOperand(0), N.getOperand(1), CC); Opc = getBCCForSetCC(CC); @@ -2249,6 +2195,7 @@ // %FalseValue = ... // # fallthrough to sinkMBB BB = copy0MBB; + if (FalseHasOneUse) FalseValue = SelectExpr(N.getOperand(3)); // Update machine-CFG edges BB->addSuccessor(sinkMBB); Index: llvm/lib/Target/PowerPC/README.txt diff -u llvm/lib/Target/PowerPC/README.txt:1.27 llvm/lib/Target/PowerPC/README.txt:1.28 --- llvm/lib/Target/PowerPC/README.txt:1.27 Tue Aug 9 17:30:57 2005 +++ llvm/lib/Target/PowerPC/README.txt Sat Aug 13 20:17:16 2005 @@ -8,6 +8,23 @@ la r2, lo16(l2__ZTV4Cell)(r2) addi r2, r2, 8 +* Teach LLVM how to codegen this: +unsigned short foo(float a) { return a; } +as: +_foo: + fctiwz f0,f1 + stfd f0,-8(r1) + lhz r3,-2(r1) + blr +not: +_foo: + fctiwz f0, f1 + stfd f0, -8(r1) + lwz r2, -4(r1) + rlwinm r3, r2, 0, 16, 31 + blr + + * Support 'update' load/store instructions. These are cracked on the G5, but are still a codesize win. From natebegeman at mac.com Sat Aug 13 20:21:04 2005 From: natebegeman at mac.com (Nate Begeman) Date: Sat, 13 Aug 2005 20:21:04 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Message-ID: <200508140121.UAA24104@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: LegalizeDAG.cpp updated: 1.158 -> 1.159 --- Log message: Teach the legalizer how to legalize FP_TO_UINT. Teach the legalizer to promote FP_TO_UINT to FP_TO_SINT if the wider FP_TO_UINT is also illegal. This allows us on PPC to codegen unsigned short foo(float a) { return a; } as: _foo: .LBB_foo_0: ; entry fctiwz f0, f1 stfd f0, -8(r1) lwz r2, -4(r1) rlwinm r3, r2, 0, 16, 31 blr instead of: _foo: .LBB_foo_0: ; entry fctiwz f0, f1 stfd f0, -8(r1) lwz r2, -4(r1) lis r3, ha16(.CPI_foo_0) lfs f0, lo16(.CPI_foo_0)(r3) fcmpu cr0, f1, f0 blt .LBB_foo_2 ; entry .LBB_foo_1: ; entry fsubs f0, f1, f0 fctiwz f0, f0 stfd f0, -16(r1) lwz r2, -12(r1) xoris r2, r2, 32768 .LBB_foo_2: ; entry rlwinm r3, r2, 0, 16, 31 blr --- Diffs of the changes: (+32 -3) LegalizeDAG.cpp | 35 ++++++++++++++++++++++++++++++++--- 1 files changed, 32 insertions(+), 3 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.158 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.159 --- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.158 Wed Aug 10 20:12:20 2005 +++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Sat Aug 13 20:20:53 2005 @@ -1610,7 +1610,25 @@ switch (TLI.getOperationAction(Node->getOpcode(), Node->getValueType(0))){ default: assert(0 && "Unknown operation action!"); case TargetLowering::Expand: - assert(0 && "Cannot expand FP_TO*INT yet"); + if (Node->getOpcode() == ISD::FP_TO_UINT) { + SDOperand True, False; + MVT::ValueType VT = Node->getOperand(0).getValueType(); + MVT::ValueType NVT = Node->getValueType(0); + unsigned ShiftAmt = MVT::getSizeInBits(Node->getValueType(0))-1; + Tmp2 = DAG.getConstantFP((double)(1ULL << ShiftAmt), VT); + Tmp3 = DAG.getSetCC(TLI.getSetCCResultTy(), + Node->getOperand(0), Tmp2, ISD::SETLT); + True = DAG.getNode(ISD::FP_TO_SINT, NVT, Node->getOperand(0)); + False = DAG.getNode(ISD::FP_TO_SINT, NVT, + DAG.getNode(ISD::SUB, VT, Node->getOperand(0), + Tmp2)); + False = DAG.getNode(ISD::XOR, NVT, False, + DAG.getConstant(1ULL << ShiftAmt, NVT)); + Result = LegalizeOp(DAG.getNode(ISD::SELECT, NVT, Tmp3, True, False)); + } else { + assert(0 && "Do not know how to expand FP_TO_SINT yet!"); + } + break; case TargetLowering::Promote: Result = PromoteLegalFP_TO_INT(Tmp1, Node->getValueType(0), Node->getOpcode() == ISD::FP_TO_SINT); @@ -1907,7 +1925,18 @@ case Expand: assert(0 && "not implemented"); } - Result = DAG.getNode(Node->getOpcode(), NVT, Tmp1); + // If we're promoting a UINT to a larger size, check to see if the new node + // will be legal. If it isn't, check to see if FP_TO_SINT is legal, since + // we can use that instead. This allows us to generate better code for + // FP_TO_UINT for small destination sizes on targets where FP_TO_UINT is not + // legal, such as PowerPC. + if (Node->getOpcode() == ISD::FP_TO_UINT && + TargetLowering::Legal != TLI.getOperationAction(ISD::FP_TO_UINT, NVT) && + TargetLowering::Legal == TLI.getOperationAction(ISD::FP_TO_SINT, NVT)) { + Result = DAG.getNode(ISD::FP_TO_SINT, NVT, Tmp1); + } else { + Result = DAG.getNode(Node->getOpcode(), NVT, Tmp1); + } break; case ISD::FABS: @@ -2078,7 +2107,7 @@ break; case ISD::CTTZ: //if Tmp1 == sizeinbits(NVT) then Tmp1 = sizeinbits(Old VT) - Tmp2 = DAG.getSetCC(MVT::i1, Tmp1, + Tmp2 = DAG.getSetCC(TLI.getSetCCResultTy(), Tmp1, DAG.getConstant(getSizeInBits(NVT), NVT), ISD::SETEQ); Result = DAG.getNode(ISD::SELECT, NVT, Tmp2, DAG.getConstant(getSizeInBits(VT),NVT), Tmp1); From jlaskey at apple.com Sat Aug 13 20:28:11 2005 From: jlaskey at apple.com (Jim Laskey) Date: Sat, 13 Aug 2005 22:28:11 -0300 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp In-Reply-To: <200508140121.UAA24104@zion.cs.uiuc.edu> References: <200508140121.UAA24104@zion.cs.uiuc.edu> Message-ID: Nate, Why the 16-bit mask? -- Jim On Aug 13, 2005, at 10:21 PM, Nate Begeman wrote: > > > Changes in directory llvm/lib/CodeGen/SelectionDAG: > > LegalizeDAG.cpp updated: 1.158 -> 1.159 > --- > Log message: > > Teach the legalizer how to legalize FP_TO_UINT. > Teach the legalizer to promote FP_TO_UINT to FP_TO_SINT if the wider > FP_TO_UINT is also illegal. This allows us on PPC to codegen > unsigned short foo(float a) { return a; } > > as: > _foo: > .LBB_foo_0: ; entry > fctiwz f0, f1 > stfd f0, -8(r1) > lwz r2, -4(r1) > rlwinm r3, r2, 0, 16, 31 > blr > > instead of: > _foo: > .LBB_foo_0: ; entry > fctiwz f0, f1 > stfd f0, -8(r1) > lwz r2, -4(r1) > lis r3, ha16(.CPI_foo_0) > lfs f0, lo16(.CPI_foo_0)(r3) > fcmpu cr0, f1, f0 > blt .LBB_foo_2 ; entry > .LBB_foo_1: ; entry > fsubs f0, f1, f0 > fctiwz f0, f0 > stfd f0, -16(r1) > lwz r2, -12(r1) > xoris r2, r2, 32768 > .LBB_foo_2: ; entry > rlwinm r3, r2, 0, 16, 31 > blr > > > --- > Diffs of the changes: (+32 -3) > > LegalizeDAG.cpp | 35 ++++++++++++++++++++++++++++++++--- > 1 files changed, 32 insertions(+), 3 deletions(-) > > > Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp > diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.158 llvm/ > lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.159 > --- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.158 Wed Aug > 10 20:12:20 2005 > +++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Sat Aug 13 > 20:20:53 2005 > @@ -1610,7 +1610,25 @@ > switch (TLI.getOperationAction(Node->getOpcode(), Node- > >getValueType(0))){ > default: assert(0 && "Unknown operation action!"); > case TargetLowering::Expand: > - assert(0 && "Cannot expand FP_TO*INT yet"); > + if (Node->getOpcode() == ISD::FP_TO_UINT) { > + SDOperand True, False; > + MVT::ValueType VT = Node->getOperand(0).getValueType(); > + MVT::ValueType NVT = Node->getValueType(0); > + unsigned ShiftAmt = MVT::getSizeInBits(Node->getValueType > (0))-1; > + Tmp2 = DAG.getConstantFP((double)(1ULL << ShiftAmt), VT); > + Tmp3 = DAG.getSetCC(TLI.getSetCCResultTy(), > + Node->getOperand(0), Tmp2, ISD::SETLT); > + True = DAG.getNode(ISD::FP_TO_SINT, NVT, Node->getOperand > (0)); > + False = DAG.getNode(ISD::FP_TO_SINT, NVT, > + DAG.getNode(ISD::SUB, VT, Node- > >getOperand(0), > + Tmp2)); > + False = DAG.getNode(ISD::XOR, NVT, False, > + DAG.getConstant(1ULL << ShiftAmt, > NVT)); > + Result = LegalizeOp(DAG.getNode(ISD::SELECT, NVT, Tmp3, > True, False)); > + } else { > + assert(0 && "Do not know how to expand FP_TO_SINT yet!"); > + } > + break; > case TargetLowering::Promote: > Result = PromoteLegalFP_TO_INT(Tmp1, Node->getValueType(0), > Node->getOpcode() == > ISD::FP_TO_SINT); > @@ -1907,7 +1925,18 @@ > case Expand: > assert(0 && "not implemented"); > } > - Result = DAG.getNode(Node->getOpcode(), NVT, Tmp1); > + // If we're promoting a UINT to a larger size, check to see if > the new node > + // will be legal. If it isn't, check to see if FP_TO_SINT is > legal, since > + // we can use that instead. This allows us to generate better > code for > + // FP_TO_UINT for small destination sizes on targets where > FP_TO_UINT is not > + // legal, such as PowerPC. > + if (Node->getOpcode() == ISD::FP_TO_UINT && > + TargetLowering::Legal != TLI.getOperationAction > (ISD::FP_TO_UINT, NVT) && > + TargetLowering::Legal == TLI.getOperationAction > (ISD::FP_TO_SINT, NVT)) { > + Result = DAG.getNode(ISD::FP_TO_SINT, NVT, Tmp1); > + } else { > + Result = DAG.getNode(Node->getOpcode(), NVT, Tmp1); > + } > break; > > case ISD::FABS: > @@ -2078,7 +2107,7 @@ > break; > case ISD::CTTZ: > //if Tmp1 == sizeinbits(NVT) then Tmp1 = sizeinbits(Old VT) > - Tmp2 = DAG.getSetCC(MVT::i1, Tmp1, > + Tmp2 = DAG.getSetCC(TLI.getSetCCResultTy(), Tmp1, > DAG.getConstant(getSizeInBits(NVT), > NVT), ISD::SETEQ); > Result = DAG.getNode(ISD::SELECT, NVT, Tmp2, > DAG.getConstant(getSizeInBits(VT),NVT), > Tmp1); > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > From natebegeman at mac.com Sat Aug 13 23:37:02 2005 From: natebegeman at mac.com (Nate Begeman) Date: Sat, 13 Aug 2005 23:37:02 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelPattern.cpp Message-ID: <200508140437.XAA24781@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ISelPattern.cpp updated: 1.166 -> 1.167 --- Log message: Fix FP_TO_UINT with Scalar SSE2 now that the legalizer can handle it. We now generate the relatively good code sequences: unsigned short foo(float a) { return a; } _foo: movss 4(%esp), %xmm0 cvttss2si %xmm0, %eax movzwl %ax, %eax ret and unsigned bar(float a) { return a; } _bar: movss .CPI_bar_0, %xmm0 movss 4(%esp), %xmm1 movapd %xmm1, %xmm2 subss %xmm0, %xmm2 cvttss2si %xmm2, %eax xorl $-2147483648, %eax cvttss2si %xmm1, %ecx ucomiss %xmm0, %xmm1 cmovb %ecx, %eax ret --- Diffs of the changes: (+9 -1) X86ISelPattern.cpp | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletion(-) Index: llvm/lib/Target/X86/X86ISelPattern.cpp diff -u llvm/lib/Target/X86/X86ISelPattern.cpp:1.166 llvm/lib/Target/X86/X86ISelPattern.cpp:1.167 --- llvm/lib/Target/X86/X86ISelPattern.cpp:1.166 Tue Aug 9 15:21:10 2005 +++ llvm/lib/Target/X86/X86ISelPattern.cpp Sat Aug 13 23:36:51 2005 @@ -141,12 +141,20 @@ setOperationAction(ISD::FP_TO_UINT , MVT::i1 , Promote); setOperationAction(ISD::FP_TO_UINT , MVT::i8 , Promote); setOperationAction(ISD::FP_TO_UINT , MVT::i16 , Promote); - setOperationAction(ISD::FP_TO_UINT , MVT::i32 , Promote); + + if (!X86ScalarSSE) + setOperationAction(ISD::FP_TO_UINT , MVT::i32 , Promote); // Promote i1/i8 FP_TO_SINT to larger FP_TO_SINTS's, as X86 doesn't have // this operation. setOperationAction(ISD::FP_TO_SINT , MVT::i1 , Promote); setOperationAction(ISD::FP_TO_SINT , MVT::i8 , Promote); + setOperationAction(ISD::FP_TO_SINT , MVT::i16 , Promote); + + // Expand FP_TO_UINT into a select. + // FIXME: We would like to use a Custom expander here eventually to do + // the optimal thing for SSE vs. the default expansion in the legalizer. + setOperationAction(ISD::FP_TO_UINT , MVT::i32 , Expand); setOperationAction(ISD::BRCONDTWOWAY , MVT::Other, Expand); setOperationAction(ISD::MEMMOVE , MVT::Other, Expand); From alenhar2 at cs.uiuc.edu Sun Aug 14 10:14:52 2005 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Sun, 14 Aug 2005 10:14:52 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Makefile Message-ID: <200508141514.KAA02016@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Makefile updated: 1.6 -> 1.7 --- Log message: only build .a on alpha --- Diffs of the changes: (+4 -0) Makefile | 4 ++++ 1 files changed, 4 insertions(+) Index: llvm/lib/VMCore/Makefile diff -u llvm/lib/VMCore/Makefile:1.6 llvm/lib/VMCore/Makefile:1.7 --- llvm/lib/VMCore/Makefile:1.6 Sat Aug 13 09:58:23 2005 +++ llvm/lib/VMCore/Makefile Sun Aug 14 10:14:34 2005 @@ -8,7 +8,11 @@ ##===----------------------------------------------------------------------===## LEVEL = ../.. LIBRARYNAME = LLVMCore + +include $(LEVEL)/Makefile.config +ifeq ($(ARCH),Alpha) BUILD_ARCHIVE = 1 +endif include $(LEVEL)/Makefile.common From natebegeman at mac.com Sun Aug 14 13:37:13 2005 From: natebegeman at mac.com (Nate Begeman) Date: Sun, 14 Aug 2005 13:37:13 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelPattern.cpp Message-ID: <200508141837.NAA09121@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ISelPattern.cpp updated: 1.167 -> 1.168 --- Log message: Fix last night's X86 regressions by putting code for SSE in the if(SSE) block. nur. --- Diffs of the changes: (+5 -5) X86ISelPattern.cpp | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) Index: llvm/lib/Target/X86/X86ISelPattern.cpp diff -u llvm/lib/Target/X86/X86ISelPattern.cpp:1.167 llvm/lib/Target/X86/X86ISelPattern.cpp:1.168 --- llvm/lib/Target/X86/X86ISelPattern.cpp:1.167 Sat Aug 13 23:36:51 2005 +++ llvm/lib/Target/X86/X86ISelPattern.cpp Sun Aug 14 13:37:02 2005 @@ -151,11 +151,6 @@ setOperationAction(ISD::FP_TO_SINT , MVT::i8 , Promote); setOperationAction(ISD::FP_TO_SINT , MVT::i16 , Promote); - // Expand FP_TO_UINT into a select. - // FIXME: We would like to use a Custom expander here eventually to do - // the optimal thing for SSE vs. the default expansion in the legalizer. - setOperationAction(ISD::FP_TO_UINT , MVT::i32 , Expand); - setOperationAction(ISD::BRCONDTWOWAY , MVT::Other, Expand); setOperationAction(ISD::MEMMOVE , MVT::Other, Expand); setOperationAction(ISD::SIGN_EXTEND_INREG, MVT::i16 , Expand); @@ -199,6 +194,11 @@ setOperationAction(ISD::SINT_TO_FP, MVT::i16, Promote); setOperationAction(ISD::FP_TO_SINT, MVT::i16, Promote); + // Expand FP_TO_UINT into a select. + // FIXME: We would like to use a Custom expander here eventually to do + // the optimal thing for SSE vs. the default expansion in the legalizer. + setOperationAction(ISD::FP_TO_UINT , MVT::i32 , Expand); + // We don't support sin/cos/sqrt/fmod setOperationAction(ISD::FSIN , MVT::f64, Expand); setOperationAction(ISD::FCOS , MVT::f64, Expand); From natebegeman at mac.com Sun Aug 14 13:38:43 2005 From: natebegeman at mac.com (Nate Begeman) Date: Sun, 14 Aug 2005 13:38:43 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Message-ID: <200508141838.NAA09140@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: LegalizeDAG.cpp updated: 1.159 -> 1.160 --- Log message: Fix last night's PPC32 regressions by 1. Not selecting the false value of a select_cc in the false arm, which isn't legal for nested selects. 2. Actually returning the node we created and Legalized in the FP_TO_UINT Expander. --- Diffs of the changes: (+1 -0) LegalizeDAG.cpp | 1 + 1 files changed, 1 insertion(+) Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.159 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.160 --- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.159 Sat Aug 13 20:20:53 2005 +++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Sun Aug 14 13:38:32 2005 @@ -1625,6 +1625,7 @@ False = DAG.getNode(ISD::XOR, NVT, False, DAG.getConstant(1ULL << ShiftAmt, NVT)); Result = LegalizeOp(DAG.getNode(ISD::SELECT, NVT, Tmp3, True, False)); + return Result; } else { assert(0 && "Do not know how to expand FP_TO_SINT yet!"); } From natebegeman at mac.com Sun Aug 14 13:38:43 2005 From: natebegeman at mac.com (Nate Begeman) Date: Sun, 14 Aug 2005 13:38:43 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Message-ID: <200508141838.NAA09144@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPC32ISelPattern.cpp updated: 1.138 -> 1.139 --- Log message: Fix last night's PPC32 regressions by 1. Not selecting the false value of a select_cc in the false arm, which isn't legal for nested selects. 2. Actually returning the node we created and Legalized in the FP_TO_UINT Expander. --- Diffs of the changes: (+1 -3) PPC32ISelPattern.cpp | 4 +--- 1 files changed, 1 insertion(+), 3 deletions(-) Index: llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp diff -u llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.138 llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.139 --- llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp:1.138 Sat Aug 13 20:17:16 2005 +++ llvm/lib/Target/PowerPC/PPC32ISelPattern.cpp Sun Aug 14 13:38:32 2005 @@ -2162,9 +2162,8 @@ // If the False value only has one use, we can generate better code by // selecting it in the fallthrough basic block rather than here, which // increases register pressure. - bool FalseHasOneUse = N.getOperand(3).Val->hasOneUse(); unsigned TrueValue = SelectExpr(N.getOperand(2)); - unsigned FalseValue = FalseHasOneUse ? 0 : SelectExpr(N.getOperand(3)); + unsigned FalseValue = SelectExpr(N.getOperand(3)); unsigned CCReg = SelectCC(N.getOperand(0), N.getOperand(1), CC); Opc = getBCCForSetCC(CC); @@ -2195,7 +2194,6 @@ // %FalseValue = ... // # fallthrough to sinkMBB BB = copy0MBB; - if (FalseHasOneUse) FalseValue = SelectExpr(N.getOperand(3)); // Update machine-CFG edges BB->addSuccessor(sinkMBB); From sabre at nondot.org Sun Aug 14 23:34:11 2005 From: sabre at nondot.org (Chris Lattner) Date: Sun, 14 Aug 2005 23:34:11 -0500 (CDT) Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp In-Reply-To: References: <200508140121.UAA24104@zion.cs.uiuc.edu> Message-ID: On Sat, 13 Aug 2005, Jim Laskey wrote: > Why the 16-bit mask? I haven't actually looked into it, but here's a guess. :) My guess is that the legalizer is producing this 32-bit load, which needs the top bits masked off. The better way to do it is to use lhz, but it's simple minded implementation doesn't know this. It might be worth seeing if we can make it a little smarter to avoid that, but the most general solution is to teach the code generator that things like: and (load32 P), 65535 can be turned into: load16 P[+2] if the load only has one use. This sort of thing is something that a future xformation framework called the DAG Combiner will handle. -Chris > On Aug 13, 2005, at 10:21 PM, Nate Begeman wrote: > >> >> >> Changes in directory llvm/lib/CodeGen/SelectionDAG: >> >> LegalizeDAG.cpp updated: 1.158 -> 1.159 >> --- >> Log message: >> >> Teach the legalizer how to legalize FP_TO_UINT. >> Teach the legalizer to promote FP_TO_UINT to FP_TO_SINT if the wider >> FP_TO_UINT is also illegal. This allows us on PPC to codegen >> unsigned short foo(float a) { return a; } >> >> as: >> _foo: >> .LBB_foo_0: ; entry >> fctiwz f0, f1 >> stfd f0, -8(r1) >> lwz r2, -4(r1) >> rlwinm r3, r2, 0, 16, 31 >> blr >> >> instead of: >> _foo: >> .LBB_foo_0: ; entry >> fctiwz f0, f1 >> stfd f0, -8(r1) >> lwz r2, -4(r1) >> lis r3, ha16(.CPI_foo_0) >> lfs f0, lo16(.CPI_foo_0)(r3) >> fcmpu cr0, f1, f0 >> blt .LBB_foo_2 ; entry >> .LBB_foo_1: ; entry >> fsubs f0, f1, f0 >> fctiwz f0, f0 >> stfd f0, -16(r1) >> lwz r2, -12(r1) >> xoris r2, r2, 32768 >> .LBB_foo_2: ; entry >> rlwinm r3, r2, 0, 16, 31 >> blr >> >> >> --- >> Diffs of the changes: (+32 -3) >> >> LegalizeDAG.cpp | 35 ++++++++++++++++++++++++++++++++--- >> 1 files changed, 32 insertions(+), 3 deletions(-) >> >> >> Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp >> diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.158 llvm/ >> lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.159 >> --- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.158 Wed Aug 10 >> 20:12:20 2005 >> +++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Sat Aug 13 20:20:53 >> 2005 >> @@ -1610,7 +1610,25 @@ >> switch (TLI.getOperationAction(Node->getOpcode(), Node- >> >getValueType(0))){ >> default: assert(0 && "Unknown operation action!"); >> case TargetLowering::Expand: >> - assert(0 && "Cannot expand FP_TO*INT yet"); >> + if (Node->getOpcode() == ISD::FP_TO_UINT) { >> + SDOperand True, False; >> + MVT::ValueType VT = Node->getOperand(0).getValueType(); >> + MVT::ValueType NVT = Node->getValueType(0); >> + unsigned ShiftAmt = MVT::getSizeInBits(Node->getValueType(0))-1; >> + Tmp2 = DAG.getConstantFP((double)(1ULL << ShiftAmt), VT); >> + Tmp3 = DAG.getSetCC(TLI.getSetCCResultTy(), >> + Node->getOperand(0), Tmp2, ISD::SETLT); >> + True = DAG.getNode(ISD::FP_TO_SINT, NVT, Node->getOperand(0)); >> + False = DAG.getNode(ISD::FP_TO_SINT, NVT, >> + DAG.getNode(ISD::SUB, VT, Node- >> >getOperand(0), >> + Tmp2)); >> + False = DAG.getNode(ISD::XOR, NVT, False, >> + DAG.getConstant(1ULL << ShiftAmt, NVT)); >> + Result = LegalizeOp(DAG.getNode(ISD::SELECT, NVT, Tmp3, True, >> False)); >> + } else { >> + assert(0 && "Do not know how to expand FP_TO_SINT yet!"); >> + } >> + break; >> case TargetLowering::Promote: >> Result = PromoteLegalFP_TO_INT(Tmp1, Node->getValueType(0), >> Node->getOpcode() == >> ISD::FP_TO_SINT); >> @@ -1907,7 +1925,18 @@ >> case Expand: >> assert(0 && "not implemented"); >> } >> - Result = DAG.getNode(Node->getOpcode(), NVT, Tmp1); >> + // If we're promoting a UINT to a larger size, check to see if the new >> node >> + // will be legal. If it isn't, check to see if FP_TO_SINT is legal, >> since >> + // we can use that instead. This allows us to generate better code >> for >> + // FP_TO_UINT for small destination sizes on targets where FP_TO_UINT >> is not >> + // legal, such as PowerPC. >> + if (Node->getOpcode() == ISD::FP_TO_UINT && >> + TargetLowering::Legal != TLI.getOperationAction(ISD::FP_TO_UINT, >> NVT) && >> + TargetLowering::Legal == TLI.getOperationAction(ISD::FP_TO_SINT, >> NVT)) { >> + Result = DAG.getNode(ISD::FP_TO_SINT, NVT, Tmp1); >> + } else { >> + Result = DAG.getNode(Node->getOpcode(), NVT, Tmp1); >> + } >> break; >> >> case ISD::FABS: >> @@ -2078,7 +2107,7 @@ >> break; >> case ISD::CTTZ: >> //if Tmp1 == sizeinbits(NVT) then Tmp1 = sizeinbits(Old VT) >> - Tmp2 = DAG.getSetCC(MVT::i1, Tmp1, >> + Tmp2 = DAG.getSetCC(TLI.getSetCCResultTy(), Tmp1, >> DAG.getConstant(getSizeInBits(NVT), NVT), >> ISD::SETEQ); >> Result = DAG.getNode(ISD::SELECT, NVT, Tmp2, >> DAG.getConstant(getSizeInBits(VT),NVT), Tmp1); >> >> >> >> _______________________________________________ >> llvm-commits mailing list >> llvm-commits at cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits >> > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > -Chris -- http://nondot.org/sabre/ http://llvm.org/