Hi I'm working on a project which needs loop-attached metadata similar to the parallel metadata discussed in here. Currently I'm trying to make the metadata get through the optimisation passes unscathed. For loop passes, I've solved that by modifying the LPPassManager to check for metadata presence before and after runOnLoop, and restoring it if necessary (assuming the loop didn't get removed and the metadata didn't get moved). However, the CFG simplifier pass also can optimize the loop latch and attached metadata away. As this is a function pass, I don't have access to the loop-specific functionality such as getLoopLatch to check for metadata. Any suggestions how to fix this? How would the parallel loop metadata discussed in here survive these CFG simplifications? Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130302/0c217552/attachment.html>
Hi I'm working on a project which needs loop-attached metadata similar to the parallel metadata discussed in here. Currently I'm trying to make the metadata get through the optimisation passes unscathed. For loop passes, I've solved that by modifying the LPPassManager to check for metadata presence before and after runOnLoop, and restoring it if necessary (assuming the loop didn't get removed and the metadata didn't get moved). However, the CFG simplifier pass also can optimize the loop latch and attached metadata away. As this is a function pass, I don't have access to the loop-specific functionality such as getLoopLatch to check for metadata. Any suggestions how to fix this? How would the parallel loop metadata discussed in here survive these CFG simplifications? Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130303/4b938fbc/attachment.html>
----- Original Message -----> From: "Michael D'hont" <micdhont at gmail.com> > To: llvmdev at cs.uiuc.edu > Sent: Sunday, March 3, 2013 7:15:33 AM > Subject: [LLVMdev] loop metdata instruction > > > Hi > > > > I'm working on a project which needs loop-attached metadata similar > to > the parallel metadata discussed in here. Currently I'm trying to make > the metadata get through the optimisation passes unscathed. For loop > passes, I've solved that by modifying the LPPassManager to check for > metadata presence before and after runOnLoop, and restoring it if > necessary (assuming the loop didn't get removed and the metadata > didn't get moved).Can you be more specific about how you're doing this?> > However, the CFG simplifier pass also can optimize the loop latch and > attached metadata away. As this is a function pass, I don't have > access to the loop-specific functionality such as getLoopLatch to > check for metadata.Why can't a function pass have access to loop-level information? I think that a function level pass can require LoopInfo, and then call: LoopInfo *LI = &getAnalysis<LoopInfo>(); (and then you can use LI->getLoopFor, etc.) In any case, why can't you just check for the metadata on any branch being modified? Thanks again, Hal> > Any suggestions how to fix this? How would the parallel loop metadata > discussed in here survive these CFG simplifications? > > > Michael > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >