[patch] Avoid a Symbol -> Name -> Symbol conversion

Pete Cooper peter_cooper at apple.com
Mon Jun 22 09:37:19 PDT 2015

Wow, I had no idea we did 'Symbol -> Name -> Symbol’.  Thats pretty terrible.

I think you’re already effectively handing CSE using your own map, but for safety sake (to prevent other nodes from trying to CSE with an MCSymbol), I think you need to add code to SelectionDAG.cpp AddNodeIDCustom.

With that, LGTM.

> On Jun 21, 2015, at 8:47 PM, Rafael Espíndola <rafael.espindola at gmail.com> wrote:
> Currently some code produces an TargetExternalSymbol from a MCSymbol.
> That means extracting the symbol name and fetching the symbol again
> down the pipeline.
> The attached patch adds a DAG.getMCSymbol that lets the MCSymbol pass
> unchanged on the DAG.
> Doing so removes the need for MO_NOPREFIX and fixes the root cause of
> pr23900, allowing r240130 to be committed again.
> Cheers,
> Rafael
> <t.patch>_______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

More information about the llvm-commits mailing list