[LLVMdev] loop metdata instruction
Hal Finkel
hfinkel at anl.gov
Sun Mar 3 11:00:54 PST 2013
----- 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
>
More information about the llvm-dev
mailing list