LLVM 19.0.0git
Macros | Functions | Variables
HexagonISelLowering.cpp File Reference
#include "HexagonISelLowering.h"
#include "Hexagon.h"
#include "HexagonMachineFunctionInfo.h"
#include "HexagonRegisterInfo.h"
#include "HexagonSubtarget.h"
#include "HexagonTargetMachine.h"
#include "HexagonTargetObjectFile.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/SmallVector.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/RuntimeLibcalls.h"
#include "llvm/CodeGen/SelectionDAG.h"
#include "llvm/CodeGen/TargetCallingConv.h"
#include "llvm/CodeGen/ValueTypes.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/CallingConv.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/DiagnosticInfo.h"
#include "llvm/IR/DiagnosticPrinter.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/IR/InlineAsm.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/IntrinsicsHexagon.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/Value.h"
#include "llvm/MC/MCRegisterInfo.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/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetMachine.h"
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <limits>
#include <utility>
#include "HexagonGenCallingConv.inc"

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "hexagon-lowering"
 

Functions

static bool CC_SkipOdd (unsigned &ValNo, MVT &ValVT, MVT &LocVT, CCValAssign::LocInfo &LocInfo, ISD::ArgFlagsTy &ArgFlags, CCState &State)
 
static SDValue CreateCopyOfByValArgument (SDValue Src, SDValue Dst, SDValue Chain, ISD::ArgFlagsTy Flags, SelectionDAG &DAG, const SDLoc &dl)
 CreateCopyOfByValArgument - Make a copy of an aggregate at address specified by "Src" to address "Dst" of size "Size".
 
static bool isBrevLdIntrinsic (const Value *Inst)
 
static ValuegetBrevLdObject (Value *V)
 
static ValuereturnEdge (const PHINode *PN, Value *IntrBaseVal)
 
static ValuegetUnderLyingObjectForBrevLdIntr (Value *V)
 

Variables

static cl::opt< boolEmitJumpTables ("hexagon-emit-jump-tables", cl::init(true), cl::Hidden, cl::desc("Control jump table emission on Hexagon target"))
 
static cl::opt< boolEnableHexSDNodeSched ("enable-hexagon-sdnode-sched", cl::Hidden, cl::desc("Enable Hexagon SDNode scheduling"))
 
static cl::opt< boolEnableFastMath ("ffast-math", cl::Hidden, cl::desc("Enable Fast Math processing"))
 
static cl::opt< int > MinimumJumpTables ("minimum-jump-tables", cl::Hidden, cl::init(5), cl::desc("Set minimum jump tables"))
 
static cl::opt< int > MaxStoresPerMemcpyCL ("max-store-memcpy", cl::Hidden, cl::init(6), cl::desc("Max #stores to inline memcpy"))
 
static cl::opt< int > MaxStoresPerMemcpyOptSizeCL ("max-store-memcpy-Os", cl::Hidden, cl::init(4), cl::desc("Max #stores to inline memcpy"))
 
static cl::opt< int > MaxStoresPerMemmoveCL ("max-store-memmove", cl::Hidden, cl::init(6), cl::desc("Max #stores to inline memmove"))
 
static cl::opt< int > MaxStoresPerMemmoveOptSizeCL ("max-store-memmove-Os", cl::Hidden, cl::init(4), cl::desc("Max #stores to inline memmove"))
 
static cl::opt< int > MaxStoresPerMemsetCL ("max-store-memset", cl::Hidden, cl::init(8), cl::desc("Max #stores to inline memset"))
 
static cl::opt< int > MaxStoresPerMemsetOptSizeCL ("max-store-memset-Os", cl::Hidden, cl::init(4), cl::desc("Max #stores to inline memset"))
 
static cl::opt< boolAlignLoads ("hexagon-align-loads", cl::Hidden, cl::init(false), cl::desc("Rewrite unaligned loads as a pair of aligned loads"))
 
static cl::opt< boolDisableArgsMinAlignment ("hexagon-disable-args-min-alignment", cl::Hidden, cl::init(false), cl::desc("Disable minimum alignment of 1 for " "arguments passed by value on stack"))
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "hexagon-lowering"

Definition at line 69 of file HexagonISelLowering.cpp.

Function Documentation

◆ CC_SkipOdd()

static bool CC_SkipOdd ( unsigned ValNo,
MVT ValVT,
MVT LocVT,
CCValAssign::LocInfo LocInfo,
ISD::ArgFlagsTy ArgFlags,
CCState State 
)
static

◆ CreateCopyOfByValArgument()

static SDValue CreateCopyOfByValArgument ( SDValue  Src,
SDValue  Dst,
SDValue  Chain,
ISD::ArgFlagsTy  Flags,
SelectionDAG DAG,
const SDLoc dl 
)
static

CreateCopyOfByValArgument - Make a copy of an aggregate at address specified by "Src" to address "Dst" of size "Size".

Alignment information is specified by the specific parameter attribute. The copy will be passed as a byval function parameter. Sometimes what we are copying is the end of a larger object, the part that does not fit in registers.

Definition at line 174 of file HexagonISelLowering.cpp.

References llvm::SelectionDAG::getConstant(), and llvm::SelectionDAG::getMemcpy().

