similar to: [LLVMdev] how to remove MachineInstr ?

Displaying 20 results from an estimated 30000 matches similar to: "[LLVMdev] how to remove MachineInstr ?"

2005 Sep 27
1
[LLVMdev] How does the memory of MachineInstr objects are managed?
A question about how the memory of object in LLVM are managed. I dived in some source files but still don't have any idea how the memory of MachineInstr object are managed. It doesn't look like reference counting. I'm writing an instruction scheudling code, the new order of MachineInstr* in a MachineBasicBlock is stored in a "schedule". All MachineInstr* in
2011 Jul 01
0
[LLVMdev] LLVM Instr from MachineInstr
Hi Ankur, For a MachineBasicBlock you can call getBasicBlock() to find the IR level BasicBlock from which it was generated (if there isn't a one, it will return NULL). I don't know of a way to get a finer granularity than that, though. -Jim On Jul 1, 2011, at 1:06 AM, ankur deshwal wrote: > Hi, > > Is there any way to get a pointer to the LLVM Instr from which a >
2012 Oct 24
0
[LLVMdev] How to Find Instruction Encoding for a MachineInstr
On 10/23/2012 1:58 PM, John Criswell wrote: > Dear All, > > I'm enhancing a MachineFunctionPass that enforces control-flow > integrity. One of the things I want to do is to set the alignment of > an instruction (by adding NOPs before it in the MachineBasicBlock or > by emitting an alignment directive to the assembler) if it causes a > specific sequence of bytes to be
2012 Oct 24
1
[LLVMdev] How to Find Instruction Encoding for a MachineInstr
On 10/23/12 7:19 PM, Craig Topper wrote: > What function provides the encoding length? X86 in particular is so > difficult to encode that only the old style JIT and the MC Code > Emitter could possibly know how many bytes something takes. The getSize() method of MCInstrDesc which can be fetched from a MachineInstr using the getDesc() method:
2012 Oct 24
0
[LLVMdev] How to Find Instruction Encoding for a MachineInstr
What function provides the encoding length? X86 in particular is so difficult to encode that only the old style JIT and the MC Code Emitter could possibly know how many bytes something takes. On Tue, Oct 23, 2012 at 11:58 AM, John Criswell <criswell at illinois.edu>wrote: > Dear All, > > I'm enhancing a MachineFunctionPass that enforces control-flow integrity. > One of the
2010 Oct 15
0
[LLVMdev] [LLVMDev] How do I add a branch to a MachineInstr?
I know this is simple, but I want to be 100 percent sure I am doing this correctly. Would the following code be enough to add a simple unconditional branch instruction to a machine instruction? Do I need to set some key items in the MachineBasicBlock too? Is there more documentation on this subject? MachineBasicBlock * mbb = mf->CreateMachineBasicBlock( 0 ); mbb->getNumber();
2009 Jul 31
3
[LLVMdev] RFC: MachineInstr Annotations
I'm getting to the point where I want to contribute some more MachineInstr comment support for things like spills. As we've discussed before, we don't have all of the information available in AsmPrinter to synthesize the kind of comments that can be helpful for debugging performance issues with register allocators (our primary use for these kinds of comments). In order to get this
2012 Oct 24
1
[LLVMdev] How to Find Instruction Encoding for a MachineInstr
On Oct 23, 2012, at 6:22 PM, Joshua Cranmer <pidgeot18 at gmail.com> wrote: > On 10/23/2012 1:58 PM, John Criswell wrote: >> Dear All, >> >> I'm enhancing a MachineFunctionPass that enforces control-flow integrity. One of the things I want to do is to set the alignment of an instruction (by adding NOPs before it in the MachineBasicBlock or by emitting an alignment
2012 Oct 23
4
[LLVMdev] How to Find Instruction Encoding for a MachineInstr
Dear All, I'm enhancing a MachineFunctionPass that enforces control-flow integrity. One of the things I want to do is to set the alignment of an instruction (by adding NOPs before it in the MachineBasicBlock or by emitting an alignment directive to the assembler) if it causes a specific sequence of bytes to be generated at a specific alignment. The goal is to ensure that sequences of
2009 Aug 01
0
[LLVMdev] RFC: MachineInstr Annotations
On Jul 31, 2009, at 11:17 AM, David Greene wrote: > I'm getting to the point where I want to contribute some more > MachineInstr comment support for things like spills. As we've > discussed before, we don't have all of the information available > in AsmPrinter to synthesize the kind of comments that can be > helpful for debugging performance issues with register
2013 May 29
1
[LLVMdev] Link between MachineInstr and MachineOperand
In the representation of the code after instruction selection (but before register allocation), in a MachineBasicBlock: How/where is the result of a machine instruction linked to one of the machine operands of a subsequent machine instruction? Asked differently: How/where are the links of the DAG implemented (specially between MachineInstr and MachineOperand)? Frank
2017 Feb 04
2
How to get assembly opcode mnemonic(s) corresponding to a MachineInstr?
Hi, I'd like to modify MachineBasicBlock contents within a MachineFunctionPass on the basis of how many CPU cycles the assembly instructions corresponding to the MBB take. I'm using the AVR backend and the number of CPU cycles every AVR assembly operation takes is openly available. Is there any straightforward way of getting the opcode mnemonics corresponding to a MachineInstr? I've
2009 Jun 15
1
[LLVMdev] eh_sjlj_setjmp/ongjmp ?
Hi, I have checkout llvm from the svn, eh_sjlj_setjmp/longjmp intrinsics had beed added ! but it seems llvm-gcc does't generate the eh_sjlj_setjmp/longjmp intrinsics now ? best regards zhangzw
2004 Feb 13
0
[LLVMdev] ilistification of MachineBasicBlock
Hi all, Two days ago MachineBasicBlock got ilistified. What does this mean and how does it affect you? Read on. MachineBasicBlock used to have a std::vector<MachineInstr*> to represent the instructions it constisted of. This representation has the following problems: 1) O(n) insertions/removals to/from anywhere but the end of a basic block (removals are very comomn in peephole
2015 Dec 02
4
Cloning a MachineInstr
I'm trying to clone a MachineInstr in the AsmPrinter::EmitInstruction, Here is the code: void EsenciaAsmPrinter::EmitInstruction(const MachineInstr *MI) { const MachineFunction *MF = MI->getParent()->getParent(); MachineInstr *CloneMI = MF->CloneMachineInstr(MI); ... ... } The problem is that MF is a const and CloneMachineInstr expects a non-const. Does anybody know if there is
2011 Jul 01
2
[LLVMdev] LLVM Instr from MachineInstr
Hi, Is there any way to get a pointer to the LLVM Instr from which a particular MachineInstr is generated ? Although I understand it goes through many optimization after a LLVM instruction is converted to SDAG node, so maintaining such a mapping will be hard. Still is the mapping stored some where which can give some sane results at least in case of -O0? Thanks and regards, Ankur
2014 Nov 14
2
[LLVMdev] Is there a path from MachineInstr to the associated Instruction
Hi, Recently, I am working on some information collection on the machine instruction (MachineInstr) level. But, sometimes, I need check the corresponding IR level instruction of the a machine instruction. When visiting a machine instruction which is a call (MachineInstr::isCall()), I need to check the arguments of this call site. I know that the CallSite class provides good facility for this
2006 Sep 25
2
[LLVMdev] Folding instructions on X86
Dear LLVMers, I need help with one error in my register allocator. I am getting errors when folding instructions for the x86 (it does not happen when I use the PowerPC as target). The problem is that, when I execute something like: mi = mbb->insert(mbb->erase(mi), fmi), where mbb is a MachineBasicBlock, valgrind gives this error message: Address 0x42C62B0 is 24 bytes inside a block
2012 Oct 30
2
[LLVMdev] [PATCH][Review request] MachineBasicBlock::iterator bug fix
The 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
2006 Aug 14
2
[LLVMdev] Folding instructions
Dear LLVMers, I am trying to fold memory operands in the way that is done in RegAllocLocal.cpp, or in LiveIntervalAnalysis.cpp, but I am getting errors that I don't know how to fix. Could someone tell me which steps should I take in order to correctly fold memory operands? The code that I am using is: const TargetMachine & target_machine = this->machine_function->getTarget();