Commit Graph

2458 Commits

Author SHA1 Message Date
Chris Lattner
6f8fd25697 Remove dead fixme
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4300 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-27 21:23:43 +00:00
Chris Lattner
c5291f5e0e Instruction select constant arguments correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4297 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-27 21:16:59 +00:00
Chris Lattner
65a78f28e3 Add instruction definitions for mov r, imm instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4296 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-27 21:16:44 +00:00
Chris Lattner
dc476b87d9 change ++ to +1 when using random access iterators
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4292 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-27 19:09:51 +00:00
Chris Lattner
9550dc2df2 Add #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4291 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-27 19:08:03 +00:00
Chris Lattner
683d5da9fb Fix a major bug in lli
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4289 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-26 01:57:15 +00:00
Chris Lattner
726140821f Initial checkin of X86 backend.
We can instruction select exactly one instruction 'ret void'.  Wow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4284 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-25 22:55:53 +00:00
Chris Lattner
a750de9bfb Build the X86 target as well
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4283 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-25 22:55:05 +00:00
Chris Lattner
78cee7e7ab Initial checkin of codegen infrastructure for LLVM-JIT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4282 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-25 22:54:41 +00:00
Chris Lattner
e2d053ad18 Prune #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4277 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-25 02:01:33 +00:00
Chris Lattner
232c3be0b5 Fix misspelling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4276 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-25 01:43:26 +00:00
Nick Hildenbrandt
3cecdc5b9a Malloc prototyping now works even if the original file had its own prototype for malloc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4271 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-23 18:59:40 +00:00
Chris Lattner
a0877726df Tell PassManager that this pass does not invalidate the CFG so that dominator
information and Loop info will not have to be recomputed after this runs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4269 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-23 03:30:47 +00:00
Chris Lattner
54b866b896 Minor cleanups
Make sure to have a pass name


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4268 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-23 01:12:01 +00:00
Chris Lattner
8cdc6b726a - Fix a really nasty bug in the bytecode reader that caused it to fail
reading bytecode files with > 255 types in them, but only when optimization
    is enabled.  This was caused by GCC shrinking an enum to a single byte
    instead of a whole word.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4266 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-23 00:51:54 +00:00
Chris Lattner
5dfab9ec22 Wow, for some reason, when reading bytecode from stdin, we were only reading
4 bytes at a time.  Change this to read blocks of 4k


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4265 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-22 23:55:24 +00:00
Chris Lattner
0ceeb42c97 Ensure definate initialization
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4263 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-22 23:34:11 +00:00
Chris Lattner
27a08935ca - Two minor improvements to the MachineInstr class to reduce footprint and
overhead: Merge 3 parallel vectors into 1, change regsUsed hash_set to be a
    bitvector.  Sped up LLC a little less than 10% in a debug build!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4261 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-22 23:16:21 +00:00
Chris Lattner
4bdb9b7ebe - Make sure to only keep track of mappings that the TD pass may need in the
future.  This prevents having spurious map entries to nodes that we really
    don't care about.  This allows us to reenable the DeadNodeElim, which was
    disabled.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4260 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-22 16:01:03 +00:00
Chris Lattner
9faf18d523 The callee is not correct, and confuses the TD pass. Null it out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4259 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-22 15:58:46 +00:00
Chris Lattner
cb2610ea03 - Rename AnalysisUsage::preservesAll to getPreservesAll & preservesCFG to
setPreservesCFG to be less confusing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4255 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 20:00:28 +00:00
Chris Lattner
e4ae3041f9 Delete unused arguments to DSGraph::cloneInto method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4253 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 19:50:29 +00:00
Chris Lattner
198be22cec - Add "ResolvingCaller" to the CallSite record. This keeps track of which
function was finally able to resolve the function call.  Adding this allows
    the TD pass to actually work right!
  - Temporarily disable dead node pruning.  This will be reenabled soon.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4252 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 19:47:18 +00:00
Chris Lattner
eff0da9d33 Add another copy ctor form
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4251 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 15:32:34 +00:00
Chris Lattner
99a22847ba As it turns out, we don't need a fully generic mapping copy ctor, we just need
something that maps through a std::map.  Since this simplified the client and
implementation code, do so now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4250 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 15:04:18 +00:00
Chris Lattner
448f4949dc Don't create a new node for every reference to a global. This caused a huge
node explosion that doesn't help anything at all.  In previous versions of
the representation this DID help, but not anymore.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4249 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 13:51:30 +00:00
Chris Lattner
482b651cf8 Fix a confusing bug that caused return value and callee pointers to not
be printed!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4248 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 13:47:57 +00:00
Chris Lattner
13ec72a12a Remove some unneccesary 'using' directives
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4246 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 13:31:48 +00:00
Chris Lattner
65d6a9ee47 Fix bug with prior checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4242 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 02:18:55 +00:00
Chris Lattner
0969c50cb8 - Make DSCallSite not inherit from std::vector. Renamed methods slightly.
Make copy ctor have two versions to avoid dealing with conditional template
    argument.  DSCallSite ctor now takes all arguments instead of taking one
    and being populated later.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4240 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 02:08:03 +00:00
