[PATCH] D27901: [X86][[AVX512] Code size reduction in X86 by replacing EVEX with VEX encoding

Zvi Rackover via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 25 00:21:11 PST 2016


zvi added inline comments.


================
Comment at: lib/Target/X86/X86EvexToVex.cpp:49
+  /// them by the VEX encoding in order to reduce size.
+  bool CompressEvexToVexImpl(MachineBasicBlock &MBB) const;
+
----------------
Since the transform of an individual instruction is independant of other instructions in the BB, i think it would be better to reduce the scope of this function from a MBB to a MachineInstr. (So the loop on the MBB can be moved to the caller of this function)


================
Comment at: lib/Target/X86/X86EvexToVex.cpp:219
+    MI.setDesc(MCID);
+    MI.setAsmPrinterFlag((MachineInstr::CommentFlag)AC_EXEX_2_VEX);
+    Changed = true;
----------------
Now that this API takes also target-specific flags, I think that instead of casting, setAsmPrinterFlag(CommentFlag) (and friends) should be changed to setAsmPrinterFlag(uint8_t) or something similar.


Repository:
  rL LLVM

https://reviews.llvm.org/D27901





More information about the llvm-commits mailing list