Commit Graph

43774 Commits

Author SHA1 Message Date
Nate Begeman b87e63a730 Teach Legalize how to scalarize VSETCC
Teach X86 a few more vsetcc patterns.  Custom lowering for unsupported ones is next.

llvm-svn: 51009
2008-05-12 23:09:43 +00:00
Evan Cheng b980f6fb3d Xform bitconvert(build_pair(load a, load b)) to a single load if the load locations are at the right offset from each other.
llvm-svn: 51008
2008-05-12 23:04:07 +00:00
Dale Johannesen e6942c31ea New test for tail merging
llvm-svn: 51007
2008-05-12 22:59:44 +00:00
Dale Johannesen 9d29283fc7 Be more aggressive about tail-merging small blocks
if those blocks consist entirely of common instructions;
merging will not add an extra branch in this case.

llvm-svn: 51006
2008-05-12 22:53:12 +00:00
Steve Naroff a98fe19c7e Fix <rdar://problem/5924576> clang -fsyntax-only generates "redefinition" errors when parsing AppKit that gcc does not.
Teach Sema::MergeVarDecl() about __private_extern__.

llvm-svn: 51005
2008-05-12 22:36:43 +00:00
Bill Wendling 6b8bd513d4 Constify isSourceDefinedByImplicitDef function. Otherwise, just formatting
changes that don't change functionality.

llvm-svn: 51004
2008-05-12 22:15:05 +00:00
Ted Kremenek f5a94e7114 Added internal command logging.
llvm-svn: 51003
2008-05-12 22:07:14 +00:00
Steve Naroff bf1516c618 Fix <rdar://problem/5928590> clang -fsyntax-only: "incompatible operand types ('int' and 'void')" on input that 'gcc -fsyntax-only' eats
llvm-svn: 51002
2008-05-12 21:44:38 +00:00
Bill Wendling 1e11768a4f Constify the machine instruction passed into the
"is{Trivially,Really}ReMaterializable" methods.

llvm-svn: 51001
2008-05-12 20:54:26 +00:00
Nate Begeman d875c3e2fd Initial X86 codegen support for VSETCC.
llvm-svn: 51000
2008-05-12 20:34:32 +00:00
Dale Johannesen c4c4d8e1f7 Further rework of tail merge algorithm. Not quite
semantically identical, but little difference in
either results or execution speed; but it's much
easier to read, at least IMO.

llvm-svn: 50999
2008-05-12 20:33:57 +00:00
Nate Begeman 68586bddb1 Simplify some checks
llvm-svn: 50998
2008-05-12 20:33:52 +00:00
Dan Gohman 0863b19ae6 Fix a copy+paste bug; pseudo-instructions shouldn't have
encoding information.

llvm-svn: 50997
2008-05-12 20:22:45 +00:00
Nate Begeman 17c5434a16 Pointer comparisons should use icmp, not vicmp
llvm-svn: 50996
2008-05-12 20:16:55 +00:00
Owen Anderson f792860255 Go back to passing the analyses around as parameters.
llvm-svn: 50995
2008-05-12 20:15:55 +00:00
Nate Begeman 66d0a0e8f4 Pointer comparisons should be handled by icmp, not vicmp :)
llvm-svn: 50994
2008-05-12 20:11:05 +00:00
Evan Cheng 5f52142ee0 Forgot this.
llvm-svn: 50993
2008-05-12 20:08:05 +00:00
Nate Begeman 1196287522 Hard code CmpInst back to i1 for now while I go track down what in the bitcode reader/writer is assuming i1
This was breaking a bunch of tests

llvm-svn: 50992
2008-05-12 20:01:56 +00:00
Evan Cheng 2609d5e779 Refactor isConsecutiveLoad from X86 to TargetLowering so DAG combiner can make use of it.
llvm-svn: 50991
2008-05-12 19:56:52 +00:00
Bill Wendling 2930845065 Revert the previous commit. Go ahead and hoist rematerializable instructions.
llvm-svn: 50990
2008-05-12 19:47:18 +00:00
Nate Begeman cfcb56091b Add support for vicmp/vfcmp codegen, more legalize support coming.
This is necessary to unbreak the build.

llvm-svn: 50988
2008-05-12 19:40:03 +00:00
Bill Wendling 70613b84da One real change - don't hoist something that's trivially rematerializable. It's
possible for it to produce worse code than before.

The rest of this patch is code cleanup.

llvm-svn: 50987
2008-05-12 19:38:32 +00:00
Nate Begeman ac7f3d99dd Fix build breakage
llvm-svn: 50986
2008-05-12 19:23:22 +00:00
Nate Begeman d21957002a Add two new instructions to the llvm IR, vicmp and vfcmp. see updated LangRef
for details.  CodeGen support coming in a follow up patch