Chris Lattner
0c8d73b74c Avoid extra copy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4239 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-20 22:12:06 +00:00
Chris Lattner
9de906c72a Simplify code a bit, add comment flyer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4238 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-20 22:11:44 +00:00
Chris Lattner
7836d609fa Split some long lines
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4237 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-20 22:11:17 +00:00
Vikram S. Adve
26b98265b7 Remove spurious caller pointer in DSCallSite.
Also add functions to access pointer argument nodes cleanly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4235 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-20 21:41:02 +00:00
Chris Lattner
e80fe61a72 This function can be static
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4234 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-20 20:39:31 +00:00
Chris Lattner
d1f8d0abeb Fix previous checkin :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4233 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-20 20:39:17 +00:00
Chris Lattner
bd14460289 Avoid extra callSite copy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4232 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-20 20:32:13 +00:00
Chris Lattner
af4800b8a9 Print the array flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4231 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-20 20:29:10 +00:00
Vikram S. Adve
42fd169310 Added a first-class representation for each call site that can be
used in the DS graphs.  Essentially, what was vector<DSNodeHandle>
before is now a DSCallSite with the same vector, plus pointers to the
CallInst and the caller Function.  The special-purpose class
BUDataStructure::CallSite is no longer needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4228 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-20 18:07:37 +00:00
Chris Lattner
a3f8586d9d Convert typerec to be a structure instead of a pair
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4226 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-18 18:22:46 +00:00
Chris Lattner
dc062d3e6c Print Mod/ref info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4224 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 22:13:28 +00:00
Chris Lattner
06285237ea Calculate mod/ref info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4223 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 22:13:19 +00:00
Chris Lattner
97e7f083f2 Remove more obsolete code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4221 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 20:53:12 +00:00
Chris Lattner
cf15db34d3 * Make the DSGraph cloner automatically merge global nodes
* BUClosure doesn't have to worry about global nodes
 * TDClosure now works with global nodes
 * Reenable DNE on TD pass, now that globals work right


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4220 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 20:09:52 +00:00
Chris Lattner
1a33e31758 * Apparently string::find doesn't work right on our sun boxes. Work around this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4219 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 16:22:08 +00:00
Chris Lattner
3cc061c0e9 Remove obsolete code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4218 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 04:58:10 +00:00
Chris Lattner
19db0492b8 Enable incompleteness marking
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4217 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 04:57:28 +00:00
Chris Lattner
c966a2acee Really disable pool allocator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4216 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 04:57:09 +00:00
Chris Lattner
0e74412cee * First try at implementing TD pass this does not merge global nodes yet,
among other things.
  * Significant rewrite of TD pass to avoid potentially N^2 algorithms if
    possible.  It is still not complete, but at least it's checked in now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4215 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 04:26:54 +00:00
Chris Lattner
e25ab83a5f Reenable printing of TD analysis
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4214 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 04:24:30 +00:00
Chris Lattner
613692c106 * Add data structures and code to track the call sites for each function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4213 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 04:24:08 +00:00
Chris Lattner
e17a4e8b55 Cleanup data structure graph printer, eliminate hard coded printing in
favor of generic printer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4209 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 01:02:46 +00:00
Chris Lattner
962ee45fe6 Make sure to print out the call nodes as well
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4203 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-16 20:16:16 +00:00
Chris Lattner
e8e035b591 Fix bug: CBackend/2002-10-16-External.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4201 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-16 20:08:47 +00:00
Chris Lattner
eb265cdc90 * Print the "return" node in the graphs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4199 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-16 02:04:36 +00:00
Chris Lattner
ff5feedf28 The second element of the iterator is really an offset, not a link
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4196 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-16 01:43:11 +00:00
Chris Lattner
641e1c252d Specify the graph name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4195 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-16 01:34:28 +00:00
Chris Lattner
f29e307765 - DSGraph Printing Improvements:
* Print edge source labels again
     * Override node shape to be Mrecord again, instead of just record.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4193 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-16 01:18:27 +00:00
Chris Lattner
04b72c821e Fix bug: test/Regression/CBackend/2002-10-15-OpaqueTypeProblem.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4190 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-16 00:08:22 +00:00
Chris Lattner
bf0a37b9aa - Fix bug: Assembler/2002-10-15-NameClash.ll
- Clean up code a bit, s/Method/Function/


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4188 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-15 21:41:14 +00:00
Chris Lattner
0dad6e9c95 - Eliminate SymbolTable::ParentSymTab, ST::localLookup, and
Function::ParentSymTab.  These aren't needed at all.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4186 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-15 21:26:29 +00:00
Chris Lattner
fddc755a6f - Fix LLI so that it simulates the endianness of the target machine
correctly, despite the fact that the host machine might not be the same.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4180 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-15 20:34:05 +00:00
Chris Lattner
d344242f2e Make sure to escape \'s when they are output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4179 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-15 19:56:24 +00:00
Chris Lattner
85131c8277 - Add an endianness field to the TargetData datastructure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4174 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-14 22:41:13 +00:00
Vikram S. Adve
edf3a727b7 Print "circular" warning message only in debug mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4170 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-14 16:32:49 +00:00
Vikram S. Adve
efc9433960 Removed misleading const keyword.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4169 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-14 16:32:24 +00:00
Vikram S. Adve
cf911de3c6 Significant improvement: GEP used by a load or store no longer generates
a separate ADD; instead just use the indexed load/store instruction!
Also, a bug fix: folding a GEP with a leading non-zero index with
its predecessor was incorrect: now it only happens if the predecessor
is pointing to an indexable type (aka SequentialType).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4168 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-14 16:30:55 +00:00
Chris Lattner
bb6b121689 Allow emission of names that start with an underscore. This is needed to
interface with code that uses symbols in the ansi-c protected namespace.  In
most cases this comes from system header files, such as stdio.h.  In particular,
without this change, a reference to the __iob symbol is mangled into ll_iob,
which is not resolved by libc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4165 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-14 06:14:18 +00:00
Chris Lattner
6463e0df85 Clean up code a bit, no functionality changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4162 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-14 03:34:17 +00:00
Chris Lattner
bbd4b303e3 There is no way to guarantee that constants are not forward referenced.
Handle forward referenced constants in a general way.  This fixes bug:
Assembler/2002-10-13-ConstantEncodingProblem.llx and allows the SPEC
197.parser benchmark to be built


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4161 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-14 03:33:02 +00:00
Chris Lattner
34048e2ace - Dramatically simplify the Constant::mutateReferences implementation,
allowing it to be called on all constant types (structures/arrays)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4160 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-14 03:30:23 +00:00
Chris Lattner
9e932bd566 This loop executed exactly one time, turn it into straightline code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4159 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-14 03:28:42 +00:00
Chris Lattner
479b54b6bb Minor cleanups, no changes to functionality
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4157 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-14 00:48:57 +00:00
Vikram S. Adve
8e22ead3b4 Don't try to compute the size of an "array" element if the index is 0:
the size may be unknown, and is not needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4153 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-13 21:47:44 +00:00
Chris Lattner
69da5cf261 - Change Function's so that their argument list is populated when they are
constructed.  Before, external functions would have an empty argument list,
    now a Function ALWAYS has a populated argument list.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4149 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-13 20:57:00 +00:00
