[LLVMdev] Address space extension
Michele Scandale
michele.scandale at gmail.com
Mon Aug 12 12:07:41 PDT 2013
On 08/12/2013 08:19 PM, Justin Holewinski wrote:
> I agree. It makes sense to try to design a way to attach arbitrary alias
> analysis MD nodes to the AliasAnalysis::Location struct. I just worry about any
> performance implications of turning that into a SmallVector<> or such container.
> Currently, its very cheap for TBAA to check if a TBAA metadata node exists. If
> this becomes a search of a container of metadata nodes, then compiler
> performance may suffer.
My idea was not limited to the AliasAnalysis::Location struct, but also to
instructions. Various metadata can be already attached to an instruction, but in
the current code the MD_tbaa kind is explicitly searched and manipulated.
What if we introduce a MD_aa_info kind that represent a MDNode container of the
various MDNode for aliasing information? To reduce the overhead we could map by
position (operand 0 is TBAA, etc... and introduce some helper function) the
various information.
Instead of handling explicitly the MD_tbaa information we would handle the
MD_aa_info, and this will allow us to preserve and propagate all the aliasing
metadata in the optimization process.
The additional cost would be at least one more indirection to access to the
TBAAMDNode...
Opinions?
Thanks,
-Michele
More information about the llvm-dev
mailing list