[PATCH] Add NVPTXPeephole pass to reduce unnecessary address cast
Eli Bendersky
eliben at google.com
Thu Jun 18 16:14:42 PDT 2015
================
Comment at: lib/Target/NVPTX/NVPTXPeephole.cpp:8
@@ +7,3 @@
+//
+// In NVPTX, we always use a special frame register which holds local address
+// of frame, NVPTXLowerAlloca may introduce a lot of cvta.to.local instructions,
----------------
Slight rewording/grammar:
// In NVPTX, we always use a special frame register which holds local address
// of frame. NVPTXLowerAlloca may introduce a lot of cvta.to.local instructions.
// This peephole pass optimizes these cases, for example
also, I'd clarify a bit more what "holds local address" means
================
Comment at: lib/Target/NVPTX/NVPTXPeephole.cpp:81
@@ +80,3 @@
+ if (!GenericAddrDef
+ || GenericAddrDef->getParent() != &MBB
+ || (GenericAddrDef->getOpcode() != NVPTX::LEA_ADDRi64 &&
----------------
jingyue wrote:
> The indentation looks strange. Did you run clang-format?
FWIW - since this is a new file, I'd suggest running it through clang-format with the LLVM style setting.
http://reviews.llvm.org/D10549
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list