[PATCH ]Add Subtarget ptx23

Hi, Justin

  PTX version in CUDA 4.0 has changed from 2.2 to 2.3.
I add ptx23 subtarget and update a testcase.

  Is that O.K.?

Regards,
chenwj

patch-llvm-130978 (2.28 KB)

Hi, Justin

PTX version in CUDA 4.0 has changed from 2.2 to 2.3.
I add ptx23 subtarget and update a testcase.

Is that O.K.?

Looks good. Committed in r130980. Thanks!

In the future, patches should be sent to llvm-commits instead of llvmdev.

Hi, Justin

  Thansk, but I have a little concern though. I saw Chiou mentioned the
compatibility issue of PTX on the mailing list.
  http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-March/038654.html

In my PTX.td patch,

def FeaturePTX23 : SubtargetFeature<"ptx23", "PTXVersion", PTX_VERSION_2_3",
                                    "Use PTX Language Version 2.3",
                                    [FeaturePTX22]>;

  I can only guess above statement means PTX23 is fully compatible with
PTX22. Is my guess right? If so, how can one express that FeatureA is
NOT fully compatible with FeatureB in .td?

Regards,
chenwj

Hi, Justin

Thansk, but I have a little concern though. I saw Chiou mentioned the
compatibility issue of PTX on the mailing list.
http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-March/038654.html

In my PTX.td patch,

def FeaturePTX23 : SubtargetFeature<“ptx23”, “PTXVersion”, PTX_VERSION_2_3",
“Use PTX Language Version 2.3”,
[FeaturePTX22]>;

I can only guess above statement means PTX23 is fully compatible with
PTX22. Is my guess right? If so, how can one express that FeatureA is
NOT fully compatible with FeatureB in .td?

Literally, it means any feature supported by PTX 2.2 is also supported by PTX 2.3. While this may not be strictly true, it is a good approximation for now, until more of the ISA is implemented. I wouldn’t worry about it for now.

Hi, Justin

  I have sent another patch for subtarget ptx23 to llvm-commits.
But I don't see it has been committed. Can you help me take look
on it?

  I also attach that patch here.

Regards,
chenwj

patch-llvm (1.22 KB)