Commit Graph

8324 Commits

Author SHA1 Message Date
Chris Lattner e317856e0e Use global *_iterator
llvm-svn: 8703
2003-09-24 22:07:33 +00:00
Chris Lattner a940095ae2 Do not use BasicBlock::*_iterator, just use *_iterator itself.
Isn't updating copy and pasted code a joy

llvm-svn: 8702
2003-09-24 22:06:25 +00:00
Misha Brukman c3634809e6 * Eliminate BytecodeBufferReader::Length member variable
* Kill unused ALIN_PTRS #define
* Set the error string if user passed it in to be compatible with former API

llvm-svn: 8701
2003-09-24 22:04:02 +00:00
Chris Lattner 64d88bc788 Do not use BasicBlock::succ_iterator
llvm-svn: 8700
2003-09-24 22:03:22 +00:00
Brian Gaeke 974bc6682e Update head-of-file comment.
llvm-svn: 8699
2003-09-24 18:16:23 +00:00
Brian Gaeke 1542a8b820 Untabify tabs in stuff I've recently added.
Check in my register allocator state-saving code.

llvm-svn: 8698
2003-09-24 18:08:54 +00:00
Brian Gaeke 82585e030c Use getRegClassID() instead of getRegClass()->getID(), since it's there.
Shorten the markSuggestedColorUsable method.
Add a switch for saving reg. alloc. state (coming soon).

llvm-svn: 8697
2003-09-24 17:50:28 +00:00
Brian Gaeke 50364030ca Remove some unused methods of class IGNode.
llvm-svn: 8696
2003-09-24 04:29:52 +00:00
Brian Gaeke aec3e58348 Fix a typo I happened to notice.
Rename include guards in the "usual" manner.

llvm-svn: 8695
2003-09-24 04:09:50 +00:00
Chris Lattner 8560a069f8 Fix bug in previous checkin
llvm-svn: 8694
2003-09-23 22:02:01 +00:00
John Criswell 89f4dcf5bc Added code that ensures that we pass the beginning of the data buffer to
the parsing routines regardless of whether the buffer is re-aligned or not.

llvm-svn: 8693
2003-09-23 21:19:11 +00:00
Chris Lattner 3311c8224b Update email addr
llvm-svn: 8692
2003-09-23 20:59:28 +00:00
John Criswell 8d5d13d69c If we fail to find python or qmtest, give a warning message instead of an
error message.  This should hopefully allow our nightly tester to run, which
does not run the QMTest tests at present.

llvm-svn: 8691
2003-09-23 20:46:32 +00:00
Chris Lattner d7e18989cd Make it detect failed builds better
llvm-svn: 8690
2003-09-23 20:33:04 +00:00
Chris Lattner 295b907cee Fix bug: IndVarsSimplify/2003-09-23-NotAtTop.ll
llvm-svn: 8689
2003-09-23 20:26:48 +00:00
Chris Lattner a4e0f76fb8 new testcase
llvm-svn: 8688
2003-09-23 20:26:38 +00:00
Misha Brukman 427929adfb Fixed spelling.
llvm-svn: 8687
2003-09-23 17:28:11 +00:00
Misha Brukman 84b1140e2c Fix spelling.
llvm-svn: 8686
2003-09-23 17:27:28 +00:00
Misha Brukman 08993c8068 Squelch warning and delete extra space.
llvm-svn: 8685
2003-09-23 17:27:02 +00:00
Misha Brukman 1a74cffdec Stop returning bool and pass Instruction by reference;
return std::auto_ptr and use exceptions

llvm-svn: 8684
2003-09-23 16:17:50 +00:00
Misha Brukman 0c0a882bc3 Suggestions made by Chris:
* Instead of a #define, use inline function
* Fix the name on the #define, errr... now inline function to be more logical:
  it doesn't CHECK the alignment, it PERFORMS the alignment
* To get string name of a Type*, use getDescription(), not getName()

llvm-svn: 8683
2003-09-23 16:15:29 +00:00
Misha Brukman 301f7dfa19 * Group class definitions & implementations together
* Make sure we align the buffer we're given
* Do not let exceptions propagate when the caller asks for a Module*
* Add doxygenified comments to wrapper functions

llvm-svn: 8682
2003-09-23 16:13:28 +00:00
John Criswell 3149448caa Added code that stops the configure script if a needed program is not found.
llvm-svn: 8680
2003-09-23 15:28:52 +00:00
Chris Lattner 6b379da6c3 Move getAnalysisUsage method from header to .cpp file. Add a normal file
header comment

llvm-svn: 8679
2003-09-23 15:13:04 +00:00
Misha Brukman 715fe875bb * Constantify arguments to copy function
* Stop using a #define, make it an inline if statement

llvm-svn: 8678
2003-09-23 15:09:26 +00:00
Misha Brukman 3e18bc1518 Removed no longer used member variable.
llvm-svn: 8677
2003-09-22 23:58:08 +00:00
Misha Brukman d4d259cafb Uppercase the acronym ASCII.
llvm-svn: 8676
2003-09-22 23:50:25 +00:00
Misha Brukman bafce80ba4 Added file header comment.
llvm-svn: 8675
2003-09-22 23:44:46 +00:00
Misha Brukman cd1d0e31f5 * No longer initialize the module, a subclass is more suitable to do this
because it can add a module ID which we do not have at this time.
* Check to see if the module has been initialized when materializing it.

llvm-svn: 8674
2003-09-22 23:44:13 +00:00
Chris Lattner df60fe04ab Update file header for renamed file
llvm-svn: 8673
2003-09-22 23:42:00 +00:00
Misha Brukman d3e4bf17a5 Added doxygen comments for the streaming module provider.
llvm-svn: 8672
2003-09-22 23:40:38 +00:00
Misha Brukman 6e9a3517f2 * Cleaned up code:
- no more passing around a string pointer to set errors
  - no more returning booleans and checking for errors, we use C++ exceptions
* Broke functionality into 2 new classes, one reads from file, one from a stream
* Implemented lazy function streaming - the parser can read in a function at-a-time

llvm-svn: 8671
2003-09-22 23:38:23 +00:00
Misha Brukman 98b719219b Added functions to perform streaming function loading, doxygenified comments.
llvm-svn: 8670
2003-09-22 23:36:33 +00:00
Misha Brukman 9b316ecdc0 Converted tabs to spaces.
llvm-svn: 8669
2003-09-22 23:35:54 +00:00
Misha Brukman 2face45941 Materialize the module before releasing it.
llvm-svn: 8668
2003-09-22 23:35:23 +00:00
Chris Lattner 50ac360a34 Fix bugs in the last change
llvm-svn: 8667
2003-09-22 23:30:59 +00:00
Chris Lattner d6002b8e15 Fix bug: Inline/2003-09-22-PHINodesInNormalInvokeDest.ll
llvm-svn: 8666
2003-09-22 22:35:39 +00:00
Chris Lattner 8f36a47acc new testcase, reduced by bugpoint
llvm-svn: 8665
2003-09-22 22:22:41 +00:00
Chris Lattner 0178d262e6 Fix bug: Inline/2003-09-22-PHINodesInExceptionDest.ll
... by making sure to update PHI nodes to take into consideration the
extra edges we get if we inline a call instruction through an invoke.

llvm-svn: 8664
2003-09-22 21:59:27 +00:00
Chris Lattner 17b9ee45f9 new testcase which crashes the inliner, thanks Bugpoint!
llvm-svn: 8663
2003-09-22 21:58:46 +00:00
Misha Brukman e051f86a3d Credits now go into the top-level CREDITS.TXT
llvm-svn: 8662
2003-09-22 21:57:56 +00:00
Misha Brukman 4ce9dae5b1 Credits are now in top-level CREDITS.TXT
llvm-svn: 8661
2003-09-22 21:57:15 +00:00
Misha Brukman 9672a0bf22 Keep all the contributors in one place, instead of all over the code base.
llvm-svn: 8660
2003-09-22 21:56:08 +00:00
Chris Lattner 2caaaba3e9 Squelch warning
llvm-svn: 8659
2003-09-22 20:33:34 +00:00
Chris Lattner 6954f20e22 Squelch warning
llvm-svn: 8658
2003-09-22 20:27:10 +00:00
Chris Lattner 65d93e208b Minor cleanups:
* Local header file goes at top
 * Remove unneeded #includes
 * Wrap code at 80 columns
 * Declare variables where they are used
 * 'register' is not needed
 * Use 'unsigned' instead of 'int' variables where possible

