Chris Lattner
0c5b5c08e1
add missing #include.
...
llvm-svn: 51227
2008-05-18 14:24:58 +00:00
Chris Lattner
8c0f0a0e6c
Fix PR2339
...
llvm-svn: 51226
2008-05-18 04:11:26 +00:00
Chris Lattner
8871489ae7
remove empty file?
...
llvm-svn: 51225
2008-05-18 04:10:18 +00:00
Nick Lewycky
46e3a168c0
Revert constant-folding change that will miscompile in some cases.
...
llvm-svn: 51223
2008-05-17 19:00:05 +00:00
Chris Lattner
504c367af9
trip count computation deficiency
...
llvm-svn: 51222
2008-05-17 15:37:38 +00:00
Bill Wendling
568cd9c076
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
baa90d4eef
Unbreak the build.
...
llvm-svn: 51217
2008-05-17 09:05:22 +00:00
Nick Lewycky
1df40102a9
Constant fold inttoptr and ptrtoint.
...
llvm-svn: 51216
2008-05-17 09:03:26 +00:00
Nick Lewycky
6f3744c685
Move isTrueWhenEqual to ICmpInst.
...
llvm-svn: 51215
2008-05-17 07:33:39 +00:00
Dale Johannesen
415dc434d6
Less conservative verison of previous patch,
...
suggested by Duncan.
llvm-svn: 51211
2008-05-16 23:18:52 +00:00
Dale Johannesen
12b968dd1e
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
5da4b3ee8b
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
002f76dcec
Add CommonLinkage.
...
llvm-svn: 51208
2008-05-16 22:42:11 +00:00
Dale Johannesen
b2411740b7
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
11359e9b1c
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
Dale Johannesen
16fa5c08cb
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
d61f20217a
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
Evan Cheng
538403664e
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
76aaaf62e8
Fix test.
...
llvm-svn: 51191
2008-05-16 17:08:51 +00:00
Duncan Sands
e77eede842
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
a018f1f47e
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
2ad66b343d
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
ffbaf56075
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
6fbcec4778
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
55b78bc887
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
79a25ff8ec
Use loop deletion instead of ADCE in these tests.
...
llvm-svn: 51180
2008-05-16 04:33:37 +00:00
Owen Anderson
791223eac7
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
d282184d18
Use loop deletion instead of ADCE for removing loops.
...
llvm-svn: 51178
2008-05-16 04:27:38 +00:00
Owen Anderson
3e607df2f8
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
00e8e1e258
implement PR2328.
...
llvm-svn: 51176
2008-05-16 02:59:42 +00:00
Dale Johannesen
4e46c5601d
Use common where we mean common, not weak.
...
llvm-svn: 51173
2008-05-16 00:52:30 +00:00
Dale Johannesen
ebc511c6aa
Treat common as distinct from weak global on Darwin x86.
...
llvm-svn: 51172
2008-05-16 00:52:06 +00:00
Dan Gohman
fe7f6bc9ce
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
1760a08221
Update comments based on Duncan's feedback.
...
llvm-svn: 51170
2008-05-15 23:35:32 +00:00
Dan Gohman
2da4145cd8
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
Dale Johannesen
247e20c532
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
f464bece2d
Evan has implemented this on ppc, so run the test there.
...
llvm-svn: 51166
2008-05-15 22:22:37 +00:00
Evan Cheng
73dadf21ce
Fix typos and comments.
...
llvm-svn: 51165
2008-05-15 22:13:02 +00:00
Dale Johannesen
8e66b309b4
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
Nate Begeman
b38ee2e03b
Actually scalarize the operand to BIT_CONVERT instead of asking someone to do
...
something with a v1 type.
llvm-svn: 51160
2008-05-15 20:40:58 +00:00
Steve Naroff
1a31342bae
Reverting r51100...I need to use VC++ 2005.
...
llvm-svn: 51159
2008-05-15 20:09:48 +00:00
Dan Gohman
821bf58428
IR support for extractvalue and insertvalue instructions. Also, begin
...
moving toward making structs and arrays first-class types.
llvm-svn: 51157
2008-05-15 19:50:34 +00:00
Dan Gohman
48ac9aec33
Use static and anonymous namespaces consistently with other passes.
...
llvm-svn: 51156
2008-05-15 19:43:55 +00:00
Devang Patel
58e01a3a2e
Revert 51067 check-in for now.
...
llvm-svn: 51155
2008-05-15 18:46:28 +00:00
Devang Patel
66480d1c07
Remove useless check.
...
Patch by Matthijs Kooijman.
llvm-svn: 51154
2008-05-15 18:04:29 +00:00
Evan Cheng
d86d86bbdf
Disable JIT symbol table for now.
...
llvm-svn: 51152
2008-05-15 17:31:35 +00:00
Duncan Sands
130254e1ff
Use of UINT_MAX requires climits, at least when
...
compiling with gcc 4.3.
llvm-svn: 51145
2008-05-15 11:22:50 +00:00
Gabor Greif
48ffb6c7dc
Fix a bunch of 80col violations that arose from the Create API change. Tweak makefile targets to find these better.
...
llvm-svn: 51143
2008-05-15 10:04:30 +00:00
Evan Cheng
778a5e27b0
Make use of vector load and store operations to implement memcpy, memmove, and memset. Currently only X86 target is taking advantage of these.
...
llvm-svn: 51140
2008-05-15 08:39:06 +00:00
Evan Cheng
0a854f3b63
Remove tail duplication pass.
...
llvm-svn: 51139
2008-05-15 07:43:15 +00:00