aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/CBackend
Commit message (Collapse)AuthorAgeFilesLines
* Fix PR2907 by digging through constant expressions to find FP constants thatChris Lattner2008-10-221-42/+63
| | | | | | | are their operands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57956 91177308-0d34-0410-b5e6-96231b3b80d8
* add some simple hacky long double support for the CBE. ThisChris Lattner2008-10-171-5/+15
| | | | | | | | should work for intel long double, but ppc long double aborts in convert. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57672 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix command-line option printing to print two spaces where needed,Dan Gohman2008-10-141-1/+1
| | | | | | | | | | instead of requiring all "short description" strings to begin with two spaces. This makes these strings less mysterious, and it fixes some cases where short description strings mistakenly did not begin with two spaces. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57521 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a "loses information" return value to APFloat::convertDale Johannesen2008-10-091-1/+2
| | | | | | | | | and APFloat::convertToInteger. Restore return value to IEEE754. Adjust all users accordingly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57329 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename APFloat::convertToAPInt to bitcastToAPInt toDale Johannesen2008-10-091-4/+4
| | | | | | | | | make it clearer what the function does. No functional change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57325 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: Builds all examples. Corrected name of CBackend target.Oscar Fuentes2008-09-261-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56682 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: Builds all targets.Oscar Fuentes2008-09-261-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56641 91177308-0d34-0410-b5e6-96231b3b80d8
* Large mechanical patch.Devang Patel2008-09-251-24/+24
| | | | | | | | | | | | | | | | | s/ParamAttr/Attribute/g s/PAList/AttrList/g s/FnAttributeWithIndex/AttributeWithIndex/g s/FnAttr/Attribute/g This sets the stage - to implement function notes as function attributes and - to distinguish between function attributes and return value attributes. This requires corresponding changes in llvm-gcc and clang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56622 91177308-0d34-0410-b5e6-96231b3b80d8
* Tidy up several unbeseeming casts from pointer to intptr_t.Dan Gohman2008-09-041-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55779 91177308-0d34-0410-b5e6-96231b3b80d8
* unbreak the CBE on treeadd an many others.Chris Lattner2008-08-211-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55112 91177308-0d34-0410-b5e6-96231b3b80d8
* Use raw_ostream throughout the AsmPrinter.Owen Anderson2008-08-212-20/+184
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55092 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename some GC classes so that their roll will hopefully be clearer.Gordon Henriksen2008-08-171-1/+1
| | | | | | | | | | | | | | | | | | In particular, Collector was confusing to implementors. Several thought that this compile-time class was the place to implement their runtime GC heap. Of course, it doesn't even exist at runtime. Specifically, the renames are: Collector -> GCStrategy CollectorMetadata -> GCFunctionInfo CollectorModuleMetadata -> GCModuleInfo CollectorRegistry -> GCRegistry Function::getCollector -> getGC (setGC, hasGC, clearGC) Several accessors and nested types have also been renamed to be consistent. These changes should be obvious. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54899 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid emitting casts in static initializer contexts. This fixesDan Gohman2008-07-241-65/+62
| | | | | | | large numbers of CBE regressions caused by r53958. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53990 91177308-0d34-0410-b5e6-96231b3b80d8
* Use C99 aggregate literal syntax for first-class struct and array values.Dan Gohman2008-07-231-0/+8
| | | | | | | This fixes several recent CBE regressions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53958 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable first-class aggregates support.Dan Gohman2008-07-231-13/+0
| | | | | | | | | | | | | Remove the GetResultInst instruction. It is still accepted in LLVM assembly and bitcode, where it is now auto-upgraded to ExtractValueInst. Also, remove support for return instructions with multiple values. These are auto-upgraded to use InsertValueInst instructions. The IRBuilder still accepts multiple-value returns, and auto-upgrades them to InsertValueInst instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53941 91177308-0d34-0410-b5e6-96231b3b80d8
* In the CBackend, use casts to force integer add, subtract, andDan Gohman2008-07-181-0/+28
| | | | | | | | multiply to be done as unsigned, so that they have well defined behavior on overflow. This fixes PR2408. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53767 91177308-0d34-0410-b5e6-96231b3b80d8
* Make LLVM compile on DragonFly BSD (PR2499).Matthijs Kooijman2008-06-261-1/+1
| | | | | | | Patch by Hasso Tepper! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52781 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch from generating the int128 typedefs based on targetdata to generatingChris Lattner2008-06-161-6/+4
| | | | | | | them based on the end-compiler's capabilities. This fixes PR2453 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52297 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r52046. It broke cbe on x86 / Mac OS X.Evan Cheng2008-06-071-21/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52071 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle assembler identifiers specially in CBE. This fixes PR2418.Anton Korobeynikov2008-06-061-6/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52046 91177308-0d34-0410-b5e6-96231b3b80d8
* Rewrite a bunch of the CBE's inline asm code, giving it theChris Lattner2008-06-041-45/+83
| | | | | | | ability to handle indirect input operands. This fixes PR2407. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51952 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement CBE support for first-class structs and array values,Dan Gohman2008-06-021-18/+77
| | | | | | | | | | | | | | | | and insertvalue and extractvalue instructions. First-class array values are not trivial because C doesn't support them. The approach I took here is to wrap all arrays in structs. Feedback is welcome. The 2007-01-15-NamedArrayType.ll test needed to be modified because it has a "not grep" for a string that now exists, because array types now have associated struct types, and those struct types have names. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51881 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the CBE's handling of instructions whose result is an i1. Previously,Chris Lattner2008-05-311-20/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | we did not truncate the value down to i1 with (x&1). This caused a problem when the computation of x was nontrivial, for example, "add i1 1, 1" would return 2 instead of 0. This makes the testcase compile into: ... llvm_cbe_t = (((llvm_cbe_r == 0u) + (llvm_cbe_r == 0u))&1); llvm_cbe_u = (((unsigned int )(bool )llvm_cbe_t)); ... instead of: ... llvm_cbe_t = ((llvm_cbe_r == 0u) + (llvm_cbe_r == 0u)); llvm_cbe_u = (((unsigned int )(bool )llvm_cbe_t)); ... This fixes a miscompilation of mediabench/adpcm/rawdaudio/rawdaudio and 403.gcc with the CBE, regressions from LLVM 2.2. Tanya, please pull this into the release branch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51813 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some constructs that gcc-4.4 warns about.Duncan Sands2008-05-271-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51591 91177308-0d34-0410-b5e6-96231b3b80d8
* Tweak how ConstantFP80Ty constants are outputDuncan Sands2008-05-241-1/+1
| | | | | | | so that gcc doesn't warn about them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51529 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix another isFirstClassType that now needs to be isSingleValueType.Dan Gohman2008-05-231-1/+1
| | | | | | | This fixes recent CBE regressions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51483 91177308-0d34-0410-b5e6-96231b3b80d8
* fix an off-by-one error in my previous patch, don't treat the callee as a ↵Chris Lattner2008-05-221-10/+9
| | | | | | incoming arg. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51422 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for multiple-return values in inline asm. This shouldChris Lattner2008-05-221-34/+42
| | | | | | | | get inline asm working as well as it did previously with the CBE with the new MRV support for inline asm. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51420 91177308-0d34-0410-b5e6-96231b3b80d8
* Add CommonLinkage; currently tentative definitionsDale Johannesen2008-05-141-1/+7
| | | | | | | | | | | | are represented as "weak", but there are subtle differences in some cases on Darwin, so we need both. The intent is that "common" will behave identically to "weak" unless somebody changes their target to do something else. No functional change as yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51118 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up the use of static and anonymous namespaces. This turned upDan Gohman2008-05-131-3/+3
| | | | | | | | several things that were neither in an anonymous namespace nor static but not intended to be global. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51017 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial CBE support for multiple return values.Dan Gohman2008-04-231-0/+30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50187 91177308-0d34-0410-b5e6-96231b3b80d8
* Suppress the 128-bit integer typedef on 32-bit targets, becauseDan Gohman2008-04-021-6/+12
| | | | | | | it causes compile errors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49122 91177308-0d34-0410-b5e6-96231b3b80d8
* Partial CBackend support for 128-bit integers. This is neededDan Gohman2008-04-021-2/+9
| | | | | | | | now that llvm-gcc is lowering appropriately-sized struct returns to i128 on x86-64. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49109 91177308-0d34-0410-b5e6-96231b3b80d8
* Add explicit keywords.Dan Gohman2008-03-251-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48801 91177308-0d34-0410-b5e6-96231b3b80d8
* A quick nm audit turned up several fixed tables and objects that wereDan Gohman2008-03-251-1/+1
| | | | | | | | marked read-write. Use const so that they can be allocated in a read-only segment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48800 91177308-0d34-0410-b5e6-96231b3b80d8
* Reimplement the parameter attributes support, phase #1. hilights:Chris Lattner2008-03-121-20/+19
| | | | | | | | | | | | | | | | | | | | | | | | | 1. There is now a "PAListPtr" class, which is a smart pointer around the underlying uniqued parameter attribute list object, and manages its refcount. It is now impossible to mess up the refcount. 2. PAListPtr is now the main interface to the underlying object, and the underlying object is now completely opaque. 3. Implementation details like SmallVector and FoldingSet are now no longer part of the interface. 4. You can create a PAListPtr with an arbitrary sequence of ParamAttrsWithIndex's, no need to make a SmallVector of a specific size (you can just use an array or scalar or vector if you wish). 5. All the client code that had to check for a null pointer before dereferencing the pointer is simplified to just access the PAListPtr directly. 6. The interfaces for adding attrs to a list and removing them is a bit simpler. Phase #2 will rename some stuff (e.g. PAListPtr) and do other less invasive changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48289 91177308-0d34-0410-b5e6-96231b3b80d8
* gcc likes things spelled correctlyAndrew Lenharth2008-03-051-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47981 91177308-0d34-0410-b5e6-96231b3b80d8
* s/isReturnStruct()/hasStructRetAttr()/gDevang Patel2008-03-031-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47857 91177308-0d34-0410-b5e6-96231b3b80d8
* add support for lvsl, fixing PR1481Chris Lattner2008-03-021-0/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47825 91177308-0d34-0410-b5e6-96231b3b80d8
* add support for the sse.cmp.* intrinsics, which fixes sse.isamax with the CBE.Chris Lattner2008-03-021-1/+39
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47824 91177308-0d34-0410-b5e6-96231b3b80d8
* refactor intrinsic handling code out into its own method.Chris Lattner2008-03-021-108/+115
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47823 91177308-0d34-0410-b5e6-96231b3b80d8
* fix printing of undef vectors, this fixes "simple" and "build" in ↵Chris Lattner2008-03-021-1/+6
| | | | | | | | | UnitTests/Vector. Now they all pass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47820 91177308-0d34-0410-b5e6-96231b3b80d8
* insertelement got the wrong operands.Chris Lattner2008-03-021-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47819 91177308-0d34-0410-b5e6-96231b3b80d8
* Several changes:Chris Lattner2008-03-021-82/+109
| | | | | | | | | | | | * Simplify handling of byval, making it easier to understand and more consistent. This fixes PR2065. * Clean up and simplify handling of GEPs. I can actually understand it now! * Implement support for GEP'ing into vectors, this fixes SingleSource/UnitTests/Vector/build2 among others. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47818 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug I introduced in constant array and constant vector handling.Chris Lattner2008-03-021-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47816 91177308-0d34-0410-b5e6-96231b3b80d8
* implement shufflevector.Chris Lattner2008-03-021-4/+38
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47815 91177308-0d34-0410-b5e6-96231b3b80d8
* implement extractelement.Chris Lattner2008-03-021-2/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47812 91177308-0d34-0410-b5e6-96231b3b80d8
* implement insertelement.Chris Lattner2008-03-021-1/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47811 91177308-0d34-0410-b5e6-96231b3b80d8
* respect isSigned for vector types, fixing sdiv of vectors etc.Chris Lattner2008-03-021-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47810 91177308-0d34-0410-b5e6-96231b3b80d8
* print the attribute in the right place, this fixes function returning vectors.Chris Lattner2008-03-021-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47809 91177308-0d34-0410-b5e6-96231b3b80d8