[llvm-commits] [llvm] r150068 - in /llvm/trunk: lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp lib/Target/X86/X86AsmPrinter.cpp lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/avx-intrinsics-...

Demikhovsky, Elena elena.demikhovsky at intel.com
Wed Feb 8 01:45:25 PST 2012


I can initialize a global array somewhere
const char * CmpPseoudoOps [] = {
/* 0 */ "eq",
/* 1 */ "lt",
..
/*0x1f*/ "true_us"
}
#define LEGAL_CMP_OP_FIRST  0
#define LEGAL_CMP_OP_LAST  0x1f

then all three printSETCC() will look like:

Imm = MI->getOperand(Op).getImm();
if (Imm < LEGAL_CMP_OP_FIRST  ) || (Imm > LEGAL_CMP_OP_LAST) - unreachable

O << CmpPseoudoOps[Imm];

  If it looks good, where the best place for the array initialization?

- Elena

-----Original Message-----
From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Duncan Sands
Sent: Wednesday, February 08, 2012 10:46
To: llvm-commits at cs.uiuc.edu
Subject: Re: [llvm-commits] [llvm] r150068 - in /llvm/trunk: lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp lib/Target/X86/X86AsmPrinter.cpp lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/avx-intrinsics-...

Hi Elena, there seems to be a lot of repetition: what seems like the same
big switch for ssecc printing in three files.  Can they be unified somehow?

Ciao, Duncan.
_______________________________________________
llvm-commits mailing list
llvm-commits at cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.





More information about the llvm-commits mailing list