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

34 Commits

Author SHA1 Message Date
Reid Spencer
3ccf5596ee Generate the correct cast opcode for constant expressions.
llvm-svn: 32461
2006-12-12 01:31:37 +00:00
Chris Lattner
41c5ddb8cb make all llvm tools call llvm_shutdown when they exit, static'ify some stuff.
With this change, I can now move -stats to print when llvm_shutdown is called.

llvm-svn: 32250
2006-12-06 01:18:01 +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
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
2bda89b474 Make llvm2cpp -pedantic clean.
llvm-svn: 31389
2006-11-03 00:05:16 +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
f0241b0652 simplify code
llvm-svn: 30661
2006-09-28 23:24:48 +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
Chris Lattner
2da81d7d76 Use LINK_COMPONENTS to specify *components* to link against instead of
using USED_LIBS to specify *libraries* to link against.

llvm-svn: 30090
2006-09-04 05:59:09 +00:00
Reid Spencer
249b932022 Provide indentation of the generated program.
llvm-svn: 29678
2006-08-14 22:35:15 +00:00
Chris Lattner
9f5a13c5c0 Tools require EH for their top-level try blocks.
llvm-svn: 29035
2006-07-07 00:46:19 +00:00
Chris Lattner
c57664f49c Fix PR819, llvm2cpp should read .bc files, not .ll files.
llvm-svn: 29030
2006-07-06 23:48:57 +00:00
Chris Lattner
c55abf6f70 Change the verifier to never throw an exception. Instead verifyModule canoptionally return the string error, which is an easier api for clients touse anyway.
llvm-svn: 29017
2006-07-06 18:02:27 +00:00
Reid Spencer
b28a9eedd3 Actually add instructions to the list of defined values so it gets
recognized as such!  This prevents the CppWriter from treating every
operand as a forward reference and making a mess of the output.

llvm-svn: 28800
2006-06-15 16:09:59 +00:00
Reid Spencer
6919c1b53f Suppress -pedantic warnings about print("%a")
llvm-svn: 28650
2006-06-02 00:39:08 +00:00
Reid Spencer
af36a41a09 Teach CppWriter how to emit an inline (partial) function.
llvm-svn: 28645
2006-06-01 23:43:47 +00:00
Reid Spencer
4be70bcdc9 Restore default arguments for llvm2cpp back to health by declaring an
emitted variable to actually have a type (picky, picky, picky!)

llvm-svn: 28625
2006-06-01 07:24:29 +00:00
Reid Spencer
b2d478a52b Fix a bug where incorrect C++ was being emitted.
llvm-svn: 28615
2006-06-01 04:21:20 +00:00
Reid Spencer
94a443bb29 Use archive libraries instead of object files for VMCore, BCReader,
BCWriter, and bzip2 libraries. Adjust the various makefiles to accommodate
these changes. This was done to speed up link times.

llvm-svn: 28610
2006-06-01 01:30:27 +00:00
Andrew Lenharth
1ba06d364e fix utostr
llvm-svn: 28597
2006-05-31 20:18:56 +00:00
Reid Spencer
055e4e1fae Major reorganization and extension of the code. The diff on this will be a
mess as functions were moved around into a better ordering. The code was
extended to provide various -gen-* options to better control what the
generated output should be. Currently it is possible to generate entire
modules (three different ways), functions, global variables, and types.

llvm-svn: 28589
2006-05-31 17:31:38 +00:00
Reid Spencer
d5b51c6db3 Don't generate module definitions when the -fragment option is given.
llvm-svn: 28583
2006-05-31 04:43:19 +00:00
Reid Spencer
2a2457158d Fix more bugs. This version now passes all of the Feature test except for
a floating point conversion problem with NAN in intrinsics.ll. llvm2cpp
makes an attempt to provide the correct conversion, based on the
implementation in the CBackend writer, but it doesn't get NAN correct.

llvm-svn: 28568
2006-05-30 21:18:23 +00:00
Reid Spencer
d6d062ca7b Fix many small bugs in llvm2cpp. This patch gets llvm2cpp working with
everything except PHI nodes and one odd recurse/opaque type situation.
PHI nodes forward reference INSTRUCTIONS (aaaaaaaahhhhhhh!) :)

llvm-svn: 28554
2006-05-30 10:21:41 +00:00
Reid Spencer
605d7b0bcf First complete version of llvm2cpp that doesn't crash on any of the Feature
tests. The output in a few cases still doesn't compile, however.

llvm-svn: 28547
2006-05-30 03:43:49 +00:00
Reid Spencer
bf39add572 Next batch of implementation:
1. Get rid of old AsmWriter cruft that's not needed.
2. Implement several instructions. Enough to get by globalvars.ll and
   alignment.ll in the Feature test suite.
3. Handle constants properly (don't repeat definitions).
4. Make the output compatible with llvm-dis for diff purposes.

llvm-svn: 28541
2006-05-29 18:08:06 +00:00
Reid Spencer
a51c941d8a Fix file header comment.
llvm-svn: 28540
2006-05-29 18:06:28 +00:00
Reid Spencer
d526d5be09 Remove temporary testing rules.
llvm-svn: 28539
2006-05-29 18:05:59 +00:00
Reid Spencer
631bd45185 Fix two bugs in the CppWriter.cpp:
1. Return the module from the MakeModule function so it can be verified.
2. Make sure types get generated with their names

llvm-svn: 28536
2006-05-29 02:58:15 +00:00
Reid Spencer
2bd5cd1602 Fix the file's comment block.
llvm-svn: 28535
2006-05-29 02:35:29 +00:00
Reid Spencer
8bd3003e72 Initial Commit of llvm2cpp
This is a safekeeping commit. The program is not finished. It currently
handles modules, types, global variables and function declarations. Blocks
and instructions remain to be done.

llvm-svn: 28528
2006-05-29 00:57:22 +00:00