[llvm-commits] [LLVMdev] [PATCH] Replacing EVT:s with MVT:s (when possible)
Patrik Hägglund H
patrik.h.hagglund at ericsson.com
Fri Dec 7 00:34:35 PST 2012
I have now updated the series to apply cleanly to trunk again. I have also added a new patch at the end, changing AsmOperandInfo::ConstraintVT to MVT.
I think that the only non-obvious parts are the addition of the getSimpleValueType member functions in the first patch, and the changes in the last two patches. The rest is quite mechanical, and should be obvious.
Any objections to the addition of getSimpleValueType (in the first patch)?
/Patrik Hägglund
> git log --stat --reverse origin/master..
commit 9221fbe6c7f2606c3db63cd2aa17e799582ba4e8
Author: Patrik Hägglund <patrik.h.hagglund at ericsson.com>
Date: Tue Dec 4 10:37:37 2012 +0100
Change TargetLowering::getRegClassFor to take an MVT, instead of EVT.
Accordingly, added helper funtions getSimpleValueType (in parallel
to getValueType) in SDValue, SDNode, and TargetLowering.
include/llvm/CodeGen/FunctionLoweringInfo.h | 2 +-
include/llvm/CodeGen/SelectionDAGNodes.h | 11 +++++++++++
include/llvm/Target/TargetLowering.h | 11 +++++++----
lib/CodeGen/SelectionDAG/FastISel.cpp | 11 +++++------
lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp | 4 ++--
lib/CodeGen/SelectionDAG/InstrEmitter.cpp | 14 ++++++++------
lib/CodeGen/SelectionDAG/InstrEmitter.h | 2 +-
lib/CodeGen/SelectionDAG/ResourcePriorityQueue.cpp | 16 ++++++++--------
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 8 ++++----
lib/Target/ARM/ARMFastISel.cpp | 76 +++++++++++++++++++++++++++++++++++-----------------------------------------
lib/Target/ARM/ARMISelLowering.cpp | 2 +-
lib/Target/ARM/ARMISelLowering.h | 2 +-
lib/Target/Mips/MipsISelLowering.cpp | 6 +++---
13 files changed, 87 insertions(+), 78 deletions(-)
commit 6b2d6e1a185e87d97bcf9f7aea3c517af484f97d
Author: Patrik Hägglund <patrik.h.hagglund at ericsson.com>
Date: Tue Dec 4 10:59:05 2012 +0100
Change TargetLowering::getRepRegClassFor to take an MVT, instead of EVT.
Accordingly, change RegDefIter to contain MVTs instead of EVTs.
include/llvm/Target/TargetLowering.h | 5 ++---
lib/CodeGen/MachineLICM.cpp | 2 +-
lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp | 16 ++++++++--------
lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp | 2 +-
lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h | 4 ++--
5 files changed, 14 insertions(+), 15 deletions(-)
commit 76d618f646051da246d1d4d207c144782812ac5c
Author: Patrik Hägglund <patrik.h.hagglund at ericsson.com>
Date: Tue Dec 4 11:11:43 2012 +0100
Change TargetLowering::setTypeAction to take an MVT, instead fo EVT.
include/llvm/Target/TargetLowering.h | 4 ++--
lib/CodeGen/SelectionDAG/TargetLowering.cpp | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
commit 08ade779deb6b842584c392064c2f8105d64dba5
Author: Patrik Hägglund <patrik.h.hagglund at ericsson.com>
Date: Tue Dec 4 16:06:57 2012 +0100
Change TargetLowering::getLoadExtAction to take and MVT, instead of
EVT.
include/llvm/Target/TargetLowering.h | 10 +++++-----
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 2 +-
lib/Transforms/Scalar/CodeGenPrepare.cpp | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
commit 28828a2f3d6e1cb52cd74469692a1ce417427291
Author: Patrik Hägglund <patrik.h.hagglund at ericsson.com>
Date: Tue Dec 4 16:15:55 2012 +0100
Change TargetLowering::getTruncStoreAction to take MVTs, instead of
EVTs.
include/llvm/Target/TargetLowering.h | 11 +++++------
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 3 ++-
lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp | 4 ++--
3 files changed, 9 insertions(+), 9 deletions(-)
commit 0c6b35938e960990c4857a488b27cde5b3ef0c6d
Author: Patrik Hägglund <patrik.h.hagglund at ericsson.com>
Date: Tue Dec 4 16:28:34 2012 +0100
Change TargetLowering::getCondCodeAction to take an MVT, instead of
EVT.
include/llvm/Target/TargetLowering.h | 12 ++++++------
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 4 ++--
lib/CodeGen/SelectionDAG/TargetLowering.cpp | 4 ++--
3 files changed, 10 insertions(+), 10 deletions(-)
commit c78f943c55f9975b57b7da58dfcb2b8221b009df
Author: Patrik Hägglund <patrik.h.hagglund at ericsson.com>
Date: Tue Dec 4 16:33:04 2012 +0100
Change TargetLowering::isCondCodeLegal to take an MVT, instead of EVT.
include/llvm/Target/TargetLowering.h | 6 +++---
lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 9 ++++++---
lib/CodeGen/SelectionDAG/TargetLowering.cpp | 18 +++++++++---------
3 files changed, 18 insertions(+), 15 deletions(-)
commit df9b668f3d238e394e86a8e86ae29429671b2ca8
Author: Patrik Hägglund <patrik.h.hagglund at ericsson.com>
Date: Tue Dec 4 16:42:53 2012 +0100
Change TargetLowering::getTypeToPromoteTo to take and return MVTs,
instead of EVTs.
include/llvm/Target/TargetLowering.h | 8 ++++----
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 12 ++++++------
lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp | 4 ++--
3 files changed, 12 insertions(+), 12 deletions(-)
commit 5dd7e95c15e965a783819eb6a4a01b1ccb208fb2
Author: Patrik Hägglund <patrik.h.hagglund at ericsson.com>
Date: Wed Dec 5 11:47:50 2012 +0100
Change TargetLowering::findRepresentativeClass to take an MVT, instead
of EVT.
include/llvm/Target/TargetLowering.h | 2 +-
lib/CodeGen/SelectionDAG/TargetLowering.cpp | 4 ++--
lib/Target/ARM/ARMISelLowering.cpp | 4 ++--
lib/Target/ARM/ARMISelLowering.h | 2 +-
lib/Target/X86/X86ISelLowering.cpp | 4 ++--
lib/Target/X86/X86ISelLowering.h | 2 +-
6 files changed, 9 insertions(+), 9 deletions(-)
commit 27bbbbbed1b9adbcd5d7d82e73626bacb8b4b239
Author: Patrik Hägglund <patrik.h.hagglund at ericsson.com>
Date: Tue Dec 4 11:02:16 2012 +0100
Change TargetLowering::getRepRegClassCostFor, getIndexedLoadAction,
getIndexedStoreAction, and addRegisterClass to take and MVT, instead
of EVT.
include/llvm/Target/TargetLowering.h | 35 ++++++++++++++++-------------------
1 file changed, 16 insertions(+), 19 deletions(-)
commit c9ff9e018829e903f1b8ebe42bb7623d66e9b0d5
Author: Patrik Hägglund <patrik.h.hagglund at ericsson.com>
Date: Wed Dec 5 12:55:45 2012 +0100
Change TargetLowering::TransformToType to contain MVTs, instead of
EVTs.
include/llvm/Target/TargetLowering.h | 18 +++++++++---------
lib/CodeGen/SelectionDAG/TargetLowering.cpp | 8 ++++----
2 files changed, 13 insertions(+), 13 deletions(-)
commit 2b58fde2c1b50f382d74e6e0f82d1348d28097f1
Author: Patrik Hägglund <patrik.h.hagglund at ericsson.com>
Date: Wed Dec 5 13:03:33 2012 +0100
Change TargetLowering::RegisterTypeForVT to contain MVTs, instead of
EVTs.
include/llvm/Target/TargetLowering.h | 8 ++++----
lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp | 2 +-
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 4 ++--
lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp | 2 +-
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 20 ++++++++++----------
lib/CodeGen/SelectionDAG/TargetLowering.cpp | 8 ++++----
lib/Target/X86/X86FastISel.cpp | 4 ++--
7 files changed, 24 insertions(+), 24 deletions(-)
commit 78571aa97442131514734ba4f7b5fea7d9332fb8
Author: Patrik Hägglund <patrik.h.hagglund at ericsson.com>
Date: Wed Dec 5 14:04:17 2012 +0100
Change a parameter of TargetLowering::getVectorTypeBreakdown to MVT,
from EVT.
include/llvm/Target/TargetLowering.h | 10 ++++++----
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 14 +++++++++-----
lib/CodeGen/SelectionDAG/TargetLowering.cpp | 19 ++++++++++---------
3 files changed, 25 insertions(+), 18 deletions(-)
commit 0ad272339fb0bb5444be092db61eb2ad9760a838
Author: Patrik Hägglund <patrik.h.hagglund at ericsson.com>
Date: Wed Dec 5 14:28:34 2012 +0100
Change TargetLowering::getTypeForExtArgOrReturn to take and return
MVTs, instead of EVTs.
Accordingly, add bitsLT (and similar) to MVT.
include/llvm/CodeGen/ValueTypes.h | 21 +++++++++++++++++++++
include/llvm/Target/TargetLowering.h | 4 ++--
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 3 ++-
lib/Target/X86/X86ISelLowering.cpp | 6 +++---
lib/Target/X86/X86ISelLowering.h | 4 ++--
5 files changed, 30 insertions(+), 8 deletions(-)
commit 387b32bca909867244cce3d30eb7fe043d6e91a6
Author: Patrik Hägglund <patrik.h.hagglund at ericsson.com>
Date: Thu Dec 6 10:25:43 2012 +0100
Change RegVT in BitTestBlock and RegsForValue, to contain MVTs,
instead of EVTs.
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 21 ++++++++++-----------
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h | 4 ++--
2 files changed, 12 insertions(+), 13 deletions(-)
commit a24cdc90e78a0675bfe9eef00bc6cf84cf4aa8cb
Author: Patrik Hägglund <patrik.h.hagglund at ericsson.com>
Date: Thu Dec 6 10:30:11 2012 +0100
Split the usage of 'EVT PartVT' into 'MVT PartVT' and 'EVT PartEVT'.
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 75 ++++++++++++++++++++++++++++++++++++++-------------------------------------
1 file changed, 38 insertions(+), 37 deletions(-)
commit 1e3130f112340d13a641eea1e2a8d83c5c16686f
Author: Patrik Hägglund <patrik.h.hagglund at ericsson.com>
Date: Thu Dec 6 13:12:11 2012 +0100
Change AsmOperandInfo::ConstraintVT to MVT, instead of EVT.
Accordingly, add MVT::getVT.
include/llvm/CodeGen/ValueTypes.h | 7 ++++++-
include/llvm/Target/TargetLowering.h | 2 +-
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 9 +++++----
lib/CodeGen/SelectionDAG/TargetLowering.cpp | 8 ++++----
lib/VMCore/ValueTypes.cpp | 27 ++++++++++++++++++++++-----
5 files changed, 38 insertions(+), 15 deletions(-)
From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Patrik Hägglund H
Sent: den 6 december 2012 11:04
To: llvm-commits at cs.uiuc.edu
Cc: llvmdev at cs.uiuc.edu
Subject: Re: [llvm-commits] [LLVMdev] [PATCH] Replacing EVT:s with MVT:s (when possible)
Here is a series of patches replacing EVT with MVT at a number of places in TargetLowering. The last two patches are related cleanups in SelectionDAGBuilder.
/Patrik Hägglund
> git log --stat --reverse origin/master..
commit 8dabe3eb005360347eabb86a2e88c3b6e9098ed5
Author: Patrik Hägglund <patrik.h.hagglund at ericsson.com<mailto:patrik.h.hagglund at ericsson.com>>
Date: Tue Dec 4 10:37:37 2012 +0100
Change TargetLowering::getRegClassFor to take an MVT, instead of EVT.
Accordingly, added helper funtions getSimpleValueType (in parallel
to getValueType) in SDValue, SDNode, and TargetLowering.
include/llvm/CodeGen/FunctionLoweringInfo.h | 2 +-
include/llvm/CodeGen/SelectionDAGNodes.h | 11 ++++
include/llvm/Target/TargetLowering.h | 11 ++--
lib/CodeGen/SelectionDAG/FastISel.cpp | 11 ++--
lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp | 4 +-
lib/CodeGen/SelectionDAG/InstrEmitter.cpp | 14 ++--
lib/CodeGen/SelectionDAG/InstrEmitter.h | 2 +-
lib/CodeGen/SelectionDAG/ResourcePriorityQueue.cpp | 16 ++---
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 8 +--
lib/Target/ARM/ARMFastISel.cpp | 76 ++++++++++------------
lib/Target/ARM/ARMISelLowering.cpp | 2 +-
lib/Target/ARM/ARMISelLowering.h | 2 +-
lib/Target/Mips/MipsISelLowering.cpp | 6 +-
13 files changed, 87 insertions(+), 78 deletions(-)
commit 9add28389f360a0aa3f21b282a025c957309093f
Author: Patrik Hägglund <patrik.h.hagglund at ericsson.com<mailto:patrik.h.hagglund at ericsson.com>>
Date: Tue Dec 4 10:59:05 2012 +0100
Change TargetLowering::getRepRegClassFor to take an MVT, instead of EVT.
Accordingly, change RegDefIter to contain MVTs instead of EVTs.
include/llvm/Target/TargetLowering.h | 5 ++---
lib/CodeGen/MachineLICM.cpp | 2 +-
lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp | 16 ++++++++--------
lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp | 2 +-
lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h | 4 ++--
5 files changed, 14 insertions(+), 15 deletions(-)
commit 267ded9a2357edbee4947b91e4abc54ef6d185e6
Author: Patrik Hägglund <patrik.h.hagglund at ericsson.com<mailto:patrik.h.hagglund at ericsson.com>>
Date: Tue Dec 4 11:11:43 2012 +0100
Change TargetLowering::setTypeAction to take an MVT, instead fo EVT.
include/llvm/Target/TargetLowering.h | 4 ++--
lib/CodeGen/SelectionDAG/TargetLowering.cpp | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
commit 968d4fc892e13c7a4b37f3e083a91fbf457be746
Author: Patrik Hägglund <patrik.h.hagglund at ericsson.com<mailto:patrik.h.hagglund at ericsson.com>>
Date: Tue Dec 4 16:06:57 2012 +0100
Change TargetLowering::getLoadExtAction to take and MVT, instead of
EVT.
include/llvm/Target/TargetLowering.h | 10 +++++-----
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 2 +-
lib/Transforms/Scalar/CodeGenPrepare.cpp | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
commit 1a8efcc09d412fd08766044489216391cfdd3afb
Author: Patrik Hägglund <patrik.h.hagglund at ericsson.com<mailto:patrik.h.hagglund at ericsson.com>>
Date: Tue Dec 4 16:15:55 2012 +0100
Change TargetLowering::getTruncStoreAction to take MVTs, instead of
EVTs.
include/llvm/Target/TargetLowering.h | 11 +++++------
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 3 ++-
lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp | 4 ++--
3 files changed, 9 insertions(+), 9 deletions(-)
commit 6e468d9ec25353935c96c78a717e48cb6ace6206
Author: Patrik Hägglund <patrik.h.hagglund at ericsson.com<mailto:patrik.h.hagglund at ericsson.com>>
Date: Tue Dec 4 16:28:34 2012 +0100
Change TargetLowering::getCondCodeAction to take an MVT, instead of
EVT.
include/llvm/Target/TargetLowering.h | 12 ++++++------
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 4 ++--
lib/CodeGen/SelectionDAG/TargetLowering.cpp | 4 ++--
3 files changed, 10 insertions(+), 10 deletions(-)
commit 0a642d363069fb95a4bdaec598a1d7ba9c3d9f16
Author: Patrik Hägglund <patrik.h.hagglund at ericsson.com<mailto:patrik.h.hagglund at ericsson.com>>
Date: Tue Dec 4 16:33:04 2012 +0100
Change TargetLowering::isCondCodeLegal to take an MVT, instead of EVT.
include/llvm/Target/TargetLowering.h | 6 +++---
lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 9 ++++++---
lib/CodeGen/SelectionDAG/TargetLowering.cpp | 18 +++++++++---------
3 files changed, 18 insertions(+), 15 deletions(-)
commit 8c6d6ee1bb0c0898dec2c6c5cdeb4c200fb80d1c
Author: Patrik Hägglund <patrik.h.hagglund at ericsson.com<mailto:patrik.h.hagglund at ericsson.com>>
Date: Tue Dec 4 16:42:53 2012 +0100
Change TargetLowering::getTypeToPromoteTo to take and return MVTs,
instead of EVTs.
include/llvm/Target/TargetLowering.h | 8 ++++----
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 12 ++++++------
lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp | 4 ++--
3 files changed, 12 insertions(+), 12 deletions(-)
commit d3e652d037e3a49598c871912b0ee68acef2d02e
Author: Patrik Hägglund <patrik.h.hagglund at ericsson.com<mailto:patrik.h.hagglund at ericsson.com>>
Date: Wed Dec 5 11:47:50 2012 +0100
Change TargetLowering::findRepresentativeClass to take an MVT, instead
of EVT.
include/llvm/Target/TargetLowering.h | 2 +-
lib/CodeGen/SelectionDAG/TargetLowering.cpp | 4 ++--
lib/Target/ARM/ARMISelLowering.cpp | 4 ++--
lib/Target/ARM/ARMISelLowering.h | 2 +-
lib/Target/X86/X86ISelLowering.cpp | 4 ++--
lib/Target/X86/X86ISelLowering.h | 2 +-
6 files changed, 9 insertions(+), 9 deletions(-)
commit bd7d8621c38ddca079b8820dd532fd5b616f25da
Author: Patrik Hägglund <patrik.h.hagglund at ericsson.com<mailto:patrik.h.hagglund at ericsson.com>>
Date: Tue Dec 4 11:02:16 2012 +0100
Change TargetLowering::getRepRegClassCostFor, getIndexedLoadAction,
getIndexedStoreAction, and addRegisterClass to take and MVT, instead
of EVT.
include/llvm/Target/TargetLowering.h | 33 +++++++++++++++------------------
1 file changed, 15 insertions(+), 18 deletions(-)
commit 1c1a80ce4db07988a839af7aa7a58acd6164364f
Author: Patrik Hägglund <patrik.h.hagglund at ericsson.com<mailto:patrik.h.hagglund at ericsson.com>>
Date: Wed Dec 5 12:55:45 2012 +0100
Change TargetLowering::TransformToType to contain MVTs, instead of
EVTs.
include/llvm/Target/TargetLowering.h | 18 +++++++++---------
lib/CodeGen/SelectionDAG/TargetLowering.cpp | 8 ++++----
2 files changed, 13 insertions(+), 13 deletions(-)
commit c53e2efbd52ac2a4690fe69c8ea4acad113956e0
Author: Patrik Hägglund <patrik.h.hagglund at ericsson.com<mailto:patrik.h.hagglund at ericsson.com>>
Date: Wed Dec 5 13:03:33 2012 +0100
Change TargetLowering::RegisterTypeForVT to store MVTs, instead of
EVTs.
include/llvm/Target/TargetLowering.h | 8 ++++----
lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp | 2 +-
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 4 ++--
lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp | 2 +-
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 20 ++++++++++----------
lib/CodeGen/SelectionDAG/TargetLowering.cpp | 8 ++++----
lib/Target/X86/X86FastISel.cpp | 4 ++--
7 files changed, 24 insertions(+), 24 deletions(-)
commit 9f0cb7ed22f2791a7f315d44827a64de2503e145
Author: Patrik Hägglund <patrik.h.hagglund at ericsson.com<mailto:patrik.h.hagglund at ericsson.com>>
Date: Wed Dec 5 14:04:17 2012 +0100
Change a parameter of TargetLowering::getVectorTypeBreakdown to MVT,
from EVT.
include/llvm/Target/TargetLowering.h | 10 ++++++----
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 14 +++++++++-----
lib/CodeGen/SelectionDAG/TargetLowering.cpp | 19 ++++++++++---------
3 files changed, 25 insertions(+), 18 deletions(-)
commit b2e1d4b185bdaf4ddd6b40d00a48b964cd06cf94
Author: Patrik Hägglund <patrik.h.hagglund at ericsson.com<mailto:patrik.h.hagglund at ericsson.com>>
Date: Wed Dec 5 14:28:34 2012 +0100
Change TargetLowering::getTypeForExtArgOrReturn to take and return
MVTs, instead of EVTs.
Accordingly, add bitsLT (and similar) to MVT.
include/llvm/CodeGen/ValueTypes.h | 21 +++++++++++++++++++++
include/llvm/Target/TargetLowering.h | 4 ++--
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 3 ++-
lib/Target/X86/X86ISelLowering.cpp | 6 +++---
lib/Target/X86/X86ISelLowering.h | 4 ++--
5 files changed, 30 insertions(+), 8 deletions(-)
commit c2b741acf39b269946a85d7676045fe59e29b290
Author: Patrik Hägglund <patrik.h.hagglund at ericsson.com<mailto:patrik.h.hagglund at ericsson.com>>
Date: Thu Dec 6 10:25:43 2012 +0100
Change RegVT in BitTestBlock and RegsForValue, in SelectionDAGBuilder,
to contain MVTs, instead of EVTs.
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 21 ++++++++++-----------
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h | 4 ++--
2 files changed, 12 insertions(+), 13 deletions(-)
commit 2f58c92a7734f827bf57d8e920afd55a9e56f1d7
Author: Patrik Hägglund <patrik.h.hagglund at ericsson.com<mailto:patrik.h.hagglund at ericsson.com>>
Date: Thu Dec 6 10:30:11 2012 +0100
In SelectionDAGBuilder, split the usage of 'EVT PartVT' into 'MVT
PartVT' and 'EVT PartEVT'.
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 75 ++++++++++++------------
1 file changed, 38 insertions(+), 37 deletions(-)
From: Chris Lattner [mailto:clattner at apple.com]<mailto:[mailto:clattner at apple.com]>
Sent: den 4 december 2012 00:46
To: Patrik Hägglund H
Cc: llvmdev at cs.uiuc.edu<mailto:llvmdev at cs.uiuc.edu>
Subject: Re: [LLVMdev] [RFC] Replacing EVT:s with MVT:s (when possible)
On Dec 3, 2012, at 1:14 PM, Patrik Hägglund H <patrik.h.hagglund at ericsson.com<mailto:patrik.h.hagglund at ericsson.com>> wrote:
There seems to be quite a few places where the EVT type is used, but the code asserts if the variable/parameter is assigned something else than an MVT. Are there any general objections to replace EVT with MVT in these cases?
For example, a quick look at TargetLowering.h give me this list of (member) functions, taking an EVT parameter, that asserts if the argument is not an MVT:
getRegClassFor, getRepRegClassFor, getRepRegClassCostFor, setTypeAction, getLoadExtAction, isLoadExtLegal, getTruncStoreAction, isTruncStoreLegal, getIndexedLoadAction, getIndexedStoreAction, getCondCodeAction, getTypeToPromoteTo, addRegisterClass
Please do. MVT is cheaper than EVT and conceptually cleaner when dealing with physical machine types. EVT should only be used in parts of the code generator that are "pre-legalization" because they can represent arbitrary IR types. Anything that takes a legal machine type should take an MVT.
-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121207/7a1ac3ee/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Change-TargetLowering-getRegClassFor-to-take-an-MVT-.patch
Type: application/octet-stream
Size: 29032 bytes
Desc: 0001-Change-TargetLowering-getRegClassFor-to-take-an-MVT-.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121207/7a1ac3ee/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Change-TargetLowering-getRepRegClassFor-to-take-an-M.patch
Type: application/octet-stream
Size: 6984 bytes
Desc: 0002-Change-TargetLowering-getRepRegClassFor-to-take-an-M.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121207/7a1ac3ee/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Change-TargetLowering-setTypeAction-to-take-an-MVT-i.patch
Type: application/octet-stream
Size: 1609 bytes
Desc: 0003-Change-TargetLowering-setTypeAction-to-take-an-MVT-i.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121207/7a1ac3ee/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Change-TargetLowering-getLoadExtAction-to-take-and-M.patch
Type: application/octet-stream
Size: 3091 bytes
Desc: 0004-Change-TargetLowering-getLoadExtAction-to-take-and-M.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121207/7a1ac3ee/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-Change-TargetLowering-getTruncStoreAction-to-take-MV.patch
Type: application/octet-stream
Size: 3783 bytes
Desc: 0005-Change-TargetLowering-getTruncStoreAction-to-take-MV.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121207/7a1ac3ee/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-Change-TargetLowering-getCondCodeAction-to-take-an-M.patch
Type: application/octet-stream
Size: 4649 bytes
Desc: 0006-Change-TargetLowering-getCondCodeAction-to-take-an-M.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121207/7a1ac3ee/attachment-0005.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-Change-TargetLowering-isCondCodeLegal-to-take-an-MVT.patch
Type: application/octet-stream
Size: 5750 bytes
Desc: 0007-Change-TargetLowering-isCondCodeLegal-to-take-an-MVT.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121207/7a1ac3ee/attachment-0006.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0008-Change-TargetLowering-getTypeToPromoteTo-to-take-and.patch
Type: application/octet-stream
Size: 4999 bytes
Desc: 0008-Change-TargetLowering-getTypeToPromoteTo-to-take-and.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121207/7a1ac3ee/attachment-0007.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0009-Change-TargetLowering-findRepresentativeClass-to-tak.patch
Type: application/octet-stream
Size: 4851 bytes
Desc: 0009-Change-TargetLowering-findRepresentativeClass-to-tak.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121207/7a1ac3ee/attachment-0008.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0010-Change-TargetLowering-getRepRegClassCostFor-getIndex.patch
Type: application/octet-stream
Size: 4621 bytes
Desc: 0010-Change-TargetLowering-getRepRegClassCostFor-getIndex.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121207/7a1ac3ee/attachment-0009.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0011-Change-TargetLowering-TransformToType-to-contain-MVT.patch
Type: application/octet-stream
Size: 4452 bytes
Desc: 0011-Change-TargetLowering-TransformToType-to-contain-MVT.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121207/7a1ac3ee/attachment-0010.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0012-Change-TargetLowering-RegisterTypeForVT-to-contain-M.patch
Type: application/octet-stream
Size: 12752 bytes
Desc: 0012-Change-TargetLowering-RegisterTypeForVT-to-contain-M.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121207/7a1ac3ee/attachment-0011.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0013-Change-a-parameter-of-TargetLowering-getVectorTypeBr.patch
Type: application/octet-stream
Size: 7423 bytes
Desc: 0013-Change-a-parameter-of-TargetLowering-getVectorTypeBr.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121207/7a1ac3ee/attachment-0012.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0014-Change-TargetLowering-getTypeForExtArgOrReturn-to-ta.patch
Type: application/octet-stream
Size: 4744 bytes
Desc: 0014-Change-TargetLowering-getTypeForExtArgOrReturn-to-ta.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121207/7a1ac3ee/attachment-0013.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0015-Change-RegVT-in-BitTestBlock-and-RegsForValue-to-con.patch
Type: application/octet-stream
Size: 6003 bytes
Desc: 0015-Change-RegVT-in-BitTestBlock-and-RegsForValue-to-con.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121207/7a1ac3ee/attachment-0014.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0016-Split-the-usage-of-EVT-PartVT-into-MVT-PartVT-and-EV.patch
Type: application/octet-stream
Size: 12538 bytes
Desc: 0016-Split-the-usage-of-EVT-PartVT-into-MVT-PartVT-and-EV.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121207/7a1ac3ee/attachment-0015.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0017-Change-AsmOperandInfo-ConstraintVT-to-MVT-instead-of.patch
Type: application/octet-stream
Size: 7269 bytes
Desc: 0017-Change-AsmOperandInfo-ConstraintVT-to-MVT-instead-of.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121207/7a1ac3ee/attachment-0016.obj>
More information about the llvm-commits
mailing list