Displaying 20 results from an estimated 40000 matches similar to: "[LLVMdev] LLVM Assembly Language Question"
2011 Dec 14
2
[LLVMdev] LLVM Assembly Language Question
No, sorry, I made some typos in my question. I meant to ask
For the instructions generated by LLVM for one particular function, is it
possible to have duplicated instructions?
Thanks
On Wed, 14 Dec 2011, Duncan Sands wrote:
> Hi Jane,
>
>> Hi, are the assembly instructions generated by LLVM for each function (and
>> not just for each BasicBlock) unique? Thanks.
>
>
2011 Dec 14
0
[LLVMdev] LLVM Assembly Language Question
Hi Jane,
> Hi, are the assembly instructions generated by LLVM for each function (and
> not just for each BasicBlock) unique? Thanks.
are you asking if LLVM merges identical functions? It does not (it does have
an optional IR level pass for doing this though).
Ciao, Duncan.
2011 Dec 14
0
[LLVMdev] LLVM Assembly Language Question
On 14/12/11 17:29, Jane Ren wrote:
> No, sorry, I made some typos in my question. I meant to ask
>
> For the instructions generated by LLVM for one particular function, is it
> possible to have duplicated instructions?
I'm not sure what you are asking. If you look at the assembler for all
but the simplest function you will see the same assembler instructions
occurring several
2012 Jan 12
3
[LLVMdev] 'opt' Aborted "While deleting: void %"
Hey everyone,
So I have an LLVM pass that appears to run completely and work fine, and
then it aborts at the very end. When exiting the final runOnFunction call,
I get the following error / stack dump. I cannot figure out why this is
happening for the life of me - does anyone have any ideas? I'm not trying
to do any crazy deallocation or anything, it just seems like a normal pass
to me.
2012 Jan 12
0
[LLVMdev] 'opt' Aborted "While deleting: void %"
Hi Griffin, did your pass create a data structure that holds values somehow,
and forgot to delete it? Also, try running under valgrind in case this is
due to a memory error of some kind.
Ciao, Duncan.
> So I have an LLVM pass that appears to run completely and work fine, and
> then it aborts at the very end. When exiting the final runOnFunction call,
> I get the following error /
2012 Aug 26
0
[LLVMdev] How to Check whether BasicBlock resides in a conditional branch
Hi Jianfei Hu,
the GVN pass does something like this in the logic around
GVN::propagateEquality. If in your example it was
if a == 2 // BasicBlock A
then
then it replaces all occurrences of a with 2 in BasicBlock A. For this
it needs to understand which basic blocks can only be reached via this
conditional edge "a == 2".
Ciao, Duncan.
> Hello All,
>
> I want to
2012 Jan 13
1
[LLVMdev] 'opt' Aborted "While deleting: void %"
Using Valgrind hasn't shown me anything terribly unusual. And I'm confused
because its not even trying to delete a real instruction; deleting a void
type with no name? That doesn't make any sense...
Any other hints? I've seen a few posts in the past about this relating to
some internal LLVM bugs...
-Griffin
On Thu, 12 Jan 2012 21:26:41 +0100, Duncan Sands <baldrick at
2012 Aug 25
6
[LLVMdev] How to Check whether BasicBlock resides in a conditional branch
Hello All,
I want to dertermine whether a basicblock is in a conditional branch. such as,
//=============================
if a > 2 // BasicBlock A
then
BasicBlock B
endif
BasicBlock C
//=============================
What I want to identify is BasicBlock B, which is in a condtional
block. but C is not.
In other words, I want to distinguish BasicBlocks that * must * be
executed and that
2010 Sep 02
4
[LLVMdev] [LLVMDev] [Question] about TerminatorInst
Under what circumstances will a TerminatorInst will have multiple
successors?
The three methods:
virtual BasicBlock *getSuccessorV(unsigned idx) const = 0;
virtual unsigned getNumSuccessorsV() const = 0;
virtual void setSuccessorV(unsigned idx, BasicBlock *B) = 0;
are defined for the TerminatorInst class, but I cannot see why a terminator
is allowed to go to different targets.
Thanks,
2010 Mar 26
3
[LLVMdev] Why is BasicBlock's copy constructor private?
Hi,
LLVM provides basic graph traversal for its CFGs, but I need
additional operations, such as iterating over the edges. I thought I
would solve this problem using the Boost graph library. It should be
relatively simple to walk an LLVM CFG and add the BasicBlock objects
to a Boost graph declared as:
typedef boost::directed_graph<llvm::BasicBlock> Graph;
Once constructed, this
2012 May 07
6
[LLVMdev] Metadata for Argument, BasicBlock
Hi Duncan,
On 5/6/12 6:12 PM, Duncan Sands wrote:
> Hi Ralf,
>
>> Is there a clean way to attach metadata nodes to Arguments and/or
>> BasicBlocks?
>
> not at the moment. Feel free to work on adding this functionality!
I am looking into that now.
I decided to temporarily go for the following syntax for BasicBlock
metadata (subject to discussion):
entry:
2011 Oct 14
0
[LLVMdev] BasicBlock succ iterator
Hi
I have checked all blocks, each block have a Terminator instruction and each
blocks belongs to a function.
I'm really confused. I guess the problem is caused by the removal of the
Loop,The code is as follows:
* //every block to header (except the ones in the loop), will now
redirect to newblock
for (pred_iterator PI = pred_begin(header); PI != pred_end(header);
++PI) {
2011 Feb 24
2
[LLVMdev] Valgrind memcheck errors in llvm
I have ran under valgrind memcheck the process using libLLVM-2.9.so
(rev.126022) and got several errors:
==24227== Invalid read of size 1
==24227== at 0x40274C9: memcpy (mc_replace_strmem.c:497)
==24227== by 0x40D5B84: char* std::string::_S_construct<char
const*>(char const*, char const*, std::allocator<char> const&,
std::forward_iterator_tag) (in
2012 Dec 18
1
[LLVMdev] BasicBlock back()
PS:
I works when I use Instruction* prev = current->getPrevNode();
But then I have runtime error Stack dump that is very frequent...
On Mon, Dec 17, 2012 at 6:20 PM, John Criswell <criswell at illinois.edu>wrote:
> On 12/17/12 10:34 AM, Alexandru Ionut Diaconescu wrote:
>
> Hello,
>
> I am a beginner of LLVM. I am trying to move among the instructions of a
>
2017 Jun 28
2
About the concept of "materialization"
OK. About the error it’s a long story, so it’s probably better to pin some source code here. Below is a piece of code related to my problem, clipped from lib/Transforms/Utils/ValueMapper.cpp. I was wondering what “materialized” means here.
Value *Mapper::mapBlockAddress(const BlockAddress &BA) {
Function *F = cast<Function>(mapValue(BA.getFunction()));
// F may not have
2012 May 07
0
[LLVMdev] Metadata for Argument, BasicBlock
On May 7, 2012, at 7:21 AM, Ralf Karrenberg <Chareos at gmx.de> wrote:
> Hi Duncan,
>
> On 5/6/12 6:12 PM, Duncan Sands wrote:
>> Hi Ralf,
>>
>>> Is there a clean way to attach metadata nodes to Arguments and/or
>>> BasicBlocks?
>>
>> not at the moment. Feel free to work on adding this functionality!
>
> I am looking into that
2012 Apr 04
2
[LLVMdev] BasicBlock predecessors list
Hi there,
I'm trying to get a list of predecessors of a BasicBlock. I'm using a code similar to that on here (http://llvm.org/docs/ProgrammersManual.html#iterate_preds), but it appears to be more nodes been iterating that it should. Now, when I print out the llvm IR, I get something like:
[…]
while.body: ; preds = %7, %while.cond
[…]
for a code that
2012 May 08
2
[LLVMdev] Metadata for Argument, BasicBlock
If we were to implement the #unroll pragma, we would want to add metadata to loop headers. But, it's not a big deal since we can simply add this metadata to block terminators.
-----Original Message-----
From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Dan Gohman
Sent: Tuesday, May 08, 2012 00:58
To: Ralf Karrenberg
Cc: llvmdev at cs.uiuc.edu List
2012 Apr 27
1
[LLVMdev] RE : RE : RE : Detect if a basicblock is part of a loop
It try to put all basicblock in a switch in a loop, like that for example:
int main() {
if(something)
somethingelse:
else
another;
}
become:
int main() {
while(true) {
switch(var) {
case 0:
if(something)
var+=1;
else:
var+=2;
break;
case1:
2011 Jan 31
2
[LLVMdev] Segmentation fault on using get parent of a PHINode
I am getting a segmentation fault as soon as I touch the Basic block
*b value defined as :
std::string getPHIAssigns(const PHINode *PH)
{ const BasicBlock *b = PH->getParent();
errs() << b->size();
where as getPHIAssigns is being called from
for (BasicBlock::iterator ins=b->begin(), e3=b->end();
ins!=e3; ++ins, ++l) // get instructions