search for: deadargelim

Displaying 20 results from an estimated 97 matches for "deadargelim".

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 dead...
2013 Oct 03
2
[LLVMdev] Convert a function to "main"
...not updating operators of the basic-block instructions. Thanks to http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-June/051063.html I've solved this partially, but I'm still facing problems when updating branch instructions. * Since all parameters are now useless, I've tried to pass the -deadargelim optimization pass with opt -deadargelim < file-1.bc > file-2.bc. However, the optimization pass does not realize by itself that the function parameters are not being used, and does not eliminate them. * I've tried delete( function->arg_begin() ); with a (somehow predicted) segmentation...
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 i32 @bar(i32 %n) { entry: store i32 1, i32* @g br label %loop loop:...
2020 Jul 14
3
Bug in pass 'ipsccp' on function attribute 'argmemonly'?
...lease let us know. > > -Hal > On 7/10/20 9:04 PM, Fangqing Du via llvm-dev wrote: > > 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 i32 @bar(i32 %n) { > ent...
2009 Jan 25
0
[LLVMdev] -O4 limitations in llvm/llvm-gcc-4.2 2.5?
...ymol 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 -inline -prune-eh -globaldce -argpromotion -instcombine -jump-threading -scalarrepl -globalsmodref-aa -licm -gvn -memcpyopt -dse -instcombine -jump-threading -mem2reg -simplifycfg -globaldce Will LTO ever be extended to inlining across > files as well as constant-folding and g...
2009 Jan 25
2
[LLVMdev] -O4 limitations in llvm/llvm-gcc-4.2 2.5?
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? Will LTO ever be extended to inlining across files as well as constant-folding and global data allocation optimizations? Or does the reliance on gcc-4.2 as the
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 even with entry values. Can call sites like that be described by DWARF? If so, I guess a combination of entry-value variable locations and salvaging the call-site arguments would work. The isel exa...
2008 Sep 08
2
[LLVMdev] Overzealous PromoteCastOfAllocation
...B, i16* %V2 ;; Load the values again %R1 = load i16* %V1 %R2 = load i16* %V2 ;; Pass them to an external function to make them used call void @bar(i16 %R1, i16 %R2) ;; Bitcast the alloca to i32& %V32 = bitcast {i16, i16}* %V to i32* ;; And make it appear used (at first glance, deadargelim will ;; can remove this use later on call void @empty(i32* %V32) ret void } The above program does almost nothing, but contains an alloca of {i16, i16} which is bitcasted to i32* somewhere. This i32* appears used, but can later be removed (you'll see why). Now, when I run instcombine o...
2008 Jun 02
2
[LLVMdev] Plans considering first class structs and multiple return values
...ses makes the most sense, then. I guess the argumentpromotion pass also needs to be adapted to promote first class struct arguments (probably handle them identical to how byval pointer-to-struct are handled now), but I don't currently have need of that. Lastly, I'll modify IPConstProp and DeadArgElim to properly handle multiple return values and do constprop/removal on each of them individually, instead of only working when all of them are constant/dead as is done currently. I'm also thinking of adding a transformation that makes return values dead if they only return an unmodified argumen...
2016 Feb 27
2
Possible soundness issue with available_externally (split from "RFC: Add guard intrinsics")
...;; Similar example if @foo was dividing something by an integer > ;; argument > > We've actually seen the above in our VM (though back then we > didn't realize that the problem was more general than the one > case above). ^ This particular case above is already fixed in DeadArgElim: bool DAE::RemoveDeadArgumentsFromCallers(Function &Fn) { // We cannot change the arguments if this TU does not define the function or // if the linker may choose a function body from another TU, even if the // nominal linkage indicates that other copies of the function have the same /...
2020 Jul 15
2
Bug in pass 'ipsccp' on function attribute 'argmemonly'?
...7/10/20 9:04 PM, Fangqing Du via llvm-dev wrote: >>>     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...
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 parsing): Did you mean '-regalloc'? > > [twang15 at c92 temp]$ clang++ -O3 -mllvm *deadargelim* LULESH.cc &...
2008 Jun 02
0
[LLVMdev] Plans considering first class structs and multiple return values
...I guess the argumentpromotion pass also needs to be adapted to > promote first > class struct arguments (probably handle them identical to how byval > pointer-to-struct are handled now), but I don't currently have need > of that. > > Lastly, I'll modify IPConstProp and DeadArgElim to properly handle > multiple > return values and do constprop/removal on each of them individually, > instead > of only working when all of them are constant/dead as is done > currently. > > I'm also thinking of adding a transformation that makes return > values...
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 clang (LLVM option parsing...
2008 Sep 05
1
[LLVMdev] missed optimizations
...i32 @x2()" rather than "define i32 @x2(...)"; the > function isn't varargs, and marking it as such could lead to wrong > code for exotic calling conventions. I always understood that this is correct per C language specification. For functions that are internal (static), the DeadArgElim pass removes the vararg spec if it's unused, but that's not applicable in this case. Any particular reason the inliner doesn't touch varargs? I think that when you call a varargs function without any varargs, it should be able to inline it just fine? Or at least when the function in qu...
2011 Dec 30
1
[LLVMdev] Safe Passes
...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 -ipconstprop -ipsccp -licm -prune-eh -sccp Also, is there any redundant pass in this list (things line sccp/ipsccp)?
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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http:/...
2018 Jan 08
2
Relationship between clang, opt and llc
...; 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): Unknown command line argument >>> '-deadargelim'. Try: 'clang (LLVM option parsing) -help' >>> clang (LLVM option parsing): Did you mean '-regalloc'? >>> >>> [twang15 at c92 temp]$ clan...
2018 Jan 08
0
Relationship between clang, opt and llc
...ehdi 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): 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 *dead...
2020 Jun 18
2
[DebugInfo] RFC: Introduce LLVM DI Checker utility
...ing fruit to pick using that technique. The example from https://reviews.llvm.org/D81939 illustrates this perfectly: in this case it’s not necessary to invent a new testing technique to uncover the bug, because simply running `./bin/llvm-lit -Dopt="opt -debugify-each" test/Transforms/DeadArgElim` finds the same issue. As I mentioned in the previous mail, I do really think the debugify technique is great & I use it. But, in order to detect that variable "x" was optimized-out starting from pass Y, I only run the di-checker option (that performs analysis only) & find the...