Use const with TargetLowering references in a few more places.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62260 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman 2009-01-15 16:43:02 +00:00
parent 73e0914848
commit 0d137d7f35
2 changed files with 7 additions and 5 deletions

View File

@ -542,7 +542,7 @@ void SelectionDAGLegalize::HandleOp(SDValue Op) {
/// ExpandConstantFP - Expands the ConstantFP node to an integer constant or /// ExpandConstantFP - Expands the ConstantFP node to an integer constant or
/// a load from the constant pool. /// a load from the constant pool.
static SDValue ExpandConstantFP(ConstantFPSDNode *CFP, bool UseCP, static SDValue ExpandConstantFP(ConstantFPSDNode *CFP, bool UseCP,
SelectionDAG &DAG, TargetLowering &TLI) { SelectionDAG &DAG, const TargetLowering &TLI) {
bool Extend = false; bool Extend = false;
// If a FP immediate is precise when represented as a float and if the // If a FP immediate is precise when represented as a float and if the
@ -591,7 +591,8 @@ static SDValue ExpandConstantFP(ConstantFPSDNode *CFP, bool UseCP,
/// operations. /// operations.
static static
SDValue ExpandFCOPYSIGNToBitwiseOps(SDNode *Node, MVT NVT, SDValue ExpandFCOPYSIGNToBitwiseOps(SDNode *Node, MVT NVT,
SelectionDAG &DAG, TargetLowering &TLI) { SelectionDAG &DAG,
const TargetLowering &TLI) {
MVT VT = Node->getValueType(0); MVT VT = Node->getValueType(0);
MVT SrcVT = Node->getOperand(1).getValueType(); MVT SrcVT = Node->getOperand(1).getValueType();
assert((SrcVT == MVT::f32 || SrcVT == MVT::f64) && assert((SrcVT == MVT::f32 || SrcVT == MVT::f64) &&
@ -633,7 +634,7 @@ SDValue ExpandFCOPYSIGNToBitwiseOps(SDNode *Node, MVT NVT,
/// ExpandUnalignedStore - Expands an unaligned store to 2 half-size stores. /// ExpandUnalignedStore - Expands an unaligned store to 2 half-size stores.
static static
SDValue ExpandUnalignedStore(StoreSDNode *ST, SelectionDAG &DAG, SDValue ExpandUnalignedStore(StoreSDNode *ST, SelectionDAG &DAG,
TargetLowering &TLI) { const TargetLowering &TLI) {
SDValue Chain = ST->getChain(); SDValue Chain = ST->getChain();
SDValue Ptr = ST->getBasePtr(); SDValue Ptr = ST->getBasePtr();
SDValue Val = ST->getValue(); SDValue Val = ST->getValue();
@ -8301,7 +8302,7 @@ SDValue SelectionDAGLegalize::WidenVectorOp(SDValue Op, MVT WidenVT) {
// Width: Preferred width of element type // Width: Preferred width of element type
// VVT: Vector value type whose size we must match. // VVT: Vector value type whose size we must match.
// Returns VecEVT and EVT - the vector type and its associated element type // Returns VecEVT and EVT - the vector type and its associated element type
static void FindWidenVecType(TargetLowering &TLI, unsigned Width, MVT VVT, static void FindWidenVecType(const TargetLowering &TLI, unsigned Width, MVT VVT,
MVT& EVT, MVT& VecEVT) { MVT& EVT, MVT& VecEVT) {
// We start with the preferred width, make it a power of 2 and see if // We start with the preferred width, make it a power of 2 and see if
// we can find a vector type of that width. If not, we reduce it by // we can find a vector type of that width. If not, we reduce it by

View File

@ -1886,7 +1886,8 @@ SDValue DAGTypeLegalizer::WidenVecOp_STORE(SDNode *N) {
// VecVT: Vector value type whose size we must match. // VecVT: Vector value type whose size we must match.
// Returns NewVecVT and NewEltVT - the vector type and its associated // Returns NewVecVT and NewEltVT - the vector type and its associated
// element type. // element type.
static void FindAssocWidenVecType(TargetLowering &TLI, unsigned Width, MVT VecVT, static void FindAssocWidenVecType(const TargetLowering &TLI, unsigned Width,
MVT VecVT,
MVT& NewEltVT, MVT& NewVecVT) { MVT& NewEltVT, MVT& NewVecVT) {
unsigned EltWidth = Width + 1; unsigned EltWidth = Width + 1;
if (TLI.isTypeLegal(VecVT)) { if (TLI.isTypeLegal(VecVT)) {