[PATCH] D16239: Fix PR25526 by adding back limited cmpxchg pseudo-Insts

Tim Northover via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 6 15:35:38 PDT 2016


On 28 March 2016 at 11:22, Ahmed Bougacha <ahmed.bougacha at gmail.com> wrote:
> There's still the live-in issue, but I'm not sure anyone cares after pseudo expansion. Quentin tells me you can use LivePhysRegs (::stepBackwards) to compute that for you.

Ah yes, sorry I forgot about that. I think it's best to keep it
consistent, if only to be a good MachinePass citizen. I'll upload a
fixed version.

> Also, it occurs to me that nothing prevents a spill from being inserted with optimized regalloc.  It's probably extremely unlikely, but maybe we should consider using the pseudo regardless of the opt level..

I'd really rather not do that unless we absolutely have to. The
pseudo-instruction approach severely constrains optimization and would
get even more complicated if we had to support the full range of
cmpxchg operations (order x order x {strong/weak}).

Basically I'd prefer to wait until we get an actual report, try our
hardest to convince everyone involved that it's ridiculous source code
that's breaking, and go cry in a corner if that fails. Then perhaps
think about putting pseudo-insts in for the general case. I'm hopeful
the first step will never happen.

Tim.


More information about the llvm-commits mailing list