-
Notifications
You must be signed in to change notification settings - Fork 170
[CIR] Add EhLongjmpOp to CIR dialect #1920
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after nit
def CIR_EhLongjmpOp : CIR_Op<"eh.longjmp"> { | ||
let summary = "CIR longjmp operation"; | ||
let description = [{ | ||
Restore the environment (e.g., stack pointer, instruction pointer, signal mask, and other registers) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep it 80-cols
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm % nits
Address buf = emitPointerWithAlignment(E->getArg(0)); | ||
mlir::Location loc = getLoc(E->getExprLoc()); | ||
|
||
cir::PointerType ppTy = builder.getPointerTo(builder.getVoidPtrTy()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cir::PointerType ppTy = builder.getPointerTo(builder.getVoidPtrTy()); | |
cir::PointerType ppTy = builder.getVoidPtrTy(); | |
mlir::Value castBuf = builder.createBitcast(buf.getPointer(), ppTy); |
// LLVM-SAME: (ptr{{.*}}[[ENV:%.*]]) | ||
// LLVM-NEXT: @llvm.eh.sjlj.longjmp(ptr{{.*}}[[ENV]]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// LLVM-SAME: (ptr{{.*}}[[ENV:%.*]]) | |
// LLVM-NEXT: @llvm.eh.sjlj.longjmp(ptr{{.*}}[[ENV]]) | |
// LLVM: @llvm.eh.sjlj.longjmp |
// OGCG-SAME: (ptr{{.*}}[[ENV:%.*]]) | ||
// OGCG: @llvm.eh.sjlj.longjmp(ptr{{.*}}[[ENV]]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// OGCG-SAME: (ptr{{.*}}[[ENV:%.*]]) | |
// OGCG: @llvm.eh.sjlj.longjmp(ptr{{.*}}[[ENV]]) | |
// OGCG: @llvm.eh.sjlj.longjmp |
PR for #1791