[PATCH] D116462: [SPIRV 3/6] Add MC layer, object file support and InstPrinter

Renato Golin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 1 13:16:15 PST 2022


rengolin added a comment.

Same as the others, looks like a standard MC patch. I do have some inline comments, though.



================
Comment at: llvm/include/llvm/MC/MCContext.h:80
+    enum Environment { IsMachO, IsELF, IsGOFF, IsCOFF, IsWasm, IsXCOFF,
+                       IsSPIRV };
 
----------------
Is this really a new object file type?


================
Comment at: llvm/lib/Target/SPIRV/MCTargetDesc/SPIRVMCAsmInfo.cpp:20
+                               const MCTargetOptions &Options) {
+  IsLittleEndian = true;
+
----------------
A previous patch has a comment on data layout that SPIRV can be either little or big endian. Was that comment left-over from copy-paste or is this line just simplifying the implementation for now?

If the former, removing the comment would be good. If the latter, adding a TODO here would be nice.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116462/new/

https://reviews.llvm.org/D116462



More information about the llvm-commits mailing list