summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/CBackend
Commit message (Collapse)AuthorAgeFilesLines
...
* For PR1043:Zhou Sheng2007-01-111-14/+13
| | | | | | | Merge ConstantIntegral and ConstantBool into ConstantInt. Remove ConstantIntegral and ConstantBool from LLVM. llvm-svn: 33073
* Change the file header name as this file was renamed.Reid Spencer2007-01-101-1/+1
| | | | llvm-svn: 33051
* Rename Writer.cpp as CBackend.cpp so it doesn't conflict with Writer.cppReid Spencer2007-01-101-0/+0
| | | | | | in the bytecode writer library. This helps with debugging. llvm-svn: 33050
* For PR1099:Reid Spencer2007-01-091-33/+33
| | | | | | | | | | | Invert the "isSigned" logic in calls to printType and printPrimitiveType. We want variables to be declared unsigned by default so that signless operators like + and - perform the unsigned operation that LLVM expects by default. Parameters with the sext attribute will be declared signed and signed instructions will case operand values to signed regardless of the type of the variable. This passes all tests and fixes PR1099. llvm-svn: 33039
* For PR1099:Reid Spencer2007-01-091-8/+9
| | | | | | | | | | | | | | | Partial fix for this PR. Default function parameters to signed integer, just like everything else in CBE. The bug was caused by incorrectly introducing parameter attributes feature by choosing "signed" parameter if the SExtAttribute was specified. Howeer, if no attribute is specified, this causes it to become unsigned which is incorrect. Reversing the logic so that signedness is detected by "not ZExtAttribute" set fixes the issue. This fixes 197.parser but there is more to do. Any comparison and possibly other operators involving arguments may need to correctly cast the parameter before its use, depending on the sign of the operator. llvm-svn: 33034
* For PR1090:Reid Spencer2007-01-081-28/+31
| | | | | | | | | | | Clean up the definitions of the helper functions per Chris' review suggestions so they are easier to read. For PR1091: Print minimum signed integer values as unsigned so that we get no warnings from the C compiler about constant ranges and value comparisons. llvm-svn: 33010
* Fix PR1090:Reid Spencer2007-01-081-42/+98
| | | | | | | | | Implemented some llvm_fcmp_{pred} functions at the start of the function bodies and use them for fcmp instructions and constant expressions. These help implement the ordered and unordered comparisons necessary for correct exectuion of these comparisons. llvm-svn: 33007
* For PR1086:Reid Spencer2007-01-071-30/+54
| | | | | | | Parameter attributes do have to be specially handled in the CBE. Implement their handling. llvm-svn: 32976
* For PR411:Reid Spencer2007-01-061-11/+12
| | | | | | | | | 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. llvm-svn: 32956
* For PR950:Reid Spencer2006-12-311-56/+16
| | | | | | | | | | | | | | | | | | Three changes: 1. Convert signed integer types to signless versions. 2. Implement the @sext and @zext parameter attributes. Previously the type of an function parameter was used to determine whether it should be sign extended or zero extended before the call. This information is now communicated via the function type's parameter attributes. 3. The interface to LowerCallTo had to be changed in order to accommodate the parameter attribute information. Although it would have been convenient to pass in the FunctionType itself, there isn't always one present in the caller. Consequently, a signedness indication for the result type and for each parameter was provided for in the interface to this method. All implementations were changed to make the adjustment necessary. llvm-svn: 32788
* For PR950:Reid Spencer2006-12-232-114/+289
| | | | | | | | 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. llvm-svn: 32751
* Use a predicate function to identify bitcast of fp and integer instead ofReid Spencer2006-12-171-11/+11
| | | | | | repeating the logic in two different parts of the code. llvm-svn: 32643
* Fix PR1058:Reid Spencer2006-12-171-8/+13
| | | | | | | | Generate the BITCAST_TEMPORARY regardless of the uses or inlinability of the instruction. This temporary is needed to perform the instruction, not provide storage for its results. llvm-svn: 32642
* Change inferred getCast into specific getCast. Passes all tests.Reid Spencer2006-12-121-2/+2
| | | | llvm-svn: 32469
* Fix the BitCastUnion type for 32-bit targets.Reid Spencer2006-12-121-6/+6
| | | | llvm-svn: 32453
* Implement correct bitcast of int<->float and long<->double by using aReid Spencer2006-12-111-14/+58
| | | | | | union to perform the bitcast. llvm-svn: 32444
* Cleaned setjmp/longjmp lowering interfaces. Now we're producing rightAnton Korobeynikov2006-12-101-6/+2
| | | | | | | code (both asm & cbe) for Mingw32 target. Removed autoconf checks for underscored versions of setjmp/longjmp. llvm-svn: 32415
* Don't use <sstream> in Streams.h but <iosfwd> instead.Bill Wendling2006-12-071-1/+1
| | | | llvm-svn: 32340
* What should be the last unnecessary <iostream>s in the library.Bill Wendling2006-12-071-11/+9
| | | | llvm-svn: 32333
* Always pass "true" to isMaxValue(bool) because we know the type is LongTy.Reid Spencer2006-12-061-1/+1
| | | | llvm-svn: 32290
* Adjust to new ConstantIntegral interface for Max/Min tests.Reid Spencer2006-12-061-1/+1
| | | | llvm-svn: 32289
* Introducing external weak linkage. Darwin codegen should be added later.Anton Korobeynikov2006-12-011-4/+11
| | | | llvm-svn: 32052
* gcc doesn't like an empty colbber listAndrew Lenharth2006-11-281-1/+3
| | | | llvm-svn: 31987
* Make identity default, and fix PR1020Andrew Lenharth2006-11-281-7/+3
| | | | llvm-svn: 31979
* update commentsAndrew Lenharth2006-11-281-2/+4
| | | | llvm-svn: 31975
* Get the asminfo for the target most closely matching the module and use that ↵Andrew Lenharth2006-11-281-28/+26
| | | | | | for inline asm llvm-svn: 31974
* Preliminary support for inline asm in the cbe. The target specific uglinessAndrew Lenharth2006-11-271-2/+164
| | | | | | | | | | is still in Writer, but issolated to a single function. This might be split into something in each target directory. This is sufficient to get through archie and an strcpy impl on linux-x86. Module level asm is not handled. llvm-svn: 31948
* When truncating to bool, it is necessary to & with 1 for all casts thatReid Spencer2006-11-271-3/+10
| | | | | | | can result in a bool. Previously PtrToInt, FPToUI and FPToSI were missing this operation. llvm-svn: 31938
* For PR950:Reid Spencer2006-11-271-28/+123
| | | | | | | | | | 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
* Simplify IntrinsicLowering and clarify that it is only for use by theChris Lattner2006-11-151-1/+1
| | | | | | CBE and interpreter. llvm-svn: 31755
* For PR950:Reid Spencer2006-11-081-17/+24
| | | | | | | | 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
* Fix a bug in the last patch and convert to && instead of & for logical expr.Reid Spencer2006-11-051-2/+2
| | | | llvm-svn: 31463
* Implement the -enabled-cbe-printf-a feature.Reid Spencer2006-11-051-2/+2
| | | | llvm-svn: 31462
* Make CBackend -pedantic clean.Reid Spencer2006-11-031-2/+1
| | | | llvm-svn: 31388
* For PR786:Reid Spencer2006-11-021-2/+2
| | | | | | | | | | 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
* For PR950:Reid Spencer2006-11-021-10/+28
| | | | | | Replace the REM instruction with UREM, SREM and FREM. llvm-svn: 31369
* Enclose a case in { and } so that the pickier compilers don't complain.Reid Spencer2006-10-261-0/+2
| | | | llvm-svn: 31196
* For PR950:Reid Spencer2006-10-261-7/+161
| | | | | | | | 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
* Don't generate a prototype for _setjmp. At least on Linux, this functionReid Spencer2006-10-221-2/+2
| | | | | | | | has a different prototype than the one #included from <setjmp.h>. This patch fixes siod and a number of other test cases on Linux that were failing the CBE because of this _setjmp issue. llvm-svn: 31112
* For PR950:Reid Spencer2006-10-201-11/+11
| | | | | | | | 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
* Simplify some code, reformat break'sChris Lattner2006-09-281-6/+12
| | | | llvm-svn: 30660
* Added some eye-candy for Subtarget type checkingAnton Korobeynikov2006-09-171-1/+9
| | | | | | Added X86 StdCall & FastCall calling conventions. Codegen will follow. llvm-svn: 30446
* Adding dllimport, dllexport and external weak linkage types.Anton Korobeynikov2006-09-141-1/+12
| | | | | | | | | 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
* Add cbe support for powiChris Lattner2006-09-091-0/+10
| | | | llvm-svn: 30226
* Completely rearchitect the interface between targets and the pass manager.Chris Lattner2006-09-042-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | This pass: 1. Splits TargetMachine into TargetMachine (generic targets, can be implemented any way, like the CBE) and LLVMTargetMachine (subclass of TM that is used by things using libcodegen and other support). 2. Instead of having each target fully populate the passmgr for file or JIT output, move all this to common code, and give targets hooks they can implement. 3. Commonalize the target population stuff between file emission and JIT emission. 4. All (native code) codegen stuff now happens in a FunctionPassManager, which paves the way for "fast -O0" stuff in the CFE later, and now LLC could lazily stream .bc files from disk to use less memory. 5. There are now many fewer #includes and the targets don't depend on the scalar xforms or libanalysis anymore (but codegen does). 6. Changing common code generator pass ordering stuff no longer requires touching all targets. 7. The JIT now has the option of "-fast" codegen or normal optimized codegen, which is now orthogonal to the fact that JIT'ing is being done. llvm-svn: 30081
* Simplify target construction.Chris Lattner2006-09-031-1/+1
| | | | llvm-svn: 30070
* Make functions with an "asm" name propagate that asm name into the cbe.c file.Chris Lattner2006-07-281-0/+6
| | | | | | This fixes link errors on programs with these on targets with prefixes. llvm-svn: 29390
* __i386__, __i386, etc. are not defined for x86-64. Use __x86_64__.Evan Cheng2006-06-201-1/+2
| | | | llvm-svn: 28881
* Don't pass target name into TargetData anymore, it is never used or needed.Chris Lattner2006-06-161-2/+1
| | | | | | | Remove explicit casts to std::string now that there is no overload resolution issues in the TargetData ctors. llvm-svn: 28830
* Now that PR633 is implemented, the CBE can know to emit _setjmp/_longjmpChris Lattner2006-06-061-0/+6
| | | | | | | when available. This speeds up hexxagon from 18.61s to 16.61s with the CBE on PPC Mac OS (for reference, LLC is 15.48s and GCC is 23.35s). llvm-svn: 28697
OpenPOWER on IntegriCloud