search for: taildupl

Displaying 20 results from an estimated 58 matches for "taildupl".

Did you mean: taildup
2008 May 14
1
[LLVMdev] Useless check in TailDuplication
Hi, while reading the TailDuplication pass, I found a check that looks rather pointless. TailDuplication looks at an unconditional branch instruction, BI. It performs a number of checks on the successor of this branch instruction, Dest. One of this checks is counting the number of predecessor. If this count is zero, Dest is reg...
2012 Oct 31
3
[LLVMdev] Tail Duplication Questions
I'm reading up on LLVM's implementation of tail duplication and the description is confusing: http://llvm.org/docs/Passes.html -tailduplicate: Tail Duplication This pass performs a limited form of tail duplication, intended to simplify CFGs by removing some unconditional branches. This pass is necessary to straighten out loops created by the C front-end, but also is capable of making other code nicer. After this pass is run...
2008 Jun 11
1
[LLVMdev] Unnatural loops with O0
...wrote: > we noticed that llvmgcc4.2-2.2 sometimes generates non-natural loops > when compiling to bytecode without any optimizations. Apparently what > happens is that the loop header is duplicated, which results in two > entry points for the loop. this is actually a problem with the tailduplication pass of llvm. it does not consider loops at all, and thus duplicates loop headers. the result is that two paths now lead into the loop --> it is not natural anymore and further loop optimizations fail. besides, the tailduplication pass does not invalidate the loopinfo analysis, as i...
2016 Mar 04
2
PHI node to different register class vs TailDuplication
Hi, We're having an issue with TailDuplication in our out-of-tree target and it's this PHI-node that seems to be the cause of the trouble: %vreg2<def> = PHI %vreg0, <BB#2>, %vreg1, <BB#3>; rN:%vreg2 aNlh_0_7:%vreg0 aNlh_rN:%vreg1 Note that the defined %vreg2 has register class "rN" while the read %vr...
2008 May 08
3
[LLVMdev] Unnatural loops with O0
Hello everybody, we noticed that llvmgcc4.2-2.2 sometimes generates non-natural loops when compiling to bytecode without any optimizations. Apparently what happens is that the loop header is duplicated, which results in two entry points for the loop. Since this could obstruct subsequent loop optimizations, it might be interesting to further investigate this behavior. To show the problem, I have
2012 Oct 31
0
[LLVMdev] Tail Duplication Questions
We used to have an LLVM-IR pass did tail duplication (http://llvm.org/viewvc/llvm-project/llvm/tags/RELEASE_29/final/lib/Transforms/Scalar/TailDuplication.cpp) It was not used and went away with 3.0. The documentation is out of date. commit f940a1a869b4fe6f857e7fd8aeb97e7b7e9b390e Author: Rafael Espindola <rafael.espindola at gmail.com> Date: Tue Aug 30 23:03:45 2011 +0000 Remove the old tail duplication pass. It is not used and...
2008 Jun 21
0
[LLVMdev] Unnatural loops with O0
...ced that llvmgcc4.2-2.2 sometimes generates non-natural loops >> when compiling to bytecode without any optimizations. Apparently what >> happens is that the loop header is duplicated, which results in two >> entry points for the loop. > > this is actually a problem with the tailduplication pass of llvm. it > does not > consider loops at all, and thus duplicates loop headers. the result > is that > two paths now lead into the loop --> it is not natural anymore and > further > loop optimizations fail. I think the patch was reverted because using loopi...
2008 Jul 24
0
[LLVMdev] Irreducible CFG from tail duplication
...pass to make irreducible graphs > reducible. Was that ever implemented? There isn't any such pass in trunk LLVM. One could potentially be added, but it would have to be a high-quality implementation, and we'd have to measure the costs and benefits carefully. > ; "opt -inline -tailduplicate" makes an irreducible CFG from this code I can't reproduce the issue, and I can't see how tailduplicate could possibly make your function irreducible, since it shouldn't be able to introduce a loop into a function without any loops. Can you include the output you're gett...
2008 Jul 24
3
[LLVMdev] Irreducible CFG from tail duplication
...mple below). Is that intentional? Are there other optimizations that have that property? Is irreducibility a problem for existing LLVM passes? It looks like there was once an open project for a pass to make irreducible graphs reducible. Was that ever implemented? - Mark ; "opt -inline -tailduplicate" makes an irreducible CFG from this code @x = weak global float 0.0 define internal fastcc void @foo(float %f) { entry: %b = fcmp ogt float %f, 0.0 br i1 %b, label %then, label %continue then: store float 0.0, float* @x br label %continue continue: ret void } define void @test...
2018 May 16
0
Bug in TailDuplicator?
...ely, I am working on a proprietary target, so cannot provide a test case. I have, however, attached a "pseudo mir" which should be easily adaptable for a public target. Maybe this is not a bug, but my function at this stage is not canonical? Also, I am not on tip (though I checked the TailDuplicator tip), so it is possible this is fixed elsewhere. Thanks! -- Verena Beckham Senior Principal Software Engineer, Compilers Codeplay Software Ltd Level C, Argyle House, 3 Lady Lawson Street, Edinburgh, EH3 9DR Tel: 0131 466 0503 Fax: 0131 557 6600 Website: http://www.codeplay.com This ema...
2012 Nov 01
2
[LLVMdev] Tail Duplication Questions
Eli Friedman <eli.friedman at gmail.com> writes: >> Ah. So is the MachineFunction version expected to work correctly? > > It's part of the default set of CodeGen passes. It is? Was that true in 3.1? I can't see where it is initialized in llc. I probably missed something important. :) Thanks! -David
2012 Nov 01
0
[LLVMdev] Tail Duplication Questions
http://llvm.org/viewvc/llvm-project/llvm/tags/RELEASE_31/final/lib/CodeGen/Passes.cpp?revision=156747&view=markup void TargetPassConfig::addMachineSSAOptimization() { // Pre-ra tail duplication. if (addPass(EarlyTailDuplicateID) != &NoPassID) printAndVerify("After Pre-RegAlloc TailDuplicate"); /// Add passes that optimize machine instructions after register allocation. void TargetPassConfig::addMachineLateOptimization() { // Branch folding must be run after regalloc and prolog/epilog insertion...
2009 Nov 26
1
[LLVMdev] Problemo: createTailDuplicationPass
Good morning! After updating and recompiling my copy of the LLVM trunk I noticed that the line "_passManager.add(llvm::createTailDuplicationPass());" in my code fails with the following assertion: Assertion failed: NormalCtor && "Cannot call createPass on PassInfo without default ctor!", file D:\Workspace\llvmtrunk\include\llvm/PassSupport.h, line 111 This behavior was introduced in revision 89904: Both,...
2012 Jun 12
2
[LLVMdev] How to use LLVM optimizations with clang
...lector-metadata -machinemoduleinfo -machine-branch-prob -preverify -domtree -verify -loops -loop-simplify -scalar-evolution -loop-simplify -iv-users -loop-reduce -gc-lowering -unreachableblockelim -codegenprepare -stack-protector -preverify -domtree -verify -loops -branch-prob -expand-isel-pseudos -tailduplication -opt-phis -localstackalloc -dead-mi-elimination -machinedomtree -machine-loops -machinelicm -machine-cse -machine-sink -peephole-opts -unreachable-mbb-elimination -livevars -phi-node-elimination -twoaddressinstruction -processimpdefs -slotindexes -liveintervals -livedebugvars -simple-registe...
2008 Jul 24
1
[LLVMdev] Irreducible CFG from tail duplication
...>> reducible. Was that ever implemented? > > There isn't any such pass in trunk LLVM. One could potentially be > added, but it would have to be a high-quality implementation, and we'd > have to measure the costs and benefits carefully. > >> ; "opt -inline -tailduplicate" makes an irreducible CFG from this code > > I can't reproduce the issue, and I can't see how tailduplicate could > possibly make your function irreducible, since it shouldn't be able to > introduce a loop into a function without any loops. Can you include > th...
2015 Jan 17
3
[LLVMdev] loop multiversioning
...verify -verify-di -domtree -loops -loop-simplify -scalar-evolution -iv-users -loop-reduce -gc-lowering -unreachableblockelim -consthoist -partially-inline-libcalls -codegenprepare -rewrite-symbols -verify-di -stack-protector -verify -domtree -loops -branch-prob -machinedomtree -expand-isel-pseudos -tailduplication -opt-phis -machinedomtree -slotindexes -stack-coloring -localstackalloc -dead-mi-elimination -machinedomtree -machine-loops -machine-trace-metrics -early-ifcvt -machinelicm -machine-cse -machinepostdomtree -machine-block-freq -machine-sink -peephole-opts -dead-mi-elimination -processimpdefs...
2012 Jun 12
0
[LLVMdev] How to use LLVM optimizations with clang
...oduleinfo > -machine-branch-prob -preverify -domtree -verify -loops -loop-simplify > -scalar-evolution -loop-simplify -iv-users -loop-reduce -gc-lowering > -unreachableblockelim -codegenprepare -stack-protector -preverify > -domtree -verify -loops -branch-prob -expand-isel-pseudos > -tailduplication -opt-phis -localstackalloc -dead-mi-elimination > -machinedomtree -machine-loops -machinelicm -machine-cse -machine-sink > -peephole-opts -unreachable-mbb-elimination -livevars > -phi-node-elimination -twoaddressinstruction -processimpdefs > -slotindexes -liveintervals -livedebug...
2009 Feb 11
2
[LLVMdev] Unnatural loops with O0
...ometimes generates non-natural loops > >> when compiling to bytecode without any optimizations. Apparently what > >> happens is that the loop header is duplicated, which results in two > >> entry points for the loop. > > > > this is actually a problem with the tailduplication pass of llvm. it > > does not > > consider loops at all, and thus duplicates loop headers. the result > > is that > > two paths now lead into the loop --> it is not natural anymore and > > further > > loop optimizations fail. > > I think the patch...
2020 Jul 02
2
flags to reproduce clang -O3 with opt -O3
...as -vector-combine -verify -write-bitcode not contained in multi O3 (count=67) -attributor -block-freq-loop-simplify -branch-folder -break-false-deps -callsite-splitting-ipsccp -codegenprepare -consthoist -dead-mi-elimination -detect-dead-lanes -early-ifcvt -early-machinelicm -early-tailduplication -expandmemcmp -greedy -interleaved-access -iv-users -lazy-block-freq-opt-remark-emitter -livedebugvars -liveintervals -liveregmatrix -livestacks -livevars -loop-reduce -loop-simplify-lcssa-verification -lrshrink -machine-block-freq -machine-combiner -machine-cp -machine-cse...
2014 Jun 17
2
[LLVMdev] Question about 'DuplicateInstruction' function of TailDuplicatePass in CodeGen
Hi all, I have faced a little bit of a strange transformation from the TailDuplicatePass In CodeGen. When the pass clones the contents of TailBB into PredBB, the bundled instructions in TailBB are not bundled in PredBB. I think the reason why it is not bundled is that the 'DuplicateInstruction' function does not set up the flag of the first instruction of the bundl...