1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

1406 Commits

Author SHA1 Message Date
Reid Spencer
2a2cc7fc14 Fix constant folding to deal with external weak global values.
llvm-svn: 32247
2006-12-06 00:25:09 +00:00
Chris Lattner
a6cad8869f Fix Transforms/InstCombine/2006-12-05-fp-to-int-ext.ll, fixing an out-of-
stack-space issue in the ppc bootstrap.

llvm-svn: 32244
2006-12-05 23:43:59 +00:00
Reid Spencer
c87c3e5a70 Bail on the getInferredCast idea. Remove the function and convert
remaining uses to more specific casts.

llvm-svn: 32231
2006-12-05 19:14:13 +00:00
Reid Spencer
28a5079f58 Can't make these fail now with just BitCast. Previous failures must have
been in conjunction with something else. By right, they should just be
BitCasts.

llvm-svn: 32219
2006-12-05 07:18:07 +00:00
Reid Spencer
679821dd29 Remove the last inferred casts from VMCore.
llvm-svn: 32213
2006-12-05 03:30:09 +00:00
Reid Spencer
4f42ccea23 Implement createPointerCast.
llvm-svn: 32212
2006-12-05 03:28:26 +00:00
Reid Spencer
c5727bf642 Implement getPointerCast.
llvm-svn: 32211
2006-12-05 03:25:26 +00:00
Reid Spencer
10b94bb9f5 Separate getCompare from get and getCompareTy from getTy.
llvm-svn: 32200
2006-12-04 21:35:24 +00:00
Reid Spencer
2d2a26767e Implement new cast creation functions for both instructions and constant
expressions. These will get used to reduce clutter as we replace various
calls to createInferredCast and getCast.

llvm-svn: 32191
2006-12-04 20:17:56 +00:00
Reid Spencer
94096ebd7c Reduce the size of the ExprMapKeyType class.
llvm-svn: 32186
2006-12-04 18:38:05 +00:00
Reid Spencer
e6770851c0 For PR950: Fix constant expressions to properly support ICmp and FCmp type expressions.
llvm-svn: 32170
2006-12-04 05:19:50 +00:00
Reid Spencer
2580dd751f For PR950: Implement a stub for folding ICmp and FCmp instructions
llvm-svn: 32169
2006-12-04 05:19:34 +00:00
Reid Spencer
ca27d66971 For PR950: Implement ICmp/FCmp predicate printing for constant expressions
llvm-svn: 32168
2006-12-04 05:19:18 +00:00
Reid Spencer
0668975146 Change inferred casts to explicit casts.
llvm-svn: 32165
2006-12-04 02:46:44 +00:00
Reid Spencer
4cb4234c17 Take a baby step towards getting rid of inferred casts. Provide methods on
CastInst and ConstantExpr that allow the signedness to be explicitly passed
in and reliance on signedness removed from getCastOpcode. These are
temporary measures useful during the conversion of inferred casts.

llvm-svn: 32164
2006-12-04 02:43:42 +00:00
Reid Spencer
470e894f5c Remove dead code.
llvm-svn: 32157
2006-12-03 16:21:33 +00:00
Reid Spencer
f78fe29ca8 Shorten the FCmp predicate mnemonics.
llvm-svn: 32150
2006-12-03 06:35:48 +00:00
Reid Spencer
904e41f87e Allow the ICmp and FCmp instructions to be written by the AsmWriter
llvm-svn: 32148
2006-12-03 06:27:29 +00:00
Reid Spencer
a468638458 Implement creation of ICmp and FCmp constant expressions.
llvm-svn: 32147
2006-12-03 05:48:19 +00:00
Jeff Cohen
f99052befb Unbreak VC++ build.
llvm-svn: 32113
2006-12-02 02:22:01 +00:00
Chris Lattner
7a39941897 Switch analysis groups to be unregistered when llvm_shutdown is called.
llvm-svn: 32110
2006-12-01 23:46:50 +00:00
Chris Lattner
1b0e89e022 Start moving pass registration over to using the ManagedStatic mechanism.
This fixes issues where passes get unregistered before llvm_shutdown is
called, and is generally cleaner and simpler.  Analysis groups up next.

llvm-svn: 32108
2006-12-01 23:27:45 +00:00
Chris Lattner
a2bd5d4aaa move 'cfgonly' pass tracking into PassInfo, instead of handling it with
yet-another global data structure.

llvm-svn: 32102
2006-12-01 22:21:11 +00:00
Chris Lattner
64b24381a8 These should be rewritten to fold without using the 'Rules' mechanism, but
until this happens at least make sext from bool and sitofp from bool do the
right thing.

llvm-svn: 32087
2006-12-01 19:50:54 +00:00
Chris Lattner
7e0d6868fd this logic is broken for trunc to bool, replace the folding logic for trunc
completely, as it is trivial.  We should probably do this for the rest of the
cast operations.  This fixes ConstProp/2006-12-01-TruncBoolBug.ll.

