Commit Graph

43891 Commits

Author SHA1 Message Date
Bill Wendling dc73a703db s/insure/ensure/
llvm-svn: 51232
2008-05-19 00:05:30 +00:00
Gabor Greif 9c9633f5af ignore Output dir
llvm-svn: 51231
2008-05-18 22:33:28 +00:00
Nate Begeman 65720c968c Teach GVN to not assert on vector comparisons
llvm-svn: 51230
2008-05-18 19:49:05 +00:00
Nate Begeman 7af15f17b5 Fix a backwards check in the JIT symbol table code
llvm-svn: 51229
2008-05-18 19:09:10 +00:00
Eli Friedman 8e12298192 Add proper type-checking for pointer additiion; before, we were accepting
addition with a pointer and an integer even when it didn't make sense.

llvm-svn: 51228
2008-05-18 18:08:51 +00:00
Chris Lattner e2846b6929 add missing #include.
llvm-svn: 51227
2008-05-18 14:24:58 +00:00
Chris Lattner 4b2a724fb8 Fix PR2339
llvm-svn: 51226
2008-05-18 04:11:26 +00:00
Chris Lattner 14b3604dcf remove empty file?
llvm-svn: 51225
2008-05-18 04:10:18 +00:00
Eli Friedman f2442dcc8d Fix support for _Bool bitfields. The issue is that the bitfield width
used for _Bool is not the same as the primitive width (which for _Bool 
is 1 bit).  The load and store changes add some casts to make the 
types consistent.  The EmitLValue changes make sure that the pointer is 
of an appropriate type for loading the bitfield.

This isn't perfect, but it's an improvement, and getting everything 
right depends on actually laying out structs in an ABI-compliant way.

llvm-svn: 51224
2008-05-17 20:03:47 +00:00
Nick Lewycky eb185ca5e9 Revert constant-folding change that will miscompile in some cases.
llvm-svn: 51223
2008-05-17 19:00:05 +00:00
Chris Lattner 1bafa6c886 trip count computation deficiency
llvm-svn: 51222
2008-05-17 15:37:38 +00:00
Bill Wendling d70febc73b On Darwin, the string header file isn't 64-bit clean. The use of
"-Wshorten-64-to-32 -Werror" will cause a failure when compiling this complex
program:

#include <string>

class Path {
  mutable std::string path;
public:
  bool operator == (const Path &that) {
    return path == that.path;
  }
};

Using strcmp gets us past this annoying error.

llvm-svn: 51218
2008-05-17 09:10:40 +00:00
Nick Lewycky 79d681dddd Unbreak the build.
llvm-svn: 51217
2008-05-17 09:05:22 +00:00
Nick Lewycky 1ba90bb69b Constant fold inttoptr and ptrtoint.
llvm-svn: 51216
2008-05-17 09:03:26 +00:00
Nick Lewycky 79376f4e02 Move isTrueWhenEqual to ICmpInst.
llvm-svn: 51215
2008-05-17 07:33:39 +00:00
Ted Kremenek d727220d1a Micro-optimization when checking for panic functions.
llvm-svn: 51214
2008-05-17 00:42:01 +00:00
Ted Kremenek c8081b4e16 Fix 80 col violation.
llvm-svn: 51213
2008-05-17 00:40:45 +00:00
Ted Kremenek 0e76583574 Added panic function _XCAssertionFailureHandler.
llvm-svn: 51212
2008-05-17 00:33:23 +00:00
Dale Johannesen 5610dabac9 Less conservative verison of previous patch,
suggested by Duncan.

llvm-svn: 51211
2008-05-16 23:18:52 +00:00
Dale Johannesen e45329448e Add CommonLinkage, in a way that preserves the
behavior on old .bc files.

llvm-svn: 51210
2008-05-16 22:46:40 +00:00
Dale Johannesen 829dab0221 Add CommonLinkage to lto (treated same as weak AFAICT)
and llvm-nm (prints as C).

llvm-svn: 51209
2008-05-16 22:44:18 +00:00
Dale Johannesen ab5b577a99 Add CommonLinkage.
llvm-svn: 51208
2008-05-16 22:42:11 +00:00
Dale Johannesen e7f5bc2c3b Weak functions not declared non-throwing might be
replaced at linktime with a body that throws, even
if the body in this file does not.  Make PruneEH
be more conservative in this case.
g++.dg/eh/weak1.C

llvm-svn: 51207
2008-05-16 21:31:48 +00:00
Eric Christopher 901b1a75c9 Add functions to enable adding a single attribute to a function and
its associated call site.

llvm-svn: 51204
2008-05-16 20:39:43 +00:00
Eli Friedman d5a4838e3d Backout of codegen-based fix to PR2334; this has been fixed differently
at the Sema layer.

