Displaying 20 results from an estimated 20000 matches similar to: "[LLVMdev] Windows EH support"
2020 Apr 15
2
[RFC] [Windows SEH][-EHa] Support Hardware Exception Handling
Hi,
This is a spin-off of previous Windows SEH RFC below. This RFC only focus on supporting HW Exception Handling.
A detailed implementation can be seen in here: https://github.com/tentzen/llvm-project/commit/8a2421c274b683051e456cbe12c177e3b934fb5e
It passes all MSVC SEH suite (excluding those with “Jumping out of _finally” ( _Local_Unwind)).
Thanks,
--Ten
**** The rules for C code: ****
2020 Apr 16
2
[RFC] [Windows SEH][-EHa] Support Hardware Exception Handling
Hi, Eli,
Why are you under the impression that threw_exception() will not be called if optimizations are enabled? I don’t know if the -EHa Spec is clearly described in MSFT Webs. At least this proposal has described the rules for both C & C++ code.
The very first rule clearly said that “no exception can move in or out of _try region., i.e., no potential faulty instruction can be moved
2019 Nov 08
2
Exceptions on Windows & MSVC
Hello everyone,
I was wondering what is the status regarding exceptions for the windows-msvc target? The corresponding part of the documentation (llvm/decs/ExceptionHandling.rst) hasn't been updated since 2015, was there any progress since?
This is most likely known, but there's significant divergence between the behavior of MSVC cl.exe and clang-cl.exe:
Consider:
void crash() {
2020 May 03
2
[RFC] [Windows SEH] Local_Unwind (Jumping out of a _finally)
Hi,
Per Reid’s feedback, I have separated two SEH missing features.
This thread now is only focusing on _local_unwind(), Jumping out of _finally.
The design is documented in Wiki here: https://github.com/tentzen/llvm-project/wiki/Windows-SEH:-Local_Unwind-(aka:-Jumping-Out-of-_Finally)
The implementation can be seen here:
2014 Nov 25
4
[LLVMdev] RFC: How to represent SEH (__try / __except) in LLVM IR
> We should also think about how to call std::terminate when cleanup dtors throw. The current representation for Itanium is inefficient. As a strawman, I propose making @__clang_call_terminate an intrinsic:
…
That sounds like a good starting point.
> Chandler expressed strong concerns about this design, however, as @llvm.eh.get_capture_block adds an ordering constraint on CodeGen. Once
2014 Nov 13
2
[LLVMdev] RFC: How to represent SEH (__try / __except) in LLVM IR
Thanks for the additional information.
Right now I’m experimenting with a mix of code compiled with MSVC and code compiled with clang, trying to get a C++ exception thrown and caught by the MSVC-compiled code across a function in the clang-compiled code. My goal here is to isolate a small part of what needs to be done in a way that lends itself to tinkering. I think this might lead me to the
2014 Nov 13
2
[LLVMdev] RFC: How to represent SEH (__try / __except) in LLVM IR
Hi Reid,
I’ve been following your proposal, and I’d be interested in helping out if I can. My main interest right now is in enabling C++ exception handling in clang for native (i.e. not mingw/cygwin) Windows targets (both 32-bit and 64-bit), but if I understand things correctly that will be closely related to your SEH work under the hood.
I’m still trying to get up to speed on what is and is
2020 Apr 01
2
[RFC] [Windows SEH] Local_Unwind (Jumping out of a _finally) and -EHa (Hardware Exception Handling)
Hi, all,
The intend of this thread is to complete the support for Windows SEH.
Currently there are two major missing features: Jumping out of a _finally and Hardware exception handling.
The document below is my proposed design and implementation to fully support SEH on LLVM.
I have completely implemented this design on a branch in repo:
2014 Nov 14
2
[LLVMdev] RFC: How to represent SEH (__try / __except) in LLVM IR
I don’t really have a good enough feeling for the landingpad syntax yet to comment on the most natural way to extend it yet, but creating a synthetic cleanup function to call from the personality function is what I was thinking.
With the current (trunk +/- a couple of weeks) clang, compiling for an “x86_64-pc-windows-msvc” target, I’m seeing a landingpad that looks like this:
lpad:
2020 Apr 16
2
[RFC] [Windows SEH][-EHa] Support Hardware Exception Handling
As stated in the design paragraph, this design does not intend to model precise CFG at instruction level since it’s complicated and unnecessary.
As long as we comply C and C++ rules listed below, we achieve -EHa semantic. There is NO need to precisely model HW exception control flow at instruction-level.
Your example about memcpy() is just a bug in current implementation. I will fix it so that
2014 Nov 10
2
[LLVMdev] RFC: How to represent SEH (__try / __except) in LLVM IR
Moving this month old RFC to llvmdev. Not sure why I sent this to cfe-dev
in the first place...
---
Based on code review discussion from John, he thinks filter expressions
should be emitted into the body of the function with the try, rather than
being outlined by the frontend.
Instead of having the frontend create filter functions, we would use labels
in place of typeinfo. The IR would look
2020 Apr 02
2
[RFC] [Windows SEH] Local_Unwind (Jumping out of a _finally) and -EHa (Hardware Exception Handling)
* When a goto in a _finally occurs, we must "unwind" to the target code, not just "jump" to target label
I'm not sure what you're trying to say here. In the Microsoft ABI, goto out of a catch block also calls into the unwinder. We have to run any destructors, and return from the funclet (catchret/cleanupret).
* The call inside a _try is an invoke with EH
2015 May 18
2
[LLVMdev] RFC: New EH representation for MSVC compatibility
On Sat, May 16, 2015 at 7:29 AM, Steve Cheng <steve.ckp at gmail.com> wrote:
> On 2015-05-15 18:37:58 -0400, Reid Kleckner said:
>
> After a long tale of sorrow and woe, my colleagues and I stand here
>> before you defeated. The Itanium EH representation is not amenable to
>> implementing MSVC-compatible exceptions. We need a new representation that
>> preserves
2015 May 18
2
[LLVMdev] RFC: New EH representation for MSVC compatibility
On Mon, May 18, 2015 at 11:48 AM, Steve Cheng <steve.ckp at gmail.com> wrote:
> On 2015-05-18 13:32:54 -0400, Reid Kleckner said:
>
>>
>> Right, doing our own personality function is possible, but still has half
>> the challenge of using __CxxFrameHandler3, and introduces a new runtime
>> dependency that isn't there currently. Given that it won't save
2015 Apr 16
2
[LLVMdev] Exception filter IR model
Hi,
I have a question about the IR model for SEH filters (as I want to use the same model for CLR filters). In particular, when an outer filter is invoked before entering an inner finally, which piece of IR reflects the filter's side-effects? To take a concrete example, consider this C code:
void foo() {
int x;
__try {
x = 0;
__try {
x = 2;
may_throw();
}
2014 Dec 03
1
[LLVMdev] RFC: How to represent SEH (__try / __except) in LLVM IR
Hi Reid,
I saw your patch but haven’t looked closely at it yet.
I do have a work in progress for the outlining. I expect to have something ready to share pretty soon, hopefully by the end of the week. It won’t be ready for primetime, as it’s making a whole lot of assumptions about the structure of the IR, but I think it will work with a sample IR file based on what you posted in your earlier
2020 Apr 02
2
[RFC] [Windows SEH] Local_Unwind (Jumping out of a _finally) and -EHa (Hardware Exception Handling)
Reply inline
From: Ten Tzen <tentzen at microsoft.com>
Sent: Wednesday, April 1, 2020 3:54 PM
To: Eli Friedman <efriedma at quicinc.com>; llvm-dev <llvm-dev at lists.llvm.org>
Cc: aaron.smith at microsoft.com
Subject: [EXT] RE: [llvm-dev] [RFC] [Windows SEH] Local_Unwind (Jumping out of a _finally) and -EHa (Hardware Exception Handling)
? For goto in finally, why are you
2015 May 20
2
[LLVMdev] RFC: New EH representation for MSVC compatibility
This example is pretty compelling, but I still think I want to limit the
scope of this change to not include this feature. It's probably reasonable
to hold onto the idea as future work, though. In the meantime, frontends
can decide for themselves whether they want code size or stronger
optimization of cleanups by doing early outlining or not.
The only way we can hit the quadratic growth from
2014 Nov 18
2
[LLVMdev] RFC: How to represent SEH (__try / __except) in LLVM IR
> On Nov 18, 2014, at 11:07 AM, Reid Kleckner <rnk at google.com> wrote:
>
> On Tue, Nov 18, 2014 at 10:50 AM, Bob Wilson <bob.wilson at apple.com <mailto:bob.wilson at apple.com>> wrote:
>
>> On Nov 17, 2014, at 5:50 PM, Reid Kleckner <rnk at google.com <mailto:rnk at google.com>> wrote:
>>
>> On Mon, Nov 17, 2014 at 5:22 PM, Bob
2016 Sep 28
2
seh / landing pads
In the past people in #llvm suggested to me I should use landing pads
instead of seh when it comes to Windows unless i really need seh.
Looking at what gets generated win64 -gnu does use seh but calls the
landing pad somehow, while win32 doesn't at all. It looks to me a custom
win64 landing pad personality can also deal with things like Access
Violation. Is there a way to make win32 also