similar to: [LLVMdev] loop identification

Displaying 20 results from an estimated 20000 matches similar to: "[LLVMdev] loop identification"

2014 Jun 26
2
[LLVMdev] eraseFromParent and stack dump
Hello, I am creating a new instruction and I want to replace the use of a specified instruction. This is the code I have written Instruction *new_instr = BinaryOperator::Create(Instruction::Sub, op1, op2, ""); b->getInstList().insertAfter(old_instr, new_instr); //b is the BasicBlock old_instr->replaceAllUsesWith(new_instr); old_instr->eraseFromParent(); When I print the
2014 Jul 20
2
[LLVMdev] error in InsertElementInst
Hello everybody, What I am trying to do is to create a vector <4 x i32> and save some values to initialize the vector. However, I am using the insertElementInst() and the errors I get are the following; error: within this context Instruction *Insert = new InsertElementInst(instr, emptyVec, index0, "test"); and error: ‘llvm::InsertElementInst::InsertElementInst(llvm::Value*,
2012 Jul 05
3
[LLVMdev] "symbol lookup error" while running a Simple Loop Pass
Hello; I wrote this simple loop pass to collect the number of instructions in each loop of the program. The code is as follows- #define DEBUG_TYPE "loopinst" #include "llvm/Pass.h" #include "llvm/Analysis/LoopPass.h" #include "llvm/Support/raw_ostream.h" #include "llvm/ADT/Statistic.h" #include "llvm/Instructions.h" #include
2012 Jul 05
0
[LLVMdev] "symbol lookup error" while running a Simple Loop Pass
Problem solved. I was building llvm in a separate llvm-build directory. I built it within the llvm-src directory (which kept all the llvm .so and my pass' .so in the llvm-src/Release+Asserts/lib directory) to solve the problem. Can anyone tell me what's the difference between writing a pass as a "struct" (as in the tutorial) and as a "class" (as most developers do)?
2012 Apr 26
2
[LLVMdev] Detect if a basicblock is part of a loop
Hi Rinaldini, In order to find information about loops inside a given function you should use something like "LoopInfo *LI = P->getAnalysis<LoopInfo>()", remembering to add "AU.addRequired<LoopInfo>();" to your getAnalysisUsage method. If the function you are interested to is not located in the module being compiled (if you created it as an auxiliary function,
2013 Feb 06
0
[LLVMdev] Rotated loop identification
On Feb 4, 2013, at 10:48 AM, Michele Scandale <michele.scandale at gmail.com> wrote: > Dear all, > > I'm working on a late IR target dependent optimization on loops. A part of this > optimization requires to derive "by hand" the trip-count expression of a given > loop. In order to handle correctly these cases I need to check if the loop has > an entry guard
2012 Jul 05
1
[LLVMdev] "symbol lookup error" while running a Simple Loop Pass
Hi, > Problem solved. I was building llvm in a separate llvm-build directory. I > built it within the llvm-src directory (which kept all the llvm .so and my > pass' .so in the llvm-src/Release+Asserts/lib directory) to solve the > problem. I do not fully understand what you mean, there should be no difference on building out of source AFAIK. > Can anyone tell me what's
2012 Apr 26
2
[LLVMdev] Detect if a basicblock is part of a loop
Hi, I'm trying to detect if a basicblock is part of a loop or not. I tried the llvm::LoopInfo like that (http://llvm.org/docs/doxygen/html/classllvm_1_1LoopInfo.html#a4abca289c73cd09487e05d11d9f7d877): LoopInfo *loop = new LoopInfo(); bool isLoop = loop->getLoopFor(myBB); // getLoopFor - Return the inner most loop that BB lives in. If a basic block is in no loop (for example the entry
2012 Apr 26
0
[LLVMdev] Detect if a basicblock is part of a loop
Rinaldini, What exactly did you run? Specifically, you may be missing some analysis passes that are necessary for LoopInfo to have the loop information you desire. -Hal On Thu, 26 Apr 2012 14:02:04 +0000 Rinaldini Julien <julien.rinaldini at heig-vd.ch> wrote: > Hi, > > I'm trying to detect if a basicblock is part of a loop or not. > > I tried the llvm::LoopInfo
2012 Apr 26
0
[LLVMdev] Detect if a basicblock is part of a loop
Hi, Depending on what have run before your pass, the loop may have been unrolled or simplified if the computation inside the loop is too simple. Cheers, -- Arnaud de Grandmaison ________________________________________ From: llvmdev-bounces at cs.uiuc.edu [llvmdev-bounces at cs.uiuc.edu] On Behalf Of Cristianno Martins [cristiannomartins at gmail.com] Sent: Thursday, April 26, 2012 5:52 PM To:
2016 Oct 16
3
Induction variable identification?
Hi, How does LLVM identify induction variables of a loop? Is the algorithm based on SSA graphs? I have a complicated loop and I need to do some analysis around it. Can anyone please point me to source of identification part? -- *Disclaimer: Views, concerns, thoughts, questions, ideas expressed in this mail are of my own and my employer has no take in it. * Thank You. Madhur D. Amilkanthwar
2012 Mar 23
3
[LLVMdev] Function Pass Manager
Hi, I'm writing a function pass which is dynamically loaded by opt and I need some analysis and passes to be run before my pass: virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<LoopInfo>(); AU.addPreserved<LoopInfo>(); AU.addRequiredID(LoopSimplifyID); AU.addPreservedID(LoopSimplifyID);
2018 Jul 06
2
Verify that we only get loop metadata on latches
In https://bugs.llvm.org/show_bug.cgi?id=38011 (see also https://reviews.llvm.org/D48721) a problem was revealed related to llvm.loop metadata. The fault was that clang added the !llvm.loop metadata to branches outside of the loop (not only the loop latch). That was not handled properly by some opt passes (simplifying cfg) since it ended up merging branch instructions with different !llvm.loop
2013 Feb 04
3
[LLVMdev] Rotated loop identification
Dear all, I'm working on a late IR target dependent optimization on loops. A part of this optimization requires to derive "by hand" the trip-count expression of a given loop. In order to handle correctly these cases I need to check if the loop has an entry guard or not. The problem I have is that starting from the information I derive during my analysis (initial IV value, last IV
2013 Feb 07
2
[LLVMdev] Rotated loop identification
Thanks for your reply. Maybe it wasn't so clear, but the optimization I'm writing is target-dependent and so it's declared inside the target backend and is run after the independent optimizer. So I cannot run my pass just after LoopRotate and before InstCombine. I can still use ScalarEvolution, but the instruction combiner can in some cases simplify the entry guard condition. A small
2010 Aug 14
0
[LLVMdev] Questions about trip count
On Thu, Aug 12, 2010 at 5:22 PM, Tobias Grosser <grosser at fim.uni-passau.de>wrote: > On 08/12/2010 09:41 PM, Douglas do Couto Teixeira wrote: > >> Dear guys, >> >> I am having problems to obtain good information from the LoopInfo. >> I am always getting a trip count of 0, even though I am clearly passing >> a loop with a constant bound. I am using
2010 Sep 15
0
[LLVMdev] getAnalysis<LoopInfo> from ModulePass
hi, On Wed, Sep 15, 2010 at 8:21 PM, Mariusz Grad <mariusz.grad at gmail.com> wrote: > Hi, > > I wrote tiny ModulePass which iterates over functions and then uses getAnalysis<LoopInfo> in order to get informations about the loop. > It compiles smoothly, but whenever I try to run it I got error like this: > opt: .. PassAnalysisSupport.h:203: AnalysisType&
2010 Sep 15
2
[LLVMdev] getAnalysis<LoopInfo> from ModulePass
Hi, I wrote tiny ModulePass which iterates over functions and then uses getAnalysis<LoopInfo> in order to get informations about the loop. It compiles smoothly, but whenever I try to run it I got error like this: opt: .. PassAnalysisSupport.h:203: AnalysisType& llvm::Pass::getAnalysisID(const llvm::PassInfo*) const [with AnalysisType = llvm::LoopInfo]: Assertion `ResultPass &&
2012 Apr 12
0
[LLVMdev] Function Pass Manager
Hi again, I come back to this issue with an example. It's a pass which does nothing but throw the 'Unable to schedule' error. namespace { struct MyPass : public FunctionPass { static char ID; // Pass identification, replacement for typeid MyPass() : FunctionPass(ID) { initializeMyPassPass(*PassRegistry::getPassRegistry()); } virtual void
2015 Sep 27
2
[libunwind][Mips] Problem using gas to assemble UnwindRegistersSave.S
On 09/27/2015 06:41 PM, Vasileios Kalintiris wrote: > Hi Richard, > > Clang doesn't have support for MIPS I. The trap-on-condition instructions were added in MIPS II and they should work fine. This is why it works with ".set mips32r2". > > Which version of the ISA did you specify when you used the integrated assembler? > > Thanks, > Vasileios > > Hi