summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Generate something sensible for an [SU]ADDO op when the overflow/carry flag isBill Wendling2008-11-264-6/+40
| | | | | | | | | | | | | | | the conditional for the BRCOND statement. For instance, it will generate: addl %eax, %ecx jo LOF instead of addl %eax, %ecx ; About 10 instructions to compare the signs of LHS, RHS, and sum. jl LOF llvm-svn: 60123
* Turn on my codegen prepare heuristic by default. It doesn't affect Chris Lattner2008-11-261-5/+1
| | | | | | | | | | performance in most cases on the Grawp tester, but does speed some things up (like shootout/hash by 15%). This also doesn't impact compile time in a noticable way on the Grawp tester. It also, of course, gets the testcase it was designed for right :) llvm-svn: 60120
* Cosmetic.Evan Cheng2008-11-261-2/+2
| | | | llvm-svn: 60110
* Allow custom lowering of ADDE/ADDC/SUBE/SUBC operations.Sanjiv Gupta2008-11-261-6/+36
| | | | llvm-svn: 60102
* Emit declaration for globals and externs.Sanjiv Gupta2008-11-265-38/+120
| | | | | | Custom lower AND, OR, XOR bitwise operations. llvm-svn: 60098
* Fish kill flag annotations in PUSH instructions.Dan Gohman2008-11-262-3/+5
| | | | llvm-svn: 60095
* LiveRanges are represented as half-open ranges. Fix the findLiveInMBBs codeDan Gohman2008-11-261-1/+1
| | | | | | | and the LiveInterval.h top-level comment and accordingly. This fixes blocks having spurious live-in registers in boundary cases. llvm-svn: 60092
* teach the new heuristic how to handle inline asm.Chris Lattner2008-11-261-7/+52
| | | | llvm-svn: 60088
* Add 'tell' method to raw_fd_ostream that clients can use to query the ↵Ted Kremenek2008-11-261-0/+8
| | | | | | current location in the file the stream is writing to. llvm-svn: 60085
* Improve ValueAlreadyLiveAtInst with a cheap and dirty, but effectiveChris Lattner2008-11-261-12/+32
| | | | | | | | | | | | | | | heuristic: the value is already live at the new memory operation if it is used by some other instruction in the memop's block. This is cheap and simple to compute (moreso than full liveness). This improves the new heuristic even more. For example, it cuts two out of three new instructions out of 255.vortex:DbmFileInGrpHdr, which is one of the functions that the heuristic regressed. This overall eliminates another 40 instructions from 403.gcc and visibly reduces register pressure in 255.vortex (though this only actually ends up saving the 2 instructions from the whole program). llvm-svn: 60084
* __fastcall and __stdcall are mingw extensions to gcc for windows. Use theNick Lewycky2008-11-261-2/+2
| | | | | | __attribute__ notation which is supported on more platforms. llvm-svn: 60083
* Start rewroking a subpiece of the profitability heuristic to beChris Lattner2008-11-261-11/+56
| | | | | | | | | | phrased in terms of liveness instead of as a horrible hack. :) In pratice, this doesn't change the generated code for either 255.vortex or 403.gcc, but it could cause minor code changes in theory. This is framework for coming changes. llvm-svn: 60082
* add a long-overdue AllocaInst::isStaticAlloca method.Chris Lattner2008-11-261-0/+12
| | | | llvm-svn: 60080
* add a comment, make save/restore logic more obvious.Chris Lattner2008-11-261-7/+7
| | | | llvm-svn: 60076
* This adds in some code (currently disabled unless you pass Chris Lattner2008-11-261-10/+193
| | | | | | | | | | | | | | | | | | | | | | | | | -enable-smarter-addr-folding to llc) that gives CGP a better cost model for when to sink computations into addressing modes. The basic observation is that sinking increases register pressure when part of the addr computation has to be available for other reasons, such as having a use that is a non-memory operation. In cases where it works, it can substantially reduce register pressure. This code is currently an overall win on 403.gcc and 255.vortex (the two things I've been looking at), but there are several things I want to do before enabling it by default: 1. This isn't doing any caching of results, so it is much slower than it could be. It currently slows down release-asserts llc by 1.7% on 176.gcc: 27.12s -> 27.60s. 2. This doesn't think about inline asm memory operands yet. 3. The cost model botches the case when the needed value is live across the computation for other reasons. I'll continue poking at this, and eventually turn it on as llcbeta. llvm-svn: 60074
* Revert r60042. IndVarSimplify should check if APFloat is PPCDoubleDouble ↵Evan Cheng2008-11-262-7/+3
| | | | | | first before trying to convert it to an integer. llvm-svn: 60072
* Teach CodeGenPrepare to look through Bitcast instructions when attempting toChris Lattner2008-11-261-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | optimize addressing modes. This allows us to optimize things like isel-sink2.ll into: movl 4(%esp), %eax cmpb $0, 4(%eax) jne LBB1_2 ## F LBB1_1: ## TB movl $4, %eax ret LBB1_2: ## F movzbl 7(%eax), %eax ret instead of: _test: movl 4(%esp), %eax cmpb $0, 4(%eax) leal 4(%eax), %eax jne LBB1_2 ## F LBB1_1: ## TB movl $4, %eax ret LBB1_2: ## F movzbl 3(%eax), %eax ret This shrinks (e.g.) 403.gcc from 1133510 to 1128345 lines of .s. Note that the 2008-10-16-SpillerBug.ll testcase is dubious at best, I doubt it is really testing what it thinks it is. llvm-svn: 60068
* change AnnotationManager to use 'const char*' instead of std::string. this ↵Nuno Lopes2008-11-261-4/+4
| | | | | | fixes the leakage of those strings and avoids the creation of such strings in static cosntructors (should result in a little improvement of startup time) llvm-svn: 60064
* A simplification for checking whether the signs of the operands and sum ↵Bill Wendling2008-11-251-15/+14
| | | | | | differ. Thanks, Duncan. llvm-svn: 60043
* convertToSignExtendedInteger should return opInvalidOp instead of asserting ↵Evan Cheng2008-11-251-1/+7
| | | | | | if sematics of float does not allow arithmetics. llvm-svn: 60042
* Suppress warnings.Dan Gohman2008-11-251-7/+7
| | | | llvm-svn: 60041
* CellSPU:Scott Michel2008-11-251-24/+2
| | | | | | | | | (a) Remove conditionally removed code in SelectXAddr. Basically, hope for the best that the A-form and D-form address predicates catch everything before the code decides to emit a X-form address. (b) Expand vector store test cases to include the usual suspects. llvm-svn: 60034
* Now with the correct type for the 0.Bill Wendling2008-11-251-1/+1
| | | | llvm-svn: 60016
* Get rid of unused variable.Bill Wendling2008-11-251-1/+0
| | | | llvm-svn: 60015
* Hacker's Delight says, "Signed integer overflow of addition occurs if and onlyBill Wendling2008-11-251-4/+48
| | | | | | | if the operands have the same sign and the sum has sign opposite to that of the operands." llvm-svn: 60014
* Teach MatchScaledValue to handle Scales by 1 with MatchAddr (whichChris Lattner2008-11-251-5/+15
| | | | | | | | can recursively match things) and scales by 0 by ignoring them. This triggers once in 403.gcc, saving 1 (!!!!) instruction in the whole huge app. llvm-svn: 60013
* significantly refactor all the addressing mode matching logicChris Lattner2008-11-251-139/+138
| | | | | | | | into a new AddressingModeMatcher class. This makes it easier to reason about and reduces passing around of stuff, but has no functionality change. llvm-svn: 60012
* refactor all the constantexpr/instruction handling code out into a Chris Lattner2008-11-251-65/+68
| | | | | | new FindMaximalLegalAddressingModeForOperation helper method. llvm-svn: 60011
* another minor tweakChris Lattner2008-11-251-3/+2
| | | | llvm-svn: 60010
* minor cleanups no functionality change.Chris Lattner2008-11-251-32/+31
| | | | llvm-svn: 60009
* CellSPU: Relax constraints on when to generate a X-form address, evidentlyScott Michel2008-11-251-0/+7
| | | | | | | | they were too tight according to bug 3126. Fix bug 3126. llvm-svn: 60006
* Initial support for anti-dependence breaking. Currently this code does notDan Gohman2008-11-253-261/+643
| | | | | | | | | introduce any new spilling; it just uses unused registers. Refactor the SUnit topological sort code out of the RRList scheduler and make use of it to help with the post-pass scheduler. llvm-svn: 59999
* CellSPU: Fix mnemonic typo in pattern; "shlqbyi" -> "shlqby".Scott Michel2008-11-252-1/+3
| | | | llvm-svn: 59998
* rearrange and tidy some code, no functionality change.Chris Lattner2008-11-241-53/+52
| | | | llvm-svn: 59990
* minor cleanups to debug code, no functionality change.Chris Lattner2008-11-241-24/+33
| | | | llvm-svn: 59989
* reenable the right part of the code.Chris Lattner2008-11-241-1/+1
| | | | llvm-svn: 59985
* revert an accidental commit, this fixes the regression on ↵Chris Lattner2008-11-241-4/+1
| | | | | | test/CodeGen/X86/isel-sink.ll llvm-svn: 59976
* Fix 3113: If we have a dead cyclic PHI, replace the whole thingChris Lattner2008-11-241-1/+7
| | | | | | with an undef. llvm-svn: 59972
* - Make lowering of "add with overflow" customizable by back-ends.Bill Wendling2008-11-244-18/+44
| | | | | | | - Mark "add with overflow" as having a custom lowering for X86. Give it a null lowering representation for now. llvm-svn: 59971
* CellSPU:Scott Michel2008-11-241-4/+15
| | | | | | | | | (a) Slight rethink on i64 zero/sign/any extend code - use a shuffle to directly zero-extend i32 to i64, but use rotates and shifts for sign extension. Also ensure unified register consistency. (b) Add new test harness for i64 operations: i64ops.ll llvm-svn: 59970
* Check in the rest of this change. The isAntiDep flag needs to be passedDan Gohman2008-11-242-2/+2
| | | | | | | to removePred because an SUnit can both data-depend and anti-depend on the same SUnit. llvm-svn: 59969
* Pass the isAntiDep argument.Dan Gohman2008-11-241-1/+1
| | | | llvm-svn: 59968
* Run post-RA scheduling after branch folding, as it tends toDan Gohman2008-11-241-4/+7
| | | | | | obscure tail-merging opportunities. llvm-svn: 59967
* CellSPU:Scott Michel2008-11-246-108/+82
| | | | | | | | | | (a) Improve the extract element code: there's no need to do gymnastics with rotates into the preferred slot if a shuffle will do the same thing. (b) Rename a couple of SPUISD pseudo-instructions for readability and better semantic correspondence. (c) Fix i64 sign/any/zero extension lowering. llvm-svn: 59965
* Minor fix debug for register allocation debug output.Matthijs Kooijman2008-11-242-4/+4
| | | | llvm-svn: 59961
* If the type legalizer actually legalized anythingDuncan Sands2008-11-245-197/+236
| | | | | | | | | | | | | (this doesn't happen that often, since most code does not use illegal types) then follow it by a DAG combiner run that is allowed to generate illegal operations but not illegal types. I didn't modify the target combiner code to distinguish like this between illegal operations and illegal types, so it will not produce illegal operations as well as not producing illegal types. llvm-svn: 59960
* Fix comments.Matthijs Kooijman2008-11-241-2/+2
| | | | llvm-svn: 59958
* Move target independent td files from lib/Target/ to include/llvm/Target so ↵Evan Cheng2008-11-2414-1582/+10
| | | | | | they can be distributed along with the header files. llvm-svn: 59953
* Eliminate some unused variable compile time warnings.Evan Cheng2008-11-243-0/+9
| | | | llvm-svn: 59952
* Seriously strengthen the guarantee offered by noalias on a function's returnNick Lewycky2008-11-241-3/+3
| | | | | | | | value. It must now be as if the pointer were allocated and has not escaped to the caller. Thanks to Dan Gohman for pointing out the error in the original and helping devise this definition. llvm-svn: 59940
OpenPOWER on IntegriCloud