[PATCH] D53396: [WebAssembly] Fixup main signature by default
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 1 12:41:09 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL345880: [WebAssembly] Fixup `main` signature by default (authored by sbc, committed by ).
Repository:
rL LLVM
https://reviews.llvm.org/D53396
Files:
llvm/trunk/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp
llvm/trunk/test/CodeGen/WebAssembly/call.ll
llvm/trunk/test/CodeGen/WebAssembly/function-bitcasts-varargs.ll
llvm/trunk/test/CodeGen/WebAssembly/function-bitcasts.ll
llvm/trunk/test/CodeGen/WebAssembly/main-declaration.ll
llvm/trunk/test/CodeGen/WebAssembly/main-no-args.ll
llvm/trunk/test/CodeGen/WebAssembly/main-with-args.ll
Index: llvm/trunk/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp
===================================================================
--- llvm/trunk/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp
+++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp
@@ -36,11 +36,6 @@
#define DEBUG_TYPE "wasm-fix-function-bitcasts"
-static cl::opt<bool>
- TemporaryWorkarounds("wasm-temporary-workarounds",
- cl::desc("Apply certain temporary workarounds"),
- cl::init(true), cl::Hidden);
-
namespace {
class FixFunctionBitcasts final : public ModulePass {
StringRef getPassName() const override {
@@ -241,7 +236,7 @@
// "int main(int argc, char *argv[])", create an artificial call with it
// bitcasted to that type so that we generate a wrapper for it, so that
// the C runtime can call it.
- if (!TemporaryWorkarounds && !F.isDeclaration() && F.getName() == "main") {
+ if (!F.isDeclaration() && F.getName() == "main") {
Main = &F;
LLVMContext &C = M.getContext();
Type *MainArgTys[] = {Type::getInt32Ty(C),
Index: llvm/trunk/test/CodeGen/WebAssembly/call.ll
===================================================================
--- llvm/trunk/test/CodeGen/WebAssembly/call.ll
+++ llvm/trunk/test/CodeGen/WebAssembly/call.ll
@@ -1,5 +1,5 @@
-; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-keep-registers -wasm-temporary-workarounds=false -mattr=+sign-ext,+simd128 | FileCheck %s
-; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-keep-registers -fast-isel -fast-isel-abort=1 -wasm-temporary-workarounds=false -mattr=+sign-ext,+simd128 | FileCheck %s
+; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-keep-registers -mattr=+sign-ext,+simd128 | FileCheck %s
+; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-keep-registers -fast-isel -fast-isel-abort=1 -mattr=+sign-ext,+simd128 | FileCheck %s
; Test that basic call operations assemble as expected.
Index: llvm/trunk/test/CodeGen/WebAssembly/main-declaration.ll
===================================================================
--- llvm/trunk/test/CodeGen/WebAssembly/main-declaration.ll
+++ llvm/trunk/test/CodeGen/WebAssembly/main-declaration.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -asm-verbose=false -wasm-temporary-workarounds=false | FileCheck %s
+; RUN: llc < %s -asm-verbose=false | FileCheck %s
; Test main functions with alternate signatures.
Index: llvm/trunk/test/CodeGen/WebAssembly/function-bitcasts-varargs.ll
===================================================================
--- llvm/trunk/test/CodeGen/WebAssembly/function-bitcasts-varargs.ll
+++ llvm/trunk/test/CodeGen/WebAssembly/function-bitcasts-varargs.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -asm-verbose=false -wasm-temporary-workarounds=false -wasm-keep-registers | FileCheck %s
+; RUN: llc < %s -asm-verbose=false -wasm-keep-registers | FileCheck %s
; Test that function pointer casts casting away varargs are replaced with
; wrappers.
Index: llvm/trunk/test/CodeGen/WebAssembly/function-bitcasts.ll
===================================================================
--- llvm/trunk/test/CodeGen/WebAssembly/function-bitcasts.ll
+++ llvm/trunk/test/CodeGen/WebAssembly/function-bitcasts.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -asm-verbose=false -wasm-disable-explicit-locals -wasm-keep-registers -enable-emscripten-cxx-exceptions -wasm-temporary-workarounds=false | FileCheck %s
+; RUN: llc < %s -asm-verbose=false -wasm-disable-explicit-locals -wasm-keep-registers -enable-emscripten-cxx-exceptions | FileCheck %s
; Test that function pointer casts are replaced with wrappers.
Index: llvm/trunk/test/CodeGen/WebAssembly/main-no-args.ll
===================================================================
--- llvm/trunk/test/CodeGen/WebAssembly/main-no-args.ll
+++ llvm/trunk/test/CodeGen/WebAssembly/main-no-args.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -asm-verbose=false -wasm-temporary-workarounds=false | FileCheck %s
+; RUN: llc < %s -asm-verbose=false | FileCheck %s
; Test main functions with alternate signatures.
Index: llvm/trunk/test/CodeGen/WebAssembly/main-with-args.ll
===================================================================
--- llvm/trunk/test/CodeGen/WebAssembly/main-with-args.ll
+++ llvm/trunk/test/CodeGen/WebAssembly/main-with-args.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -asm-verbose=false -wasm-temporary-workarounds=false | FileCheck %s
+; RUN: llc < %s -asm-verbose=false | FileCheck %s
; Test that main function with expected signature is not wrapped
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53396.172203.patch
Type: text/x-patch
Size: 4674 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181101/86bd446a/attachment.bin>
More information about the llvm-commits
mailing list