Dan Gohman
9c258bd2ec
Factor out the code to add a MachineOperand to a MachineInstrBuilder.
...
llvm-svn: 64891
2009-02-18 05:45:50 +00:00
Dan Gohman
0e73582689
Eliminate several more unnecessary intptr_t casts.
...
llvm-svn: 64888
2009-02-18 05:09:16 +00:00
Evan Cheng
bd63a1f40d
GV with null value initializer shouldn't go to BSS if it's meant for a mergeable strings section. Currently it only checks for Darwin. Someone else please check if it should apply to other targets as well.
...
llvm-svn: 64877
2009-02-18 02:19:52 +00:00
Dan Gohman
3fc2e67140
Fix a corner case in the new indvars promotion logic: if there
...
are multiple IV's in a loop, some of them may under go signed
or unsigned wrapping even if the IV that's used in the loop
exit condition doesn't. Restrict sign-extension-elimination
and zero-extension-elimination to only those that operate on
the original loop-controlling IV.
llvm-svn: 64866
2009-02-18 00:52:00 +00:00
Dan Gohman
4f0fccdf9b
Fix a typo in a comment.
...
llvm-svn: 64859
2009-02-18 00:08:39 +00:00
Duncan Sands
e605b83258
If an alias is dead and so is its aliasee, then globaldce would
...
crash because the alias would still be using the aliasee when the
aliasee was deleted.
llvm-svn: 64844
2009-02-17 23:05:26 +00:00
Devang Patel
25f2741ae9
The debugger sometimes lookup dynamically in the runtime to find ivar info of any Objective-C classes. It would be very helpful to debugger if the compiler encodes runtime version number in DWARF.
...
Add support for two additional DWARF attributes to encode Objective-C runtime version number.
llvm-svn: 64834
2009-02-17 22:43:44 +00:00
Scott Michel
4c5fa6c982
Remove trailing whitespace to reduce later commit patch noise.
...
(Note: Eventually, commits like this will be handled via a pre-commit hook that
does this automagically, as well as expand tabs to spaces and look for 80-col
violations.)
llvm-svn: 64827
2009-02-17 22:15:04 +00:00
Devang Patel
1d4e0292fb
Emit debug info for bitfields.
...
llvm-svn: 64815
2009-02-17 21:23:59 +00:00
Dan Gohman
ced54f0173
LoopIndexSplit doesn't actually use ScalarEvolution.
...
llvm-svn: 64811
2009-02-17 20:50:11 +00:00
Dan Gohman
59b08852dc
Add a method to ScalarEvolution for telling it when a loop has been
...
modified in a way that may effect the trip count calculation. Change
IndVars to use this method when it rewrites pointer or floating-point
induction variables instead of using a doInitialization method to
sneak these changes in before ScalarEvolution has a chance to see
the loop. This eliminates the need for LoopPass to depend on
ScalarEvolution.
llvm-svn: 64810
2009-02-17 20:49:49 +00:00
Chris Lattner
0837686a2a
commit a tweaked version of Daniel's patch for PR3599. We now
...
eliminate all the extensions and all but the one required truncate
from the testcase, but the or/and/shift stuff still isn't zapped.
llvm-svn: 64809
2009-02-17 20:47:23 +00:00
Dan Gohman
c99426d513
Move dumpPassStructure out of line.
...
llvm-svn: 64796
2009-02-17 19:41:26 +00:00
Dan Gohman
72f656f2ef
Delete trailing whitespace.
...
llvm-svn: 64784
2009-02-17 19:13:57 +00:00
Duncan Sands
c0436287c2
This transform also applies to private linkage.
...
llvm-svn: 64773
2009-02-17 17:50:04 +00:00
Dan Gohman
07418e014e
Fix 80-column violation.
...
llvm-svn: 64766
2009-02-17 15:57:39 +00:00
Evan Cheng
2e0cf05ad2
A couple of places where reused use operands should be marked kill. This is exposed by recent availability fallthrough changes.
...
llvm-svn: 64745
2009-02-17 06:41:03 +00:00
Chris Lattner
3b67310686
add a horrible note
...
llvm-svn: 64719
2009-02-17 01:16:14 +00:00
Bill Wendling
266c8bc98f
--- Merging (from foreign repository) r64714 into '.':
...
U include/llvm/CodeGen/DebugLoc.h
U lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
U lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
U lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
Enable debug location generation at -Os. This goes with the reapplication of the
r63639 patch.
llvm-svn: 64715
2009-02-17 01:04:54 +00:00
Evan Cheng
9a8e419015
Strengthen the "non-constant stride must dominate loop preheader" check.
...
llvm-svn: 64703
2009-02-17 00:13:06 +00:00
Dan Gohman
36c8002915
Simplify; fix some 80-column violations.
...
llvm-svn: 64702
2009-02-17 00:10:53 +00:00
Dan Gohman
f23a24ce3d
Delete trailing whitespace.
...
llvm-svn: 64694
2009-02-16 23:14:14 +00:00
Dan Gohman
e06ea828a2
Fix EnforceKnownAlignment so that it doesn't ever reduce the alignment
...
of an alloca or global variable.
llvm-svn: 64693
2009-02-16 23:02:21 +00:00
Nick Lewycky
6feb7523b8
Fix typo caused by too much surfing, dudes...
...
llvm-svn: 64626
2009-02-16 04:26:53 +00:00
Dan Gohman
47a6dc9ad1
Delete this long-commented-out code. The situation it seems to have
...
been written for is no longer relevant with the elimination of
signed and unsigned types.
llvm-svn: 64625
2009-02-16 02:57:42 +00:00
Dan Gohman
3d93bc5654
Change these tests to use regular loads instead of llvm.x86.sse2.loadu.dq.
...
Enhance instcombine to use the preferred field of
GetOrEnforceKnownAlignment in more cases, so that regular IR operations are
optimized in the same way that the intrinsics currently are.
llvm-svn: 64623
2009-02-16 00:44:23 +00:00
Dan Gohman
c47d143107
Don't assume that a left-shift of a value with one bit set will have
...
one bit set, because the bit may be shifted off the end. Instead,
just check for a constant 1 being shifted. This is still sufficient
to handle all the cases in test/CodeGen/X86/bt.ll. This fixes PR3583.
llvm-svn: 64622
2009-02-15 23:59:32 +00:00
Dan Gohman
856736a187
MachineLICM now handles these cases.
...
llvm-svn: 64620
2009-02-15 23:24:52 +00:00
Nick Lewycky
9178be6059
Update the list of function annotations for nocapture. All of these came up
...
when I was looking at functions used by python.
Highlights include, better largefile support (64-bit file sizes on 32-bit
systems), fputs string is nocapture, popen/pclose added (popen being noalias
return), modf and frexp and friends. Also added some missing 'break' statements
and combined identical sections.
llvm-svn: 64615
2009-02-15 22:47:25 +00:00
Nicolas Geoffray
93eebdfcc7
On 64bit we may have a personality function which requires 64 bits to
...
be encoded.
llvm-svn: 64600
2009-02-15 20:49:23 +00:00
Duncan Sands
6c1ce1dbd5
Make this more useful for cleaning up after the
...
one-definition-rule llvm-gcc changes (coming soon
to a tree near you!).
llvm-svn: 64588
2009-02-15 11:54:49 +00:00
Duncan Sands
0e6fcb078c
If the target of an alias has internal linkage, then the
...
alias can be morphed into the target. Implement this
transform, and fix a crash in the existing transform at
the same time.
llvm-svn: 64583
2009-02-15 09:56:08 +00:00
Evan Cheng
9428fd271c
Fix PR3522. It's not safe to sink into landing pad BB's.
...
llvm-svn: 64582
2009-02-15 08:36:12 +00:00
Evan Cheng
02d9156a8d
Fix pr3571: If stride is a value defined by an instruction, make sure it dominates the loop preheader. When IV users are strength reduced, the stride is inserted into the preheader. It could create a use before def situation.
...
llvm-svn: 64579
2009-02-15 06:06:15 +00:00
Evan Cheng
e0558412a4
ifdef out unneeded if statement.
...
llvm-svn: 64575
2009-02-15 03:20:37 +00:00
Mikhail Glushenkov
5310c3cd6e
Fix warning on gcc 4.3.
...
"system() declared with attribute warn_unused_result."
llvm-svn: 64574
2009-02-15 03:20:32 +00:00
Mikhail Glushenkov
95811401b0
Whitespace fixes.
...
llvm-svn: 64573
2009-02-15 03:20:03 +00:00
Cedric Venet
48be6b5e15
Unbreak the build on win32.
...
Cleanup some warning.
Remark: when struct/class are declared differently than they are defined, this make problem for VC++ since it seems to mangle class differently that struct. These error are very hard to understand and find. So please, try to keep your definition/declaration in sync.
Only tested with VS2008. hope it does not break anything. feel free to revert.
llvm-svn: 64554
2009-02-14 16:06:42 +00:00
Duncan Sands
5aeb9b727a
Generalize some alias analysis logic from atomic
...
intrinsics to any IntrWriteArgMem intrinsics.
llvm-svn: 64551
2009-02-14 10:56:35 +00:00
Dan Gohman
684359ea96
The x86-64 red zone is now being used.
...
llvm-svn: 64535
2009-02-14 03:30:05 +00:00
Dan Gohman
3695fd42a9
Extend the IndVarSimplify support for promoting induction variables:
...
- Test for signed and unsigned wrapping conditions, instead of just
testing for non-negative induction ranges.
- Handle loops with GT comparisons, in addition to LT comparisons.
- Support more cases of induction variables that don't start at 0.
llvm-svn: 64532
2009-02-14 02:31:09 +00:00
Dan Gohman
928d619b5e
Clarify debug output.
...
llvm-svn: 64531
2009-02-14 02:26:50 +00:00
Dan Gohman
bd231d2e7b
Simplify some code. hasComputableLoopEvolution is overkill in this case.
...
No functionality change.
llvm-svn: 64530
2009-02-14 02:25:19 +00:00
Evan Cheng
9041a71923
Teach x86 target -soft-float.
...
llvm-svn: 64496
2009-02-13 22:36:38 +00:00
Dan Gohman
f01c6af944
In CodeGenPrepare's debug output, use WriteAsOperand instead of
...
printing getName(), so that unnamed values are printed correctly.
llvm-svn: 64468
2009-02-13 17:45:12 +00:00
Dan Gohman
484ce19297
Complete the sentance in this comment. I have reservations
...
about the code it describes, but at least now the comment
is right.
llvm-svn: 64465
2009-02-13 17:36:42 +00:00
Duncan Sands
5ce9ceee04
If a function only reads memory, then we know that...
...
it only reads memory! The other change has no
functional effect, it just seems more logical to
go in order of decreasing knowledge.
llvm-svn: 64463
2009-02-13 17:32:26 +00:00
Nick Lewycky
0a8e13fd8b
Mark strto* as readonly when the endptr is null.
...
llvm-svn: 64460
2009-02-13 17:08:33 +00:00
Nick Lewycky
7ec551cfad
On strtod and friends, mark 'endptr' nocapture in the function prototype, and
...
mark the first argument nocapture if endptr=NULL for each particular call.
llvm-svn: 64453
2009-02-13 15:31:46 +00:00
Duncan Sands
ed1ea7cfe8
Reapply r64301. These uses of "inline" can cause strange
...
link-time failures when building with optimization. Just
get rid of them.
llvm-svn: 64449
2009-02-13 09:42:34 +00:00