Commit Graph

64663 Commits

Author SHA1 Message Date
Daniel Dunbar
1ab6f2fa7a llvm-mc: Don't crash when using -n and we see a directive before the initial section.
- This is annoying, because we have to scatter this check everywhere that could emit real data, but I see no better solution.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113552 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 22:42:59 +00:00
Daniel Dunbar
93bd4d1e6b llvm-mc: Make sure we exit != 0 if any errors are encountered.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113551 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 22:42:56 +00:00
Jakob Stoklund Olesen
61ca48e0da XFAIL test under valgrind. It is not really our problem if sh is leaking.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113550 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 22:02:13 +00:00
Eric Christopher
9ee4ce2f91 SIToFP and FPToSI conversions work only on fp-reg to fp-reg. Move
some data around and implement a couple of move routines to do this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113546 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 21:44:45 +00:00
Dan Gohman
e983438746 MDNodes are not Constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113539 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 20:54:24 +00:00
Dan Gohman
3da076ffef Print invalid metadata references as <badref>, for consistency with
regular value references.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113538 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 20:53:58 +00:00
Eric Christopher
aa3ace10c1 New "move to fp reg" routine. Use it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113537 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 20:49:25 +00:00
Eric Christopher
ef2fdd2141 "Strike that, reverse it." -- Mr. Wonka.
Truncate when truncating, extend when extending.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113536 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 20:36:19 +00:00
Owen Anderson
f9a26b89f8 What the loop unroller cares about, rather than just not unrolling loops with calls, is
not unrolling loops that contain calls that would be better off getting inlined.  This mostly
comes up when an interleaved devirtualization pass has devirtualized a call which the inliner
will inline on a future pass.  Thus, rather than blocking all loops containing calls, add
a metric for "inline candidate calls" and block loops containing those instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113535 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 20:32:23 +00:00
Eric Christopher
ce07b5458d Add FPTrunc, fix some bugs where I forgot to update the value map.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113533 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 20:26:31 +00:00
Owen Anderson
547462b98c Revert r113439, which relaxed the requirement that loops containing calls cannot be unrolled. After some discussion,
there seems to be a better way to achieve the same effect.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113528 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 20:02:23 +00:00
Owen Anderson
cc443c37ee r113526 introduced an unintended change to the loop unrolling threshold. Revert it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113527 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 19:11:57 +00:00
Owen Anderson
20672e48b3 Fix typo in code to cap the loop code size reduction calculation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113526 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 19:08:59 +00:00
Owen Anderson
6add2fbb69 Use code-size reduction metrics to estimate the amount of savings we'll get when we unroll a loop.
Next step is to recalculate the threshold values given this new heuristic.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113525 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 19:07:31 +00:00
Eric Christopher
9a040492f7 Basic FP->Int, Int->FP conversions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113523 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 18:54:59 +00:00
Bruno Cardoso Lopes
ae4f7421c0 Add one more pattern to fallback movddup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113522 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 18:48:34 +00:00
Dan Gohman
c8ddbdabb6 Extend the getDependence query with support for PHI translation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113521 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 18:37:31 +00:00
Dan Gohman
e744541788 Add a getPointerOperand() helper function to VAArgInst, for consistency
with LoadInst and StoreInst.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113520 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 18:32:40 +00:00
Evan Cheng
5f54ce3473 For each instruction itinerary class, specify the number of micro-ops each
instruction in the class would be decoded to. Or zero if the number of
uOPs must be determined dynamically.

This will be used to determine the cost-effectiveness of predicating a
micro-coded instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113513 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 18:18:55 +00:00
Dan Gohman
c48bf0c394 Fix this comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113511 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 18:04:22 +00:00
Benjamin Kramer
5e492e8d42 MCELF: Write relocation fragments in the right endian.
- This code is gross, but does the job for now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113509 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 18:01:29 +00:00
Roman Divacky
5baf79edc0 Make ELF OS ABI dependent on the OS from target triple.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113508 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 17:57:50 +00:00
Daniel Dunbar
9ae4ca611b build: Allow subdir Makefiles to provide an alternate location for the SRCDIR
Makefile, which can be used to allow building out of tree sources.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113503 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 17:38:11 +00:00
Dale Johannesen
f73c5587fa Move remaining MMX instructions from SSE to MMX.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113501 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 17:13:07 +00:00
Owen Anderson
082bf2a977 Refactor code-size reduction estimation methods out of InlineCostAnalyzer and into CodeMetrics. They
don't use any InlineCostAnalyzer state, and are useful for other clients who don't necessarily want to use
all of InlineCostAnalyzer's logic, some of which is fairly inlining-specific.

