[llvm-commits] SETCC Patches (For Review Only)

Reid Spencer rspencer at reidspencer.com
Sun Dec 10 15:43:40 PST 2006


All,

Here's the SETCC patch to convert SetCondInst (SetCC) instructions into
ICmpInst. Here's somethings you should know about this patch:

1. Passes Dejagnu, SingleSource, MultiSource and SPEC2K test suites
2. Includes several new tests for the regressions we found during
development.
3. The SetCondInst instruction is still used for floating point
comparisons.
4. The ICmpInst instruction should now be used for all integer/pointer
comparisons.
5. In several places we went ahead and implemented the FCmpInst logic
for floating
   point. It was just easier to do it while thinking of that code. In
such places 
   you will see SetCC, ICmp and FCmp cases. However, nothing will
excercise the 
   FCmp cases yet, because:
6. The llvm-gcc patch emits ICmp for integer/pointer and SetCC for
floating 
   point. No FCmpInst instructions are emitted. We'll do that in the
next patch.
7. Much of the [IF]CmpInst infrastructure is already committed:
InstrTypes.h
   (CmpInst), Instructions.h (ICmpInst/FCmpInst), bytecode
reader/writer, assembly
   parser/writer, constant folding, etc. This patch contains some
modifications to 
   those things already committed.
8. CmpInst is not a subclass of BinaryOperator, on purpose.
9. Subsequent patches will get rid of the SetCondInst class altogether
and
   replace its use with FCmpInst.

All comments welcome.

Thanks,

Reid.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: SETCC.patch
Type: text/x-patch
Size: 364070 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20061210/9871583e/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SETCC-llvmgcc.patch
Type: text/x-patch
Size: 6381 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20061210/9871583e/attachment-0001.bin>


More information about the llvm-commits mailing list