search for: reg_empty

Displaying 20 results from an estimated 21 matches for "reg_empty".

2012 Nov 01
2
[LLVMdev] problem trying to write an LLVM register-allocation pass
...oblem go away. Again, I tried a very simple register allocator (attached) that just calls vrm.assignVirt2Phys for every vreg in each function, mapping the vreg to the first preg in the register class. I tried two versions: one maps *every* vreg, and the other only maps those for which MRI->reg_empty(vreg) returns false. In both cases I get a core dump somewhere after my reg-allocation pass has run (when I use the "tst.c" file that I sent last time as input). Note also that there is no VirtRegMap.h in the "include" directory of my installed llvm-3.1. I had to copy that...
2012 Oct 31
3
[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 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 o...
2012 Nov 01
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...Again, I tried a very simple register > allocator (attached) that just calls vrm.assignVirt2Phys for every vreg in > each function, mapping the vreg to the first preg in the register class. I > tried two versions: one maps *every* vreg, and the other only maps those > for which MRI->reg_empty(vreg) returns false. In both cases I get a core > dump somewhere after my reg-allocation pass has run (when I use the "tst.c" > file that I sent last time as input). > > Note also that there is no VirtRegMap.h in the "include" directory of my > installed llvm-3.1...
2012 Nov 01
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...ng 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 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...
2012 Nov 01
2
[LLVMdev] problem trying to write an LLVM register-allocation pass
...very simple > register allocator (attached) that just calls vrm.assignVirt2Phys > for every vreg in each function, mapping the vreg to the first preg > in the register class. I tried two versions: one maps *every* vreg, > and the other only maps those for which MRI->reg_empty(vreg) returns > false. In both cases I get a core dump somewhere after my > reg-allocation pass has run (when I use the "tst.c" file that I sent > last time as input). > > Note also that there is no VirtRegMap.h in the "include" directory >...
2012 Nov 01
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...;> register allocator (attached) that just calls vrm.assignVirt2Phys >> for every vreg in each function, mapping the vreg to the first preg >> in the register class. I tried two versions: one maps *every* vreg, >> and the other only maps those for which MRI->reg_empty(vreg) returns >> false. In both cases I get a core dump somewhere after my >> reg-allocation pass has run (when I use the "tst.c" file that I sent >> last time as input). >> >> Note also that there is no VirtRegMap.h in the "include&quot...
2012 Nov 03
2
[LLVMdev] problem trying to write an LLVM register-allocation pass
...vrm.assignVirt2Phys > for every vreg in each function, mapping the vreg to the > first preg > in the register class. I tried two versions: one maps > *every* vreg, > and the other only maps those for which > MRI->reg_empty(vreg) returns > false. In both cases I get a core dump somewhere after my > reg-allocation pass has run (when I use the "tst.c" file > that I sent > last time as input). > > Note also that there is no VirtRegMap.h...
2012 Nov 04
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...gister allocator (attached) that just calls vrm.assignVirt2Phys >>> for every vreg in each function, mapping the vreg to the first preg >>> in the register class. I tried two versions: one maps *every* vreg, >>> and the other only maps those for which MRI->reg_empty(vreg) returns >>> false. In both cases I get a core dump somewhere after my >>> reg-allocation pass has run (when I use the "tst.c" file that I sent >>> last time as input). >>> >>> Note also that there is no VirtRegMap.h in th...
2012 Nov 04
3
[LLVMdev] problem trying to write an LLVM register-allocation pass
...for every vreg in each function, mapping the vreg to >> the first preg >> in the register class. I tried two versions: one >> maps *every* vreg, >> and the other only maps those for which >> MRI->reg_empty(vreg) returns >> false. In both cases I get a core dump somewhere >> after my >> reg-allocation pass has run (when I use the "tst.c" >> file that I sent >> last time as input). >>...
2012 Nov 05
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...ator (attached) that just calls vrm.assignVirt2Phys >>>> for every vreg in each function, mapping the vreg to the first preg >>>> in the register class. I tried two versions: one maps *every* vreg, >>>> and the other only maps those for which MRI->reg_empty(vreg) returns >>>> false. In both cases I get a core dump somewhere after my >>>> reg-allocation pass has run (when I use the "tst.c" file that I sent >>>> last time as input). >>>> >>>> Note also that there is n...
2012 Nov 05
2
[LLVMdev] problem trying to write an LLVM register-allocation pass
...ng the vreg >>> to the first preg >>> in the register class. I tried two versions: one >>> maps *every* vreg, >>> and the other only maps those for which >>> MRI->reg_empty(vreg) returns >>> false. In both cases I get a core dump somewhere >>> after my >>> reg-allocation pass has run (when I use the >>> "tst.c" file that I sent >>>...
2012 Nov 07
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...>> to the first preg >>>> in the register class. I tried two versions: one >>>> maps *every* vreg, >>>> and the other only maps those for which >>>> MRI->reg_empty(vreg) returns >>>> false. In both cases I get a core dump somewhere >>>> after my >>>> reg-allocation pass has run (when I use the >>>> "tst.c" file that I sent >&gt...
2012 Nov 11
2
[LLVMdev] problem trying to write an LLVM register-allocation pass
...first preg >>>>>> in the register class. I tried two versions: one >>>>>> maps *every* vreg, >>>>>> and the other only maps those for which >>>>>> MRI->reg_empty(vreg) returns >>>>>> false. In both cases I get a core dump somewhere >>>>>> after my >>>>>> reg-allocation pass has run (when I use the >>>>>> "tst....
2012 Nov 08
2
[LLVMdev] problem trying to write an LLVM register-allocation pass
...to the first preg >>>>> in the register class. I tried two versions: one >>>>> maps *every* vreg, >>>>> and the other only maps those for which >>>>> MRI->reg_empty(vreg) returns >>>>> false. In both cases I get a core dump somewhere >>>>> after my >>>>> reg-allocation pass has run (when I use the >>>>> "tst.c" file tha...
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 Nov 11
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...ass. I >> tried two versions: one >> maps *every* vreg, >> and the other only maps >> those for which >> MRI->reg_empty(vreg) returns >> false. In both cases I >> get a core dump somewhere >> after my >> reg-allocation pass has run (when I use the >>...
2012 Nov 13
5
[LLVMdev] problem trying to write an LLVM register-allocation pass
...gt;>>>>> in the register class. I tried two versions: one >>>>>>> maps *every* vreg, >>>>>>> and the other only maps those for which >>>>>>> MRI->reg_empty(vreg) returns >>>>>>> false. In both cases I get a core dump somewhere >>>>>>> after my >>>>>>> reg-allocation pass has run (when I use the >>>>>>>...
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 09
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...in the register class. I > tried two versions: one > maps *every* vreg, > and the other only maps those > for which > MRI->reg_empty(vreg) returns > false. In both cases I get a > core dump somewhere > after my > reg-allocation pass has run > (when I use the &...
2012 Nov 13
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...wo versions: one >>> maps *every* vreg, >>> and the other only >>> maps those for which >>> MRI->reg_empty(vreg) returns >>> false. In both cases >>> I get a core dump somewhere >>> after my >>> reg-al...