llvm-svn: 8657
2003-09-22 20:21:34 +00:00
Chris Lattner adb9a912fc new testcase that crashes the C++ frontend, found by John
llvm-svn: 8655
2003-09-22 18:27:20 +00:00
Vikram S. Adve 49cf091005 Fix assertion so it doesn't not trip incorrectly.
llvm-svn: 8650
2003-09-21 07:55:27 +00:00
Brian Gaeke e383a14960 Use C++ math header instead of C version.
llvm-svn: 8648
2003-09-21 03:57:37 +00:00
Brian Gaeke 32cd554853 Erase now-unused prototypes.
llvm-svn: 8647
2003-09-21 02:51:00 +00:00
Brian Gaeke 20c888fa9f Rearrange #includes ... since there are fewer now I guess it's a win.
(I also zapped printMachineCode() and printLabel() at the previous checkin,
but forgot to mention it.)

llvm-svn: 8646
2003-09-21 02:50:21 +00:00
Brian Gaeke 3a0a5fc1b3 Standardize the names of include guards.
llvm-svn: 8645
2003-09-21 02:31:37 +00:00
Brian Gaeke 58dabb4406 Standardize the names of include guards.
Remove more excess whitespace.

llvm-svn: 8644
2003-09-21 02:31:25 +00:00
Brian Gaeke 73d10dc47b Standardize the names of include guards.
Fix typos in file header comment.

llvm-svn: 8643
2003-09-21 02:31:15 +00:00
Brian Gaeke 43593b8cd0 I tried to standardize the formatting and tidy up the huge amount of
excess whitespace a little. Also improved some comments.

llvm-svn: 8642
2003-09-21 02:24:09 +00:00
Brian Gaeke e1061018bf Convert PhyRegAlloc into a proper pass.
PhyRegAlloc.cpp:
 Don't include TargetMachine.h or TargetRegInfo.h, because these are provided
  by PhyRegAlloc.h.
 Merge class RegisterAllocator into class PhyRegAlloc.
 Simplify & move ctor, dtor to PhyRegAlloc.h.
 Make some of PhyRegAlloc's reference members into pointer members,
  so they can be more easily messed with.
 MarkAllocatedRegs() becomes a member method, with fewer args.

PhyRegAlloc.h:
 Include Pass.h, TargetMachine.h and TargetRegInfo.h. Don't declare
  TargetRegInfo forward.
 Give AddedInstrns the obvious clear() method.
 Make some of PhyRegAlloc's reference members into pointer members,
  so they can be more easily messed with.
 Add prototype for markAllocatedRegs().
 Remove unused inline void constructLiveRanges().

llvm-svn: 8641
2003-09-21 01:23:46 +00:00
Chris Lattner 4be7671186 Add prototype
llvm-svn: 8640
2003-09-21 00:28:18 +00:00
Chris Lattner 3c095c79fa Functions reachable from the arguments of unresolvable call nodes should
not have their arguments marked complete

llvm-svn: 8639
2003-09-20 23:58:33 +00:00
Chris Lattner 413b7bde7c The Globals graph must become complete at the end of the BU phase!
llvm-svn: 8638
2003-09-20 23:27:05 +00:00
Chris Lattner 880b9aa10a Do not mark incoming arguments to functions complete if the function is pointed to by a global in the globals graph
llvm-svn: 8637
2003-09-20 22:24:04 +00:00
Chris Lattner 8c1a835806 Make sure to add global variable initializers to the Globals graph!
llvm-svn: 8636
2003-09-20 21:48:16 +00:00
Chris Lattner 71f747ea3d Don't consider incomplete nodes to be typesafe!
llvm-svn: 8635
2003-09-20 21:48:01 +00:00
Chris Lattner cc81b798e4 Remove trivially dead nodes was not removing nodes that were dead due to forwarding!
llvm-svn: 8634
2003-09-20 21:34:07 +00:00
Chris Lattner c8dfbbbf25 Global variables with APPENDING linkage are very important to keep around!
llvm-svn: 8632
2003-09-20 19:00:50 +00:00
Chris Lattner 689b681558 Add special case handling for calloc and realloc
llvm-svn: 8630
2003-09-20 16:50:46 +00:00
Chris Lattner 04d9cb6770 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!

llvm-svn: 8629
2003-09-20 16:34:13 +00:00
Chris Lattner 36b877ae7f Make this work better for constants that aren't necessarily in ANY graph, such as null pointers
llvm-svn: 8628
2003-09-20 16:12:57 +00:00
Chris Lattner 22533bc900 update dox
llvm-svn: 8626
2003-09-20 14:43:16 +00:00
Chris Lattner 5dac64f629 Rename Function::getEntryNode -> getEntryBlock
llvm-svn: 8625
2003-09-20 14:39:18 +00:00
Chris Lattner 21f750fabb Rename getEntryNode -> getEntryBlock()
llvm-svn: 8624
2003-09-20 14:36:49 +00:00
Chris Lattner 4413e4362c Minor cleanups, no functional changes
Rename Function::getEntryNode -> getEntryBlock

llvm-svn: 8623
2003-09-20 14:36:23 +00:00
Chris Lattner da5b9376a2 Cleanup header file
llvm-svn: 8622
2003-09-20 14:35:38 +00:00
Chris Lattner 25963c85e3 Now that the TCE pass passes all of the tests, add it to GCCAS
llvm-svn: 8621
2003-09-20 05:26:22 +00:00
Chris Lattner b6ac976247 Fix a really obvious huge gaping bug, add a comment
llvm-svn: 8620
2003-09-20 05:24:00 +00:00
Chris Lattner 0016085602 Expose the TCE pass
llvm-svn: 8619
2003-09-20 05:14:13 +00:00
Chris Lattner 2e9014cb1b New transformation: tail recursion elimination
llvm-svn: 8618
2003-09-20 05:03:31 +00:00
Chris Lattner 50af7516b0 New testcase
llvm-svn: 8617
2003-09-20 05:02:54 +00:00
Chris Lattner 7e5ca14433 Fix header, fix broken friend decl
llvm-svn: 8616
2003-09-20 03:34:44 +00:00
Chris Lattner 092af3f36e Fix bug: BasicAA/2003-09-19-LocalArgument.ll
llvm-svn: 8615
2003-09-20 03:08:47 +00:00
Chris Lattner 066ccf8848 New testcase that basicaa should be able to handle
llvm-svn: 8614
2003-09-20 03:08:21 +00:00
Chris Lattner 825937df8e Fix file header
llvm-svn: 8613
2003-09-20 02:42:54 +00:00
Chris Lattner 0942bc63a3 Unsquishify
llvm-svn: 8612
2003-09-20 01:23:29 +00:00
Chris Lattner b1fcb2b644 Keep track of the number of typed/untyped memory accesses theyre are in the program
VS: ----------------------------------------------------------------------

llvm-svn: 8611
2003-09-20 01:20:46 +00:00
John Criswell 17c3d4dfc1 New header file for gccld.
llvm-svn: 8610
2003-09-19 20:24:40 +00:00
John Criswell b533bde540 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.

llvm-svn: 8609
2003-09-19 20:24:23 +00:00
Chris Lattner 3284ed725a Reject "llvm." as a function name
llvm-svn: 8608
2003-09-19 19:31:41 +00:00
Chris Lattner 2da29177ba Implement InstCombine/and.ll:test(15|16)
llvm-svn: 8607
2003-09-19 19:05:02 +00:00
Chris Lattner d441d407cf Two new tests for shifts followed by ands
llvm-svn: 8606
2003-09-19 19:04:43 +00:00
Chris Lattner ba1cb38c06 pull a large nested conditional out into its own function
llvm-svn: 8605
2003-09-19 17:17:26 +00:00
Chris Lattner dbba189f15 Implement InstCombine/add.ll:test(15|16)
llvm-svn: 8604
2003-09-19 15:35:42 +00:00
Chris Lattner def041c533 New testcases
llvm-svn: 8603
2003-09-19 15:33:46 +00:00
Chris Lattner bf38b842ba a bitfield stress test to exercise various parts of the front-end.
llvm-svn: 8602
2003-09-19 05:22:10 +00:00
John Criswell a8391af2c4 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.

llvm-svn: 8600
2003-09-18 18:37:08 +00:00
Brian Gaeke 7af0df0015 Fix a typo in Sparc.cpp.
Update names of some pass creator fns in addPassesToEmitAssembly().
FunctionInfo is gone.

