#ifdef in TableGen

Is there something similar to #ifdef#endif in C supported in TableGen *.td files?

Alex.

Not as such, what are you trying to do?

-Chris

Chris Lattner-2 wrote:

Not as such, what are you trying to do?

For example, sometimes I want some patterns to be matched by one machine
instruction and sometimes two or more. I am doing the development for an
experimental compiler and nothing is sure. I have source code in the backend
looking for some specific opcode and they are conditional compiled
(controllled by #ifdef..#endif).

Your best bet is to run cpp over the .td files before you run them through tblgen then.

For mainline development, we don't want to support this.

-Chris