aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
| * Function::getNumBlockIDs() should be used instead of Function::size() to set ↵Anna Zaks2011-06-161-1/+1
| | | | | | | | | | | | the upper limit on the block IDs since basic blocks might get removed (simplified away) after being initially numbered. Plus the test case, in which SelectionDAGBuilder::visitBr() calls llvm::MachineFunction::removeFromMBBNumbering(), which introduces the hole in numbering leading to an assert in llc (prior to the fix). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133113 91177308-0d34-0410-b5e6-96231b3b80d8
| * The ARC language-specific optimizer. Credit to Dan Gohman.John McCall2011-06-151-0/+4
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133108 91177308-0d34-0410-b5e6-96231b3b80d8
| * Add a new MVT::untyped. This will be used in future work for modelling ISA ↵Owen Anderson2011-06-152-9/+47
| | | | | | | | | | | | features like register pairs and lists with "interesting" constraints (such as ARM NEON contiguous register lists or even-odd paired registers). We need to be able to generate these instructions (often from intrinsics), but don't want to have to assign a legal type to them. Instead, we'll use an "untyped" edge to bypass the type-checking and simply ensure that the register classes match. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133106 91177308-0d34-0410-b5e6-96231b3b80d8
| * Handle jump tables. Test to follow soon.Rafael Espindola2011-06-151-0/+2
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133083 91177308-0d34-0410-b5e6-96231b3b80d8
| * Added -stress-sched flag in the Asserts build.Andrew Trick2011-06-153-15/+55
| | | | | | | | | | | | | | Added a test case for handling physreg aliases during pre-RA-sched. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133063 91177308-0d34-0410-b5e6-96231b3b80d8
| * getZeroExtendInReg needs to get a scalar typeNadav Rotem2011-06-151-1/+2
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133057 91177308-0d34-0410-b5e6-96231b3b80d8
| * Enable the simplification of truncating-store after fixing the usage ofNadav Rotem2011-06-152-4/+5
| | | | | | | | | | | | | | | | | | | | GetDemandBits (which must operate on the vector element type). Fix the a usage of getZeroExtendInReg which must also be done on scalar types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133052 91177308-0d34-0410-b5e6-96231b3b80d8
| * When pattern matching during instruction selection make sure shl x,1 is notChad Rosier2011-06-141-0/+3
| | | | | | | | | | | | | | | | | | converted to add x,x if x is a undef. add undef, undef does not guarantee that the resulting low order bit is zero. Fixes <rdar://problem/9453156> and <rdar://problem/9487392>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133022 91177308-0d34-0410-b5e6-96231b3b80d8
| * Revert r133004 ; it's breaking nightly tests.Eli Friedman2011-06-141-4/+21
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133007 91177308-0d34-0410-b5e6-96231b3b80d8
| * Partial revert of 132882.Rafael Espindola2011-06-141-21/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dan noted that this would work on the case shown on the commit message. I think the case that was failing was a bb ending with a redundant conditional jump: ... jne foo foo: ... I was unable to find any such case in the tests or in a debug build of clang, so I will revert this part of the patch and watch the bots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133004 91177308-0d34-0410-b5e6-96231b3b80d8
| * Add 132986 back, but avoid non-determinism if a bb address gets reused.Rafael Espindola2011-06-142-5/+26
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132995 91177308-0d34-0410-b5e6-96231b3b80d8
| * revert 132986 to see if the bots go green.Rafael Espindola2011-06-142-23/+5
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132988 91177308-0d34-0410-b5e6-96231b3b80d8
| * Add a testcase for checking the integer-promotion of many different vectorNadav Rotem2011-06-142-2/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | types (with power of two types such as 8,16,32 .. 512). Fix a bug in the integer promotion of bitcast nodes. Enable integer expanding only if the target of the conversion is an integer (when the type action is scalarize). Add handling to the legalization of vector load/store in cases where the saved vector is integer-promoted. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132985 91177308-0d34-0410-b5e6-96231b3b80d8
| * Disable trunc-store simplification on vectors.Nadav Rotem2011-06-141-1/+1
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132984 91177308-0d34-0410-b5e6-96231b3b80d8
| * Implement Jakob's suggestion on how to detect fall thought without callingRafael Espindola2011-06-141-12/+19
| | | | | | | | | | | | AnalyzeBranch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132981 91177308-0d34-0410-b5e6-96231b3b80d8
| * Add one more argument to the prefetch intrinsic to indicate whether it's a dataBruno Cardoso Lopes2011-06-141-2/+3
| | | | | | | | | | | | | | or instruction cache access. Update the targets to match it and also teach autoupgrade. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132976 91177308-0d34-0410-b5e6-96231b3b80d8
| * Make the threshold used by branch folding softer. Before we would get aRafael Espindola2011-06-142-5/+23
| | | | | | | | | | | | | | sharp all or nothing transition when one extra predecessor was added. Now we still test first ones for merging. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132974 91177308-0d34-0410-b5e6-96231b3b80d8
| * Fix a bug in FindMemType. When widening vector loads, use a wider memory typeNadav Rotem2011-06-131-0/+2
| | | | | | | | | | | | | | | | | | only if the number of packed elements is a power of two. Bug found in Duncan's testcase. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132923 91177308-0d34-0410-b5e6-96231b3b80d8
| * Be less aggressive about hinting in RAFast.Jakob Stoklund Olesen2011-06-131-7/+5
| | | | | | | | | | | | | | | | | | | | In particular, don't spill dirty registers only to satisfy a hint. It is not worth it. The attached test case provides an example where the fast allocator would spill a register when other registers are available. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132900 91177308-0d34-0410-b5e6-96231b3b80d8
| * Include callee-saved registers in debug output.Jakob Stoklund Olesen2011-06-131-1/+1
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132899 91177308-0d34-0410-b5e6-96231b3b80d8
| * Fix invalid uses of Twine. Hopefully this fixes the problem that Takumi isRafael Espindola2011-06-131-7/+7
| | | | | | | | | | | | having. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132898 91177308-0d34-0410-b5e6-96231b3b80d8
| * Fix a bug in the calculation of the vectorTypeBreakdown into registers. OddNadav Rotem2011-06-121-5/+17
| | | | | | | | | | | | | | | | types such as i33 were rounded to i32. Originated from Duncan's testcase. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132893 91177308-0d34-0410-b5e6-96231b3b80d8
| * Improve the generated code by getCopyFromPartsVector for promoted integer types.Nadav Rotem2011-06-121-21/+20
| | | | | | | | | | | | | | | | | | | | | | Instead of scalarizing, and doing an element-by-element truncat, use vector truncate. Add support for scalarization of vectors: i8 -> <1 x i1> (from Duncan's testcase). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132892 91177308-0d34-0410-b5e6-96231b3b80d8
| * Really fix the fall-through logic.Rafael Espindola2011-06-121-0/+3
| | | | | | | | | | | | Add a triple to the tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132885 91177308-0d34-0410-b5e6-96231b3b80d8
| * Fix silly bug I introduce in the previous commit. Fixes debug builds.Rafael Espindola2011-06-121-3/+3
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132883 91177308-0d34-0410-b5e6-96231b3b80d8
| * AnalyzeBranch doesn't change which successors a bb has, just the orderRafael Espindola2011-06-121-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | we try to branch to them. Before we were creating successor lists with duplicated entries. Fixing that found a bug in isBlockOnlyReachableByFallthrough that would causes it to return the wrong answer for ----------- ... jne foo jmp bar foo: ---------- git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132882 91177308-0d34-0410-b5e6-96231b3b80d8
| * Revert r132871.Chad Rosier2011-06-111-1/+1
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132872 91177308-0d34-0410-b5e6-96231b3b80d8
| * Typo.Chad Rosier2011-06-111-1/+1
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132871 91177308-0d34-0410-b5e6-96231b3b80d8
| * 80-col cleanups.Eric Christopher2011-06-101-6/+5
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132863 91177308-0d34-0410-b5e6-96231b3b80d8
| * Removed tabs. Also fixed my editor...Rafael Espindola2011-06-101-3/+2
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132857 91177308-0d34-0410-b5e6-96231b3b80d8
| * Rename the ParmContext enum values to make a bit more sense and add a smallCameron Zwarich2011-06-101-1/+1
| | | | | | | | | | | | comment on their meaning. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132854 91177308-0d34-0410-b5e6-96231b3b80d8
| * Remove tabs.Cameron Zwarich2011-06-101-2/+2
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132853 91177308-0d34-0410-b5e6-96231b3b80d8
| * Remove a pointless const_cast.Cameron Zwarich2011-06-101-1/+1
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132852 91177308-0d34-0410-b5e6-96231b3b80d8
| * Remove duplicated test.Rafael Espindola2011-06-101-4/+3
| | | | | | | | | | | | Thanks Bob Wilson for noticing it! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132851 91177308-0d34-0410-b5e6-96231b3b80d8
| * Ensure that EmitGlobalVariable is correctly differentiating between declarationsChad Rosier2011-06-101-1/+1
| | | | | | | | | | | | | | | | | | and definitions when emitting global variables. This was causing global declarations to be emitted as if they were definitions. Fixes <rdar://problem/9429892>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132825 91177308-0d34-0410-b5e6-96231b3b80d8
| * Make the optional verification step more strict.Rafael Espindola2011-06-091-1/+8
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132822 91177308-0d34-0410-b5e6-96231b3b80d8
| * Avoid a gcc warning about multiline comments.Rafael Espindola2011-06-091-6/+6
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132821 91177308-0d34-0410-b5e6-96231b3b80d8
| * On last fix to the early tail duplication.Rafael Espindola2011-06-091-4/+60
| | | | | | | | | | | | | | | | With this I am able to bootstrap clang with early tail duplication enabled for any small bb and setting tail-dup-size to a relatively large value(8) to stress this code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132816 91177308-0d34-0410-b5e6-96231b3b80d8
| * Also consider phi nodes when deciding if a register is live out.Rafael Espindola2011-06-091-10/+34
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132814 91177308-0d34-0410-b5e6-96231b3b80d8
| * Change this DAGCombine to build AND of SHR instead of SHR of AND; this ↵Eli Friedman2011-06-091-15/+16
| | | | | | | | | | | | | | | | | | | | matches the ordering we prefer in instcombine. Part of rdar://9562809. The potential DAGCombine which enforces this more generally messes up some other very fragile patterns, so I'm leaving that alone, at least for now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132809 91177308-0d34-0410-b5e6-96231b3b80d8
| * AnalyzeBranch modifies the bb, but we don't want to modify a bb withRafael Espindola2011-06-091-7/+6
| | | | | | | | | | | | eh edges. Swap the order of the checks to avoid it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132806 91177308-0d34-0410-b5e6-96231b3b80d8
| * A PHI in this basic block is a use in another basic block.Rafael Espindola2011-06-091-1/+1
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132805 91177308-0d34-0410-b5e6-96231b3b80d8
| * Refactor some checks into shouldTailDuplicate. Update comments.Rafael Espindola2011-06-091-18/+29
| | | | | | | | | | | | No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132798 91177308-0d34-0410-b5e6-96231b3b80d8
| * Recommit r132764 since it didn't cause the windows buildbot failures.Eric Christopher2011-06-091-0/+2
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132776 91177308-0d34-0410-b5e6-96231b3b80d8
| * Temporarily revert 132764 to see if it fixes the Windows buildbot.Eric Christopher2011-06-091-2/+0
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132771 91177308-0d34-0410-b5e6-96231b3b80d8
| * If the alignment of the byval argument is greater than the alignmentEric Christopher2011-06-091-0/+2
| | | | | | | | | | | | | | | | | | | | of the frame then increase the maximum alignment of the frame to match. Fixes PR6965 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132764 91177308-0d34-0410-b5e6-96231b3b80d8
| * Add a parameter to CCState so that it can access the MachineFunction.Eric Christopher2011-06-083-14/+19
| | | | | | | | | | | | | | | | | | No functional change. Part of PR6965 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132763 91177308-0d34-0410-b5e6-96231b3b80d8
| * Remove a temporary test case probe in CheckForLiveRegDef.Andrew Trick2011-06-081-1/+0
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132751 91177308-0d34-0410-b5e6-96231b3b80d8
| * Fix count.Rafael Espindola2011-06-081-1/+1
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132749 91177308-0d34-0410-b5e6-96231b3b80d8
| * Count how many phis we are creating.Rafael Espindola2011-06-081-0/+2
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132748 91177308-0d34-0410-b5e6-96231b3b80d8