Commit Graph

41924 Commits

Author SHA1 Message Date
Rafael Espindola f70b4e0c2e Implement a very basic PIC case.
llvm-svn: 115454
2010-10-03 00:46:57 +00:00
Bill Wendling 3c70417883 Cleanup. Get rid of extraneous variable.
llvm-svn: 115453
2010-10-03 00:46:06 +00:00
Chris Lattner ae1a9de083 stub out a header to put 3dNow! instructions into.
llvm-svn: 115429
2010-10-02 23:06:23 +00:00
Chris Lattner 4756bbeba0 fix a regression introduced in r115243, in which the instruction
backing int_x86_ssse3_pshuf_w got removed.  This caused PR8280.

llvm-svn: 115422
2010-10-02 21:32:15 +00:00
Jakob Stoklund Olesen 4088ceaf28 Stop using LiveRange in MachineVerifier.
llvm-svn: 115408
2010-10-02 05:24:46 +00:00
Bob Wilson c57c220d20 Fix a miscompile in 186.crafty for Thumb2 that was exposed by Evan's
scheduling change in svn 115121.  The CriticalAntiDepBreaker had bad
liveness information.  It was calculating the KillIndices for one scheduling
region in a basic block, rescheduling that region so the KillIndices were
no longer valid, and then using those wrong KillIndices to make decisions
for the next scheduling region.  I've not been able to reduce a small
testcase for this.  Radar 8502534.

