[llvm] r245886 - Revert two bad commits.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 24 16:35:41 PDT 2015


On Mon, Aug 24, 2015 at 3:07 PM, JF Bastien via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: jfb
> Date: Mon Aug 24 17:07:33 2015
> New Revision: 245886
>
> URL: http://llvm.org/viewvc/llvm-project?rev=245886&view=rev
> Log:
> Revert two bad commits.
>

Helps to mention which revisions were reverted (so when someone goes
searching for them they can find all the relevant context) & sometimes to
follow-up on the original commit mails to mention what happened (again,
makes it easier to find all the context), potentially including the
revision number where the revert happened. So it's all stitched
together/easy to navigate.


>
> Summary: I forgot to squash git commits before doing an svn dcommit of
> D12219. Reverting, and re-submitting.
>
> Subscribers: jfb, llvm-commits
>
> Differential Revision: http://reviews.llvm.org/D12298
>
> Removed:
>     llvm/trunk/lib/Target/WebAssembly/WebAssemblyISD.def
> Modified:
>
> llvm/trunk/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp
>     llvm/trunk/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.h
>     llvm/trunk/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
>     llvm/trunk/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
>     llvm/trunk/lib/Target/WebAssembly/WebAssemblyISelLowering.h
>     llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrCall.td
>     llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrFormats.td
>     llvm/trunk/test/CodeGen/WebAssembly/call.ll
>
> Modified:
> llvm/trunk/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp?rev=245886&r1=245885&r2=245886&view=diff
>
> ==============================================================================
> ---
> llvm/trunk/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp
> (original)
> +++
> llvm/trunk/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp
> Mon Aug 24 17:07:33 2015
> @@ -44,16 +44,3 @@ void WebAssemblyInstPrinter::printInst(c
>    printInstruction(MI, OS);
>    printAnnotation(OS, Annot);
>  }
> -
> -void WebAssemblyInstPrinter::printOperand(const MCInst *MI, unsigned OpNo,
> -                                          raw_ostream &O) {
> -  const MCOperand &Op = MI->getOperand(OpNo);
> -  if (Op.isReg())
> -    O << getRegisterName(Op.getReg());
> -  else if (Op.isImm())
> -    O << '#' << Op.getImm();
> -  else {
> -    assert(Op.isExpr() && "unknown operand kind in printOperand");
> -    Op.getExpr()->print(O, &MAI);
> -  }
> -}
>
> Modified:
> llvm/trunk/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.h?rev=245886&r1=245885&r2=245886&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.h
> (original)
> +++ llvm/trunk/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.h
> Mon Aug 24 17:07:33 2015
> @@ -32,9 +32,6 @@ public:
>    void printInst(const MCInst *MI, raw_ostream &OS, StringRef Annot,
>                   const MCSubtargetInfo &STI) override;
>
> -  // Used by tblegen code.
> -  void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);
> -
>    // Autogenerated by tblgen.
>    void printInstruction(const MCInst *MI, raw_ostream &O);
>    static const char *getRegisterName(unsigned RegNo);
>
> Modified: llvm/trunk/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp?rev=245886&r1=245885&r2=245886&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp (original)
> +++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp Mon Aug 24
> 17:07:33 2015
> @@ -85,7 +85,6 @@ static SmallString<32> Name(const WebAss
>  }
>
>  void WebAssemblyAsmPrinter::EmitInstruction(const MachineInstr *MI) {
> -  DEBUG(dbgs() << "EmitInstruction: " << *MI << '\n');
>    SmallString<128> Str;
>    raw_svector_ostream OS(Str);
>
>
> Removed: llvm/trunk/lib/Target/WebAssembly/WebAssemblyISD.def
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/WebAssemblyISD.def?rev=245885&view=auto
>
> ==============================================================================
> --- llvm/trunk/lib/Target/WebAssembly/WebAssemblyISD.def (original)
> +++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyISD.def (removed)
> @@ -1,19 +0,0 @@
> -//- WebAssemblyISD.def - WebAssembly ISD ---------------------------*-
> C++ -*-//
> -//
> -//                     The LLVM Compiler Infrastructure
> -//
> -// This file is distributed under the University of Illinois Open Source
> -// License. See LICENSE.TXT for details.
> -//
>
> -//===----------------------------------------------------------------------===//
> -///
> -/// \file
> -/// \brief This file describes the various WebAssembly ISD node types.
> -///
>
> -//===----------------------------------------------------------------------===//
> -
> -// NOTE: NO INCLUDE GUARD DESIRED!
> -
> -HANDLE_NODETYPE(CALL)
> -HANDLE_NODETYPE(RETURN)
> -HANDLE_NODETYPE(ARGUMENT)
>
> Modified: llvm/trunk/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp?rev=245886&r1=245885&r2=245886&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
> (original)
> +++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp Mon Aug
> 24 17:07:33 2015
> @@ -19,7 +19,6 @@
>  #include "WebAssemblyTargetMachine.h"
>  #include "WebAssemblyTargetObjectFile.h"
>  #include "llvm/CodeGen/Analysis.h"
> -#include "llvm/CodeGen/CallingConvLower.h"
>  #include "llvm/CodeGen/MachineRegisterInfo.h"
>  #include "llvm/CodeGen/SelectionDAG.h"
>  #include "llvm/IR/DiagnosticInfo.h"
> @@ -165,13 +164,9 @@ MVT WebAssemblyTargetLowering::getScalar
>  const char *
>  WebAssemblyTargetLowering::getTargetNodeName(unsigned Opcode) const {
>    switch (static_cast<WebAssemblyISD::NodeType>(Opcode)) {
> -  case WebAssemblyISD::FIRST_NUMBER:
> -    break;
> -#define HANDLE_NODETYPE(NODE)
>       \
> -  case WebAssemblyISD::NODE:
>      \
> -    return "WebAssemblyISD::" #NODE;
> -#include "WebAssemblyISD.def"
> -#undef HANDLE_NODETYPE
> +  case WebAssemblyISD::FIRST_NUMBER: break;
> +  case WebAssemblyISD::RETURN: return "WebAssemblyISD::RETURN";
> +  case WebAssemblyISD::ARGUMENT: return "WebAssemblyISD::ARGUMENT";
>    }
>    return nullptr;
>  }
> @@ -190,6 +185,7 @@ static void fail(SDLoc DL, SelectionDAG
>        DiagnosticInfoUnsupported(DL, *MF.getFunction(), msg, SDValue()));
>  }
>
> +<<<<<<< HEAD
>  SDValue
>  WebAssemblyTargetLowering::LowerCall(CallLoweringInfo &CLI,
>                                       SmallVectorImpl<SDValue> &InVals)
> const {
> @@ -209,6 +205,7 @@ WebAssemblyTargetLowering::LowerCall(Cal
>
>    SmallVectorImpl<ISD::OutputArg> &Outs = CLI.Outs;
>    SmallVectorImpl<SDValue> &OutVals = CLI.OutVals;
> +  Type *retTy = CLI.RetTy;
>    bool IsStructRet = (Outs.empty()) ? false : Outs[0].Flags.isSRet();
>    if (IsStructRet)
>      fail(DL, DAG, "WebAssembly doesn't support struct return yet");
> @@ -216,6 +213,7 @@ WebAssemblyTargetLowering::LowerCall(Cal
>      fail(DL, DAG, "WebAssembly doesn't support more than 1 returned value
> yet");
>
>    SmallVectorImpl<ISD::InputArg> &Ins = CLI.Ins;
> +  ArgListTy &Args = CLI.getArgs();
>    bool IsVarArg = CLI.IsVarArg;
>    if (IsVarArg)
>      fail(DL, DAG, "WebAssembly doesn't support varargs yet");
> @@ -225,33 +223,33 @@ WebAssemblyTargetLowering::LowerCall(Cal
>    unsigned NumBytes = CCInfo.getNextStackOffset();
>
>    auto PtrVT = getPointerTy(MF.getDataLayout());
> -  auto Zero = DAG.getConstant(0, DL, PtrVT, true);
> -  auto NB = DAG.getConstant(NumBytes, DL, PtrVT, true);
> -  Chain = DAG.getCALLSEQ_START(Chain, NB, DL);
> +  auto Zero = DAG.getConstant(0, CLI.DL, PtrVT, true);
> +  auto NB = DAG.getConstant(NumBytes, CLI.DL, PtrVT, true);
> +  Chain = DAG.getCALLSEQ_START(Chain, NB, CLI.DL);
>
>    SmallVector<SDValue, 16> Ops;
>    Ops.push_back(Chain);
> -  Ops.push_back(Callee);
> -  Ops.append(OutVals.begin(), OutVals.end());
> +  Ops.push_back(CLI.Callee);
> +  Ops.append(CLI.OutVals.begin(), CLI.OutVals.end());
>
>    SmallVector<EVT, 8> Tys;
> -  for (const auto &In : Ins)
> +  for (const auto &In : CLI.Ins)
>      Tys.push_back(In.VT);
>    Tys.push_back(MVT::Other);
> -  SDVTList TyList = DAG.getVTList(Tys);
> -  SDValue Res = DAG.getNode(WebAssemblyISD::CALL, DL, TyList, Ops);
> -  if (!Ins.empty()) {
> -    InVals.push_back(Res);
> -    Chain = Res.getValue(1);
> -  }
> +  SDVTList TyList = CLI.DAG.getVTList(Tys);
> +  SDValue Res = CLI.DAG.getNode(WebAssemblyISD::CALL, CLI.DL, TyList,
> Ops);
> +  InVals.push_back(Res);
> +  Chain = Res.getValue(1);
>
>    // FIXME: handle CLI.RetSExt and CLI.RetZExt?
>
> -  Chain = DAG.getCALLSEQ_END(Chain, NB, Zero, SDValue(), DL);
> +  Chain = CLI.DAG.getCALLSEQ_END(Chain, NB, Zero, SDValue(), CLI.DL);
>
>    return Chain;
>  }
>
> +=======
> +>>>>>>> parent of 03685a9... call
>  bool WebAssemblyTargetLowering::CanLowerReturn(
>      CallingConv::ID CallConv, MachineFunction &MF, bool IsVarArg,
>      const SmallVectorImpl<ISD::OutputArg> &Outs, LLVMContext &Context)
> const {
>
> Modified: llvm/trunk/lib/Target/WebAssembly/WebAssemblyISelLowering.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/WebAssemblyISelLowering.h?rev=245886&r1=245885&r2=245886&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/WebAssembly/WebAssemblyISelLowering.h (original)
> +++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyISelLowering.h Mon Aug 24
> 17:07:33 2015
> @@ -24,9 +24,9 @@ namespace WebAssemblyISD {
>
>  enum NodeType : unsigned {
>    FIRST_NUMBER = ISD::BUILTIN_OP_END,
> -#define HANDLE_NODETYPE(NODE) NODE,
> -#include "WebAssemblyISD.def"
> -#undef HANDLE_NODETYPE
> +  RETURN,
> +  ARGUMENT,
> +
>    // add memory opcodes starting at ISD::FIRST_TARGET_MEMORY_OPCODE
> here...
>  };
>
> @@ -52,9 +52,6 @@ private:
>
>    const char *getTargetNodeName(unsigned Opcode) const override;
>
> -  SDValue LowerCall(CallLoweringInfo &CLI,
> -                    SmallVectorImpl<SDValue> &InVals) const override;
> -
>    bool CanLowerReturn(CallingConv::ID CallConv, MachineFunction &MF,
>                        bool isVarArg,
>                        const SmallVectorImpl<ISD::OutputArg> &Outs,
>
> Modified: llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrCall.td
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrCall.td?rev=245886&r1=245885&r2=245886&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrCall.td (original)
> +++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrCall.td Mon Aug 24
> 17:07:33 2015
> @@ -12,29 +12,6 @@
>  ///
>
>  //===----------------------------------------------------------------------===//
>
> -// The call sequence start/end LLVM-isms isn't useful to WebAssembly
> since it's
> -// a virtual ISA.
> -
> -// FIXME make noop?
> -//def : Pat<(WebAssemblycallseq_start timm), (i32 (IMPLICIT_DEF))>;
> -//def : Pat<(WebAssemblycallseq_end timm, timm), (i32 (IMPLICIT_DEF))>;
> -
> -def SDT_WebAssemblyCallSeqStart : SDCallSeqStart<[SDTCisVT<0, iPTR>]>;
> -def SDT_WebAssemblyCallSeqEnd :
> -    SDCallSeqEnd<[SDTCisVT<0, iPTR>, SDTCisVT<1, iPTR>]>;
> -def WebAssemblycallseq_start :
> -    SDNode<"ISD::CALLSEQ_START", SDT_WebAssemblyCallSeqStart,
> -           [SDNPHasChain, SDNPOutGlue]>;
> -def WebAssemblycallseq_end :
> -    SDNode<"ISD::CALLSEQ_END", SDT_WebAssemblyCallSeqEnd,
> -           [SDNPHasChain, SDNPOptInGlue, SDNPOutGlue]>;
> -def : Pseudo<(outs), (ins i64imm:$amt),
> -             [(WebAssemblycallseq_start timm:$amt)],
> -             "#ADJCALLSTACKDOWN $amt">;
> -def : Pseudo<(outs), (ins i64imm:$amt1, i64imm:$amt2),
> -             [(WebAssemblycallseq_end timm:$amt1, timm:$amt2)],
> -            "#ADJCALLSTACKUP $amt1 $amt2">;
> -
>  /*
>   * TODO(jfb): Add the following.
>   *
>
> Modified: llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrFormats.td
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrFormats.td?rev=245886&r1=245885&r2=245886&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrFormats.td (original)
> +++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrFormats.td Mon Aug
> 24 17:07:33 2015
> @@ -12,7 +12,7 @@
>  ///
>
>  //===----------------------------------------------------------------------===//
>
> -// WebAssembly Instruction Format.
> +// WebAssembly Instruction Format
>  class WebAssemblyInst<string cstr> : Instruction {
>    field bits<0> Inst; // Instruction encoding.
>    let Namespace   = "WebAssembly";
> @@ -20,7 +20,7 @@ class WebAssemblyInst<string cstr> : Ins
>    let Constraints = cstr;
>  }
>
> -// Normal instructions.
> +// Normal instructions
>  class I<dag oops, dag iops, list<dag> pattern, string cstr = "">
>      : WebAssemblyInst<cstr> {
>    dag OutOperandList = oops;
> @@ -28,14 +28,6 @@ class I<dag oops, dag iops, list<dag> pa
>    let Pattern        = pattern;
>  }
>
> -// Pseudo instructions.
> -class Pseudo<dag oops, dag iops, list<dag> pattern, string asmstr,
> -             string cstr = "">
> -  : I<oops, iops, pattern, cstr> {
> -  let isPseudo  = 1;
> -  let AsmString = asmstr;
> -}
> -
>  // Unary and binary instructions, for the local types that WebAssembly
> supports.
>  multiclass UnaryInt<SDNode node> {
>    def _I32 : I<(outs Int32:$dst), (ins Int32:$src),
>
> Modified: llvm/trunk/test/CodeGen/WebAssembly/call.ll
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/WebAssembly/call.ll?rev=245886&r1=245885&r2=245886&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/CodeGen/WebAssembly/call.ll (original)
> +++ llvm/trunk/test/CodeGen/WebAssembly/call.ll Mon Aug 24 17:07:33 2015
> @@ -5,14 +5,13 @@
>  target datalayout = "e-p:32:32-i64:64-v128:8:128-n32:64-S128"
>  target triple = "wasm32-unknown-unknown"
>
> -declare void @void_nullary()
> -declare void @int32_nullary()
> +declare void @nullary()
>
> -; CHECK-LABEL: call_void_nullary:
> +; CHECK-LABEL: call_nullary:
>  ; CHECK-NEXT: (call @foo)
>  ; CHECK-NEXT: (return)
> -define void @call_void_nullary() {
> -  call void @void_nullary()
> +define void @call_nullary() {
> +  call void @nullary()
>    ret void
>  }
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150824/3502dedf/attachment.html>


More information about the llvm-commits mailing list