Referenced by llvm::HexagonTargetLowering::LowerCall().

◆ getBrevLdObject()

static Value * getBrevLdObject ( Value V)
static

◆ getUnderLyingObjectForBrevLdIntr()

static Value * getUnderLyingObjectForBrevLdIntr ( Value V)
static

◆ isBrevLdIntrinsic()

static bool isBrevLdIntrinsic ( const Value Inst)
static

Definition at line 2010 of file HexagonISelLowering.cpp.

Referenced by getBrevLdObject().

◆ returnEdge()

static Value * returnEdge ( const PHINode PN,
Value IntrBaseVal 
)
static

Variable Documentation

◆ AlignLoads

cl::opt< bool > AlignLoads("hexagon-align-loads", cl::Hidden, cl::init(false), cl::desc("Rewrite unaligned loads as a pair of aligned loads")) ( "hexagon-align-loads"  ,
cl::Hidden  ,
cl::init(false)  ,
cl::desc("Rewrite unaligned loads as a pair of aligned loads")   
)
static

◆ DisableArgsMinAlignment

cl::opt< bool > DisableArgsMinAlignment("hexagon-disable-args-min-alignment", cl::Hidden, cl::init(false), cl::desc("Disable minimum alignment of 1 for " "arguments passed by value on stack")) ( "hexagon-disable-args-min-alignment"  ,
cl::Hidden  ,
cl::init(false)  ,
cl::desc("Disable minimum alignment of 1 for " "arguments passed by value on stack")   
)
static

◆ EmitJumpTables

cl::opt< bool > EmitJumpTables("hexagon-emit-jump-tables", cl::init(true), cl::Hidden, cl::desc("Control jump table emission on Hexagon target")) ( "hexagon-emit-jump-tables"  ,
cl::init(true ,
cl::Hidden  ,
cl::desc("Control jump table emission on Hexagon target")   
)
static

◆ EnableFastMath

cl::opt< bool > EnableFastMath("ffast-math", cl::Hidden, cl::desc("Enable Fast Math processing")) ( "ffast-math"  ,
cl::Hidden  ,
cl::desc("Enable Fast Math processing")   
)
static

◆ EnableHexSDNodeSched

cl::opt< bool > EnableHexSDNodeSched("enable-hexagon-sdnode-sched", cl::Hidden, cl::desc("Enable Hexagon SDNode scheduling")) ( "enable-hexagon-sdnode-sched"  ,
cl::Hidden  ,
cl::desc("Enable Hexagon SDNode scheduling")   
)
static

◆ MaxStoresPerMemcpyCL

cl::opt< int > MaxStoresPerMemcpyCL("max-store-memcpy", cl::Hidden, cl::init(6), cl::desc("Max #stores to inline memcpy")) ( "max-store-memcpy"  ,
cl::Hidden  ,
cl::init(6)  ,
cl::desc("Max #stores to inline memcpy")   
)
static

◆ MaxStoresPerMemcpyOptSizeCL

cl::opt< int > MaxStoresPerMemcpyOptSizeCL("max-store-memcpy-Os", cl::Hidden, cl::init(4), cl::desc("Max #stores to inline memcpy")) ( "max-store-memcpy-Os"  ,
cl::Hidden  ,
cl::init(4)  ,
cl::desc("Max #stores to inline memcpy")   
)
static

◆ MaxStoresPerMemmoveCL

cl::opt< int > MaxStoresPerMemmoveCL("max-store-memmove", cl::Hidden, cl::init(6), cl::desc("Max #stores to inline memmove")) ( "max-store-memmove"  ,
cl::Hidden  ,
cl::init(6)  ,
cl::desc("Max #stores to inline memmove")   
)
static

◆ MaxStoresPerMemmoveOptSizeCL

cl::opt< int > MaxStoresPerMemmoveOptSizeCL("max-store-memmove-Os", cl::Hidden, cl::init(4), cl::desc("Max #stores to inline memmove")) ( "max-store-memmove-Os"  ,
cl::Hidden  ,
cl::init(4)  ,
cl::desc("Max #stores to inline memmove")   
)
static

◆ MaxStoresPerMemsetCL

cl::opt< int > MaxStoresPerMemsetCL("max-store-memset", cl::Hidden, cl::init(8), cl::desc("Max #stores to inline memset")) ( "max-store-memset"  ,
cl::Hidden  ,
cl::init(8)  ,
cl::desc("Max #stores to inline memset")   
)
static

◆ MaxStoresPerMemsetOptSizeCL

cl::opt< int > MaxStoresPerMemsetOptSizeCL("max-store-memset-Os", cl::Hidden, cl::init(4), cl::desc("Max #stores to inline memset")) ( "max-store-memset-Os"  ,
cl::Hidden  ,
cl::init(4)  ,
cl::desc("Max #stores to inline memset")   
)
static

◆ MinimumJumpTables

cl::opt< int > MinimumJumpTables("minimum-jump-tables", cl::Hidden, cl::init(5), cl::desc("Set minimum jump tables")) ( "minimum-jump-tables"  ,
cl::Hidden  ,
cl::init(5)  ,
cl::desc("Set minimum jump tables")   
)
static