1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00
Commit Graph

3482 Commits

Author SHA1 Message Date
Chris Lattner
011dba165e Fix testcase: SingleSource/UnitTests/2003-05-02-DependantPHI.c
llvm-svn: 6074
2003-05-10 20:21:16 +00:00
Chris Lattner
805f8d646e Add a new info-output-file option (hidden from --help) which is to be used by
the testing scripts  to avoid breaking diffs while still gathering stats.

llvm-svn: 6067
2003-05-09 20:05:44 +00:00
Chris Lattner
62fa228a18 Add support for function stubs, which allow calling functions which need to
have an address available, but have not yet been code generated.

llvm-svn: 6059
2003-05-09 03:30:07 +00:00
Chris Lattner
99520168c9 This blank line has GOT to go.
llvm-svn: 6057
2003-05-09 03:28:13 +00:00
Chris Lattner
3160b1235e Allow const functions
llvm-svn: 6056
2003-05-09 03:27:41 +00:00
Chris Lattner
a24e816c31 Add methods for stub function generation
llvm-svn: 6054
2003-05-08 21:54:18 +00:00
Chris Lattner
3656ffff9b Minor speedup by avoiding callbacks to functions already generated
llvm-svn: 6052
2003-05-08 21:44:21 +00:00
Chris Lattner
d397ac4aaf Improve efficiency of JIT by having it use direct function calls instead of
signals to regain control from the executing code

llvm-svn: 6051
2003-05-08 21:34:11 +00:00
Chris Lattner
35b3a10cf3 assert early instead of late for unimplemented feature
llvm-svn: 6050
2003-05-08 21:08:43 +00:00
Chris Lattner
78f5953056 Add support for Add, Sub, And, Or, & Xor constant exprs
llvm-svn: 6049
2003-05-08 20:49:25 +00:00
Chris Lattner
d747f762ff Add support for variable argument functions!
llvm-svn: 6046
2003-05-08 19:44:13 +00:00
Chris Lattner
4cdf86adaf Add support for variable argument functions!
llvm-svn: 6044
2003-05-08 18:41:45 +00:00
Chris Lattner
f5a5ed1a59 Implement varargs support for LLI!
llvm-svn: 6043
2003-05-08 16:52:43 +00:00
Chris Lattner
ba9142280a Add a pointersize/endianness safe load routine to match the store routine
llvm-svn: 6042
2003-05-08 16:52:16 +00:00
Chris Lattner
818643d3e9 A large number of simple changes:
* s/Method/Function
  * Kill some obsolete (external) functions that used to be to support tracing

llvm-svn: 6041
2003-05-08 16:18:31 +00:00
Chris Lattner
6aa2e81ec4 Add support for recording arguments passed through the ... of a varargs function
llvm-svn: 6040
2003-05-08 16:06:52 +00:00
Chris Lattner
746e408dd9 llvm.va_start only takes on argument now
Verify that va_start doesn't occur in functions with no varargs

llvm-svn: 6038
2003-05-08 15:55:31 +00:00
Chris Lattner
5dd2913d57 Add more support for intrinsic functions and for varargs stuff
llvm-svn: 6035
2003-05-08 03:47:33 +00:00
Chris Lattner
a7ee27e0fd Handle va_arg instruction correctly
llvm-svn: 6030
2003-05-08 02:50:13 +00:00
Chris Lattner
e1faff42f4 Add support for the new va_arg instruction
llvm-svn: 6029
2003-05-08 02:44:12 +00:00
Chris Lattner
f1f55e385c Don't inline functions that take variable numbers of arguments!
llvm-svn: 6024
2003-05-08 02:36:43 +00:00
Chris Lattner
d381dc9316 Remove using decl
llvm-svn: 6023
2003-05-08 02:34:52 +00:00
Chris Lattner
c412b950d2 Remove using declarations
llvm-svn: 6022
2003-05-08 02:08:14 +00:00
Misha Brukman
3e328da21d Added the initial version of the TableGen description for the Sparc backend.
llvm-svn: 6021
2003-05-07 21:52:39 +00:00
Chris Lattner
ba6d6034d5 Fix bug: Jello/2003-05-07-ArgumentTest.llx
Also fixes yacr2/ks benchmarks

