10b57cec5SDimitry Andric //==- llvm/CodeGen/SelectionDAGAddressAnalysis.cpp - DAG Address Analysis --==// 20b57cec5SDimitry Andric // 30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 60b57cec5SDimitry Andric // 70b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 80b57cec5SDimitry Andric 90b57cec5SDimitry Andric #include "llvm/CodeGen/SelectionDAGAddressAnalysis.h" 10e8d8bef9SDimitry Andric #include "llvm/Analysis/MemoryLocation.h" 110b57cec5SDimitry Andric #include "llvm/CodeGen/ISDOpcodes.h" 120b57cec5SDimitry Andric #include "llvm/CodeGen/MachineFrameInfo.h" 130b57cec5SDimitry Andric #include "llvm/CodeGen/MachineFunction.h" 140b57cec5SDimitry Andric #include "llvm/CodeGen/SelectionDAG.h" 150b57cec5SDimitry Andric #include "llvm/CodeGen/SelectionDAGNodes.h" 160b57cec5SDimitry Andric #include "llvm/CodeGen/TargetLowering.h" 17349cc55cSDimitry Andric #include "llvm/IR/GlobalAlias.h" 180b57cec5SDimitry Andric #include "llvm/Support/Casting.h" 198bcb0991SDimitry Andric #include "llvm/Support/Debug.h" 200b57cec5SDimitry Andric #include <cstdint> 210b57cec5SDimitry Andric 220b57cec5SDimitry Andric using namespace llvm; 230b57cec5SDimitry Andric 240b57cec5SDimitry Andric bool BaseIndexOffset::equalBaseIndex(const BaseIndexOffset &Other, 250b57cec5SDimitry Andric const SelectionDAG &DAG, 260b57cec5SDimitry Andric int64_t &Off) const { 270b57cec5SDimitry Andric // Conservatively fail if we a match failed.. 280b57cec5SDimitry Andric if (!Base.getNode() || !Other.Base.getNode()) 290b57cec5SDimitry Andric return false; 300b57cec5SDimitry Andric if (!hasValidOffset() || !Other.hasValidOffset()) 310b57cec5SDimitry Andric return false; 320b57cec5SDimitry Andric // Initial Offset difference. 330b57cec5SDimitry Andric Off = *Other.Offset - *Offset; 340b57cec5SDimitry Andric 350b57cec5SDimitry Andric if ((Other.Index == Index) && (Other.IsIndexSignExt == IsIndexSignExt)) { 360b57cec5SDimitry Andric // Trivial match. 370b57cec5SDimitry Andric if (Other.Base == Base) 380b57cec5SDimitry Andric return true; 390b57cec5SDimitry Andric 400b57cec5SDimitry Andric // Match GlobalAddresses 41*1db9f3b2SDimitry Andric if (auto *A = dyn_cast<GlobalAddressSDNode>(Base)) { 420b57cec5SDimitry Andric if (auto *B = dyn_cast<GlobalAddressSDNode>(Other.Base)) 430b57cec5SDimitry Andric if (A->getGlobal() == B->getGlobal()) { 440b57cec5SDimitry Andric Off += B->getOffset() - A->getOffset(); 450b57cec5SDimitry Andric return true; 460b57cec5SDimitry Andric } 470b57cec5SDimitry Andric 48*1db9f3b2SDimitry Andric return false; 49*1db9f3b2SDimitry Andric } 50*1db9f3b2SDimitry Andric 510b57cec5SDimitry Andric // Match Constants 52*1db9f3b2SDimitry Andric if (auto *A = dyn_cast<ConstantPoolSDNode>(Base)) { 530b57cec5SDimitry Andric if (auto *B = dyn_cast<ConstantPoolSDNode>(Other.Base)) { 540b57cec5SDimitry Andric bool IsMatch = 550b57cec5SDimitry Andric A->isMachineConstantPoolEntry() == B->isMachineConstantPoolEntry(); 560b57cec5SDimitry Andric if (IsMatch) { 570b57cec5SDimitry Andric if (A->isMachineConstantPoolEntry()) 580b57cec5SDimitry Andric IsMatch = A->getMachineCPVal() == B->getMachineCPVal(); 590b57cec5SDimitry Andric else 600b57cec5SDimitry Andric IsMatch = A->getConstVal() == B->getConstVal(); 610b57cec5SDimitry Andric } 620b57cec5SDimitry Andric if (IsMatch) { 630b57cec5SDimitry Andric Off += B->getOffset() - A->getOffset(); 640b57cec5SDimitry Andric return true; 650b57cec5SDimitry Andric } 660b57cec5SDimitry Andric } 670b57cec5SDimitry Andric 68*1db9f3b2SDimitry Andric return false; 69*1db9f3b2SDimitry Andric } 700b57cec5SDimitry Andric 710b57cec5SDimitry Andric // Match FrameIndexes. 720b57cec5SDimitry Andric if (auto *A = dyn_cast<FrameIndexSDNode>(Base)) 730b57cec5SDimitry Andric if (auto *B = dyn_cast<FrameIndexSDNode>(Other.Base)) { 740b57cec5SDimitry Andric // Equal FrameIndexes - offsets are directly comparable. 750b57cec5SDimitry Andric if (A->getIndex() == B->getIndex()) 760b57cec5SDimitry Andric return true; 770b57cec5SDimitry Andric // Non-equal FrameIndexes - If both frame indices are fixed 780b57cec5SDimitry Andric // we know their relative offsets and can compare them. Otherwise 790b57cec5SDimitry Andric // we must be conservative. 80*1db9f3b2SDimitry Andric const MachineFrameInfo &MFI = DAG.getMachineFunction().getFrameInfo(); 810b57cec5SDimitry Andric if (MFI.isFixedObjectIndex(A->getIndex()) && 820b57cec5SDimitry Andric MFI.isFixedObjectIndex(B->getIndex())) { 830b57cec5SDimitry Andric Off += MFI.getObjectOffset(B->getIndex()) - 840b57cec5SDimitry Andric MFI.getObjectOffset(A->getIndex()); 850b57cec5SDimitry Andric return true; 860b57cec5SDimitry Andric } 870b57cec5SDimitry Andric } 880b57cec5SDimitry Andric } 89*1db9f3b2SDimitry Andric 900b57cec5SDimitry Andric return false; 910b57cec5SDimitry Andric } 920b57cec5SDimitry Andric 930b57cec5SDimitry Andric bool BaseIndexOffset::computeAliasing(const SDNode *Op0, 94bdd1243dSDimitry Andric const std::optional<int64_t> NumBytes0, 950b57cec5SDimitry Andric const SDNode *Op1, 96bdd1243dSDimitry Andric const std::optional<int64_t> NumBytes1, 970b57cec5SDimitry Andric const SelectionDAG &DAG, bool &IsAlias) { 980b57cec5SDimitry Andric 990b57cec5SDimitry Andric BaseIndexOffset BasePtr0 = match(Op0, DAG); 100*1db9f3b2SDimitry Andric if (!BasePtr0.getBase().getNode()) 1010b57cec5SDimitry Andric return false; 102*1db9f3b2SDimitry Andric 103*1db9f3b2SDimitry Andric BaseIndexOffset BasePtr1 = match(Op1, DAG); 104*1db9f3b2SDimitry Andric if (!BasePtr1.getBase().getNode()) 105*1db9f3b2SDimitry Andric return false; 106*1db9f3b2SDimitry Andric 1070b57cec5SDimitry Andric int64_t PtrDiff; 10881ad6265SDimitry Andric if (NumBytes0 && NumBytes1 && 1090b57cec5SDimitry Andric BasePtr0.equalBaseIndex(BasePtr1, DAG, PtrDiff)) { 110e8d8bef9SDimitry Andric // If the size of memory access is unknown, do not use it to analysis. 111e8d8bef9SDimitry Andric // One example of unknown size memory access is to load/store scalable 112e8d8bef9SDimitry Andric // vector objects on the stack. 1130b57cec5SDimitry Andric // BasePtr1 is PtrDiff away from BasePtr0. They alias if none of the 1140b57cec5SDimitry Andric // following situations arise: 115e8d8bef9SDimitry Andric if (PtrDiff >= 0 && 116e8d8bef9SDimitry Andric *NumBytes0 != static_cast<int64_t>(MemoryLocation::UnknownSize)) { 1170b57cec5SDimitry Andric // [----BasePtr0----] 1180b57cec5SDimitry Andric // [---BasePtr1--] 1190b57cec5SDimitry Andric // ========PtrDiff========> 120e8d8bef9SDimitry Andric IsAlias = !(*NumBytes0 <= PtrDiff); 121e8d8bef9SDimitry Andric return true; 122e8d8bef9SDimitry Andric } 123e8d8bef9SDimitry Andric if (PtrDiff < 0 && 124e8d8bef9SDimitry Andric *NumBytes1 != static_cast<int64_t>(MemoryLocation::UnknownSize)) { 1250b57cec5SDimitry Andric // [----BasePtr0----] 1260b57cec5SDimitry Andric // [---BasePtr1--] 1270b57cec5SDimitry Andric // =====(-PtrDiff)====> 128e8d8bef9SDimitry Andric IsAlias = !((PtrDiff + *NumBytes1) <= 0); 1290b57cec5SDimitry Andric return true; 1300b57cec5SDimitry Andric } 131e8d8bef9SDimitry Andric return false; 132e8d8bef9SDimitry Andric } 1330b57cec5SDimitry Andric // If both BasePtr0 and BasePtr1 are FrameIndexes, we will not be 1340b57cec5SDimitry Andric // able to calculate their relative offset if at least one arises 1350b57cec5SDimitry Andric // from an alloca. However, these allocas cannot overlap and we 1360b57cec5SDimitry Andric // can infer there is no alias. 1370b57cec5SDimitry Andric if (auto *A = dyn_cast<FrameIndexSDNode>(BasePtr0.getBase())) 1380b57cec5SDimitry Andric if (auto *B = dyn_cast<FrameIndexSDNode>(BasePtr1.getBase())) { 1390b57cec5SDimitry Andric MachineFrameInfo &MFI = DAG.getMachineFunction().getFrameInfo(); 1400b57cec5SDimitry Andric // If the base are the same frame index but the we couldn't find a 1410b57cec5SDimitry Andric // constant offset, (indices are different) be conservative. 1425f757f3fSDimitry Andric if (A->getIndex() != B->getIndex() && (!MFI.isFixedObjectIndex(A->getIndex()) || 1430b57cec5SDimitry Andric !MFI.isFixedObjectIndex(B->getIndex()))) { 1440b57cec5SDimitry Andric IsAlias = false; 1450b57cec5SDimitry Andric return true; 1460b57cec5SDimitry Andric } 1470b57cec5SDimitry Andric } 1480b57cec5SDimitry Andric 1490b57cec5SDimitry Andric bool IsFI0 = isa<FrameIndexSDNode>(BasePtr0.getBase()); 1500b57cec5SDimitry Andric bool IsFI1 = isa<FrameIndexSDNode>(BasePtr1.getBase()); 1510b57cec5SDimitry Andric bool IsGV0 = isa<GlobalAddressSDNode>(BasePtr0.getBase()); 1520b57cec5SDimitry Andric bool IsGV1 = isa<GlobalAddressSDNode>(BasePtr1.getBase()); 1530b57cec5SDimitry Andric bool IsCV0 = isa<ConstantPoolSDNode>(BasePtr0.getBase()); 1540b57cec5SDimitry Andric bool IsCV1 = isa<ConstantPoolSDNode>(BasePtr1.getBase()); 1550b57cec5SDimitry Andric 156349cc55cSDimitry Andric if ((IsFI0 || IsGV0 || IsCV0) && (IsFI1 || IsGV1 || IsCV1)) { 157349cc55cSDimitry Andric // We can derive NoAlias In case of mismatched base types. 158349cc55cSDimitry Andric if (IsFI0 != IsFI1 || IsGV0 != IsGV1 || IsCV0 != IsCV1) { 1590b57cec5SDimitry Andric IsAlias = false; 1600b57cec5SDimitry Andric return true; 1610b57cec5SDimitry Andric } 162349cc55cSDimitry Andric if (IsGV0 && IsGV1) { 163349cc55cSDimitry Andric auto *GV0 = cast<GlobalAddressSDNode>(BasePtr0.getBase())->getGlobal(); 164349cc55cSDimitry Andric auto *GV1 = cast<GlobalAddressSDNode>(BasePtr1.getBase())->getGlobal(); 165349cc55cSDimitry Andric // It doesn't make sense to access one global value using another globals 166349cc55cSDimitry Andric // values address, so we can assume that there is no aliasing in case of 167349cc55cSDimitry Andric // two different globals (unless we have symbols that may indirectly point 168349cc55cSDimitry Andric // to each other). 169349cc55cSDimitry Andric // FIXME: This is perhaps a bit too defensive. We could try to follow the 170349cc55cSDimitry Andric // chain with aliasee information for GlobalAlias variables to find out if 171349cc55cSDimitry Andric // we indirect symbols may alias or not. 172349cc55cSDimitry Andric if (GV0 != GV1 && !isa<GlobalAlias>(GV0) && !isa<GlobalAlias>(GV1)) { 173349cc55cSDimitry Andric IsAlias = false; 174349cc55cSDimitry Andric return true; 175349cc55cSDimitry Andric } 176349cc55cSDimitry Andric } 177349cc55cSDimitry Andric } 1780b57cec5SDimitry Andric return false; // Cannot determine whether the pointers alias. 1790b57cec5SDimitry Andric } 1800b57cec5SDimitry Andric 1810b57cec5SDimitry Andric bool BaseIndexOffset::contains(const SelectionDAG &DAG, int64_t BitSize, 1820b57cec5SDimitry Andric const BaseIndexOffset &Other, 1830b57cec5SDimitry Andric int64_t OtherBitSize, int64_t &BitOffset) const { 1840b57cec5SDimitry Andric int64_t Offset; 1850b57cec5SDimitry Andric if (!equalBaseIndex(Other, DAG, Offset)) 1860b57cec5SDimitry Andric return false; 1870b57cec5SDimitry Andric if (Offset >= 0) { 1880b57cec5SDimitry Andric // Other is after *this: 1890b57cec5SDimitry Andric // [-------*this---------] 1900b57cec5SDimitry Andric // [---Other--] 1910b57cec5SDimitry Andric // ==Offset==> 1920b57cec5SDimitry Andric BitOffset = 8 * Offset; 1930b57cec5SDimitry Andric return BitOffset + OtherBitSize <= BitSize; 1940b57cec5SDimitry Andric } 1950b57cec5SDimitry Andric // Other starts strictly before *this, it cannot be fully contained. 1960b57cec5SDimitry Andric // [-------*this---------] 1970b57cec5SDimitry Andric // [--Other--] 1980b57cec5SDimitry Andric return false; 1990b57cec5SDimitry Andric } 2000b57cec5SDimitry Andric 2010b57cec5SDimitry Andric /// Parses tree in Ptr for base, index, offset addresses. 2020b57cec5SDimitry Andric static BaseIndexOffset matchLSNode(const LSBaseSDNode *N, 2030b57cec5SDimitry Andric const SelectionDAG &DAG) { 2040b57cec5SDimitry Andric SDValue Ptr = N->getBasePtr(); 2050b57cec5SDimitry Andric 2060b57cec5SDimitry Andric // (((B + I*M) + c)) + c ... 2070b57cec5SDimitry Andric SDValue Base = DAG.getTargetLoweringInfo().unwrapAddress(Ptr); 2080b57cec5SDimitry Andric SDValue Index = SDValue(); 2090b57cec5SDimitry Andric int64_t Offset = 0; 2100b57cec5SDimitry Andric bool IsIndexSignExt = false; 2110b57cec5SDimitry Andric 2120b57cec5SDimitry Andric // pre-inc/pre-dec ops are components of EA. 2130b57cec5SDimitry Andric if (N->getAddressingMode() == ISD::PRE_INC) { 2140b57cec5SDimitry Andric if (auto *C = dyn_cast<ConstantSDNode>(N->getOffset())) 2150b57cec5SDimitry Andric Offset += C->getSExtValue(); 2160b57cec5SDimitry Andric else // If unknown, give up now. 2170b57cec5SDimitry Andric return BaseIndexOffset(SDValue(), SDValue(), 0, false); 2180b57cec5SDimitry Andric } else if (N->getAddressingMode() == ISD::PRE_DEC) { 2190b57cec5SDimitry Andric if (auto *C = dyn_cast<ConstantSDNode>(N->getOffset())) 2200b57cec5SDimitry Andric Offset -= C->getSExtValue(); 2210b57cec5SDimitry Andric else // If unknown, give up now. 2220b57cec5SDimitry Andric return BaseIndexOffset(SDValue(), SDValue(), 0, false); 2230b57cec5SDimitry Andric } 2240b57cec5SDimitry Andric 2250b57cec5SDimitry Andric // Consume constant adds & ors with appropriate masking. 2260b57cec5SDimitry Andric while (true) { 2270b57cec5SDimitry Andric switch (Base->getOpcode()) { 2280b57cec5SDimitry Andric case ISD::OR: 2290b57cec5SDimitry Andric // Only consider ORs which act as adds. 2300b57cec5SDimitry Andric if (auto *C = dyn_cast<ConstantSDNode>(Base->getOperand(1))) 2310b57cec5SDimitry Andric if (DAG.MaskedValueIsZero(Base->getOperand(0), C->getAPIntValue())) { 2320b57cec5SDimitry Andric Offset += C->getSExtValue(); 2330b57cec5SDimitry Andric Base = DAG.getTargetLoweringInfo().unwrapAddress(Base->getOperand(0)); 2340b57cec5SDimitry Andric continue; 2350b57cec5SDimitry Andric } 2360b57cec5SDimitry Andric break; 2370b57cec5SDimitry Andric case ISD::ADD: 2380b57cec5SDimitry Andric if (auto *C = dyn_cast<ConstantSDNode>(Base->getOperand(1))) { 2390b57cec5SDimitry Andric Offset += C->getSExtValue(); 2400b57cec5SDimitry Andric Base = DAG.getTargetLoweringInfo().unwrapAddress(Base->getOperand(0)); 2410b57cec5SDimitry Andric continue; 2420b57cec5SDimitry Andric } 2430b57cec5SDimitry Andric break; 2440b57cec5SDimitry Andric case ISD::LOAD: 2450b57cec5SDimitry Andric case ISD::STORE: { 2460b57cec5SDimitry Andric auto *LSBase = cast<LSBaseSDNode>(Base.getNode()); 2470b57cec5SDimitry Andric unsigned int IndexResNo = (Base->getOpcode() == ISD::LOAD) ? 1 : 0; 2480b57cec5SDimitry Andric if (LSBase->isIndexed() && Base.getResNo() == IndexResNo) 2490b57cec5SDimitry Andric if (auto *C = dyn_cast<ConstantSDNode>(LSBase->getOffset())) { 2500b57cec5SDimitry Andric auto Off = C->getSExtValue(); 2510b57cec5SDimitry Andric if (LSBase->getAddressingMode() == ISD::PRE_DEC || 2520b57cec5SDimitry Andric LSBase->getAddressingMode() == ISD::POST_DEC) 2530b57cec5SDimitry Andric Offset -= Off; 2540b57cec5SDimitry Andric else 2550b57cec5SDimitry Andric Offset += Off; 2560b57cec5SDimitry Andric Base = DAG.getTargetLoweringInfo().unwrapAddress(LSBase->getBasePtr()); 2570b57cec5SDimitry Andric continue; 2580b57cec5SDimitry Andric } 2590b57cec5SDimitry Andric break; 2600b57cec5SDimitry Andric } 2610b57cec5SDimitry Andric } 2620b57cec5SDimitry Andric // If we get here break out of the loop. 2630b57cec5SDimitry Andric break; 2640b57cec5SDimitry Andric } 2650b57cec5SDimitry Andric 2660b57cec5SDimitry Andric if (Base->getOpcode() == ISD::ADD) { 2670b57cec5SDimitry Andric // TODO: The following code appears to be needless as it just 2680b57cec5SDimitry Andric // bails on some Ptrs early, reducing the cases where we 2690b57cec5SDimitry Andric // find equivalence. We should be able to remove this. 2700b57cec5SDimitry Andric // Inside a loop the current BASE pointer is calculated using an ADD and a 2710b57cec5SDimitry Andric // MUL instruction. In this case Base is the actual BASE pointer. 2720b57cec5SDimitry Andric // (i64 add (i64 %array_ptr) 2730b57cec5SDimitry Andric // (i64 mul (i64 %induction_var) 2740b57cec5SDimitry Andric // (i64 %element_size))) 2750b57cec5SDimitry Andric if (Base->getOperand(1)->getOpcode() == ISD::MUL) 2760b57cec5SDimitry Andric return BaseIndexOffset(Base, Index, Offset, IsIndexSignExt); 2770b57cec5SDimitry Andric 2780b57cec5SDimitry Andric // Look at Base + Index + Offset cases. 2790b57cec5SDimitry Andric Index = Base->getOperand(1); 2800b57cec5SDimitry Andric SDValue PotentialBase = Base->getOperand(0); 2810b57cec5SDimitry Andric 2820b57cec5SDimitry Andric // Skip signextends. 2830b57cec5SDimitry Andric if (Index->getOpcode() == ISD::SIGN_EXTEND) { 2840b57cec5SDimitry Andric Index = Index->getOperand(0); 2850b57cec5SDimitry Andric IsIndexSignExt = true; 2860b57cec5SDimitry Andric } 2870b57cec5SDimitry Andric 2880b57cec5SDimitry Andric // Check if Index Offset pattern 2890b57cec5SDimitry Andric if (Index->getOpcode() != ISD::ADD || 2900b57cec5SDimitry Andric !isa<ConstantSDNode>(Index->getOperand(1))) 2910b57cec5SDimitry Andric return BaseIndexOffset(PotentialBase, Index, Offset, IsIndexSignExt); 2920b57cec5SDimitry Andric 2930b57cec5SDimitry Andric Offset += cast<ConstantSDNode>(Index->getOperand(1))->getSExtValue(); 2940b57cec5SDimitry Andric Index = Index->getOperand(0); 2950b57cec5SDimitry Andric if (Index->getOpcode() == ISD::SIGN_EXTEND) { 2960b57cec5SDimitry Andric Index = Index->getOperand(0); 2970b57cec5SDimitry Andric IsIndexSignExt = true; 2980b57cec5SDimitry Andric } else 2990b57cec5SDimitry Andric IsIndexSignExt = false; 3000b57cec5SDimitry Andric Base = PotentialBase; 3010b57cec5SDimitry Andric } 3020b57cec5SDimitry Andric return BaseIndexOffset(Base, Index, Offset, IsIndexSignExt); 3030b57cec5SDimitry Andric } 3040b57cec5SDimitry Andric 3050b57cec5SDimitry Andric BaseIndexOffset BaseIndexOffset::match(const SDNode *N, 3060b57cec5SDimitry Andric const SelectionDAG &DAG) { 3070b57cec5SDimitry Andric if (const auto *LS0 = dyn_cast<LSBaseSDNode>(N)) 3080b57cec5SDimitry Andric return matchLSNode(LS0, DAG); 3090b57cec5SDimitry Andric if (const auto *LN = dyn_cast<LifetimeSDNode>(N)) { 3100b57cec5SDimitry Andric if (LN->hasOffset()) 3110b57cec5SDimitry Andric return BaseIndexOffset(LN->getOperand(1), SDValue(), LN->getOffset(), 3120b57cec5SDimitry Andric false); 3130b57cec5SDimitry Andric return BaseIndexOffset(LN->getOperand(1), SDValue(), false); 3140b57cec5SDimitry Andric } 3150b57cec5SDimitry Andric return BaseIndexOffset(); 3160b57cec5SDimitry Andric } 3170b57cec5SDimitry Andric 3180b57cec5SDimitry Andric #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) 3190b57cec5SDimitry Andric 3200b57cec5SDimitry Andric LLVM_DUMP_METHOD void BaseIndexOffset::dump() const { 3210b57cec5SDimitry Andric print(dbgs()); 3220b57cec5SDimitry Andric } 3230b57cec5SDimitry Andric 3240b57cec5SDimitry Andric void BaseIndexOffset::print(raw_ostream& OS) const { 3250b57cec5SDimitry Andric OS << "BaseIndexOffset base=["; 3260b57cec5SDimitry Andric Base->print(OS); 3270b57cec5SDimitry Andric OS << "] index=["; 3280b57cec5SDimitry Andric if (Index) 3290b57cec5SDimitry Andric Index->print(OS); 3300b57cec5SDimitry Andric OS << "] offset=" << Offset; 3310b57cec5SDimitry Andric } 3320b57cec5SDimitry Andric 3330b57cec5SDimitry Andric #endif 334