Commit Graph

8263 Commits

Author SHA1 Message Date
Chris Lattner
bab8c28924 Remove trivially dead nodes was not removing nodes that were dead due to forwarding!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8634 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 21:34:07 +00:00
Chris Lattner
a2d51afd79 Global variables with APPENDING linkage are very important to keep around!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8632 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 19:00:50 +00:00
Chris Lattner
894263bc9f Add special case handling for calloc and realloc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8630 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 16:50:46 +00:00
Chris Lattner
808a7aeec7 Switch from using CallInst's to represent call sites to using the LLVM
CallSite class.  Now we can represent function calls by invoke instructions
too!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8629 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 16:34:13 +00:00
Chris Lattner
192cd9cccd Make this work better for constants that aren't necessarily in ANY graph, such as null pointers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8628 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 16:12:57 +00:00
Chris Lattner
4c6d4d3522 update dox
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8626 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 14:43:16 +00:00
Chris Lattner
02a3be020a Rename Function::getEntryNode -> getEntryBlock
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8625 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 14:39:18 +00:00
Chris Lattner
894707117e Rename getEntryNode -> getEntryBlock()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8624 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 14:36:49 +00:00
Chris Lattner
ab4536e353 Minor cleanups, no functional changes
Rename Function::getEntryNode -> getEntryBlock


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8623 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 14:36:23 +00:00
Chris Lattner
b912491329 Cleanup header file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8622 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 14:35:38 +00:00
Chris Lattner
75ebab89ff Now that the TCE pass passes all of the tests, add it to GCCAS
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8621 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 05:26:22 +00:00
Chris Lattner
d452ebd0bf Fix a really obvious huge gaping bug, add a comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8620 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 05:24:00 +00:00
Chris Lattner
3fc6ef1bb9 Expose the TCE pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8619 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 05:14:13 +00:00
Chris Lattner
2240d2b3f7 New transformation: tail recursion elimination
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8618 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 05:03:31 +00:00
Chris Lattner
e420056842 New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8617 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 05:02:54 +00:00
Chris Lattner
f091a53ad4 Fix header, fix broken friend decl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8616 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 03:34:44 +00:00
Chris Lattner
c1820036bd Fix bug: BasicAA/2003-09-19-LocalArgument.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8615 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 03:08:47 +00:00
Chris Lattner
4acad5c9e7 New testcase that basicaa should be able to handle
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8614 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 03:08:21 +00:00
Chris Lattner
bb37a69bfc Fix file header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8613 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 02:42:54 +00:00
Chris Lattner
51757155fa Unsquishify
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8612 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 01:23:29 +00:00
Chris Lattner
7892549796 Keep track of the number of typed/untyped memory accesses theyre are in the program
VS: ----------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8611 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 01:20:46 +00:00
John Criswell
f430434e8d New header file for gccld.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8610 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-19 20:24:40 +00:00
John Criswell
71478b7f72 Removed linking functionality from gccld.cpp and moved it to linker.cpp.
Renamed functions that were all lower-case.
Moved functions from util.cpp into linker.cpp or gccld.cpp.
Removed util.h and created gccld.h.
Refactored the linker functionality in linker.cpp so that it is easier to
follow, easier to modify, and it's library/object file search behavior is
easier to understand and document.
Added code to include library paths when doing native linking, but this
causes problems and is currently #ifdef'd out.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8609 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-19 20:24:23 +00:00
Chris Lattner
095e907125 Reject "llvm." as a function name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8608 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-19 19:31:41 +00:00
Chris Lattner
62a355cc6e Implement InstCombine/and.ll:test(15|16)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8607 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-19 19:05:02 +00:00
Chris Lattner
0daee350cf Two new tests for shifts followed by ands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8606 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-19 19:04:43 +00:00
Chris Lattner
bd7b5fff82 pull a large nested conditional out into its own function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8605 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-19 17:17:26 +00:00
Chris Lattner
9d5890d435 Implement InstCombine/add.ll:test(15|16)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8604 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-19 15:35:42 +00:00
Chris Lattner
b55650aad6 New testcases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8603 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-19 15:33:46 +00:00
Chris Lattner
c6a200efd2 a bitfield stress test to exercise various parts of the front-end.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8602 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-19 05:22:10 +00:00
John Criswell
4b6e5d1198 Changed the empty rule for .h files. The rule needs an empty command so that
Make actually uses it to "regenerate" header files that have been
moved/removed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8600 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-18 18:37:08 +00:00
Brian Gaeke
79c980399e Fix a typo in Sparc.cpp.
Update names of some pass creator fns in addPassesToEmitAssembly().
FunctionInfo is gone.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8599 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-18 17:37:46 +00:00
Brian Gaeke
b92c5c0c15 Rename the pass creator fn to mimic the other creator fn names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8598 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-18 17:37:35 +00:00
Brian Gaeke
866dc1def7 Fix (and properly doxygenify) some comments. Incorporate
functionality of FunctionInfo pass as doFinalization method.
Rename pass to match names of other passes like it.
Rename the pass creator fn to mimic the other creator fn names.
Include StringExtras for utostr().
Make symbol prologue/epilogue stuff redundant with
 EmitBytecodeToAssembly, in preparation for refactoring.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8597 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-18 17:37:25 +00:00
