[PATCH] X86: rework expansion of atomic instructions

Tim Northover t.p.northover at gmail.com
Mon Jun 30 10:54:52 PDT 2014


Hi Eric,

> +bool X86AtomicExpandPass::needsCmpXchgNb(llvm::Type *MemType) {
> +  const X86Subtarget &Subtarget = TM->getSubtarget<X86Subtarget>();
> +  if (!Subtarget.hasCmpxchg16b())
> ----------------
> Is there any way to get this information from TTI instead? Relying on the subtarget here is going to go badly soon.

Should be fairly trivial, as long as a TTI can query the subtarget.
I'm fairly sure they can at the moment, but is that planned to go away
too? I'll get on it anyway.

Cheers.

Tim.

http://reviews.llvm.org/D4160






More information about the llvm-commits mailing list