summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Remove strange extra semicolons.Nick Lewycky2009-03-194-4/+4
| | | | llvm-svn: 67287
* Add support to tablegen for naming the nodes themselves, not just the operands, Nate Begeman2009-03-191-1/+1
| | | | | | | in selectiondag patterns. This is required for the upcoming shuffle_vector rewrite, and as it turns out, cleans up a hack in the Alpha instruction info. llvm-svn: 67286
* Added support for Mips O32 Calling ConventionBruno Cardoso Lopes2009-03-192-33/+133
| | | | llvm-svn: 67280
* aha, DAE does have to think about PHI nodes. Many thanks to "Dr Evil" (aka ↵Chris Lattner2009-03-181-3/+3
| | | | | | | | Duncan) for pointing this out :) llvm-svn: 67212
* Fix PR3826 - InstComb assert with vector shift, by not calling ↵Chris Lattner2009-03-181-7/+8
| | | | | | ComputeNumSignBits on a vector. llvm-svn: 67211
* add an assertion to make it clear that PHI nodes are not allowed.Chris Lattner2009-03-181-1/+4
| | | | llvm-svn: 67210
* Explicitly check for StoreInst, do not lose the chance to delete Zhou Sheng2009-03-181-1/+1
| | | | | | unused loads or bitcasts. llvm-svn: 67202
* Revert my previous change on Local.cpp, instead, fix the bug on scalarrepl.Zhou Sheng2009-03-182-4/+1
| | | | | | | If the instruction has no users, it is also not only used by debug info and should not be deleted. llvm-svn: 67194
* Fix a bug.Zhou Sheng2009-03-181-0/+3
| | | | | | If I->use_empty(), this method should return false. llvm-svn: 67180
* Added missing support for widening when splitting an unary op (PR3683)Mon P Wang2009-03-184-4/+91
| | | | | | | and expanding a bit convert (PR3711). In both cases, we extract the valid part of the widen vector and then do the conversion. llvm-svn: 67175
* Disable the "call to immediate" optimization on x86-64. It isChris Lattner2009-03-181-1/+5
| | | | | | | | | | | not safe in general because the immediate could be an arbitrary value that does not fit in a 32-bit pcrel displacement. Conservatively fall back to loading the value into a register and calling through it. We still do the optzn on X86-32. llvm-svn: 67142
* Fix PR3807 by inserting 'insertelement' instructions in the normal dest of Chris Lattner2009-03-181-5/+10
| | | | | | an invoke instead of after the invoke (in its block), which is invalid. llvm-svn: 67139
* LSR shouldn't ever try to hack on integer IV's larger than 64-bits. Right nowChris Lattner2009-03-171-0/+6
| | | | | | | | | it is not APInt clean, but even when it is it needs to be evaluated carefully to determine whether it is actually profitable. This fixes a crash on PR3806 llvm-svn: 67134
* Don't force promotion of return arguments on the callee.Rafael Espindola2009-03-171-9/+0
| | | | | | | Some architectures (like x86) don't require it. This fixes bug 3779. llvm-svn: 67132
* Add BUILTIN_EXPECT Support/Compiler macro.Daniel Dunbar2009-03-171-1/+2
| | | | | | | | | - Use for exceptional buffer conditions in raw_ostream:write to shave off a cycle or two. - Please rename if you have a better one. llvm-svn: 67103
* Fix codegen to compute the size of an allocation by multiplying theChris Lattner2009-03-171-8/+17
| | | | | | | | | | | size by the array amount as an i32 value instead of promoting from i32 to i64 then doing the multiply. Not doing this broke wrap-around assumptions that the optimizers (validly) made. The ultimate real fix for this is to introduce i64 version of alloca and remove mallocinst. This fixes PR3829 llvm-svn: 67093
* Remove a condition which is always true.Chris Lattner2009-03-171-3/+3
| | | | llvm-svn: 67089
* CellSPU:Scott Michel2009-03-172-16/+16
| | | | | | Revert inadvertent mis-fix of fneg. llvm-svn: 67084
* r66870 missed this out.Sanjiv Gupta2009-03-171-0/+1
| | | | llvm-svn: 67082
* typoGabor Greif2009-03-171-1/+1
| | | | llvm-svn: 67080
* Reapply r67049, with the test adjusted for darwinDuncan Sands2009-03-171-39/+61
| | | | | | (which produces "call L_f$stub" rather than "call f"). llvm-svn: 67079
* Fix a problem with DAGCombine where we were building an illegal buildMon P Wang2009-03-171-6/+11
| | | | | | | | vector shuffle mask. Forced the mask to be built using i32. Note: this will be irrelevant once vector_shuffle no longer takes a build vector for the shuffle mask. llvm-svn: 67076
* Recognize bswapl as bswap too.Dan Gohman2009-03-171-2/+5
| | | | llvm-svn: 67072
* Recognize "bswapq" as an alternate spelling for the bswap instruction.Dan Gohman2009-03-171-2/+2
| | | | llvm-svn: 67071
* raw_ostream: Put all exceptional conditions in raw_ostream::writeDaniel Dunbar2009-03-171-18/+30
| | | | | | | | under a single branch. Also, add a FIXME for formatted output. llvm-svn: 67069
* Spiller may unfold load / mod / store instructions as an optimization when ↵Evan Cheng2009-03-172-9/+30
| | | | | | the would be loaded value is available in a register. It needs to check if it's legal to clobber the register. Also, the register can contain values of multiple spill slots, make sure to check all instead of just the one being unfolded. llvm-svn: 67068
* CellSPU:Scott Michel2009-03-175-488/+417
| | | | | | | | | | | | - Fix fabs, fneg for f32 and f64. - Use BuildVectorSDNode.isConstantSplat, now that the functionality exists - Continue to improve i64 constant lowering. Lower certain special constants to the constant pool when they correspond to SPU's shufb instruction's special mask values. This avoids the overhead of performing a shuffle on a zero-filled vector just to get the special constant when the memory load suffices. llvm-svn: 67067
* raw_ostream: Rework implementation of unbuffered streams so outputtingDaniel Dunbar2009-03-171-4/+12
| | | | | | | | | a single character requires only one branch to follow slow path. - Never use a buffer when writing on an unbuffered stream. - Move default buffer size to header. llvm-svn: 67066
* Fix a debug info dependency in jump threading.Dale Johannesen2009-03-171-2/+5
| | | | llvm-svn: 67064
* raw_ostream: Replace flush_impl with write_impl, which takes data toDaniel Dunbar2009-03-161-32/+15
| | | | | | | | | write as arguments. - Add raw_ostream::GetNumBytesInBuffer. - Privatize buffer pointers. - Get rid of slow and unnecessary code for writing out large strings. llvm-svn: 67060
* raw_ostream: Lift out flush_nonempty.Daniel Dunbar2009-03-161-20/+21
| | | | | | | | | | | | | | | | | - Flush a known non-empty buffers; enforces the interface to flush_impl and kills off HandleFlush (which I saw no reason to be an inline method, Chris?). - Clarify invariant that flush_impl is only called with OutBufCur > OutBufStart. - This also cleary collects all places where we have to deal with the buffer possibly not existing. - A few more comments and fixing the unbuffered behavior remain in this commit sequence. llvm-svn: 67057
* Make raw_ostream::operator<<(const void *) fast; it doesn't matter butDaniel Dunbar2009-03-161-2/+19
| | | | | | it is easy. llvm-svn: 67054
* Add slow path for single character write, and use exclusively forDaniel Dunbar2009-03-161-8/+8
| | | | | | single characters writes outside of the fast path in raw_ostream.h llvm-svn: 67053
* --- Reverse-merging (from foreign repository) r67049 into '.':Bill Wendling2009-03-161-61/+39
| | | | | | | | | | | | | | | | U test/CodeGen/X86/2009-03-13-PHIElimBug.ll D test/CodeGen/X86/2009-03-16-PHIElimInLPad.ll U lib/CodeGen/PHIElimination.cpp r67049 was causing this failure: Running /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/test/CodeGen/X86/dg.exp ... FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/test/CodeGen/X86/2009-03-13-PHIElimBug.ll for PR3784 Failed with exit(1) at line 1 while running: llvm-as < /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/test/CodeGen/X86/2009-03-13-PHIElimBug.ll | llc -march=x86 | /usr/bin/grep -A 2 {call f} | /usr/bin/grep movl child process exited abnormally llvm-svn: 67051
* Tweak the fix for PR3784: be less sensitive about justDuncan Sands2009-03-161-39/+61
| | | | | | | | | | | | | | | | | | how invokes are set up. The fix could be disturbed by register copies coming after the EH_LABEL, and also didn't behave quite right when it was the invoke result that was used in a phi node. Also (see new testcase) fix another phi elimination bug while there: register copies in the landing pad need to come after the EH_LABEL, because that's where execution branches to when unwinding. If they come before the EH_LABEL then they will never be executed... Also tweak the original testcase so it doesn't use a no-longer existing counter. The accumulated phi elimination changes fix two of seven Ada testsuite failures that turned up after landing pad critical edge splitting was turned off. So there's probably more to come. llvm-svn: 67049
* CellSPU:Scott Michel2009-03-163-98/+114
| | | | | | | Incorporate Tilmann's 128-bit operation patch. Evidently, it gets the llvm-gcc bootstrap a bit further along. llvm-svn: 67048
* This causes incorrect stack frame allocation when the last object is an ↵Bruno Cardoso Lopes2009-03-151-1/+1
| | | | | | | | array allocated on the stack which would lead the compiled program to run over its stack. Thanks to Gil Dogon llvm-svn: 67034
* Simplify. "Broken" is always true here.Nick Lewycky2009-03-151-1/+1
| | | | llvm-svn: 67025
* Remove obviously redundant call.Nick Lewycky2009-03-151-1/+1
| | | | llvm-svn: 67023
* Give the pre-alloc splitter access to the VirtRegMap. It doesn't do anythingOwen Anderson2009-03-141-0/+8
| | | | | | useful with it at the moment, but it will in the future. llvm-svn: 67012
* Apply a patch by Micah Villmow to fix AsmParser to accept vectorDan Gohman2009-03-142-1/+7
| | | | | | | shift constant expressions, and add support for folding vector shift constant expressions. This fixes PR3802. llvm-svn: 67010
* Use %rip-relative addressing on x86-64 whenever practical, asDan Gohman2009-03-141-9/+10
| | | | | | it has a smaller encoding than absolute addressing. llvm-svn: 67002
* Don't forego folding of loads into 64-bit adds when the otherDan Gohman2009-03-141-10/+3
| | | | | | | | | | operand is a signed 32-bit immediate. Unlike with the 8-bit signed immediate case, it isn't actually smaller to fold a 32-bit signed immediate instead of a load. In fact, it's larger in the case of 32-bit unsigned immediates, because they can be materialized with movl instead of movq. llvm-svn: 67001
* Add newlines at end of file (this can annoy gcov)Daniel Dunbar2009-03-142-2/+2
| | | | llvm-svn: 67000
* Avoid doing the transformation c ? 1.0 : 2.0 as load { 2.0, 1.0 } + c*4Mon P Wang2009-03-141-1/+4
| | | | | | | if FPConstant is legal because if the FPConstant doesn't need to be stored in a constant pool, the transformation is unlikely to be profitable. llvm-svn: 66994
* Improve FastISel's handling of truncates to i1, and implementDan Gohman2009-03-132-10/+31
| | | | | | | | ptrtoint and inttoptr in X86FastISel. These casts aren't always handled in the generic FastISel code because X86 sometimes needs custom code to do truncation and zero-extension. llvm-svn: 66988
* Fix -strip-debug-declare to work when there areDale Johannesen2009-03-131-19/+17
| | | | | | llvm.global.variable's but no llvm.declare's. llvm-svn: 66977
* Fix PR3784: If the source of a phi comes from a bb ended with an invoke, ↵Evan Cheng2009-03-132-0/+46
| | | | | | | | make sure the copy is inserted before the try range (unless it's used as an input to the invoke, then insert it after the last use), not at the end of the bb. Also re-apply r66140 which was disabled as a workaround. llvm-svn: 66976
* Fix a hashing bug in APInt. A certain pathological testcase (tooStuart Hastings2009-03-131-7/+85
| | | | | | | | | | | | large for the testsuite) took over six minutes to compile on my Mac. The patched LLVM-GCC compiles that testcase in three seconds (GCC takes less than one second). This hash function is more complex (about 35 instructions on x86) than what Chris wanted, but I expect it will be well-behaved with arbitrary inputs. Thank you to everyone who responded to my previous request for advice. llvm-svn: 66962
* Revert r66920. It was causing failures in the self-hosting buildbot (in releaseBill Wendling2009-03-1310-28/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mode). Running /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/dg.exp ... FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/crash-narrowfunctiontest.ll Failed with signal(SIGBUS) at line 1 while running: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/crash-narrowfunctiontest.ll -bugpoint-crashcalls -silence-passes > /dev/null 0 bugpoint 0x0035dd25 llvm::sys::SetInterruptFunction(void (*)()) + 85 1 bugpoint 0x0035e382 llvm::sys::RemoveFileOnSignal(llvm::sys::Path const&, std::string*) + 706 2 libSystem.B.dylib 0x92f112bb _sigtramp + 43 3 libSystem.B.dylib 0xffffffff _sigtramp + 1829694831 4 bugpoint 0x00021d1c main + 92 5 bugpoint 0x00002106 start + 54 6 bugpoint 0x00000004 start + 18446744073709543220 Stack dump: 0. Program arguments: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/crash-narrowfunctiontest.ll -bugpoint-crashcalls -silence-passes FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/misopt-basictest.ll Failed with signal(SIGBUS) at line 1 while running: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/misopt-basictest.ll -dce -bugpoint-deletecalls -simplifycfg -silence-passes 0 bugpoint 0x0035dd25 llvm::sys::SetInterruptFunction(void (*)()) + 85 1 bugpoint 0x0035e382 llvm::sys::RemoveFileOnSignal(llvm::sys::Path const&, std::string*) + 706 2 libSystem.B.dylib 0x92f112bb _sigtramp + 43 3 libSystem.B.dylib 0xffffffff _sigtramp + 1829694831 4 bugpoint 0x00021d1c main + 92 5 bugpoint 0x00002106 start + 54 6 bugpoint 0x00000006 start + 18446744073709543222 Stack dump: 0. Program arguments: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/misopt-basictest.ll -dce -bugpoint-deletecalls -simplifycfg -silence-passes FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/remove_arguments_test.ll Failed with signal(SIGBUS) at line 1 while running: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/remove_arguments_test.ll -bugpoint-crashcalls -silence-passes 0 bugpoint 0x0035dd25 llvm::sys::SetInterruptFunction(void (*)()) + 85 1 bugpoint 0x0035e382 llvm::sys::RemoveFileOnSignal(llvm::sys::Path const&, std::string*) + 706 2 libSystem.B.dylib 0x92f112bb _sigtramp + 43 3 libSystem.B.dylib 0xffffffff _sigtramp + 1829694831 4 bugpoint 0x00021d1c main + 92 5 bugpoint 0x00002106 start + 54 Stack dump: 0. Program arguments: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/remove_arguments_test.ll -bugpoint-crashcalls -silence-passes --- Reverse-merging (from foreign repository) r66920 into '.': U include/llvm/Support/CallSite.h U include/llvm/Instructions.h U lib/Analysis/IPA/GlobalsModRef.cpp U lib/Analysis/IPA/Andersens.cpp U lib/Bitcode/Writer/BitcodeWriter.cpp U lib/VMCore/Instructions.cpp U lib/VMCore/Verifier.cpp U lib/VMCore/AsmWriter.cpp U lib/Transforms/Utils/LowerInvoke.cpp U lib/Transforms/Scalar/SimplifyCFGPass.cpp U lib/Transforms/IPO/PruneEH.cpp U lib/Transforms/IPO/DeadArgumentElimination.cpp llvm-svn: 66953
OpenPOWER on IntegriCloud