search for: replaceregwith

Displaying 20 results from an estimated 28 matches for "replaceregwith".

2014 Sep 05
5
[LLVMdev] [PATCH] [MachineSinking] Conservatively clear kill flags after coalescing.
...100644 >>> --- a/lib/CodeGen/MachineSink.cpp >>> +++ b/lib/CodeGen/MachineSink.cpp >>> @@ -157,6 +157,11 @@boolMachineSinking::PerformTrivialForwardCoalescing(MachineInstr*MI, >>> DEBUG(dbgs() << "*** to: " << *MI); >>> MRI->replaceRegWith(DstReg,SrcReg); >>> MI->eraseFromParent(); >>> + >>> + // Conservatively, clear any kill flags, since it's possible that they are no >>> + // longer correct. >>> + MRI->clearKillFlags(SrcReg); >>> + >>> ++NumCoalesces; &gt...
2008 Apr 01
2
[LLVMdev] reg_iterator Caveats
...ny interfaces in MachineRegisterInfo to keep the information up to date as instructions are added or deleted. Do I need to depend on some Pass? What does coalescing do with this information? Does it update it as intervals are merged and instructions are changed? I thought MachineRegisterInfo::replaceRegWith might handle this but it doesn't update MachineRegisterInfo::VRegInfo. -Dave
2014 Sep 05
3
[LLVMdev] [PATCH] [MachineSinking] Conservatively clear kill flags after coalescing.
...ink.cpp b/lib/CodeGen/MachineSink.cpp index 7782001..261af54 100644 --- a/lib/CodeGen/MachineSink.cpp +++ b/lib/CodeGen/MachineSink.cpp @@ -157,6 +157,11 @@ bool MachineSinking::PerformTrivialForwardCoalescing(MachineInstr *MI, DEBUG(dbgs() << "*** to: " << *MI); MRI->replaceRegWith(DstReg, SrcReg); MI->eraseFromParent(); + + // Conservatively, clear any kill flags, since it's possible that they are no + // longer correct. + MRI->clearKillFlags(SrcReg); + ++NumCoalesces; return true; } -- 2.1.0 From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces...
2012 Oct 31
3
[LLVMdev] problem trying to write an LLVM register-allocation pass
...of runOnMachineFunction I call Fn.getRegInfo().getNumVirtRegs(); and find that there is 1 virtual register. However, MRI->reg_empty(vreg) tells me that it is not used or defined. So my register-allocation code never sees it, and thus can't allocate a preg for it. I tried using MRI->replaceRegWith(vreg, preg); (where preg is available to vreg's register class) but that didn't work. When I look, the number of vregs in the function is still 1. Can you help with this? Thanks again! Susan On 10/31/2012 04:55 PM, Lang Hames wrote: > Hi Susan, > > The meaning of "addRe...
2012 Nov 01
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...call Fn.getRegInfo().** > getNumVirtRegs(); > and find that there is 1 virtual register. However, MRI->reg_empty(vreg) > tells me that it is not used or defined. So my register-allocation code > never sees it, and thus can't allocate a preg for it. I tried using > MRI->replaceRegWith(vreg, preg); > (where preg is available to vreg's register class) but that didn't work. > When I look, the number of vregs in the function is still 1. > > Can you help with this? > > Thanks again! > > Susan > > > On 10/31/2012 04:55 PM, Lang Hames wrote: &g...
2012 Nov 01
2
[LLVMdev] problem trying to write an LLVM register-allocation pass
...getNumVirtRegs(); > and find that there is 1 virtual register. However, > MRI->reg_empty(vreg) > tells me that it is not used or defined. So my register-allocation > code never sees it, and thus can't allocate a preg for it. I tried > using MRI->replaceRegWith(vreg, preg); > (where preg is available to vreg's register class) but that didn't > work. When I look, the number of vregs in the function is still 1. > > Can you help with this? > > Thanks again! > > Susan > > > On 10/31/2012 04:55...
2008 Apr 01
0
[LLVMdev] reg_iterator Caveats
...date. Start looking at MachineOperand::setReg for example to see what happens when you change the register an operand refers to. > What does coalescing do with this information? Does it update it as > intervals are merged and instructions are changed? I thought > MachineRegisterInfo::replaceRegWith might handle this but it doesn't > update MachineRegisterInfo::VRegInfo. No passes need to update this info explicitly. -Chris -- http://nondot.org/sabre/ http://llvm.org/
2012 Nov 01
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...; >> and find that there is 1 virtual register. However, >> MRI->reg_empty(vreg) >> tells me that it is not used or defined. So my register-allocation >> code never sees it, and thus can't allocate a preg for it. I tried >> using MRI->replaceRegWith(vreg, preg); >> (where preg is available to vreg's register class) but that didn't >> work. When I look, the number of vregs in the function is still 1. >> >> Can you help with this? >> >> Thanks again! >> >> Susan >&gt...
2008 Apr 01
0
[LLVMdev] reg_iterator Caveats
On Monday 31 March 2008 18:55, Chris Lattner wrote: > On Mon, 31 Mar 2008, Evan Cheng wrote: > >> I just discovered that def_itterator (and presumably, reg_iterator) > >> doesn't > >> include implicit defs, for example at function calls for caller-save > >> physical > >> registers. Guh. I'm not sure if it should or not, but it's
2012 Nov 01
2
[LLVMdev] problem trying to write an LLVM register-allocation pass
...register. However, > MRI->reg_empty(vreg) > tells me that it is not used or defined. So my > register-allocation > code never sees it, and thus can't allocate a preg for it. > I tried > using MRI->replaceRegWith(vreg, preg); > (where preg is available to vreg's register class) but that > didn't > work. When I look, the number of vregs in the function is > still 1. > > Can you help with this? > > Thanks agai...
2012 Oct 31
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
Hi Susan, The meaning of "addRequired(X)" is that your pass needs X to be run, and for X to be preserved by all passes that run after X and before your pass. The PHIElemination and TwoAddressInstruction passes do not preserve each other, hence there's no way for the pass manager to schedule them for you if you addRequire(...) them. The trick is that CodeGen will schedule both of
2012 Oct 31
2
[LLVMdev] problem trying to write an LLVM register-allocation pass
I'm trying to write a MachineFunctionPass to do register allocation. I have code that worked with an old version of LLVM. It does not work with llvm-3.1. (or various other versions that I've tried). The first problem is that including this line: AU.addRequiredID(TwoAddressInstructionPassID); in method getAnalysisUsage causes a runtime error: Unable to schedule 'Eliminate PHI
2008 Mar 31
5
[LLVMdev] reg_iterator Caveats
On Mon, 31 Mar 2008, Evan Cheng wrote: >> I just discovered that def_itterator (and presumably, reg_iterator) >> doesn't >> include implicit defs, for example at function calls for caller-save >> physical >> registers. Guh. I'm not sure if it should or not, but it's certainly >> necessary information in some cases. Is this expected behavior, or an
2012 Nov 01
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...;> MRI->reg_empty(vreg) >> tells me that it is not used or defined. So my >> register-allocation >> code never sees it, and thus can't allocate a preg for it. >> I tried >> using MRI->replaceRegWith(vreg, preg); >> (where preg is available to vreg's register class) but that >> didn't >> work. When I look, the number of vregs in the function is >> still 1. >> >> Can you help with this? >> &...
2012 Nov 03
2
[LLVMdev] problem trying to write an LLVM register-allocation pass
...empty(vreg) > tells me that it is not used or defined. So my > register-allocation > code never sees it, and thus can't allocate a > preg for it. > I tried > using MRI->replaceRegWith(vreg, preg); > (where preg is available to vreg's register > class) but that > didn't > work. When I look, the number of vregs in the > function is > still 1. > >...
2012 Nov 04
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...MRI->reg_empty(vreg) >>> tells me that it is not used or defined. So my >>> register-allocation >>> code never sees it, and thus can't allocate a preg for it. >>> I tried >>> using MRI->replaceRegWith(vreg, preg); >>> (where preg is available to vreg's register class) but that >>> didn't >>> work. When I look, the number of vregs in the function is >>> still 1. >>> >>> Can you he...
2012 Nov 04
3
[LLVMdev] problem trying to write an LLVM register-allocation pass
...lls me that it is not used or defined. So my >> register-allocation >> code never sees it, and thus can't allocate >> a preg for it. >> I tried >> using MRI->replaceRegWith(vreg, preg); >> (where preg is available to vreg's register >> class) but that >> didn't >> work. When I look, the number of vregs in >> the function is >>...
2012 Nov 05
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...reg) >>>> tells me that it is not used or defined. So my >>>> register-allocation >>>> code never sees it, and thus can't allocate a preg for it. >>>> I tried >>>> using MRI->replaceRegWith(vreg, preg); >>>> (where preg is available to vreg's register class) but that >>>> didn't >>>> work. When I look, the number of vregs in the function is >>>> still 1. >>>> >>>>...
2012 Nov 05
2
[LLVMdev] problem trying to write an LLVM register-allocation pass
...So my >>> register-allocation >>> code never sees it, and thus can't >>> allocate a preg for it. >>> I tried >>> using MRI->replaceRegWith(vreg, preg); >>> (where preg is available to vreg's >>> register class) but that >>> didn't >>> work. When I look, the number of vregs >>>...
2012 Nov 07
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...t; register-allocation >>>> code never sees it, and thus can't >>>> allocate a preg for it. >>>> I tried >>>> using MRI->replaceRegWith(vreg, preg); >>>> (where preg is available to vreg's >>>> register class) but that >>>> didn't >>>> work. When I look, the number of vregs >&...