Dale Johannesen
e1ba7ecf45
Revert 93811 per request.
...
llvm-svn: 93818
2010-01-19 00:10:52 +00:00
Dale Johannesen
0b8b2713d3
Enable code to emit dbg.declare as DEBUG_VALUE
...
comments (fast isel, X86). This doesn't seem
to break any functionality, but will introduce
cases where -g affects the generated code. I'll
be fixing that.
llvm-svn: 93811
2010-01-18 23:34:55 +00:00
Bill Wendling
58d26c105b
- Add getLSDAEncoding to the PowerPC backend.
...
- Greatly improve the comments to the getLSDAEncoding method.
llvm-svn: 93796
2010-01-18 22:36:35 +00:00
Eric Christopher
f599e07003
Have FastISel handle llvm.trap().
...
llvm-svn: 93781
2010-01-18 22:11:29 +00:00
Bill Wendling
db47c10171
Add FIXME comment.
...
llvm-svn: 93755
2010-01-18 19:47:53 +00:00
Bill Wendling
5678a9711b
- Add a comment to the callback indicating that it's *extremely* not a good
...
idea, but unfortunately necessary.
- Default to using 4-bytes for the LSDA pointer encoding to agree with the
encoded value in the CIE.
llvm-svn: 93753
2010-01-18 19:36:27 +00:00
Chris Lattner
40f9b01ab5
switch x86 zerofill emission over to use MCStreamer.
...
llvm-svn: 93702
2010-01-18 01:21:08 +00:00
Chris Lattner
d7bd67fa61
Change CurrentFnSym to be a non-const pointer since asmprinter mutates it
...
as it emits code. Switch .globl directives to use OutStreamer instead of
doing it textually (in x86)
llvm-svn: 93700
2010-01-18 00:59:24 +00:00
Chris Lattner
86287085ba
remove the MAI argument to MCExpr::print and switch overthing to use << when printing them.
...
llvm-svn: 93699
2010-01-18 00:37:40 +00:00
Chris Lattner
a1bd99bd92
unbreak x86 jump tables with my previous patch.
...
llvm-svn: 93698
2010-01-18 00:21:06 +00:00
Chris Lattner
6f360c3c91
now that MCSymbol::print doesn't use it's MAI argument, we can
...
remove it and change all the code that prints MCSymbols to use
<< instead, which is much simpler and cleaner.
llvm-svn: 93695
2010-01-17 21:43:43 +00:00
Chris Lattner
51e8abe640
move the mangler into libtarget from vmcore.
...
llvm-svn: 93664
2010-01-16 21:57:06 +00:00
Chris Lattner
31aea3db21
rename GetPrivateGlobalValueSymbolStub -> GetSymbolWithGlobalValueBase,
...
and add an explicit ForcePrivate argument.
Switch FunctionEHFrameInfo to be MCSymbol based instead of string based.
llvm-svn: 93646
2010-01-16 18:37:32 +00:00
Bill Wendling
d78fcdd332
Retrying r91337:
...
The CIE says that the LSDA point in the FDE section is an "sdata4". That's fine,
but we need it to actually be 4-bytes in the FDE for some platforms. Allow
individual platforms to decide for themselves.
llvm-svn: 93616
2010-01-16 01:40:55 +00:00
Chris Lattner
ea72cfbd42
eliminate uses of mangler and simplify code.
...
llvm-svn: 93615
2010-01-16 01:40:07 +00:00
Chris Lattner
ff1a508835
eliminate uses of deprecated mangler apis
...
llvm-svn: 93605
2010-01-16 01:00:27 +00:00
Chris Lattner
cbe9fe90bd
switch X86 target off CurFunctionName and MCIze more.
...
Note that the code wasn't calling DecorateCygMingName
when emitting the ".ascii -export" stuff at the end of
file for DLLExported functions. I don't know if it should
or not, but I'm preserving behavior.
llvm-svn: 93603
2010-01-16 00:51:39 +00:00
Chris Lattner
0bb1df70ef
MCize tis, and make it keep CurrentFnSym up to date with CurrentFnName.
...
llvm-svn: 93598
2010-01-16 00:32:38 +00:00
Chris Lattner
e76d575ca2
revert the x86 part of my last patch, cygwin is mutating CurrentFnName!
...
llvm-svn: 93595
2010-01-16 00:24:20 +00:00
Chris Lattner
40eb58664f
MCize a bunch more stuff, eliminating a lot of uses of the mangler
...
and CurrentFnName.
llvm-svn: 93594
2010-01-16 00:21:18 +00:00
Dale Johannesen
9f30926cb7
Adjust some comments per review.
...
llvm-svn: 93580
2010-01-15 23:29:29 +00:00
David Greene
e52529d7cb
Fix PR6019. A load has more than one use if it feeds a bitconvert that
...
has more than one use.
llvm-svn: 93576
2010-01-15 23:23:41 +00:00
Dale Johannesen
7a3b1c5ffc
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.
llvm-svn: 93565
2010-01-15 22:22:35 +00:00
Dan Gohman
7b9900094e
Fix a typo that Anton noticed.
...
llvm-svn: 93563
2010-01-15 22:18:15 +00:00
Chris Lattner
d6b351119b
fix a bug in range information for $42, eliminate an
...
unneeded argument from ParseExpression.
llvm-svn: 93536
2010-01-15 19:39:23 +00:00
Chris Lattner
e18762283a
add range information for mem X86Operand's, now all
...
X86Operand's have range info.
llvm-svn: 93535
2010-01-15 19:33:43 +00:00
Chris Lattner
836cf5d129
extend MCAsmParser::ParseExpression and ParseParenExpression
...
to return range information for subexpressions. Use this to
provide range info for several new X86Operands.
llvm-svn: 93534
2010-01-15 19:28:38 +00:00
Chris Lattner
fba7cf4b44
give X86Operand a ctor and start passing SMLoc's into it.
...
llvm-svn: 93532
2010-01-15 19:06:59 +00:00
Dale Johannesen
e3562c3fa2
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.
llvm-svn: 93530
2010-01-15 18:58:14 +00:00
Chris Lattner
618f75b46e
add range location info for registers, change
...
X86Operand::Create* implementations to avoid
copy ctor use.
llvm-svn: 93528
2010-01-15 18:51:29 +00:00
Chris Lattner
5d30d26a5d
clean up the memory management of the operands.
...
llvm-svn: 93526
2010-01-15 18:44:13 +00:00
Chris Lattner
b032dc1768
refactor ParseRegister to avoid using X86Operand as a temporary
...
datastructure when parsing a mem operand.
llvm-svn: 93521
2010-01-15 18:27:19 +00:00
Dale Johannesen
12ae1f52c2
Lower FrameIndex operand of DEBUG_VALUE (specially) and
...
print it as a comment on X86.
llvm-svn: 93499
2010-01-15 01:54:55 +00:00
Chris Lattner
882cb240a6
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.
llvm-svn: 93469
2010-01-14 22:21:20 +00:00
Chris Lattner
ceabb11a5e
prune #includes in TargetAsmParser.h
...
Pass in SMLoc of instr opcode into ParseInstruction.
Make AsmToken be a class, not a struct.
llvm-svn: 93457
2010-01-14 21:32:45 +00:00
Chris Lattner
001a94a0e3
introduce the MCParsedAsmOperand class.
...
llvm-svn: 93454
2010-01-14 21:20:55 +00:00
Chris Lattner
72a06499b3
this is an SSE-specific issue.
...
llvm-svn: 93373
2010-01-13 23:29:11 +00:00
Chris Lattner
0aa093dbdf
X86 if conversion + tail merging issues from PR6032.
...
llvm-svn: 93372
2010-01-13 23:28:40 +00:00
Evan Cheng
98af245e5f
For now, avoid issuing extract_subreg to reuse lower 8-bit, it's not safe in 32-bit.
...
llvm-svn: 93307
2010-01-13 08:01:32 +00:00
Chris Lattner
f2090cf7fd
eliminate some uses of Mangler::makeNameProper.
...
llvm-svn: 93305
2010-01-13 07:56:59 +00:00
Chris Lattner
3c2fad1fc6
change Mangler::makeNameProper to return its result in a SmallVector
...
instead of returning it in an std::string. Based on this change:
1. Change TargetLoweringObjectFileCOFF::getCOFFSection to take a StringRef
2. Change a bunch of targets to call makeNameProper with a smallstring,
making several of them *much* more efficient.
3. Rewrite Mangler::makeNameProper to not build names and then prepend
prefixes, not use temporary std::strings, and to avoid other crimes.
llvm-svn: 93298
2010-01-13 06:38:18 +00:00
Evan Cheng
76db3bb18e
Add a quick pass to optimize sign / zero extension instructions. For targets where the pre-extension values are available in the subreg of the result of the extension, replace the uses of the pre-extension value with the result + extract_subreg.
...
For now, this pass is fairly conservative. It only perform the replacement when both the pre- and post- extension values are used in the block. It will miss cases where the post-extension values are live, but not used.
llvm-svn: 93278
2010-01-13 00:30:23 +00:00
Evan Cheng
bc0b06fb16
Eliminate or_not_add and just use AddedComplexity so isel tries or_is_add patterns first.
...
llvm-svn: 93245
2010-01-12 18:31:19 +00:00
Duncan Sands
395053f13a
Revert commit 93204, since it causes the assembler to barf
...
on x86-64 linux with messages like this:
Error: Incorrect register `%r14' used with `l' suffix
llvm-svn: 93242
2010-01-12 17:46:16 +00:00
Duncan Sands
1c71358944
Fix typo.
...
llvm-svn: 93235
2010-01-12 08:30:46 +00:00
Duncan Sands
f558d05561
Tweak commit 91745, which changed target data for both Mingw and Cygwin,
...
to not touch Cygwin: the change caused llvm-gcc build failures due to
long double getting the wrong size. Patch by Aaron Gray.
llvm-svn: 93234
2010-01-12 08:21:07 +00:00
Dan Gohman
51b3e804dc
Reapply the MOV64r0 patch, with a fix: MOV64r0 clobbers EFLAGS.
...
llvm-svn: 93229
2010-01-12 04:42:54 +00:00
Evan Cheng
e5b545fd60
Add TargetInstrInfo::isCoalescableInstr. It returns true if the specified
...
instruction is copy like where the source and destination registers can
overlap. This is to be used by the coalescable to coalesce the source and
destination registers of instructions like X86::MOVSX64rr32. Apparently
some crazy people believe the coalescer is too simple.
llvm-svn: 93210
2010-01-12 00:09:37 +00:00
Evan Cheng
a93b476689
Add manual ISD::OR fastisel selection routines. TableGen is no longer autogen them after 93152 and 93191.
...
llvm-svn: 93204
2010-01-11 22:59:27 +00:00
Evan Cheng
bd938ebc90
Extend r93152 to work on OR r, r. If the source set bits are known not to overlap, then select as an ADD instead.
...
llvm-svn: 93191
2010-01-11 22:03:29 +00:00