Commit 62dc79a2 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Update some recent patches to closer match what actually got mainlined

parent 7684b3fc
......@@ -50,15 +50,15 @@ index 91b1022..a63c90a 100644
- } else
+ } else if (Fn && Fn->isIntrinsic()) {
+ switch (Fn->getIntrinsicID()) {
+ default:
+ llvm_unreachable("Cannot invoke this intrinsic");
+ case Intrinsic::donothing:
+ // Ignore invokes to @llvm.donothing: jump directly to the next BB.
+ break;
+ case Intrinsic::experimental_patchpoint_void:
+ case Intrinsic::experimental_patchpoint_i64:
+ visitPatchpoint(ImmutableCallSite(&I), LandingPad);
+ break;
+ default:
+ llvm_unreachable("Cannot invoke this intrinsic");
+ case Intrinsic::donothing:
+ // Ignore invokes to @llvm.donothing: jump directly to the next BB.
+ break;
+ case Intrinsic::experimental_patchpoint_void:
+ case Intrinsic::experimental_patchpoint_i64:
+ visitPatchpoint(&I, LandingPad);
+ break;
+ }
+ } else {
LowerCallTo(&I, getValue(Callee), false, LandingPad);
......@@ -71,7 +71,7 @@ index 91b1022..a63c90a 100644
case Intrinsic::experimental_patchpoint_void:
case Intrinsic::experimental_patchpoint_i64: {
- visitPatchpoint(I);
+ visitPatchpoint(ImmutableCallSite(&I), nullptr);
+ visitPatchpoint(&I);
return nullptr;
}
}
......@@ -405,7 +405,7 @@ index 236f1a6..bb7e82e 100644
void visitVACopy(const CallInst &I);
void visitStackmap(const CallInst &I);
- void visitPatchpoint(const CallInst &I);
+ void visitPatchpoint(ImmutableCallSite CS, MachineBasicBlock *LandingPad);
+ void visitPatchpoint(ImmutableCallSite CS, MachineBasicBlock *LandingPad = nullptr);
void visitUserOp1(const Instruction &I) {
llvm_unreachable("UserOp1 should not exist at instruction selection time!");
......
......@@ -78,12 +78,12 @@ index a63c90a..dc45bf7 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -2026,6 +2026,7 @@ void SelectionDAGBuilder::visitInvoke(const InvokeInst &I) {
break;
case Intrinsic::experimental_patchpoint_void:
case Intrinsic::experimental_patchpoint_i64:
break;
case Intrinsic::experimental_patchpoint_void:
case Intrinsic::experimental_patchpoint_i64:
+ case Intrinsic::experimental_patchpoint_double:
visitPatchpoint(ImmutableCallSite(&I), LandingPad);
break;
visitPatchpoint(&I, LandingPad);
break;
}
@@ -5536,7 +5537,8 @@ SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I, unsigned Intrinsic) {
return nullptr;
......@@ -92,7 +92,7 @@ index a63c90a..dc45bf7 100644
- case Intrinsic::experimental_patchpoint_i64: {
+ case Intrinsic::experimental_patchpoint_i64:
+ case Intrinsic::experimental_patchpoint_double: {
visitPatchpoint(ImmutableCallSite(&I), nullptr);
visitPatchpoint(&I);
return nullptr;
}
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
......
......@@ -85,6 +85,10 @@ if __name__ == "__main__":
continue
if "stackmap-sections-for-ELF" in patch_fn and svn_rev >= 214538:
continue
if "Enable-invoking-the-patchpoint-intrinsic" in patch_fn and svn_rev >= 220055:
continue
if "support-varargs-intrinsics" in patch_fn and svn_rev >= 220205:
continue
patch_fn = os.path.abspath(os.path.join(patch_dir, patch_fn))
code = subprocess.call(["git", "am", patch_fn], cwd=repo)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment