aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix a bunch of namespace pollution.Dan Gohman2009-08-073-4/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78363 91177308-0d34-0410-b5e6-96231b3b80d8
* It turns out most of the thumb2 instructions are not allowed to touch SP. ↵Evan Cheng2009-08-0710-70/+346
| | | | | | | | | | | The semantics of such instructions are unpredictable. We have just been lucky that tests have been passing. This patch takes pain to ensure all the PEI lowering code does the right thing when lowering frame indices, insert code to manipulate stack pointers, etc. It's also custom lowering dynamic stack alloc into pseudo instructions so we can insert the right instructions at scheduling time. This fixes PR4659 and PR4682. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78361 91177308-0d34-0410-b5e6-96231b3b80d8
* Output the new StructType constructor, which takes the context of theNicolas Geoffray2009-08-061-0/+1
| | | | | | | | module as first argument. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78340 91177308-0d34-0410-b5e6-96231b3b80d8
* Use DebugInfoFinderDevang Patel2009-08-061-15/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78334 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement Neon VST[234] operations.Bob Wilson2009-08-065-31/+176
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78330 91177308-0d34-0410-b5e6-96231b3b80d8
* Add parameter to pattern classes to enable an itinerary to be specified for ↵David Goodwin2009-08-066-819/+926
| | | | | | instructions. For now just use the existing itineraries or NoItinerary. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78321 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix several fixmes and clean up code by sinking *all* sectionChris Lattner2009-08-063-39/+48
| | | | | | | | | | | | | | | | | | creation activity into the target-specific subclasses of TLOF. Before this, globals with explicit sections could be created by the base class. 1. make getOrCreateSection protected, add a new getExplicitSectionGlobal pure virtual method to assign sections to globals with a specified section. 2. eliminate getSpecialCasedSectionGlobals, which is now PIC specific. 3. eliminate the getKindForNamedSection virtual method, which is now just a static method for ELF. 4. Add implementions of getExplicitSectionGlobal for ELF/PECOFF/Darwin/PIC16. They are now all detangled and understandable, woo! :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78319 91177308-0d34-0410-b5e6-96231b3b80d8
* go through PIC16TargetObjectFile to make sections instead of Chris Lattner2009-08-064-12/+26
| | | | | | | creating them directly in the pic16 asmprinter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78317 91177308-0d34-0410-b5e6-96231b3b80d8
* We need to sext global addresses in kernel code model, not zextAnton Korobeynikov2009-08-062-11/+24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78299 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug in x86's PreprocessForRMW logic that was exposedDan Gohman2009-08-061-3/+5
| | | | | | | | | by aggressive chain operand optimization. UpdateNodeOperands does not modify the node in place if it would result in a node identical to an existing node. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78297 91177308-0d34-0410-b5e6-96231b3b80d8
* Missed part of recent kernel codemodel tweaksAnton Korobeynikov2009-08-061-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78293 91177308-0d34-0410-b5e6-96231b3b80d8
* Neon does not actually have VLD{234}.64 instructions.Bob Wilson2009-08-063-9/+0
| | | | | | | These operations will have to be synthesized from other instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78263 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new pre-allocation pass to assign adjacent registers for Neon instructionsBob Wilson2009-08-054-1/+142
| | | | | | | | | | that have that constraint. This is currently just assigning a fixed set of registers, and it only handles VLDn for n=2,3,4 with DPR registers. I'm going to expand it to handle more operations next; we can make it smarter once everything is working correctly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78256 91177308-0d34-0410-b5e6-96231b3b80d8
* Better handle kernel code model. Also, generalize the things and fix oneAnton Korobeynikov2009-08-053-34/+81
| | | | | | subtle bug with small code model. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78255 91177308-0d34-0410-b5e6-96231b3b80d8
* Use GR32 for copies between GR32_NOSP and GR32_NOREX, as neitherDan Gohman2009-08-051-3/+11
| | | | | | | is a subset of the other, but both are subsets of GR32. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78250 91177308-0d34-0410-b5e6-96231b3b80d8
* When using NEON for single-precision FP, the NEON result must be placed in ↵David Goodwin2009-08-053-21/+41
| | | | | | D0-D15 as these are the only D registers with S subregs. Introduce a new regclass to represent D0-D15 and use it in the NEON single-precision FP patterns. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78244 91177308-0d34-0410-b5e6-96231b3b80d8
* remove the 'DataSectionStartSuffix' and 'TextSectionStartSuffix' knobs.Chris Lattner2009-08-052-6/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78242 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove redundand checks: the only way to have, e.g. f32 RegVT is exactlyAnton Korobeynikov2009-08-051-11/+7
| | | | | | hardfloat case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78237 91177308-0d34-0410-b5e6-96231b3b80d8
* hasSuperClass tests for a strict superset relation, rather thanDan Gohman2009-08-051-2/+2
| | | | | | | | a superset relation. This code wants to test the regular superset relation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78236 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak the stuff, this is ugly, but we cannot do better for now with ↵Anton Korobeynikov2009-08-051-5/+4
| | | | | | 'plain' C calling conv. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78232 91177308-0d34-0410-b5e6-96231b3b80d8
* Missed pieces for ARM HardFP ABI.Anton Korobeynikov2009-08-054-24/+41
| | | | | | Patch by Sandeep Patel! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78225 91177308-0d34-0410-b5e6-96231b3b80d8
* Use elf Object File directlyAndrew Lenharth2009-08-051-18/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78220 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some dead code.Daniel Dunbar2009-08-053-35/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78219 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable the new no-SP register classes by default. This is to addressDan Gohman2009-08-053-17/+6
| | | | | | | | PR4572. A few tests have some minor code regressions due to different coalescing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78217 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a redundant declaration.Bob Wilson2009-08-051-2/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78216 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert bswap test to filecheck, add more test entries & convert stuff to ↵Anton Korobeynikov2009-08-051-1/+1
| | | | | | filecheck git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78212 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug in the PIC16 backend.Dan Gohman2009-08-051-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78211 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable NEON single-precision FP support for Cortex-A8, for now...David Goodwin2009-08-051-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78209 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead code. MDNode and MDString are not Constant anymore.Devang Patel2009-08-057-21/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78207 91177308-0d34-0410-b5e6-96231b3b80d8
* Add memory versions of some instructions.Anton Korobeynikov2009-08-051-6/+83
| | | | | | Patch by Neale Ferguson! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78203 91177308-0d34-0410-b5e6-96231b3b80d8
* By default, for cortex-a8 use NEON for single-precision FP. David Goodwin2009-08-052-5/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78200 91177308-0d34-0410-b5e6-96231b3b80d8
* Special constants as destinations does not work as expected - drop the patterns.Anton Korobeynikov2009-08-051-53/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78191 91177308-0d34-0410-b5e6-96231b3b80d8
* Alpha: Get section directives rightAndrew Lenharth2009-08-051-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78189 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup in dbg_stoppoint handling in CBE. Patch by Sandeep Patel.Anton Korobeynikov2009-08-051-7/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78182 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor arm CBE fixes. Patch by Sandeep.Anton Korobeynikov2009-08-051-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78181 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit module-level inline asm for CBE.Anton Korobeynikov2009-08-051-0/+48
| | | | | | Patch by Sandeep Patel git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78180 91177308-0d34-0410-b5e6-96231b3b80d8
* - Remove custom handling of jumptables by the elf writter (this wasBruno Cardoso Lopes2009-08-052-16/+12
| | | | | | | | | | | | | | a dirty hack and isn't need anymore since the last x86 code emitter patch) - Add a target-dependent modifier to addend calculation - Use R_X86_64_32S relocation for X86::reloc_absolute_word_sext - Use getELFSectionFlags whenever possible - fix getTextSection to use TLOF and emit the right text section - Handle global emission for static ctors, dtors and Type::PointerTyID - Some minor fixes git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78176 91177308-0d34-0410-b5e6-96231b3b80d8
* 80 col violations.Evan Cheng2009-08-051-9/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78175 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach X86FastISel how to handle CCValAssign::BCvt, which is used forDan Gohman2009-08-051-0/+8
| | | | | | | MMX arguments. This fixes PR4684. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78163 91177308-0d34-0410-b5e6-96231b3b80d8
* Clarify common linkage and the requirements on it. EnforceChris Lattner2009-08-051-1/+6
| | | | | | | | them in the verifier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78160 91177308-0d34-0410-b5e6-96231b3b80d8
* expose SectionKindForGlobal to curious clients, named asChris Lattner2009-08-051-9/+8
| | | | | | | getKindForGlobal. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78156 91177308-0d34-0410-b5e6-96231b3b80d8
* Oops. I didn't mean to commit this piece yet.Bob Wilson2009-08-051-2/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78146 91177308-0d34-0410-b5e6-96231b3b80d8
* Major calling convention code refactoring.Dan Gohman2009-08-0532-1523/+1562
| | | | | | | | | | | | | | | | | | | | Instead of awkwardly encoding calling-convention information with ISD::CALL, ISD::FORMAL_ARGUMENTS, ISD::RET, and ISD::ARG_FLAGS nodes, TargetLowering provides three virtual functions for targets to override: LowerFormalArguments, LowerCall, and LowerRet, which replace the custom lowering done on the special nodes. They provide the same information, but in a more immediately usable format. This also reworks much of the target-independent tail call logic. The decision of whether or not to perform a tail call is now cleanly split between target-independent portions, and the target dependent portion in IsEligibleForTailCallOptimization. This also synchronizes all in-tree targets, to help enable future refactoring and feature work. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78142 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove an unnecessary flush in the CppBackend's output.Dan Gohman2009-08-051-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78138 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't flush the raw_ostream between each MachineFunction. These flushDan Gohman2009-08-056-12/+0
| | | | | | | | | | | | calls were originally put in place because errs() at one time was not unbuffered, and these print routines are commonly used with errs() for debugging. However, errs() is now properly unbuffered, so the flush calls are no longer needed. This significantly reduces the number of write(2) calls for regular asm printing when there are many small functions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78137 91177308-0d34-0410-b5e6-96231b3b80d8
* Change DAG nodes for Neon VLD2/3/4 operations to return multiple results.Bob Wilson2009-08-054-31/+108
| | | | | | | | | | Get rid of yesterday's code to fix the register usage during isel. Select the new DAG nodes to machine instructions. The new pre-alloc pass to choose adjacent registers for these results is not done, so the results of this will generally not assemble yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78136 91177308-0d34-0410-b5e6-96231b3b80d8
* 1) Proper emit displacements for x86, using absolute relocations where necessaryBruno Cardoso Lopes2009-08-053-31/+56
| | | | | | | | | | | for ELF to work. 2) RIP addressing: Use SIB bytes for absolute relocations where RegBase=0, IndexReg=0. 3) The JIT can get the real address of cstpools and jmptables during code emission, fix that for object code emission git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78129 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix part 1 of pr4682. PICADD is a 16-bit instruction even in thumb2 mode.Evan Cheng2009-08-043-9/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78126 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace dregsingle operand modifier with explicit escaped curly brackets.Bob Wilson2009-08-042-4/+2
| | | | | | | | For other VLDn and VSTn operations, we need to list the multiple registers explicitly anyway, so there's no point in special-casing this one usage. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78109 91177308-0d34-0410-b5e6-96231b3b80d8
* Restlyize to match other targets, fixes cmake build to boot.Mike Stump2009-08-042-2/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78105 91177308-0d34-0410-b5e6-96231b3b80d8