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
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
Chris Lattner
5c953b7d27
implement PR2328.
...
llvm-svn: 51176
2008-05-16 02:59:42 +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
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
Evan Cheng
29e59ad6c9
Fix typos and comments.
...
llvm-svn: 51165
2008-05-15 22:13:02 +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
Nate Begeman
f79f52282c
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
Dan Gohman
12fce7751b
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
f52c8044ea
Use static and anonymous namespaces consistently with other passes.
...
llvm-svn: 51156
2008-05-15 19:43:55 +00:00
Devang Patel
61724355af
Remove useless check.
...
Patch by Matthijs Kooijman.
llvm-svn: 51154
2008-05-15 18:04:29 +00:00
Evan Cheng
d37a6cf669
Disable JIT symbol table for now.
...
llvm-svn: 51152
2008-05-15 17:31:35 +00:00
Duncan Sands
783cb2d76d
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
697e94cc22
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
ef377adca0
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
Nate Begeman
60f9320fc5
Move the operator new and operator delete out of line. This fixes an issue with
...
operator new() referring to the static initTags function, which has to be in the
same linkage unit as any file including User.h.
llvm-svn: 51136
2008-05-15 01:23:11 +00:00
Dale Johannesen
fa48372a24
Don't assume underlying APInt type is limited
...
to 64 bits.
llvm-svn: 51135
2008-05-14 22:53:25 +00:00
Bill Wendling
3716952f10
Situations can arise when you have a function called that returns a 'void', but
...
is bitcast to return a floating point value. The result of the instruction may
not be used by the program afterwards, and LLVM will happily remove all
instructions except the call. But, on some platforms, if a value is returned as
a floating point, it may need to be removed from the stack (like x87). Thus, we
can't get rid of the bitcast even if there isn't a use of the value.
llvm-svn: 51134
2008-05-14 22:45:20 +00:00
Dale Johannesen
8d76cdb144
Remove undefined behavior in hex string->APFloat
...
conversion. Try 0x1.0000a4p+0f. Neil, please review.
llvm-svn: 51132
2008-05-14 22:05:31 +00:00
Evan Cheng
4ea9d49590
Use a better idiom to silence compiler warnings.
...
llvm-svn: 51131
2008-05-14 21:08:07 +00:00
Chris Lattner
e15051d64b
rename SimplifyCFG.cpp -> SimplifyCFGPass.cpp
...
llvm-svn: 51130
2008-05-14 20:38:44 +00:00
Evan Cheng
ad2b7a7b97
Silence warnings.
...
llvm-svn: 51129
2008-05-14 20:33:21 +00:00
Evan Cheng
0f7fb95e79
Really silence compiler warnings.
...
llvm-svn: 51126
2008-05-14 20:29:30 +00:00
Evan Cheng
a5b0a8d7fe
Really silence compiler warnings.
...
llvm-svn: 51123
2008-05-14 20:26:35 +00:00
Dale Johannesen
21160df793
CommonLinkage (missed a file)
...
llvm-svn: 51120
2008-05-14 20:14:09 +00:00
Dale Johannesen
5c1b6db9ed
Generated files for CommonLinkage.
...
llvm-svn: 51119
2008-05-14 20:13:36 +00:00
Dale Johannesen
ce4396bc92
Add CommonLinkage; currently tentative definitions
...
are represented as "weak", but there are subtle differences
in some cases on Darwin, so we need both. The intent
is that "common" will behave identically to "weak" unless
somebody changes their target to do something else.
No functional change as yet.
llvm-svn: 51118
2008-05-14 20:12:51 +00:00
Evan Cheng
763ec13862
Silence some compiler warnings.
...
llvm-svn: 51115
2008-05-14 20:07:51 +00:00
Devang Patel
f2763e233e
Simplify internalize pass. Add test case.
...
Patch by Matthijs Kooijman!
llvm-svn: 51114
2008-05-14 20:01:01 +00:00
Dan Gohman
3ab94df276
When bit-twiddling CondCode values for integer comparisons produces
...
SETOEQ, is it does with (SETEQ & SETULE), map it to SETEQ.
llvm-svn: 51112
2008-05-14 18:17:09 +00:00
Sanjiv Gupta
7fc6027873
Detabification. Fixed indentation and spacing.
...
Changed cout to DOUT, and TODOs to FIXMEs.
Other changes as per coding conventions.
llvm-svn: 51105
2008-05-14 11:31:39 +00:00
Nicolas Geoffray
fbdca96469
Fix typo in ParameterAttribute fields usage. Add an include
...
to make the Cpp backend output compilable.
llvm-svn: 51095
2008-05-14 07:52:03 +00:00
Sanjiv Gupta
1f8c9ef4cc
Fixed the file description header at the top to remove the developer name.
...
llvm-svn: 51094
2008-05-14 06:50:01 +00:00
Evan Cheng
6f34ed0d36
Doh. Alignment is in bytes, not in bits.
...
llvm-svn: 51092
2008-05-14 02:49:43 +00:00
Dan Gohman
eabd647cd5
Change target-specific classes to use more precise static types.
...
This eliminates the need for several awkward casts, including
the last dynamic_cast under lib/Target.
llvm-svn: 51091
2008-05-14 01:58:56 +00:00
Dan Gohman
fd3e3003f3
Whitespace cleanups.
...
llvm-svn: 51089
2008-05-14 00:43:10 +00:00
Dan Gohman
4e974ab933
Make PreVerifyID, IntSigsEnd, and KillSigsEnd const.
...
llvm-svn: 51088
2008-05-14 00:42:30 +00:00
Dan Gohman
3dc2d92ebd
Split the loop unroll mechanism logic out into a utility function.
...
Patch by Matthijs Kooijman!
llvm-svn: 51083
2008-05-14 00:24:14 +00:00
Owen Anderson
17816b321f
Fix Analysis/BasicAA/pure-const-dce.ll. This turned out to be a correctness
...
bug as well as a missed optimization. We weren't properly checking for local
dependencies before moving on to non-local ones when doing non-local read-only
call CSE.
llvm-svn: 51082
2008-05-13 23:18:30 +00:00
Gabor Greif
5ef7404dc7
Merge of r51073-51074 from use-diet branch.
...
Do not rely on std::swap<Use>, provide a (faster) member function instead.
This change is primarily necessitated by MSVC++'s incompatibility with
declaring std::swap<Use> to be a friend of Use.
Also contains some minor tweaks to Use inline functions,
to undo pointless changes that sneaked in with the last merge.
llvm-svn: 51078
2008-05-13 22:51:52 +00:00
Devang Patel
a9fcf009a3
Dominance Frontier is cfg only pass.
...
llvm-svn: 51075
2008-05-13 22:43:21 +00:00
Owen Anderson
3ab976a21f
Fix memdep's handling of invokes when finding the dependency of another call
...
instruction. This fixes some Ada miscompiles reported in PR2324.
llvm-svn: 51069
2008-05-13 21:25:37 +00:00
Dale Johannesen
e695ab227c
Fix for PR 2323, infinite loop in tail dup.
...
llvm-svn: 51063
2008-05-13 20:06:43 +00:00
Chris Lattner
03ce206143
add a note
...
llvm-svn: 51062
2008-05-13 19:56:20 +00:00
Evan Cheng
f8ab712fa9
- Fix the pasto in the fix for a previous pasto.
...
- Incorporate Chris' comment suggestion.
llvm-svn: 51061
2008-05-13 18:59:59 +00:00
Chris Lattner
d17f58ae6e
add a note
...
llvm-svn: 51060
2008-05-13 18:48:54 +00:00
Nate Begeman
6645714f16
Fix one more encoding bug.
...
llvm-svn: 51057
2008-05-13 17:52:09 +00:00
Evan Cheng
595e226085
- Don't treat anyext 16-bit load as a 32-bit load if it's volatile.
...
- Correct a pasto.
llvm-svn: 51054
2008-05-13 16:45:56 +00:00