1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-26 22:42:46 +02:00
Commit Graph

3426 Commits

Author SHA1 Message Date
Misha Brukman
e315a4f211 SparcV9CodeEmitter.cpp is a part of the Sparc code emitter. The main function
that assembles instructions is generated via TableGen (and hence must be built
before building this directory, but that's already the case in the top-level
Makefile).

Also added is .cvsignore to ignore the generated file `SparcV9CodeEmitter.inc',
which is included by SparcV9CodeEmitter.cpp .

llvm-svn: 6357
2003-05-27 20:07:58 +00:00
Misha Brukman
ae0cac1d7a Added definitions for a bunch of floating-point instructions.
llvm-svn: 6356
2003-05-27 20:03:29 +00:00
Chris Lattner
66432896b4 Fix constant folding to ALWAYS work.
llvm-svn: 6355
2003-05-27 19:16:07 +00:00
Chris Lattner
416e30b07b Fix bug: Instcombine/2003-05-27-ConstExprCrash.ll
llvm-svn: 6352
2003-05-27 16:40:51 +00:00
Chris Lattner
6796f5a374 Make _sure_ we don't go into an infinite loop if a signal happens!
llvm-svn: 6351
2003-05-27 16:25:04 +00:00
Chris Lattner
8a6c3b5cbe * Actually USE the statistic that we made
* Implement SRoA for arrays

llvm-svn: 6349
2003-05-27 16:09:27 +00:00
Chris Lattner
5c093a1a93 Implementation of the simple "scalar replacement of aggregates" transformation
llvm-svn: 6346
2003-05-27 15:45:27 +00:00
Vikram S. Adve
ab50c0aee5 Renamed MachienOperand::opIsDef to MachineOperand::opIsDefOnly()
and related functions and flags.  Fixed several bugs where only
"isDef" was being checked, not "isDefAndUse".

llvm-svn: 6342
2003-05-27 00:06:48 +00:00
Vikram S. Adve
681b3c77fa (1) Added special register class containing (for now) %fsr.
Fixed spilling of %fcc[0-3] which are part of %fsr.

(2) Moved some machine-independent reg-class code to class TargetRegInfo
    from SparcReg{Class,}Info.

(3) Renamed MachienOperand::opIsDef to MachineOperand::opIsDefOnly()
    and related functions and flags.  Fixed several bugs where only
    "isDef" was being checked, not "isDefAndUse".

llvm-svn: 6341
2003-05-27 00:05:23 +00:00
Vikram S. Adve
743adbaff7 Renamed opIsDef to opIsDefOnly.
llvm-svn: 6340
2003-05-27 00:03:17 +00:00
Vikram S. Adve
66969014b2 Added special register class containing (for now) %fsr.
Fixed spilling of %fcc[0-3] which are part of %fsr.
Moved some machine-independent reg-class code to class TargetRegInfo
from SparcReg{Class,}Info.

llvm-svn: 6339
2003-05-27 00:02:22 +00:00
Chris Lattner
1fde83c9b5 Fix bug: InstCombine/2003-05-26-CastMiscompile.ll
llvm-svn: 6338
2003-05-26 23:41:32 +00:00
Vikram S. Adve
ba61ed4fc2 Bug fix: right shift for int divide-by-power-of-2 was incorrect for
negative values.  Need to add one to a negative value before right shift!

llvm-svn: 6334
2003-05-25 21:59:47 +00:00
Vikram S. Adve
f8bb6381df Bug fix: padding bytes within a structure should go after each field!
llvm-svn: 6333
2003-05-25 21:59:09 +00:00
Vikram S. Adve
b78161976c Bug fix: sign-extension was not happening for C = -MININT since C == -C!
llvm-svn: 6332
2003-05-25 21:58:11 +00:00
Chris Lattner
fbb45c1b92 Fix problem with last checkin.
llvm-svn: 6328
2003-05-25 16:15:32 +00:00
Vikram S. Adve
5553ed755a Add support for compiling varargs functions.
llvm-svn: 6325
2003-05-25 15:59:47 +00:00
Misha Brukman
6ffaa5b188 Reword to remove reference to how things worked in the past.
llvm-svn: 6323
2003-05-24 01:08:43 +00:00
Misha Brukman
b7a0d570a8 Implement the TargetInstrInfo's createNOPinstr() and isNOPinstr() interface.
llvm-svn: 6320
2003-05-24 00:09:50 +00:00
Chris Lattner
500984b918 Fix Bug: Linker/2003-04-26-NullPtrLinkProblem.ll
This was a problem with constants having their types resolved to some new type,
but there was already a constant of the new type created.  Before, these types
were never merged together, now they are.

llvm-svn: 6314
2003-05-23 20:03:32 +00:00
Misha Brukman
b385c22d80 Cleaned up code layout; no functional changes.
llvm-svn: 6312
2003-05-23 19:20:57 +00:00
Chris Lattner
e58f6153f4 Remove using declarations
llvm-svn: 6306
2003-05-22 22:00:07 +00:00
Chris Lattner
6751acb59b Add using declarations
llvm-svn: 6305
2003-05-22 21:59:35 +00:00
Misha Brukman
daf2cc3c48 Cleaned up code layout. No functional changes.
llvm-svn: 6304
2003-05-22 21:49:18 +00:00
Chris Lattner
1cab8ed666 Remove using declarations and extraneous #includes
llvm-svn: 6303
2003-05-22 21:47:17 +00:00
Chris Lattner
2fb982f365 Fix static constructor ordering problem
llvm-svn: 6302
2003-05-22 21:31:52 +00:00
Misha Brukman
7d91017b21 Kill `using' directives.
llvm-svn: 6301
2003-05-22 21:24:35 +00:00
Chris Lattner
20c876a592 Remove using declarations
llvm-svn: 6300
2003-05-22 21:21:43 +00:00
Chris Lattner
e1d3dfec23 Make the list accept comma separated names
llvm-svn: 6295
2003-05-22 20:27:13 +00:00
Chris Lattner
7099c87692 Add new CommaSeparated option modifier
llvm-svn: 6294
2003-05-22 20:26:17 +00:00
Chris Lattner
802d657a39 Destroy using declarations
llvm-svn: 6291
2003-05-22 20:06:43 +00:00
Chris Lattner
ab034e55b5 * Revert to old behavior of ignoring a module if it doesn't contain a main
function and no symbols were explicitly marked to be externalized.
* Add new -internalize-public-api-list option that can be used if the symbol
  list is small, and making a new file is annoying.

