1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 22:12:57 +02:00
Commit Graph

126 Commits

Author SHA1 Message Date
Reid Spencer
cb3d63d07c Regenerate.
llvm-svn: 35116
2007-03-15 03:26:42 +00:00
Reid Spencer
fa12fdc543 Revert last changes as they introduced other problems.
llvm-svn: 35115
2007-03-15 03:25:34 +00:00
Reid Spencer
ce9e3ade3a Regenerate.
llvm-svn: 35113
2007-03-14 23:13:06 +00:00
Reid Spencer
04cb556bca The sign information was not propagating into the rename map so only the
last entry stored in the map could be retrieved for a given integer type.
Propagating the sign information required an invasive change to ensure that
all ValueRef (ValID) instances get the right sign information as well. Also,
put in some assertions to ensure the RenameMap always gives us out the type
that is expected.

This fixes PR1256 and
test/Assembler/2007-03-14-UgpradeLocalSignless.ll

llvm-svn: 35112
2007-03-14 23:11:45 +00:00
Reid Spencer
bf9ab59940 For PR1256:
Carry sign with ValID and make TypeInfo sortable (useful in a map).

llvm-svn: 35111
2007-03-14 23:08:04 +00:00
Jeff Cohen
c9e2aa16cb Make older versions of bison happy.
llvm-svn: 35099
2007-03-14 15:27:17 +00:00
Chris Lattner
9fcc5048b8 remove use of deprecated api
llvm-svn: 34416
2007-02-19 07:34:02 +00:00
Reid Spencer
e7ff3305d6 For PR1195:
Change use of "packed" term to "vector" in comments, strings, variable
names, etc.

llvm-svn: 34300
2007-02-15 03:39:18 +00:00
Reid Spencer
55e4e98a2a For PR1195:
Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and
PackedTyID -> VectorTyID. No functional changes.

llvm-svn: 34293
2007-02-15 02:26:10 +00:00
Chris Lattner
ea38fbb2bd regenerate
llvm-svn: 34225
2007-02-13 06:04:17 +00:00
Chris Lattner
d01df38c4c remove use of vector-related ctors
llvm-svn: 34224
2007-02-13 06:03:48 +00:00
Chris Lattner
3b0621de26 stop using me thods that take a vector
llvm-svn: 34206
2007-02-12 22:58:38 +00:00
Chris Lattner
88ba48fcec regenerate
llvm-svn: 34188
2007-02-11 21:40:10 +00:00
Chris Lattner
26a13f469e add #include
llvm-svn: 34187
2007-02-11 21:39:35 +00:00
Reid Spencer
864b5b7925 Regenerate.
llvm-svn: 34050
2007-02-08 09:08:52 +00:00
Reid Spencer
3eeb7956ca Rename a field so there's less confusion between fields of the same name.
llvm-svn: 34049
2007-02-08 09:08:23 +00:00
Reid Spencer
2306ba13ca For PR1187:
Rename function scope names that conflict with basic block names.

llvm-svn: 34048
2007-02-08 09:07:25 +00:00
Reid Spencer
f0bd1b5402 For PR1187:
Always rename, never give a redef error. We could check for collapsed type
planes and generate an error if that's not the cause, but the 99.9999
percentile case will be that its the result of collapsed type planes. So,
rather than doing an expensive check, just rename.

llvm-svn: 34047
2007-02-08 08:47:38 +00:00
Reid Spencer
2548dfd4c9 For PR1187:
Some changes to get the smbd.ll test case working:
1. Move the logic for CSRETCC->sret attribute out of the ResolveDefinitions
   code and into getExistingValue. This resolves it much earlier and works
   in function scope as well.
2. Fix handling of CSRETCC->sret for the store instruction.
3. Rewrite the code for handling renaming to factor in linkage types.
4. Rename a structure filed for a PATypeInfo* so it doesn't get confused
   with a field for a Type*.

