Chris Lattner
8384f97ee4
Fix test: Transforms/LevelRaise/2003-11-28-IllegalTypeConversion.ll
...
Some gep generalization changes
llvm-svn: 10252
2003-11-29 05:31:25 +00:00
Chris Lattner
6789a0b1d4
To not barf when an error occurs.
...
llvm-svn: 10236
2003-11-26 07:24:58 +00:00
Chris Lattner
eb64b6a922
output foo(void) as appropriate
...
llvm-svn: 10232
2003-11-26 00:09:17 +00:00
Chris Lattner
883b73f0a8
Fix bug in previous checkin
...
llvm-svn: 10231
2003-11-25 23:44:40 +00:00
Chris Lattner
f5569bb9a5
Fix const correctness
...
llvm-svn: 10229
2003-11-25 21:28:00 +00:00
Chris Lattner
ad70d4a15b
Relax constrains on GEP type indexes
...
llvm-svn: 10228
2003-11-25 21:21:46 +00:00
Chris Lattner
52310702a1
Do not use index type to determine what it is indexing into!
...
llvm-svn: 10226
2003-11-25 21:09:18 +00:00
Chris Lattner
637ee39933
Do not depend on the gep index types to determine what flavor of index it is
...
llvm-svn: 10225
2003-11-25 20:49:55 +00:00
Chris Lattner
f078808a2b
Do not depend on structure elements being of type UByteTy
...
llvm-svn: 10224
2003-11-25 20:44:56 +00:00
Chris Lattner
567444309a
Do not depend on index type to determine whether it is a structure or sequential index
...
llvm-svn: 10221
2003-11-25 20:19:55 +00:00
Chris Lattner
a346e64218
Fix file header
...
llvm-svn: 10219
2003-11-25 20:11:47 +00:00
Chris Lattner
c3de7c4ec2
Remove dead variable
...
llvm-svn: 10218
2003-11-25 20:11:00 +00:00
Chris Lattner
388bc98954
Use gep_type_begin/end instead of looking for ubytes
...
llvm-svn: 10217
2003-11-25 20:10:07 +00:00
Chris Lattner
359974801e
Finegrainify namespacification
...
llvm-svn: 10210
2003-11-25 18:33:40 +00:00
Chris Lattner
2a18c640df
Fix PR147
...
llvm-svn: 10204
2003-11-25 03:54:16 +00:00
Misha Brukman
bb718f14e0
Fix copy-pasto.
...
llvm-svn: 10197
2003-11-24 05:36:38 +00:00
Misha Brukman
7c9144b5f5
Add ability to query if a file is a legitimate ELF shared object.
...
llvm-svn: 10193
2003-11-24 05:28:12 +00:00
Brian Gaeke
84c0efc946
Support constant casting constant pointers to ints/uints, and/or
...
the other way around, instead of failing a large, tumor-like assertion.
llvm-svn: 10171
2003-11-22 07:18:25 +00:00
Brian Gaeke
9ba9225b35
Constant shift expressions, meet InstSelectSimple. Yow!!
...
llvm-svn: 10170
2003-11-22 06:49:41 +00:00
Brian Gaeke
e42b8fd298
Stub for constant shift expr support.
...
llvm-svn: 10168
2003-11-22 05:18:35 +00:00
Brian Gaeke
03f3611633
Fix PR149 - support constant shift expressions.
...
llvm-svn: 10167
2003-11-22 05:02:56 +00:00
Chris Lattner
28ebb3e0a6
Delete dead line
...
llvm-svn: 10164
2003-11-22 02:26:17 +00:00
Chris Lattner
f40cdbe856
Fix bug: Transforms/PruneEH/2003-11-21-PHIUpdate.llx
...
llvm-svn: 10163
2003-11-22 02:20:36 +00:00
Chris Lattner
4cc2cc5c58
Do not crash when deleing a region with a dead invoke instruction
...
llvm-svn: 10161
2003-11-22 02:13:08 +00:00
Chris Lattner
1ad805977d
Finegrainify namespacification
...
The module stripping pass should not strip symbols on external globals
llvm-svn: 10157
2003-11-22 01:29:35 +00:00
Misha Brukman
d181666052
* Add code to flush the ICache, which any self-respecting SMC must do
...
* Restore registers *after* everything else to avoid any possible side effects
This fixes McCat-imp.
llvm-svn: 10147
2003-11-21 23:48:54 +00:00
Chris Lattner
3ae303cc8c
Check return types of functions
...
llvm-svn: 10146
2003-11-21 22:32:23 +00:00
Chris Lattner
61b3f20bf1
Considering that CI is not even IN SCOPE here, I wooda thought the compiler
...
would have caught this. *sigh*
llvm-svn: 10142
2003-11-21 21:57:29 +00:00
Chris Lattner
f52e03c79e
Finegrainify namespacification
...
llvm-svn: 10138
2003-11-21 21:54:22 +00:00
Chris Lattner
456031eed7
Get rid of using decls, finegrainify namespacification
...
llvm-svn: 10137
2003-11-21 21:52:10 +00:00
Chris Lattner
51c28a5c1b
* Finegrainify namespacification
...
* Make the cost metric for passing constants in as arguments to functions MUCH
more accurate, by actually estimating the amount of code that will be constant
propagated away.
llvm-svn: 10136
2003-11-21 21:46:09 +00:00
Chris Lattner
a82f131abb
Finegrainify namespacification
...
Print out the costs for functions that AREN'T inlined as well
llvm-svn: 10135
2003-11-21 21:45:31 +00:00
Chris Lattner
dcdc371522
Fix problem Reid was having with external globals and nonexternal linkage
...
llvm-svn: 10133
2003-11-21 20:33:27 +00:00
Chris Lattner
199bb859a9
Don't crash on bogus source value
...
llvm-svn: 10132
2003-11-21 20:27:35 +00:00
Chris Lattner
189d19fb04
Finegrainify namespacification
...
llvm-svn: 10131
2003-11-21 20:23:48 +00:00
Chris Lattner
7e5e456d96
Fix some problems with assertions printing
...
llvm-svn: 10129
2003-11-21 17:35:51 +00:00
Chris Lattner
9d72c2f229
improve error message
...
llvm-svn: 10128
2003-11-21 17:06:29 +00:00
Chris Lattner
a29600046d
Minor cleanups and simplifications
...
llvm-svn: 10127
2003-11-21 16:52:05 +00:00
Chris Lattner
8791e26de1
* Finegrainify namespacification
...
* Implement FuncResolve/2003-11-20-BogusResolveWarning.ll
... which eliminates a large number of annoying warnings. I know misha
will miss them though!
llvm-svn: 10123
2003-11-20 21:21:31 +00:00
Chris Lattner
2af517281d
Start using the nicer terminator auto-insertion API
...
llvm-svn: 10111
2003-11-20 18:25:24 +00:00
Chris Lattner
63a0ccff44
Spew symbolic types!
...
llvm-svn: 10110
2003-11-20 18:23:14 +00:00
Chris Lattner
18e5d5228a
When spewing out warnings during function resolution, do not vomit out pages
...
and pages of non-symbolic types.
llvm-svn: 10109
2003-11-20 18:19:35 +00:00
Chris Lattner
9ab47d1625
Somehow I forgot poor little UnwindInst
...
*sniff*
llvm-svn: 10108
2003-11-20 18:11:56 +00:00
Chris Lattner
0e03ab67c3
* Finegrainify namespacification
...
* Add new constructors to allow insertion of terminator instructions at the
end of basic blocks.
* Move a ReturnInst method out-of-line, so that the vtable and type info don't
need to be emitted to every translation unit that uses the class.
llvm-svn: 10107
2003-11-20 17:45:12 +00:00
Alkis Evlogimenos
0e9ded74c0
Merging the linear scan register allocator in trunk. It currently passes most tests under test/Programs/SingleSource/Benchmarks/Shootout so development will continue on trunk. The allocator is not enabled by default. You will need to pass -regallo=linearscan to lli or llc to use it.
...
llvm-svn: 10103
2003-11-20 03:32:25 +00:00
Chris Lattner
2447ef59c4
Don't crash if we are printing an orphaned basic block!
...
llvm-svn: 10100
2003-11-20 00:09:43 +00:00
Chris Lattner
29681dee09
Fine grainify namespaceification
...
llvm-svn: 10093
2003-11-19 21:08:57 +00:00
Chris Lattner
45cfe54683
Really, there was a reason for me factoring that out
...
llvm-svn: 10089
2003-11-19 19:20:20 +00:00
Chris Lattner
1a02ca932c
*** Significantly speed up type resultion
...
This change speeds up type resolution by checking to see if a type is
recursive, and if it's not, using a more efficient algorithm.
This dramatically reduces bytecode loading time of kc++, reducing time-to-jit
kc++ --version to 17s from 33s
llvm-svn: 10088
2003-11-19 19:10:23 +00:00
Chris Lattner
9c68fa3ab1
* Finegrainify namespacification
...
* Strength reduce several data structures which were left over from the
"bad old days"
* Minor efficiency improvements
* Major efficiency improvement: In BytecodeParser::insertValue, do not allocate
a new ValueTab entry just because some value exists with a large type. This
dramatically reduces the number of allocations/deallocations performed by the
bytecode reader, and speeds up parsing of Kimwitu++ from 34s to 17s. This is
to help address PR127
llvm-svn: 10085
2003-11-19 17:27:18 +00:00
Chris Lattner
8700c28ac9
Minor efficiency improvements, finegrainify namespacification
...
llvm-svn: 10084
2003-11-19 17:21:11 +00:00
Chris Lattner
bf346b526f
In the future, these slabs can be null...
...
llvm-svn: 10083
2003-11-19 17:20:42 +00:00
Chris Lattner
11e8f1b595
Minor efficiency improvements all over. Finegrainify Namespacification
...
llvm-svn: 10082
2003-11-19 17:17:36 +00:00
Chris Lattner
e8de15976a
Fine grainify namespacification, #include file that defines the interface!
...
llvm-svn: 10081
2003-11-19 16:06:55 +00:00
Chris Lattner
a11f78167b
Finegrainify namespacification
...
llvm-svn: 10080
2003-11-19 06:14:38 +00:00
Chris Lattner
ffa9d511f9
Minor speedup to do less linear time searches of information we already have.
...
speeds up disassembly of kc++ by .6s
llvm-svn: 10079
2003-11-19 06:01:12 +00:00
Chris Lattner
74c55dd4f9
Fix PR130, and testcase test/Regression/Linker/2003-11-18-TypeResolution.ll
...
llvm-svn: 10075
2003-11-19 01:02:52 +00:00
Chris Lattner
8c09ecf0c9
Fix PR123
...
llvm-svn: 10069
2003-11-18 17:47:05 +00:00
Brian Gaeke
921440c309
Only use -Wl,-R. if HAVE_LINK_R.
...
llvm-svn: 10066
2003-11-18 06:31:17 +00:00
Misha Brukman
be755279f3
Emit the MachineConstantPool constants in one contiguous memory `pool'.
...
llvm-svn: 10060
2003-11-17 20:40:07 +00:00
Misha Brukman
fc16bb1af5
* Order #includes as per style guide
...
* Delete blank comment lines
* Eliminate space between function name and open-paren ( to be consistent
llvm-svn: 10059
2003-11-17 20:37:02 +00:00
Chris Lattner
dc2e39191a
Implement == and != correctly. Before they would incorrectly return !=
...
for some constant exprs when they could really be the same value
llvm-svn: 10058
2003-11-17 20:19:35 +00:00
Chris Lattner
e120a73166
The ConstantPointer class is now gone.
...
llvm-svn: 10057
2003-11-17 19:47:21 +00:00
Misha Brukman
4f7ce560d5
This file was somehow missing a top-level comment line.
...
llvm-svn: 10055
2003-11-17 19:35:17 +00:00
Chris Lattner
77f20dc13f
No REALLY, get rid of ConstantPointer references
...
llvm-svn: 10054
2003-11-17 19:21:04 +00:00
Chris Lattner
4b6addf98a
Eliminate use of the ConstantPointer class
...
llvm-svn: 10053
2003-11-17 19:19:32 +00:00
Chris Lattner
9d9cbcf246
Constant folding shalt not be built on annotations
...
llvm-svn: 10052
2003-11-17 19:05:17 +00:00
Chris Lattner
ea25538936
Remove usage of ConstantPointer
...
llvm-svn: 10051
2003-11-17 17:28:29 +00:00
Chris Lattner
c96e96b26d
Be a bit more tolerant of broken code
...
llvm-svn: 10050
2003-11-17 01:17:04 +00:00
Brian Gaeke
900cc96e08
Implement skeletal support for __.SYMDEF (ranlib) sections in archives.
...
Correctly parse the Long Filename section of the archive.
When reading in archive members, set their ModuleIDs to
"ARCHIVENAME(MEMBERNAME)", as is traditional.
llvm-svn: 10043
2003-11-16 23:08:48 +00:00
Brian Gaeke
fda1f1835b
When you hand WriteAsOperand a type, it now prints out its symbolic name.
...
llvm-svn: 10042
2003-11-16 23:08:27 +00:00
Brian Gaeke
9f47927b28
When failing a Verifier assertion, use WriteAsOperand to print out the
...
offending types and/or values.
llvm-svn: 10041
2003-11-16 23:07:42 +00:00
Chris Lattner
00211f1d80
Don't print 'No predecessors!' on the entry block
...
llvm-svn: 10038
2003-11-16 22:59:57 +00:00
Chris Lattner
9005b8000c
ISO 9899 7.13.2.1 (3) says that "[...] the values of objects of automatic
...
storage duration that are local to the function containing the invocation of the
[...] setjmp macro that do not have volatile-qualified type and have been
changed between the setjmp invocation and longjmp call are indeterminate."
As such, we have to mark all variables in a function that uses 'invoke' as
volatile.
This fixes PR77
llvm-svn: 10035
2003-11-16 22:06:14 +00:00
Chris Lattner
841dd53555
Fix PR116
...
llvm-svn: 10032
2003-11-16 21:39:27 +00:00
Chris Lattner
ab6895ea76
Implement a small optimization to handling of GEP's that are equivalent to casts.
...
This results in substantially reduced collapsing for some testcases
llvm-svn: 10002
2003-11-14 17:09:46 +00:00
Chris Lattner
93dea78f85
I can't believe the incompetence of the people I have to deal with around here.
...
These fools don't even wrap code at 80 columns.
Oh wait, _I_ wrote that. That explains a lot!!
llvm-svn: 9999
2003-11-14 16:34:25 +00:00
Chris Lattner
cd45bc4086
Fix PR 110: the constant folding code assumes that if something is not a
...
constant expression, but is of (for example) ubyte type, then it is a
ConstantUInt. This was not true for placeholders.
llvm-svn: 9994
2003-11-14 06:38:46 +00:00
Chris Lattner
ef901291c6
Expose the verifier to opt
...
llvm-svn: 9984
2003-11-13 19:47:29 +00:00
Chris Lattner
d76fe4ea7d
Implement feature: InstCombine/2003-11-13-ConstExprCastCall.ll
...
llvm-svn: 9981
2003-11-13 19:17:02 +00:00
Chris Lattner
a8150c3f8d
Trying to get the dsgraph for an external function is bad for DSA's health
...
llvm-svn: 9979
2003-11-13 18:48:11 +00:00
Brian Gaeke
d81ca471dd
Change LLI's internal representation of va_list to a pointer to the next
...
argument to be returned by va_arg. This allows va_lists to be passed
between different LLVM procedures (though it is unlikely that an LLI
va_list would make sense to an external function, except by chance.)
llvm-svn: 9965
2003-11-13 06:06:01 +00:00
Chris Lattner
baef234ce3
Implement the CompleteBU pass
...
llvm-svn: 9964
2003-11-13 05:05:41 +00:00
Chris Lattner
71d3377010
Minor code cleanup
...
llvm-svn: 9962
2003-11-13 05:04:19 +00:00
Chris Lattner
fb4c057c4c
Disable integer tracking by default
...
llvm-svn: 9960
2003-11-13 03:10:49 +00:00
Chris Lattner
04946381b9
Add an initial version of the CompleteBUDataStructures class, which is currently
...
identical to the BU pass, but has an accurate call graph
llvm-svn: 9956
2003-11-13 01:43:00 +00:00
Misha Brukman
0e2e1f121a
Include the file before we close the llvm namespace.
...
llvm-svn: 9954
2003-11-13 00:23:05 +00:00
Misha Brukman
6675f982de
Substantially re-organized this file:
...
* There is now only one pass to print out assembly instead of two
* It is a FunctionPass
* The Module-level printing of globals is now in doFinalization() method of the
FunctionPass
* The code has been reformatted to follow LLVM coding standards
* Some comments, not all, were doxygenified
* Last but not least, the function to create an instance of this pass is also no
longer a method in the UltraSparc class.
llvm-svn: 9953
2003-11-13 00:22:19 +00:00
Misha Brukman
2558e8c852
The function to create an instance of this pass is no longer a method of
...
the UltraSparc class.
llvm-svn: 9952
2003-11-13 00:19:02 +00:00
Misha Brukman
167026f8c8
The functions to create new instances of passes are no longer methods in the
...
UltraSparc class. Comments are also doxygen-compatible now.
llvm-svn: 9951
2003-11-13 00:17:20 +00:00
Misha Brukman
b26c6fa4eb
* Put command-line switches in their own namespace
...
* Pass creation functions are no longer in the UltraSparc class
llvm-svn: 9950
2003-11-13 00:16:28 +00:00
Misha Brukman
893e793739
Force a dependency on the .inc file, which must be generated!
...
llvm-svn: 9949
2003-11-13 00:05:09 +00:00
Chris Lattner
9e876556fd
Fine-grainify namespaces for this library
...
llvm-svn: 9948
2003-11-12 23:11:14 +00:00
Chris Lattner
da03a8a792
Add new argument to disable checking
...
llvm-svn: 9922
2003-11-12 17:58:22 +00:00
Chris Lattner
3b93c91836
Detect problems with PHI node operands!
...
llvm-svn: 9916
2003-11-12 07:13:37 +00:00
Chris Lattner
b740afb2b0
Print return nodes for graphs with multiple functions in them correctly
...
llvm-svn: 9914
2003-11-12 04:58:19 +00:00
Chris Lattner
12c71c00ef
Don't crash if no gg
...
llvm-svn: 9913
2003-11-12 04:57:58 +00:00
Chris Lattner
ebcf5a5dba
Fix bug PR107, patch contributed by Reid Spencer!
...
llvm-svn: 9911
2003-11-12 04:40:30 +00:00
Chris Lattner
a9450bd4ac
Cleanups
...
llvm-svn: 9907
2003-11-12 00:40:34 +00:00
Brian Gaeke
960707c335
Put all LLVM code into the llvm namespace, as per bug 109.
...
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
Brian Gaeke
251b979943
Move IsArchive and IsBytecode here from gccld. Refactor into CheckMagic.
...
llvm-svn: 9901
2003-11-11 21:53:50 +00:00
Chris Lattner
da05b05197
Compute node offsets correctly
...
llvm-svn: 9895
2003-11-11 20:12:32 +00:00
Brian Gaeke
ca35fbf33d
Add implementation of FileOpenable().
...
Refactor MakeFileExecutable() & MakeFileExecutable() into AddPermissionsBits().
llvm-svn: 9892
2003-11-11 18:27:21 +00:00
Chris Lattner
fdc8d6547b
Add new method for computing node mappings. This is used by the pool allocator
...
llvm-svn: 9880
2003-11-11 05:08:59 +00:00
Brian Gaeke
8f53a89edf
Fix problems linking against the reoptimizer; _llvm_regAllocState must have
...
externally-visible linkage, and SaveStateToModule must default to true for llc.
I don't remember why I made it const; perhaps it should be deconstified.
llvm-svn: 9858
2003-11-10 07:12:01 +00:00
Chris Lattner
1e6d3053f2
Reorganize code for locality, improve comments
...
llvm-svn: 9857
2003-11-10 04:42:42 +00:00
Chris Lattner
4474336166
Adjust to new critical edge interface
...
llvm-svn: 9853
2003-11-10 04:10:50 +00:00
Brian Gaeke
c0c23c29aa
Operand numbers are now ints. Save the register allocation of the value
...
each instruction produces as "operand" -1, and the other operands as 0
.. n, as before. PhyRegAlloc::saveState() is refactored into
PhyRegAlloc::saveStateForValue().
llvm-svn: 9842
2003-11-10 00:05:26 +00:00
Chris Lattner
9a010038f1
More additions
...
llvm-svn: 9834
2003-11-09 19:54:30 +00:00
Chris Lattner
a570f7b681
Fix PR95. I'm checking this patch in for Reid Spencer, who figured it out
...
and wrote it up. Thanks!!
llvm-svn: 9832
2003-11-09 19:39:48 +00:00
Chris Lattner
da8571b464
Add an assertion
...
llvm-svn: 9831
2003-11-09 15:51:07 +00:00
Brian Gaeke
75bc7cec4b
Fix PR103
...
llvm-svn: 9830
2003-11-09 07:08:34 +00:00
Chris Lattner
984e11792f
Do NOT inline self recursive calls into other functions. This is causing the
...
pool allocator no end of trouble, and doesn't make a lot of sense anyway. This
does not solve the problem with mutually recursive functions, but they are much less common.
llvm-svn: 9828
2003-11-09 05:05:36 +00:00
Chris Lattner
d61abe82d3
Untypo
...
llvm-svn: 9827
2003-11-09 05:04:25 +00:00
Chris Lattner
950c75f135
Add more functions
...
llvm-svn: 9826
2003-11-09 04:10:41 +00:00
Chris Lattner
5011b956a9
None of the __llvm_* functions call into the program. This makes the
...
callgraph MUCH simpler for eh using program.
llvm-svn: 9825
2003-11-09 04:00:59 +00:00
Chris Lattner
cff83a2f24
Add support for memmove
...
llvm-svn: 9824
2003-11-09 03:32:52 +00:00
Brian Gaeke
c3c242c3ac
Remove #include of PassManager.h which was marked FIXME, and apparently is no
...
longer used.
llvm-svn: 9823
2003-11-09 03:15:40 +00:00
Chris Lattner
12dd38aa99
Handle bzero and memset in the local analysis, because we were missing the fact
...
that memset returns its argument!!
llvm-svn: 9811
2003-11-08 21:55:50 +00:00
Chris Lattner
2cb1db763e
This doesn't use DSCallSiteIterator
...
llvm-svn: 9809
2003-11-08 21:17:37 +00:00
Brian Gaeke
f8cb2419ee
Fix two typos I found in comments.
...
llvm-svn: 9806
2003-11-08 18:12:24 +00:00
Misha Brukman
a1eefa40dc
For some reason, LICM and GCSE like to crash the FunctionPassManager when they
...
are being added as FunctionPasses... Sigh.
llvm-svn: 9798
2003-11-08 00:01:39 +00:00
Brian Gaeke
9ef636c698
Implement vaarg instruction. This is not quite perfect: 2003-08-11-VaListArg
...
still causes a crash. But it's better than before.
llvm-svn: 9794
2003-11-07 21:20:47 +00:00
Misha Brukman
508cc3e7a9
Implement branching to a PC-relative constant (not a BasicBlock).
...
llvm-svn: 9793
2003-11-07 21:07:30 +00:00
Brian Gaeke
85baf8c65a
popStackAndReturnValueToCaller() must advance instruction pointer to normal
...
destination, if returning from an invoke.
Implement 'unwind' instruction.
llvm-svn: 9792
2003-11-07 20:44:58 +00:00
Misha Brukman
3b2343eae9
PreSelection is not optional, it performs a necessary and vital transformation
...
for the Sparc backend: breaking up constant expressions. Thus, we cannot have it
guarded by a conditional, it should never be disabled.
Also, it's now available for the JIT since it is a FunctionPass.
llvm-svn: 9791
2003-11-07 20:33:25 +00:00
Misha Brukman
d7bcd99325
Remove the *BIG UGLY HACK* from the JIT: PreSelection is now a FunctionPass.
...
llvm-svn: 9790
2003-11-07 20:32:08 +00:00
Brian Gaeke
6d145eb65f
Add stub version of unwind support
...
llvm-svn: 9789
2003-11-07 20:07:06 +00:00
Brian Gaeke
a6454d3532
visitCallInst --> visitCallSite.
...
Use visitCallSite to implement both CallInsts and InvokeInsts.
llvm-svn: 9788
2003-11-07 20:04:22 +00:00
Brian Gaeke
a6d48e4db2
Make the operation of visitCallInst() only depend on the CallSite.
...
llvm-svn: 9787
2003-11-07 19:59:08 +00:00
Brian Gaeke
18b59578c9
Use CallSites for call sites, instead of CallInsts. A revolutionary concept.
...
llvm-svn: 9784
2003-11-07 19:26:23 +00:00
Misha Brukman
2c3068026a
Switch to emitting MachineConstantPool the way it was meant to be done.
...
llvm-svn: 9777
2003-11-07 18:06:26 +00:00
Misha Brukman
2133b0513d
Switch to using the standard representation of the constant pool -- namely, the
...
MachineConstantPool. This involved refactoring the two classes involved in
printing out Sparc assembly. In fact, they should share all this code anyway.
llvm-svn: 9776
2003-11-07 17:45:28 +00:00
Misha Brukman
faa42d264f
We accept TargetMachine as a const reference.
...
llvm-svn: 9775
2003-11-07 17:44:18 +00:00
Misha Brukman
bd4a8ed139
PreSelection and PeepholeOpts are now FunctionPasses.
...
llvm-svn: 9774
2003-11-07 17:43:43 +00:00
Misha Brukman
81c748c1e2
* Stop making a global for each constant that cannot live in an instruction;
...
it will be converted to a MachineConstantPool index during instruction
selection
* This is now eligible to become a FunctionPass since it does not have any side
effects outside of the function it is processing.
llvm-svn: 9773
2003-11-07 17:31:22 +00:00
Misha Brukman
bf9ed7ac1f
* Use the MachineConstantPool for storing constants instead of a hash_set;
...
* Do not create new globals for constants!
Also, order #includes as per coding style guide
llvm-svn: 9772
2003-11-07 17:29:48 +00:00
Misha Brukman
c16149d7dd
Use `basename $<` to get just the filename, not full path, for ease of reading.
...
llvm-svn: 9770
2003-11-07 17:26:27 +00:00
Misha Brukman
ad03afcb34
Declare FunctionPasses as such so that they can be used in FunctionPassManager.
...
llvm-svn: 9768
2003-11-07 17:20:18 +00:00
Brian Gaeke
65cac90a92
Refactor the return-from-function code into popStackAndReturnValueToCaller().
...
Make external function calls slightly less special; now they get a stack frame.
llvm-svn: 9765
2003-11-07 05:22:49 +00:00
Chris Lattner
5285e9c9a0
Hopefully this will fix PR98
...
llvm-svn: 9762
2003-11-07 00:38:09 +00:00
Chris Lattner
395aef6bbe
Hopefully fix the objdir != srcdir issue
...
llvm-svn: 9761
2003-11-07 00:34:33 +00:00
Chris Lattner
72a4db8b92
Fix warnings building on sparc
...
llvm-svn: 9758
2003-11-06 21:30:05 +00:00
Chris Lattner
38cd27e450
Various cleanups and efficiency improvements
...
llvm-svn: 9753
2003-11-06 19:46:29 +00:00
Chris Lattner
b0a4b49b23
Fix bug: PR93
...
llvm-svn: 9752
2003-11-06 19:18:49 +00:00
Misha Brukman
b4ad4c3d4c
* Make the comment header 80 columns long
...
* Alphabetize #includes
llvm-svn: 9751
2003-11-06 18:06:13 +00:00
Misha Brukman
2b8724acc6
Let's not forget about our friends -- Constant Pool indices.
...
llvm-svn: 9750
2003-11-06 00:04:11 +00:00
Chris Lattner
4e1b467594
Fix the problem with running cleanups in bugpoint: We were deleting arguments
...
of intrinsic functions, causing the verifier to fail.
llvm-svn: 9745
2003-11-05 21:53:41 +00:00
Chris Lattner
9e60aced2e
Split behavior into two pieces
...
llvm-svn: 9741
2003-11-05 21:43:02 +00:00
Chris Lattner
8055fb3afa
Yet more fixes for constant expr shifts
...
llvm-svn: 9739
2003-11-05 20:43:58 +00:00
Chris Lattner
ba55bd37fe
Further fixes for PR93
...
llvm-svn: 9738
2003-11-05 20:37:01 +00:00
Chris Lattner
c3d6f21bbe
no need for endl
...
llvm-svn: 9736
2003-11-05 19:53:32 +00:00
Chris Lattner
b36e8a1a2e
Add support for constant expr shifts
...
llvm-svn: 9735
2003-11-05 19:53:03 +00:00
Chris Lattner
e225507193
If we're not checking, don't check!
...
llvm-svn: 9732
2003-11-05 19:09:40 +00:00
Chris Lattner
7c94d1171a
Fix flawed logic that was breaking several SPEC benchmarks, including gzip and crafty.
...
llvm-svn: 9731
2003-11-05 17:31:36 +00:00
Misha Brukman
e5b358c829
We know exactly what the value of $< is, so instead of using `basename $<` to
...
get just the filename and not the full path, just use the filename directly.
llvm-svn: 9730
2003-11-05 06:43:36 +00:00
Chris Lattner
a9e7fe9ea2
Do not use a class before it is defined.
...
Be gcc 3.4 clean
llvm-svn: 9727
2003-11-05 06:25:06 +00:00
Chris Lattner
b5b9ba6ff6
Be friendly to gcc 3.4... good compiler. Nice compiler.
...
llvm-svn: 9726
2003-11-05 06:20:27 +00:00
Chris Lattner
813ec04735
Be gcc 3.4 clean
...
llvm-svn: 9725
2003-11-05 06:12:18 +00:00
Chris Lattner
5f6463c041
Fix name collision
...
llvm-svn: 9722
2003-11-05 05:55:45 +00:00
Chris Lattner
41baa98478
Make code gcc 3.4 clean
...
llvm-svn: 9719
2003-11-05 05:15:42 +00:00
Brian Gaeke
4e106f0649
Abort when the user program calls abort, instead of printing a funny message and calling exit(1).
...
llvm-svn: 9716
2003-11-05 01:18:49 +00:00
Chris Lattner
8f2f598024
Fix bug with previous implementation:
...
- // ~(c-X) == X-(c-1) == X+(-c+1)
+ // ~(c-X) == X-c-1 == X+(-c-1)
Implement: C - ~X == X + (1+C)
llvm-svn: 9715
2003-11-05 01:06:05 +00:00
Brian Gaeke
221827ab07
Use regular old malloc to emulate malloc/alloca instructions.
...
llvm-svn: 9713
2003-11-05 01:02:14 +00:00
Brian Gaeke
175018317e
Remove a comment which no longer applies.
...
llvm-svn: 9712
2003-11-05 00:59:28 +00:00
Chris Lattner
e580666532
Minor cleanup, plus implement InstCombine/xor.ll:test17
...
llvm-svn: 9711
2003-11-04 23:50:51 +00:00
Chris Lattner
0f68fa6569
Implement InstCombine/xor.ll:test(15|16)
...
llvm-svn: 9708
2003-11-04 23:37:10 +00:00
Alkis Evlogimenos
9118a426d3
Change all machine basic block modifier functions in MRegisterInfo to
...
return the number of instructions added to/removed from the basic block
passed as their first argument.
Note: This is only needed because we use a std::vector instead of an
ilist to keep MachineBasicBlock instructions. Inserting an instruction
to a MachineBasicBlock invalidates all iterators to the basic
block. The return value can be used to update an index to the machine
basic block instruction vector and circumvent the iterator elimination
problem but this is really not needed if we move to a better
representation.
llvm-svn: 9704
2003-11-04 22:57:09 +00:00
Brian Gaeke
69c2841b2a
Update verifySavedState()'s comment, so that it reflects its current
...
status. In doFinalization(), skip over external functions, just like
Anand's mapping info does.
llvm-svn: 9703
2003-11-04 22:42:41 +00:00
Brian Gaeke
2a262ef095
Add comments.
...
llvm-svn: 9697
2003-11-04 18:25:56 +00:00
Chris Lattner
47dfa641c3
Fix problems in previous changes. This fixes several regressions last night.
...
llvm-svn: 9694
2003-11-04 16:04:32 +00:00
John Criswell
81587e798a
Checking in Chris's suggestions:
...
Added assert() to ensure symbol table is well formed.
Added code to remember the value that was found; resolving types can change
the symbol table and invalidate the value of the iterator.
Added comments to the ResolveTypes() function (mainly for my own benefit).
Please feel free to correct the comments if they are not accurate.
llvm-svn: 9693
2003-11-04 15:22:26 +00:00
Chris Lattner
b71c3f7430
Significantly simplify constant emission by unifying the stuff which used to build up
...
strings with the stuff that used to print to an ostream directly. We now NEVER build
up big strings, only to print them once they are formed.
llvm-svn: 9686
2003-11-03 20:19:49 +00:00
Chris Lattner
469e404370
Incorporate printSingleConstantValue into its single caller
...
llvm-svn: 9684
2003-11-03 19:44:05 +00:00
Chris Lattner
72e516f0d1
* Reformat some code
...
* Emit bools as 1/0 instead of true/false, fixing compilation of eon and
PR 83 & Jello/2003-11-03-GlobalBool.llx
llvm-svn: 9683
2003-11-03 19:33:45 +00:00
Chris Lattner
7c18b18c46
Fix InstCombine/2003-11-03-VarargsCallBug.ll
...
llvm-svn: 9681
2003-11-03 18:44:58 +00:00
Chris Lattner
39c0a19894
Work around a bug in GCC where it can't handle common variables marked weak.
...
llvm-svn: 9679
2003-11-03 17:35:00 +00:00
Chris Lattner
e4e2595f71
Fix bugs with attribute weak emission
...
llvm-svn: 9678
2003-11-03 17:32:38 +00:00
Chris Lattner
6444c37488
Implement InstCombine/cast-set.ll:test6[a]. This improves code generated for
...
a hot function in em3d
llvm-svn: 9673
2003-11-03 05:17:03 +00:00
Chris Lattner
7be3ab2fb7
This simplifies the CWriter code, makes the generated code easier to read,
...
and makes the output work with the intel compiler. Overall, a win.
llvm-svn: 9671
2003-11-03 04:31:54 +00:00
Chris Lattner
1693079e92
Implement InstCombine/cast-set.ll: test1, test2, test7
...
llvm-svn: 9670
2003-11-03 04:25:02 +00:00
Chris Lattner
af7893203b
Fix bug with zero sized casts
...
llvm-svn: 9667
2003-11-03 01:29:41 +00:00
Chris Lattner
7af7d94df2
Eliminate the silly namedContext member of printType
...
llvm-svn: 9666
2003-11-03 01:01:59 +00:00
Chris Lattner
2b9926fc8e
All DSGraphs keep a reference to the targetdata they are created with. This is
...
used to eliminate the hard coded, hacked in, sparc specific, global TargetData.
Changing the TargetData used to actually match the code fixes problems, and
eliminates a crash.
llvm-svn: 9659
2003-11-02 22:27:28 +00:00
Chris Lattner
53e8fab411
Fix bug: test/Regression/Analysis/DSGraph/2003-11-02-NodeCollapsing.ll
...
llvm-svn: 9658
2003-11-02 21:02:20 +00:00
Chris Lattner
d4d987dd4a
Fix bug in previous checkin
...
llvm-svn: 9656
2003-11-02 06:54:48 +00:00
Chris Lattner
f4ad165e8b
Implement transmogriphication of allocation instructions
...
llvm-svn: 9654
2003-11-02 05:57:39 +00:00
Chris Lattner
7f7285bab7
Fix PR78
...
llvm-svn: 9648
2003-11-02 02:06:27 +00:00
Chris Lattner
4fa54568a3
The "correct" fix for CBackend/2003-10-23-UnusedType.ll is to not even try
...
to emit types which are not used.
llvm-svn: 9647
2003-11-02 01:29:27 +00:00
Chris Lattner
7949bf0d54
Including the symbol table in the FindUsedTypes analysis was the WRONG way
...
to fix test/Regression/CBackend/2003-10-23-UnusedType.ll. This completely
neutered the deadtypeelim pass.
llvm-svn: 9646
2003-11-02 01:28:41 +00:00
Chris Lattner
b45d9077cb
Strip off CPR's manually, because if we don't, the inliner doesn't delete dead
...
functions. GRR
llvm-svn: 9641
2003-10-31 21:05:58 +00:00
Chris Lattner
9c4a58b780
Make the call graph more precise despite the hated constantpointerrefs.
...
Do you detect the animosity I feel towards CPRs yet?
llvm-svn: 9640
2003-10-31 21:05:12 +00:00
Chris Lattner
9157ec025b
Did I mention that I _HATE_ CPRs?
...
llvm-svn: 9639
2003-10-31 18:38:06 +00:00
Chris Lattner
f6925da295
Constant pointer refs are causing these to fail unnecessarily, which is causing
...
a lot of code to be pessimized. I hate CPRs. :(
llvm-svn: 9635
2003-10-31 17:51:16 +00:00
Alkis Evlogimenos
6029d4032c
Use already existing classes for post order iterator.
...
llvm-svn: 9629
2003-10-31 03:02:34 +00:00
Chris Lattner
8339f7d379
Make use of the new AssemblyAnnotationWriter interface
...
llvm-svn: 9619
2003-10-30 23:41:03 +00:00
Brian Gaeke
8541bd9db9
Include llvm/CodeGen/MachineCodeForInstruction.h. Use it to start
...
implementing verifySavedState().
In saveState(), use the new AllocInfo::AllocStateTy enum, and increment
Insn each time through the loop.
llvm-svn: 9617
2003-10-30 21:21:33 +00:00
Brian Gaeke
727ec9bec5
Make AllocState an enum.
...
Move the stringifying method for that enum into class AllocInfo.
llvm-svn: 9616
2003-10-30 21:21:22 +00:00
Alkis Evlogimenos
5a320efd3b
Output types in reverse postorder. This will allow the ByteCode/Reader
...
to create the minimum number of opaque types for each type with a
cycle in its type graph.
llvm-svn: 9615
2003-10-30 21:04:44 +00:00
Alkis Evlogimenos
404beb98ef
Put DEBUG_OUTPUT at the top along with TRACE_LEVEL. Also fix the code
...
inside DEBUG_OUTPUT so that it compiles.
llvm-svn: 9614
2003-10-30 18:33:58 +00:00