For PR950:

This patch implements the first increment for the Signless Types feature.
All changes pertain to removing the ConstantSInt and ConstantUInt classes
in favor of just using ConstantInt.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31063 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer
2006-10-20 07:07:24 +00:00
parent 6e7dd9db6b
commit b83eb6447b
70 changed files with 5043 additions and 4090 deletions

View File

@@ -269,7 +269,7 @@ bool LowerInvoke::insertCheapEHSupport(Function &F) {
void LowerInvoke::rewriteExpensiveInvoke(InvokeInst *II, unsigned InvokeNo,
AllocaInst *InvokeNum,
SwitchInst *CatchSwitch) {
ConstantUInt *InvokeNoC = ConstantUInt::get(Type::UIntTy, InvokeNo);
ConstantInt *InvokeNoC = ConstantInt::get(Type::UIntTy, InvokeNo);
// Insert a store of the invoke num before the invoke and store zero into the
// location afterward.
@@ -461,7 +461,7 @@ bool LowerInvoke::insertExpensiveEHSupport(Function &F) {
std::vector<Value*> Idx;
Idx.push_back(Constant::getNullValue(Type::IntTy));
Idx.push_back(ConstantUInt::get(Type::UIntTy, 1));
Idx.push_back(ConstantInt::get(Type::UIntTy, 1));
OldJmpBufPtr = new GetElementPtrInst(JmpBuf, Idx, "OldBuf",
EntryBB->getTerminator());
@@ -500,7 +500,7 @@ bool LowerInvoke::insertExpensiveEHSupport(Function &F) {
BasicBlock *ContBlock = EntryBB->splitBasicBlock(EntryBB->getTerminator(),
"setjmp.cont");
Idx[1] = ConstantUInt::get(Type::UIntTy, 0);
Idx[1] = ConstantInt::get(Type::UIntTy, 0);
Value *JmpBufPtr = new GetElementPtrInst(JmpBuf, Idx, "TheJmpBuf",
EntryBB->getTerminator());
Value *SJRet = new CallInst(SetJmpFn, JmpBufPtr, "sjret",
@@ -550,7 +550,7 @@ bool LowerInvoke::insertExpensiveEHSupport(Function &F) {
// Get a pointer to the jmpbuf and longjmp.
std::vector<Value*> Idx;
Idx.push_back(Constant::getNullValue(Type::IntTy));
Idx.push_back(ConstantUInt::get(Type::UIntTy, 0));
Idx.push_back(ConstantInt::get(Type::UIntTy, 0));
Idx[0] = new GetElementPtrInst(BufPtr, Idx, "JmpBuf", UnwindBlock);
Idx[1] = ConstantInt::get(Type::IntTy, 1);
new CallInst(LongJmpFn, Idx, "", UnwindBlock);