llvm-svn: 8599
2003-09-18 17:37:46 +00:00
Brian Gaeke 310b1d899a Rename the pass creator fn to mimic the other creator fn names.
llvm-svn: 8598
2003-09-18 17:37:35 +00:00
Brian Gaeke 24e706c1ac 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.

llvm-svn: 8597
2003-09-18 17:37:25 +00:00
Brian Gaeke b4aa604093 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.

llvm-svn: 8596
2003-09-18 17:37:14 +00:00
John Criswell 8ecc30249f 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.

llvm-svn: 8595
2003-09-18 16:22:26 +00:00
Misha Brukman 3d72faddeb Minimal implementation of the abstract ModuleProvider interface.
llvm-svn: 8594
2003-09-18 16:17:06 +00:00
Misha Brukman 1d33258b99 Abstract interface for module providers, e.g. streaming bytecode reader.
llvm-svn: 8593
2003-09-18 16:16:32 +00:00
Chris Lattner 651524a228 Document new column
llvm-svn: 8589
2003-09-17 22:02:49 +00:00
Misha Brukman 02fe6b7683 Fixed spelling.
llvm-svn: 8588
2003-09-17 21:34:23 +00:00
John Criswell a2748c267b Replaced the call to strdup() with a new operator followed by a strcpy().
This should prevent calls to the new oerator and malloc.

llvm-svn: 8587
2003-09-17 19:14:41 +00:00
John Criswell 0217b1beb3 Added the use of the const keyword.
Have gccld find the path to llc and gcc instead of having the library do it.

llvm-svn: 8586
2003-09-17 19:04:22 +00:00
John Criswell 74c89470d3 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.

llvm-svn: 8585
2003-09-17 19:02:49 +00:00
Misha Brukman a3fc5d9a35 Added sections about debugging mis-compilations and incorrect code generation.
llvm-svn: 8584
2003-09-17 18:51:47 +00:00
Misha Brukman 435404818b Do not put DEBUG() guard around error condition; this must *always* be printed.
llvm-svn: 8583
2003-09-17 18:21:48 +00:00
Misha Brukman 041bded97e Fix the flag on `rm' to properly do a recursive deletion.
llvm-svn: 8582
2003-09-17 18:20:35 +00:00
Chris Lattner a28e1f281a Change FunctionInfo from being an annotation put on Functions to be
something which is mapped from functions.

llvm-svn: 8580
2003-09-17 17:26:22 +00:00
John Criswell f22d845bd7 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.

llvm-svn: 8579
2003-09-17 15:20:51 +00:00
John Criswell f13ec35fe1 Added the ExecWait() function.
llvm-svn: 8578
2003-09-17 15:14:25 +00:00
John Criswell 9a99ed1992 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...

llvm-svn: 8577
2003-09-17 15:13:59 +00:00
Chris Lattner 457a95bdc8 fix misspelling analyse -> analyze
llvm-svn: 8576
2003-09-17 15:00:45 +00:00
John Criswell 9bcdda3588 Renamed the link page to llvmlink.html
Added initial pages for the extract and llvm-link commands.
Reworded the description of the -load option for analyze to hopefully make it
more clear.

llvm-svn: 8575
2003-09-17 14:11:24 +00:00
Chris Lattner 2ae6b11415 new old testcase
llvm-svn: 8574
2003-09-17 05:00:56 +00:00
Chris Lattner 8552e7c6df Use new method
llvm-svn: 8573
2003-09-17 05:00:07 +00:00
Chris Lattner c1b1651210 Change the semancics of the dropallrefs method
llvm-svn: 8572
2003-09-17 04:58:59 +00:00
Chris Lattner efc07b7fde Add new deleteBody method
llvm-svn: 8571
2003-09-17 04:58:43 +00:00
John Criswell 1997a34e26 Added the -native option.
With this option, gccld links the program into LLVM bytecode and a native code
binary.  This allows llvmgcc to correctly tell GNU configure scripts when
things aren't defined properly (because the native link will fail).

llvm-svn: 8570
2003-09-16 21:27:35 +00:00
John Criswell af5e2e40ee Updated the name of the linker to llvm-link.
This should fix the MultiSource tests.

llvm-svn: 8569
2003-09-16 20:02:22 +00:00
Chris Lattner 39f398b50d Fix bug raising allocations whose call sites were invoke instructions.
Thanks to brg for tracking down the problem so precisely!

llvm-svn: 8568
2003-09-16 19:42:21 +00:00
Chris Lattner ec6d7a6df3 This is effectively a complete rewrite of the globaldce algorithm, resulting
in it being both shorter and more effective.  It no longer depends on the
callgraph, so one FIXME has been fixed.

Additionally, this pass was not able to delete recursive (but dead) functions
if they were pointed to by global variables which were also dead.  In fact
this pass had a lot of problems deleting functions which were only pointed
to by dead globals and other stuff.

Fixing this means that the entire EH library should be stripped away now from
programs that don't use sjlj or exceptions.

llvm-svn: 8567
2003-09-16 19:27:31 +00:00
Brian Gaeke 6d069fcd49 Add missing apostrophe. It's been bugging me for years.
No really, years.

llvm-svn: 8566
2003-09-16 18:00:35 +00:00
John Criswell c513f695a4 Regenerated configure with Misha's changes.
Now link is llvm-link and things are alphabetized.

llvm-svn: 8565
2003-09-16 15:54:19 +00:00
Brian Gaeke 666b18f1a6 Fix typo in comment. Take out some random whitespace.
(Partial merge from my working file)

llvm-svn: 8564
2003-09-16 15:38:05 +00:00
Misha Brukman f915d9e238 These transitional scripts are no longer necessary, no one should have `as' or
`dis' anymore.

llvm-svn: 8563
2003-09-16 15:37:32 +00:00
Brian Gaeke c8a9ec01b6 Edit comment for accuracy
llvm-svn: 8562
2003-09-16 15:36:50 +00:00
Chris Lattner d63ea11a0c Remove obsolete -abort-on-exception flag from LLI
llvm-svn: 8561
2003-09-16 15:35:14 +00:00
Chris Lattner 60c4583f2f Remove obsolete option
llvm-svn: 8560
2003-09-16 15:34:36 +00:00
Misha Brukman c08758a5b3 Fixed spelling & grammar.
llvm-svn: 8559
2003-09-16 15:31:46 +00:00
Misha Brukman edf4bab190 Renamed `as' => `llvm-as', `dis' => `llvm-dis', `link' => `llvm-link'.
llvm-svn: 8558
2003-09-16 15:29:54 +00:00
Misha Brukman 145e176d2f `link' is now `llvm-link'. Also alphabetized the tools for easy reference.
llvm-svn: 8557
2003-09-16 15:22:55 +00:00
Misha Brukman c6547505e6 `link' is now `llvm-link'.
llvm-svn: 8556
2003-09-16 15:21:52 +00:00
Misha Brukman df8eee614c `link' has become `llvm-link'.
llvm-svn: 8555
2003-09-16 15:21:21 +00:00
Vikram S. Adve 256fc40375 Fix longjmp case so that, along with the call to abort(), we also
generate the appropriate CallArgsDescriptor and tmp. virtual regs.

llvm-svn: 8554
2003-09-16 05:56:22 +00:00
Vikram S. Adve 8579a9a38c Add flag to control whether or not delay slots are filled during
instruction scheduling (this is off by default).

llvm-svn: 8553
2003-09-16 05:55:15 +00:00
John Criswell 67fdd43bff Allow multiple object trees to use the source tree tests at once by
using a QMTEST_CLASS_PATH local to the object tree.
Add the gui target to start the QMTest gui (saves writing a few lines of
documentation too).	:)

llvm-svn: 8552
2003-09-16 02:59:26 +00:00
John Criswell e84478afd9 Have the configure script put llvm.py into the object root.
The QMTest program can then use that as the location for loading test and
resource class, thus compiling the Python code into the object root as
desired.

llvm-svn: 8551
2003-09-16 02:12:45 +00:00
Chris Lattner 6721f0e72c Put llvm .bc files into the BytecodeObj subdirectory instead of the Bytecode
subdirectory.  This prevents the 'make clean' rule from removing lib/Bytecode