Brian Gaeke
bb7cd97d53 Make the symbol prologue/epilogue stuff redundant with MappingInfo, in
preparation for refactoring.
Rename the pass creator fn to mimic the other creator fn names.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8596 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-18 17:37:14 +00:00
John Criswell
dc0de4f07b Refactored gccld into three C++ source files.
Added code ignore bytecode link failures when generating native code.
Moved native code and bytecode generation out of the main() function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8595 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-18 16:22:26 +00:00
Misha Brukman
521f1feb11 Minimal implementation of the abstract ModuleProvider interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8594 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-18 16:17:06 +00:00
Misha Brukman
b580232245 Abstract interface for module providers, e.g. streaming bytecode reader.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8593 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-18 16:16:32 +00:00
Chris Lattner
7b4475573a Document new column
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8589 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-17 22:02:49 +00:00
Misha Brukman
6eba07a6a3 Fixed spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8588 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-17 21:34:23 +00:00
John Criswell
a589d31faa Replaced the call to strdup() with a new operator followed by a strcpy().
This should prevent calls to the new oerator and malloc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8587 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-17 19:14:41 +00:00
John Criswell
83ca6ec8a3 Added the use of the const keyword.
Have gccld find the path to llc and gcc instead of having the library do it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8586 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-17 19:04:22 +00:00
John Criswell
e5b3e1559b In ExecWait(), made the child process exit if it can't execve() the new
program.
Added the use of const (which compiles and is hopefully correct).
Added comments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8585 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-17 19:02:49 +00:00
Misha Brukman
f1d01fb6a4 Added sections about debugging mis-compilations and incorrect code generation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8584 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-17 18:51:47 +00:00
Misha Brukman
0bb806bd9a Do not put DEBUG() guard around error condition; this must *always* be printed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8583 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-17 18:21:48 +00:00
Misha Brukman
4104f23e52 Fix the flag on `rm' to properly do a recursive deletion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8582 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-17 18:20:35 +00:00
Chris Lattner
63bd61330b Change FunctionInfo from being an annotation put on Functions to be
something which is mapped from functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8580 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-17 17:26:22 +00:00
John Criswell
621727c29e Removed the use of the environ variable and instead use the environment array
passed into main().  This may (or may not) be more portable, but it looks
nicer.
Added functions to copy the environment array and modify the copy, thus
preserving the environment.
Switched from using system() to using ExecWait().
The code now removes the assembly file generated when using the -native option.
Fixed the remove_env() function: The previous revision truncated the
environment variable list.  This version just zaps the variable as intended.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8579 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-17 15:20:51 +00:00
John Criswell
e9ba8b3674 Added the ExecWait() function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8578 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-17 15:14:25 +00:00
John Criswell
5afb5f6377 Added the ExecWait() function. It executes a program with the specified
arguments and environment.
Perhaps it should be merged with the RunProgramWithTimeout function, but I'd
want to allow it to inherit the parent process's stdin and stdout.
I'll save that for a rainy day...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8577 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-17 15:13:59 +00:00