Commit Graph

1740 Commits

Author SHA1 Message Date
Jim Laskey
95af592a63 Automatically generating intrinsic declarations from Dan Gohman. Modified
to construct FunctionType in separate function, and, have getDeclaration
return a Function instead of a Constant.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34008 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 20:38:26 +00:00
Devang Patel
f5e28d9dfe Do not drop transferred last uses on the floor.
Use handleLastUserOverflow().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34006 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 19:37:53 +00:00
Chris Lattner
92f5b6a784 constants can't be in the symtab anymore
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33993 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 06:28:48 +00:00
Chris Lattner
b4d8d62345 update comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33992 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 06:25:36 +00:00
Chris Lattner
7f1444bc0a shrink vmcore by moving symbol table stripping support out of VMCore into
the one IPO pass that uses it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33990 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 06:22:45 +00:00
Chris Lattner
56920a0ecc eliminate ValueSymbolTable::rename, it has no advantage over using remove+insert.
Make insert/remove assert if used incorrectly instead of returning a bool.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33988 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 06:13:49 +00:00
Chris Lattner
421d3daa05 speed up conflict handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33985 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 05:52:51 +00:00
Chris Lattner
58f84d4b2d Eliminate the O(n) version of TypeSymbolTable::remove, it is dead. When
inserting a type into the type symbol table, only compute unique name if not
in symtab already.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33983 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 05:35:58 +00:00
Chris Lattner
67408dab1b TypeSymbolTable::rename is dead, remove it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33982 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 05:29:34 +00:00
Chris Lattner
f5111552c2 Eliminate a bunch of work from ValueSymbolTable::insert for the common case
where a symbol name doesn't conflict.  This speeds up bc reading 16% on 176.gcc!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33981 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 05:22:49 +00:00
Jim Laskey
ba4cc09f51 Support var arg intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33962 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-06 18:02:54 +00:00
Chris Lattner
775bd83050 Fix Transforms/ConstProp/2007-02-05-BitCast.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33948 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-06 02:22:56 +00:00
Reid Spencer
554cec6e65 A value of 64 or fewer bits is valid if the ConstantInt has more then 64 bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33942 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-05 23:47:56 +00:00
Reid Spencer
688b0490e2 For PR411:
Adjust to changes in Module interface:
getMainFunction() -> getFunction("main")
getNamedFunction(X) -> getFunction(X)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33922 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-05 21:19:13 +00:00
Reid Spencer
ef9b9a7939 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33918 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-05 20:47:22 +00:00
Devang Patel
90f1ad7bf4 Fix PR1158
Do not insert Analysis pass, if it is already available.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33915 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-05 19:34:17 +00:00
Reid Spencer
6734b57d1b For PR1163:
Make the Module's dependent library use a std::vector instead of SetVector
adjust #includes in .cpp files because SetVector.h is no longer included.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33855 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-04 00:40:42 +00:00
Reid Spencer
ebe57e36df Fix a comment that needed to change after SHIFT patch landed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33781 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-02 13:54:55 +00:00
Reid Spencer
832254e1c2 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33776 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-02 02:16:23 +00:00
Devang Patel
e27ae7e44e cvs commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33765 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-01 22:08:25 +00:00
Chris Lattner
2e21fce987 silence some warnings when assertions are disabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33747 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-01 04:59:37 +00:00
Reid Spencer
92905d95a0 Fix build breakage by using correct arguments to getIndexedType in the
GEP constructors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33726 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-31 22:30:26 +00:00
Chris Lattner
6ffbe17b3c implement the new GEP instruction ctors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33708 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-31 19:47:18 +00:00
Chris Lattner
2b9a5daf7c Revise APIs for creating constantexpr GEPs to not require the use of vectors.
This allows us to eliminate many temporary vectors, and theirassociated malloc/free pairs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33692 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-31 04:40:28 +00:00
Reid Spencer
5cbf985dcb For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoid
confusion with external linkage types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33663 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-30 20:08:39 +00:00
Devang Patel
c874eb54ec - Undo previous check-in (i.e. Do not export TimingInfo class through
PassManagers.h).

- Add StopPassTimer() and StartPassTimer() to expose TimingInfo to
CallGraphPassManager

