Teach LocalStackSlotAllocation that stackmaps/patchpoints don't have range
authorLang Hames <lhames@gmail.com>
Fri, 29 Nov 2013 06:35:30 +0000 (06:35 +0000)
committerLang Hames <lhames@gmail.com>
Fri, 29 Nov 2013 06:35:30 +0000 (06:35 +0000)
constraints on their frame offsets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195950 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/LocalStackSlotAllocation.cpp

index 26a117652b08248dd8b4b8f941028d9063c6a6e9..80a6da0f93b2c63586ac2c72d4decf1611c5420c 100644 (file)
@@ -233,9 +233,11 @@ bool LocalStackSlotPass::insertFrameReferenceRegisters(MachineFunction &Fn) {
     for (MachineBasicBlock::iterator I = BB->begin(); I != BB->end(); ++I) {
       MachineInstr *MI = I;
 
-      // Debug value instructions can't be out of range, so they don't need
-      // any updates.
-      if (MI->isDebugValue())
+      // Debug value, stackmap and patchpoint instructions can't be out of
+      // range, so they don't need any updates.
+      if (MI->isDebugValue() ||
+          MI->getOpcode() == TargetOpcode::STACKMAP ||
+          MI->getOpcode() == TargetOpcode::PATCHPOINT)
         continue;
 
       // For now, allocate the base register(s) within the basic block