Commit Graph

9440 Commits

Author SHA1 Message Date
Chris Lattner
8d4a0a328a remove TargetAsmInfo::TM, which is now dead. The basic TAI class now
no longer depends on TM!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77863 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-02 04:27:24 +00:00
Chris Lattner
05e5fcab09 move an enum from TM -> TargetOptions. This makes TargetOptions.h
be self contained, and it isn't used from TM.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77857 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-02 04:08:52 +00:00
Chris Lattner
b6d667403f remove the dead PreferredEHDataFormat TAI hook: its now dead
even considering #if 0 code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77856 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-02 04:02:52 +00:00
Chris Lattner
d5bbb07ec8 move getDwarfExceptionSection from TAI to TLOF and rename it to
getLSDASection() to be more specific.  This makes it pretty obvious
that the ELF LSDA section is being specified wrong in PIC mode.  We're
probably getting a lot of startup-time relocations to a readonly page,
which is expensive and bad.

Someone who cares about ELF C++ should investigate this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77847 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-02 01:34:32 +00:00
Chris Lattner
80ec2792b2 convert ctors/dtors section to be in TLOF instead of
TAI.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77842 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-02 00:34:36 +00:00
Daniel Dunbar
cdcb388a58 Change MCOperand to use Create style instead of Make style for constructing
operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77837 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-02 00:09:22 +00:00
Chris Lattner
7b1dcdfce1 make SectionKind::Kind completely private now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77836 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-02 00:04:12 +00:00
Chris Lattner
1ef9be2883 Make SectionKind::get() private.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77835 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-02 00:02:44 +00:00
Chris Lattner
2798119ab4 (re)introduce new simpler apis for creation sectionkinds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77834 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-01 23:57:16 +00:00
Chris Lattner
83d77faf6e Remove "JumpTableDataSection" from TAI, instead, have AsmPrinter
compute it based on what it knows.  As part of this, rename getSectionForMergeableConstant
to getSectionForConstant because it works for non-mergable constants also.

The only functionality change from this is that Xcore will start dropping
its jump tables into readonly section instead of data section in -static mode.
This should be fine as the linker resolves the relocations.  If this is a
problem, let me know and we'll come up with another solution.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77833 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-01 23:46:12 +00:00
Chris Lattner
b80610cd13 REmove dead fields of TAI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77820 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-01 22:40:22 +00:00
Chris Lattner
824583844a fix a fixme by sinking various target-specific directives down into
the appropriate subclasses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77815 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-01 21:56:13 +00:00
Chris Lattner
f9650c061e it turns out that isWeak() was basically dead anyway. Kill off SectionInfo :-/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77812 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-01 21:46:23 +00:00
Chris Lattner
0064e85050 fix a layering violation by moving SectionKind out to its own header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77808 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-01 21:30:49 +00:00
Dan Gohman
f17008844a Minor whitespace tidiness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77807 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-01 21:25:46 +00:00
Chris Lattner
423d190dbe with the previous refactoring, fixme fixed!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77805 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-01 21:21:43 +00:00
Chris Lattner
968ff11967 Change SectionKind to be a property that is true of a *section*, it
should have no state that is specific to particular globals in the
section.  In this case, it means the removal of the "isWeak" and
"ExplicitSection" bits.  MCSection uses the new form of SectionKind.

To handle isWeak, I introduced a new SectionInfo class, which is
SectionKind + isWeak, and it is used by the part of the code generator
that does classification of a specific global.

The ExplicitSection disappears.  It is moved onto MCSection as a new
"IsDirective" bit.  Since the Name of a section is either a section
or directive, it makes sense to keep this bit in MCSection.  Ultimately
the creator of MCSection should canonicalize (e.g.) .text to whatever
the actual section is.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77803 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-01 21:11:14 +00:00
Dan Gohman
7aeff084a4 Use the default copy ctor and copy-assignment operators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77793 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-01 19:11:31 +00:00
Chris Lattner
4a7bc1e5aa All MCSections are now required to have a SectionKind.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77787 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-01 18:25:49 +00:00
Dan Gohman
f94083333c Give MachineFunctionAnalysis a destructor so it can verify that
that it released its allocated memory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77775 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-01 04:19:43 +00:00
Ted Kremenek
458ba32680 Make default ctor for ImmutableSet::iterator public.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77762 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-01 01:28:23 +00:00
Owen Anderson
7e3142b012 Privatize all but one of the remaining constant tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77748 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 22:45:43 +00:00
Mikhail Glushenkov
7ea9de78ee Add a warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77746 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 22:24:20 +00:00
David Greene
bef8768bd0 Simplify operand padding by keying off tabs in the asm stream. If
padding is disabled, tabs get replaced by spaces except in the case of
the first operand, where the tab is output to line up the operands after
the mnemonics.

Add some better comments and eliminate redundant code.

Fix some testcases to not assume tabs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77740 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 21:57:10 +00:00
Daniel Dunbar
76c4d7696c llvm-mc: Support quoted identifiers.
- Uses MCAsmToken::getIdentifier which returns the (sub)string representing the
   meaningfull contents a string or identifier token.

 - Directives aren't done yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77739 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 21:55:09 +00:00
