Commit Graph

35 Commits

Author SHA1 Message Date
Nate Begeman
14b0529532 Add support alignment of allocation instructions.
Add support for specifying alignment and size of setjmp jmpbufs.

No targets currently do anything with this information, nor is it presrved
in the bytecode representation.  That's coming up next.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24196 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-05 09:21:28 +00:00
Jeff Cohen
66c5fd6c53 When a function takes a variable number of pointer arguments, with a zero
pointer marking the end of the list, the zero *must* be cast to the pointer
type.  An un-cast zero is a 32-bit int, and at least on x86_64, gcc will
not extend the zero to 64 bits, thus allowing the upper 32 bits to be
random junk.

The new END_WITH_NULL macro may be used to annotate a such a function
so that GCC (version 4 or newer) will detect the use of un-casted zero
at compile time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23888 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-23 04:37:20 +00:00
Jeff Cohen
2aeaf4e839 Fix VC++ warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23579 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-01 03:57:14 +00:00
Chris Lattner
93e50ce04c Insert stores after phi nodes in the normal dest. This fixes
LowerInvoke/2005-08-03-InvokeWithPHI.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23525 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-29 17:44:20 +00:00
Chris Lattner
5b3c70263b add a note about a way to improve this code further, that I won't be getting
to right now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23485 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-27 22:44:59 +00:00
Chris Lattner
4531371960 Avoid spilling stack slots... to stack slots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23478 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-27 21:33:12 +00:00
Chris Lattner
f4e6c3a69b Completely rewrite 'correct' eh support. This changes how setjmp insertion
is performed so it is only at most once per function that contains an invoke
instead of once per invoke in the function.  This patch has the following perks:

1. It fixes PR631, which complains about slowness.
2. If fixes PR240, which complains about non-volatile vars being live across
   setjmp/longjmps.
3. It improves (but does not fix) the jmpbuf alignment issue on itanium by not
   forcing the jmpbufs to always be 8-bytes off the alignment of the structure.
4. It speeds up 253.perlbmk from 338s to 13.70s (a 25x improvement!), making us
   now about 4% faster than GCC.

Further improvements are also possible.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23477 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-27 21:18:17 +00:00
Chris Lattner
f1adce42b2 The correct fix for PR612, which also fixes
Transforms/LowerInvoke/2005-08-03-InvokeWithPHIUse.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22628 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-03 18:51:44 +00:00
Chris Lattner
6e459bf0a7 When inserting code, make sure not to insert it before PHI nodes. This
fixes PR612 and Transforms/LowerInvoke/2005-08-03-InvokeWithPHI.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22626 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-03 18:34:29 +00:00
Chris Lattner
71fae1022e Fix a 64-bit problem, passing (int)0 through ... instead of (void*)0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22206 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-09 03:32:54 +00:00
Chris Lattner
efd9168eae When lowering invokes to calls, amke sure to preserve the calling conv. This
fixes Ptrdist/anagram with x86 llcbeta


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21925 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-13 06:27:02 +00:00
Chris Lattner
1381dd8a6e Prefer int 0 instead of long 0 for GEP arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21924 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-13 06:10:12 +00:00
Chris Lattner
a9e9211bbb Preserve tail marker
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21737 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-06 06:48:21 +00:00
John Criswell
fe3706a12b Fixed a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21653 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-02 14:47:42 +00:00
Misha Brukman
fd93908ae8 Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21427 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 23:48:37 +00:00
Chris Lattner
0c3b390a54 Lazily create the abort message, so only translation units that use unwind
will actually get it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17700 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-13 19:07:32 +00:00
Chris Lattner
44c94b9671 Simplify handling of constant initializers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17696 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-12 22:42:57 +00:00
Reid Spencer
551ccae044 Changes For Bug 352
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-01 22:55:40 +00:00
Reid Spencer
518310cb0d bug 122:
- Replace ConstantPointerRef usage with GlobalValue usage


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14953 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-18 00:44:37 +00:00
Chris Lattner
11b9be5a1a Fix one of the major things that is causing the C Backend to infinite loop
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13872 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-28 05:02:13 +00:00
Chris Lattner
28977af72a Support getelementptr instructions which use uint's to index into structure
types and can have arbitrary 32- and 64-bit integer types indexing into
sequential types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12653 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-05 01:30:19 +00:00
Chris Lattner
0e28eca4bc Add warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12573 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-31 22:00:30 +00:00
Chris Lattner
99cca7d3aa Disable tail duplication in a case that breaks on Olden/tsp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12021 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-01 01:12:13 +00:00
Chris Lattner
860a16143c Instead of producing calls to setjmp/longjmp, produce uses of the
llvm.setjmp/llvm.longjmp intrinsics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11482 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-15 22:24:27 +00:00
Chris Lattner
cefc18e7d9 Expose a pass ID that can be 'required'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11376 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 16:16:16 +00:00
Chris Lattner
f1d0d3519f Only add the global variable with the abort message if an unwind actually
occurs in the program.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11249 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-09 22:48:47 +00:00
Misha Brukman
b9806e0101 Fix grammar-o.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11210 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-08 22:27:33 +00:00
Chris Lattner
501825e08a Improve compatibility with programs that already have a prototype for 'write',
even if it is wierd in some way.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11207 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-08 22:14:44 +00:00
Chris Lattner
aeb2a1d708 rename the "exceptional" destination of an invoke instruction to the 'unwind' dest
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11202 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-08 21:44:31 +00:00
Chris Lattner
6d78457f17 Implement proper invoke/unwind lowering.
This fixed PR16 "[lowerinvoke] The -lowerinvoke pass does not insert calls to setjmp/longjmp"


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11195 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-08 19:53:56 +00:00
Chris Lattner
e1c09309f2 Add a call to 'write' right before the call to abort() in the unwind path.
This causes the JIT, or LLC'd program to print out a nice message, explaining
WHY the program aborted.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11184 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-08 07:30:29 +00:00
Chris Lattner
dead99325c Finegrainify namespacification
Fix bug: LowerInvoke/2003-12-10-Crash.llx


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10382 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-10 20:22:42 +00:00
Brian Gaeke
d0fde30ce8 Put all LLVM code into the llvm namespace, as per bug 109.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 22:41:34 +00:00
John Criswell
b576c94c15 Added LLVM project notice to the top of every C++ source file.
Header files will be on the way.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9298 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 19:43:21 +00:00
Chris Lattner
86e4445ec3 Initial checkin of the LLVM->LLVM transform to support code generators which
do not support stack unwinding yet


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8869 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-05 19:14:42 +00:00