summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* simplify this logic.Chris Lattner2008-11-271-4/+6
| | | | llvm-svn: 60189
* Also update the README.Nick Lewycky2008-11-271-7/+1
| | | | llvm-svn: 60188
* Chris prefers icmp/select over udiv!Nick Lewycky2008-11-271-3/+11
| | | | llvm-svn: 60187
* Add a synthetic missed optimization.Nick Lewycky2008-11-271-0/+24
| | | | llvm-svn: 60186
* Add a couple of missed optimizations on integer vectors. Multiply and divideNick Lewycky2008-11-271-6/+22
| | | | | | by 1, as well as multiply by -1. llvm-svn: 60182
* defensive patch: if CGP is merging a block with the entry block, make sureChris Lattner2008-11-271-1/+8
| | | | | | it ends up being the entry block. llvm-svn: 60180
* Fix PR3138: if we merge the entry block into another block, make sure toChris Lattner2008-11-271-0/+6
| | | | | | move the other block back up into the entry position! llvm-svn: 60179
* Silence a warning.Nick Lewycky2008-11-271-1/+1
| | | | | | | Despite changing the order of evaluation, this doesn't actually change the meaning of the statement. llvm-svn: 60177
* fix build on some machines. thanks buildbotNuno Lopes2008-11-271-0/+1
| | | | llvm-svn: 60175
* fix my previous commit r60064: compare strings instead of pointersNuno Lopes2008-11-271-1/+10
| | | | llvm-svn: 60174
* switch InstCombine::visitLoadInst to use Chris Lattner2008-11-272-45/+54
| | | | | | FindAvailableLoadedValue llvm-svn: 60169
* improve const correctness.Chris Lattner2008-11-271-2/+2
| | | | llvm-svn: 60168
* enhance FindAvailableLoadedValue to make use of AliasAnalysisChris Lattner2008-11-271-1/+20
| | | | | | if it has it. llvm-svn: 60167
* move FindAvailableLoadedValue from JumpThreading to Transforms/Utils.Chris Lattner2008-11-272-63/+65
| | | | llvm-svn: 60166
* Get rid of bogus "control may reach end of non-void function ‘...’ beingBill Wendling2008-11-271-2/+2
| | | | | | inlined" message. llvm-svn: 60165
* simplify this code a bit.Chris Lattner2008-11-271-4/+4
| | | | llvm-svn: 60164
* Use the new MergeBasicBlockIntoOnlyPred function.Chris Lattner2008-11-271-19/+1
| | | | llvm-svn: 60163
* move MergeBasicBlockIntoOnlyPred to Transforms/Utils.Chris Lattner2008-11-272-31/+33
| | | | llvm-svn: 60162
* rename ThreadBlock to ProcessBlock, since it does other things thanChris Lattner2008-11-271-4/+4
| | | | | | just simple threading. llvm-svn: 60157
* Comment out code that isn't entirely correct.Bill Wendling2008-11-271-1/+3
| | | | llvm-svn: 60156
* Removing redundant semicolons. No functionality change.Sanjiv Gupta2008-11-271-2/+2
| | | | llvm-svn: 60149
* Make jump threading substantially more powerful, in the following ways:Chris Lattner2008-11-271-0/+273
| | | | | | | | | | | | | | | | | 1. Make it fold blocks separated by an unconditional branch. This enables jump threading to see a broader scope. 2. Make jump threading able to eliminate locally redundant loads when they feed the branch condition of a block. This frequently occurs due to reg2mem running. 3. Make jump threading able to eliminate *partially redundant* loads when they feed the branch condition of a block. This is common in code with lots of loads and stores like C++ code and 255.vortex. This implements thread-loads.ll and rdar://6402033. Per the fixme's, several pieces of this should be moved into Transforms/Utils. llvm-svn: 60148
* Eliminate a compile time warning.Evan Cheng2008-11-271-1/+1
| | | | llvm-svn: 60145
* Avoid inserting noop's in the middle of a loop.Evan Cheng2008-11-271-1/+7
| | | | llvm-svn: 60141
* On x86 favors folding short immediate into some arithmetic operations (e.g. ↵Evan Cheng2008-11-271-5/+40
| | | | | | | | | | | | | | | add, and, xor, etc.) because materializing an immediate in a register is expensive in turns of code size. e.g. movl 4(%esp), %eax addl $4, %eax is 2 bytes shorter than movl $4, %eax addl 4(%esp), %eax llvm-svn: 60139
* Add a missing case in visitADD.Dale Johannesen2008-11-271-0/+3
| | | | llvm-svn: 60137
* 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
OpenPOWER on IntegriCloud