mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 02:24:22 +00:00
Revert "IR: MDNode => Value"
Instead, we're going to separate metadata from the Value hierarchy. See PR21532. This reverts commit r221375. This reverts commit r221373. This reverts commit r221359. This reverts commit r221167. This reverts commit r221027. This reverts commit r221024. This reverts commit r221023. This reverts commit r220995. This reverts commit r220994. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221711 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -862,7 +862,7 @@ void computeKnownBits(Value *V, APInt &KnownZero, APInt &KnownOne,
|
||||
switch (I->getOpcode()) {
|
||||
default: break;
|
||||
case Instruction::Load:
|
||||
if (MDNode *MD = cast<LoadInst>(I)->getMDNode(LLVMContext::MD_range))
|
||||
if (MDNode *MD = cast<LoadInst>(I)->getMetadata(LLVMContext::MD_range))
|
||||
computeKnownBitsFromRangeMetadata(*MD, KnownZero);
|
||||
break;
|
||||
case Instruction::And: {
|
||||
@ -1258,7 +1258,7 @@ void computeKnownBits(Value *V, APInt &KnownZero, APInt &KnownOne,
|
||||
}
|
||||
case Instruction::Call:
|
||||
case Instruction::Invoke:
|
||||
if (MDNode *MD = cast<Instruction>(I)->getMDNode(LLVMContext::MD_range))
|
||||
if (MDNode *MD = cast<Instruction>(I)->getMetadata(LLVMContext::MD_range))
|
||||
computeKnownBitsFromRangeMetadata(*MD, KnownZero);
|
||||
// If a range metadata is attached to this IntrinsicInst, intersect the
|
||||
// explicit range specified by the metadata and the implicit range of
|
||||
@ -1533,7 +1533,7 @@ bool isKnownNonZero(Value *V, const DataLayout *TD, unsigned Depth,
|
||||
}
|
||||
|
||||
if (Instruction* I = dyn_cast<Instruction>(V)) {
|
||||
if (MDNode *Ranges = I->getMDNode(LLVMContext::MD_range)) {
|
||||
if (MDNode *Ranges = I->getMetadata(LLVMContext::MD_range)) {
|
||||
// If the possible ranges don't contain zero, then the value is
|
||||
// definitely non-zero.
|
||||
if (IntegerType* Ty = dyn_cast<IntegerType>(V->getType())) {
|
||||
|
Reference in New Issue
Block a user