summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* PTX: support for fnegJustin Holewinski2011-04-281-0/+23
| | | | | | | | | - selection of FNEG instruction - new fneg.ll test Patch by Dan Bailey llvm-svn: 130355
* PTX: support for zext loads and trunc storesJustin Holewinski2011-04-281-1/+13
| | | | | | | | - expansion of EXTLOAD and TRUNCSTORE instructions Patch by Dan Bailey llvm-svn: 130354
* PTX: support for bitwise operations on predicatesJustin Holewinski2011-04-281-0/+8
| | | | | | | | | - selection of bitwise preds (AND, OR, XOR) - new bitwise.ll test Patch by Dan Bailey llvm-svn: 130353
* PTX: patch to AsmPrinterJustin Holewinski2011-04-281-22/+47
| | | | | | | | | - immediate value cast as long not int - handles initializer for constant array Patch by Dan Bailey llvm-svn: 130352
* Reverting r130340 in the unlikely event that it's responsible for a llvm-gcc ↵Andrew Trick2011-04-281-1/+1
| | | | | | stage2 compiler error. llvm-svn: 130350
* fast-isel sret. We actually don't need to do anything special on x86. :) ↵Eli Friedman2011-04-271-1/+0
| | | | | | rdar://problem/9303592 . llvm-svn: 130348
* Remove unnecessary argument.Rafael Espindola2011-04-275-8/+7
| | | | llvm-svn: 130343
* Rename getPersonalityPICSymbol to getCFIPersonalitySymbol, document it, andRafael Espindola2011-04-275-21/+60
| | | | | | | | | | | | | | | | | | give it a bit more responsibility. Also implement it for MachO. If hacked to use cfi, 32 bit MachO will produce .cfi_personality 155, L___gxx_personality_v0$non_lazy_ptr and 64 bit will produce .cfi_presonality ___gxx_personality_v0 The general idea is that .cfi_personality gets passed the final symbol. It is up to codegen to produce it if using indirect representation (like 32 bit MachO), but it is up to MC to decide which relocations to create. llvm-svn: 130341
* Fixes PR9730: indvars: An asserting value handle still pointed to this valueAndrew Trick2011-04-271-1/+1
| | | | | | | | | Modified LinearFunctionTestReplace to push the condition on the dead list instead of eagerly deleting it. This can cause unnecessary IV rewrites, which should have no effect on codegen and will not be an issue once we stop generating canonical IVs. llvm-svn: 130340
* Simplify handling of variables with complex address (i.e. blocks variables)Devang Patel2011-04-273-44/+32
| | | | llvm-svn: 130339
* Make the fast-isel code for literal 0.0 a bit shorter/faster, since 0.0 is ↵Eli Friedman2011-04-272-2/+47
| | | | | | common. rdar://problem/9303592 . llvm-svn: 130338
* Remove unused function.Eli Friedman2011-04-271-47/+0
| | | | llvm-svn: 130337
* Fix indentation.Rafael Espindola2011-04-271-21/+21
| | | | llvm-svn: 130331
* Fix a bug in the case that there is no add or subtract symbol and the offsetKevin Enderby2011-04-271-2/+6
| | | | | | value is zero so it does not add a NULL expr operand. llvm-svn: 130330
* Teach BasicAA about arm.neon.vld1 and vst1.Dan Gohman2011-04-271-0/+20
| | | | llvm-svn: 130327
* Revert r130178. It turned out to be not the optimal path to emit complex ↵Devang Patel2011-04-273-12/+8
| | | | | | location expressions. llvm-svn: 130326
* If converter was being too cute. It look for root BBs (which don't haveEvan Cheng2011-04-271-18/+3
| | | | | | | | | | successors) and use inverse depth first search to traverse the BBs. However that doesn't work when the CFG has infinite loops. Simply do a linear traversal of all BBs work just fine. rdar://9344645 llvm-svn: 130324
* When analyzing functions known to only access argument pointees,Dan Gohman2011-04-271-9/+28
| | | | | | | | | only check arguments with pointer types. Update the documentation of IntrReadArgMem reflect this. While here, add support for TBAA tags on intrinsic calls. llvm-svn: 130317
* Corrects an old, old typo in a case that doesn't seem to be reached in practice.Andrew Trick2011-04-271-1/+1
| | | | llvm-svn: 130316
* Simplify cfg inserts a call to trap when unreachable code is detected. ↵Devang Patel2011-04-271-1/+2
| | | | | | Assign DebugLoc to this new trap instruction. llvm-svn: 130315
* Also add <imp-def> operands for defined and dead super-registers when rewriting.Jakob Stoklund Olesen2011-04-271-6/+15
| | | | | | | We cannot rely on the <imp-def> operands added by LiveIntervals in all cases as demonstrated by the test case. llvm-svn: 130313
* Factor a bit of code to MCStreamer::EmitLabel. Keep track of the lastRafael Espindola2011-04-273-7/+14
| | | | | | | | | | | | non private symbol. This will be use for handling foo: .cfi_startproc ... On OS X where we have to create a foo.eh symbol. llvm-svn: 130305
* Stop trying to have instcombine preserve LCSSA form: this was notDuncan Sands2011-04-273-6/+0
| | | | | | | | | | effective in avoiding recomputation of LCSSA form; the widespread use of instsimplify (which looks through phi nodes) means it was not preserving LCSSA form anyway; and instcombine is no longer scheduled in the middle of the loop passes so this doesn't matter anymore. llvm-svn: 130301
* Test case and comment for PR9633.Andrew Trick2011-04-271-2/+3
| | | | llvm-svn: 130294
* Refactor out code to fast-isel a memcpy operation with a small constantEli Friedman2011-04-271-32/+40
| | | | | | length. (I'm planning to use this to implement byval.) llvm-svn: 130274
* Force some values to be absolute and align based on the FDE pointers size. A ↵Rafael Espindola2011-04-271-6/+6
| | | | | | | | small step towards using .cfi_* on OS X. llvm-svn: 130273
* Fix an edge case involving branches in fast-isel on x86.Eli Friedman2011-04-271-2/+4
| | | | | | rdar://problem/9303306 . llvm-svn: 130272
* Fix for PR9633 [indvars] Assertion `isa<X>(Val) && "cast<Ty>() argument of ↵Andrew Trick2011-04-271-2/+7
| | | | | | | | | incompatible type!"' failed. Added a type check in ScalarEvolution::computeSCEVAtScope to handle the case in which operands of an AddRecExpr in the current scope are folded. llvm-svn: 130271
* Enhance memdep to return clobber relation between noalias loads whenChris Lattner2011-04-261-3/+95
| | | | | | | | | | | | | | | | an earlier load could be widened to encompass a later load. For example, if we see: X = load i8* P, align 4 Y = load i8* (P+3), align 1 and we have a 32-bit native integer type, we can widen the former load to i32 which then makes the second load redundant. GVN can't actually do anything with this load/load relation yet, so this isn't testable, but it is the next step to resolving PR6627, and a fairly general class of "merge neighboring loads" missed optimizations. llvm-svn: 130250
* Add a safe-guard against repeated splitting for some rare cases.Jakob Stoklund Olesen2011-04-263-3/+43
| | | | | | | The number of blocks covered by a live range must be strictly decreasing when splitting, otherwise we can't allow repeated splitting. llvm-svn: 130249
* use AA::isMustAlias to simplify some calls.Chris Lattner2011-04-261-5/+3
| | | | llvm-svn: 130248
* remove support for llvm.invariant.end from memdep. It is a Chris Lattner2011-04-261-37/+0
| | | | | | work-in-progress that is not progressing, and it has issues. llvm-svn: 130247
* Be careful about scheduling nodes above previous calls. It increase usages ofEvan Cheng2011-04-262-1/+61
| | | | | | | | | | | | more callee-saved registers and introduce copies. Only allows it if scheduling a node above calls would end up lessen register pressure. Call operands also has added ABI restrictions for register allocation, so be extra careful with hoisting them above calls. rdar://9329627 llvm-svn: 130245
* Transform: "icmp eq (trunc (lshr(X, cst1)), cst" to "icmp (and X, mask), cst"Chris Lattner2011-04-262-46/+25
| | | | | | | | | | when X has multiple uses. This is useful for exposing secondary optimizations, but the X86 backend isn't ready for this when X has a single use. For example, this can disable load folding. This is inching towards resolving PR6627. llvm-svn: 130238
* some random cleanups, no functionality change.Chris Lattner2011-04-261-5/+5
| | | | llvm-svn: 130237
* ARM and Thumb2 support for atomic MIN/MAX/UMIN/UMAX loads.Jim Grosbach2011-04-263-0/+184
| | | | | | rdar://9326019 llvm-svn: 130234
* Print the label if we will use it in debug_frame.Rafael Espindola2011-04-261-2/+5
| | | | llvm-svn: 130232
* Refactor code. Keep dwarf register operation selection logic at one place.Devang Patel2011-04-262-72/+66
| | | | llvm-svn: 130231
* Use the new TRI->getLargestLegalSuperClass hook to constrain register class ↵Jakob Stoklund Olesen2011-04-261-50/+29
| | | | | | | | | | inflation. This has two effects: 1. We never inflate to a larger register class than what the sub-target can handle. 2. Completely unconstrained virtual registers get the largest possible register class. llvm-svn: 130229
* Add a TRI::getLargestLegalSuperClass hook to provide an upper limit on ↵Jakob Stoklund Olesen2011-04-266-0/+63
| | | | | | | | | | | | register class inflation. The hook will be used by the register allocator when recomputing register classes after removing constraints. Thumb1 code doesn't allow anything larger than tGPR, and x86 needs to ensure that the spill size doesn't change. llvm-svn: 130228
* Fix an off by one error while accessing complex address element of a DIVariable.Devang Patel2011-04-261-0/+1
| | | | | | This worked untill now because stars are aligned (i.e. num of complex address elments are always 0 or 2+ and when it is 2+ at least two elements are access together) llvm-svn: 130225
* Improve the bail-out predicate to really only kick in when phiChris Lattner2011-04-261-1/+2
| | | | | | | translation fails. We were bailing out in some cases that would cause us to miss GVN'ing some non-local cases away. llvm-svn: 130206
* Fast-isel support for simple inline asms.Dan Gohman2011-04-261-10/+31
| | | | llvm-svn: 130205
* Another example of a static table that wasn't marked static.Duncan Sands2011-04-261-1/+1
| | | | llvm-svn: 130193
* don't emit the symbol name twice for local bss and commonChris Lattner2011-04-261-6/+0
| | | | | | | | | | | symbols. For example, don't emit: .comm _i,4,2 ## @i ## @i instead emit: .comm _i,4,2 ## @i llvm-svn: 130192
* Fix typoEvan Cheng2011-04-261-1/+1
| | | | llvm-svn: 130190
* Print all the moves at a given label instead of just the first one.Rafael Espindola2011-04-263-15/+6
| | | | | | Remove previous DwarfCFI hack. llvm-svn: 130187
* Rename everything to follow LLVM style ... I think.Nick Lewycky2011-04-261-207/+300
| | | | | | | | | | | | | | Add support for switch and indirectbr edges. This works by densely numbering all blocks which have such terminators, and then separately numbering the possible successors. The predecessors write down a number, the successor knows its own number (as a ConstantInt) and sends that and the pointer to the number the predecessor wrote down to the runtime, who looks up the counter in a per-function table. Coverage data should now be functional, but I haven't tested it on anything other than my 2-file synthetic test program for coverage. llvm-svn: 130186
* No relocation produces a SLEB or ULEB, make sure they are handled in MC.Rafael Espindola2011-04-262-11/+15
| | | | llvm-svn: 130181
* Enhance MemDep: When alias analysis returns a partial alias result,Chris Lattner2011-04-262-29/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | return it as a clobber. This allows GVN to do smart things. Enhance GVN to be smart about the case when a small load is clobbered by a larger overlapping load. In this case, forward the value. This allows us to compile stuff like this: int test(void *P) { int tmp = *(unsigned int*)P; return tmp+*((unsigned char*)P+1); } into: _test: ## @test movl (%rdi), %ecx movzbl %ch, %eax addl %ecx, %eax ret which has one load. We already handled the case where the smaller load was from a must-aliased base pointer. llvm-svn: 130180
OpenPOWER on IntegriCloud