forked from OSchip/llvm-project
parent
798e84f59e
commit
d006195517
|
@ -269,7 +269,8 @@ namespace ISD {
|
||||||
/// computes it as well as which return value to use from that node. This pair
|
/// computes it as well as which return value to use from that node. This pair
|
||||||
/// of information is represented with the SDOperand value type.
|
/// of information is represented with the SDOperand value type.
|
||||||
///
|
///
|
||||||
struct SDOperand {
|
class SDOperand {
|
||||||
|
public:
|
||||||
SDNode *Val; // The node defining the value we are using.
|
SDNode *Val; // The node defining the value we are using.
|
||||||
unsigned ResNo; // Which return value of the node we are using.
|
unsigned ResNo; // Which return value of the node we are using.
|
||||||
|
|
||||||
|
@ -463,7 +464,7 @@ public:
|
||||||
|
|
||||||
int64_t getSignExtended() const {
|
int64_t getSignExtended() const {
|
||||||
unsigned Bits = MVT::getSizeInBits(getValueType(0));
|
unsigned Bits = MVT::getSizeInBits(getValueType(0));
|
||||||
return ((int64_t)Value << 64-Bits) >> 64-Bits;
|
return ((int64_t)Value << (64-Bits)) >> (64-Bits);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isNullValue() const { return Value == 0; }
|
bool isNullValue() const { return Value == 0; }
|
||||||
|
|
|
@ -233,7 +233,6 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
|
||||||
|
|
||||||
SDOperand Result = Op;
|
SDOperand Result = Op;
|
||||||
SDNode *Node = Op.Val;
|
SDNode *Node = Op.Val;
|
||||||
LegalizeAction Action;
|
|
||||||
|
|
||||||
switch (Node->getOpcode()) {
|
switch (Node->getOpcode()) {
|
||||||
default:
|
default:
|
||||||
|
@ -658,7 +657,6 @@ void SelectionDAGLegalize::ExpandOp(SDOperand Op, SDOperand &Lo, SDOperand &Hi){
|
||||||
NeedsAnotherIteration = true;
|
NeedsAnotherIteration = true;
|
||||||
const char *LibCallName = 0;
|
const char *LibCallName = 0;
|
||||||
|
|
||||||
LegalizeAction Action;
|
|
||||||
switch (Node->getOpcode()) {
|
switch (Node->getOpcode()) {
|
||||||
default:
|
default:
|
||||||
std::cerr << "NODE: "; Node->dump(); std::cerr << "\n";
|
std::cerr << "NODE: "; Node->dump(); std::cerr << "\n";
|
||||||
|
|
|
@ -37,7 +37,8 @@ namespace llvm {
|
||||||
//===--------------------------------------------------------------------===//
|
//===--------------------------------------------------------------------===//
|
||||||
/// FunctionLoweringInfo - This contains information that is global to a
|
/// FunctionLoweringInfo - This contains information that is global to a
|
||||||
/// function that is used when lowering a region of the function.
|
/// function that is used when lowering a region of the function.
|
||||||
struct FunctionLoweringInfo {
|
class FunctionLoweringInfo {
|
||||||
|
public:
|
||||||
TargetLowering &TLI;
|
TargetLowering &TLI;
|
||||||
Function &Fn;
|
Function &Fn;
|
||||||
MachineFunction &MF;
|
MachineFunction &MF;
|
||||||
|
@ -119,11 +120,11 @@ FunctionLoweringInfo::FunctionLoweringInfo(TargetLowering &tli,
|
||||||
unsigned Align = TLI.getTargetData().getTypeAlignment(Ty);
|
unsigned Align = TLI.getTargetData().getTypeAlignment(Ty);
|
||||||
TySize *= CUI->getValue(); // Get total allocated size.
|
TySize *= CUI->getValue(); // Get total allocated size.
|
||||||
StaticAllocaMap[AI] =
|
StaticAllocaMap[AI] =
|
||||||
MF.getFrameInfo()->CreateStackObject(TySize, Align);
|
MF.getFrameInfo()->CreateStackObject((unsigned)TySize, Align);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (; BB != E; ++BB)
|
for (; BB != E; ++BB)
|
||||||
for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I)
|
for (BasicBlock::iterator I = BB->begin(), e = BB->end(); I != e; ++I)
|
||||||
if (!I->use_empty() && isUsedOutsideOfDefiningBlock(I))
|
if (!I->use_empty() && isUsedOutsideOfDefiningBlock(I))
|
||||||
if (!isa<AllocaInst>(I) ||
|
if (!isa<AllocaInst>(I) ||
|
||||||
!StaticAllocaMap.count(cast<AllocaInst>(I)))
|
!StaticAllocaMap.count(cast<AllocaInst>(I)))
|
||||||
|
|
Loading…
Reference in New Issue