Commit Graph

3310 Commits

Author SHA1 Message Date
Chris Lattner
d7916e988c switch main LLI core execution to use an InstVisitor instead of a switch statement
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6081 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-10 21:22:39 +00:00
Chris Lattner
77113b6272 Fix testcase: SingleSource/UnitTests/2003-05-02-DependantPHI.c
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6074 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-10 20:21:16 +00:00
Chris Lattner
f205fec78a 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6067 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-09 20:05:44 +00:00
Chris Lattner
6125fddb52 Add support for function stubs, which allow calling functions which need to
have an address available, but have not yet been code generated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6059 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-09 03:30:07 +00:00
Chris Lattner
992ab561f0 This blank line has GOT to go.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6057 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-09 03:28:13 +00:00
Chris Lattner
e0e72177c0 Allow const functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6056 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-09 03:27:41 +00:00
Chris Lattner
fd33fb8726 Add methods for stub function generation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6054 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-08 21:54:18 +00:00
Chris Lattner
eb5a93b86b Minor speedup by avoiding callbacks to functions already generated
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6052 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-08 21:44:21 +00:00
Chris Lattner
c309a7627c Improve efficiency of JIT by having it use direct function calls instead of
signals to regain control from the executing code


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6051 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-08 21:34:11 +00:00
Chris Lattner
66a8494e98 assert early instead of late for unimplemented feature
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6050 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-08 21:08:43 +00:00
Chris Lattner
b515f6d2c8 Add support for Add, Sub, And, Or, & Xor constant exprs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6049 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-08 20:49:25 +00:00
Chris Lattner
eca195e7b4 Add support for variable argument functions!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6046 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-08 19:44:13 +00:00
Chris Lattner
18ac3c8914 Add support for variable argument functions!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6044 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-08 18:41:45 +00:00
Chris Lattner
374344c0cc Implement varargs support for LLI!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6043 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-08 16:52:43 +00:00
Chris Lattner
f88b9a6397 Add a pointersize/endianness safe load routine to match the store routine
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6042 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-08 16:52:16 +00:00
Chris Lattner
da82ed52ac A large number of simple changes:
* s/Method/Function
  * Kill some obsolete (external) functions that used to be to support tracing


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6041 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-08 16:18:31 +00:00
Chris Lattner
cdf5178f83 Add support for recording arguments passed through the ... of a varargs function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6040 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-08 16:06:52 +00:00
Chris Lattner
27aa094f57 llvm.va_start only takes on argument now
Verify that va_start doesn't occur in functions with no varargs


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6038 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-08 15:55:31 +00:00
Chris Lattner
dd035d188a Add more support for intrinsic functions and for varargs stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6035 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-08 03:47:33 +00:00
Chris Lattner
1d16ec7381 Handle va_arg instruction correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6030 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-08 02:50:13 +00:00
Chris Lattner
8f77daef04 Add support for the new va_arg instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6029 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-08 02:44:12 +00:00
Chris Lattner
8d8f20e47a Don't inline functions that take variable numbers of arguments!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6024 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-08 02:36:43 +00:00
Chris Lattner
1b27cb7159 Remove using decl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6023 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-08 02:34:52 +00:00
Chris Lattner
7b13f56c36 Remove using declarations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6022 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-08 02:08:14 +00:00
Misha Brukman
fd6b30ec89 Added the initial version of the TableGen description for the Sparc backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6021 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-07 21:52:39 +00:00
Chris Lattner
b2abb5a586 Fix bug: Jello/2003-05-07-ArgumentTest.llx
Also fixes yacr2/ks benchmarks


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6017 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-07 20:31:37 +00:00
Chris Lattner
5cdfbad72d Add a vector to keep track of which registers are allocatable. Remove FIXMEs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6015 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-07 20:08:36 +00:00
Chris Lattner
c248903b2a IMPLICIT_DEF was not the beautiful elegant solution I thought it was going
to be.  In fact, it made stuff worse.  :(


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6013 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-07 19:21:28 +00:00
Chris Lattner
dff780f046 Re-add gross hack, it's still necessary. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6012 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-06 21:44:54 +00:00
Chris Lattner
82a4d207aa Remove hideously nasty hack
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6011 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-06 21:32:39 +00:00
Chris Lattner
dbd7372665 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6010 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-06 21:32:22 +00:00
Chris Lattner
9dedbcc3d5 Don't have a cow with new pseudo instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6009 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-06 21:31:47 +00:00
Chris Lattner
eab49345cb Add two new pseudo instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6008 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-06 21:31:31 +00:00
Misha Brukman
15b55e20cc Debug output should go to cerr, not cout, because that's where bytecode goes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6002 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-04 22:51:30 +00:00
Chris Lattner
84e6665570 Fix bug: UnitTests/2003-05-02-DependantPHI.c
Fix testcase MultiSource/Ptrdist-ks


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6000 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-03 07:11:00 +00:00
Chris Lattner
577385edd8 Fix miscompilation in Fhourstones and bug: LICM/2003-05-02-LoadHoist.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5994 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-03 03:42:08 +00:00
Chris Lattner
edd8ce1370 * Eliminate using decls
* Fix some styleistic things
* Fix bug: CWriter/2002-05-16-NameCollide.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5988 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-03 03:14:35 +00:00
Misha Brukman
48196b3813 The Hyphenation-Adding Committee is now in session.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5986 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-03 02:18:17 +00:00
Chris Lattner
2d399096cf Attempt to fix sumant's typesafety issue
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5984 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-02 19:32:04 +00:00
Chris Lattner
e96fda3002 Fix spelling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5983 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-02 19:26:34 +00:00
Chris Lattner
b589bf7d77 Fix a bug which occurred with empty basic blocks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5982 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-02 18:44:42 +00:00
Chris Lattner
20af3222da Fix Bug: LowerSwitch/2003-05-01-PHIProblem.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5979 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-01 22:21:21 +00:00
Chris Lattner
f98358efc7 Minor cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5976 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-01 21:18:47 +00:00
Chris Lattner
cdeb81d412 Fix bug: LevelRaise/2003-05-01-CallCast.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5975 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-01 21:02:53 +00:00
Chris Lattner
5ff7ef5396 Eliminate use of NonCopyable so that doxygen documentation doesn't link
the Annotation classes with the noncopyable classes for no reason


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5973 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-01 20:28:45 +00:00
Chris Lattner
3f2ec3925f Fix another case where constexprs could cause a crash
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5972 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-30 22:34:06 +00:00
Chris Lattner
fe32e0c578 Fix constant folding of constexprs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5971 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-30 22:19:10 +00:00
Chris Lattner
95549281ec Create constant expression casts instead of constant instructions if possible
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5968 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-28 01:25:38 +00:00
Chris Lattner
1fd95afab3 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5967 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-28 01:23:29 +00:00
Chris Lattner
b53a198613 Avoid naming things exactly the same
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5966 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-27 22:55:56 +00:00
Chris Lattner
10daaa1416 Remove two fields from TargetData which are target specific.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5963 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-26 20:11:09 +00:00
Chris Lattner
37ec811409 The promotion rules are the same for all targets, they are set by the C standard.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5962 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-26 19:47:36 +00:00
Chris Lattner
7a5adc3ac0 IntegerRegSize is always 8 for sparc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5961 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-26 19:44:35 +00:00
Chris Lattner
99224aec78 Fix bug: LoopPreheaders/2003-04-25-AssertFail.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5959 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-26 19:34:18 +00:00
Chris Lattner
02a78cf7ea Fix a bug that occurred when removing the last predecessor INTO an
infinite loop


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5953 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 23:14:19 +00:00
Chris Lattner
619f825640 Fix bug: ADCE/2003-04-25-PHIPostDominateProblem.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5952 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 22:53:27 +00:00
Chris Lattner
8bdd129c8a Fix bogus assert
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5949 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 21:58:54 +00:00
Chris Lattner
b8fdd8ba61 Fix bug: Assembler/2003-04-25-UnresolvedGlobalReference.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5948 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 21:47:33 +00:00
Chris Lattner
7471c486c0 Only do the %ld -> %lld promotion when running a 64 bit bytecode on a 32 bit host
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5942 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 18:28:44 +00:00
Chris Lattner
c8cff9e643 Add __strdup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5941 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 18:23:38 +00:00
Chris Lattner
807b7055b2 Fix BasicAA/2003-04-25-GEPCrash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5940 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 18:03:06 +00:00
Chris Lattner
6b73fec0ce MAke sure that LLI properly configures align_of(double)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5938 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 06:15:05 +00:00
Chris Lattner
dd7253cc9f Whoops, 32 bit targets have _4_ byte pointers, not _32_ byte pointers!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5937 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 06:06:43 +00:00
Chris Lattner
98938f83d5 Fix compatibility bug: X86 aligns doubles to 4 bytes, not 8!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5935 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 06:05:57 +00:00
Chris Lattner
4deaf3b5c0 Fix obvious type-o
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5932 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 05:23:10 +00:00
Chris Lattner
d5bc41a249 Fix problem where we would read 64 bits worth of pointer information, even on 32 bit targets!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5930 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 04:21:19 +00:00
Chris Lattner
bceb2b0061 Fix major problem with PHI node traversal: rechecking PHIs should go into
the visit function.  The worklist is for when their lattice value changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5927 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 03:35:10 +00:00
Chris Lattner
6cf4cb90a0 ** CORRECTLY, conservatively handle constant expressions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5924 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 02:52:06 +00:00
Chris Lattner
eca8e8f111 *** Huge: Make constantexprs be handled correctly, conservatively
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5923 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 02:51:46 +00:00
Chris Lattner
46326d9cdf Allow for easy detection of when a "default" TargetData is created by the
passmanager, which is never the right thing to do.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5922 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 02:50:45 +00:00
Chris Lattner
9de28289f8 Minor non-functional changes:
* Spell propagate right
  * Improve performance of phi node handling
  * Delete using directive
  * Other minor changes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5920 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 02:50:03 +00:00
Chris Lattner
c8789cb40b Fix bug: mem2reg/2003-04-24-MultipleIdenticalSuccessors.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5919 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 00:54:58 +00:00
Chris Lattner
a172846d3a 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!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5906 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 20:07:38 +00:00
Chris Lattner
53a0c38b5f add a new targetdata ctor to create a target data appropriate to the module
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5903 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 19:09:05 +00:00
Chris Lattner
ec8aae3e11 Trivial cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5899 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 18:35:51 +00:00
Chris Lattner
16125fb749 Make the levelraise pass be well behaved w.r.t the TargetData that the current
PassMAnager provides.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5896 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 18:25:27 +00:00
Chris Lattner
ad80a46caa Fix iterator invalidation problem
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5895 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 17:52:20 +00:00
Chris Lattner
892310eaff Make sure that the cloned module retains the type symbol table entries!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5894 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 17:15:33 +00:00
Chris Lattner
7899b74fdb Make sure to preserve endiannes and pointer size when cloning modules!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5892 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 15:54:40 +00:00
Chris Lattner
2be50797a1 Fix bug where pointers were assumed to always be 64 bits in size!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5890 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23 20:41:01 +00:00
Chris Lattner
5f311a7bce Add memcpy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5887 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23 20:23:16 +00:00
Chris Lattner
fd506f551d Fix a problem with setcc instructions and pointers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5886 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23 19:55:35 +00:00
Chris Lattner
957d62aa79 Implement a bunch of new external functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5885 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23 19:55:24 +00:00
Chris Lattner
669b76ae87 Implement &|^ on bool values
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5884 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23 19:21:00 +00:00
Chris Lattner
f87a198dcb Add support for _IO_getc function used on linux
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5883 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23 19:20:50 +00:00
Chris Lattner
f1acd9623c Fix problem where labels were being incorrectly elided, and fix problem
where PHI copies where not emitted for the default label of switch insts


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5882 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23 19:15:13 +00:00
Chris Lattner
f5612b76bc Fix the super obnoxious "cast to pointer from integer of different size" warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5881 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23 19:09:22 +00:00
Chris Lattner
d8c03bfa0a * Implement access to external variables in LLI
* Implement GetElementPtr constant expressions when initializing global variables


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5880 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23 19:01:49 +00:00
Chris Lattner
c2b97d43a0 Fix Bug: Linker/2003-04-23-LinkOnceLost.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5879 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23 18:38:39 +00:00
Chris Lattner
3907d11200 Fix iterator invalidation problem with cast instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5876 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23 17:57:48 +00:00
Chris Lattner
548f61d66a Implement the constantexpr CAST instruction correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5875 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23 17:22:12 +00:00
Chris Lattner
cf31784c69 We now need to link libscalar to get the switch lowering pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5874 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23 16:43:02 +00:00
Chris Lattner
e408e25132 Remove unnecesary &*'s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5872 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23 16:37:45 +00:00
Chris Lattner
2ee82e05e3 Remove unneccesary &*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5871 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23 16:36:11 +00:00
Chris Lattner
155e68feea Add support for the Switch instruction by running the lowerSwitch pass first
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5867 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23 16:24:55 +00:00
Chris Lattner
14383485ac New pass to lower switch instructions to branch instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5865 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23 16:23:59 +00:00
Chris Lattner
350c0a8216 Minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5863 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23 16:18:14 +00:00
Misha Brukman
09ff1509ba Fixed 'prevalent'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5860 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23 02:59:05 +00:00
Misha Brukman
63e04f3ccb Just some code beautification changes I had sitting around in my tree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5859 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-22 23:00:08 +00:00
Chris Lattner
b581148bd9 Fix bug: BasicAA/2003-04-22-GEPProblem.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5858 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-22 22:00:27 +00:00
Chris Lattner
0286835685 Kill using declarations
Kill code for invalid operations on pointers


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5856 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-22 21:22:33 +00:00
Chris Lattner
5bff50d1b0 Implement cast to bool
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5855 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-22 21:15:56 +00:00
Chris Lattner
b945e4ddae Get rid of extraneous arguments to implementation functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5852 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-22 20:37:39 +00:00
Chris Lattner
09e9392d63 Add support to LLI for switch instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5851 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-22 20:34:47 +00:00
Chris Lattner
7a5a1f790f Use a union to cast int to fp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5849 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-22 20:20:28 +00:00
Misha Brukman
8829dcd15b It's "necessary"...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5848 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-22 20:20:11 +00:00
Chris Lattner
a9f5e0517e Add support for the switch instruction to the CWriter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5847 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-22 20:19:52 +00:00
Chris Lattner
43a9994c01 Add warning when linking modules with disagreeing target properties
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5845 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-22 19:13:20 +00:00
Chris Lattner
61a909a6fd Emit information about target
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5844 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-22 19:07:19 +00:00
Chris Lattner
b9bcbb533f Allow information about the target to be specified in the .ll file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5843 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-22 19:07:06 +00:00
Chris Lattner
9232b99461 Namespacify
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5840 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-22 18:42:41 +00:00
Chris Lattner
76e3896881 Add support for reading and writing pointersize/endianness to and from bytecode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5839 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-22 18:15:10 +00:00
Chris Lattner
75f20532ec Preserve module source information in the ModuleID
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5836 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-22 18:02:52 +00:00
Chris Lattner
37f59419b8 Preserve the new moduleID field
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5835 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-22 18:02:26 +00:00
Chris Lattner
678c6a089d 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5834 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-22 18:02:04 +00:00
Misha Brukman
baf0607cbc It's "necessary" to spell "necessarily" correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5833 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-22 17:54:23 +00:00
Chris Lattner
59ee0eeffd Make stderr, stdout, stdin work with LLI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5832 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-21 22:44:36 +00:00
Chris Lattner
04e2ad76f8 Fix wierd idiom
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5831 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-21 22:43:32 +00:00
Chris Lattner
9dbf6dddce fprintf CAN take exactly 2 args
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5830 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-21 22:43:20 +00:00
Chris Lattner
4b12cdec01 Add support for a simple constantexpr: cast of one ptr type to another
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5829 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-21 21:33:44 +00:00
Chris Lattner
2719bac905 Fix bug: 2003-01-30-LinkerRename.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5828 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-21 21:15:04 +00:00
Chris Lattner
0fec08eb58 Fix linking a function with qualifiers to a external function declaration:
Fixed bug: Linker/2003-04-21-Linkage.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5827 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-21 21:07:05 +00:00
Chris Lattner
085c801dee Fix bug where use still existed in dead code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5824 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-21 19:15:26 +00:00
Chris Lattner
968cfd0b6e Initial support for reading standard .a files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5820 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-19 21:45:34 +00:00
Chris Lattner
f6099df194 Add support for reading unaligned bytecode buffers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5819 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-19 21:45:17 +00:00
Chris Lattner
14e8e29105 Remove arbitrary limitation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5818 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-19 00:50:37 +00:00
Chris Lattner
ea2294a498 Implement: FunctionResolve/2003-04-18-ForwardDeclGlobal.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5816 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-19 00:15:27 +00:00
Chris Lattner
393689afa9 Fix bug: Mem2reg/2003-04-18-DeadBlockProblem.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5810 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-18 19:25:22 +00:00
Chris Lattner
156bcf3f65 Global constants CAN be external
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5808 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-18 04:34:29 +00:00
Chris Lattner
869de25380 Fix a big bad bug I checked in yesterday :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5807 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-18 04:11:56 +00:00
Chris Lattner
17d145d26f Refactor CloneFunction to expose the new CloneBasicBlock function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5806 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-18 03:50:09 +00:00
Chris Lattner
15faa8498c New const_cast instead of c style cast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5805 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-18 03:49:49 +00:00
Chris Lattner
3e8ba10750 Allow hexadecimal integer constants to be used
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5802 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-17 22:17:32 +00:00
Chris Lattner
d628f6a9a4 Don't build constantexprs that could be folded
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5801 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-17 19:24:48 +00:00
Chris Lattner
27287de06b 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5800 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-17 19:24:18 +00:00
Chris Lattner
fd73cf895c Don't force a ConstantPointer to be returned
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5799 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-17 19:22:47 +00:00
Chris Lattner
ac7ad68cc0 Fix bug: IndVarSimplify/2003-04-16-ExprAnalysis.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5795 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-16 22:50:19 +00:00
Chris Lattner
fb242b6edc Change the interface to constant expressions to allow automatic folding
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5793 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-16 22:40:51 +00:00
Chris Lattner
e3869c83e7 Add support to the bytecode reader/writer for the new linkage types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5790 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-16 21:16:05 +00:00
Chris Lattner
5399741622 Add code to verify correctly linkages
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5788 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-16 20:42:40 +00:00
Chris Lattner
4ad02e726d Add new linkage types to support a real frontend
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5786 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-16 20:28:45 +00:00
Chris Lattner
ffd9bf404c Improve the efficiency and cleanup writing a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5782 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-16 20:20:02 +00:00
Chris Lattner
1f862af473 Don't allow declaring an external internal variable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5781 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-16 18:13:57 +00:00
Chris Lattner
af76d0ea0b Fix bug: Assember2003-04-15-ConstantInitAssertion.llx
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5777 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-15 16:09:31 +00:00
Chris Lattner
af7ccd9bba Make help message more clear
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5775 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-13 03:50:14 +00:00
Chris Lattner
d4bd3eba5d * 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5771 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-10 19:41:13 +00:00
Misha Brukman
2c821cc06e 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5769 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-10 19:19:23 +00:00
Misha Brukman
8baa01c1d7 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5768 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-09 21:51:34 +00:00
Guochun Shi
6fbe5fbce1 change the include file names and some class names to make it compile
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5764 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-06 23:56:19 +00:00
Chris Lattner
f9a88b684d Implement scanf and fix sscanf to actually endian swap the results correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5763 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-31 22:12:37 +00:00