1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 21:42:54 +02:00
Commit Graph

4426 Commits

Author SHA1 Message Date
Chris Lattner
d950f19834 Do not use BasicBlock::succ_iterator
llvm-svn: 8700
2003-09-24 22:03:22 +00:00
Brian Gaeke
8b15e271a5 Update head-of-file comment.
llvm-svn: 8699
2003-09-24 18:16:23 +00:00
Brian Gaeke
1c9978c999 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
dee6b30348 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
9ef4c789e3 Remove some unused methods of class IGNode.
llvm-svn: 8696
2003-09-24 04:29:52 +00:00
John Criswell
92b65ebb52 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
cdf12dfd03 Fix bug: IndVarsSimplify/2003-09-23-NotAtTop.ll
llvm-svn: 8689
2003-09-23 20:26:48 +00:00
Misha Brukman
6d1b1553c1 Fixed spelling.
llvm-svn: 8687
2003-09-23 17:28:11 +00:00
Misha Brukman
c52311be4f Fix spelling.
llvm-svn: 8686
2003-09-23 17:27:28 +00:00
Misha Brukman
12fd3ebd72 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
055804accd 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
fbb96c627b * 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
Chris Lattner
afea820122 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
63749f4126 * 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
e05ffcca52 Removed no longer used member variable.
llvm-svn: 8677
2003-09-22 23:58:08 +00:00
Misha Brukman
643183413a Uppercase the acronym ASCII.
llvm-svn: 8676
2003-09-22 23:50:25 +00:00
Misha Brukman
c68b0950aa Added file header comment.
llvm-svn: 8675
2003-09-22 23:44:46 +00:00
Misha Brukman
78cf1f07b6 * 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
b98aa0e0fb Update file header for renamed file
llvm-svn: 8673
2003-09-22 23:42:00 +00:00
Misha Brukman
41f2a38c92 * 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
Chris Lattner
253c5f582e Fix bugs in the last change
llvm-svn: 8667
2003-09-22 23:30:59 +00:00
Chris Lattner
7ff5b8a024 Fix bug: Inline/2003-09-22-PHINodesInNormalInvokeDest.ll
llvm-svn: 8666
2003-09-22 22:35:39 +00:00
Chris Lattner
2cb1e9f0a6 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
Misha Brukman
db8303670b Credits now go into the top-level CREDITS.TXT
llvm-svn: 8662
2003-09-22 21:57:56 +00:00
Misha Brukman
94a0f2edf0 Credits are now in top-level CREDITS.TXT
llvm-svn: 8661
2003-09-22 21:57:15 +00:00
Chris Lattner
68f6d33416 Squelch warning
llvm-svn: 8659
2003-09-22 20:33:34 +00:00
Vikram S. Adve
be3b73177f Fix assertion so it doesn't not trip incorrectly.
llvm-svn: 8650
2003-09-21 07:55:27 +00:00
Brian Gaeke
1fdcd32b79 Use C++ math header instead of C version.
llvm-svn: 8648
2003-09-21 03:57:37 +00:00
Brian Gaeke
4013dbc6b0 Erase now-unused prototypes.
llvm-svn: 8647
2003-09-21 02:51:00 +00:00
Brian Gaeke
0478925a82 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
605ed35234 Standardize the names of include guards.
llvm-svn: 8645
2003-09-21 02:31:37 +00:00
Brian Gaeke
84114e1b72 Standardize the names of include guards.
Remove more excess whitespace.

llvm-svn: 8644
2003-09-21 02:31:25 +00:00
Brian Gaeke
92f4b04f66 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
4f86f6e887 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
6dc46fce5a 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
883cc51630 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
681a690f26 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
a85a2f8d86 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
c2e75f110a Make sure to add global variable initializers to the Globals graph!
llvm-svn: 8636
2003-09-20 21:48:16 +00:00
Chris Lattner
a721b89e37 Don't consider incomplete nodes to be typesafe!
llvm-svn: 8635
2003-09-20 21:48:01 +00:00
Chris Lattner
f203e908e3 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
b6aad9cad0 Global variables with APPENDING linkage are very important to keep around!
llvm-svn: 8632
2003-09-20 19:00:50 +00:00
Chris Lattner
372fe6873d Add special case handling for calloc and realloc
llvm-svn: 8630
2003-09-20 16:50:46 +00:00
Chris Lattner
b12a8a6177 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
6a460d88d3 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
d4de2760aa Rename Function::getEntryNode -> getEntryBlock
llvm-svn: 8625
2003-09-20 14:39:18 +00:00
Chris Lattner
fabd2617fc Minor cleanups, no functional changes
Rename Function::getEntryNode -> getEntryBlock

