Devang Patel
ea239f6e0a
Derive DIType from DIScope. This simplifies getContext() where for members the context is a type. This also eliminates need of CompileUnitMaps maintained by dwarf writer.
...
llvm-svn: 97990
2010-03-08 22:02:50 +00:00
Devang Patel
176dc29a62
Avoid using DIDescriptor.isNull().
...
This is a first step towards eliminating checks in Descriptor constructors.
llvm-svn: 97975
2010-03-08 20:52:55 +00:00
Devang Patel
a716e313d6
Revert r97947.
...
llvm-svn: 97963
2010-03-08 19:20:38 +00:00
Devang Patel
1527b2657b
Avoid using DIDescriptor.isNull().
...
This is a first step towards eliminating unncessary constructor checks in light weight DIDescriptor wrappers.
llvm-svn: 97947
2010-03-08 18:25:48 +00:00
Dale Johannesen
b87c6c82e6
Add Order to SDDbgValue
...
llvm-svn: 97939
2010-03-08 05:39:50 +00:00
Dale Johannesen
d610f0a82a
Fix dbg value handling in tail merging.
...
llvm-svn: 97938
2010-03-08 05:38:13 +00:00
Douglas Gregor
c52fc8f922
Revert r97917, which was causing Clang Debug self-host failures.
...
llvm-svn: 97932
2010-03-08 02:58:37 +00:00
Jeffrey Yasskin
2c23c1d1a1
Roll r97906 forward again, without double-deleting CompileUnit::IndexTyDie.
...
llvm-svn: 97917
2010-03-07 17:10:13 +00:00
Chris Lattner
f3ee582f23
Use Other as a sentinel instead of iAny.
...
llvm-svn: 97914
2010-03-07 07:45:08 +00:00
Jeffrey Yasskin
c68dc05867
_2_ gcc crashes, ah, ah, ah...
...
(Rolling back r97906.)
llvm-svn: 97909
2010-03-07 07:16:49 +00:00
Jeffrey Yasskin
c0123f0033
Avoid leaking CompileUnits and DbgScopes from DwarfDebug. Leaks found by Valgrind!
...
llvm-svn: 97906
2010-03-07 06:55:35 +00:00
Chris Lattner
6dbe3336f9
tidy up
...
llvm-svn: 97895
2010-03-07 04:28:09 +00:00
Evan Cheng
d8e0138666
Don't update physical register def.
...
llvm-svn: 97861
2010-03-06 01:14:19 +00:00
Dale Johannesen
f0c8e76a85
Add some new bits of debug info handling. No
...
functional change yet.
llvm-svn: 97855
2010-03-06 00:03:23 +00:00
Dan Gohman
00a652eea0
Reapply r97778 and r97779, enabled only for unsigned i64 to f64
...
conversions.
llvm-svn: 97854
2010-03-06 00:00:55 +00:00
Charles Davis
faa2f44081
Don't emit global symbols into the (__TEXT,__ustring) section on Darwin. This
...
is a workaround for <rdar://problem/7672401/> (which I filed).
This let's us build Wine on Darwin, and it gets the Qt build there a little bit
further (so Doug says).
llvm-svn: 97845
2010-03-05 22:28:45 +00:00
Jakob Stoklund Olesen
4e033d2070
Better handling of dead super registers in LiveVariables. We used to do this:
...
CALL ... %RAX<imp-def>
... [not using %RAX]
%EAX = ..., %RAX<imp-use, kill>
RET %EAX<imp-use,kill>
Now we do this:
CALL ... %RAX<imp-def, dead>
... [not using %RAX]
%EAX = ...
RET %EAX<imp-use,kill>
By not artificially keeping %RAX alive, we lower register pressure a bit.
The correct number of instructions for 2008-08-05-SpillerBug.ll is obviously
55, anybody can see that. Sheesh.
llvm-svn: 97838
2010-03-05 21:49:17 +00:00
Jakob Stoklund Olesen
1fce28720a
We don't really care about correct register liveness information after the
...
post-ra scheduler has run. Disable the verifier checks that late in the game.
llvm-svn: 97837
2010-03-05 21:49:13 +00:00
Jakob Stoklund Olesen
67476519d7
Avoid creating bad PHI instructions when BR is being const-folded.
...
llvm-svn: 97836
2010-03-05 21:49:10 +00:00
Chris Lattner
80aaccb987
Fix PR6497, a bug where we'd fold a load into an addc
...
node which has a flag. That flag in turn was used by an
already-selected adde which turned into an ADC32ri8 which
used a selected load which was chained to the load we
folded. This flag use caused us to form a cycle. Fix
this by not ignoring chains in IsLegalToFold even in
cases where the isel thinks it can.
llvm-svn: 97791
2010-03-05 06:19:13 +00:00
Chris Lattner
d7353d219f
inline a small function with one call site.
...
llvm-svn: 97789
2010-03-05 05:49:45 +00:00
Dan Gohman
ebdb1743d3
Revert r97778 and r97779. They're somehow breaking llvm-gcc builds.
...
llvm-svn: 97781
2010-03-05 02:40:23 +00:00
Dan Gohman
0a01ba144d
Fix these constants to be more portable.
...
llvm-svn: 97779
2010-03-05 02:13:10 +00:00
Dan Gohman
e5b9ea020f
Rewrite i64-to-f64 conversion using an algorithm which handles
...
rounding correctly. This implementation is a generalization of
the x86_64 code in compiler-rt.
This fixes rdar://7683708.
llvm-svn: 97778
2010-03-05 02:00:46 +00:00
Dale Johannesen
b1fd546dd0
Fix some more places where dbg_value affected codegen.
...
llvm-svn: 97765
2010-03-05 00:02:59 +00:00
Jeffrey Yasskin
e4e796c00b
Fix memcheck-found leaks: one false positive from using new[], and one true
...
positive where pointers would be leaked on llvm_shutdown.
llvm-svn: 97759
2010-03-04 22:15:01 +00:00
Jim Grosbach
330c1b777e
For SJLJ exception handling, make sure that all calls that are not marked
...
as nounwind are marked with a -1 call-site value. This is necessary to, for
example, correctly process exceptions thrown from within an "unexpected"
execption handler (see SingleSource/Regression/C++/EH/expection_spec_test.cpp).
llvm-svn: 97757
2010-03-04 22:07:46 +00:00
Evan Cheng
9b35d553df
Run machine licm before machine cse to avoid messing up licm opportunities.
...
llvm-svn: 97752
2010-03-04 21:28:09 +00:00
Evan Cheng
a9828532ff
Avoid cse load instructions unless they are known to be invariant loads.
...
llvm-svn: 97747
2010-03-04 21:18:08 +00:00
Chris Lattner
860cbbb031
add a statistic for # times fastisel fails.
...
llvm-svn: 97738
2010-03-04 19:46:56 +00:00
Dan Gohman
632e2a2b8c
Fix a typo Duncan noticed.
...
llvm-svn: 97735
2010-03-04 19:11:28 +00:00
Evan Cheng
df8f4b6142
Rename -machine-cse to -enable-machine-cse.
...
llvm-svn: 97713
2010-03-04 02:08:04 +00:00
Evan Cheng
9120412740
Look ahead a bit to determine if a physical register def that is not marked dead is really alive. This is necessary to catch a lot of common cse opportunities for targets like x86.
...
llvm-svn: 97706
2010-03-04 01:33:55 +00:00
Chris Lattner
2bbca2de9e
change the new isel matcher to emit ComplexPattern matches
...
as the very last thing before node emission. This should
dramatically reduce the number of times we do 'MatchAddress'
on X86, speeding up compile time. This also improves comments
in the tables and shrinks the table a bit, now down to
80506 bytes for x86.
llvm-svn: 97703
2010-03-04 01:23:08 +00:00
Dan Gohman
9f6d374ab7
Fix more code to work properly with vector operands. Based on
...
a patch my Micah Villmow for PR6465.
llvm-svn: 97692
2010-03-04 00:23:16 +00:00
Chris Lattner
19007009c8
inline CannotYetSelectIntrinsic into CannotYetSelect and simplify.
...
llvm-svn: 97690
2010-03-04 00:21:16 +00:00
Evan Cheng
9729f2a2b4
Fix a logic error. An instruction that has a live physical register def cannot be CSE'ed, but it *can* be used to replace a common subexpression.
...
llvm-svn: 97688
2010-03-03 23:59:08 +00:00
Evan Cheng
7310728cf9
Remove PHINodeTraits and use MachineInstrExpressionTrait instead.
...
llvm-svn: 97687
2010-03-03 23:55:49 +00:00
Evan Cheng
8c608dffd5
Move MachineInstrExpressionTrait::getHashValue() out of line so it can skip over only virtual register defs. This matches what isEqual() is doing.
...
llvm-svn: 97680
2010-03-03 23:37:30 +00:00
Evan Cheng
36a7a94029
Re-apply r97667 but with a little bit of thought put into the patch. This implements a special DenseMapInfo trait for DenseMap<MachineInstr*> that compare the value of the MachineInstr rather than the pointer value. Since the hashing and equality test functions ignore defs it's useful for doing CSE kind optimization.
...
llvm-svn: 97678
2010-03-03 23:27:36 +00:00
Dan Gohman
fe6b41169a
Revert 97667. It broke a bunch of tests.
...
llvm-svn: 97673
2010-03-03 22:40:03 +00:00
Evan Cheng
57064125c4
Fix funky indentation and add comments.
...
llvm-svn: 97670
2010-03-03 21:54:14 +00:00
Evan Cheng
338c7aed4c
Move DenseMapInfo for MachineInstr* to MachineInstr.h
...
llvm-svn: 97667
2010-03-03 21:47:16 +00:00
Dan Gohman
cdc603ecae
Fix a bug in SelectionDAG's ReplaceAllUsesWith in the case where
...
CSE and recursive RAUW calls delete a node from the use list,
invalidating the use list iterator. There's currently no known
way to reproduce this in an unmodified LLVM, however there's no
fundamental reason why a SelectionDAG couldn't be formed which
would trigger this case.
llvm-svn: 97665
2010-03-03 21:33:37 +00:00
Evan Cheng
918ac5d21f
Machine CSE work in progress. It's doing some CSE now. But implicit def of physical registers are getting in the way.
...
llvm-svn: 97664
2010-03-03 21:20:05 +00:00
Evan Cheng
810a26689e
Add MachineRegisterInfo::hasOneUse and hasOneNonDBGUse.
...
llvm-svn: 97663
2010-03-03 21:18:38 +00:00
Bill Wendling
f0bd51c4e3
Revert...
...
--- Reverse-merging r97592 into '.':
U lib/CodeGen/TargetLoweringObjectFileImpl.cpp
llvm-svn: 97657
2010-03-03 19:31:05 +00:00
Chris Lattner
9e7f00c3aa
add some of the more obscure predicate types to the
...
Scope accelerator.
llvm-svn: 97652
2010-03-03 07:46:25 +00:00
Chris Lattner
9889ed8c45
speed up scope node processing: if the first element of a scope
...
entry we're about to process is obviously going to fail, don't
bother pushing a scope only to have it immediately be popped.
This avoids a lot of scope stack traffic in common cases.
Unfortunately, this requires duplicating some of the predicate
dispatch. To avoid duplicating the actual logic I pulled each
predicate out to its own static function which gets used in
both places.
llvm-svn: 97651
2010-03-03 07:31:15 +00:00
Chris Lattner
92a814205f
introduce a new SwitchTypeMatcher node (which is analogous to
...
SwitchOpcodeMatcher) and have DAGISelMatcherOpt form it. This
speeds up selection, particularly for X86 which has lots of
variants of instructions with only type differences.
llvm-svn: 97645
2010-03-03 06:28:15 +00:00