Commit Graph

4350 Commits

Author SHA1 Message Date
Brian Gaeke 75ed4b8831 Fix typos in comments.
llvm-svn: 8523
2003-09-15 05:28:42 +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 7f89ea75e1 Fix bug: Inline/2003-09-14-InlineValue.ll
llvm-svn: 8514
2003-09-15 02:10:16 +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
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 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
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
Misha Brukman 329983228f Fixed spelling and grammar.
llvm-svn: 8478
2003-09-11 18:14:24 +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 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 bb9d03b9c0 Renamed DominatorTree::Node::getNode() -> getBlock()
llvm-svn: 8469
2003-09-11 16:26:13 +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
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 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
Brian Gaeke ff713ae819 Make createVerifierPass return a FunctionPass *.
llvm-svn: 8449
2003-09-10 19:37:04 +00:00
Chris Lattner 74d86a9c93 Remove using declarations
llvm-svn: 8442
2003-09-10 16:08:03 +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 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 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
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 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 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 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
Misha Brukman 730e047678 Spell `occurrence' correctly.
llvm-svn: 8388
2003-09-08 03:08:43 +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
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 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 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 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
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 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 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 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 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 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
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 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
Brian Gaeke e248195b22 Remove assertion which is never reached.
llvm-svn: 8318
2003-09-02 06:45:34 +00:00
Chris Lattner f1f7f2c477 Prototype for creator function got moved
llvm-svn: 8315
2003-09-01 20:45:33 +00:00
Chris Lattner d189277f32 OptInfo is no longer required
llvm-svn: 8312
2003-09-01 20:41:07 +00:00
Chris Lattner b49a8d7e01 No longer provide an optinfo, noone uses it
llvm-svn: 8311
2003-09-01 20:40:59 +00:00
Chris Lattner 825624e954 Inline simple comparison which is sparc specific anyway
llvm-svn: 8309
2003-09-01 20:38:03 +00:00
Chris Lattner 5718a6bf99 Don't build dead directories
llvm-svn: 8308
2003-09-01 20:34:15 +00:00
Chris Lattner 0792315409 Move private interfaces into private .h file
llvm-svn: 8306
2003-09-01 20:33:07 +00:00
Chris Lattner e722930efd Preselection is now integrated into the Sparc target library
llvm-svn: 8305
2003-09-01 20:30:17 +00:00
Chris Lattner c87312a858 Remove dead library makefile
llvm-svn: 8304
2003-09-01 20:29:43 +00:00
Chris Lattner a5b78c68d9 Remove makefile for dead library
llvm-svn: 8303
2003-09-01 20:26:52 +00:00
Chris Lattner c7f87d30ab 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 8a3d3d26a5 Simplify code a bit
llvm-svn: 8301
2003-09-01 20:24:06 +00:00
Chris Lattner eefb565449 LiveRange.h is now in lib/CodeGen/RegAlloc
llvm-svn: 8299
2003-09-01 20:17:13 +00:00
Chris Lattner 641ac3ad3b This file is hopelessly out of date
llvm-svn: 8298
2003-09-01 20:14:00 +00:00
Chris Lattner e80612a28e LiveRangeInfo got moved into the lib/CodeGen/RegAlloc directory
llvm-svn: 8297
2003-09-01 20:12:17 +00:00
Chris Lattner f1ab45bdf5 PhyRegAlloc.h got moved to lib/CodeGen/RegAlloc
llvm-svn: 8296
2003-09-01 20:09:04 +00:00
Chris Lattner 7127065f24 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 8c50571f12 IGNode got moved to lib/CodeGen/RegAlloc
llvm-svn: 8294
2003-09-01 20:00:08 +00:00
Chris Lattner 69382173e9 This file just needs LiveRange.h not IGNode.h
llvm-svn: 8293
2003-09-01 19:58:02 +00:00
Chris Lattner 3323829ecc No longer include IGNode.h in the Sparc global header
llvm-svn: 8292
2003-09-01 19:56:48 +00:00
Chris Lattner ffc2d16f21 Final cleanup: remove dead code
llvm-svn: 8291
2003-09-01 18:01:36 +00:00
Chris Lattner 267f20475b Not only is this a lot smaller, it actually works if there is already a
function with the right name in the module.

llvm-svn: 8290
2003-09-01 16:53:46 +00:00
Chris Lattner 5b8addab9b Dead files
llvm-svn: 8289
2003-09-01 16:49:57 +00:00
Chris Lattner d4a1af7d49 If "These should be used only by the auto-parallelization pass", we might as
well put them INTO the auto-par pass.

llvm-svn: 8288
2003-09-01 16:49:38 +00:00
Chris Lattner 685dc1ea98 Moved all of the cilkifier stuff into lib/Transforms/IPO, as it really is not
support stuff.

llvm-svn: 8287
2003-09-01 16:45:30 +00:00
Chris Lattner 6c6ba71cea Minor cleanups
Do not #include Parallelize.h, it's just a subset of Cilkifier.h

llvm-svn: 8285
2003-09-01 16:42:16 +00:00
Chris Lattner 667ded9bf8 Remove gross old hacky code that was in there for backwards compatibility
1 year is plenty of migration time!

llvm-svn: 8282
2003-09-01 16:31:28 +00:00
Chris Lattner 8ef1b88aef Change the RaiseAllocations pass to be a Pass instead of a BasicBlock pass.
This makes it more efficient: it doesn't have to scan the whole program, so
it performs work proportional to the number of malloc/free calls in the
program, not the size of the program.

llvm-svn: 8280
2003-09-01 03:14:56 +00:00
Chris Lattner 1c884e18e1 Fix bug: TailDuplicate/2003-08-31-UnreachableBlocks.ll
llvm-svn: 8276
2003-08-31 21:17:44 +00:00
Chris Lattner 6f5e18d696 Replace M with F when refering to functions
llvm-svn: 8274
2003-08-31 20:36:52 +00:00
Chris Lattner 78a5c1aa3c Rename TarjanSCCIterator -> scc_iterator
* Increases consistency with other iterators (e.g. df_iterator, po_iterator...)
  * It's shorter
  * We don't name classes by the implementation, we name it for the interface!

llvm-svn: 8273
2003-08-31 20:01:57 +00:00
Chris Lattner bb6fe251ea Don't explicitly use the SCC class
llvm-svn: 8271
2003-08-31 19:55:06 +00:00
Chris Lattner 6b9d3efb64 Remove dead var
llvm-svn: 8270
2003-08-31 19:54:57 +00:00
Chris Lattner 4336db8d1d The SCC::HasLoop method is now in the main iterator
llvm-svn: 8269
2003-08-31 19:51:38 +00:00
Chris Lattner a687f44559 Remove explicit passing of SCC's around as objects.
llvm-svn: 8267
2003-08-31 19:46:48 +00:00
Chris Lattner 028f248ba8 Move the getAnalysisUsage method from the header file
llvm-svn: 8264
2003-08-31 19:40:57 +00:00
Chris Lattner 7d1a871ede The tarjan iterator now returns a reference to the current SCC, not a possibly null pointer!
llvm-svn: 8262
2003-08-31 19:35:16 +00:00
Chris Lattner 2ee82ff48e Minor cleanups
Iterate from tarj_begin -> tarj_end, not from tarj_begin -> NULL

llvm-svn: 8260
2003-08-31 19:29:52 +00:00
Chris Lattner 2f120bbb95 Indent classes correctly in the namespace
move bodies out-of-line
Add getAnalysisUsage method for SFGSCC

llvm-svn: 8259
2003-08-31 19:27:11 +00:00
Chris Lattner c4caf3ad67 * Cleanups
* Iterate from tarj_begin -> tarj_end, not from tarj_begin -> NULL

llvm-svn: 8258
2003-08-31 19:23:41 +00:00
Chris Lattner d075cc282b Heavily refactor code:
* Separate the policy decisions into a derived class [InlineSimple]
  * Move the inlining mechanics into a base class [Inliner]
  * Change the inliner to be an SCCPass, making it more structured and
    eventually pipelinable with other SCC passes

llvm-svn: 8257
2003-08-31 19:10:30 +00:00
Chris Lattner 75444c751f Add accessor function
llvm-svn: 8253
2003-08-31 16:30:07 +00:00
Chris Lattner 0a3f8d5dcd Initial checkin of the -prune-eh pass, a very simple exception handling removal pass
llvm-svn: 8250
2003-08-31 02:47:32 +00:00
Chris Lattner f7e9594843 Initial checkin of the CallGraphSCCPass class
llvm-svn: 8247
2003-08-31 01:54:59 +00:00
Chris Lattner c817458b66 ScalarRepl does not modify the CFG. Say so!
llvm-svn: 8243
2003-08-31 00:45:13 +00:00
Chris Lattner 2887328770 Use new interface, simplifies code
llvm-svn: 8242
2003-08-31 00:22:27 +00:00
Chris Lattner 25bc3f86de Use the new interface, simplifies code
NOTE that these two files are _BUGGY_ and need to be fixed, just not by me  :)

llvm-svn: 8241
2003-08-31 00:21:59 +00:00
Chris Lattner ea27751e4b Use the new interface, simplifies code
Delete a bunch of commented out code

llvm-svn: 8240
2003-08-31 00:21:05 +00:00
Chris Lattner 8e6ac1bf10 Use the new interface, simplifies code
llvm-svn: 8239
2003-08-31 00:20:36 +00:00
Chris Lattner bd717d897f Implement new method
llvm-svn: 8238
2003-08-31 00:19:28 +00:00
Chris Lattner 5f9be67e07 There is no reason for this to be a pass!
llvm-svn: 8214
2003-08-29 14:43:17 +00:00
Chris Lattner a38adaa88f Fix bug: Linker/2003-08-28-TypeResolvesGlobal3.ll
Use new replaceAllUsesWith stuff in a way that works even though types have not yet been propagated

llvm-svn: 8210
2003-08-29 05:37:22 +00:00
Chris Lattner c27038d7b5 Implement "unsafe" replaceAllUsesWWith stuff for use during type resolution.
llvm-svn: 8209
2003-08-29 05:36:46 +00:00
Chris Lattner 6097d94295 Fix bug: Linker/2003-08-28-TypeResolvesGlobal2.ll
llvm-svn: 8206
2003-08-29 05:11:34 +00:00
Chris Lattner 9f15812e88 Refactor code to make it useful outside of Constants.cpp
llvm-svn: 8205
2003-08-29 05:09:37 +00:00
Chris Lattner ae77242011 Fix bug: Linker/2003-08-28-TypeResolvesGlobal.ll
llvm-svn: 8202
2003-08-29 04:49:54 +00:00
Misha Brukman 9770b83509 * Use alloca() to force GCC not to eliminate frame pointer
* Break apart saving and restoring registers into separate functions
* Instead of saving single and double FP registers, just save the double
  registers -- aliasing helps preserve the single FP registers as well.
* Request just as much memory for a stub as we actually use

llvm-svn: 8200
2003-08-29 04:22:54 +00:00
John Criswell a4b09fe071 Fixed two double free bugs that caused llc to segfault or run forever.
llvm-svn: 8191
2003-08-28 21:43:17 +00:00
Chris Lattner 147b66cd2b Add support for the llvm.unwind intrinsic, which we codegen to just do an abort
until we implement unwinding.
Add support for the invoke instruction, which codegens just like a call with
a branch after it.

The end effect of this change is that programs using the invoke instruction,
but never unwinding, will work fine.  Programs that unwind will abort until
we get unwind support.

llvm-svn: 8187
2003-08-28 21:23:43 +00:00
Chris Lattner cbd234f26b Fix really nasty bugs in the CWriter, handling invoke instructions. Tracking
these down was NOT phun.

llvm-svn: 8181
2003-08-28 19:56:10 +00:00
Tanya Lattner 190b7a86ba Removing README
llvm-svn: 8180
2003-08-28 17:17:59 +00:00
Tanya Lattner 7efb18f49c Putting my revised version of ModuloScheduling in cvs. This is not complete...
llvm-svn: 8179
2003-08-28 17:12:14 +00:00
Chris Lattner 66cc0141b0 Fix bug where we considered function types equivalent even if they had differing numbers of arguments
llvm-svn: 8178
2003-08-28 16:42:50 +00:00
Tanya Lattner 89860151b9 Moved index into BB to common graph class because its needed by ModuloSchedGraph.
llvm-svn: 8174
2003-08-28 15:30:40 +00:00
Tanya Lattner cf8851eb20 Added/removed header file
llvm-svn: 8160
2003-08-27 15:12:24 +00:00
Tanya Lattner 9af699b885 *** empty log message ***
llvm-svn: 8153
2003-08-27 02:42:58 +00:00
Chris Lattner df741d62de Fix bug: SCCP/2003-08-26-InvokeHandling.ll
llvm-svn: 8152
2003-08-27 01:08:35 +00:00
Tanya Lattner cc85d4544f First version of SchedGraph common class and refactoring of SchedGraph.
llvm-svn: 8148
2003-08-25 22:42:20 +00:00
Chris Lattner ea9891311a As it turns out, things will be simpler than I first expected. We no longer
need any exception handling intrinsics beyond llvm.unwind. (yaay)

llvm-svn: 8145
2003-08-25 22:35:01 +00:00
Chris Lattner be8d6816d0 Remove special casing
llvm-svn: 8144
2003-08-25 22:34:15 +00:00
Chris Lattner 9527fea3a1 Mangle ALL letters that we do not allow, not just a few.
llvm-svn: 8140
2003-08-24 21:08:38 +00:00
Chris Lattner c434e138ac Simplify code
llvm-svn: 8139
2003-08-24 21:00:22 +00:00
Chris Lattner 69cab0dd52 Consult the target data, not the module, about how large the current pointer
size is.  This ensures that if the module has no specified pointer size that
things will work correctly.

llvm-svn: 8136
2003-08-24 19:55:26 +00:00
Chris Lattner 4d4f424f0c Targets now configure themselves based on the source module, not on the
ad-hoc "Config" flags

llvm-svn: 8134
2003-08-24 19:50:53 +00:00
Chris Lattner 4fd144acc8 Targets should configure themselves based on a Module, not some wierd flags
llvm-svn: 8132
2003-08-24 19:49:48 +00:00
Chris Lattner 4f05103ad2 Fix bug: Linker/2003-08-23-GlobalVarLinking.ll
llvm-svn: 8130
2003-08-24 19:30:20 +00:00
Chris Lattner 3ba0f88a0a Implement: Linker/2003-08-24-InheritPtrSize.ll
llvm-svn: 8129
2003-08-24 19:26:42 +00:00
Chris Lattner 2a3b4e5bc7 Implement: Jello/test-constantexpr.ll
llvm-svn: 8127
2003-08-24 19:19:47 +00:00
Chris Lattner 3f5823f131 Implement SimplifyCFG/InvokeEliminate.ll
llvm-svn: 8126
2003-08-24 18:36:16 +00:00
Chris Lattner 479854091a Add preliminary support for "any" pointersize/endianness. This will need
to change soon though.

llvm-svn: 8123
2003-08-24 14:02:47 +00:00
Chris Lattner e34e200e16 Add support for 'any' pointer size and endianness
llvm-svn: 8120
2003-08-24 13:49:22 +00:00
Chris Lattner 8068e0cd17 Support new 'any' support for pointer size and endianness
llvm-svn: 8119
2003-08-24 13:48:48 +00:00
Chris Lattner 55a07adc36 Allow modules to have 'any' pointer size and endianness. Luckily, we had
some space for extra flags, so we don't need to bump the revision number.

llvm-svn: 8118
2003-08-24 13:47:36 +00:00
Chris Lattner 35829a154d Implement support for the unwind intrinsic in the CBE
llvm-svn: 8116
2003-08-24 13:06:10 +00:00
Chris Lattner 0f98032fd8 rethrow is really the language independent primitive here. "throw" can be written
in terms of it and llvm.exc.setcurrent.
Rework the intrinsics.

llvm-svn: 8111
2003-08-24 12:24:11 +00:00
Chris Lattner 7da3571af9 rethrow is really the language independent primitive here. "throw" can be written
in terms of it and llvm.exc.setcurrent.

Rework the intrinsics.

llvm-svn: 8110
2003-08-24 12:24:08 +00:00
Chris Lattner d367d0553e Inline invoke instructions as well as call instructions
llvm-svn: 8107
2003-08-24 06:59:28 +00:00
Chris Lattner 0cc265e6bf *** Implement inlining of Invoke instructions!
llvm-svn: 8106
2003-08-24 06:59:16 +00:00
Chris Lattner ca3e569269 Fix copy-and-paste-o
llvm-svn: 8104
2003-08-24 06:57:53 +00:00
Chris Lattner ade9410c99 Initial support for recognizing LLVM exception handling intrinsics
llvm-svn: 8102
2003-08-24 05:30:29 +00:00
Chris Lattner 9c5bfd0f80 Big diff for a small change: delete inlined functions if all callees have
inlined the function.
Implements: Inline/inline_dce.ll

llvm-svn: 8101
2003-08-24 05:03:14 +00:00
Chris Lattner fc3fe5cd75 Implement: Inline/cfg_preserve_test.ll
llvm-svn: 8099
2003-08-24 04:06:56 +00:00
Chris Lattner 6d5693566f Allow specifying the name for the newly split basic block
llvm-svn: 8097
2003-08-24 03:41:39 +00:00
Chris Lattner e6235443a5 Fix bug: Jello/2003-08-23-RegisterAllocatePhysReg.ll
llvm-svn: 8095
2003-08-23 23:49:42 +00:00
Chris Lattner c54d608377 Implement SimplifyCFG/2003-08-17-FoldSwitch.ll:test5
llvm-svn: 8093
2003-08-23 23:18:19 +00:00