Commit Graph

70140 Commits

Author SHA1 Message Date
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
Rafael Espindola 908d391bd2 LTO uses MC now.
llvm-svn: 126546
2011-02-26 16:44:13 +00:00
Bill Wendling 31ca7efa04 A new TableGen feature! (Not turned on just yet.)
InstAlias<{alias}, {aliasee}>;

The InstAlias instruction should be able to go from the MCInst to the
{alias}. All of the information is there to match the MCInst with the
{aliasee}. From there, it's a simple matter to emit the {alias}, with the
correct operands from the {aliasee}.

The code this patch generates can be used by the InstPrinter to automatically
print out the alias without having to write special C++ code to handle the
situation.

This is a WIP, and therefore are several limitations. For instance, it cannot
handle AsmOperands at the moment. It also doesn't know what to do when two
{alias}es match the same {aliasee}. (Currently, it just ignores those two cases
and allows the printInstruction method to handle them.)

llvm-svn: 126538
2011-02-26 03:09:12 +00:00
Bob Wilson d2e7b05d8a Removed unnecessary dylibs from Apple builds, with or without "lib" prefix.
Radar 9056686

llvm-svn: 126534
2011-02-26 00:22:17 +00:00
Bob Wilson 15c6f99b02 Add a new "Embedded" makefile target for Apple-style builds.
This one just installs the default build into a different destination directory.

llvm-svn: 126533
2011-02-25 23:42:03 +00:00
Jim Grosbach 416c47019c Trailing whitespace.
llvm-svn: 126526
2011-02-25 22:53:20 +00:00
Stuart Hastings e6f5613bcc Fix bad comment marker.
llvm-svn: 126525
2011-02-25 22:47:58 +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
David Greene c136bc69ce Add some options for building LLVM in different environments:
--force-configure to force running configure before building.

--extra-llvm-config-flags
--extra-llvm-gcc-config-flags
--extra-gcc-config-flags

Pass additional argument to the various configure invocations.

This also eliminates a default build flavor because explicitly
specifying builds could result in build flavors being run repeatedly.

Finally, turn off fortran builds for the moment because install
appears to be broken.

llvm-svn: 126510
2011-02-25 20:51:27 +00:00
Stuart Hastings e167360a45 Omit lto.h from the llvmCore result; henceforth, this will be supplied
by clang.  Radar 9042056.

llvm-svn: 126507
2011-02-25 20:42:39 +00:00
Chris Lattner 78178749e9 split this test into arch specific pieces, so the ARM
test isn't run when the arm backend isn't built.  This
fixes PR9327

llvm-svn: 126500
2011-02-25 19:06:35 +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
Nick Lewycky aa06169f7c Update the NoFolder to work with current IRBuilder.
llvm-svn: 126479
2011-02-25 07:13:35 +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
Argyrios Kyrtzidis 28785b6be3 In utils/TableGen/ClangSACheckersEmitter.cpp, set the 'Hidden' bit for checkers.
llvm-svn: 126436
2011-02-24 21:33:49 +00:00
Rafael Espindola fac373cacb Switch LTO to use MC. This takes the linking of libxul.so from about 7m to
6m30.

llvm-svn: 126426
2011-02-24 21:04:06 +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 1a2fdce30a Remove obsolete tests.
llvm-svn: 126402
2011-02-24 19:09:52 +00:00
Devang Patel b52040da17 Move arch specific tests in arch specific directories.
llvm-svn: 126401
2011-02-24 19:06:27 +00:00
Chris Lattner 7c3230d348 fit in 80 cols.
llvm-svn: 126399
2011-02-24 18:59:38 +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
NAKAMURA Takumi cb1b5ff9c6 test/lit.cfg: Add PATHEXT to 'substitution', to recognize tools on Windows hosts. Thanks to Danil Malyshev!
Some tests on Windows use the "not" utility and fail with an error "program not executable". The reason for this error is that the name of the executable file sended to the "not" without the extension.

llvm-svn: 126383
2011-02-24 12:34:34 +00:00
Duncan Sands 47481b9754 Rewrite the vector part of getExtendedTypeAction to make it more
understandable (at least I find it easier to understand like this).
No intended functionality change.

llvm-svn: 126382
2011-02-24 11:54: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