Chris Lattner
83e39edf72
Fix Transforms/ConstProp/2007-02-05-BitCast.ll
...
llvm-svn: 33948
2007-02-06 02:22:56 +00:00
Reid Spencer
6da19310e3
A value of 64 or fewer bits is valid if the ConstantInt has more then 64 bits.
...
llvm-svn: 33942
2007-02-05 23:47:56 +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
Devang Patel
a2287f3205
Fix PR1158
...
Do not insert Analysis pass, if it is already available.
llvm-svn: 33915
2007-02-05 19:34:17 +00:00
Reid Spencer
310b497b59
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.
llvm-svn: 33855
2007-02-04 00:40:42 +00:00
Reid Spencer
da848a64ce
Fix a comment that needed to change after SHIFT patch landed.
...
llvm-svn: 33781
2007-02-02 13:54:55 +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
Devang Patel
f178d112ce
cvs commit
...
llvm-svn: 33765
2007-02-01 22:08:25 +00:00
Chris Lattner
ca583c51b3
silence some warnings when assertions are disabled.
...
llvm-svn: 33747
2007-02-01 04:59:37 +00:00
Reid Spencer
a22881da40
Fix build breakage by using correct arguments to getIndexedType in the
...
GEP constructors.
llvm-svn: 33726
2007-01-31 22:30:26 +00:00
Chris Lattner
55e5440018
implement the new GEP instruction ctors.
...
llvm-svn: 33708
2007-01-31 19:47:18 +00:00
Chris Lattner
b5aa990588
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.
llvm-svn: 33692
2007-01-31 04:40:28 +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
Devang Patel
61ccc1c4b0
- 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.
llvm-svn: 33638
2007-01-29 23:10:37 +00:00
Devang Patel
fa27881c1c
Move TimingInfo into PassManagers.h so that other libs can use it.
...
llvm-svn: 33626
2007-01-29 20:06:26 +00:00
Anton Korobeynikov
611d5e2eda
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.
llvm-svn: 33597
2007-01-28 13:31:35 +00:00
Jim Laskey
64f4242072
Change the MachineDebugInfo to MachineModuleInfo to better reflect usage
...
for debugging and exception handling.
llvm-svn: 33550
2007-01-26 21:22:28 +00:00
Reid Spencer
00a7dd7d6b
For PR761:
...
Remove the setEndianess and setPointerSize methods. These are now
handled via the setDataLayout method.
llvm-svn: 33527
2007-01-26 08:07:57 +00:00
Reid Spencer
e2ac333854
For PR645:
...
Implement new syntax for local and global symbols. Types and local
symbols use the % prefix. Global variables and functions use the @ prefix.
llvm-svn: 33523
2007-01-26 08:02:52 +00:00
Reid Spencer
cca21cf060
For PR645:
...
Remove the Function::renameLocalSymbols function as it is no longer
needed.
llvm-svn: 33522
2007-01-26 08:01:30 +00:00
Reid Spencer
93b5ba7cd2
IntegerType is a sized DerivedType too.
...
llvm-svn: 33521
2007-01-26 07:51:36 +00:00
Reid Spencer
641bcdce55
Clean up comments and assert messages that still refer to the old type names.
...
llvm-svn: 33520
2007-01-26 07:37:34 +00:00
Reid Spencer
25d0264daa
Fix an assertion message.
...
llvm-svn: 33519
2007-01-26 06:30:34 +00:00
Reid Spencer
82909e607c
Whoops, fix typo in last commit.
...
llvm-svn: 33417
2007-01-21 02:29:10 +00:00
Reid Spencer
e33c18f4d2
For PR970:
...
Clean up handling of isFloatingPoint() and dealing with PackedType.
Patch by Gordon Henriksen!
llvm-svn: 33415
2007-01-21 00:29:26 +00:00
Chris Lattner
9df9e3e57b
Teach TargetData to handle 'preferred' alignment for each target, and use
...
these alignment amounts to align scalars when we can. Patch by Scott Michel!
llvm-svn: 33409
2007-01-20 22:35:55 +00:00
Reid Spencer
4bcddb2f04
Remove dead methods in the ValTypes.
...
llvm-svn: 33372
2007-01-19 21:25:12 +00:00
Reid Spencer
14b42c0040
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.
llvm-svn: 33370
2007-01-19 21:13:56 +00:00
Reid Spencer
b52af65aaa
Use a cheaper computation.
...
llvm-svn: 33336
2007-01-18 18:14:49 +00:00
Reid Spencer
80bf052680
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.
llvm-svn: 33328
2007-01-18 02:59:54 +00:00
Devang Patel
cda3b4d76f
Update ModulePass::assignPassManager() to take into account Preferred
...
Pass Manager Type.
llvm-svn: 33308
2007-01-17 21:19:23 +00:00
Devang Patel
b40f9ee72e
s/PassDebugging_New/PassDebugging/g
...
llvm-svn: 33307
2007-01-17 20:33:36 +00:00
Devang Patel
866ecabe21
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.
llvm-svn: 33306
2007-01-17 20:30:17 +00:00
Reid Spencer
d98055f3fe
For PR1117:
...
Expose the previously hidden checkCast function as CastInst::castIsValid.
llvm-svn: 33282
2007-01-17 02:46:11 +00:00
Devang Patel
c65137140c
Pass manager may require certain analysis. In such cases, initially
...
pass manager is last user.
llvm-svn: 33273
2007-01-16 22:38:10 +00:00
Devang Patel
e3e4fcb70f
Undo last check-in.
...
Remove setupPassManager() and its use.
llvm-svn: 33270
2007-01-16 21:43:18 +00:00
Devang Patel
afc2e45d40
Setup pass manager before scheduling required analysis.
...
llvm-svn: 33262
2007-01-16 19:46:09 +00:00
Devang Patel
2d421d58d6
Code refactoring.
...
llvm-svn: 33245
2007-01-16 02:00:38 +00:00
Devang Patel
b61a40bc5a
Remove extra white spaces. Fix comments.
...
llvm-svn: 33244
2007-01-15 23:06:56 +00:00
Devang Patel
67c975490d
Do not record last users of Pass Manager.
...
llvm-svn: 33243
2007-01-15 20:31:54 +00:00
Chris Lattner
b0a126d212
make this more efficient in release builds (time and space)
...
llvm-svn: 33239
2007-01-15 18:28:18 +00:00
Chris Lattner
c5e1611848
rename Type::isIntegral to Type::isInteger, eliminating the old Type::isInteger.
...
rename Type::getIntegralTypeMask to Type::getIntegerTypeMask.
This makes naming much more consistent. For example, there are now no longer any
instances of IntegerType that are not considered isInteger! :)
llvm-svn: 33225
2007-01-15 02:27:26 +00:00
Chris Lattner
f1797fe8bf
teach VMCore to accept i1 add's and shifts
...
llvm-svn: 33223
2007-01-15 02:05:34 +00:00
Chris Lattner
9bda331dc3
don't discriminate against i1
...
llvm-svn: 33213
2007-01-15 00:45:50 +00:00
Reid Spencer
40be764463
Fix a FIXME. 1 bit integer types are now printed as i1 not bool.
...
llvm-svn: 33176
2007-01-13 01:09:33 +00:00
Reid Spencer
42cb213bc9
Make sure the IntegerValType has enough space for 2^23 bits.
...
llvm-svn: 33168
2007-01-13 00:12:29 +00:00
Jim Laskey
ee29cc6016
Allow isAllOnesValue testing on packed constants
...
llvm-svn: 33146
2007-01-12 22:39:14 +00:00
Devang Patel
347efe4ce7
s/addPassToManager/add/g
...
llvm-svn: 33138
2007-01-12 20:07:16 +00:00
Anton Korobeynikov
548b9af9c2
* PIC codegen for X86/Linux has been implemented
...
* PIC-aware internal structures in X86 Codegen have been refactored
* Visibility (default/weak) has been added
* Docs fixes (external weak linkage, visibility, formatting)
llvm-svn: 33136
2007-01-12 19:20:47 +00:00
Devang Patel
9afb283500
Move PMTopLevelManager, PMDataManager and FPPassManger classes into
...
new PassManagers.h header.
This opens door for implementing CGPassManager in IPA library.
llvm-svn: 33135
2007-01-12 18:52:44 +00:00
Chris Lattner
cb66b7721a
Remove a bunch of duplicated code. Among other things, this fixes
...
constant folding of signed comparisons of bool.
llvm-svn: 33134
2007-01-12 18:42:52 +00:00
Devang Patel
dc1430cb98
Remove dead code.
...
llvm-svn: 33121
2007-01-12 17:23:48 +00:00
Reid Spencer
eeb33c0716
Always write 1 bit integers as i1 not "bool".
...
llvm-svn: 33115
2007-01-12 07:25:20 +00:00
Reid Spencer
373d2bccea
For PR1064:
...
Implement the arbitrary bit-width integer feature. The feature allows
integers of any bitwidth (up to 64) to be defined instead of just 1, 8,
16, 32, and 64 bit integers.
This change does several things:
1. Introduces a new Derived Type, IntegerType, to represent the number of
bits in an integer. The Type classes SubclassData field is used to
store the number of bits. This allows 2^23 bits in an integer type.
2. Removes the five integer Type::TypeID values for the 1, 8, 16, 32 and
64-bit integers. These are replaced with just IntegerType which is not
a primitive any more.
3. Adjust the rest of LLVM to account for this change.
Note that while this incremental change lays the foundation for arbitrary
bit-width integers, LLVM has not yet been converted to actually deal with
them in any significant way. Most optimization passes, for example, will
still only deal with the byte-width integer types. Future increments
will rectify this situation.
llvm-svn: 33113
2007-01-12 07:05:14 +00:00
Reid Spencer
3d986f6487
Implement review feedback for the ConstantBool->ConstantInt merge. Chris
...
recommended that getBoolValue be replaced with getZExtValue and that
get(bool) be replaced by get(const Type*, uint64_t). This implements
those changes.
llvm-svn: 33110
2007-01-12 04:24:46 +00:00
Devang Patel
da5ae651e9
Start using PMStack. Now each pass is responsibe for assinging
...
a pass manager for itself.
There is some opportunity to remove some dead code from PassManager.cpp.
llvm-svn: 33087
2007-01-11 22:15:30 +00:00
Devang Patel
5f5c0486fb
Use getPassManagerType() instead of dynamic_cast.
...
llvm-svn: 33078
2007-01-11 19:59:06 +00:00
Reid Spencer
f3265181e2
Rename BoolTy as Int1Ty. Patch by Sheng Zhou.
...
llvm-svn: 33076
2007-01-11 18:21:29 +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
c511274dc1
Shut up a warning about signed/unsigned.
...
llvm-svn: 33071
2007-01-11 07:58:19 +00:00
Chris Lattner
6fee172493
simplify some logic further
...
llvm-svn: 33069
2007-01-11 04:30:21 +00:00
Chris Lattner
3147621368
Recommit my previous patch with a bugfix: printInfoComment works on both
...
local and global values.
llvm-svn: 33068
2007-01-11 03:54:27 +00:00
Devang Patel
e485c421c1
Add PassManagerType enum.
...
llvm-svn: 33065
2007-01-11 01:10:25 +00:00
Reid Spencer
12c2bdcc62
Implement better constant folding of unordered FCMP predicates.
...
llvm-svn: 33063
2007-01-11 00:25:45 +00:00
Devang Patel
a0b4424ed4
Robustify assingPassManager() for Module, Function and Basic Block
...
Passes.
Robustify PMStack.push()
Add dump() routine to print PMStack.
llvm-svn: 33062
2007-01-11 00:19:00 +00:00
Reid Spencer
d6ed2499db
Back out the last patch which is a nightly test killer. The assertion
...
in getLocalSlot fires on many, many values. It broke nearly all of
the dejagnu tests. Simple changes to the assertion did not fix the
problem.
llvm-svn: 33054
2007-01-10 09:18:16 +00:00
Chris Lattner
bf6aebe720
Last refactoring before PR645: split up getSlot into getLocalSlot and getGlobalSlot.
...
No functionality change.
llvm-svn: 33053
2007-01-10 07:01:46 +00:00
Chris Lattner
6ee5a4d0d2
eliminate some iterator gymnastics.
...
llvm-svn: 33052
2007-01-10 06:43:26 +00:00
Chris Lattner
af73545299
Inline insertValue into CreateModuleSlot/CreateFunctionSlot
...
llvm-svn: 33038
2007-01-09 08:04:59 +00:00
Chris Lattner
ef3e9a5ea1
Remove a bunch of complex logic that is completely dead: duplicates can
...
never be inserted!
llvm-svn: 33037
2007-01-09 07:58:11 +00:00
Chris Lattner
ee67a96b5d
Split CreateSlot into two versions, one for globals and one for function-local
...
values
llvm-svn: 33036
2007-01-09 07:55:49 +00:00
Chris Lattner
88c55c3483
Remove extraneous return value from insertValue and getOrCreateSlot. Since
...
getOrCreateSlot no longer gets the slot, rename it to CreateSlot.
llvm-svn: 33035
2007-01-09 07:46:21 +00:00
Reid Spencer
96ebce2eda
Parameter attributes are part of a FunctionType and deserve to be factored
...
into comparisons of two FunctionTypes. Make it so.
llvm-svn: 33020
2007-01-08 19:41:01 +00:00
Devang Patel
e0b89a869d
Add PMStack, a Pass Manager stack.
...
Eventually, Top level pass managers will use this to keep track of
active pass managers. Eass pass will also learn how to find appropriate
manager from these managers stack.
llvm-svn: 33018
2007-01-08 19:29:38 +00:00
Andrew Lenharth
31e7a82bea
And asm writing for packed struct initializers
...
llvm-svn: 33016
2007-01-08 18:21:30 +00:00
Chris Lattner
fed811a032
Change the interface to Module::getOrInsertFunction to be easier to use,
...
to resolve PR1088, and to help PR411.
llvm-svn: 32988
2007-01-07 08:09:25 +00:00
Reid Spencer
cdaf88ff9d
For PR411:
...
Take an incremental step towards type plane elimination. This change
separates types from values in the symbol tables by finally making use
of the TypeSymbolTable class. This yields more natural interfaces for
dealing with types and unclutters the SymbolTable class.
llvm-svn: 32956
2007-01-06 07:24:44 +00:00
Devang Patel
c1627f6538
1) Remove old AnalysisResolver.
...
2) Rename AnalysisResolver_New as AnalysisResolver
llvm-svn: 32938
2007-01-05 22:47:07 +00:00
Devang Patel
c5a284c3c6
Remove PassManagerT.h
...
llvm-svn: 32928
2007-01-05 20:21:13 +00:00
Devang Patel
fcddd83bfc
Remove old pass manager.
...
llvm-svn: 32927
2007-01-05 20:16:23 +00:00
Reid Spencer
4f14887126
Change the syntax for parameter attributes:
...
1. The @ sign is no longer necessary.
2. We now support "function attributes" as parameter attribute 0.
3. Instead of locating the return type attributes after the type of a
function result, they are now located after the function header's
closing paranthesis and before any alignment or section options.
4. The way has been prepared for a new "noreturn" function attribute but
there is no support for recognizing it in the lexer nor doing anything
with it if it does get set.
5. The FunctionType::getParamAttrsText method now has support for
returning multiple attributes. This required a change in its interface.
I'm unhappy that this change leads to 6 new shift/reduce conflicts, but
in each case bison's decision to choose the shift is correct so there
shouldn't be any damage from these conflicts.
llvm-svn: 32904
2007-01-05 17:06:19 +00:00
Reid Spencer
4b18100144
Do not allow packed types for icmp and fcmp instructions.
...
llvm-svn: 32865
2007-01-04 05:22:18 +00:00
Chris Lattner
29a821859e
Now that setcondinst has been eliminated, we can mark Value::SubclassID
...
const and remove the ugly mutator methods.
llvm-svn: 32860
2007-01-04 02:15:37 +00:00
Chris Lattner
5eca81644b
fix typo
...
llvm-svn: 32859
2007-01-04 02:13:20 +00:00
Chris Lattner
793a771c59
fix some bugs handling vectors, avoid host-specific handling of undefined shift results.
...
llvm-svn: 32857
2007-01-04 01:56:39 +00:00
Chris Lattner
d9342d1db3
Add a new ConstantPacked::getAllOnesValue method
...
llvm-svn: 32856
2007-01-04 01:49:26 +00:00
Reid Spencer
45bed286fa
Fix a cut-and-paste bug for processing of InvokeInst parameter attributes.
...
The lookup of parameter attributes was offset by two because of the
additional operands in an invoke instruction.
llvm-svn: 32801
2006-12-31 22:17:01 +00:00
Reid Spencer
670dd05e78
Fix a bug in comparison of GEP indices.
...
llvm-svn: 32798
2006-12-31 21:43:30 +00:00
Reid Spencer
32825eb0bf
Fix a bug in getParamAttrs where an invalid value would be returned if the
...
index passed in was out of range for the number of parameter attributes set.
llvm-svn: 32794
2006-12-31 17:50:33 +00:00
Reid Spencer
0e961ea8f7
For PR950:
...
Change signed integer type names to unsigned equivalents.
llvm-svn: 32780
2006-12-31 05:26:44 +00:00
Reid Spencer
af0921c568
For PR950:
...
Implement signless integer types and FunctionType parameter attributes.
llvm-svn: 32779
2006-12-31 05:25:34 +00:00
Reid Spencer
ba137437bf
For PR950:
...
* Change integer type name from signed to signless
* Implement printing of FunctionType parameter attributes.
llvm-svn: 32778
2006-12-31 05:24:50 +00:00
Reid Spencer
38002bb037
For PR950:
...
Remove all grammar conflicts from assembly parsing. This change involves:
1. Making the "type" keyword not a primitive type (removes several
reduce/reduce conflicts)
2. Being more specific about which linkage types are allowed for functions
and global variables. In particular "appending" can no longer be
specified for a function. A differentiation was made between the various
internal and external linkage types.
3. Introduced the "define" keyword which is now required when defining a
function. This disambiguates several cases where a named function return
type could get confused with the definition of a new type. Using the
keyword eliminates all shift/reduce conflicts and the remaining
reduce/reduce conflicts.
These changes are necessary to implement the function parameter attributes
that will be introduced soon. Adding the function parameter attributes in
the presence of the shift/reduce and reduce/reduce conflicts led to severe
ambiguities that caused the parser to report syntax errors that needed to
be resolved. This patch resolves them.
llvm-svn: 32770
2006-12-29 20:29:48 +00:00
Reid Spencer
5c1e9c39ef
Cleanup ConstantFoldCompareInstruction:
...
1. Make the arguments const like the other ConstantFold* functions.
2. Clean up evaluateFCmpRelation so it makes sense for floating point.
3. Implement the use of evaluateFCmpRelation to fold floating point CEs
4. Shorten a variable name so more things fit on one line.
5. Fix various comments.
llvm-svn: 32759
2006-12-24 18:52:08 +00:00
Reid Spencer
8d3b67ce23
Fix some comments.
...
llvm-svn: 32758
2006-12-24 18:42:29 +00:00
Reid Spencer
13d15a94aa
Don't overload var names.
...
llvm-svn: 32752
2006-12-23 10:21:26 +00:00
Reid Spencer
4428c3483b
For PR950:
...
This patch removes the SetCC instructions and replaces them with the ICmp
and FCmp instructions. The SetCondInst instruction has been removed and
been replaced with ICmpInst and FCmpInst.
llvm-svn: 32751
2006-12-23 06:05:41 +00:00
Devang Patel
e01677db41
ModulePass and ImmutablePass. Force out of line virtual method.
...
llvm-svn: 32748
2006-12-22 22:49:00 +00:00
Devang Patel
b4701a315f
At the beginning of run, initialize analyis info availability for _ALL_
...
pass managers. Otherwise, stale available analysis info, from the managers not
yet run, may cause pass manager to take wrong turn.
This fixes CBE test failures reported by nightly tester.
llvm-svn: 32726
2006-12-21 00:16:50 +00:00
Chris Lattner
7329276511
Fix Regression/Verifier/invoke-1.ll
...
llvm-svn: 32722
2006-12-20 21:20:13 +00:00
Chris Lattner
e5e2285492
Revert the previous patch which was incorrect. This unbreaks eon, but rebreaks
...
invoke-1.ll
llvm-svn: 32718
2006-12-20 19:50:15 +00:00
Reid Spencer
812cc9c807
Now that ConstantInt::isValueValidForType can handle signed and unsigned
...
values regardless of the signedness of the constant's type, it is okay to
always make the AsmWriter.cpp print constant ints as signed values. The
AsmParser will automatically handle things like: uint -1 as a result.
llvm-svn: 32686
2006-12-19 21:16:35 +00:00
Devang Patel
06a6041a4a
Now, there is additional layer, referred in the comment,
...
in place to handle this correctly.
llvm-svn: 32684
2006-12-19 20:12:38 +00:00
Devang Patel
328930d725
s/BasicBlockPassManager/BBPassManager/g
...
s/ModulePassManager/MPPassManager/g
s/FunctionPassManagerImpl_New/FunctionPassManagerImpl/g
s/PassManagerImpl_New/PassManagerImpl/g
Introduce FPPassManager to manage function passes and
BBPassManagers.
Now FunctionPassManagerImpl is an implementation class
used by externally visible FunctionPassManager to manage
FPPassManagers.
Module pass manager (MPPassManager) now manages FPPassManagers
and ModulePasses.
llvm-svn: 32679
2006-12-19 19:46:59 +00:00
Reid Spencer
06d4d23dc0
Clean up ConstantFoldCastInstruction.
...
llvm-svn: 32672
2006-12-19 07:41:40 +00:00
Reid Spencer
77b7f03711
Rewrite ConstantFoldCastInstruction so that it doesn't use any of the
...
ConstRules. Remove the casting rules from ConstRules and subclasses. This
cleans up ConstantFolding significantly. Passes all tests.
llvm-svn: 32671
2006-12-19 03:15:47 +00:00
Reid Spencer
e9d6e54b36
Make ConstantInt not care about sign any more. To ensure the AsmParser can
...
still check the validity of signed values an overload to isValueValidForType
was added to allow passing in an int64_t to check.
llvm-svn: 32663
2006-12-19 01:28:19 +00:00
Reid Spencer
f810a0cfab
Remove a useless statement.
...
llvm-svn: 32660
2006-12-18 23:40:19 +00:00
Reid Spencer
24a09586a9
For PR1042:
...
Fix a thinko. We want to check the second case if the first cast *didn't*
trigger.
llvm-svn: 32657
2006-12-18 21:56:29 +00:00
Reid Spencer
97af158c16
Remove the createInferredCast methods now that their last uses have been
...
removed. All casting is now explicit and not inferred by VMCore.
llvm-svn: 32655
2006-12-18 08:52:59 +00:00
Reid Spencer
6769fa4ba2
Remove the two-argument (inferred cast) form of ConstantExpr::getCast now
...
that its last uses have been removed.
llvm-svn: 32653
2006-12-18 08:18:46 +00:00
Reid Spencer
1f5e1ff1a2
Revert last patch. ConstantInt isn't quite ready for signlessness.
...
llvm-svn: 32650
2006-12-18 04:22:56 +00:00
Reid Spencer
9ac4a6b7d0
Remove the last use of getUnsignedVersion and getSignedVersion from VMCore.
...
ConstantInt doesn't care about the sign of the type it represents. It only
cares about the bitwidth so there is no need to make the sign of the type
match the SExt or ZExt constant expression.
llvm-svn: 32646
2006-12-18 01:11:03 +00:00
Chris Lattner
f511077490
Fix PR1042, by tightening up the subtle rules with invoke value use.
...
llvm-svn: 32624
2006-12-16 02:25:35 +00:00
Devang Patel
d29f6ec89c
Add getNumContainedPasses() and getContainedPass() inteface and use
...
it instead of passVectorBegin/End().
llvm-svn: 32620
2006-12-16 00:56:26 +00:00
Devang Patel
fb82dcf9ee
Cosmetic changes, based on Chris's review.
...
llvm-svn: 32618
2006-12-15 22:57:49 +00:00
Jeff Cohen
95adeca578
Partial unbreak of VC++ (stream stuff has no easy fix).
...
llvm-svn: 32614
2006-12-15 21:47:01 +00:00
Devang Patel
a37c63bcd5
Mark dump* routines const routines.
...
llvm-svn: 32610
2006-12-15 20:13:01 +00:00
Devang Patel
f2b927a162
Move PMTopLevelManager and TImingInfo into anon namespace.
...
llvm-svn: 32606
2006-12-15 19:39:30 +00:00
Devang Patel
d3ea9ae6e9
s/ForcedLastUses/TransferLastUses/g
...
Register pass has the its last user, otherwise sometimes no one will claim
LastUse.
Handle transferred last uses from child pass manager.
llvm-svn: 32589
2006-12-15 00:08:26 +00:00
Chris Lattner
8213655f44
random minor typographical changes
...
llvm-svn: 32579
2006-12-14 18:22:14 +00:00
Devang Patel
6a85af195a
Add -time-passes support.
...
llvm-svn: 32574
2006-12-14 00:59:42 +00:00
Devang Patel
76ecbc449f
Add debug-pass=Details support to print Required and Preserved Set info.
...
llvm-svn: 32573
2006-12-14 00:25:06 +00:00
Devang Patel
740b960858
Add " Made Modification " messages in debug-pass=Executions output.
...
llvm-svn: 32572
2006-12-14 00:08:04 +00:00
Devang Patel
b726becbcd
Add debug-pass=Executions support in new pass manager.
...
llvm-svn: 32571
2006-12-13 23:50:44 +00:00
Devang Patel
5a200bf480
Add -pass-debug=Arguments support in new manager.
...
llvm-svn: 32567
2006-12-13 22:10:00 +00:00
Chris Lattner
e8d97c0b07
fit in 80 cols
...
llvm-svn: 32563
2006-12-13 21:56:10 +00:00
Devang Patel
58ac5db67f
Using PDL as a prefix for PassDebugLevel enums is not a good idea.
...
Fix it.
llvm-svn: 32562
2006-12-13 21:13:31 +00:00
Devang Patel
7208b2e3e6
Move enum PassDebugLevel from PassManagerT.h to Pass.h.
...
Use PDL as the prefix for these enums.
Define and use PassDebugging_New in new PassManager.
llvm-svn: 32554
2006-12-13 20:03:48 +00:00
Jim Laskey
ccb6b45e70
Update version in safe guards.
...
llvm-svn: 32546
2006-12-13 17:49:24 +00:00
Chris Lattner
1228f12fb4
only check non-external functions
...
llvm-svn: 32530
2006-12-13 04:45:46 +00:00
Chris Lattner
be3585daa3
Reject attempts to define intrinsics. This fixes PR1047 and
...
Regression/Verifier/2006-12-12-IntrinsicDefine.ll
llvm-svn: 32529
2006-12-13 04:30:37 +00:00
Devang Patel
3c8836df17
Add #ifdef switch toggle between old and new pass manager. However,
...
continue to use old pass manager at the moment. To use new manager
remove #define USE_OLD_PASSMANAGER 1 from Pass.h
llvm-svn: 32525
2006-12-13 02:36:01 +00:00
Devang Patel
ad1c3bba52
FunctionPassManager does not support runOnModule().
...
llvm-svn: 32519
2006-12-13 00:34:32 +00:00
Devang Patel
ae0e0cdff7
Implement PassManager_New destructors.
...
llvm-svn: 32517
2006-12-13 00:09:23 +00:00
Devang Patel
da35cdf10e
Remove unused constructor.
...
llvm-svn: 32516
2006-12-12 23:51:31 +00:00
Reid Spencer
0e981c9088
Replace inferred getCast(V,Ty) calls with more strict variants.
...
Rename getZeroExtend and getSignExtend to getZExt and getSExt to match
the the casting mnemonics in the rest of LLVM.
llvm-svn: 32514
2006-12-12 23:36:14 +00:00
Devang Patel
ae9da674a1
Add routines to dump pass manager queue.
...
llvm-svn: 32513
2006-12-12 23:34:33 +00:00
Devang Patel
b26731c9cd
FunctionPassManager()
...
Set AnalysisResolver_New and add FPM to PassManagers list.
llvm-svn: 32512
2006-12-12 23:27:37 +00:00
Devang Patel
e08024130b
Do not runOnFunction on external functions.
...
llvm-svn: 32510
2006-12-12 23:15:28 +00:00
Devang Patel
09032bc2b0
Initialize AnalysisImpls for each pass before executing the pass.
...
llvm-svn: 32509
2006-12-12 23:13:09 +00:00
Devang Patel
e969385cb9
collectRequiredAnalysisPasses().
...
Include RequiredTrainsitiveSet also.
llvm-svn: 32508
2006-12-12 23:09:32 +00:00
Devang Patel
8a5442e16d
removeNotPreservedAnalysis().
...
Do not remove ImmutablePass from the list.
llvm-svn: 32507
2006-12-12 23:07:44 +00:00
Devang Patel
94bb02ef16
Initialize activeManager.
...
llvm-svn: 32506
2006-12-12 22:57:43 +00:00
Devang Patel
a756f126ea
Remove unused constructor.
...
llvm-svn: 32505
2006-12-12 22:56:36 +00:00
Devang Patel
ea7846dd99
Maintain ImmutablePasses list at top level only. Do not make them
...
directly available to individual managers.
llvm-svn: 32504
2006-12-12 22:53:40 +00:00
Devang Patel
4d694e6674
findAnalysisPass().
...
First search all available passes before searching ImmutablePasses.
llvm-svn: 32503
2006-12-12 22:50:05 +00:00
Devang Patel
921f11b896
Fix thinko.
...
While searching for a analysis in a pass manager, do not search it into
pass manager's manager.
llvm-svn: 32501
2006-12-12 22:47:13 +00:00
Devang Patel
a3a8aeb459
o s/OtherPassManagers/IndirectPassManagers
...
o Make IndirectPassManagers vector of PMDataManager *
o Move PMTopLevelManager implementation below all class declarations.
llvm-svn: 32499
2006-12-12 22:35:25 +00:00
Devang Patel
bda67816fd
Initialize AnalysisImpls for ImmutablePass.
...
llvm-svn: 32498
2006-12-12 22:21:37 +00:00
Devang Patel
f2e0fe66cd
Set top level manager.
...
llvm-svn: 32496
2006-12-12 22:02:16 +00:00
Reid Spencer
e9161a2f5e
Don't create usless casts for same-bith-width floating point casts.
...
llvm-svn: 32475
2006-12-12 05:38:50 +00:00
Reid Spencer
3fbfed6e2c
Implement getIntegerCast and getFPCast for ConstantExpr. These are similar
...
to the createIntegerCast and createFPCast for CastInst instructions.
llvm-svn: 32457
2006-12-12 00:51:07 +00:00
Reid Spencer
a82b285a69
Implement createIntegerCast and createFPCast factory methods for handling
...
integer and floating point cast creation. createIntegerCast generates
ZExt/SExt, BitCast or Trunc. createFPCast generates FPExt, Bitcast, or
FPTrunc.
llvm-svn: 32456
2006-12-12 00:49:44 +00:00
Reid Spencer
f48e2567ae
Fix constant folding of FP->int due to cut & paste error in last commit.
...
llvm-svn: 32447
2006-12-11 21:27:28 +00:00
Chris Lattner
f512c0d8e5
Implement correct constant folding of bitcast. This implements
...
Transforms/ConstProp/bitcast.ll and fixes
SingleSource/Regression/C/2003-10-12-GlobalVarInitializers
llvm-svn: 32438
2006-12-11 18:30:27 +00:00
Chris Lattner
6ea5a77a93
fix typo
...
llvm-svn: 32428
2006-12-11 02:16:58 +00:00
Chris Lattner
6df6fa3694
fix PR1039 by making timing info be destroyed by llvm_shutdown, not by
...
static dtors.
llvm-svn: 32411
2006-12-10 07:40:46 +00:00
Devang Patel
1dab3b3558
Analysis resolver now manages AnalysisImpls for the given patch.
...
llvm-svn: 32389
2006-12-09 01:11:34 +00:00
Devang Patel
a330306e9b
Top level pass manager keeps track of other managers, so this can be
...
removed now.
llvm-svn: 32388
2006-12-09 00:09:12 +00:00
Devang Patel
73cf028f5f
Use analysis resolver to find the info.
...
llvm-svn: 32387
2006-12-09 00:07:38 +00:00
Devang Patel
385edd79c5
Do not drop ImmutablePasses on the floor.
...
llvm-svn: 32386
2006-12-08 23:57:43 +00:00
Devang Patel
4e6c9b0ad9
Set AnalysisResolver for the passes when they are inserted into
...
pass manager queuer.
llvm-svn: 32385
2006-12-08 23:53:00 +00:00
Devang Patel
6f0bb6fbed
Add AnalysisResolver_New. It is a replacement for existing
...
AnalysisResolver.
llvm-svn: 32383
2006-12-08 23:28:54 +00:00
Devang Patel
17fec0924c
Keep track of other pass managers, that are not directly managed by
...
top level manager. Use this info to findAnalysisPass.
llvm-svn: 32382
2006-12-08 23:11:43 +00:00
Devang Patel
1342f262e3
Implement top level FunctionPassManager::run(Function &F)
...
llvm-svn: 32381
2006-12-08 22:57:48 +00:00
Devang Patel
ddcef36da4
Do not keep yet another list of pass managers in PassManagerImpl_New.
...
Use one provided by toplevel manager.
llvm-svn: 32380
2006-12-08 22:47:25 +00:00
Devang Patel
f0c7476178
Remove unused schedulePass() parameter.
...
llvm-svn: 32379
2006-12-08 22:34:02 +00:00
Devang Patel
8ff822772f
Remove unused getAnalysisPass and getAnalysisPassFromManager
...
llvm-svn: 32378
2006-12-08 22:32:32 +00:00
Devang Patel
a4ef9062bf
Implement PMTopLevel::findAnalysisPass() and
...
PMDataManager::findAnalysisPass()
llvm-svn: 32377
2006-12-08 22:30:11 +00:00
Devang Patel
7f1091cb14
During runOnModule() do initialization and finalization.
...
llvm-svn: 32371
2006-12-08 19:04:09 +00:00
Devang Patel
ebab6b3112
Reuse code. Directly use runOnFunction().
...
llvm-svn: 32370
2006-12-08 19:03:05 +00:00
Devang Patel
4833df8e9e
Implement FunctionPassManager_New::FunctionPassManager_New(ModuleProvider *P)
...
llvm-svn: 32368
2006-12-08 18:57:16 +00:00
Andrew Lenharth
d115fe7ce3
Packed Structures
...
llvm-svn: 32361
2006-12-08 18:06:16 +00:00
Devang Patel
94eedf9be1
BasicBlockPassManager_New::runOnFunction()
...
Do initialization and finalization.
llvm-svn: 32346
2006-12-08 01:38:28 +00:00
Devang Patel
0fc48cda15
doInitialization and doFinalization for BasicBlockPassManager_New
...
llvm-svn: 32345
2006-12-08 00:59:05 +00:00
Devang Patel
67bb3725d4
Reimplement removeDeadPasses().
...
llvm-svn: 32344
2006-12-08 00:37:52 +00:00
Devang Patel
3364b5821e
set Last User.
...
llvm-svn: 32342
2006-12-07 23:55:10 +00:00
Bill Wendling
fe0af72bc4
Don't use <sstream> in Streams.h but <iosfwd> instead.
...
llvm-svn: 32340
2006-12-07 23:41:45 +00:00
Devang Patel
df9f0e26f9
Maintain level(or depth) of pass manager in pass manager food chain.
...
llvm-svn: 32339
2006-12-07 23:24:58 +00:00
Devang Patel
19a733b718
New method, PMDataManager::collectRequiredAnalysisPasses()
...
llvm-svn: 32338
2006-12-07 23:05:44 +00:00
Devang Patel
b361bb840c
When new pass manager is created, initialize available analysis info
...
of existing manager at the same level. Otherwise, such info may be
considered as available, which not true.
llvm-svn: 32334
2006-12-07 22:34:21 +00:00
Devang Patel
967a319698
PMDataManager does not maintain LastUser info.
...
llvm-svn: 32332
2006-12-07 22:17:09 +00:00
Devang Patel
9be7d811ae
Make current pass info available _after_ removing info that is not
...
preserved.
llvm-svn: 32329
2006-12-07 22:09:36 +00:00
Devang Patel
145469fbf2
Add TODOs
...
llvm-svn: 32328
2006-12-07 21:58:50 +00:00
Devang Patel
a15af91097
Fix thinko.
...
llvm-svn: 32327
2006-12-07 21:44:12 +00:00
Devang Patel
b945504462
Top level manages schedule the pass immediately at the time of insertion.
...
llvm-svn: 32326
2006-12-07 21:32:57 +00:00
Devang Patel
ff5d922b04
Now FunctionPassManagerImpl_New and PassManagerImpl_New derives from
...
PMTopLevelManager.
llvm-svn: 32325
2006-12-07 21:27:23 +00:00
Devang Patel
81b62a7e2c
Reimplement schedulePass interface. Move it into PMTopLevelManager.
...
llvm-svn: 32324
2006-12-07 21:10:57 +00:00
Devang Patel
b2ce1fc089
While initializing AvailableAnalysis info, make ImmutablePasses available
...
immediately.
llvm-svn: 32323
2006-12-07 21:02:08 +00:00
Devang Patel
adf0a3a147
Add ImmutablePass into the list of info managed by top level pass
...
manager.
llvm-svn: 32322
2006-12-07 20:51:18 +00:00
Bill Wendling
23b8b13c9d
Removing even more <iostream> includes.
...
llvm-svn: 32320
2006-12-07 20:04:42 +00:00
Devang Patel
0117a3e391
If pass reserves all analysis info then each info is not separately
...
included in PreservedSet. So check getPreservesAll() first.
llvm-svn: 32319
2006-12-07 20:03:49 +00:00
Devang Patel
318adc0e9d
Pass Managers themselves do not invalidate any analysis info.
...
llvm-svn: 32318
2006-12-07 19:57:52 +00:00
Devang Patel
8c988e1dc2
Add a handle to the top level pass manager in PMDataManager.
...
llvm-svn: 32317
2006-12-07 19:54:15 +00:00
Devang Patel
e6f5ded0ef
Cosmetic markers to divide code in separate chunks.
...
llvm-svn: 32316
2006-12-07 19:39:39 +00:00
Devang Patel
89a14dfcd0
s/noteDownAvailableAnalysis/recordAvailableAnalysis
...
While recording available analysis, include interfaces implemented.
llvm-svn: 32315
2006-12-07 19:33:53 +00:00
Devang Patel
e4c87643a5
Add PMTopLevelManager. It is not used yet.
...
llvm-svn: 32314
2006-12-07 19:21:29 +00:00
Devang Patel
7e140ec79c
RequiredAnalysis support is buggy and not used at the moment so remove
...
the code. Add TODO note.
llvm-svn: 32313
2006-12-07 18:47:25 +00:00
Devang Patel
b43799cea4
s/clearAnalysis/initializeAnalysisInfo/g
...
llvm-svn: 32312
2006-12-07 18:41:09 +00:00
Devang Patel
364530904f
s/CommonPassManagerImpl/PMDataManager/g
...
llvm-svn: 32311
2006-12-07 18:36:24 +00:00
Devang Patel
580df8ade2
Add overview of pass manager.
...
llvm-svn: 32309
2006-12-07 18:23:30 +00:00
Reid Spencer
076e7af638
Provide a getOpcode() method on CmpInst to ensure the opcode is returned
...
as the right type. Use this to shorten some code.
llvm-svn: 32300
2006-12-07 04:18:31 +00:00
Bill Wendling
a3246c4272
Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, are
...
now cerr, cout, and NullStream resp.
llvm-svn: 32298
2006-12-07 01:30:32 +00:00
Reid Spencer
19cb81393d
For PR950:
...
Remove the getMaxValue and getMinValue functions from ConstantIntegral.
They don't make sense for a signless type. Also, for isMaxValue and
isMinValue, have the caller provided the signedness rather than obtaining
it from the constant's type.
llvm-svn: 32287
2006-12-06 20:30:17 +00:00
Chris Lattner
f92de9a3d2
Remove the dead CachedWriter class.
...
llvm-svn: 32271
2006-12-06 06:40:49 +00:00
Chris Lattner
a428b29cdb
printName is almost always true. In the cases that mattered where it was false,
...
it was effectively set to true by this:
- if ((PrintName || isa<GlobalValue>(V)) && V->hasName())
+ if (V->hasName())
Delete printname entirely.
llvm-svn: 32265
2006-12-06 06:24:27 +00:00
Chris Lattner
3d1758e08c
Remove the 'printname' argument to WriteAsOperand. It is always true, and
...
passing false would make the asmprinter fail anyway.
llvm-svn: 32264
2006-12-06 06:16:21 +00:00
Chris Lattner
c73d71336d
The hasSlot methods are gone.
...
Remove the 'PrintName' argument to WriteAsOperand, as it is always true.
Only call getOrCreateSlot on things that are valid.
llvm-svn: 32263
2006-12-06 06:15:43 +00:00
Chris Lattner
cc4a08f45b
remove unused api, simplify some code
...
llvm-svn: 32260
2006-12-06 05:55:41 +00:00
Chris Lattner
04357677e5
remove more code that was only used by the bc writer
...
llvm-svn: 32259
2006-12-06 05:50:41 +00:00
Chris Lattner
9a36bc328e
remove dead code left over from when this functionality was shared with the
...
bcwriter.
llvm-svn: 32258
2006-12-06 05:42:32 +00:00
Chris Lattner
7ee127edad
rename createSlot -> getOrCreateSlot.
...
llvm-svn: 32256
2006-12-06 05:27:40 +00:00
Chris Lattner
8f97b3e24b
clean up some sloppy and inconsistent spacing
...
llvm-svn: 32255
2006-12-06 05:12:21 +00:00
Chris Lattner
74b8045bc5
wrap long lines
...
llvm-svn: 32254
2006-12-06 04:41:52 +00:00
Reid Spencer
2a2cc7fc14
Fix constant folding to deal with external weak global values.
...
llvm-svn: 32247
2006-12-06 00:25:09 +00:00
Chris Lattner
a6cad8869f
Fix Transforms/InstCombine/2006-12-05-fp-to-int-ext.ll, fixing an out-of-
...
stack-space issue in the ppc bootstrap.
llvm-svn: 32244
2006-12-05 23:43:59 +00:00
Reid Spencer
c87c3e5a70
Bail on the getInferredCast idea. Remove the function and convert
...
remaining uses to more specific casts.
llvm-svn: 32231
2006-12-05 19:14:13 +00:00
Reid Spencer
28a5079f58
Can't make these fail now with just BitCast. Previous failures must have
...
been in conjunction with something else. By right, they should just be
BitCasts.
llvm-svn: 32219
2006-12-05 07:18:07 +00:00
Reid Spencer
679821dd29
Remove the last inferred casts from VMCore.
...
llvm-svn: 32213
2006-12-05 03:30:09 +00:00
Reid Spencer
4f42ccea23
Implement createPointerCast.
...
llvm-svn: 32212
2006-12-05 03:28:26 +00:00
Reid Spencer
c5727bf642
Implement getPointerCast.
...
llvm-svn: 32211
2006-12-05 03:25:26 +00:00
Reid Spencer
10b94bb9f5
Separate getCompare from get and getCompareTy from getTy.
...
llvm-svn: 32200
2006-12-04 21:35:24 +00:00
Reid Spencer
2d2a26767e
Implement new cast creation functions for both instructions and constant
...
expressions. These will get used to reduce clutter as we replace various
calls to createInferredCast and getCast.
llvm-svn: 32191
2006-12-04 20:17:56 +00:00
Reid Spencer
94096ebd7c
Reduce the size of the ExprMapKeyType class.
...
llvm-svn: 32186
2006-12-04 18:38:05 +00:00
Reid Spencer
e6770851c0
For PR950: Fix constant expressions to properly support ICmp and FCmp type expressions.
...
llvm-svn: 32170
2006-12-04 05:19:50 +00:00
Reid Spencer
2580dd751f
For PR950: Implement a stub for folding ICmp and FCmp instructions
...
llvm-svn: 32169
2006-12-04 05:19:34 +00:00
Reid Spencer
ca27d66971
For PR950: Implement ICmp/FCmp predicate printing for constant expressions
...
llvm-svn: 32168
2006-12-04 05:19:18 +00:00
Reid Spencer
0668975146
Change inferred casts to explicit casts.
...
llvm-svn: 32165
2006-12-04 02:46:44 +00:00
Reid Spencer
4cb4234c17
Take a baby step towards getting rid of inferred casts. Provide methods on
...
CastInst and ConstantExpr that allow the signedness to be explicitly passed
in and reliance on signedness removed from getCastOpcode. These are
temporary measures useful during the conversion of inferred casts.
llvm-svn: 32164
2006-12-04 02:43:42 +00:00
Reid Spencer
470e894f5c
Remove dead code.
...
llvm-svn: 32157
2006-12-03 16:21:33 +00:00
Reid Spencer
f78fe29ca8
Shorten the FCmp predicate mnemonics.
...
llvm-svn: 32150
2006-12-03 06:35:48 +00:00
Reid Spencer
904e41f87e
Allow the ICmp and FCmp instructions to be written by the AsmWriter
...
llvm-svn: 32148
2006-12-03 06:27:29 +00:00
Reid Spencer
a468638458
Implement creation of ICmp and FCmp constant expressions.
...
llvm-svn: 32147
2006-12-03 05:48:19 +00:00
Jeff Cohen
f99052befb
Unbreak VC++ build.
...
llvm-svn: 32113
2006-12-02 02:22:01 +00:00
Chris Lattner
7a39941897
Switch analysis groups to be unregistered when llvm_shutdown is called.
...
llvm-svn: 32110
2006-12-01 23:46:50 +00:00
Chris Lattner
1b0e89e022
Start moving pass registration over to using the ManagedStatic mechanism.
...
This fixes issues where passes get unregistered before llvm_shutdown is
called, and is generally cleaner and simpler. Analysis groups up next.
llvm-svn: 32108
2006-12-01 23:27:45 +00:00
Chris Lattner
a2bd5d4aaa
move 'cfgonly' pass tracking into PassInfo, instead of handling it with
...
yet-another global data structure.
llvm-svn: 32102
2006-12-01 22:21:11 +00:00
Chris Lattner
64b24381a8
These should be rewritten to fold without using the 'Rules' mechanism, but
...
until this happens at least make sext from bool and sitofp from bool do the
right thing.
llvm-svn: 32087
2006-12-01 19:50:54 +00:00
Chris Lattner
7e0d6868fd
this logic is broken for trunc to bool, replace the folding logic for trunc
...
completely, as it is trivial. We should probably do this for the rest of the
cast operations. This fixes ConstProp/2006-12-01-TruncBoolBug.ll.
llvm-svn: 32081
2006-12-01 19:22:41 +00:00
Chris Lattner
497c976859
add a new ConstantIntegral::get method. Simplify the implementation of
...
ConstantInt::get
llvm-svn: 32080
2006-12-01 19:20:02 +00:00
Chris Lattner
c65612e859
Fix a typo introduced by the cast patch that horribly broke a lot of vector
...
code. Testcase here: Transforms/ConstProp/2006-11-30-vector-cast.ll
llvm-svn: 32062
2006-12-01 05:55:25 +00:00
Reid Spencer
a1613b631b
Don't fold "ptrtoint GV to bool" since this should be doing a truncate not
...
a comparison against zero. Instead fold setne(GV,null) and seteq(GV,null)
to ConstantBool::True or ConstantBool::False, respectively.
llvm-svn: 32060
2006-12-01 03:56:30 +00:00
Anton Korobeynikov
f627d28d9c
Introducing external weak linkage. Darwin codegen should be added later.
...
llvm-svn: 32052
2006-12-01 00:25:12 +00:00
Bill Wendling
aa02717a76
Changed to using LLVM streams.
...
llvm-svn: 31955
2006-11-28 02:09:03 +00:00
Reid Spencer
992d9788b3
For PR950:
...
The long awaited CAST patch. This introduces 12 new instructions into LLVM
to replace the cast instruction. Corresponding changes throughout LLVM are
provided. This passes llvm-test, llvm/test, and SPEC CPUINT2000 with the
exception of 175.vpr which fails only on a slight floating point output
difference.
llvm-svn: 31931
2006-11-27 01:05:10 +00:00
Reid Spencer
6e34ef887b
For PR950:
...
First in a series of patches to convert SetCondInst into ICmpInst and
FCmpInst using only two opcodes and having the instructions contain their
predicate value. Nothing uses these classes yet. More patches to follow.
llvm-svn: 31867
2006-11-20 01:22:35 +00:00
Bill Wendling
1838be30c7
Removed iostream #includes. Replaced std::cerr with DOUT.
...
llvm-svn: 31814
2006-11-17 08:03:48 +00:00
Devang Patel
6060a1e3dc
Add run(Function &F) support in FunctionPassManager_New
...
llvm-svn: 31756
2006-11-15 19:39:54 +00:00