The InlineAsm::AsmDialect is only required for X86; no architecture
makes use of it and as such it gets passed around between arch-specific
and general code while being unused for all architectures but X86.
Since the AsmDialect is queried from a MachineInstr, which we also pass
around, remove the additional AsmDialect parameter and query for it deep
in the X86AsmPrinter only when needed/as late as possible.
This refactor should help later planned refactors to AsmPrinter, as this
difference in the X86AsmPrinter makes it harder to make AsmPrinter more
generic.
It doesn't make sense to me that we were passing InlineAsmVariant(which should always be AT&T) here. Shouldn't we be passing the PrinterAsmVariant? If the printer is set to Intel syntax and we expand dialects from curly braces assuming that. Then we should also print operands using Intel syntax. And then tell the MC layer that what it needs to parse is Intel syntax.