Anton Korobeynikov
95f830f289
Add DAG nodes to represent FP16 <-> FP32 intrinsics
...
llvm-svn: 98500
2010-03-14 18:42:15 +00:00
Anton Korobeynikov
2f953c5850
Cleanup
...
llvm-svn: 98499
2010-03-14 18:42:08 +00:00
Anton Korobeynikov
e29762e78e
The fp16 <-> fp32 intrinsics are pure, mark them so they can be CSE'd, etc.
...
llvm-svn: 98498
2010-03-14 18:42:04 +00:00
Anton Korobeynikov
92e88294ce
Add intrinsics to represent fp16 <-> fp32 conversions
...
llvm-svn: 98497
2010-03-14 18:41:50 +00:00
Chris Lattner
2bdb0765f8
fix AsmPrinter::GetBlockAddressSymbol to always return a unique
...
label instead of trying to form one based on the BB name (which
causes collisions if the name is empty). This fixes PR6608
llvm-svn: 98495
2010-03-14 17:53:23 +00:00
Chris Lattner
9331acc6d7
get MMI out of the label uniquing business, just go to MCContext
...
to get unique assembler temporary labels.
llvm-svn: 98489
2010-03-14 08:36:50 +00:00
Chris Lattner
3eb55835b5
add a new CreateTempSymbol method, the use case for
...
CreateTempSymbol vs GetOrCreateTemporarySymbol are
completely different.
llvm-svn: 98486
2010-03-14 08:23:30 +00:00
Chris Lattner
23ec7363b8
Now that DBG_LABEL is updated, we can finally make MachineMove
...
contain an MCSymbol instead of a label index.
llvm-svn: 98482
2010-03-14 08:12:40 +00:00
Chris Lattner
853b4f38df
switch GC_LABEL to use an MCSymbol operand instead of a label ID operand.
...
llvm-svn: 98474
2010-03-14 07:27:07 +00:00
Chris Lattner
5fef80c5aa
change the LabelSDNode to be EHLabelSDNode and make it hold
...
an MCSymbol. Make the EH_LABEL MachineInstr hold its label
with an MCSymbol instead of ID. Fix a bug in MMI.cpp which
would return labels named "Label4" instead of "label4".
llvm-svn: 98463
2010-03-14 02:33:54 +00:00
Chris Lattner
de49dbc188
eliminate InvalidateLabel and LabelIDList from MMI and replace
...
them with a counter.
llvm-svn: 98462
2010-03-14 02:24:55 +00:00
Chris Lattner
f856c407af
use Label->isDefined() instead of isLabelDeleted() now that we
...
consistently use MCSymbol and only call this predicate after
they should have been emitted.
llvm-svn: 98461
2010-03-14 02:20:58 +00:00
Chris Lattner
149cf816bb
change EH related stuff (other than EH_LABEL) to use MCSymbol
...
instead of label ID's. This cleans up and regularizes a bunch
of code and makes way for future progress.
Unfortunately, this pointed out to me that JITDwarfEmitter.cpp
is largely copy and paste from DwarfException/MachineModuleInfo
and other places. This is very sad and disturbing. :(
One major change here is that TidyLandingPads moved from being
called in DwarfException::BeginFunction to being called in
DwarfException::EndFunction. There should not be any
functionality change from doing this, but I'm not an EH expert.
llvm-svn: 98459
2010-03-14 01:41:15 +00:00
Chris Lattner
ceaa2343e7
eliminate the now-unneeded context argument of MBB::getSymbol()
...
llvm-svn: 98451
2010-03-13 21:04:28 +00:00
Chris Lattner
e7538fa303
rearrange MCContext ownership. Before LLVMTargetMachine created it
...
and passing off ownership to AsmPrinter. Now MachineModuleInfo
creates it and owns it by value. This allows us to use MCSymbols
more consistently throughout the rest of the code generator, and
simplifies a bit of code. This also allows MachineFunction to
keep an MCContext reference handy, and cleans up the TargetRegistry
interfaces for AsmPrinters.
llvm-svn: 98450
2010-03-13 20:55:24 +00:00
Chris Lattner
c384c5819a
add builder support for mcsymbol operands.
...
llvm-svn: 98434
2010-03-13 08:16:25 +00:00
Chris Lattner
533e5c8ffd
add support for MCSymbols as operands to MachineInstrs.
...
llvm-svn: 98433
2010-03-13 08:14:18 +00:00
Benjamin Kramer
3b2398d288
Add some parens and silence a warning.
...
llvm-svn: 98428
2010-03-13 07:40:34 +00:00
Daniel Dunbar
33c92a1a88
llvm-mc: Support -n, useful for comparing -integrated-as output since the
...
compiler may not lead with the text section.
llvm-svn: 98418
2010-03-13 02:20:57 +00:00
Jeffrey Yasskin
819ce89d8f
Delete MDNodes when LLVMContext is destroyed. Previous attempts: r97918, r97788.
...
Tested: clang debug bootstrap, llvm-gcc bootstrap, `make check-lit`
after configuring with --with-llvmgccdir (and this did run the
FrontendC* tests this time)
llvm-svn: 98410
2010-03-13 01:26:15 +00:00
Devang Patel
40477c7760
Remove extra parameter.
...
llvm-svn: 98403
2010-03-13 00:45:31 +00:00
Devang Patel
882e43e3cc
Do not overestimate code size reduction in presense of debug info.
...
Use CodeMetrics.analyzeBasicBlock() to estimate BB size.
llvm-svn: 98401
2010-03-13 00:10:20 +00:00
Daniel Dunbar
8ad9589475
MC/Mach-O: Implement initial support for relaxation.
...
- The implementation is currently very brain dead and inefficient, but I have a
clear plan on how to fix it.
- The good news is, it works and correctly assembles 403.gcc (when built with
Clang, at '-Os', '-Os -g', and '-O3'). Even better, at '-Os' and '-Os -g',
the resulting binary is exactly equivalent to that when built with the system
assembler. So it probably works! :)
llvm-svn: 98396
2010-03-12 22:07:14 +00:00
Chris Lattner
5a5ea25649
inline GetGlobalValueSymbol into the rest its callers and
...
remove it.
llvm-svn: 98390
2010-03-12 21:19:23 +00:00
Chris Lattner
33f470bec2
eliminate the X86 version of GetGlobalValueSymbol, allowing
...
it to be non-virtual and soon disappear.
llvm-svn: 98387
2010-03-12 21:06:41 +00:00
Chris Lattner
ff05ae7a33
move fastcall/stdcall mangling up into Mangler.
...
llvm-svn: 98384
2010-03-12 21:03:47 +00:00
Daniel Dunbar
642fbbe84d
MC: Factor out MCAssembler::EvaluateFixup, and simplify.
...
llvm-svn: 98381
2010-03-12 21:00:49 +00:00
Daniel Dunbar
14b9ff70e1
MC: Constify MCAsmLayout argument to MCExpr::EvaluteAs...
...
llvm-svn: 98380
2010-03-12 21:00:45 +00:00
Daniel Dunbar
71473e6b15
MC: Add MCAssembler::addFixup, which enforces that fixups are added in order.
...
llvm-svn: 98379
2010-03-12 21:00:38 +00:00
Chris Lattner
c101ad818c
give Mangler access to TargetData.
...
llvm-svn: 98378
2010-03-12 20:47:28 +00:00
Benjamin Kramer
19c12c8ef4
Add a virtual destructor and give vtable a home.
...
llvm-svn: 98376
2010-03-12 20:41:29 +00:00
Chris Lattner
01e70df9b2
finally give Mangler a getSymbol method, which returns an MCSymbol
...
for a global instead of messing around with string buffers.
llvm-svn: 98366
2010-03-12 18:55:20 +00:00
Chris Lattner
956582f876
make the mangler take an MCContext instead of an MAI.
...
No functionality change.
llvm-svn: 98363
2010-03-12 18:44:54 +00:00
Chris Lattner
f4dce6a6d8
remove MAI argument from createAsmStreamer since it
...
can get it from the context now.
llvm-svn: 98361
2010-03-12 18:28:53 +00:00
Jeffrey Yasskin
824bd1b30d
Free DbgScopes in DwarfDebug::endFunction(). Also increased the const-ness of
...
several fields to make it easier to figure out where bugs might be creeping in.
llvm-svn: 98358
2010-03-12 17:45:06 +00:00
Benjamin Kramer
0592752a53
Factor checked library call optimization into a common helper class and use it
...
to unify the almost identical code in CodeGenPrepare and InstCombineCalls.
llvm-svn: 98338
2010-03-12 09:27:41 +00:00
Chris Lattner
07e124cec5
make TargetLoweringObjectFile::getExprForDwarfReference
...
just make unnamed temp symbols instead of having to come
up with its own names.
llvm-svn: 98324
2010-03-12 01:56:43 +00:00
Nate Begeman
687c31cdda
Whoops this already existed.
...
llvm-svn: 98297
2010-03-11 23:21:19 +00:00
Nate Begeman
9151a9bee5
Add a handful of additional useful pass manager things to the C API
...
llvm-svn: 98296
2010-03-11 23:06:07 +00:00
Chris Lattner
debc026df2
change MCContext to always have an MCAsmInfo.
...
llvm-svn: 98293
2010-03-11 22:53:35 +00:00
Chris Lattner
5aefaeb42e
fix a fixme in TargetLoweringObjectFile::getExprForDwarfReference
...
where we used ot create an MCSymbol for ".". Now emit an assembler
temporary label and reference it instead of "." textually.
rdar://7739457
llvm-svn: 98292
2010-03-11 21:55:20 +00:00
Dan Gohman
6b1b9e37d7
Remove getWidenVectorType, which is no longer used.
...
llvm-svn: 98289
2010-03-11 21:39:57 +00:00
Benjamin Kramer
846fefb000
stpcpy is so similar to strcpy, it doesn't deserve a complete copy of the __strcpy_chk -> strcpy code.
...
llvm-svn: 98284
2010-03-11 20:45:13 +00:00
Chris Lattner
1ce9dfd498
rename getSymbolForDwarf* to getExprForDwarf* since it returns
...
an MCExpr and not an MCSymbol. Change it to take an MCStreamer,
which is currently unused.
No functionality change.
llvm-svn: 98278
2010-03-11 19:41:58 +00:00
Eric Christopher
017a0a06d8
Lower stpcpy_chk when possible.
...
llvm-svn: 98274
2010-03-11 19:24:34 +00:00
Daniel Dunbar
8790f4ce4b
MC/Mach-O: Add MCSymbolData::getAddress() utility.
...
llvm-svn: 98266
2010-03-11 18:22:51 +00:00
Richard Osborne
9c71a0a5ba
Add a new jump table encoding to indicate jump tables entries
...
are inside the function by the target at the point of use.
llvm-svn: 98255
2010-03-11 14:58:16 +00:00
Evan Cheng
4ef6d8fa15
The check for coalescing a virtual register to a physical register, e.g.
...
cl = EXTRACT_SUBREG reg1024, 1, is overly conservative. It should check
for overlaps of vr's live interval with the super registers of the
physical register (ECX in this case) and let JoinIntervals() handle checking
the coalescing feasibility against the physical register (cl in this case).
llvm-svn: 98251
2010-03-11 08:20:21 +00:00
Daniel Dunbar
aefde2abfd
MC/Mach-O: Start passing in the basic MCAsmLayout object.
...
- Also, drop the current location part of AsmLayout, I think I prefer to implement this via explicit symbols.
llvm-svn: 98240
2010-03-11 05:53:33 +00:00
Daniel Dunbar
285a34c8c8
MC: Sketch initial MCAsmLayout class, which encapsulates the current layout of an assembly file. The MCAsmLayout is also available for use by MCExpr::EvaluateAs{Absolute,Relocatable}, to allow target specific hooks and "absolutizing" of symbols.
...
llvm-svn: 98227
2010-03-11 02:28:59 +00:00