summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* fix typoChris Lattner2011-01-151-1/+1
| | | | llvm-svn: 123516
* Catch ~x < cst just like ~x < ~y, we currently handle this throughChris Lattner2011-01-151-4/+8
| | | | | | means that are about to disappear. llvm-svn: 123515
* reduce indentationChris Lattner2011-01-151-29/+29
| | | | llvm-svn: 123514
* 80-col.Eric Christopher2011-01-151-2/+4
| | | | llvm-svn: 123505
* Generalize LoadAndStorePromoter a bit and switch LICMChris Lattner2011-01-153-190/+111
| | | | | | to use it. llvm-svn: 123501
* Fix a comment.Bob Wilson2011-01-151-2/+2
| | | | llvm-svn: 123497
* Fix 80-cols.Eric Christopher2011-01-141-7/+14
| | | | llvm-svn: 123494
* Update CMake build.Ted Kremenek2011-01-141-0/+2
| | | | llvm-svn: 123491
* 'HiReg' is written but never read. Nuke itsTed Kremenek2011-01-141-5/+5
| | | | | | | | declaration and its assignments. Found by clang static analyzer. llvm-svn: 123486
* Fix a false-positive warning.Owen Anderson2011-01-141-1/+3
| | | | llvm-svn: 123480
* Delete an assignment to ThisBB which isn't needed, and tidy up someDan Gohman2011-01-141-4/+6
| | | | | | comments. llvm-svn: 123479
* Enhance GlobalOpt to be able evaluate initializers that involve stores throughOwen Anderson2011-01-141-2/+49
| | | | | | bitcasts, at least in simple cases. This fixes clang's CodeGenCXX/virtual-base-dtor.cpp llvm-svn: 123477
* Add a possibility to switch between CFI directives- and table-based frame ↵Anton Korobeynikov2011-01-147-17/+23
| | | | | | description emission. Currently all the backends use table-based stuff. llvm-svn: 123476
* CleanupAnton Korobeynikov2011-01-141-6/+1
| | | | llvm-svn: 123475
* Add CFI directives-based frame information emission. Not hooked yet.Anton Korobeynikov2011-01-143-0/+209
| | | | llvm-svn: 123474
* Split stuff as a preparation for CFI directives-based frame information emissionAnton Korobeynikov2011-01-144-356/+440
| | | | llvm-svn: 123473
* Use common style for .cfi directivesAnton Korobeynikov2011-01-141-7/+7
| | | | llvm-svn: 123472
* Support for precise scheduling of the instruction selection DAG,Andrew Trick2011-01-141-537/+663
| | | | | | | | | | | | | | | | | | | | | | | | | disabled in this checkin. Sorry for the large diffs due to refactoring. New functionality is all guarded by EnableSchedCycles. Scheduling the isel DAG is inherently imprecise, but we give it a best effort: - Added MayReduceRegPressure to allow stalled nodes in the queue only if there is a regpressure need. - Added BUHasStall to allow checking for either dependence stalls due to latency or resource stalls due to pipeline hazards. - Added BUCompareLatency to encapsulate and standardize the heuristics for minimizing stall cycles (vs. reducing register pressure). - Modified the bottom-up heuristic (now in BUCompareLatency) to prioritize nodes by their depth rather than height. As long as it doesn't stall, height is irrelevant. Depth represents the critical path to the DAG root. - Added hybrid_ls_rr_sort::isReady to filter stalled nodes before adding them to the available queue. Related Cleanup: most of the register reduction routines do not need to be templates. llvm-svn: 123468
* switch SRoA to use LoadAndStorePromoter instead of its own copy of the code.Chris Lattner2011-01-141-136/+26
| | | | llvm-svn: 123457
* Add a new LoadAndStorePromoter class, which implements the generalChris Lattner2011-01-141-0/+154
| | | | | | | "promote a bunch of load and stores" logic, allowing the code to be shared and reused. llvm-svn: 123456
* Turn X-(X-Y) into Y. According to my auto-simplifier this is the most commonDuncan Sands2011-01-141-1/+15
| | | | | | | | | simplification present in fully optimized code (I think instcombine fails to transform some of these when "X-Y" has more than one use). Fires here and there all over the test-suite, for example it eliminates 8 subtractions in the final IR for 445.gobmk, 2 subs in 447.dealII, 2 in paq8p etc. llvm-svn: 123442
* Factorize common code out of the InstructionSimplify shift logic. Add inDuncan Sands2011-01-141-62/+38
| | | | | | | | | | | threading of shifts over selects and phis while there. This fires here and there in the testsuite, to not much effect. For example when compiling spirit it fires 5 times, during early-cse, resulting in 6 more cse simplifications, and 3 more terminators being folded by jump threading, but the final bitcode doesn't change in any interesting way: other optimizations would have caught the opportunity anyway, only later. llvm-svn: 123441
* split SROA into two passes: one that uses DomFrontiers (-scalarrepl) Chris Lattner2011-01-142-27/+57
| | | | | | and one that uses SSAUpdater (-scalarrepl-ssa) llvm-svn: 123436
* Remove casts between Value** and Constant**, which won't work if aJay Foad2011-01-144-31/+67
| | | | | | | static_cast from Constant* to Value* has to adjust the "this" pointer. This is groundwork for PR889. llvm-svn: 123435
* Implement full support for promoting allocas to registers using SSAUpdaterChris Lattner2011-01-141-5/+162
| | | | | | | | | | | instead of DomTree/DomFrontier. This may be interesting for reducing compile time. This is currently disabled, but seems to work just fine. When this is enabled, we eliminate two runs of dominator frontier, one in the "early per-function" optimizations and one in the "interlaced with inliner" function passes. llvm-svn: 123434
* Try for the third time to teach getFirstTerminator() about debug values.Jakob Stoklund Olesen2011-01-142-4/+11
| | | | | | This time let's rephrase to trick gcc-4.3 into not miscompiling. llvm-svn: 123432
* revert my fastisel patch again which apparently still gives theChris Lattner2011-01-141-1/+1
| | | | | | llvm-gcc-i386-linux-selfhost buildbot heartburn... llvm-svn: 123431
* reapply r123414 now that the botz are calmed down and the fix is already in.Chris Lattner2011-01-141-1/+1
| | | | llvm-svn: 123427
* indentationChris Lattner2011-01-141-1/+1
| | | | llvm-svn: 123426
* Completed :lower16: / :upper16: support for movw / movt pairs on Darwin.Evan Cheng2011-01-145-37/+212
| | | | | | | | - Fixed :upper16: fix up routine. It should be shifting down the top 16 bits first. - Added support for Thumb2 :lower16: and :upper16: fix up. - Added :upper16: and :lower16: relocation support to mach-o object writer. llvm-svn: 123424
* Revert r123419. It still breaks llvm-gcc-i386-linux-selfhost.Jakob Stoklund Olesen2011-01-142-24/+7
| | | | llvm-svn: 123423
* r123414 broke llvm-gcc bootstrap apparently, revertChris Lattner2011-01-141-1/+1
| | | | llvm-svn: 123422
* Set the insertion point correctly for instructions generated by load folding:Chris Lattner2011-01-141-4/+4
| | | | | | they should go *before* the new instruction not after it. llvm-svn: 123420
* Try again to teach getFirstTerminator() about debug values.Jakob Stoklund Olesen2011-01-142-7/+24
| | | | | | Fix some callers to better deal with debug values. llvm-svn: 123419
* Move some shift transforms out of instcombine and into InstructionSimplify.Duncan Sands2011-01-143-28/+154
| | | | | | | | | | | | While there, I noticed that the transform "undef >>a X -> undef" was wrong. For example if X is 2 then the top two bits must be equal, so the result can not be anything. I fixed this in the constant folder as well. Also, I made the transform for "X << undef" stronger: it now folds to undef always, even though X might be zero. This is in accordance with the LangRef, but I must admit that it is fairly aggressive. Also, I added "i32 X << 32 -> undef" following the LangRef and the constant folder, likewise fairly aggressive. llvm-svn: 123417
* fix PR8961 - a fast isel miscompilation where we'd insert a new instructionChris Lattner2011-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | after sext's generated for addressing that got folded. Previously we compiled test5 into: _test5: ## @test5 ## BB#0: movq -8(%rsp), %rax ## 8-byte Reload movq (%rdi,%rax), %rdi addq %rdx, %rdi movslq %esi, %rax movq %rax, -8(%rsp) ## 8-byte Spill movq %rdi, %rax ret which is insane and wrong. Now we produce: _test5: ## @test5 ## BB#0: movslq %esi, %rax movq (%rdi,%rax), %rax addq %rdx, %rax ret llvm-svn: 123414
* Better terminator avoidance.Jakob Stoklund Olesen2011-01-131-9/+3
| | | | | | | This approach also works when the terminator doesn't have a slot index. (Which can happen??) llvm-svn: 123413
* Add comment about Thumb2 fixup comments being completely bogus.Evan Cheng2011-01-131-1/+3
| | | | llvm-svn: 123411
* Add single entry / single exit accessors.Tobias Grosser2011-01-131-23/+32
| | | | | | | | | | | Add methods for accessing the (single) entry / exit edge of a region. If no such edge exists, null is returned. Both accessors return the start block of the corresponding edge. The edge can finally be formed by utilizing Region::getEntry() or Region::getExit(); Contributed by: Andreas Simbuerger <simbuerg@fim.uni-passau.de> llvm-svn: 123410
* Recognize alternative register names like ip -> r12.Owen Anderson2011-01-131-3/+14
| | | | | | Fixes <rdar://problem/8857982>. llvm-svn: 123409
* Fix a few more places that should use MBB::getLastNonDebugInstr().Jakob Stoklund Olesen2011-01-133-3/+3
| | | | llvm-svn: 123408
* typoChris Lattner2011-01-131-1/+1
| | | | llvm-svn: 123406
* memcpy + metadata = bliss :)Chris Lattner2011-01-131-0/+48
| | | | llvm-svn: 123405
* Add support to the ARM MC infrastructure to support mcr and friends. This ↵Owen Anderson2011-01-134-29/+225
| | | | | | | | | | | | | | requires supporting the symbolic immediate names used for these instructions, fixing their pretty-printers, and adding proper encoding information for them. With this, we can properly pretty-print and encode assembly like: mrc p15, #0, r3, c13, c0, #3 Fixes <rdar://problem/8857858>. llvm-svn: 123404
* Relax an assertion. On archs like ARM, an immediate field may be scattered. ↵Evan Cheng2011-01-131-2/+6
| | | | | | So it's possible for some bits of every 8 bits to be encoded already, and the rest still needs to be fixed up. llvm-svn: 123403
* Temporary workaround for an i386 crash in LiveDebugVariables.Jakob Stoklund Olesen2011-01-131-1/+2
| | | | llvm-svn: 123400
* Teach frame lowering to ignore debug values after the terminators.Jakob Stoklund Olesen2011-01-1313-24/+38
| | | | llvm-svn: 123399
* Tidy comments, indentation, and 80-column violations.Bob Wilson2011-01-131-37/+39
| | | | llvm-svn: 123397
* Fix whitespace.Bob Wilson2011-01-131-120/+120
| | | | llvm-svn: 123396
* Fix ARMAsmParser::ParseOperand() to allow it to parse . as a branch target andKevin Enderby2011-01-131-2/+4
| | | | | | directional local labels like 1f and 2b. llvm-svn: 123393
OpenPOWER on IntegriCloud