diff options
author | Eric Christopher <echristo@gmail.com> | 2019-12-19 12:52:06 -0800 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2019-12-19 12:52:40 -0800 |
commit | add710eb23d5de385dff99d27e88f1660814b62b (patch) | |
tree | d7a4f558ee80efe9e1a880086bab2739d11d778b /llvm/lib/CodeGen/StackMaps.cpp | |
parent | 3346cecd4c0c960377b441606b6382a684daf061 (diff) | |
download | bcm5719-llvm-add710eb23d5de385dff99d27e88f1660814b62b.tar.gz bcm5719-llvm-add710eb23d5de385dff99d27e88f1660814b62b.zip |
Temporarily Revert "[StackMaps] Be explicit about label formation [NFC]"
as it broke the aarch64 build.
This reverts commit bc7595d934b958ab481288d7b8e768fe5310be8f.
Diffstat (limited to 'llvm/lib/CodeGen/StackMaps.cpp')
-rw-r--r-- | llvm/lib/CodeGen/StackMaps.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/llvm/lib/CodeGen/StackMaps.cpp b/llvm/lib/CodeGen/StackMaps.cpp index e16587c44a5..23a3cb7cc7f 100644 --- a/llvm/lib/CodeGen/StackMaps.cpp +++ b/llvm/lib/CodeGen/StackMaps.cpp @@ -294,13 +294,14 @@ StackMaps::parseRegisterLiveOutMask(const uint32_t *Mask) const { return LiveOuts; } -void StackMaps::recordStackMapOpers(const MCSymbol &MILabel, - const MachineInstr &MI, uint64_t ID, +void StackMaps::recordStackMapOpers(const MachineInstr &MI, uint64_t ID, MachineInstr::const_mop_iterator MOI, MachineInstr::const_mop_iterator MOE, bool recordResult) { MCContext &OutContext = AP.OutStreamer->getContext(); - + MCSymbol *MILabel = OutContext.createTempSymbol(); + AP.OutStreamer->EmitLabel(MILabel); + LocationVec Locations; LiveOutVec LiveOuts; @@ -339,7 +340,7 @@ void StackMaps::recordStackMapOpers(const MCSymbol &MILabel, // Create an expression to calculate the offset of the callsite from function // entry. const MCExpr *CSOffsetExpr = MCBinaryExpr::createSub( - MCSymbolRefExpr::create(&MILabel, OutContext), + MCSymbolRefExpr::create(MILabel, OutContext), MCSymbolRefExpr::create(AP.CurrentFnSymForSize, OutContext), OutContext); CSInfos.emplace_back(CSOffsetExpr, ID, std::move(Locations), @@ -359,23 +360,22 @@ void StackMaps::recordStackMapOpers(const MCSymbol &MILabel, FnInfos.insert(std::make_pair(AP.CurrentFnSym, FunctionInfo(FrameSize))); } -void StackMaps::recordStackMap(const MCSymbol &L, const MachineInstr &MI) { +void StackMaps::recordStackMap(const MachineInstr &MI) { assert(MI.getOpcode() == TargetOpcode::STACKMAP && "expected stackmap"); StackMapOpers opers(&MI); const int64_t ID = MI.getOperand(PatchPointOpers::IDPos).getImm(); - recordStackMapOpers(L, MI, ID, std::next(MI.operands_begin(), - opers.getVarIdx()), + recordStackMapOpers(MI, ID, std::next(MI.operands_begin(), opers.getVarIdx()), MI.operands_end()); } -void StackMaps::recordPatchPoint(const MCSymbol &L, const MachineInstr &MI) { +void StackMaps::recordPatchPoint(const MachineInstr &MI) { assert(MI.getOpcode() == TargetOpcode::PATCHPOINT && "expected patchpoint"); PatchPointOpers opers(&MI); const int64_t ID = opers.getID(); auto MOI = std::next(MI.operands_begin(), opers.getStackMapStartIdx()); - recordStackMapOpers(L, MI, ID, MOI, MI.operands_end(), + recordStackMapOpers(MI, ID, MOI, MI.operands_end(), opers.isAnyReg() && opers.hasDef()); #ifndef NDEBUG @@ -390,14 +390,14 @@ void StackMaps::recordPatchPoint(const MCSymbol &L, const MachineInstr &MI) { #endif } -void StackMaps::recordStatepoint(const MCSymbol &L, const MachineInstr &MI) { +void StackMaps::recordStatepoint(const MachineInstr &MI) { assert(MI.getOpcode() == TargetOpcode::STATEPOINT && "expected statepoint"); StatepointOpers opers(&MI); // Record all the deopt and gc operands (they're contiguous and run from the // initial index to the end of the operand list) const unsigned StartIdx = opers.getVarIdx(); - recordStackMapOpers(L, MI, opers.getID(), MI.operands_begin() + StartIdx, + recordStackMapOpers(MI, opers.getID(), MI.operands_begin() + StartIdx, MI.operands_end(), false); } |