llvm-svn: 6017
2003-05-07 20:31:37 +00:00
Chris Lattner
d3d53723a2 Add a vector to keep track of which registers are allocatable. Remove FIXMEs
llvm-svn: 6015
2003-05-07 20:08:36 +00:00
Chris Lattner
59c46ee655 IMPLICIT_DEF was not the beautiful elegant solution I thought it was going
to be.  In fact, it made stuff worse.  :(

llvm-svn: 6013
2003-05-07 19:21:28 +00:00
Chris Lattner
15d2a1b0b9 Re-add gross hack, it's still necessary. :(
llvm-svn: 6012
2003-05-06 21:44:54 +00:00
Chris Lattner
bfeffcec97 Remove hideously nasty hack
llvm-svn: 6011
2003-05-06 21:32:39 +00:00
Chris Lattner
54c4b56baf Emit pseudo instructions to indicate that some registers are live on entrance
and exit of the function.  This fixes bug: Jello/2003-05-06-LivenessClobber.llx
and the Fhourstones benchmark

llvm-svn: 6010
2003-05-06 21:32:22 +00:00
Chris Lattner
b6fab2a875 Don't have a cow with new pseudo instructions
llvm-svn: 6009
2003-05-06 21:31:47 +00:00
Chris Lattner
e4c33a0ca0 Add two new pseudo instructions
llvm-svn: 6008
2003-05-06 21:31:31 +00:00
Misha Brukman
cf277f9143 Debug output should go to cerr, not cout, because that's where bytecode goes.
llvm-svn: 6002
2003-05-04 22:51:30 +00:00
Chris Lattner
5636fe923e Fix bug: UnitTests/2003-05-02-DependantPHI.c
Fix testcase MultiSource/Ptrdist-ks

llvm-svn: 6000
2003-05-03 07:11:00 +00:00
Chris Lattner
0ec2b1188a Fix miscompilation in Fhourstones and bug: LICM/2003-05-02-LoadHoist.ll
llvm-svn: 5994
2003-05-03 03:42:08 +00:00
Chris Lattner
21b4596a3a * Eliminate using decls
* Fix some styleistic things
* Fix bug: CWriter/2002-05-16-NameCollide.ll

llvm-svn: 5988
2003-05-03 03:14:35 +00:00
Misha Brukman
bd9b827093 The Hyphenation-Adding Committee is now in session.
llvm-svn: 5986
2003-05-03 02:18:17 +00:00
Chris Lattner
984bb45d4a Attempt to fix sumant's typesafety issue
llvm-svn: 5984
2003-05-02 19:32:04 +00:00
Chris Lattner
e006ca4580 Fix spelling
llvm-svn: 5983
2003-05-02 19:26:34 +00:00
Chris Lattner
8f2c71cae2 Fix a bug which occurred with empty basic blocks
llvm-svn: 5982
2003-05-02 18:44:42 +00:00
Chris Lattner
f13fe891d1 Fix Bug: LowerSwitch/2003-05-01-PHIProblem.ll
llvm-svn: 5979
2003-05-01 22:21:21 +00:00
Chris Lattner
00a12b165a Minor cleanup
llvm-svn: 5976
2003-05-01 21:18:47 +00:00
Chris Lattner
c2eb77b84f Fix bug: LevelRaise/2003-05-01-CallCast.ll
llvm-svn: 5975
2003-05-01 21:02:53 +00:00
Chris Lattner
1d25d9e048 Eliminate use of NonCopyable so that doxygen documentation doesn't link
the Annotation classes with the noncopyable classes for no reason

llvm-svn: 5973
2003-05-01 20:28:45 +00:00
Chris Lattner
5045ab0fac Fix another case where constexprs could cause a crash
llvm-svn: 5972
2003-04-30 22:34:06 +00:00
Chris Lattner
caa766b40f Fix constant folding of constexprs
llvm-svn: 5971
2003-04-30 22:19:10 +00:00
Chris Lattner
a1250081cc Create constant expression casts instead of constant instructions if possible
llvm-svn: 5968
2003-04-28 01:25:38 +00:00
Chris Lattner
b74f4c1462 Fix several bugs:
* Warnings were emitted all of the time and were really annoying
  * Functions could not be resolved unless they had external linkage.  Linkonce
    linkage was not allowed
  * ConstantPointerRef's were not handled when linking functions
    we now actually handle cast (CPR) to X -> cast (NewCPR) to X

llvm-svn: 5967
2003-04-28 01:23:29 +00:00
Chris Lattner
7e9f0ea3fd Avoid naming things exactly the same
llvm-svn: 5966
2003-04-27 22:55:56 +00:00
Chris Lattner
bbe1aba425 Remove two fields from TargetData which are target specific.
llvm-svn: 5963
2003-04-26 20:11:09 +00:00
Chris Lattner
1039176b52 The promotion rules are the same for all targets, they are set by the C standard.
llvm-svn: 5962
2003-04-26 19:47:36 +00:00
Chris Lattner
cb8a4add15 IntegerRegSize is always 8 for sparc
llvm-svn: 5961
2003-04-26 19:44:35 +00:00
Chris Lattner
72338826c9 Fix bug: LoopPreheaders/2003-04-25-AssertFail.ll
llvm-svn: 5959
2003-04-26 19:34:18 +00:00
Chris Lattner
f5dce6b6f1 Fix a bug that occurred when removing the last predecessor INTO an
infinite loop

llvm-svn: 5953
2003-04-25 23:14:19 +00:00
Chris Lattner
d2960ee802 Fix bug: ADCE/2003-04-25-PHIPostDominateProblem.ll
llvm-svn: 5952
2003-04-25 22:53:27 +00:00
Chris Lattner
1f7fab6047 Fix bogus assert
llvm-svn: 5949
2003-04-25 21:58:54 +00:00
Chris Lattner
c5d76a4e74 Fix bug: Assembler/2003-04-25-UnresolvedGlobalReference.ll
llvm-svn: 5948
2003-04-25 21:47:33 +00:00
Chris Lattner
dc49712791 Only do the %ld -> %lld promotion when running a 64 bit bytecode on a 32 bit host
llvm-svn: 5942
2003-04-25 18:28:44 +00:00
Chris Lattner
e8eb2cb855 Add __strdup
llvm-svn: 5941
2003-04-25 18:23:38 +00:00
Chris Lattner
43e38979b5 Fix BasicAA/2003-04-25-GEPCrash.ll
llvm-svn: 5940
2003-04-25 18:03:06 +00:00
Chris Lattner
4196cc4916 MAke sure that LLI properly configures align_of(double)
llvm-svn: 5938
2003-04-25 06:15:05 +00:00
Chris Lattner
e26e308afb Whoops, 32 bit targets have _4_ byte pointers, not _32_ byte pointers!
llvm-svn: 5937
2003-04-25 06:06:43 +00:00
Chris Lattner
844b1148f4 Fix compatibility bug: X86 aligns doubles to 4 bytes, not 8!
llvm-svn: 5935
2003-04-25 06:05:57 +00:00
Chris Lattner
38d40c0ea9 Fix obvious type-o
llvm-svn: 5932
2003-04-25 05:23:10 +00:00
Chris Lattner
b72c6d38da Fix problem where we would read 64 bits worth of pointer information, even on 32 bit targets!
llvm-svn: 5930
2003-04-25 04:21:19 +00:00
Chris Lattner
c78cd5c758 Fix major problem with PHI node traversal: rechecking PHIs should go into
the visit function.  The worklist is for when their lattice value changes.

llvm-svn: 5927
2003-04-25 03:35:10 +00:00
Chris Lattner
dac0d4bafb ** CORRECTLY, conservatively handle constant expressions
llvm-svn: 5924
2003-04-25 02:52:06 +00:00
Chris Lattner
b258ffd600 Allow for easy detection of when a "default" TargetData is created by the
passmanager, which is never the right thing to do.

llvm-svn: 5922
2003-04-25 02:50:45 +00:00
Chris Lattner
7b67a6e77d Minor non-functional changes:
* Spell propagate right
  * Improve performance of phi node handling
  * Delete using directive
  * Other minor changes

llvm-svn: 5920
2003-04-25 02:50:03 +00:00
Chris Lattner
e1c995e9b6 Fix bug: mem2reg/2003-04-24-MultipleIdenticalSuccessors.ll
llvm-svn: 5919
2003-04-25 00:54:58 +00:00
Chris Lattner
6e2ea5ccff Fix a nasty bug where the ConstantMerge pass was invalidating the TargetData pass
even though it was immutable.  Immutable passes should never end up in CurrentAnalyses!

llvm-svn: 5906
2003-04-24 20:07:38 +00:00
Chris Lattner
c06795629d add a new targetdata ctor to create a target data appropriate to the module
llvm-svn: 5903
2003-04-24 19:09:05 +00:00
Chris Lattner
473df86e0b Trivial cleanup
llvm-svn: 5899
2003-04-24 18:35:51 +00:00
Chris Lattner
3dbf3f0ac1 Make the levelraise pass be well behaved w.r.t the TargetData that the current
PassMAnager provides.

llvm-svn: 5896
2003-04-24 18:25:27 +00:00
Chris Lattner
043b4a7621 Fix iterator invalidation problem
llvm-svn: 5895
2003-04-24 17:52:20 +00:00
Chris Lattner
f0c01a508b Make sure that the cloned module retains the type symbol table entries!
llvm-svn: 5894
2003-04-24 17:15:33 +00:00
Chris Lattner
868b3316c9 Make sure to preserve endiannes and pointer size when cloning modules!
llvm-svn: 5892
2003-04-24 15:54:40 +00:00
Chris Lattner
ec21fdc5ce Fix bug where pointers were assumed to always be 64 bits in size!
llvm-svn: 5890
2003-04-23 20:41:01 +00:00
Chris Lattner
84efc8b467 Add memcpy
llvm-svn: 5887
2003-04-23 20:23:16 +00:00
Chris Lattner
55a3471dab Fix a problem with setcc instructions and pointers
llvm-svn: 5886
2003-04-23 19:55:35 +00:00
Chris Lattner
34be06fad1 Implement a bunch of new external functions
llvm-svn: 5885
2003-04-23 19:55:24 +00:00
Chris Lattner
90d0ad7683 Implement &|^ on bool values
llvm-svn: 5884
2003-04-23 19:21:00 +00:00
Chris Lattner
48e894f97b Add support for _IO_getc function used on linux
llvm-svn: 5883
2003-04-23 19:20:50 +00:00
Chris Lattner
7054d8f1f1 Fix problem where labels were being incorrectly elided, and fix problem
where PHI copies where not emitted for the default label of switch insts

llvm-svn: 5882
2003-04-23 19:15:13 +00:00
Chris Lattner
1e44b1562a Fix the super obnoxious "cast to pointer from integer of different size" warnings
llvm-svn: 5881
2003-04-23 19:09:22 +00:00
Chris Lattner
896c6970fa * Implement access to external variables in LLI
* Implement GetElementPtr constant expressions when initializing global variables

llvm-svn: 5880
2003-04-23 19:01:49 +00:00
Chris Lattner
b6050c264d Fix Bug: Linker/2003-04-23-LinkOnceLost.ll
llvm-svn: 5879
2003-04-23 18:38:39 +00:00
Chris Lattner
6ae5107de6 Fix iterator invalidation problem with cast instructions
llvm-svn: 5876
2003-04-23 17:57:48 +00:00
Chris Lattner
c40d8cd8cd Implement the constantexpr CAST instruction correctly
llvm-svn: 5875
2003-04-23 17:22:12 +00:00
Chris Lattner
9938a43aac We now need to link libscalar to get the switch lowering pass
llvm-svn: 5874
2003-04-23 16:43:02 +00:00
Chris Lattner
db6b7ba364 Remove unnecesary &*'s
llvm-svn: 5872
2003-04-23 16:37:45 +00:00
Chris Lattner
3e687b8b65 Remove unneccesary &*
llvm-svn: 5871
2003-04-23 16:36:11 +00:00
Chris Lattner
ec5f9a7c4f Add support for the Switch instruction by running the lowerSwitch pass first
llvm-svn: 5867
2003-04-23 16:24:55 +00:00
Chris Lattner
a9eaa10358 New pass to lower switch instructions to branch instructions
llvm-svn: 5865
2003-04-23 16:23:59 +00:00
Chris Lattner
d609c99c87 Minor cleanups
llvm-svn: 5863
2003-04-23 16:18:14 +00:00
Misha Brukman
c881f68151 Fixed 'prevalent'.
llvm-svn: 5860
2003-04-23 02:59:05 +00:00
Misha Brukman
1d82003535 Just some code beautification changes I had sitting around in my tree.
llvm-svn: 5859
2003-04-22 23:00:08 +00:00
Chris Lattner
72a506d1f2 Fix bug: BasicAA/2003-04-22-GEPProblem.ll
llvm-svn: 5858
2003-04-22 22:00:27 +00:00
Chris Lattner
4ffd4c9cd8 Kill using declarations
Kill code for invalid operations on pointers

llvm-svn: 5856
2003-04-22 21:22:33 +00:00
Chris Lattner
56dc44e98a Implement cast to bool
llvm-svn: 5855
2003-04-22 21:15:56 +00:00
Chris Lattner
bdfa086221 Get rid of extraneous arguments to implementation functions
llvm-svn: 5852
2003-04-22 20:37:39 +00:00
Chris Lattner
43d3c3666b Add support to LLI for switch instruction
llvm-svn: 5851
2003-04-22 20:34:47 +00:00
Chris Lattner
839e486b99 Use a union to cast int to fp
llvm-svn: 5849
2003-04-22 20:20:28 +00:00
Misha Brukman
4147d10d28 It's "necessary"...
llvm-svn: 5848
2003-04-22 20:20:11 +00:00
Chris Lattner
8ca18dd9fa Add support for the switch instruction to the CWriter
llvm-svn: 5847
2003-04-22 20:19:52 +00:00
Chris Lattner
69b54208f4 Add warning when linking modules with disagreeing target properties
llvm-svn: 5845
2003-04-22 19:13:20 +00:00
Chris Lattner
fcad09d3c1 Emit information about target
llvm-svn: 5844
2003-04-22 19:07:19 +00:00
Chris Lattner
b70bd26701 Allow information about the target to be specified in the .ll file
llvm-svn: 5843
2003-04-22 19:07:06 +00:00
Chris Lattner
a39c962c1d Namespacify
llvm-svn: 5840
2003-04-22 18:42:41 +00:00
Chris Lattner
08a79481cd Add support for reading and writing pointersize/endianness to and from bytecode
llvm-svn: 5839
2003-04-22 18:15:10 +00:00
Chris Lattner
3327cb03d4 Preserve module source information in the ModuleID
llvm-svn: 5836
2003-04-22 18:02:52 +00:00
Chris Lattner
ce0beca3fc Preserve the new moduleID field
llvm-svn: 5835
2003-04-22 18:02:26 +00:00
Chris Lattner
b5fc5522fb Add support for tracking whether a module is 64/32 bit and big/little endian
Also add a moduleID field which can be used for diagnostics

llvm-svn: 5834
2003-04-22 18:02:04 +00:00
Misha Brukman
c06beb4c03 It's "necessary" to spell "necessarily" correctly.
llvm-svn: 5833
2003-04-22 17:54:23 +00:00
Chris Lattner
b315dbe98a Make stderr, stdout, stdin work with LLI
llvm-svn: 5832
2003-04-21 22:44:36 +00:00
Chris Lattner
dd3c1121d0 Fix wierd idiom
llvm-svn: 5831
2003-04-21 22:43:32 +00:00
Chris Lattner
2fc856e8b6 fprintf CAN take exactly 2 args
llvm-svn: 5830
2003-04-21 22:43:20 +00:00
Chris Lattner
a48a91d095 Add support for a simple constantexpr: cast of one ptr type to another
llvm-svn: 5829
2003-04-21 21:33:44 +00:00
Chris Lattner
21967df20a Fix bug: 2003-01-30-LinkerRename.ll
llvm-svn: 5828
2003-04-21 21:15:04 +00:00
Chris Lattner
6da72fd92a Fix linking a function with qualifiers to a external function declaration:
Fixed bug: Linker/2003-04-21-Linkage.ll

llvm-svn: 5827
2003-04-21 21:07:05 +00:00
Chris Lattner
a489b529fe Fix bug where use still existed in dead code
llvm-svn: 5824
2003-04-21 19:15:26 +00:00
Chris Lattner
c1da4513e0 Initial support for reading standard .a files
llvm-svn: 5820
2003-04-19 21:45:34 +00:00
Chris Lattner
8b1c27945b Add support for reading unaligned bytecode buffers
llvm-svn: 5819
2003-04-19 21:45:17 +00:00
Chris Lattner
869d67b885 Remove arbitrary limitation
llvm-svn: 5818
2003-04-19 00:50:37 +00:00
Chris Lattner
5931df28b7 Implement: FunctionResolve/2003-04-18-ForwardDeclGlobal.ll
llvm-svn: 5816
2003-04-19 00:15:27 +00:00
Chris Lattner
61d704329e Fix bug: Mem2reg/2003-04-18-DeadBlockProblem.ll
llvm-svn: 5810
2003-04-18 19:25:22 +00:00
Chris Lattner
08b5392e07 Global constants CAN be external
llvm-svn: 5808
2003-04-18 04:34:29 +00:00
Chris Lattner
8453f87c9c Fix a big bad bug I checked in yesterday :(
llvm-svn: 5807
2003-04-18 04:11:56 +00:00
Chris Lattner
f171f30deb Refactor CloneFunction to expose the new CloneBasicBlock function
llvm-svn: 5806
2003-04-18 03:50:09 +00:00
Chris Lattner
5403f79db0 New const_cast instead of c style cast
llvm-svn: 5805
2003-04-18 03:49:49 +00:00
Chris Lattner
32af8814ce Allow hexadecimal integer constants to be used
llvm-svn: 5802
2003-04-17 22:17:32 +00:00
Chris Lattner
eacb88d2e9 Don't build constantexprs that could be folded
llvm-svn: 5801
2003-04-17 19:24:48 +00:00
Chris Lattner
719fd86bdc Allow constant folding of GEP instructions, even if we don't do a whole lot yet.
Fold ConstExpr casts better
castToPointer shouldn't be forced to return a constantpointer

llvm-svn: 5800
2003-04-17 19:24:18 +00:00
Chris Lattner
23615ca1b5 Fix bug: IndVarSimplify/2003-04-16-ExprAnalysis.ll
llvm-svn: 5795
2003-04-16 22:50:19 +00:00
Chris Lattner
bb00f755ed Change the interface to constant expressions to allow automatic folding
llvm-svn: 5793
2003-04-16 22:40:51 +00:00
Chris Lattner
545bebf00c Add support to the bytecode reader/writer for the new linkage types
llvm-svn: 5790
2003-04-16 21:16:05 +00:00
Chris Lattner
a9a0e4e780 Add code to verify correctly linkages
llvm-svn: 5788
2003-04-16 20:42:40 +00:00
Chris Lattner
fa4f750f3e Add new linkage types to support a real frontend
llvm-svn: 5786
2003-04-16 20:28:45 +00:00
Chris Lattner
343a212f2b Improve the efficiency and cleanup writing a bit
llvm-svn: 5782
2003-04-16 20:20:02 +00:00
Chris Lattner
638d4b0f28 Don't allow declaring an external internal variable
llvm-svn: 5781
2003-04-16 18:13:57 +00:00
Chris Lattner
f5ce9b1a74 Fix bug: Assember2003-04-15-ConstantInitAssertion.llx
llvm-svn: 5777
2003-04-15 16:09:31 +00:00
Chris Lattner
fc93e77390 Make help message more clear
llvm-svn: 5775
2003-04-13 03:50:14 +00:00
Chris Lattner
0ac391e6c8 * Fix bug: Mem2Reg/2003-04-10-DFNotFound.ll
* Make Mem2Reg assign version numbers now for renamed variables instead of
  .mem2reg suffixes.  This produces what people think of as SSA.

llvm-svn: 5771
2003-04-10 19:41:13 +00:00
Misha Brukman
127a46eeba Fixed compilation errors, command-line argument declarations, cleaned up code to
look nicer and removed useless stuff.

Also renamed a few variables, moved them into namespaces, converted outputting
to a file into a print to std::cerr with a DEBUG() guard, as all passes should
do anyway.

No functional changes have been made. However, this code now compiles.

llvm-svn: 5769
2003-04-10 19:19:23 +00:00
Misha Brukman
1db4cefc28 Made the code readable:
* Lines must be wrapped at 80 chars. This is a hard limit.
* Consistent style on functions, braces, if, for, etc. Code must be readable.

No functional changes have been made, even though I added a new typedef.

llvm-svn: 5768
2003-04-09 21:51:34 +00:00
Guochun Shi
478533bb86 change the include file names and some class names to make it compile
llvm-svn: 5764
2003-04-06 23:56:19 +00:00
Chris Lattner
7bfad931b8 Implement scanf and fix sscanf to actually endian swap the results correctly
llvm-svn: 5763
2003-03-31 22:12:37 +00:00
Chris Lattner
731913bab3 Initial checkin of PRE on LLVM. This implementation is still lacking in
several ways:

 * Load expressions are not PRE'd well.  Alias Analysis should be used to
   get accurate information when computing anticipatibility.
 * The expression collection implementation does not handle PHI nodes properly,
   thus the implementation misses many opportunities to PRE.
 * This code could be sped up quite a bit

Despite these flaws, the code seems to work well, and handles PR's as one
would expect.

llvm-svn: 5759
2003-03-31 19:55:43 +00:00
Chris Lattner
44370a85d9 * We now preserve the no-critical-edge pass (because we cannot insert critical edges)
* Small modification to be more efficient

llvm-svn: 5757
2003-03-31 17:30:25 +00:00
Guochun Shi
9ba51857c1 *** empty log message ***
llvm-svn: 5755
2003-03-27 17:57:44 +00:00
Chris Lattner
b215db890f Move BreakCriticalEdges pass to lib/Transforms/Utils
llvm-svn: 5754
2003-03-21 21:43:19 +00:00
Chris Lattner
8696069d85 Add helper method
llvm-svn: 5753
2003-03-21 21:41:02 +00:00
Chris Lattner
03fab572fb * Change the order that globals and constants are processed in
* Add support for implicit zero initializers

llvm-svn: 5750
2003-03-19 20:57:22 +00:00
Chris Lattner
839f5a9077 Changes to the V2 bytecode format:
- Null values are implicitly encoded instead of explicitly, this makes
    things more compact!
  - More compactly represent ConstantPointerRefs
  - Bytecode files are represented as:
      Header|GlobalTypes|GlobalVars/Function Protos|Constants|Functions|SymTab
    instead of
      Header|GlobalTypes|Constants|GlobalVars/Function Protos|Functions|SymTab
    which makes a lot of things simpler.

Writer changes:
  - We now explictly encode versioning information in the bytecode files.
  - This allows new code to read bytecode files produced by old code, but
    new bytecode files can have enhancements such as the above.  Although this
    makes the reader a bit more complex (having to deal with old formats), the
    writer only needs to be able to produce the most recent version.

llvm-svn: 5749
2003-03-19 20:56:46 +00:00
Chris Lattner
dd194d3844 * Bug fixes:
- Fix problems where the constant table would not get updated when
    resolving constants causes other constants to change.

Changes to the V2 bytecode format
  - Null values are implicitly encoded instead of explicitly, this makes
    things more compact!
  - More compactly represent ConstantPointerRefs
  - Bytecode files are represented as:
      Header|GlobalTypes|GlobalVars/Function Protos|Constants|Functions|SymTab
    instead of
      Header|GlobalTypes|Constants|GlobalVars/Function Protos|Functions|SymTab
    which makes a lot of things simpler.

Changes to the reader:
  - Function loading code is much simpler.  We now no longer make function
    PlaceHolderHelper objects to be replaced with real functions.

llvm-svn: 5748
2003-03-19 20:54:26 +00:00
Chris Lattner
c51d7871ee Add the following instcombine xforms:
- Implement simple reassociation: (A|c1)|(B|c2) == (A|B)|(c1|c2)
  - (A & C1)+(B & C2) -> (A & C1)|(B & C2) iff C1&C2 == 0
  - (A & C1)^(B & C2) -> (A & C1)|(B & C2) iff C1&C2 == 0

llvm-svn: 5743
2003-03-11 00:12:48 +00:00
Chris Lattner
6eededc41f Implement: -A*-B == A*B
llvm-svn: 5740
2003-03-10 23:23:04 +00:00
Chris Lattner
715b592fc4 Add new transformation: // (~A | ~B) == (~(A & B))
llvm-svn: 5738
2003-03-10 23:13:59 +00:00
Chris Lattner
0f5ab645eb Generalize not and neg comparison testers to allow constant to be considered not'able and neg'able. This
allows optimization of this:
int %test4(int %A, int %B) {
        %a = xor int %A, -1
        %c = and int %a, 5    ; 5 = ~c2
        %d = xor int %c, -1
        ret int %d
}

into this:
int %test4(int %A, int %B) {            ; No predecessors!
        %c.demorgan = or int %A, -6             ; <int> [#uses=1]
        ret int %c.demorgan
}

llvm-svn: 5736
2003-03-10 23:06:50 +00:00
Chris Lattner
5e5950b7e0 Fix ConstantUInt::isAllOnesValue
llvm-svn: 5734
2003-03-10 22:39:02 +00:00
Chris Lattner
3eca9aaa0a Generalize (A+c1)+c2 optimization to work with all associative operators
llvm-svn: 5733
2003-03-10 21:43:22 +00:00
Chris Lattner
9dec4368c0 Minor change, no functionality diff
llvm-svn: 5731
2003-03-10 19:20:30 +00:00
Chris Lattner
5fbfe9b9a8 Fix bug: (x << 100) wasn't folded to 0, but (x >> 100) was (when x is unsigned)
Implement new shift optimizations for shifting the result of a shift.

llvm-svn: 5729
2003-03-10 19:16:08 +00:00
Chris Lattner
5e6fb8b8d5 Implement: (A|B)^B == A & (~B)
llvm-svn: 5728
2003-03-10 18:24:17 +00:00
Chris Lattner
9f2f48a648 Fix bug: SimplifyCFG/2003-03-07-DominateProblem.ll
llvm-svn: 5722
2003-03-07 18:13:41 +00:00
Chris Lattner
0509f2bb59 Clean up cruft
llvm-svn: 5720
2003-03-06 23:23:32 +00:00
Chris Lattner
90932ffc26 Remove #include
Extend getNullValue to work with struct and array types

llvm-svn: 5718
2003-03-06 21:02:18 +00:00
Chris Lattner
1bb2b2b8c9 Infrastructure for more compact bytecode files and REAL support for versioning
llvm-svn: 5716
2003-03-06 17:55:45 +00:00
Chris Lattner
70b5574318 s/Method/Function in variable and method names
llvm-svn: 5715
2003-03-06 17:18:14 +00:00
Chris Lattner
66c7c883d3 Continue simplifying error handling, s/method/function
llvm-svn: 5714
2003-03-06 17:15:19 +00:00
Chris Lattner
5210697f31 Cleanup error handling constructs
llvm-svn: 5713
2003-03-06 17:03:28 +00:00
Chris Lattner
84c6e94784 Pull common code out
llvm-svn: 5712
2003-03-06 16:50:32 +00:00
Chris Lattner
8080df315f Remove unneccesary forward decl
llvm-svn: 5710
2003-03-06 16:37:29 +00:00
Chris Lattner
f9b71aab86 Use the std namespace explicitly
llvm-svn: 5708
2003-03-06 16:32:25 +00:00
Chris Lattner
bd009a8938 Implement %test7 in InstCombine/getelementptr.ll
llvm-svn: 5704
2003-03-05 22:33:14 +00:00
Chris Lattner
4a9f0be9dd Implement CFGSimplify/PhiBlockMerge*.ll
llvm-svn: 5702
2003-03-05 21:36:33 +00:00
Chris Lattner
92a316864d Simplify some of the PHI node interfaces
llvm-svn: 5700
2003-03-05 21:15:12 +00:00
Chris Lattner
e025920ff8 Implement testcase CFGSimplify/EqualPHIEdgeBlockMerge.ll
llvm-svn: 5699
2003-03-05 21:01:52 +00:00
Chris Lattner
9d545c8aa3 Fix bug: BasicAA/2003-03-04-GEPCrash.ll
llvm-svn: 5695
2003-03-04 16:40:17 +00:00
Chris Lattner
4eaaa99b93 Convert LICM over to use AliasSetTracker. Besides being nicer, this automatically
allows LICM to use access sizes to help alias analysis be more precise.

llvm-svn: 5693
2003-03-03 23:32:45 +00:00
Chris Lattner
c8a5c7e4a7 Fix bug: Assembler/2003-03-03-DuplicateConstant.ll
llvm-svn: 5692
2003-03-03 23:28:55 +00:00
Chris Lattner
eb82f294bd ADd two new 'add' methods
llvm-svn: 5691
2003-03-03 23:28:05 +00:00
Chris Lattner
db94bd1661 Eliminate tons of bogus warnings
llvm-svn: 5686
2003-03-03 19:57:46 +00:00
Chris Lattner
a49e96dda5 Change the mem2reg interface to accept a TargetData argument
llvm-svn: 5685
2003-03-03 17:25:18 +00:00
Chris Lattner
1778154dc7 Don't apply type information to load instructions if it will cause collapsing
llvm-svn: 5684
2003-03-03 17:13:31 +00:00
Chris Lattner
a29ba21066 Fix a problem with negative indexes
llvm-svn: 5681
2003-03-02 23:43:34 +00:00
Chris Lattner
09c35df4e9 Fix bug: LICM/2003-02-28-PromoteDifferentType.ll
llvm-svn: 5675
2003-02-28 19:21:40 +00:00
Chris Lattner
77840ef407 Add dump method for Loops
llvm-svn: 5671
2003-02-28 16:54:45 +00:00
Chris Lattner
dec7727a9f Fix bug I introduced yesterday :(
llvm-svn: 5669
2003-02-28 16:54:17 +00:00
Chris Lattner
e2aebf5906 Fix bug: LICM/2003-02-27-PreheaderExitNodeUpdate.ll
llvm-svn: 5667
2003-02-28 03:07:54 +00:00
Chris Lattner
d64f135965 Fix bug: 2003-02-27-PreheaderExitNodeUpdate.ll by updating exit node info
llvm-svn: 5664
2003-02-27 22:48:57 +00:00
Chris Lattner
030a114dba Simplify a bit by using a new member function
llvm-svn: 5662
2003-02-27 22:48:08 +00:00
Chris Lattner
c37308604f Change behavior of changeExitBlock function to replace all instances of exit block
llvm-svn: 5661
2003-02-27 22:37:44 +00:00
Chris Lattner
74b9aaa89c Add a new assertion to check that stuff is happening right
Ironically the exit block modification code wasn't updating the exit block
information itself.  Fix this.

llvm-svn: 5659
2003-02-27 22:31:07 +00:00
Chris Lattner
d40fa5ca2f Fix bug: 2003-02-27-StoreSinkPHIs.ll
llvm-svn: 5658
2003-02-27 21:59:36 +00:00
Chris Lattner
e1d4fb3c2c Fix bug: LICM/2003-02-27-PreheaderProblem.ll
There may be a single outside predecessor and
still need a new loop-preheader if the predecessor has multiple
successors.

llvm-svn: 5656
2003-02-27 21:51:38 +00:00
Chris Lattner
e8dda81b22 * Don't forget to update Loop information!
* Remove bogus assertion: there may be a single outside predecessor and
    still need a new loop-preheader if the predecessor has multiple
    successors.  See bug: LICM/2003-02-27-PreheaderProblem.ll

llvm-svn: 5655
2003-02-27 21:50:19 +00:00
Chris Lattner
3b3cce733d Replace assertion with a handler.
llvm-svn: 5653
2003-02-27 20:55:48 +00:00
Chris Lattner
b078b28fa5 * Significant changes to the preheader insertion pass:
- Now we perform loop exit-block splitting to ensure exit blocks are
     always dominated by the loop header.
   - We now preserve dominance frontier information
   - This fixes bug: LICM/2003-02-26-LoopExitNotDominated.ll

llvm-svn: 5652
2003-02-27 20:27:08 +00:00
Chris Lattner
ac72aab6e7 - LoopInfo now calculates and tracks loop exit blocks
llvm-svn: 5650
2003-02-27 00:38:34 +00:00
Chris Lattner
5baf8bb966 Make the aliassettracker much more precise by actually tracking size
information for various accesses.  What a concept.

llvm-svn: 5647
2003-02-26 22:11:00 +00:00
Chris Lattner
933b11a154 Fix bug: BasicAA/2003-02-26-AccessSizeTest.ll
llvm-svn: 5645
2003-02-26 21:57:23 +00:00
Chris Lattner
e923b037b7 Fix several bugs in basic-aa
llvm-svn: 5643
2003-02-26 21:28:49 +00:00
Chris Lattner
ea424f3aff Rename -no-* to -disable-*
llvm-svn: 5642
2003-02-26 20:00:41 +00:00
Chris Lattner
4e622afb23 Add new -no-aa implementation
llvm-svn: 5641
2003-02-26 19:57:10 +00:00
Chris Lattner
721f9fc770 Move BasicAA pass out to it's own header file
llvm-svn: 5640
2003-02-26 19:41:54 +00:00
Chris Lattner
4162adcfee Adjust to implement new AA interface
llvm-svn: 5638
2003-02-26 19:29:36 +00:00
Chris Lattner
4d57299049 Adjust to new AA interface
llvm-svn: 5637
2003-02-26 19:29:16 +00:00
Chris Lattner
92a8816086 Convert to work with new AliasAnalysis interface by conservatively assuming all pointers are arbitrarily large accesses
llvm-svn: 5636
2003-02-26 19:28:57 +00:00
Chris Lattner
5afbabc83b Calculate and pass load sizes to the alias analysis infrastructure
llvm-svn: 5635
2003-02-26 19:27:35 +00:00
Chris Lattner
d67ff79f57 Adjust to new AA interface
Add tracking for Mod/Ref info

llvm-svn: 5634
2003-02-26 19:27:05 +00:00
Chris Lattner
a84b1da40f - Checkin of the alias analysis work:
* Takes into account the size of the memory reference to determine aliasing.
    * Expose mod/ref information in a more consistent way
    * BasicAA can now disambiguate A[i][1] and A[j][2] for conservative request
      sizes

llvm-svn: 5633
2003-02-26 19:26:51 +00:00
Chris Lattner
b7d52c4fa8 Allow ImmutablePass's to require other immutable passes and to be initialized
llvm-svn: 5630
2003-02-26 19:10:57 +00:00
Chris Lattner
ce3e651af6 Fix typeo
llvm-svn: 5624
2003-02-25 21:14:59 +00:00
Chris Lattner
b1aeaf7efb Remove wierd case that can never happen
llvm-svn: 5623
2003-02-25 20:27:09 +00:00
Chris Lattner
497c0d443c Rename Instruction::hasSideEffects() -> mayWriteToMemory()
llvm-svn: 5620
2003-02-24 20:48:32 +00:00
Chris Lattner
f2009dbddb This is a substantial rewrite of the AliasSetTracker class which now uses
a union-find based algorithm, is significantly faster, and is more general.
It will also scale to handle call instructions correctly, which is a nice
added bonus.

This includes a new pass -print-alias-sets which can be used to show how
alias sets are formed for a particular analysis.

llvm-svn: 5619
2003-02-24 20:37:56 +00:00
Chris Lattner
1c1f11bd3f Initial implementation of Loop invariant memory->scalar promotion
llvm-svn: 5613
2003-02-24 03:52:32 +00:00
Chris Lattner
2e4c1c8640 Split mem2reg promotion into two parts: a function which does the work, and
a pass which wraps the function.  This allows other passes to use the functionality

llvm-svn: 5610
2003-02-22 23:57:48 +00:00
Chris Lattner
283d117dad Clean up std namespace references
llvm-svn: 5608
2003-02-22 22:25:17 +00:00
Chris Lattner
4c2012352d Dramatically simplify building of natural loops and fix a bug where the BBMap
was not correctly computed.

llvm-svn: 5606
2003-02-22 21:33:11 +00:00
Chris Lattner
1fc8307d2a Fix the requisite bug that I introduced
llvm-svn: 5605
2003-02-20 00:28:00 +00:00
Chris Lattner
92bf8c2754 Fix 80 character formatting
llvm-svn: 5604
2003-02-20 00:18:07 +00:00
Chris Lattner
97d323caea Fix bug: 2003-02-19-LoopInfoNestingBug.ll
llvm-svn: 5603
2003-02-20 00:17:17 +00:00
Chris Lattner
c24ffa9297 4 new transformations:
* X*C + X --> X * (C+1)
  * X + X*C --> X * (C+1)
  * X - X*C --> X * (1-C)
  * X*C - X --> X * (C-1)

llvm-svn: 5592
2003-02-18 19:57:07 +00:00
Chris Lattner
8306cc5c5c Add a variety of new transformations:
* A & ~A == 0
  * A / (2^c) == A >> c  if unsigned
  * 0 / A == 0
  * 1.0 * A == A
  * A * (2^c) == A << c
  * A ^ ~A == -1
  * A | ~A == -1
  * 0 % X = 0
  * A % (2^c) == A & (c-1) if unsigned
  * A - (A & B) == A & ~B
  * -1 - A == ~A

llvm-svn: 5587
2003-02-18 19:28:33 +00:00
Chris Lattner
148d67f088 Fix resolution of indirect function calls... whoops
llvm-svn: 5576
2003-02-14 23:27:18 +00:00
Anand Shukla
7aae29d426 Changes to runtime framework
llvm-svn: 5572
2003-02-14 20:41:53 +00:00
Chris Lattner
37735c4677 Mark function edges
llvm-svn: 5571
2003-02-14 20:25:47 +00:00
Chris Lattner
174a241cd5 Fix a bug that cause a crash resolving questionable function calls
llvm-svn: 5567
2003-02-14 19:12:29 +00:00
Chris Lattner
00fe161e49 - Eliminate provably non-pointer nodes from graphs.
This helps a lot of testcases, for example:
            New Time  New #Nodes     Old Time    Old #Nodes
254.gap:    91.1024     21605        91.1397     22657
povray31:    2.7807      8613         3.0152     10338
255.vortex:  1.2034      8153         1.2172     8822
moria:        .6756      3150          .7054     3877
300.twolf:    .1652      2010          .1851     3270

Typically, testcases which use long and ulong integers a lot get better, f.e. povray above.

llvm-svn: 5566
2003-02-14 06:28:00 +00:00
Chris Lattner
8de17c9baf Fix a misunderstanding of the standard associative containers
llvm-svn: 5565
2003-02-14 05:34:36 +00:00
Chris Lattner
e5dbced215 Don't put integer pointers (longs) into the scalar map.
This speeds stuff up by 10% on some tests, woot!

llvm-svn: 5564
2003-02-14 04:55:58 +00:00
Chris Lattner
e70bdb4355 Fix bug: LevelRaise/2003-02-13-CallRaise.ll
llvm-svn: 5562
2003-02-14 03:07:17 +00:00
Chris Lattner
b178c26c20 Hax0r around a deficiency in the Pass infrastructure
llvm-svn: 5555
2003-02-13 21:44:18 +00:00
Chris Lattner
32a8143e30 Use the new tailclip property new added to graphviz CVS to make call nodes
actually intelligable

llvm-svn: 5554
2003-02-13 20:14:40 +00:00
Chris Lattner
c4affd76ec This speeds up processing LLVM a _lot_, 17% in the case of loading and destroying "vortex"
llvm-svn: 5553
2003-02-13 19:46:22 +00:00
Chris Lattner
120d135f05 Move node forwarding code from being inlined to being out-of-line.
This brings a 11.6% speedup to steens, and a 3.6 overall speedup to ds-aa

llvm-svn: 5552
2003-02-13 19:09:00 +00:00
Chris Lattner
9efc110b12 Make more compatible with GCC 2.96
llvm-svn: 5550
2003-02-13 16:25:28 +00:00
Chris Lattner
34094ff7e3 Remove gunk that was supposed to make space evaluation more precise, but never worked.
llvm-svn: 5549
2003-02-13 05:07:53 +00:00
Joel Stanley
1b7b1786a5 Fixed alloca declaration problem on sun.
llvm-svn: 5546
2003-02-12 20:45:00 +00:00
Chris Lattner
bf2c5b238f Don't output times in "scientific" notation
llvm-svn: 5544
2003-02-12 19:02:13 +00:00
Chris Lattner
e3c6f245cd Rename options
llvm-svn: 5537
2003-02-11 23:12:09 +00:00
Chris Lattner
522cb6d282 Implement a "union-findy" version of DS-Analysis, which eliminates the
Referrers list on DSNodes.

llvm-svn: 5536
2003-02-11 23:11:51 +00:00
Chris Lattner
2d27e0d912 Minor tweaks to printing. Close the file before viewing it in viewGraph
llvm-svn: 5535
2003-02-11 19:27:27 +00:00
Chris Lattner
de261140d0 Modest speedup which seems to help steens quite a bit on large graphs
llvm-svn: 5532
2003-02-10 18:47:23 +00:00
Chris Lattner
8d025d56d6 Fix problem breaking GAP, use hasNoReferrers more
llvm-svn: 5530
2003-02-10 18:18:18 +00:00
Chris Lattner
72fbffecd2 Implement a new "viewGraph" method which can be used to instantly view a graph from gdb
llvm-svn: 5528
2003-02-10 18:17:07 +00:00
Chris Lattner
940a5eddb3 Rearrange code
llvm-svn: 5527
2003-02-10 18:16:36 +00:00
Chris Lattner
1ed7b4806b Fix problem breaking Fhourstones
llvm-svn: 5526
2003-02-10 18:16:19 +00:00
Chris Lattner
644b87ddb2 Revert Anand's patch which broke the build
llvm-svn: 5525
2003-02-10 15:55:50 +00:00
Chris Lattner
34a3429b0a Make steensgaards performance not shameful
llvm-svn: 5524
2003-02-10 00:14:57 +00:00
Chris Lattner
f8c57bab25 Don't insert null entries into the scalar map for constexpr (cast null to Ty)
llvm-svn: 5523
2003-02-09 23:04:12 +00:00
Anand Shukla
a502e67a14 *** empty log message ***
llvm-svn: 5522
2003-02-09 21:15:36 +00:00
Chris Lattner
ae91295cfa Remove the -debug option from release executables
llvm-svn: 5521
2003-02-09 21:13:57 +00:00
Chris Lattner
59a935f381 Allow printing of various types of alias analysis results
llvm-svn: 5520
2003-02-09 20:40:13 +00:00
Chris Lattner
471d708ae0 Implement knowledge in BasicAA that &A->field != &A and (P+1) != P
llvm-svn: 5519
2003-02-09 19:38:11 +00:00
Chris Lattner
f3627e3ee3 - Fix BasicAA to correctly detect the non-aliasness of A[1] & A[2]
llvm-svn: 5518
2003-02-09 19:27:21 +00:00
Chris Lattner
117a27d291 Switch to using the right call vector
llvm-svn: 5517
2003-02-09 19:26:47 +00:00
Chris Lattner
dcf8d02380 Fix major bugs in incompleteness marking that were pessimizing results
llvm-svn: 5515
2003-02-09 18:42:43 +00:00
Chris Lattner
063bef68c4 Print out the steens graph if -debug is specified
llvm-svn: 5514
2003-02-09 18:42:16 +00:00
Chris Lattner
5da09703fa * Fix a bug where global incompleteness marking would not mark the global
itself incomplete!
* Allow incompleteness callers to specify they don't want globals to be
  considered sources of incompleteness.

llvm-svn: 5513
2003-02-09 18:41:49 +00:00
Chris Lattner
8711f611fa Add a special case for main because we know it's incoming arguments don't alias
llvm-svn: 5511
2003-02-08 23:08:02 +00:00
Chris Lattner
6daed111da Fix a bug where we would mark the callees arguments incomplete if the caller was external.
llvm-svn: 5510
2003-02-08 23:07:39 +00:00
Chris Lattner
31e95435b8 Fix division by zero problem
llvm-svn: 5509
2003-02-08 23:04:50 +00:00
Chris Lattner
a05bfd7525 Remove explicit result counters
llvm-svn: 5508
2003-02-08 23:03:17 +00:00
Chris Lattner
2c7c54ce9d Add a flag which effectively disables field sensitivity
llvm-svn: 5506
2003-02-08 20:18:39 +00:00
Chris Lattner
b056679b1e Don't bother counting alias results, allow the AliasAnalysisCounter to do that.
llvm-svn: 5505
2003-02-07 20:39:48 +00:00
Chris Lattner
2f75411136 Allow counting multiple passes, and print the pass name counted
llvm-svn: 5504
2003-02-07 20:39:17 +00:00
Chris Lattner
ed61b8ddef New general purpose alias analysis result auditor
llvm-svn: 5503
2003-02-07 19:46:03 +00:00
Chris Lattner
4c58f5252e Add a summary
llvm-svn: 5500
2003-02-06 22:06:08 +00:00
Chris Lattner
cc7f4a3c65 Fix a problem Sumant was running into
llvm-svn: 5499
2003-02-06 22:03:46 +00:00
Chris Lattner
d4990fe1be Simple N^2 alias anlysis accuracy checker
llvm-svn: 5498
2003-02-06 21:29:49 +00:00
Chris Lattner
21e1033bff Fix an assertion failure
llvm-svn: 5496
2003-02-06 00:15:08 +00:00
Chris Lattner
5f3ef2f0e7 Implement optimization for direct function call case. This dramatically
reduces the number of function nodes created and speeds up analysis by
about 10% overall.

llvm-svn: 5495
2003-02-05 21:59:58 +00:00
Chris Lattner
8088c79d39 Squelch warning
llvm-svn: 5494
2003-02-05 21:44:28 +00:00
Chris Lattner
4aa35d21be Remove bogus assertion
llvm-svn: 5492
2003-02-04 16:33:23 +00:00
Chris Lattner
4e0422745c Fix a huge bug with handling non-pointer instructions
llvm-svn: 5491
2003-02-04 00:59:50 +00:00
Chris Lattner
a4f94897b9 Make the TD pass not include all of the call nodes from the local pass,
eliminating incomplete markers from them

llvm-svn: 5490
2003-02-04 00:59:32 +00:00
Chris Lattner
e8381114ef Add sanity check
llvm-svn: 5489
2003-02-04 00:03:57 +00:00
Chris Lattner
96f37f267a Fix steensgaard to work on a lot more cases...
llvm-svn: 5488
2003-02-04 00:03:37 +00:00
Chris Lattner
2e3829c76d Fix printing of nonfunction graphs
llvm-svn: 5487
2003-02-04 00:03:18 +00:00
Chris Lattner
7b9a9209fc Rename variable
llvm-svn: 5486
2003-02-03 22:51:53 +00:00
Chris Lattner
102e619864 Hack to work around deficiency in pass infrastructure
llvm-svn: 5485
2003-02-03 22:51:28 +00:00
Chris Lattner
2a3c476fd4 Initial implementation of ds-aa
llvm-svn: 5484
2003-02-03 22:50:46 +00:00
Chris Lattner
47929dacd2 Add statistics to basicAA pass
llvm-svn: 5480
2003-02-03 21:16:17 +00:00
Chris Lattner
2ce14e226e * Fix a bug introduced in the last checkin wrt Stack markers
* Make cloning more efficient in the process...

llvm-svn: 5479
2003-02-03 20:08:51 +00:00
Chris Lattner
5d14f5d9ac Implement the globals graph!
llvm-svn: 5477
2003-02-03 19:12:15 +00:00
Chris Lattner
a589169d22 Add better debug output
llvm-svn: 5476
2003-02-03 19:11:38 +00:00
Chris Lattner
978ff5d0dd Split public interface out into header file
llvm-svn: 5472
2003-02-03 19:08:18 +00:00
Chris Lattner
e4d8ec335c Be a bit more specific in caption
llvm-svn: 5469
2003-02-02 16:42:01 +00:00
Chris Lattner
c68ccffee6 Fix bug: Assembler/2003-02-02-ConstGlobal.ll
llvm-svn: 5467
2003-02-02 16:40:20 +00:00
Chris Lattner
acc67b5d1d Fix a bug where we would delete neccesary calls in bu pass
llvm-svn: 5465
2003-02-01 06:54:31 +00:00
Chris Lattner
d946a6a307 Fix a bug where we would incorrectly delete globals which had edges to alive nodes in
a graph in the t-d pass.  This slows down the TD pass by quite a bit (1/3), but is
needed for correctness.

llvm-svn: 5464
2003-02-01 06:51:17 +00:00
Chris Lattner
4f56dfb8d8 Delete nodes more efficiently
llvm-svn: 5463
2003-02-01 06:41:15 +00:00
Chris Lattner
bbd430c392 Remove dead nodes more efficiently
llvm-svn: 5462
2003-02-01 06:23:33 +00:00
Chris Lattner
8bb8f73e76 Improve efficiency of aliveness traversal code
llvm-svn: 5461
2003-02-01 06:17:02 +00:00
Chris Lattner
7aec6c471b Change DSGraph stuff to use hash_(set|map) instead of std::(set|map)
This change provides a small (3%) but consistent speedup

llvm-svn: 5460
2003-02-01 04:52:08 +00:00
Chris Lattner
aceb57a289 Fix typo
llvm-svn: 5458
2003-02-01 04:50:59 +00:00
Chris Lattner
6051f888b4 Remove using declarations
llvm-svn: 5456
2003-02-01 04:01:21 +00:00
Chris Lattner
f5c4b08e31 Simplify assertions
llvm-svn: 5455
2003-02-01 03:33:22 +00:00
Joel Stanley
dd27536820 Added implementation of alternate CallInst constructors (one ctor is
for no actual parameters, and one ctor is for one actual parameter).

llvm-svn: 5452
2003-02-01 00:39:58 +00:00
Chris Lattner
c3e8b48d5e Remove globals on the bottom up pass which do not contain any information
llvm-svn: 5451
2003-01-31 23:57:36 +00:00
Chris Lattner
390dc95c05 Add functions to the ban list
llvm-svn: 5450
2003-01-31 23:57:10 +00:00
Chris Lattner
bedb4f4a83 * Add new -track-memory option to tools which enables the mem usage column in the reports.
This is now optional (and defaults to off) because mallinfo can be VERY slow as it
seems to touch every page of allocated memory.

llvm-svn: 5448
2003-01-30 23:08:50 +00:00
Chris Lattner
dcf38586ef Fix a bug resolving sprintf(...) to sprintf(char*, char*, ...)
llvm-svn: 5446
2003-01-30 22:38:44 +00:00
Chris Lattner
b9658793ee Fix bug: Assembler/2003-01-30-UnsignedString.ll
llvm-svn: 5445
2003-01-30 22:24:26 +00:00
Chris Lattner
0e59c67f69 Actually print the function _name_ if there is a problem
llvm-svn: 5443
2003-01-30 21:33:07 +00:00
Chris Lattner
f1f1b83cbe * Fix linking of opaque types and their non-opaque versions
* Fix bug: Linker/2003-01-30-LinkerTypeRename.ll

llvm-svn: 5441
2003-01-30 20:53:43 +00:00
Chris Lattner
f9ace7ffb1 Eliminate using decls
llvm-svn: 5439
2003-01-30 19:53:34 +00:00
Chris Lattner
70b2c322eb * Fix function resolution for varargs function to generate incorrect bytecode instead of crashing
* remove using decls
 CVS: ----------------------------------------------------------------------

llvm-svn: 5437
2003-01-30 18:22:32 +00:00
Chris Lattner
0ee7b79c71 Fix levelraise/2003-01-30-ShiftCrash.ll
llvm-svn: 5435
2003-01-30 17:10:41 +00:00
Chris Lattner
3c20e2c6d1 Initial checkin of pool allocation code
llvm-svn: 5432
2003-01-29 21:12:13 +00:00
Chris Lattner
91e3c1eeac Use and implement API for graph traversals
llvm-svn: 5431
2003-01-29 21:10:20 +00:00
Chris Lattner
649a63bd45 Fix build problem on sparc
llvm-svn: 5428
2003-01-29 18:15:34 +00:00
Chris Lattner
79997d01d7 Fix warnings on sparc
llvm-svn: 5427
2003-01-29 18:02:02 +00:00
Chris Lattner
712b3598b8 free instructions mark their operands as being heap nodes.
llvm-svn: 5425
2003-01-28 20:59:57 +00:00
Chris Lattner
19ad3aaf0a Disable construction of pool allocator
llvm-svn: 5422
2003-01-24 20:13:20 +00:00
Chris Lattner
77e422543e * Eliminate boolean arguments in favor of using enums
llvm-svn: 5420
2003-01-23 22:06:33 +00:00
Chris Lattner
f1afc156f8 * Eliminate boolean arguments in favor of using enums
* T-D pass now eliminates unreachable globals

llvm-svn: 5419
2003-01-23 22:05:33 +00:00
Chris Lattner
1c82a35a0b Slight efficiency improvement
llvm-svn: 5418
2003-01-23 21:31:16 +00:00
Chris Lattner
5db30d467a Fix bug: LevelRaise/2003-01-22-GEPProblem.ll
llvm-svn: 5407
2003-01-23 02:39:10 +00:00
Chris Lattner
7af7b1c82c Fix bug: ADCE/2003-01-22-PredecessorProblem.ll
llvm-svn: 5405
2003-01-23 02:12:18 +00:00
Chris Lattner
bd72aa79fc Fix analysis of the Burg program
llvm-svn: 5401
2003-01-22 22:00:24 +00:00
Chris Lattner
0d35f25ed7 Fix didn't fix the race condition in the makefiles
llvm-svn: 5394
2003-01-22 15:41:10 +00:00
Chris Lattner
5282326985 Don't keep track of # big vs #small instructions seperately
llvm-svn: 5385
2003-01-21 20:13:49 +00:00
Chris Lattner
7964483787 Fix race condition in Makefile
llvm-svn: 5380
2003-01-21 15:20:50 +00:00
Chris Lattner
1d35ac61ce Print machine frame objects with the frame offset intrinsic to the machine
llvm-svn: 5329
2003-01-16 18:35:57 +00:00
Chris Lattner
bf414ca145 Don't emit unneccesary branch instructions!
llvm-svn: 5328
2003-01-16 18:07:23 +00:00
Chris Lattner
0a6ac532e1 Fix problem with invalidated iterator
llvm-svn: 5327
2003-01-16 18:07:13 +00:00
Chris Lattner
3228091a65 Fix problems with empty basic blocks
llvm-svn: 5326
2003-01-16 18:06:43 +00:00
Chris Lattner
7455428f21 Implement optimization folding setcc into branch.
llvm-svn: 5324
2003-01-16 16:43:00 +00:00
Chris Lattner
8b4e7a511b Add more flavors of branch instructions
llvm-svn: 5323
2003-01-16 16:42:45 +00:00
Chris Lattner
76fc0fcfa5 Arg, fix bugs in previous checkin...
llvm-svn: 5322
2003-01-16 02:24:20 +00:00
Chris Lattner
ba0f68ad4a Add assertion
llvm-svn: 5321
2003-01-16 02:22:08 +00:00
Chris Lattner
013ad21206 Implement code to keep the stack pointer aligned to an 8 byte boundary.
This improves the performance of the power benchmark by a few percent.
This will be neccesary for SSE code, which requires 16 byte alignment of
the stack.

llvm-svn: 5320
2003-01-16 02:20:12 +00:00
Chris Lattner
df631471bf Handle frame offset due to return address pushed on the stack
llvm-svn: 5319
2003-01-15 22:57:35 +00:00
Chris Lattner
52c6c50212 * Insert prolog/epilog code before rewriting indexes
* Fix calculation of frame offsets when there is an offset.

llvm-svn: 5318
2003-01-15 22:52:34 +00:00
Chris Lattner
301e1307d2 Move sparc specific code into the Sparc backend
llvm-svn: 5317
2003-01-15 21:36:50 +00:00
Chris Lattner
e52cb68321 Fix warnings
llvm-svn: 5316
2003-01-15 21:36:30 +00:00
Chris Lattner
1af4454811 Adjust to simpler interfaces
Eliminate dependency on RegClass.h

llvm-svn: 5315
2003-01-15 21:14:32 +00:00
Chris Lattner
4846297632 Adjust to new interfaces
llvm-svn: 5314
2003-01-15 21:14:01 +00:00
Chris Lattner
7f6d496ab0 Move headers around
llvm-svn: 5312
2003-01-15 21:02:16 +00:00
Chris Lattner
53a41beb57 Header is moved into local directory
llvm-svn: 5311
2003-01-15 21:00:02 +00:00
Chris Lattner
ec5237b2fe Fix bug in previous checkin
llvm-svn: 5310
2003-01-15 20:32:15 +00:00
Chris Lattner
405c4eb45e Add new method
llvm-svn: 5309
2003-01-15 20:28:36 +00:00
Chris Lattner
e5a3e82de5 #include RegClass.h explicitly
llvm-svn: 5307
2003-01-15 19:57:07 +00:00
Chris Lattner
c5e832b829 Remvoe dependency on RegClass.h
llvm-svn: 5306
2003-01-15 19:56:21 +00:00
Chris Lattner
01fcbebadc Move private header to private directory
llvm-svn: 5305
2003-01-15 19:50:44 +00:00
Chris Lattner
760b144cf9 Prune #includes
llvm-svn: 5303
2003-01-15 19:48:13 +00:00