[LLVMdev] Instruction Constraints Question
Jakob Stoklund Olesen
stoklund at 2pi.dk
Wed Jan 23 15:18:08 PST 2013
On Jan 23, 2013, at 2:38 PM, dag at cray.com wrote:
> Anton Korobeynikov <anton at korobeynikov.info> writes:
>
>>> It doesn't look like TableGen supports Constraints beyond EARLY_CLOBBER
>>> and TIED_TO. We would need to add a constraint such as "$dst != $src1,
>>> $dst != $mask, $src1 != $mask" to the current patterns to enforce the
>>> rules.
>
>> You can emulate such constraints via early clobbing. Just mark dst as
>> early clobbing.
>
> Actually, I've always wondered what early clobbering is. Can you
> explain it?
It's an output operand that is written before all the input operands are read.
The register allocator makes sure that early clobber outputs are never allocated the same register as any input operands.
/jakob
More information about the llvm-dev
mailing list