Commit Graph

1756 Commits

Author SHA1 Message Date
Devang Patel
017b5d969b Add debug-pass=Details support to print Required and Preserved Set info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32573 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-14 00:25:06 +00:00
Devang Patel
693a74e4ee Add " Made Modification " messages in debug-pass=Executions output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32572 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-14 00:08:04 +00:00
Devang Patel
4eeea774ce Add debug-pass=Executions support in new pass manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32571 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-13 23:50:44 +00:00
Devang Patel
c32cf54101 Add -pass-debug=Arguments support in new manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32567 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-13 22:10:00 +00:00
Chris Lattner
6e9e5e026a fit in 80 cols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32563 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-13 21:56:10 +00:00
Devang Patel
e8ff1ce734 Using PDL as a prefix for PassDebugLevel enums is not a good idea.
Fix it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32562 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-13 21:13:31 +00:00
Devang Patel
45dc02d6f9 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32554 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-13 20:03:48 +00:00
Jim Laskey
5fed164d70 Update version in safe guards.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32546 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-13 17:49:24 +00:00
Chris Lattner
4d17caadbc only check non-external functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32530 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-13 04:45:46 +00:00
Chris Lattner
41af719526 Reject attempts to define intrinsics. This fixes PR1047 and
Regression/Verifier/2006-12-12-IntrinsicDefine.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32529 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-13 04:30:37 +00:00
Devang Patel
3162691f69 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32525 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-13 02:36:01 +00:00
Devang Patel
2db3a3bed7 FunctionPassManager does not support runOnModule().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32519 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-13 00:34:32 +00:00
Devang Patel
37a6f7966c Implement PassManager_New destructors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32517 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-13 00:09:23 +00:00
Devang Patel
d4ea4ef541 Remove unused constructor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32516 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 23:51:31 +00:00
Reid Spencer
d977d8651a 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32514 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 23:36:14 +00:00
Devang Patel
ebc0922eeb Add routines to dump pass manager queue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32513 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 23:34:33 +00:00
Devang Patel
b920bd85ad FunctionPassManager()
Set AnalysisResolver_New and add FPM to PassManagers list.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32512 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 23:27:37 +00:00
Devang Patel
1fbe2c9964 Do not runOnFunction on external functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32510 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 23:15:28 +00:00
Devang Patel
41545fd663 Initialize AnalysisImpls for each pass before executing the pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32509 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 23:13:09 +00:00
Devang Patel
27aaab2bd3 collectRequiredAnalysisPasses().
Include RequiredTrainsitiveSet also.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32508 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 23:09:32 +00:00
Devang Patel
54e247d2d0 removeNotPreservedAnalysis().
Do not remove ImmutablePass from the list.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32507 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 23:07:44 +00:00
Devang Patel
395ed73984 Initialize activeManager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32506 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 22:57:43 +00:00
Devang Patel
1e1008a52e Remove unused constructor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32505 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 22:56:36 +00:00
Devang Patel
a5f9d556b7 Maintain ImmutablePasses list at top level only. Do not make them
directly available to individual managers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32504 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 22:53:40 +00:00
Devang Patel
d0fa16c336 findAnalysisPass().
First search all available passes before searching ImmutablePasses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32503 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 22:50:05 +00:00
Devang Patel
7e601a70fc Fix thinko.
While searching for a analysis in a pass manager, do not search it into
pass manager's manager.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32501 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 22:47:13 +00:00
Devang Patel
1b8d015066 o s/OtherPassManagers/IndirectPassManagers
o Make IndirectPassManagers vector of PMDataManager *
o Move PMTopLevelManager implementation below all class declarations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32499 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 22:35:25 +00:00
Devang Patel
689c683bcc Initialize AnalysisImpls for ImmutablePass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32498 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 22:21:37 +00:00
Devang Patel
dff33ef8e8 Set top level manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32496 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 22:02:16 +00:00
Reid Spencer
f25212a223 Don't create usless casts for same-bith-width floating point casts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32475 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 05:38:50 +00:00
Reid Spencer
84f3eab017 Implement getIntegerCast and getFPCast for ConstantExpr. These are similar
to the createIntegerCast and createFPCast for CastInst instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32457 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 00:51:07 +00:00
Reid Spencer
6d81a7d2ae 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32456 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 00:49:44 +00:00
Reid Spencer
8c4fed50e3 Fix constant folding of FP->int due to cut & paste error in last commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32447 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 21:27:28 +00:00
Chris Lattner
14f440aae7 Implement correct constant folding of bitcast. This implements
Transforms/ConstProp/bitcast.ll and fixes
SingleSource/Regression/C/2003-10-12-GlobalVarInitializers


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32438 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 18:30:27 +00:00
Chris Lattner
36c2451ddb fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32428 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 02:16:58 +00:00
Chris Lattner
87f28e87d7 fix PR1039 by making timing info be destroyed by llvm_shutdown, not by
static dtors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32411 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-10 07:40:46 +00:00
Devang Patel
298feadd7a Analysis resolver now manages AnalysisImpls for the given patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32389 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-09 01:11:34 +00:00
Devang Patel
5b640e7edc Top level pass manager keeps track of other managers, so this can be
removed now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32388 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-09 00:09:12 +00:00
Devang Patel
cd520b187a Use analysis resolver to find the info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32387 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-09 00:07:38 +00:00
Devang Patel
c9a6293af7 Do not drop ImmutablePasses on the floor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32386 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-08 23:57:43 +00:00
Devang Patel
145e83dc12 Set AnalysisResolver for the passes when they are inserted into
pass manager queuer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32385 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-08 23:53:00 +00:00
Devang Patel
f3dc6d9f95 Add AnalysisResolver_New. It is a replacement for existing
AnalysisResolver.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32383 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-08 23:28:54 +00:00
Devang Patel
591b1b7526 Keep track of other pass managers, that are not directly managed by
top level manager. Use this info to findAnalysisPass.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32382 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-08 23:11:43 +00:00
Devang Patel
c475692c5e Implement top level FunctionPassManager::run(Function &F)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32381 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-08 22:57:48 +00:00
Devang Patel
a083e94f79 Do not keep yet another list of pass managers in PassManagerImpl_New.
Use one provided by toplevel manager.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32380 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-08 22:47:25 +00:00
Devang Patel
e61b7478e5 Remove unused schedulePass() parameter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32379 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-08 22:34:02 +00:00
Devang Patel
3279d4c781 Remove unused getAnalysisPass and getAnalysisPassFromManager
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32378 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-08 22:32:32 +00:00
Devang Patel
69867b511c Implement PMTopLevel::findAnalysisPass() and
PMDataManager::findAnalysisPass()


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32377 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-08 22:30:11 +00:00
Devang Patel
4d9a186b10 During runOnModule() do initialization and finalization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32371 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-08 19:04:09 +00:00
Devang Patel
97856ceeab Reuse code. Directly use runOnFunction().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32370 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-08 19:03:05 +00:00
Devang Patel
cc132cd9fe Implement FunctionPassManager_New::FunctionPassManager_New(ModuleProvider *P)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32368 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-08 18:57:16 +00:00
Andrew Lenharth
38ecbf18eb Packed Structures
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32361 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-08 18:06:16 +00:00
Devang Patel
3b14fbe300 BasicBlockPassManager_New::runOnFunction()
Do initialization and finalization.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32346 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-08 01:38:28 +00:00
Devang Patel
964e45e607 doInitialization and doFinalization for BasicBlockPassManager_New
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32345 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-08 00:59:05 +00:00
Devang Patel
f9a60ae75d Reimplement removeDeadPasses().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32344 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-08 00:37:52 +00:00
Devang Patel
e166340650 set Last User.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32342 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 23:55:10 +00:00
Bill Wendling
1a097e30d3 Don't use <sstream> in Streams.h but <iosfwd> instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32340 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 23:41:45 +00:00
Devang Patel
f72d29c540 Maintain level(or depth) of pass manager in pass manager food chain.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32339 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 23:24:58 +00:00
Devang Patel
c17bbb6da7 New method, PMDataManager::collectRequiredAnalysisPasses()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32338 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 23:05:44 +00:00
Devang Patel
badc4fae53 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32334 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 22:34:21 +00:00
Devang Patel
6e49d8b4bf PMDataManager does not maintain LastUser info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32332 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 22:17:09 +00:00
Devang Patel
0ac961d9c1 Make current pass info available _after_ removing info that is not
preserved.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32329 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 22:09:36 +00:00
Devang Patel
b917e38c84 Add TODOs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32328 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 21:58:50 +00:00
Devang Patel
502f19e0f8 Fix thinko.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32327 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 21:44:12 +00:00
Devang Patel
877bfbb9ef Top level manages schedule the pass immediately at the time of insertion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32326 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 21:32:57 +00:00
Devang Patel
eb0d613ef6 Now FunctionPassManagerImpl_New and PassManagerImpl_New derives from
PMTopLevelManager.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32325 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 21:27:23 +00:00
Devang Patel
1209f416cf Reimplement schedulePass interface. Move it into PMTopLevelManager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32324 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 21:10:57 +00:00
Devang Patel
1b17033bc7 While initializing AvailableAnalysis info, make ImmutablePasses available
immediately.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32323 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 21:02:08 +00:00
Devang Patel
3e44559d01 Add ImmutablePass into the list of info managed by top level pass
manager.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32322 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 20:51:18 +00:00
Bill Wendling
832171cb97 Removing even more <iostream> includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32320 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 20:04:42 +00:00
Devang Patel
04b4e0595f If pass reserves all analysis info then each info is not separately
included in PreservedSet. So check getPreservesAll() first.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32319 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 20:03:49 +00:00
Devang Patel
66d72e140b Pass Managers themselves do not invalidate any analysis info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32318 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 19:57:52 +00:00
Devang Patel
dc48f203cd Add a handle to the top level pass manager in PMDataManager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32317 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 19:54:15 +00:00
Devang Patel
06e86561a5 Cosmetic markers to divide code in separate chunks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32316 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 19:39:39 +00:00
Devang Patel
f32b4dd13e s/noteDownAvailableAnalysis/recordAvailableAnalysis
While recording available analysis, include interfaces implemented.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32315 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 19:33:53 +00:00
Devang Patel
3f5d2b58b8 Add PMTopLevelManager. It is not used yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32314 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 19:21:29 +00:00
Devang Patel
4045af1175 RequiredAnalysis support is buggy and not used at the moment so remove
the code. Add TODO note.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32313 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 18:47:25 +00:00
Devang Patel
cbfd29d0da s/clearAnalysis/initializeAnalysisInfo/g
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32312 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 18:41:09 +00:00
Devang Patel
419f0e95d6 s/CommonPassManagerImpl/PMDataManager/g
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32311 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 18:36:24 +00:00
Devang Patel
e77242c3d5 Add overview of pass manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32309 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 18:23:30 +00:00
Reid Spencer
6b538cfc5c Provide a getOpcode() method on CmpInst to ensure the opcode is returned
as the right type. Use this to shorten some code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32300 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 04:18:31 +00:00
Bill Wendling
e81561909d Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, are
now cerr, cout, and NullStream resp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32298 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 01:30:32 +00:00
Reid Spencer
5c14a1bcb0 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32287 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 20:30:17 +00:00
Chris Lattner
82c4bc7153 Remove the dead CachedWriter class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32271 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 06:40:49 +00:00
Chris Lattner
2fcfdb79d0 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32265 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 06:24:27 +00:00
Chris Lattner
3749c9cae4 Remove the 'printname' argument to WriteAsOperand. It is always true, and
passing false would make the asmprinter fail anyway.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32264 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 06:16:21 +00:00
Chris Lattner
a6b1ffcfaa The hasSlot methods are gone.
Remove the 'PrintName' argument to WriteAsOperand, as it is always true.
Only call getOrCreateSlot on things that are valid.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32263 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 06:15:43 +00:00
Chris Lattner
4932a5a335 remove unused api, simplify some code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32260 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 05:55:41 +00:00
Chris Lattner
919e70c3ff remove more code that was only used by the bc writer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32259 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 05:50:41 +00:00
Chris Lattner
c3e56e20e4 remove dead code left over from when this functionality was shared with the
bcwriter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32258 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 05:42:32 +00:00
Chris Lattner
de891a6c35 rename createSlot -> getOrCreateSlot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32256 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 05:27:40 +00:00
Chris Lattner
c96ce89c97 clean up some sloppy and inconsistent spacing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32255 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 05:12:21 +00:00
Chris Lattner
d6d826cdad wrap long lines
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32254 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 04:41:52 +00:00
Reid Spencer
87d5f6c29f Fix constant folding to deal with external weak global values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32247 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 00:25:09 +00:00
Chris Lattner
518f6fa310 Fix Transforms/InstCombine/2006-12-05-fp-to-int-ext.ll, fixing an out-of-
stack-space issue in the ppc bootstrap.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32244 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-05 23:43:59 +00:00
Reid Spencer
7858b336f2 Bail on the getInferredCast idea. Remove the function and convert
remaining uses to more specific casts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32231 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-05 19:14:13 +00:00
Reid Spencer
6f40b831e0 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32219 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-05 07:18:07 +00:00
Reid Spencer
57c699381b Remove the last inferred casts from VMCore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32213 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-05 03:30:09 +00:00
Reid Spencer
330d86d748 Implement createPointerCast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32212 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-05 03:28:26 +00:00
Reid Spencer
c0459fb7f5 Implement getPointerCast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32211 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-05 03:25:26 +00:00
Reid Spencer
67263fec75 Separate getCompare from get and getCompareTy from getTy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32200 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-04 21:35:24 +00:00
Reid Spencer
848414e49c 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32191 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-04 20:17:56 +00:00
Reid Spencer
8d5a6ae171 Reduce the size of the ExprMapKeyType class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32186 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-04 18:38:05 +00:00
Reid Spencer
077d0eb1bd For PR950: Fix constant expressions to properly support ICmp and FCmp type expressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32170 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-04 05:19:50 +00:00
Reid Spencer
2f8bbf5d65 For PR950: Implement a stub for folding ICmp and FCmp instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32169 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-04 05:19:34 +00:00
Reid Spencer
81dfeb3264 For PR950: Implement ICmp/FCmp predicate printing for constant expressions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32168 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-04 05:19:18 +00:00
Reid Spencer
575d95ce37 Change inferred casts to explicit casts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32165 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-04 02:46:44 +00:00
Reid Spencer
56667123b7 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32164 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-04 02:43:42 +00:00
Reid Spencer
c1126ac7cd Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32157 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-03 16:21:33 +00:00
Reid Spencer
87e8ec9a50 Shorten the FCmp predicate mnemonics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32150 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-03 06:35:48 +00:00
Reid Spencer
74f1642bc1 Allow the ICmp and FCmp instructions to be written by the AsmWriter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32148 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-03 06:27:29 +00:00
Reid Spencer
728b6db6fb Implement creation of ICmp and FCmp constant expressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32147 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-03 05:48:19 +00:00
Jeff Cohen
97af751deb Unbreak VC++ build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32113 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-02 02:22:01 +00:00
Chris Lattner
ee740834ab Switch analysis groups to be unregistered when llvm_shutdown is called.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32110 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 23:46:50 +00:00
Chris Lattner
baf2ecda5f 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32108 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 23:27:45 +00:00
Chris Lattner
947c7689fc move 'cfgonly' pass tracking into PassInfo, instead of handling it with
yet-another global data structure.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32102 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 22:21:11 +00:00
Chris Lattner
9dec3a2c0c 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32087 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 19:50:54 +00:00
Chris Lattner
5be662505e 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32081 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 19:22:41 +00:00
Chris Lattner
68329b2187 add a new ConstantIntegral::get method. Simplify the implementation of
ConstantInt::get


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32080 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 19:20:02 +00:00
Chris Lattner
7da3bde866 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32062 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 05:55:25 +00:00
Reid Spencer
b8611ec8bc 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32060 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 03:56:30 +00:00
Anton Korobeynikov
78ee7b78c3 Introducing external weak linkage. Darwin codegen should be added later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32052 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 00:25:12 +00:00
Bill Wendling
8f48766286 Changed to using LLVM streams.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31955 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-28 02:09:03 +00:00
Reid Spencer
3da59db637 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31931 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-27 01:05:10 +00:00
Reid Spencer
45fb3f3cb2 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31867 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-20 01:22:35 +00:00
Bill Wendling
2e3def1177 Removed iostream #includes. Replaced std::cerr with DOUT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31814 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-17 08:03:48 +00:00
Devang Patel
214ca23aef Add run(Function &F) support in FunctionPassManager_New
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31756 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-15 19:39:54 +00:00
Devang Patel
8619678153 Tidy up marking of last analysis user pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31746 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-15 01:48:14 +00:00
Devang Patel
3799f97d53 Add doInitialization and doFinalization support in FunctionManager_New.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31745 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-15 01:27:05 +00:00
Devang Patel
abb81054d1 Do not derive CommonPassManagerImpl from Pass.
Now BasicBlockPassManager_New is a FunctionPass,
FunctionPassManager_New is a ModulePass


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31744 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-15 01:11:27 +00:00
Devang Patel
2f42ed6b0b Copy initializeAnalysisImpl() implementation from PassManagerT.
Update LastUser to recursively walk required transitive set.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31741 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-14 21:49:36 +00:00
Devang Patel
df1a10ece6 Implement removeDeadPasses().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31722 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-14 03:05:08 +00:00
Devang Patel
03153c70de Keep track of Last user of analysis phase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31721 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-14 02:54:23 +00:00
Devang Patel
b899eed1bc Use std::map to map AnalysisID and Pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31720 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-14 01:59:59 +00:00
Devang Patel
c1d6e1fc9c Manage analysis passes during run.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31716 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-14 01:23:29 +00:00
Devang Patel
5770c7cd52 Update comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31713 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-14 00:03:04 +00:00
Devang Patel
2718bfbaa6 Update PassManagerImpl_New::analysisCurrentlyAvailable to check all
managed passmanagers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31710 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-13 22:53:19 +00:00
Devang Patel
be6d515f48 Check currently available anlysis in active managers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31709 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-13 22:40:09 +00:00
Devang Patel
f8af6f0ec1 Implement schedulePasses().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31671 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11 02:22:31 +00:00
Devang Patel
fcb2d940a0 Implement PassManagerImpl_New::add().
Just add pass into the pass manager queue without processing analysis.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31670 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11 02:06:21 +00:00
Devang Patel
893a5a6815 While adding pass into the manager, process Analysis only if it is
required to do so.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31669 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11 02:04:19 +00:00
Devang Patel
f13dc1b9e8 Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31668 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11 01:56:39 +00:00
Devang Patel
e253385b10 Code refactoring. Move common code into CommonPassManagerImpl :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31667 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11 01:51:02 +00:00
Devang Patel
85d344b0c6 Move CommonPassManagerImpl from PassManager.h to PassManager.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31666 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11 01:31:05 +00:00
Devang Patel
14d6581a73 Remove analysis that is not preserved by the pass from AvailableAnalysis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31665 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11 01:24:55 +00:00
Devang Patel
b852616255 Keep track if analysis made available by the pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31664 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11 01:10:19 +00:00
Devang Patel
a363a0bdef Keep track of analysis required by the passes. Force use of new pass
manager if a pass does not preserve analysis that is used by other
passes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31659 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11 00:42:16 +00:00
Devang Patel
37a84c7d8b s/PassManagerAnalysisHelper/CommonPassManagerImpl
Inherit CommonPassManagerImpl from Pass.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31642 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-10 21:33:13 +00:00
Jim Laskey
d6c3422e31 Remove redundant <cmath>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31561 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-08 19:16:44 +00:00
Devang Patel
c63592b19e Split FunctionPassManager_New into FunctionPassManager_New and FunctionPassManagerImpl_New.
FunctionPassManagerImpl_New implements the pass manager.
FunctionPassManager_New is the public interface.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31547 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-08 10:44:40 +00:00
Devang Patel
5a39b2e806 Split PassManager_New into PassManager_New and PassManagerImpl_New.
PassManagerImpl_New implements the pass manager.
PassManager_New is the public interface.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31546 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-08 10:29:57 +00:00
Devang Patel
c67c938de2 Move BasicBlockPassManager_New, FunctionPassManager_New and
ModulePassManager_New class declarations from PassManager.h
to PassManager.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31545 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-08 10:05:38 +00:00
Reid Spencer
3822ff5c71 For PR950:
This patch converts the old SHR instruction into two instructions,
AShr (Arithmetic) and LShr (Logical). The Shr instructions now are not
dependent on the sign of their operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31542 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-08 06:47:33 +00:00
Devang Patel
2c5d1851bb Beautify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31533 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-08 01:31:28 +00:00
Devang Patel
53596b6ba5 Update new pass managers to use PassManagerAnalysisHelper API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31526 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-07 22:56:50 +00:00
Devang Patel
889739c4d1 Introduce PassManagerAnalysisHelper.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31522 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-07 22:35:17 +00:00
Devang Patel
b30803bc17 Add PassManager_New.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31521 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-07 22:23:34 +00:00
Devang Patel
92c45eebf7 Add ModulePassManager_New.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31517 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-07 22:03:15 +00:00
Devang Patel
448d27cd79 Add FunctionPassManager_New.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31515 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-07 21:49:50 +00:00
Devang Patel
55fd43f909 Add BasicBlockPassManager_New.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31513 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-07 21:31:57 +00:00
Reid Spencer
3ed469ccd7 For PR786:
Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting
fall out by removing unused variables. Remaining warnings have to do with
unused functions (I didn't want to delete code without review) and unused
variables in generated code. Maintainers should clean up the remaining
issues when they see them. All changes pass DejaGnu tests and Olden.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31380 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-02 20:25:50 +00:00
Reid Spencer
41562398b6 Remove unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31376 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-02 08:23:44 +00:00
Reid Spencer
4ab09d4bb7 Remove unused variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31375 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-02 08:18:15 +00:00
Reid Spencer
0a783f783c For PR950:
Replace the REM instruction with UREM, SREM and FREM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31369 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-02 01:53:59 +00:00
Devang Patel
b79a59dcfc Update comment. Valid option is -debug-pass=Structures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31297 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-30 19:25:54 +00:00
Reid Spencer
461076f052 Make the Value and Type methods print a newline so it prints nicely in gdb
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31221 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-27 18:58:54 +00:00
Evan Cheng
abf6345710 Speed up isCString()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31206 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-26 21:48:03 +00:00
Evan Cheng
22c7030a0c Add isCString() - returns true if a ConstantArray is a CString.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31201 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-26 19:15:05 +00:00
Chris Lattner
4d3839ded2 Fix Transforms/InstCombine/2006-10-26-VectorReassoc.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31200 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-26 18:27:26 +00:00
Chris Lattner
2e1c196470 Add isFPOrFPVector() method, which indicates if a type is either FP or a
vector of FP types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31198 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-26 18:22:45 +00:00
Reid Spencer
1628cec4d7 For PR950:
Make necessary changes to support DIV -> [SUF]Div. This changes llvm to
have three division instructions: signed, unsigned, floating point. The
bytecode and assembler are bacwards compatible, however.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31195 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-26 06:15:43 +00:00
Reid Spencer
b43f00b3f5 Make the makefile tell us when Intrinsics.gen is being updated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31191 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-26 01:42:23 +00:00
Chris Lattner
d2f9e609aa Change keyword to datalayout
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31107 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-22 06:06:56 +00:00
Reid Spencer
b83eb6447b For PR950:
This patch implements the first increment for the Signless Types feature.
All changes pertain to removing the ConstantSInt and ConstantUInt classes
in favor of just using ConstantInt.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31063 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-20 07:07:24 +00:00
Chris Lattner
35b89fa639 add a method to determine whether evaluation of a constant can trap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31059 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-20 00:27:06 +00:00
Owen Anderson
cf7ff2b4c8 Add support for the new "target data" information in .ll files. This provides
a better encoding of the targets data layout, rather than trying to guess it
from the endianness and pointersize like before.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31030 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-18 02:21:12 +00:00
Chris Lattner
f53104051e label* is not a valid type, add an assertion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30968 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-15 23:21:12 +00:00
Chris Lattner
0eff5ad3db Fix another dtor issue. The function local statics in this function were
being destroyed at inconvenient times.  Switch to using non-local ManagedStatic
objects, which actually also speeds up ConstRules::get.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30931 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-13 17:22:21 +00:00
Chris Lattner
06a248c238 Add insertelement/extractelement helper ctors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30750 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 06:24:58 +00:00
Chris Lattner
df20b96ffd getFilename/getDirectory shouldn't abort if the global has no init. This
can happen on bugpoint reduced testcases f.e..


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30729 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-04 23:06:26 +00:00
Chris Lattner
adc95467e4 Add a version of the globalvariable ctor that inserts at a specific location.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30677 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-30 21:31:26 +00:00
Chris Lattner
ab4fa4f377 Minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30668 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 23:45:00 +00:00
Chris Lattner
de65fb3a8b Now that ConstantBool::True/False are gone, we can modify Type.cpp to
eliminate its static dtors, without having code that depends on order of
initialization.  Eliminate static ctors/dtors from Type.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30667 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 23:38:07 +00:00
Chris Lattner
003cbf35f4 Eliminate ConstantBool::True and ConstantBool::False. Instead, provide
ConstantBool::getTrue() and ConstantBool::getFalse().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30666 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 23:36:21 +00:00
Chris Lattner
850ba99cb6 Eliminate ConstantBool::True and ConstantBool::False. Instead, provideConstantBool::getTrue() and ConstantBool::getFalse().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30664 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 23:34:49 +00:00
Chris Lattner
9fb471df2e simplify code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30655 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 22:50:29 +00:00
Chris Lattner
f6e70fa0d3 remove reference to dead method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30641 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 00:38:19 +00:00
Chris Lattner
8a94bf142a Use the new ManagedStatic class to explicitly manage static variables, eliminating static ctors/dtors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30639 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 00:35:06 +00:00
Chris Lattner
a71965b1ad add method, correct comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30584 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-23 04:03:45 +00:00
Devang Patel
b71f6728eb remove extra white spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30576 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-22 01:07:57 +00:00
Devang Patel
8d3ab25335 Use iterative algorith to assign DFS number. This reduces
call stack depth.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30575 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-22 01:05:33 +00:00
Anton Korobeynikov
f824868ed9 Adding codegeneration for StdCall & FastCall calling conventions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30549 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-20 22:03:51 +00:00
Chris Lattner
79bc332ddb add a helper method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30452 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-18 04:54:57 +00:00
Anton Korobeynikov
bcb9770efe Added some eye-candy for Subtarget type checking
Added X86 StdCall & FastCall calling conventions. Codegen will follow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30446 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-17 20:25:45 +00:00
Chris Lattner
2f463865c2 Add ShiftInst::isLogical/ArithmeticShift methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30445 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-17 19:29:56 +00:00
Chris Lattner
a5b07404f7 Add new SetCondInst::isRelational/isEquality methods. Rename
Instruction::isRelational to Instruction::isComparison.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30444 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-17 19:14:47 +00:00
Devang Patel
697e590580 Undo previous check-in.
Reintroduce recursive assignDFSNumber().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30380 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 21:43:24 +00:00
Anton Korobeynikov
b74ed07bfd Adding dllimport, dllexport and external weak linkage types.
DLL* linkages got full (I hope) codegeneration support in C & both x86
assembler backends.
External weak linkage added for future use, we don't provide any
codegeneration, etc. support for it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30374 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 18:23:27 +00:00
Devang Patel
57d12f962d Avoid recursion in assignDFSNumber(). Move def from ET-Forest.h
to Dominators.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30309 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 01:27:42 +00:00
Chris Lattner
833eb68a1f Add new option to leave asm names alone
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30149 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-07 18:20:41 +00:00