mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-22 10:24:26 +00:00
Make TargetLowering::getShiftAmountTy() taking DataLayout as an argument
Summary: This change is part of a series of commits dedicated to have a single DataLayout during compilation by using always the one owned by the module. Reviewers: echristo Subscribers: jholewinski, llvm-commits, rafael, yaron.keren Differential Revision: http://reviews.llvm.org/D11037 From: Mehdi Amini <mehdi.amini@apple.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241776 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -878,15 +878,16 @@ void TargetLoweringBase::initActions() {
|
||||
setOperationAction(ISD::DEBUGTRAP, MVT::Other, Expand);
|
||||
}
|
||||
|
||||
MVT TargetLoweringBase::getScalarShiftAmountTy(EVT LHSTy) const {
|
||||
return MVT::getIntegerVT(8 * getDataLayout()->getPointerSize(0));
|
||||
MVT TargetLoweringBase::getScalarShiftAmountTy(const DataLayout &DL) const {
|
||||
return MVT::getIntegerVT(8 * DL.getPointerSize(0));
|
||||
}
|
||||
|
||||
EVT TargetLoweringBase::getShiftAmountTy(EVT LHSTy) const {
|
||||
EVT TargetLoweringBase::getShiftAmountTy(EVT LHSTy,
|
||||
const DataLayout &DL) const {
|
||||
assert(LHSTy.isInteger() && "Shift amount is not an integer type!");
|
||||
if (LHSTy.isVector())
|
||||
return LHSTy;
|
||||
return getScalarShiftAmountTy(LHSTy);
|
||||
return getScalarShiftAmountTy(DL);
|
||||
}
|
||||
|
||||
/// canOpTrap - Returns true if the operation can trap for the value type.
|
||||
|
Reference in New Issue
Block a user