mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
[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 <rdar://problem/17473725> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211816 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -28,8 +28,6 @@ using namespace llvm;
|
||||
#define DEBUG_TYPE "stackmaps"
|
||||
|
||||
namespace llvm {
|
||||
cl::opt<bool> EnableStackMapLiveness("enable-stackmap-liveness",
|
||||
cl::Hidden, cl::desc("Enable StackMap Liveness Analysis Pass"));
|
||||
cl::opt<bool> 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;
|
||||
|
Reference in New Issue
Block a user