llvm-svn: 8623
2003-09-20 14:36:23 +00:00
Chris Lattner
7bf15fccb9 Fix a really obvious huge gaping bug, add a comment
llvm-svn: 8620
2003-09-20 05:24:00 +00:00
Chris Lattner
bf7dd80e7c Expose the TCE pass
llvm-svn: 8619
2003-09-20 05:14:13 +00:00
Chris Lattner
70c9cbd5c6 New transformation: tail recursion elimination
llvm-svn: 8618
2003-09-20 05:03:31 +00:00
Chris Lattner
aaf3999fba Fix bug: BasicAA/2003-09-19-LocalArgument.ll
llvm-svn: 8615
2003-09-20 03:08:47 +00:00
Chris Lattner
448df1c145 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
Chris Lattner
92030f5a29 Reject "llvm." as a function name
llvm-svn: 8608
2003-09-19 19:31:41 +00:00
Chris Lattner
ef92d8eebb Implement InstCombine/and.ll:test(15|16)
llvm-svn: 8607
2003-09-19 19:05:02 +00:00
Chris Lattner
b8d0545d27 pull a large nested conditional out into its own function
llvm-svn: 8605
2003-09-19 17:17:26 +00:00
Chris Lattner
219dd8b23d Implement InstCombine/add.ll:test(15|16)
llvm-svn: 8604
2003-09-19 15:35:42 +00:00
Brian Gaeke
180144d19e 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
425a189248 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
b22c819f96 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
bbbb03f96a 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
Misha Brukman
7d55b875eb Minimal implementation of the abstract ModuleProvider interface.
llvm-svn: 8594
2003-09-18 16:17:06 +00:00
Misha Brukman
9708959677 Fixed spelling.
llvm-svn: 8588
2003-09-17 21:34:23 +00:00
John Criswell
e1ccc5a286 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
Chris Lattner
a54026a27b 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
4d934ceefa 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
3df1f4b6a5 Change the semancics of the dropallrefs method
llvm-svn: 8572
2003-09-17 04:58:59 +00:00
Chris Lattner
13c224fd17 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
8502d4f3f8 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
b121c72006 Add missing apostrophe. It's been bugging me for years.
No really, years.

llvm-svn: 8566
2003-09-16 18:00:35 +00:00
Brian Gaeke
d0729bd289 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
Brian Gaeke
5ef624ead8 Edit comment for accuracy
llvm-svn: 8562
2003-09-16 15:36:50 +00:00
Misha Brukman
ed4039f715 Fixed spelling & grammar.
llvm-svn: 8559
2003-09-16 15:31:46 +00:00
Vikram S. Adve
e92c22c656 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
724b2d6f36 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
Chris Lattner
584ade803f Fix problems with programs that prototype printf to something unusual
llvm-svn: 8538
2003-09-15 16:47:12 +00:00
Chris Lattner
362afdca3f 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
d7bc2c066d Fix typos in comments.
llvm-svn: 8523
2003-09-15 05:28:42 +00:00
Chris Lattner
c66f223e5a 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
f3cac3df12 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
98d4e5dffc These two conditions are not exclusive!!
llvm-svn: 8518
2003-09-15 04:35:16 +00:00
Chris Lattner
f3c318737f Make the print output more useful
llvm-svn: 8517
2003-09-15 04:29:37 +00:00
Chris Lattner
6075013b55 Fix bug: PruneEH/2003-09-14-ExternalCall.llx
llvm-svn: 8516
2003-09-15 02:22:50 +00:00
Chris Lattner
7a55e0b56d Fix bug: Inline/2003-09-14-InlineValue.ll
llvm-svn: 8514
2003-09-15 02:10:16 +00:00
Chris Lattner
64791df910 Fix a spello Misha made while fixing one of my appostrifications
llvm-svn: 8510
2003-09-15 00:33:20 +00:00
Chris Lattner
3a26b0d3be Make sure to cannonicalize loops before running indvar simplify
llvm-svn: 8502
2003-09-12 16:45:01 +00:00
Chris Lattner
f277240919 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
Chris Lattner
b12390cc41 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
629711a7c3 Fixed spelling and grammar.
llvm-svn: 8489
2003-09-11 22:34:13 +00:00
Chris Lattner
9036a399f1 Simplify code
Implement InstCombine/mul.ll:test9

