search for: ifconversion

Displaying 20 results from an estimated 36 matches for "ifconversion".

2020 Mar 24
3
Questions on ifconversion and predication
...there are predicate instructions like thumb2, but can specify which condition code register they refer to. Now also assume that these predicate instructions themselves are predicatible, if executed they change the current predication state. Can LLVM handle multiple levels of predication? When is IfConversion used and when is EarlyIfConversion used? Is there any documentation on this? thanks, brian
2016 Mar 29
0
IfConversion and representation of predicates
Hello, I have a few questions about applying the IfConversion pass to my out-of-tree target. (1) Is it true that the IfConversion pass may only run after register allocation? I often encounter this bad scenario, and I think it could be entirely avoided if IfConversion ran before register allocation: the block-to-be-predicated contains load-immediate (...
2014 Jun 16
2
[LLVMdev] Machine level IfConversion for ARM
Hi All, How can I run the IfConversion pass in JIT to optimize my code for ARM as a Target Architecture? -- View this message in context: http://llvm.1065342.n5.nabble.com/Machine-level-IfConversion-for-ARM-tp69513.html Sent from the LLVM - Dev mailing list archive at Nabble.com.
2017 Oct 11
2
{ARM} IfConversion does not detect BX instruction as a branch
...l #2] > bx r6 > > For the code to execute correctly, either the *ldr* should be a *ldrne* > instruction or the *ldreq* instruction should be removed. The error seems > to come from the IfConvertion MachinePass. Here's is what it looks like > before and after. > > #BEFORE IfConversion MachinePass > > BB#7: > Live Ins: %LR %R0 %R1 %R2 %R4 %R5 %R6 %R7 %R8 %R9 %R10 %R12 > Predecessors according to CFG: BB#5 BB#6 > STRBi12 %R5, %R6<kill>, 0, pred:14, pred:%noreg; > mem:ST1[%cond.i23.i.i.i] > %R6<def> = LDRBi12 %R7, 0, pred:14, pred:%noreg...
2014 Feb 12
2
[LLVMdev] ifconversion before register allocation
Hi all, I am using llvm backend to generate binary for a specific accelerator. I would like to convert instructions into predicated form when instructions are still in SSA form. It looks like that ifconversion execution flow is different when instructions are in SSA form. However, I am encountering many problems (specially with registers) when I use it before register allocation. I was wondering if anybody could confirm that if-conversion can be used before register allocation? Any suggestion is really a...
2013 Feb 06
0
[LLVMdev] Incorrect Simple pattern matching in lib/CodeGen/IfConversion.cpp
Hello! The if-converter tries to match 'Simple' patterns looking like this: // Simple (split, no rejoin): // EBB // | \_ // | | // | TBB---> exit // | // FBB The IfConverter::ValidSimple method (lib/CodeGen/IfConversion.cpp:461) checks if TBB matches this pattern. It basically does this by simply checking if AnalyseBranch fails on that block (IfConversion.cpp:640). This fails if TBB contains something that AnalyseBranch is not able to understand but is still a branch and may have fallthrough edges. In my case...
2013 Jul 01
0
[LLVMdev] IfConversion non-recursive patch.
Hi. On our system we have a problems with recursive IfConversion algorithm. Here is the patch for making it loop-based. Or do I need to send it to some other mail-list? -- Best regards, Andrew Zhogin. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130701/f526e1f0/attach...
2011 Nov 02
0
[LLVMdev] ifconversion following br_cc instructions
Hi, I am trying to implement support for an if-conversion pass in a backend for the ADRES CGRA architecture. >From studying the existing IfConversion pass, I observed the following: - The PredicateInstruction method is meant to insert guards into conditional instructions. - This method assumes that one will be able to get the predicate from the conditional branch instruction on which the conditional instruction depends. - So implicitly, t...
2014 Jun 18
2
[LLVMdev] Machine level IfConversion for ARM
...o selectively convert IFs. I am trying to find a way to call this optimization pass from the JIT code, thus I can decide which branches to convert and which to keep. Apparently I cannot do this using a pass manager. -- View this message in context: http://llvm.1065342.n5.nabble.com/Machine-level-IfConversion-for-ARM-tp69513p69622.html Sent from the LLVM - Dev mailing list archive at Nabble.com.
2017 Jan 10
2
[PATCHish] IfConversion; lost edges for some diamonds
On Tue, Jan 10, 2017 at 2:31 AM, Peter A Jonsson <pj at sics.se> wrote: > Hi Kyle, > > my apologies for mailing you directly but it seems new user creation is > disabled on the llvm bugzilla. > > We sometime lose edges during IfConversion of diamonds and it’s not > obvious how to reproduce on an upstream target. The documentation for > HasFallThrough says *may* fallthrough which I interpret as “this will be > true whenever we aren’t sure” but IfConverter::AnalyzeBranches() contains > the code: > > BBI.HasFallThroug...
2017 Oct 09
4
{ARM} IfConversion does not detect BX instruction as a branch
...#4] > ldr r6, [r4, r6, lsl #2] > bx r6 For the code to execute correctly, either the _ldr_ should be a _ldrne_ instruction or the _ldreq_ instruction should be removed. The error seems to come from the IfConvertion MachinePass. Here's is what it looks like before and after. > #BEFORE IfConversion MachinePass > > BB#7: > Live Ins: %LR %R0 %R1 %R2 %R4 %R5 %R6 %R7 %R8 %R9 %R10 %R12 > Predecessors according to CFG: BB#5 BB#6 > STRBi12 %R5, %R6<kill>, 0, pred:14, pred:%noreg; mem:ST1[%cond.i23.i.i.i] > %R6<def> = LDRBi12 %R7, 0, pred:14, pred:%noreg; mem:LD1[%15]...
2017 Mar 17
2
LoopVectorizer with ifconversion
Hi, it seems to be generally a bad idea to enable vectorization of conditional stores on SystemZ, because it will cost extra instructions both to 1. extract compare result element 2. Do a test-under-mask instruction on that element 3. conditional branch past the store block. Ideally, I would like to adjust the cost for the vector compare. I am not sure if this is feasable since I would need
2012 Oct 31
3
[LLVMdev] : Predication on SIMD architectures and LLVM
Hi all, I am working on a CGRA backend (something like a 2D VLIW), and we also absolutely need predication. I extended the IfConversion pass to allow it to be executed multiple times and to predicate already predicated code. This is necessary to predicate code with nested conditional statements. At this point, we support or, and, and conditional predicates (see Scott Mahlke's papers on this issue) as supported by the OpenIMPACT...
2017 Mar 17
3
LoopVectorizer with ifconversion
On 17 March 2017 at 16:34, Hal Finkel <hfinkel at anl.gov> wrote: > In general, this is true everywhere. In a large vectorized loop, this cost > may well be worthwhile. The idea is that the cost model should account for > all of these costs. If it doesn't properly, we should fix that. Isn't this only worth when the SIMD instructions can be conditionalised per lane? I
2012 Nov 01
0
[LLVMdev] : Predication on SIMD architectures and LLVM
On Wed, Oct 31, 2012 at 09:13:43PM +0100, Bjorn De Sutter wrote: > Hi all, > > I am working on a CGRA backend (something like a 2D VLIW), and we also absolutely need predication. I extended the IfConversion pass to allow it to be executed multiple times and to predicate already predicated code. This is necessary to predicate code with nested conditional statements. At this point, we support or, and, and conditional predicates (see Scott Mahlke's papers on this issue) as supported by the OpenIMPACT...
2012 Oct 19
0
[LLVMdev] Predication on SIMD architectures and LLVM
...In the backend then we would > custom lower the select instruction to produce a predicated mov to > choose the right version of the value. I think this option doesn't > make use of the possible benefits of the architecture we are > targeting at all. > You may want to look at the IfConversion pass (lib/CodeGen/IfConversion.cpp). This converts branches to predicated instructions, and you may be able to use it for all branching if you teach it to maintain a predicate stack. I actually looked into doing this for the newest generation of GPUs (Southern Islands) supported by the R600[1] bac...
2017 Mar 03
2
Specifying conditional blocks for the back end
Hello. For my back end for the Connex SIMD research processor I want to implement conditional blocks (I guess the better term is predicated blocks). Predicated blocks are bordered by two instructions WHEREEQ (or WHERELT, etc) and ENDWHERE. For example, the following code executes the instructions inside the WHERE block only for the lanes where R0 == R1: EQ R0, R1;
2009 Jan 20
3
[LLVMdev] if-conversion
Hello everyone, I'd like to know if there is an optimization in llvm doing something like an if-conversion on the IR. I only found IfConversion.cpp which appears to only provide the desired functionality on machine code during code-generation. I want to transform branches into serial code with select-instructions as a pre-processing step for further transformations. If there is no such pass, I will possibly write one and share it (althou...
2011 May 24
0
[LLVMdev] predicates and conditional execution
...ample for the implementation of that? Hi Roy, LLVM has support for predication. You may want to look at the ARM backend. It has predication for most instructions, and the compiler tries hard to make effective use of the feature. In the target independent code, you'll also want to examine the IfConversion pass, which does most of the heavy lifting for actually making the transformations between explicit CFG and predicated instructions. -Jim
2013 Jan 24
1
[LLVMdev] BlockFrequencyImpl asserts on multiple edges between same MBBs with different weights in LLVM 3.2
Hi, On 01/23/2013 11:30 PM, Jakob Stoklund Olesen wrote: > If you can find the place that creates the duplicate MBB edge, that would be great. > Found it :) It happens in lib/CodeGen/IfConversion.cpp at the very end in MergeBlocks. I attached a small patch that should resolve that issue. Our tests now compile sucessfully even without my previous patch. regards, Stefan -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Bugfix-to-avoid-creating-dupli...