[LLVMdev] Is metadata the right thing to associate one instruction to another?

Michael Zolotukhin mzolotukhin at apple.com
Mon Jul 13 12:04:52 PDT 2015


Hi Frank,

Can you just create a hash ScalarInstruction -> WidenedInstruction? This is the way other vectorizers usually save such data.

I don’t know much about metadata, so I’ll leave this part of the question for someone else:)

Michael
> On Jul 13, 2015, at 10:39 AM, Frank Winter <fwinter at jlab.org> wrote:
> 
> Background: I am still working on vectorizing (widening) a whole instruction tree (from the loads to the stores). I have all scalar loads in a SetVector and have created widened version of them (new instructions).
> 
> What would be very useful to have is the possibility to get to the vector load instruction from the scalar load in constant time. I was thinking to somehow add the vector load instruction (pointer) to the scalar version as metadata. With that, the traversal of the scalar tree can quickly get the vector version of the loads. But metadata seems to work with strings of MDNodes. That makes me worry if metadata is what I want..
> 
> My question: Is metadata the only possibility to 'associate' (in the sense of making it quickly accessible) an instruction to another? What type of metadata would be recommended ?
> 
> Thanks,
> Frank
> 
> _______________________________________________
> 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