llvm-svn: 32081
2006-12-01 19:22:41 +00:00
Chris Lattner
497c976859 add a new ConstantIntegral::get method. Simplify the implementation of
ConstantInt::get

llvm-svn: 32080
2006-12-01 19:20:02 +00:00
Chris Lattner
c65612e859 Fix a typo introduced by the cast patch that horribly broke a lot of vector
code.  Testcase here: Transforms/ConstProp/2006-11-30-vector-cast.ll

llvm-svn: 32062
2006-12-01 05:55:25 +00:00
Reid Spencer
a1613b631b Don't fold "ptrtoint GV to bool" since this should be doing a truncate not
a comparison against zero. Instead fold setne(GV,null) and seteq(GV,null)
to ConstantBool::True or ConstantBool::False, respectively.

llvm-svn: 32060
2006-12-01 03:56:30 +00:00
Anton Korobeynikov
f627d28d9c Introducing external weak linkage. Darwin codegen should be added later.
llvm-svn: 32052
2006-12-01 00:25:12 +00:00
Bill Wendling
aa02717a76 Changed to using LLVM streams.
llvm-svn: 31955
2006-11-28 02:09:03 +00:00
Reid Spencer
992d9788b3 For PR950:
The long awaited CAST patch. This introduces 12 new instructions into LLVM
to replace the cast instruction. Corresponding changes throughout LLVM are
provided. This passes llvm-test, llvm/test, and SPEC CPUINT2000 with the
exception of 175.vpr which fails only on a slight floating point output
difference.

llvm-svn: 31931
2006-11-27 01:05:10 +00:00
Reid Spencer
6e34ef887b For PR950:
First in a series of patches to convert SetCondInst into ICmpInst and
FCmpInst using only two opcodes and having the instructions contain their
predicate value. Nothing uses these classes yet. More patches to follow.

llvm-svn: 31867
2006-11-20 01:22:35 +00:00
Bill Wendling
1838be30c7 Removed iostream #includes. Replaced std::cerr with DOUT.
llvm-svn: 31814
2006-11-17 08:03:48 +00:00
Devang Patel
6060a1e3dc Add run(Function &F) support in FunctionPassManager_New
llvm-svn: 31756
2006-11-15 19:39:54 +00:00
Devang Patel
c252225cec Tidy up marking of last analysis user pass.
llvm-svn: 31746
2006-11-15 01:48:14 +00:00
Devang Patel
343e099f5d Add doInitialization and doFinalization support in FunctionManager_New.
llvm-svn: 31745
2006-11-15 01:27:05 +00:00
Devang Patel
55ee589fb9 Do not derive CommonPassManagerImpl from Pass.
Now BasicBlockPassManager_New is a FunctionPass,
FunctionPassManager_New is a ModulePass

llvm-svn: 31744
2006-11-15 01:11:27 +00:00
Devang Patel
4f5849544b Copy initializeAnalysisImpl() implementation from PassManagerT.
Update LastUser to recursively walk required transitive set.

llvm-svn: 31741
2006-11-14 21:49:36 +00:00
Devang Patel
bb3da3a9a1 Implement removeDeadPasses().
llvm-svn: 31722
2006-11-14 03:05:08 +00:00
Devang Patel
816f60d7e9 Keep track of Last user of analysis phase.
llvm-svn: 31721
2006-11-14 02:54:23 +00:00
Devang Patel
2b9bd4aa34 Use std::map to map AnalysisID and Pass.
llvm-svn: 31720
2006-11-14 01:59:59 +00:00
Devang Patel
bcc72c8a5a Manage analysis passes during run.
llvm-svn: 31716
2006-11-14 01:23:29 +00:00
Devang Patel
fa6da87694 Update comments.
llvm-svn: 31713
2006-11-14 00:03:04 +00:00
Devang Patel
5297c37d63 Update PassManagerImpl_New::analysisCurrentlyAvailable to check all
managed passmanagers.

llvm-svn: 31710
2006-11-13 22:53:19 +00:00
Devang Patel
84dd1c2764 Check currently available anlysis in active managers.
llvm-svn: 31709
2006-11-13 22:40:09 +00:00
Devang Patel
27cf4a91e7 Implement schedulePasses().
llvm-svn: 31671
2006-11-11 02:22:31 +00:00
Devang Patel
b324dacabf Implement PassManagerImpl_New::add().
Just add pass into the pass manager queue without processing analysis.

llvm-svn: 31670
2006-11-11 02:06:21 +00:00
Devang Patel
f00e57a19c While adding pass into the manager, process Analysis only if it is
required to do so.

llvm-svn: 31669
2006-11-11 02:04:19 +00:00
Devang Patel
0eb0bad5e8 Remove dead code.
llvm-svn: 31668
2006-11-11 01:56:39 +00:00
Devang Patel
71420afe60 Code refactoring. Move common code into CommonPassManagerImpl :)
llvm-svn: 31667
2006-11-11 01:51:02 +00:00