Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Jul 2011 22:10:28 +0200
From:      Roman Divacky <rdivacky@freebsd.org>
To:        Marcel Moolenaar <marcel@FreeBSD.org>
Cc:        svn-src-projects@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r223767 - in projects/llvm-ia64: contrib/llvm/lib/Target/IA64 lib/clang/include
Message-ID:  <20110704201028.GA5939@freebsd.org>
In-Reply-To: <201107041951.p64JpQDk032074@svn.freebsd.org>
References:  <201107041951.p64JpQDk032074@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
First of all.. big wow :) This is awesome progress.

On Mon, Jul 04, 2011 at 07:51:26PM +0000, Marcel Moolenaar wrote:
> Author: marcel
> Date: Mon Jul  4 19:51:26 2011
> New Revision: 223767
> URL: http://svn.freebsd.org/changeset/base/223767
> 
> Log:
>   o  Implement LowerFormalArguments() LowerReturn() using CallingConv and
>      for general registers only.
>   o  Implement IA64InstrInfo::copyPhysReg() for general registers. This
>      is needed during lowering and before copy elimination.

This seems wrong. See below.

> +void
> +IA64InstrInfo::copyPhysReg(MachineBasicBlock &MBB,
> +    MachineBasicBlock::iterator MI, DebugLoc DL, unsigned DestReg,
> +    unsigned SrcReg, bool KillSrc) const
> +{
> +  bool GRDest = IA64::GRRegClass.contains(DestReg);
> +  bool GRSrc  = IA64::GRRegClass.contains(SrcReg);
> +
> +  if (GRDest && GRSrc) {
> +    MachineInstrBuilder MIB = BuildMI(MBB, MI, DL, get(IA64::ADD), DestReg);
> +    MIB.addReg(IA64::R0);
> +    MIB.addReg(SrcReg, getKillRegState(KillSrc));
> +    return;
> +  }
> +
> +  llvm_unreachable(__func__);
> +}

copyPhysReg() done via ADD ? Is this just some temporary measure to achieve
emission of any code? I am not even sure how this can work. The IR should
require you to lower the ISD::ADD node, right? You don't seem to be doing that.

Anyway, pretty good progress - seems like you're getting grasp of LLVM very
fast!

roman



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110704201028.GA5939>