No intended functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113499 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 16:56:42 +00:00
Daniel Dunbar
a6c329d66b MC: Give a (lame) hard error if a .org directive would create an unreasonably
large object file (> 1GB).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113494 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 16:23:33 +00:00
Daniel Dunbar
874f021bc1 tests: XFAIL a handful of tests on the vg_leak builder, so we can get back to
green.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113491 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 15:50:19 +00:00
Daniel Dunbar
9b8cc2bc56 projects: Don't try to build libcxx if one happens to have it checked out into
llvm/projects.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113490 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 15:49:32 +00:00
Benjamin Kramer
a754be42da Add an elf-dumper utility.
- Output format and some of the code stolen from macho-dump.
- Somewhat incomplete and probably buggy.
- Comes with a very basic test.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113488 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 15:00:41 +00:00
NAKAMURA Takumi
d4d4c7fd0d lib/System/Host.cpp: 7bit-ize. Eliminate "TM" and "(R)" in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113486 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 13:30:48 +00:00
Duncan Sands
7aed4ec957 Get rid of the last use of -m64 in FrontendC. This solution
of checking for either 4 or 8 is not very satisfactory, but
it would catch the original problem (an alignment of 1).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113485 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 12:57:29 +00:00
Duncan Sands
974d5a0053 Another test that uses -m64. Here too it looks like it can be
removed.  Not that the XTARGET wasn't doing anything since it
does nothing without an accompanying XFAIL.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113484 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 12:48:04 +00:00
Duncan Sands
3dbbb3d398 On i386, llvm-gcc cannot be assumed to support -m64. Since these
tests pass here (i686-linux and x86-64-linux) without -m64, simply
remove the -m64.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113483 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 12:43:44 +00:00
Duncan Sands
ca64b6ad0e This script is executable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113479 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 09:37:54 +00:00
Kalle Raiskila
bb7d33a253 Silence compiler warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113478 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 07:30:15 +00:00
Bob Wilson
0f1e9457a5 Fix NEON VLD pseudo instruction itineraries that were incorrectly copied from
the VST pseudos.  The VLD/VST scheduling still needs work (see pr6722), but
at least we shouldn't confuse the loads with the stores.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113473 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 05:40:26 +00:00
Eric Christopher
ac1a19e18a Nuke whitespace and fix some indenting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113463 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 01:06:51 +00:00
Dale Johannesen
4efb0feac8 Move most MMX instructions (defined as anything that
uses MMX, even if it also uses other things) from InstrSSE
into InstrMMX.  No (intended) functional change.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113462 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 01:02:39 +00:00
Eric Christopher
bd6bf0848e Handle 64-bit floating point binops as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113461 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 01:02:03 +00:00
Eric Christopher
bc39b829f2 Basic 32-bit FP operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113459 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 00:53:57 +00:00
Bob Wilson
19d644d5a9 For double-spaced VLD3/VLD4 instructions, copy the explicit super-register use
operand from the pseudo instruction to the new instruction as an implicit use.
This will preserve any other flags (e.g., kill) on the operand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113456 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 00:38:32 +00:00
Eric Christopher
4620360842 Handle float->double extension.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113455 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 00:26:48 +00:00
Eric Christopher
9ed58dff86 Rewrite TargetMaterializeConstant splitting it out into two functions
for integer and fp constants. Implement todo to use vfp3 instructions
to materialize easy constants if we can.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113453 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 00:19:41 +00:00
Bob Wilson
63569c99ec Simplify copying over operands from pseudo NEON load/store instructions.
For VLD3/VLD4 with double-spaced registers, add the implicit use of the
super register for both the instruction loading the even registers and the
instruction loading the odd registers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113452 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 00:15:32 +00:00
Jakob Stoklund Olesen
6c4329ec96 Rearrange for better alignment and less padding
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113445 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 23:54:00 +00:00
Bob Wilson
656edcf138 Clean up a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113442 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 23:39:54 +00:00
Eric Christopher
d43393ae34 Very basic compare support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113440 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 23:13:45 +00:00
Owen Anderson
4975447d94 Relax the "don't unroll loops containing calls" rule. Instead, when a loop contains a call, lower the
unrolling threshold to the optimize-for-size threshold.  Basically, for loops containing calls, unrolling
can still be profitable as long as the loop is REALLY small.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113439 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 23:10:07 +00:00
Eric Christopher
a88d8577e6 Delete dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113436 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 22:58:35 +00:00
Evan Cheng
7602acbf3b Fix LDM_RET schedule itinery.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113435 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 22:57:08 +00:00