similar to: [LLVMdev] Are Module / Function / Instruction iteration orders stable?

Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] Are Module / Function / Instruction iteration orders stable?"

2015 Jun 25
2
[LLVMdev] Any known-reliable numbering scheme for basic blocks?
Hi all, Does anyone know of a good solution to the following? I'm trying to find a good way to stably associate distinct ID numbers with different BB in a module. As long as the module's IR hasn't changed in any way whatsoever, I'd like to be guaranteed to always generate the same ID <--> BB mapping. Or if the mapping is ambiguous, because two or more mappings between
2019 Jun 26
2
Representations of IR in the output of opt
I finally got back to this. It is a known and endemic issue that pops up from time to time. The issues I’m aware of so far are related to random sets being used where strict order is required. This may result in non-deterministic uselists issued by the bitcode/assembly writers. There is no great way to go about pro-active testing for this. Collecting the tests so far and running them as
2019 May 30
2
Representations of IR in the output of opt
Hello again, > It may be desirable to sort the table before writing the bitcode out, > adding Peter to the thread for his opinion. Thanks for this! Now it seems I've been optimistic about this result. I have instrumented the test suite to check it on a wider amount of files and quickly discovered that it fails for larger optimization sequences. In particular, the default -O3 set
2018 Aug 27
3
Replacing a function from one module into another one
Hello LLVM Developers, I'm trying to replace a function defined in one module into another module (different files). The first issue I ran into was that llvm::Function does not have a method "moveBefore" or "moveAfter" as the llvm::BasicBlock or llvm::Instruction do, so I figured I would just move the BasicBlocks of the replacing function into the function that was being
2006 Oct 02
3
[LLVMdev] Extracting all BasicBlocks of a Function into new Function
Hi, Op 2-okt-06, om 21:35 heeft Chris Lattner het volgende geschreven: > I think the easiest way to do this is to do the 'complement' as you > describe, but specially handle the varargs case. Basically you > need to > call va_start in the original function, and pass the valist pointer > down. > This shouldn't be too hard. OK. I've been rethinking my use
2006 Oct 01
2
[LLVMdev] Extracting all BasicBlocks of a Function into new Function
Hi, I need to find a way to extract all BasicBlocks of a Function (no clones!) into a new Function that has the exact same signature, and adding a call to the new Function in the old one. I tried out lib/ Transforms/Utils/CodeExtractor::ExtractCodeRegion(...), but this one unfortunately checks first to see whether there are any allocas and/ or va_starts and returns a null pointer in that
2010 Apr 20
1
[LLVMdev] iterate over loops inside the runOnFunction
Hello I'm wandring to write a Function parser that iterates over loops inside each function and inside each loop iterates over instructions So I found a way to do the Function parser that iterates over BasicBlocks (using the runOnfunction Pass) but I no know how make it iterates over loops ? So my question is there any way to make a loop inside the runOnfunction to iterate over
2017 Jul 14
2
[SPIR/PTX] Divergence analysis for BasicBlocks
Hello, It seems to me that our current DivergenceAnalysis does not save which BasicBlocks may suffer from divergent control. Am I correct? I want to modify our DivergenceAnalysis to add a "bool isControlDivergent(BasicBlock*) const" method and save in the divergence propagator the basicblock that are divergent. I am not sure that is entirely correct, if you have input on that please
2017 Jul 21
2
[SPIR/PTX] Divergence analysis for BasicBlocks
Hello, Yes? Where is allActive defined, I couldn't find it. Basically, a BB is control divergent if it's execution depends on a branch that itself depends on a divergent ssa value. On Fri, Jul 21, 2017 at 4:13 PM, Zaks, Ayal <ayal.zaks at intel.com> wrote: > What would be the definition of “isControlDivergent(BasicBlock*)”; the > complementary of “allActive(BasicBlock*)” –
2010 May 10
2
[LLVMdev] Separate loop condition and loop body
Hi, Is it possible to get the list of BasicBlocks building the condition of a loop and the list of BasicBlocks that form the body? My first approach was to iterate over the list of all Basicblocks of a loop and separate the header as the condition and the remaining as the body of the loop. However, this is not correct for instance in the case of a while loop in the form: while( A & B) do {
2010 Jul 08
2
[LLVMdev] Why shouldn't function entry blocks have predecessors?
The title says it all. verifyFunction checks it (Verifier.cpp, line 728). Why can't BasicBlocks that serve as a function's entry point also have predecessors? What keeps a function from looping back to its beginning? Félix -------------- next part -------------- An HTML attachment was scrubbed... URL:
2010 Jan 08
1
[LLVMdev] integrate LLVM Poly into existing LLVM infrastructure
hi all, On 2010-1-7 0:11, John Mosby wrote: > In LLVM we could add support for generalized CFG regions and > RegionPasses. A region is a part of the CFG. The only information we > have is, that it has one entry and one exit, this it can be optimized > separately. > I think this is the best way to add region analysis. I must admit > this approach > helps me on another,
2011 Feb 26
1
[LLVMdev] Removing Instructions
I try to write a pass that clones a function and then removes some instruction from the clone, the clone is then added to the module (the parent of the source function). I call removeFromParent() on the appropriate instruction and it is actually removed (I see it in module's dump). However I get a failed assertion at Module Verifier which says: --- Instruction referencing instruction not
2010 Jan 08
1
[LLVMdev] Make LoopBase inherit from "RegionBase"?
On 01/08/10 14:20, ether wrote: > sorry that i forgot to change the subjuect Hi ether, sounds interesting. Actually is/may be some kind of region. If you want you can have a look at the analysis, that I wrote. It is not yet finished, not completely documented and work in progress. However the first big comment might be interesting for you. Or seeing the results of opt -regions -analyze
2010 Mar 15
1
[LLVMdev] CFG as DOT: where do node addresses come from?
Hi, The -dot-cfg option of opt will write a diagram of an analyzed function's CFG to DOT format. If you then open the DOT file, you will see that the BasicBlocks are uniquely identified with hexadecimal addresses. For example, an edge from one block to another may look like: Node0x10026b0:s0 -> Node0x1004c20; I've been trying to figure out where these hexadecimal addresses
2010 Jan 12
0
[LLVMdev] Make LoopBase inherit from "RegionBase"?
Why not use the "standard" algorithm for detecting SESE-regions and building a program structure tree? It should handle everything you want. It also becomes much simpler to specify a connected SESE-region by entry/exit edges, while a disconnected region is specified by entry/exit blocks. Only defining regions on blocks is not enough to be able to quickly determine how to replace/move a
2006 Oct 02
0
[LLVMdev] Extracting all BasicBlocks of a Function into new Function
On Sun, 1 Oct 2006, Bram Adams wrote: > One of the obstacles I face when trying to do the complement > (creating new Function and adding call to original in it), is to find > out how to pass the varargs argument of the new Function into the > call to the old Function. Will passing the sbyte** passed to > llvm.va_start do the trick? I think this is the better way to go. If
2018 Sep 02
2
Replacing a function from one module into another one
Hello and thanks for the answer, I'm still facing issues, I'll do my best to explain my situation, as I explained, I have two modules, each one with its own main and functions, I would like to replace in the *oldModule* a function call that is calling *foo2* (defined in *oldModule*) to instead call *foo3*, which is defined in the *refModule. *So in summary, I have: 1. The original
2013 Oct 10
2
[LLVMdev] Are there implicit rules or conventions for an llvm frontend to generate llvm IR?
Hi, this question might be a bit silly: apart from the language reference(http://llvm.org/docs/LangRef.html#switch-instruction) page, are there additional rules for a regular llvm frontend to generate llvm IRs? There are a few cases that I got from clang/llvm-gcc/dragonegg when compiling *C* source code into llvm IR: 1. It seems that there is ONLY ONE ReturnInst(and NO InvokeInst) for such llvm
2010 May 10
0
[LLVMdev] Separate loop condition and loop body
On May 10, 2010, at 8:43 AM, Xinfinity wrote: > Is it possible to get the list of BasicBlocks building the condition > of a > loop and the list of BasicBlocks that form the body? Based on my (limited) experience with Loop and LoopInfo, this isn't possible. (But don't take my word for it.) > My aim is to manipulate for loops, while and do-while loops unitary, > but I