[PATCH] D17327: [WebAssembly] Disable register stackification and coloring when not optimizing

Derek Schuff via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 17 09:06:07 PST 2016


dschuff added a comment.

That's a good point about user code; I don't really feel strongly about it. Although, register stackification does reorder code, which does affect debugging; so maybe we'd still want to disable that. Also presumably compilation speed is the other factor. Coloring presumably isn't linear, so maybe we'd want to disable that for speed reasons.


================
Comment at: lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp:48
@@ +47,3 @@
+  if (RM != Reloc::Default && RM != Reloc::Static)
+    report_fatal_error("Non-static relocation models are not supported yet");
+  if (CM != CodeModel::Default)
----------------
sunfish wrote:
> I agree with being conservative for such things in general, however WebAssembly code is always PIC, so we already do support all the reloc modes. Accepting all the modes is useful because user build scripts sometimes add -fPIC in target-insensitive ways, for example. I propose we unconditionally override the mode to PIC_, as Darwin does on newer architectures.
> 
Good point, done.


http://reviews.llvm.org/D17327





More information about the llvm-commits mailing list