aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Instead of passing in an unsigned value for the optimization level, use an enum,Bill Wendling2009-04-2981-251/+377
| | | | | | | | which better identifies what the optimization is doing. And is more flexible for future uses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70440 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for a character after a command line option. Like '-Os'.Bill Wendling2009-04-292-0/+26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70437 91177308-0d34-0410-b5e6-96231b3b80d8
* Print correct instruction in dump.Dale Johannesen2009-04-291-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70427 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix infinite recursion in the C++ code which handles movddup by making it ↵Nate Begeman2009-04-295-52/+22
| | | | | | unnecessary. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70425 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement getSCEVAtScope for SCEV cast expressions.Dan Gohman2009-04-291-2/+25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70422 91177308-0d34-0410-b5e6-96231b3b80d8
* Generalize the cast-of-addrec folding to handle folding of SCEVs likeDan Gohman2009-04-293-46/+164
| | | | | | | | | (sext i8 {-128,+,1} to i64) to i64 {-128,+,1}, where the iteration crosses from negative to positive, but is still safe if the trip count is within range. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70421 91177308-0d34-0410-b5e6-96231b3b80d8
* Reword and tidy up some comments.Dan Gohman2009-04-291-10/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70416 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use 'false' for 'fast isel' here.Bill Wendling2009-04-291-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70411 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix this test to match the new output from scalar-evolution.Dan Gohman2009-04-291-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70410 91177308-0d34-0410-b5e6-96231b3b80d8
* MachineInstr::isRegTiedTo{Use,Def}Operand can safely be made const.Jakob Stoklund Olesen2009-04-292-4/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70408 91177308-0d34-0410-b5e6-96231b3b80d8
* Include the source type in SCEV cast expression debug output, andDan Gohman2009-04-292-5/+6
| | | | | | | | print sext, zext, and trunc, instead of signextend, zeroextend, and truncate, respectively, for consistency with the main IR. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70405 91177308-0d34-0410-b5e6-96231b3b80d8
* Update comment, replace theoretically impossible check with an assert.Nate Begeman2009-04-292-10/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70391 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix recent regression in gcc.dg/pr26719.c (6835035).Dale Johannesen2009-04-292-2/+48
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70386 91177308-0d34-0410-b5e6-96231b3b80d8
* Add directive to declare external globals.Sanjiv Gupta2009-04-291-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70379 91177308-0d34-0410-b5e6-96231b3b80d8
* spillPhysRegAroundRegDefsUses() may have invalidated iterators stored in ↵Evan Cheng2009-04-292-0/+224
| | | | | | fixed_ IntervalPtrs. Reset them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70378 91177308-0d34-0410-b5e6-96231b3b80d8
* testcase for PR4082Chris Lattner2009-04-291-0/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70375 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement review feedback for vector shuffle work.Nate Begeman2009-04-2911-133/+159
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70372 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a public method called getAddressSpace() to the GlobalAddressSDNode.Sanjiv Gupta2009-04-293-2/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70366 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable the load-shrinking optimization from looking atChris Lattner2009-04-292-3/+22
| | | | | | | | | | | | anything larger than 64-bits, avoiding a crash. This should really be fixed to use APInts, though type legalization happens to help us out and we get good code on the attached testcase at least. This fixes rdar://6836460 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70360 91177308-0d34-0410-b5e6-96231b3b80d8
* Update comments to reflect the current code.Dan Gohman2009-04-291-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70357 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some more doxygen comments to SCEVAddRec.Dan Gohman2009-04-291-1/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70354 91177308-0d34-0410-b5e6-96231b3b80d8
* Determine allocation 'preference' with right register class. I haven't seen ↵Evan Cheng2009-04-291-8/+10
| | | | | | this changing codegen so no test case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70351 91177308-0d34-0410-b5e6-96231b3b80d8
* The second part of the change from -fast to -O#. This changes the JIT to acceptBill Wendling2009-04-299-24/+24
| | | | | | | | an optimization level instead of a simple boolean telling it to generate code "fast" or the other type of "fast". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70347 91177308-0d34-0410-b5e6-96231b3b80d8
* Second attempt:Bill Wendling2009-04-2993-346/+400
| | | | | | | | | | | | | Massive check in. This changes the "-fast" flag to "-O#" in llc. If you want to use the old behavior, the flag is -O0. This change allows for finer-grained control over which optimizations are run at different -O levels. Most of this work was pretty mechanical. The majority of the fixes came from verifying that a "fast" variable wasn't used anymore. The JIT still uses a "Fast" flag. I'll change the JIT with a follow-up patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70343 91177308-0d34-0410-b5e6-96231b3b80d8
* Correct comment.Bill Wendling2009-04-291-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70340 91177308-0d34-0410-b5e6-96231b3b80d8
* As with r70333, give the primary induction variable a use soDan Gohman2009-04-281-1/+2
| | | | | | | that it can't be trivially eliminated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70334 91177308-0d34-0410-b5e6-96231b3b80d8
* Make this testcase slightly less trivial, so that it doesn't failDan Gohman2009-04-281-1/+2
| | | | | | | | if indvars happens to optimize away the unused primary induction variable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70333 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a grammaro in a comment.Dan Gohman2009-04-281-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70331 91177308-0d34-0410-b5e6-96231b3b80d8
* Properly print 'P' modifier on inline asm memory operands.Anton Korobeynikov2009-04-283-8/+21
| | | | | | | This should fix PR3379 and PR4064. Patch inspired by Edwin Török! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70328 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix trailing whitespace and 80-col. violations in recent TableGen changes.Bob Wilson2009-04-281-27/+34
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70319 91177308-0d34-0410-b5e6-96231b3b80d8
* Move getMatchingSuperReg() out of coalescer and into TargetRegisterInfo.Evan Cheng2009-04-282-16/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70309 91177308-0d34-0410-b5e6-96231b3b80d8
* Test for llvm-gcc bug fixed by 70301.Dale Johannesen2009-04-281-0/+127
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70302 91177308-0d34-0410-b5e6-96231b3b80d8
* GlobalValue is always pointer type, so an assert isn't required.Sanjiv Gupta2009-04-281-6/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70300 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix choice of version of Windows callback to use to consider not only the ↵Stefanus Du Toit2009-04-281-1/+12
| | | | | | | | Visual Studio version, but also the Windows SDK version. Patch by Tareq Siraj. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70299 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't coalesce a physical register with an incompatible virtual register.Jakob Stoklund Olesen2009-04-281-5/+42
| | | | | | | | | | If the physical register does not belong to the virtual register's regclass, don't coalesce. The physical register could be an invalid operand for an instruction using the vreg. The regclass matching is done after determining the actual subregisters being copied. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70298 91177308-0d34-0410-b5e6-96231b3b80d8
* Initialized arrays can be in any address space.Sanjiv Gupta2009-04-282-4/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70297 91177308-0d34-0410-b5e6-96231b3b80d8
* Move getSubRegisterRegClass from ScheduleDagSDNodesEmit.cpp to a ↵Jakob Stoklund Olesen2009-04-282-14/+13
| | | | | | | | | | TargetRegisterClass method. Also make the method non-asserting. It will return NULL when given an invalid subreg index. The method is needed by an upcoming patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70296 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR4034. Bug in LiveInterval::join when it's compacting new valno's.Evan Cheng2009-04-282-1/+1458
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70291 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial test commitJakob Stoklund Olesen2009-04-281-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70290 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix for PR4051. When 2address pass delete an instruction, update kill info ↵Evan Cheng2009-04-282-8/+102
| | | | | | when necessary. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70279 91177308-0d34-0410-b5e6-96231b3b80d8
* r70270 isn't ready yet. Back this out. Sorry for the noise.Bill Wendling2009-04-2893-394/+347
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70275 91177308-0d34-0410-b5e6-96231b3b80d8
* Massive check in. This changes the "-fast" flag to "-O#" in llc. If you want toBill Wendling2009-04-2893-346/+394
| | | | | | | | | | | | use the old behavior, the flag is -O0. This change allows for finer-grained control over which optimizations are run at different -O levels. Most of this work was pretty mechanical. The majority of the fixes came from verifying that a "fast" variable wasn't used anymore. The JIT still uses a "Fast" flag. I'm not 100% sure if it's necessary to change it there... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70270 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove an obsolete comment.Dan Gohman2009-04-271-5/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70262 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR 4086, a bug in FP IV elimination.Dale Johannesen2009-04-272-2/+22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70247 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR4076. Correctly create live interval of physical register with ↵Evan Cheng2009-04-272-10/+185
| | | | | | two-address update. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70245 91177308-0d34-0410-b5e6-96231b3b80d8
* Permit ChangeCompareStride to rewrite a comparison when the factorDan Gohman2009-04-273-1/+166
| | | | | | | | between the comparison's iv stride and the candidate stride is exactly -1. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70244 91177308-0d34-0410-b5e6-96231b3b80d8
* Add tests for WeakVH and AssertingVH. These pointed out that the overloads forJeffrey Yasskin2009-04-272-42/+183
| | | | | | | | the comparison operators were not only unnecessary in the presence of the implicit conversion; they caused ambiguous overload errors. So I deleted them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70243 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach getZeroExtendExpr and getSignExtendExpr to use trip-countDan Gohman2009-04-274-13/+769
| | | | | | | | | | | | | | | | | | information to simplify [sz]ext({a,+,b}) to {zext(a),+,[zs]ext(b)}, as appropriate. These functions and the trip count code each call into the other, so this requires careful handling to avoid infinite recursion. During the initial trip count computation, conservative SCEVs are used, which are subsequently discarded once the trip count is actually known. Among other benefits, this change lets LSR automatically eliminate some unnecessary zext-inreg and sext-inreg operation where the operand is an induction variable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70241 91177308-0d34-0410-b5e6-96231b3b80d8
* give bitstreamreader an API to ignore names for blocks/records,Chris Lattner2009-04-272-1/+17
| | | | | | | only llvm-bcanalyzer wants this info. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70239 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't skip the CopyMI when removing kill markers.Owen Anderson2009-04-271-2/+0
| | | | | | | | This should have no effect on generated code, but makes the intermediate state of the coalescer more sane. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70238 91177308-0d34-0410-b5e6-96231b3b80d8