Displaying 6 results from an estimated 6 matches for "instr_end".
Did you mean:
inst_end
2016 May 09
2
Replacing an instruction in a post-RA pass
...eFromParent is used to do this so that's
what I'm using in the code below:
for (MachineFunction::iterator MFI = MF.begin(), E = MF.end();
MFI != E; ++MFI) {
// for each instr
MachineBasicBlock::instr_iterator II = MFI->instr_begin();
while( II != MFI->instr_end()) {
opcode = II->getOpcode();
if(II->isCommutable() || isLoadRR(opcode)){
MachineBasicBlock& MBB = *MFI;
MachineInstr& MI = *II;
DebugLoc DL = MI.getDebugLoc();
MachineOperand& reg1 = MI.getOperand(0);...
2017 Aug 22
5
[RFC] mir-canon: A new tool for canonicalizing MIR for cleaner diffing.
Patch for review.
On Mon, Aug 21, 2017 at 11:45 PM Puyan Lotfi <puyan.lotfi.llvm at gmail.com>
wrote:
> Ping.
>
> Still working on preparing code for review. Will have a patch for review
> ready in the coming days.
>
> PL
>
> On Tue, Aug 15, 2017 at 12:06 PM Puyan Lotfi <puyan.lotfi.llvm at gmail.com>
> wrote:
>
>> Hi,
>>
>>
>>
2012 Oct 26
2
[LLVMdev] instr_iterator
Is it safe or legal to call isInsideBundle even when I == E?
MachineBasicBlock::iterator MachineBasicBlock::getFirstNonPHI() {
instr_iterator I = instr_begin(), E = instr_end();
while (I != E && I->isPHI())
++I;
assert(!I->isInsideBundle() && "First non-phi MI cannot be inside a
bundle!");
return I;
}
I am seeing an assert when I run llc.
The code is in lib/CodeGen/MachineBasicBlock.cpp:145.
-------------- next part -----------...
2012 Oct 30
2
[LLVMdev] [PATCH][Review request] MachineBasicBlock::iterator bug fix
...attached patch fixes bugs related to MachineBasicBlock::iterator. I
don't have any test cases that reproduce on an X86 machine the problems
that this patch fixes (these bugs were found when make check was run on a
mips board).
Please review.
The first part just ensures that iterator I is not instr_end() before it
invokes isInsideBundle().
The second part changes the signature of spillAll to avoid the conversion
from MachineBasicBlock::iterator to MachineInstr* and back to
MachineBasicBlock::iterator.
Here is the backtrace:
(gdb) bt
#0 0x2ad46fb8 in raise () from /lib/libc.so.6
#1 0x2ad4c178 in...
2014 Jun 17
2
[LLVMdev] Question about 'DuplicateInstruction' function of TailDuplicatePass in CodeGen
...xt part --------------
Index: lib/CodeGen/TailDuplication.cpp
===================================================================
--- lib/CodeGen/TailDuplication.cpp (revision 211103)
+++ lib/CodeGen/TailDuplication.cpp (working copy)
@@ -453,6 +453,11 @@
}
}
PredBB->insert(PredBB->instr_end(), NewMI);
+
+ /// If there is bundled instruction in TailBB,
+ /// make bundled instruction in PredBB.
+ if (MI->isBundled() && MI->isInsideBundle())
+ NewMI->bundleWithPred();
}
/// UpdateSuccessorsPHIs - After FromBB is tail duplicated into its predecessor
2016 Mar 04
2
PHI node to different register class vs TailDuplication
...;t just use PHI src instead of PHI def in the cloned
+ // instruction. Instead we insert a copy, copying the PHI src to a
+ // register of the wanted register class.
+ if (!RC->hasSubClassEq(SrcRC)) {
+ unsigned NewDef = MRI->createVirtualRegister(RC);
+
+ BuildMI(*PredBB, PredBB->instr_end(), DebugLoc(),
+ TII->get(TargetOpcode::COPY), NewDef).addReg(SrcReg);
+ SrcReg = NewDef;
+ }
+
LocalVRMap.insert(std::make_pair(DefReg, SrcReg));
Any thoughts on this?
/Mikael