Commit Graph

45573 Commits

Author SHA1 Message Date
Tobias Grosser 3ac8689fa3 Pass the graph to the DOTGraphTraits.getEdgeAttributes().
This follows the interface of getNodeAttributes.

llvm-svn: 126562
2011-02-27 04:11:03 +00:00
Daniel Dunbar 06dfe8e9c5 Support: Add llvm::AreStatisticsEnabled().
llvm-svn: 126558
2011-02-26 23:17:12 +00:00
Benjamin Kramer 26691d9660 Add some DAGCombines for (adde 0, 0, glue), which are useful to optimize legalized code for large integer arithmetic.
1. Inform users of ADDEs with two 0 operands that it never sets carry
2. Fold other ADDs or ADDCs into the ADDE if possible

It would be neat if we could do the same thing for SETCC+ADD eventually, but we can't do that in target independent code.

llvm-svn: 126557
2011-02-26 22:48:07 +00:00
Jim Grosbach 416c47019c Trailing whitespace.
llvm-svn: 126526
2011-02-25 22:53:20 +00:00
Owen Anderson b2c80da4ae Allow targets to specify a the type of the RHS of a shift parameterized on the type of the LHS.
llvm-svn: 126518
2011-02-25 21:41:48 +00:00
Cameron Zwarich fcf51fd298 Roll out r126425 and r126450 to see if it fixes the failures on the buildbots.
llvm-svn: 126488
2011-02-25 16:30:32 +00:00
Benjamin Kramer ceb5daa567 Revert "SimplifyCFG: GEPs with just one non-constant index are also cheap."
Yes, there are other types than i8* and GEPs on them can produce an add+multiply.
We don't consider that cheap enough to be speculatively executed.

llvm-svn: 126481
2011-02-25 10:33:33 +00:00
Bob Wilson e3ecd5fb9b Add patterns to use post-increment addressing for Neon VST1-lane instructions.
llvm-svn: 126477
2011-02-25 06:42:42 +00:00
Jim Grosbach 14a07365cb Fix formatting of debug helper string.
llvm-svn: 126471
2011-02-25 03:59:03 +00:00
Evan Cheng a921dc5860 Fix typo.
llvm-svn: 126467
2011-02-25 01:29:29 +00:00
Cameron Zwarich 4c82cd21ed Set NumSignBits to 1 if KnownZero/KnownOne are being zero extended. In theory it
is possible to do better if the high bit is set in either KnownZero/KnownOne, but
in practice NumSignBits is always 1 when we are zero extending because nothing
is known about that register.

llvm-svn: 126465
2011-02-25 01:11:01 +00:00
Cameron Zwarich d2f3041c7f We only want to zero extend the existing information if the bit width is
actually larger.

llvm-svn: 126464
2011-02-25 01:10:55 +00:00
Jakob Stoklund Olesen 9918b33451 Try harder to get the hint by preferring to evict hint interference.
llvm-svn: 126463
2011-02-25 01:04:22 +00:00
Evan Cheng 70d29634a9 Each prologue may have multiple vpush instructions to store callee-saved
D registers since the vpush list may not have gaps. Make sure the stack
adjustment instruction isn't moved between them. Ditto for vpop in
epilogues.

Sorry, can't reduce a small test case.
rdar://9043312

llvm-svn: 126457
2011-02-25 00:24:46 +00:00
Benjamin Kramer dfdca1a14d SimplifyCFG: GEPs with just one non-constant index are also cheap.
llvm-svn: 126452
2011-02-24 23:26:09 +00:00
Jakob Stoklund Olesen e68a27eecd Tweak the register allocator priority queue some more.
New live ranges are assigned in long -> short order, but live ranges that have
been evicted at least once are deferred and assigned in short -> long order.

Also disable splitting and spilling for live ranges seen for the first time.

The intention is to create a realistic interference pattern from the heavy live
ranges before starting splitting and spilling around it.