- Use these two APIs in CalLgraphPassManager to measure timings.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33638 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-29 23:10:37 +00:00
Devang Patel
b05ef6a8eb Move TimingInfo into PassManagers.h so that other libs can use it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33626 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-29 20:06:26 +00:00
Anton Korobeynikov
b10308e440 Propagate changes from my local tree. This patch includes:
1. New parameter attribute called 'inreg'. It has meaning "place this
parameter in registers, if possible". This is some generalization of
gcc's regparm(n) attribute. It's currently used only in X86-32 backend.
2. Completely rewritten CC handling/lowering code inside X86 backend.
Merged stdcall + c CCs and fastcall + fast CC.
3. Dropped CSRET CC. We cannot add struct return variant for each
target-specific CC (e.g. stdcall + csretcc and so on).
4. Instead of CSRET CC introduced 'sret' parameter attribute. Setting in
on first attribute has meaning 'This is hidden pointer to structure
return. Handle it gently'.
5. Fixed small bug in llvm-extract + add new feature to
FunctionExtraction pass, which relinks all internal-linkaged callees
from deleted function to external linkage. This will allow further
linking everything together.

NOTEs: 1. Documentation will be updated soon.
       2. llvm-upgrade should be improved to translate csret => sret.
          Before this, there will be some unexpected test fails.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33597 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-28 13:31:35 +00:00
Jim Laskey
44c3b9fdd4 Change the MachineDebugInfo to MachineModuleInfo to better reflect usage
for debugging and exception handling.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33550 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 21:22:28 +00:00
Reid Spencer
f00c595bf5 For PR761:
Remove the setEndianess and setPointerSize methods. These are now
handled via the setDataLayout method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33527 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 08:07:57 +00:00
Reid Spencer
3702d265b8 For PR645:
Implement new syntax for local and global symbols. Types and local
symbols use the % prefix. Global variables and functions use the @ prefix.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33523 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 08:02:52 +00:00
Reid Spencer
0fc052c36f For PR645:
Remove the Function::renameLocalSymbols function as it is no longer
needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33522 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 08:01:30 +00:00
Reid Spencer
43276ee280 IntegerType is a sized DerivedType too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33521 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 07:51:36 +00:00
Reid Spencer
3d10b0b2d3 Clean up comments and assert messages that still refer to the old type names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33520 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 07:37:34 +00:00
Reid Spencer
ca01cfe4df Fix an assertion message.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33519 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 06:30:34 +00:00
Reid Spencer
2c7123c558 Whoops, fix typo in last commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33417 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-21 02:29:10 +00:00
Reid Spencer
24d6da5fed For PR970:
Clean up handling of isFloatingPoint() and dealing with PackedType.
Patch by Gordon Henriksen!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33415 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-21 00:29:26 +00:00
Chris Lattner
58092e35a3 Teach TargetData to handle 'preferred' alignment for each target, and use
these alignment amounts to align scalars when we can.  Patch by Scott Michel!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33409 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-20 22:35:55 +00:00
Reid Spencer
ab60be7a00 Remove dead methods in the ValTypes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33372 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-19 21:25:12 +00:00
Reid Spencer
c10305743c For PR1043:
This is the final patch for this PR. It implements some minor cleanup
in the use of IntegerType, to wit:
1. Type::getIntegerTypeMask -> IntegerType::getBitMask
2. Type::Int*Ty changed to IntegerType* from Type*
3. ConstantInt::getType() returns IntegerType* now, not Type*

This also fixes PR1120.

Patch by Sheng Zhou.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33370 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-19 21:13:56 +00:00
Reid Spencer
b5f378e11b Use a cheaper computation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33336 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-18 18:14:49 +00:00
Reid Spencer
7808dcba05 Provide an isPowerOf2ByteWidth method for the IntegerType class. This will
mostly be used by back ends that wish to distinguish between integer types
that fit evenly within a natural integer type and those that don't.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33328 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-18 02:59:54 +00:00
Devang Patel
44b0d29802 Update ModulePass::assignPassManager() to take into account Preferred
Pass Manager Type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33308 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 21:19:23 +00:00
Devang Patel
26426949f3 s/PassDebugging_New/PassDebugging/g
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33307 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 20:33:36 +00:00
Devang Patel
be1ffc6b8d Update assignPassManager() signature to allow selection of preferred
pass manager type. This allows new FPPassManager to select Call Graph
Pass Manager (if available) as its parent.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33306 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 20:30:17 +00:00
Reid Spencer
0a11af1f73 For PR1117:
Expose the previously hidden checkCast function as CastInst::castIsValid.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33282 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 02:46:11 +00:00
Devang Patel
8df87095fc Pass manager may require certain analysis. In such cases, initially
pass manager is last user.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33273 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-16 22:38:10 +00:00
Devang Patel
9d133e150f Undo last check-in.
Remove setupPassManager() and its use.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33270 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-16 21:43:18 +00:00
Devang Patel
531f01f878 Setup pass manager before scheduling required analysis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33262 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-16 19:46:09 +00:00
Devang Patel
8f3f3d103a Code refactoring.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33245 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-16 02:00:38 +00:00