[LLVMdev] Instruction Constraints Question

Anton Korobeynikov anton at korobeynikov.info
Wed Jan 23 13:33:03 PST 2013


> 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.

> 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.

--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University



More information about the llvm-dev mailing list