llvm-svn: 34043
2007-02-08 08:09:36 +00:00
Reid Spencer
808eee2513 Regenerate for recent changes.
llvm-svn: 34025
2007-02-08 00:21:40 +00:00
Reid Spencer
ff9598b8f0 For PR1187:
When a naming conflict arises, allow internal linkage functions to be
renamed without warning or error.

llvm-svn: 34024
2007-02-08 00:21:06 +00:00
Reid Spencer
14c07da285 For PR1187:
Allow @ before identifer names. Recognize the i1, i8, i16, i32, i64 keywords
as type names corresponding to bool, ubyte, ushort, uint, and ulong
respectively. While these aren't LLVM 1.9 constructs, permitting the syntax
allows post-1.9 assembly files to be upgraded.

llvm-svn: 34023
2007-02-08 00:19:40 +00:00
Reid Spencer
83803ddedb For PR411:
Adjust to changes in Module interface:
getMainFunction() -> getFunction("main")
getNamedFunction(X) -> getFunction(X)

llvm-svn: 33922
2007-02-05 21:19:13 +00:00
Reid Spencer
6af21b3029 For PR411:
This patch replaces the SymbolTable class with ValueSymbolTable which does
not support types planes. This means that all symbol names in LLVM must now
be unique. The patch addresses the necessary changes to deal with this and
removes code no longer needed as a result. This completes the bulk of the
changes for this PR. Some cleanup patches will follow.

llvm-svn: 33918
2007-02-05 20:47:22 +00:00
Reid Spencer
713b7f4793 Regenerate.
llvm-svn: 33859
2007-02-04 01:12:11 +00:00
Reid Spencer
2b569f91d6 For PR1151:
Make llvm-upgrade valgrind clean. Deleting type instances is a really
nasty thing to do to LLVM. This was a hold-over from the re-write.
This fixes test/Assembler/2007-01-22-UpgradeTypeMapInvalidMemory.ll and
potentially many other bugs.

llvm-svn: 33858
2007-02-04 01:05:23 +00:00
Reid Spencer
591bfa1e0b Changes to support making the shift instructions be true BinaryOperators.
This feature is needed in order to support shifts of more than 255 bits
on large integer types.  This changes the syntax for llvm assembly to
make shl, ashr and lshr instructions look like a binary operator:
   shl i32 %X, 1
instead of
   shl i32 %X, i8 1
Additionally, this should help a few passes perform additional optimizations.

llvm-svn: 33776
2007-02-02 02:16:23 +00:00
Reid Spencer
19af04a142 For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoid
confusion with external linkage types.

llvm-svn: 33663
2007-01-30 20:08:39 +00:00
Reid Spencer
dd596b2eba Regenerate.
llvm-svn: 33624
2007-01-29 19:08:46 +00:00
Reid Spencer
8a00fdcf3b For PR1142:
When an unresolved definition is found, check to see if it is only unresolved
because the csretcc was upgraded to the sret param attribute. Such changes
change the function type and lead to unresolved definitions. In such cases, just
cast the function to the type expected by the CallInst. That is, cast to the
version of the function that has the sret param attribute.

llvm-svn: 33623
2007-01-29 19:07:18 +00:00
Reid Spencer
9fe58fc698 Regenerate.
llvm-svn: 33615
2007-01-29 05:41:34 +00:00
Reid Spencer
18474266bb Upgrade old csret calling convention into sret parameter attribute.
llvm-svn: 33614
2007-01-29 05:41:09 +00:00
Anton Korobeynikov
f9c1fdf118 Merge error at my side. Fixed.
llvm-svn: 33601
2007-01-28 15:25:24 +00:00
Anton Korobeynikov
2b64d8a83f Regenerate
llvm-svn: 33599
2007-01-28 13:37:39 +00:00
Anton Korobeynikov
95f3449d4d Drop CSRET CC
llvm-svn: 33598
2007-01-28 13:36:18 +00:00
Reid Spencer
e9a20b92a6 Regenerate.
llvm-svn: 33595
2007-01-28 00:52:05 +00:00
Reid Spencer
2041d78a6f For PR1137:
When a value is found to have the same name as another, try harder to
disambiguate when its a type plane collapse issue and when it isn't. We
traverse the type to see if it contains an integer. If it does not then
we issue the error because it can't be resulting from integer type planes
collapsing. Otherwise we just rename it, even if that's a bit of overkill.

