aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* MMI may be null.Evan Cheng2008-09-021-1/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55626 91177308-0d34-0410-b5e6-96231b3b80d8
* Add Mac OS X compatible JIT callback routine.Evan Cheng2008-09-021-5/+29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55625 91177308-0d34-0410-b5e6-96231b3b80d8
* Revamp ARM JIT.Evan Cheng2008-09-021-490/+375
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55624 91177308-0d34-0410-b5e6-96231b3b80d8
* Change getBinaryCodeForInstr prototype. First operand MachineInstr& should ↵Evan Cheng2008-09-022-12/+15
| | | | | | be const. Make corresponding changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55623 91177308-0d34-0410-b5e6-96231b3b80d8
* Provide two overloads of AnalyzeNewNode.Gabor Greif2008-09-012-17/+24
| | | | | | | | | | | | The first can update the SDNode in an SDValue while the second is called with SDNode* and returns a possibly updated SDNode*. This patch has no intended functional impact, but helps eliminating ugly temporary SDValues. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55608 91177308-0d34-0410-b5e6-96231b3b80d8
* Even though no caller actually uses the new valueDuncan Sands2008-09-011-1/+2
| | | | | | | | (what matters is that it is added to the worklist), it seems more logical to return it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55606 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a small pass that sets the readnone/readonlyDuncan Sands2008-09-011-0/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | attributes on functions, based on the result of alias analysis. It's not hardwired to use GlobalsModRef even though this is the only (AFAIK) alias analysis that results in this pass actually doing something. Enable as follows: opt ... -globalsmodref-aa -markmodref ... Advantages of this pass: (1) records the result of globalsmodref in the bitcode, meaning it is available for use by later passes (currently the pass manager isn't smart enough to magically make an advanced alias analysis available to all later passes), which may expose more optimization opportunities; (2) hopefully speeds up compilation when code is optimized twice, for example when a file is compiled to bitcode, then later LTO is done on it: marking functions readonly/readnone when producing the initial bitcode should speed up alias analysis during LTO; (3) good for discovering that globalsmodref doesn't work very well :) Not currently turned on by default. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55604 91177308-0d34-0410-b5e6-96231b3b80d8
* Control flow instruction encodings.Evan Cheng2008-09-012-17/+71
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55601 91177308-0d34-0410-b5e6-96231b3b80d8
* ldm / stm instruction encodings.Evan Cheng2008-09-012-6/+28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55599 91177308-0d34-0410-b5e6-96231b3b80d8
* AXI2 and AXI3 instruction encodings.Evan Cheng2008-09-012-10/+94
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55598 91177308-0d34-0410-b5e6-96231b3b80d8
* Reorganize instruction formats again; AXI1 encoding.Evan Cheng2008-09-011-34/+35
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55597 91177308-0d34-0410-b5e6-96231b3b80d8
* addrmode3 instruction encodings.Evan Cheng2008-09-012-42/+208
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55596 91177308-0d34-0410-b5e6-96231b3b80d8
* Reorganize some instruction format definitions. No functionality change.Evan Cheng2008-09-011-18/+29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55594 91177308-0d34-0410-b5e6-96231b3b80d8
* Rest of addrmode2 instruction encodings.Evan Cheng2008-09-012-14/+106
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55593 91177308-0d34-0410-b5e6-96231b3b80d8
* Addr2 word / byte load encodings.Evan Cheng2008-08-312-4/+24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55591 91177308-0d34-0410-b5e6-96231b3b80d8
* Addr1 instructions opcodes are encoded in bits 21-24; encode S bit.Evan Cheng2008-08-311-4/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55590 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a bunch of 80-col violationsGabor Greif2008-08-315-33/+65
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55588 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert the "XFAIL" for the rotate_ops.ll testcase. Instead, mark ISD::ROTRBill Wendling2008-08-311-3/+7
| | | | | | | | | instructions in CellSPU as "Expand" so that they won't be generated. I added a "FIXME" so that this hack can be addressed and reverted once ISD::ROTR is supported in the .td files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55582 91177308-0d34-0410-b5e6-96231b3b80d8
* Expand for ROTR with MVT::i64.Bill Wendling2008-08-311-0/+1
| | | | | | | Dale, Could you please review this? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55581 91177308-0d34-0410-b5e6-96231b3b80d8
* Cosmetic changes to Machine LICM. No functionality change.Bill Wendling2008-08-311-31/+36
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55578 91177308-0d34-0410-b5e6-96231b3b80d8
* Another situation where ROTR is cheaper than ROTL.Bill Wendling2008-08-311-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55577 91177308-0d34-0410-b5e6-96231b3b80d8
* For this pattern, ROTR is the cheaper option.Bill Wendling2008-08-311-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55576 91177308-0d34-0410-b5e6-96231b3b80d8
* - Fix comment so that it describes how the code really works:Bill Wendling2008-08-311-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | // fold (or (shl x, (*ext y)), (srl x, (*ext (sub 32, y)))) -> // (rotl x, y) // fold (or (shl x, (*ext y)), (srl x, (*ext (sub 32, y)))) -> // (rotr x, (sub 32, y)) Example: (x == 0xDEADBEEF and y == 4) (x << 4) | (x >> 28) => 0xEADBEEF0 | 0x0000000D => 0xEADBEEFD (rotl x, 4) => 0xEADBEEFD (rotr x, 28) => 0xEADBEEFD - Fix comment and code for second version. It wasn't using the rot* propertly. // fold (or (shl x, (*ext (sub 32, y))), (srl x, (*ext r))) -> // (rotr x, y) // fold (or (shl x, (*ext (sub 32, y))), (srl x, (*ext r))) -> // (rotl x, (sub 32, y)) (x << 28) | (x >> 4) => 0xD0000000 | 0x0DEADBEE => 0xDDEADBEE (rotl x, 4) => 0xEADBEEFD (rotr x, 28) => (0xEADBEEFD) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55575 91177308-0d34-0410-b5e6-96231b3b80d8
* typoGabor Greif2008-08-301-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55574 91177308-0d34-0410-b5e6-96231b3b80d8
* fix some 80-col violationsGabor Greif2008-08-301-19/+23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55571 91177308-0d34-0410-b5e6-96231b3b80d8
* PR2731: C and Ocaml bindings for setTailCall and isTailCall.Gordon Henriksen2008-08-301-0/+10
| | | | | | Based on patch by Giorgos Korfiatis. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55570 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix ConstantExpr::getInsertElement.Gordon Henriksen2008-08-301-2/+1
| | | | | | | Breakage was exposed in the Ocaml bindings tests after Chris uncommented an assertion in r55084. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55566 91177308-0d34-0410-b5e6-96231b3b80d8
* fix some 80-col violationsGabor Greif2008-08-302-3/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55565 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-apply 55467 with fix. If copy is being replaced by remat'ed def, transfer ↵Evan Cheng2008-08-302-4/+83
| | | | | | the implicit defs onto the remat'ed instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55564 91177308-0d34-0410-b5e6-96231b3b80d8
* Fold isRematerializable checks into isSafeToReMat.Evan Cheng2008-08-301-1/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55563 91177308-0d34-0410-b5e6-96231b3b80d8
* For now, can't mark XOR64rr isAsCheapAsAMove. It's technically correct. But ↵Evan Cheng2008-08-301-1/+1
| | | | | | various passes cannot handle remating these. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55562 91177308-0d34-0410-b5e6-96231b3b80d8
* Transform (x << (y&31)) -> (x << y). This takes advantage of the fact x86 ↵Evan Cheng2008-08-303-0/+116
| | | | | | shift instructions 2nd operand (shift count) is limited to 0 to 31 (or 63 in the x86-64 case). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55558 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix an issue where a use might be selected before a def, and then we didn't ↵Owen Anderson2008-08-301-8/+23
| | | | | | | | | | | | respect the pre-chosen vreg assignment when selecting the def. This is the naive solution to the problem: insert a copy to the pre-chosen vreg. Other solutions might be preferable, such as: 1) Passing the dest reg into FastEmit_. However, this would require the higher level code to know about reg classes, which they don't currently. 2) Selecting blocks in reverse postorder. This has some compile time cost for computing the order, and we'd need to measure its impact. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55555 91177308-0d34-0410-b5e6-96231b3b80d8
* Add ppc partial-word ATOMIC_CMP_SWAP.Dale Johannesen2008-08-301-4/+143
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55554 91177308-0d34-0410-b5e6-96231b3b80d8
* Swap fp comparison operands and change predicate to allow load folding ↵Evan Cheng2008-08-291-16/+50
| | | | | | (safely this time). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55553 91177308-0d34-0410-b5e6-96231b3b80d8
* Use static_cast instead of C style cast.Evan Cheng2008-08-291-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55552 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix 80 col. violations.Evan Cheng2008-08-291-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55551 91177308-0d34-0410-b5e6-96231b3b80d8
* Back out 55498. It broken Apple style bootstrapping.Evan Cheng2008-08-291-106/+81
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55549 91177308-0d34-0410-b5e6-96231b3b80d8
* Backing out 55521. Not safe.Evan Cheng2008-08-293-49/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55548 91177308-0d34-0410-b5e6-96231b3b80d8
* Add partial word version of ATOMIC_SWAP.Dale Johannesen2008-08-291-50/+29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55546 91177308-0d34-0410-b5e6-96231b3b80d8
* Add initial support for fast isel of instructions that have inputs pinned to ↵Owen Anderson2008-08-291-0/+1
| | | | | | physical registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55545 91177308-0d34-0410-b5e6-96231b3b80d8
* regenerateChris Lattner2008-08-293-1455/+1531
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55542 91177308-0d34-0410-b5e6-96231b3b80d8
* Asmprint nameless instructions as:Chris Lattner2008-08-291-1/+8
| | | | | | | | | | | | | | %4 = add ... instead of: add ... ; 4 This makes opt -print-cfg output actually usable and makes .ll files generally easier to read. This fixes PR2480 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55541 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for parsing .ll files that have numbers in front ofChris Lattner2008-08-291-5/+39
| | | | | | | | | | | | nameless values, such as: %3 = add i32 4, 2 This fixes the first half of PR2480 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55539 91177308-0d34-0410-b5e6-96231b3b80d8
* TableGen'ing instruction encodings.Evan Cheng2008-08-291-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55533 91177308-0d34-0410-b5e6-96231b3b80d8
* addrmode1 (data processing) instruction encoding: bits 5-6 are 0, bits 7-10 ↵Evan Cheng2008-08-291-3/+10
| | | | | | encode the opcode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55531 91177308-0d34-0410-b5e6-96231b3b80d8
* MVN is addrmode1.Evan Cheng2008-08-291-7/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55530 91177308-0d34-0410-b5e6-96231b3b80d8
* More refactoring.Evan Cheng2008-08-292-45/+55
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55528 91177308-0d34-0410-b5e6-96231b3b80d8
* Swap fp comparison operands and change predicate to allow load folding.Evan Cheng2008-08-283-5/+49
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55521 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor ARM instruction format definitions into a separate file. No ↵Evan Cheng2008-08-282-215/+232
| | | | | | functionality changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55518 91177308-0d34-0410-b5e6-96231b3b80d8