search for: lowerswitch

Displaying 20 results from an estimated 56 matches for "lowerswitch".

2006 May 03
1
[LLVMdev] Patch for transform dependencies
Hi, A number of transforms are actually independent, so here's a partial fix. I updated the dependencies in a cluster of transforms: LowerSwitch, Mem2Reg, LowerSelect, LowerAllocations, UnifyFunctionExitNodes. The patch has been tested, but not extensively. PassManager doesn't complain, and the result of a test pass that requires all these (except for LowerAllocations) together works fine. Domagoj ***************************** PATCH...
2019 Dec 20
3
What's the go-to method to call other transform passes in LLVM9?
Hi: In my in-house transform passes I needs to properly lower Switch/Invoke and PhiNodes, prior to LLVM9 I just call createLowerSwitchPass() and run it. However in LLVM9 doing this would assert out with error message:    Assertion failed: (Resolver && "Pass has not been inserted into a PassManager object!"), function getAnalysis, file \LLVM9/llvm/include/llvm/PassAnalysisSupport.h, lin...
2015 Jul 24
2
[LLVMdev] Transforming SwitchInst to BranchInst
Hi, Are there some built-in LLVM transformation pass, or written library code that transforms LLVM::SwitchInst into if-condition statements (LLVM:: BranchInst)? The purpose of the transformation is that we have a legacy program analyzer that includes an LLVM pass manipulating if-condition statements. Statements of LLVM::SwithchInst should have been handled in the same manner but was not done.
2006 Mar 17
0
[LLVMdev] Stupid '-load-vn -licm' question (LLVM 1.6)
...; loop_step > > I'm particularly confused by the rlwinm instructions that keep > turning up in PowerPC output, and the double test against 98. I > don't have a problem or anything; I'm just trying to figure out > what's going on. :-) Ah! The backend is running -lowerswitch, which does a binary search of the case labels (even when there's only two of them). If I run -lowerswitch manually, though, I *do* get some very nice results out of -cee. :-) It's automatically killing some backtrack nodes in my CFG, which is a big (and unexpected) win. Overall, I&...
2012 May 24
3
[LLVMdev] make check-lit + grep escape characters
I just want to update test/Transforms/LowerSwitch/feature.ll that already uses grep. It uses grep + count, probably due to shorter construction. -Stepan. Eric Christopher wrote: > > On May 24, 2012, at 12:12 AM, Stepan Dyatkovskiy wrote: > >> Hi all. I found that if you want to use grep with escape characters in >> lit, you...
2006 May 03
2
[LLVMdev] Conflicting passes?
Hi all, Why are these two passes conflicting: UnifyFunctionExitNodes and LowerSwitch? AU.addRequired(LowerSwitchID) works, so does AU.addRequired<unifyFunctionExitNodes>(), but the two together don't... opt: PassManagerT.h:387: void llvm::PassManagerT<Trait>::markPassUsed(const llvm::PassInfo*, llvm::Pass*) [with Trait = llvm::MTraits]: Assertion `getAnalysisOrN...
2006 Mar 17
3
[LLVMdev] Stupid '-load-vn -licm' question (LLVM 1.6)
On Mar 16, 2006, at 8:47 PM, Chris Lattner wrote: > On Thu, 16 Mar 2006, Eric Kidd wrote: >> The duplicate loads appear at the top of the %regex6 and %regex2 >> blocks below. I've tried various alias analysis implementations >> either alone or in combination. > > LICM doesn't remove common subexpressions, also -load-vn doesn't > affect LICM. Try
2019 Dec 26
2
Calling LowerSwitchPass causing crash in llvm 9
Hi, I am trying to call LowerSwitchPass directly in my custom pass in this way: FunctionPass *lower = createLowerSwitchPass(); lower->runOnFunction(*f); But it will crash when running lower->runOnFunction(*f) in llvm-9. I was using this method in llvm-8 and it worked fine. It seems the crash happens at the first line of...
2019 Dec 27
2
Calling LowerSwitchPass causing crash in llvm 9
...ons will be finally compiled into binary trees, is that correct? > It seems only AMDGPU is using this pass. Is there any rule to call this pass or not? > >> On Thu, Dec 26, 2019 at 6:36 PM n3v3rm03 <n3v3rm03 at gmail.com> wrote: >> Hi, >> >> I am trying to call LowerSwitchPass directly in my custom pass in this way: >> >> >> FunctionPass *lower = createLowerSwitchPass(); >> lower->runOnFunction(*f); >> >> But it will crash when running lower->runOnFunction(*f) in llvm-9. >> I was using this method in llvm-8 and...
2013 Jan 21
2
[LLVMdev] [llvm-commits] [llvm] r172534 - /llvm/trunk/test/Transforms/LoopStrengthReduce/post-inc-icmpzero.ll
...m> wrote: > > > Hi Manish, > > > > Thank you for looking at this. Recently opt started using the "-mtriple" command line flag to initialize the TargetMachine for IR-level transformations that use it. Currently only the following passes are using this feature: LSR, LowerSwitch, BBVectorizer and LoopVectorizer. If you look at the tests in LoopVectorize you will see that the target-dependent tests are in target-dependent directories. > > The tests in the platform directories are fine. The question is what to do about all the tests in target-independent directories t...
2012 May 24
0
[LLVMdev] make check-lit + grep escape characters
On Thu, May 24, 2012 at 12:44 AM, Stepan Dyatkovskiy <stpworld at narod.ru>wrote: > I just want to update test/Transforms/LowerSwitch/feature.ll that > already uses grep. > It uses grep + count, probably due to shorter construction. > If you are touching such a test, please convert it to FileCheck. Use of 'grep' in tests is an endless source of problems, and we are lazily moving toward a world where only FileChe...
2013 May 06
0
[LLVMdev] convert switch stmts to If statements
There is also the LowerSwitch pass that converts switch instructions to a sequence of branches. On May 6, 2013, at 1:24 PM, George Baah <georgebaah at gmail.com> wrote: > I mean an llvm Pass that transforms switch statements into if statements. For example, if I have code with switch statements then running the pass...
2005 Jul 27
2
[LLVMdev] Making a pass available to llc?
...sure that it really > isn't being run. The verifier can be hidden by various levels of > abstraction. Assuming that I get everything with -debug-pass=Structure, then it isn't: % llc -march=x86 -stats -f tests/IS/npbis.bc -debug-pass=Structure Pass Arguments: -lowergc -lowerinvoke -lowerswitch -unreachableblockelim Target Data Layout Module Pass Manager Function Pass Manager Lower GC intrinsics, for GCless code generators -- Lower GC intrinsics, for GCless code generators Lower invoke and unwind, for unwindless code generators -- Lower invoke and unwind, for unwindless code g...
2006 Mar 17
2
[LLVMdev] Stupid '-load-vn -licm' question (LLVM 1.6)
...ote: >> I'm particularly confused by the rlwinm instructions that keep turning up >> in PowerPC output, and the double test against 98. I don't have a problem >> or anything; I'm just trying to figure out what's going on. :-) > > Ah! The backend is running -lowerswitch, which does a binary search of the > case labels (even when there's only two of them). yup > If I run -lowerswitch manually, though, I *do* get some very nice results out > of -cee. :-) It's automatically killing some backtrack nodes in my CFG, which > is a big (and unexpec...
2013 Sep 21
1
[LLVMdev] Inserting a custom switch instruction implementation in backend
----- Original Message ----- > Hello > > Probably the easiest way for you is to lower switch instructions via > IR-to-IR pass in the way you want. In case it helps, lib/Transforms/Utils/LowerSwitch.cpp does generic switch lowering. You might be able to use that as a base for what you need to do. -Hal > > On Sat, Sep 21, 2013 at 3:43 PM, Marcello Maggioni > <marcello at codeplay.com> wrote: > > Hi, > > > > in implementing a backend for a target we work on,...
2013 Mar 28
0
[LLVMdev] proposed change to class BasicTTI and dual mode mips16/32 working
Hi Reed, On Mar 28, 2013, at 12:18 PM, Reed Kotler <rkotler at mips.com> wrote: > As for the BasicTransformInfoPassass, for this dual mode I'm using createNoTargetTransformInfoPass right now. So, MIPS does not need LSR, LowerSwitch and other optimizations that depend on TTI ? > I will solve this issue of the BasicTransformInfoPass being immutable after this initial checking which gets all the functionality. I was able to make in a function pass but ran into some issues so I put that > aside for now. > IMHO the rig...
2013 May 06
2
[LLVMdev] convert switch stmts to If statements
I mean an llvm Pass that transforms switch statements into if statements. For example, if I have code with switch statements then running the pass will convert all switches to ifs in the bytecode. George On Mon, May 6, 2013 at 4:20 PM, Hal Finkel <hfinkel at anl.gov> wrote: > ----- Original Message ----- > > From: "George Baah" <georgebaah at gmail.com> > >
2013 Jan 21
1
[LLVMdev] [llvm-commits] [llvm] r172534 - /llvm/trunk/test/Transforms/LoopStrengthReduce/post-inc-icmpzero.ll
...;> >> > Hi Manish, >> > >> > Thank you for looking at this. Recently opt started using the "-mtriple" command line flag to initialize the TargetMachine for IR-level transformations that use it. Currently only the following passes are using this feature: LSR, LowerSwitch, BBVectorizer and LoopVectorizer. If you look at the tests in LoopVectorize you will see that the target-dependent tests are in target-dependent directories. >> >> The tests in the platform directories are fine. The question is what to do about all the tests in target-independent direc...
2013 Mar 28
1
[LLVMdev] proposed change to class BasicTTI and dual mode mips16/32 working
...> On Mar 28, 2013, at 12:18 PM, Reed Kotler <rkotler at mips.com > <mailto:rkotler at mips.com>> wrote: > >> As for the BasicTransformInfoPassass, for this dual mode I'm using >> createNoTargetTransformInfoPass right now. > > So, MIPS does not need LSR, LowerSwitch and other optimizations that > depend on TTI ? > As an experiment, I built a flavor of llvm inside of Mips that always uses createNoTargetTransformInfoPass and it passed make check and ran all of test-suite with no problems for Mips32. This is not a realistic long term solution but the fu...
2005 Jul 27
0
[LLVMdev] Making a pass available to llc?
...-debug-pass=Structure does list everything. If you add it, please add it in an "#ifndef NDEBUG" block so that it does not penalize the release build. Thanks! -Chris > % llc -march=x86 -stats -f tests/IS/npbis.bc -debug-pass=Structure > Pass Arguments: -lowergc -lowerinvoke -lowerswitch -unreachableblockelim > Target Data Layout > Module Pass Manager > Function Pass Manager > Lower GC intrinsics, for GCless code generators > -- Lower GC intrinsics, for GCless code generators > Lower invoke and unwind, for unwindless code generators > -- Lower invoke a...