[PATCH] D23253: [X86] Generalized transformation of `definstr gr8; movzx gr32, gr8` to `xor gr32, gr32; definstr gr8`

Quentin Colombet via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 22 13:52:17 PDT 2016


qcolombet added a comment.

Hi,

What is the performance impact (both runtime and compile time) of the pass?
You list results for test/CodeGen/X86, which is not usually what we use for perform testing. Could you try on the LLVM test suite?

Moreover, like Michael said, we should try to merge this pass with something else. A possible approach would be a peephole like optimization where we can plug more patterns.

Cheers,
-Quentin


================
Comment at: lib/CodeGen/CalcSpillWeights.cpp:46-48
@@ -45,5 +45,5 @@
 // Return the preferred allocation register for reg, given a COPY instruction.
-static unsigned copyHint(const MachineInstr *mi, unsigned reg,
-                         const TargetRegisterInfo &tri,
-                         const MachineRegisterInfo &mri) {
+unsigned VirtRegAuxInfo::copyHint(const MachineInstr *mi, unsigned reg,
+                                  const TargetRegisterInfo &tri,
+                                  const MachineRegisterInfo &mri) {
   unsigned sub, hreg, hsub;
----------------
This seems wrong to export this interface.
External users should rely on MachineRegisterInfo::getSimpleHint.

What is the problem in using MachineRegisterInfo::getSimpleHint?


Repository:
  rL LLVM

https://reviews.llvm.org/D23253





More information about the llvm-commits mailing list