Chris Lattner
0b16ae209a - Rename Instruction::First*Op to *OpsBegin, and Num*Ops to *OpsEnd to
reflect the fact that it's a range being defined.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4147 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-13 19:39:16 +00:00
Chris Lattner
f6c52db371 Halfway conversion from custom printing to GraphWriter printing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4146 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-13 19:31:57 +00:00
Chris Lattner
eaa359586c Account for global variables resolved more accurately.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4143 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-13 17:30:30 +00:00
Chris Lattner
66c25ff438 Use methods that are more explanatory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4142 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-13 17:12:47 +00:00
Vikram S. Adve
1632e882f1 Use vectors instead of hash_maps for issueGaps and conflictLists.
These hash lookups were a major sink of time because they happen so often!
Also, add option to disable scheduling.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4138 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-13 00:40:37 +00:00
Vikram S. Adve
acf0f704f9 Major bug fix: was not adding CD edges for RETURNs!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4137 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-13 00:39:22 +00:00
Vikram S. Adve
5aefcad35b Use vectors instead of hash_maps for issueGaps and conflictLists.
These hash lookups were a major sink of time because they happen so often!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4136 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-13 00:37:46 +00:00
Vikram S. Adve
516b26fd86 Run LICM before GCSE!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4135 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-13 00:34:10 +00:00
Vikram S. Adve
fee76265ff Several major fixes, particularly in emitting constant aggregates:
(1) Padding bytes between structure fields (for alignment) were never
    being emitted into the constant pool so the layout did not match!
(2) In printing constants, structures containing structures or arrays
    were never handled.
(3) Support new model for external/uninitialized/initialized globals.
    Uninitialized globals are no longer emitted since they are external.
    Initialized globals may go either in .bss or in .data.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4134 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-13 00:32:18 +00:00
Vikram S. Adve
42e90cf4be Don't use %l0 for large operands to a SAVE since it is needed *before* SAVE!
We now use %g1 instead since that is shared and volatile.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4133 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-13 00:24:06 +00:00
Vikram S. Adve
e0048667dd Don't mark JMPLCALL and JMPLRET as branches.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4132 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-13 00:22:32 +00:00
Vikram S. Adve
d3e26482ff (1) Try to evaluate constant when multiplying 2 constants.
(2) Use intelligent multiply selection code for array allocas.
(3) Don't use cache padding for alloca'd stack slots!
(4) Bug fix in handling call arguments: was not copying sixth FP arg
    to int reg. when calling a function with no prototype.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4130 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-13 00:18:57 +00:00
Vikram S. Adve
04ef49985b Eliminate duplicate target pointer in SparcRegInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4129 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-13 00:06:04 +00:00
Vikram S. Adve
c654c784f6 Eliminate duplicate target pointer. Also add a few assertions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4128 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-13 00:05:30 +00:00
Vikram S. Adve
893cace8e2 Make sure to handle small negative values hiding as large unsigned longs --
this is a common case created by the front-end.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4127 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-13 00:04:26 +00:00
Vikram S. Adve
d0451a9233 Major fix: extract ConstantExpr nodes and decompose them into symbolic
instructions so that (a) constant folding is done automatically before
code generation, and (b) selection does not have to deal with them.
Also, check for ConstantPointerRefs in additional to GlobalValues
when creating a GEP to load a global address.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4126 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-13 00:01:57 +00:00
Anand Shukla
3383b1d3bb Changed to external global var
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4120 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-12 20:33:47 +00:00
Nick Hildenbrandt
98360a1752 Instead of adding stdlib we just prototype malloc correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4118 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-11 21:40:44 +00:00
Nick Hildenbrandt
c7140e9bd9 Sun requires you to include stdlib to use malloc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4117 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-11 18:41:44 +00:00
Vikram S. Adve
cb202e3de5 Major bug fix: spill code for an instruction in a delay slot was
merrily being inserted before/after the instruction!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4116 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-11 16:12:40 +00:00
Vikram S. Adve
cde3982b02 Don't pad variables in stack slots for performance!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4115 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-11 16:10:53 +00:00
Vikram S. Adve
6e0bb63264 Use PARALLEL_DIRS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4114 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-11 16:08:17 +00:00
Misha Brukman
a27229013f Added capability to get execution count of a loop if it is a predictable
number of iterations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4113 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-11 05:34:32 +00:00
Misha Brukman
6b290a5440 Added helper functions in LoopInfo: isLoopExit and numBackEdges.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4112 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-11 05:31:10 +00:00
Chris Lattner
7a11a94183 Stop using DataStructureGraph.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4106 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-10 20:33:46 +00:00
Chris Lattner
c67ebfa788 - Dramatically simplify the ConstantMerge code now that
Value::replaceAllUsesWith works with constants correctly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4104 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-09 23:16:04 +00:00
Chris Lattner
28eca8bb56 - Make Value::replaceAllUsesWith work with constants correctly. This fixes
bug FuncResolve/2002-08-19-ResolveGlobalVars.ll and gzip looks better.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4103 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-09 23:12:59 +00:00
Chris Lattner
c251f9e0ae - Add new Constant::replaceUsesOfWithOnConstant which has an end result
similar to User::replaceUsesOfWith but actually does the right thing for
    constants.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4102 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-09 23:12:25 +00:00
