similar to: [LLVMdev] instructions copy

Displaying 20 results from an estimated 300 matches similar to: "[LLVMdev] instructions copy"

2016 Jul 23
2
difference between llvm-gcc and clang
Hi Tim, Thanks for your reply. I know O4 is same as O3 now. I am wondering the bitcodes generated by llvm-gcc and clang are same, or almost same, I mean they are almost same, but maybe some newly-created optimization would exert impact. Best, Yuxi ________________________________________ From: Tim Northover [t.p.northover at gmail.com] Sent: Thursday, July 21, 2016 4:11 PM To: Yuxi Chen Cc:
2016 Mar 11
6
big module for a project
Hi All, I am using clang to compile Mysql source code. Because I want to do some inter-procedural analysis, hopefully, I want to get a .o(bitcode) file(a module) containing all possible function declarations and definitions. Is it possible to do that ? Or you guys have some suggestions? To be clear, like Mysql, there is a mysqld routine, which is a major routine. I want to mysqld.o(which is
2016 Jul 21
4
difference between llvm-gcc and clang
Hi everyone, Both llvm-gcc and clang would use llvm as its backend. Dose everyone know the difference of bitcode generated by llvm-gcc and llvm? Or actually they are same, like if I use the same compiler options, like -O4. Any help is appreciated. Best, Yuxi -------------- next part -------------- An HTML attachment was scrubbed... URL:
2016 Jun 21
5
pass invalidation
On 6/20/16 3:46 PM, Yuxi Chen wrote: > Hi, > > Thanks for your reply. > But I still don't know how a transform pass updates a new analysis > pass after it modifies the IR. Can you explain it clearly? I am not > familiar with pass management and invocation. Passes can have methods that allow their internal state to be updated by other passes (the same way that their state
2015 Mar 05
4
[LLVMdev] global variable
Hi all, I am newbie for llvm. I just create a global variable, there are some statements in my pass like: LoadInst* int64_64 = new LoadInst(pthreadPID, "", false, OptAplusOne); int64_64->setAlignment(8); int64_64->dump(); LoadInst* int32_65 = new LoadInst(gvar_int32_myFlag, "", false, OptAplusOne); int32_65->setAlignment(4);
2016 Jun 19
6
pass invalidation
Hi All, When I use llvm, I encounter a problem like "unable to schedule pass A required by C" I investigated deeper. It's like: I have three passes, say A, B, C(all are on function level) A would modify IR code. (change instruction order) For pass B, I would use the result of pass A, I use addRequired<B>(), and &getAnalysis<B>(), it works. void
2016 Jun 19
4
pass invalidation
On 6/19/16 4:28 AM, Mehdi Amini via llvm-dev wrote: > >> On Jun 18, 2016, at 10:44 PM, Yuxi Chen via llvm-dev >> <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote: >> >> Hi All, >> >> When I use llvm, I encounter a problem like "unable to schedule pass >> A required by C" >> I investigated deeper.
2015 Nov 11
2
stack flag & generate ll from executable
Hi All, Does anyone know the meaning of -no-stack-slot-sharing flag in llvm? I can find this flag in llvm-2.8, but now I am using llvm-3.6.1, I couldn't use this flag via clang. Does anyone know the alternative one? Or there is no need to use this flag if we use some optimization, like O4? Another question is that I write a Pass, what I do is after analysis, I generate a .bc file, then run
2011 May 09
2
[LLVMdev] <badref> showed up when duplicating a list of dependent instructions
I collected a sequence of LLVM instructions, want to make a copy of each and insert them into a PREVIOUS location inside the same function (all globals and locals are properly declared before the PREVIOUS location). Here is the list of instructions I want to duplicate and insert: 0 %90 = load i32* @strstart, align 4 1 %91 = add i32 %90, 2 2 %88 = load i32* @ins_h, align 4 3 %92 =
2011 May 09
0
[LLVMdev] <badref> showed up when duplicating a list of dependent instructions
Hi Chuck, > std::vector<Instruction *>::iterator p; > Instruction * pi = PREVIOUS_POSITION; > BasicBlock * pb = PREVIOUS_POSITION->getParent(); > > for(p = coll.begin(); p != coll.end(); ++p){ > Instruction * CurI = * p; > Instruction * CloneI = CurI->clone(); clone doesn't know have any magical way of knowing that it should update the instruction's
2013 Dec 04
2
[LLVMdev] DwarfDebug problems
Thanks for the quick response. I wrote some code to search “llvm.dbg.cu” for the function (right before the failed assertion): if (TheCU == nullptr) { errs() << "compile unit: " << TheCU << "\n scopeNode(" << FnScope->getScopeNode() << ") => " << *FnScope->getScopeNode() << "\n"; auto fn =
2012 Aug 17
1
[LLVMdev] Debug information causing assertion
We have a test case where we are hitting an assertion in the X86 code generator. The assertion is: "Assertion failed: TheCU && "Unable to find compile unit!", file .\..\..\..\lib\CodeGen\AsmPrinter\DwarfDebug.cpp, line 1411" The bitcode is attached. What I am trying to figure out is what is malformed about our debug that is causing this error? This is reproducible
2013 Dec 04
2
[LLVMdev] DwarfDebug problems
In your transform I'd take a look at things like the individual basic blocks you're replacing and the functions you're replacing and making sure that the various lexical blocks are being changed at the same time... -eric On Tue, Dec 3, 2013 at 11:12 PM, David Blaikie <dblaikie at gmail.com> wrote: > On Tue, Dec 3, 2013 at 10:07 PM, Brandon Holt <bholt at
2013 Dec 04
2
[LLVMdev] DwarfDebug problems
In a pass I’m working on, I’ve done some manipulation of several functions, replacing them with new copies with different types, etc. The LLVM IR passes the verifier, but when I have debug symbols enabled (“-g”), I get the following error when Clang generates the Dwarf info (using a very recent build of LLVM/Clang from Git mirror): > Assertion failed: (TheCU && "Unable to find
2012 Nov 02
4
[LLVMdev] Instruction does not dominate all uses! <badref> ??
I'm having trouble figuring out what the error "Instruction does not dominate all uses!" means. I'm trying to construct a call to a function with two parameters. The printed IR, with error, looks like this: define i32 @add(i32, i32) { EntryBlock: %2 = add i32 %0, %1 ret i32 %2 } define i32 @eval_expr() { EntryBlock: ret i32 <badref> } Instruction does not dominate
2013 Dec 04
0
[LLVMdev] DwarfDebug problems
On Tue, Dec 3, 2013 at 9:04 PM, Brandon Holt <bholt at cs.washington.edu> wrote: > In a pass I’m working on, I’ve done some manipulation of several functions, replacing them with new copies with different types, etc. > > The LLVM IR passes the verifier, but when I have debug symbols enabled (“-g”), I get the following error when Clang generates the Dwarf info (using a very recent
2013 Apr 09
3
[LLVMdev] Passing DW_TAG_typedef as the type to DIBuilder's createFunction
Hi David, I'm seeing an assertion failure when passing this node !{i32 786454, metadata <badref>, metadata <badref>, metadata !"fn_t", i32 5, i64 0, i64 0, i64 0, i32 0, metadata <badref>} ; [ DW_TAG_typedef ] [fn_t] [line 5, size 0, align 0, offset 0] [from ] as the function type parameter to DIBuilder::createFunction, due to this check in DebugInfo.cpp:
2013 Dec 04
0
[LLVMdev] DwarfDebug problems
On Tue, Dec 3, 2013 at 10:07 PM, Brandon Holt <bholt at cs.washington.edu> wrote: > Thanks for the quick response. > > I wrote some code to search “llvm.dbg.cu” for the function (right before the > failed assertion): > > if (TheCU == nullptr) { > errs() << "compile unit: " << TheCU << "\n scopeNode(" << >
2013 Dec 04
0
[LLVMdev] DwarfDebug problems
How do I find and update the lexical blocks? Is, for example, “CloneFunction” doing this in a way I can copy? I tried finding the subprogram node in “llvm.dbg.cu” and updating the function: DISubprogram s(*subprog_iter); if (s.getFunction() == F) { s.replaceFunction(NF); } But this didn’t seem to have any effect. Do I need to do something similar with every basic block or something? On Dec
2013 Apr 09
0
[LLVMdev] Passing DW_TAG_typedef as the type to DIBuilder's createFunction
On Tue, Apr 9, 2013 at 1:53 AM, Duncan Sands <baldrick at free.fr> wrote: > Hi David, I'm seeing an assertion failure when passing this node > > !{i32 786454, metadata <badref>, metadata <badref>, metadata !"fn_t", i32 > 5, i64 0, i64 0, i64 0, i32 0, metadata <badref>} ; [ DW_TAG_typedef ] > [fn_t] [line 5, size 0, align 0, offset 0] [from ]