LLVM 20.0.0git
|
#include "LanaiISelLowering.h"
#include "LanaiCondCode.h"
#include "LanaiMachineFunctionInfo.h"
#include "LanaiSubtarget.h"
#include "LanaiTargetObjectFile.h"
#include "MCTargetDesc/LanaiBaseInfo.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/CodeGen/CallingConvLower.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineMemOperand.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/SelectionDAG.h"
#include "llvm/CodeGen/SelectionDAGNodes.h"
#include "llvm/CodeGen/TargetCallingConv.h"
#include "llvm/CodeGen/ValueTypes.h"
#include "llvm/CodeGenTypes/MachineValueType.h"
#include "llvm/IR/CallingConv.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/CodeGen.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/KnownBits.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetMachine.h"
#include <cassert>
#include <cmath>
#include <cstdint>
#include <cstdlib>
#include <utility>
#include "LanaiGenCallingConv.inc"
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "lanai-lower" |
Functions | |
static bool | CC_Lanai32_VarArg (unsigned ValNo, MVT ValVT, MVT LocVT, CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags, CCState &State) |
static LPCC::CondCode | IntCondCCodeToICC (SDValue CC, const SDLoc &DL, SDValue &RHS, SelectionDAG &DAG) |
static bool | isZeroOrAllOnes (SDValue N, bool AllOnes) |
static bool | isConditionalZeroOrAllOnes (SDNode *N, bool AllOnes, SDValue &CC, bool &Invert, SDValue &OtherOp, SelectionDAG &DAG) |
static SDValue | combineSelectAndUse (SDNode *N, SDValue Slct, SDValue OtherOp, TargetLowering::DAGCombinerInfo &DCI, bool AllOnes) |
static SDValue | combineSelectAndUseCommutative (SDNode *N, TargetLowering::DAGCombinerInfo &DCI, bool AllOnes) |
static SDValue | PerformSUBCombine (SDNode *N, TargetLowering::DAGCombinerInfo &DCI) |
Variables | |
static cl::opt< int > | LanaiLowerConstantMulThreshold ("lanai-constant-mul-threshold", cl::Hidden, cl::desc("Maximum number of instruction to generate when lowering constant " "multiplication instead of calling library function [default=14]"), cl::init(14)) |
static unsigned | NumFixedArgs |
#define DEBUG_TYPE "lanai-lower" |
Definition at line 53 of file LanaiISelLowering.cpp.
|
static |
Definition at line 365 of file LanaiISelLowering.cpp.
References llvm::CCState::addLoc(), llvm::CCValAssign::AExt, llvm::CCState::AllocateStack(), llvm::CCValAssign::getMem(), llvm::ISD::ArgFlagsTy::isSExt(), llvm::ISD::ArgFlagsTy::isZExt(), NumFixedArgs, llvm::Offset, llvm::CCValAssign::SExt, and llvm::CCValAssign::ZExt.
|
static |
Definition at line 1412 of file LanaiISelLowering.cpp.
References llvm::AllOnes, llvm::TargetLowering::DAGCombinerInfo::DAG, llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), isConditionalZeroOrAllOnes(), N, llvm::ISD::SELECT, and std::swap().
|
static |
Definition at line 1437 of file LanaiISelLowering.cpp.
References llvm::AllOnes, combineSelectAndUse(), llvm::SDValue::getNode(), llvm::SDNode::hasOneUse(), and N.
|
static |
Definition at line 801 of file LanaiISelLowering.cpp.
References CC, DL, llvm::SelectionDAG::getConstant(), llvm::LPCC::ICC_EQ, llvm::LPCC::ICC_GE, llvm::LPCC::ICC_GT, llvm::LPCC::ICC_LE, llvm::LPCC::ICC_LT, llvm::LPCC::ICC_MI, llvm::LPCC::ICC_NE, llvm::LPCC::ICC_PL, llvm::LPCC::ICC_UGE, llvm::LPCC::ICC_UGT, llvm::LPCC::ICC_ULE, llvm::LPCC::ICC_ULT, llvm_unreachable, RHS, llvm::ISD::SETEQ, llvm::ISD::SETGE, llvm::ISD::SETGT, llvm::ISD::SETLE, llvm::ISD::SETLT, llvm::ISD::SETNE, llvm::ISD::SETO, llvm::ISD::SETOEQ, llvm::ISD::SETOGE, llvm::ISD::SETOGT, llvm::ISD::SETOLE, llvm::ISD::SETOLT, llvm::ISD::SETONE, llvm::ISD::SETUEQ, llvm::ISD::SETUGE, llvm::ISD::SETUGT, llvm::ISD::SETULE, llvm::ISD::SETULT, llvm::ISD::SETUNE, and llvm::ISD::SETUO.
Referenced by llvm::LanaiTargetLowering::LowerBR_CC(), LowerBR_CC(), llvm::LanaiTargetLowering::LowerSELECT_CC(), LowerSELECT_CC(), and llvm::LanaiTargetLowering::LowerSETCC().
|
static |
Definition at line 1342 of file LanaiISelLowering.cpp.
References llvm::AllOnes, CC, llvm::SelectionDAG::getAllOnesConstant(), llvm::SelectionDAG::getConstant(), isZeroOrAllOnes(), N, llvm::ISD::SELECT, llvm::ISD::SIGN_EXTEND, and llvm::ISD::ZERO_EXTEND.
Definition at line 1320 of file LanaiISelLowering.cpp.
References llvm::AllOnes, llvm::isAllOnesConstant(), llvm::isNullConstant(), and N.
|
static |
Definition at line 1451 of file LanaiISelLowering.cpp.
References combineSelectAndUse(), llvm::SDValue::getNode(), llvm::SDNode::hasOneUse(), and N.
|
static |
Referenced by llvm::LanaiTargetLowering::LowerMUL().
|
static |
Definition at line 364 of file LanaiISelLowering.cpp.
Referenced by CC_Lanai32_VarArg(), and llvm::CallLowering::lowerCall().