Revert "[Stackmaps] Record the stack size of each function that contains a stackmap/patchpoint intrinsic."

This reverts commit r200444 to unbreak buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200445 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Juergen Ributzka
2014-01-30 03:34:02 +00:00
parent 2baaf25bf5
commit d26c0e731c
6 changed files with 26 additions and 112 deletions

View File

@@ -11,8 +11,6 @@
#include "llvm/CodeGen/StackMaps.h"
#include "llvm/CodeGen/AsmPrinter.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/MC/MCContext.h"
@@ -218,19 +216,12 @@ void StackMaps::recordStackMapOpers(const MachineInstr &MI, uint64_t ID,
}
}
// Create an expression to calculate the offset of the callsite from function
// entry.
const MCExpr *CSOffsetExpr = MCBinaryExpr::CreateSub(
MCSymbolRefExpr::Create(MILabel, OutContext),
MCSymbolRefExpr::Create(AP.CurrentFnSym, OutContext),
OutContext);
CSInfos.push_back(CallsiteInfo(CSOffsetExpr, ID, Locations, LiveOuts));
// Record the stack size of the current function.
const MachineFrameInfo *MFI = AP.MF->getFrameInfo();
FnStackSize[AP.CurrentFnSym] =
MFI->hasVarSizedObjects() ? ~0U : MFI->getStackSize();
}
void StackMaps::recordStackMap(const MachineInstr &MI) {
@@ -267,11 +258,6 @@ void StackMaps::recordPatchPoint(const MachineInstr &MI) {
/// serializeToStackMapSection conceptually populates the following fields:
///
/// uint32 : Reserved (header)
/// uint32 : NumFunctions
/// StkSizeRecord[NumFunctions] {
/// uint32 : Function Offset
/// uint32 : Stack Size
/// }
/// uint32 : NumConstants
/// int64 : Constants[NumConstants]
/// uint32 : NumRecords
@@ -327,16 +313,6 @@ void StackMaps::serializeToStackMapSection() {
// Header.
AP.OutStreamer.EmitIntValue(0, 4);
// Num functions.
AP.OutStreamer.EmitIntValue(FnStackSize.size(), 4);
// Stack size entries.
for (FnStackSizeMap::iterator I = FnStackSize.begin(), E = FnStackSize.end();
I != E; ++I) {
AP.EmitLabelReference(I->first, 4, true);
AP.OutStreamer.EmitIntValue(I->second, 4);
}
// Num constants.
AP.OutStreamer.EmitIntValue(ConstPool.getNumConstants(), 4);