Rafael Espindola
f46baf3304
Emit .comm alignment in bytes but .align in powers of 2 for ARM ELF.
...
Original patch by Sandeep Patel and updated by me.
llvm-svn: 94582
2010-01-26 20:21:43 +00:00
Chris Lattner
044439c9bc
eliminate MCAsmInfo::NeedsSet: we now just use .set on any platform
...
that has it.
llvm-svn: 94581
2010-01-26 20:20:43 +00:00
Dan Gohman
71fc5e8fce
-disable-output is no longer needed with -analyze.
...
llvm-svn: 94574
2010-01-26 19:25:59 +00:00
Dan Gohman
5e06a05a16
Fix the the ceiling-division used in computing the MaxBECount so that it doesn't
...
have trouble with an intermediate add overflowing. Also, be more conservative
about the case where the induction variable in an SLT loop exit can step past
the RHS of the SLT and overflow in a single step.
Make getSignedRange more aggressive, to recover for some common cases which
the above fixes pessimized.
This addresses rdar://7561161.
llvm-svn: 94512
2010-01-26 04:40:18 +00:00
Victor Hernandez
f12e8a120f
In mem2reg, for all alloca/stores that get promoted where the alloca has an associated llvm.dbg.declare instrinsic, insert an llvm.dbg.var intrinsic before each store.
...
llvm-svn: 94493
2010-01-26 02:42:15 +00:00
Evan Cheng
548d00d77c
Implement cond ? -1 : 0 with sbb.
...
llvm-svn: 94490
2010-01-26 02:00:44 +00:00
Dale Johannesen
d75f9dc3ff
Generate DEBUG_VALUE comments on x86. The (limited)
...
dbg.declare's we currently generate go through both
register allocators without perturbing the results.
llvm-svn: 94480
2010-01-26 00:09:58 +00:00
Dan Gohman
18bbc20ac8
Fix the bitcode reader to deserialize nuw/nsw/etc. bits properly in the case
...
of a forward-reference, which doesn't use an "abbrev" encoding.
llvm-svn: 94454
2010-01-25 21:55:39 +00:00
Chris Lattner
5f919913e8
wirte up .file and .file to the mc asmparser.
...
llvm-svn: 94438
2010-01-25 19:02:58 +00:00
Victor Hernandez
253c09eb8f
Revert r94260 until findDbgDeclare() is made more efficient
...
llvm-svn: 94432
2010-01-25 17:52:13 +00:00
Rafael Espindola
575697fd65
Update test for darwin.
...
llvm-svn: 94421
2010-01-25 15:32:10 +00:00
Chris Lattner
2020423588
we removed support for darwin8 tools.
...
llvm-svn: 94414
2010-01-25 07:43:40 +00:00
Rafael Espindola
82a8b3efd4
Fix PR6134.
...
We are not emitting alignments on Darwin for "bar". Not sure what is the
correct way to do it.
llvm-svn: 94400
2010-01-25 02:27:39 +00:00
Daniel Dunbar
c1df55e99c
Attempt to unbreak test on Linux. Chris, please check.
...
llvm-svn: 94399
2010-01-25 00:54:13 +00:00
Chris Lattner
6fdaf12267
just remove this test, it is not reduced, is not clear what its testing for and
...
it is dying due to fragility in the asmprinter .s comments.
llvm-svn: 94372
2010-01-24 19:23:09 +00:00
Chris Lattner
9cb699ec58
this test has been failing or a long time, just disable it for now to get
...
back to green.
llvm-svn: 94371
2010-01-24 19:13:39 +00:00
Chris Lattner
5d31547fec
fix a parsing problem on instructions like:
...
movw $8, (_cost_table_-L97$pb)+66(%eax)
After the parens, we could still have a binop.
llvm-svn: 94345
2010-01-24 01:07:33 +00:00
Mon P Wang
d4d1cbb72b
It seems better to scalarize vectors of size 1 instead of widening them.
...
Add support to widen SETCC.
llvm-svn: 94342
2010-01-24 00:24:43 +00:00
Chris Lattner
91fafbd4e8
change the canonical form of "cond ? -1 : 0" to be
...
"sext cond" instead of a select. This simplifies some instcombine
code, matches the policy for zext (cond ? 1 : 0 -> zext), and allows
us to generate better code for a testcase on ppc.
llvm-svn: 94339
2010-01-24 00:09:49 +00:00
Mon P Wang
871ea08e40
Improved widening loads by adding support for wider loads if
...
the alignment allows. Fixed a bug where we didn't use a
vector load/store for PR5626.
llvm-svn: 94338
2010-01-24 00:05:03 +00:00
Nick Lewycky
f9a681fb61
Speculatively revert r94322 to see if it fixes darwin selfhost buildbot.
...
llvm-svn: 94331
2010-01-23 20:32:12 +00:00
Chris Lattner
b444bc0234
third bug from PR6119: the xor dupe extension allows
...
for arbitrary terminators in predecessors, don't assume
it is a conditional or uncond branch. The testcase shows
an example where they can happen with switches.
llvm-svn: 94323
2010-01-23 19:21:31 +00:00
Nick Lewycky
8bbb754c7c
Teach DAE that even though it can't modify the function signature of an
...
externally visible function, it can still find all callers of it and replace
the parameters to a dead argument with undef.
llvm-svn: 94322
2010-01-23 19:19:34 +00:00
Chris Lattner
7130788ea2
add an early out to ProcessBranchOnXOR to speed it up,
...
handle the case when we can infer an input to the xor
from all inputs that agree, instead of going into an
infinite loop. Another part of PR6199
llvm-svn: 94321
2010-01-23 19:16:25 +00:00
Chris Lattner
e4391a1adb
fix a crash in jump threading, PR6119
...
llvm-svn: 94319
2010-01-23 18:56:07 +00:00
Chris Lattner
8909d5aca5
implement a simple instcombine xform that has been in the
...
readme forever.
llvm-svn: 94318
2010-01-23 18:49:30 +00:00
Chris Lattner
1b7c00a4f2
Change constantexpr global variable initializers to convert the constants
...
to MCExpr then emit them through MCStreamer with EmitValue. I think all
global variable initializers are now going through mcstreamer.
llvm-svn: 94293
2010-01-23 06:17:14 +00:00
Eric Christopher
e6d6bfcc32
Don't lower splat vector load to relative to the esp if the
...
stack may be misaligned.
Update test accordingly.
Patch by Evan Cheng!
llvm-svn: 94291
2010-01-23 06:02:43 +00:00
Chris Lattner
e5e7b41090
stop testing for invalid output.
...
llvm-svn: 94288
2010-01-23 05:45:28 +00:00
Chris Lattner
20a336f1df
emit .ascii and .asciz through MCStreamer.
...
llvm-svn: 94282
2010-01-23 04:54:10 +00:00
Mon P Wang
b7fce13b78
InstCombine should not fold sext/zext of a vector and a bitcast to a scalar to a sext/zext
...
llvm-svn: 94280
2010-01-23 04:35:57 +00:00
Chris Lattner
4515320f9f
remove this test.
...
llvm-svn: 94276
2010-01-23 03:11:10 +00:00
Evan Cheng
9523142c01
Fix test.
...
llvm-svn: 94272
2010-01-23 01:21:27 +00:00
Evan Cheng
3bd9efa510
Fix tests.
...
llvm-svn: 94271
2010-01-23 01:19:28 +00:00
Victor Hernandez
7ce9006ba0
In mem2reg, for all alloca/stores that get promoted where the alloca has an associated llvm.dbg.declare instrinsic, insert an llvm.dbg.var intrinsic before each store
...
llvm-svn: 94260
2010-01-23 00:17:34 +00:00
Chris Lattner
e46549ed67
teach MCAsmStreamer::EmitBytes to use .ascii and .asciz
...
llvm-svn: 94259
2010-01-23 00:15:00 +00:00
Daniel Dunbar
5d1a686840
Mark EH_RETURN64 as CodeGenOnly.
...
llvm-svn: 94205
2010-01-22 20:16:37 +00:00
Chris Lattner
5f6aca81b6
make this less constrained, we want blank lines between globals.
...
llvm-svn: 94201
2010-01-22 19:51:08 +00:00
Dan Gohman
525f7d7833
Revert LoopStrengthReduce.cpp to pre-r94061 for now.
...
llvm-svn: 94123
2010-01-22 00:46:49 +00:00
Chris Lattner
75db03497a
testcase for r94095
...
llvm-svn: 94096
2010-01-21 20:01:04 +00:00
Nick Lewycky
938b8b195c
Fix a crasher trying to fold each element in a comparison between two vectors
...
if one of the vectors didn't have elements (such as undef). Fixes PR 6096.
Fix an issue in the constant folder where fcmp (<2 x %ty>, <2 x %ty>) would
have <2 x i1> type if constant folding was successful and i1 type if it wasn't.
This exposed a related issue in the bitcode reader.
llvm-svn: 94069
2010-01-21 07:03:21 +00:00
Dan Gohman
be34c35f32
Re-implement the main strength-reduction portion of LoopStrengthReduction.
...
This new version is much more aggressive about doing "full" reduction in
cases where it reduces register pressure, and also more aggressive about
rewriting induction variables to count down (or up) to zero when doing so
reduces register pressure.
It currently uses fairly simplistic algorithms for finding reuse
opportunities, but it introduces a new framework allows it to combine
multiple strategies at once to form hybrid solutions, instead of doing
all full-reduction or all base+index.
llvm-svn: 94061
2010-01-21 02:09:26 +00:00
Chris Lattner
e4ac42e11e
emit basic block labels with mcstreamer.
...
llvm-svn: 93993
2010-01-20 07:24:05 +00:00
Chris Lattner
d69a9cc334
emit integer and fp zeros as (e.g.) .byte 0 instead of .space 1,
...
for tidiness.
llvm-svn: 93992
2010-01-20 07:19:19 +00:00
Chris Lattner
3104fa4a71
signficant cleanups to EmitGlobalConstant (including streamerization
...
of int initializers), change some methods to be static functions,
use raw_ostream::write_hex instead of a smallstring dance with
APValue::toStringUnsigned(S, 16).
llvm-svn: 93991
2010-01-20 07:11:32 +00:00
Devang Patel
56de8ddd56
If a instruction belongs to another function (and not current function) as per debug info attached with the instruction then ignore the dangling lexical scope of this instruction. Such scopes are unreachable.
...
llvm-svn: 93967
2010-01-20 02:05:23 +00:00
Dan Gohman
34b548b94a
Fold (add x, shl(0 - y, n)) -> sub(x, shl(y, n)), to simplify some code
...
that SCEVExpander can produce when running on behalf of LSR.
llvm-svn: 93949
2010-01-19 23:30:49 +00:00
Dan Gohman
94c0e08951
Make SCEVAddRecExpr's getType return a pointer type when the add
...
has a pointer member. This helps reduce unnecessary bitcasting
and uglygeps.
llvm-svn: 93939
2010-01-19 22:53:50 +00:00
Dan Gohman
190fee462e
Add nounwinds.
...
llvm-svn: 93919
2010-01-19 21:51:51 +00:00
Jakob Stoklund Olesen
e7d4286d73
Remove predicates when changing an add into an unpredicable mov.
...
Since the mov is executed unconditionally, make sure that the add didn't have
any predicate.
llvm-svn: 93909
2010-01-19 21:08:28 +00:00