search for: getnumvirtreg

Displaying 20 results from an estimated 29 matches for "getnumvirtreg".

Did you mean: getnumvirtregs
2012 Oct 31
3
[LLVMdev] problem trying to write an LLVM register-allocation pass
Thanks Lang! Here's another question: I'm trying to process this input: int main() { return 0; } but I'm getting an error Assertion `!Fn.getRegInfo().getNumVirtRegs() && "Regalloc must assign all vregs"' failed. At the start 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 co...
2012 Nov 01
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...Wed, Oct 31, 2012 at 3:54 PM, Susan Horwitz <horwitz at cs.wisc.edu> wrote: > Thanks Lang! > > Here's another question: I'm trying to process this input: > > int main() { > return 0; > } > > but I'm getting an error > Assertion `!Fn.getRegInfo().**getNumVirtRegs() && "Regalloc must assign > all vregs"' failed. > > At the start 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....
2012 Nov 01
2
[LLVMdev] problem trying to write an LLVM register-allocation pass
...<mailto:horwitz at cs.wisc.edu>> wrote: > > Thanks Lang! > > Here's another question: I'm trying to process this input: > > int main() { > return 0; > } > > but I'm getting an error > Assertion `!Fn.getRegInfo(). getNumVirtRegs() && "Regalloc must > assign all vregs"' failed. > > At the start of runOnMachineFunction I call Fn.getRegInfo(). > getNumVirtRegs(); > and find that there is 1 virtual register. However, > MRI->reg_empty(vreg) > tells me tha...
2012 Nov 01
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...ote: >> >> Thanks Lang! >> >> Here's another question: I'm trying to process this input: >> >> int main() { >> return 0; >> } >> >> but I'm getting an error >> Assertion `!Fn.getRegInfo(). getNumVirtRegs() && "Regalloc must >> >> assign all vregs"' failed. >> >> At the start of runOnMachineFunction I call Fn.getRegInfo(). >> getNumVirtRegs(); >> and find that there is 1 virtual register. However, >> MRI->reg_...
2012 Oct 23
2
[LLVMdev] x86 Frame Pointer with AVX
...e of code though... > // Be over-conservative: scan over all vreg defs and find whether vector > // registers are used. If yes, there is a possibility that vector register > // will be spilled and thus require dynamic stack realignment. > for (unsigned i = 0, e = RI.getNumVirtRegs(); i != e; ++i) { > unsigned Reg = TargetRegisterInfo::index2VirtReg(i); > if (RI.getRegClass(Reg)->getAlignment() > StackAlignment) { > FuncInfo->setForceFramePointer(true); // <= Forces Frame Pointer for any AVX reg use!!! > return true; &g...
2012 Nov 01
2
[LLVMdev] problem trying to write an LLVM register-allocation pass
...Thanks Lang! > > Here's another question: I'm trying to process this input: > > int main() { > return 0; > } > > but I'm getting an error > Assertion `!Fn.getRegInfo(). getNumVirtRegs() && > "Regalloc must > > assign all vregs"' failed. > > At the start of runOnMachineFunction I call Fn.getRegInfo(). > getNumVirtRegs(); > and find that there is 1 virtual register. However, &g...
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
2012 Nov 01
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...gt; Here's another question: I'm trying to process this input: >> >> int main() { >> return 0; >> } >> >> but I'm getting an error >> Assertion `!Fn.getRegInfo(). getNumVirtRegs() && >> "Regalloc must >> >> assign all vregs"' failed. >> >> At the start of runOnMachineFunction I call Fn.getRegInfo(). >> getNumVirtRegs(); >> and find that there is 1 vi...
2012 Nov 03
2
[LLVMdev] problem trying to write an LLVM register-allocation pass
...;s another question: I'm trying to process > this input: > > int main() { > return 0; > } > > but I'm getting an error > Assertion `!Fn.getRegInfo(). getNumVirtRegs() && > "Regalloc must > > assign all vregs"' failed. > > At the start of runOnMachineFunction I call > Fn.getRegInfo(). > getNumVirtRegs(); > an...
2012 Nov 04
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...another question: I'm trying to process this input: >>> >>> int main() { >>> return 0; >>> } >>> >>> but I'm getting an error >>> Assertion `!Fn.getRegInfo(). getNumVirtRegs() && >>> "Regalloc must >>> >>> assign all vregs"' failed. >>> >>> At the start of runOnMachineFunction I call Fn.getRegInfo(). >>> getNumVirtRegs(); >>>...
2012 Nov 04
3
[LLVMdev] problem trying to write an LLVM register-allocation pass
...t: >> >> int main() { >> return 0; >> } >> >> but I'm getting an error >> Assertion `!Fn.getRegInfo(). >> getNumVirtRegs() && >> "Regalloc must >> >> assign all vregs"' failed. >> >> At the start of runOnMachineFunction I call >> Fn.getRegInfo(). >>...
2012 Nov 05
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...ying to process this input: >>>> >>>> int main() { >>>> return 0; >>>> } >>>> >>>> but I'm getting an error >>>> Assertion `!Fn.getRegInfo(). getNumVirtRegs() && >>>> "Regalloc must >>>> >>>> assign all vregs"' failed. >>>> >>>> At the start of runOnMachineFunction I call >>>> Fn.getRegInfo(). >>>> ge...
2012 Nov 05
2
[LLVMdev] problem trying to write an LLVM register-allocation pass
...int main() { >>> return 0; >>> } >>> >>> but I'm getting an error >>> Assertion `!Fn.getRegInfo(). >>> getNumVirtRegs() && >>> "Regalloc must >>> >>> assign all vregs"' failed. >>> >>> At the start of runOnMachineFunction I >>> call Fn.getRegInfo()....
2012 Oct 23
0
[LLVMdev] x86 Frame Pointer with AVX
...// Be over-conservative: scan over all vreg defs and find whether >> vector >> // registers are used. If yes, there is a possibility that vector >> register >> // will be spilled and thus require dynamic stack realignment. >> for (unsigned i = 0, e = RI.getNumVirtRegs(); i != e; ++i) { >> unsigned Reg = TargetRegisterInfo::index2VirtReg(i); >> if (RI.getRegClass(Reg)->getAlignment() > StackAlignment) { >> FuncInfo->setForceFramePointer(true); // <= Forces Frame Pointer >> for any AVX reg use!!! >>...
2012 Nov 07
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...gt;> return 0; >>>> } >>>> >>>> but I'm getting an error >>>> Assertion `!Fn.getRegInfo(). >>>> getNumVirtRegs() && >>>> "Regalloc must >>>> >>>> assign all vregs"' failed. >>>> >>>> At the start of runOnMachineFunction I >>>>...
2012 Nov 11
2
[LLVMdev] problem trying to write an LLVM register-allocation pass
...return 0; >>>>>> } >>>>>> >>>>>> but I'm getting an error >>>>>> Assertion `!Fn.getRegInfo(). >>>>>> getNumVirtRegs() && >>>>>> "Regalloc must >>>>>> >>>>>> assign all vregs"' failed. >>>>>> >>>>>> At the start of runOnMachineFu...
2012 Nov 08
2
[LLVMdev] problem trying to write an LLVM register-allocation pass
...return 0; >>>>> } >>>>> >>>>> but I'm getting an error >>>>> Assertion `!Fn.getRegInfo(). >>>>> getNumVirtRegs() && >>>>> "Regalloc must >>>>> >>>>> assign all vregs"' failed. >>>>> >>>>> At the start of runOnMachineFunction I >>&gt...
2012 Nov 11
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...int main() { >> return 0; >> } >> >> but I'm getting an error >> Assertion `!Fn.getRegInfo(). >> getNumVirtRegs() && >> "Regalloc must >> >> assign all vregs"' failed. >> >> At the start of runOnMachineFunction I >> ca...
2018 Jan 15
0
Checking when Register Allocation has been performed
Maybe MF.getProperties().hasProperty(MachineFunctionProperties::Property::NoVRegs))? ~Craig On Mon, Jan 15, 2018 at 12:07 PM, Martin J. O'Riordan via llvm-dev < llvm-dev at lists.llvm.org> wrote: > Hi LLVM Devs, > > > > I have some shared code that performs lowering operations that can occur > before or after register allocation. When it is pre-RA I want to only use