Chris Lattner
a45ec54a02 Almost a complete rewrite of FunctionResolution to now resolve functions
and global variables.

This fixes bug: FuncResolve/2002-08-19-ResolveGlobalVarsEasier.ll
And bug: SingleSource/UnitTests/2002-10-09-ArrayResolution.c

Note that this does not fix bug:
FunctionResolve/2002-08-19-ResolveGlobalVars.ll because replaceAllUsesWith
breaks when a constantexpr is pointing to the thing being replaced.  This
is more of an infrastructure problem than anything.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4099 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-09 21:10:06 +00:00
Chris Lattner
e43f40bc17 Minor, non-functionality changing, formatting fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4091 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-09 00:25:32 +00:00
Chris Lattner
61d295aa29 - Remove Value::use_remove
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4090 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-09 00:25:05 +00:00
Chris Lattner
cd484a47ea - Rename MTy to FTy (no methods exist anymore)
- Fix bug: LevelRaise/2002-10-08-VarArgCallInfLoop.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4088 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-09 00:16:00 +00:00
Chris Lattner
d1c657e2c7 Fix NASTY N^2 behavior that was causing the gzip benchmark to take forever to
assemble.  Now we scan the use-list from the back when removing users instead
of from the front.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4086 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-08 23:46:55 +00:00
Chris Lattner
d43c7d2077 Fix bug: Assembler/2002-10-08-LargeArrayPerformance.ll by using
std::vector::reserve when possible


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4085 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-08 23:33:52 +00:00
Chris Lattner
61b92c02b4 - Fix bug: LevelRaise/2002-10-08-VarArgCall.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4083 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-08 22:19:25 +00:00
Chris Lattner
d3d06a5cd8 - Fix bug: cee/2002-10-07-NoImmediateDominator.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4081 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-08 21:53:51 +00:00
Chris Lattner
dee430d26e Changes to support PHINode::removeIncoming changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4080 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-08 21:36:34 +00:00
Chris Lattner
bb190ac8da Changes to support PHINode::removeIncoming changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4079 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-08 21:36:33 +00:00
Chris Lattner
8bcb768a9c - Change PHINode::removeIncomingValue to delete the phi node if the last
incoming value is removed!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4078 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-08 21:34:58 +00:00
Chris Lattner
f7f009d9a5 - Checkin LARGE number of Changes to CEE pass that will make it much more
powerful, but that are largely disabled.  The basic idea here is that it
    is trying to forward branches across basic blocks that have PHI nodes in
    it, which are crucial to be able to handle cases like whet.ll.
    Unfortunately we are not updating SSA correctly, causing sim.c to die, and I
    don't have time to fix the regression now, so I must disable the
    functionality.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4077 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-08 21:34:15 +00:00
