aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add the AddLandingPadInfo function.Bill Wendling2011-07-282-0/+39
| | | | | | | | AddLandingPadInfo takes a landingpad instruction and grabs all of the information from it that it needs for EH table generation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136429 91177308-0d34-0410-b5e6-96231b3b80d8
* Change LBH_TAKEN_WEIGHT to 124 (from 128). Right now, sum ofJakub Staszak2011-07-281-4/+4
| | | | | | | | | LBH_TAKEN_WEIGHT + LBH_NONTAKEN_WEIGHT = 128 which in _most_ cases reduce number of rounding errors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136428 91177308-0d34-0410-b5e6-96231b3b80d8
* PLD and PLI are not predicable in ARM mode.Jim Grosbach2011-07-281-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136427 91177308-0d34-0410-b5e6-96231b3b80d8
* CBZ/CBNZ are Thumb2 only. No need for ARM mode tests for them.Jim Grosbach2011-07-281-4/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136408 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM assembly parsing and encoding for BLX (immediate).Jim Grosbach2011-07-283-3/+16
| | | | | | | | | Add parsing support for BLX (immediate). Since the register operand version is predicated and the label operand version is not, we have to use some special handling to get the operand list right for matching. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136406 91177308-0d34-0410-b5e6-96231b3b80d8
* Enhance the fixed-length decoder emitter to support parsing scattered fields.Owen Anderson2011-07-282-80/+111
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136405 91177308-0d34-0410-b5e6-96231b3b80d8
* LangRef and basic memory-representation/reading/writing for 'cmpxchg' andEli Friedman2011-07-2818-43/+946
| | | | | | | | | | | | | | | | | | | | | | | 'atomicrmw' instructions, which allow representing all the current atomic rmw intrinsics. The allowed operands for these instructions are heavily restricted at the moment; we can probably loosen it a bit, but supporting general first-class types (where it makes sense) might get a bit complicated, given how SelectionDAG works. As an initial cut, these operations do not support specifying an alignment, but it would be possible to add if we think it's useful. Specifying an alignment lower than the natural alignment would be essentially impossible to support on anything other than x86, but specifying a greater alignment would be possible. I can't think of any useful optimizations which would use that information, but maybe someone else has ideas. Optimizer/codegen support coming soon. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136404 91177308-0d34-0410-b5e6-96231b3b80d8
* If run with -debug give more information about Cyclic Probability.Jakub Staszak2011-07-281-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136403 91177308-0d34-0410-b5e6-96231b3b80d8
* Heuristics are in descending priority now. If we use one of them, skip the rest.Jakub Staszak2011-07-281-13/+23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136402 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle REG_SEQUENCE with implicitly defined operands.Jakob Stoklund Olesen2011-07-282-0/+27
| | | | | | | | | | | | | Code like that would only be produced by bugpoint, but we should still handle it correctly. When a register is defined by a REG_SEQUENCE of undefs, the register itself is undef. Previously, we would create a register with uses but no defs. Fixes part of PR10520. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136401 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove obsolete FIXME reference in comment.Jim Grosbach2011-07-281-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136400 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM assembly parsing and encoding for BFC and BFI.Jim Grosbach2011-07-283-2/+130
| | | | | | | | Add parsing support that handles converting the lsb+width source into the odd way we represent the instruction (an inverted bitfield mask). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136399 91177308-0d34-0410-b5e6-96231b3b80d8
* Add InEdges (edges from header to the loop) in Loop Branch Heuristics, soJakub Staszak2011-07-281-0/+17
| | | | | | | | there is no frequency difference whether condition is in the header or in the latch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136398 91177308-0d34-0410-b5e6-96231b3b80d8
* Use ArrayRef instead of requiring an std::vector.Bill Wendling2011-07-282-6/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136396 91177308-0d34-0410-b5e6-96231b3b80d8
* The personality function should be a Function* and not just a Value*.Bill Wendling2011-07-287-16/+23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136392 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix Clang attribute reader tblgen output for a corresponding fix on the ↵Douglas Gregor2011-07-282-4/+7
| | | | | | Clang side git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136390 91177308-0d34-0410-b5e6-96231b3b80d8
* Reverse order of RS_Split live ranges under -compact-regions.Jakob Stoklund Olesen2011-07-281-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two conflicting strategies in play: - Under high register pressure, we want to assign large live ranges first. Smaller live ranges are easier to place afterwards. - Live range splitting is guided by interference, so splitting should be deferred until interference is as realistic as possible. With the recent changes to the live range stages, and with compact regions enabled, it is less traumatic to split a live range too early. If some of the split products were too big, they can often be split again. By reversing the RS_Split order, we get this queue order: 1. Normal live ranges, large to small. 2. RS_Split live ranges, large to small. The large-to-small order improves RAGreedy's puzzle solving skills under high register pressure. It may cause a bit more iterated splitting, but we handle that better now. With this change, -compact-regions is mostly an improvement on SPEC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136388 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial code to convert ResumeInsts into calls to _Unwind_Resume.Bill Wendling2011-07-281-1/+57
| | | | | | | This should be the only code necessary for DWARF EH prepare. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136387 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix stupid mistake from commit 136381.Jakub Staszak2011-07-281-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136384 91177308-0d34-0410-b5e6-96231b3b80d8
* Speed up BlockFrequencyInfo a little bit.Jakub Staszak2011-07-281-1/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136381 91177308-0d34-0410-b5e6-96231b3b80d8
* Add fixme.Jim Grosbach2011-07-281-1/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136375 91177308-0d34-0410-b5e6-96231b3b80d8
* Use version 402 for the GCDA files when compiling for Apple.Bill Wendling2011-07-281-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136369 91177308-0d34-0410-b5e6-96231b3b80d8
* Update comments.Owen Anderson2011-07-281-18/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136367 91177308-0d34-0410-b5e6-96231b3b80d8
* Fill in some encoding information for STRD instructions.Owen Anderson2011-07-281-3/+32
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136366 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r136295. It broke nightly testers because some parts of codegen ↵Owen Anderson2011-07-283-41/+23
| | | | | | weren't aware of the changes to operand ordering. I hope to revive this sometime in the future, but it's not strictly necessary for now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136362 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM parsing and encoding for ADR.Jim Grosbach2011-07-282-2/+14
| | | | | | | The label does not have a '#' prefix. Add parsing and encoding tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136360 91177308-0d34-0410-b5e6-96231b3b80d8
* Update ARM tests for parsing and encoding of WFE, WFI and YIELD.Jim Grosbach2011-07-282-9/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136358 91177308-0d34-0410-b5e6-96231b3b80d8
* CR fix: The ANY_EXTEND can be removed because the input and putput type must beNadav Rotem2011-07-281-2/+1
| | | | | | | | identical. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136355 91177308-0d34-0410-b5e6-96231b3b80d8
* Use unsigned rather than uint16_t in case anyone feels like testingDuncan Sands2011-07-281-4/+4
| | | | | | | | | | more graphs, like all graphs with 5 nodes or less. With a 32 bit unsigned type, the maximum is graphs with 6 nodes or less, but that would take a while to test - 5 nodes or less already requires a few seconds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136354 91177308-0d34-0410-b5e6-96231b3b80d8
* Check an additional property specific to the way LLVMDuncan Sands2011-07-281-0/+15
| | | | | | | iterates over SCC's. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136353 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a unittest for the simply connected components (SCC) iterator class.Duncan Sands2011-07-281-0/+335
| | | | | | | | | This computes every graph with 4 or fewer nodes, and checks that the SCC class indeed returns exactly the simply connected components reachable from the initial node. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136351 91177308-0d34-0410-b5e6-96231b3b80d8
* Due to changes coming from the new LLVM type system, you now getDuncan Sands2011-07-281-1/+2
| | | | | | | | bitcasts in this test rather than getelementptr instructions; llvm-gcc produces two bitcasts, clang produces one. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136349 91177308-0d34-0410-b5e6-96231b3b80d8
* This file was moved from Support to ADT. Correct a comment.Duncan Sands2011-07-281-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136344 91177308-0d34-0410-b5e6-96231b3b80d8
* Some minor cleanups. No functionalitical change.Bill Wendling2011-07-281-17/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136341 91177308-0d34-0410-b5e6-96231b3b80d8
* Leverage some of the code that John wrote to manage the landing pads.Bill Wendling2011-07-281-32/+56
| | | | | | | | The new EH is more simple in many respects. Mainly, we don't have to worry about the "llvm.eh.exception" and "llvm.eh.selector" calls being in weird places. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136339 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't add in the asked for size so that we don't copy too much from the old ↵Bill Wendling2011-07-281-3/+3
| | | | | | to new vectors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136338 91177308-0d34-0410-b5e6-96231b3b80d8
* In DenseMapInfo<pair<T, U>> tombstone key, use the tombstone for T and U insteadNick Lewycky2011-07-281-2/+2
| | | | | | | | | of the empty key for U. This shouldn't really matter because the tombstone key for the pair was still distinct from every other key, but it is odd. Patch by Michael Ilseman! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136336 91177308-0d34-0410-b5e6-96231b3b80d8
* Automatically merge the landingpad clauses when we come across a callee'sBill Wendling2011-07-281-28/+12
| | | | | | | landingpad. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136329 91177308-0d34-0410-b5e6-96231b3b80d8
* Explicitly declare a library dependency of LLVM*Desc toOscar Fuentes2011-07-286-0/+12
| | | | | | | | | | | | | | | | | | | LLVM*AsmPrinter. GenLibDeps.pl fails to detect vtable references. As this is the only referenced symbol from LLVM*Desc to LLVM*AsmPrinter on optimized builds, the algorithm that creates the list of libraries to be linked into tools doesn't know about the dependency and sometimes places the libraries on the wrong order, yielding error messages like this: ../../lib/libLLVMARMDesc.a(ARMMCTargetDesc.cpp.o): In function `llvm::ARMInstPrinter::ARMInstPrinter(llvm::MCAsmInfo const&)': ARMMCTargetDesc.cpp:(.text._ZN4llvm14ARMInstPrinterC1ERKNS_9MCAsmInfoE [llvm::ARMInstPrinter::ARMInstPrinter(llvm::MCAsmInfo const&)]+0x2a): undefined reference to `vtable for llvm::ARMInstPrinter' git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136328 91177308-0d34-0410-b5e6-96231b3b80d8
* Updated cmake library dependencies.Oscar Fuentes2011-07-281-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136327 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure that the landingpad instruction takes a Constant* as the clause's ↵Bill Wendling2011-07-285-10/+11
| | | | | | value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136326 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a couple of convenience functions:Bill Wendling2011-07-282-0/+25
| | | | | | | | * InvokeInst: Get the landingpad instruction associated with this invoke. * LandingPadInst: A method to reserve extra space for clauses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136325 91177308-0d34-0410-b5e6-96231b3b80d8
* Invert the subvector insertion to be more likely to be taken as a COPYBruno Cardoso Lopes2011-07-281-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136324 91177308-0d34-0410-b5e6-96231b3b80d8
* Add patterns to generate copies for extract_subvector instead ofBruno Cardoso Lopes2011-07-282-3/+15
| | | | | | | using vextractf128. This will reduce the number of issued instruction for several avx codes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136323 91177308-0d34-0410-b5e6-96231b3b80d8
* movd/movq write zeros in the high 128-bit part of the vector. UseBruno Cardoso Lopes2011-07-281-2/+28
| | | | | | them to match 256-bit scalar_to_vector+zext. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136322 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a few patterns to match allzeros without having to use the fp unit.Bruno Cardoso Lopes2011-07-282-1/+11
| | | | | | | Take advantage that the 128-bit vpxor zeros the higher part and use it. This also fixes PR10491 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136321 91177308-0d34-0410-b5e6-96231b3b80d8
* Add SINT_TO_FP and FP_TO_SINT support for v8i32 types. Also moveBruno Cardoso Lopes2011-07-283-7/+27
| | | | | | a convert pattern close to the instruction definition. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136320 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a use after free. An instruction can't be both an intrinsic call and a ↵Benjamin Kramer2011-07-281-1/+1
| | | | | | fence. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136319 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial stab at getting inlining working with the EH rewrite.Bill Wendling2011-07-281-10/+98
| | | | | | | | | | This takes the new 'resume' instruction and turns it into a direct jump to the caller's landing pad code. The caller's landingpad instruction is merged with the landingpad instructions of the callee. This is a bit rough and makes some assumptions in how the code works. But it passes a simple test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136313 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM parsing and encoding tests.Jim Grosbach2011-07-281-0/+112
| | | | | | | UXTAB, UXTAB16, UXTAH, UXTB, UXTB16, and UXTH. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136312 91177308-0d34-0410-b5e6-96231b3b80d8