search for: origbb

Displaying 4 results from an estimated 4 matches for "origbb".

2013 May 13
1
[LLVMdev] Problem with MachineFunctionPass and JMP
...new basicblock and I want to add a jump to an another BB from my new BB. Here is my code : bool Obfuscation::runOnMachineFunction(MachineFunction &MF) { MachineBasicBlock *newEntry = MF.CreateMachineBasicBlock(); MF.insert(MF.begin(), newEntry); std::vector<MachineBasicBlock*> origBB; for(MachineFunction::iterator i = MF.begin(); i != MF.end(); ++i) origBB.push_back(i); for(unsigned int i = 0; i < origBB.size(); ++i) origBB.at(i)->moveAfter(newEntry); MCInstrInfo tii = *MF.getTarget().getInstrInfo(); MachineInstr *plop = BuildMI(MF, DebugL...
2020 Mar 13
2
How to simply split MachineBasicBlock ?
Hi I am developing some machine function pass. I want to split MachineBasicBlcok when I find some specific machine instruction. But I don't insert or delete any machine instruction. I just "simply" , "purely" split the MachineBasicBlcok. (So, I stole the idea from ARM64BranchRelaxation::splitBlockBeforeInstr.) This is my code : // I would pass call instruction to
2008 Apr 16
0
[LLVMdev] Being able to know the jitted code-size before emitting
...} > } > > @@ -617,7 +617,7 @@ > unsigned NewBBSize = 0; > for (MachineBasicBlock::iterator I = NewBB->begin(), E = NewBB- > >end(); > I != E; ++I) > - NewBBSize += ARM::GetInstSize(I); > + NewBBSize += TII->GetInstSize(I); > > unsigned OrigBBI = OrigBB->getNumber(); > unsigned NewBBI = NewBB->getNumber(); > @@ -968,9 +968,9 @@ > MachineBasicBlock::iterator MI = UserMI; > ++MI; > unsigned CPUIndex = CPUserIndex+1; > - for (unsigned Offset = UserOffset+ARM::GetInstSize(UserMI); > + for (unsig...
2008 Apr 15
4
[LLVMdev] Being able to know the jitted code-size before emitting
OK, here's a new patch that adds the infrastructure and the implementation for X86, ARM and PPC of GetInstSize and GetFunctionSize. Both functions are virtual functions defined in TargetInstrInfo.h. For X86, I moved some commodity functions from X86CodeEmitter to X86InstrInfo. What do you think? Nicolas Evan Cheng wrote: > > I think both of these belong to TargetInstrInfo. And