llvm-svn: 33594
2007-01-28 00:51:40 +00:00
Reid Spencer
1db79d3e23 Regenerate.
llvm-svn: 33547
2007-01-26 20:31:18 +00:00
Reid Spencer
e603c7d836 Make sure that an upgraded index is also inserted into the VIndices
otherwise it gets ignored.

This fixes test/CodeGen/X86/2006-05-11-InstrSched.ll

Thanks to Evan Cheng for noticing this.

llvm-svn: 33546
2007-01-26 20:29:52 +00:00
Reid Spencer
789695ba1b Regenerate.
llvm-svn: 33545
2007-01-26 19:59:25 +00:00
Reid Spencer
79ba72f85f Ensure that gep_upgrade zext instructions we insert have unique names.
llvm-svn: 33544
2007-01-26 19:58:59 +00:00
Reid Spencer
222bbf77bf Remove extraneous ; to make some versions of bison happy.
llvm-svn: 33541
2007-01-26 18:26:23 +00:00
Reid Spencer
6217b36f4c Remove the SignedType class and other dead code. Improve comments.
llvm-svn: 33538
2007-01-26 17:13:53 +00:00
Reid Spencer
91f00fc6c2 Regenerate.
llvm-svn: 33532
2007-01-26 08:19:09 +00:00
Reid Spencer
5679fd076e For All These Bugs:
PR645
PR761
PR1082
PR1122

Completely rewrite llvm-upgrade. This should be its final design. Any future
changes will use this same design.  The changes involve the following:

1. Make this work very much like the 1.9 AsmParser
2. Retain old upgrades dating back to release 1.2 time frame.
3. Merge in some of the upgrades between 1.9 and 2.0 (e.g. icmp/fcmp).
4. Attach a Signedness value (Signless, Unsigned, Signed) to every type,
   Value, Constant, Instruction, and list of those things in the Parser.
   Use these to make signedness decisions for instruction upgrades.
5. Implement unique name upgrade for function values and global values.
6. Identify rename cases that might cause problems and warn about them.
   For example: renaming a global variable with external linkage.
7. Generate a 2.0 IR using VMCore. This is necessary for numerous
   reasons and has the advantage that it never goes out of date.
8. Use the AsmPrinter to make the output nice.
9. Clean up error and warning messages from 1.9 form.

llvm-svn: 33531
2007-01-26 08:18:34 +00:00
Jeff Cohen
26e74c3794 Fix a bunch of missing semicolon parse errors from bison.
llvm-svn: 33426
2007-01-21 19:30:52 +00:00
Reid Spencer
a322dfce5f Regenerate.
llvm-svn: 33227
2007-01-15 02:41:46 +00:00
Reid Spencer
c32e0fedab For PR1113:
Increment the counter after the second use, not after the first use. This
fixes PR1113.

Also, rename some classes for simplicity and to more naturally be
reminscient of LLVM 1.9. This in preparation for additional classes that
will provide a scaled down model of the LLVM 1.9 IR.

llvm-svn: 33226
2007-01-15 02:40:33 +00:00
Reid Spencer
0b130d9f4d Regenerate
llvm-svn: 33212
2007-01-15 00:26:18 +00:00
Reid Spencer
a5cbe5f4e5 Reorganize things a bit in preparation for rewrite. Although this looks
like a lot, its really only two changes:

1. Move stuff that should be private to .y out of the .h file.
2. Make all semantic values pointers.

This cleans up the silly destroy methods and changes them to delete. It
also moves the TypeInfo and ValueInfo classes into the .y where we can
modify them more readily because they have no clients any more.

This shouldn't result in any functional changes in llvm-upgrade.

llvm-svn: 33211
2007-01-15 00:25:53 +00:00