1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

1427 Commits

Author SHA1 Message Date
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
9161e033cd Fix comment grammaro
llvm-svn: 32198
2006-12-04 21:33:23 +00:00
Chris Lattner
1eaa3ef5b3 Add a comment and fix a memory leak. Thanks to Vikram for pointing this out.
llvm-svn: 32196
2006-12-04 21:22:45 +00:00
Reid Spencer
e7de1b3255 Fix inferred casts.
llvm-svn: 32180
2006-12-04 17:05:42 +00:00
Reid Spencer
01a0443bdd Fix 80 cols violation
llvm-svn: 32179
2006-12-04 17:04:44 +00:00
Reid Spencer
0668975146 Change inferred casts to explicit casts.
llvm-svn: 32165
2006-12-04 02:46:44 +00:00
Jeff Cohen
f99052befb Unbreak VC++ build.
llvm-svn: 32113
2006-12-02 02:22:01 +00:00
Bill Wendling
a5c00d4c4f WTF? These weird newlines got in there...
llvm-svn: 31998
2006-11-29 01:14:00 +00:00
Bill Wendling
4effa38086 Replacing std::iostreams with llvm iostreams. Some of these changes involve
adding a temporary wrapper around the ostream to make it friendly to
functions expecting an LLVM stream. This should be fixed in the future.

llvm-svn: 31990
2006-11-29 00:19:40 +00:00
Bill Wendling
2477c0ac3d Convert to using llvm streams instead of iostreams.
llvm-svn: 31989
2006-11-28 23:33:06 +00:00
Bill Wendling
040a60d22d Removed some of the iostream #includes. Moved towards converting to using
llvm streams

