search for: getkillregst

Displaying 9 results from an estimated 9 matches for "getkillregst".

2013 Feb 23
2
[LLVMdev] Assertion failed after my storeRegToStackSlot/loadFromStackSlot
...ed to store 16 bit register I will must to split it to two instruction like this: BuildMI(MBB, MI, dl, get(Z80::LD8xmr)) .addFrameIndex(FrameIndex).addImm(0) .addReg(SrcReg, 0, Z80::subreg_lo); BuildMI(MBB, MI, dl, get(Z80::LD8xmr)) .addFrameIndex(FrameIndex).addImm(1) .addReg(SrcReg, getKillRegState(isKill), Z80::subreg_hi); After this store I catch assertion failed: "Instruction not found in maps", because only last of this instruction added in Instruction maps. How can I avoid assertion failed in this case? Best regards, Dmitriy.
2013 Mar 04
0
[LLVMdev] Assertion failed after my storeRegToStackSlot/loadFromStackSlot
...t to split it to two > instruction like this: > > BuildMI(MBB, MI, dl, get(Z80::LD8xmr)) > .addFrameIndex(FrameIndex).**addImm(0) > .addReg(SrcReg, 0, Z80::subreg_lo); > BuildMI(MBB, MI, dl, get(Z80::LD8xmr)) > .addFrameIndex(FrameIndex).**addImm(1) > .addReg(SrcReg, getKillRegState(isKill), Z80::subreg_hi); > > After this store I catch assertion failed: "Instruction not found in > maps", because only last of this instruction added in Instruction maps. > How can I avoid assertion failed in this case? > > Best regards, Dmitriy. > > _________...
2014 Aug 20
2
[LLVMdev] ARMv4T Copy Lowering
...amp;MBB, MachineBasicBlock::iterator I, DebugLoc DL, unsigned DestReg, unsigned SrcReg, bool KillSrc) const { - AddDefaultPred(BuildMI(MBB, I, DL, get(ARM::tMOVr), DestReg) - .addReg(SrcReg, getKillRegState(KillSrc))); + // Need to check the arch. + MachineFunction &MF = *MBB.getParent(); + const ARMSubtarget &st = MF.getTarget().getSubtarget<ARMSubtarget>(); + assert(ARM::GPRRegClass.contains(DestReg, SrcReg) && "Thumb1 can only copy GPR registers");...
2009 May 13
2
[LLVMdev] RFC: Code Gen Change!
...xplicit true/false isn't passed into the addReg method. I added some helper functions to help make this less of a pain: inline unsigned getDefRegState(bool B) { return B ? RegState::Define : 0; } inline unsigned getImplRegState(bool B) { return B ? RegState::Implicit : 0; } inline unsigned getKillRegState(bool B) { return B ? RegState::Kill : 0; } inline unsigned getDeadRegState(bool B) { return B ? RegState::Dead : 0; } So you can use them like this: BuildMI(...).addReg(Reg, getKillRegState(isKill); My hope is that this is a cleaner way of building these machine instructions. Comments an...
2015 Feb 11
2
[LLVMdev] deleting or replacing a MachineInst
...ands() >= 2); MachineOperand &Reg = OldMI->getOperand(0); MachineOperand &Imm = OldMI->getOperand(1); assert(Reg.isReg()); assert(Imm.isImm()); imm = Imm.getImm(); if (imm >= 32) continue; kill = getKillRegState(Reg.isKill()); switch (Reg.getReg()) { default: assert(false); case X86::RAX: case X86::EAX: case X86::AX: if (imm < 8) NewMI = BUILD_INS(TEST8i8, AL, 1 << imm); else if (imm < 16) NewMI =...
2013 Mar 06
1
[LLVMdev] Assertion failed after my storeRegToStackSlot/loadFromStackSlot
...o two instruction like this: > > BuildMI(MBB, MI, dl, get(Z80::LD8xmr)) > .addFrameIndex(FrameIndex).addImm(0) > .addReg(SrcReg, 0, Z80::subreg_lo); > BuildMI(MBB, MI, dl, get(Z80::LD8xmr)) > .addFrameIndex(FrameIndex).addImm(1) > .addReg(SrcReg, getKillRegState(isKill), Z80::subreg_hi); > > After this store I catch assertion failed: "Instruction not found > in maps", because only last of this instruction added in > Instruction maps. > How can I avoid assertion failed in this case? > > Best regards, Dmi...
2013 Jan 18
0
[LLVMdev] llvm backend porting question ,
...(Picoblaze::STORETOSTACK ));//.addMemOperand(MMO); if (RC == &Picoblaze::GR8RegClass) { // BuildMI(MBB, MI, DL, get(Picoblaze::ADD8ri )) // .addReg(Picoblaze::BP) // .addImm(FrameIdx); BuildMI(MBB, MI, DL, get(Picoblaze::STORE_I)) .addImm(FrameIdx) .addReg(SrcReg,getKillRegState(isKill)) ; // .addMemOperand(MMO); ;//addReg(Picoblaze::BP); // BuildMI(MBB, MI, DL, get(Picoblaze::ADD8ri )) // .addReg(Picoblaze::BP) // .addImm(-FrameIdx); } else llvm_unreachable("Cannot store this register to stack slot!"); BuildMI(MBB, MI...
2015 Feb 11
2
[LLVMdev] deleting or replacing a MachineInst
I'm writing a peephole pass and I'm done with the X86_64 instruction level detail work. But I'm having difficulty with the basic block surgery of replacing the old MachineInst. The peephole pass gets called per MachineFunction and then iterates over each MachineBasicBlock and in turn over each MachineInst. When it finds an instruction which should be replaced, it builds a new
2017 Mar 14
3
llvm-stress crash
Hi, Using llvm-stress, I got a crash after Post-RA pseudo expansion, with machine verifier. A 128 bit register %vreg233:subreg_l32<def,read-undef> = LLCRMux %vreg119; GR128Bit:%vreg233 GRX32Bit:%vreg119 gets spilled: %vreg265:subreg_l32<def,read-undef> = LLCRMux %vreg119; GR128Bit:%vreg265 GRX32Bit:%vreg119 ST128 %vreg265, <fi#10>, 0, %noreg;