llvm-svn: 8488
2003-09-11 22:24:54 +00:00
Misha Brukman
b9a4ddbfc5 Fixed spelling and grammar.
llvm-svn: 8478
2003-09-11 18:14:24 +00:00
Misha Brukman
ddbf126a18 Apostrophes are only used for possession and quoting.
llvm-svn: 8473
2003-09-11 16:58:31 +00:00
Chris Lattner
8a901c4d27 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
3d39abeeb7 Renamed DominatorTree::Node::getNode() -> getBlock()
llvm-svn: 8469
2003-09-11 16:26:13 +00:00
Misha Brukman
d8279c4406 Spell `definite' correctly.
llvm-svn: 8467
2003-09-11 15:32:37 +00:00
Misha Brukman
6c4ffae6a5 Spell `definitely' correctly.
llvm-svn: 8466
2003-09-11 15:31:17 +00:00
Misha Brukman
262290ec19 * 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
b859bf2fb5 Unwind instructions are intrinsically alive, just like returns
llvm-svn: 8462
2003-09-10 20:38:14 +00:00
Chris Lattner
ebf6d5c622 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
9d9fd138dc 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
0d124f6067 Update for new UnifyFunction... API
Remove using decl

llvm-svn: 8458
2003-09-10 20:35:33 +00:00
Chris Lattner
3e9d3081fc Remove #include
llvm-svn: 8457
2003-09-10 20:35:21 +00:00
Chris Lattner
ee577bdc08 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
f6bd477804 Remove a bunch of warnings from the CBE generated C code
llvm-svn: 8455
2003-09-10 20:12:09 +00:00
Chris Lattner
49d7564882 "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
5468c196f3 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
f9db4af8bf Only emit inter-field-padding if the amount of padding is != 0
llvm-svn: 8452
2003-09-10 19:52:24 +00:00
Brian Gaeke
7eaecc239a Make createVerifierPass return a FunctionPass *.
llvm-svn: 8449
2003-09-10 19:37:04 +00:00
Chris Lattner
e5b90f633d Remove using declarations
llvm-svn: 8442
2003-09-10 16:08:03 +00:00
Misha Brukman
286f1a0fe8 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
f4be611b55 another trivial cleanup
llvm-svn: 8435
2003-09-10 14:55:05 +00:00
Chris Lattner
37123e1b58 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
29a0f79c05 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
58d4183a25 Fix spell-o's
llvm-svn: 8431
2003-09-10 05:29:43 +00:00
Chris Lattner
df4ad7b311 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
620f051422 Spelling fixes
llvm-svn: 8429
2003-09-10 05:24:09 +00:00
Chris Lattner
501ec018c7 Fix up file header
llvm-svn: 8428
2003-09-10 05:10:34 +00:00
Chris Lattner
5d113e557d clean up file header comment
llvm-svn: 8427
2003-09-10 05:08:19 +00:00
Chris Lattner
f0c30718e2 Simplify some code
llvm-svn: 8426
2003-09-10 04:49:10 +00:00
Misha Brukman
cac883668e Spell `occurrence' correctly.
llvm-svn: 8425
2003-09-09 21:54:45 +00:00
John Criswell
e783801878 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
6b94d6a603 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
0641f1fad7 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
e35b8fabc4 * 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
Chris Lattner
d44cb48b44 Oops, look at the VOLATILE marker, not the opcode
llvm-svn: 8413
2003-09-08 20:29:46 +00:00
Chris Lattner
e8ae7bf114 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
d75fa85cc1 Fix bug
llvm-svn: 8410
2003-09-08 19:43:46 +00:00
Chris Lattner
5f9de6e523 Should invokify is always true
llvm-svn: 8409
2003-09-08 19:00:30 +00:00
Chris Lattner
4ad8720f91 Add support for the unwind instruction
llvm-svn: 8408
2003-09-08 18:54:55 +00:00
Chris Lattner
c3c2809235 Add support for unwind
llvm-svn: 8407
2003-09-08 18:54:36 +00:00
Chris Lattner
56bbe63aa3 Parse volatile loads/stores
llvm-svn: 8402
2003-09-08 18:20:29 +00:00
Chris Lattner
049cadf854 Read volatile loads/stores
llvm-svn: 8401
2003-09-08 18:20:14 +00:00
Chris Lattner
978ba8d937 Remove a bunch of unneeded stuph
llvm-svn: 8400
2003-09-08 18:19:58 +00:00
Chris Lattner
03b8e81aef Do not hoist volatile loads
llvm-svn: 8399
2003-09-08 18:17:14 +00:00
Chris Lattner
f3505abe43 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
cd6bbd3823 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
bc7004d26a Add support for writing volatile load/stores
llvm-svn: 8394
2003-09-08 17:58:37 +00:00
Chris Lattner
2916eafa42 Add support for volatile loads/stores
llvm-svn: 8393
2003-09-08 17:45:59 +00:00
Misha Brukman
993b605832 Spell `occurrence' correctly.
llvm-svn: 8388
2003-09-08 03:08:43 +00:00
John Criswell
bd1d21a0b4 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
Misha Brukman
a17b761043 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
6c68b828f6 Reorder #includes to follow LLVM conventions
llvm-svn: 8375
2003-09-05 20:08:15 +00:00
Brian Gaeke
5d6ee8cf02 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
6fe4d97bf6 Add ExecutionEngine directory.
llvm-svn: 8371
2003-09-05 19:39:49 +00:00
Brian Gaeke
ba6d0a6759 ExecutionEngine.h, GenericValue.h --> include/llvm/ExecutionEngine/
Build ExecutionEngine as library.

