[LLVMdev] Instruction Constraints Question

dag at cray.com dag at cray.com
Wed Jan 23 14:38:45 PST 2013


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?

I don't think that it will work for the src1 != mask constraint, though,
right?

>> Is there another mechanism to suport a constraint like this or is
>> hacking TableGen the best way to do it?  If the latter, does anyone have
>> a sense of how difficult this would be to implement?

> It's not a tablegen problem, the regalloc part is the hardest.

Sure, but we'll want to express the constraint in TableGen, I think.

Any hints on a direction for regalloc?  How are such constraints
modeled in the current iteration of the register allocator?

Thanks!

                        -David



More information about the llvm-dev mailing list