search for: tailduplicator

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

Did you mean: 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 as dead and no tail duplication happens. However, as far as I
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
2008 Jun 11
1
[LLVMdev] Unnatural loops with O0
On Thursday 08 May 2008 18:33:48 Adrian Prantl 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
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 register class "aNlh_0_7".
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
2008 Jun 21
0
[LLVMdev] Unnatural loops with O0
On Jun 11, 2008, at 6:27 AM, Florian Brandner wrote: > On Thursday 08 May 2008 18:33:48 Adrian Prantl 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
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?
...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 email and...
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
2012 Jun 12
2
[LLVMdev] How to use LLVM optimizations with clang
Thanks again. I executed the following command line llc -O3 comb.ll.bc -debug-pass=Arguments and got Pass Arguments: -targetdata -targetpassconfig -no-aa -tbaa -targetlibinfo -basicaa -collector-metadata -machinemoduleinfo -machine-branch-prob -preverify -domtree -verify -loops -loop-simplify -scalar-evolution -loop-simplify -iv-users -loop-reduce -gc-lowering -unreachableblockelim
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
Does LLVM have loop multiversioning ? it seems it does not with clang++ -O3 -mllvm -debug-pass=Arguments program.c -c bash-4.1$ clang++ -O3 -mllvm -debug-pass=Arguments fast_algorithms.c -c clang-3.6: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated Pass Arguments: -datalayout -notti -basictti -x86tti -targetlibinfo -no-aa -tbaa -scoped-noalias
2012 Jun 12
0
[LLVMdev] How to use LLVM optimizations with clang
Hi, > I executed the following command line > > llc -O3 comb.ll.bc -debug-pass=Arguments > > and got > > Pass Arguments: -targetdata -targetpassconfig -no-aa -tbaa > -targetlibinfo -basicaa -collector-metadata -machinemoduleinfo > -machine-branch-prob -preverify -domtree -verify -loops -loop-simplify > -scalar-evolution -loop-simplify -iv-users -loop-reduce
2009 Feb 11
2
[LLVMdev] Unnatural loops with O0
I am reviving this thread because I am seeing the same thing (unnatural loops produced by llvm-gcc), but it is not limited to -O0 -- I am seeing it for -O2 and -O3 as well. Some of my research work is relying on LoopInfo to provide loop information for all loops, but it is missing these loops. Is there any work in the pipeline that aims to fix this? Many thanks, Marc On Sat, Jun 21, 2008 at
2020 Jul 02
2
flags to reproduce clang -O3 with opt -O3
Hello, I've been trying to figure out how to reproduce the results of a single clang -O3 compilation to a binary with a multi-step process using opt. Specifically I have: clang -O3 foo.c -o foo.exe which I want to replicate with: clang -O0 -c -emit-llvm foo.c opt -O3 foo.bc -o foo_o.bc clang foo_o.bc -o foo.exe Any hints / suggestions on what additional flags I need to produce the same
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 bundle in PredBB when it