Commit Graph

1983 Commits

Author SHA1 Message Date
Devang Patel 2c1bba0c0c Move ~Pass() from Pass.h into Pass.cpp
llvm-svn: 36498
2007-04-26 21:33:42 +00:00
Devang Patel 68f72b17f2 Use toplevel function pass manager as OnTheFly manager.
llvm-svn: 36481
2007-04-26 17:50:19 +00:00
Chris Lattner d2747054b4 print aliases before functions
llvm-svn: 36459
2007-04-26 02:24:10 +00:00
Anton Korobeynikov a97b694c82 Implement aliases. This fixes PR1017 and it's dependent bugs. CFE part
will follow.

llvm-svn: 36435
2007-04-25 14:27:10 +00:00
Chris Lattner bbe9b8a12f simplify some code
llvm-svn: 36427
2007-04-25 05:49:09 +00:00
Jeff Cohen af9a8a51a8 Have compiler enforce this.
llvm-svn: 36353
2007-04-22 22:16:55 +00:00
Christopher Lamb 8448570beb PR400 work phase 1. Add attributed load/store instructions for volatile/align to LLVM.
llvm-svn: 36349
2007-04-22 19:24:39 +00:00
Reid Spencer c6a83847a2 For PR1136:
Add reference counting to ParamAttrsList and make use of it in Function,
CallInst and InvokeInst classes.

llvm-svn: 36346
2007-04-22 17:28:03 +00:00
Reid Spencer 4388f0b4fa For PR1146:
Make ParamAttrsList objects unique. You can no longer directly create or
destroy them but instead must go through the ParamAttrsList::get()
interface.

llvm-svn: 36327
2007-04-22 05:46:44 +00:00
Reid Spencer 0c1349e6bc Revert Christopher Lamb's load/store alignment changes.
llvm-svn: 36309
2007-04-21 18:36:27 +00:00
Christopher Lamb bff50208c8 add support for alignment attributes on load/store instructions
llvm-svn: 36301
2007-04-21 08:16:25 +00:00
Devang Patel 2e2518cc2e Reset vertex.
Fix http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070416/048092.html

llvm-svn: 36294
2007-04-21 00:36:45 +00:00
Chris Lattner a5ebb6af95 Fix a bug that prevented the JIT from working correctly after llvm_shutdown.
Pass info objects are initialized by static ctors, so deleting them at
llvm_shutdown time prevents resurrection from working.

llvm-svn: 36292
2007-04-21 00:12:18 +00:00
Chris Lattner af332ee449 Fix regressions introduced by my previous patch: opt calls verifier in a
way that the "Mod" ivar was not getting set.

llvm-svn: 36291
2007-04-20 23:59:29 +00:00
Chris Lattner d9d3a4bbd6 Fix a problem where primitive types lose their name after llvm_shutdown is called.
This also reduces the amount of work done at static construction time.

llvm-svn: 36285
2007-04-20 22:33:47 +00:00
Chris Lattner 4ff0452265 catch a case that was biting jeffc
llvm-svn: 36284
2007-04-20 21:48:08 +00:00
Chris Lattner 82738fe254 don't access argument list of prototypes
llvm-svn: 36238
2007-04-18 00:57:22 +00:00
Chris Lattner da1ed8de79 eliminate a use of Instruction::getPrev(), patch by Gabor Greif in 2005.
llvm-svn: 36197
2007-04-17 17:36:12 +00:00
Chris Lattner 3c2ff10b93 merge several fields in GlobalValue to use the same word, move CallingConv
field into SubclassData in Value.  This shrinks GlobalVAlue from 48->40
bytes, Function from 88->76, and GlobalVariable from 76->68.  This trims
4640 bytes off my testcase, reading a bc file without materializing any
functions.

llvm-svn: 36192
2007-04-17 04:31:29 +00:00
Chris Lattner 422cfcdcb3 The (negative) offset from a SymbolTableListTraits-using ilist to its container
object is always constant.  As such, evaluate it at compile time instead of storing
it as an ivar in SymbolTableListTraits.  This shrinks every SymbolTableListTraits
ilist by a word, shrinking BasicBlock from 44->40 bytes, Function from 96->88 bytes,
and Module from 60->52 bytes.

llvm-svn: 36189
2007-04-17 04:04:14 +00:00
Chris Lattner b47aa543bb Refactor SymbolTableListTraits to only have a single pointer in it, instead
of two.  This shrinkifies Function by 8 bytes (104->96) and Module by 8
bytes (68->60).  On a testcase of mine, this reduces the memory used to
read a module header from 565680b to 561024, a little over 4K.

llvm-svn: 36188
2007-04-17 03:26:42 +00:00
Devang Patel 9294281ac1 Proivde getAnalysis<FPAnalysis>(Func) support.
llvm-svn: 36159
2007-04-16 20:56:24 +00:00
Devang Patel 56a5c620fe Do not assert during analysis implementation initialization.
llvm-svn: 36158
2007-04-16 20:44:16 +00:00
Devang Patel 2ff4492a2c Print and delete on the fly pass managers.
llvm-svn: 36157
2007-04-16 20:39:59 +00:00
Devang Patel 69e9f6d7c4 Update module pass manager to support module passes that require
function passes.

llvm-svn: 36154
2007-04-16 20:27:05 +00:00
Devang Patel e64d30573f Give each pass manager chance to manage lower level analysis pass, which is
pass required by one of pass managed by the manager.

llvm-svn: 36153
2007-04-16 20:12:57 +00:00
Anton Korobeynikov fb80151c42 Removed tabs everywhere except autogenerated & external files. Add make
target for tabs checking.

llvm-svn: 36146
2007-04-16 18:10:23 +00:00
Reid Spencer 78d71f168c Don't return 0 if the len == 5, let the assert handle that case.
Thanks, Chris.

llvm-svn: 36139
2007-04-16 16:56:54 +00:00
Reid Spencer c5f397a26f Fix test/CodeGen/Generic/vector-constantexpr.ll
llvm-svn: 36123
2007-04-16 07:08:44 +00:00
Reid Spencer 9c2eec377e For PR1328:
Don't assert everytime an intrinsic name isn't recognized. Instead, make
the assert optional when callin getIntrinsicID(). This allows the assembler
to handle invalid intrinsic names gracefully.

llvm-svn: 36120
2007-04-16 06:54:34 +00:00
Owen Anderson f064c92298 Tabs -> Spaces
llvm-svn: 36094
2007-04-15 23:14:18 +00:00
Owen Anderson f35a1dbc7a Remove ImmediateDominator analysis. The same information can be obtained from DomTree. A lot of code for
constructing ImmediateDominator is now folded into DomTree construction.

This is part of the ongoing work for PR217.

llvm-svn: 36063
2007-04-15 08:47:27 +00:00
Owen Anderson e59b36defa Fix some unsafe code. Also, tabs -> spaces.
llvm-svn: 36035
2007-04-14 23:57:00 +00:00
Owen Anderson 78cecc817f Make ETForest depend on DomTree rather than IDom. This is the first step
in the long process that will be fixing PR 217.

llvm-svn: 36034
2007-04-14 23:49:24 +00:00
Chris Lattner 45f15572f7 add GetElementPtrInst::hasAllZeroIndices, a long-overdue helper method.
Writing it twice in the same day was too much for me.

llvm-svn: 35978
2007-04-14 00:12:57 +00:00
Lauro Ramos Venancio 749e4668e7 Implement the "thread_local" keyword.
llvm-svn: 35950
2007-04-12 18:32:50 +00:00
Reid Spencer c6251a7dfd For PR1284:
Implement the "part_set" intrinsic.

llvm-svn: 35938
2007-04-12 02:48:46 +00:00
Reid Spencer 871a9ea4ef Fix a bug where ICmpInst objects instantiated directly with a name would
not retain that name. Not noticed because AsmParser always sets name after
construction. However, llvm2cpp noticed.

llvm-svn: 35903
2007-04-11 13:04:48 +00:00
Reid Spencer a472f66dd0 For PR1146:
Put the parameter attributes in their own ParamAttr name space. Adjust the
rest of llvm as a result.

