Displaying 20 results from an estimated 1000 matches similar to: "(RFC) JumpMaps: switch statement optimization"
2017 Feb 14
2
(RFC) JumpMaps: switch statement optimization
JumpMap lowering is nearly identical to that of JumpTables with the
exception of lack of range-check basic-block.
We introduce JumpMapInfo structure which follows the same flow as
JumpTableInfo and is finally emitted by AsmPrinter.
There are many ways a Target may want to encode jumpmaps (deltas,
compression, relative vs absolute), so we plan to keep this flexible and
target-driven when
2017 Feb 14
3
(RFC) JumpMaps: switch statement optimization
I wonder if it would make sense to emit the jumpmap_find_ functions in
IR rather than in compiler-rt.
Many targets don't link against compiler-rt, e.g. x86 Linux typically
uses libgcc.
If they're emitted in IR, the functions could potentially be inlined.
For example if the size of the switch is known to be small so no
binary search is done, could inlining the find_ function be smaller
2009 Jun 11
0
[LLVMdev] patch for llc/ARM: added mechanism to move switch tables from .text -> .data; also cleanup and documentation
On Jun 8, 2009, at 2:42 PM, robert muth wrote:
> On Sun, Jun 7, 2009 at 11:53 PM, Evan Cheng <evan.cheng at apple.com>
> wrote:
>>
>> On Jun 7, 2009, at 6:59 AM, robert muth wrote:
>>
>>> On Sat, Jun 6, 2009 at 4:51 PM, Evan Cheng<evan.cheng at apple.com>
>>> wrote:
>>>> +cl::opt<std::string>
2009 Jun 08
2
[LLVMdev] patch for llc/ARM: added mechanism to move switch tables from .text -> .data; also cleanup and documentation
On Sun, Jun 7, 2009 at 11:53 PM, Evan Cheng <evan.cheng at apple.com> wrote:
>
> On Jun 7, 2009, at 6:59 AM, robert muth wrote:
>
>> On Sat, Jun 6, 2009 at 4:51 PM, Evan Cheng<evan.cheng at apple.com>
>> wrote:
>>> +cl::opt<std::string> FlagJumpTableSection("jumptable-section",
>>> +
2009 Jun 24
2
[LLVMdev] patch for llc/ARM: added mechanism to move switch tables from .text -> .data; also cleanup and documentation
Evan:
Sorry for the late follow up, I was out of town last week.
Enclosed please find the updated patch including all
your suggestions and a dejagnus test.
Robert
On Thu, Jun 11, 2009 at 2:27 PM, Evan Cheng <evan.cheng at apple.com> wrote:
>
> On Jun 8, 2009, at 2:42 PM, robert muth wrote:
>
> > On Sun, Jun 7, 2009 at 11:53 PM, Evan Cheng <evan.cheng at apple.com>
2010 Jul 17
2
[LLVMdev] How to insert a basic block in an edge
Hi all,
Suppose in a CFG bb1 has two succesor bb3 and bb4, and bb3 has two
predecessor bb1 and bb2. Now how can I insert a basic block between
bb1 and bb3 that at the edge bb1-->bb3 .
In general how can I insert a basic block on an edge?
Regards,
Chayan
2010 Jul 18
2
[LLVMdev] How to insert a basic block in an edge
Hi,
I have tried to use SplitEdge function, but failed. Actually the third
parameter is a variable of type Pass and it need to be non-null. But I
could not figure out how to use it. Please help me out.
Regards,
Chayan
On Sat, Jul 17, 2010 at 10:16 PM, Nick Lewycky <nicholas at mxc.ca> wrote:
> Chayan Sarkar wrote:
>>
>> Hi all,
>>
>> Suppose in a CFG bb1 has two
2008 Jul 12
3
[LLVMdev] Little bug in LoopInfo after Rotate?
Hello, I have two for loops (one inside the other), that after indvars,
looprotate, etc. (the important here is the loop rotate), is similar to this
(I've stripped the real operations):
define i32 @f() nounwind {
entry:
br label %bb1
bb1: ; preds = %bb3, %bb1, %entry
%i.0.reg2mem.0.ph = phi i32 [ 0, %entry ], [ %i.0.reg2mem.0.ph, %bb1 ],
[ %indvar.next9, %bb3 ] ;
2010 Jul 20
2
[LLVMdev] How to insert a basic block in an edge
Hi All,
Still I could not figure out how to use Pass* while calling
SplitEdge() function. Can anyone provide me some example?
Regards,
Chayan
On Sun, Jul 18, 2010 at 11:49 PM, Nick Lewycky <nicholas at mxc.ca> wrote:
> Chayan Sarkar wrote:
>>
>> Hi,
>>
>> I have tried to use SplitEdge function, but failed. Actually the third
>> parameter is a variable of
2010 Nov 17
1
[LLVMdev] Copy Instruction from one Basic block to another
I want to do the following:
suppose the program structure:
bb
/ \
bb1 bb2
\ /
bb3
2014 May 22
2
[LLVMdev] RFC: Indexing of structs vs arrays in getelementpointer
On May 22, 2014, at 3:51 PM, Chandler Carruth <chandlerc at google.com> wrote:
>
> On Thu, May 22, 2014 at 4:42 PM, Louis Gerbarg <lgg at apple.com> wrote:
> The problem that the above transform is technically illegal because “When indexing into a (optionally packed) structure, only i32 integer constants are allowed (when using a vector of indices they must all be the same
2011 Jan 25
2
[LLVMdev] Update PHINode after extracting code
Hi all,
I have problem with ExtractCodeRegion (CodeExtractor.cpp).
My original program is as follows.
bb:
...
%tmp.15 = load %struct.MYSQL_ROWS** %3, align 4
...
bb1:
...
%tmp.1 = load %struct.MYSQL_ROWS** %6, align 4
...
bb4: ; preds = %bb1, %bb,
%entry
%tmp.0 = phi %struct.MYSQL_ROWS* [ null, %entry ], [ %tmp.15, %bb ], [
%tmp.1, %bb1 ]
2010 Jul 17
0
[LLVMdev] How to insert a basic block in an edge
Chayan Sarkar wrote:
> Hi all,
>
> Suppose in a CFG bb1 has two succesor bb3 and bb4, and bb3 has two
> predecessor bb1 and bb2. Now how can I insert a basic block between
> bb1 and bb3 that at the edge bb1-->bb3 .
>
> In general how can I insert a basic block on an edge?
Use llvm::SplitEdge in Transforms/Utils/BasicBlockUtils.h.
The technique is to create a new bb with a
2010 Jul 18
0
[LLVMdev] How to insert a basic block in an edge
Chayan Sarkar wrote:
> Hi,
>
> I have tried to use SplitEdge function, but failed. Actually the third
> parameter is a variable of type Pass and it need to be non-null. But I
> could not figure out how to use it. Please help me out.
The only reason it needs a non-NULL Pass* is to call llvm::SplitBlock
which uses P->getAnalysisIfAvailable unconditionally. Feel free to wrap
2010 Jul 21
0
[LLVMdev] How to insert a basic block in an edge
Hi,
I could not figure out, how to declare a Pass*. Can anyone give me an
example, how to use SplitEdge() function ?
Please help me out.
Regards,
Chayan
On Tue, Jul 20, 2010 at 10:12 AM, Chayan Sarkar <chayan.ju at gmail.com> wrote:
> Hi All,
>
> Still I could not figure out how to use Pass* while calling
> SplitEdge() function. Can anyone provide me some example?
>
>
2011 Jan 27
0
[LLVMdev] Update PHINode after extracting code
I guess I didn't have a clear question.
Suppose we have BB1 and BB2 both point to BB3.
BB1 has variable x. BB2 also as variable x.
BB3 will have PHINode for x with 2 value from BB1 and BB2.
BB1 BB2
\ /
BB3
Now if BB1 and BB2 is extracted into a function
(using ExtractCodeRegion), they will be replaced by
a basic block called codeRepl (which has a call to the extracted
2014 Apr 01
2
[LLVMdev] Construction of SCEVAddRecExpr
Hello,
I'm studying how the SCEV analyzis works and how to use it and I could not create an example where the SCEV analyzis identifies an expression as "SCEVAddRecExpr".
Aren't the expressions below the kind of pattern that should be represented as a "AddRecExpr" ?
SCEV: (1 + (2 * %3)
or
SCEV: (%1 + (2 * %3)
or
SCEV: (%1 + (%2 * %3)
In my experiments they are
2012 Feb 03
5
[LLVMdev] Updating PHI for Instruction Domination?
So my best bet is to try and work in reg2mem mode and then go back to
mem2reg?
I'm curious, it seems though when you split a block that the phis get
updated, right?
On Thu, Feb 2, 2012 at 5:05 PM, Eric Christopher <echristo at apple.com> wrote:
> Not that I'm aware of.
>
> -eric
>
> On Feb 2, 2012, at 3:47 PM, Ryan Taylor wrote:
>
> So essentially I'm
2009 Jan 06
2
[LLVMdev] LLVM Optmizer
The following C code :
#include <stdio.h>
#include <stdlib.h>
int TESTE2( int parami , int paraml ,double paramd )
{
int varx=0,vary;
int nI =0;
//varx= parami;
if( parami > 0 )
{
varx = parami;
vary = varx + 1;
}
else
{
varx = vary + 1;
vary = paraml;
}
varx = varx + parami + paraml;
for( nI = 1 ; nI <= paraml; nI++)
{
varx =
2011 Jan 27
2
[LLVMdev] Update PHINode after extracting code
On 01/26/2011 07:50 PM, Vu Le wrote:
> I guess I didn't have a clear question.
>
> Suppose we have BB1 and BB2 both point to BB3.
> BB1 has variable x. BB2 also as variable x.
> BB3 will have PHINode for x with 2 value from BB1 and BB2.
> BB1 BB2
> \ /
> BB3
>
> Now if BB1 and BB2 is extracted into a function
> (using ExtractCodeRegion), they