Chris Lattner
e802a023d9 Expose isCriticalEdge & SplitCriticalEdge methods from crit-edges pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4075 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-08 21:06:27 +00:00
Chris Lattner
7ca266fe1f Expose new "recalculate" method from dominatorset
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4074 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-08 19:12:08 +00:00
Chris Lattner
57b314cfb1 It is illegal for PHI nodes to have zero values, delete the code to handle them
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4071 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-08 17:07:39 +00:00
Chris Lattner
6eaeb5764c Fold ashr -1, X into -1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4070 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-08 16:16:40 +00:00
Chris Lattner
7c1faf0f59 Non-functionality change just to make it more clear what is going on
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4060 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-07 18:34:32 +00:00
Chris Lattner
0c5e362118 Global variables are now external if they don't have initializers, not
"uninitialized"


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4052 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-06 22:48:09 +00:00
Chris Lattner
61b91bc156 Check that we don't have external varaibles with internal linkage
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4051 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-06 22:47:32 +00:00
Chris Lattner
08c0e6af4f The parser now accepts "external" global variables, in addition to the backwards
compatible "uninitialized" global variables


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4050 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-06 22:45:09 +00:00
Chris Lattner
f6ffcb6b71 PHI nodes are not allowed to exist with zero incoming values, check that
there aren't any like this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4044 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-06 21:00:31 +00:00
Vikram S. Adve
2a408f06b5 Bug fix: In preventing static global variables from being printed twice,
I also prevented external globals from being printed twice, but they
should (extern declaration and definition).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4043 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-05 23:43:10 +00:00
Anand Shukla
3400837374 Added #include<unistd.h> to compile with solaris gcc3.2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4042 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-04 23:57:01 +00:00
Anand Shukla
c1d4d79d93 added cast to unsigned to compile with gcc3.2 (sparc)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4041 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-04 23:56:18 +00:00
Chris Lattner
7d821db958 Handle post dominance correctly in the case where blocks do not have a path to
the exit node.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4038 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-04 14:50:20 +00:00
Chris Lattner
4e4caeffbd Fix a nasty problem with dominance calculation for unreachable blocks.
If we had a CFG that look like Entry -> B, Unreachable -> B, then we would
not correctly determine that Entry dominated B, because Entry did not
apparently dominate "unreachable".  This patch fixes this by making the entry
node dominate all blocks, including unreachable ones.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4037 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-04 14:45:48 +00:00
Chris Lattner
a00397e1ee Prune function nodes that are no longer referenced due to inlining
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4036 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-03 21:55:28 +00:00
Chris Lattner
6727ec64e8 sgefa uses truely huge data structures nodes. Only print part of them if they
are so big


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4035 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-03 21:55:13 +00:00
Chris Lattner
62d928eac1 Handle bug exposed by power benchmark
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4033 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-03 21:06:38 +00:00
Nick Hildenbrandt
d2eb386c16 Add parens around constant calls to getelemptr to properly associate the reference
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4032 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-03 20:47:24 +00:00
Chris Lattner
55c1058135 Reimplement/port the Bottom Up Closure pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4031 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-03 20:38:41 +00:00
Chris Lattner
c5f21de2bc DataStructure.h doesn't include DSGraph.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4029 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 22:14:38 +00:00
Nick Hildenbrandt
ca626922bc I was wrong on the removing of those references on the last commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4023 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 21:14:33 +00:00
Chris Lattner
005cbce20e * Implement the getc() function
* Support usage of stdin, stdout & stderr correctly in LLI!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4022 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 21:12:13 +00:00
Chris Lattner
849735ce22 Cleanup #includes, expose module
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4021 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 21:11:16 +00:00
Chris Lattner
dbaf74d108 Expose TD to ExternalFunctions.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4020 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 21:10:48 +00:00
Chris Lattner
061269be97 - Print the predecessors of a basic block instead of the number of uses of
the block in the AsmWriter


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4019 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 19:38:55 +00:00
Chris Lattner
b6984558c5 Fix bug: 2002-10-02-SignExtensionProblem.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4017 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 18:53:14 +00:00
Nick Hildenbrandt
51c84d14ab Removed unneeded reference and dereferences.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4016 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 18:34:51 +00:00
Nick Hildenbrandt
275801b2dd Cleaned up my last check-in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4014 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 18:32:35 +00:00
Nick Hildenbrandt
113ad893b9 No longer include malloc.h. If protoypes are needed for memory functions they will be present in the byte code and the generated c as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4013 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 18:20:18 +00:00
Chris Lattner
e03f32bcc2 * Implement fully general merging of array subscripts on demand! This
does not handle the initial pointer index case yet though.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4012 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 06:24:36 +00:00
Chris Lattner
9cfb358fa4 When printing DS nodes, print the mergemap index as well to allow easier
debugging of merging process.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4010 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 05:17:55 +00:00
Chris Lattner
7b7200c4ea * Significant rework of DSNode to support arbitrary aliasing due to merging
* Now all and any bytes of a DSNode can be merged together individually.  This
  is neccesary to support the full generality of C and support aliasing
  correctly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4008 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 04:57:39 +00:00
Chris Lattner
e68bf61f6f Changes to work with Statistics rework
* Renamed StatisticReporter.h/cpp to Statistic.h/cpp
    * Broke constructor to take two const char * arguments instead of one, so
      that indendation can be taken care of automatically.
    * Sort the list by pass name when printing
    * Make sure to print all statistics as a group, instead of randomly when
      the statistics dtors are called.
    * Updated ProgrammersManual with new semantics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4004 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-01 22:40:31 +00:00
Chris Lattner
a92f696b74 Updates to work with recent Statistic's changes:
* Renamed StatisticReporter.h/cpp to Statistic.h/cpp
    * Broke constructor to take two const char * arguments instead of one, so
      that indendation can be taken care of automatically.
    * Sort the list by pass name when printing
    * Make sure to print all statistics as a group, instead of randomly when
      the statistics dtors are called.
    * Updated ProgrammersManual with new semantics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4002 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-01 22:38:41 +00:00
Chris Lattner
6ee6bbeb04 Updates to work with recent Statistic's changes:
* Renamed StatisticReporter.h/cpp to Statistic.h/cpp
    * Broke constructor to take two const char * arguments instead of one, so
      that indendation can be taken care of automatically.
    * Sort the list by pass name when printing
    * Make sure to print all statistics as a group, instead of randomly when
      the statistics dtors are called.
    * Updated ProgrammersManual with new semantics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4001 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-01 22:38:37 +00:00
Chris Lattner
249be915df Build subdirs in parallel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4000 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-01 22:36:35 +00:00
Chris Lattner
96ef1b90c8 - Rework Statistics:
* Renamed StatisticReporter.h/cpp to Statistic.h/cpp
    * Broke constructor to take two const char * arguments instead of one, so
      that indendation can be taken care of automatically.
    * Sort the list by pass name when printing
    * Make sure to print all statistics as a group, instead of randomly when
      the statistics dtors are called.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3999 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-01 22:35:45 +00:00
