aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Tweak VNInfo printing.Jakob Stoklund Olesen2010-10-051-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115650 91177308-0d34-0410-b5e6-96231b3b80d8
* Add assert for valid slot indexes.Jakob Stoklund Olesen2010-10-051-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115649 91177308-0d34-0410-b5e6-96231b3b80d8
* Use a more efficient lowering of uint64_t --> float that can take advantage ↵Owen Anderson2010-10-051-6/+28
| | | | | | | | | | of hardware signed integer conversion without having to do a double cast (uint64_t --> double --> float). This is based on the algorithm from compiler_rt's __floatundisf for X86-64. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115634 91177308-0d34-0410-b5e6-96231b3b80d8
* This DAG combine BRCOND transformation can look pass truncate of the operand:Evan Cheng2010-10-041-13/+18
| | | | | | | | | | | | | | | | | | | | | // %a = ... // %b = and i32 %a, 2 // %c = srl i32 %b, 1 // brcond i32 %c ... // // into // // %a = ... // %b = and i32 %a, 2 // %c = setcc eq %b, 0 // brcond %c ... Make sure it restores local variable N1, which corresponds to the condition operand if it fails to match. This apparently breaks TCE but since that backend isn't in the tree I don't have a test for it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115571 91177308-0d34-0410-b5e6-96231b3b80d8
* Removed the older style (in-allocator) problem construction system from the ↵Lang Hames2010-10-041-628/+9
| | | | | | PBQP allocator. Problem construction is now done exclusively with the new builders. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115502 91177308-0d34-0410-b5e6-96231b3b80d8
* Stop using LiveRange in MachineVerifier.Jakob Stoklund Olesen2010-10-021-16/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115408 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a miscompile in 186.crafty for Thumb2 that was exposed by Evan'sBob Wilson2010-10-021-10/+14
| | | | | | | | | | | | scheduling change in svn 115121. The CriticalAntiDepBreaker had bad liveness information. It was calculating the KillIndices for one scheduling region in a basic block, rescheduling that region so the KillIndices were no longer valid, and then using those wrong KillIndices to make decisions for the next scheduling region. I've not been able to reduce a small testcase for this. Radar 8502534. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115400 91177308-0d34-0410-b5e6-96231b3b80d8
* Drop the use of LiveInterval::iterator and the LiveRange class inJakob Stoklund Olesen2010-10-011-14/+7
| | | | | | RemoveCopyByCommutingDef. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115386 91177308-0d34-0410-b5e6-96231b3b80d8
* When RemoveCopyByCommutingDef is creating additional identity copies, just useJakob Stoklund Olesen2010-10-012-47/+10
| | | | | | | | | | | LiveInterval::MergeValueNumberInto instead of trying to extend LiveRanges and getting it wrong. This fixed PR8249 where a valno with a multi-segment live range was defined by an identity copy created by RemoveCopyByCommutingDef. Some of the live segments disappeared. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115385 91177308-0d34-0410-b5e6-96231b3b80d8
* Pretty up the debug output during RemoveCopyByCommutingDef.Jakob Stoklund Olesen2010-10-011-19/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115384 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support to let FE mark explict methods as explict in debug info.Devang Patel2010-10-011-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115378 91177308-0d34-0410-b5e6-96231b3b80d8
* Nuke trailing whitespace.Jim Grosbach2010-10-011-28/+28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115377 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread the determination of branch prediction hit rates back through the ↵Owen Anderson2010-10-011-23/+39
| | | | | | | | | | if-conversion heuristic APIs. For now, stick with a constant estimate of 90% (branch predictors are good!), but we might find that we want to provide more nuanced estimates in the future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115364 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix code gen crash reported in PR 8235. We still lose debug info for the ↵Devang Patel2010-10-011-0/+3
| | | | | | unused argument here. This is a known limitation recorded debuginfo-tests/trunk/dbg-declare2.ll function 'f6' test case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115323 91177308-0d34-0410-b5e6-96231b3b80d8
* typoGabor Greif2010-10-011-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115310 91177308-0d34-0410-b5e6-96231b3b80d8
* fix typoChris Lattner2010-10-011-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115300 91177308-0d34-0410-b5e6-96231b3b80d8
* fix rdar://8494845 + PR8244 - a miscompile exposed by my patch in r101350Chris Lattner2010-10-011-0/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115294 91177308-0d34-0410-b5e6-96231b3b80d8
* Massive rewrite of MMX: Dale Johannesen2010-09-301-0/+60
| | | | | | | | | | | | | | | | | | | | | The x86_mmx type is used for MMX intrinsics, parameters and return values where these use MMX registers, and is also supported in load, store, and bitcast. Only the above operations generate MMX instructions, and optimizations do not operate on or produce MMX intrinsics. MMX-sized vectors <2 x i32> etc. are lowered to XMM or split into smaller pieces. Optimizations may occur on these forms and the result casted back to x86_mmx, provided the result feeds into a previous existing x86_mmx operation. The point of all this is prevent optimizations from introducing MMX operations, which is unsafe due to the EMMS problem. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115243 91177308-0d34-0410-b5e6-96231b3b80d8
* When isel is emitting instructions for an x86 target without CMOV, the CFG isJakob Stoklund Olesen2010-09-303-1/+24
| | | | | | | | | | | | | | | | | edited during emission. If the basic block ends in a switch that gets lowered to a jump table, any phis at the default edge were getting updated wrong. The jump table data structure keeps a pointer to the header blocks that wasn't getting updated after the MBB is split. This bug was exposed on 32-bit Linux when disabling critical edge splitting in codegen prepare. The fix is to uipdate stale MBB pointers whenever a block is split during emission. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115191 91177308-0d34-0410-b5e6-96231b3b80d8
* Let FE mark a variable as artificial variable.Devang Patel2010-09-291-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115102 91177308-0d34-0410-b5e6-96231b3b80d8
* Model Cortex-a9 load to SUB, RSB, ADD, ADC, SBC, RSC, CMN, MVN, or CMPEvan Cheng2010-09-292-37/+34
| | | | | | | pipeline forwarding path. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115098 91177308-0d34-0410-b5e6-96231b3b80d8
* Silence msvc warnings.Benjamin Kramer2010-09-291-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115097 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support to let FE encode method access specifier.Devang Patel2010-09-291-1/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115089 91177308-0d34-0410-b5e6-96231b3b80d8
* UnreachableBlockElim could incorrectly return false when it had not modified ↵Owen Anderson2010-09-291-1/+4
| | | | | | the CFG, but HAD modified some PHI nodes. Fixes PR8174. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115083 91177308-0d34-0410-b5e6-96231b3b80d8
* Assign DW_ACCESS_public accessibility attribute to members by default.Devang Patel2010-09-291-1/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115067 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r114997. It was causing a failure on darwin10-selfhost.Bill Wendling2010-09-281-5/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115002 91177308-0d34-0410-b5e6-96231b3b80d8
* Removed a bunch of unnecessary target_link_libraries.Oscar Fuentes2010-09-283-5/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114999 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a FIXME. _foo.eh symbols are currently always exported so that the linkerBill Wendling2010-09-281-13/+5
| | | | | | | knows about them. This is not necessary on 10.6 and later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114997 91177308-0d34-0410-b5e6-96231b3b80d8
* Give the if-converter access to MachineLoopInfo, and use it to generate ↵Owen Anderson2010-09-281-16/+50
| | | | | | | | | plausible branch prediction estimates. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114981 91177308-0d34-0410-b5e6-96231b3b80d8
* Part one of switching to using a more sane heuristic for determining ↵Owen Anderson2010-09-281-4/+4
| | | | | | | | | | | | if-conversion profitability. Rather than having arbitrary cutoffs, actually try to cost model the conversion. For now, the constants are tuned to more or less match our existing behavior, but these will be changed to reflect realistic values as this work proceeds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114973 91177308-0d34-0410-b5e6-96231b3b80d8
* Provide an interface to let FEs anchor debug info for types.Devang Patel2010-09-281-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114969 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead argument.Devang Patel2010-09-272-5/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114920 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't try to make a vector of x86mmx; this won't work,Dale Johannesen2010-09-271-2/+4
| | | | | | | | and asserts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114843 91177308-0d34-0410-b5e6-96231b3b80d8
* the latest assembler that runs on powerpc 10.4 machines doesn'tChris Lattner2010-09-272-2/+24
| | | | | | | | support aligned comm. Detect when compiling for 10.4 and don't emit an alignment for comm. THis will hopefully fix PR8198. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114817 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed some tests to avoid LiveIntervals::getInstructionFromIndex(..) ↵Lang Hames2010-09-263-9/+8
| | | | | | overhead where possible. Thanks to Jakob for the suggestions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114798 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid using VNInfo::getCopy as much as possible. I want to get rid of it.Jakob Stoklund Olesen2010-09-251-10/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114794 91177308-0d34-0410-b5e6-96231b3b80d8
* Removed VNInfo::isDefAccurate(). Def "accuracy" can be checked by testing ↵Lang Hames2010-09-2510-76/+75
| | | | | | whether LiveIntervals::getInstructionFromIndex(def) returns NULL. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114791 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove SlotIndex::PHI_BIT. It is no longer used by anything.Jakob Stoklund Olesen2010-09-253-11/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114779 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the only use of SlotIndex::isPHI. This bit is not being set consistentlyJakob Stoklund Olesen2010-09-251-1/+1
| | | | | | and it will be removed shortly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114778 91177308-0d34-0410-b5e6-96231b3b80d8
* Terminator gaps were unused. Might as well delete them.Jakob Stoklund Olesen2010-09-241-16/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114776 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix for test/CodeGen/PowerPC/2008-10-17-AsmMatchingOperands.ll crash.John Thompson2010-09-241-0/+20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114767 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of pop_macro warnings on MSVC.Michael J. Spencer2010-09-242-6/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114750 91177308-0d34-0410-b5e6-96231b3b80d8
* Attach a DebugLoc to a GC point in order to get precise information in the ↵Nicolas Geoffray2010-09-241-6/+8
| | | | | | JIT of a GC point. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114736 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 114634 for now since buildbot claim it broke Clang self-hosting. I ↵Evan Cheng2010-09-231-4/+6
| | | | | | doubt it but it's possible it's exposing another bug somewhere. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114681 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix VS 2010 build.Oscar Fuentes2010-09-231-4/+4
| | | | | | Patch by Nathan Jeffords! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114661 91177308-0d34-0410-b5e6-96231b3b80d8
* Follow up to r114630. Do not optimize away unconditional branch following a ↵Evan Cheng2010-09-231-6/+4
| | | | | | conditional one. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114634 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't sink insert_subreg, subreg_to_reg, reg_sequence. They are meant to beEvan Cheng2010-09-231-1/+10
| | | | | | | close to their sources to facilitate coalescing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114631 91177308-0d34-0410-b5e6-96231b3b80d8
* SDISel should not optimize a unconditional branch following a conditional branchEvan Cheng2010-09-231-4/+5
| | | | | | | | | | | | | when the unconditional branch destination is the fallthrough block. The canonicalization makes it easier to allow optimizations on DAGs to invert conditional branches. The branch folding pass (and AnalyzeBranch) will clean up the unnecessary unconditional branches later. This is one of the patches leading up to disabling codegen prepare critical edge splitting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114630 91177308-0d34-0410-b5e6-96231b3b80d8
* Moved the PBQP allocator class out of the header and back in to the cpp file ↵Lang Hames2010-09-231-60/+190
| | | | | | | | | | | | | | | | to hide the gory details. Allocator instances can now be created by calling createPBQPRegisterAllocator. Tidied up use of CoalescerPair as per Jakob's suggestions. Made the new PBQPBuilder based construction process the default. The internal construction process remains in-place and available via -pbqp-builder=false for now. It will be removed shortly if the new process doesn't cause any regressions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114626 91177308-0d34-0410-b5e6-96231b3b80d8
* A select between a constant and zero, when fed by a bit test, can be efficientlyOwen Anderson2010-09-221-0/+29
| | | | | | | | lowered using a series of shifts. Fixes <rdar://problem/8285015>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114599 91177308-0d34-0410-b5e6-96231b3b80d8