aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target
Commit message (Collapse)AuthorAgeFilesLines
* Use raw_ostream throughout the AsmPrinter.Owen Anderson2008-08-2145-106/+300
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55092 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the handling of ANY_EXTEND, SIGN_EXTEND_INREG, and TRUNCATEDan Gohman2008-08-203-138/+159
| | | | | | | | | | | | | | out of X86ISelDAGToDAG.cpp C++ code and into tablegen code. Among other things, using tablegen for these things makes them friendlier to FastISel. Tablegen can handle the case of i8 subregs on x86-32, but currently the C++ code for that case uses MVT::Flag in a tricky way, and it happens to schedule better in some cases. So for now, leave the C++ code in place to handle the i8 case on x86-32. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55078 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify FastISel's constructor argument list, make the FastISelDan Gohman2008-08-203-11/+4
| | | | | | | | | class hold a MachineRegisterInfo member, and make the MachineBasicBlock be passed in to SelectInstructions rather than the FastISel constructor. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55076 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up a dead return missed in r55055.Dan Gohman2008-08-201-3/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55057 91177308-0d34-0410-b5e6-96231b3b80d8
* Tablegen generated code already tests the opcode value, so it's notDan Gohman2008-08-204-247/+183
| | | | | | | necessary to use dyn_cast in these predicates. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55055 91177308-0d34-0410-b5e6-96231b3b80d8
* Use cast instead of dyn_cast.Dan Gohman2008-08-201-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55052 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix comment spacing.Dan Gohman2008-08-201-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55047 91177308-0d34-0410-b5e6-96231b3b80d8
* Add remaining 64-bit atomic patterns for x86-64.Dale Johannesen2008-08-202-0/+60
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55029 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r55018 and apply the correct "fix" for the 64-bit sub_and_fetch atomic.Bill Wendling2008-08-204-51/+5
| | | | | | | Just expand it like the other X-bit sub_and_fetches. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55023 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for the __sync_sub_and_fetch atomics and friends for X86. The codeBill Wendling2008-08-193-6/+54
| | | | | | | | was already present, but not hooked up to anything. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55018 91177308-0d34-0410-b5e6-96231b3b80d8
* Instantiate FastISel for X86.Dan Gohman2008-08-193-2/+56
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55011 91177308-0d34-0410-b5e6-96231b3b80d8
* The X86 target will soon have an implementation of createFastISel.Dan Gohman2008-08-192-0/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55010 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for 8 and 16 bit forms of __syncDale Johannesen2008-08-194-23/+143
| | | | | | | | | | | | builtins on X86. Change "lock" instructions to be on a separate line. This is needed to work around a bug in the Darwin assembler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54999 91177308-0d34-0410-b5e6-96231b3b80d8
* add a noteChris Lattner2008-08-191-0/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54985 91177308-0d34-0410-b5e6-96231b3b80d8
* add a noteChris Lattner2008-08-191-0/+37
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54964 91177308-0d34-0410-b5e6-96231b3b80d8
* remove empty fileChris Lattner2008-08-181-0/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54950 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak cpp backend: upgrade output due to change in APInt APIAnton Korobeynikov2008-08-181-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54942 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM asm printer can't handle dwarf info yet.Evan Cheng2008-08-181-6/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54913 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a (u)comiss intrinsic lowering bug. It was using anyext which can return ↵Evan Cheng2008-08-172-2/+4
| | | | | | junk in higher bits. Patch by Nate Begeman. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54903 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't require Registry specializations to define random static variables.Gordon Henriksen2008-08-171-7/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54902 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename some GC classes so that their roll will hopefully be clearer.Gordon Henriksen2008-08-173-4/+4
| | | | | | | | | | | | | | | | | | 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
* Make it compile on VC2005:Cedric Venet2008-08-175-15/+15
| | | | | | | | - update VC projects. - Add an overload to llvm::Stream for <<, since std::hex and std::dec have type std::ios_base& (*)(std::ios_base&) in VC++. (templating the function don't work, due to ambiguities) - add ../ on several include in X86/AsmPrinter/ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54898 91177308-0d34-0410-b5e6-96231b3b80d8
* Move ARM to pluggable asmprinterAnton Korobeynikov2008-08-175-20/+71
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54889 91177308-0d34-0410-b5e6-96231b3b80d8
* Use correct name for PPC codegen libraryAnton Korobeynikov2008-08-171-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54888 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor out asmprinter out of ppcAnton Korobeynikov2008-08-175-8/+57
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54887 91177308-0d34-0410-b5e6-96231b3b80d8
* Move X86 assembler printers into separate directory. This allows JIT-only ↵Anton Korobeynikov2008-08-1710-8/+55
| | | | | | users not to link it in (use 'x86codegen' llvm-config arg for this) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54886 91177308-0d34-0410-b5e6-96231b3b80d8
* Rework the routines that convert AP[S]Int into a string. Now, instead ofChris Lattner2008-08-171-2/+2
| | | | | | | | | | | | | | | | | | | returning an std::string by value, it fills in a SmallString/SmallVector passed in. This significantly reduces string thrashing in some cases. More specifically, this: - Adds an operator<< and a print method for APInt that allows you to directly send them to an ostream. - Reimplements APInt::toString to be much simpler and more efficient algorithmically in addition to not thrashing strings quite as much. This speeds up llvm-dis on kc++ by 7%, and may also slightly speed up the asmprinter. This also fixes a bug I introduced into the asmwriter in a previous patch w.r.t. alias printing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54873 91177308-0d34-0410-b5e6-96231b3b80d8
* PPC/Linux normally uses named section for bssAnton Korobeynikov2008-08-161-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54847 91177308-0d34-0410-b5e6-96231b3b80d8
* Use proper strings section name for PPCAnton Korobeynikov2008-08-161-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54846 91177308-0d34-0410-b5e6-96231b3b80d8
* Use correct name for TLS address resolution routine on x86-64Anton Korobeynikov2008-08-161-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54845 91177308-0d34-0410-b5e6-96231b3b80d8
* Add interface for section override. Use this for Sparc, since it should use ↵Anton Korobeynikov2008-08-162-4/+11
| | | | | | named BSS section. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54844 91177308-0d34-0410-b5e6-96231b3b80d8
* Move SLEB/ULEB size calculation routines from AsmPrinter to TargetAsmInfo. ↵Anton Korobeynikov2008-08-161-0/+23
| | | | | | This makes JIT asmprinter-free. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54843 91177308-0d34-0410-b5e6-96231b3b80d8
* Reduce heap trashing due to std::string construction / concatenation via ↵Anton Korobeynikov2008-08-166-7/+20
| | | | | | caching of section flags string representations git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54842 91177308-0d34-0410-b5e6-96231b3b80d8
* Build the X86GenFastISel.inc file.Dan Gohman2008-08-141-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54806 91177308-0d34-0410-b5e6-96231b3b80d8
* Also avoid pinsrw and pinsrb with a variable insertelement index.Dan Gohman2008-08-141-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54803 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert uses of std::vector in TargetInstrInfo to SmallVector. This change ↵Owen Anderson2008-08-1416-46/+50
| | | | | | had to be propoagated down into all the targets and up into all clients of this API. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54802 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't try to use the insertps instruction for vectorDan Gohman2008-08-141-1/+1
| | | | | | | | | element inserts with non-constant indices. This fixes CodeGen/X86/vector-variable-idx.ll on machines that have SSE4.1. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54801 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove more uses of std::set.Owen Anderson2008-08-141-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54787 91177308-0d34-0410-b5e6-96231b3b80d8
* Oops, check in these files too, for the FastISel -> Fast rename.Dan Gohman2008-08-131-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54750 91177308-0d34-0410-b5e6-96231b3b80d8
* Removed SELECT_CC custom lowering. This is not needed anymore, the SELECT nodeBruno Cardoso Lopes2008-08-135-76/+127
| | | | | | | | | | | | | | | | | is lowered properly and covers everything LowerSELECT_CC did. Added method printUnsignedImm in AsmPrinter to print uimm16 operands. This avoid the ugly instruction by instruction checking in printOperand. Added a swap instruction present in the allegrex core. Added two conditional instructions present in the allegrex core : MOVZ and MOVN. They both allow a more efficient SELECT operation for integers. Also added SELECT patterns to optimize MOVZ and MOVN usage. The brcond and setcc patterns were cleaned: redundant and suboptimal patterns were removed. The suboptimals were replaced by more efficient ones. Fixed some instructions that were using immZExt16 instead of immSExt16. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54724 91177308-0d34-0410-b5e6-96231b3b80d8
* When resolving a stub in x86-64 JIT, use a PC-relative branchDale Johannesen2008-08-121-2/+14
| | | | | | | | rather than the absolute address if the target is within range. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54708 91177308-0d34-0410-b5e6-96231b3b80d8
* Make x86-64 JIT changes Darwin-specific.Dale Johannesen2008-08-122-6/+23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54700 91177308-0d34-0410-b5e6-96231b3b80d8
* Whitespace cleanup. Test commit.Jim Grosbach2008-08-121-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54695 91177308-0d34-0410-b5e6-96231b3b80d8
* In the absence of a linker to build the GOT, use the 32-bitDale Johannesen2008-08-121-1/+3
| | | | | | | | | non_lazy_ptr mechanism on x86-64 Darwin JIT. Fixes a bunch of last night's failures. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54692 91177308-0d34-0410-b5e6-96231b3b80d8
* Some fixes for x86-64 JIT. Make it use small codeDale Johannesen2008-08-113-15/+35
| | | | | | | | | | | | | | model, except for external calls; this makes addressing modes PC-relative. Incomplete. The assertion at the top of Emitter::runOnMachineFunction was obviously bogus (always true) so I removed it. If someone knows what the correct test should be to cover all the various targets, please fix. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54656 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement ISD::TRAP support on PPCNate Begeman2008-08-114-2/+18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54644 91177308-0d34-0410-b5e6-96231b3b80d8
* move some more stuff out of my email into readme.txtChris Lattner2008-08-101-0/+73
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54603 91177308-0d34-0410-b5e6-96231b3b80d8
* add a noteChris Lattner2008-08-101-0/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54602 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an EXTRACTPSmr pattern to match the pattern thatDan Gohman2008-08-082-0/+8
| | | | | | | X86ISelLowering creates. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54544 91177308-0d34-0410-b5e6-96231b3b80d8
* Properly print flags on SparcAnton Korobeynikov2008-08-081-6/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54543 91177308-0d34-0410-b5e6-96231b3b80d8