llvm-svn: 35877
2007-04-11 02:44:20 +00:00
Chris Lattner 0e772b7726 unbreak the build :(
llvm-svn: 35857
2007-04-10 03:18:19 +00:00
Jeff Cohen a8644a6534 Fix build problem.
llvm-svn: 35856
2007-04-10 03:10:46 +00:00
Reid Spencer ce38beb6a4 For PR1146:
* Add ParamAttrs to InvokeInst class too.
* Make sure all initializes of ParamAttrs in CallInst and InvokeInst are 0
* Destruct the ParamAttrs in Call/Invoke destructors to avoid memory
  leaks. This will change when ParamAttrsList is uniquified but needs to
  be correct until then.

llvm-svn: 35824
2007-04-09 18:00:57 +00:00
Reid Spencer 8684923644 Remove a memory leak, until ParamAttrsList is uniqued.
llvm-svn: 35823
2007-04-09 17:20:18 +00:00
Reid Spencer 019c8869ed For PR1146:
* Add ParamAttrList pointers to Function and CallInst.
* Move the implementation of ParamAttrList from Type.cpp to Function.cpp

llvm-svn: 35818
2007-04-09 15:01:12 +00:00
Chris Lattner d112a031ea Convert ImmediateDominators::DFSPass from being recursive to being iterative.
llvm-svn: 35815
2007-04-09 06:44:42 +00:00
Reid Spencer e76289b8ea For PR1146:
Simplify construction of FunctionType to use default arguments.

llvm-svn: 35810
2007-04-09 06:12:07 +00:00
Reid Spencer 26d9ff65a3 For PR1146:
Parameter attributes can now be defaulted for intrinsics.

llvm-svn: 35809
2007-04-09 06:11:23 +00:00
Reid Spencer 1517de317a For PR1146:
Adjust writing of parameter attributes to use ParamAttrList class.

llvm-svn: 35808
2007-04-09 06:10:42 +00:00
Chris Lattner 0a5677d912 minor cleanups
llvm-svn: 35807
2007-04-09 06:10:06 +00:00
Reid Spencer 238633f17e For PR1146:
Move parameter attributes functionality to ParamAttrsList class.

llvm-svn: 35806
2007-04-09 06:07:52 +00:00
Owen Anderson 6978893a8f Move isReachableFromEntry out of line to avoid an unnecessary #include
llvm-svn: 35797
2007-04-09 04:07:36 +00:00
Owen Anderson fe507270ac Remove DomSet completely. This concludes work on PR1171.
llvm-svn: 35775
2007-04-08 21:30:05 +00:00
Nick Lewycky 73ffedb592 Don't crash when encountering a BasicBlock that hasn't been registered yet.
llvm-svn: 35756
2007-04-08 01:02:12 +00:00
Owen Anderson f7ebea1b9f Add DomSet back, and revert the changes to LoopSimplify. Apparently the
ETForest updating mechanisms don't work as I thought they did.  These changes
will be reapplied once the issue is worked out.

llvm-svn: 35741
2007-04-07 18:23:27 +00:00
Owen Anderson 8763ba1b88 Completely purge DomSet. This is the (hopefully) final patch for PR1171.
llvm-svn: 35731
2007-04-07 07:17:27 +00:00
Reid Spencer 8d529a18f4 For PR1209:
Implement Type class's ContainedTys without using a std::vector.

llvm-svn: 35693
2007-04-06 02:02:20 +00:00
Reid Spencer cce90f55ed Implement the llvm.bit.part_select.iN.iN.iN overloaded intrinsic.
llvm-svn: 35678
2007-04-04 23:48:25 +00:00
Reid Spencer 2a2117c82d For PR1297:
Implement "actual" argument types for the Intrinsic member functions. This
involves changing the getName, getType, and getDeclaration methods to have
optional parameters for the actual types. These are necessary in order for
the type/name to be constructed properly for overloaded intrinsics. Only
the caller knows the actual argument types desired.

llvm-svn: 35541
2007-04-01 07:25:33 +00:00
Reid Spencer 7c57b88b27 For PR1297:
1. Clear up confusion between "GotBits" and "ExpectBits". GotBits is the
   type actually provided. ExpectedBits is the type expected for the
   intrinsics. Before this patch, it was reversed!
2. Implement checks for overloaded intrinsics. This involves computing the
   suffix expected and making sure the suffix matches the function name. It
   also includes some intrinsic-specific checks such as ensuring that the
   bswap parameter and result are the same width and an even number of bytes.

llvm-svn: 35540
2007-04-01 07:22:57 +00:00
Chris Lattner 516f38b35f add a method to turn a type into a VT.
llvm-svn: 35526
2007-03-31 04:03:02 +00:00
Devang Patel 0b013d578d It is not possible to determine dominance between two PHI nodes
based on their ordering. This is applicable to ETForest::dominates() also.

llvm-svn: 35423
2007-03-28 14:57:43 +00:00
Reid Spencer 6d8e75ddb2 No need to generate the implementation keyword any more. Its frivolous.
llvm-svn: 35405
2007-03-28 01:53:20 +00:00
Devang Patel 5a1bd4045d Use SmallPtrSet.
llvm-svn: 35388
2007-03-27 20:50:46 +00:00
Devang Patel 2850c677af Spell check.
llvm-svn: 35374
2007-03-27 00:16:08 +00:00
Devang Patel bea581d70c It is not possible to determie dominance between two PHI nodes
based on their ordering.

llvm-svn: 35369
2007-03-26 23:18:28 +00:00
Devang Patel 55566a972c Use std::vector<DFCalculateWorkObject> instead of
std::vector<DFCalculateWorkObject *> to reduce malloc/free traffic.

llvm-svn: 35368
2007-03-26 23:17:19 +00:00
Reid Spencer e20090b88d Add a comment to explain a folding transform.
llvm-svn: 35360
2007-03-26 20:09:02 +00:00
Chris Lattner 6d94bb79ac fold constantexprs more aggressively, fixing PR1265
llvm-svn: 35336
2007-03-25 05:47:04 +00:00
Chris Lattner 7750e344d3 add a valuetype for v1i64, which is needed by mmx.
llvm-svn: 35298
2007-03-24 17:36:26 +00:00
Reid Spencer d96dc9020a Fix constant fold of div by zero and rem by zero to match IEEE 754
requirements. We must return NaN in some cases and correctly signed
infinity in other cases. Passes CFP2006 (not that that says much).

llvm-svn: 35277
2007-03-23 05:33:23 +00:00
Dan Gohman dcb291faa4 Change uses of Function::front to Function::getEntryBlock for readability.
llvm-svn: 35265
2007-03-22 16:38:57 +00:00
Reid Spencer 478dcd0239 Add the NoUnwind function attribute.
llvm-svn: 35260
2007-03-22 02:14:48 +00:00
Devang Patel eb5d241d00 DominanceFrontier::calculate().
Avoid recursion, Use iterative algorithm.

llvm-svn: 35225
2007-03-20 21:25:31 +00:00
Devang Patel 1758cb50de LoopSimplify::FindPHIToPartitionLoops()
Use ETForest instead of DominatorSet.

llvm-svn: 35221
2007-03-20 20:18:12 +00:00
Chris Lattner af867a3937 Fix a nasty memory leak, caused by my revamp of the value symbol table.
llvm-svn: 35195
2007-03-20 00:18:10 +00:00
Reid Spencer 362fb29d80 Allow ConstantInt::get(Ty, uint64_t) to interpret the 64-bit values as a
negative number. This is needed to fix test/Assembler/2007-03-19-NegValue.ll

llvm-svn: 35181
2007-03-19 20:39:08 +00:00
Reid Spencer 508167861d For PR1258:
Radically simplify the SlotMachine. There is no need to keep Value planes
around any more. This change causes slot numbering to number all un-named,
non-void values starting at 0 and incrementing monotonically through the
function, regardless of type (including BasicBlocks). Getting slot numbers
is now a single lookup operation instead of a double lookup.

llvm-svn: 35171
2007-03-19 18:32:53 +00:00
Devang Patel 01919d2c0b Speed Up Pass Manager.
- Check Immutableness before searching PreservedSet.
- Avoid unnecessary traversal while setting Last User.

llvm-svn: 35028
2007-03-08 19:05:01 +00:00
Evan Cheng f9e003b653 Added ContainsRelocations() to check if a constant might only be resolvable at load time.
llvm-svn: 35014
2007-03-08 00:59:12 +00:00
Devang Patel 9d9fc90952 Keep track of higher level analysis.
llvm-svn: 34974
2007-03-06 17:52:53 +00:00
Devang Patel 42dd1e92c7 Keep track of inherited analysis. For example, if a loop pass does not
preserve dominator info then it should update parent FPPassManager's
available analysis info to reflect this.

llvm-svn: 34942
2007-03-06 01:55:46 +00:00
Devang Patel d74ede70fb Add preparePassManager() hook. This allows each pass to check whether
current active pass manager is appropriate or not.

A loop pass may consider current LPPassManager in appropraite if loop
pass is not preserving analysis information that is used by other
passes managed by current LPPassManager. In such situation, loop pass
can pop current LPPassManager from the PMStack using this  hook
and use new LPPassManager for itself.

llvm-svn: 34941
2007-03-06 01:06:16 +00:00
Devang Patel ec2b9a7850 Current pass manager, not the parent pass manager, assumes the role of
last user when one of the managed pass uses info provided by parent pass
manager.

This was exposed by LPPassManager work.

llvm-svn: 34936
2007-03-05 22:57:49 +00:00
Devang Patel 003a559633 Avoid constructing std::strings unless pass debugging is ON.
llvm-svn: 34933
2007-03-05 20:01:30 +00:00
Devang Patel 7ebf09dbca Account for time consumed by releaseMemory() properly.
llvm-svn: 34932
2007-03-05 18:20:51 +00:00
Jeff Cohen b622c11f77 Unbreak VC++ build.
llvm-svn: 34917
2007-03-05 00:00:42 +00:00
Reid Spencer 50d7ad9183 Fix constant folding of fp->int bitcast for vectors.
llvm-svn: 34880
2007-03-03 08:32:46 +00:00
Reid Spencer 2e54a15943 Prefer non-virtual calls to ConstantInt::isZero over virtual calls to
Constant::isNullValue() in situations where it is possible.

llvm-svn: 34821
2007-03-02 00:28:52 +00:00
Reid Spencer 4326cf5c51 Use the APInt versions of the bit-wise conversions of float/double to int
and back. While this is not strictly necessary, it does pave the way for
future changes in casting. It should now be possible to improve vector
casting to deal with un-equal fp/int sizes.

llvm-svn: 34808
2007-03-01 20:44:23 +00:00
Reid Spencer a9e6e31db6 Use modern variable name. ConstantUnsignedInt is long since dead. No
functional change with this patch.

llvm-svn: 34806
2007-03-01 20:27:41 +00:00
Reid Spencer a127633716 Use a simpler constructor when constructing ConstantInst.
llvm-svn: 34793
2007-03-01 19:31:12 +00:00
Reid Spencer d1bbfa5aa6 Drop the ConstantInt(const Type&, const APInt&) constructor. It is
redundant and more verbose than the ConstantInt(const APInt&) constructor.

llvm-svn: 34792
2007-03-01 19:30:34 +00:00
Reid Spencer 5a642a7991 Reduce #includage by taking a method out of line.
llvm-svn: 34774
2007-03-01 04:02:06 +00:00
Reid Spencer 0286bc1af5 Provide an ICmpInst::makeConstantRange to generate a ConstantRange value
from a predicate and an APInt. This is removed from ConstantRange class
so that ConstantRange doesn't have to depend on lib/VMCore.

llvm-svn: 34760
2007-02-28 22:00:54 +00:00
Reid Spencer 8774fe816a Implement a convenience method to construct a ConstantInt directly from an
APInt. The implied type is the integer type that corresponds to the bit
width of the APInt.

llvm-svn: 34757
2007-02-28 19:50:21 +00:00
Reid Spencer 4aeaeaf894 Pull out the stops.
llvm-svn: 34703
2007-02-27 23:33:03 +00:00
Reid Spencer 3370b04a66 Remove some redundancy.
llvm-svn: 34702
2007-02-27 23:27:26 +00:00
Reid Spencer e2eb1fab8c Adjust to changes in the APInt interface.
llvm-svn: 34681
2007-02-27 20:25:25 +00:00
Reid Spencer ac419b52ad For PR1205:
Implement review feedback:
1. Use new APInt::RoundDoubleToAPInt interface to specify the bit width so
   that we don't have to truncate or extend in constant folding.
2. Fix a pasteo in SDiv that prevented a check for overflow.
3. Fix the shift operators: undef happens when the shift amount is equal
   to the bitwidth.

llvm-svn: 34677
2007-02-27 19:29:54 +00:00
Devang Patel 28349abeab Make getPassManagerType() const.
llvm-svn: 34669
2007-02-27 15:00:39 +00:00
Reid Spencer ad25003200 Allow the AsmWriter to print out arbitrary precision integers.
llvm-svn: 34664
2007-02-27 08:34:09 +00:00
Reid Spencer a91ec25da0 Correct the implelmentation of ConstantInt::getAllOnesValue() for bit
widths > 64 bits.

llvm-svn: 34663
2007-02-27 07:57:53 +00:00
Reid Spencer 81658a8aca For PR1205:
Implement constant folding via APInt instead of uint64_t.

llvm-svn: 34660
2007-02-27 06:23:51 +00:00
Chris Lattner 33e93b84af ConstantFolding.cpp/h -> ConstantFold.cpp/h to avoid confusion with
lib/Analysis/ConstantFolding.

llvm-svn: 34653
2007-02-27 03:05:06 +00:00
Reid Spencer b31bffed96 For PR1205:
Implement the first step towards arbitrary precision integer support in
LLVM. The APInt class provides arbitrary precision arithmetic and value
representation. This patch changes ConstantInt to use APInt as its value
representation without supporting bit widths > 64 yet. That change will
come after ConstantFolding handles bit widths > 64 bits.

llvm-svn: 34647
2007-02-26 23:54:03 +00:00
Chris Lattner dd89d9c648 reapply my previous patch with a bugfix.
llvm-svn: 34627
2007-02-26 05:02:39 +00:00
Chris Lattner b5359f0994 revert my previous change, something strange is happening.
llvm-svn: 34626
2007-02-26 04:43:19 +00:00
Chris Lattner 76ac8f82bd Rework GlobalValue::removeDeadConstantUsers to always remove dead constant
exprs hanging off a global, even if the global is not otherwise dead.  This
requires some tricky iterator gymnastics.

This implements Transforms/GlobalOpt/constantexpr-dangle.ll by deleting a
constantexpr that made it appear that the address of the function was taken.

llvm-svn: 34608
2007-02-25 21:06:13 +00:00
Chris Lattner b377a7ca11 disable some noisy debug output
llvm-svn: 34606
2007-02-25 20:42:59 +00:00
Chris Lattner fb94fe742b Fix Transforms/ConstProp/2007-02-23-sdiv.ll and PR1215
llvm-svn: 34548
2007-02-24 01:19:50 +00:00
Chris Lattner 2195fc41ec Refactor the setName stuff, moving it down the inheritance hierarchy, to
solve a crash in -instcombine -debug that was hit while investigating PR1217

llvm-svn: 34544
2007-02-24 00:55:48 +00:00
Evan Cheng 71b8723f07 This cast broke lots of tests.
llvm-svn: 34457
2007-02-20 21:30:56 +00:00
Chris Lattner c6ee77d1b0 switch ConstantFP's from ValueMap to DenseMap, which is much faster to query
and is more memory efficient.

llvm-svn: 34446
2007-02-20 07:17:17 +00:00
Chris Lattner a80bf0b2a6 cleanup ConstantInt to use a single DenseMap for uniquing instead of the
heavy-weight ValueMap class.  This reduces mem usage bc reading kc++ by 29K,
even though it only creates 2955 constant ints!

llvm-svn: 34445
2007-02-20 06:39:57 +00:00
Chris Lattner 281735098a Make ConstantInt::getTrue/getFalse be llvm_shutdown safe.
llvm-svn: 34443
2007-02-20 06:11:36 +00:00
Chris Lattner 5db2f47364 Clean up the internals of the ConstantInt machinery
llvm-svn: 34441
2007-02-20 05:55:46 +00:00
Chris Lattner dbcb0d3ffe simplify some code that was not llvm_shutdown safe
llvm-svn: 34440
2007-02-20 05:46:39 +00:00
Chris Lattner 62b2842b6f remove dead method
llvm-svn: 34436
2007-02-20 05:29:47 +00:00
Chris Lattner b5d703018b llvm-gcc issue fixed, revert reversal :)
llvm-svn: 34425
2007-02-19 20:01:23 +00:00
Chris Lattner 86358635e5 remove warning
llvm-svn: 34424
2007-02-19 19:46:17 +00:00
Evan Cheng 0a02f82767 Temporarily reverting the patch. It's breaking llvm-gcc build.
llvm-svn: 34423
2007-02-19 19:23:41 +00:00
Reid Spencer 887ae70af5 Add a FIXME for unwritten code.
llvm-svn: 34422
2007-02-19 19:00:29 +00:00
Chris Lattner 4669b0bf54 remove dead methods
llvm-svn: 34419
2007-02-19 07:44:24 +00:00
Chris Lattner 9df8be40fe temporarily revert Devang's most recent patch, which caused a large
compile-time regression in LLC.

