HexagonSelectionDAGInfo.cpp revision dce4a407a24b04eebc6a376f8e62b41aaa7b071f
1//===-- HexagonSelectionDAGInfo.cpp - Hexagon SelectionDAG Info -----------===// 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// This file implements the HexagonSelectionDAGInfo class. 11// 12//===----------------------------------------------------------------------===// 13 14#include "HexagonTargetMachine.h" 15using namespace llvm; 16 17#define DEBUG_TYPE "hexagon-selectiondag-info" 18 19bool llvm::flag_aligned_memcpy; 20 21HexagonSelectionDAGInfo::HexagonSelectionDAGInfo(const HexagonTargetMachine 22 &TM) 23 : TargetSelectionDAGInfo(TM) { 24} 25 26HexagonSelectionDAGInfo::~HexagonSelectionDAGInfo() { 27} 28 29SDValue 30HexagonSelectionDAGInfo:: 31EmitTargetCodeForMemcpy(SelectionDAG &DAG, SDLoc dl, SDValue Chain, 32 SDValue Dst, SDValue Src, SDValue Size, unsigned Align, 33 bool isVolatile, bool AlwaysInline, 34 MachinePointerInfo DstPtrInfo, 35 MachinePointerInfo SrcPtrInfo) const { 36 flag_aligned_memcpy = false; 37 if ((Align & 0x3) == 0) { 38 ConstantSDNode *ConstantSize = dyn_cast<ConstantSDNode>(Size); 39 if (ConstantSize) { 40 uint64_t SizeVal = ConstantSize->getZExtValue(); 41 if ((SizeVal > 32) && ((SizeVal % 8) == 0)) 42 flag_aligned_memcpy = true; 43 } 44 } 45 46 return SDValue(); 47} 48