summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/CBackend
Commit message (Collapse)AuthorAgeFilesLines
...
* Rather than having special rules like "intrinsics cannotDuncan Sands2007-12-031-1/+1
| | | | | | | | | throw exceptions", just mark intrinsics with the nounwind attribute. Likewise, mark intrinsics as readnone/readonly and get rid of special aliasing logic (which didn't use anything more than this anyway). llvm-svn: 44544
* Work around a GCC bug, producing this code:Chris Lattner2007-11-281-0/+6
| | | | | | | | | | | | | | unsigned char *llvm_cbe_X; ... llvm_cbe_X = 0; *((void**)&llvm_cbe_X) = __builtin_stack_save(); instead of: llvm_cbe_X = __builtin_stack_save(); See PR1809 for details. llvm-svn: 44415
* Fix PR1146: parameter attributes are longer part ofDuncan Sands2007-11-271-21/+21
| | | | | | | | | | | | the function type, instead they belong to functions and function calls. This is an updated and slightly corrected version of Reid Spencer's original patch. The only known problem is that auto-upgrading of bitcode files doesn't seem to work properly (see test/Bitcode/AutoUpgradeIntrinsics.ll). Hopefully a bitcode guru (who might that be? :) ) will fix it. llvm-svn: 44359
* Switching TargetMachineRegistry to use the new generic Registry.Gordon Henriksen2007-10-171-1/+1
| | | | llvm-svn: 43094
* Handle PPC long double in CBackend.Dale Johannesen2007-10-151-0/+9
| | | | llvm-svn: 42972
* Rewrite sqrt and powi to use anyfloat. By popular demand.Dale Johannesen2007-10-021-4/+2
| | | | llvm-svn: 42537
* Make temporaries explicit to avoid prematureDale Johannesen2007-09-261-1/+3
| | | | | | destruction of compiler-created ones. llvm-svn: 42383
* Fix PR1679, by printing GEP indices as signed values instead of unsigned.Chris Lattner2007-09-221-1/+2
| | | | llvm-svn: 42239
* Implement x86 long double (uses host long double,Dale Johannesen2007-09-171-5/+30
| | | | | | so only works on x86 target). llvm-svn: 42019
* Fix PR1666, SPASS with the CBE and 254.gap with the CBE.Chris Lattner2007-09-151-45/+27
| | | | | | | | GCC optimizes away things like ptr < NULL to false. To "fix" this, have the CBE emit casts of pointers to intptr_t when doing relational pointer comparisons. llvm-svn: 41983
* Remove the assumption that FP's are either float orDale Johannesen2007-09-141-0/+3
| | | | | | | | | | | | | double from some of the many places in the optimizers it appears, and do something reasonable with x86 long double. Make APInt::dump() public, remove newline, use it to dump ConstantSDNode's. Allow APFloats in FoldingSet. Expand X86 backend handling of long doubles (conversions to/from int, mostly). llvm-svn: 41967
* Revise previous patch per review comments.Dale Johannesen2007-09-121-3/+3
| | | | | | | Next round of x87 long double stuff. Getting close now, basically works. llvm-svn: 41875
* Add APInt interfaces to APFloat (allows directlyDale Johannesen2007-09-111-2/+5
| | | | | | | | | access to bits). Use them in place of float and double interfaces where appropriate. First bits of x86 long double constants handling (untested, probably does not work). llvm-svn: 41858
* Apply feedback from previous patch.Dale Johannesen2007-09-071-10/+0
| | | | llvm-svn: 41774
* Next round of APFloat changes.Dale Johannesen2007-09-061-14/+20
| | | | | | | | | | | | | | Use APFloat in UpgradeParser and AsmParser. Change all references to ConstantFP to use the APFloat interface rather than double. Remove the ConstantFP double interfaces. Use APFloat functions for constant folding arithmetic and comparisons. (There are still way too many places APFloat is just a wrapper around host float/double, but we're getting there.) llvm-svn: 41747
* Handle packed structs in the CBackend.Lauro Ramos Venancio2007-07-111-1/+4
| | | | llvm-svn: 39752
* Fix PR1413Chris Lattner2007-05-131-0/+5
| | | | llvm-svn: 37023
* revert reid's patch to fix these failures:Chris Lattner2007-05-031-100/+28
| | | | | | | | test/CodeGen/CBackend/2007-01-08-ParamAttr-ICmp.ll for PR1099 [DEJAGNU] Applications/SPASS/SPASS [CBE] Regression/C/2004-03-15-IndirectGoto [CBE] llvm-svn: 36664
* Drop 'const'Devang Patel2007-05-031-4/+4
| | | | llvm-svn: 36662
* Use 'static const char' instead of 'static const int'.Devang Patel2007-05-021-4/+4
| | | | | | | Due to darwin gcc bug, one version of darwin linker coalesces static const int, which defauts PassID based pass identification. llvm-svn: 36652
* Make sign extension work correctly for unusual bit widths.Reid Spencer2007-05-021-28/+100
| | | | llvm-svn: 36635
* Do not use typeinfo to identify pass in pass manager.Devang Patel2007-05-011-2/+12
| | | | llvm-svn: 36632
* Implemented correct stack probing on mingw/cygwin for dynamic alloca's.Anton Korobeynikov2007-04-171-2/+2
| | | | | | | Also, fixed static case in presence of eax livin. This fixes PR331 PS: Why don't we still have push/pop instructions? :) llvm-svn: 36195
* Silence VC++ warning.Jeff Cohen2007-04-131-1/+1
| | | | llvm-svn: 35975
* Implement review feedback .. don't double search a set.Reid Spencer2007-04-121-3/+1
| | | | llvm-svn: 35957
* Provide support for intrinsics that lower themselves to a function body.Reid Spencer2007-04-121-2/+32
| | | | | | | | This can happen for intrinsics that are overloaded. In such cases it is necessary to emit a function prototype before the body of the function that calls the intrinsic and to ensure we don't emit it multiple times. llvm-svn: 35954
* Implement Thread Local Storage (TLS) in CBackend.Lauro Ramos Venancio2007-04-121-17/+27
| | | | llvm-svn: 35951
* For PR1146:Reid Spencer2007-04-111-8/+8
| | | | | | | Put the parameter attributes in their own ParamAttr name space. Adjust the rest of llvm as a result. llvm-svn: 35877
* For PR1146:Reid Spencer2007-04-091-8/+13
| | | | | | Adapt handling of parameter attributes to use the new ParamAttrsList class. llvm-svn: 35814
* MS C does have inlining after all, just uses _inline instead of inline.Jeff Cohen2007-03-291-1/+1
| | | | llvm-svn: 35467
* Fix C Backend to generate code that works with Microsoft C for the benefit ofJeff Cohen2007-03-281-1/+4
| | | | | | front ends that do not depend on the GCC runtime (someday...). llvm-svn: 35441
* Make sure that when we store a value it is masked to its correct bitReid Spencer2007-03-031-1/+15
| | | | | | width. This helps CBE work with non-standard integer bit widths. llvm-svn: 34885
* PR1164:Bill Wendling2007-02-231-22/+52
| | | | | | | Generate local names with a "llvm_cbe_" prefix using the actual name of the variable instead of a temporary name. llvm-svn: 34540
* For PR1195:Reid Spencer2007-02-151-1/+1
| | | | | | | Change use of "packed" term to "vector" in comments, strings, variable names, etc. llvm-svn: 34300
* For PR1195:Reid Spencer2007-02-151-9/+9
| | | | | | | Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and PackedTyID -> VectorTyID. No functional changes. llvm-svn: 34293
* For PR411:Reid Spencer2007-02-051-1/+0
| | | | | | | | | | This patch replaces the SymbolTable class with ValueSymbolTable which does not support types planes. This means that all symbol names in LLVM must now be unique. The patch addresses the necessary changes to deal with this and removes code no longer needed as a result. This completes the bulk of the changes for this PR. Some cleanup patches will follow. llvm-svn: 33918
* Changes to support making the shift instructions be true BinaryOperators.Reid Spencer2007-02-021-9/+8
| | | | | | | | | | | | This feature is needed in order to support shifts of more than 255 bits on large integer types. This changes the syntax for llvm assembly to make shl, ashr and lshr instructions look like a binary operator: shl i32 %X, 1 instead of shl i32 %X, i8 1 Additionally, this should help a few passes perform additional optimizations. llvm-svn: 33776
* For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoidReid Spencer2007-01-301-5/+5
| | | | | | confusion with external linkage types. llvm-svn: 33663
* Implement use of new IntrinsicLowering interface.Reid Spencer2007-01-291-4/+9
| | | | llvm-svn: 33619
* Propagate changes from my local tree. This patch includes:Anton Korobeynikov2007-01-281-11/+17
| | | | | | | | | | | | | | | | | | | | | | 1. New parameter attribute called 'inreg'. It has meaning "place this parameter in registers, if possible". This is some generalization of gcc's regparm(n) attribute. It's currently used only in X86-32 backend. 2. Completely rewritten CC handling/lowering code inside X86 backend. Merged stdcall + c CCs and fastcall + fast CC. 3. Dropped CSRET CC. We cannot add struct return variant for each target-specific CC (e.g. stdcall + csretcc and so on). 4. Instead of CSRET CC introduced 'sret' parameter attribute. Setting in on first attribute has meaning 'This is hidden pointer to structure return. Handle it gently'. 5. Fixed small bug in llvm-extract + add new feature to FunctionExtraction pass, which relinks all internal-linkaged callees from deleted function to external linkage. This will allow further linking everything together. NOTEs: 1. Documentation will be updated soon. 2. llvm-upgrade should be improved to translate csret => sret. Before this, there will be some unexpected test fails. llvm-svn: 33597
* For PR645:Reid Spencer2007-01-261-3/+0
| | | | | | | Remove the Function::renameLocalSymbols function as it is no longer needed. llvm-svn: 33522
* Fix SMG2000 with the CBE: opaque types need names too.Chris Lattner2007-01-161-10/+8
| | | | llvm-svn: 33258
* Fix PR918 by only using typedefs to name struct types. This makes the laterChris Lattner2007-01-161-8/+15
| | | | | | | | | type ordering stuff work better. This fixes PR918 and CodeGen/CBackend/2007-01-15-NamedArrayType.ll Patch by Gordon Henriksen. llvm-svn: 33254
* rename Type::isIntegral to Type::isInteger, eliminating the old Type::isInteger.Chris Lattner2007-01-151-7/+7
| | | | | | | | | rename Type::getIntegralTypeMask to Type::getIntegerTypeMask. This makes naming much more consistent. For example, there are now no longer any instances of IntegerType that are not considered isInteger! :) llvm-svn: 33225
* Make use of isInteger vs isIntegral more explicitChris Lattner2007-01-151-4/+4
| | | | llvm-svn: 33216
* remove obsolete fixmeChris Lattner2007-01-121-3/+0
| | | | llvm-svn: 33151
* * PIC codegen for X86/Linux has been implementedAnton Korobeynikov2007-01-121-0/+12
| | | | | | | | * PIC-aware internal structures in X86 Codegen have been refactored * Visibility (default/weak) has been added * Docs fixes (external weak linkage, visibility, formatting) llvm-svn: 33136
* For PR1064:Reid Spencer2007-01-121-31/+43
| | | | | | | | | | | | | | | | | | | | | | | Implement the arbitrary bit-width integer feature. The feature allows integers of any bitwidth (up to 64) to be defined instead of just 1, 8, 16, 32, and 64 bit integers. This change does several things: 1. Introduces a new Derived Type, IntegerType, to represent the number of bits in an integer. The Type classes SubclassData field is used to store the number of bits. This allows 2^23 bits in an integer type. 2. Removes the five integer Type::TypeID values for the 1, 8, 16, 32 and 64-bit integers. These are replaced with just IntegerType which is not a primitive any more. 3. Adjust the rest of LLVM to account for this change. Note that while this incremental change lays the foundation for arbitrary bit-width integers, LLVM has not yet been converted to actually deal with them in any significant way. Most optimization passes, for example, will still only deal with the byte-width integer types. Future increments will rectify this situation. llvm-svn: 33113
* Implement review feedback for the ConstantBool->ConstantInt merge. ChrisReid Spencer2007-01-121-1/+1
| | | | | | | | recommended that getBoolValue be replaced with getZExtValue and that get(bool) be replaced by get(const Type*, uint64_t). This implements those changes. llvm-svn: 33110
* Rename BoolTy as Int1Ty. Patch by Sheng Zhou.Reid Spencer2007-01-111-6/+6
| | | | llvm-svn: 33076
OpenPOWER on IntegriCloud