[PATCH] D9751: Add HSAIL target

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 21 12:10:24 PDT 2015


arsenm added inline comments.

================
Comment at: lib/Target/HSAIL/HSAILISelDAGToDAG.cpp:606-608
@@ +605,5 @@
+
+bool HSAILDAGToDAGISel::SelectAddrCommon(SDValue Addr, SDValue &Base,
+                                         SDValue &Reg, int64_t &Offset,
+                                         MVT ValueType, int Depth) const {
+  if (Depth > 5)
----------------
tstellarAMD wrote:
> Does this function really need to be recursive?  it seems more complicated than it needs to be.
This could probably be simplified a lot. The cases for ADD/OR looks unnecessary. It seems to mostly be to workaround the ADD -> OR combine. I don't think LDA needs to be handled here at all. I fixed it so that global addresses are handled during selection, so this shouldn't be seeing the custom node (which doesn't seem to be used anymore)

================
Comment at: lib/Target/HSAIL/MCTargetDesc/RawVectorOstream.h:23-25
@@ +22,5 @@
+
+namespace llvm {
+
+class RawVectorOstream : public raw_pwrite_stream {
+  static const size_t AllocationChunk = 1024;
----------------
tstellarAMD wrote:
> Is there a reason this isn't in common code? 
I think I can completely remove this for now since it should only be used by the BRIGAsmPrinter


http://reviews.llvm.org/D9751





More information about the llvm-commits mailing list