Commit Graph

41375 Commits

Author SHA1 Message Date
Daniel Dunbar e5444a88cd 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.

llvm-svn: 113552
2010-09-09 22:42:59 +00:00
Daniel Dunbar 43325c4a68 llvm-mc: Make sure we exit != 0 if any errors are encountered.
llvm-svn: 113551
2010-09-09 22:42:56 +00:00
Eric Christopher 4bd7047324 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.

llvm-svn: 113546
2010-09-09 21:44:45 +00:00
Dan Gohman f942e96ed5 MDNodes are not Constants.
llvm-svn: 113539
2010-09-09 20:54:24 +00:00
Dan Gohman 0a54da2fce Print invalid metadata references as <badref>, for consistency with
regular value references.

llvm-svn: 113538
2010-09-09 20:53:58 +00:00
Eric Christopher 2cbe0fd956 New "move to fp reg" routine. Use it.
llvm-svn: 113537
2010-09-09 20:49:25 +00:00
Eric Christopher 82b05d7206 "Strike that, reverse it." -- Mr. Wonka.
Truncate when truncating, extend when extending.

llvm-svn: 113536
2010-09-09 20:36:19 +00:00
Owen Anderson 04cf3fd761 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.

llvm-svn: 113535
2010-09-09 20:32:23 +00:00
Eric Christopher 5903c0be2a Add FPTrunc, fix some bugs where I forgot to update the value map.
llvm-svn: 113533
2010-09-09 20:26:31 +00:00
Owen Anderson 6270515918 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.

llvm-svn: 113528
2010-09-09 20:02:23 +00:00
Owen Anderson 11ab204fdc r113526 introduced an unintended change to the loop unrolling threshold. Revert it.
llvm-svn: 113527
2010-09-09 19:11:57 +00:00
Owen Anderson b61b1647e2 Fix typo in code to cap the loop code size reduction calculation.
llvm-svn: 113526
2010-09-09 19:08:59 +00:00
Owen Anderson 62ea1b718c 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.

llvm-svn: 113525
2010-09-09 19:07:31 +00:00
Eric Christopher 6e3eeba4d9 Basic FP->Int, Int->FP conversions.
llvm-svn: 113523
2010-09-09 18:54:59 +00:00
Bruno Cardoso Lopes e8501a468c Add one more pattern to fallback movddup
llvm-svn: 113522
2010-09-09 18:48:34 +00:00
Dan Gohman 1c5be00ec7 Extend the getDependence query with support for PHI translation.
llvm-svn: 113521
2010-09-09 18:37:31 +00:00
Evan Cheng 367a5df8cf 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.

llvm-svn: 113513
2010-09-09 18:18:55 +00:00
Benjamin Kramer 6c3c349b2b MCELF: Write relocation fragments in the right endian.
- This code is gross, but does the job for now.

llvm-svn: 113509
2010-09-09 18:01:29 +00:00
Roman Divacky 3b727f55aa Make ELF OS ABI dependent on the OS from target triple.
llvm-svn: 113508
2010-09-09 17:57:50 +00:00
Dale Johannesen 0ec303b97b Move remaining MMX instructions from SSE to MMX.
llvm-svn: 113501
2010-09-09 17:13:07 +00:00
Owen Anderson a08318acb2 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.

llvm-svn: 113499
2010-09-09 16:56:42 +00:00
Daniel Dunbar a90e25cc64 MC: Give a (lame) hard error if a .org directive would create an unreasonably
large object file (> 1GB).

llvm-svn: 113494
2010-09-09 16:23:33 +00:00
NAKAMURA Takumi 19e11f1db7 lib/System/Host.cpp: 7bit-ize. Eliminate "TM" and "(R)" in comments.
llvm-svn: 113486
2010-09-09 13:30:48 +00:00
Kalle Raiskila 01cda2d35a Silence compiler warning.
llvm-svn: 113478
2010-09-09 07:30:15 +00:00
Bob Wilson 4adbaf1843 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.

