llvm.org GIT mirror llvm / dc17ab2
Enable jitting with a known memory size. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49924 91177308-0d34-0410-b5e6-96231b3b80d8 Nicolas Geoffray 12 years ago
4 changed file(s) with 560 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
2525 class JITMemoryManager {
2626 protected:
2727 bool HasGOT;
28 bool SizeRequired;
2829 public:
29 JITMemoryManager() : HasGOT(false) {}
30 JITMemoryManager() : HasGOT(false), SizeRequired(false) {}
3031 virtual ~JITMemoryManager();
3132
3233 /// CreateDefaultMemManager - This is used to create the default
5253 /// return a pointer to its base.
5354 virtual unsigned char *getGOTBase() const = 0;
5455
56 /// RequireSize - If the memory manager requires to know the size of the
57 /// objects to be emitted
58 bool RequiresSize() const {
59 return SizeRequired;
60 }
61
5562 //===--------------------------------------------------------------------===//
5663 // Main Allocation Functions
5764 //===--------------------------------------------------------------------===//
633633
634634 return StartEHPtr;
635635 }
636
637 unsigned JITDwarfEmitter::GetDwarfTableSize(MachineFunction& F,
638 MachineCodeEmitter& mce,
639 unsigned char* StartFunction,
640 unsigned char* EndFunction) {
641 const TargetMachine& TM = F.getTarget();
642 TD = TM.getTargetData();
643 needsIndirectEncoding = TM.getTargetAsmInfo()->getNeedsIndirectEncoding();
644 stackGrowthDirection = TM.getFrameInfo()->getStackGrowthDirection();
645 RI = TM.getRegisterInfo();
646 MCE = &mce;
647 unsigned FinalSize = 0;
648
649 FinalSize += GetExceptionTableSize(&F);
650
651 const std::vector Personalities = MMI->getPersonalities();
652 FinalSize += GetCommonEHFrameSize(Personalities[MMI->getPersonalityIndex()]);
653
654 FinalSize += GetEHFrameSize(Personalities[MMI->getPersonalityIndex()], StartFunction);
655
656 return FinalSize;
657 }
658
659 /// AddAlignment - Add the specified alignment.
660 static void AddAlignment(unsigned& FinalSize, unsigned Alignment) {
661 if (Alignment == 0) Alignment = 1;
662 FinalSize = (FinalSize + Alignment - 1) & ~(Alignment - 1);
663 }
664
665
666 /// SizeULEB128Bytes - Gives the size of the ULEB128.
667 static unsigned SizeULEB128Bytes(unsigned Value) {
668 unsigned FinalSize = 0;
669 do {
670 Value >>= 7;
671 ++FinalSize;
672 } while (Value);
673 return FinalSize;
674 }
675
676 /// SizeSLEB128Bytes - Gives the size of the SLEB128.
677 static unsigned SizeSLEB128Bytes(int Value) {
678 int Sign = Value >> (8 * sizeof(Value) - 1);
679 bool IsMore;
680 unsigned FinalSize = 0;
681
682 do {
683 unsigned char Byte = Value & 0x7f;
684 Value >>= 7;
685 IsMore = Value != Sign || ((Byte ^ Sign) & 0x40) != 0;
686 ++FinalSize;
687 } while (IsMore);
688
689 return FinalSize;
690 }
691
692 /// SizeString - Gives the size of the string.
693 static unsigned SizeString(const std::string &String) {
694 return String.size() + 1;
695 }
696
697 unsigned JITDwarfEmitter::GetEHFrameSize(const Function* Personality,
698 unsigned char* StartFunction) {
699 unsigned PointerSize = TD->getPointerSize();
700 unsigned FinalSize = 0;
701 // EH frame header.
702 FinalSize += PointerSize;
703 // FDE CIE Offset
704 FinalSize += 3 * PointerSize;
705 // If there is a personality and landing pads then point to the language
706 // specific data area in the exception table.
707 if (MMI->getPersonalityIndex()) {
708 FinalSize += SizeULEB128Bytes(4);
709 FinalSize += PointerSize;
710 } else {
711 FinalSize += SizeULEB128Bytes(0);
712 }
713
714 // Indicate locations of function specific callee saved registers in
715 // frame.
716 FinalSize += GetFrameMovesSize((intptr_t)StartFunction, MMI->getFrameMoves());
717
718 AddAlignment(FinalSize, 4);
719
720 // Double zeroes for the unwind runtime
721 FinalSize += 2 * PointerSize;
722
723 return FinalSize;
724 }
725
726 unsigned JITDwarfEmitter::GetCommonEHFrameSize(const Function* Personality) {
727
728 unsigned PointerSize = TD->getPointerSize();
729 int stackGrowth = stackGrowthDirection == TargetFrameInfo::StackGrowsUp ?
730 PointerSize : -PointerSize;
731 unsigned FinalSize = 0;
732 // EH Common Frame header
733 FinalSize += PointerSize;
734 FinalSize += 4;
735 FinalSize += 1;
736 FinalSize += SizeString(Personality ? "zPLR" : "zR");
737 FinalSize += SizeULEB128Bytes(1);
738 FinalSize += SizeSLEB128Bytes(stackGrowth);
739 FinalSize += 1;
740
741 if (Personality) {
742 FinalSize += SizeULEB128Bytes(7);
743
744 // Encoding
745 FinalSize+= 1;
746 //Personality
747 FinalSize += PointerSize;
748
749 FinalSize += SizeULEB128Bytes(dwarf::DW_EH_PE_pcrel);
750 FinalSize += SizeULEB128Bytes(dwarf::DW_EH_PE_pcrel);
751
752 } else {
753 FinalSize += SizeULEB128Bytes(1);
754 FinalSize += SizeULEB128Bytes(dwarf::DW_EH_PE_pcrel);
755 }
756
757 std::vector Moves;
758 RI->getInitialFrameState(Moves);
759 FinalSize += GetFrameMovesSize(0, Moves);
760 AddAlignment(FinalSize, 4);
761 return FinalSize;
762 }
763
764 unsigned
765 JITDwarfEmitter::GetFrameMovesSize(intptr_t BaseLabelPtr,
766 const std::vector &Moves) {
767 unsigned PointerSize = TD->getPointerSize();
768 int stackGrowth = stackGrowthDirection == TargetFrameInfo::StackGrowsUp ?
769 PointerSize : -PointerSize;
770 bool IsLocal = BaseLabelPtr;
771 unsigned FinalSize = 0;
772
773 for (unsigned i = 0, N = Moves.size(); i < N; ++i) {
774 const MachineMove &Move = Moves[i];
775 unsigned LabelID = Move.getLabelID();
776
777 if (LabelID) {
778 LabelID = MMI->MappedLabel(LabelID);
779
780 // Throw out move if the label is invalid.
781 if (!LabelID) continue;
782 }
783
784 intptr_t LabelPtr = 0;
785 if (LabelID) LabelPtr = MCE->getLabelAddress(LabelID);
786
787 const MachineLocation &Dst = Move.getDestination();
788 const MachineLocation &Src = Move.getSource();
789
790 // Advance row if new location.
791 if (BaseLabelPtr && LabelID && (BaseLabelPtr != LabelPtr || !IsLocal)) {
792 FinalSize++;
793 FinalSize += PointerSize;
794 BaseLabelPtr = LabelPtr;
795 IsLocal = true;
796 }
797
798 // If advancing cfa.
799 if (Dst.isRegister() && Dst.getRegister() == MachineLocation::VirtualFP) {
800 if (!Src.isRegister()) {
801 if (Src.getRegister() == MachineLocation::VirtualFP) {
802 ++FinalSize;
803 } else {
804 ++FinalSize;
805 FinalSize +=
806 SizeULEB128Bytes(RI->getDwarfRegNum(Src.getRegister(), true));
807 }
808
809 int Offset = -Src.getOffset();
810
811 FinalSize += SizeULEB128Bytes(Offset);
812 } else {
813 assert(0 && "Machine move no supported yet.");
814 }
815 } else if (Src.isRegister() &&
816 Src.getRegister() == MachineLocation::VirtualFP) {
817 if (Dst.isRegister()) {
818 ++FinalSize;
819 FinalSize +=
820 SizeULEB128Bytes(RI->getDwarfRegNum(Dst.getRegister(), true));
821 } else {
822 assert(0 && "Machine move no supported yet.");
823 }
824 } else {
825 unsigned Reg = RI->getDwarfRegNum(Src.getRegister(), true);
826 int Offset = Dst.getOffset() / stackGrowth;
827
828 if (Offset < 0) {
829 ++FinalSize;
830 FinalSize += SizeULEB128Bytes(Reg);
831 FinalSize += SizeSLEB128Bytes(Offset);
832 } else if (Reg < 64) {
833 ++FinalSize;
834 FinalSize += SizeULEB128Bytes(Offset);
835 } else {
836 ++FinalSize;
837 FinalSize += SizeULEB128Bytes(Reg);
838 FinalSize += SizeULEB128Bytes(Offset);
839 }
840 }
841 }
842 return FinalSize;
843 }
844
845 unsigned JITDwarfEmitter::GetExceptionTableSize(MachineFunction* MF) {
846 unsigned FinalSize = 0;
847
848 // Map all labels and get rid of any dead landing pads.
849 MMI->TidyLandingPads();
850
851 const std::vector &TypeInfos = MMI->getTypeInfos();
852 const std::vector &FilterIds = MMI->getFilterIds();
853 const std::vector &PadInfos = MMI->getLandingPads();
854 if (PadInfos.empty()) return 0;
855
856 // Sort the landing pads in order of their type ids. This is used to fold
857 // duplicate actions.
858 SmallVector LandingPads;
859 LandingPads.reserve(PadInfos.size());
860 for (unsigned i = 0, N = PadInfos.size(); i != N; ++i)
861 LandingPads.push_back(&PadInfos[i]);
862 std::sort(LandingPads.begin(), LandingPads.end(), PadLT);
863
864 // Negative type ids index into FilterIds, positive type ids index into
865 // TypeInfos. The value written for a positive type id is just the type
866 // id itself. For a negative type id, however, the value written is the
867 // (negative) byte offset of the corresponding FilterIds entry. The byte
868 // offset is usually equal to the type id, because the FilterIds entries
869 // are written using a variable width encoding which outputs one byte per
870 // entry as long as the value written is not too large, but can differ.
871 // This kind of complication does not occur for positive type ids because
872 // type infos are output using a fixed width encoding.
873 // FilterOffsets[i] holds the byte offset corresponding to FilterIds[i].
874 SmallVector FilterOffsets;
875 FilterOffsets.reserve(FilterIds.size());
876 int Offset = -1;
877 for(std::vector::const_iterator I = FilterIds.begin(),
878 E = FilterIds.end(); I != E; ++I) {
879 FilterOffsets.push_back(Offset);
880 Offset -= AsmPrinter::SizeULEB128(*I);
881 }
882
883 // Compute the actions table and gather the first action index for each
884 // landing pad site.
885 SmallVector Actions;
886 SmallVector FirstActions;
887 FirstActions.reserve(LandingPads.size());
888
889 int FirstAction = 0;
890 unsigned SizeActions = 0;
891 for (unsigned i = 0, N = LandingPads.size(); i != N; ++i) {
892 const LandingPadInfo *LP = LandingPads[i];
893 const std::vector &TypeIds = LP->TypeIds;
894 const unsigned NumShared = i ? SharedTypeIds(LP, LandingPads[i-1]) : 0;
895 unsigned SizeSiteActions = 0;
896
897 if (NumShared < TypeIds.size()) {
898 unsigned SizeAction = 0;
899 ActionEntry *PrevAction = 0;
900
901 if (NumShared) {
902 const unsigned SizePrevIds = LandingPads[i-1]->TypeIds.size();
903 assert(Actions.size());
904 PrevAction = &Actions.back();
905 SizeAction = AsmPrinter::SizeSLEB128(PrevAction->NextAction) +
906 AsmPrinter::SizeSLEB128(PrevAction->ValueForTypeID);
907 for (unsigned j = NumShared; j != SizePrevIds; ++j) {
908 SizeAction -= AsmPrinter::SizeSLEB128(PrevAction->ValueForTypeID);
909 SizeAction += -PrevAction->NextAction;
910 PrevAction = PrevAction->Previous;
911 }
912 }
913
914 // Compute the actions.
915 for (unsigned I = NumShared, M = TypeIds.size(); I != M; ++I) {
916 int TypeID = TypeIds[I];
917 assert(-1-TypeID < (int)FilterOffsets.size() && "Unknown filter id!");
918 int ValueForTypeID = TypeID < 0 ? FilterOffsets[-1 - TypeID] : TypeID;
919 unsigned SizeTypeID = AsmPrinter::SizeSLEB128(ValueForTypeID);
920
921 int NextAction = SizeAction ? -(SizeAction + SizeTypeID) : 0;
922 SizeAction = SizeTypeID + AsmPrinter::SizeSLEB128(NextAction);
923 SizeSiteActions += SizeAction;
924
925 ActionEntry Action = {ValueForTypeID, NextAction, PrevAction};
926 Actions.push_back(Action);
927
928 PrevAction = &Actions.back();
929 }
930
931 // Record the first action of the landing pad site.
932 FirstAction = SizeActions + SizeSiteActions - SizeAction + 1;
933 } // else identical - re-use previous FirstAction
934
935 FirstActions.push_back(FirstAction);
936
937 // Compute this sites contribution to size.
938 SizeActions += SizeSiteActions;
939 }
940
941 // Compute the call-site table. Entries must be ordered by address.
942 SmallVector CallSites;
943
944 RangeMapType PadMap;
945 for (unsigned i = 0, N = LandingPads.size(); i != N; ++i) {
946 const LandingPadInfo *LandingPad = LandingPads[i];
947 for (unsigned j=0, E = LandingPad->BeginLabels.size(); j != E; ++j) {
948 unsigned BeginLabel = LandingPad->BeginLabels[j];
949 assert(!PadMap.count(BeginLabel) && "Duplicate landing pad labels!");
950 PadRange P = { i, j };
951 PadMap[BeginLabel] = P;
952 }
953 }
954
955 bool MayThrow = false;
956 unsigned LastLabel = 0;
957 for (MachineFunction::const_iterator I = MF->begin(), E = MF->end();
958 I != E; ++I) {
959 for (MachineBasicBlock::const_iterator MI = I->begin(), E = I->end();
960 MI != E; ++MI) {
961 if (MI->getOpcode() != TargetInstrInfo::LABEL) {
962 MayThrow |= MI->getDesc().isCall();
963 continue;
964 }
965
966 unsigned BeginLabel = MI->getOperand(0).getImm();
967 assert(BeginLabel && "Invalid label!");
968
969 if (BeginLabel == LastLabel)
970 MayThrow = false;
971
972 RangeMapType::iterator L = PadMap.find(BeginLabel);
973
974 if (L == PadMap.end())
975 continue;
976
977 PadRange P = L->second;
978 const LandingPadInfo *LandingPad = LandingPads[P.PadIndex];
979
980 assert(BeginLabel == LandingPad->BeginLabels[P.RangeIndex] &&
981 "Inconsistent landing pad map!");
982
983 // If some instruction between the previous try-range and this one may
984 // throw, create a call-site entry with no landing pad for the region
985 // between the try-ranges.
986 if (MayThrow) {
987 CallSiteEntry Site = {LastLabel, BeginLabel, 0, 0};
988 CallSites.push_back(Site);
989 }
990
991 LastLabel = LandingPad->EndLabels[P.RangeIndex];
992 CallSiteEntry Site = {BeginLabel, LastLabel,
993 LandingPad->LandingPadLabel, FirstActions[P.PadIndex]};
994
995 assert(Site.BeginLabel && Site.EndLabel && Site.PadLabel &&
996 "Invalid landing pad!");
997
998 // Try to merge with the previous call-site.
999 if (CallSites.size()) {
1000 CallSiteEntry &Prev = CallSites[CallSites.size()-1];
1001 if (Site.PadLabel == Prev.PadLabel && Site.Action == Prev.Action) {
1002 // Extend the range of the previous entry.
1003 Prev.EndLabel = Site.EndLabel;
1004 continue;
1005 }
1006 }
1007
1008 // Otherwise, create a new call-site.
1009 CallSites.push_back(Site);
1010 }
1011 }
1012 // If some instruction between the previous try-range and the end of the
1013 // function may throw, create a call-site entry with no landing pad for the
1014 // region following the try-range.
1015 if (MayThrow) {
1016 CallSiteEntry Site = {LastLabel, 0, 0, 0};
1017 CallSites.push_back(Site);
1018 }
1019
1020 // Final tallies.
1021 unsigned SizeSites = CallSites.size() * (sizeof(int32_t) + // Site start.
1022 sizeof(int32_t) + // Site length.
1023 sizeof(int32_t)); // Landing pad.
1024 for (unsigned i = 0, e = CallSites.size(); i < e; ++i)
1025 SizeSites += AsmPrinter::SizeULEB128(CallSites[i].Action);
1026
1027 unsigned SizeTypes = TypeInfos.size() * TD->getPointerSize();
1028
1029 unsigned TypeOffset = sizeof(int8_t) + // Call site format
1030 // Call-site table length
1031 AsmPrinter::SizeULEB128(SizeSites) +
1032 SizeSites + SizeActions + SizeTypes;
1033
1034 unsigned TotalSize = sizeof(int8_t) + // LPStart format
1035 sizeof(int8_t) + // TType format
1036 AsmPrinter::SizeULEB128(TypeOffset) + // TType base offset
1037 TypeOffset;
1038
1039 unsigned SizeAlign = (4 - TotalSize) & 3;
1040
1041 // Begin the exception table.
1042 AddAlignment(FinalSize, 4);
1043 for (unsigned i = 0; i != SizeAlign; ++i) {
1044 ++FinalSize;
1045 }
1046
1047 unsigned PointerSize = TD->getPointerSize();
1048
1049 // Emit the header.
1050 ++FinalSize;
1051 // Asm->EOL("LPStart format (DW_EH_PE_omit)");
1052 ++FinalSize;
1053 // Asm->EOL("TType format (DW_EH_PE_absptr)");
1054 ++FinalSize;
1055 // Asm->EOL("TType base offset");
1056 ++FinalSize;
1057 // Asm->EOL("Call site format (DW_EH_PE_udata4)");
1058 ++FinalSize;
1059 // Asm->EOL("Call-site table length");
1060
1061 // Emit the landing pad site information.
1062 for (unsigned i = 0; i < CallSites.size(); ++i) {
1063 CallSiteEntry &S = CallSites[i];
1064
1065 // Asm->EOL("Region start");
1066 FinalSize += PointerSize;
1067
1068 //Asm->EOL("Region length");
1069 FinalSize += PointerSize;
1070
1071 // Asm->EOL("Landing pad");
1072 FinalSize += PointerSize;
1073
1074 FinalSize += SizeULEB128Bytes(S.Action);
1075 // Asm->EOL("Action");
1076 }
1077
1078 // Emit the actions.
1079 for (unsigned I = 0, N = Actions.size(); I != N; ++I) {
1080 ActionEntry &Action = Actions[I];
1081
1082 //Asm->EOL("TypeInfo index");
1083 FinalSize += SizeSLEB128Bytes(Action.ValueForTypeID);
1084 //Asm->EOL("Next action");
1085 FinalSize += SizeSLEB128Bytes(Action.NextAction);
1086 }
1087
1088 // Emit the type ids.
1089 for (unsigned M = TypeInfos.size(); M; --M) {
1090 // Asm->EOL("TypeInfo");
1091 FinalSize += PointerSize;
1092 }
1093
1094 // Emit the filter typeids.
1095 for (unsigned j = 0, M = FilterIds.size(); j < M; ++j) {
1096 unsigned TypeID = FilterIds[j];
1097 FinalSize += SizeULEB128Bytes(TypeID);
1098 //Asm->EOL("Filter TypeInfo index");
1099 }
1100
1101 AddAlignment(FinalSize, 4);
1102
1103 return FinalSize;
1104 }
3434 bool needsIndirectEncoding;
3535 bool stackGrowthDirection;
3636
37 public:
38 JITDwarfEmitter(JIT& jit);
39
4037 unsigned char* EmitExceptionTable(MachineFunction* MF,
4138 unsigned char* StartFunction,
4239 unsigned char* EndFunction);
5249 unsigned char* EndFunction,
5350 unsigned char* ExceptionTable);
5451
52 unsigned GetExceptionTableSize(MachineFunction* MF);
53
54 unsigned GetFrameMovesSize(intptr_t BaseLabelPtr,
55 const std::vector &Moves);
56
57 unsigned GetCommonEHFrameSize(const Function* Personality);
5558
59 unsigned GetEHFrameSize(const Function* Personality,
60 unsigned char* StartFunction);
61
62 public:
63
64 JITDwarfEmitter(JIT& jit);
65
5666 unsigned char* EmitDwarfTable(MachineFunction& F,
5767 MachineCodeEmitter& MCE,
5868 unsigned char* StartFunction,
5969 unsigned char* EndFunction);
6070
71
72 unsigned GetDwarfTableSize(MachineFunction& F,
73 MachineCodeEmitter& MCE,
74 unsigned char* StartFunction,
75 unsigned char* EndFunction);
76
6177 void setModuleInfo(MachineModuleInfo* Info) {
6278 MMI = Info;
6379 }
6480 };
6581
82
6683 } // end namespace llvm
6784
6885 #endif // LLVM_EXECUTION_ENGINE_JIT_DWARFEMITTER_H
3131 #include "llvm/Support/Debug.h"
3232 #include "llvm/Support/MutexGuard.h"
3333 #include "llvm/System/Disassembler.h"
34 #include "llvm/Target/TargetInstrInfo.h"
3435 #include "llvm/ADT/Statistic.h"
3536 #include
3637 using namespace llvm;
596597 return Resolver.getGlobalValueLazyPtr(V, GVAddress);
597598 }
598599
600 static unsigned GetConstantPoolSizeInBytes(MachineConstantPool *MCP) {
601 const std::vector &Constants = MCP->getConstants();
602 if (Constants.empty()) return 0;
603
604 MachineConstantPoolEntry CPE = Constants.back();
605 unsigned Size = CPE.Offset;
606 const Type *Ty = CPE.isMachineConstantPoolEntry()
607 ? CPE.Val.MachineCPVal->getType() : CPE.Val.ConstVal->getType();
608 Size += TheJIT->getTargetData()->getABITypeSize(Ty);
609 return Size;
610 }
611
612 static unsigned GetJumpTableSizeInBytes(MachineJumpTableInfo *MJTI) {
613 const std::vector &JT = MJTI->getJumpTables();
614 if (JT.empty()) return 0;
615
616 unsigned NumEntries = 0;
617 for (unsigned i = 0, e = JT.size(); i != e; ++i)
618 NumEntries += JT[i].MBBs.size();
619
620 unsigned EntrySize = MJTI->getEntrySize();
621
622 return NumEntries * EntrySize;
623 }
624
625 static void AddAlignment(uintptr_t& Size, unsigned Alignment) {
626 if (Alignment == 0) Alignment = 1;
627 Size = (Size + Alignment - 1) & (Alignment - 1);
628 }
599629
600630 void JITEmitter::startFunction(MachineFunction &F) {
601 uintptr_t ActualSize;
631 uintptr_t ActualSize = 0;
632 if (MemMgr->RequiresSize()) {
633 const TargetInstrInfo* TII = F.getTarget().getInstrInfo();
634 MachineJumpTableInfo *MJTI = F.getJumpTableInfo();
635 MachineConstantPool *MCP = F.getConstantPool();
636
637 // Ensure the constant pool/jump table info is at least 4-byte aligned.
638 AddAlignment(ActualSize, 16);
639
640 // Add the alignment of the constant pool
641 AddAlignment(ActualSize, 1 << MCP->getConstantPoolAlignment());
642
643 // Add the constant pool size
644 ActualSize += GetConstantPoolSizeInBytes(MCP);
645
646 // Add the aligment of the jump table info
647 AddAlignment(ActualSize, MJTI->getAlignment());
648
649 // Add the jump table size
650 ActualSize += GetJumpTableSizeInBytes(MJTI);
651
652 // Add the alignment for the function
653 AddAlignment(ActualSize, std::max(F.getFunction()->getAlignment(), 8U));
654
655 // Add the function size
656 ActualSize += TII->GetFunctionSizeInBytes(F);
657 }
658
602659 BufferBegin = CurBufferPtr = MemMgr->startFunctionBody(F.getFunction(),
603660 ActualSize);
604661 BufferEnd = BufferBegin+ActualSize;
713770 << sys::disassembleBuffer(FnStart, FnEnd-FnStart, (uintptr_t)FnStart);
714771 #endif
715772 if (ExceptionHandling) {
716 uintptr_t ActualSize;
773 uintptr_t ActualSize = 0;
717774 SavedBufferBegin = BufferBegin;
718775 SavedBufferEnd = BufferEnd;
719776 SavedCurBufferPtr = CurBufferPtr;
777
778 if (MemMgr->RequiresSize()) {
779 ActualSize = DE->GetDwarfTableSize(F, *this, FnStart, FnEnd);
780 }
720781
721782 BufferBegin = CurBufferPtr = MemMgr->startExceptionTable(F.getFunction(),
722783 ActualSize);