llvm-svn: 8550
2003-09-15 22:17:02 +00:00
John Criswell dd49d8c669 QMTest test and resource classes are always register before running the tests.
This ensures that any python bytecode generated by another platform is
replaced with new pythong bytecode before the tests begin.

Perferably, a better method will be implemented in the next few weeks.

llvm-svn: 8549
2003-09-15 21:54:49 +00:00
John Criswell ea93bb4a9c Removing Makefiles. Regression tests are now run by QMTest.
llvm-svn: 8548
2003-09-15 20:21:38 +00:00
John Criswell 0638e4d64a Removing Makefile. The QMTest program now handles the running of these tests.
llvm-svn: 8547
2003-09-15 20:18:06 +00:00
John Criswell 609e61b389 Removed llvm/tools/as, llvm/tools/dis, and runtime/GCCLibraries/libexception.
llvm-svn: 8546
2003-09-15 20:12:48 +00:00
Misha Brukman e0544398dd Renamed `as' => `llvm-as', `dis' => `llvm-dis', `link' => `llvm-link'.
llvm-svn: 8545
2003-09-15 20:04:28 +00:00
Misha Brukman 2d81216d45 Renamed `as' => `llvm-as', `dis' => `llvm-dis'.
llvm-svn: 8544
2003-09-15 20:02:53 +00:00
Chris Lattner ef6a55b95e Fix building outside the srcdir, again
llvm-svn: 8543
2003-09-15 19:22:36 +00:00
Chris Lattner 3e61694d43 Fix building into a different obj directory
llvm-svn: 8542
2003-09-15 19:20:11 +00:00
Misha Brukman cf0c744c42 `link' is being renamed to `llvm-link'.
llvm-svn: 8541
2003-09-15 18:34:34 +00:00
John Criswell f6778b68c2 Modified the checks slightly so that one can re-configure LLVM without
having to do a "make distclean" when building in the source directory.

llvm-svn: 8540
2003-09-15 17:19:42 +00:00
John Criswell 22107a75d6 Added code that verifies that the source directory has not been configured
already.  This should help prevent strange errors from happening, but will
make re-configuring the source directory more difficult when it is shared with
the object directory.

llvm-svn: 8539
2003-09-15 17:04:06 +00:00
Chris Lattner b421aebcc0 Fix problems with programs that prototype printf to something unusual
llvm-svn: 8538
2003-09-15 16:47:12 +00:00
Chris Lattner b12f83e101 Do not segfault when the post-dominator tree is empty (ie, there are no return
or unwind instructions in the function)

llvm-svn: 8537
2003-09-15 15:47:40 +00:00
Chris Lattner 0fead45c59 new testcase that crashes opt
llvm-svn: 8536
2003-09-15 15:29:11 +00:00
Chris Lattner 7cae89ec44 Whoops, remove makefile too
llvm-svn: 8533
2003-09-15 15:07:37 +00:00
Chris Lattner 44f9dd0ec5 Remove dead library, it is now folded into crtend
llvm-svn: 8532
2003-09-15 15:07:22 +00:00
Chris Lattner 65568e89fb Allow specifying a file with symbols to export
llvm-svn: 8531
2003-09-15 15:06:54 +00:00
Chris Lattner 6d5e3a0df3 Move the exception handling runtime stuff into this directory
llvm-svn: 8530
2003-09-15 15:06:39 +00:00
Misha Brukman d5cc6bf0dc Stop building `as' and `dis' as they have been removed.
llvm-svn: 8529
2003-09-15 14:45:00 +00:00
Misha Brukman 5135afaa5a `dis' is no longer an LLVM tool.
llvm-svn: 8528
2003-09-15 14:44:22 +00:00
Misha Brukman 9f0ab6b5db `as' is no longer an LLVM tool.
llvm-svn: 8527
2003-09-15 14:44:05 +00:00
John Criswell 697c409660 Re-generated for recent changes.
llvm-svn: 8526
2003-09-15 14:25:08 +00:00
Vikram S. Adve a9b0673a68 Really use a search path as described in the log message for the last
version (instead of 2 fixed choices).

llvm-svn: 8525
2003-09-15 11:18:36 +00:00
Chris Lattner 40b6621b50 Minor cleanups, give credit, remove code that should not be necessary, and
was a "major hack"  :)

llvm-svn: 8524
2003-09-15 05:43:05 +00:00
Brian Gaeke 75ed4b8831 Fix typos in comments.
llvm-svn: 8523
2003-09-15 05:28:42 +00:00
Chris Lattner 1f86982f3d Add prototype for the lowersetjmp pass
llvm-svn: 8522
2003-09-15 05:05:23 +00:00
Chris Lattner cf82b00eb5 Enable the setjmp/longjmp lowering pass
llvm-svn: 8521
2003-09-15 04:56:44 +00:00
Chris Lattner 6f99eb56c3 Initial checkin of the Setjmp/Longjmp lowering/transformation pass,
contributed by the masterful Bill Wendling!

llvm-svn: 8520
2003-09-15 04:56:27 +00:00
Chris Lattner da3585335b Ugh, a bug fix needed because of the bug in the CallGraph code
llvm-svn: 8519
2003-09-15 04:52:00 +00:00
Chris Lattner 233f2a0816 These two conditions are not exclusive!!
llvm-svn: 8518
2003-09-15 04:35:16 +00:00
Chris Lattner 5d0d3a2667 Make the print output more useful
llvm-svn: 8517
2003-09-15 04:29:37 +00:00
Chris Lattner 5a6fa29eb3 Fix bug: PruneEH/2003-09-14-ExternalCall.llx
llvm-svn: 8516
2003-09-15 02:22:50 +00:00
Chris Lattner f654287502 New testcase
llvm-svn: 8515
2003-09-15 02:22:35 +00:00
Chris Lattner 7f89ea75e1 Fix bug: Inline/2003-09-14-InlineValue.ll
llvm-svn: 8514
2003-09-15 02:10:16 +00:00
Chris Lattner afb2777b7a New testcase
llvm-svn: 8513
2003-09-15 02:07:37 +00:00
Chris Lattner 6b6eadc0dd Wrap long lines at 80 cols
llvm-svn: 8512
2003-09-15 01:12:04 +00:00
Chris Lattner 218112d15e Make sure to #include the OBJROOT config.h file, not the SRCROOT config.h file!
llvm-svn: 8511
2003-09-15 01:07:32 +00:00
Chris Lattner af4c95a051 Fix a spello Misha made while fixing one of my appostrifications
llvm-svn: 8510
2003-09-15 00:33:20 +00:00
Vikram S. Adve 20c8c040f5 Update makellvm to work with the brave new world of separate obj-root trees.
With these changes, you can still run makellvm directly from your source tree
as follows:
  % makellvm [toolname]	## looks for obj-root in default places (see below)
or
  % makellvm -obj obj-root [toolname]	## specify obj-root explicitly.

With the first from, `makellvm' checks the following places in order
and uses the first one that contains the file `Makefile.config':
(1) Your src-root directory
(2) /localhome/$USER/llvm
Other choices can be added to this list.

llvm-svn: 8509
2003-09-14 23:44:31 +00:00
Chris Lattner 9aa8598450 Fix the nightly tester now that olden has been moved
llvm-svn: 8508
2003-09-14 06:00:49 +00:00
Chris Lattner c0f9858706 manually add the llvm-ar stuff. this should be regenerated
llvm-svn: 8507
2003-09-13 03:29:53 +00:00
Tanya Lattner a3be0508d5 Added llvm-ar to the Makefile
llvm-svn: 8506
2003-09-13 03:23:46 +00:00
Tanya Lattner 124ddeff3c Fixed warning.
llvm-svn: 8505
2003-09-13 03:18:56 +00:00
Chris Lattner 4777f035eb Configure the llvm-ar directory
llvm-svn: 8504
2003-09-13 02:35:56 +00:00
Misha Brukman 46e18d437e Bugpoint has the ability of generating a plethora of core files, so to
avoid filling up the disk, set the max core file size to 0.

llvm-svn: 8503
2003-09-12 20:42:57 +00:00
Chris Lattner 099ec07a95 Make sure to cannonicalize loops before running indvar simplify
llvm-svn: 8502
2003-09-12 16:45:01 +00:00
Chris Lattner cfa3eeee63 New testcase, this should be simplified
llvm-svn: 8501
2003-09-12 16:42:16 +00:00
John Criswell 3487a86ece Caught a few misses in the last modification.
llvm-svn: 8500
2003-09-12 16:36:17 +00:00
John Criswell 1868b4e330 Updated for the re-organization of llvm/test/Programs/MultiSource.
llvm-svn: 8499
2003-09-12 16:31:43 +00:00
Chris Lattner 7fdde92b1f Do not return success after checking only the FIRST USE of a gep instruction.
Instead, check all uses.
This fixes bug: ScalarRepl/2003-09-12-IncorrectPromote.ll
This also fixes the miscompilation of Ptrdist/bc

