aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ExecutionEngine
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ExecutionEngine')
-rw-r--r--lib/ExecutionEngine/ExecutionEngine.cpp18
-rw-r--r--lib/ExecutionEngine/ExecutionEngineBindings.cpp4
-rw-r--r--lib/ExecutionEngine/Interpreter/Execution.cpp60
-rw-r--r--lib/ExecutionEngine/Interpreter/Interpreter.h4
-rw-r--r--lib/ExecutionEngine/JIT/JIT.cpp8
-rw-r--r--lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp8
6 files changed, 51 insertions, 51 deletions
diff --git a/lib/ExecutionEngine/ExecutionEngine.cpp b/lib/ExecutionEngine/ExecutionEngine.cpp
index 226cd4f..9f27338 100644
--- a/lib/ExecutionEngine/ExecutionEngine.cpp
+++ b/lib/ExecutionEngine/ExecutionEngine.cpp
@@ -421,7 +421,7 @@ void *ExecutionEngine::getPointerToGlobal(const GlobalValue *GV) {
const_cast<GlobalVariable *>(dyn_cast<GlobalVariable>(GV)))
EmitGlobalVariable(GVar);
else
- LLVM_UNREACHABLE("Global hasn't had an address allocated yet!");
+ llvm_unreachable("Global hasn't had an address allocated yet!");
return state.getGlobalAddressMap(locked)[GV];
}
@@ -548,7 +548,7 @@ GenericValue ExecutionEngine::getConstantValue(const Constant *C) {
GenericValue GV = getConstantValue(Op0);
const Type* DestTy = CE->getType();
switch (Op0->getType()->getTypeID()) {
- default: LLVM_UNREACHABLE("Invalid bitcast operand");
+ default: llvm_unreachable("Invalid bitcast operand");
case Type::IntegerTyID:
assert(DestTy->isFloatingPoint() && "invalid bitcast");
if (DestTy == Type::FloatTy)
@@ -587,10 +587,10 @@ GenericValue ExecutionEngine::getConstantValue(const Constant *C) {
GenericValue RHS = getConstantValue(CE->getOperand(1));
GenericValue GV;
switch (CE->getOperand(0)->getType()->getTypeID()) {
- default: LLVM_UNREACHABLE("Bad add type!");
+ default: llvm_unreachable("Bad add type!");
case Type::IntegerTyID:
switch (CE->getOpcode()) {
- default: LLVM_UNREACHABLE("Invalid integer opcode");
+ default: llvm_unreachable("Invalid integer opcode");
case Instruction::Add: GV.IntVal = LHS.IntVal + RHS.IntVal; break;
case Instruction::Sub: GV.IntVal = LHS.IntVal - RHS.IntVal; break;
case Instruction::Mul: GV.IntVal = LHS.IntVal * RHS.IntVal; break;
@@ -605,7 +605,7 @@ GenericValue ExecutionEngine::getConstantValue(const Constant *C) {
break;
case Type::FloatTyID:
switch (CE->getOpcode()) {
- default: LLVM_UNREACHABLE("Invalid float opcode");
+ default: llvm_unreachable("Invalid float opcode");
case Instruction::FAdd:
GV.FloatVal = LHS.FloatVal + RHS.FloatVal; break;
case Instruction::FSub:
@@ -620,7 +620,7 @@ GenericValue ExecutionEngine::getConstantValue(const Constant *C) {
break;
case Type::DoubleTyID:
switch (CE->getOpcode()) {
- default: LLVM_UNREACHABLE("Invalid double opcode");
+ default: llvm_unreachable("Invalid double opcode");
case Instruction::FAdd:
GV.DoubleVal = LHS.DoubleVal + RHS.DoubleVal; break;
case Instruction::FSub:
@@ -638,7 +638,7 @@ GenericValue ExecutionEngine::getConstantValue(const Constant *C) {
case Type::FP128TyID: {
APFloat apfLHS = APFloat(LHS.IntVal);
switch (CE->getOpcode()) {
- default: LLVM_UNREACHABLE("Invalid long double opcode");llvm_unreachable();
+ default: llvm_unreachable("Invalid long double opcode");llvm_unreachable(0);
case Instruction::FAdd:
apfLHS.add(APFloat(RHS.IntVal), APFloat::rmNearestTiesToEven);
GV.IntVal = apfLHS.bitcastToAPInt();
@@ -698,7 +698,7 @@ GenericValue ExecutionEngine::getConstantValue(const Constant *C) {
else if (const GlobalVariable* GV = dyn_cast<GlobalVariable>(C))
Result = PTOGV(getOrEmitGlobalVariable(const_cast<GlobalVariable*>(GV)));
else
- LLVM_UNREACHABLE("Unknown constant pointer type!");
+ llvm_unreachable("Unknown constant pointer type!");
break;
default:
std::string msg;
@@ -881,7 +881,7 @@ void ExecutionEngine::InitializeMemory(const Constant *Init, void *Addr) {
}
cerr << "Bad Type: " << *Init->getType() << "\n";
- LLVM_UNREACHABLE("Unknown constant type to initialize memory with!");
+ llvm_unreachable("Unknown constant type to initialize memory with!");
}
/// EmitGlobals - Emit all of the global variables to memory, storing their
diff --git a/lib/ExecutionEngine/ExecutionEngineBindings.cpp b/lib/ExecutionEngine/ExecutionEngineBindings.cpp
index 43389e0..4ee2622 100644
--- a/lib/ExecutionEngine/ExecutionEngineBindings.cpp
+++ b/lib/ExecutionEngine/ExecutionEngineBindings.cpp
@@ -46,7 +46,7 @@ LLVMGenericValueRef LLVMCreateGenericValueOfFloat(LLVMTypeRef TyRef, double N) {
GenVal->DoubleVal = N;
break;
default:
- LLVM_UNREACHABLE("LLVMGenericValueToFloat supports only float and double.");
+ llvm_unreachable("LLVMGenericValueToFloat supports only float and double.");
}
return wrap(GenVal);
}
@@ -75,7 +75,7 @@ double LLVMGenericValueToFloat(LLVMTypeRef TyRef, LLVMGenericValueRef GenVal) {
case Type::DoubleTyID:
return unwrap(GenVal)->DoubleVal;
default:
- LLVM_UNREACHABLE("LLVMGenericValueToFloat supports only float and double.");
+ llvm_unreachable("LLVMGenericValueToFloat supports only float and double.");
break;
}
return 0; // Not reached
diff --git a/lib/ExecutionEngine/Interpreter/Execution.cpp b/lib/ExecutionEngine/Interpreter/Execution.cpp
index 4a6cafe..b351ba2 100644
--- a/lib/ExecutionEngine/Interpreter/Execution.cpp
+++ b/lib/ExecutionEngine/Interpreter/Execution.cpp
@@ -58,7 +58,7 @@ static void executeFAddInst(GenericValue &Dest, GenericValue Src1,
IMPLEMENT_BINARY_OPERATOR(+, Double);
default:
cerr << "Unhandled type for FAdd instruction: " << *Ty << "\n";
- llvm_unreachable();
+ llvm_unreachable(0);
}
}
@@ -69,7 +69,7 @@ static void executeFSubInst(GenericValue &Dest, GenericValue Src1,
IMPLEMENT_BINARY_OPERATOR(-, Double);
default:
cerr << "Unhandled type for FSub instruction: " << *Ty << "\n";
- llvm_unreachable();
+ llvm_unreachable(0);
}
}
@@ -80,7 +80,7 @@ static void executeFMulInst(GenericValue &Dest, GenericValue Src1,
IMPLEMENT_BINARY_OPERATOR(*, Double);
default:
cerr << "Unhandled type for FMul instruction: " << *Ty << "\n";
- llvm_unreachable();
+ llvm_unreachable(0);
}
}
@@ -91,7 +91,7 @@ static void executeFDivInst(GenericValue &Dest, GenericValue Src1,
IMPLEMENT_BINARY_OPERATOR(/, Double);
default:
cerr << "Unhandled type for FDiv instruction: " << *Ty << "\n";
- llvm_unreachable();
+ llvm_unreachable(0);
}
}
@@ -106,7 +106,7 @@ static void executeFRemInst(GenericValue &Dest, GenericValue Src1,
break;
default:
cerr << "Unhandled type for Rem instruction: " << *Ty << "\n";
- llvm_unreachable();
+ llvm_unreachable(0);
}
}
@@ -133,7 +133,7 @@ static GenericValue executeICMP_EQ(GenericValue Src1, GenericValue Src2,
IMPLEMENT_POINTER_ICMP(==);
default:
cerr << "Unhandled type for ICMP_EQ predicate: " << *Ty << "\n";
- llvm_unreachable();
+ llvm_unreachable(0);
}
return Dest;
}
@@ -146,7 +146,7 @@ static GenericValue executeICMP_NE(GenericValue Src1, GenericValue Src2,
IMPLEMENT_POINTER_ICMP(!=);
default:
cerr << "Unhandled type for ICMP_NE predicate: " << *Ty << "\n";
- llvm_unreachable();
+ llvm_unreachable(0);
}
return Dest;
}
@@ -159,7 +159,7 @@ static GenericValue executeICMP_ULT(GenericValue Src1, GenericValue Src2,
IMPLEMENT_POINTER_ICMP(<);
default:
cerr << "Unhandled type for ICMP_ULT predicate: " << *Ty << "\n";
- llvm_unreachable();
+ llvm_unreachable(0);
}
return Dest;
}
@@ -172,7 +172,7 @@ static GenericValue executeICMP_SLT(GenericValue Src1, GenericValue Src2,
IMPLEMENT_POINTER_ICMP(<);
default:
cerr << "Unhandled type for ICMP_SLT predicate: " << *Ty << "\n";
- llvm_unreachable();
+ llvm_unreachable(0);
}
return Dest;
}
@@ -185,7 +185,7 @@ static GenericValue executeICMP_UGT(GenericValue Src1, GenericValue Src2,
IMPLEMENT_POINTER_ICMP(>);
default:
cerr << "Unhandled type for ICMP_UGT predicate: " << *Ty << "\n";
- llvm_unreachable();
+ llvm_unreachable(0);
}
return Dest;
}
@@ -198,7 +198,7 @@ static GenericValue executeICMP_SGT(GenericValue Src1, GenericValue Src2,
IMPLEMENT_POINTER_ICMP(>);
default:
cerr << "Unhandled type for ICMP_SGT predicate: " << *Ty << "\n";
- llvm_unreachable();
+ llvm_unreachable(0);
}
return Dest;
}
@@ -211,7 +211,7 @@ static GenericValue executeICMP_ULE(GenericValue Src1, GenericValue Src2,
IMPLEMENT_POINTER_ICMP(<=);
default:
cerr << "Unhandled type for ICMP_ULE predicate: " << *Ty << "\n";
- llvm_unreachable();
+ llvm_unreachable(0);
}
return Dest;
}
@@ -224,7 +224,7 @@ static GenericValue executeICMP_SLE(GenericValue Src1, GenericValue Src2,
IMPLEMENT_POINTER_ICMP(<=);
default:
cerr << "Unhandled type for ICMP_SLE predicate: " << *Ty << "\n";
- llvm_unreachable();
+ llvm_unreachable(0);
}
return Dest;
}
@@ -237,7 +237,7 @@ static GenericValue executeICMP_UGE(GenericValue Src1, GenericValue Src2,
IMPLEMENT_POINTER_ICMP(>=);
default:
cerr << "Unhandled type for ICMP_UGE predicate: " << *Ty << "\n";
- llvm_unreachable();
+ llvm_unreachable(0);
}
return Dest;
}
@@ -250,7 +250,7 @@ static GenericValue executeICMP_SGE(GenericValue Src1, GenericValue Src2,
IMPLEMENT_POINTER_ICMP(>=);
default:
cerr << "Unhandled type for ICMP_SGE predicate: " << *Ty << "\n";
- llvm_unreachable();
+ llvm_unreachable(0);
}
return Dest;
}
@@ -275,7 +275,7 @@ void Interpreter::visitICmpInst(ICmpInst &I) {
case ICmpInst::ICMP_SGE: R = executeICMP_SGE(Src1, Src2, Ty); break;
default:
cerr << "Don't know how to handle this ICmp predicate!\n-->" << I;
- llvm_unreachable();
+ llvm_unreachable(0);
}
SetValue(&I, R, SF);
@@ -294,7 +294,7 @@ static GenericValue executeFCMP_OEQ(GenericValue Src1, GenericValue Src2,
IMPLEMENT_FCMP(==, Double);
default:
cerr << "Unhandled type for FCmp EQ instruction: " << *Ty << "\n";
- llvm_unreachable();
+ llvm_unreachable(0);
}
return Dest;
}
@@ -308,7 +308,7 @@ static GenericValue executeFCMP_ONE(GenericValue Src1, GenericValue Src2,
default:
cerr << "Unhandled type for FCmp NE instruction: " << *Ty << "\n";
- llvm_unreachable();
+ llvm_unreachable(0);
}
return Dest;
}
@@ -321,7 +321,7 @@ static GenericValue executeFCMP_OLE(GenericValue Src1, GenericValue Src2,
IMPLEMENT_FCMP(<=, Double);
default:
cerr << "Unhandled type for FCmp LE instruction: " << *Ty << "\n";
- llvm_unreachable();
+ llvm_unreachable(0);
}
return Dest;
}
@@ -334,7 +334,7 @@ static GenericValue executeFCMP_OGE(GenericValue Src1, GenericValue Src2,
IMPLEMENT_FCMP(>=, Double);
default:
cerr << "Unhandled type for FCmp GE instruction: " << *Ty << "\n";
- llvm_unreachable();
+ llvm_unreachable(0);
}
return Dest;
}
@@ -347,7 +347,7 @@ static GenericValue executeFCMP_OLT(GenericValue Src1, GenericValue Src2,
IMPLEMENT_FCMP(<, Double);
default:
cerr << "Unhandled type for FCmp LT instruction: " << *Ty << "\n";
- llvm_unreachable();
+ llvm_unreachable(0);
}
return Dest;
}
@@ -360,7 +360,7 @@ static GenericValue executeFCMP_OGT(GenericValue Src1, GenericValue Src2,
IMPLEMENT_FCMP(>, Double);
default:
cerr << "Unhandled type for FCmp GT instruction: " << *Ty << "\n";
- llvm_unreachable();
+ llvm_unreachable(0);
}
return Dest;
}
@@ -469,7 +469,7 @@ void Interpreter::visitFCmpInst(FCmpInst &I) {
case FCmpInst::FCMP_OGE: R = executeFCMP_OGE(Src1, Src2, Ty); break;
default:
cerr << "Don't know how to handle this FCmp predicate!\n-->" << I;
- llvm_unreachable();
+ llvm_unreachable(0);
}
SetValue(&I, R, SF);
@@ -515,7 +515,7 @@ static GenericValue executeCmpInst(unsigned predicate, GenericValue Src1,
}
default:
cerr << "Unhandled Cmp predicate\n";
- llvm_unreachable();
+ llvm_unreachable(0);
}
}
@@ -544,7 +544,7 @@ void Interpreter::visitBinaryOperator(BinaryOperator &I) {
case Instruction::Xor: R.IntVal = Src1.IntVal ^ Src2.IntVal; break;
default:
cerr << "Don't know how to handle this binary operator!\n-->" << I;
- llvm_unreachable();
+ llvm_unreachable(0);
}
SetValue(&I, R, SF);
@@ -1079,7 +1079,7 @@ GenericValue Interpreter::executeBitCastInst(Value *SrcVal, const Type *DstTy,
} else if (SrcTy->isInteger()) {
Dest.IntVal = Src.IntVal;
} else
- LLVM_UNREACHABLE("Invalid BitCast");
+ llvm_unreachable("Invalid BitCast");
} else if (DstTy == Type::FloatTy) {
if (SrcTy->isInteger())
Dest.FloatVal = Src.IntVal.bitsToFloat();
@@ -1091,7 +1091,7 @@ GenericValue Interpreter::executeBitCastInst(Value *SrcVal, const Type *DstTy,
else
Dest.DoubleVal = Src.DoubleVal;
} else
- LLVM_UNREACHABLE("Invalid Bitcast");
+ llvm_unreachable("Invalid Bitcast");
return Dest;
}
@@ -1176,7 +1176,7 @@ void Interpreter::visitVAArgInst(VAArgInst &I) {
IMPLEMENT_VAARG(Double);
default:
cerr << "Unhandled dest type for vaarg instruction: " << *Ty << "\n";
- llvm_unreachable();
+ llvm_unreachable(0);
}
// Set the Value of this Instruction.
@@ -1263,7 +1263,7 @@ GenericValue Interpreter::getConstantExprValue (ConstantExpr *CE,
break;
default:
cerr << "Unhandled ConstantExpr: " << *CE << "\n";
- llvm_unreachable();
+ llvm_unreachable(0);
return GenericValue();
}
return Dest;
@@ -1345,7 +1345,7 @@ void Interpreter::run() {
DOUT << " --> ";
const GenericValue &Val = SF.Values[&I];
switch (I.getType()->getTypeID()) {
- default: LLVM_UNREACHABLE("Invalid GenericValue Type");
+ default: llvm_unreachable("Invalid GenericValue Type");
case Type::VoidTyID: DOUT << "void"; break;
case Type::FloatTyID: DOUT << "float " << Val.FloatVal; break;
case Type::DoubleTyID: DOUT << "double " << Val.DoubleVal; break;
diff --git a/lib/ExecutionEngine/Interpreter/Interpreter.h b/lib/ExecutionEngine/Interpreter/Interpreter.h
index f9d4770..01771cf 100644
--- a/lib/ExecutionEngine/Interpreter/Interpreter.h
+++ b/lib/ExecutionEngine/Interpreter/Interpreter.h
@@ -147,7 +147,7 @@ public:
void visitStoreInst(StoreInst &I);
void visitGetElementPtrInst(GetElementPtrInst &I);
void visitPHINode(PHINode &PN) {
- LLVM_UNREACHABLE("PHI nodes already handled!");
+ llvm_unreachable("PHI nodes already handled!");
}
void visitTruncInst(TruncInst &I);
void visitZExtInst(ZExtInst &I);
@@ -177,7 +177,7 @@ public:
void visitVAArgInst(VAArgInst &I);
void visitInstruction(Instruction &I) {
cerr << I;
- LLVM_UNREACHABLE("Instruction not interpretable yet!");
+ llvm_unreachable("Instruction not interpretable yet!");
}
GenericValue callExternalFunction(Function *F,
diff --git a/lib/ExecutionEngine/JIT/JIT.cpp b/lib/ExecutionEngine/JIT/JIT.cpp
index 3edea73..baa8a47 100644
--- a/lib/ExecutionEngine/JIT/JIT.cpp
+++ b/lib/ExecutionEngine/JIT/JIT.cpp
@@ -410,7 +410,7 @@ GenericValue JIT::runFunction(Function *F,
if (ArgValues.empty()) {
GenericValue rv;
switch (RetTy->getTypeID()) {
- default: LLVM_UNREACHABLE("Unknown return type for function call!");
+ default: llvm_unreachable("Unknown return type for function call!");
case Type::IntegerTyID: {
unsigned BitWidth = cast<IntegerType>(RetTy)->getBitWidth();
if (BitWidth == 1)
@@ -424,7 +424,7 @@ GenericValue JIT::runFunction(Function *F,
else if (BitWidth <= 64)
rv.IntVal = APInt(BitWidth, ((int64_t(*)())(intptr_t)FPtr)());
else
- LLVM_UNREACHABLE("Integer types > 64 bits not supported");
+ llvm_unreachable("Integer types > 64 bits not supported");
return rv;
}
case Type::VoidTyID:
@@ -439,7 +439,7 @@ GenericValue JIT::runFunction(Function *F,
case Type::X86_FP80TyID:
case Type::FP128TyID:
case Type::PPC_FP128TyID:
- LLVM_UNREACHABLE("long double not supported yet");
+ llvm_unreachable("long double not supported yet");
return rv;
case Type::PointerTyID:
return PTOGV(((void*(*)())(intptr_t)FPtr)());
@@ -467,7 +467,7 @@ GenericValue JIT::runFunction(Function *F,
const Type *ArgTy = FTy->getParamType(i);
const GenericValue &AV = ArgValues[i];
switch (ArgTy->getTypeID()) {
- default: LLVM_UNREACHABLE("Unknown argument type for function call!");
+ default: llvm_unreachable("Unknown argument type for function call!");
case Type::IntegerTyID:
C = ConstantInt::get(AV.IntVal);
break;
diff --git a/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp b/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp
index 86218f7..c661168 100644
--- a/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp
+++ b/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp
@@ -111,7 +111,7 @@ JITDwarfEmitter::EmitFrameMoves(intptr_t BaseLabelPtr,
JCE->emitULEB128Bytes(Offset);
} else {
- LLVM_UNREACHABLE("Machine move no supported yet.");
+ llvm_unreachable("Machine move no supported yet.");
}
} else if (Src.isReg() &&
Src.getReg() == MachineLocation::VirtualFP) {
@@ -119,7 +119,7 @@ JITDwarfEmitter::EmitFrameMoves(intptr_t BaseLabelPtr,
JCE->emitByte(dwarf::DW_CFA_def_cfa_register);
JCE->emitULEB128Bytes(RI->getDwarfRegNum(Dst.getReg(), true));
} else {
- LLVM_UNREACHABLE("Machine move no supported yet.");
+ llvm_unreachable("Machine move no supported yet.");
}
} else {
unsigned Reg = RI->getDwarfRegNum(Src.getReg(), true);
@@ -762,7 +762,7 @@ JITDwarfEmitter::GetFrameMovesSizeInBytes(intptr_t BaseLabelPtr,
FinalSize += TargetAsmInfo::getULEB128Size(Offset);
} else {
- LLVM_UNREACHABLE("Machine move no supported yet.");
+ llvm_unreachable("Machine move no supported yet.");
}
} else if (Src.isReg() &&
Src.getReg() == MachineLocation::VirtualFP) {
@@ -771,7 +771,7 @@ JITDwarfEmitter::GetFrameMovesSizeInBytes(intptr_t BaseLabelPtr,
unsigned RegNum = RI->getDwarfRegNum(Dst.getReg(), true);
FinalSize += TargetAsmInfo::getULEB128Size(RegNum);
} else {
- LLVM_UNREACHABLE("Machine move no supported yet.");
+ llvm_unreachable("Machine move no supported yet.");
}
} else {
unsigned Reg = RI->getDwarfRegNum(Src.getReg(), true);