[llvm-commits] Fixing Bug 13662: paired register for inline asm with 64-bit data on ARM

Weiming Zhao weimingz at codeaurora.org
Wed Oct 3 11:30:02 PDT 2012


Hi Jakob,

I implemented a GPRPair with "untyped".
However, during building DAG, (SelectionDAGBuilder::visitInlineASM),  when
it tries to do getCopyFromRegs, it fails. 
This is because RegisterVT is unknow, so it cannot match with value type.
And after the unknow type or i64 propagates, more places need to be
repaired/specially treated.

Since this inline asm issue is blocking the compiling of Linux Kernel using
LLVM, and the ldrexd/strexd intrinsics adopt the same approach as my patch,
I suggest let's check in this patch now. In future, when LLVM supports legal
i64 type, this will be easily fixed.  

Thanks,
Weiming

Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by
The Linux Foundation


-----Original Message-----
From: Jakob Stoklund Olesen [mailto:stoklund at 2pi.dk] 
Sent: Tuesday, October 02, 2012 9:34 AM
To: Jim Grosbach
Cc: Weiming Zhao; llvm-commits at cs.uiuc.edu LLVM
Subject: Re: [llvm-commits] Fixing Bug 13662: paired register for inline asm
with 64-bit data on ARM


On Oct 1, 2012, at 8:40 AM, Jim Grosbach <grosbach at apple.com> wrote:

> Hello,
> 
> I'm a bit confused by the following FIXME from the patch:
> +      // FIXME: When LLVM supports paired register class for 64-bit data
in
> +      // future, we should just return that register class here and let
register
> +      // allocator to assign physical registers.
> 
> Why not just add such a register class and use it? It seems that would
make all of the AssignedPhysRegs handling unnecessary.

I agree, we need a GPRPair register class similar to the DPair class.

The problems caused by SelectionDAG's type system can be worked around by
making the register class untyped, like the DTriple class. I agree that i64
should not be a legal type on ARM.

/jakob





More information about the llvm-commits mailing list