Dale Johannesen
7f724e9b94
Adjust per revew comments.
...
llvm-svn: 42002
2007-09-16 16:51:49 +00:00
Bill Wendling
e5615156cc
Only emit the personality function as a global value if the backend actually
...
supports it. This solves this error on the Darwin x86-64 platform:
$ cat testcase.ii
struct A {
A();
};
A *bork() {
return new A;
}
$ llvm-g++ -arch x86_64 -c testcase.ii
/var/tmp//cc3U8fd8.s:52:unknown section type: non_lazy_symbol_pointers
/var/tmp//cc3U8fd8.s:52:Rest of line ignored. 1st junk character valued 76 (L).
/var/tmp//cc3U8fd8.s:53:Unknown pseudo-op: .indirect_symbol
/var/tmp//cc3U8fd8.s:53:Rest of line ignored. 1st junk character valued 95 (_).
llvm-svn: 41999
2007-09-16 10:36:17 +00:00
Owen Anderson
4cd516b50b
Be more careful when constant-folding PHI nodes.
...
llvm-svn: 41998
2007-09-16 08:04:16 +00:00
Chris Lattner
4f230451e1
Fix PR1666, SPASS with the CBE and 254.gap with the CBE.
...
GCC optimizes away things like ptr < NULL to false. To "fix" this,
have the CBE emit casts of pointers to intptr_t when doing relational
pointer comparisons.
llvm-svn: 41983
2007-09-15 06:51:03 +00:00
Dan Gohman
48ea03d169
Add patterns for SHLD64* and SHRD64*.
...
llvm-svn: 41975
2007-09-14 23:17:45 +00:00
Chris Lattner
6395e5060d
fix a gcc warning: comparison between signed and unsigned integer expressions
...
llvm-svn: 41972
2007-09-14 22:57:00 +00:00
Owen Anderson
8d0cb881e5
Remove RLE. It is subsumed by GVN.
...
llvm-svn: 41968
2007-09-14 22:33:52 +00:00
Dale Johannesen
98d3a08d8f
Remove the assumption that FP's are either float or
...
double from some of the many places in the optimizers
it appears, and do something reasonable with x86
long double.
Make APInt::dump() public, remove newline, use it to
dump ConstantSDNode's.
Allow APFloats in FoldingSet.
Expand X86 backend handling of long doubles (conversions
to/from int, mostly).
llvm-svn: 41967
2007-09-14 22:26:36 +00:00
Evan Cheng
483e1ce16e
Add implicit def of EFLAGS on those instructions that may modify flags.
...
llvm-svn: 41962
2007-09-14 21:48:26 +00:00
Dan Gohman
14cf78cde5
And an FoldingSetImpl::NodeID::AddInteger overload for int64_t, to avoid
...
ambiguity.
llvm-svn: 41960
2007-09-14 20:48:42 +00:00
Dan Gohman
9da02f5ee2
Remove isReg, isImm, and isMBB, and change all their users to use
...
isRegister, isImmediate, and isMachineBasicBlock, which are equivalent,
and more popular.
llvm-svn: 41958
2007-09-14 20:33:02 +00:00
Dan Gohman
a7b26e6bb3
Change "tmp." to "tmp" for temporaries created by ScalarEvolutionExpander
...
for consistency with many other transforms.
llvm-svn: 41957
2007-09-14 20:11:40 +00:00
Dan Gohman
58c468fb09
Remove spurious consts. This fixes warnings with compilers that
...
are strict about such things.
llvm-svn: 41956
2007-09-14 20:08:19 +00:00
Rafael Espindola
272f7304f0
Add support for functions with byval arguments on x86
...
llvm-svn: 41953
2007-09-14 15:48:13 +00:00
Chris Lattner
5d13fb538f
Fix a logic error in ValueIsOnlyUsedLocallyOrStoredToOneGlobal that caused
...
miscompilation of 188.ammp. Reject select and bitcast in
ValueIsOnlyUsedLocallyOrStoredToOneGlobal because RewriteHeapSROALoadUser can't handle it.
llvm-svn: 41950
2007-09-14 03:41:21 +00:00
Chris Lattner
d9111b88d1
silence a bogus gcc warning.
...
llvm-svn: 41949
2007-09-14 03:07:24 +00:00
Evan Cheng
5196f617a1
Fix comments.
...
llvm-svn: 41947
2007-09-14 01:57:02 +00:00
Bill Wendling
264d4813c7
Temporary reverting r41817
...
(http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070910/053370.html ). It's
causing SPASS to fail.
llvm-svn: 41938
2007-09-14 01:13:55 +00:00
Chris Lattner
011f91b5b2
Teach GlobalLoadUsesSimpleEnoughForHeapSRA and the SROA rewriter how to handle
...
a limited form of PHI nodes. This finally fixes PR1639, speeding 179.art up
from 7.84s to 3.13s on PPC.
llvm-svn: 41933
2007-09-13 21:31:36 +00:00
Chris Lattner
ba98f89388
be tolerant of PHI nodes when rewriting heap SROA code. This is a step
...
along the way of PR1639
llvm-svn: 41930
2007-09-13 18:00:31 +00:00
Chris Lattner
f315d4f1a7
refactor some code, no functionality change. On the path to PR1639
...
llvm-svn: 41929
2007-09-13 17:29:05 +00:00
Chris Lattner
6eed0e7366
Make ValueIsOnlyUsedLocallyOrStoredToOneGlobal smart enough to see through
...
bitcasts and phis. This is a step to fixing PR1639.
llvm-svn: 41928
2007-09-13 16:37:20 +00:00
Chris Lattner
2d2892ee6e
Make AllUsesOfLoadedValueWillTrapIfNull strong enough to see through PHI
...
nodes. This is the first step of the fix for PR1639.
llvm-svn: 41927
2007-09-13 16:30:19 +00:00
Chris Lattner
7955bbd9fd
Fix build problems on Cygwin (PR1652), patch by Patrick Walton.
...
llvm-svn: 41923
2007-09-13 06:09:48 +00:00
Evan Cheng
100c8d6c8f
Bug fixes.
...
llvm-svn: 41900
2007-09-13 00:06:00 +00:00
Evan Cheng
57ff158255
Remove dead code.
...
llvm-svn: 41899
2007-09-12 23:45:46 +00:00
Evan Cheng
bb6a574def
Yet another getTargetNode variant.
...
llvm-svn: 41898
2007-09-12 23:39:49 +00:00
Evan Cheng
59c39dc197
Initial support for multi-result patterns:
...
1.
[(set GR32:$dst, (add GR32:$src1, GR32:$src2)),
(modify EFLAGS)]
This indicates the source pattern expects the instruction would produce 2 values. The first is the result of the addition. The second is an implicit definition in register EFLAGS.
2.
def : Pat<(parallel (addc GR32:$src1, GR32:$src2), (modify EFLAGS)), ()>
Similar to #1 except this is used for def : Pat patterns.
llvm-svn: 41897
2007-09-12 23:30:14 +00:00
Evan Cheng
d8317967aa
Fixed a typo that's causing a missing kill marker.
...
llvm-svn: 41893
2007-09-12 23:02:04 +00:00
Chris Lattner
7b412cb823
Change llvm.gcroot to not init the root to null at runtime, this prevents
...
using it for live-in values etc.
llvm-svn: 41879
2007-09-12 17:53:10 +00:00
Dale Johannesen
100410af13
Generated files for previous patch.
...
llvm-svn: 41876
2007-09-12 03:31:28 +00:00
Dale Johannesen
028084efe5
Revise previous patch per review comments.
...
Next round of x87 long double stuff.
Getting close now, basically works.
llvm-svn: 41875
2007-09-12 03:30:33 +00:00
Dale Johannesen
521988b604
Compensate for partCount change in Bogus definition
...
(could break hash table in ConstantFP)
llvm-svn: 41874
2007-09-12 01:22:05 +00:00
Bill Wendling
66c22e8fd6
Enable indirect encoding for the personality function
...
llvm-svn: 41873
2007-09-11 23:55:40 +00:00
Evan Cheng
c16847b157
Sometimes a MI can define a register as well as defining a super-register at the
...
same time. Do not mark the "smaller" def as dead.
llvm-svn: 41871
2007-09-11 22:34:47 +00:00
Evan Cheng
3e18e504ae
Remove (somewhat confusing) Imp<> helper, use let Defs = [], Uses = [] instead.
...
llvm-svn: 41863
2007-09-11 19:55:27 +00:00
Evan Cheng
50b6730ae4
Added status flags register: EFLAGS.
...
llvm-svn: 41862
2007-09-11 19:53:28 +00:00
Dale Johannesen
216788aacb
Generated files for previous patch.
...
llvm-svn: 41859
2007-09-11 18:33:39 +00:00
Dale Johannesen
245dceb06d
Add APInt interfaces to APFloat (allows directly
...
access to bits). Use them in place of float and
double interfaces where appropriate.
First bits of x86 long double constants handling
(untested, probably does not work).
llvm-svn: 41858
2007-09-11 18:32:33 +00:00
Bill Wendling
74fb0f1a1c
Add a bool to indicate if we should set the "indirect encoding" bit in the Dwarf
...
information for EH.
llvm-svn: 41852
2007-09-11 17:20:55 +00:00
Duncan Sands
d781335d39
Two ParamAttrsVectors which differ by a permutation
...
of their elements do not yield the same ParamAttrsList,
though they should. On the other hand, everyone seems
to pass such vectors with elements ordered by increasing
index, so rather than sorting the elements simply assert
that the elements are ordered in this way.
llvm-svn: 41845
2007-09-11 14:40:04 +00:00
Duncan Sands
9204663bcb
Turn calls to trampolines into calls to the underlying
...
nested function.
llvm-svn: 41844
2007-09-11 14:35:41 +00:00
Duncan Sands
86e0119822
Fold the adjust_trampoline intrinsic into
...
init_trampoline. There is now only one
trampoline intrinsic.
llvm-svn: 41841
2007-09-11 14:10:23 +00:00
Duncan Sands
1a11e1c14f
My compiler warns about the semicolon.
...
llvm-svn: 41840
2007-09-11 12:30:25 +00:00
Bill Wendling
2b8fc31df9
The personality function on Darwin needs a global stub. We then refer to
...
that global stub instead of doing the ".set" thingy we were doing before.
llvm-svn: 41838
2007-09-11 08:27:17 +00:00
Owen Anderson
f9203ab36a
Fix a typo in memdep, which was causing PR1648.
...
llvm-svn: 41833
2007-09-11 04:31:00 +00:00
Devang Patel
7ed6eb8992
Avoid negative logic.
...
llvm-svn: 41829
2007-09-11 01:10:45 +00:00
Devang Patel
8c95373ced
Refactor code into a separate method.
...
llvm-svn: 41826
2007-09-11 00:42:56 +00:00
Devang Patel
d67479b6ee
Clear split info object.
...
llvm-svn: 41823
2007-09-11 00:23:56 +00:00
Devang Patel
a28a7f1b2d
Split condition does not have to be ICmpInst in all cases.
...
llvm-svn: 41822
2007-09-11 00:12:56 +00:00
Devang Patel
f4202e91f8
Check all terminators inside loop.
...
llvm-svn: 41821
2007-09-10 23:57:58 +00:00
Chris Lattner
e804567cd8
remove some dead code, this is handled by constant folding.
...
llvm-svn: 41819
2007-09-10 23:46:29 +00:00
Chris Lattner
52fe869374
Fix a buggy constant folding transformation when handling aliases.
...
llvm-svn: 41818
2007-09-10 23:42:42 +00:00
Devang Patel
2181b8e86a
Swap exit condition operands if it works.
...
llvm-svn: 41817
2007-09-10 23:34:06 +00:00
Chris Lattner
740d8049f4
regenerate
...
llvm-svn: 41816
2007-09-10 23:24:14 +00:00
Chris Lattner
dae70d4d36
Fix PR1645 by resolving forward alias references.
...
llvm-svn: 41815
2007-09-10 23:23:53 +00:00
Evan Cheng
f948772f9e
80 col.
...
llvm-svn: 41812
2007-09-10 22:22:23 +00:00
Evan Cheng
8c3c198499
New entry.
...
llvm-svn: 41810
2007-09-10 22:16:37 +00:00
Evan Cheng
3b9f777f47
Observation of rematerialization.
...
llvm-svn: 41809
2007-09-10 22:11:18 +00:00
Chris Lattner
6777b72659
Add some notes about better flag handling.
...
llvm-svn: 41808
2007-09-10 21:43:18 +00:00
Chris Lattner
58c227bd09
Emit:
...
cmpl %eax, %ecx
setae %al
movzbl %al, %eax
instead of:
cmpl %eax, %ecx
setb %al
xorb $1, %al
movzbl %al, %eax
when using logical not of a C comparison.
llvm-svn: 41807
2007-09-10 21:39:07 +00:00
Chris Lattner
33a7f51412
1. Don't call Value::getName(), which is slow.
...
2. Lower calls to fabs and friends to FABS nodes etc unless the function has
internal linkage. Before we wouldn't lower if it had a definition, which
is incorrect. This allows us to compile:
define double @fabs(double %f) {
%tmp2 = tail call double @fabs( double %f )
ret double %tmp2
}
into:
_fabs:
fabs f1, f1
blr
llvm-svn: 41805
2007-09-10 21:15:22 +00:00
Chris Lattner
c75cbe6473
Prevent tailcallelim from breaking "recursive" calls to builtins.
...
llvm-svn: 41804
2007-09-10 20:58:55 +00:00
Evan Cheng
637395e6bd
It's not safe to rematerialize MOV32r0 etc. by simply cloning the original
...
instruction. These are implemented with xor which will modify the conditional
code. They should be rematerialized as move instructions.
llvm-svn: 41802
2007-09-10 20:48:53 +00:00
Devang Patel
f8ab0a9acc
Filter exit conditions which are not yet handled.
...
llvm-svn: 41800
2007-09-10 18:33:42 +00:00
Devang Patel
d7409fdce5
Require SCEV before LCSSA.
...
llvm-svn: 41798
2007-09-10 18:08:23 +00:00
Owen Anderson
82e4fa1020
Remove an un-needed dependence query. This improves compile time marginally on 401.bzip2.
...
llvm-svn: 41792
2007-09-09 21:43:49 +00:00
Dale Johannesen
29e6ac4281
Implement misaligned FP loads and stores.
...
llvm-svn: 41786
2007-09-08 19:29:23 +00:00
Evan Cheng
ee8d9a0e81
Smarter Reset(). Instead of deallocating all memory regions and reallocate the
...
first region, just deallocate all but the last region in the list.
llvm-svn: 41782
2007-09-08 00:02:17 +00:00
Evan Cheng
cef2c0efcc
TableGen no longer emit CopyFromReg nodes for implicit results in physical
...
registers. The scheduler is now responsible for emitting them.
llvm-svn: 41781
2007-09-07 23:59:02 +00:00
Bill Wendling
9929bc403d
Add missing index versions of instructions to the map.
...
llvm-svn: 41776
2007-09-07 22:01:02 +00:00
Dan Gohman
a95cbb0007
Avoid storing and reloading zeros and other constants from stack slots
...
by flagging the associated instructions as being trivially rematerializable.
llvm-svn: 41775
2007-09-07 21:32:51 +00:00
Dale Johannesen
9e70086c8f
Apply feedback from previous patch.
...
llvm-svn: 41774
2007-09-07 21:07:57 +00:00
Dale Johannesen
b6d795c1fc
Revert previous change to IR.
...
llvm-svn: 41769
2007-09-07 18:31:50 +00:00
Rafael Espindola
1de0c86717
Add support for having different alignment for objects on call frames.
...
The x86-64 ABI states that objects passed on the stack have
8 byte alignment. Implement that.
llvm-svn: 41768
2007-09-07 14:52:14 +00:00
Anton Korobeynikov
122bf4be7e
Split eh.select / eh.typeid.for intrinsics into i32/i64 versions. This is needed, because they just "mark" register
...
liveins and we let frontend solve type issue, not lowering code :)
llvm-svn: 41763
2007-09-07 11:39:35 +00:00
Chris Lattner
85a51e0060
Don't zap back to back volatile load/stores
...
llvm-svn: 41759
2007-09-07 05:33:03 +00:00
Owen Anderson
e2f23a3abf
Add lengthof and endof templates that hide a lot of sizeof computations.
...
Patch by Sterling Stein!
llvm-svn: 41758
2007-09-07 04:06:50 +00:00
David Greene
517d5d8ebe
Constify to catch bugs.
...
llvm-svn: 41751
2007-09-06 19:46:46 +00:00
Dale Johannesen
bed9dc423c
Next round of APFloat changes.
...
Use APFloat in UpgradeParser and AsmParser.
Change all references to ConstantFP to use the
APFloat interface rather than double. Remove
the ConstantFP double interfaces.
Use APFloat functions for constant folding arithmetic
and comparisons.
(There are still way too many places APFloat is
just a wrapper around host float/double, but we're
getting there.)
llvm-svn: 41747
2007-09-06 18:13:44 +00:00
Anton Korobeynikov
a07765b8f4
Proper handle case, when aliasee is external weak symbol referenced only by alias itself.
...
Also, fix a case, when target doesn't have weak symbols supported.
llvm-svn: 41746
2007-09-06 17:21:48 +00:00
David Greene
a6d5d2a6a0
Add instruction dump output. This helps find bugs.
...
llvm-svn: 41744
2007-09-06 16:36:39 +00:00
David Greene
65d2a697dc
Pluggable coalescers inplementation.
...
llvm-svn: 41743
2007-09-06 16:18:45 +00:00
Nick Lewycky
0c5c47944a
Use isTrueWhenEqual. Thanks Chris!
...
llvm-svn: 41741
2007-09-06 02:40:25 +00:00
Nick Lewycky
b0b066eaaa
When the two operands of an icmp are equal, there are five possible predicates
...
that would make the icmp true. Fixes PR1637.
llvm-svn: 41740
2007-09-06 01:10:22 +00:00
Evan Cheng
d059eed1c1
Fix a memory leak.
...
llvm-svn: 41739
2007-09-06 01:07:24 +00:00
Evan Cheng
189df733ed
Fix a bug in X86InstrInfo::convertToThreeAddress that caused it to codegen:
...
leal (,%rcx,8), %rcx
It should be
leal (,%rcx,8), %ecx
llvm-svn: 41735
2007-09-06 00:14:41 +00:00
Bill Wendling
b65ef38590
LVXL and STVXL are also a load and store resp.
...
llvm-svn: 41733
2007-09-05 23:47:12 +00:00
Evan Cheng
db53aef53e
Use pool allocator for all the VNInfo's to improve memory access locality. This reduces coalescing time on siod Mac OS X PPC by 35%. Also remove the back ptr from VNInfo to LiveInterval and other tweaks.
...
llvm-svn: 41729
2007-09-05 21:46:51 +00:00
Evan Cheng
3dba41bf37
Added Reset() to free all allocated memory regions and reset state to be the same as right after ctor.
...
llvm-svn: 41728
2007-09-05 21:41:34 +00:00
Evan Cheng
19ce37a1cd
Missing break. Patch by Wojciech Matyjewicz.
...
llvm-svn: 41727
2007-09-05 21:36:14 +00:00
Dale Johannesen
728687c423
Fix mod so it actually works. Fix conversions to
...
native types to handle denormals correctly.
llvm-svn: 41726
2007-09-05 20:39:49 +00:00
Chuck Rose III
2320323647
Forgot to obey 80 column rule. Fixing that.
...
llvm-svn: 41725
2007-09-05 20:36:41 +00:00
Chuck Rose III
e58572233d
Added default parameters to GetElementPtrInstr constructor call. Visual Studio 2k5 was getting confused and was unable to compile it. Suspected compiler error.
...
llvm-svn: 41721
2007-09-05 16:54:38 +00:00
Duncan Sands
2c0a0fb725
Due to label merging, the last label for an invoke
...
may be the same as the first label for the following
invoke. Remove a micro-optimization which was wrong
in this case.
llvm-svn: 41720
2007-09-05 14:12:46 +00:00
Duncan Sands
3c1b7fc056
Fix PR1628. When exception handling is turned on,
...
labels are generated bracketing each call (not just
invokes). This is used to generate entries in
the exception table required by the C++ personality.
However it gets in the way of tail-merging. This
patch solves the problem by no longer placing labels
around ordinary calls. Instead we generate entries
in the exception table that cover every instruction
in the function that wasn't covered by an invoke
range (the range given by the labels around the invoke).
As an optimization, such entries are only generated for
parts of the function that contain a call, since for
the moment those are the only instructions that can
throw an exception [1]. As a happy consequence, we
now get a smaller exception table, since the same
region can cover many calls. While there, I also
implemented folding of invoke ranges - successive
ranges are merged when safe to do so. Finally, if
a selector contains only a cleanup, there's a special
shorthand for it - place a 0 in the call-site entry.
I implemented this while there. As a result, the
exception table output (excluding filters) is now
optimal - it cannot be made smaller [2]. The
problem with throw filters is that folding them
optimally is hard, and the benefit of folding them is
minimal.
[1] I tested that having trapping instructions (eg
divide by zero) in such a region doesn't cause trouble.
[2] It could be made smaller with the help of higher
layers, eg by having branch folding reorder basic blocks
ending in invokes with the same landing pad so they
follow each other. I don't know if this is worth doing.
llvm-svn: 41718
2007-09-05 11:27:52 +00:00
Bill Wendling
b9bf812ba5
Add the 64-bit versions of the DS* Altivec instructions.
...
llvm-svn: 41717
2007-09-05 04:05:20 +00:00
Devang Patel
f6ef552f3d
Insert cloned loop basic blocks before original loop header.
...
llvm-svn: 41713
2007-09-04 20:46:35 +00:00
Evan Cheng
e0cb6bb8da
Fix for PR1632. EHSELECTION always produces a i32 value.
...
llvm-svn: 41712
2007-09-04 20:39:26 +00:00
Evan Cheng
4dbd9f254a
Fix for PR1613: added 64-bit rotate left PPC instructions and patterns.
...
llvm-svn: 41711
2007-09-04 20:20:29 +00:00
David Greene
85948d7474
Update generated files.
...
llvm-svn: 41706
2007-09-04 18:46:50 +00:00
Evan Cheng
623dd88775
Mac OS X X86-64 ABI is same as the standard.
...
llvm-svn: 41700
2007-09-04 16:44:41 +00:00
David Greene
c656cbb8c2
Update GEP constructors to use an iterator interface to fix
...
GLIBCXX_DEBUG issues.
llvm-svn: 41697
2007-09-04 15:46:09 +00:00
Anton Korobeynikov
50ab26e835
Reapply r41578 with proper fix
...
llvm-svn: 41680
2007-09-03 00:36:06 +00:00
Anton Korobeynikov
35322d745c
Silence warning while compiling with gcc 4.2
...
llvm-svn: 41676
2007-09-02 22:11:14 +00:00
Anton Korobeynikov
38ce90fd44
Emit proper "secrel" directive, where possible. This fixes invalid asm syntax of debug info on mingw32. Also, cleanup
...
some stuff.
llvm-svn: 41675
2007-09-02 22:07:21 +00:00
Evan Cheng
2089a21360
More tweaks to improve compile time.
...
llvm-svn: 41669
2007-09-01 02:03:17 +00:00
Evan Cheng
ffac17a223
Fix a gcroot lowering bug.
...
llvm-svn: 41668
2007-09-01 02:00:51 +00:00
Dale Johannesen
689d17d282
Oops, should be part of 41664; won't work very well without this piece.
...
llvm-svn: 41665
2007-08-31 23:35:31 +00:00
Dale Johannesen
446b900192
Add mod, copysign, abs operations to APFloat.
...
Implement some constant folding in SelectionDAG and
DAGCombiner using APFloat. Remove double versions
of constructor and getValue from ConstantFPSDNode.
llvm-svn: 41664
2007-08-31 23:34:27 +00:00
Evan Cheng
7bef79a1c3
std::map -> DenseMap for slight compile time benefit.
...
llvm-svn: 41650
2007-08-31 21:23:06 +00:00
Dale Johannesen
da7469f2b5
Revise per review of previous patch.
...
llvm-svn: 41645
2007-08-31 17:03:33 +00:00
Rafael Espindola
e636fc05d6
Initial support for calling functions with byval arguments on x86-64
...
llvm-svn: 41643
2007-08-31 15:06:30 +00:00
Rafael Espindola
bb8a5cff67
Align i64 and f64 at 8 byte on x86-64.
...
This is mandated table 3.1 at
http://www.x86-64.org/documentation/abi.pdf
llvm-svn: 41642
2007-08-31 12:23:58 +00:00
Evan Cheng
91becf4ffa
Remove an unnecessary element, saving 4 bytes per LiveInterval.
...
llvm-svn: 41641
2007-08-31 08:26:44 +00:00
Evan Cheng
262596e76a
Use std::map instead of a (potentially very sparse) array to track val# defined by copy from the other live range. Minor compile time win when number of val# is large.
...
llvm-svn: 41640
2007-08-31 08:04:17 +00:00
Dale Johannesen
3cf889f75e
Enhance APFloat to retain bits of NaNs (fixes oggenc).
...
Use APFloat interfaces for more references, mostly
of ConstantFPSDNode.
llvm-svn: 41632
2007-08-31 04:03:46 +00:00
Raul Herbster
ab871baaf8
Instruction formats added used to generate multiply instructions of V5TE.
...
llvm-svn: 41629
2007-08-30 23:34:14 +00:00
Raul Herbster
ff32b62942
Unused relocation type reloc_arm_absolute removed.
...
llvm-svn: 41628
2007-08-30 23:31:35 +00:00
Raul Herbster
1457b2b3b1
Comments added. It now generates V5TE multiply instructions. However, it is still necessary to model PUWLSH bits more clearly.
...
llvm-svn: 41627
2007-08-30 23:29:26 +00:00
Raul Herbster
73489273ae
ARM instruction table was modified by adding information to generate multiply instruction of V5TE.
...
llvm-svn: 41626
2007-08-30 23:25:47 +00:00
Raul Herbster
ae1b924c79
JITInfo now resolves function addrs and also relocations. It always emits a stub.
...
llvm-svn: 41625
2007-08-30 23:21:27 +00:00
Evan Cheng
ebb8540067
Added support to fold X86 load / store instructions. This allow rematerialized loads to be folded into their uses.
...
llvm-svn: 41599
2007-08-30 05:54:07 +00:00
Evan Cheng
32a0a995c6
Try fold re-materialized load instructions into its uses.
...
llvm-svn: 41598
2007-08-30 05:53:02 +00:00
Evan Cheng
9a25d98c86
Add a variant of foldMemoryOperand to fold any load / store, not just load / store from / to stack slots.
...
llvm-svn: 41597
2007-08-30 05:52:20 +00:00
Evan Cheng
c2081fe573
Mark load instructions with isLoad = 1.
...
llvm-svn: 41595
2007-08-30 05:49:43 +00:00
Bill Wendling
10e18dea2a
Use i64 on a PPC64 machine
...
llvm-svn: 41590
2007-08-30 00:59:19 +00:00
Dale Johannesen
d246b2ca5c
Change LegalFPImmediates to use APFloat.
...
Add APFloat interfaces to ConstantFP, SelectionDAG.
Fix integer bit in double->APFloat conversion.
Convert LegalizeDAG to use APFloat interface in
ConstantFPSDNode uses.
llvm-svn: 41587
2007-08-30 00:23:21 +00:00
Anton Korobeynikov
2bdec2a5ee
Fix use of declaration inside case block
...
llvm-svn: 41584
2007-08-29 23:18:48 +00:00
Evan Cheng
1ad4a6117b
Change LiveRange so it keeps a pointer to the VNInfo rather than an index.
...
Changes related modules so VNInfo's are not copied. This decrease
copy coalescing time by 45% and overall compilation time by 10% on siod.
llvm-svn: 41579
2007-08-29 20:45:00 +00:00
Anton Korobeynikov
830b1cb4e9
Lower FRAME_TO_ADDR_OFFSET to zero by default (if not custom lowered)
...
llvm-svn: 41578
2007-08-29 19:28:29 +00:00
Duncan Sands
7741427a09
Move getX86RegNum into X86RegisterInfo and use it
...
in the trampoline lowering. Lookup the jump and
mov opcodes for the trampoline rather than hard
coding them.
llvm-svn: 41577
2007-08-29 19:01:20 +00:00
Chris Lattner
8d22b4e18a
update these
...
llvm-svn: 41565
2007-08-29 16:15:23 +00:00
Dan Gohman
81b62e1218
Add an option, -view-sunit-dags, for viewing the actual SUnit DAGs used by
...
scheduling.
llvm-svn: 41556
2007-08-28 20:32:58 +00:00
Evan Cheng
a5b10b334f
Recover most of the compile time regression due to recent live interval changes.
...
1. Eliminate the costly live interval "swapping".
2. Change ValueNumberInfo container from SmallVector to std::vector. The former
performs slowly when the vector size is very large.
llvm-svn: 41536
2007-08-28 08:28:51 +00:00
Bruno Cardoso Lopes
43318839c9
Added method to get Mips register numbers
...
Changed the stack frame layout, StackGrowsUp fits better to Mips strange stack.
Stack offset calculation bug fixed!
llvm-svn: 41529
2007-08-28 05:13:42 +00:00
Bruno Cardoso Lopes
14033fb5cb
Changed stack allocation On LowerFORMAL_ARGUMENTS.
...
Added comments about new stack allocation.
Expand SelectCC for i32 results
llvm-svn: 41527
2007-08-28 05:08:16 +00:00
Bruno Cardoso Lopes
cfd1638e2d
Mask directive completed with CalleeSave info
...
Comments for Mips directives added.
llvm-svn: 41526
2007-08-28 05:06:17 +00:00
Bruno Cardoso Lopes
f55a785e56
Added methods to record SPOffsets from LowerFORMAL_ARGUMENTS
...
llvm-svn: 41525
2007-08-28 05:04:41 +00:00
Chris Lattner
0e258b8518
Cut off crazy computation. This helps PR1622 slightly.
...
llvm-svn: 41522
2007-08-28 04:23:55 +00:00
Devang Patel
d2456a171d
Use simpler test to filter loops.
...
llvm-svn: 41516
2007-08-27 21:34:31 +00:00
David Greene
703623d571
Update InvokeInst to work like CallInst
...
llvm-svn: 41506
2007-08-27 19:04:21 +00:00
Rafael Espindola
b602461f48
Add a comment about using libc memset/memcpy or generating inline code.
...
llvm-svn: 41502
2007-08-27 17:48:26 +00:00
Dan Gohman
9625d812c9
Make DAGCombiner's global alias analysis query more precise in the case
...
where both pointers have non-zero offsets.
llvm-svn: 41491
2007-08-27 16:32:11 +00:00
Dan Gohman
8dc0b93151
If the source and destination pointers in an llvm.memmove are known
...
to not alias each other, it can be translated as an llvm.memcpy.
llvm-svn: 41489
2007-08-27 16:26:13 +00:00
Dan Gohman
71eaf62e5f
Change comments to refer to @malloc and @free instead of %malloc and %free.
...
llvm-svn: 41488
2007-08-27 16:11:48 +00:00
Duncan Sands
ef5a654216
There is an impedance matching problem between LLVM and
...
gcc exception handling: if an exception unwinds through
an invoke, then execution must branch to the invoke's
unwind target. We previously tried to enforce this by
appending a cleanup action to every selector, however
this does not always work correctly due to an optimization
in the C++ unwinding runtime: if only cleanups would be
run while unwinding an exception, then the program just
terminates without actually executing the cleanups, as
invoke semantics would require. I was hoping this
wouldn't be a problem, but in fact it turns out to be the
cause of all the remaining failures in the LLVM testsuite
(these also fail with -enable-correct-eh-support, so turning
on -enable-eh didn't make things worse!). Instead we need
to append a full-blown catch-all to the end of each
selector. The correct way of doing this depends on the
personality function, i.e. it is language dependent, so
can only be done by gcc. Thus this patch which generalizes
the eh.selector intrinsic so that it can handle all possible
kinds of action table entries (before it didn't accomodate
cleanups): now 0 indicates a cleanup, and filters have to be
specified using the number of type infos plus one rather than
the number of type infos. Related gcc patches will cause
Ada to pass a cleanup (0) to force the selector to always
fire, while C++ will use a C++ catch-all (null).
llvm-svn: 41484
2007-08-27 15:47:50 +00:00
Dan Gohman
032d89828e
Add explicit keywords and remove spurious trailing semicolons.
...
llvm-svn: 41482
2007-08-27 14:50:10 +00:00
Rafael Espindola
ff33241e16
call libc memcpy/memset if array size is bigger then threshold.
...
Coping 100MB array (after a warmup) shows that glibc 2.6.1 implementation on
x86-64 (core 2) is 30% faster (from 0.270917s to 0.188079s)
llvm-svn: 41479
2007-08-27 10:18:20 +00:00
Anton Korobeynikov
24fb6b2f8c
Don't promote volatile loads/stores. This is needed (for example) to handle setjmp/longjmp properly.
...
This fixes PR1520.
llvm-svn: 41461
2007-08-26 21:43:30 +00:00
Owen Anderson
2b9ec7ff33
Don't DSe volatile stores.
...
llvm-svn: 41456
2007-08-26 21:14:47 +00:00
Dale Johannesen
b6d2bec418
Revise per review comments.
...
llvm-svn: 41409
2007-08-26 01:18:27 +00:00
Dale Johannesen
2cfcf70f82
Add APFloat interface to ConstantFPSDNode. Change
...
over uses in DAGCombiner. Fix interfaces to work
with APFloats.
llvm-svn: 41407
2007-08-25 22:10:57 +00:00
Devang Patel
6114751544
Move exit condition and exit branch from exiting block into loop header and dominator info. This avoid execution of dead iteration. Loop is already filter in the beginning such that this change is safe.
...
llvm-svn: 41394
2007-08-25 02:39:24 +00:00
Devang Patel
c1ef32ef3d
Constant split values needs upper bound and lower bound check, just like any other split value.
...
llvm-svn: 41389
2007-08-25 01:09:14 +00:00
Chris Lattner
2ed652f11d
Allow target constants to be illegal types. The target should
...
know how to handle them. This fixes
test/CodeGen/Generic/asm-large-immediate.ll
llvm-svn: 41388
2007-08-25 01:00:22 +00:00
Devang Patel
4e63e1f5b5
While calculating upper loop bound for first loop and lower loop bound for second loop, take care of edge cases.
...
llvm-svn: 41387
2007-08-25 00:56:38 +00:00
Chris Lattner
dbfc4e4b07
Teach the dag scheduler to handle inline asm nodes with multi-value immediate operands.
...
llvm-svn: 41386
2007-08-25 00:53:07 +00:00
Bill Wendling
48597b4ff8
The personality function might need to be declared as:
...
.set Lset0,___gxx_personality_v0-.
.long Lset0
on some targets. Make it so!
llvm-svn: 41385
2007-08-25 00:51:55 +00:00
Chris Lattner
d8c9cb9182
rename isOperandValidForConstraint to LowerAsmOperandForConstraint,
...
changing the interface to allow for future changes.
llvm-svn: 41384
2007-08-25 00:47:38 +00:00
Dale Johannesen
bdea32d812
Poison APFloat::operator==. Replace existing uses with bitwiseIsEqual.
...
This means backing out the preceding change to Constants.cpp, alas.
llvm-svn: 41378
2007-08-24 22:09:56 +00:00
Dale Johannesen
7891d8edf0
Use APFloat internally for ConstantFPSDNode.
...
llvm-svn: 41372
2007-08-24 20:59:15 +00:00
Chris Lattner
0b490b0d38
sink clone() down the class hierarchy from CmpInst into ICmpInst/FCmpInst.
...
This eliminates a conditional on that path, and ensures ICmpInst/FCmpInst
both have an out-of-line virtual method to home the class.
llvm-svn: 41371
2007-08-24 20:48:18 +00:00
Devang Patel
f5a01bf025
Fix regression that I caused yesterday night while adding logic to select appropriate split condition branch.
...
llvm-svn: 41365
2007-08-24 19:32:26 +00:00
Chris Lattner
a124f69c52
Disable EH generation until PPC works 100%.
...
llvm-svn: 41360
2007-08-24 16:00:15 +00:00
Chris Lattner
51883acec1
add a note
...
llvm-svn: 41359
2007-08-24 15:17:59 +00:00
Devang Patel
4bc9298f2a
It is not safe to execute split condition's true branch first all the time. If split
...
condition predicate is GT or GE then execute false branch first.
llvm-svn: 41358
2007-08-24 06:17:19 +00:00
Devang Patel
4be56a5d12
Reject ICMP_NE as index split condition.
...
llvm-svn: 41357
2007-08-24 06:02:25 +00:00
Devang Patel
5e46fac6de
Tightenup loop filter.
...
llvm-svn: 41356
2007-08-24 05:36:56 +00:00
Devang Patel
504dc0aaed
Remove incomplete cost analysis.
...
llvm-svn: 41354
2007-08-24 05:21:13 +00:00
Dale Johannesen
918c33c67a
Revised per review feedback from previous patch.
...
llvm-svn: 41353
2007-08-24 05:08:11 +00:00
Chris Lattner
3da18eb22a
silence some warnings in an optimized build.
...
llvm-svn: 41352
2007-08-24 03:02:34 +00:00
Dale Johannesen
a719a60609
Change internal representation of ConstantFP to use APFloat.
...
Interface to rest of the compiler unchanged, as yet.
llvm-svn: 41348
2007-08-24 00:56:33 +00:00
Chris Lattner
33800d1428
add some notes on really poor codegen.
...
llvm-svn: 41319
2007-08-23 15:22:07 +00:00
Chris Lattner
92c6a65d4e
new example
...
llvm-svn: 41318
2007-08-23 15:16:03 +00:00
Anton Korobeynikov
97cdac8d19
Perform correct codegen for eh_dwarf_cfa intrinsic.
...
llvm-svn: 41316
2007-08-23 07:21:06 +00:00
Chris Lattner
b0f158cfdf
rename APInt::toString -> toStringUnsigned for symmetry with toStringSigned()
...
Add an APSInt::toString() method.
llvm-svn: 41309
2007-08-23 05:15:32 +00:00
Devang Patel
887db2d832
Remove dead code.
...
llvm-svn: 41295
2007-08-22 21:07:41 +00:00
Devang Patel
6f4f23320d
Fix typo.
...
llvm-svn: 41292
2007-08-22 20:55:18 +00:00
Devang Patel
31206b56d5
Cosmetic change
...
"True Loop" and "False Loop" naming terminology to refer two loops
after loop cloning is confusing. Instead just use A_Loop and B_Loop.
llvm-svn: 41287
2007-08-22 19:33:29 +00:00
Andrew Lenharth
beb80a9832
move this check. ppc outputs .no_dead_strip properly
...
llvm-svn: 41286
2007-08-22 19:33:11 +00:00
Bill Wendling
862afea91e
Add the PCSymbol for Darwin x86 platforms.
...
llvm-svn: 41284
2007-08-22 18:44:05 +00:00
Devang Patel
90da534987
Refactor loop condition check in a separate function.
...
llvm-svn: 41282
2007-08-22 18:27:01 +00:00
Devang Patel
cd8beb7645
Fix thinko.
...
Starting value of second loop's induction variable can not be lower
then starting value of original loop's induction variable.
llvm-svn: 41280
2007-08-22 18:07:47 +00:00
Devang Patel
a12000d572
Rename bunch of variables.
...
llvm-svn: 41250
2007-08-21 21:12:02 +00:00
Devang Patel
f98db5e62a
Preserve LCSSA.
...
llvm-svn: 41246
2007-08-21 19:47:46 +00:00
Devang Patel
f5e520d892
Use SmallVector.
...
llvm-svn: 41230
2007-08-21 16:54:51 +00:00
Devang Patel
a9e7c4f827
No need to hardcode SmallVector size.
...
llvm-svn: 41228
2007-08-21 16:39:43 +00:00
Bruno Cardoso Lopes
b10580ac1e
InlineAsm asm support for integer registers added
...
llvm-svn: 41225
2007-08-21 16:09:25 +00:00
Bruno Cardoso Lopes
d4b9945a21
Instruction Itinerary attribution fixed
...
llvm-svn: 41224
2007-08-21 16:06:45 +00:00
Chris Lattner
913849b5df
Fix potentially N^2 behavior handling arrays with many of the
...
same value which get RAUW'd. This speeds up reading the .bc
file in PR1616 from 852s to 0.19s on my G5 with a debug build.
llvm-svn: 41209
2007-08-21 00:55:23 +00:00
Anton Korobeynikov
f335679b52
Use only 1 knob to enable exceptions on Darwin :).
...
llvm-svn: 41208
2007-08-21 00:31:30 +00:00
Devang Patel
b5933bbbd5
Use SmallVector instead of std::vector.
...
llvm-svn: 41207
2007-08-21 00:31:24 +00:00
Chris Lattner
8e5b2c27a3
simplify code, improve a comment.
...
llvm-svn: 41205
2007-08-21 00:21:07 +00:00
Devang Patel
8f4228d619
s/ExitBlock/ExitingBlock/g
...
llvm-svn: 41204
2007-08-20 23:51:18 +00:00
Chris Lattner
fe02c1f97f
initial checkin of Neil's APFloat work.
...
llvm-svn: 41203
2007-08-20 22:49:32 +00:00
Anton Korobeynikov
5849a625ff
- Use correct header for SCEV inside LoopPass.cpp
...
- Move SCEVExpander::expand() out-of-line workarounding possible toolchain bug
llvm-svn: 41197
2007-08-20 21:17:26 +00:00
Devang Patel
49c4f9a889
Replace indunction variable with split value in loop body.
...
This fixes art miscompile.
llvm-svn: 41195
2007-08-20 20:49:01 +00:00
Devang Patel
c2e2d15f45
Do not split loops rejected by processOneIterationLoop().
...
llvm-svn: 41194
2007-08-20 20:24:15 +00:00
Dan Gohman
54a187ea8b
Minor cleanups to reduce some spurious differences between different
...
scheduler implementations.
llvm-svn: 41191
2007-08-20 19:28:38 +00:00