search for: tailduplication

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

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 regarded a...
2012 Oct 31
3
[LLVMdev] Tail Duplication Questions
...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, the CFG simplify pass should be run to clean up the mess. First, lib/CodeGen/TailDuplication.cpp says the pass name is -tailduplication, not -tailduplicate. Am I looking at the right pass? INITIALIZE_PASS(TailDuplicatePass, "tailduplication", "Tail Duplication", false, false) Second, SimplifyCFG is a FunctionPass, not a MachineFunctionPass. What...
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 it shoul...
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 %vreg0 has...
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 is unab...
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 loopinfo is...
2008 Jul 24
0
[LLVMdev] Irreducible CFG from tail duplication
On Thu, Jul 24, 2008 at 2:00 PM, Mark Leone <markleone at gmail.com> wrote: > Is irreducibility a problem for existing LLVM passes? There aren't any LLVM passes that expect a reducible CFG at the moment; of course, some passes are more effective with reducible CFGs. > It looks like > there was once an open project for a pass to make irreducible graphs > reducible. Was that
2008 Jul 24
3
[LLVMdev] Irreducible CFG from tail duplication
It seems that tail duplication can make a reducible CFG irreducible (example 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
2018 May 16
0
Bug in TailDuplicator?
Hi, I think there might be a bug in the tail duplicator (called from MachineBlockPlacement in my case), when duplicating a block that contains an implicit fall-through. Suppose you have the following blocks BB#1: Predecessors according to CFG: BB#2 ... conditional_branch <BB#3> < implicit fall-through to BB#2 > Successors according to CFG: BB#2 BB#3 BB#2:
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.
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, lib/Cod...
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-register-coale...
2008 Jul 24
1
[LLVMdev] Irreducible CFG from tail duplication
Thanks Eli. It's not introducing loops, just unstructured conditionals (e.g. X's in the control-flow graph, rather than diamonds). You can see it using "opt -view-cfg" on the code below. Sounds like it's not a bug. Thanks for the info. - Mark ; Tail duplication yielded this code, which has non-structured control flow. ; Note that "then.i2" and
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 -unreac...
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 -livedebugvars -s...
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 was re...
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 -machi...
2014 Jun 17
2
[LLVMdev] Question about 'DuplicateInstruction' function of TailDuplicatePass in CodeGen
...f the bundle. I have added simple code to make bundled instructions from the 'DuplicateInstruction' function. As a reference, I have attached a simple patch. If there is something wrong, please let me know. Thanks, JinGu Kang -------------- next part -------------- Index: lib/CodeGen/TailDuplication.cpp =================================================================== --- lib/CodeGen/TailDuplication.cpp (revision 211103) +++ lib/CodeGen/TailDuplication.cpp (working copy) @@ -453,6 +453,11 @@ } } PredBB->insert(PredBB->instr_end(), NewMI); + + /// If there is bundled instruc...