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

Weiming Zhao weimingz at codeaurora.org
Tue Dec 4 14:36:37 PST 2012


Hi Jakob,

 

Thanks for your reviewing.

Are you suggesting to first fix the DAG framework to let it support untyped
nodes, and then in ARM inline asm, we use copyToReg/CopyFromReg instead of
creating virtual regs?

 

Thanks,

Weiming

 

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

 

From: Jakob Stoklund Olesen [mailto:stoklund at 2pi.dk] 
Sent: Tuesday, December 04, 2012 10:19 AM
To: weimingz at codeaurora.org; Zhao
Cc: Evan Cheng; llvm-commits at cs.uiuc.edu; grosbach at apple.com
Subject: Re: [llvm-commits] Fixing Bug 13662: paired register for inline asm
with 64-bit data on ARM

 

 

On Dec 4, 2012, at 9:04 AM, Weiming Zhao <weimingz at codeaurora.org> wrote:

 

I have to change CodeGen/SelectionDAG/InstrEmitter.cpp a litte bit because:
for the inline asm nodes, I have to put a virtual reg instead of a value
node.

 

Hi Weiming,

 

I'm a bit concerned about this change. A RegisterSDNode doesn't include any
kind of dependency edges, so you have a 50/50 chance of you virtual register
def coming before your use. I don't think you can use virtual registers in
the SelectionDAG that way.

 

And due to "untyped" type, I can't insert CopyFromReg or CopyToReg as the
framework won't find the GPRPairReg class.

So I have to directly connect ExtractSubReg, RegSequence with a Register
SDNode.

 

An 'untyped' SelectionDAG edge only works when InstrEmitter can derive its
register class from the defining node. That currently works for REG_SEQUENCE
nodes - you probably need to make it work for INLINEASM nodes as well.

 

It would also be a good idea to break your patch in two: One part for
providing the target-independent framework needed, and one part that fixes
the ARM target.

 

/jakob

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121204/ab09b4f5/attachment.html>


More information about the llvm-commits mailing list