OLD | NEW |
---|---|
1 //===-- Constants.cpp - Implement Constant nodes --------------------------===// | 1 //===-- Constants.cpp - Implement Constant nodes --------------------------===// |
2 // | 2 // |
3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 // | 9 // |
10 // This file implements the Constant* classes. | 10 // This file implements the Constant* classes. |
(...skipping 1353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1364 destroyConstantImpl(); | 1364 destroyConstantImpl(); |
1365 } | 1365 } |
1366 | 1366 |
1367 void BlockAddress::replaceUsesOfWithOnConstant(Value *From, Value *To, Use *U) { | 1367 void BlockAddress::replaceUsesOfWithOnConstant(Value *From, Value *To, Use *U) { |
1368 // This could be replacing either the Basic Block or the Function. In either | 1368 // This could be replacing either the Basic Block or the Function. In either |
1369 // case, we have to remove the map entry. | 1369 // case, we have to remove the map entry. |
1370 Function *NewF = getFunction(); | 1370 Function *NewF = getFunction(); |
1371 BasicBlock *NewBB = getBasicBlock(); | 1371 BasicBlock *NewBB = getBasicBlock(); |
1372 | 1372 |
1373 if (U == &Op<0>()) | 1373 if (U == &Op<0>()) |
1374 NewF = cast<Function>(To); | 1374 NewF = cast<Function>(To->stripPointerCasts()); |
Derek Schuff
2013/05/17 23:16:05
LOCALMOD with comment?
Mark Seaborn
2013/05/20 15:08:12
Done: LOCALMOD comment added.
| |
1375 else | 1375 else |
1376 NewBB = cast<BasicBlock>(To); | 1376 NewBB = cast<BasicBlock>(To); |
1377 | 1377 |
1378 // See if the 'new' entry already exists, if not, just update this in place | 1378 // See if the 'new' entry already exists, if not, just update this in place |
1379 // and return early. | 1379 // and return early. |
1380 BlockAddress *&NewBA = | 1380 BlockAddress *&NewBA = |
1381 getContext().pImpl->BlockAddresses[std::make_pair(NewF, NewBB)]; | 1381 getContext().pImpl->BlockAddresses[std::make_pair(NewF, NewBB)]; |
1382 if (NewBA == 0) { | 1382 if (NewBA == 0) { |
1383 getBasicBlock()->AdjustBlockAddressRefCount(-1); | 1383 getBasicBlock()->AdjustBlockAddressRefCount(-1); |
1384 | 1384 |
(...skipping 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2773 BO->setHasNoUnsignedWrap(SubclassOptionalData & | 2773 BO->setHasNoUnsignedWrap(SubclassOptionalData & |
2774 OverflowingBinaryOperator::NoUnsignedWrap); | 2774 OverflowingBinaryOperator::NoUnsignedWrap); |
2775 BO->setHasNoSignedWrap(SubclassOptionalData & | 2775 BO->setHasNoSignedWrap(SubclassOptionalData & |
2776 OverflowingBinaryOperator::NoSignedWrap); | 2776 OverflowingBinaryOperator::NoSignedWrap); |
2777 } | 2777 } |
2778 if (isa<PossiblyExactOperator>(BO)) | 2778 if (isa<PossiblyExactOperator>(BO)) |
2779 BO->setIsExact(SubclassOptionalData & PossiblyExactOperator::IsExact); | 2779 BO->setIsExact(SubclassOptionalData & PossiblyExactOperator::IsExact); |
2780 return BO; | 2780 return BO; |
2781 } | 2781 } |
2782 } | 2782 } |
OLD | NEW |