Displaying 20 results from an estimated 70 matches for "vrm".
Did you mean:
vr
2008 May 28
3
[LLVMdev] Possible VirtRegMap Bug
I've been playing around with spillers and found that the SimpleSpiller fails
badly on a particular code.
The problem arises because SimpleSpiller does the test
VRM.isAssignedReg(virtReg) which is implemented as:
00183 bool isAssignedReg(unsigned virtReg) const {
00184 if (getStackSlot(virtReg) == NO_STACK_SLOT &&
00185 getReMatId(virtReg) == NO_STACK_SLOT)
00186 return true;
00187 // Split register can be assigned a...
2007 Aug 06
5
[LLVMdev] Spillers
...ain the theory behind the spillers in VirtRegMap.cpp?
It seems as though the spillers do triple duty:
- Insert load/store operations and/or fold instructions as necessary to carry
out spills
- Rewrite the spilled virtual registers to use machine registers (mapping
given by the caller in the VRM).
- Rewrite machine code to change virtual registers to physical registers
(mapping given by the caller in the VRM, presumably the caller is regalloc).
My question concerns duty #2. There is code in the spiller that assumes
intervals created to spill a virtual register have been mapped to phy...
2008 May 30
0
[LLVMdev] Possible VirtRegMap Bug
On May 27, 2008, at 5:36 PM, David Greene wrote:
> I've been playing around with spillers and found that the
> SimpleSpiller fails
> badly on a particular code.
>
> The problem arises because SimpleSpiller does the test
> VRM.isAssignedReg(virtReg) which is implemented as:
>
> 00183 bool isAssignedReg(unsigned virtReg) const {
> 00184 if (getStackSlot(virtReg) == NO_STACK_SLOT &&
> 00185 getReMatId(virtReg) == NO_STACK_SLOT)
> 00186 return true;
> 00187 // Spli...
2007 Aug 07
0
[LLVMdev] Spillers
...to fold the load / store. The spiller doesn't actually perform the
"folding". It needs to know that they have happened to keep track of
reuse information.
>
> - Rewrite the spilled virtual registers to use machine registers
> (mapping
> given by the caller in the VRM).
>
> - Rewrite machine code to change virtual registers to physical
> registers
> (mapping given by the caller in the VRM, presumably the caller is
> regalloc).
Right.
>
> My question concerns duty #2. There is code in the spiller that
> assumes
> intervals cr...
2006 Aug 21
0
[LLVMdev] Recalculating live intervals
...-------------------------------------------------------------
void RegAllocChordal_Fer::spill(
unsigned v_reg,
KillingSites_Fer & ks,
const MachineBasicBlock & mbb
) {
// First, find a place to store this register. Of course, this will be
done
// by the implementation of vrm. We just have to ask it.
int slot = vrm->assignVirt2StackSlot(v_reg);
unsigned p_reg = this->reg_mapping->get_physical_location(v_reg);
// Now, it is necessary to break the live range of the spilled
register.
// This is done by creating new virtual registers, and substitut...
2006 Aug 14
2
[LLVMdev] Folding instructions
..., the error does not happen. But
I realized something important: I am not mapping virtuals to physicals
strait on VirtRegMap during the scan. I use my own data structures to
record the register assignment, and write on VirtRegMap after I am done,
on a single step. When I remove the command this->vrm->virtFolded(v_reg,
mi, u, fmi) from my code, the error does not happen. So, I think I am not
using VirtRegMap properly. It seems to me that I don't have to call this
method during the scan, because instruction operands still contain
virtuals, not physical registers, as it would be expected....
2017 Jun 05
3
VirtRegMap invariant: no reserved physical registers?
Hey all,
I've found a bug in either the PBQP register allocator or in VirtRegRewriter.
I'm observing this assertion in VirtRegRewriter::rewrite() fail:
unsigned VirtReg = MO.getReg();
unsigned PhysReg = VRM->getPhys(VirtReg);
...
assert(!MRI->isReserved(PhysReg) && "Reserved register assignment");
Indeed there is a case where PhysReg may be a reserved physical register. Specificially, RegAllocPBQP::finalizeAlloc() may select a physical register thusly:...
2009 Jul 17
2
[LLVMdev] Bug in LiveIntervals? Please Examine
...der MIB =
BuildMI(*RMBB, RMI, RMI->getDebugLoc(),
tii_->get(TargetInstrInfo::IMPLICIT_DEF), NewVReg);
(*MIB).getOperand(0).setIsUndef();
RMO.setReg(NewVReg);
RMO.setIsUndef();
RMO.setIsKill();
}
Souldn't there be a call to vrm.grow() after each call to
mri->createVirtualRegister()?
-Dave
2006 Aug 21
2
[LLVMdev] Recalculating live intervals
So what addIntervalsToSpills returns are new intervals to allocate with
infinite weights, right?
And I need not to allocate the old interval. Should hasStackSlot return true
on its register then?
On 8/21/06, Fernando Magno Quintao Pereira <fernando at cs.ucla.edu> wrote:
>
>
> Well, someone correct me if am wrong, but, you still have to allocate
> physical registers to them,
2009 Jul 17
0
[LLVMdev] Bug in LiveIntervals? Please Examine
..., RMI, RMI->getDebugLoc(),
> tii_->get(TargetInstrInfo::IMPLICIT_DEF), NewVReg);
> (*MIB).getOperand(0).setIsUndef();
> RMO.setReg(NewVReg);
> RMO.setIsUndef();
> RMO.setIsKill();
> }
>
> Souldn't there be a call to vrm.grow() after each call to
> mri->createVirtualRegister()?
No. This function is run during the analysis stage. vrm is actually
owned by the register allocator which then passed it into
liveintervals. Is there an actual problem that you run into?
Evan
>
>...
2006 Aug 14
2
[LLVMdev] Folding instructions
...g is:
const TargetMachine & target_machine =
this->machine_function->getTarget();
const MRegisterInfo *ri = target_machine.getRegisterInfo();
MachineInstr * fmi = ri->foldMemoryOperand(mi, u, slot);
if(fmi) {
numFolded++;
MachineBasicBlock * mbb = mi->getParent();
this->vrm->virtFolded(v_reg, mi, u, fmi);
//std::cerr << "Folding " << NeatPrint::mi2string(*mi,
*this->machine_function) << "\n";
// TODO: see if it is not necessary to iterate
// again on the instruction.
return mbb->insert(mbb->erase(mi), fmi);...
2006 Aug 14
0
[LLVMdev] Folding instructions
...rget_machine =
> this->machine_function->getTarget();
> const MRegisterInfo *ri = target_machine.getRegisterInfo();
> MachineInstr * fmi = ri->foldMemoryOperand(mi, u, slot);
> if(fmi) {
> numFolded++;
> MachineBasicBlock * mbb = mi->getParent();
> this->vrm->virtFolded(v_reg, mi, u, fmi);
> //std::cerr << "Folding " << NeatPrint::mi2string(*mi,
> *this->machine_function) << "\n";
> // TODO: see if it is not necessary to iterate
> // again on the instruction.
> return mbb->insert...
2010 May 19
0
how to remove interactions of factor with continuous var
I need to remove certain interactions and keep only the one between the second level of the factor and the continuous var t2
bin4 <- glm(resp2~ t*t2+c5.vrm,data=dfa,family="quasibinomial")
> summary(bin4)
Call:
glm(formula = resp2 ~ t * t2 + c5.vrm, family = "quasibinomial",
data = dfa)
Deviance Residuals:
Min 1Q Median 3Q Max
-6.5464 -3.0720 -1.8135 0.4896 28.9207
Coefficients:
Es...
2013 Oct 18
1
hurdle model error why does need integer values for the dependent variable?
Dear list,
I am using the hurdle model for modelling the habitat of rare fish species. However I do get an error message when I try to model my data:
> test_new1<-hurdle(GALUMEL~ depth + sal + slope + vrm + lat:long + offset(log(haul_numb)), dist = "negbin", data = datafit_elasmo)
Error in hurdle(GALUMEL ~ depth + sal + slope + vrm + lat:long + offset(log(haul_numb)), :
invalid dependent variable, non-integer values
When I do fit the same model with round(my dependent variable) the mo...
2006 Aug 14
0
[LLVMdev] Folding instructions
On Mon, 14 Aug 2006, Fernando Magno Quintao Pereira wrote:
> I reload spilled code. If I am doing something evidently wrong, I would
> appreciate if someone tells me. With the comment on vrm->virtFolded, I am
> passing all the tests that I have.
I haven't had a chance to look at the code you have below, but I would
guess that you are leaving a dangling pointer in some map somewhere.
"foldMemoryOperand", if successful, leaves the original instruction in the
progr...
2009 Jan 13
2
[LLVMdev] Possible bug in the ARM backend?
...gt;> in MBB#0 define the LR? It should be enough, or?
>
> Every machine basic block must list physical register livein's.
One question, just to be sure I understand you correctly. You mean
that after the RegAlloc has assigned physical registers to
LiveIntervals and before it calls the VRM to rewrite the function, it
should explicitly add lives-ins for each MBB, just like LinearScan
does it at the end of the RALinScan::linearScan() function???
E.g. like this:
// Add live-ins to every BB except for entry. Also perform trivial coalescing.
MachineFunction::iterator EntryMBB = mf_-...
2011 Nov 30
2
[LLVMdev] Register allocation in two passes
...after the spill code handling inside selectOrSplit() (ignoring some control
logic):
for (LiveIntervals::const_iterator I = LIS->begin(), E = LIS->end(); I !=
E;
++I)
{
unsigned VirtReg = I->first;
if ((TargetRegisterInfo::isVirtualRegister(VirtReg))
&& (VRM->getPhys(VirtReg) == REG_Y))
{
LiveInterval &LI = LIS->getInterval(VirtReg);
unassign(LI, REG_Y);
enqueue(&LI);
}
}
RegClassInfo.runOnMachineFunction(VRM->getMachineFunction()); // update
reserve reglist
So similar to what's done in LRE_WillShrinkVi...
2012 Nov 01
2
[LLVMdev] problem trying to write an LLVM register-allocation pass
Hi again Lang,
I decided to try the approach you proposed to see whether it makes the
assembly-code problem 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-allocat...
2015 Mar 07
2
[LLVMdev] Open Projects in LLVM
Hello,
I have worked on LLVM for my project related to Register Allocation.
Bernhard Scholz suggested that Implementing Branch and Bound Heuristic for
Reduce N in PBQP register Allocation for LLVM would be to great project to
work on.
I'm looking forward to implement it in LLVM system.
How should i get start about it ?
I would also like to know about some of the other projects in LLVM.
2012 Nov 01
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...te the virtual
register mapping (VirtRegMap pass) with your allocation, rather than
rewriting the registers directly through MachineRegisterInfo.
Have your allocator require and preserve the VirtRegMap pass, then in your
runOnMachineFunction pass grab a reference to the pass with:
VirtRegMap &vrm = getAnalysis<VirtRegMap>();
You can then describe your register allocations with:
vrm.assignVirt2Phys(<virtreg>, <physreg>)
The VirtRegRewriter pass (in VirtRegMap.cpp) will run after your allocator
and apply the mapping that you described in the VirtRegMap.
I hope this helps...