llvm-svn: 113473
2010-09-09 05:40:26 +00:00
Eric Christopher 2ff757d422 Nuke whitespace and fix some indenting.
llvm-svn: 113463
2010-09-09 01:06:51 +00:00
Dale Johannesen 5f4a6f295c 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.

llvm-svn: 113462
2010-09-09 01:02:39 +00:00
Eric Christopher bd3d121641 Handle 64-bit floating point binops as well.
llvm-svn: 113461
2010-09-09 01:02:03 +00:00
Eric Christopher 24dc27f73a Basic 32-bit FP operations.
llvm-svn: 113459
2010-09-09 00:53:57 +00:00
Bob Wilson 84971c850a 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.

llvm-svn: 113456
2010-09-09 00:38:32 +00:00
Eric Christopher f14b9bf98d Handle float->double extension.
llvm-svn: 113455
2010-09-09 00:26:48 +00:00
Eric Christopher 3cf63f1edd 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.

llvm-svn: 113453
2010-09-09 00:19:41 +00:00
Bob Wilson 4ccd5ce6ea 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.

llvm-svn: 113452
2010-09-09 00:15:32 +00:00
Bob Wilson 359f8ba337 Clean up a comment.
llvm-svn: 113442
2010-09-08 23:39:54 +00:00
Eric Christopher c3e9c404aa Very basic compare support.
llvm-svn: 113440
2010-09-08 23:13:45 +00:00
Owen Anderson 8084dbaf8e 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.

llvm-svn: 113439
2010-09-08 23:10:07 +00:00
Eric Christopher 5838af54bf Delete dead code.
llvm-svn: 113436
2010-09-08 22:58:35 +00:00
Evan Cheng 722cd122dc Fix LDM_RET schedule itinery.
llvm-svn: 113435
2010-09-08 22:57:08 +00:00
Chris Lattner 28a9c2f89a fix rdar://8407548, I missed the commuted form of xchg/test without a suffix.
llvm-svn: 113427
2010-09-08 22:27:05 +00:00
Chris Lattner d7aba234c2 fix wonky formatting.
llvm-svn: 113426
2010-09-08 22:22:10 +00:00
Owen Anderson 3fe002dfb5 Generalize instcombine's support for combining multiple bit checks into a single test. Patch by Dirk Steinke!
llvm-svn: 113423
2010-09-08 22:16:17 +00:00
Chris Lattner 8ead237758 fix bugs in push/pop segment support, rdar://8407242
llvm-svn: 113422
2010-09-08 22:13:08 +00:00
Dale Johannesen 0d2e6ad504 Add intrinsic-based patterns for MMX PINSRW and PEXTRW.
llvm-svn: 113420
2010-09-08 22:08:40 +00:00
Eric Christopher 6489df7c8c Make the loads/stores match the type we really want to store.
llvm-svn: 113417
2010-09-08 21:49:50 +00:00
Dale Johannesen e54dba94f9 Check in forgotten file. Should fix build.
llvm-svn: 113409
2010-09-08 21:09:48 +00:00
Dale Johannesen 4dae01781f Slight cleanup, use only one form of MMXI_binop_rm_int.
llvm-svn: 113406
2010-09-08 20:54:00 +00:00
Jim Grosbach 504d23bd05 Re-enable usage of the ARM base pointer. r113394 fixed the known failures.
Re-running some nightly testers w/ it enabled to verify.

llvm-svn: 113399
2010-09-08 20:12:02 +00:00
Jim Grosbach 21c9471706 Fix errant fall-throughs causing the base pointer to be used when the frame
pointer was intended. rdar://8401980

llvm-svn: 113394
2010-09-08 19:55:28 +00:00
Dale Johannesen d79bb127dd Add intrinsic forms of mmx<->sse conversions. Notes:
Omission of memory form of PI2PD is intentional; this
does not use an MMX register and does not put the chip
into MMX mode (PI2PS, oddly enough, does).
Operands of PI2PS follow the gcc builtin, not Intel.

llvm-svn: 113388
2010-09-08 19:15:38 +00:00
Eric Christopher f5dd1929a2 Rewrite TargetMaterializeConstant.
llvm-svn: 113387
2010-09-08 18:56:34 +00:00