[llvm-commits] [llvm] r81928 - /llvm/trunk/lib/CodeGen/DwarfEHPrepare.cpp
Bill Wendling
wendling at apple.com
Tue Sep 22 11:31:01 PDT 2009
On Sep 16, 2009, at 4:38 AM, Duncan Sands wrote:
> Hi Eric,
>
>>> not sure how this is possible, got an example? In practice I only
>>> ever
>>> saw abnormal landing pads due to critical edge splitting.
>>
>> With the change to using the unwind inst i'll create one every time
>> you
>> inline something with an unwind afaict since it turns the unwind
>> into a
>> branch to the invoke's landing pad.
>
> that makes sense - thanks for the explanation!
>
Hi Duncan,
Here's a testcase that makes this concrete:
$ cat testcase.ii
struct Foo {
Foo();
};
template <class Ty>
class Bar {
Ty &f;
public:
Bar(Ty &x) : f(x) {}
};
template <class Ty>
class Baz {
void *pointer;
void *create(void *(*make)());
public:
Ty &operator() () {
create(make);
}
static void *make() {
return new Ty;
}
};
class Qux {
char *f;
public:
~Qux() {
if (f) delete f;
}
};
class Zork {
struct Bork : public Qux, public Foo {};
static Baz<Bork> sessionMap;
public:
static void m() {
Bar<Foo> _(sessionMap());
}
};
void Func1() {
Zork::m();
}
$ llvm-g++ -O3 -S -dA testcase.ii -emit-llvm -o - 2>&1 | grep br |
grep lpad
br i1 %4, label %lpad, label %bb.i.i
br label %lpad
(Most of this stuff comes from hash_map/vector code.)
-bw
More information about the llvm-commits
mailing list