[llvm-commits] [llvm] r106310 - /llvm/trunk/lib/Target/X86/X86FastISel.cpp
Chris Lattner
clattner at apple.com
Fri Jun 18 14:19:43 PDT 2010
On Jun 18, 2010, at 1:44 PM, Dan Gohman wrote:
> Author: djg
> Date: Fri Jun 18 15:44:47 2010
> New Revision: 106310
>
> URL: http://llvm.org/viewvc/llvm-project?rev=106310&view=rev
> Log:
> Fix X86FastISel's address-mode folding to stay within the
> original basic block. This avoids trouble with examining
> instructions in other basic blocks which haven't been
> assigned registers yet.
This makes sense to me. Is there any reason to compare the MBB's? Why not compare the BB* to avoid a map lookup? I don't think we have a many-bb-to-one-mbb mapping.
-Chris
>
> Modified:
> llvm/trunk/lib/Target/X86/X86FastISel.cpp
>
> Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FastISel.cpp?rev=106310&r1=106309&r2=106310&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/X86/X86FastISel.cpp (original)
> +++ llvm/trunk/lib/Target/X86/X86FastISel.cpp Fri Jun 18 15:44:47 2010
> @@ -342,6 +342,12 @@
> const User *U = NULL;
> unsigned Opcode = Instruction::UserOp1;
> if (const Instruction *I = dyn_cast<Instruction>(V)) {
> + // Don't walk into other basic blocks; it's possible we haven't
> + // visited them yet, so the instructions may not yet be assigned
> + // virtual registers.
> + if (MBBMap[I->getParent()] != MBB)
> + return false;
> +
> Opcode = I->getOpcode();
> U = I;
> } else if (const ConstantExpr *C = dyn_cast<ConstantExpr>(V)) {
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list