Commit Graph

41063 Commits

Author SHA1 Message Date
Dale Johannesen eabc5f39af Pass alignment on ByVal parameters, from FE, all
the way through.  It is now used for codegen.

llvm-svn: 47484
2008-02-22 17:49:45 +00:00
Dale Johannesen eac159c1f0 MMX vectors are passed 4-byte aligned.
llvm-svn: 47483
2008-02-22 17:47:28 +00:00
Anton Korobeynikov 6c1c0b8b57 Add smart refcounting pointer class to ADT back (known before as IntrusiveSPtr.h).
llvm-svn: 47482
2008-02-22 17:26:05 +00:00
Chris Lattner c8576eeaad fix some bugs in tutorial, patch by Erick Tryzelaar
llvm-svn: 47481
2008-02-22 17:09:39 +00:00
Anton Korobeynikov 622e21256e Unbreak build for VC2008. Patch by Argiris Kirtzidis!
llvm-svn: 47480
2008-02-22 10:11:21 +00:00
Anton Korobeynikov 6636210de7 Provide __main hooks for cygwin & mingw32
llvm-svn: 47479
2008-02-22 10:08:31 +00:00
Zhou Sheng 3b8eb704fc Fixed a typo.
llvm-svn: 47478
2008-02-22 10:00:35 +00:00
Evan Cheng 94ba37f8e3 Allow re-materialization of pic load (controlled by -remat-pic-load for now).
llvm-svn: 47476
2008-02-22 09:25:47 +00:00
Evan Cheng c373911461 Enable re-materialization of instructions which have virtual register operands if
the definition of the operand also reaches its uses.

llvm-svn: 47475
2008-02-22 09:24:50 +00:00
Chris Lattner ab8bfc28c8 copy mmx values from/to memory with GPRs on x86-32
instead of with mmx registers.  This horribleness is apparently
done by gcc to avoid having to insert emms in places that really 
should have it.  This is the second half of rdar://5741668.

llvm-svn: 47474
2008-02-22 05:18:04 +00:00
Devang Patel e665095da1 Print getresult instruction properly.
llvm-svn: 47473
2008-02-22 03:10:23 +00:00
Devang Patel b5f5073a1a Print ret instruction that returns aggregates.
llvm-svn: 47472
2008-02-22 02:50:49 +00:00
Devang Patel 49cfe7018f Read and write getresult.
llvm-svn: 47471
2008-02-22 02:49:49 +00:00
Chris Lattner 997b3a65ca Start using GPR's to copy around mmx value instead of mmx regs.
GCC apparently does this, and code depends on not having to do
emms when this happens.  This is x86-64 only so far, second half
should handle x86-32.

rdar://5741668

llvm-svn: 47470
2008-02-22 02:09:43 +00:00
Chris Lattner 160742ff57 minor cleanups to LSBaseSDNode.
llvm-svn: 47469
2008-02-22 01:54:35 +00:00
Evan Cheng 271aef2b03 Fix compiler warning.
llvm-svn: 47468
2008-02-22 01:48:00 +00:00
Dan Gohman f3057a939d Fix a regression in 403.gcc and 186.crafty introduced in 47383. To test
that a value is >= 32, check that all of the high bits are zero, not
just one or more.

llvm-svn: 47467
2008-02-22 01:12:31 +00:00
Ted Kremenek cb507025d4 Added "assumption" logic for lval::FuncVal and lval::GotoLabel, and simplified
assumption logic for lval::DeclVal.

llvm-svn: 47466
2008-02-22 00:54:56 +00:00
Ted Kremenek 51017b5432 Bug fix: For transfer function for unary "!", compare the subexpression value
against '0' of the same bit-width.

llvm-svn: 47465
2008-02-22 00:42:36 +00:00
Ted Kremenek 20c91421fe Bug fix in liveness: Only compute liveness information for VarDecls.
llvm-svn: 47464
2008-02-22 00:34:10 +00:00
Ted Kremenek eb653882de Return "Unknown" when using the value of a function pointer whose value
is symbolic.

llvm-svn: 47463
2008-02-21 23:17:39 +00:00
Devang Patel 35519d51d6 print getresult instruction.
llvm-svn: 47461
2008-02-21 23:02:20 +00:00
Devang Patel 9fea019759 Use isa<> instead of getTypeID() to check StructType.
llvm-svn: 47460
2008-02-21 22:24:17 +00:00
Ted Kremenek 6d2bbd9467 Regression fix: Handle binary operators where both the left and right
operands are symbolic lvalues.

llvm-svn: 47459
2008-02-21 22:08:33 +00:00
Eli Friedman 5d8fa828f1 A few minor updates, removing implemented stuff and adding a couple of
new things.

llvm-svn: 47458
2008-02-21 21:16:49 +00:00
Chris Lattner 3422b673d1 Make the clobber analysis a bit more smart: we only are careful about
early clobbers if the clobber list contains a *register* not some thing
like {memory}, {dirflag} etc.

llvm-svn: 47457
2008-02-21 20:54:31 +00:00
Ted Kremenek 9f1ed12bc4 Added transfer function support for dispatching to functions we don't know
about.  The default logic is to invalidate the values of all values
passed-by-reference.

