[llvm-commits] [llvm] r45623 - /llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
Evan Cheng
evan.cheng at apple.com
Sat Jan 5 00:36:05 PST 2008
Hrm. ReMat of load from argument area is being handled as a special
case in LiveIntervals::isReMaterializable(). Having
isReallyTrivallyReMaterializable() returns true for it shouldn't make
any difference. I'll look at this.
Evan
On Jan 4, 2008, at 10:10 PM, Chris Lattner wrote:
> Author: lattner
> Date: Sat Jan 5 00:10:42 2008
> New Revision: 45623
>
> URL: http://llvm.org/viewvc/llvm-project?rev=45623&view=rev
> Log:
> enable sinking and licm of loads from the argument area. I'd like
> to enable this
> for remat, but can't due to an RA bug.
>
> Modified:
> llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
>
> Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/
> X86InstrInfo.cpp?rev=45623&r1=45622&r2=45623&view=diff
>
> ======================================================================
> ========
> --- llvm/trunk/lib/Target/X86/X86InstrInfo.cpp (original)
> +++ llvm/trunk/lib/Target/X86/X86InstrInfo.cpp Sat Jan 5 00:10:42
> 2008
> @@ -141,6 +141,18 @@
> MI->getOperand(2).getImm() == 1 &&
> MI->getOperand(3).getReg() == 0)
> return true;
> +
> + // If this is a load from a fixed argument slot, we know the
> value is
> + // invariant across the whole function, because we don't
> redefine argument
> + // values.
> +#if 0
> + // FIXME: This is disabled due to a remat bug. rdar://5671644
> + MachineFunction *MF = MI->getParent()->getParent();
> + if (MI->getOperand(1).isFI() &&
> + MF->getFrameInfo()->isFixedObjectIndex(MI->getOperand
> (1).getIndex()))
> + return true;
> +#endif
> +
> return false;
> }
> // All other instructions marked M_REMATERIALIZABLE are always
> trivially
> @@ -188,6 +200,15 @@
> MI->getOperand(2).getImm() == 1 &&
> MI->getOperand(3).getReg() == 0)
> return true;
> +
> + // If this is a load from a fixed argument slot, we know the
> value is
> + // invariant across the whole function, because we don't
> redefine argument
> + // values.
> + MachineFunction *MF = MI->getParent()->getParent();
> + if (MI->getOperand(1).isFI() &&
> + MF->getFrameInfo()->isFixedObjectIndex(MI->getOperand
> (1).getIndex()))
> + return true;
> +
> return false;
> }
>
>
>
> _______________________________________________
> 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