llvm-svn: 34385
2007-02-17 23:14:24 +00:00
Devang Patel 98354dabc1 Use inverted map to speedup collectLastUses().
llvm-svn: 34364
2007-02-17 03:53:44 +00:00
Andrew Lenharth 9d4819be08 fix build
llvm-svn: 34339
2007-02-16 02:25:55 +00:00
Chris Lattner c992e18f8d make mayWriteToMemory a non-virtual function
llvm-svn: 34334
2007-02-15 23:15:00 +00:00
Chris Lattner cf835ff85a rewrite Value::takeName to take advantage of the new symtab stuff. This
causes it to require no allocations and no symtab lookups in the common
case.  This speeds up instcombine 9.2% on 447.dealII.

llvm-svn: 34324
2007-02-15 20:01:43 +00:00
Chris Lattner 1e92e06779 Implement Function::getIntrinsicID without it needing to call Value::getName,
which allocates a string.  This speeds up instcombine on 447.dealII by 5%.

llvm-svn: 34318
2007-02-15 19:17:16 +00:00
Chris Lattner fd27ed9733 Add a new Value::getNameStr method, which is preferred over getName.
llvm-svn: 34310
2007-02-15 18:53:54 +00:00
Reid Spencer 09575bac2e For PR1195:
Change use of "packed" term to "vector" in comments, strings, variable
names, etc.

