Commit Graph

44 Commits

Author SHA1 Message Date
Chris Lattner 4f2cf030e8 'Pass' should now not be derived from by clients. Instead, they should derive
from ModulePass.  Instead of implementing Pass::run, then should implement
ModulePass::runOnModule.

llvm-svn: 16436
2004-09-20 04:48:05 +00:00
Reid Spencer 7c16caa336 Changes For Bug 352
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.

llvm-svn: 16137
2004-09-01 22:55:40 +00:00
Brian Gaeke 7f00753f70 Previous checkin broke printf(%a) support for fp constants-- re-fix it.
llvm-svn: 16051
2004-08-25 19:37:26 +00:00
Brian Gaeke 35eb7aeae3 New version of Bill Wendling's PR33 patch.
llvm-svn: 16050
2004-08-25 19:00:42 +00:00
Chris Lattner 1d787355e7 Paper over CBackend/2004-08-09-va-end-null.ll
Note that this indicates a serious problem with the way we are emitting varargs,
but this should not be properly fixed until after 1.3.

This patch SHOULD go into 1.3.

llvm-svn: 15602
2004-08-10 00:19:16 +00:00
Chris Lattner 21a015c12f Temporarily disable this code, as it is emitting LLVM_NAN("nan") which results in a call to the
glibc 'nan' function because the initializer is not a string.  This breaks when used in a global
initializer.  Try compiling this testcase for example:

%X = global float <some nan value>

llvm-svn: 15223
2004-07-25 22:36:35 +00:00
Brian Gaeke 1dde3fa94f Emit NaNs and INFs bit-identically to the bytecode file, if the system has
printf("%a") support.
Patch contributed by Bill Wendling.

llvm-svn: 15056
2004-07-21 03:15:26 +00:00
Reid Spencer cb3fb5d4f5 bug 122:
- Replace ConstantPointerRef usage with GlobalValue usage

llvm-svn: 14953
2004-07-18 00:44:37 +00:00
Chris Lattner 7dc9de5f43 Patches towards fixing PR341
llvm-svn: 14841
2004-07-15 02:14:30 +00:00
Misha Brukman 9dacda651f Apple's MacOS X is another OS which does not provide alloca() via <alloca.h>
llvm-svn: 14781
2004-07-12 23:37:18 +00:00
Chris Lattner 2beb4392cf Delete the allocate*TargetMachine function, which is now dead .
llvm-svn: 14755
2004-07-11 04:16:31 +00:00
Chris Lattner 73eb9436ee Make these format a bit nicer
llvm-svn: 14747
2004-07-11 03:27:42 +00:00
Chris Lattner 4266f8017d Auto-registrate target
llvm-svn: 14745
2004-07-11 02:48:49 +00:00
Reid Spencer eb04d9bcb4 Add #include <iostream> since Value.h does not #include it any more.
llvm-svn: 14622
2004-07-04 12:19:56 +00:00
Chris Lattner bcdadf3765 Move the IntrinsicLowering header into the CodeGen directory, as per PR346
llvm-svn: 14266
2004-06-20 07:49:54 +00:00
Chris Lattner 6b7275996c Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()
llvm-svn: 14201
2004-06-17 18:19:28 +00:00
Chris Lattner 4f816d2e38 <alloca.h> on cygwin pulls in a ton of stuff (macros and function protos)
that we REALLY don't want in the CBE code.

With this fix, the CBE passes all of the MultiSource tests on cygwin that
it does on linux.  Yaay!

llvm-svn: 13975
2004-06-02 23:10:26 +00:00
Chris Lattner 535e8db0da Stubs are no longer needed
llvm-svn: 13951
2004-06-02 05:53:52 +00:00
Chris Lattner c53c2a3a62 Fix the big regression that has been killing the nightly tester these last
few days.  Apparently the old symbol table used to auto rename collisions in
the type symbol table and the new one does not.  It doesn't really make sense
for the new one to do so, so we just make the client do it.

llvm-svn: 13877
2004-05-28 05:47:27 +00:00
Chris Lattner c7e2ff2980 Minor changes. Switch to a SymbolTable remove that does not take linear time
llvm-svn: 13874
2004-05-28 05:30:51 +00:00
Chris Lattner 83d067a103 Fix PR344: the incorrect remove was being used.
llvm-svn: 13790
2004-05-26 17:20:52 +00:00
Reid Spencer e7e9671cad Convert to SymbolTable's new iteration interface.
llvm-svn: 13754
2004-05-25 08:53:40 +00:00
Chris Lattner 6e4edd65ab Add support for accurate garbage collection to the LLVM code generators
llvm-svn: 13696
2004-05-23 21:23:35 +00:00
Chris Lattner 83c139d575 Fix to make the CBE always emit comparisons inline. Hopefully this will
fix the really bad code we're getting on PPC.

