summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Add a hackaround for PR7993 which is causing failures on x86 builders that ↵Chris Lattner2010-08-261-0/+2
| | | | | | lack sse2. llvm-svn: 112175
* implement SplitVecOp_CONCAT_VECTORS, fixing the included testcase with SSE1.Chris Lattner2010-08-262-66/+93
| | | | llvm-svn: 112171
* zap dead code.Chris Lattner2010-08-262-37/+0
| | | | llvm-svn: 112155
* remove some llvmcontext arguments that are now dead post-refactoring.Chris Lattner2010-08-253-6/+4
| | | | llvm-svn: 112104
* Change handling of illegal vector types to widen when possible instead of Chris Lattner2010-08-252-46/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | expanding: e.g. <2 x float> -> <4 x float> instead of -> 2 floats. This affects two places in the code: handling cross block values and handling function return and arguments. Since vectors are already widened by legalizetypes, this gives us much better code and unblocks x86-64 abi and SPU abi work. For example, this (which is a silly example of a cross-block value): define <4 x float> @test2(<4 x float> %A) nounwind { %B = shufflevector <4 x float> %A, <4 x float> undef, <2 x i32> <i32 0, i32 1> %C = fadd <2 x float> %B, %B br label %BB BB: %D = fadd <2 x float> %C, %C %E = shufflevector <2 x float> %D, <2 x float> undef, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef> ret <4 x float> %E } Now compiles into: _test2: ## @test2 ## BB#0: addps %xmm0, %xmm0 addps %xmm0, %xmm0 ret previously it compiled into: _test2: ## @test2 ## BB#0: addps %xmm0, %xmm0 pshufd $1, %xmm0, %xmm1 ## kill: XMM0<def> XMM0<kill> XMM0<def> insertps $0, %xmm0, %xmm0 insertps $16, %xmm1, %xmm0 addps %xmm0, %xmm0 ret This implements rdar://8230384 llvm-svn: 112101
* Fix comment.Devang Patel2010-08-251-4/+3
| | | | llvm-svn: 112086
* Remove dead argument.Devang Patel2010-08-252-6/+4
| | | | llvm-svn: 112085
* Add some statistics for PEI register scavengingJim Grosbach2010-08-251-0/+7
| | | | llvm-svn: 112084
* split the vector case of getCopyFromParts out to its own function,Chris Lattner2010-08-241-81/+102
| | | | | | no functionality change. llvm-svn: 111994
* split the vector case out of getCopyToParts into its own function. NoChris Lattner2010-08-241-117/+126
| | | | | | functionality change. llvm-svn: 111990
* tidy up, reduce indentationChris Lattner2010-08-242-127/+123
| | | | llvm-svn: 111982
* Add ARM heuristic for when to allocate a virtual base register for stackJim Grosbach2010-08-241-1/+1
| | | | | | access. rdar://8277890&7352504 llvm-svn: 111968
* Move enabling the local stack allocation pass into the target where it belongs.Jim Grosbach2010-08-243-22/+8
| | | | | | | For now it's still a command line option, but the interface to the generic code doesn't need to know that. llvm-svn: 111942
* Revert r107202. It is not adding any value.Devang Patel2010-08-242-17/+6
| | | | llvm-svn: 111870
* Remove the MFI storage of the local allocation block size. It's not needed.Jim Grosbach2010-08-231-4/+0
| | | | llvm-svn: 111847
* Better handling of local offsets for downwards growing stacks. This correctsJim Grosbach2010-08-232-25/+39
| | | | | | | relative offsets when there are offsets encoded in the instructions and simplifies final allocation in PEI. rdar://8277890 llvm-svn: 111836
* Handle qualified constants that are directly folded by FE.Devang Patel2010-08-231-6/+16
| | | | | | PR 7920. llvm-svn: 111820
* Now that PassInfo and Pass::ID have been separated, move the rest of the ↵Owen Anderson2010-08-239-24/+20
| | | | | | passes over to the new registration API. llvm-svn: 111815
* Fix some GCC warnings by providing a virtual destructor in the base of a classChandler Carruth2010-08-231-1/+1
| | | | | | | hierarchy with virtual methods and using llvm_unreachable to properly indicate unreachable states which would otherwise leave variables uninitialized. llvm-svn: 111803
* Delete dead comment.Eli Friedman2010-08-211-2/+1
| | | | llvm-svn: 111744
* Create the new linker type "linker_private_weak_def_auto".Bill Wendling2010-08-201-2/+8
| | | | | | | | | | | It's similar to "linker_private_weak", but it's known that the address of the object is not taken. For instance, functions that had an inline definition, but the compiler decided not to inline it. Note, unlike linker_private and linker_private_weak, linker_private_weak_def_auto may have only default visibility. The symbols are removed by the linker from the final linked image (executable or dynamic library). llvm-svn: 111684
* Downwards growing stack allocation order reverses relative offsetsJim Grosbach2010-08-201-1/+10
| | | | llvm-svn: 111673
* Add more dbg outputJim Grosbach2010-08-201-0/+1
| | | | llvm-svn: 111670
* properly check for whether base regs were insertedJim Grosbach2010-08-201-4/+7
| | | | llvm-svn: 111646
* If the target says that an extending load is not legal, regardless of whetherBob Wilson2010-08-191-7/+12
| | | | | | | | | | | it involves specific floating-point types, legalize should expand an extending load to a non-extending load followed by a separate extend operation. For example, we currently expand SEXTLOAD to EXTLOAD+SIGN_EXTEND_INREG (and assert that EXTLOAD should always be supported). Now we can expand that to LOAD+SIGN_EXTEND. This is needed to allow vector SIGN_EXTEND and ZERO_EXTEND to be used for NEON. llvm-svn: 111586
* Better handling of offsets on frame index references. rdar://8277890Jim Grosbach2010-08-191-7/+21
| | | | llvm-svn: 111585
* Update debug logs.Evan Cheng2010-08-191-4/+4
| | | | llvm-svn: 111575
* Properly update MachineDominators when splitting critical edge.Evan Cheng2010-08-191-2/+25
| | | | llvm-svn: 111574
* Correct header.Bill Wendling2010-08-191-1/+1
| | | | llvm-svn: 111540
* It's possible to sink a def if its local uses are PHI's.Evan Cheng2010-08-191-5/+5
| | | | llvm-svn: 111537
* Fix the msvc 2010 build.Michael J. Spencer2010-08-191-2/+19
| | | | | | | | | | | | | | The Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 implements parts of C++0x based on the draft standard. An old version of the draft had a bug that makes std::pair<T1*, T2*>(something, 0) fail to compile. This is because the template<class U, class V> pair(U&& x, V&& y) constructor is selected, even though it later fails to implicitly convert U and V to frist_type and second_type. This has been fixed in n3090, but it seems that Microsoft is not going to update msvc. llvm-svn: 111535
* Remove disabled assertion.Evan Cheng2010-08-191-2/+0
| | | | llvm-svn: 111531
* Teach machine-sink to break critical edges when appropriate. Work in progress.Evan Cheng2010-08-191-8/+99
| | | | llvm-svn: 111530
* Update local stack block allocation to let PEI do the allocs if no additionalJim Grosbach2010-08-192-3/+12
| | | | | | | base registers were required. This will allow for slightly better packing of the locals when alignment padding is necessary after callee saved registers. llvm-svn: 111508
* Add a newline to debug outputJim Grosbach2010-08-181-1/+2
| | | | llvm-svn: 111453
* If any def of a machine-sink candidate has local uses, it's obviously not ↵Evan Cheng2010-08-181-5/+18
| | | | | | safe to sink it to a successor block. This bug has been hidden because a later check for critical-edge disable these illegal optimizations. This patch should significantly reduce the amount of time spent on checking dominator information for obviously unsafe sinking. llvm-svn: 111450
* Enable ARM base register reuse to local stack slot allocation. Whenever a newJim Grosbach2010-08-181-10/+33
| | | | | | | | | frame index reference to an object in the local block is seen, check if it's near enough to any previously allocaated base register to re-use. rdar://8277890 llvm-svn: 111443
* Thinking about it, we don't need MachineDominatorTree after all. The DomValueJakob Stoklund Olesen2010-08-182-19/+26
| | | | | | map discovers the iterated dominance frontier for free. llvm-svn: 111400
* Revert r111394. It was too aggressive.Jakob Stoklund Olesen2010-08-181-3/+3
| | | | | | | | | | We must complete the DFS, otherwise we might miss needed phi-defs, and prematurely color live ranges with a non-dominating value. This is not a big deal since we get to color more of the CFG and the next mapValue call will be faster. llvm-svn: 111397
* Aggressively prune the DFS when inserting phi-defs.Jakob Stoklund Olesen2010-08-181-3/+3
| | | | llvm-svn: 111394
* Add the LiveIntervalMap class. Don't hook it up yet.Jakob Stoklund Olesen2010-08-182-1/+279
| | | | | | | | | | | | | | | | LiveIntervalMap maps values from a parent LiveInterval to a child interval that is a strict subset. It will create phi-def values as needed to preserve the VNInfo SSA form in the child interval. This leads to an algorithm very similar to the one in SSAUpdaterImpl.h, but with enough differences that the code can't be reused: - We don't need to manipulate PHI instructions. - LiveIntervals have kills. - We have MachineDominatorTree. - We can use df_iterator. llvm-svn: 111393
* Improve whitespace.Bill Wendling2010-08-181-1/+2
| | | | llvm-svn: 111384
* Add hook for re-using virtual base registers for local stack slot access.Jim Grosbach2010-08-181-12/+41
| | | | | | | | | | Nothing fancy, just ask the target if any currently available base reg is in range for the instruction under consideration and use the first one that is. Placeholder ARM implementation simply returns false for now. ongoing saga of rdar://8277890 llvm-svn: 111374
* Preserve subregs on PHI source operands. Patch by Krister Wombell!Jakob Stoklund Olesen2010-08-181-1/+4
| | | | llvm-svn: 111366
* Add materialization of virtual base registers for frame indices allocated intoJim Grosbach2010-08-172-3/+27
| | | | | | | | | | | | | the local block. Resolve references to those indices to a new base register. For simplification and testing purposes, a new virtual base register is allocated for each frame index being resolved. The result is truly horrible, but correct, code that's good for exercising the new code paths. Next up is adding thumb1 support, which should be very simple. Following that will be adding base register re-use and implementing a reasonable ARM heuristic for when a virtual base register should be generated at all. llvm-svn: 111315
* Make fast scheduler handle asm clobbers correctly.Dale Johannesen2010-08-171-21/+53
| | | | | | PR 7882. Follows suggestion by Amaury Pouly, thanks. llvm-svn: 111306
* PHI elimination shouldn't require machineloopinfo since it's used at -O0. ↵Evan Cheng2010-08-173-11/+13
| | | | | | Move the requirement to LiveIntervalAnalysis instead. Note this does not change the number of times machineloopinfo is computed. llvm-svn: 111285
* Machine CSE preserves CFG. Pass manager was freeing machineloopinfo after ↵Evan Cheng2010-08-171-0/+1
| | | | | | machine cse before. llvm-svn: 111281
* silence warningJim Grosbach2010-08-171-0/+5
| | | | llvm-svn: 111274
* Add hook to examine an instruction referencing a frame index to determineJim Grosbach2010-08-171-2/+52
| | | | | | | | | | | | | | | whether to allocate a virtual frame base register to resolve the frame index reference in it. Implement a simple version for ARM to aid debugging. In LocalStackSlotAllocation, scan the function for frame index references to local frame indices and ask the target whether to allocate virtual frame base registers for any it encounters. Purely infrastructural for debug output. Next step is to actually allocate base registers, then add intelligent re-use of them. rdar://8277890 llvm-svn: 111262
OpenPOWER on IntegriCloud