llvm-svn: 8493
2003-09-12 16:02:12 +00:00
John Criswell 2c193404e0 Initial go at documentation for llc.
Pretty crufty.

llvm-svn: 8492
2003-09-12 15:46:24 +00:00
Chris Lattner 69fa53ce8c New testcase, bug distilled from bc
llvm-svn: 8491
2003-09-12 15:44:01 +00:00
Chris Lattner 9a95f2a944 Minor optimization efficiency improvement:
- Run mem2reg promotion first
  - Only rerun passes if the previous thing changed something

llvm-svn: 8490
2003-09-12 15:36:03 +00:00
Misha Brukman acda7df68b Fixed spelling and grammar.
llvm-svn: 8489
2003-09-11 22:34:13 +00:00
Chris Lattner cce81be1e1 Simplify code
Implement InstCombine/mul.ll:test9

llvm-svn: 8488
2003-09-11 22:24:54 +00:00
Chris Lattner 80e8c466fb New testcase
llvm-svn: 8487
2003-09-11 22:23:48 +00:00
John Criswell 3c172b4331 Added the SetjmpLongjmp Makefile.
llvm-svn: 8486
2003-09-11 20:53:48 +00:00
John Criswell a9060d8406 Modified the footer to be a link to the LLVM web page.
Organized the commands into three distinct groups on the main page.
Fixed the hyperlinks in the main page.
Removed as and dis; they will not exist with those names by Release 1.

llvm-svn: 8485
2003-09-11 20:23:52 +00:00
John Criswell 408128d2f1 Adding a skeleton for the LLVM Command Guide.
Hopefully the group as a whole will update this into a real guide.

llvm-svn: 8483
2003-09-11 19:58:03 +00:00
Misha Brukman 329983228f Fixed spelling and grammar.
llvm-svn: 8478
2003-09-11 18:14:24 +00:00
John Criswell cd5a59fb5b Fixed SPEC so that it would run correctly with the new autoconf-style object
directory.
Cleaned up the Makefile so that it uses VPATH to find source files.

llvm-svn: 8477
2003-09-11 18:04:30 +00:00
John Criswell 7e0a65db53 Fixed SPEC so that it would run correctly with the new autoconf-style object
directory.
Added Makefile.spec to the list of files to copy to the object directory.

llvm-svn: 8476
2003-09-11 18:04:00 +00:00
John Criswell 1e8c7b7ed1 Fixed SPEC so that it would run correctly with the new autoconf-style object
directory.
Added Makefile.spec to the list of files to copy to the object directory.
Moved the configuration of $SourceDir to Makefile.config and corrected the
conditional that surrounds it.  This allows SPEC to reset it and get the correct
VPATH.

llvm-svn: 8475
2003-09-11 18:03:50 +00:00
Misha Brukman 217ca0bcb9 Apostrophes are only used for possession and quoting.
llvm-svn: 8473
2003-09-11 16:58:31 +00:00
Chris Lattner 23ff5c1ccb scalarrepl now includes mem2reg
llvm-svn: 8472
2003-09-11 16:46:10 +00:00
Chris Lattner 5d8a12e094 Integrate functionality of the mem2reg pass directly into this pass to make
the combination more effective

llvm-svn: 8471
2003-09-11 16:45:55 +00:00
Chris Lattner 2f6de8b335 Move the -indvars pass much later to where it is more likely to do good stuff
llvm-svn: 8470
2003-09-11 16:34:07 +00:00
Chris Lattner bb9d03b9c0 Renamed DominatorTree::Node::getNode() -> getBlock()
llvm-svn: 8469
2003-09-11 16:26:13 +00:00
Chris Lattner c5df0bb273 Get rid of the whole "Node2" business, rename getNode() ->getBlock() to
be more descriptive

llvm-svn: 8468
2003-09-11 16:25:06 +00:00
Misha Brukman 9b8d339f6e Spell `definite' correctly.
llvm-svn: 8467
2003-09-11 15:32:37 +00:00
Misha Brukman 250f976eb3 Spell `definitely' correctly.
llvm-svn: 8466
2003-09-11 15:31:17 +00:00
John Criswell 73c5be4a2e Removed the aposthrophes endings and the elipses suffixes from build output.
This makes the output more consistent, and I just find aposthrophes annoying.
:)

llvm-svn: 8465
2003-09-11 15:15:53 +00:00
Brian Gaeke ef4327037a Check in the fix I meant to apply here, but mistakenly applied to
tools/extract instead..... heh

llvm-svn: 8464
2003-09-10 21:11:42 +00:00
Misha Brukman 93d0ffb864 * Move include files from middle of file to the top where they belong, moving
the #define up there too
* Since we're including system headers, use the ones in include/llvm/Config
* While we're here, use the canonical LLVM header ordering algorithm

llvm-svn: 8463
2003-09-10 20:52:05 +00:00
Chris Lattner 2158052ac4 Unwind instructions are intrinsically alive, just like returns
llvm-svn: 8462
2003-09-10 20:38:14 +00:00
Chris Lattner 630d2954be Rework dominator interfaces to handle changes in the post-dominance
construction.  Now there may be multiple root blocks, and null is a
special node used to mark the "virtual" exit node of a CFG.

llvm-svn: 8461
2003-09-10 20:37:51 +00:00
Chris Lattner 8157505fae Rework post dominator information so that we do not have to
unify all exit nodes of a function to compute post-dominance information.
This does not work with functions that have both unwind and return nodes,
because we cannot unify these blocks.  The new implementation is better
anyway. :)

llvm-svn: 8460
2003-09-10 20:37:08 +00:00
Chris Lattner 2dcab00d57 Rework dominator and post dominator information so that we do not have to
unify all exit nodes of a function to compute post-dominance information.
This does not work with functions that have both unwind and return nodes,
because we cannot unify these blocks.  The new implementation is better
anyway. :)

llvm-svn: 8459
2003-09-10 20:36:51 +00:00
Chris Lattner 10a032abf1 Update for new UnifyFunction... API
Remove using decl

llvm-svn: 8458
2003-09-10 20:35:33 +00:00
Chris Lattner 3b30e93e27 Remove #include
llvm-svn: 8457
2003-09-10 20:35:21 +00:00
Chris Lattner f941396cce Expand the pass to unify all of the unwind blocks as well
llvm-svn: 8456
2003-09-10 20:34:51 +00:00
Chris Lattner e7980ae2ee Remove a bunch of warnings from the CBE generated C code
llvm-svn: 8455
2003-09-10 20:12:09 +00:00
Chris Lattner ad3f079976 "the one true solution for compatibility with GCC 3.3+"
... or so I hope

llvm-svn: 8454
2003-09-10 20:08:00 +00:00
Chris Lattner 632cccf646 Be a little more specific about what is begin generated. Only print
command line if VERBOSE=1

llvm-svn: 8453
2003-09-10 19:52:54 +00:00
Chris Lattner 59068a0d71 Only emit inter-field-padding if the amount of padding is != 0
llvm-svn: 8452
2003-09-10 19:52:24 +00:00
Chris Lattner 6d2eab62b7 Clean up header, remove extra #include
llvm-svn: 8451
2003-09-10 19:42:51 +00:00
Chris Lattner 2481a985fe Avoid dumping runtime library bytecode files into lib/Bytecode if building
into the source directory

llvm-svn: 8450
2003-09-10 19:37:51 +00:00
Brian Gaeke ff713ae819 Make createVerifierPass return a FunctionPass *.
llvm-svn: 8449
2003-09-10 19:37:04 +00:00
John Criswell 6f7d8a2c0a Updated to reflect the new locations of SingleSource tests.
llvm-svn: 8447
2003-09-10 18:38:44 +00:00
Chris Lattner 74d86a9c93 Remove using declarations
llvm-svn: 8442
2003-09-10 16:08:03 +00:00
Chris Lattner d17fd107c7 New testcase
llvm-svn: 8440
2003-09-10 15:33:33 +00:00
John Criswell 3eaf0b4e4c Regenerated for Chris's updates, which adds several runtime library
directories.