Chris Lattner
1c7ce2c7fe Initial checkin of Steensgaards context insensitive flow insensitive
alias analysis


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3997 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-01 22:34:12 +00:00
Chris Lattner
fccd06fcea Checkin some major reworks of data structure analysis. This is not done,
nor does it work very well, but I need to get it checked in before I break
the tree unintentionally.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3996 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-01 22:33:50 +00:00
Chris Lattner
57b062a8cc Make sure to use the TimerGroup that we created!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3995 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-01 20:12:06 +00:00
Chris Lattner
ccc7bef873 Make sure not to count the PassManager wrapers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3994 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-01 20:08:11 +00:00
Chris Lattner
f1da555028 Factor timer code out of PassManager implementation, into a generic interface
exposed by Support/Timer.h.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3993 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-01 19:54:07 +00:00
Chris Lattner
6c38a79d77 Checkin generic interval timer support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3992 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-01 19:36:54 +00:00
Nick Hildenbrandt
c3dd2af428 Fixed to properly escape quotes in strings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3991 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-30 21:11:55 +00:00
Chris Lattner
c8f25d91bd Minor tweak
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3985 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-29 22:59:29 +00:00
Vikram S. Adve
aebdbe6988 Bug fix in folding getElementPtr instructions: don't fold one into
a predecessor if it has a non-zero first index and the predecessor
ends with a struct index.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3982 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-29 22:55:05 +00:00
Chris Lattner
3f00ef9660 Fix a problem that was caused by stale analyses being in CurrentAnalyses
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3981 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-29 22:50:22 +00:00
Chris Lattner
b461373fbc Fix bug in LICM that caused the previous big win. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3980 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-29 22:26:07 +00:00
Chris Lattner
952eaee239 Hoist the contents of Loops in depth first order in the dominator tree,
rather than in random order.  This causes LICM to be DRAMATICALLY more
effective. For example, on bzip2.c, it is able to hoist 302 loads and
2380 total instructions, as opposed to 44/338 before.  This  obviously
makes other transformations much more powerful as well!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3978 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-29 21:46:09 +00:00
Chris Lattner
b1f8aebc67 Fix printing of loop information
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3977 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-29 21:43:04 +00:00
Chris Lattner
4d7a75a9e3 Improve printing of dominator sets
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3976 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-29 21:42:42 +00:00
Chris Lattner
4d01892e36 Fix major bugs in dominator set & tree information updating
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3975 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-29 21:41:38 +00:00
Vikram S. Adve
4117459567 Convert DIRS to PARALLEL_DIRS. They can be built independently.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3972 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-29 11:52:14 +00:00
Vikram S. Adve
1c397aae8e Added a couple of helper methods for live range construction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3970 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-28 17:05:43 +00:00
Vikram S. Adve
9d67cd1468 Live ranges for Return value and return address of a Call are now
created here, simply by handling all implicit operands (which should
have been done anyway).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3969 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-28 17:05:22 +00:00
Vikram S. Adve
f425884e27 Fixed method getReturnValue(): it should return NULL if the
callee does not return a value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3968 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-28 17:03:54 +00:00
Vikram S. Adve
ad9c978874 Fixed incorrect assertion: spill code for function ptr should be
handled like normal operands, not like other call arguments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3967 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-28 17:02:40 +00:00
Vikram S. Adve
ac67006bed Return address register should be marked as "result" for the JMPL instruction
since it is defined by the instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3966 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-28 17:00:15 +00:00
Vikram S. Adve
87817653fe Live ranges for Return value and return address of a Call are no longer
created here.  Instead they are created in LiveRangeInfo.cpp.  This
simplifies the code here quite a bit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3965 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-28 16:59:05 +00:00
Vikram S. Adve
106604ea6d Simplified code that handles call args and rets, so it no longer
needs the RegClass list to be passed in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3964 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-28 16:56:59 +00:00
Vikram S. Adve
4a8bb2bf23 Simplify Call translation slightly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3963 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-28 16:55:41 +00:00
Vikram S. Adve
94c408104a Overhaul integer conversions to match C++ ISO standard.
Don't allow direct FP-to-uint conversion (must be eliminated by preselection).
Address arithmetic for arrays is now entirely 64-bit so no sign-ext needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3961 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-27 14:33:08 +00:00
Vikram S. Adve
5cededee92 Modify operand order for Create{Sign,Zero}ExtensionInstructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3960 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-27 14:29:45 +00:00
Vikram S. Adve
7e5167a3e2 Bug fix: some redundant copies were not being deleted after detection :-|.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3959 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-27 14:27:37 +00:00
Vikram S. Adve
1c10f17552 Sign-extend integer constants from original type size to 64 bits!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3958 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-27 14:26:20 +00:00
Vikram S. Adve
e9cb735131 Decompose FP-to-UInt casts into FP-to-ULong-toUInt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3957 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-27 14:24:45 +00:00
Chris Lattner
009cc3d2e8 First try at implementing the AliasSetTracker class. I'm sure it will need
revision as I start to use it though.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3954 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-26 21:49:07 +00:00
Chris Lattner
99a57216a9 - Further cleanups of LICM pass, remove extra work from previous implementation
- Do not clone instructions then insert clone outside of loop.  Just move them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3951 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-26 19:40:25 +00:00
Chris Lattner
94170596b7 Improve comments, doxygenize more
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3950 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-26 16:52:07 +00:00
Chris Lattner
9646e6b6af Clean up LICM significantly now that it is guaranteed to have loop preheaders
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3947 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-26 16:38:03 +00:00
Chris Lattner
0bd3616b0b Change pass name to something sane
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3946 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-26 16:37:37 +00:00
Chris Lattner
eb53ae4f2d Loop invariant code motion now depends on the LoopPreheader pass. Dead code
has not yet been removed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3945 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-26 16:19:31 +00:00
Chris Lattner
c178d9459a - Cleanup break-crit-edges pass by making SplitCriticalEdge a member method.
- break-crit-edges pass does not invalidate loop-preheader pass.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3944 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-26 16:18:51 +00:00
Chris Lattner
38acf9e85d Checkin new loop-preheader insertion pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3942 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-26 16:17:31 +00:00
Chris Lattner
fce46ef803 Fix printing of loop information
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3941 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-26 16:15:54 +00:00
Chris Lattner
d74472ed21 - Add methods to ImmediateDominators & DominatorTree to allow updates
- Make DominatorTree::Node not inherit from std::vector


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3939 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-26 16:14:41 +00:00
Chris Lattner
699b305c86 - Add new methods to LoopInfo: getLoopPreheader, addBasicBlockToLoop.
These allow extra information to be easily gathered, and loopinfo to be
    updated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3936 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-26 05:32:50 +00:00
