[PATCH] Add NVPTXPeephole pass to reduce unnecessary address cast
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,
// 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 &&
> 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.
More information about the llvm-commits