aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Speed up codegen prepare from 3.58s to 0.488s.Chris Lattner2010-02-131-19/+52
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96081 91177308-0d34-0410-b5e6-96231b3b80d8
* PHINode::getBasicBlockIndex is O(n) in the number of inputsChris Lattner2010-02-131-3/+10
| | | | | | | | | to a PHI, avoid it in the common case where the BB occurs in the same index for multiple phis. This speeds up CGP on an insane testcase from 8.35 to 3.58s. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96080 91177308-0d34-0410-b5e6-96231b3b80d8
* iterate over preds using PHI information when available instead ofChris Lattner2010-02-131-6/+14
| | | | | | | using pred_begin/end. It is much faster. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96079 91177308-0d34-0410-b5e6-96231b3b80d8
* speed up CGP a bit by scanning predecessors through phi operandsChris Lattner2010-02-131-22/+22
| | | | | | | instead of with pred_begin/end. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96078 91177308-0d34-0410-b5e6-96231b3b80d8
* add encoder support and tests for rdtscpChris Lattner2010-02-134-1/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96076 91177308-0d34-0410-b5e6-96231b3b80d8
* Add SETEND and BXJ instructions for disassembly only.Johnny Chen2010-02-131-0/+28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96075 91177308-0d34-0410-b5e6-96231b3b80d8
* Added the rdtscp instruction to the x86 instructionSean Callanan2010-02-133-2/+6
| | | | | | | tables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96073 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR6283.Jakob Stoklund Olesen2010-02-133-19/+298
| | | | | | | | | | | When coalescing with a physreg, remember to add imp-def and imp-kill when dealing with sub-registers. Also fix a related bug in VirtRegRewriter where substitutePhysReg may reallocate the operand list on an instruction and invalidate the reg_iterator. This can happen when a register is mentioned twice on the same instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96072 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a pruning heuristic which implicitly assumed that SmallPtrSet isDan Gohman2010-02-131-45/+68
| | | | | | | deterministically sorted. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96071 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach MachineFrameInfo to track maximum alignment while stack objects are beingEvan Cheng2010-02-134-39/+6
| | | | | | | | | | | created. This ensures it's updated at all time. It means targets which perform dynamic stack alignment would know whether it is required and whether frame pointer register cannot be made available register allocation. This is a fix for rdar://7625239. Sorry, I can't create a reasonably sized test case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96069 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable the inlinehint attribute in the Inliner.Jakob Stoklund Olesen2010-02-131-13/+12
| | | | | | | | | | | | | | | | | | | | Functions explicitly marked inline will get an inlining threshold slightly more aggressive than the default for -O3. This means than -O3 builds are mostly unaffected while -Os builds will be a bit bigger and faster. The difference depends entirely on how many 'inline's are sprinkled on the source. In the CINT2006 suite, only these tests are significantly affected under -Os: Size Time 471.omnetpp +1.63% -1.85% 473.astar +4.01% -6.02% 483.xalancbmk +4.60% 0.00% Note that 483.xalancbmk runs too quickly to give useful timing results. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96066 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed encodings for invlpg, invept, and invvpid.Sean Callanan2010-02-132-35/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96065 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/AsmParser: Attempt to constant fold expressions up-front. This ensures we ↵Daniel Dunbar2010-02-134-12/+26
| | | | | | avoid fixups for obvious cases like '-(16)'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96064 91177308-0d34-0410-b5e6-96231b3b80d8
* Added a bunch of saturating add/subtract instructions for disassembly only.Johnny Chen2010-02-131-0/+72
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96063 91177308-0d34-0410-b5e6-96231b3b80d8
* rip out the 'heinous' x86 MCCodeEmitter implementation.Chris Lattner2010-02-135-340/+4
| | | | | | | | We still have the templated X86 JIT emitter, *and* the almost-copy in X86InstrInfo for getting instruction sizes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96059 91177308-0d34-0410-b5e6-96231b3b80d8
* remove special cases for vmlaunch, vmresume, vmxoff, and swapgsChris Lattner2010-02-138-21/+73
| | | | | | | fix swapgs to be spelled right. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96058 91177308-0d34-0410-b5e6-96231b3b80d8
* Besides removing phi cycles that reduce to a single value, also remove deadBob Wilson2010-02-136-25/+114
| | | | | | | | | phi cycles. Adjust a few tests to keep dead instructions from being optimized away. This (together with my previous change for phi cycles) fixes Apple radar 7627077. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96057 91177308-0d34-0410-b5e6-96231b3b80d8
* Override dominates and properlyDominates for SCEVAddRecExpr, as aDan Gohman2010-02-132-0/+19
| | | | | | | | SCEVAddRecExpr doesn't necessarily dominate blocks merely dominated by all of its operands. This fixes an abort compiling 403.gcc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96056 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/X86: Push immediate operands as immediates not expressions when possible.Daniel Dunbar2010-02-134-20/+24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96055 91177308-0d34-0410-b5e6-96231b3b80d8
* Make PassRegistrar thread-safe since it can be modified by code running inJeffrey Yasskin2010-02-131-0/+9
| | | | | | | separate LLVMContexts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96051 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove special cases for [LM]FENCE, MONITOR and MWAIT fromChris Lattner2010-02-124-41/+9
| | | | | | | encoder and decoder by using new MRM_ forms. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96048 91177308-0d34-0410-b5e6-96231b3b80d8
* add some disassemble testcases for weird instructionsChris Lattner2010-02-121-0/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96045 91177308-0d34-0410-b5e6-96231b3b80d8
* Reworked the Intel disassembler to support instructionsSean Callanan2010-02-121-17/+51
| | | | | | | | | | | | | whose opcodes extend into the ModR/M field using the Form field of the instruction rather than by special casing each instruction. Commented out the special casing of VMCALL, which is the first instruction to use this special form. While I was in the neighborhood, added a few comments for people modifying the Intel disassembler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96043 91177308-0d34-0410-b5e6-96231b3b80d8
* implement the rest of correct x86-64 encoder support for Chris Lattner2010-02-122-5/+39
| | | | | | | rip-relative addresses, and add a testcase. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96040 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the problem I just hacked around in 96015/96020.Dale Johannesen2010-02-121-0/+17
| | | | | | | | | The solution there produces correct code, but is seriously deficient in several ways. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96039 91177308-0d34-0410-b5e6-96231b3b80d8
* give MCCodeEmitters access to the current MCContext.Chris Lattner2010-02-126-16/+25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96038 91177308-0d34-0410-b5e6-96231b3b80d8
* Make JIT::runFunction clean up the generated stub function.Jeffrey Yasskin2010-02-121-2/+6
| | | | | | | Patch by Shivram K! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96037 91177308-0d34-0410-b5e6-96231b3b80d8
* implement infrastructure to support fixups for rip-rel Chris Lattner2010-02-122-13/+32
| | | | | | | | addressing. This isn't complete because I need an MCContext to generate new MCExprs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96036 91177308-0d34-0410-b5e6-96231b3b80d8
* Add YIELD, WFE, WFI, and SEV instructions for disassembly only.Johnny Chen2010-02-122-5/+36
| | | | | | | | Plus add two formats: MiscFrm and ThumbMiscFrm. Some of the for disassembly only instructions are changed from Pseudo Format to MiscFrm Format. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96032 91177308-0d34-0410-b5e6-96231b3b80d8
* pull the rip-relative addressing mode case up early.Chris Lattner2010-02-121-5/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96031 91177308-0d34-0410-b5e6-96231b3b80d8
* fixme resolved!Chris Lattner2010-02-121-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96029 91177308-0d34-0410-b5e6-96231b3b80d8
* start producing reloc_pcrel_4byte/reloc_pcrel_1byte for calls.Chris Lattner2010-02-121-23/+28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96028 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a comment typo.Bob Wilson2010-02-121-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96027 91177308-0d34-0410-b5e6-96231b3b80d8
* enhance the immediate field encoding to know whether the immediateChris Lattner2010-02-123-23/+59
| | | | | | | is pc relative or not, mark call and branches as pcrel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96026 91177308-0d34-0410-b5e6-96231b3b80d8
* Load / store multiple instructions cannot load / store sp. Sorry, can't come ↵Evan Cheng2010-02-121-1/+2
| | | | | | up with a reasonable test case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96023 91177308-0d34-0410-b5e6-96231b3b80d8
* This should have gone in with 26015, see comments there.Dale Johannesen2010-02-121-0/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96020 91177308-0d34-0410-b5e6-96231b3b80d8
* Add halfword multiply accumulate long SMLALBB/BT/TB/TT for disassembly only.Johnny Chen2010-02-121-1/+33
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96019 91177308-0d34-0410-b5e6-96231b3b80d8
* doxygenize some comments, patch by Peter Collingbourne!Chris Lattner2010-02-123-53/+53
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96018 91177308-0d34-0410-b5e6-96231b3b80d8
* When save/restoring CR at prolog/epilog, in a largeDale Johannesen2010-02-122-14/+60
| | | | | | | | | | | | | | | | | | | stack frame, the prolog/epilog code was using the same register for the copy of CR and the address of the save slot. Oops. This is fixed here for Darwin, sort of, by reserving R2 for this case. A better way would be to do the store before the decrement of SP, which is safe on Darwin due to the red zone. SVR4 probably has the same problem, but I don't know how to fix it; there is no red zone and R2 is already used for something else. I'm going to leave it to someone interested in that target. Better still would be to rewrite the CR-saving code completely; spilling each CR subregister individually is horrible code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96015 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for a union type in LLVM IR. Patch by Talin!Chris Lattner2010-02-1224-59/+612
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96011 91177308-0d34-0410-b5e6-96231b3b80d8
* Add SWP (Swap) and SWPB (Swap Byte) for disassembly only.Johnny Chen2010-02-121-0/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96010 91177308-0d34-0410-b5e6-96231b3b80d8
* Also recognize armv6t2-* and armv5te-* triplets.Evan Cheng2010-02-121-5/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96008 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a case of mismatched types in an Add that turned up in 447.dealII.Dan Gohman2010-02-121-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96007 91177308-0d34-0410-b5e6-96231b3b80d8
* Add ARM bitcode file magic.Evan Cheng2010-02-121-3/+32
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96006 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply 95979, a compile-time speedup, now that the bug it exposed is fixed.Dan Gohman2010-02-121-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96005 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix this code to avoid dereferencing an end() iterator inDan Gohman2010-02-121-1/+5
| | | | | | | offset distributions it doesn't expect. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96002 91177308-0d34-0410-b5e6-96231b3b80d8
* Add CPS, MRS, MRSsys, MSR, MSRsys for disassembly only.Johnny Chen2010-02-121-0/+44
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95999 91177308-0d34-0410-b5e6-96231b3b80d8
* Rewrite handling of DBG_VALUE; previous algorithmDale Johannesen2010-02-121-16/+24
| | | | | | | | | | | | | didn't handle X = Y<dead> = use X DBG_VALUE(X) I was hoping to avoid this approach as it's slower, but I don't think it can be done. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95996 91177308-0d34-0410-b5e6-96231b3b80d8
* 1. modernize the constantmerge pass, using densemap/smallvector.Chris Lattner2010-02-122-29/+46
| | | | | | | | | | | 2. don't bother trying to merge globals in non-default sections, doing so is quite dubious at best anyway. 3. fix a bug reported by Arnaud de Grandmaison where we'd try to merge two globals in different address spaces. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95995 91177308-0d34-0410-b5e6-96231b3b80d8
* rename testChris Lattner2010-02-121-0/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95993 91177308-0d34-0410-b5e6-96231b3b80d8