llvm-svn: 51203
2008-05-16 20:38:39 +00:00
Eli Friedman 928ab4d546 Sema-based fix for PR2334. The issue is that even if the two sides of
the condidtional have compatible types, they are not necessarily the 
same type.  Therefore, we cast to the composite type.  As a hack, for 
the moment we assume that the composite type is the type of the 
left-hand expression; this isn't correct, but it's good enough for most 
purposes.

llvm-svn: 51202
2008-05-16 20:37:07 +00:00
Dale Johannesen 2e1d5e487b Record weak external linkage in a case where we were
missing it. gcc.dg/darwin-weakimport-2.c.
Handle common and weak differently for darwin ppc32.

llvm-svn: 51201
2008-05-16 20:09:25 +00:00
Gabor Greif e1f6e4b21d API change for {BinaryOperator|CmpInst|CastInst}::create*() --> Create. Legacy interfaces will be in place for some time. (Merge from use-diet branch.)
llvm-svn: 51200
2008-05-16 19:29:10 +00:00
Nate Begeman 9800faa578 Fix some prototypes, and implement some builtins until we have our header files completed.
llvm-svn: 51199
2008-05-16 18:59:42 +00:00
Ted Kremenek c812b23ce8 Cache leaks by the allocation site, not the leak location.
llvm-svn: 51198
2008-05-16 18:33:44 +00:00
Ted Kremenek 590abd363e Partitioned BugTypeCachedLocation::isCached() into two methods: one that accepts and ExplodedNode, and the other that accepts a ProgramPoint. The default behavior is to cache bug reports by the
location they occur (the end node).  Subclasses can override this behavior by providing a different ProgramPoint.

llvm-svn: 51197
2008-05-16 18:33:14 +00:00
Eli Friedman 823622105e Review nit.
llvm-svn: 51196
2008-05-16 17:54:49 +00:00
Eli Friedman a959a59ac6 Clean up ownership per review comment.
llvm-svn: 51195
2008-05-16 17:51:27 +00:00
Eli Friedman bb0eb81ebf Fix review nit.
llvm-svn: 51194
2008-05-16 17:44:00 +00:00
Eli Friedman cb92a3f03b Patch for PR2334, and a similar ObjC bug.
llvm-svn: 51193
2008-05-16 17:37:11 +00:00
Evan Cheng 9ac3631fa3 If the result of a BIT_CONVERT is a v1* vector, it doesn't mean its source is a v1* vector.
llvm-svn: 51192
2008-05-16 17:19:05 +00:00
Evan Cheng a9a0c1570d Fix test.
llvm-svn: 51191
2008-05-16 17:08:51 +00:00
Ted Kremenek 92137a3d8d Added CFGBlock::hasBinaryBranchTerminator().
llvm-svn: 51190
2008-05-16 16:06:00 +00:00
Eli Friedman db421caaa3 Minor cleanup to isBuiltinConstantExpr.
llvm-svn: 51188
2008-05-16 13:28:37 +00:00
Duncan Sands 67933e6692 Bill pointed out that system headers should be
included after local headers.

llvm-svn: 51187
2008-05-16 09:30:00 +00:00
Duncan Sands 70424d195a Silence the compiler warning differently. The
original method caused gcc-4.2 to complain.

llvm-svn: 51186
2008-05-16 09:19:16 +00:00
Evan Cheng c5c7a290e9 Re-enable tail duplication pass (now with default threshold down to 1 instruction).
llvm-svn: 51184
2008-05-16 07:57:10 +00:00
Evan Cheng 173a53f87c Do not dup malloc, vector instructions, etc. Throttle the default theshold way down.
llvm-svn: 51183
2008-05-16 07:55:50 +00:00
Owen Anderson c7d6eceb69 Remove ADCE's ability to delete loops. This ability is now implemented in a
safer manner by loop deletion.

llvm-svn: 51182
2008-05-16 04:34:51 +00:00
Owen Anderson bdcf408d67 Move this test from ADCE to loop deletion, where it is more appropriate.
llvm-svn: 51181
2008-05-16 04:34:19 +00:00
Owen Anderson ecc12fe81d Use loop deletion instead of ADCE in these tests.
llvm-svn: 51180
2008-05-16 04:33:37 +00:00
Owen Anderson ad5f211b48 Clean ups for loop deletion based on Chris' feedback.
Also, use SCEV to determine the trip count of the loop, which is more powerful
and accurate that Loop::getTripCount.

llvm-svn: 51179
2008-05-16 04:32:45 +00:00
Owen Anderson 00c7d82391 Use loop deletion instead of ADCE for removing loops.
llvm-svn: 51178
2008-05-16 04:27:38 +00:00
Owen Anderson a74d72d01f Fix this test. It was testing broken behavior in that it required ADCE to eliminate
a potentially infinite loop, which is undesirable.  Instead, test the LICM behavior
that we're really interested in.

llvm-svn: 51177
2008-05-16 04:25:09 +00:00
Chris Lattner 5c953b7d27 implement PR2328.
llvm-svn: 51176
2008-05-16 02:59:42 +00:00