Commit Graph

2322 Commits

Author SHA1 Message Date
Chris Lattner
0be79c6c1b Add #includes now that MachineInstr.h doesn't include llvm/Target/MachineInstrInfo.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4327 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 02:28:39 +00:00
Chris Lattner
4a63b72df9 Don't #include <Support/*>, #include "Support/*"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4325 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 02:11:53 +00:00
Chris Lattner
e61a584f98 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4323 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 02:01:37 +00:00
Chris Lattner
e7d27fa00b MachineFunction now includes MachineBasicBlock so there is no need to
reinclude it


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4322 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 02:01:35 +00:00
Chris Lattner
55291ead55 Rename MachineCodeForBasicBlock to MachineBasicBlock
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4318 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 01:41:47 +00:00
Chris Lattner
32be9f6cd4 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4317 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 01:41:27 +00:00
Chris Lattner
a4f808b54e Fixes to previous checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4314 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 01:27:30 +00:00
Chris Lattner
51a8d85281 Inline some methods from .cpp files into .h files, minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4313 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 01:21:55 +00:00
Chris Lattner
6b9445389a Minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4312 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 01:16:38 +00:00
Chris Lattner
227c3d355b Move machine code generation/destruction passes out of Sparc.cpp because
they are generic


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4310 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 01:12:41 +00:00
Chris Lattner
4f9463772b Move addPassesToEmitAssembly from TargetMachine to UltraSparc because it
really is sparc specific.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4308 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 01:03:43 +00:00
Chris Lattner
1febf88ef4 Prune #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4307 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 01:02:51 +00:00
Chris Lattner
0c68e8ce6e Updates to match misha's changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4302 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 00:37:53 +00:00
Misha Brukman
fce1143bcf Changed MachineCodeForMethod' to MachineFunction'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4301 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 00:28:31 +00:00
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