aboutsummaryrefslogtreecommitdiffstats
path: root/tools/llvm2cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* For PR1043:Zhou Sheng2007-01-111-6/+7
| | | | | | | | Merge ConstantIntegral and ConstantBool into ConstantInt. Remove ConstantIntegral and ConstantBool from LLVM. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33073 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR411:Reid Spencer2007-01-061-8/+9
| | | | | | | | | | Take an incremental step towards type plane elimination. This change separates types from values in the symbol tables by finally making use of the TypeSymbolTable class. This yields more natural interfaces for dealing with types and unclutters the SymbolTable class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32956 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR950:Reid Spencer2006-12-311-22/+14
| | | | | | | Convert signed integer types to signless. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32790 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR950:Reid Spencer2006-12-231-40/+97
| | | | | | | | | This patch removes the SetCC instructions and replaces them with the ICmp and FCmp instructions. The SetCondInst instruction has been removed and been replaced with ICmpInst and FCmpInst. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32751 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a call to Type::isSigned().Reid Spencer2006-12-181-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32651 91177308-0d34-0410-b5e6-96231b3b80d8
* Generate the correct cast opcode for constant expressions.Reid Spencer2006-12-121-2/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32461 91177308-0d34-0410-b5e6-96231b3b80d8
* make all llvm tools call llvm_shutdown when they exit, static'ify some stuff.Chris Lattner2006-12-062-2/+5
| | | | | | | With this change, I can now move -stats to print when llvm_shutdown is called. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32250 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR950:Reid Spencer2006-11-271-4/+30
| | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31931 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR950:Reid Spencer2006-11-081-3/+6
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31542 91177308-0d34-0410-b5e6-96231b3b80d8
* Make llvm2cpp -pedantic clean.Reid Spencer2006-11-031-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31389 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR786:Reid Spencer2006-11-021-2/+1
| | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31380 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR950:Reid Spencer2006-11-021-3/+9
| | | | | | | Replace the REM instruction with UREM, SREM and FREM. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31369 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR950:Reid Spencer2006-10-261-3/+9
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31195 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR950:Reid Spencer2006-10-201-6/+5
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31063 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify codeChris Lattner2006-09-281-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30661 91177308-0d34-0410-b5e6-96231b3b80d8
* Adding dllimport, dllexport and external weak linkage types.Anton Korobeynikov2006-09-141-0/+6
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30374 91177308-0d34-0410-b5e6-96231b3b80d8
* Use LINK_COMPONENTS to specify *components* to link against instead ofChris Lattner2006-09-041-2/+1
| | | | | | | using USED_LIBS to specify *libraries* to link against. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30090 91177308-0d34-0410-b5e6-96231b3b80d8
* Provide indentation of the generated program.Reid Spencer2006-08-141-181/+267
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29678 91177308-0d34-0410-b5e6-96231b3b80d8
* Tools require EH for their top-level try blocks.Chris Lattner2006-07-071-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29035 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR819, llvm2cpp should read .bc files, not .ll files.Chris Lattner2006-07-062-82/+55
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29030 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the verifier to never throw an exception. Instead verifyModule ↵Chris Lattner2006-07-061-8/+10
| | | | | | canoptionally return the string error, which is an easier api for clients touse anyway. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29017 91177308-0d34-0410-b5e6-96231b3b80d8
* Actually add instructions to the list of defined values so it getsReid Spencer2006-06-151-0/+1
| | | | | | | | recognized as such! This prevents the CppWriter from treating every operand as a forward reference and making a mess of the output. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28800 91177308-0d34-0410-b5e6-96231b3b80d8
* Suppress -pedantic warnings about print("%a")Reid Spencer2006-06-021-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28650 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach CppWriter how to emit an inline (partial) function.Reid Spencer2006-06-011-50/+132
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28645 91177308-0d34-0410-b5e6-96231b3b80d8
* Restore default arguments for llvm2cpp back to health by declaring anReid Spencer2006-06-011-1/+1
| | | | | | | emitted variable to actually have a type (picky, picky, picky!) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28625 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug where incorrect C++ was being emitted.Reid Spencer2006-06-011-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28615 91177308-0d34-0410-b5e6-96231b3b80d8
* Use archive libraries instead of object files for VMCore, BCReader,Reid Spencer2006-06-011-2/+2
| | | | | | | | BCWriter, and bzip2 libraries. Adjust the various makefiles to accommodate these changes. This was done to speed up link times. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28610 91177308-0d34-0410-b5e6-96231b3b80d8
* fix utostrAndrew Lenharth2006-05-311-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28597 91177308-0d34-0410-b5e6-96231b3b80d8
* Major reorganization and extension of the code. The diff on this will be aReid Spencer2006-05-311-487/+698
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28589 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't generate module definitions when the -fragment option is given.Reid Spencer2006-05-311-51/+59
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28583 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix more bugs. This version now passes all of the Feature test except forReid Spencer2006-05-301-135/+244
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28568 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix many small bugs in llvm2cpp. This patch gets llvm2cpp working withReid Spencer2006-05-301-73/+161
| | | | | | | | everything except PHI nodes and one odd recurse/opaque type situation. PHI nodes forward reference INSTRUCTIONS (aaaaaaaahhhhhhh!) :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28554 91177308-0d34-0410-b5e6-96231b3b80d8
* First complete version of llvm2cpp that doesn't crash on any of the FeatureReid Spencer2006-05-301-274/+308
| | | | | | | tests. The output in a few cases still doesn't compile, however. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28547 91177308-0d34-0410-b5e6-96231b3b80d8
* Next batch of implementation:Reid Spencer2006-05-291-1148/+265
| | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28541 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix file header comment.Reid Spencer2006-05-291-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28540 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove temporary testing rules.Reid Spencer2006-05-291-14/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28539 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix two bugs in the CppWriter.cpp:Reid Spencer2006-05-292-4/+17
| | | | | | | | 1. Return the module from the MakeModule function so it can be verified. 2. Make sure types get generated with their names git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28536 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the file's comment block.Reid Spencer2006-05-291-6/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28535 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial Commit of llvm2cppReid Spencer2006-05-294-0/+2174
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28528 91177308-0d34-0410-b5e6-96231b3b80d8