1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

608 Commits

Author SHA1 Message Date
Reid Spencer
931386421e For PR950:
Update for signless integer types and parameter attribute implementation.
Of significant note:
  1. This changes the bytecode format yet again.
  2. There are 1/2 as many integer type planes (this is a good thing)
  3. GEP indices now use only 1 bit to identify their type which means
     more GEP instructions won't be relegated to format 0 (size win)
  4. Parameter attributes are implemented but currently being stored
     verbosely for each function type. Some other day this needs to be
     optimized for size.

llvm-svn: 32783
2006-12-31 05:44:24 +00:00
Chris Lattner
dfbfc21795 switch statistics over to not use static ctors.
llvm-svn: 32709
2006-12-19 23:16:47 +00:00
Bill Wendling
5b534cf128 This snuck in. Reverted.
llvm-svn: 32638
2006-12-17 11:11:10 +00:00
Bill Wendling
7f6a73eb5c Added an automatic cast to "std::ostream*" etc. from OStream. We then can
rework the hacks that had us passing OStream in. We pass in std::ostream*
instead, check for null, and then dispatch to the correct print() method.

llvm-svn: 32636
2006-12-17 05:15:13 +00:00
Reid Spencer
40691d741a Remove an extraneous { at the end of a block.
llvm-svn: 32613
2006-12-15 21:46:37 +00:00
Reid Spencer
4edcae5076 Fix long standing issue with propagating error message back to caller. This
has been a problem since exceptions were removed from the BytecodeReader.
Error messages are now captured from ModuleProvider::releaseModule as well
as after a longjmp.

llvm-svn: 32608
2006-12-15 19:49:23 +00:00
Reid Spencer
d752b2b528 For PR1050:
Convert asserts into error messages.

llvm-svn: 32607
2006-12-15 19:44:51 +00:00
Reid Spencer
0ed6e66cf3 Create the cast constant expression that was read instead of attempting
to infer the cast from its operand and type. This fixes:
test/Regression/Bytecode/2006-12-11-Cast-ConstExpr.ll

llvm-svn: 32450
2006-12-11 23:20:20 +00:00
Andrew Lenharth
d115fe7ce3 Packed Structures
llvm-svn: 32361
2006-12-08 18:06:16 +00:00
Bill Wendling
4d1444725b Removed more <iostream> includes
llvm-svn: 32321
2006-12-07 20:28:15 +00:00
Bill Wendling
a3246c4272 Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, are
now cerr, cout, and NullStream resp.

llvm-svn: 32298
2006-12-07 01:30:32 +00:00
Chris Lattner
a531ce882e Detemplatize the Statistic class. The only type it is instantiated with
is 'unsigned'.

llvm-svn: 32279
2006-12-06 17:46:33 +00:00
Reid Spencer
3e2d6cd0d1 Fix a CmpInst writing bug by removing merge cruft that I *know* I've removed
before. Also, make sure we write the predicate value for Cmp instructions
using instruction format 0.

llvm-svn: 32253
2006-12-06 04:27:07 +00:00
Reid Spencer
ccdc1ac3a7 For PR950: Implement read/write of ICmp and FCmp constant expressions
llvm-svn: 32172
2006-12-04 05:23:49 +00:00
Reid Spencer
41583e85cb Support ICmp/FCmp constant expression reading and writing.
llvm-svn: 32160
2006-12-03 17:17:02 +00:00
Reid Spencer
7a449dd20b Implement reading and writing of the ICmp and FCmp instructions.
llvm-svn: 32149
2006-12-03 06:28:54 +00:00
Reid Spencer
5f687b7190 Remove backwards compatibility goop. This is now handled by llvm-upgrade.
llvm-svn: 32146
2006-12-03 05:47:10 +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
c942df4921 Use ostream instead of iostream
llvm-svn: 31986
2006-11-28 22:49:32 +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
c7a1e60e44 Have ConstantExprs upgrade opcodes the same way as instructions.
llvm-svn: 31841
2006-11-18 04:37:19 +00:00
Reid Spencer
f65a8539ec Discard code that supported old bytecode formats. This makes the Bytecode
Reader code much easier to read and maintain. Backwards compatibility from
version 5 format has been retained. Older formats will produce an error.

llvm-svn: 31723
2006-11-14 04:47:22 +00:00
Reid Spencer
72bcd0530b For PR998:
Fix an infinite loop in the Linker and a few other assorted link problems.

Patch contributed by Scott Michel. Thanks, Scott!

llvm-svn: 31680
2006-11-11 11:54:25 +00:00
Reid Spencer
972e7d7995 Bump the bytecode version number to 7. Implement upgrade of version 6 and
version 6 bytecode.

llvm-svn: 31573
2006-11-08 21:27:54 +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
Reid Spencer
52135336f2 Remove some dead code.
llvm-svn: 31401
2006-11-03 01:44:51 +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
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
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
Chris Lattner
08684eac36 Fix massive resource leaks in the bytecode reader. Reading a bytecode file
with ParseBytecodeFile used to leak both a ModuleProvider (and related
bytecode parser stuff attached to it) AND a file descriptor, which was
never closed.  This prevented gccld/llvm-ld/llvm-link from linking together
apps with more that ~252 .bc files on darwin.

llvm-svn: 30912
2006-10-12 18:32:30 +00:00
Anton Korobeynikov
b2b7c2f8b9 Small fixes for supporting dll* linkage types
llvm-svn: 30441
2006-09-17 13:06:18 +00:00
Anton Korobeynikov
6e19f80688 Adding dllimport, dllexport and external weak linkage types.
DLL* linkages got full (I hope) codegeneration support in C & both x86
assembler backends.
External weak linkage added for future use, we don't provide any
codegeneration, etc. support for it.

llvm-svn: 30374
2006-09-14 18:23:27 +00:00
Anton Korobeynikov
1c7d8613c4 - Fixed broken Win32 build
- Removed warning about clobbered parameter in Bytecode/Reader

llvm-svn: 30026
2006-09-01 20:35:17 +00:00
Reid Spencer
e2b7b29a82 For PR797:
Final commit for this bug. This removes the last EH holdouts in LLVM
and turns off exception support by using the -fno-exceptions option. This
leads to the following reduction in library and executable sizes:
                DEBUG BUILD                RELEASE BUILD
         before     after   delta     before   after    delta
lib    162,328K  157,616K   4,712    17,864K  16,416K  1,448K
bin    571,444K  557,156K  14,288    63,296K   56,996K 6,300K

Debug   Improvement: 19,000K (2.59%)
Release Improvement:  7,748K (9.55%)

llvm-svn: 29882
2006-08-25 19:54:53 +00:00
Reid Spencer
741140980f For PR797:
Remove exception throwing/handling from lib/Bytecode, and adjust its users
to compensate for changes in the interface.

llvm-svn: 29875
2006-08-25 17:43:11 +00:00
Reid Spencer
d813eae003 For PR797:
Remove exception handling from the bytecode archiver and adjust the llvm-ar
tool to accommodate the new interfaces.

llvm-svn: 29866
2006-08-24 23:45:08 +00:00
Reid Spencer
bc4c8e8ac0 For PR797:
Eliminate exception throwing from Path::renamePathOnDisk and adjust its
users correspondingly.

llvm-svn: 29843
2006-08-23 07:30:48 +00:00
Reid Spencer
baf54399e7 For PR797:
Remove exceptions from the Path::create*OnDisk methods. Update their users
to handle error messages via arguments and result codes.

llvm-svn: 29840
2006-08-23 00:39:35 +00:00
Reid Spencer
c9c2bf5af1 Inverse the error check logic for the MappedFile::map() call. It returns
a null pointer when there is an error.

llvm-svn: 29827
2006-08-22 17:58:50 +00:00
Reid Spencer
2ee33a6305 For PR797:
Adjust the use of MappedFile to its new non-throwing interface. We just
propagate the exceptions if an error occurs. This will get cleaned up
later, incrementally.

llvm-svn: 29820
2006-08-22 16:10:12 +00:00
Reid Spencer
d00c37651a For PR797:
Make the Bytecode Reader use setjmp/longjump instead of exceptions to handle
errors. The alternative was even uglier than setjmp/longjump as it would
impact the interface and workings of nearly every function in the reader.

llvm-svn: 29819
2006-08-22 16:09:19 +00:00
Reid Spencer
88b3207059 For PR797:
Adjust to new interface for MappedFile. Note that the new "throw"
statements will be removed later.

llvm-svn: 29818
2006-08-22 16:07:44 +00:00
Chris Lattner
d7873a0757 Modify Path::eraseFromDisk to not throw an exception.
llvm-svn: 29400
2006-07-28 22:29:50 +00:00
Chris Lattner
93ab0e8787 formatting cleanups
llvm-svn: 29396
2006-07-28 22:07:54 +00:00
Chris Lattner
f4c7ceebaf Change Path::getStatusInfo to return a boolean and error string on an error
instead of throwing an exception.  This reduces the amount of code that is
exposed to exceptions (e.g. FileUtilities), though it is clearly only one step
along the way.

llvm-svn: 29395
2006-07-28 22:03:44 +00:00
Chris Lattner
5f87e5d0cf Exceptions are thrown by and through this library.
llvm-svn: 29393
2006-07-28 22:00:24 +00:00
Reid Spencer
cb66ae964e Finish removal of EH usage from the Archive library. The REQUIRES_EH flag
in lib/Bytecode/Archive/Makefile is now removed. One small step closer to
a smaller LLVM.

llvm-svn: 29067
2006-07-07 20:56:50 +00:00
Reid Spencer
9f4deeabf4 Remove EH use from the Archive library and adjust its users accordingly.
llvm-svn: 29066
2006-07-07 19:09:14 +00:00
Chris Lattner
f898cccc07 These libs use EH info
llvm-svn: 29043
2006-07-07 16:44:31 +00:00