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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33776 91177308-0d34-0410-b5e6-96231b3b80d8
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33531 91177308-0d34-0410-b5e6-96231b3b80d8
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33226 91177308-0d34-0410-b5e6-96231b3b80d8
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33211 91177308-0d34-0410-b5e6-96231b3b80d8
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32953 91177308-0d34-0410-b5e6-96231b3b80d8
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32906 91177308-0d34-0410-b5e6-96231b3b80d8