1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 12:33:33 +02:00
Commit Graph

10982 Commits

Author SHA1 Message Date
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
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
Daniel Dunbar
fe8914f6b6 Fix (unused) RegisterAsmBackend template, clang++ isn't happy about this.
llvm-svn: 98226
2010-03-11 02:28:52 +00:00
Daniel Dunbar
687d99cfa8 MC: Provide MCAssembler with a TargetAsmBackend.
llvm-svn: 98222
2010-03-11 01:34:27 +00:00
Daniel Dunbar
f7f88fba2d MC: Sketch some TargetAsmBackend hooks we are going to need.
llvm-svn: 98221
2010-03-11 01:34:21 +00:00
Daniel Dunbar
10c975db78 MC: Provide the target triple to AsmBackend constructors.
llvm-svn: 98220
2010-03-11 01:34:16 +00:00
Eric Christopher
c2a92dadc5 Add strncpy libcall creator. Use it when it should be used.
llvm-svn: 98219
2010-03-11 01:25:07 +00:00
Dale Johannesen
0ef6f3119d Make sure HasDebugValue is initialized. This should fix
the buildbot running valgrind.

llvm-svn: 98216
2010-03-11 00:52:12 +00:00
Chris Lattner
d6d11e53ab add support, testcases, and dox for the new GHC calling
convention.  Patch by David Terei!

llvm-svn: 98212
2010-03-11 00:22:57 +00:00
Bill Wendling
df325dee9d Add a bit along with the MCSymbols stored in the MachineModuleInfo maps that
indicates that an MCSymbol is external or not. (It's true if it's external.)
This will be used to specify the correct information to add to non-lazy
pointers. That will be explained further when this bit is used.

llvm-svn: 98199
2010-03-10 22:34:10 +00:00
Dale Johannesen
987770c05d Progress towards shepherding debug info through SelectionDAG.
No functional effect yet.  This is still evolving and should
not be viewed as final.

llvm-svn: 98195
2010-03-10 22:13:47 +00:00
Daniel Dunbar
fc99f844eb MC: Move the backend section and symbol data maps to MCAssembler.
llvm-svn: 98186
2010-03-10 20:58:29 +00:00
Daniel Dunbar
8e45a4269e Remove unneeded declarations.
llvm-svn: 98185
2010-03-10 20:58:25 +00:00
Dan Gohman
07eb9cb4c2 Add a DominatorTree argument to isLCSSA so that it doesn't have to
compute a set of reachable blocks for itself each time it is called, which
is fairly frequently.

llvm-svn: 98179
2010-03-10 19:38:49 +00:00
Benjamin Kramer
adf47face1 Remove duplicated code. No functionality change.
llvm-svn: 98156
2010-03-10 16:04:20 +00:00
Chris Lattner
e34dde1e83 move three lowering hooks from MAI to TLOF and make one of them
semantic instead of syntactic.  This completes MCization of
darwin/x86[-64]!

llvm-svn: 98145
2010-03-10 07:20:42 +00:00
Chris Lattner
ed0b8d36e4 set the temporary bit on MCSymbols correctly.
llvm-svn: 98124
2010-03-10 02:25:11 +00:00