llvm-svn: 115400
2010-10-02 01:49:29 +00:00
Nick Lewycky 306084e9b7 Wind these directories back too. File adds and removes are properly represented
in patches. :-(

llvm-svn: 115396
2010-10-02 01:16:59 +00:00
Nick Lewycky 0aee161c69 Continue reverting r115363.
llvm-svn: 115395
2010-10-02 01:08:17 +00:00
Nick Lewycky c18b735552 Revert patches r115363 r115367 r115391 due to build breakage:
llvm[2]: Updated LibDeps.txt because dependencies changed
llvm[2]: Checking for cyclic dependencies between LLVM libraries.
find-cycles.pl: Circular dependency between *.a files:
find-cycles.pl:   libLLVMMSP430AsmPrinter.a libLLVMMSP430CodeGen.a

llvm-svn: 115393
2010-10-02 01:06:42 +00:00
Jim Grosbach aaf9c32d9f Update CMake files for recent AsmPrinter->InstPrinter changes. Can someone who
is more familiar with CMake please review?

llvm-svn: 115391
2010-10-02 00:39:56 +00:00
Eric Christopher 7787f79f21 Start on lowering global addresses.
llvm-svn: 115390
2010-10-02 00:32:44 +00:00
Kevin Enderby a8d176866d This adds a Darwin x86_64 relocation encoding for a subtraction expression
where both symbols are "local", that is non-external symbols, and there is
no "base" for the symbols used in the expression, that is the section has
no non-temporary symbols.  This case looks like this:

% cat local_reloc_A-B.s
	.long 0
LB:	.long 1
	.long LA - LB - 4
	.long 2
LA:	.long 3

which llvm-mc will not encode without this patch, generates a "unsupported
local relocations in difference" error, but the Darwin assembler will
encode with relocation entries like this:

% otool -rv a.out l.out 
a.out:
Relocation information (__TEXT,__text) 2 entries
address  pcrel length extern type    scattered symbolnum/value
00000008 False long   False  SUB     False     1 (__TEXT,__text)
00000008 False long   False  UNSIGND False     1 (__TEXT,__text)

which is very similar to what is encoded when the symbols don't have the
leading 'L' and they are not temporary symbols.  Which llvm-mc and the
Darwin assembler will encoded like this:

Relocation information (__TEXT,__text) 2 entries
address  pcrel length extern type    scattered symbolnum/value
00000008 False long   True   SUB     False     B
00000008 False long   True   UNSIGND False     A

This is the missing relocation encoding needed to allow the Mach-O x86
Dwarf file and line table to be emitted.  So this patch also removes the
TODO from the if() statement in MCMachOStreamer::Finish() that didn't 
call MCDwarfFileTable::Emit() for 64-bit targets.

llvm-svn: 115389
2010-10-02 00:13:41 +00:00
Jakob Stoklund Olesen bfea05afd6 Drop the use of LiveInterval::iterator and the LiveRange class in
RemoveCopyByCommutingDef.

llvm-svn: 115386
2010-10-01 23:52:27 +00:00
Jakob Stoklund Olesen 28792c4a3d When RemoveCopyByCommutingDef is creating additional identity copies, just use
LiveInterval::MergeValueNumberInto instead of trying to extend LiveRanges and
getting it wrong.

This fixed PR8249 where a valno with a multi-segment live range was defined by
an identity copy created by RemoveCopyByCommutingDef. Some of the live
segments disappeared.

llvm-svn: 115385
2010-10-01 23:52:25 +00:00
Jakob Stoklund Olesen 8fd5b3c071 Pretty up the debug output during RemoveCopyByCommutingDef.
llvm-svn: 115384
2010-10-01 23:52:22 +00:00
Devang Patel e1c714647c Add support to let FE mark explict methods as explict in debug info.
llvm-svn: 115378
2010-10-01 23:31:40 +00:00
Jim Grosbach 0091535361 Nuke trailing whitespace.
llvm-svn: 115377
2010-10-01 23:29:12 +00:00
Jim Grosbach ff1751c0a6 PrintSpecial() can go away now.
llvm-svn: 115376
2010-10-01 23:27:48 +00:00
Eric Christopher 83a5ec8fe0 Stub out constant GV handling, fixes C++ eh tests.
llvm-svn: 115375
2010-10-01 23:24:42 +00:00
Jim Grosbach fae8305e2b Nuke the rest of the :comment references
llvm-svn: 115373
2010-10-01 23:21:38 +00:00
Jim Grosbach c13194254b Nuke a bunch of no-longer-needed comment-only asm strings.
llvm-svn: 115370
2010-10-01 23:09:33 +00:00
Jim Grosbach 111c550dea Now that the asmprinter itself isn't in the subdir, rename 'AsmPrinter' to
'InstPrinter' to fall into line with the other MC-ized assembly printer
using targets.

llvm-svn: 115367
2010-10-01 22:57:18 +00:00
Evan Cheng a317815463 Fix r115332: correctly model AGU / NEON mux.
llvm-svn: 115365
2010-10-01 22:52:29 +00:00
Owen Anderson f31f33ea89 Thread the determination of branch prediction hit rates back through the if-conversion heuristic APIs. For now,
stick with a constant estimate of 90% (branch predictors are good!), but we might find that we want to provide
more nuanced estimates in the future.

llvm-svn: 115364
2010-10-01 22:45:50 +00:00
Jim Grosbach 517abb44a2 Move the asmprinter and MC lowering out of the AsmPrinter (soon to be
InstPrinter) subdir

llvm-svn: 115363
2010-10-01 22:45:38 +00:00
Jim Grosbach 0e854f3d43 Rename the AsmPrinter directory to InstPrinter for those targets that have
been MC-ized for assembly printing. MSP430 is mostly so, but still has the
asm printer and lowering code in the printer subdir for the moment.

llvm-svn: 115360
2010-10-01 22:39:28 +00:00
Evan Cheng 1969887fc6 Fix scheduling infor for vmovn and vshrn which I broke accidentially.
llvm-svn: 115354
2010-10-01 21:48:06 +00:00
Evan Cheng f3179567de Add operand cycles for vldr / vstr.
llvm-svn: 115353
2010-10-01 21:40:30 +00:00
Eric Christopher 9d0136274b Direct calls only for arm fast isel for now.
llvm-svn: 115350
2010-10-01 21:33:12 +00:00
Evan Cheng 2a5d764858 NEON scheduling info fix. vmov reg, reg are single cycle instructions.
llvm-svn: 115344
2010-10-01 20:50:58 +00:00
Eric Christopher 6080da7a79 Fix thinko on store instructions. Fixes test_indvars failure.
llvm-svn: 115342
2010-10-01 20:46:04 +00:00
Owen Anderson 2ecba4a07e Make the spelling of the flags for old-style if-conversion heuristics consistent between ARM and Thumb2.
llvm-svn: 115341
2010-10-01 20:33:47 +00:00
Owen Anderson 671d57865e Provide an option to restore old-style if-conversion heuristics for Thumb2.
llvm-svn: 115339
2010-10-01 20:28:06 +00:00
Owen Anderson 13a642da0b Now that the profitable bits of EnableFullLoadPRE have been enabled by default, rip out the remainder.
Anyone interested in more general PRE would be better served by implementing it separately, to get real
anticipation calculation, etc.

llvm-svn: 115337
2010-10-01 20:02:55 +00:00
Evan Cheng 89e6f6759f Per Cortex-A9 pipeline diagram. AGU (core load / store issue) and NEON/FP issue are multiplexed. Model it correctly.
llvm-svn: 115332
2010-10-01 19:41:46 +00:00
Devang Patel d3fe5fa5d1 Fix code gen crash reported in PR 8235. We still lose debug info for the unused argument here. This is a known limitation recorded debuginfo-tests/trunk/dbg-declare2.ll function 'f6' test case.
llvm-svn: 115323
2010-10-01 19:00:44 +00:00
Jim Grosbach 05ed521a88 grammar
llvm-svn: 115314
2010-10-01 14:57:48 +00:00
Benjamin Kramer 14e909a942 Delete token *after* reading from it.
llvm-svn: 115311
2010-10-01 12:25:27 +00:00
Gabor Greif 47a3b8c30b typo
llvm-svn: 115310
2010-10-01 10:32:19 +00:00
Kalle Raiskila 56f7cd255b Zap some redundant 'ori $?, $?, 0' from SPU.
Also remove some code that died in the process.
One now non-existant ori is checked for.

llvm-svn: 115306
2010-10-01 09:20:01 +00:00
Eric Christopher 3ad2f3a2f2 Fix the other half of the alignment changing issue by making sure that the
memcpy alignment is the minimum of the incoming alignments.

Fixes PR 8266.

llvm-svn: 115305
2010-10-01 09:02:05 +00:00
Chris Lattner f08bfdc29f fix typo
llvm-svn: 115300
2010-10-01 06:54:02 +00:00
Chris Lattner c663a67384 fix PR8267 - Instcombine shouldn't optimizer away volatile memcpy's.
llvm-svn: 115296
2010-10-01 05:51:02 +00:00
Chris Lattner a205055857 fix rdar://8494845 + PR8244 - a miscompile exposed by my patch in r101350
llvm-svn: 115294
2010-10-01 05:36:09 +00:00
Dale Johannesen dec83c3fd9 Attempt to outwit overly smart compiler.
llvm-svn: 115251
2010-10-01 00:21:24 +00:00
Eric Christopher c1e209d40e Implement double return values in calls. Fixes
SingleSource/Regression/C/casts.c.

llvm-svn: 115246
2010-10-01 00:00:11 +00:00
Dale Johannesen dd224d2333 Massive rewrite of MMX:
The x86_mmx type is used for MMX intrinsics, parameters and
return values where these use MMX registers, and is also
supported in load, store, and bitcast.

Only the above operations generate MMX instructions, and optimizations
do not operate on or produce MMX intrinsics. 

MMX-sized vectors <2 x i32> etc. are lowered to XMM or split into
smaller pieces.  Optimizations may occur on these forms and the
result casted back to x86_mmx, provided the result feeds into a
previous existing x86_mmx operation.

The point of all this is prevent optimizations from introducing
MMX operations, which is unsafe due to the EMMS problem.

llvm-svn: 115243
2010-09-30 23:57:10 +00:00
Daniel Dunbar 31158b583a Add an explicit initialization to work around what appears to be a valgrind
false positive, at least on Darwin. I haven't filed this, but you can feel free.

llvm-svn: 115242
2010-09-30 23:56:49 +00:00
Owen Anderson b9b63ee031 Temporarily add a flag to make it easier to compare the new-style ARM if
conversion heuristics to the old-style ones.

llvm-svn: 115239
2010-09-30 23:48:38 +00:00
Jim Grosbach c6e13f7383 Clean up asm writer usage for x86 and msp430 to flag that the writer should
use MC instructions in the printInstruction() method via the tablegen flag
for it rather than a #define prior to including the autogenerated bits.

llvm-svn: 115238
2010-09-30 23:40:25 +00:00