aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* * Updated the cost matrix normalization proceedure to better handle infinite ↵Lang Hames2010-02-122-13/+21
| | | | | | | | | | | costs. * Enabled R1/R2 application for nodes with infinite spill costs in the Briggs heuristic (made safe by the changes to the normalization proceedure). * Removed a redundant header. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95973 91177308-0d34-0410-b5e6-96231b3b80d8
* add a bunch of mod/rm encoding types for fixed mod/rm bytes.Chris Lattner2010-02-125-0/+61
| | | | | | | | This will work better for the disassembler for modeling things like lfence/monitor/vmcall etc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95960 91177308-0d34-0410-b5e6-96231b3b80d8
* revert r95949, it turns out that adding new prefixes is not a Chris Lattner2010-02-122-10/+10
| | | | | | | great solution for the disassembler, we'll go with "plan b". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95957 91177308-0d34-0410-b5e6-96231b3b80d8
* Added coprocessor Instructions CDP, CDP2, MCR, MCR2, MRC, MRC2, MCRR, MCRR2,Johnny Chen2010-02-121-0/+84
| | | | | | | MRRC, MRRc2. For disassembly only. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95955 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new pass on machine instructions to optimize away PHI cycles that Bob Wilson2010-02-123-0/+143
| | | | | | | | | | | | reduce down to a single value. InstCombine already does this transformation but DAG legalization may introduce new opportunities. This has turned out to be important for ARM where 64-bit values are split up during type legalization: InstCombine is not able to remove the PHI cycles on the 64-bit values but the separate 32-bit values can be optimized. I measured the compile time impact of this (running llc on 176.gcc) and it was not significant. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95951 91177308-0d34-0410-b5e6-96231b3b80d8
* X86: Fix definition for RCL/RCR.*m? operations -- they were getting representedDaniel Dunbar2010-02-122-58/+63
| | | | | | with "tied memory operands", which is wrong. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95950 91177308-0d34-0410-b5e6-96231b3b80d8
* add another bit of space for new kinds of instruction prefixes.Chris Lattner2010-02-122-10/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95949 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a missing pattern for movhps so that we get:Nate Begeman2010-02-121-0/+3
| | | | | | | | | | | | | | | | movq (%ecx,%edx,2), %xmm2 movhps (%ecx,%eax,2), %xmm2 rather than: movq (%eax, %edx, 2), %xmm2 movq (%eax, %ebx, 2), %xmm3 movlhps %xmm3, %xmm2 Testcase forthcoming. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95948 91177308-0d34-0410-b5e6-96231b3b80d8
* fix the encodings of monitor and mwait, which were completelyChris Lattner2010-02-121-7/+2
| | | | | | | | busted in both encoders. I'm not bothering to fix it in the old one at this point. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95947 91177308-0d34-0410-b5e6-96231b3b80d8
* improve support for minix, PR6280, patch byChris Lattner2010-02-122-2/+11
| | | | | | | Kees van Reeuwijk! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95946 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new function attribute, 'alignstack'. It will indicate (when the backendsCharles Davis2010-02-123-0/+34
| | | | | | | | implement support for it) that the stack should be forcibly realigned in the prologue (and the process reversed in the epilogue). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95945 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply coalescer fix for better cross-class coalescing.Jakob Stoklund Olesen2010-02-111-1/+1
| | | | | | This time with fixed test cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95938 91177308-0d34-0410-b5e6-96231b3b80d8
* enhance llvm-mc -show-inst to print the enum of an instruction, like so:Chris Lattner2010-02-114-2/+14
| | | | | | | | | | | | testb %al, %al ## <MCInst #2412 TEST8rr ## <MCOperand Reg:2> ## <MCOperand Reg:2>> jne LBB1_7 ## <MCInst #938 JNE_1 ## <MCOperand Expr:(LBB1_7)>> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95935 91177308-0d34-0410-b5e6-96231b3b80d8
* add a new MCInstPrinter::getOpcodeName interface, when it is Chris Lattner2010-02-113-4/+17
| | | | | | | | implemented, llvm-mc --show-inst now uses it to print the instruction opcode as well as the number. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95929 91177308-0d34-0410-b5e6-96231b3b80d8
* improve encoding information for branches. We now know they haveChris Lattner2010-02-111-15/+14
| | | | | | | | 8 or 32-bit immediates, which allows the new encoder to handle them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95927 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Move assembler-backend's fixup list into the fragment.Daniel Dunbar2010-02-111-40/+22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95926 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Move MCSectionData::Fixup out to MCAsmFixup.Daniel Dunbar2010-02-111-8/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95925 91177308-0d34-0410-b5e6-96231b3b80d8
* make getFixupKindInfo return a const reference, allowingChris Lattner2010-02-113-6/+21
| | | | | | | | the tables to be const. Teach MCCodeEmitter to handle the target-indep kinds so that we don't crash on them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95924 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert functional change. This broke a bunch of tests.Jakob Stoklund Olesen2010-02-111-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95921 91177308-0d34-0410-b5e6-96231b3b80d8
* switch to target-indep fixups for 1/2/4/8 byte data.Chris Lattner2010-02-111-14/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95920 91177308-0d34-0410-b5e6-96231b3b80d8
* revert 95903.Devang Patel2010-02-111-4/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95918 91177308-0d34-0410-b5e6-96231b3b80d8
* It is always good to do a cross-class join when the large register has a ↵Jakob Stoklund Olesen2010-02-111-6/+11
| | | | | | | | tiny interval. Also avoid division by zero. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95917 91177308-0d34-0410-b5e6-96231b3b80d8
* Added LDRT/LDRBT/STRT/STRBT for disassembly only.Johnny Chen2010-02-111-0/+32
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95916 91177308-0d34-0410-b5e6-96231b3b80d8
* unbreak the build.Chris Lattner2010-02-111-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95915 91177308-0d34-0410-b5e6-96231b3b80d8
* Destroy MDNodes while destructing llvm context.Devang Patel2010-02-111-1/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95903 91177308-0d34-0410-b5e6-96231b3b80d8
* refactor the conditional jump instructions in the .td file toChris Lattner2010-02-116-133/+111
| | | | | | | | use a multipattern that generates both the 1-byte and 4-byte versions from the same defm git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95901 91177308-0d34-0410-b5e6-96231b3b80d8
* Forgot to also check in this file for vcvt (floating-point <-> fixed-point, ↵Johnny Chen2010-02-111-0/+9
| | | | | | | | | VFP). Sorry! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95892 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow for more than one DBG_VALUE targeting theDale Johannesen2010-02-111-4/+4
| | | | | | | | same dead instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95890 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't allow DBG_VALUE to affect codegen.Dale Johannesen2010-02-111-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95889 91177308-0d34-0410-b5e6-96231b3b80d8
* Added VCVT (between floating-point and fixed-point, VFP) for disassembly.Johnny Chen2010-02-111-0/+95
| | | | | | | A8.6.297 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95885 91177308-0d34-0410-b5e6-96231b3b80d8
* Added BKPT/tBKPT (breakpoint) to the instruction table for disassembly purpose.Johnny Chen2010-02-112-0/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95884 91177308-0d34-0410-b5e6-96231b3b80d8
* Use array_pod_sort instead of std::sort for improved code size.Jakob Stoklund Olesen2010-02-111-2/+2
| | | | | | | Use SmallVector instead of std::vector for better speed when indirectbr has few successors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95879 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure that ConstantExpr offsets also aren't off of externEric Christopher2010-02-111-2/+8
| | | | | | | | | symbols. Thanks to Duncan Sands for the testcase! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95877 91177308-0d34-0410-b5e6-96231b3b80d8
* Add pseudo instruction TRAP for disassembly, which is encoded according to A5-21Johnny Chen2010-02-111-0/+10
| | | | | | | as the "Permanently UNDEFINED" instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95873 91177308-0d34-0410-b5e6-96231b3b80d8
* Use .empty() instead of .size().Bill Wendling2010-02-111-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95871 91177308-0d34-0410-b5e6-96231b3b80d8
* dont' call getX86RegNum on X86::RIP, it doesn't like that. ThisChris Lattner2010-02-112-3/+7
| | | | | | | fixes the remaining x86-64 jit failures afaik. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95867 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a really nasty bug I introduced in r95693: r12 (and r12d, Chris Lattner2010-02-112-7/+12
| | | | | | | | | | r12b, etc) also encodes to a R/M value of 4, which is just as illegal as ESP/RSP for the non-sib version an address. This fixes x86-64 jit miscompilations of a bunch of programs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95866 91177308-0d34-0410-b5e6-96231b3b80d8
* Add and commonize encoder support for all immediates.Chris Lattner2010-02-111-110/+35
| | | | | | | | | | | | | | | | | Stub out some dummy fixups to make things work. We can now emit fixups like this: subl $20, %esp ## encoding: [0x83,0xec,A] ## fixup A - offset: 2, value: 20, kind: fixup_1byte_imm Emitting $20 as a single-byte fixup to be later resolved by the assembler is ridiculous of course (vs just emitting the byte) but this is a failure of the matcher, which should be producing an imm of 20, not an MCExpr of 20. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95860 91177308-0d34-0410-b5e6-96231b3b80d8
* generalize EmitDisplacementField to work with any sizeChris Lattner2010-02-111-14/+13
| | | | | | | and rename it to EmitImmediate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95859 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate the dead IsPCRel argument.Chris Lattner2010-02-111-9/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95858 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate the dead "PCAdj" logic.Chris Lattner2010-02-111-22/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95857 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some of the memcheck errors found in the JIT unittests.Jeffrey Yasskin2010-02-112-26/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95856 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename ValueRequiresCast to ShouldOptimizeCast, to better reflectChris Lattner2010-02-113-55/+97
| | | | | | | | | | | | | | | what it does. Enhance it to return false to optimizing vector sign extensions from vector comparisions, which is the idiom used to get a splatted vector for a vector comparison. Doing this breaks vector-casts.ll, add some compensating transformations to handle the important case they cover without depending on this canonicalization. This fixes rdar://7434900 a serious pessimization of vector compares. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95855 91177308-0d34-0410-b5e6-96231b3b80d8
* Make DSE only scan blocks that are reachable from the entryChris Lattner2010-02-111-1/+7
| | | | | | | | | | block. Other blocks may have pointer cycles that will crash basicaa and other alias analyses. In any case, there is no point wasting cycles optimizing dead blocks. This fixes rdar://7635088 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95852 91177308-0d34-0410-b5e6-96231b3b80d8
* Make jump threading honor x|undef -> true and x&undef -> false,Chris Lattner2010-02-111-3/+8
| | | | | | | instead of considering x|undef -> x, which may not be true. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95850 91177308-0d34-0410-b5e6-96231b3b80d8
* Add ConstantExpr handling to Intrinsic::objectsize lowering.Eric Christopher2010-02-111-1/+26
| | | | | | | | Update testcase accordingly now that we can optimize another section. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95846 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix to get it to compile.Bill Wendling2010-02-111-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95840 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't print out a default newline when emitting the section offset. There areBill Wendling2010-02-112-2/+1
| | | | | | | almost always comments afterwards that need printing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95839 91177308-0d34-0410-b5e6-96231b3b80d8
* Make it possible to create multiple JIT instances at the same time, by removingJeffrey Yasskin2010-02-113-43/+129
| | | | | | | | | | | the global TheJIT and TheJITResolver variables. Lazy compilation is supported by a global map from a stub address to the JITResolver that knows how to compile it. Patch by Olivier Meurant! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95837 91177308-0d34-0410-b5e6-96231b3b80d8
* Reuse operand location when updating PHI instructions.Jakob Stoklund Olesen2010-02-111-7/+26
| | | | | | | | Calling RemoveOperand is very expensive on huge PHI instructions. This makes early tail duplication run twice as fast on the Firefox JavaScript interpreter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95832 91177308-0d34-0410-b5e6-96231b3b80d8