llvm-svn: 50985
2008-05-12 19:01:56 +00:00
Chris Lattner c9c296d235 testcase for PR2263, fixed by Nate's r50903 patch.
llvm-svn: 50983
2008-05-12 18:31:17 +00:00
Ted Kremenek 2abde809ce Unbreak build.
llvm-svn: 50980
2008-05-12 17:42:30 +00:00
Ted Kremenek a0055a8ef5 Support StringLiteralVal when comparing LVal types.
llvm-svn: 50979
2008-05-12 17:41:30 +00:00
Ted Kremenek 8322da5fa3 Grammar cleanup in comment.
Remove redundant assignment.

llvm-svn: 50978
2008-05-12 17:40:56 +00:00
Ted Kremenek babaa52efb 80 col violation fix.
llvm-svn: 50977
2008-05-12 17:40:13 +00:00
Ted Kremenek 92f78f4c04 When reading in the DeclCtx during deserialization, register the DeclCtx of the
ScopedDecl with the backpatcher, and *not* a local variable on the stack. The
value of DeclCtx gets filled in *later* by the backpatcher.

This fixes: http://llvm.org/bugs/show_bug.cgi?id=2308

llvm-svn: 50976
2008-05-12 17:29:34 +00:00
Dan Gohman 02e5933fa3 Make firstEightPowers const.
llvm-svn: 50975
2008-05-12 16:38:14 +00:00
Dan Gohman e9bc2ba256 Update comments.
llvm-svn: 50974
2008-05-12 16:34:30 +00:00
Mikhail Glushenkov c79304461a Filter option names to escape symbols not allowed as C++ identifiers.
Makes it possible to use options with names like "Wa,".
Also fixes the -Wall option handling as a side-effect.

llvm-svn: 50973
2008-05-12 16:33:06 +00:00
Mikhail Glushenkov 3f896c8d16 Make it possible to choose between different compilation graph definitions at compile-time.
llvm-svn: 50972
2008-05-12 16:32:24 +00:00
Mikhail Glushenkov 128349b8bf Fix some error messages; Make LLVMC pass through the exit code of a failed tool.
llvm-svn: 50971
2008-05-12 16:31:42 +00:00
Ted Kremenek 9a15a9477b Add Type::getAsTypedefType().
llvm-svn: 50970
2008-05-12 16:22:53 +00:00
Dan Gohman 906716c40f Fix a compile error on compilers that still want a return value
in a non-void function that calls abort.

llvm-svn: 50969
2008-05-12 16:17:19 +00:00
Eli Friedman 6a7087e455 Emit basic block for switch body; fixes PR2307.
llvm-svn: 50968
2008-05-12 16:08:04 +00:00
Dan Gohman ecb77385ab Fix a missing break in the ISD::FLT_ROUNDS_ handling. Patch by giuma!
llvm-svn: 50967
2008-05-12 16:07:15 +00:00
Eli Friedman 6e31321043 Don't try to take the address of a bitfield; fixes PR2310.
llvm-svn: 50966
2008-05-12 15:06:05 +00:00
Duncan Sands 2b84ba4c9b Testcase for PR2264.
llvm-svn: 50965
2008-05-12 13:01:19 +00:00
Owen Anderson 4afb1c864a Move the various analyses used by GVN into static variables so we don't have to keep passing them around or refetching them.
llvm-svn: 50963
2008-05-12 08:15:27 +00:00
Chris Lattner 9fdb814a56 prune #includes.
llvm-svn: 50962
2008-05-12 01:13:53 +00:00
Chris Lattner 5287765d1a Add a new SparsePropagation analysis utility, which allows you to do
SCCP like sparse lattice analysis with relative ease.  Just pick your
lattice function and implement the transfer function and you're good.
Just make sure you don't break monotonicity ;-)

llvm-svn: 50961
2008-05-12 01:12:24 +00:00
Nick Lewycky c38c1712f7 Make constructors target-specific. This fixes problems where the path would
include backslashes on Windows. This should fix llvm-ld problems on win32.

llvm-svn: 50960
2008-05-11 17:37:40 +00:00
Anton Korobeynikov a38e72d247 Add note
llvm-svn: 50959
2008-05-11 14:33:15 +00:00
Chris Lattner 47fed61526 Fix various DOUTs to not call the extremely expensive Value::getName()
method.  DOUT statements are disabled when assertions are off, but the
side effects of getName() are still evaluated.  Just call getNameSTart,
which is close enough and doesn't cause heap traffic.

llvm-svn: 50958
2008-05-11 01:55:59 +00:00
Chris Lattner 82146fa267 Simplify code by using SwitchInst::findCaseValue instead of reimplementing it.
llvm-svn: 50957
2008-05-10 23:56:54 +00:00
Bill Wendling 9fbd6e7e8c Remove warnings when using -Wshorten-64-to-32.
llvm-svn: 50952
2008-05-10 19:59:59 +00:00
Duncan Sands 8111b67ca8 Testcase for PR2303.
llvm-svn: 50951
2008-05-10 16:43:10 +00:00