summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorJuergen Ributzka <juergen@apple.com>2014-06-26 23:39:44 +0000
committerJuergen Ributzka <juergen@apple.com>2014-06-26 23:39:44 +0000
commit14871f73bb881c14546c1c7daf34123b5a79f82d (patch)
tree601976eea5cf6c3bdfe738836d35abb0d48b96c9 /llvm/lib
parentad6324f78be6f74d67dea5d378c1ddb0d795bebe (diff)
downloadbcm5719-llvm-14871f73bb881c14546c1c7daf34123b5a79f82d.tar.gz
bcm5719-llvm-14871f73bb881c14546c1c7daf34123b5a79f82d.zip
[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> llvm-svn: 211816
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/Passes.cpp3
-rw-r--r--llvm/lib/CodeGen/StackMapLivenessAnalysis.cpp13
2 files changed, 5 insertions, 11 deletions
diff --git a/llvm/lib/CodeGen/Passes.cpp b/llvm/lib/CodeGen/Passes.cpp
index 9568e238a2c..bdcde102daa 100644
--- a/llvm/lib/CodeGen/Passes.cpp
+++ b/llvm/lib/CodeGen/Passes.cpp
@@ -31,7 +31,6 @@
using namespace llvm;
namespace llvm {
-extern cl::opt<bool> EnableStackMapLiveness;
extern cl::opt<bool> EnablePatchPointLiveness;
}
@@ -566,7 +565,7 @@ void TargetPassConfig::addMachinePasses() {
if (addPreEmitPass())
printAndVerify("After PreEmit passes");
- if (EnableStackMapLiveness || EnablePatchPointLiveness)
+ if (EnablePatchPointLiveness)
addPass(&StackMapLivenessID);
}
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<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;
OpenPOWER on IntegriCloud