Displaying 20 results from an estimated 400 matches similar to: "WinEH funclet coloring in computeLoopSafetyInfo"
2020 Jan 14
2
Incorrect code generation when using -fprofile-generate on code which contains exception handling (Windows target)
I think the simplest, most complete, short term fix, would be to call
llvm::colorEHFunclets, and to have the relevant instrumentation passes
apply the appropriate funclet bundle when inserting function calls. It's
not elegant because it means every simple instrumentation pass that inserts
regular function calls (ASan, TSan, MSan, instrprof, etc) needs to be
funclet-aware. But, it will work,
2020 Jan 13
2
Incorrect code generation when using -fprofile-generate on code which contains exception handling (Windows target)
I think this is the same underlying issue as https://bugs.llvm.org/show_bug.cgi?id=40320. CCing Reid, who's had a bunch of thoughts on this in the past.
On 1/11/20, 10:25 AM, "llvm-dev on behalf of Chrulski, Christopher M via llvm-dev" <llvm-dev-bounces at lists.llvm.org on behalf of llvm-dev at lists.llvm.org> wrote:
Hi,
I've run into a bug with the LLVM
2018 May 22
2
LLVM SEH docs -- enregistration of locals in nonvolatile registers?
https://llvm.org/docs/ExceptionHandling.html#wineh
> No variables live in to or out of the funclet can be allocated in registers.
I don't think this is quite true. though it might be a useful simplification.
Obviously it is true for volatile registers, but I believe the funclet receives a CONTEXT
with the nonvolatiles restored. Obviously cumbersome to access, but it lets you enregister
2018 May 24
0
LLVM SEH docs -- enregistration of locals in nonvolatile registers?
Is this example what you had in mind?
void f() {
int *p = get_p();
use_p(p);
try {
may_throw(p);
} catch (int) {
// don't need p
}
use_p(p);
}
The idea is that because p is not modified or used within the catch region
(the funclet), it can live in a callee-saved register across the whole
function.
That is true, it is possible, but I don't think it fits very well in
2016 Apr 04
2
How to call an (x86) cleanup/catchpad funclet
I've modified llvm to emit vc++ compatible SEH structures for my
personality on x86/Windows and my handler works fine, but the only thing
I can't figure out is how to call these funclets, they look like:
Catch:
"?catch$3@?0?m3 at 4HA":
LBB4_3: # %BasicBlock26
pushl %ebp
pushl %eax
addl $12, %ebp
movl %esp, -28(%ebp)
movl $LBB4_5, %eax
2019 Jun 25
3
Potential missed optimisation with SEH funclets
I’ve been experimenting with SEH handling in LLVM, and it seems like the unwind funclets generated by LLVM are much larger than those generated by Microsoft’s CL compiler.
I used the following code as a test:
void test() {
MyClass x;
externalFunction();
}
Compiling with CL, the unwind funclet that destroys ‘x’ is just two lines of asm:
lea rcx, QWORD PTR x$[rdx]
jmp ??1MyClass@@QEAA at XZ
2015 May 19
2
[LLVMdev] RFC: New EH representation for MSVC compatibility
I think adding transitions to cleanupblocks on the normal execution path
would be an optimization barrier. Most passes would see the cleanupblock
instruction and run the other way. It's definitely appealing from the
perspective of getting the smallest possible code, but I'm OK with having
no more than two copies of everything in the finally block.
I think with the addition of the
2015 May 19
2
[LLVMdev] RFC: New EH representation for MSVC compatibility
On Mon, May 18, 2015 at 8:40 PM, Joseph Tremoulet <jotrem at microsoft.com>
wrote:
> > I want to have separate normal and exceptional codepaths
>
> I assume you at least mean that's what you'll be doing in Clang's initial
> IR generation. Do you also mean to impose this as a restriction on other
> IR generators, and as a property that IR transformations must
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
2015 May 18
2
[LLVMdev] RFC: New EH representation for MSVC compatibility
On Mon, May 18, 2015 at 12:03 PM, Joseph Tremoulet <jotrem at microsoft.com>
wrote:
> Hi,
>
>
>
> Thanks for sending this out. We're looking forward to seeing this come
> about, since we need funclet separation for LLILC as well (and I have
> cycles to spend on it, if that would be helpful).
>
>
>
> Some questions about the new proposal:
>
>
>
2015 May 15
8
[LLVMdev] RFC: New EH representation for MSVC compatibility
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
information about how try-catch blocks are nested.
WinEH background
-------------------------------
Skip this if you already know a lot about Windows exceptions. On Windows,
1997 Jul 14
1
R-beta: Plotting: numeric 'col' colors; col=0, col=1, .. | Nice "funclet"
``We all know''
that R has more flexible and nicer color specifications than S-plus.
There are situations however, where I'd like to specify colors numerically,
e.g.
1) convenience of using different colors in a for(.) loop
or
2) backward compatibility with S.
In S, there's the quite known ``standard''
col = 0 :<==> current background color [ = white by
2017 Mar 31
4
Dereferenceable load semantics & LICM
Hi Piotr,
On March 31, 2017 at 1:07:12 PM, Piotr Padlewski
(piotr.padlewski at gmail.com) wrote:
> [snip]
> Do I understand it correctly, that it is legal to do the hoist because all
> of the instructions above %vtable does not throw?
Yes, I think you're right. HeaderMayThrow is a conservative
approximation, and the conservativeness is biting us here.
> Are there any plans to
2015 May 13
2
[LLVMdev] [WinEH] A hiccup for the Windows C++ exception handling
Have got anything started with the dispatchblock plan?
From: Reid Kleckner [mailto:rnk at google.com]
Sent: Wednesday, May 13, 2015 1:15 PM
To: Kaylor, Andrew
Cc: David Majnemer <david.majnemer at gmail.com> (david.majnemer at gmail.com); LLVM Developers Mailing List
Subject: Re: [WinEH] A hiccup for the Windows C++ exception handling
On Wed, May 13, 2015 at 11:03 AM, Kaylor, Andrew
2015 May 13
2
[LLVMdev] [WinEH] A hiccup for the Windows C++ exception handling
I made some progress this afternoon. I now have a set of changes in my local sandbox that allows clang to pass all of the tests in the suite I’ve been using to exercise this code.
How do you feel about working these changes into trunk to establish a working baseline, even knowing that parts of this are going to be redesigned?
-Andy
From: Reid Kleckner [mailto:rnk at google.com]
Sent:
2015 May 13
2
[LLVMdev] [WinEH] A hiccup for the Windows C++ exception handling
I've been working recently to get the following test case working for an x86_64-pc-windows-msvc target.
void test1() {
try {
try {
throw 1;
} catch(...) {
throw;
}
} catch (...) {
}
}
I committed a patch earlier in the week to get the WinEHPrepare pass to produce IR that I thought was sufficient, but as I mentioned in the review I was still seeing runtime errors
2015 May 28
1
[LLVMdev] WinEH work to be done (in progress and otherwise)
I think we should make a new svn repository for these. test-suite is the
logical place, but it's way too bloated and has too much Unix specific
baggage. I'd really like to have something that just uses lit, can be
checked out into projects, and can be run as part of check-all, like the
compiler-rt execution test suite.
My suggestion is to call it 'execution-tests', and we can
2020 Jun 25
2
[RFC] Replacing inalloca with llvm.call.setup and preallocated
Bringing this back up for discussion on handling exceptions.
According to the inalloca design <https://llvm.org/docs/InAlloca.html>,
there should be a stackrestore after an invoke in both the non-exceptional
and exceptional case (that doesn't seem to be happening in some cases as
we've seen, but that's beside the point).
Does it make sense to model a preallocated call as
2015 May 28
2
[LLVMdev] WinEH work to be done (in progress and otherwise)
Hi,
Have any decisions been made on where to put executable WinEH tests? Wherever they go, would it be helpful if I were to add some C++EH and/or SEH tests pulled from MSVC's test suite, since compatibility is the goal here?
Thanks
-Joseph
From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Reid Kleckner
Sent: Tuesday, May 19, 2015 5:56 PM
To: Kaylor,
2015 Apr 10
3
[LLVMdev] [WinEH] Cloning blocks that reference non-cloned PHI nodes
Hi Reid and David,
I just wanted to give you a heads up that I'm currently working on a problem where the WinEHPrepare outlining code stumbles and asserts while cloning code that references extracted landing pad values via PHI nodes that are in intermediate blocks that aren't being cloned. The test I'm looking at fails with an assertion claiming that llvm.eh.begincatch was called