llvm-svn: 34300
2007-02-15 03:39:18 +00:00
Reid Spencer d4a0b7bb7b For PR1195:
Change a comment: Packed Type -> Vector Type

llvm-svn: 34299
2007-02-15 03:11:50 +00:00
Reid Spencer d84d35ba70 For PR1195:
Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and
PackedTyID -> VectorTyID. No functional changes.

llvm-svn: 34293
2007-02-15 02:26:10 +00:00
Chris Lattner 084c4ca591 better support for i128.
llvm-svn: 34258
2007-02-13 23:57:55 +00:00
Chris Lattner 0f04816cad Switch UnaryOperators to default to passing names up by const char* when possible.
This speeds up bcreading by 1.5%.

llvm-svn: 34233
2007-02-13 07:54:42 +00:00
Chris Lattner cb9a626c67 add a setName variant that takes a null-terminated string. This can be
used to avoid std::string allocations in common cases.

llvm-svn: 34232
2007-02-13 07:53:34 +00:00
Chris Lattner e563e480d9 eliminate instruction ctors that take vectors.
llvm-svn: 34228
2007-02-13 06:22:32 +00:00
Chris Lattner b5fcc28075 Add invokeinst and callinst ctors that don't take vectors.
llvm-svn: 34214
2007-02-13 01:04:01 +00:00
Chris Lattner 054ba2c002 remove some dead methods.
llvm-svn: 34213
2007-02-13 00:58:44 +00:00
Chris Lattner 1a5de584dc Add new setName accessor which doesn't require creating a string.
llvm-svn: 34197
2007-02-12 18:52:59 +00:00
Chris Lattner 32ab643df7 Switch ValueSymbolTable to use StringMap<Value*> instead of std::map<std::string, Value*>
as its main datastructure.  There are many improvements yet to be made, but
this speeds up opt --std-compile-opts on 447.dealII by 7.3%.

