similar to: [LLVMdev] Convert a function to "main"

Displaying 20 results from an estimated 3000 matches similar to: "[LLVMdev] Convert a function to "main""

2007 Nov 11
1
[LLVMdev] opt -globaldce -deadargelim yields different result then when run separately
Hi, when I run opt -globaldce -deadargelim on a module, deadargelim removes less arguments than when I run opt separately for the two passes. The module has dead functions that hold references to other functions, which makes the latter intrinsically live for deadargelim. -debug-pass=Executions shows no other passes being run before deadargelim. Why is that so? Thanks, Torvald
2018 Sep 06
2
Replacing a function from one module into another one
Hi Philip, The error happens when the program finishes and it automatically calls the destructors, so it is not an error specifically inside my program. Here's the full code: #include "llvm/ExecutionEngine/ExecutionEngine.h" #include "llvm/ExecutionEngine/MCJIT.h" #include "llvm/IRReader/IRReader.h" #include "llvm/Support/TargetSelect.h" #include
2018 Sep 06
2
Replacing a function from one module into another one
Hi Philip, Thanks for the reference, I was able to follow it and copy the code that I saw necessary, but I still have some issues (references are still not updated). I created the function: void populateVMap(llvm::ValueToValueMapTy &VMap, llvm::Function *fOld, llvm::Function *fNew) { llvm::Function::arg_iterator DestI = fOld->arg_begin(); for (llvm::Function::const_arg_iterator J =
2020 Jul 11
3
Bug in pass 'ipsccp' on function attribute 'argmemonly'?
Hi all, Let's see an example (from Alexandre Isoard) first: **************************************************************************************** ; RUN: opt -ipsccp -deadargelim -licm -O2 -S < %s @g = internal global i32 0 ; Function Attrs: argmemonly define internal void @foo(i32* nonnull dereferenceable(4) %arg, i32 %val) #0 { entry: store i32 %val, i32* %arg ret void } define
2020 Jul 14
3
Bug in pass 'ipsccp' on function attribute 'argmemonly'?
Thank you Hal and Stefan! Bug report is filed: https://bugs.llvm.org/show_bug.cgi?id=46717 And Stefan, I think 'attributor' is a really nice pass, and can infer more precise and useful attributes, which may give more opportunities for optimization. But we shouldn't depend on 'attributor' to correct wrong function attributes, because we cannot run 'attributor' after
2009 Jan 25
0
[LLVMdev] -O4 limitations in llvm/llvm-gcc-4.2 2.5?
Jack Howarth wrote: > I've had better luck compiling all of pymol 1.1r2 with > -O4 on darwin9. Everythink links and there appears to be > no regressions in the resulting code. I take it that LTO > in llvm 2.5 is still limited to dead code elimination, > correct? No. libLTO does the equivalent to opt -internalize -ipsccp -globalopt -constmerge -deadargelim -instcombine
2008 Sep 08
2
[LLVMdev] Overzealous PromoteCastOfAllocation
Hi all, I'm currently running into some problems with instcombine changing the type of alloca instructions. In particular, the PromoteCastOfAllocation looks at any allocation instruction that is used by a bitast. It does a few checks, but basically tries to change the type of the alloca instruction to the type pointed to by the bitcasted type. The current heuristic for determining if this is
2016 May 09
4
Some questions about phase ordering in OPT and LLC
Hi, I'm a PhD student doing phase ordering as part of my PhD topic and I would like to ask some questions about LLVM. Executing the following command to see what passes does OPT execute when targeting a SPARC V8 processor: /opt/clang+llvm-3.7.1-x86_64-linux-gnu-ubuntu-15.10/bin/llvm-as < /dev/null | /opt/clang+llvm-3.7.1-x86_64-linux-gnu-ubuntu-15.10/bin/opt -O3 -march=sparc -mcpu=v8
2020 Sep 08
2
[RFC] [DebugInfo] Using DW_OP_entry_value within LLVM IR
Hi Djordje, [Late reply as I was away, alas], For the example in https://reviews.llvm.org/D85012 , I'm not sure that just using an entry value is correct. The reason why the dbg.values for arguments are set to undef is not because the value can't be described, it's because deadargelim changes all the call sites to pass in 'undef', which I believe makes the value unrecoverable
2018 Sep 04
2
Replacing a function from one module into another one
Hi Philip, Thank you very much for your answer, the vector declaration example worked. I'm pretty sure the ValueToValueMapTy is the last thing I need because I even saw there is another function that could help me llvm*:*:RemapFunction <http://llvm.org/doxygen/namespacellvm.html#addf0183e92893bdbcde00fc9091dda93>; but my problem is that I don't know how to populate the
2020 Jul 15
2
Bug in pass 'ipsccp' on function attribute 'argmemonly'?
On 7/14/20 4:34 PM, Hal Finkel via llvm-dev wrote: > > On 7/14/20 11:28 AM, Fangqing Du wrote: >> Thank you Hal and Stefan! >> >> Bug report is filed: https://bugs.llvm.org/show_bug.cgi?id=46717 >> <https://bugs.llvm.org/show_bug.cgi?id=46717> >> >> And Stefan, >> I think 'attributor' is a really nice pass, and can infer more >>
2016 Feb 27
2
Possible soundness issue with available_externally (split from "RFC: Add guard intrinsics")
On Thu, Feb 25, 2016 at 9:59 AM, Sanjoy Das <sanjoy at playingwithpointers.com> wrote: > Couple of other examples: > > void @foo(i32* %ptr) available_externally { > %discard = load i32, i32* %ptr > } > void bar() { > call @foo(i32* %x) > } > > ==> > > void @foo(i32* %ptr) available_externally { > } > void bar() { >
2008 Jun 02
2
[LLVMdev] Plans considering first class structs and multiple return values
Hi Dan, > Yes, the intention is that getresult will be removed once first-class > aggregates are a ready replacement. This won't leave LLVM missing the > concept of returning multiple values; a struct can be thought of as > a container for multiple values. I'm not saying we don't have some way of modeling multiple return values, I'm sayin the explicit concept
2018 Jan 08
0
Relationship between clang, opt and llc
Hi Medhi, It seems -mllvm does not work as expected. Anything wrong? [twang15 at c92 temp]$ clang++ -O3 -mllvm *-deadargelim* LULESH.cc clang (LLVM option parsing): Unknown command line argument '-deadargelim'. Try: 'clang (LLVM option parsing) -help' clang (LLVM option parsing): Did you mean '-regalloc'? [twang15 at c92 temp]$ clang++ -O3 -mllvm *deadargelim* LULESH.cc
2012 May 15
1
[LLVMdev] CloneFunctionInto() overwrites alignment attribute
Hi everybody, I am trying to clone a function body into an existing declaration. That declaration has the same number of parameters but they differ in type and alignment. Fortunately, it does not care about the type. Unfortunately, CloneFunctionInto() copies the attributes from the old function to the new one unconditionally, overwriting the alignment attribute. Also, the Attribute interface
2018 Jan 08
2
Relationship between clang, opt and llc
2018-01-08 8:41 GMT-08:00 toddy wang <wenwangtoddy at gmail.com>: > Hi Medhi, > > It seems -mllvm does not work as expected. Anything wrong? > > [twang15 at c92 temp]$ clang++ -O3 -mllvm *-deadargelim* LULESH.cc > clang (LLVM option parsing): Unknown command line argument > '-deadargelim'. Try: 'clang (LLVM option parsing) -help' > clang (LLVM option
2004 Sep 20
1
[LLVMdev] Is there any way to modify basic block like adding junk code or ...
Hi , Is there any way to modify code like adding junk code or mess up the order of a bunch of codes(in same basic block) which is no dependency? I saw some options like -dce -deadargelim for 'opt' , but what I want is to reverse to do it. I mean adding some dead code or junk code. Actually what I want is to implement a ploymorphic engine. Coud I do those by using llvm? Thanks. Qiuyu
2011 Dec 30
1
[LLVMdev] Safe Passes
Which transformation passes are 'safe', meaning it does not worsens the effectiveness of a later pass or the generated code? I imagine all passes which either removes data or add attributes are included in this list, plus some simplification passes: -adce -argpromotion -constmerge -constprop -deadargelim -dse -functionattrs -globaldce -globalopt -gvn -instcombine -internalize
2008 Jun 02
0
[LLVMdev] Plans considering first class structs and multiple return values
On Jun 2, 2008, at 8:45 AM, Matthijs Kooijman wrote: > Hi Dan, > >> Yes, the intention is that getresult will be removed once first-class >> aggregates are a ready replacement. This won't leave LLVM missing the >> concept of returning multiple values; a struct can be thought of as >> a container for multiple values. > I'm not saying we don't have some
2018 Jan 08
0
Relationship between clang, opt and llc
On Mon, Jan 8, 2018 at 11:53 AM, Mehdi AMINI <joker.eph at gmail.com> wrote: > > > 2018-01-08 8:41 GMT-08:00 toddy wang <wenwangtoddy at gmail.com>: > >> Hi Medhi, >> >> It seems -mllvm does not work as expected. Anything wrong? >> >> [twang15 at c92 temp]$ clang++ -O3 -mllvm *-deadargelim* LULESH.cc >> clang (LLVM option parsing):