Chris Lattner
7a01e95915 PreferredEHDataFormat is always call with data and global, but this whole
thing is #if0'd out anyway.  Just simplify the code by reducing the interface.
Not deleting this is essential for Bill's continuing happiness.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77736 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 21:39:55 +00:00
Owen Anderson
647e3016de Move the metadata constructors back to 2.5 syntax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77733 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 21:35:40 +00:00
Chris Lattner
26630c1180 move emitUsedDirectiveFor to TargetLoweringObjectFile and rename it to
indicate that it is a predicate, not an emitter.  This eliminates TAI
dependencies on Mangler and GlobalValue.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77726 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 20:52:39 +00:00
Owen Anderson
a7235ea724 Move a few more APIs back to 2.5 forms. The only remaining ones left to change back are
metadata related, which I'm waiting on to avoid conflicting with Devang.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77721 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 20:28:14 +00:00
Dan Gohman
81acc554b9 Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77715 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 19:26:54 +00:00
Dan Gohman
e243729b3d Delete spurious semicolons.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77712 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 18:59:29 +00:00
Benjamin Kramer
548f8cbb94 Fix build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77711 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 18:58:46 +00:00
Chris Lattner
a87dea4f8c switch off of 'Section' onto MCSection. We're not properly using
MCSection subclasses yet, but this is a step in the right direction.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77708 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 18:48:30 +00:00
Dan Gohman
5e5337a833 Remove Annotation.h, which is no longer used in the LLVM tree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77706 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 18:36:25 +00:00
Dan Gohman
f266f89634 MachineFunction no longer needs Annotation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77704 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 18:35:51 +00:00
Dan Gohman
a818c30d66 Fix some problems with ASTCallbackVH in its use as a DenseMap key.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77696 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 18:21:48 +00:00
Dan Gohman
29384efb76 Teach ValueHandleBase to treat DenseMap's special Empty and Tombstone
values the same way it treats null pointers. This is needed to allow
CallbackVH to be used as a key in a DenseMap.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77695 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 18:20:18 +00:00
Devang Patel
b4d31306a4 Process DbgDeclareInst.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77694 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 18:18:52 +00:00
Dan Gohman
fb3af88ba7 Split DenseMapInfo into a separate header file, so that it can be
included separately.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77693 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 18:18:19 +00:00
Dan Gohman
ad2afc2a42 Reapply r77654 with a fix: MachineFunctionPass's getAnalysisUsage
shouldn't do AU.setPreservesCFG(), because even though CodeGen passes
don't modify the LLVM IR CFG, they may modify the MachineFunction CFG,
and passes like MachineLoop are registered with isCFGOnly set to true.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77691 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 18:16:33 +00:00
Chris Lattner
f26e03bc7e refactor section construction in TLOF to be through an explicit
initialize method, which can be called when an MCContext is available.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77687 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 17:42:42 +00:00
Owen Anderson
5defacc6e6 Move getTrue() and getFalse() to 2.5-like APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77685 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 17:39:07 +00:00
Chris Lattner
ed47a0409b split MCSection stuff out to its own .cpp file, add a new
MCSectionWithKind subclass of MCSection.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77684 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 17:02:00 +00:00
Chris Lattner
23b6ecffe1 move the sectionkind and section classes to TargetLoweringObjectFile.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77681 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 16:47:16 +00:00
Chris Lattner
fcdbf4ecc3 create sections with MCSection::Create instead of Context->getOrCreateSection.
This is needed to allow polymorphic sections.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77680 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 16:43:49 +00:00
Daniel Dunbar
c5b19b21d8 Revert r77654, it appears to be causing llvm-gcc bootstrap failures, and many
failures when building assorted projects with clang.

--- Reverse-merging r77654 into '.':
U    include/llvm/CodeGen/Passes.h
U    include/llvm/CodeGen/MachineFunctionPass.h
U    include/llvm/CodeGen/MachineFunction.h
U    include/llvm/CodeGen/LazyLiveness.h
U    include/llvm/CodeGen/SelectionDAGISel.h
D    include/llvm/CodeGen/MachineFunctionAnalysis.h
U    include/llvm/Function.h
U    lib/Target/CellSPU/SPUISelDAGToDAG.cpp
U    lib/Target/PowerPC/PPCISelDAGToDAG.cpp
U    lib/CodeGen/LLVMTargetMachine.cpp
U    lib/CodeGen/MachineVerifier.cpp
U    lib/CodeGen/MachineFunction.cpp
U    lib/CodeGen/PrologEpilogInserter.cpp
U    lib/CodeGen/MachineLoopInfo.cpp
U    lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
D    lib/CodeGen/MachineFunctionAnalysis.cpp
D    lib/CodeGen/MachineFunctionPass.cpp
U    lib/CodeGen/LiveVariables.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77661 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 03:02:41 +00:00
Dan Gohman
933c762371 Manage MachineFunctions with an analysis Pass instead of the Annotable
mechanism. To support this, make MachineFunctionPass a little more
complete.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77654 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 01:52:50 +00:00
Devang Patel
49fe6c914c Add getOrInsertNamedMetadata().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77646 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 23:59:04 +00:00
Devang Patel
f1da1f5f97 Add addElement().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77645 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 23:57:23 +00:00
Lang Hames
2f75c727f2 Removed the BigBlock register allocator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77640 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 23:18:43 +00:00