llvm-svn: 34193
2007-02-12 05:18:08 +00:00
Chris Lattner 569c8acfe3 fix uninitialized variable
llvm-svn: 34182
2007-02-11 19:12:18 +00:00
Chris Lattner cba18e3a01 add an optimization for the case where the src has no name
llvm-svn: 34174
2007-02-11 01:04:09 +00:00
Chris Lattner b625082a42 add a helper method: Value::takeName
llvm-svn: 34171
2007-02-11 00:37:27 +00:00
Reid Spencer d63a5200cb Assert that elements of packed are pointer/float/opaque.
llvm-svn: 34165
2007-02-10 22:02:45 +00:00
Reid Spencer 8a5e9891e8 Allow PackedType to be constructed with an abstract type.
llvm-svn: 34152
2007-02-10 19:03:01 +00:00
Chris Lattner 59a8d2c30f convert some vectors to smallvector.
llvm-svn: 34145
2007-02-10 08:33:11 +00:00
Chris Lattner 84d82c7e98 speed up the verifier 8.5% by using a smallvector instead of vector.
llvm-svn: 34144
2007-02-10 08:30:29 +00:00
Chris Lattner bc97cc29e7 Change an std::set to a SmallPtrSet. This speeds up the verifier on
447.dealII from 1.27s to 0.86s.

