Displaying 5 results from an estimated 5 matches for "substphysreg".
2012 Nov 15
1
[LLVMdev] problem trying to write an LLVM register-allocation pass
Thanks Lang, I'll try substPhysReg.
I did try your latest code, and although it made the assembler errors go
away, now some of my tests produce bad output when executed. I need to
look into that some more... (I did change my "usedPregSet" to be ALL
pregs used in the whole function, not just those in the current
inst...
2012 Nov 15
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
Hi Susan,
Jakob just pointed me to 'MachineOperand::substPhysReg(unsigned preg, const
TargetRegisterInfo& TRI)'. That substitutes the given physreg for a virtreg
operand, taking the subregister index into account. That is what my
examples have been doing manually. Using substPhysReg would allow you to
tidy the Gcra code up slightly.
- Lang.
On Thu, No...
2012 Nov 15
2
[LLVMdev] problem trying to write an LLVM register-allocation pass
Thanks Jakob. I should have mentioned that earlier. :)
When you see mismatched sizes on operands it's a fair bet that the subreg
rewriting has gone wrong. I should have pulled that entirely out of the
preg search loop in the previous example.
Fixed version attached.
- Lang.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2011 May 09
2
[LLVMdev] wide memory accesses
...imply read 32 bytes and the use the subregisters accordingly, without unnecessary copying.
I have tried two techniques, in the MachineFunction:
1. replace the MachineOperands in the users of the data with the new register/subregister index. This yields an assert failure during VirtRegRewriter, in substPhysReg: "Invalid SubReg for physical register", after the Two-address rewrote this:
%reg16445<def> = add %reg16507:hi16, %reg16510:hi16 ; 32bit:16507,16510, 16bit: 16445
prepend: %reg16445<def> = COPY %reg16507;
rewrite to: %reg16445<def> = addh_1_8 %reg16445:hi16...
2011 May 09
0
[LLVMdev] wide memory accesses
...and the use the subregisters accordingly, without unnecessary copying.
>
> I have tried two techniques, in the MachineFunction:
>
> 1. replace the MachineOperands in the users of the data with the new register/subregister index. This yields an assert failure during VirtRegRewriter, in substPhysReg: "Invalid SubReg for physical register", after the Two-address rewrote this:
>
> %reg16445<def> = add %reg16507:hi16, %reg16510:hi16 ; 32bit:16507,16510, 16bit: 16445
> prepend: %reg16445<def> = COPY %reg16507;
> rewrite to: %reg16445<def> = add...