similar to: [LLVMdev] Resolving branch instr with label "$BB0_-1"

Displaying 20 results from an estimated 300 matches similar to: "[LLVMdev] Resolving branch instr with label "$BB0_-1""

2012 Jan 24
0
[LLVMdev] Resolving branch instr with label "$BB0_-1"
May be you have branched to a BB which has been deleted. On 24 January 2012 20:16, girish gulawani <girishvg at yahoo.com> wrote: > > Hello All. > On a particular target the back-end generates an instruction like: > beqz r2, "$BB0_-1" > > Is it a back-end specific issue? Could someone please help me figure out > how this gets resolved? What confuses me
2012 Jan 24
2
[LLVMdev] Resolving branch instr with label "$BB0_-1"
  Hi Aries. Thanks very much! Precisely this is the situation! There're two consecutive branches (br1cond and br2uncond). Inside of AnalyzeBranch, there's an opcode swap of br2uncond (ex. j_foward to j_backward). There I do BuildMI (newOpcode) and followed by br2uncond->eraseFromParent(). This results in br1cond loosing it's label/offset. How could I resolve this? Best regards,
2012 Jan 24
2
[LLVMdev] Resolving branch instr with label "$BB0_-1"
Hello Anton. Thanks for the comment. > Precisely this is the situation! There're two consecutive branches (br1cond >> and br2uncond). Inside of AnalyzeBranch, there's an opcode swap of br2uncond >> (ex. j_foward to j_backward). There I do BuildMI (newOpcode) and followed by >> br2uncond->eraseFromParent(). This results in br1cond loosing it's >>
2012 Jan 24
0
[LLVMdev] Resolving branch instr with label "$BB0_-1"
> Precisely this is the situation! There're two consecutive branches (br1cond > and br2uncond). Inside of AnalyzeBranch, there's an opcode swap of br2uncond > (ex. j_foward to j_backward). There I do BuildMI (newOpcode) and followed by > br2uncond->eraseFromParent(). This results in br1cond loosing it's > label/offset. How could I resolve this? Your code is broken.
2012 Jan 24
0
[LLVMdev] Resolving branch instr with label "$BB0_-1"
>> br2uncond->eraseFromParent(). This results in br1cond loosing it's >> label/offset. How could I resolve this? > Your code is broken. AnalyzeBranch should not modify anything. > > I was taking a clue from Mips/MipsInstrInfo.cpp: AnalyzeBranch :( > Could you please suggest appropriate alternative place for such a > modification? Ah sorry, my memory served me
2011 Dec 23
1
[LLVMdev] Stop MachineCSE on certain instructions
Hi Jim. I'm doing custom lowering but here I have a very basic issue and the situation is like this - [Original Op] Mul Dest, Src1, Src2 [Expanded from EmitInstrWithCustomInserter] Step1 Dest, Src1, Src2    <=== BuildMI(..., Step1, Dest).addReg(Src1).addReg(Src2) Step2 Dest, Src1, Src2    <=== BuildMI(..., Step2, Dest).addReg(Src1).addReg(Src2) Step3 Dest, Src2, Src1    <===
2011 Dec 21
2
[LLVMdev] Stop MachineCSE on certain instructions
Hi, Jim. In my case the target (Tilera) doesn't have a full 32-bit mult operation and to do so it has to accumulate results from three 16-bit mults, by retaining operands and the result across in the same registers. However the ISel DAG thinks its a CSE case. Please note this is not a MAdd/MSub triad. How could I do this by defining such a sequence or the pattern in the .def file itself for
2011 Dec 21
0
[LLVMdev] Stop MachineCSE on certain instructions
Ah, OK. I think I understand much better now. Thanks! You shouldn't need bundles for that sort of thing. A custom lowering or a fancy pattern should be sufficient, depending on the details of how your target is defined. For patterns, looks at the various targets use of the Pat<>, Pattern<>, ComplexPattern<> and related classes in the .td files. For examples of custom
2011 Dec 20
0
[LLVMdev] Stop MachineCSE on certain instructions
Hi Girish, Sorry, but I'm afraid I don't understand your question. Can you elaborate a bit? -Jim On Dec 19, 2011, at 9:12 PM, girish gulawani wrote: > > Hello Jim. > Just out of curiosity, won't such mechanism work via the patterns from instructions defs? > > Thanks. > Girish. > > From: Jim Grosbach <grosbach at apple.com> > To: Johannes
2011 Dec 20
2
[LLVMdev] Stop MachineCSE on certain instructions
Hello Jim. Just out of curiosity, won't such mechanism work via the patterns from instructions defs? Thanks. Girish. >________________________________ > From: Jim Grosbach <grosbach at apple.com> >To: Johannes Birgmeier <e0902998 at student.tuwien.ac.at> >Cc: LLVM Developers Mailing List <llvmdev at cs.uiuc.edu> >Sent: Monday, 19 December 2011 10:33 PM
2018 Dec 03
5
Branch relaxation at assembler level (RISCV)
Hi all, I'm trying to implement the same branch relaxation mechanism implemented in CodeGen in the MC layer of RISCV.   beqz t1, L1   =>   bnez t1, L2   j L1 That's because LLVM does not apply the CodeGen optimizations when compiling directly from assembly code. What I'd like to do would be to add a pass that does that on the MC instructions or at least to find a way to
2020 Oct 06
3
[MC] Questions about relaxation in MC
Hi all, In RISC-V ISA, the range of conditional branches is within 4KiB. In current implementation, if the branch target is out of range, LLVM MC will issue an error message to tell users it could not resolve the fixup record. I have compared the result with the GNU assembler. GNU assembler will convert the branch to inverted one plus jump to make the branch possible. The range of unconditional
2020 Oct 06
3
Questions about relaxation in MC
This sounds very similar to what PowerPC does, see: https://github.com/llvm/llvm-project/blob/master/llvm/lib/Target/PowerPC/PPCBranchSelector.cpp However, PowerPC is doing this in the compiler backend, not in the assembler. One issue is that the process must be iterative, because branches can go both forward and backward, and replacing some branch instructions with the branch pairs can then
2020 Mar 12
2
Redundant copies
Hi all, we have encountered a case of redundant copies still left in the final code and we would like to, at least, mitigate it. The original motivating case comes from a context where we have large vector registers. In that context, copies are expensive and we would like to avoid them as much as possible. This small testcase in C, similar to the original vector case, exposes the issue but using
2014 May 10
6
[LLVMdev] Replacing Platform Specific IR Codes with Generic Implementation and Introducing Macro Facilities
On 10 May 2014, at 13:53, Tim Northover <t.p.northover at gmail.com> wrote: > It doesn't make sense for everything though, particularly if you want > target-specific IR to simply not exist. What would you map ARM's > "ldrex" to on x86? This isn't a great example. Having load-linked / store-conditional in the IR would make a number of transforms related to
2012 Jan 03
2
[LLVMdev] [RFC] Extending MachineInstr.Flags
Hello All. This is purely from a particular VLIW target back-end perspective. There it is possible to schedule an MI on to one of multiple execution pipes. This leads to a different instruction encoding per the pipe it is bound to, and need to percolate this information down. Would it be advisable to extend and use the "MachineInstr.Flags" field for this purpose? Right now this flag
2012 Jan 05
3
[LLVMdev] LLVM Dev Meeting Slides & Video Update
On Jan 3, 2012, at 5:45 PM, Joe Abbey wrote: > What a shame. Any chance of getting his slides posted? The odds are pretty good, I just uploaded them :) -Chris
2012 Jan 05
0
[LLVMdev] LLVM Dev Meeting Slides & Video Update
Hello Chris. Can you please provide the URL where the slides are uploaded? Thanks. Girish. >________________________________ > From: Chris Lattner <clattner at apple.com> >To: Joe Abbey <jabbey at arxan.com> >Cc: "llvmdev at cs.uiuc.edu List" <llvmdev at cs.uiuc.edu> >Sent: Thursday, 5 January 2012 6:27 AM >Subject: Re: [LLVMdev] LLVM Dev Meeting
2012 Jan 09
0
[LLVMdev] Dynamic Analysis
Hi, I am not able to find the documentation on SPEDI. Or the source code for the project. Thanks and Regards, Tarun. On Mon, Jan 9, 2012 at 3:24 PM, girish gulawani <girishvg at yahoo.com> wrote: > > > Hello Tarun. > You mean SPEDI? > http://llvm.org/ProjectsWithLLVM/2003-Fall-CS497YYZ-SPEDI.pdf > > Regards, > Girish. > > *From:* tarun agrawal <tarun
2011 Dec 21
1
[LLVMdev] Stop MachineCSE on certain instructions
Hi Evan. The hasSideEffects method I believe operates only on Inline Assembly (IA) blocks. What if such a sequence is not part of IA? Thanks. Girish. If an instruction is marked as side-effect free then it's a candidate for CSE. Try marking the instruction with hasSideEffects. > >Evan > >On Dec 17, 2011, at 12:24 PM, Johannes Birgmeier wrote: > >> Hello, >>