llvm-svn: 34143
2007-02-10 08:19:44 +00:00
Chris Lattner d2e8e55ae0 Fix clients like this:
delete ParseBytecodeFile(InputFilename, 0, &ErrorMessage);
  llvm_shutdown();
  delete ParseBytecodeFile(InputFilename, 0, &ErrorMessage);

The primitive type objects failed to ressurect themselves after shutdown, leading
to crashes in clients that used them after llvm_shutdown().

This solution isn't wonderful, because we clearly have static ctors.  However,
the code it replaces was just as bad, so it's not a regression.

llvm-svn: 34106
2007-02-09 22:24:04 +00:00
Jim Laskey 2682ea616f Automatically generating intrinsic declarations from Dan Gohman. Modified
to construct FunctionType in separate function, and, have getDeclaration
return a Function instead of a Constant.

llvm-svn: 34008
2007-02-07 20:38:26 +00:00
Devang Patel 4d06ace0ef Do not drop transferred last uses on the floor.
Use handleLastUserOverflow().

llvm-svn: 34006
2007-02-07 19:37:53 +00:00
Chris Lattner 86fc08145b constants can't be in the symtab anymore
llvm-svn: 33993
2007-02-07 06:28:48 +00:00
Chris Lattner d17dbe9dcd update comment.
llvm-svn: 33992
2007-02-07 06:25:36 +00:00
Chris Lattner 88051b0fad shrink vmcore by moving symbol table stripping support out of VMCore into
the one IPO pass that uses it.