Chris Lattner
0a1a874d1f - Add new ctor to BasicBlock to allow insertion before any BB, not just at
the end of the function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3934 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-26 05:03:22 +00:00
Chris Lattner
3a15d70734 Converted SimpleStructMutation to take TargetData as a required pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3932 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-26 00:17:21 +00:00
Chris Lattner
3b2106ff84 Change LowerAllocations pass to 'require' TargetData instead of it being
passed in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3929 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-25 23:47:47 +00:00
Chris Lattner
aa31ad016a Convert TargetData to be an ImmutablePass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3927 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-25 23:46:55 +00:00
Chris Lattner
c3a388143b Convert BasicVN to be an ImmutablePass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3924 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-25 22:27:25 +00:00
Chris Lattner
6ffa0a7f7c * Fix ugly bug in previous checkin where I reused the name 'i' one too many times
* Print out immutable passes in the -debug-pass=Structure report.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3923 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-25 22:26:52 +00:00
Chris Lattner
70b4f3e051 Add support for ImmutablePasses, which are not run, and cannot be
invalidated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3921 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-25 21:59:11 +00:00
Nick Hildenbrandt
e548f009f7 Strings now handled correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3920 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-25 20:29:26 +00:00
Chris Lattner
112e97dbee - Fix bug: Mem2Reg/2002-05-01-ShouldNotPromoteThisAlloca.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3917 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-24 21:19:41 +00:00
Chris Lattner
2ada19ea04 Eliminate extraneous #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3916 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-24 21:18:40 +00:00
Chris Lattner
929b2c6900 Fix bug: SimplifyCFG/2002-09-24-PHIAssertion.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3913 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-24 16:09:17 +00:00
Chris Lattner
f03cafc280 - Do not expose Critical Edge breaking mechanics outside the BCE pass, thus
removing it from Transforms/Local.h and from Transforms/Utils/*


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3911 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-24 15:52:01 +00:00
Chris Lattner
eb0456c8fd - Do not expose Critical Edge breaking mechanics outside the BCE pass, thus
removing it from Transforms/Local.h and from Transforms/Utils/*


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3910 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-24 15:51:56 +00:00
Chris Lattner
16e7a5295f Correlated Exprs pass now requires BCE pass instead of doing it manually
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3908 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-24 15:43:56 +00:00
Chris Lattner
6de302bbdb - Expose passinfo from BreakCriticalEdges pass so that it may be "Required"
by other passes.  Make BCE pass be in anonymous namespace now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3907 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-24 15:43:12 +00:00
Chris Lattner
3abb95df01 Minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3904 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-24 00:09:26 +00:00
Chris Lattner
d76efa0186 Add new BreakCriticalEdges pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3903 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-24 00:08:39 +00:00
Chris Lattner
5057b00faf Make users of FindUsedTypes not have problems with linkage. This fixes
Cwriter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3900 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-24 00:07:21 +00:00
Chris Lattner
d06451f920 Optimize away cases like:
%cast109 = cast uint %cast212 to short          ; <short> [#uses=1]
        %cast214 = cast short %cast109 to uint          ; <uint> [#uses=1]
        %cast215 = cast uint %cast214 to short          ; <short> [#uses=1]


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3897 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-23 23:39:43 +00:00
Chris Lattner
e4314ed315 Fix: ConstantMerge/2002-09-23-CPR-Update.ll
Basically, this bug boiled down to calling replaceUsesOfWith on a constant,
which changed it's shape in an illegal way.  This pass now goes through all
of the trouble neccesary to do the replacement on constants.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3895 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-23 23:00:46 +00:00
Nick Hildenbrandt
c14ded4858 Parenthesis are now added to casts of type array.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3892 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-23 21:02:50 +00:00
Chris Lattner
c017d9132a * Fix bug: CorrelatedExprs/2002-09-23-PHIUpdateBug.ll
* Make sure "Changed" is updated correctly


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3891 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-23 20:06:22 +00:00
Chris Lattner
d149c053cd Insert resolved constants into the global map so they are reused correctly.
This bug was exposed linking the SPEC benchmark suite.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3888 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-23 18:14:15 +00:00
Vikram S. Adve
1b5710a8fc Put intermediate source files in a subdirectory here instead of with
object files.  Also,


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3884 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-23 13:12:28 +00:00
Vikram S. Adve
c308aefe92 Disable reassociation pass in LLC until it is fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3883 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-23 12:55:50 +00:00
Chris Lattner
bdccb00970 Don't insert a PHI node to merge "returns" from an inlined function if there
is only a single return from the function!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3878 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-22 18:41:25 +00:00
Anand Shukla
c078930ee3 Changed codegen to add 2 empty slots at the top of stack using StackSlots pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3873 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-21 05:01:21 +00:00
Anand Shukla
33db9bae15 Initial version: it adds 2 empty slots at the top of stack
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3872 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-21 04:58:26 +00:00
Chris Lattner
d1cf1b458a Fix cwriter to not output FP constants in ascii, output them in hex instead.
This fixes a number of FP precision problems, making the output of the
power benchmark closer to the right answer.

Unfortunately, this only addresses FP constants used directly in functions.
Constants referred to by global constants (such as an array of FP values)
aren't helped by this.  Until this happens power won't work.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3871 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-20 23:26:33 +00:00
Chris Lattner
1f8c4a17c1 Fix bug: 2002-09-20-VarArgPrototypes.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3870 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-20 22:32:30 +00:00
Anand Shukla
4f2d5a4d76 Changed uchar to unsigned char in function ParseBytecodeBuffer, because seemingly it affects opt in uncertain ways :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3866 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-20 20:57:54 +00:00
Anand Shukla
590df88d82 Added checking threshold
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3864 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-20 16:44:35 +00:00
Chris Lattner
270d78a8d6 Fix output of typedefs to avoid syntax errors.
* We now can correctly Cify the Olden-power benchmark


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3860 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-20 15:20:24 +00:00
Chris Lattner
58d04d4e35 * Add a couple of comments to the output c code
* _FIX_ infinite recursion problem, due to typedefs of a structure being
  printed before the structure.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3859 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-20 15:18:30 +00:00
Chris Lattner
2db41cd5de Another change that doesn't affect functionality. Since we are only looking
at types in the symbol table, only traverse the type plane, saving a loop nest.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3858 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-20 15:12:13 +00:00
Chris Lattner
2c601a7be1 Make the StructPrinted set only take memory when it's being used.
rename parseStruct to printContainedStructs


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3857 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-20 15:05:40 +00:00
Chris Lattner
a4c047ec27 No functionality changes, primarily just changing tab indentation to space
indentation


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3856 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-20 14:56:54 +00:00
Vikram S. Adve
0efb50761d Add method IGNode::getCombinedDegree to count the sum of the degrees
of two nodes, excluding duplicates.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3848 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-20 00:55:04 +00:00
Vikram S. Adve
57e14bd757 Add PostOpts/ and rename PreSelection/ to PreOpts/.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3847 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-20 00:53:53 +00:00
Vikram S. Adve
e5b2565a02 Add peephole optimization pass at the end of code generation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3846 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-20 00:52:43 +00:00
Vikram S. Adve
d55697cf13 Added class MachineOptInfo as interface to target-specific
routines supporting machine code optimization.
Also added method MachineInstrInfo::getNOPOpCode().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3845 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-20 00:52:09 +00:00
Vikram S. Adve
e8b57ef260 Add method MachineInstr::replace to rewrite a machine instruction in place.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3843 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-20 00:47:49 +00:00
Vikram S. Adve
32f81a3469 Allow copy coalescing in more cases: if sum of node degrees is more than
than #available regs, compute the sum excluding duplicates and if that
is less than #regs, go ahead and coalesce.
Add method IGNode::getCombinedDegree to count excluding duplicates.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3842 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-20 00:45:47 +00:00
Vikram S. Adve
25d80cdcc6 Peephole optimization pass on final machine code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3840 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-20 00:42:11 +00:00
Vikram S. Adve
fafda59f08 Files moved to CodeGen/PreOpts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3839 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-20 00:30:46 +00:00
Vikram S. Adve
abf055c698 Moving these files from Code/PreSelection to here.
Original logs for PreSelection.cpp:

  revision 1.2
  date: 2002/09/17 23:50:32;  author: lattner;  state: Exp;  lines: +1 -3
  Don't put default parameter values into .cpp files, it breaks 3.x compilers

  revision 1.1
  date: 2002/09/16 15:31:13;  author: vadve;  state: Exp;
  New preselection pass that specializes LLVM code for a target machine,
  while remaining in legal portable LLVM form and preserving type
  information and type safety.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3838 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-20 00:29:28 +00:00
Chris Lattner
3f6962e088 Add an optimization to support the most common access pattern for the
library.  This speeds debug builds up significantly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3826 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-19 19:22:11 +00:00
Chris Lattner
3e1f144a1d Make sure that we abort if an error happens as early as neccesary. Before
it was possible for the passmanager to continue running passes after the
verifier even if the module was not well formed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3820 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-19 16:12:19 +00:00
Anand Shukla
6689b06697 split retracing into a separate file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3809 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-18 03:55:26 +00:00
Chris Lattner
ec9962e44a Compile sub-directories in parallel, because they don't have interdependencies
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3808 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-18 03:25:58 +00:00
Misha Brukman
bfb472447e Removed unnecessary #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3802 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-18 02:07:57 +00:00
Misha Brukman
5f41748e1a Fixed typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3801 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-18 00:42:45 +00:00
Chris Lattner
5fda99744e Don't put default parameter values into .cpp files, it breaks 3.x compilers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3799 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-17 23:50:32 +00:00
Chris Lattner
cb16c65426 There is a #define in some header that conflicts with INFINITY, rename it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3797 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-17 23:46:33 +00:00
Chris Lattner
dfcbf01222 Fix bug: test/Regression/Transforms/InstCombine/2002-09-17-GetElementPtrCrash.ll
Thanks to Casey for finding it!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3783 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-17 21:05:42 +00:00
Anand Shukla
b379470b90 Removed debug info printing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3778 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-17 20:24:46 +00:00
Chris Lattner
82f05d8610 Add support for GCC 2.96
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3777 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-17 17:23:09 +00:00
Vikram S. Adve
913bfbc2e4 Don't print global variable definitions twice! Sun's pathetic compiler
never complained about this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3774 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-17 11:50:38 +00:00