| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
llvm-svn: 230795
|
| |
|
|
| |
llvm-svn: 230783
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently we emit DeferredDeclsToEmit in reverse order. This patch changes that.
The advantages of the change are that
* The output order is a bit closer to the source order. The change to
test/CodeGenCXX/pod-member-memcpys.cpp is a good example.
* If we decide to deffer more, it will not cause as large changes in the
estcases as it would without this patch.
llvm-svn: 226751
|
| |
|
|
|
|
| |
Revert r222993 while I investigate some MemorySanitizer failures.
llvm-svn: 222995
|
| |
|
|
|
|
|
|
|
| |
Now that TailRecursionElimination has been fixed with r222354, the
threshold on size for lifetime marker insertion can be removed. This
only affects named temporary though, as the patch for unnamed temporaries
is still in progress.
llvm-svn: 222993
|
| |
|
|
|
|
| |
Revert this patch while I investigate some sanitizer failures off-line.
llvm-svn: 219307
|
| |
|
|
|
|
|
|
|
| |
Boostrapping LLVM+Clang+LLDB without threshold on object size for
lifetime markers insertion has shown there was no significant change
in compile time, so let the stack slot colorizer do its optimization
for all slots.
llvm-svn: 219303
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are situations when clang knows that the C1 and C2 constructors
or the D1 and D2 destructors are identical. We already optimize some
of these cases, but cannot optimize it when the GlobalValue is
weak_odr.
The problem with weak_odr is that an old TU seeing the same code will
have a C1 and a C2 comdat with the corresponding symbols. We cannot
suddenly start putting the C2 symbol in the C1 comdat as we cannot
guarantee that the linker will not pick a .o with only C1 in it.
The solution implemented by GCC is to expand the ABI to have a comdat
whose name uses a C5/D5 suffix and always has both symbols. That is
what this patch implements.
llvm-svn: 217874
|
| |
|
|
| |
llvm-svn: 216892
|
| |
|
|
| |
llvm-svn: 216802
|
| |
|
|
|
|
| |
Aliases in llvm now hold an arbitrary expression.
llvm-svn: 210063
|
| |
|
|
|
|
|
|
|
|
| |
Now that llvm cannot represent alias cycles, we have to diagnose erros just
before trying to close the cycle. This degrades the errors a bit. The real
solution is what it was before: if we want to provide good errors for these
cases, we have to be able to find a clang level decl given a mangled name
and produce the error from Sema.
llvm-svn: 209008
|
| |
|
|
|
|
|
|
|
|
|
|
| |
at ... )')
For namespaces, this is consistent with mangling and GCC's debug info
behavior. For structs, GCC uses <anonymous struct> but we prefer
consistency between all anonymous entities but don't want to confuse
them with template arguments, etc, so we'll just go with parens in all
cases.
llvm-svn: 205398
|
| |
|
|
| |
llvm-svn: 200711
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this patch we output the in the order
C2
C1
D2
D1
D0
Which means that a destructor or constructor that call another is output after
the callee. This is a bit easier to read IHMO and a tiny bit more efficient
as we don't put a decl in DeferredDeclsToEmit.
llvm-svn: 196784
|
| |
|
|
|
|
|
|
|
|
| |
This patch disables aliasing (and rauw) of derived dtors to base dtors at -O0.
This optimization can have a negative impact on the debug quality.
This was a latent bug for some time with local classes, but got noticed when it
was generalized and broke gdb's destrprint.exp.
llvm-svn: 194618
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The original decls are created when used. The replacements are created at the
end of the TU in reverse order.
This makes the original order far better for testing. This is particularly
important since the replacement logic could be used even when
-mconstructor-aliases is not used, but that would make many tests hard to read.
This is a fixed version of r194357 which handles replacing a destructor with
another which is an alias to a third one.
llvm-svn: 194452
|
| |
|
|
|
|
|
|
| |
This reverts commit r194357.
Debugging a cast failure during bootstrap.
llvm-svn: 194358
|
| |
|
|
|
|
|
|
|
|
|
| |
The original decls are created when used. The replacements are created at the
end of the TU in reverse order.
This makes the original order far better for testing. This is particularly
important since the replacement logic could be used even when
-mconstructor-aliases is not used, but that would make many tests hard to read.
llvm-svn: 194357
|
| |
|
|
| |
llvm-svn: 194296
|
| |
|
|
|
|
|
| |
Unlike an alias a rauw is always safe, so we don't need to avoid this
optimization when the replacement is not know to be available in every TU.
llvm-svn: 194288
|
| |
|
|
|
|
|
| |
This is a small optimization on linux, but should help more on windows
where msvc only outputs one destructor if there would be two identical ones.
llvm-svn: 194095
|
| |
|
|
| |
llvm-svn: 194050
|
| |
|
|
| |
llvm-svn: 194049
|
| |
|
|
|
|
|
| |
This reverts commit r194046.
Debugging a bootstrap issue.
llvm-svn: 194047
|
| |
|
|
|
|
|
| |
This is a small optimization on linux, but should help more on windows
where msvc only outputs one destructor if there would be two identical ones.
llvm-svn: 194046
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this patch we produce alias for cases like
template<typename T>
struct foobar {
foobar() {
}
};
template struct foobar<void>;
We just have to be careful to produce the same aliases in every TU because
of comdats.
llvm-svn: 194000
|
| |
|
|
| |
llvm-svn: 192464
|
| |
|
|
|
|
|
|
|
| |
This reverts commit r192300.
The change itself looks correct, but it found issues on how we handle aliases
in llvm.
llvm-svn: 192353
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this patch we produce alias for cases like
template<typename T>
struct foobar {
foobar() {
}
};
template struct foobar<void>;
It is safe to use aliases to weak symbols, as long and the alias itself is also
weak.
llvm-svn: 192300
|
| |
|
|
|
|
| |
tests fail.
llvm-svn: 188447
|
| |
|
|
| |
llvm-svn: 186800
|
| |
|
|
|
|
| |
attributes on the call/invoke instructions.
llvm-svn: 175878
|
| |
|
|
|
|
| |
microsoft-abi-array-cookies.cpp, for -Asserts.
llvm-svn: 155913
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I broke this in r155838 by not actually instantiating non-dependent default arg
expressions. The motivation for that change was to avoid producing duplicate
conversion warnings for such default args (we produce them once when we parse
the template - there's no need to produce them at each instantiation) but
without actually instantiating the default arg, things break in weird ways.
Technically, I think we could still get the right diagnostic experience without
the bugs if we instantiated the non-dependent args (for non-dependent params
only) immediately, rather than lazily. But I'm not sure if such a refactoring/
change would be desirable so here's the conservative fix for now.
llvm-svn: 155893
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This model uses the 'landingpad' instruction, which is pinned to the top of the
landing pad. (A landing pad is defined as the destination of the unwind branch
of an invoke instruction.) All of the information needed to generate the correct
exception handling metadata during code generation is encoded into the
landingpad instruction.
The new 'resume' instruction takes the place of the llvm.eh.resume intrinsic
call. It's lowered in much the same way as the intrinsic is.
llvm-svn: 140049
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
hierarchy of delegation, and that EH selector values are meaningful
function-wide (good thing, too, or inlining wouldn't work).
2,3d
1a
hierarchy of delegation and that EH selector values have the same
meaning everywhere in the function instead of being meaningful only
in the context of a specific selector.
This removes the need for routing edges through EH cleanups,
since a cleanup simply always branches to its enclosing scope.
llvm-svn: 137293
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
aren't actually going to make a normal cleanup for. Sometimes
we optimistically create branches to such blocks for fixups,
and then we resolve the fixup to somewhere within the cleanup's
scope, and then the cleanup is actually not reachable for some
reason. The process of resolving the fixup leaves us with
switches whose default edge leads to the cleanup; we can
replace that with unreachable, then (in many cases) turn
the switch into an unconditional branch.
Fixes PR10467.
llvm-svn: 137011
|
| |
|
|
|
|
|
|
|
|
|
| |
- an off-by-one error in emission of irregular array limits for
InitListExprs
- use an EH partial-destruction cleanup within the normal
array-destruction cleanup
- get the branch destinations right for the empty check
Also some refactoring which unfortunately obscures these changes.
llvm-svn: 134890
|
| |
|
|
| |
llvm-svn: 134831
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- Emit default-initialization of arrays that were partially initialized
with initializer lists with a loop, rather than emitting the default
initializer N times;
- support destroying VLAs of non-trivial type, although this is not
yet exposed to users; and
- support the partial destruction of arrays initialized with
initializer lists when an initializer throws an exception.
llvm-svn: 134784
|
| |
|
|
|
|
| |
It's quite likely that this will explode, but I need to know how. :)
llvm-svn: 132269
|
| |
|
|
| |
llvm-svn: 132219
|
| |
|
|
|
|
|
|
| |
to be careful to emit landing pads that are always prepared to handle a
cleanup path. This is correct mostly because of the fix to the LLVM
inliner, r132200.
llvm-svn: 132209
|
| |
|
|
| |
llvm-svn: 126599
|
| |
|
|
|
|
| |
destruction in the destructor-aliases logic. Fixes PR 9197.
llvm-svn: 125447
|
| |
|
|
| |
llvm-svn: 124210
|
| |
|
|
| |
llvm-svn: 123197
|
| |
|
|
| |
llvm-svn: 108989
|
| |
|
|
|
|
| |
lazy cleanups.
llvm-svn: 108978
|