aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2005-09-12new testcaseChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23323 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-12Another load-peephole optimization: do gcse when two loads are next toChris Lattner
each other. This implements InstCombine/load.ll:test9 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23322 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-12new testcaseChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23321 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-12Implement a trivial form of store->load forwarding where the store and theChris Lattner
load are exactly consequtive. This is picked up by other passes, but this triggers thousands of times in fortran programs that use static locals (and is thus a compile-time speedup). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23320 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-12new testcaseChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23319 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-12Fix a regression from last night, which caused this pass to create invalidChris Lattner
code for IV uses outside of loops that are not dominated by the latch block. We should only convert these uses to use the post-inc value if they ARE dominated by the latch block. Also use a new LoopInfo method to simplify some code. This fixes Transforms/LoopStrengthReduce/2005-09-12-UsesOutOutsideOfLoop.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23318 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-12relax pattern match on nameChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23317 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-12new testcaseChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23316 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-12Add a new getLoopLatch() method.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23315 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-12new methodChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23314 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-12_test:Chris Lattner
li r2, 0 LBB_test_1: ; no_exit.2 li r5, 0 stw r5, 0(r3) addi r2, r2, 1 addi r3, r3, 4 cmpwi cr0, r2, 701 blt cr0, LBB_test_1 ; no_exit.2 LBB_test_2: ; loopexit.2.loopexit addi r2, r2, 1 stw r2, 0(r4) blr [zion ~/llvm]$ cat > ~/xx Uses of IV's outside of the loop should use hte post-incremented version of the IV, not the preincremented version. This helps many loops (e.g. in sixtrack) which used to generate code like this (this is the code from the dont-hoist-simple-loop-constants.ll testcase): _test: li r2, 0 **** IV starts at 0 LBB_test_1: ; no_exit.2 or r5, r2, r2 **** Copy for loop exit li r2, 0 stw r2, 0(r3) addi r3, r3, 4 addi r2, r5, 1 addi r6, r5, 2 **** IV+2 cmpwi cr0, r6, 701 blt cr0, LBB_test_1 ; no_exit.2 LBB_test_2: ; loopexit.2.loopexit addi r2, r5, 2 **** IV+2 stw r2, 0(r4) blr And now generated code like this: _test: li r2, 1 *** IV starts at 1 LBB_test_1: ; no_exit.2 li r5, 0 stw r5, 0(r3) addi r2, r2, 1 addi r3, r3, 4 cmpwi cr0, r2, 701 *** IV.postinc + 0 blt cr0, LBB_test_1 LBB_test_2: ; loopexit.2.loopexit stw r2, 0(r4) *** IV.postinc + 0 blr git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23313 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-12new testcaseChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23312 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-12RegenerateChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23311 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-12Rearrange two rules, which apparently makes some versions of bison happier.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23310 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-11Make sure to disable 64-bit extensions for this testChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23309 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-10Fix more Visual Studio build problems.Jeff Cohen
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23308 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-10Fix miscellaneous Visual Studio build problems.Jeff Cohen
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23307 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-10implement Transforms/LoopStrengthReduce/dont-hoist-simple-loop-constants.ll.Chris Lattner
We used to emit this code for it: _test: li r2, 1 ;; Value tying up a register for the whole loop li r5, 0 LBB_test_1: ; no_exit.2 or r6, r5, r5 li r5, 0 stw r5, 0(r3) addi r5, r6, 1 addi r3, r3, 4 add r7, r2, r5 ;; should be addi r7, r5, 1 cmpwi cr0, r7, 701 blt cr0, LBB_test_1 ; no_exit.2 LBB_test_2: ; loopexit.2.loopexit addi r2, r6, 2 stw r2, 0(r4) blr now we emit this: _test: li r2, 0 LBB_test_1: ; no_exit.2 or r5, r2, r2 li r2, 0 stw r2, 0(r3) addi r3, r3, 4 addi r2, r5, 1 addi r6, r5, 2 ;; whoa, fold those adds! cmpwi cr0, r6, 701 blt cr0, LBB_test_1 ; no_exit.2 LBB_test_2: ; loopexit.2.loopexit addi r2, r5, 2 stw r2, 0(r4) blr more improvement coming. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23306 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-10new testcaseChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23305 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-10PowerPC cannot truncstore i1 nativelyChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23304 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-10Allow targets to say they don't support truncstore i1 (which includes a maskChris Lattner
when storing to an 8-bit memory location), as most don't. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23303 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-09Add a missing #include, patch courtesy of Baptiste Lepilleur.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23302 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-09Fix a problem duraid encountered on itanium where this folding:Chris Lattner
select (x < y), 1, 0 -> (x < y) incorrectly: the setcc returns i1 but the select returned i32. Add the zero extend as needed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23301 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-09Fix a crash viewing dags that have target nodes in themChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23300 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-09I forgot that we always spill fp values as 64-bits. Implement spill foldingChris Lattner
for FP as well. This triggers a couple dozen times on 177.mesa (for example). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23299 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-09Fix a problem that Nate noticed, where spill code was not getting coallescedChris Lattner
with copies, leading to code like this: lwz r4, 380(r1) or r10, r4, r4 ;; Last use of r4 By teaching the PPC backend how to fold spills into copies, we now get this code: lwz r10, 380(r1) wow. :) This reduces a testcase nate sent me from 1505 instructions to 1484. Note that this could handle FP values but doesn't currently, for reasons mentioned in the patch git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23298 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-09code cleanupChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23297 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-09Use continue in the use-processing loop to make it clear what the early exitsChris Lattner
are, simplify logic, and cause things to not be nested as deeply. This also uses MRI->areAliases instead of an explicit loop. No functionality change, just code cleanup. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23296 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-09Last round of 2-node folds from SD.cpp. Will move on to 3 node ops suchNate Begeman
as setcc and select next. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23295 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-09remove debugging code *slaps head*Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23294 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-09When spilling a live range that is used multiple times by one instruction,Chris Lattner
only add a reload live range once for the instruction. This is one step towards fixing a regalloc pessimization that Nate notice, but is later undone by the spiller (so no code is changed). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23293 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-09Teach the code generator that rlwimi is commutable if the rotate amountChris Lattner
is zero. This lets the register allocator elide some copies in some cases. This implements CodeGen/PowerPC/rlwimi-commute.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23292 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-09Added targets to speed up build of llc.Jim Laskey
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23291 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-09New testcase, neither should require a register-register copyChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23290 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-09add an accessor to provide more checkingChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23289 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-09use new accessors to simplify code. Add checking to make sure top-level instrChris Lattner
definitions are void git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23288 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-09add some accessorsChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23287 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-09Introduce two new concepts:Chris Lattner
1. Add support for defining Pattern's, which can match expressions when there is no instruction that directly implements something. Instructions usually implicitly define patterns. 2. Add support for defining SDNodeXForm's, which are node transformations. This seperates the concept of a node xform out from the existing predicate support. Using this new stuff, we add a few instruction patterns, one for testing, and two for OR/XOR by an arbitrary immediate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23286 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-08Fix incorrect commentChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23285 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-08Implement a complete type inference system for dag patterns, based on theChris Lattner
constraints defined in the DAG node definitions in the .td files. This allows us to infer (and check!) the types for all nodes in the current ppc .td file. For example, instead of: Inst pattern EQV: (set GPRC:i32:$rT, (xor (xor GPRC:i32:$rA, GPRC:i32:$rB), (imm)<<Predicate_immAllOnes>>)) we now fully infer: Inst pattern EQV: (set:void GPRC:i32:$rT, (xor:i32 (xor:i32 GPRC:i32:$rA, GPRC:i32:$rB), (imm:i32)<<Predicate_immAllOnes>>)) from: (set GPRC:$rT, (not (xor GPRC:$rA, GPRC:$rB))) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23284 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-08whitespace/comment changes, no functionality diffsChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23283 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-08Compute the value types that are natively supported by a target.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23282 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-08Parse information about type constraints on SDNodesChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23281 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-08use node info in the one place we currently use itChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23280 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-08start parsing SDNode info recordsChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23279 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-08Move yet more folds over to the dag combiner from sd.cppNate Begeman
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23278 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-08Add a bunch of stuff needed for node type inference. Move 'BLR' down withChris Lattner
the rest of the instructions, add comment markers to seperate portions of the file into logical parts git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23277 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-08Fix indentationChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23276 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-08regenerateChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23275 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-08Add support for automatically created anonymous definitions.Chris Lattner
This implements Regression/TableGen/AnonDefinitionOnDemand.td git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23274 91177308-0d34-0410-b5e6-96231b3b80d8