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

93 Commits

Author SHA1 Message Date
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
Reid Spencer
802b61596b Regenerate.
llvm-svn: 33180
2007-01-13 04:40:16 +00:00
Reid Spencer
d8f39d1fb3 Can't generate "bool" any more. Change to i1
llvm-svn: 33179
2007-01-13 04:39:47 +00:00
Reid Spencer
5323d61918 Regenerate.
llvm-svn: 33172
2007-01-13 00:23:06 +00:00
Reid Spencer
7db973e85f Don't attempt to upgrade argument to va.start and va.end if there are none.
llvm-svn: 33171
2007-01-13 00:22:40 +00:00
Reid Spencer
db6bf82482 Regenerate.
llvm-svn: 33169
2007-01-13 00:13:49 +00:00
Reid Spencer
d64e8bc8ac Regenerate.
llvm-svn: 33165
2007-01-13 00:03:30 +00:00
Reid Spencer
f9c112d36d For PR1093:
Implement upgrading of the varargs intrinsics. These must now have i8*
arguments. This patch bitcasts arguments to i8* and fixes the prototypes.

llvm-svn: 33163
2007-01-13 00:02:00 +00:00
Reid Spencer
4eea43e6ce Regenerate.
llvm-svn: 33140
2007-01-12 20:10:51 +00:00
Reid Spencer
64620485d0 Remove support for upgrading NOT. The llvm-upgrade lexer didn't recognize
it either. NOT is just plain illegal now.

llvm-svn: 33139
2007-01-12 20:09:48 +00:00
Chris Lattner
291062988d Fix persistent conflict madness by removing these from cvs.
llvm-svn: 33111
2007-01-12 05:35:13 +00:00
Zhou Sheng
23d24526b2 For PR1043:
Merge ConstantIntegral and ConstantBool into ConstantInt.
Remove ConstantIntegral and ConstantBool from LLVM.

llvm-svn: 33073
2007-01-11 12:24:14 +00:00
Reid Spencer
a56e79c32d Regenerate.
llvm-svn: 32987
2007-01-07 08:07:39 +00:00
Reid Spencer
5c270b3d20 Upgrade the llvm.isunordered intrinsics to "fcmp uno" instruction.
llvm-svn: 32986
2007-01-07 08:07:10 +00:00
Reid Spencer
86cc7756cd Regenerate.
llvm-svn: 32955
2007-01-06 06:04:32 +00:00
Reid Spencer
5676c4009d For PR1082:
Solve several related problems by making variable names more unique and
dealing with recursive phi nodes. Unfortunately, this doesn't solve the
main issue reported in the PR, but its a step in that direction.

llvm-svn: 32953
2007-01-06 06:03:09 +00:00
Reid Spencer
227f5ff545 Regenerate
llvm-svn: 32944
2007-01-06 00:23:53 +00:00
Reid Spencer
1c20034d33 For PR1080:
Emit the correct syntax for icmp and fcmp constant expressions. The
predicate goes outside the parentheses not inside. This was a change made
in the assembler without the corresponding change made in llvm-upgrade.

llvm-svn: 32942
2007-01-06 00:12:05 +00:00
Reid Spencer
bed19cee73 Fix dependencies. The lexer depends on the grammar for the UpgradeParser.h
file so make it depend on the .y file as well. This ensures that in
parallel builds the lexer is built after bison runs.

llvm-svn: 32937
2007-01-05 22:03:42 +00:00
Reid Spencer
a8a4cdc2cb Regenerate
llvm-svn: 32908
2007-01-05 17:20:02 +00:00
Reid Spencer
b5198c9e06 Adjust to new header file name.
llvm-svn: 32907
2007-01-05 17:19:32 +00:00
Reid Spencer
e1e9aa99ae Major update of llvm-upgrade:
1. Completely revise the type system so that types are handled as const
   objects and not created multiple times, cloned, or otherwise copied.
   This gets around memory issues, saves memory, and also emulates LLVM's
   no-two-types-of-the-same-shape-created semantics.
2. Adjust the handling of global names. Basically, we cannot rename them
   for a variety of reasons: linking, forward references, etc.
3. Detect global names that have name conflicts as the result of collapsed
   type planes or redefinitions that llvm-as no longer accepts. These will
   produce warnings on stderr and one of the globals will be renamed.
4. Rename ParserInternals.h as UpgradeInternals.h so it doesn't conflict
   in the debugger with ParserInternals.h from lib/AsmParser.
5. Move the guts of the TypeInfo class into the grammar so we aren't
   implementing large functions in a header file. This also helps with
   debugging a bit.

llvm-svn: 32906
2007-01-05 17:18:58 +00:00
Chris Lattner
6ef6a513f8 regenerate
llvm-svn: 32880
2007-01-04 18:46:42 +00:00
Chris Lattner
b3c4e9aa67 If we hit a parse error, emit something bad to the output stream. This ensures that
llvm-upgrade < foo | llvm-as | llvm-dis

will fail if llvm-upgrade fails.

llvm-svn: 32879
2007-01-04 18:45:51 +00:00
Reid Spencer
016eed41fd Regenerate.
llvm-svn: 32848
2007-01-03 23:45:42 +00:00
Reid Spencer
05b5eea728 Implement many new type features including upreferences, proper retention
of structure contents, counts of packed and array types, etc.

llvm-svn: 32847
2007-01-03 23:45:17 +00:00
Reid Spencer
82042de44e Finish implementation of variable renaming to handle collapsed type planes
by correctly handling up references and enumerated types. Previously there
was some confusion of these two. Thanks to Chris Lattner for demistifying
llvm up references.

llvm-svn: 32846
2007-01-03 23:43:55 +00:00
Reid Spencer
b053ee57b0 Regenerate.
llvm-svn: 32817
2007-01-02 06:34:08 +00:00
Reid Spencer
740121454a Permit signed and unsigned integer constants to be used with either signed
or unsigned integer types.

llvm-svn: 32816
2007-01-02 06:33:02 +00:00
Reid Spencer
58e33da5ec Regenerate.
llvm-svn: 32811
2007-01-02 05:45:11 +00:00
Reid Spencer
538a40d6b8 For PR1070:
Revise the upgrade parser to keep track of types more faithfully and use
this information to resolve name conflicts resulting from collapsed type
planes. The type planes have collapsed because the integer types are now
signless so that uint and int became i32. Where two planes existed for uint
and int, only i32 exists. Any variable names depending on the type planes
to pmake the identifier unique would cause a conflict. This patch resolves
that conflict for many but not all cases.

Situations involving the integer types and pointers to them are handled
by this patch.  However, there are corner cases that are not handled
well, such as:

%t1 = type { uint, int }
%t2 = type { int, uint }

void %myfunc(%t1* one, %t2* two) {
  %var = load %t1* one
  %var = load %t2* two
}

In the scenario above, %t1 and %t2 are really the same type: { i32, i32 }
Consequently attempting to name %var twice will yield a redefinition error
when assembled.

While this patch is sufficien to allow the llvm/test suite to pass, More
work needs to be to complete the handling of these corner cases.

llvm-svn: 32810
2007-01-02 05:44:33 +00:00
Reid Spencer
be379ce176 Regenerate.
llvm-svn: 32805
2007-01-01 01:20:41 +00:00
Reid Spencer
9bd62917ea For PR1070:
Remove useless bitcasts by commenting them out.

llvm-svn: 32804
2007-01-01 01:20:16 +00:00
Reid Spencer
6678d20ec9 For PR950:
Convert signed integer types to signless.

llvm-svn: 32790
2006-12-31 06:02:26 +00:00