llvm-svn: 13609
2004-05-20 20:25:50 +00:00
Chris Lattner f719a52088 syntactically loopify natural loops so that the GCC loop optimizer can find them. This should *dramatically* improve the performance of CBE compiled code on targets that depend on GCC's loop optimizations (like PPC)
llvm-svn: 13438
2004-05-09 20:41:32 +00:00
Chris Lattner 87d036caf2 Do not emit prototypes for setjmp/longjmp, as they are handled specially
llvm-svn: 13437
2004-05-09 16:03:29 +00:00
Chris Lattner 9c29991970 Make the floating point constant pools local to each function, split the
FindUsedTypes manipulation stuff out to be a seperate pass, and make the
main CWriter be a function pass now!

llvm-svn: 13435
2004-05-09 06:20:51 +00:00
Chris Lattner 14d328e2a5 Get this looking more like a function pass.
llvm-svn: 13433
2004-05-09 04:30:20 +00:00
Chris Lattner 2484a6336f Print all PHI copies for successor blocks before the terminator, whether it be a conditional branch or switch.
llvm-svn: 13430
2004-05-09 03:42:48 +00:00
Chris Lattner 2d3a7a6ff0 Changes to fix up the inst_iterator to pass to boost iterator checks. This
patch was graciously contributed by Vladimir Prus.

llvm-svn: 13185
2004-04-27 15:13:33 +00:00
Chris Lattner b28dd11e33 Add support for select constant expressions to the CBE, fixing SIOD
llvm-svn: 12589
2004-04-01 05:28:26 +00:00
Chris Lattner 071a5e5649 Rename the intrinsic enum values for llvm.va_* from Intrinsic::va_* to
Intrinsic::va*.  This avoid conflicting with macros in the stdlib.h file.

llvm-svn: 12356
2004-03-13 00:24:00 +00:00
Chris Lattner 65a64e1e7a ADd support for select instructions
llvm-svn: 12316
2004-03-12 05:52:14 +00:00
Chris Lattner 93e9878c2c SPECIFY a target data to initialize the CBE target with. Until now we have
been using the default target data layout object to lower malloc instructions,
causing us to allocate more memory than we needed!  This could improve the
performance of the CBE generated code substantially!

llvm-svn: 12088
2004-03-03 02:14:15 +00:00
Brian Gaeke 427cec1395 TargetCacheInfo has been removed; its only uses were to propagate a constant
(16) into certain areas of the SPARC V9 back-end. I'm fairly sure the US IIIi's
dcache has 32-byte lines, so I'm not sure where the 16 came from. However, in
the interest of not breaking things any more than they already are, I'm going
to leave the constant alone.

llvm-svn: 12043
2004-03-01 06:43:29 +00:00
John Criswell feb7c49ce4 Fixes for PR258 and PR259.
Functions with linkonce linkage are declared with weak linkage.
Global floating point constants used to represent unprintable values
(such as NaN and infinity) are declared static so that they don't interfere
with other CBE generated translation units.

llvm-svn: 11884
2004-02-26 22:20:58 +00:00
Chris Lattner b471f0188f Fix some unexpected fallout from the config.h changes. Because the CBE no
longer was getting this #include, it always fell back on the less precise
floating point initializer values, causing some testsuite failures.

llvm-svn: 11803
2004-02-24 18:34:10 +00:00
Chris Lattner 73ffc88a8b It is totally unacceptable to print out (literally) millions of zeros when
compiling 129.compress... so don't!

llvm-svn: 11649
2004-02-20 05:49:22 +00:00
Chris Lattner a95bd44282 Now that the lowerinvoke pass inserts calls to llvm.setjmp/llvm.longjmp, some
hacks can be banished.  Also, this gives us the opportunity to emit special code
for the setjmp/longjmps which alows the elimination of one GCC warning for every
setjmp/longjmp site (which is often THOUSANDS in C++ programs).  Yaay!

llvm-svn: 11484
2004-02-15 22:51:47 +00:00
Chris Lattner 7bea8084e0 Add support for the new ConstantAggregateZero class
llvm-svn: 11473
2004-02-15 05:54:27 +00:00
Chris Lattner f7c1088a36 Add support for the returnaddress and frameaddress intrinsics
llvm-svn: 11433
2004-02-14 02:55:36 +00:00
Chris Lattner 0997f207c2 Use intrinsic lowering like the rest of the backends. Get rid of crufty hacky
code that worked around problems in the mangler

llvm-svn: 11426
2004-02-14 00:31:10 +00:00
Chris Lattner 768fa7d206 Moved directory, update makefile
llvm-svn: 11417
2004-02-13 23:31:12 +00:00
Chris Lattner 1f9c6eb358 CBackend now lives here
llvm-svn: 11415
2004-02-13 23:29:20 +00:00