Distinguish early clobber output operands from clobbered registers.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Mon, 27 Jun 2011 04:08:33 +0000 (04:08 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Mon, 27 Jun 2011 04:08:33 +0000 (04:08 +0000)
commitf792fa90f1125553008659c743cba85b9b5d2e5e
tree55af9377e3bfb8833d0c5f862a6a19f7cd5fb39f
parent7a2ecd3f99ae4dede7e8c1984c2a08984be69363
Distinguish early clobber output operands from clobbered registers.

Both become <earlyclobber> defs on the INLINEASM MachineInstr, but we
now use two different asm operand kinds.

The new Kind_Clobber is treated identically to the old
Kind_RegDefEarlyClobber for now, but x87 floating point stack inline
assembly does care about the difference.

This will pop a register off the stack:

  asm("fstp %st" : : "t"(x) : "st");

While this will pop the input and push an output:

  asm("fst %st" : "=&t"(r) : "t"(x));

We need to know if ST0 was a clobber or an output operand, and we can't
depend on <dead> flags for that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133902 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/InlineAsm.h
lib/CodeGen/MachineInstr.cpp
lib/CodeGen/SelectionDAG/InstrEmitter.cpp
lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp