[PATCH] D11363: Allow merging of immediates within a basic block for code size savings and reduced footprint.

Michael Kuperstein michael.m.kuperstein at intel.com
Tue Jul 21 01:53:00 PDT 2015


mkuper added a comment.

Hi Zia,

A couple of small comments inline.


================
Comment at: lib/Target/X86/X86ISelDAGToDAG.cpp:300
@@ +299,3 @@
+        for (SDNode::use_iterator UI = N->use_begin(),
+                 UE = N->use_end(); UI != UE; ++UI) {
+
----------------
You can add a UseCount > 1 condition to bail out of the loop immediately once you're past the threshold.

================
Comment at: lib/Target/X86/X86ISelDAGToDAG.cpp:337
@@ +336,3 @@
+                // Find the other operand of the add/sub.
+                SDValue otherOp = User->getOperand(0);
+                if (otherOp.getNode() == N)
----------------
otherOp should start with a capital.


http://reviews.llvm.org/D11363







More information about the llvm-commits mailing list