1 //=- WebAssemblyISelLowering.cpp - WebAssembly DAG Lowering Implementation -==// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 /// 10 /// \file 11 /// \brief This file implements the WebAssemblyTargetLowering class. 12 /// 13 //===----------------------------------------------------------------------===// 14 15 #include "WebAssemblyISelLowering.h" 16 #include "MCTargetDesc/WebAssemblyMCTargetDesc.h" 17 #include "WebAssemblyMachineFunctionInfo.h" 18 #include "WebAssemblySubtarget.h" 19 #include "WebAssemblyTargetMachine.h" 20 #include "WebAssemblyTargetObjectFile.h" 21 #include "llvm/CodeGen/Analysis.h" 22 #include "llvm/CodeGen/MachineRegisterInfo.h" 23 #include "llvm/CodeGen/SelectionDAG.h" 24 #include "llvm/IR/Function.h" 25 #include "llvm/IR/Intrinsics.h" 26 #include "llvm/Support/CommandLine.h" 27 #include "llvm/Support/Debug.h" 28 #include "llvm/Support/ErrorHandling.h" 29 #include "llvm/Support/raw_ostream.h" 30 #include "llvm/Target/TargetOptions.h" 31 using namespace llvm; 32 33 #define DEBUG_TYPE "wasm-lower" 34 35 WebAssemblyTargetLowering::WebAssemblyTargetLowering( 36 const TargetMachine &TM, const WebAssemblySubtarget &STI) 37 : TargetLowering(TM), Subtarget(&STI) { 38 // WebAssembly does not produce floating-point exceptions on normal floating 39 // point operations. 40 setHasFloatingPointExceptions(false); 41 } 42 43 //===----------------------------------------------------------------------===// 44 // WebAssembly Lowering private implementation. 45 //===----------------------------------------------------------------------===// 46 47 //===----------------------------------------------------------------------===// 48 // Lowering Code 49 //===----------------------------------------------------------------------===// 50 51 //===----------------------------------------------------------------------===// 52 // Other Lowering Code 53 //===----------------------------------------------------------------------===// 54 55 //===----------------------------------------------------------------------===// 56 // WebAssembly Optimization Hooks 57 //===----------------------------------------------------------------------===// 58 59 MCSection *WebAssemblyTargetObjectFile::SelectSectionForGlobal( 60 const GlobalValue *GV, SectionKind Kind, Mangler &Mang, 61 const TargetMachine &TM) const { 62 return getDataSection(); 63 } 64