Chris Lattner
b14490d912
add a EmitSymbolValue convenience method to MCStreamer.
...
llvm-svn: 98017
2010-03-09 00:39:24 +00:00
Chris Lattner
085b65283c
make InlineInfoLabels hold MCSymbol*'s, avoiding
...
recomputation of the labels.
llvm-svn: 98016
2010-03-09 00:31:02 +00:00
Chris Lattner
53d6d1e87d
mc'ize the last use of PrintLabelName and eliminate PrintLabelName.
...
llvm-svn: 98015
2010-03-09 00:26:09 +00:00
Chris Lattner
292ec6c299
eliminate an argument from PrintRelDirective, sinking
...
the one special case into EmitSectionOffset. MCize
the non-special case in EmitSectionOffset.
llvm-svn: 98014
2010-03-09 00:17:58 +00:00
Dan Gohman
f6fb1e0d93
Print the correct index in the "match failed at index" message.
...
llvm-svn: 98013
2010-03-09 00:07:36 +00:00
Chris Lattner
b242ae6dcc
remove the suffix form of PrintLabelName, which was only
...
used for 'flavor'.
llvm-svn: 98012
2010-03-09 00:00:57 +00:00
Chris Lattner
4d728127fb
now that the debug and eh emitters use a common .set counter,
...
we can eliminate "flavor".
llvm-svn: 98011
2010-03-09 00:00:15 +00:00
Chris Lattner
9889c1eb9e
move .set generation out of DwarfPrinter into AsmPrinter and
...
MCize it.
llvm-svn: 98010
2010-03-08 23:58:37 +00:00
Evan Cheng
c9e8621268
Don't waste time trying to CSE labels, phis, inline asm. Definitely avoid cse implicit-def for obvious performance reason.
...
llvm-svn: 98009
2010-03-08 23:49:12 +00:00
Evan Cheng
6ec41ee33c
Restrict machine cse to really trivial coalescing. Leave the heavy lifting to a real coalescer.
...
llvm-svn: 98007
2010-03-08 23:28:08 +00:00
Chris Lattner
27a9732450
simplify EmitSectionOffset to always use .set if it is
...
available, the only thing this affects is that we produce
.set in one case we didn't before, which shouldn't harm
anything. Make EmitSectionOffset call EmitDifference
instead of duplicating it.
llvm-svn: 98005
2010-03-08 23:23:25 +00:00
Chris Lattner
d802615d0c
don't reset defaults.
...
llvm-svn: 98004
2010-03-08 23:18:21 +00:00
Chris Lattner
449a9ff14b
Remove a version of EmitDifference.
...
llvm-svn: 98002
2010-03-08 23:02:59 +00:00
Bob Wilson
0bfbd9b68c
Fix a crash compiling 254.gap for Thumb2. The Thumb2 add/sub with 12-bit
...
immediate instructions cannot set the condition codes, so they do not have
the extra cc_out operand. We hit an assertion during tail duplication
because the instruction being duplicated had more operands that expected.
llvm-svn: 98001
2010-03-08 22:56:15 +00:00
Evan Cheng
4f2fd2d2be
Re-commit 97860 with fix. getMallocAllocatedType may return null.
...
llvm-svn: 98000
2010-03-08 22:54:36 +00:00
Chris Lattner
ee20b5f236
eliminate a form of PrintLabelName.
...
llvm-svn: 97999
2010-03-08 22:52:49 +00:00
Chris Lattner
3c081995f6
remove another form of EmitReference.
...
llvm-svn: 97998
2010-03-08 22:50:36 +00:00
Chris Lattner
b779eb6a1d
eliminate the non-MCSymbol versions of EmitReference.
...
llvm-svn: 97997
2010-03-08 22:47:57 +00:00
Chris Lattner
722714dde2
mc'ize EmitLabel.
...
llvm-svn: 97996
2010-03-08 22:44:40 +00:00
Chris Lattner
8dcf41ed66
merge DIEObjectLabel and DIEDwarfLabel into DIELabel.
...
Yes, DIE you fiendish labels, die all of you.
llvm-svn: 97995
2010-03-08 22:31:46 +00:00
Devang Patel
2e520f6378
Introduce DIFile. This will be used to represent header files and source file(s) in debug info.
...
llvm-svn: 97994
2010-03-08 22:27:22 +00:00
Chris Lattner
bc9210cb70
elimiante the DWLabel class, using MCSymbol instead. Start
...
switching some stuff over to passing around MCSymbol* instead
of stem+ID.
llvm-svn: 97993
2010-03-08 22:23:36 +00:00
Kevin Enderby
d2030e38a6
Fix the vmxon entry in the X86InstrInfo.td so it has the correct prefix bytes
...
for the encoding and is not the same as vmptrld.
llvm-svn: 97992
2010-03-08 22:17:26 +00:00
Daniel Dunbar
3a3f472cb4
MC/Macho-O: Align the zerofill section itself to the maximum alignment.
...
llvm-svn: 97991
2010-03-08 22:03:42 +00:00
Devang Patel
8119fe87d8
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
4bd5f8ceca
Remove DbgNode checks in constructor. Debug descriptors are intended to be light weight wrappers.
...
llvm-svn: 97988
2010-03-08 21:32:10 +00:00
Daniel Dunbar
6622fe7873
MC/Mach-O: Fix address compution for zero fill sections.
...
llvm-svn: 97984
2010-03-08 21:10:42 +00:00
Daniel Dunbar
c6ac7940d9
MC/Mach-O: Error out instead of crashing on invalid scattered relocation expressions.
...
llvm-svn: 97983
2010-03-08 21:10:39 +00:00
Daniel Dunbar
b59f7734b9
X86: Fix encoding for TEST{8,16,32}rr.
...
llvm-svn: 97982
2010-03-08 21:10:36 +00:00
Evan Cheng
5967649780
Add documentation on sibling call optimization. Rename tailcall2.ll test to sibcall.ll.
...
llvm-svn: 97980
2010-03-08 21:05:02 +00:00
Devang Patel
03efa475d1
isNull() is not used any more.
...
llvm-svn: 97979
2010-03-08 21:00:27 +00:00
Devang Patel
3b548aa8e2
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
Andrew Lenharth
2e8b9b5ad3
Iterator traits and swap. closes PR6548 and PR6549
...
llvm-svn: 97974
2010-03-08 20:45:52 +00:00
Erick Tryzelaar
dc7e85fec6
Don't always run the ocaml kaleidoscope tutorials.
...
llvm-svn: 97973
2010-03-08 20:07:32 +00:00
John McCall
953838d0d5
Revert r97726 and r97728 at ddunbar's request; we want to solve this
...
some other way when it comes to be necessary.
llvm-svn: 97972
2010-03-08 20:02:05 +00:00
Erick Tryzelaar
f11976538e
Add OCaml tutorial to the examples.
...
llvm-svn: 97966
2010-03-08 19:32:27 +00:00
Erick Tryzelaar
b8c11eb36b
Update the OCaml Kaleidoscope tutorial.
...
llvm-svn: 97965
2010-03-08 19:32:18 +00:00
Devang Patel
bc97f6b757
Revert r97947.
...
llvm-svn: 97963
2010-03-08 19:20:38 +00:00
Chris Lattner
e77f993262
disambiguate some types, add a fixme about some
...
inconsistent intrinsics.
llvm-svn: 97959
2010-03-08 18:59:49 +00:00
Chris Lattner
d8045649a6
fix some more ambiguous patterns, remove another nontemporalstore
...
pattern which is broken (source and address swapped).
llvm-svn: 97958
2010-03-08 18:57:56 +00:00
Chris Lattner
a6d842fac0
Correct immediate sizes.
...
llvm-svn: 97957
2010-03-08 18:55:15 +00:00
Chris Lattner
6742f1f338
fix a type compatibility bug. imm is i32 in the input
...
pattern, not i64.
llvm-svn: 97956
2010-03-08 18:52:55 +00:00
Chris Lattner
b8a7427636
fix a bunch of partially ambiguous patterns on ARM. As an
...
example, this:
(set DPR:$dst, (fsub (fneg (fmul DPR:$a, DPR:$b)), DPR:$dstin))
is ambiguous because DPR contains both f64 and v2f32. tblgen
currently accidentally picks f64 because it's first in the
regclass.
llvm-svn: 97955
2010-03-08 18:51:21 +00:00
Chris Lattner
dac58bd094
Fix a bunch of ambiguous patterns which tblgen happens to infer types
...
for, due to a bug.
llvm-svn: 97953
2010-03-08 18:44:04 +00:00
Chris Lattner
e96802e6ed
Node arguments to type casts can have names too. This code
...
needs to be majorly refactored, but this spot bugfix allows
things like:
def vmrghw_shuffle : PatFrag<(ops node:$lhs, node:$rhs),
(vector_shuffle (v4i32 node:$lhs), node:$rhs), [{
...
llvm-svn: 97952
2010-03-08 18:36:19 +00:00
Chris Lattner
2b7ecfbe40
tidy up
...
llvm-svn: 97950
2010-03-08 18:29:38 +00:00
Devang Patel
fe28599f6f
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
30488c636d
Add Order to SDDbgValue
...
llvm-svn: 97939
2010-03-08 05:39:50 +00:00
Dale Johannesen
0eebdbb325
Fix dbg value handling in tail merging.
...
llvm-svn: 97938
2010-03-08 05:38:13 +00:00
Chris Lattner
ca8d590c28
remove a non-temporal store pattern which is not tested and
...
could never have matched because the operand list was backwards.
llvm-svn: 97933
2010-03-08 03:18:28 +00:00
Douglas Gregor
9abb538be0
Revert r97917, which was causing Clang Debug self-host failures.
...
llvm-svn: 97932
2010-03-08 02:58:37 +00:00
Jeffrey Yasskin
5cdbd7064c
Roll back r97918 again. Just configuring against llvm-gcc wasn't enough to run
...
the FrontendC* tests. :(
llvm-svn: 97921
2010-03-07 19:26:40 +00:00
Jeffrey Yasskin
aba6ea8254
Reapply r97788 to free MDNodes when the LLVMContext is destroyed. It
...
bootstraps llvm-gcc this time.
llvm-svn: 97918
2010-03-07 18:46:57 +00:00
Jeffrey Yasskin
37a0372fc4
Roll r97906 forward again, without double-deleting CompileUnit::IndexTyDie.
...
llvm-svn: 97917
2010-03-07 17:10:13 +00:00
Tobias Grosser
62892a8680
Add findNearestCommonDominator() for PostDominators.
...
Add a missing interface to be able to call findNearestCommonDominator
for a PostDominanceTree. The function itself is already implemented in
DominatorTreeBase. The interface however was only added to the
DominatorTree class, but not the PostDominatorClass.
llvm-svn: 97915
2010-03-07 11:15:04 +00:00
Chris Lattner
28dc6c12c3
Use Other as a sentinel instead of iAny.
...
llvm-svn: 97914
2010-03-07 07:45:08 +00:00
Chris Lattner
c95d58d31a
turn off debug spew
...
llvm-svn: 97912
2010-03-07 07:21:24 +00:00
Chris Lattner
a160389290
more factoring.
...
llvm-svn: 97911
2010-03-07 07:20:49 +00:00
Jeffrey Yasskin
7068bdba50
_2_ gcc crashes, ah, ah, ah...
...
(Rolling back r97906.)
llvm-svn: 97909
2010-03-07 07:16:49 +00:00
Chris Lattner
b9071a2d5d
teach tblgen to be more aggressive when factoring CheckType nodes.
...
Now it will factor things like this:
CheckType i32
...
CheckOpcode ISD::AND
CheckType i64
...
into:
SwitchType:
i32: ...
i64:
CheckOpcode ISD::AND
...
This shrinks hte table by a few bytes, nothing spectacular.
llvm-svn: 97908
2010-03-07 07:01:28 +00:00
Jeffrey Yasskin
413721b050
Avoid leaking CompileUnits and DbgScopes from DwarfDebug. Leaks found by Valgrind!
...
llvm-svn: 97906
2010-03-07 06:55:35 +00:00
Chris Lattner
9c791d872a
add some helper functions and implement isContradictory
...
for CheckValueTypeMatcher. The isContradictory implementation
helps us factor better, shrinking x86 table from 79144 -> 78896
bytes.
llvm-svn: 97905
2010-03-07 06:29:26 +00:00
Chris Lattner
ef2f8047fa
tidy up
...
llvm-svn: 97895
2010-03-07 04:28:09 +00:00
Wesley Peck
1fb4edc05d
Re-committing the failed r97807 commit with changes to eliminate warnings.
...
llvm-svn: 97891
2010-03-06 23:23:12 +00:00
Nick Lewycky
4b5e95426d
Add verification of union types.
...
llvm-svn: 97889
2010-03-06 20:26:48 +00:00
Anton Korobeynikov
c9c8b2713c
Describe what's going on with mingw alloca and why do we need separate instruction.
...
llvm-svn: 97888
2010-03-06 20:07:32 +00:00
Anton Korobeynikov
bf16a17fc1
Initial bits of ARMv4-only support.
...
Patch by John Tytgat!
llvm-svn: 97886
2010-03-06 19:39:36 +00:00
Anton Korobeynikov
d5e3fd6dc8
Lower dynamic stack allocation on mingw32 to separate instruction.
...
We cannot use a normal call here since it has extra unmodelled side
effects (it changes stack pointer). This should fix PR5292.
llvm-svn: 97884
2010-03-06 19:32:29 +00:00
Chris Lattner
4c1e4db3ff
make APFloat::toString be const.
...
llvm-svn: 97883
2010-03-06 19:20:13 +00:00
Chris Lattner
1e93b96117
disable this for mingw as well, we really need a 'has no dynamic linking' predicate.
...
llvm-svn: 97882
2010-03-06 18:54:37 +00:00
Anton Korobeynikov
6f5523aa8b
Do not use '&' prefix for globals when register base field is non-zero, otherwise msp430-as will silently miscompile the code (TI's assembler report an error though).
...
This fixes PR6349
llvm-svn: 97877
2010-03-06 11:41:12 +00:00
Eric Christopher
1810d77cb4
Let the fallthrough handle whether or not we've changed anything
...
before we try to optimize.
llvm-svn: 97876
2010-03-06 10:59:25 +00:00
Eric Christopher
a7fb58f5f5
Migrate _chk call lowering from SimplifyLibCalls to InstCombine. Stub
...
out the remainder of the calls that we should lower in some way and
move the tests to the new correct directory. Fix up tests that are now
optimized more than they were before by -instcombine.
llvm-svn: 97875
2010-03-06 10:50:38 +00:00
Rafael Espindola
7f1e85f331
Add static methods to handle Linkage Types.
...
llvm-svn: 97871
2010-03-06 07:22:39 +00:00
Chris Lattner
29146d417e
clean this up.
...
llvm-svn: 97870
2010-03-06 07:02:28 +00:00
Chris Lattner
4279a078a5
revert r97807, it introduced build warnings.
...
llvm-svn: 97869
2010-03-06 04:32:46 +00:00
Jim Grosbach
24c9b550b2
Thumb1 epilogue code generation needs to take into account that callee-saved
...
registers may be restored via a pop instruction, not just a tRestore.
This fixes nightly test 471.omnetep for Thumb1.
llvm-svn: 97867
2010-03-06 03:28:39 +00:00
Eric Christopher
d8b43d0e59
Temporarily revert:
...
Log:
Transform @llvm.objectsize to integer if the argument is a result of malloc of known size.
Modified:
llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp
llvm/trunk/test/Transforms/InstCombine/objsize.ll
It appears to be causing swb and nightly test failures.
llvm-svn: 97866
2010-03-06 03:11:35 +00:00
Dale Johannesen
066b8ea590
Fix another case where LSR was affected by debug info.
...
llvm-svn: 97865
2010-03-06 02:45:26 +00:00
Evan Cheng
0f5f54784a
Don't update physical register def.
...
llvm-svn: 97861
2010-03-06 01:14:19 +00:00
Evan Cheng
afdc7d3aab
Transform @llvm.objectsize to integer if the argument is a result of malloc of known size.
...
llvm-svn: 97860
2010-03-06 01:01:42 +00:00
Erick Tryzelaar
381268e629
Add a LLVMWriteBitcodeToFD that exposes the raw_fd_ostream options.
...
llvm-svn: 97858
2010-03-06 00:30:06 +00:00
Erick Tryzelaar
dc78d16a03
Whoops, the old LLVMWriteBitcodeToFileHandle closed the stream.
...
Luckily this never was released.
llvm-svn: 97857
2010-03-06 00:30:01 +00:00
Erick Tryzelaar
b2e144ddff
LLVMWriteBitcodeToFileHandle should work on all architectures now.
...
llvm-svn: 97856
2010-03-06 00:29:58 +00:00
Dale Johannesen
10a77adede
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
14e450f595
Reapply r97778 and r97779, enabled only for unsigned i64 to f64
...
conversions.
llvm-svn: 97854
2010-03-06 00:00:55 +00:00
Devang Patel
0a3d71af52
Test case for r97851.
...
llvm-svn: 97852
2010-03-05 23:35:04 +00:00
Ted Kremenek
65bb311629
Update CMake build.
...
llvm-svn: 97846
2010-03-05 22:34:16 +00:00
Charles Davis
8545afe0b0
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
Eric Christopher
87abfc506f
Move SimplifyLibCalls's LibCall builders to a separate file so they
...
can be used in more places. Add an argument for the TargetData that
most of them need. Update for the getInt8PtrTy() change. Should be
no functionality change.
llvm-svn: 97844
2010-03-05 22:25:30 +00:00
Eric Christopher
27d54d9d3b
Add support for an i8* type accessor.
...
llvm-svn: 97841
2010-03-05 22:21:58 +00:00
Jakob Stoklund Olesen
2664d295cb
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
8c5b8db5cd
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
b0503beff1
Avoid creating bad PHI instructions when BR is being const-folded.
...
llvm-svn: 97836
2010-03-05 21:49:10 +00:00
Dale Johannesen
f5cc1cdc65
Fix a case where LSR is sensitive to debug info.
...
llvm-svn: 97830
2010-03-05 21:12:40 +00:00
Evan Cheng
d214ed0e75
Safely turn memset_chk etc. to non-chk variant if the known object size is >= memset / memcpy / memmove size.
...
llvm-svn: 97828
2010-03-05 20:59:47 +00:00
Evan Cheng
fffdad58ac
Instcombine should turn llvm.objectsize of a alloca with static size to an integer.
...
llvm-svn: 97827
2010-03-05 20:47:23 +00:00
Evan Cheng
27494232d4
Fix typo.
...
llvm-svn: 97818
2010-03-05 19:55:55 +00:00
Chris Lattner
f0692603d5
fix bss section printing for cell, patch by Kalle Raiskila!
...
llvm-svn: 97814
2010-03-05 18:55:36 +00:00
Chris Lattner
f6befffbb2
fix PR6512, a case where instcombine would incorrectly merge loads
...
from different addr spaces.
llvm-svn: 97813
2010-03-05 18:53:28 +00:00
Wesley Peck
34004170c5
Reworking the stack layout that the MicroBlaze backend generates.
...
The MicroBlaze backend was generating stack layouts that did not
conform correctly to the ABI. This update generates stack layouts
which are closer to what GCC does.
Variable arguments support was added as well but the stack layout
for varargs has not been finalized.
llvm-svn: 97807
2010-03-05 15:26:02 +00:00
Wesley Peck
b0578bf0c3
Adding MBlaze to cmake target list.
...
llvm-svn: 97806
2010-03-05 15:15:55 +00:00
Chris Lattner
067459c62b
Fix PR6503. This turned into a much more interesting and nasty bug. Various
...
parts of the cmp|cmp and cmp&cmp folding logic wasn't prepared for vectors
(unrelated to the bug but noticed while in the code) and the code was
*definitely* not safe to use by the (cast icmp)|(cast icmp) handling logic
that I added in r95855. Fix all this up by changing the various routines
to more consistently use IRBuilder and not pass in the I which had the wrong
type.
llvm-svn: 97801
2010-03-05 08:46:26 +00:00
Chris Lattner
fc13a0343c
make these less sensitive to temporary naming.
...
llvm-svn: 97799
2010-03-05 08:43:33 +00:00
Chris Lattner
48b6e27e7b
remove this testcase, it isn't clear what it was testing and it is subsumed by or.ll
...
llvm-svn: 97798
2010-03-05 08:43:06 +00:00
Evan Cheng
654ec2a663
Fix an oops in x86 sibcall optimization. If the ByVal callee argument is itself passed as a pointer, then it's obviously not safe to do a tail call.
...
llvm-svn: 97797
2010-03-05 08:38:04 +00:00
Duncan Sands
798ca1e6fe
If LD_LIBRARY_PATH is set in the system environment, use it.
...
llvm-svn: 97796
2010-03-05 08:21:02 +00:00
Chris Lattner
343d2e48b2
simplify some functions and make them work with vector
...
compares, noticed by inspection.
llvm-svn: 97795
2010-03-05 07:47:57 +00:00
Chris Lattner
c6c1523f59
fix a nice subtle reassociate bug which would only occur
...
in a very specific use pattern embodied in the carefully
reduced testcase.
llvm-svn: 97794
2010-03-05 07:18:54 +00:00
Eric Christopher
4899cbc77d
Move GetStringLength and helper from SimplifyLibCalls to ValueTracking.
...
No functionality change.
llvm-svn: 97793
2010-03-05 06:58:57 +00:00
Jeffrey Yasskin
5c92f933b3
Revert r97788 because it broke test/FrontendC/2010-02-16-DbgVarScope.c.
...
llvm-svn: 97792
2010-03-05 06:43:49 +00:00
Chris Lattner
55e81eb49f
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
bfdd17a2ea
cleanup
...
llvm-svn: 97790
2010-03-05 06:17:43 +00:00
Chris Lattner
374a3ac744
inline a small function with one call site.
...
llvm-svn: 97789
2010-03-05 05:49:45 +00:00
Jeffrey Yasskin
39e0d52080
Free MDNodes when the LLVMContext is destroyed. Leak found by Valgrind.
...
llvm-svn: 97788
2010-03-05 05:47:09 +00:00
Mikhail Glushenkov
a764083db3
Make it not an error to specify -O* options several times.
...
As in 'llvmc -O2 -O2 test.c'.
llvm-svn: 97787
2010-03-05 04:46:39 +00:00
Mikhail Glushenkov
cb231bb618
Use FindExecutable as a fall-back search method.
...
Allows us to find executables that are in the same directory.
llvm-svn: 97786
2010-03-05 04:46:28 +00:00
Evan Cheng
cf67ffa500
Rever 96389 and 96990. They are causing some miscompilation that I do not fully understand.
...
llvm-svn: 97782
2010-03-05 03:08:23 +00:00
Dan Gohman
998c7c2614
Revert r97778 and r97779. They're somehow breaking llvm-gcc builds.
...
llvm-svn: 97781
2010-03-05 02:40:23 +00:00
Chris Lattner
5ec1b24f8f
apparently if gold is around lto needs to be part of DIRS.
...
llvm-svn: 97780
2010-03-05 02:34:34 +00:00
Dan Gohman
ba9eb0bf2e
Fix these constants to be more portable.
...
llvm-svn: 97779
2010-03-05 02:13:10 +00:00
Dan Gohman
7fbeeebaf6
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
Johnny Chen
70e01cd001
Trivial comment change.
...
llvm-svn: 97776
2010-03-05 01:45:46 +00:00
Evan Cheng
43d6ff7701
Add missing break for Intrinsic::objectsize case. It was falling through to the following Intrinsic::bswap code. I have no idea why it wasn't breaking stuff.
...
llvm-svn: 97774
2010-03-05 01:22:47 +00:00
Chris Lattner
6dbf5cc64c
disable libprofile on cygwin, patch by Aaron Gray.
...
llvm-svn: 97772
2010-03-05 01:00:34 +00:00
Chris Lattner
2e89d20ad3
Only build libedis if ENABLE_SHARED is specified, just like liblto.
...
Don't build any of the dynamic library stuff on cygwin/mingw.
llvm-svn: 97771
2010-03-05 00:59:18 +00:00
Chris Lattner
274c8d8d07
liblto and gold don't need to be built in serial
...
llvm-svn: 97770
2010-03-05 00:54:45 +00:00
Chris Lattner
6783832ec2
add an assertion requested on llvmdev.
...
llvm-svn: 97769
2010-03-05 00:49:08 +00:00
Bill Wendling
543ce1f64a
Revert r97766. It's deleting a tag.
...
llvm-svn: 97768
2010-03-05 00:33:59 +00:00
Bill Wendling
6517f88f25
Micro-optimization:
...
This code:
float floatingPointComparison(float x, float y) {
double product = (double)x * y;
if (product == 0.0)
return product;
return product - 1.0;
}
produces this:
_floatingPointComparison:
0000000000000000 cvtss2sd %xmm1,%xmm1
0000000000000004 cvtss2sd %xmm0,%xmm0
0000000000000008 mulsd %xmm1,%xmm0
000000000000000c pxor %xmm1,%xmm1
0000000000000010 ucomisd %xmm1,%xmm0
0000000000000014 jne 0x00000004
0000000000000016 jp 0x00000002
0000000000000018 jmp 0x00000008
000000000000001a addsd 0x00000006(%rip),%xmm0
0000000000000022 cvtsd2ss %xmm0,%xmm0
0000000000000026 ret
The "jne/jp/jmp" sequence can be reduced to this instead:
_floatingPointComparison:
0000000000000000 cvtss2sd %xmm1,%xmm1
0000000000000004 cvtss2sd %xmm0,%xmm0
0000000000000008 mulsd %xmm1,%xmm0
000000000000000c pxor %xmm1,%xmm1
0000000000000010 ucomisd %xmm1,%xmm0
0000000000000014 jp 0x00000002
0000000000000016 je 0x00000008
0000000000000018 addsd 0x00000006(%rip),%xmm0
0000000000000020 cvtsd2ss %xmm0,%xmm0
0000000000000024 ret
for a savings of 2 bytes.
This xform can happen when we recognize that jne and jp jump to the same "true"
MBB, the unconditional jump would jump to the "false" MBB, and the "true" branch
is the fall-through MBB.
llvm-svn: 97766
2010-03-05 00:24:26 +00:00
Dale Johannesen
2061c84109
Fix some more places where dbg_value affected codegen.
...
llvm-svn: 97765
2010-03-05 00:02:59 +00:00
Devang Patel
9984bd6092
Add metadata example.
...
llvm-svn: 97764
2010-03-04 23:44:48 +00:00
Jeffrey Yasskin
bd8a759589
Stop leaking MDStrings.
...
llvm-svn: 97763
2010-03-04 23:24:19 +00:00
Johnny Chen
ece1797542
Drop the ".w" qualifier for t2UXTB16* instructions as there is no 16-bit version
...
of either sxtb16 or uxtb16, and the unified syntax does not specify ".w".
llvm-svn: 97760
2010-03-04 22:24:41 +00:00
Jeffrey Yasskin
735b0ae247
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
1201f29321
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
Bob Wilson
749ba9a7d5
pr6478: The frame pointer spill frame index is only defined when there is a
...
frame pointer.
llvm-svn: 97755
2010-03-04 21:42:36 +00:00
Evan Cheng
a325e562ee
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
1abd1a9f4b
Avoid cse load instructions unless they are known to be invariant loads.
...
llvm-svn: 97747
2010-03-04 21:18:08 +00:00
Bob Wilson
cf6e29a818
pr6480: Don't try producing ld/st-multiple instructions when the address is
...
an undef value. This is only going to come up for bugpoint-reduced tests --
correct programs will not access memory at undefined addresses -- so it's not
worth the effort of doing anything more aggressive.
llvm-svn: 97745
2010-03-04 21:04:38 +00:00
Erick Tryzelaar
444c0955af
Rewrite makefiles to explicitly reference DESTDIR to fix bug 3153.
...
We need this so can not bake DESTDIR into the O'Caml symlinks.
llvm-svn: 97743
2010-03-04 20:56:19 +00:00
Jakob Stoklund Olesen
af6ca23294
Fix the remaining MUL8 and DIV8 to define AX instead of AL,AH.
...
These instructions technically define AL,AH, but a trick in X86ISelDAGToDAG
reads AX in order to avoid reading AH with a REX instruction.
Fix PR6489.
llvm-svn: 97742
2010-03-04 20:42:07 +00:00
Dan Gohman
b8ebd408da
Fix recognition of 16-bit bswap for C front-ends which emit the
...
clobber registers in a different order.
llvm-svn: 97741
2010-03-04 19:58:08 +00:00
Chris Lattner
795667b424
not committing what you test = bad.
...
llvm-svn: 97740
2010-03-04 19:54:45 +00:00
Chris Lattner
6ce8e24b70
make gep matching in fastisel match the base of the gep as a
...
register if it isn't possible to match the indexes *and* the base.
This fixes some fast isel rejects of load instructions on oggenc.
llvm-svn: 97739
2010-03-04 19:48:19 +00:00
Chris Lattner
c1cb75eb72
add a statistic for # times fastisel fails.
...
llvm-svn: 97738
2010-03-04 19:46:56 +00:00
Jeffrey Yasskin
c3b7d1edfa
Fix PR6360. It's easy for a stub's address to escape to user code, so we can't
...
just count references to it from JIT output to decide when to destroy it. This
patch waits to destroy the JIT's memory of a stub until the Function it refers
to is destroyed. External function stubs and GVIndirectSyms aren't destroyed
until the JIT itself is.
llvm-svn: 97737
2010-03-04 19:45:09 +00:00
Dan Gohman
9cc886b9f1
Fix a typo Duncan noticed.
...
llvm-svn: 97735
2010-03-04 19:11:28 +00:00
Johnny Chen
334db0ce7f
Added 32-bit Thumb instructions for Preload Data (PLD, PLDW) and Preload
...
Instruction (PLI) for disassembly only.
According to A8.6.120 PLI (immediate, literal), for example, different
instructions are generated for "pli [pc, #0 ]" and "pli [pc, #-0"]. The
disassembler solves it by mapping -0 (negative zero) to -1, -1 to -2, ..., etc.
llvm-svn: 97731
2010-03-04 17:40:44 +00:00
John McCall
77ffdaf033
Simplify the condition-checking logic and hopefully clear up a build failure
...
that somehow got through my testing.
llvm-svn: 97728
2010-03-04 11:48:42 +00:00