llvm-svn: 8439
2003-09-10 15:17:25 +00:00
Chris Lattner ce165f0c86 Add missing runtime directories
llvm-svn: 8438
2003-09-10 15:13:21 +00:00
Misha Brukman 8c056e4337 Fix warning when _POSIX_MAPPED_FILES is already defined in unistd.h
llvm-svn: 8436
2003-09-10 15:09:45 +00:00
Chris Lattner 66645df54c another trivial cleanup
llvm-svn: 8435
2003-09-10 14:55:05 +00:00
Chris Lattner 960a857dac Simplification of trip counting machinery.
- make sure to check the indvar type before anything else (efficiency)
  - Make sure to insert the 'add' into the program, even though it'll be
    dead
  - Wrap code at 80 columns
  - Other minor cleanups to reduce indentation level

llvm-svn: 8434
2003-09-10 14:51:49 +00:00
John Criswell 732ae94521 Don't explicitly use $SourceDir to find the tblgen files. This causes make
some confusion when trying to generate files (it probably couldn't tell that
./file and $(SourceDir)/file may be the same file).
Now, just let VPATH find everything, and list the primary tblgen file first in
the list of dependencies so that we can just use $< to reference it in the make
rule.

This should hopefully fix the nightly tester.

llvm-svn: 8433
2003-09-10 14:10:44 +00:00
Chris Lattner 64b3894035 Fix spello
llvm-svn: 8432
2003-09-10 05:30:09 +00:00
Chris Lattner 216c7b8aed Fix spell-o's
llvm-svn: 8431
2003-09-10 05:29:43 +00:00
Chris Lattner 4e621cd861 Spelling fixes. I think that "cannonical" is ok, but "canonical" appears to
be the canonical form for the word