llvm-svn: 126451
2011-02-24 23:21:36 +00:00
Nick Lewycky 1db7b187cb Remove dead variable.
llvm-svn: 126450
2011-02-24 23:15:43 +00:00
Benjamin Kramer 27361a7124 SimplifyCFG: GEPs with constant indices are cheap enough to be executed unconditionally.
llvm-svn: 126445
2011-02-24 22:46:11 +00:00
Joerg Sonnenberger afb36fad99 Restore r125595 (reverted in r126336) with modifications:
Introduce a variable in the AsmParserExtension whether [] is valid in an
expression. If it is true, parse them like (). Enable this for ELF only.

llvm-svn: 126443
2011-02-24 21:59:22 +00:00
Chris Lattner 0152b7bc7c remove command line option debugging hook.
llvm-svn: 126441
2011-02-24 21:53:03 +00:00
Devang Patel b037383a35 Enable DebugInfo support for COFF object files.
Patch by Nathan Jeffords!

llvm-svn: 126425
2011-02-24 21:04:00 +00:00
Nadav Rotem 502f1b943f Enable support for vector sext and trunc:
Limit the folding of any_ext and sext  into the load operation to scalars.
Limit the active-bits trunc optimization to scalars.
Document vector trunc and vector sext in LangRef.

Similar to commit 126080 (for enabling zext).

llvm-svn: 126424
2011-02-24 21:01:34 +00:00
Rafael Espindola 601a11edd4 Fix llvm-gcc bootstrap with gnu ld.
The problem was codegen guessing the wrong values and printing

	.section	.eh_frame,"aMS",@progbits,4

It is not clear at all if Codegen should try to guess, MC is the
one that should know the default flags.

llvm-svn: 126421
2011-02-24 20:18:01 +00:00
Devang Patel cedf928743 Do not use DIFactory. Use DIBuilder.
llvm-svn: 126398
2011-02-24 18:49:55 +00:00
Devang Patel a5d93247c2 Do not use DIFactory.
llvm-svn: 126397
2011-02-24 18:49:30 +00:00
Richard Osborne 42f52e737e Add XCore intrinsic for eeu instruction.
llvm-svn: 126384
2011-02-24 13:39:18 +00:00
Benjamin Kramer c053644217 Plug some leaks in edis.
- Don't leak parsed operands during tokenization.
- Don't leak printed insts in llvm-mc.

llvm-svn: 126381
2011-02-24 11:03:19 +00:00
Cameron Zwarich a62fc89a04 Merge information about the number of zero, one, and sign bits of live-out
registers at phis. This enables us to eliminate a lot of pointless zexts during
the DAGCombine phase. This fixes <rdar://problem/8760114>.

llvm-svn: 126380
2011-02-24 10:00:25 +00:00
Cameron Zwarich 3cf9280214 Add a getNumSignBits() method to APInt.
llvm-svn: 126379
2011-02-24 10:00:20 +00:00
Cameron Zwarich 97eb52da7b Add a mechanism for invalidating the LiveOutInfo of a PHI, and use it whenever
a block is visited before all of its predecessors.

llvm-svn: 126378
2011-02-24 10:00:16 +00:00
Cameron Zwarich 988faf91bd Track blocks visited in reverse postorder.
llvm-svn: 126377
2011-02-24 10:00:13 +00:00
Cameron Zwarich 6470647383 Refactor the LiveOutInfo interface into a few methods on FunctionLoweringInfo
and make the actual map private.

llvm-svn: 126376
2011-02-24 10:00:08 +00:00
Cameron Zwarich b670d512e9 Have isel visit blocks in reverse postorder rather than an undefined order. This
allows for the information propagated across basic blocks to be merged at phis.

llvm-svn: 126375
2011-02-24 10:00:04 +00:00
Chris Lattner eddb33ebd0 wire TargetLibraryInfo into simplify libcalls and use it in a couple of
trivial places.  This pass needs a lot of work.