llvm-svn: 6289
2003-05-22 19:48:00 +00:00
Chris Lattner
f26f3f74a3 Add option to internalize to allow it to read a file to determine which symbols
should not be internalized

llvm-svn: 6288
2003-05-22 19:34:49 +00:00
Chris Lattner
91c5d68261 Minor cleanups.
This hunk:
-    } else if (Src->getNumOperands() == 2 && Src->use_size() == 1) {
+    } else if (Src->getNumOperands() == 2) {

Allows GEP folding to be more aggressive, which reduces the number of instructions
and can dramatically speed up BasicAA in some cases.

llvm-svn: 6286
2003-05-22 19:07:21 +00:00
Chris Lattner
0b18a0d886 Fix bug: Assembler/2003-05-03-BytecodeReaderProblem.llx
by emitting the type planes before any constants (which could be constant
expressions involving undefined types!)

llvm-svn: 6285
2003-05-22 18:35:38 +00:00
Chris Lattner
f354fef44b Do not assert fail or crash when a bytecode parse fails!
llvm-svn: 6284
2003-05-22 18:26:48 +00:00
Chris Lattner
bb4bd699e0 Eliminate the uchar typedef, use unsigned char explicitly
llvm-svn: 6283
2003-05-22 18:08:30 +00:00
Chris Lattner
2fba72b389 Fix bug: FunctionResolve/2003-05-21-MissingArguments.ll
llvm-svn: 6273
2003-05-21 20:51:52 +00:00
Chris Lattner
777fdfc135 Fix Bug: BasicAA/2003-05-21-GEP-Problem.ll
llvm-svn: 6270
2003-05-21 20:23:26 +00:00
Misha Brukman
99adbddaec Fixed `volatile' typo.
llvm-svn: 6266
2003-05-21 19:34:28 +00:00
Misha Brukman
5205d6449e Cleaned up code layout, spacing, etc. for readability purposes and to be more
consistent with the style of LLVM's code base (and itself! it's inconsistent in
some places.)

No functional changes were made.

llvm-svn: 6265
2003-05-21 18:48:06 +00:00
Chris Lattner
6253a2a210 * Fix divide by zero error with empty structs
* Empty structs should have ALIGNMENT 1, not SIZE 1.

llvm-svn: 6263
2003-05-21 18:08:44 +00:00
Misha Brukman
06de8c06e7 Cleaned up code layout, spacing, etc. for readability purposes and to be more
consistent with the style of LLVM's code base (and itself! it's inconsistent in
some places.)

No functional changes were made.

llvm-svn: 6262
2003-05-21 18:05:35 +00:00
Misha Brukman
581190c0a3 Namespacified vector' and cerr' to always use the `std::' namespace.
Eliminated `using' directives.

llvm-svn: 6261
2003-05-21 17:59:06 +00:00
Chris Lattner
0462d7b16d Add support for shift constant expressions
llvm-svn: 6260
2003-05-21 17:49:25 +00:00
Chris Lattner
0a678611b8 Fix bugs:
Assembler/2003-05-21-MalformedShiftCrash.llx
  Assembler/2003-05-21-ConstantShiftExpr.ll

llvm-svn: 6258
2003-05-21 17:48:56 +00:00
Chris Lattner
676a07589b Fix bugs:
Assembler/2003-05-21-EmptyStructTest.ll
  Assembler/2003-05-21-MalformedStructCrash.llx

llvm-svn: 6255
2003-05-21 16:06:56 +00:00
Misha Brukman
825e174bf7 Hopefully, the final fix for `[Pp]ropogate'.
llvm-svn: 6251
2003-05-20 21:01:22 +00:00
Misha Brukman
58c5ef0f4d The word operands' has an r' in it.
llvm-svn: 6250
2003-05-20 20:36:39 +00:00
Misha Brukman
80e11dcb30 Sparc instruction opcodes now all live under the `V9' namespace.
llvm-svn: 6249
2003-05-20 20:32:24 +00:00
Misha Brukman
74cf3f5246 s/convertable/convertible/g
llvm-svn: 6248
2003-05-20 18:45:36 +00:00
Chris Lattner
435e5592a9 Add support for setjmp/longjmp primitives
Patch checked in for Bill Wendling :)

llvm-svn: 6241
2003-05-17 22:26:33 +00:00
Chris Lattner
fc6cdc252d Fix bug: Assembler/2003-05-15-SwitchBug.ll
llvm-svn: 6239
2003-05-15 21:30:00 +00:00
Chris Lattner
872fe63520 Fix bug: Assembler/2003-05-15-AssemblerProblem.llx
llvm-svn: 6234
2003-05-15 19:37:21 +00:00
Chris Lattner
d8234cfa3a Fix long standing bug
llvm-svn: 6232
2003-05-15 18:25:13 +00:00
Chris Lattner
648e9d9cff Fix bug: Analysis/LoopInfo/2003-05-15-NestingProblem.ll
llvm-svn: 6230
2003-05-15 18:03:51 +00:00
Chris Lattner
d0f6311c43 Fix Bug: Linker/2003-05-15-TypeProblem.ll
llvm-svn: 6225
2003-05-15 16:30:55 +00:00
Chris Lattner
bfb822f655 Fix typeos
llvm-svn: 6204
2003-05-14 17:53:49 +00:00
Chris Lattner
5e5564a8de Add support for more constant expressions
llvm-svn: 6203
2003-05-14 17:51:49 +00:00
Chris Lattner
e02634b9aa Remove unnecessary casts
llvm-svn: 6201
2003-05-14 17:51:05 +00:00
Chris Lattner
cb3df29c52 Print opaque types
llvm-svn: 6200
2003-05-14 17:50:47 +00:00
Chris Lattner
0353c32bbe Casts are now unnecessary
llvm-svn: 6199
2003-05-14 17:50:19 +00:00
Chris Lattner
cbf31910a5 Add support for atexit function, remove support for __main function
llvm-svn: 6194
2003-05-14 14:21:30 +00:00
Chris Lattner
e7f979708b Add support for atexit handlers to the JIT, fixing 2003-05-14-AtExit.c
llvm-svn: 6193
2003-05-14 13:53:40 +00:00
Chris Lattner
6f80e1b3c7 Fix compilation problems with previous checking *blush*
llvm-svn: 6191
2003-05-14 13:27:36 +00:00
Chris Lattner
bda312754a Add a framework for intercepting system calls
llvm-svn: 6190
2003-05-14 13:26:47 +00:00
Chris Lattner
be0b81a4e9 Fix major problem with appending linkage changes
llvm-svn: 6185
2003-05-14 12:11:51 +00:00
Chris Lattner
722c3ee6c5 Fix bug
llvm-svn: 6184
2003-05-14 02:47:13 +00:00
Chris Lattner
90bd5a8004 Implement another getelementptr folding opportunity that arises when
linking stuff with appending linkage

llvm-svn: 6180
2003-05-13 21:50:52 +00:00
Chris Lattner
a33d9882ce Eliminate using declarations
llvm-svn: 6179
2003-05-13 21:37:02 +00:00
Chris Lattner
576323e25e Implement linkage of appending global variables!
llvm-svn: 6178
2003-05-13 21:33:43 +00:00
Chris Lattner
65d299c1fa Clean up cast
llvm-svn: 6174
2003-05-13 20:29:17 +00:00
Chris Lattner
f365fdec06 Clean up #includes
llvm-svn: 6173
2003-05-13 20:21:19 +00:00
Chris Lattner
c6eab62a9e Fix bug: CBackend/2003-05-13-VarArgFunction.ll
In C, a prototype with no arguments is varargs.  A prototype that takes void
has zero args.

llvm-svn: 6172
2003-05-13 20:15:37 +00:00
Chris Lattner
6a0cf6f937 Fix bug: Dominators/2003-05-12-UnreachableCode.ll
llvm-svn: 6158
2003-05-12 22:35:13 +00:00
Chris Lattner
6cb27840a7 Fix bug: LoopPreheaders/2003-05-12-PreheaderExitOfChild.ll
llvm-svn: 6153
2003-05-12 22:04:34 +00:00
Chris Lattner
19ca50fe2a Make abort more explicit
llvm-svn: 6151
2003-05-12 21:16:26 +00:00
Chris Lattner
f1a6a1fde1 Remove the assertion failure of course... doh
llvm-svn: 6150
2003-05-12 20:39:39 +00:00
Chris Lattner
ed3b3d7c99 Implement casts from unsigned integers to floating point
llvm-svn: 6148
2003-05-12 20:36:13 +00:00
Chris Lattner
a9a5cdb2be Make error messages more useful than jsut an abort
llvm-svn: 6146
2003-05-12 20:16:58 +00:00
Chris Lattner
d2bbdec4bc Remove wierd printout
llvm-svn: 6145
2003-05-12 20:10:12 +00:00
Chris Lattner
a4fe60d3c1 Use a kill, not a dead definition, update comment
llvm-svn: 6131
2003-05-12 17:37:30 +00:00
Chris Lattner
4152a8b0f7 Fix bug: CWriter/2003-05-12-IntegerSizeWarning.c
llvm-svn: 6128
2003-05-12 15:39:31 +00:00
Chris Lattner
fe799356fd Fix Bug: ConstProp/2003-05-12-DivideError.ll
llvm-svn: 6125
2003-05-12 15:26:25 +00:00
Chris Lattner
a8490da0eb Fix Bug: Assembler/2003-05-12-MinIntProblem.llx
llvm-svn: 6123
2003-05-12 15:13:52 +00:00
Chris Lattner
e78921f048 * Keep LiveVariable information more up-to-date and consistent
* *** Finally mark values that are inputs to PHIs as killed when appropriate.
   This should make the generated code quite a bit better.  For example, the
   local-ra will not have to spill PHI inputs at the end of predecessor BB's
   anymore.

llvm-svn: 6117
2003-05-12 14:28:28 +00:00
Chris Lattner
ce4b5cd9bf Fix bug where we could iterate off the end of a basic block
llvm-svn: 6116
2003-05-12 14:26:38 +00:00
Chris Lattner
a8497e3094 * Keep the BBMap around as long as the pass is live
* Change getVarInfo to take real virtual register numbers and offset them
  itself.  This has caused me so much grief, it's not even funny.

llvm-svn: 6115
2003-05-12 14:24:00 +00:00
Chris Lattner
56f8186e3e Do not insert multiple initializations for the same value in a PHI node
llvm-svn: 6113
2003-05-12 14:22:21 +00:00
Chris Lattner
3ab77b0589 Fix N^2 algorithm
llvm-svn: 6112
2003-05-12 04:08:54 +00:00
Chris Lattner
30e6616afa * Fix several comments
* Update LiveVar info better, fixing bug: Jello/2003-05-11-PHIRegAllocBug.ll

llvm-svn: 6110
2003-05-12 03:55:21 +00:00
Chris Lattner
738ee6f0fd Fix tab infestation!
llvm-svn: 6109
2003-05-12 03:54:14 +00:00
Chris Lattner
46f2fc75da Make sure that globals are emitted AFTER the passmanager is set up for the JIT,
because the globals may refer to functions that need to be compiled!

llvm-svn: 6105
2003-05-12 02:14:34 +00:00
Chris Lattner
023c628a58 switch main LLI core execution to use an InstVisitor instead of a switch statement
llvm-svn: 6081
2003-05-10 21:22:39 +00:00
Chris Lattner
011dba165e Fix testcase: SingleSource/UnitTests/2003-05-02-DependantPHI.c
llvm-svn: 6074
2003-05-10 20:21:16 +00:00
Chris Lattner
805f8d646e Add a new info-output-file option (hidden from --help) which is to be used by
the testing scripts  to avoid breaking diffs while still gathering stats.

llvm-svn: 6067
2003-05-09 20:05:44 +00:00
Chris Lattner
62fa228a18 Add support for function stubs, which allow calling functions which need to
have an address available, but have not yet been code generated.

llvm-svn: 6059
2003-05-09 03:30:07 +00:00
Chris Lattner
99520168c9 This blank line has GOT to go.
llvm-svn: 6057
2003-05-09 03:28:13 +00:00
Chris Lattner
3160b1235e Allow const functions
llvm-svn: 6056
2003-05-09 03:27:41 +00:00
Chris Lattner
a24e816c31 Add methods for stub function generation
llvm-svn: 6054
2003-05-08 21:54:18 +00:00
Chris Lattner
3656ffff9b Minor speedup by avoiding callbacks to functions already generated
llvm-svn: 6052
2003-05-08 21:44:21 +00:00
Chris Lattner
d397ac4aaf Improve efficiency of JIT by having it use direct function calls instead of
signals to regain control from the executing code

llvm-svn: 6051
2003-05-08 21:34:11 +00:00
Chris Lattner
35b3a10cf3 assert early instead of late for unimplemented feature
llvm-svn: 6050
2003-05-08 21:08:43 +00:00
Chris Lattner
78f5953056 Add support for Add, Sub, And, Or, & Xor constant exprs
llvm-svn: 6049
2003-05-08 20:49:25 +00:00
Chris Lattner
d747f762ff Add support for variable argument functions!
llvm-svn: 6046
2003-05-08 19:44:13 +00:00
Chris Lattner
4cdf86adaf Add support for variable argument functions!
llvm-svn: 6044
2003-05-08 18:41:45 +00:00
Chris Lattner
f5a5ed1a59 Implement varargs support for LLI!
llvm-svn: 6043
2003-05-08 16:52:43 +00:00
Chris Lattner
ba9142280a Add a pointersize/endianness safe load routine to match the store routine
llvm-svn: 6042
2003-05-08 16:52:16 +00:00
Chris Lattner
818643d3e9 A large number of simple changes:
* s/Method/Function
  * Kill some obsolete (external) functions that used to be to support tracing

llvm-svn: 6041
2003-05-08 16:18:31 +00:00
Chris Lattner
6aa2e81ec4 Add support for recording arguments passed through the ... of a varargs function
llvm-svn: 6040
2003-05-08 16:06:52 +00:00
Chris Lattner
746e408dd9 llvm.va_start only takes on argument now
Verify that va_start doesn't occur in functions with no varargs

llvm-svn: 6038
2003-05-08 15:55:31 +00:00
Chris Lattner
5dd2913d57 Add more support for intrinsic functions and for varargs stuff
llvm-svn: 6035
2003-05-08 03:47:33 +00:00
Chris Lattner
a7ee27e0fd Handle va_arg instruction correctly
llvm-svn: 6030
2003-05-08 02:50:13 +00:00
Chris Lattner
e1faff42f4 Add support for the new va_arg instruction
llvm-svn: 6029
2003-05-08 02:44:12 +00:00
Chris Lattner
f1f55e385c Don't inline functions that take variable numbers of arguments!
llvm-svn: 6024
2003-05-08 02:36:43 +00:00
Chris Lattner
d381dc9316 Remove using decl
llvm-svn: 6023
2003-05-08 02:34:52 +00:00
Chris Lattner
c412b950d2 Remove using declarations
llvm-svn: 6022
2003-05-08 02:08:14 +00:00
Misha Brukman
3e328da21d Added the initial version of the TableGen description for the Sparc backend.
llvm-svn: 6021
2003-05-07 21:52:39 +00:00
Chris Lattner
ba6d6034d5 Fix bug: Jello/2003-05-07-ArgumentTest.llx
Also fixes yacr2/ks benchmarks

llvm-svn: 6017
2003-05-07 20:31:37 +00:00
Chris Lattner
d3d53723a2 Add a vector to keep track of which registers are allocatable. Remove FIXMEs
llvm-svn: 6015
2003-05-07 20:08:36 +00:00
Chris Lattner
59c46ee655 IMPLICIT_DEF was not the beautiful elegant solution I thought it was going
to be.  In fact, it made stuff worse.  :(

llvm-svn: 6013
2003-05-07 19:21:28 +00:00
Chris Lattner
15d2a1b0b9 Re-add gross hack, it's still necessary. :(
llvm-svn: 6012
2003-05-06 21:44:54 +00:00
Chris Lattner
bfeffcec97 Remove hideously nasty hack
llvm-svn: 6011
2003-05-06 21:32:39 +00:00
Chris Lattner
54c4b56baf Emit pseudo instructions to indicate that some registers are live on entrance
and exit of the function.  This fixes bug: Jello/2003-05-06-LivenessClobber.llx
and the Fhourstones benchmark

llvm-svn: 6010
2003-05-06 21:32:22 +00:00
Chris Lattner
b6fab2a875 Don't have a cow with new pseudo instructions
llvm-svn: 6009
2003-05-06 21:31:47 +00:00
Chris Lattner
e4c33a0ca0 Add two new pseudo instructions
llvm-svn: 6008
2003-05-06 21:31:31 +00:00
Misha Brukman
cf277f9143 Debug output should go to cerr, not cout, because that's where bytecode goes.
llvm-svn: 6002
2003-05-04 22:51:30 +00:00
Chris Lattner
5636fe923e Fix bug: UnitTests/2003-05-02-DependantPHI.c
Fix testcase MultiSource/Ptrdist-ks

llvm-svn: 6000
2003-05-03 07:11:00 +00:00
Chris Lattner
0ec2b1188a Fix miscompilation in Fhourstones and bug: LICM/2003-05-02-LoadHoist.ll
llvm-svn: 5994
2003-05-03 03:42:08 +00:00
Chris Lattner
21b4596a3a * Eliminate using decls
* Fix some styleistic things
* Fix bug: CWriter/2002-05-16-NameCollide.ll

llvm-svn: 5988
2003-05-03 03:14:35 +00:00
Misha Brukman
bd9b827093 The Hyphenation-Adding Committee is now in session.
llvm-svn: 5986
2003-05-03 02:18:17 +00:00
Chris Lattner
984bb45d4a Attempt to fix sumant's typesafety issue
llvm-svn: 5984
2003-05-02 19:32:04 +00:00
Chris Lattner
e006ca4580 Fix spelling
llvm-svn: 5983
2003-05-02 19:26:34 +00:00
Chris Lattner
8f2c71cae2 Fix a bug which occurred with empty basic blocks
llvm-svn: 5982
2003-05-02 18:44:42 +00:00
Chris Lattner
f13fe891d1 Fix Bug: LowerSwitch/2003-05-01-PHIProblem.ll
llvm-svn: 5979
2003-05-01 22:21:21 +00:00
Chris Lattner
00a12b165a Minor cleanup
llvm-svn: 5976
2003-05-01 21:18:47 +00:00
Chris Lattner
c2eb77b84f Fix bug: LevelRaise/2003-05-01-CallCast.ll
llvm-svn: 5975
2003-05-01 21:02:53 +00:00
Chris Lattner
1d25d9e048 Eliminate use of NonCopyable so that doxygen documentation doesn't link
the Annotation classes with the noncopyable classes for no reason

llvm-svn: 5973
2003-05-01 20:28:45 +00:00
Chris Lattner
5045ab0fac Fix another case where constexprs could cause a crash
llvm-svn: 5972
2003-04-30 22:34:06 +00:00
Chris Lattner
caa766b40f Fix constant folding of constexprs
llvm-svn: 5971
2003-04-30 22:19:10 +00:00
Chris Lattner
a1250081cc Create constant expression casts instead of constant instructions if possible
llvm-svn: 5968
2003-04-28 01:25:38 +00:00
Chris Lattner
b74f4c1462 Fix several bugs:
* Warnings were emitted all of the time and were really annoying
  * Functions could not be resolved unless they had external linkage.  Linkonce
    linkage was not allowed
  * ConstantPointerRef's were not handled when linking functions
    we now actually handle cast (CPR) to X -> cast (NewCPR) to X

llvm-svn: 5967
2003-04-28 01:23:29 +00:00
Chris Lattner
7e9f0ea3fd Avoid naming things exactly the same
llvm-svn: 5966
2003-04-27 22:55:56 +00:00
Chris Lattner
bbe1aba425 Remove two fields from TargetData which are target specific.
llvm-svn: 5963
2003-04-26 20:11:09 +00:00
Chris Lattner
1039176b52 The promotion rules are the same for all targets, they are set by the C standard.
llvm-svn: 5962
2003-04-26 19:47:36 +00:00
Chris Lattner
cb8a4add15 IntegerRegSize is always 8 for sparc
llvm-svn: 5961
2003-04-26 19:44:35 +00:00
Chris Lattner
72338826c9 Fix bug: LoopPreheaders/2003-04-25-AssertFail.ll
llvm-svn: 5959
2003-04-26 19:34:18 +00:00
Chris Lattner
f5dce6b6f1 Fix a bug that occurred when removing the last predecessor INTO an
infinite loop

llvm-svn: 5953
2003-04-25 23:14:19 +00:00
Chris Lattner
d2960ee802 Fix bug: ADCE/2003-04-25-PHIPostDominateProblem.ll
llvm-svn: 5952
2003-04-25 22:53:27 +00:00
Chris Lattner
1f7fab6047 Fix bogus assert
llvm-svn: 5949
2003-04-25 21:58:54 +00:00
Chris Lattner
c5d76a4e74 Fix bug: Assembler/2003-04-25-UnresolvedGlobalReference.ll
llvm-svn: 5948
2003-04-25 21:47:33 +00:00
Chris Lattner
dc49712791 Only do the %ld -> %lld promotion when running a 64 bit bytecode on a 32 bit host
llvm-svn: 5942
2003-04-25 18:28:44 +00:00
Chris Lattner
e8eb2cb855 Add __strdup
llvm-svn: 5941
2003-04-25 18:23:38 +00:00
Chris Lattner
43e38979b5 Fix BasicAA/2003-04-25-GEPCrash.ll
llvm-svn: 5940
2003-04-25 18:03:06 +00:00
Chris Lattner
4196cc4916 MAke sure that LLI properly configures align_of(double)
llvm-svn: 5938
2003-04-25 06:15:05 +00:00
Chris Lattner
e26e308afb Whoops, 32 bit targets have _4_ byte pointers, not _32_ byte pointers!
llvm-svn: 5937
2003-04-25 06:06:43 +00:00
Chris Lattner
844b1148f4 Fix compatibility bug: X86 aligns doubles to 4 bytes, not 8!
llvm-svn: 5935
2003-04-25 06:05:57 +00:00
Chris Lattner
38d40c0ea9 Fix obvious type-o
llvm-svn: 5932
2003-04-25 05:23:10 +00:00
Chris Lattner
b72c6d38da Fix problem where we would read 64 bits worth of pointer information, even on 32 bit targets!
llvm-svn: 5930
2003-04-25 04:21:19 +00:00
Chris Lattner
c78cd5c758 Fix major problem with PHI node traversal: rechecking PHIs should go into
the visit function.  The worklist is for when their lattice value changes.

llvm-svn: 5927
2003-04-25 03:35:10 +00:00
Chris Lattner
dac0d4bafb ** CORRECTLY, conservatively handle constant expressions
llvm-svn: 5924
2003-04-25 02:52:06 +00:00
Chris Lattner
b258ffd600 Allow for easy detection of when a "default" TargetData is created by the
passmanager, which is never the right thing to do.

llvm-svn: 5922
2003-04-25 02:50:45 +00:00
Chris Lattner
7b67a6e77d Minor non-functional changes:
* Spell propagate right
  * Improve performance of phi node handling
  * Delete using directive
  * Other minor changes

llvm-svn: 5920
2003-04-25 02:50:03 +00:00
Chris Lattner
e1c995e9b6 Fix bug: mem2reg/2003-04-24-MultipleIdenticalSuccessors.ll
llvm-svn: 5919
2003-04-25 00:54:58 +00:00
Chris Lattner
6e2ea5ccff Fix a nasty bug where the ConstantMerge pass was invalidating the TargetData pass
even though it was immutable.  Immutable passes should never end up in CurrentAnalyses!

llvm-svn: 5906
2003-04-24 20:07:38 +00:00
Chris Lattner
c06795629d add a new targetdata ctor to create a target data appropriate to the module
llvm-svn: 5903
2003-04-24 19:09:05 +00:00
Chris Lattner
473df86e0b Trivial cleanup
llvm-svn: 5899
2003-04-24 18:35:51 +00:00
Chris Lattner
3dbf3f0ac1 Make the levelraise pass be well behaved w.r.t the TargetData that the current
PassMAnager provides.

llvm-svn: 5896
2003-04-24 18:25:27 +00:00
Chris Lattner
043b4a7621 Fix iterator invalidation problem
llvm-svn: 5895
2003-04-24 17:52:20 +00:00
Chris Lattner
f0c01a508b Make sure that the cloned module retains the type symbol table entries!
llvm-svn: 5894
2003-04-24 17:15:33 +00:00
Chris Lattner
868b3316c9 Make sure to preserve endiannes and pointer size when cloning modules!
llvm-svn: 5892
2003-04-24 15:54:40 +00:00
Chris Lattner
ec21fdc5ce Fix bug where pointers were assumed to always be 64 bits in size!
llvm-svn: 5890
2003-04-23 20:41:01 +00:00
Chris Lattner
84efc8b467 Add memcpy
llvm-svn: 5887
2003-04-23 20:23:16 +00:00
Chris Lattner
55a3471dab Fix a problem with setcc instructions and pointers
llvm-svn: 5886
2003-04-23 19:55:35 +00:00
Chris Lattner
34be06fad1 Implement a bunch of new external functions
llvm-svn: 5885
2003-04-23 19:55:24 +00:00
Chris Lattner
90d0ad7683 Implement &|^ on bool values
llvm-svn: 5884
2003-04-23 19:21:00 +00:00
Chris Lattner
48e894f97b Add support for _IO_getc function used on linux
llvm-svn: 5883
2003-04-23 19:20:50 +00:00
Chris Lattner
7054d8f1f1 Fix problem where labels were being incorrectly elided, and fix problem
where PHI copies where not emitted for the default label of switch insts

llvm-svn: 5882
2003-04-23 19:15:13 +00:00
Chris Lattner
1e44b1562a Fix the super obnoxious "cast to pointer from integer of different size" warnings
llvm-svn: 5881
2003-04-23 19:09:22 +00:00
Chris Lattner
896c6970fa * Implement access to external variables in LLI
* Implement GetElementPtr constant expressions when initializing global variables

llvm-svn: 5880
2003-04-23 19:01:49 +00:00
Chris Lattner
b6050c264d Fix Bug: Linker/2003-04-23-LinkOnceLost.ll
llvm-svn: 5879
2003-04-23 18:38:39 +00:00
Chris Lattner
6ae5107de6 Fix iterator invalidation problem with cast instructions
llvm-svn: 5876
2003-04-23 17:57:48 +00:00
Chris Lattner
c40d8cd8cd Implement the constantexpr CAST instruction correctly
llvm-svn: 5875
2003-04-23 17:22:12 +00:00
Chris Lattner
9938a43aac We now need to link libscalar to get the switch lowering pass
llvm-svn: 5874
2003-04-23 16:43:02 +00:00
Chris Lattner
db6b7ba364 Remove unnecesary &*'s
llvm-svn: 5872
2003-04-23 16:37:45 +00:00
Chris Lattner
3e687b8b65 Remove unneccesary &*
llvm-svn: 5871
2003-04-23 16:36:11 +00:00
Chris Lattner
ec5f9a7c4f Add support for the Switch instruction by running the lowerSwitch pass first
llvm-svn: 5867
2003-04-23 16:24:55 +00:00
Chris Lattner
a9eaa10358 New pass to lower switch instructions to branch instructions
llvm-svn: 5865
2003-04-23 16:23:59 +00:00
Chris Lattner
d609c99c87 Minor cleanups
llvm-svn: 5863
2003-04-23 16:18:14 +00:00
Misha Brukman
c881f68151 Fixed 'prevalent'.
llvm-svn: 5860
2003-04-23 02:59:05 +00:00
Misha Brukman
1d82003535 Just some code beautification changes I had sitting around in my tree.
llvm-svn: 5859
2003-04-22 23:00:08 +00:00
Chris Lattner
72a506d1f2 Fix bug: BasicAA/2003-04-22-GEPProblem.ll
llvm-svn: 5858
2003-04-22 22:00:27 +00:00
Chris Lattner
4ffd4c9cd8 Kill using declarations
Kill code for invalid operations on pointers

llvm-svn: 5856
2003-04-22 21:22:33 +00:00
Chris Lattner
56dc44e98a Implement cast to bool
llvm-svn: 5855
2003-04-22 21:15:56 +00:00
Chris Lattner
bdfa086221 Get rid of extraneous arguments to implementation functions
llvm-svn: 5852
2003-04-22 20:37:39 +00:00
Chris Lattner
43d3c3666b Add support to LLI for switch instruction
llvm-svn: 5851
2003-04-22 20:34:47 +00:00
Chris Lattner
839e486b99 Use a union to cast int to fp
llvm-svn: 5849
2003-04-22 20:20:28 +00:00
Misha Brukman
4147d10d28 It's "necessary"...
llvm-svn: 5848
2003-04-22 20:20:11 +00:00
Chris Lattner
8ca18dd9fa Add support for the switch instruction to the CWriter
llvm-svn: 5847
2003-04-22 20:19:52 +00:00
Chris Lattner
69b54208f4 Add warning when linking modules with disagreeing target properties
llvm-svn: 5845
2003-04-22 19:13:20 +00:00