llvm-svn: 47456
2008-02-21 19:46:04 +00:00
Nate Begeman b16d53ea31 add a test case
llvm-svn: 47455
2008-02-21 19:44:16 +00:00
Chris Lattner bdd4c8b04d Treat clobber operands like early clobbers: if we have
any, we force sdisel to do all regalloc for an asm.  This
leads to gross but correct codegen.

This fixes the rest of PR2078.

llvm-svn: 47454
2008-02-21 19:43:13 +00:00
Bill Wendling 15526b2e52 Clear PhysRegPartUse for the sub register as well.
llvm-svn: 47453
2008-02-21 19:35:27 +00:00
Bill Wendling 963192f40b Adjust the MaxAlignment for the special register scavenging spill slot.
llvm-svn: 47452
2008-02-21 19:33:53 +00:00
Nate Begeman d45d38d2b7 Handle __attribute__((annotate("string")))
llvm-svn: 47451
2008-02-21 19:30:49 +00:00
Ted Kremenek e82c7a44d6 RemoveDeadBindings should now check for UninitalizedVal, as it is a now
an error to cast it to LVal.

llvm-svn: 47450
2008-02-21 19:30:14 +00:00
Ted Kremenek 7328fa6ec8 Regression fix: Handle pointer arithmetic in unary ++/--.
llvm-svn: 47449
2008-02-21 19:29:23 +00:00
Evan Cheng 31160f5b98 Help testing.
llvm-svn: 47448
2008-02-21 19:20:21 +00:00
Ted Kremenek 7f8ebb73af Removed bogus assertions regard LValues binding to UnknownVal; they can
do so implicitly.

llvm-svn: 47447
2008-02-21 19:15:37 +00:00
Ted Kremenek d21429a8e7 Remove incorrect casts from UnknownVal to NonLVal.
llvm-svn: 47446
2008-02-21 19:10:12 +00:00
Ted Kremenek b1e3218125 FIX: Promote the correct operand.
llvm-svn: 47445
2008-02-21 18:46:24 +00:00
Ted Kremenek 7e4861b3c1 Simplified and generalized transfer function logic for casts, allowing
the transfer function to be invoked without an Expr* for the Cast operation.

Added implicit promotions to the transfer function logic for compound
assignments.

llvm-svn: 47444
2008-02-21 18:43:30 +00:00
Ted Kremenek d2332f9625 Added transfer function support for sizeof(void)
llvm-svn: 47443
2008-02-21 18:15:29 +00:00
Eli Friedman c62dd9d345 Some const initializer tests for stuff I just committed.
llvm-svn: 47442
2008-02-21 18:07:36 +00:00
Ted Kremenek 7f0639b039 Major cleanup of path-sensitive analysis engine and the current analysis
based on constant. prop. and limited symbolics.

- Renamed class: RValue -> RVal, LValue -> LVal, etc.
- Minor method renamings and interface cleanups.
- Tightened the RVal "type system" so that UninitializedVal and UnknownVal
  cannot be cast to LVal or NonLVal.  This forces these corner cases values
  to be explicitly handled early before being dispatched to plug-in transfer
  function logic.
- Major cleanup in the transfer function logic for binary and unary operators.
  Still fixing some regressions, but we now explicitly handle Uninitialized
  and Unknown values in a more rigorous way.

llvm-svn: 47441
2008-02-21 18:02:17 +00:00
Eli Friedman a243311f1d Clean up constant implicit cast emission; fixes a few edge cases
invlolving implicit casts that cause both a decay to pointer type and a 
type conversion.

llvm-svn: 47440
2008-02-21 17:57:49 +00:00
Eli Friedman 115e989985 Fix brace-enclosed string initializers for char arrays. From pr2079,
ahtough I had the fix in my tree previously.

llvm-svn: 47439
2008-02-21 17:45:41 +00:00
Gabor Greif 5c27a96967 Change variable name to Tq (from TQ)
because silly gcc 3.4.6 barfs on this
construct.
Type.h defines an "enum TQ", which makes
the parser to err.

llvm-svn: 47438
2008-02-21 17:40:55 +00:00
Dan Gohman d723b13f14 Change a C-style cast to const_cast, to avoid a -Wcast-qual warning.
llvm-svn: 47437
2008-02-21 17:33:24 +00:00
Gabor Greif 4999168309 Added classes SolarisTargetInfo and
SolarisSparcV8TargetInfo to be able
to handle "sparc-" triple prefixes.

Please be aware that this is a minimal
kludge, that pretty much duplicates
the features of DarwinPowerPCTargetInfo,
and also incorrectly uses stuff from
the PPC namespace.

But in result "make test" now passes
a lot of tests, the notable exceptions
being the objc rewrite tests and
mandel.c.

llvm-svn: 47436
2008-02-21 16:29:08 +00:00
Andrew Lenharth 7254826c40 Better names as per Evan's request
llvm-svn: 47435
2008-02-21 16:11:38 +00:00
Nick Lewycky 5a3db1406a Simplify this code, no functionality change.
llvm-svn: 47434
2008-02-21 09:14:53 +00:00
Nick Lewycky 839adb877a GlobalValues are Constants, remove redundant code. Also fix typo in a comment.
llvm-svn: 47433
2008-02-21 08:34:02 +00:00