llvm-svn: 8430
2003-09-10 05:24:46 +00:00
Chris Lattner 7ff9fe1231 Spelling fixes
llvm-svn: 8429
2003-09-10 05:24:09 +00:00
Chris Lattner 36257f049e Fix up file header
llvm-svn: 8428
2003-09-10 05:10:34 +00:00
Chris Lattner 19b34d12c3 clean up file header comment
llvm-svn: 8427
2003-09-10 05:08:19 +00:00
Chris Lattner 42e7abceb5 Simplify some code
llvm-svn: 8426
2003-09-10 04:49:10 +00:00
Misha Brukman 4ace48e0ca Spell `occurrence' correctly.
llvm-svn: 8425
2003-09-09 21:54:45 +00:00
John Criswell ded9899d2d Updated to find source files using VPATH. This makes writing build rules
much cleaner and easier.
Labeled .td as a suffix for tblgen files in Makefile.rules.
Modified build rules so that source files generated during the build are placed
in the build directory and not the source directory (and not in a Debug
directory).  This makes the system cleaner and allows us to have a read-only
source tree.

llvm-svn: 8424
2003-09-09 20:57:03 +00:00
John Criswell 9f60a1326c Removed Makefiles for directories that no longer exist.
llvm-svn: 8423
2003-09-09 20:52:17 +00:00
Chris Lattner 3eb4bba971 Fix bug: InstCombine/2003-09-09-VolatileLoadElim.ll
Loads "mayWriteToMemory" if they are volatile

llvm-svn: 8422
2003-09-09 18:16:08 +00:00
Chris Lattner 83da4f8bc6 New testcase: do not DCE volatile loads!
llvm-svn: 8421
2003-09-09 18:15:45 +00:00
Chris Lattner a45aa90cc6 Update testcases to be more modern
llvm-svn: 8420
2003-09-09 18:14:37 +00:00
John Criswell f711d34e98 Reverting back to the previous revision.
We want to check for length 5 because we might get the "llvm." string as the
name.  That string is in the LLVM namespace and should be checked as such.
We also don't have to worry about garbage data because (I believe) the string
class will return a valid value.  So, the switch statement will work and we
don't have to worry about the code wandering into segfault land.

llvm-svn: 8419
2003-09-09 16:58:41 +00:00
John Criswell 8d575cb2e1 Modified the check for intrinsic functions. All intrinsic functions have to
be at least 6 characters, since something must follow the "llvm." string in the
function name.
This seems to fix an assertion failure with the SingleSource tests, too.

llvm-svn: 8418
2003-09-09 16:36:09 +00:00
Chris Lattner 230cffbeb3 * Simplify printConstantValueOnly by moving the tail padding stuff directly
into the struct case.
* Extend printConstantValueOnly to print .zero's if the initializer is zero
* Delete dead isConstantFunctionPointerRef function
* Emit the appropriate assembly for the various linkage types!

llvm-svn: 8417
2003-09-09 16:23:36 +00:00
John Criswell bfaf312532 Updated the log of changes (as required by the Burg copyright) to give an
overview of what we changed (which is probably all that the author was looking
for).

llvm-svn: 8416
2003-09-09 15:27:40 +00:00
John Criswell 3f699cdef5 Modified the code so that we exit() with a non-zero value instead of calling
abort() when we can't open the input filename.  The abort() function generates
a core dump if possible and is meant for handling errors so grand that even the
program knows that debugging is necessary.

llvm-svn: 8415
2003-09-09 14:37:48 +00:00
John Criswell 5ba345c6c4 Added the .t implicit rule. You can now run an individual set of QMTests by
specifying "make <test>.t"
For example, make feature.t will run the feature tests.
Removed the QMTESTS variable since it is no longer used.

llvm-svn: 8414
2003-09-08 21:25:35 +00:00
Chris Lattner 9eea08caa2 Oops, look at the VOLATILE marker, not the opcode
llvm-svn: 8413
2003-09-08 20:29:46 +00:00
Chris Lattner e18d43e25d Eliminate the unwind intrinsic, it is now an instruction
llvm-svn: 8412
2003-09-08 19:44:47 +00:00
Chris Lattner 04ecefe232 Eliminate support for the llvm.unwind intrinisic, using the Unwind instruction instead
llvm-svn: 8411
2003-09-08 19:44:26 +00:00
Chris Lattner 0b792b4ed3 Fix bug
llvm-svn: 8410
2003-09-08 19:43:46 +00:00
Chris Lattner caa12cfa75 Should invokify is always true
llvm-svn: 8409
2003-09-08 19:00:30 +00:00
Chris Lattner 9c58cf6d03 Add support for the unwind instruction
llvm-svn: 8408
2003-09-08 18:54:55 +00:00
Chris Lattner 66d5f575ba Add support for unwind
llvm-svn: 8407
2003-09-08 18:54:36 +00:00
Chris Lattner 14b8023555 add support for the unwind inst
llvm-svn: 8406
2003-09-08 18:54:16 +00:00
Chris Lattner fb821f627a Add the unwind instruction class
llvm-svn: 8405
2003-09-08 18:54:09 +00:00
Chris Lattner 693afb9ffc Add new unwind instruction. Happily there was a slot leftover from when the
'not' instruction was removed long ago

llvm-svn: 8404
2003-09-08 18:54:01 +00:00
Chris Lattner 12d456ccfc Add info about volatile loads/stores
llvm-svn: 8403
2003-09-08 18:27:49 +00:00
Chris Lattner 8b1680eadb Parse volatile loads/stores
llvm-svn: 8402
2003-09-08 18:20:29 +00:00
Chris Lattner a9083c961e Read volatile loads/stores
llvm-svn: 8401
2003-09-08 18:20:14 +00:00
Chris Lattner 6052fe375c Remove a bunch of unneeded stuph
llvm-svn: 8400
2003-09-08 18:19:58 +00:00
Chris Lattner 01a8391236 Do not hoist volatile loads
llvm-svn: 8399
2003-09-08 18:17:14 +00:00
Chris Lattner c4e76944d7 Fix bug: RLE-Preserve-Volatile.ll
Volatile loads and stores must not be value numbered

llvm-svn: 8398
2003-09-08 18:13:58 +00:00
Chris Lattner ff610c47be syntax highlightify
llvm-svn: 8397
2003-09-08 18:08:11 +00:00
Chris Lattner 53d5dd7a16 Syntax hilight
llvm-svn: 8396
2003-09-08 18:07:57 +00:00
Chris Lattner 53bd0b24f2 Remove a gross hack that was there to support bytecode files that are over a year old.
If you still have these suckers laying around, you have GOT to rebuild them.  geeze.

llvm-svn: 8395
2003-09-08 18:04:16 +00:00
Chris Lattner 8e8593a2c4 Add support for writing volatile load/stores
llvm-svn: 8394
2003-09-08 17:58:37 +00:00
Chris Lattner 504f9242c3 Add support for volatile loads/stores
llvm-svn: 8393
2003-09-08 17:45:59 +00:00
Chris Lattner 6c0497da74 Fix grammar-o
llvm-svn: 8392
2003-09-08 17:45:18 +00:00
Chris Lattner fbb62539dc New testcase
llvm-svn: 8391
2003-09-08 17:43:36 +00:00
Chris Lattner 3c050b5632 Fix old style test
llvm-svn: 8390
2003-09-08 16:29:02 +00:00
Vikram S. Adve 3b82d389b6 Fix syntax error when makellvm is run in an invalid directory.
Add debugging support.

llvm-svn: 8389
2003-09-08 15:32:47 +00:00
Misha Brukman 730e047678 Spell `occurrence' correctly.
llvm-svn: 8388
2003-09-08 03:08:43 +00:00
Misha Brukman 69631185a0 Fixed spelling of `intentionally'.
llvm-svn: 8387
2003-09-07 20:12:52 +00:00
Chris Lattner 54e3d71d8e Remove unneeded #include
llvm-svn: 8386
2003-09-07 05:09:32 +00:00
John Criswell de455b46d5 Checkin of autoconf-style object root.
Updated Makefile for new autoconf-style object root.

llvm-svn: 8385
2003-09-06 15:20:15 +00:00
John Criswell 3bac9bcaa8 Checkin of autoconf-style object root.
Copies Makefiles into the new object root directory from the source directory.
Removed the --with-objroot option.

llvm-svn: 8384
2003-09-06 15:17:13 +00:00
John Criswell b91e956977 Checkin of autoconf-style object root.
Updated TestRunner tests so that they work correctly in a separate object root
directory.

llvm-svn: 8383
2003-09-06 15:15:04 +00:00
John Criswell e75273471c Checkin of autoconf-style object root.
Use QMTest for the feature and Regression tests.
Continue using the Makefile system for the Programs tests.
Adjusted the Makefile rules to handle building outside the source directory.

llvm-svn: 8381
2003-09-06 15:12:21 +00:00
John Criswell bc4511c074 Checkin of autoconf-style object root.
Modified Makefiles to use the new Makefile setup in LLVM.

llvm-svn: 8380
2003-09-06 15:03:24 +00:00
John Criswell 0d1a26ddc2 Checkin of autoconf-style object root.
Adjusted Makefile to work with new autoconf-style object root.
Specifically, use the new -I option of tblgen to find include files.

llvm-svn: 8379
2003-09-06 14:50:22 +00:00
John Criswell 2970d520a1 Checkin of autoconf-style object root.
Added the AC_CONFIG_MAKEFILE macro to configure akefiles which don't need .in
templates.
Removed the --with-objroot option.
Added commands to configure.ac to configure all of the LLVM Makefiles.  Oof.

llvm-svn: 8378
2003-09-06 14:46:19 +00:00
John Criswell 0a6e6aafcd Checkin of autoconf-style object root.
Moved Makefile.common to Makefile.rules.  This makes project Makefiles easier
to support, and allows for easier overriding of default configuration values
that used to be in Makefile.common.
Modified Makefile.config.in to determine paths for directories (like
LLVM_SRC_ROOT) and to use the pwd binary as opposed to the shell builtin (this
works better for symbolic links).

llvm-svn: 8377
2003-09-06 14:44:17 +00:00
Misha Brukman c1ac706afb Added some optimizations:
* Generate a single BA instead of 6-instruction JUMP if possible
  (this occurs both in the creation and overwriting of the stub code)
* If possible, rewrite the ORIGINAL call to call the generated function
  directly, thus bypassing the stub entirely

Also added some statistics on how often calls are overwritten and how often the
CompilationCallback is invoked.

llvm-svn: 8376
2003-09-05 22:59:31 +00:00
Chris Lattner ad48131254 Reorder #includes to follow LLVM conventions
llvm-svn: 8375
2003-09-05 20:08:15 +00:00
Brian Gaeke aa082337b7 No longer used
llvm-svn: 8374
2003-09-05 19:43:45 +00:00
Brian Gaeke 6181cac0dc Correct comments
Don't include InstLoops.h
Don't export factory functions for these passes

llvm-svn: 8373
2003-09-05 19:43:19 +00:00
Brian Gaeke e99ca44153 Interpreter, JIT moved to lib/ExecutionEngine (includes -> llvm/ExecutionEngine)
Build lli using executionengine library

llvm-svn: 8372
2003-09-05 19:42:34 +00:00
Brian Gaeke 80343a5c9b Add ExecutionEngine directory.
llvm-svn: 8371
2003-09-05 19:39:49 +00:00
Brian Gaeke f3a300d578 ExecutionEngine.h, GenericValue.h --> include/llvm/ExecutionEngine/
Build ExecutionEngine as library.

llvm-svn: 8370
2003-09-05 19:39:22 +00:00
Brian Gaeke 28f8e41203 -abort-on-exception is gone. Rebuild your gccld shell scripts, folks! :-)
llvm-svn: 8368
2003-09-05 19:23:03 +00:00
Brian Gaeke 9b518bc0be Make getOperandValue and executeCastOperation methods of Interpreter.
This lets us protect a few more ExecutionEngine methods.

llvm-svn: 8367
2003-09-05 18:55:03 +00:00
Brian Gaeke a7669038fc Make CreateArgv part of lli rather than part of ExecutionEngine.
Switch Interpreter and JIT's "run" methods to take a Function and a vector of
 GenericValues.
Move (almost all of) the stuff that constructs a canonical call to main()
 into lli (new methods "callAsMain", "makeStringVector").
Nuke getCurrentExecutablePath(), enableTracing(), getCurrentFunction(),
 isStopped(), and many dead decls from interpreter.
Add linux strdup() support to interpreter.
Make interpreter's atexit handler runner and JIT's runAtExitHandlers() look
 more alike, in preparation for refactoring.
atexit() is spelled "atexit", not "at_exit".

llvm-svn: 8366
2003-09-05 18:42:01 +00:00
Chris Lattner 15ad3f07db Fix reading of invoke instrs
llvm-svn: 8365
2003-09-05 18:25:29 +00:00
Brian Gaeke 520ab9ffec Zap some more unused static method decls
llvm-svn: 8364
2003-09-05 06:10:50 +00:00
Chris Lattner 7f8d98776f Whoa, we were misreading invoke instructions "normal" destinations quite badly.
llvm-svn: 8363
2003-09-05 05:27:58 +00:00
Brian Gaeke 33d98aebe7 Remove printOperandInfo(), and simplify run().
llvm-svn: 8362
2003-09-05 05:22:08 +00:00
Chris Lattner 20b98d2c93 Add asserts, move code around. This gets the dropAllTypeUses partially implemented
llvm-svn: 8361
2003-09-05 05:10:04 +00:00
Brian Gaeke ed9917b3f8 Remove support for printing values from a module by name, only used
w/ interactive keyboard entry of names.
With that, Support.cpp is history.

llvm-svn: 8360
2003-09-05 05:04:32 +00:00
Brian Gaeke 8421765778 Remove support for interactive (step finish next) instructions.
Remove printCurrentInstruction, printStackFrame and infoValue
 (only used interactively) and other unused methods of Interpreter.
Fold UserInput.cpp containing only callMainFunction() into Interpreter.cpp.
Remove unused Profile flag.

llvm-svn: 8359
2003-09-05 04:46:26 +00:00
Chris Lattner d15598bfe0 Move functionality preserving changes.
Inline containsEquivalent
Remove some //'s

llvm-svn: 8358
2003-09-05 02:39:52 +00:00
Chris Lattner 5ac07d2221 Refactor what has effectively become copy-and-pasted code
llvm-svn: 8357
2003-09-05 02:30:47 +00:00
Chris Lattner 8a75d6619b Get friendly
llvm-svn: 8356
2003-09-05 02:30:18 +00:00
Chris Lattner 3f695ff02e Check in a bunch of minor fixes, plus a whole lot of #if 0'd out code, which will hopefully be enabled in the near future
This does not make any functionality changes

llvm-svn: 8355
2003-09-05 02:21:39 +00:00
Chris Lattner 77ee82d9dc Reshuffling of APIs
llvm-svn: 8354
2003-09-05 02:15:36 +00:00
Chris Lattner e4fdce4235 containsEquivalent never returns its argument
llvm-svn: 8353
2003-09-04 23:49:53 +00:00
Chris Lattner b4520603a4 Non-functional change
llvm-svn: 8352
2003-09-04 23:47:07 +00:00
Chris Lattner cd27235b23 Remove needless usage of getDescription()
llvm-svn: 8351
2003-09-04 23:46:03 +00:00
Chris Lattner 59be7695ef Inline method
llvm-svn: 8350
2003-09-04 23:43:40 +00:00
Chris Lattner c3c842976b Remove method
llvm-svn: 8349
2003-09-04 23:43:35 +00:00
Chris Lattner b8b10b5c54 Don't try to be sneaky, breaking recursive types in the process
llvm-svn: 8348
2003-09-04 23:41:03 +00:00
Chris Lattner 50745187ef This is now unnecessary
llvm-svn: 8347
2003-09-04 23:38:22 +00:00
Brian Gaeke 411281cc82 Remove support for breakpoints (not used).
Remove some dead code and whitespace.

llvm-svn: 8346
2003-09-04 23:15:40 +00:00
Brian Gaeke 92f8b30d24 Move EE dtor where it belongs
llvm-svn: 8345
2003-09-04 22:57:27 +00:00
Brian Gaeke e80e5ba7f8 Interpreter cleanups:
Get rid of support for DebugMode (make it always off).
Mung some comments.
Get rid of interpreter's PROFILE_STRUCTURE_FIELDS and PerformExitStuff
 which have been disabled forever.
Get rid of -abort-on-exception (make it always on).
Get rid of user interaction stuff (debug mode innards).
Simplify Interpreter's callMainFunction().

llvm-svn: 8344
2003-09-04 22:21:24 +00:00
Brian Gaeke 4bd3bd5b5a ExecutionEngine.cpp: Move execution engine creation stuff into a new
static method here.
 Remove some extra blank lines.
ExecutionEngine.h: Add its prototype.
lli.cpp: Call it.

Make creation method for each type of EE into a static method of its
own subclass.

Interpreter/Interpreter.cpp: ExecutionEngine::createInterpreter -->
 Interpreter::create
Interpreter/Interpreter.h: Likewise.
JIT/JIT.cpp: ExecutionEngine::createJIT --> VM::create
JIT/VM.h: Likewise.

llvm-svn: 8343
2003-09-03 20:34:19 +00:00
Chris Lattner 54d85e389f Avoid printing meaningless numbers
llvm-svn: 8342
2003-09-03 20:25:27 +00:00
Chris Lattner 13651f0c46 Fix bug where we couldn't print a function without a name
llvm-svn: 8341
2003-09-03 17:56:43 +00:00
Chris Lattner 53db94da05 Follow the pattern of all other atu's
llvm-svn: 8340
2003-09-03 16:01:54 +00:00
Chris Lattner b89d2afab1 No need to rescan types when they are created.
llvm-svn: 8339
2003-09-03 14:44:53 +00:00
Chris Lattner 9231e48de8 Final cleanups, document is good to go
llvm-svn: 8338
2003-09-03 04:20:13 +00:00
Chris Lattner 5ed6061b22 Add a WHOLE lot of updates clarifications and fixes. This is not done but getting closer. I changed the docs to reflect the goal of making unwind an instruction, not an intrinsic.
llvm-svn: 8337
2003-09-03 00:41:47 +00:00
Chris Lattner b5b54d6393 hyphenation police visited here
llvm-svn: 8336
2003-09-02 23:38:41 +00:00
Chris Lattner cc61a136f7 Another small speedup, this one to: 2.42s
llvm-svn: 8335
2003-09-02 22:52:49 +00:00
Chris Lattner 188afa5feb Don't return bogus references, and don't add an entry to the Concrete map
unless it's not empty!

llvm-svn: 8334
2003-09-02 22:50:02 +00:00
Chris Lattner 39e5095c8e Another optimization, speed up the testcase to 2.7s
llvm-svn: 8333
2003-09-02 22:15:15 +00:00
Chris Lattner 835499277b Removal of explicit stack, which requires the method to be a member (so it can
call setAbstract).  Now that we just compute abstractness we can also return
the computed value by value instead of as an argument.

llvm-svn: 8332
2003-09-02 21:56:34 +00:00
Chris Lattner 7f3a821f44 New method
llvm-svn: 8331
2003-09-02 21:54:56 +00:00
Chris Lattner 9a61bbf1d3 Remove the "recursive bit", not only is it unused by anyone, it was also
not correctly calculated, and calculating it wrong for fun seems rather
pointless.  This also speeds up my favorite testcase by .25 seconds.

llvm-svn: 8330
2003-09-02 21:41:05 +00:00
Chris Lattner 81c1a878ed Remove the "recursive bit", not only is it unused by anyone, it was also
not correctly calculated, and calculating it wrong for fun seems rather
pointless.

llvm-svn: 8329
2003-09-02 21:40:33 +00:00
John Criswell a3ce8b48b0 Added code that makes the bytecode file readable (needed by the generated shell
script).
Removed the use of sys/types.h and sys/stat.h.
Modified FileExists() so that it uses the access() system call to check for
file existance.  This requires less header files and might even be a tad bit
faster.

llvm-svn: 8328
2003-09-02 21:11:22 +00:00
John Criswell b83a22bd82 Added the MakeFileReadable() method.
llvm-svn: 8327
2003-09-02 21:09:30 +00:00
John Criswell 44375ca7d6 Added a description of the algorithm.
Return failure if the chmod() fails.

llvm-svn: 8326
2003-09-02 20:30:16 +00:00
John Criswell 06327da723 Modified the code so that it uses the MakeFileExecutable() method. The new
library code now adds all execute bits that are allowed by the umask value to
the file's current permission bits.

llvm-svn: 8325
2003-09-02 20:17:20 +00:00
John Criswell 5357283c7a Added the MakeFileExecutable() method. This method takes a filename and
gives it execute access while respecting the user's umask.

llvm-svn: 8324
2003-09-02 20:14:57 +00:00
Chris Lattner ce35f14050 Don't bother doing an exhaustive recursive walk if we are at the limit of what
we need to know anyway.  This reduces the 2002-07-08-HugePerformanceProblem.llx
down to 3.210u:0.010s, which is back in the acceptable range again

llvm-svn: 8323
2003-09-02 20:06:29 +00:00
Chris Lattner 99b9ddead7 Ugh, fix bugs. Ok, so the last fix wasn't as great as I thought it was.
Now we're back to: 131.730u, 0.330s, which is still quite an improvement,
but still quite unacceptable

llvm-svn: 8322
2003-09-02 19:14:12 +00:00
Chris Lattner 2a36482e74 Further simplifications
llvm-svn: 8321
2003-09-02 16:46:41 +00:00
Chris Lattner e0703ff161 Change the code to no longer compute the "type description" immediately when
the type is analyzed.  Instead, only compute it when requested (with
getDescription), and cached for reuse later.

This dramatically speeds up LLVM in general because these descriptions almost
_never_ need to be constructed.  The only time they are used is when a type is
<<'d.  Printing of modules by themselves uses other code to print symbolic
types when possible, so these descriptions are really only used for debugging.

Also, this fixes the particularly bad case when lots of types get resolved to
each other, such as during linking of large programs.  In these cases, the type
descriptions would be repeatedly recomputed and discarded even though: A. noone
reads the description before it gets resolved, and B. many many resolutions
happen at intermediate steps, causing a HUGE waste of time.

Overall, this makes the getTypeDesc function much more light-weight, and fixes
bug: Assembler/2002-07-08-HugePerformanceProblem.llx, which went from taking
1048.770u/19.150s (which is 17.5 MINUTES, on apoc), to taking 0.020u/0.000s,
which is a nice little speedup.  :)

llvm-svn: 8320
2003-09-02 16:35:17 +00:00
Chris Lattner bb1237a1fa The description is no longer stored directly in the type.
llvm-svn: 8319
2003-09-02 16:28:03 +00:00
Brian Gaeke e248195b22 Remove assertion which is never reached.
llvm-svn: 8318
2003-09-02 06:45:34 +00:00
Chris Lattner 4f9c82c723 Dead header file
llvm-svn: 8317
2003-09-01 20:46:08 +00:00