llvm-svn: 126367
2011-02-24 07:16:14 +00:00
Chris Lattner 2e56e20662 move a massive amount of code out into its own helper function
to reduce nesting.  This needs to be turned into a table.

llvm-svn: 126366
2011-02-24 07:12:12 +00:00
Chris Lattner adf38b3e09 change instcombine to not turn a call to non-varargs bitcast of
function prototype into a call to a varargs prototype.  We do
allow the xform if we have a definition, but otherwise we don't
want to risk that we're changing the abi in a subtle way.  On
X86-64, for example, varargs require passing stuff in %al.

llvm-svn: 126363
2011-02-24 05:10:56 +00:00
Evan Cheng 3923466e82 Fix bug in X86 folding / unfolding table. Int_CMPSDrm and Int_CMPSSrm memory
operands starts at index 2, not 1.
rdar://9045024
PR9305

llvm-svn: 126359
2011-02-24 02:36:52 +00:00
Jakob Stoklund Olesen 2b4ded329d Use the same spill slot for all live ranges that descend form the same original
register.

This avoids some silly stack slot shuffling when both sides of a copy get
spilled.

llvm-svn: 126353
2011-02-24 01:07:55 +00:00
Devang Patel 7b0f796c55 Use DW_FORM_data2 for DW_AT_language and let users use DW_LANG_lo_user=0x8000 to DW_LANG_hi_user=0xffff range.
llvm-svn: 126339
2011-02-23 22:37:04 +00:00
Jim Grosbach 0c03a3a146 Revert r125595, which is an X86-only undocumented assembly syntax extension
enabled for all targets. Non-X86 targets should not have this behavior
enabled by default.

Joerg, if you would like to resubmit with the behavior conditionalized to be
X86-ELF only, that's fine.

llvm-svn: 126336
2011-02-23 21:26:51 +00:00
Rafael Espindola 9e18e96264 Put in the symbol table symbols only used in a .globl statement.
Fixes PR9292.

llvm-svn: 126330
2011-02-23 20:22:07 +00:00
Richard Osborne bfa5cc0e08 Add XCore intrinsic for clre instruction.
llvm-svn: 126322
2011-02-23 18:52:05 +00:00
Richard Osborne 4995b05f56 Add llvm.xcore.waitevent intrinsic. The effect of this intrinsic is to enable
events on the thread and wait until a resource is ready to event. The vector
of the resource that is ready is returned.

llvm-svn: 126320
2011-02-23 18:35:59 +00:00
Jakob Stoklund Olesen ed172998a6 It is safe to ignore LastSplitPoint when the variable is not live out.
No code will be inserted after the split point anyway.

llvm-svn: 126319
2011-02-23 18:26:31 +00:00
Richard Osborne 2c610aa3ed Add XCore intrinsic for the setv instruction.
llvm-svn: 126315
2011-02-23 16:46:37 +00:00
Richard Osborne 12377e0947 Fix format for setc instruction.
llvm-svn: 126314
2011-02-23 15:20:16 +00:00
Richard Osborne aab96995f6 Add XCore intrinsic for settw instruction.
llvm-svn: 126313
2011-02-23 14:45:03 +00:00
Sean Callanan 34770edf43 Fixed a bug in the enhanced disassembler that caused
it to ignore valid uses of FS and GS as additional
base registers in address computations.  Added a test
case for this.

llvm-svn: 126302
2011-02-23 03:31:28 +00:00
Evan Cheng 97e6428014 Change VFPNeonA8 definition to make the code easier to read.
llvm-svn: 126298
2011-02-23 02:35:33 +00:00
Stuart Hastings bf83659d11 Omit private_extern declarations of extern symbols; followup to
r124468.  Patch by Rafael Avila de Espindola!

llvm-svn: 126297
2011-02-23 02:27:05 +00:00