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
Dale Johannesen
0bf92b14f1
Use common where we mean common, not weak.
...
llvm-svn: 51173
2008-05-16 00:52:30 +00:00
Dale Johannesen
876dd3ca9e
Treat common as distinct from weak global on Darwin x86.
...
llvm-svn: 51172
2008-05-16 00:52:06 +00:00
Dan Gohman
2f156ae850
Revert the change from r51157 in
...
test/Verifier/2002-11-05-GetelementptrPointers.ll, which was incorrect.
Instead, fix getIndexedType to not follow pointer types, as
PointerType is a subclass of CompositeType.
llvm-svn: 51171
2008-05-16 00:16:32 +00:00
Dan Gohman
32db11b634
Update comments based on Duncan's feedback.
...
llvm-svn: 51170
2008-05-15 23:35:32 +00:00
Dan Gohman
0a0fa7cf78
Fix a bug in LoopStrengthReduce that caused it to emit IR with
...
use-before-def. The problem comes up in code with multiple PHIs where
one PHI is being rewritten in terms of the other, but the other needs
to be casted first. LLVM rules requre the cast instruction to be
inserted after any PHI instructions, but when instructions were
inserted to replace the second PHI value with a function of the first,
they were ended up going before the cast instruction. Avoid this
problem by remembering the location of the cast instruction, when one
is needed, and inserting the expansion of the new value after it.
This fixes a bug that surfaced in 255.vortex on x86-64 when
instcombine was removed from the middle of the loop optimization
passes.
llvm-svn: 51169
2008-05-15 23:26:57 +00:00
Ted Kremenek
dd547b1ce9
Fixed another regression introduced by r51113 caused by some refactoring
...
in Sema::CheckFunctionCall:
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20080512/005706.html
The bug was that the logic from the helper methods used by CheckFunctionCall
were being inverted (a subtle bug). This would cause the parser to discard
any valid AST nodes involving several builtins (see patch).
This removes the last regression failure I'm seeing in the test suite: Analysis-Apple/NoReturn.
llvm-svn: 51168
2008-05-15 22:24:49 +00:00
Dale Johannesen
2918b0ec2f
Remove the S92 code, which really has nothing to do
...
with what the test is testing; makes it pass again on ppc32.
llvm-svn: 51167
2008-05-15 22:23:54 +00:00
Dale Johannesen
5c7dd286a4
Evan has implemented this on ppc, so run the test there.
...
llvm-svn: 51166
2008-05-15 22:22:37 +00:00
Evan Cheng
29e59ad6c9
Fix typos and comments.
...
llvm-svn: 51165
2008-05-15 22:13:02 +00:00
Ted Kremenek
98b730d5bb
Removed bogus "return true" in Expr::isConstantExpr that returned true for all
...
expressions. This appears to be a regression introduced in r51113 that caused
many test cases to fail (there is still a test case in the Analysis directory
that is failing):
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20080512/005706.html
llvm-svn: 51164
2008-05-15 21:49:04 +00:00
Steve Naroff
ad91868aa6
Fix rewriter bug <rdar://problem/5929344> clang ObjC rewriter: "extern int __CFConstantStringClassReference[];" should be extern "C".
...
Have clang predefine OBJC_NEW_PROPERTIES (which is what gcc does).
llvm-svn: 51163
2008-05-15 21:12:10 +00:00
Dale Johannesen
6ef726a066
Allow an extra bit for CommonLinkage.
...
This changes the .bc file format, but if I understand
how it works correctly, old .bc files continue to
be readable.
llvm-svn: 51161
2008-05-15 20:49:28 +00:00