From 14871f73bb881c14546c1c7daf34123b5a79f82d Mon Sep 17 00:00:00 2001 From: Juergen Ributzka Date: Thu, 26 Jun 2014 23:39:44 +0000 Subject: [Stackmaps] Remove the liveness calculation for stackmap intrinsics. There is no need to calculate the liveness information for stackmaps. The liveness information is still available for the patchpoint intrinsic and that is also the intended usage model. Related to llvm-svn: 211816 --- llvm/lib/CodeGen/StackMapLivenessAnalysis.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'llvm/lib/CodeGen/StackMapLivenessAnalysis.cpp') diff --git a/llvm/lib/CodeGen/StackMapLivenessAnalysis.cpp b/llvm/lib/CodeGen/StackMapLivenessAnalysis.cpp index 4dd87ddb88c..16a1babd4df 100644 --- a/llvm/lib/CodeGen/StackMapLivenessAnalysis.cpp +++ b/llvm/lib/CodeGen/StackMapLivenessAnalysis.cpp @@ -28,8 +28,6 @@ using namespace llvm; #define DEBUG_TYPE "stackmaps" namespace llvm { -cl::opt EnableStackMapLiveness("enable-stackmap-liveness", - cl::Hidden, cl::desc("Enable StackMap Liveness Analysis Pass")); cl::opt EnablePatchPointLiveness("enable-patchpoint-liveness", cl::Hidden, cl::desc("Enable PatchPoint Liveness Analysis Pass")); } @@ -68,9 +66,8 @@ bool StackMapLiveness::runOnMachineFunction(MachineFunction &_MF) { TRI = MF->getTarget().getRegisterInfo(); ++NumStackMapFuncVisited; - // Skip this function if there are no stackmaps or patchpoints to process. - if (!((MF->getFrameInfo()->hasStackMap() && EnableStackMapLiveness) || - (MF->getFrameInfo()->hasPatchPoint() && EnablePatchPointLiveness))) { + // Skip this function if there are no patchpoints to process. + if (!(MF->getFrameInfo()->hasPatchPoint() && EnablePatchPointLiveness)) { ++NumStackMapFuncSkipped; return false; } @@ -88,13 +85,11 @@ bool StackMapLiveness::calculateLiveness() { LiveRegs.addLiveOuts(MBBI); bool HasStackMap = false; // Reverse iterate over all instructions and add the current live register - // set to an instruction if we encounter a stackmap or patchpoint - // instruction. + // set to an instruction if we encounter a patchpoint instruction. for (MachineBasicBlock::reverse_iterator I = MBBI->rbegin(), E = MBBI->rend(); I != E; ++I) { int Opc = I->getOpcode(); - if ((EnableStackMapLiveness && (Opc == TargetOpcode::STACKMAP)) || - (EnablePatchPointLiveness && (Opc == TargetOpcode::PATCHPOINT))) { + if (Opc == TargetOpcode::PATCHPOINT) { addLiveOutSetToMI(*I); HasChanged = true; HasStackMap = true; -- cgit v1.2.3