llvm-svn: 8370
2003-09-05 19:39:22 +00:00
Brian Gaeke
8e1bb0bcb2 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
e157a77485 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
a70297a209 Fix reading of invoke instrs
llvm-svn: 8365
2003-09-05 18:25:29 +00:00
Chris Lattner
1bb427b0a7 Whoa, we were misreading invoke instructions "normal" destinations quite badly.
llvm-svn: 8363
2003-09-05 05:27:58 +00:00
Brian Gaeke
7be0ff04e5 Remove printOperandInfo(), and simplify run().
llvm-svn: 8362
2003-09-05 05:22:08 +00:00
Chris Lattner
67dfb06d9c Add asserts, move code around. This gets the dropAllTypeUses partially implemented
llvm-svn: 8361
2003-09-05 05:10:04 +00:00
Brian Gaeke
b42a2de8a9 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
edded6bce7 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
71ed17fe2e Move functionality preserving changes.
Inline containsEquivalent
Remove some //'s

llvm-svn: 8358
2003-09-05 02:39:52 +00:00
Chris Lattner
6a4cb9b0e9 Refactor what has effectively become copy-and-pasted code
llvm-svn: 8357
2003-09-05 02:30:47 +00:00
Chris Lattner
d62bda202e 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
a0c99153e0 containsEquivalent never returns its argument
llvm-svn: 8353
2003-09-04 23:49:53 +00:00
Chris Lattner
4caa92eca5 Non-functional change
llvm-svn: 8352
2003-09-04 23:47:07 +00:00
Chris Lattner
652d585600 Remove needless usage of getDescription()
llvm-svn: 8351
2003-09-04 23:46:03 +00:00
Chris Lattner
706576a0cc Inline method
llvm-svn: 8350
2003-09-04 23:43:40 +00:00
Chris Lattner
3835c2fdd1 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
0382bf2e98 This is now unnecessary
llvm-svn: 8347
2003-09-04 23:38:22 +00:00
Brian Gaeke
5efbdb852a 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
0fdcd57402 Move EE dtor where it belongs
llvm-svn: 8345
2003-09-04 22:57:27 +00:00
Brian Gaeke
6d7d9f9cd9 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
cec978e0ed 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
0b78090518 Avoid printing meaningless numbers
llvm-svn: 8342
2003-09-03 20:25:27 +00:00
Chris Lattner
2fe8fac4e0 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
4e722bde53 Follow the pattern of all other atu's
llvm-svn: 8340
2003-09-03 16:01:54 +00:00
Chris Lattner
2c028515e6 No need to rescan types when they are created.
llvm-svn: 8339
2003-09-03 14:44:53 +00:00
Chris Lattner
4a96f4593e Another small speedup, this one to: 2.42s
llvm-svn: 8335
2003-09-02 22:52:49 +00:00
Chris Lattner
0cfd2b85b8 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
398d8a539c Another optimization, speed up the testcase to 2.7s
llvm-svn: 8333
2003-09-02 22:15:15 +00:00
Chris Lattner
e4adff8157 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
05eecdb7de 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
John Criswell
6927aeed1e Added the MakeFileReadable() method.
llvm-svn: 8327
2003-09-02 21:09:30 +00:00
John Criswell
5277b91d50 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
7b83fe6beb 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
590606e4c4 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
06d8aac065 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
fb0b83a27b Further simplifications
llvm-svn: 8321
2003-09-02 16:46:41 +00:00
Chris Lattner
dda7669997 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
Brian Gaeke
5a8d15dfa1 Remove assertion which is never reached.
llvm-svn: 8318
2003-09-02 06:45:34 +00:00
Chris Lattner
3fdc7bbd0d Prototype for creator function got moved
llvm-svn: 8315
2003-09-01 20:45:33 +00:00
Chris Lattner
3d53c382ba OptInfo is no longer required
llvm-svn: 8312
2003-09-01 20:41:07 +00:00
Chris Lattner
6d92264f5a No longer provide an optinfo, noone uses it
llvm-svn: 8311
2003-09-01 20:40:59 +00:00
Chris Lattner
2eb5de925f Inline simple comparison which is sparc specific anyway
llvm-svn: 8309
2003-09-01 20:38:03 +00:00
Chris Lattner
5520e4dc30 Don't build dead directories
llvm-svn: 8308
2003-09-01 20:34:15 +00:00
Chris Lattner
3d6b7d1b44 Move private interfaces into private .h file
llvm-svn: 8306
2003-09-01 20:33:07 +00:00
Chris Lattner
f2e4f5a388 Preselection is now integrated into the Sparc target library
llvm-svn: 8305
2003-09-01 20:30:17 +00:00
Chris Lattner
a685c382b1 Remove dead library makefile
llvm-svn: 8304
2003-09-01 20:29:43 +00:00
Chris Lattner
80c84d29b1 Remove makefile for dead library
llvm-svn: 8303
2003-09-01 20:26:52 +00:00
Chris Lattner
25669f3e09 Sparc peephole optimizer moved out of post-opts library into Sparc target library
llvm-svn: 8302
2003-09-01 20:26:14 +00:00
Chris Lattner
cd2980ec8c Simplify code a bit
llvm-svn: 8301
2003-09-01 20:24:06 +00:00
Chris Lattner
049f0b8b37 LiveRange.h is now in lib/CodeGen/RegAlloc
llvm-svn: 8299
2003-09-01 20:17:13 +00:00
Chris Lattner
e5a47a9d95 This file is hopelessly out of date
llvm-svn: 8298
2003-09-01 20:14:00 +00:00
Chris Lattner
74e93a318b LiveRangeInfo got moved into the lib/CodeGen/RegAlloc directory
llvm-svn: 8297
2003-09-01 20:12:17 +00:00
Chris Lattner
a591134169 PhyRegAlloc.h got moved to lib/CodeGen/RegAlloc
llvm-svn: 8296
2003-09-01 20:09:04 +00:00
Chris Lattner
e3fcb37a20 Move IGNode from public include directory to here. Minor cleanups like adding std:: namespace qualifiers
llvm-svn: 8295
2003-09-01 20:05:47 +00:00
Chris Lattner
8ebc13b6ca IGNode got moved to lib/CodeGen/RegAlloc
llvm-svn: 8294
2003-09-01 20:00:08 +00:00
Chris Lattner
ee413804c7 This file just needs LiveRange.h not IGNode.h
llvm-svn: 8293
2003-09-01 19:58:02 +00:00