#include "MCTargetDesc/WebAssemblyMCTargetDesc.h"
#include "WebAssembly.h"
#include "WebAssemblyISelLowering.h"
#include "WebAssemblyTargetMachine.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/SelectionDAGISel.h"
#include "llvm/CodeGen/WasmEHFuncInfo.h"
#include "llvm/IR/DiagnosticInfo.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/IntrinsicsWebAssembly.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/KnownBits.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
usingnamespacellvm;
#define DEBUG_TYPE …
#define PASS_NAME …
namespace {
class WebAssemblyDAGToDAGISel final : public SelectionDAGISel { … };
class WebAssemblyDAGToDAGISelLegacy : public SelectionDAGISelLegacy { … };
}
char WebAssemblyDAGToDAGISelLegacy::ID;
INITIALIZE_PASS(…)
void WebAssemblyDAGToDAGISel::PreprocessISelDAG() { … }
static SDValue getTagSymNode(int Tag, SelectionDAG *DAG) { … }
void WebAssemblyDAGToDAGISel::Select(SDNode *Node) { … }
bool WebAssemblyDAGToDAGISel::SelectInlineAsmMemoryOperand(
const SDValue &Op, InlineAsm::ConstraintCode ConstraintID,
std::vector<SDValue> &OutOps) { … }
bool WebAssemblyDAGToDAGISel::SelectAddrAddOperands(MVT OffsetType, SDValue N,
SDValue &Offset,
SDValue &Addr) { … }
bool WebAssemblyDAGToDAGISel::SelectAddrOperands(MVT AddrType,
unsigned ConstOpc, SDValue N,
SDValue &Offset,
SDValue &Addr) { … }
bool WebAssemblyDAGToDAGISel::SelectAddrOperands32(SDValue Op, SDValue &Offset,
SDValue &Addr) { … }
bool WebAssemblyDAGToDAGISel::SelectAddrOperands64(SDValue Op, SDValue &Offset,
SDValue &Addr) { … }
FunctionPass *llvm::createWebAssemblyISelDag(WebAssemblyTargetMachine &TM,
CodeGenOptLevel OptLevel) { … }