David Greene [Fri, 15 Jan 2010 23:23:41 +0000 (23:23 +0000)]
Fix PR6019. A load has more than one use if it feeds a bitconvert that
has more than one use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93576
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 15 Jan 2010 23:18:17 +0000 (23:18 +0000)]
add a AsmPrinter::GetGlobalValueSymbol and GetExternalSymbolSymbol
helper method, use it to simplify some code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93575
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 15 Jan 2010 22:59:46 +0000 (22:59 +0000)]
Update CMake build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93571
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 15 Jan 2010 22:59:11 +0000 (22:59 +0000)]
Update CMake build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93570
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 15 Jan 2010 22:27:37 +0000 (22:27 +0000)]
add testcase for r93564
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93567
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 15 Jan 2010 22:22:58 +0000 (22:22 +0000)]
Add comments to the dump() and dumpr() routines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93566
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 15 Jan 2010 22:22:35 +0000 (22:22 +0000)]
DEBUG_VALUE is now variable sized, as it has a
target-dependent memory address representation in it.
Restore X86 printing of DEBUG_VALUE; lowering is
done in X86RegisterInfo using the normal algorithm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93565
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 15 Jan 2010 22:21:03 +0000 (22:21 +0000)]
Update Thumb1 storeRegToStackSlot() and loadRegFromStackSlot() to properly
handle physical registers R0-R7 when described as having a non-tGPR register
class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93564
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 15 Jan 2010 22:18:15 +0000 (22:18 +0000)]
Fix a typo that Anton noticed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93563
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 15 Jan 2010 22:08:16 +0000 (22:08 +0000)]
Add FIXME.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93562
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 15 Jan 2010 21:55:02 +0000 (21:55 +0000)]
Fix a comment typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93560
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 15 Jan 2010 21:50:19 +0000 (21:50 +0000)]
move "Metadata Nodes and Metadata Strings" section to the right place in the
document and edit it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93559
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 15 Jan 2010 21:36:30 +0000 (21:36 +0000)]
Remove the InlineHint attribute. There are no current or planned
users.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93558
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Fri, 15 Jan 2010 21:19:43 +0000 (21:19 +0000)]
zext / truncate is free on msp430. Inform codegen about this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93556
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Fri, 15 Jan 2010 21:19:26 +0000 (21:19 +0000)]
Reenable tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93555
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Fri, 15 Jan 2010 21:19:05 +0000 (21:19 +0000)]
Add branch relaxation pass (shamelessly stolen from PPC).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93554
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Fri, 15 Jan 2010 21:18:39 +0000 (21:18 +0000)]
Provide instruction sizes & encoding. No opcodes yet (but not needed so far).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93553
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Fri, 15 Jan 2010 21:18:18 +0000 (21:18 +0000)]
Enable bit tests and setcc stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93552
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Fri, 15 Jan 2010 21:18:02 +0000 (21:18 +0000)]
Add micro-optimization which allows us to fold imm into cmp. This allows us to save 1 word (sometimes) and reduce register pressure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93551
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Fri, 15 Jan 2010 21:17:13 +0000 (21:17 +0000)]
Add instruction formats & support stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93550
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 15 Jan 2010 20:00:12 +0000 (20:00 +0000)]
Don't make changes to the MBB in MachineBasicBlock::canFallThrough().
This fixes the regression for -pre-regalloc-taildup in
MultiSource/Applications/lambda-0.1.3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93541
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 15 Jan 2010 19:59:57 +0000 (19:59 +0000)]
Simplify logic. Any functional change is unintended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93540
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 15 Jan 2010 19:51:05 +0000 (19:51 +0000)]
unbreak the build, grr symlinks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93539
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Fri, 15 Jan 2010 19:43:23 +0000 (19:43 +0000)]
Add some debug routines to SelectionDAG to dump full DAGs.
print/dumpWithDepth allows one to dump a DAG up to N levels deep.
dump/printWithFullDepth prints the whole DAG, subject to a depth limit
on 100 in the default case (to prevent infinite recursion).
Have CannotYetSelect to a dumpWithFullDepth so it is clearer exactly
what the non-matching DAG looks like.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93538
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 15 Jan 2010 19:39:23 +0000 (19:39 +0000)]
fix a bug in range information for $42, eliminate an
unneeded argument from ParseExpression.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93536
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 15 Jan 2010 19:33:43 +0000 (19:33 +0000)]
add range information for mem X86Operand's, now all
X86Operand's have range info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93535
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 15 Jan 2010 19:28:38 +0000 (19:28 +0000)]
extend MCAsmParser::ParseExpression and ParseParenExpression
to return range information for subexpressions. Use this to
provide range info for several new X86Operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93534
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 15 Jan 2010 19:06:59 +0000 (19:06 +0000)]
give X86Operand a ctor and start passing SMLoc's into it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93532
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Hernandez [Fri, 15 Jan 2010 19:04:09 +0000 (19:04 +0000)]
Improve llvm.dbg.declare intrinsic by referring directly to the storage in its first argument, via function-local metadata (instead of via a bitcast).
This patch also cleans up code that expects there to be a bitcast in the first argument and testcases that call llvm.dbg.declare.
It also strips old llvm.dbg.declare intrinsics that did not pass metadata as the first argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93531
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 15 Jan 2010 18:58:14 +0000 (18:58 +0000)]
Revert 93499. After discussion with Chris we agreed
FrameIndexes should be lowered, but the same way as
everything else (target dependent) rather than in a
special hacked way. The lowering needs to be done
for eventual purposes of Dwarf generation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93530
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 15 Jan 2010 18:51:29 +0000 (18:51 +0000)]
add range location info for registers, change
X86Operand::Create* implementations to avoid
copy ctor use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93528
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Fri, 15 Jan 2010 18:51:18 +0000 (18:51 +0000)]
Hook up llc's -filetype=obj to use MCStreamer if an MCCodeEmitter is available.
Remove most of old Mach-O Writer support, it has been replaced by MCMachOStreamer
Further refactoring to completely remove MachOWriter and drive the object file
writer with the AsmPrinter MCInst/MCSection logic is forthcoming.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93527
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 15 Jan 2010 18:44:13 +0000 (18:44 +0000)]
clean up the memory management of the operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93526
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 15 Jan 2010 18:27:19 +0000 (18:27 +0000)]
refactor ParseRegister to avoid using X86Operand as a temporary
datastructure when parsing a mem operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93521
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 15 Jan 2010 18:08:37 +0000 (18:08 +0000)]
mention that unwind isn't to be trusted, patch by Dustin Laurence
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93518
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Hernandez [Fri, 15 Jan 2010 17:36:47 +0000 (17:36 +0000)]
Revert r93504 because older uses of llvm.dbg.declare intrinsics need to be auto-upgraded
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93515
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Fri, 15 Jan 2010 11:29:26 +0000 (11:29 +0000)]
Test case for http://llvm.org/PR6028.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93511
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Fri, 15 Jan 2010 08:32:58 +0000 (08:32 +0000)]
Fix llvm.org/PR6028, an assertion failure when an UndefValue of
integer type is used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93509
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 15 Jan 2010 06:29:17 +0000 (06:29 +0000)]
Change pre-regalloc tail duplication to only duplicate indirect branch blocks.
The pre-regalloc pass caused some regressions in both compile time and
performance of the generated code, and it did not improve performance, except
for indirect branches. I also moved the check for single-block loops to speed
up the common case when running the taildup pass before reg allocation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93505
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Hernandez [Fri, 15 Jan 2010 03:37:48 +0000 (03:37 +0000)]
Improve llvm.dbg.declare intrinsic by referring directly to the storage in its first argument, via function-local metadata (instead of via a bitcast).
This patch also cleans up code that expects there to be a bitcast in the first argument and testcases that call llvm.dbg.declare.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93504
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Fri, 15 Jan 2010 02:09:27 +0000 (02:09 +0000)]
Temporary disable tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93501
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 15 Jan 2010 01:54:55 +0000 (01:54 +0000)]
Lower FrameIndex operand of DEBUG_VALUE (specially) and
print it as a comment on X86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93499
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 15 Jan 2010 01:50:44 +0000 (01:50 +0000)]
Remove DEBUG_DECLARE, looks like we don't need it.
Also, DEBUG_VALUE has side effects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93498
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Fri, 15 Jan 2010 01:29:49 +0000 (01:29 +0000)]
Fix cmp emission on msp430: we definitely should turn stuff like
"icmp lhs, rhs" into "cmp rhs, lhs". This should fix PR5979.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93496
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 15 Jan 2010 01:12:22 +0000 (01:12 +0000)]
Do not use AT_specification die for static variables. It confuses gdb.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93494
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Fri, 15 Jan 2010 00:41:53 +0000 (00:41 +0000)]
Make sure include/llvm/MC/MCParsedAsmOperand.h can be compiled alone.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93492
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 15 Jan 2010 00:36:15 +0000 (00:36 +0000)]
fix 80-column violations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93487
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 15 Jan 2010 00:34:26 +0000 (00:34 +0000)]
new test case for r93485.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93486
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 15 Jan 2010 00:32:47 +0000 (00:32 +0000)]
Fix 80 column violations and clean up whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93484
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 15 Jan 2010 00:26:31 +0000 (00:26 +0000)]
Do not emit multiple AT_container_type attributes.
We need to find a better way to emit this info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93481
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 15 Jan 2010 00:22:18 +0000 (00:22 +0000)]
Name change for consistency. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93480
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 15 Jan 2010 00:18:34 +0000 (00:18 +0000)]
EmitAtomicCmpSwap() custome inserter needs to delete the MI passed in. EmitAtomicBinary() already does this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93479
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Thu, 14 Jan 2010 23:15:26 +0000 (23:15 +0000)]
Teach PPC how to replaceMachineCodeForFunction correctly. (Fixes
JITTest.FunctionIsRecompiledAndRelinked.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93475
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 14 Jan 2010 23:00:10 +0000 (23:00 +0000)]
Pad my commit stats by reducing indentation in this now separate
commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93473
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Thu, 14 Jan 2010 22:42:17 +0000 (22:42 +0000)]
Added 16-bit Thumb Load/Store immediate instructions with encoding bits so that
the disassembler can properly decode Load/Store register/immediate instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93471
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 14 Jan 2010 22:29:57 +0000 (22:29 +0000)]
add virtual methods to get the start/end of a MCParsedAsmOperand,
the default implementation returns "unknown".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93470
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 14 Jan 2010 22:21:20 +0000 (22:21 +0000)]
Split the TargetAsmParser "ParseInstruction" interface in half:
the new ParseInstruction method just parses and returns a list of
target operands. A new MatchInstruction interface is used to
turn the operand list into an MCInst.
This requires new/deleting all the operands, but it also gives
targets the ability to use polymorphic operands if they want to.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93469
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Thu, 14 Jan 2010 22:09:38 +0000 (22:09 +0000)]
Add variable-width shifts for MSP430
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93468
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Thu, 14 Jan 2010 22:09:11 +0000 (22:09 +0000)]
Remove pseudo-MI in custom inserter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93467
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Thu, 14 Jan 2010 21:50:17 +0000 (21:50 +0000)]
Fix a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93463
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 14 Jan 2010 21:48:00 +0000 (21:48 +0000)]
Few minor changes that were requested. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93462
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 14 Jan 2010 21:38:31 +0000 (21:38 +0000)]
Add comment explaining the necessity of r93456
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93459
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 14 Jan 2010 21:32:45 +0000 (21:32 +0000)]
prune #includes in TargetAsmParser.h
Pass in SMLoc of instr opcode into ParseInstruction.
Make AsmToken be a class, not a struct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93457
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 14 Jan 2010 21:22:16 +0000 (21:22 +0000)]
Dwarf EH prepare needs to be run after SjLj prepare. Otherwise,
catch info can get misplaced when a selector ends up more than one block
removed from the parent invoke(s). This could happen when a landing pad is
shared by multiple invokes and is also a target of a normal edge from
elsewhere.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93456
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 14 Jan 2010 21:21:40 +0000 (21:21 +0000)]
introduce MCParsedAsmOperand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93455
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 14 Jan 2010 21:20:55 +0000 (21:20 +0000)]
introduce the MCParsedAsmOperand class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93454
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 14 Jan 2010 21:04:31 +0000 (21:04 +0000)]
Small tweak to inline cost computation. Ext of i/fcmp results are mostly optimized away in codegen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93453
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Thu, 14 Jan 2010 20:19:51 +0000 (20:19 +0000)]
Remove spurious semicolon.
Patch by Diego Iastrubni!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93450
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Hernandez [Thu, 14 Jan 2010 20:12:34 +0000 (20:12 +0000)]
In debug builds, assert that function-local metadata has only 1 parent function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93449
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 14 Jan 2010 20:12:34 +0000 (20:12 +0000)]
Reduce the inlining cost of functions that contain calls to easily,
and frequently optimized functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93448
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Hernandez [Thu, 14 Jan 2010 19:54:11 +0000 (19:54 +0000)]
Simplify code that chooses when to enumerate function-local metadata operands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93446
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Hernandez [Thu, 14 Jan 2010 19:38:44 +0000 (19:38 +0000)]
Avoid modifying ValueEnumerator's MD ValueList by choosing which function-local MD to write based on the function currently being written
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93441
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 14 Jan 2010 18:19:56 +0000 (18:19 +0000)]
ARM "l" constraint for inline asm means R0-R7, also for Thumb2.
This is consistent with llvm-gcc's arm/constraints.md.
Certain instructions (e.g. CBZ, CBNZ) require a low register, even in Thumb2
mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93436
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 14 Jan 2010 10:19:55 +0000 (10:19 +0000)]
Use ENABLE_ASSERTIONS throughout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93423
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 14 Jan 2010 03:08:49 +0000 (03:08 +0000)]
Fix a codegen abort seen in 483.xalancbmk.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93417
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 14 Jan 2010 02:24:50 +0000 (02:24 +0000)]
Test for r93409.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93410
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Hernandez [Thu, 14 Jan 2010 02:12:41 +0000 (02:12 +0000)]
Extend testcase to also test llvm.dbg.value intrinsic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93408
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Hernandez [Thu, 14 Jan 2010 01:51:28 +0000 (01:51 +0000)]
Now that LLParser, AsmWriter, BitcodeReader, and BitcodeWriter all correctly support function-local metadata, test it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93406
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Hernandez [Thu, 14 Jan 2010 01:50:08 +0000 (01:50 +0000)]
In WriteFunction(), write function-local metadata before we write the instructions, so instruction's references to metadata are fully resolved by the time they get written.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93403
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Hernandez [Thu, 14 Jan 2010 01:47:37 +0000 (01:47 +0000)]
Fix printing of function-local metadata in AsmWriter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93402
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Hernandez [Thu, 14 Jan 2010 01:46:02 +0000 (01:46 +0000)]
Clean up unnecessary return and brackets
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93401
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Hernandez [Thu, 14 Jan 2010 01:45:14 +0000 (01:45 +0000)]
Add MDNode::getFunction(), which figures out the metadata's function, if it has function that it is local to.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93400
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 14 Jan 2010 00:54:10 +0000 (00:54 +0000)]
Don't fold insufficiently aligned ldr/str into ldm/stm instructions.
An unaligned ldr causes a trap, and is then emulated by the kernel with
awesome performance. The darwin kernel does not emulate unaligned ldm/stm
Thumb2 instructions, so don't generate them.
This fixes the miscompilation of Multisource/Applications/JM/lencod for Thumb2.
Generating unaligned ldr/str pairs from a 16-bit aligned memcpy is probably
also a bad idea, but that is beyond the scope of this patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93393
91177308-0d34-0410-b5e6-
96231b3b80d8
Stuart Hastings [Thu, 14 Jan 2010 00:34:53 +0000 (00:34 +0000)]
Erm, previous patch was wrong; Thanks Bill\!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93381
91177308-0d34-0410-b5e6-
96231b3b80d8
Stuart Hastings [Thu, 14 Jan 2010 00:22:05 +0000 (00:22 +0000)]
Enable assertions by default for Apple-style builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93380
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 13 Jan 2010 23:29:11 +0000 (23:29 +0000)]
this is an SSE-specific issue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93373
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 13 Jan 2010 23:28:40 +0000 (23:28 +0000)]
X86 if conversion + tail merging issues from PR6032.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93372
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 13 Jan 2010 23:23:17 +0000 (23:23 +0000)]
When the visitSub method was split into visitSub and visitFSub, this xform was
added to the FSub version. However, the original version of this xform guarded
against doing this for floating point (!Op0->getType()->isFPOrFPVector()).
This is causing LLVM to perform incorrect xforms for code like:
void func(double *rhi, double *rlo, double xh, double xl, double yh, double yl){
double mh, ml;
double c =
134217729.0;
double up, u1, u2, vp, v1, v2;
up = xh*c;
u1 = (xh - up) + up;
u2 = xh - u1;
vp = yh*c;
v1 = (yh - vp) + vp;
v2 = yh - v1;
mh = xh*yh;
ml = (((u1*v1 - mh) + (u1*v2)) + (u2*v1)) + (u2*v2);
ml += xh*yl + xl*yh;
*rhi = mh + ml;
*rlo = (mh - (*rhi)) + ml;
}
The last line was optimized away, but rl is intended to be the difference
between the infinitely precise result of mh + ml and after it has been rounded
to double precision.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93369
91177308-0d34-0410-b5e6-
96231b3b80d8
Tobias Grosser [Wed, 13 Jan 2010 22:21:43 +0000 (22:21 +0000)]
Add getSource() to SuccIterator
Get the source BB of an iterator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93364
91177308-0d34-0410-b5e6-
96231b3b80d8
Tobias Grosser [Wed, 13 Jan 2010 22:21:28 +0000 (22:21 +0000)]
Extend SuccIterator
Implement most of the missing methods to make SuccIterator random access.
operator[] is still missing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93363
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 13 Jan 2010 21:51:41 +0000 (21:51 +0000)]
this test requires SSE, thanks to jyasskin for pointing this out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93360
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 13 Jan 2010 21:31:39 +0000 (21:31 +0000)]
makeNameProper is now private!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93357
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 13 Jan 2010 21:29:21 +0000 (21:29 +0000)]
fix ELF section mangling stuff for weak symbols to not use
obsolete Mangler interfaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93356
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Hernandez [Wed, 13 Jan 2010 21:25:04 +0000 (21:25 +0000)]
Fix comment typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93355
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 13 Jan 2010 21:21:29 +0000 (21:21 +0000)]
tidy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93352
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 13 Jan 2010 21:12:34 +0000 (21:12 +0000)]
reduce duplicate mangling logic by using MCSymbol::printMangledName.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93351
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 13 Jan 2010 21:09:59 +0000 (21:09 +0000)]
expose a static function as a static method on the MCSymbol class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93350
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Wed, 13 Jan 2010 21:00:26 +0000 (21:00 +0000)]
Fixed a couple of places for Thumb MOV where encoding bits are underspecified.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93349
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 13 Jan 2010 19:54:39 +0000 (19:54 +0000)]
Fix pasto
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93342
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 13 Jan 2010 19:54:07 +0000 (19:54 +0000)]
stop the CBE from using deprecated Mangler stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93341
91177308-0d34-0410-b5e6-
96231b3b80d8