llvm-svn: 31983
2006-11-28 22:46:12 +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
2f40f19e0d Needed <iostream> for now.
llvm-svn: 31816
2006-11-17 09:44:28 +00:00
Bill Wendling
42b8ad7362 Needs the iostream include.
llvm-svn: 31815
2006-11-17 09:38:03 +00:00
Bill Wendling
e4bdd79300 Replaced DEBUG(std::cerr with DOUT.
llvm-svn: 31812
2006-11-17 07:36:54 +00:00
Bill Wendling
ccae1fe7c7 Replace DEBUG(std::cerr with DOUT. Removed some iostream #includes.
llvm-svn: 31811
2006-11-17 07:33:59 +00:00
Bill Wendling
3244a7dc35 Removed unneeded <iostream> #include.
llvm-svn: 31810
2006-11-17 07:10:51 +00:00
Andrew Lenharth
6bf99e12a8 A shim over other AA impls to catch incorrect uses
llvm-svn: 31724
2006-11-14 05:21:04 +00:00
Chris Lattner
d23cc47b59 remove redundant code
llvm-svn: 31697
2006-11-13 01:10:12 +00:00
Jim Laskey
28fec74f1b Remove redundant <cmath>.
llvm-svn: 31561
2006-11-08 19:16:44 +00:00
Reid Spencer
da1f5b882a 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.

llvm-svn: 31542
2006-11-08 06:47:33 +00:00
Andrew Lenharth
a79b273ca9 Optionally allow comparison operations from affect DSGraphs
llvm-svn: 31511
2006-11-07 20:39:05 +00:00
Andrew Lenharth
9182b69155 Allow loop detection during debug in forwarding nodes, and revert auxcall patch as it make 176.gcc untenable
llvm-svn: 31510
2006-11-07 20:36:02 +00:00
Andrew Lenharth
0bab81d9e2 debug type for DSA TD
llvm-svn: 31509
2006-11-07 20:35:11 +00:00
Chris Lattner
bbc4261790 Fix BasicAA/2006-11-03-BasicAAVectorCrash.ll by handling out-of-range
vector accesses like we handle out-of-range array accesses.

llvm-svn: 31427
2006-11-03 21:58:48 +00:00
Andrew Lenharth
8a81e9e264 Split the External and Intrinsic handling into seperate functions. This
improves readability of the call handling code significantly, as well as
makes it clear which parts are hacky (externals) and which parts are good
(call handling).

No functionality change.

llvm-svn: 31415
2006-11-03 17:43:19 +00:00
Reid Spencer
4bafa71dc1 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.

llvm-svn: 31380
2006-11-02 20:25:50 +00:00
Reid Spencer
1abf69e923 For PR950:
Replace the REM instruction with UREM, SREM and FREM.

llvm-svn: 31369
2006-11-02 01:53:59 +00:00
Reid Spencer
198701d5ec Make ScalarEvolution actually use a ZeroExtend expression instead of
having SCZeroExtendExpr be equivalent to SCTruncate

llvm-svn: 31355
2006-11-01 21:53:12 +00:00
Chris Lattner
44b3550217 add a method
llvm-svn: 31249
2006-10-28 01:24:05 +00:00
Reid Spencer
6833ffe8b8 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.

llvm-svn: 31195
2006-10-26 06:15:43 +00:00
Andrew Lenharth
67fc2c366f Make these hack flags hidden, like other dsa hack flags
llvm-svn: 31136
2006-10-23 19:55:24 +00:00
Andrew Lenharth
20f5c4f47d Revert the aggressive inlining for now, it doesn't handle external correctly
llvm-svn: 31135
2006-10-23 19:53:37 +00:00
Jim Laskey
0eeabf8ff5 [SU]int update - inactive code may get activated someday
llvm-svn: 31128
2006-10-23 14:39:22 +00:00
Reid Spencer
d414793dbc 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.

llvm-svn: 31063
2006-10-20 07:07:24 +00:00
Andrew Lenharth
254a2fbcd0 Move some warnings to debug mode.
llvm-svn: 30933
2006-10-13 17:38:22 +00:00
Chris Lattner
0c057ef048 Fix a bug pointed out by Zhongxing Xu
llvm-svn: 30831
2006-10-09 17:28:13 +00:00
Chris Lattner
d55928d5f6 Fix more static dtor issues
llvm-svn: 30725
2006-10-04 21:52:35 +00:00
Chris Lattner
de1ba6dc70 Fix some more static dtor issues.
llvm-svn: 30724
2006-10-04 21:49:37 +00:00
Jim Laskey
3d44b337d9 Add ability to annotate (color) nodes in a viewGraph.
llvm-svn: 30686
2006-10-02 12:26:53 +00:00
Chris Lattner
06ed0910e5 Fixme is already done
llvm-svn: 30685
2006-10-01 22:46:33 +00:00
Chris Lattner
f0c3081939 Teach globalsmodref-aa to track scalar pointer global variables which point
to unaliased allocations.  Use this information to disambiguate pointers loaded
from them.  This is a very common case, so it's worthwhile to handle efficiently.

This implements Analysis/GlobalsModRef/indirect-global.ll

llvm-svn: 30684
2006-10-01 22:36:45 +00:00
Chris Lattner
155e6b8403 Eliminate ConstantBool::True and ConstantBool::False. Instead, provide
ConstantBool::getTrue() and ConstantBool::getFalse().

llvm-svn: 30666
2006-09-28 23:36:21 +00:00
Chris Lattner
7851529456 Simplify some code
llvm-svn: 30658
2006-09-28 23:14:29 +00:00
Devang Patel
7604cbd117 Fix DFS walk.
Fix http://llvm.org/bugs/show_bug.cgi?id=923

llvm-svn: 30630
2006-09-27 17:18:05 +00:00
Nick Lewycky
8fbfe60cee Explain change with a comment.
llvm-svn: 30443
2006-09-17 17:51:00 +00:00
Nick Lewycky
22b1a725ae Fix PR912. The input to erase() must not be a reference to the data
being erased.

llvm-svn: 30442
2006-09-17 16:23:36 +00:00
Devang Patel
2e8547542f Untabify.
llvm-svn: 30168
2006-09-07 23:29:19 +00:00
Devang Patel
6971b40067 Use iterative do-while loop instead of recursive DFSPass calls to
reduce amount of stack space used at runtime.

llvm-svn: 30167
2006-09-07 23:22:37 +00:00
Devang Patel
a5bb9b49d3 Do not rely on std::sort and std::erase to get list of unique
exit blocks. The output is dependent on addresses of basic block.

Add and use Loop::getUniqueExitBlocks.

llvm-svn: 29966
2006-08-29 22:29:16 +00:00
Reid Spencer
2567610703 For PR387:
Close out this long standing bug by removing the remaining overloaded
virtual functions in LLVM. The -Woverloaded-virtual option is now turned on.

llvm-svn: 29934
2006-08-28 01:02:49 +00:00
Chris Lattner
8a59e8be23 simplify AnalysisGroup registration, eliminating one typeid call.
llvm-svn: 29932
2006-08-28 00:42:29 +00:00
Chris Lattner
a39dcb5377 eliminate RegisterOpt. It does the same thing as RegisterPass.
llvm-svn: 29925
2006-08-27 22:42:52 +00:00
Chris Lattner
dda3f0344e Fit to 80 cols
llvm-svn: 29922
2006-08-27 22:31:12 +00:00
Chris Lattner
f530302eda Eliminate RegisterAnalysis. RegisterPass now does all that is necessary.
llvm-svn: 29921
2006-08-27 22:30:17 +00:00
Chris Lattner
33bd5dcfb7 s|llvm/Support/Visibility.h|llvm/Support/Compiler.h|
llvm-svn: 29911
2006-08-27 12:54:02 +00:00
Chris Lattner
0ad370eeb7 Fix PR885
llvm-svn: 29794
2006-08-21 17:20:01 +00:00
Chris Lattner
9781d44b6e Make Loop::getExitBlocks significantly faster for large loops. Instead of
pounding on Loop::contains (which is O(n) in the size of the loop), use a
sorted vector, which is O(log(N)) for each query.  This speeds up Duraid's
horrible testcase from ~72s to ~31s in a debug build.

llvm-svn: 29645
2006-08-12 05:02:03 +00:00
Chris Lattner
a21497f1b8 Speed up Loop::isLCSSAForm by using a binary search and single-entry cache.
This reduces LCSSA pass time from 1.5s to 0.96s when run on eon in release+asserts mode.

llvm-svn: 29464
2006-08-02 00:14:16 +00:00
Chris Lattner
e5e2e8d917 Change the callgraph representation to store the callsite along with the
target CG node.  This allows the inliner to properly update the callgraph
when using the pruning inliner.  The pruning inliner may not copy over all
call sites from a callee to a caller, so the edges corresponding to those
call sites should not be copied over either.

This fixes PR827 and Transforms/Inline/2006-07-12-InlinePruneCGUpdate.ll

llvm-svn: 29120
2006-07-12 18:29:36 +00:00
Jim Laskey
d19ba2cf6c It was pointed out that DEBUG() is only available with -debug.
llvm-svn: 29106
2006-07-11 18:25:13 +00:00
Jim Laskey
4c0d841280 Ensure that dump calls that are associated with asserts are removed from
non-debug build.

llvm-svn: 29105
2006-07-11 17:58:07 +00:00
Chris Lattner
496bd3fbf6 Use hidden visibility to make symbols in an anonymous namespace get
dropped.  This shrinks libllvmgcc.dylib another 67K

llvm-svn: 28975
2006-06-28 23:17:24 +00:00
Andrew Lenharth
24a9a6df27 add some missing externals
llvm-svn: 28955
2006-06-28 01:16:06 +00:00
Chris Lattner
fb34ed6ed4 Handle alias sets that have been unified, and thus can have other references
to them.  This fixes a regression in my previous checkin.

llvm-svn: 28951
2006-06-27 23:56:13 +00:00
Chris Lattner
a3a29d82b6 Don't implement AliasSetTracker::remove in terms of deleteValue. deleteValue
causes the pointer to be removed from the underlying alias analysis
implementation as well.  This impl of remove is also significantly faster than
the old one.  This fixes:
Regression/Transforms/DeadStoreElimination/2006-06-27-AST-Remove.ll

llvm-svn: 28950
2006-06-27 23:48:59 +00:00
Reid Spencer
938be45012 For PR801:
Refactor the Graph writing code to use a common implementation which is
now in lib/Support/GraphWriter.cpp. This completes the PR.

Patch by Anton Korobeynikov. Thanks, Anton!

llvm-svn: 28925
2006-06-27 16:49:46 +00:00
Chris Lattner
e2d4b2f3e2 Fix a stale pointer issue that caused 300.twolf to fail to build on zion
last night.

llvm-svn: 28916
2006-06-26 19:20:48 +00:00
Andrew Lenharth
f0ecdbe7ef Do partial inlining in BU. This resolves more call sites. Also add options to merge in globals during recursion and to back annotate DSNodes when function pointers are resolved. This makes PA work for a whole lot more things (unresolved call sites being what has been killing various DSA based passes)
llvm-svn: 28859
2006-06-19 18:23:36 +00:00
Andrew Lenharth
3ab1711306 Fix a bug, don't drop indirect call sites, especially if there is nothing known about them yet, and restore a simple version of a removed function
llvm-svn: 28857
2006-06-19 15:42:47 +00:00
Chris Lattner
9d028c26c8 Constant fold sqrtf
llvm-svn: 28853
2006-06-17 18:17:52 +00:00
Andrew Lenharth
9f4587fa50 Add a error message to cbu to match bu
llvm-svn: 28819
2006-06-16 14:43:36 +00:00
Andrew Lenharth
71d1cfa5c4 move header
llvm-svn: 28818
2006-06-16 14:33:53 +00:00
Owen Anderson
fab2186a2f Update isLCSSAForm to handle PHI nodes specially for live-out detection. This
is the same as the recent patch to LCSSA.cpp.

llvm-svn: 28773
2006-06-13 20:45:22 +00:00
Owen Anderson
15b85dbfa5 Re-commit the safe parts of my 6/9 patch. Still working on fixing the unsafe parts.
llvm-svn: 28748
2006-06-11 19:22:28 +00:00
Evan Cheng
d99c8e2e5f Back out Owen's 6/9 changes. They broke MultiSource/Benchmarks/Prolangs-C/bison (and perhaps others).
llvm-svn: 28747
2006-06-11 09:32:57 +00:00
Owen Anderson
6c2f7512a6 Make Loop able to verify that it is in LCSSA-form, and have the LCSSA pass assert
on this.

llvm-svn: 28738
2006-06-09 18:33:30 +00:00
Reid Spencer
560366562b For PR780:
1. Fix the macros in IncludeFile.h to put everything in the llvm namespace
2. Replace the previous explicit mechanism in all the .h and .cpp files
   with the macros in IncludeFile.h
This gets us a consistent mechanism throughout LLVM for ensuring linkage.
Next step is to make sure its used in enough places.

llvm-svn: 28715
2006-06-07 22:00:26 +00:00
Reid Spencer
3832b7f9c4 For PR780:
Break the "IncludeFile" mechanism into its own header file and adjust other
files accordingly. Use this facility for the IntrinsicInst problem which
was the subject of PR800.
More to follow on this.

llvm-svn: 28709
2006-06-07 20:00:19 +00:00
Reid Spencer
d9e9ae6b64 For PR798:
Add support for Graphviz. Patch contributed by Anton Korobeynikov.

llvm-svn: 28684
2006-06-05 15:44:46 +00:00
Chris Lattner
3d631893f9 Fix -pedantic warning
llvm-svn: 28634
2006-06-01 17:17:46 +00:00
Reid Spencer
2c6d390a60 Change from using a stub function to a stub variable for passing to the
IncludeFile hack to ensure linkage of analysis passes. This works around
some -pedantic warnings about assigning an object to a function.

llvm-svn: 28621
2006-06-01 07:02:51 +00:00
Andrew Lenharth
ec5b37953c move calltarget to dsa
llvm-svn: 28546
2006-05-29 23:39:48 +00:00
Andrew Lenharth
bc04a6c143 Since there was interest on the mailing list, this is a utility pass that
uses DSA to make find targets of calls.  It provides a very convinient
interface to DSA results to do things with indirect calls, such as
write a devirtualizer (which I have and may commit one of these days).

llvm-svn: 28545
2006-05-29 22:58:38 +00:00
Chris Lattner
f604017e47 Patches to make the LLVM sources more -pedantic clean. Patch provided
by Anton Korobeynikov!  This is a step towards closing PR786.

llvm-svn: 28447
2006-05-24 17:04:05 +00:00
Chris Lattner
9930cf948e Remove dead variable
llvm-svn: 28249
2006-05-12 17:41:45 +00:00
Chris Lattner
b42f17a66a Implement Transforms/IndVarsSimplify/complex-scev.ll, a case where we didn't
recognize some simple affine IV's.

llvm-svn: 27982
2006-04-26 18:34:07 +00:00
Andrew Lenharth
d62d88bae0 slightly more useful error message
llvm-svn: 27971
2006-04-25 19:33:41 +00:00
Andrew Lenharth
39d53414a5 better c99 struct handling
llvm-svn: 27970
2006-04-25 19:33:23 +00:00
Andrew Lenharth
ca2734f9f1 Another simple case type merge case to try
llvm-svn: 27831
2006-04-19 15:34:34 +00:00
Andrew Lenharth
ef07d5c5a5 deal with memchr
llvm-svn: 27830
2006-04-19 15:34:02 +00:00
Andrew Lenharth
09948a5331 friendlier error message
llvm-svn: 27829
2006-04-19 15:33:35 +00:00
Andrew Lenharth
d89cdc541a stupid stuff
llvm-svn: 27821
2006-04-19 03:45:25 +00:00
Andrew Lenharth
87c0d713cc I understand now. Shoot.
llvm-svn: 27819
2006-04-18 22:36:11 +00:00
Andrew Lenharth
4d432bcb19 llvm.memc* improvements. helps PA a lot in some specmarks
llvm-svn: 27812
2006-04-18 20:59:52 +00:00
Andrew Lenharth
d5fd116ede llvm.memc* improvements. helps PA a lot in some specmarks
llvm-svn: 27811
2006-04-18 19:54:11 +00:00
Chris Lattner
9f3ef19ced Implement value #'ing for vector operations, implementing
Regression/Transforms/GCSE/vectorops.ll

llvm-svn: 27691
2006-04-14 05:10:20 +00:00
Andrew Lenharth
b6264f0dbd Handle some kernel code than ends in [0 x sbyte]. I think this is safe
llvm-svn: 27672
2006-04-13 19:31:49 +00:00
Andrew Lenharth
038b30839d Move this to lib/Analysis.
This reduces Core size, yay.

llvm-svn: 27468
2006-04-06 22:58:58 +00:00