llvm-svn: 33990
2007-02-07 06:22:45 +00:00
Chris Lattner f5df4859cd eliminate ValueSymbolTable::rename, it has no advantage over using remove+insert.
Make insert/remove assert if used incorrectly instead of returning a bool.

llvm-svn: 33988
2007-02-07 06:13:49 +00:00
Chris Lattner 71a60ba41c speed up conflict handling.
llvm-svn: 33985
2007-02-07 05:52:51 +00:00
Chris Lattner c8d5207b85 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.

llvm-svn: 33983
2007-02-07 05:35:58 +00:00
Chris Lattner afd6f2f463 TypeSymbolTable::rename is dead, remove it
llvm-svn: 33982
2007-02-07 05:29:34 +00:00
Chris Lattner 770dadf308 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!

llvm-svn: 33981
2007-02-07 05:22:49 +00:00
Jim Laskey 5aed30d5cf Support var arg intrinsics.
llvm-svn: 33962
2007-02-06 18:02:54 +00:00
Chris Lattner e62c89a9f5 Fix Transforms/ConstProp/2007-02-05-BitCast.ll
llvm-svn: 33948
2007-02-06 02:22:56 +00:00
Reid Spencer d7a00d7414 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 1241d6d5ab 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 3aaaa0b2bd 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 3f806969ed 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 3f4e6e84dc 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 0cdd04fa90 Fix a comment that needed to change after SHIFT patch landed.
llvm-svn: 33781
2007-02-02 13:54:55 +00:00
Reid Spencer 2341c22ec7 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 e3858e6674 cvs commit
llvm-svn: 33765
2007-02-01 22:08:25 +00:00
Chris Lattner f14c76cf5d silence some warnings when assertions are disabled.
llvm-svn: 33747
2007-02-01 04:59:37 +00:00
Reid Spencer dee14b50e4 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 79807c3dfe implement the new GEP instruction ctors.
llvm-svn: 33708
2007-01-31 19:47:18 +00:00
Chris Lattner 302116a5ec 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 5301e7c605 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 1c3633e461 - 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 55bcb50840 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 037c867b54 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 c56315c2b5 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 93b2d78121 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 788e317cd7 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 c4fbcb370b 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 a760b7e1d3 IntegerType is a sized DerivedType too.
llvm-svn: 33521
2007-01-26 07:51:36 +00:00
Reid Spencer 2546b76054 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 7e16e23df8 Fix an assertion message.
llvm-svn: 33519
2007-01-26 06:30:34 +00:00
Reid Spencer 6598ca8ab1 Whoops, fix typo in last commit.
llvm-svn: 33417
2007-01-21 02:29:10 +00:00
Reid Spencer 2eadb5310d 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 50ee0e40e5 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 adf4118a36 Remove dead methods in the ValTypes.
llvm-svn: 33372
2007-01-19 21:25:12 +00:00
Reid Spencer a94d394ad2 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 f15cd5637b Use a cheaper computation.
llvm-svn: 33336
2007-01-18 18:14:49 +00:00
Reid Spencer 2867a1d466 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 23f8aa921e Update ModulePass::assignPassManager() to take into account Preferred
Pass Manager Type.

llvm-svn: 33308
2007-01-17 21:19:23 +00:00
Devang Patel fd41843243 s/PassDebugging_New/PassDebugging/g
llvm-svn: 33307
2007-01-17 20:33:36 +00:00
Devang Patel dffca63396 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 00e5e0ea8f For PR1117:
Expose the previously hidden checkCast function as CastInst::castIsValid.

llvm-svn: 33282
2007-01-17 02:46:11 +00:00
Devang Patel d85662f67d 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 3312f75071 Undo last check-in.
Remove setupPassManager() and its use.

llvm-svn: 33270
2007-01-16 21:43:18 +00:00
Devang Patel 68dc3d2263 Setup pass manager before scheduling required analysis.
llvm-svn: 33262
2007-01-16 19:46:09 +00:00
Devang Patel 4268fc08d3 Code refactoring.
llvm-svn: 33245
2007-01-16 02:00:38 +00:00
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