Commit Graph

1583 Commits

Author SHA1 Message Date
Devang Patel 6975b6ec09 Remove extra white spaces. Fix comments.
llvm-svn: 33244
2007-01-15 23:06:56 +00:00
Devang Patel 39786a90d0 Do not record last users of Pass Manager.
llvm-svn: 33243
2007-01-15 20:31:54 +00:00
Chris Lattner 90d2e426f9 make this more efficient in release builds (time and space)
llvm-svn: 33239
2007-01-15 18:28:18 +00:00
Chris Lattner 03c4953cdd 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 57eedaca52 teach VMCore to accept i1 add's and shifts
llvm-svn: 33223
2007-01-15 02:05:34 +00:00
Chris Lattner 885433b15b don't discriminate against i1
llvm-svn: 33213
2007-01-15 00:45:50 +00:00
Reid Spencer 91d93de25e 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 ea4374c0d4 Make sure the IntegerValType has enough space for 2^23 bits.
llvm-svn: 33168
2007-01-13 00:12:29 +00:00
Jim Laskey f047882b15 Allow isAllOnesValue testing on packed constants
llvm-svn: 33146
2007-01-12 22:39:14 +00:00
Devang Patel f85793d171 s/addPassToManager/add/g
llvm-svn: 33138
2007-01-12 20:07:16 +00:00
Anton Korobeynikov a0554d90e8 * 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 e759955c66 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 344da52c4c 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 0f08004ac0 Remove dead code.
llvm-svn: 33121
2007-01-12 17:23:48 +00:00
Reid Spencer c87215900d Always write 1 bit integers as i1 not "bool".
llvm-svn: 33115
2007-01-12 07:25:20 +00:00
Reid Spencer 7a9c62baa6 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 cddc9dfe97 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 ad98d23f16 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 ac99eca428 Use getPassManagerType() instead of dynamic_cast.
llvm-svn: 33078
2007-01-11 19:59:06 +00:00
Reid Spencer 542964f55b Rename BoolTy as Int1Ty. Patch by Sheng Zhou.
llvm-svn: 33076
2007-01-11 18:21:29 +00:00
Zhou Sheng 75b871fb1e 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 5656cad97d Shut up a warning about signed/unsigned.
llvm-svn: 33071
2007-01-11 07:58:19 +00:00
Chris Lattner 550a8f3760 simplify some logic further
llvm-svn: 33069
2007-01-11 04:30:21 +00:00
Chris Lattner 5e04332326 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 3b3f89900e Add PassManagerType enum.
llvm-svn: 33065
2007-01-11 01:10:25 +00:00
Reid Spencer 74bd036059 Implement better constant folding of unordered FCMP predicates.
llvm-svn: 33063
2007-01-11 00:25:45 +00:00
Devang Patel 15701b5c0d 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 c6c4fab067 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 2d56715015 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 2cf85c7507 eliminate some iterator gymnastics.
llvm-svn: 33052
2007-01-10 06:43:26 +00:00
Chris Lattner 04398e8d48 Inline insertValue into CreateModuleSlot/CreateFunctionSlot
llvm-svn: 33038
2007-01-09 08:04:59 +00:00
Chris Lattner 721c213c0e 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 ea862a33d9 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 89e774efaa 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 7254c25fad 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 1c56a638a4 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 0d124b8e00 And asm writing for packed struct initializers
llvm-svn: 33016
2007-01-08 18:21:30 +00:00
Chris Lattner 505c06b739 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 32af9e8cc5 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 b66334b73b 1) Remove old AnalysisResolver.
2) Rename AnalysisResolver_New as AnalysisResolver

llvm-svn: 32938
2007-01-05 22:47:07 +00:00
Devang Patel 20f9e22ae2 Remove PassManagerT.h
llvm-svn: 32928
2007-01-05 20:21:13 +00:00
Devang Patel c6b5a554a4 Remove old pass manager.
llvm-svn: 32927
2007-01-05 20:16:23 +00:00
Reid Spencer 136a91c4e7 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 438f562e56 Do not allow packed types for icmp and fcmp instructions.
llvm-svn: 32865
2007-01-04 05:22:18 +00:00
Chris Lattner f96f4492e0 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 858f4e9362 fix typo
llvm-svn: 32859
2007-01-04 02:13:20 +00:00
Chris Lattner 26f13eb1f3 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 ecab54cfc0 Add a new ConstantPacked::getAllOnesValue method
llvm-svn: 32856
2007-01-04 01:49:26 +00:00
Reid Spencer 9cfa4e8459 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 c90cf77367 Fix a bug in comparison of GEP indices.
llvm-svn: 32798
2006-12-31 21:43:30 +00:00