Chris Lattner
b25afe081c
remove TargetAsmInfo::TM, which is now dead. The basic TAI class now
...
no longer depends on TM!
llvm-svn: 77863
2009-08-02 04:27:24 +00:00
Chris Lattner
77f686713f
move an enum from TM -> TargetOptions. This makes TargetOptions.h
...
be self contained, and it isn't used from TM.h
llvm-svn: 77857
2009-08-02 04:08:52 +00:00
Chris Lattner
29c6c43cd0
remove the dead PreferredEHDataFormat TAI hook: its now dead
...
even considering #if 0 code.
llvm-svn: 77856
2009-08-02 04:02:52 +00:00
Chris Lattner
c16c75ea9b
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.
llvm-svn: 77847
2009-08-02 01:34:32 +00:00
Chris Lattner
4e7dfafc03
convert ctors/dtors section to be in TLOF instead of
...
TAI.
llvm-svn: 77842
2009-08-02 00:34:36 +00:00
Daniel Dunbar
b2aebed2dc
Change MCOperand to use Create style instead of Make style for constructing
...
operands.
llvm-svn: 77837
2009-08-02 00:09:22 +00:00
Chris Lattner
7bb2097143
make SectionKind::Kind completely private now.
...
llvm-svn: 77836
2009-08-02 00:04:12 +00:00
Chris Lattner
73d577c933
Make SectionKind::get() private.
...
llvm-svn: 77835
2009-08-02 00:02:44 +00:00
Chris Lattner
f8d9710b6f
(re)introduce new simpler apis for creation sectionkinds.
...
llvm-svn: 77834
2009-08-01 23:57:16 +00:00
Chris Lattner
0c40266b5a
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.
llvm-svn: 77833
2009-08-01 23:46:12 +00:00
Chris Lattner
b2bbb61f33
REmove dead fields of TAI.
...
llvm-svn: 77820
2009-08-01 22:40:22 +00:00
Chris Lattner
d5c01136ef
fix a fixme by sinking various target-specific directives down into
...
the appropriate subclasses.
llvm-svn: 77815
2009-08-01 21:56:13 +00:00
Chris Lattner
26fb277f92
it turns out that isWeak() was basically dead anyway. Kill off SectionInfo :-/
...
llvm-svn: 77812
2009-08-01 21:46:23 +00:00
Chris Lattner
9ba71d12d8
fix a layering violation by moving SectionKind out to its own header.
...
llvm-svn: 77808
2009-08-01 21:30:49 +00:00
Dan Gohman
a152345dfb
Minor whitespace tidiness.
...
llvm-svn: 77807
2009-08-01 21:25:46 +00:00
Chris Lattner
fba48fbfdd
with the previous refactoring, fixme fixed!
...
llvm-svn: 77805
2009-08-01 21:21:43 +00:00
Chris Lattner
c9c277ba0f
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.
llvm-svn: 77803
2009-08-01 21:11:14 +00:00
Dan Gohman
27f169c416
Use the default copy ctor and copy-assignment operators.
...
llvm-svn: 77793
2009-08-01 19:11:31 +00:00
Chris Lattner
95bad379a9
All MCSections are now required to have a SectionKind.
...
llvm-svn: 77787
2009-08-01 18:25:49 +00:00
Dan Gohman
c120612daa
Give MachineFunctionAnalysis a destructor so it can verify that
...
that it released its allocated memory.
llvm-svn: 77775
2009-08-01 04:19:43 +00:00
Ted Kremenek
13710adad9
Make default ctor for ImmutableSet::iterator public.
...
llvm-svn: 77762
2009-08-01 01:28:23 +00:00
Owen Anderson
c8c302644c
Privatize all but one of the remaining constant tables.
...
llvm-svn: 77748
2009-07-31 22:45:43 +00:00
Mikhail Glushenkov
645bb0fc71
Add a warning.
...
llvm-svn: 77746
2009-07-31 22:24:20 +00:00
David Greene
81bcae5fda
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.
llvm-svn: 77740
2009-07-31 21:57:10 +00:00
Daniel Dunbar
9ee33ca28e
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.
llvm-svn: 77739
2009-07-31 21:55:09 +00:00
Chris Lattner
63779b8d57
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.
llvm-svn: 77736
2009-07-31 21:39:55 +00:00
Owen Anderson
0087fe6e5c
Move the metadata constructors back to 2.5 syntax.
...
llvm-svn: 77733
2009-07-31 21:35:40 +00:00
Chris Lattner
d25701c114
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.
llvm-svn: 77726
2009-07-31 20:52:39 +00:00
Owen Anderson
5a1acd9912
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.
llvm-svn: 77721
2009-07-31 20:28:14 +00:00
Dan Gohman
01ea674c5b
Fix a typo in a comment.
...
llvm-svn: 77715
2009-07-31 19:26:54 +00:00
Dan Gohman
ed4f2350cb
Delete spurious semicolons.
...
llvm-svn: 77712
2009-07-31 18:59:29 +00:00
Benjamin Kramer
626495a031
Fix build.
...
llvm-svn: 77711
2009-07-31 18:58:46 +00:00
Chris Lattner
4d2c0f9008
switch off of 'Section' onto MCSection. We're not properly using
...
MCSection subclasses yet, but this is a step in the right direction.
llvm-svn: 77708
2009-07-31 18:48:30 +00:00
Dan Gohman
060ca138e2
Remove Annotation.h, which is no longer used in the LLVM tree.
...
llvm-svn: 77706
2009-07-31 18:36:25 +00:00
Dan Gohman
7baae4b355
MachineFunction no longer needs Annotation.
...
llvm-svn: 77704
2009-07-31 18:35:51 +00:00
Dan Gohman
dc2b1b0a1c
Fix some problems with ASTCallbackVH in its use as a DenseMap key.
...
llvm-svn: 77696
2009-07-31 18:21:48 +00:00
Dan Gohman
0542060b8a
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.
llvm-svn: 77695
2009-07-31 18:20:18 +00:00
Devang Patel
9d7de2a155
Process DbgDeclareInst.
...
llvm-svn: 77694
2009-07-31 18:18:52 +00:00
Dan Gohman
40f830d08c
Split DenseMapInfo into a separate header file, so that it can be
...
included separately.
llvm-svn: 77693
2009-07-31 18:18:19 +00:00
Dan Gohman
5ea74d55ce
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.
llvm-svn: 77691
2009-07-31 18:16:33 +00:00
Chris Lattner
51d5b43cda
refactor section construction in TLOF to be through an explicit
...
initialize method, which can be called when an MCContext is available.
llvm-svn: 77687
2009-07-31 17:42:42 +00:00
Owen Anderson
23a204d91b
Move getTrue() and getFalse() to 2.5-like APIs.
...
llvm-svn: 77685
2009-07-31 17:39:07 +00:00
Chris Lattner
c10132aa79
split MCSection stuff out to its own .cpp file, add a new
...
MCSectionWithKind subclass of MCSection.
llvm-svn: 77684
2009-07-31 17:02:00 +00:00
Chris Lattner
f0b4bf55f0
move the sectionkind and section classes to TargetLoweringObjectFile.h
...
llvm-svn: 77681
2009-07-31 16:47:16 +00:00
Chris Lattner
b37f29b6f3
create sections with MCSection::Create instead of Context->getOrCreateSection.
...
This is needed to allow polymorphic sections.
llvm-svn: 77680
2009-07-31 16:43:49 +00:00
Daniel Dunbar
5434756585
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
llvm-svn: 77661
2009-07-31 03:02:41 +00:00
Dan Gohman
bcb44baa57
Manage MachineFunctions with an analysis Pass instead of the Annotable
...
mechanism. To support this, make MachineFunctionPass a little more
complete.
llvm-svn: 77654
2009-07-31 01:52:50 +00:00
Devang Patel
98250795e8
Add getOrInsertNamedMetadata().
...
llvm-svn: 77646
2009-07-30 23:59:04 +00:00
Devang Patel
d8db5e6a97
Add addElement().
...
llvm-svn: 77645
2009-07-30 23:57:23 +00:00
Lang Hames
16f58557d2
Removed the BigBlock register allocator.
...
llvm-svn: 77640
2009-07-30 23:18:43 +00:00
Owen Anderson
b292b8ce70
Move more code back to 2.5 APIs.
...
llvm-svn: 77635
2009-07-30 23:03:37 +00:00
Daniel Dunbar
a91dd9bf5f
Twine: Directly support int, long, and long long types.
...
- This should resolve Cygwin gcc ambiguities.
llvm-svn: 77624
2009-07-30 21:15:14 +00:00
Dan Gohman
f4362da1b7
Use CallbackVH in AliasSetTracker to avoid getting stuck with
...
dangling Value*s.
llvm-svn: 77623
2009-07-30 20:21:41 +00:00
Devang Patel
57eae13c8d
Fix MetadataBase::classof().
...
Thanks Benjamin Kramer!
llvm-svn: 77618
2009-07-30 18:45:09 +00:00
Daniel Dunbar
bd8556e0fb
Twine: Use raw_ostream::write_hex, remove unused itohexstr method.
...
llvm-svn: 77617
2009-07-30 18:30:19 +00:00
Devang Patel
3b4e827f2b
s/DebugInfoEnumerator/DebugInfoFinder/g
...
llvm-svn: 77615
2009-07-30 18:25:15 +00:00
Daniel Dunbar
6c9629b92a
Add raw_ostream::write_hex
...
llvm-svn: 77614
2009-07-30 18:21:23 +00:00
Daniel Dunbar
4d6aa73d6b
Remove itohexstr, which only had one user.
...
llvm-svn: 77613
2009-07-30 18:18:54 +00:00
Daniel Dunbar
132f78395a
Twines: Don't allow implicit conversion from integers, this is too tricky.
...
llvm-svn: 77605
2009-07-30 17:37:43 +00:00
Devang Patel
5262314b8d
walk DbgRegionStartInst and DbgRegionEndInst
...
llvm-svn: 77604
2009-07-30 17:30:23 +00:00
Devang Patel
6d39426d68
Fix comment.
...
llvm-svn: 77603
2009-07-30 17:25:33 +00:00
Sanjiv Gupta
a53e686d96
Allow targets to define libcall names for mem(cpy,set,move) intrinsics, rather than hardcoding them in DAG lowering.
...
llvm-svn: 77586
2009-07-30 09:12:56 +00:00
Evan Cheng
f7ce11cf71
I've changed the semantics of MERGE_VALUES a bit. It's now allowed to live until scheduling. It's deleted when the scheduler translate DAG nodes to machine instructions.
...
This is currently used by X86 to handle atomic_load_add when the output of the node is not used. I believe there is a better solution. But I find MERGE_VALUES useful for selecting multi-output node when the dead output can be selected as a IMPLICIT_DEF.
llvm-svn: 77583
2009-07-30 08:44:08 +00:00
Daniel Dunbar
e8b3236284
Twine: Provide [u]int{32,64} conversions via implicit constructors instead of
...
explicitly.
llvm-svn: 77576
2009-07-30 03:47:15 +00:00
Devang Patel
847fcacd48
Check null NameMDNode elements.
...
llvm-svn: 77559
2009-07-30 01:02:04 +00:00
Devang Patel
27c87fff7f
Read and write NamedMDNode.
...
llvm-svn: 77517
2009-07-29 22:34:41 +00:00
Owen Anderson
4056ca9568
Move types back to the 2.5 API.
...
llvm-svn: 77516
2009-07-29 22:17:13 +00:00
Devang Patel
4a942d0863
There is no need to keep name ref in NamedMDNode.
...
llvm-svn: 77511
2009-07-29 21:58:56 +00:00
Chris Lattner
7667332899
inline the global 'getInstrOperandRegClass' function into its callers
...
now that TargetOperandInfo does the heavy lifting.
llvm-svn: 77508
2009-07-29 21:36:49 +00:00
Chris Lattner
f3239532cc
1. Introduce a new TargetOperandInfo::getRegClass() helper method
...
and convert code to using it, instead of having lots of things
poke the isLookupPtrRegClass() method directly.
2. Make PointerLikeRegClass contain a 'kind' int, and store it in
the existing regclass field of TargetOperandInfo when the
isLookupPtrRegClass() predicate is set. Make getRegClass pass
this into TargetRegisterInfo::getPointerRegClass(), allowing
targets to have multiple ptr_rc things.
llvm-svn: 77504
2009-07-29 21:10:12 +00:00
Chris Lattner
426bc7c0ae
make ptr_rc derive from a new PointerLikeRegClass tblgen class.
...
llvm-svn: 77503
2009-07-29 20:43:05 +00:00
Chris Lattner
ee68a483ec
Give getPointerRegClass() a "kind" value so that targets can
...
support multiple different pointer register classes.
llvm-svn: 77501
2009-07-29 20:31:52 +00:00
Owen Anderson
487375e9a2
Move ConstantExpr to 2.5 API.
...
llvm-svn: 77494
2009-07-29 18:55:55 +00:00
Douglas Gregor
1901e3e165
Fix a typo, and all of its copies
...
llvm-svn: 77489
2009-07-29 18:27:22 +00:00
Douglas Gregor
f5e7c2fbfc
Implement PointerUnion4.
...
llvm-svn: 77487
2009-07-29 18:19:47 +00:00
Devang Patel
18dfdc99af
Keep track of named mdnodes in a Module using an ilist.
...
llvm-svn: 77476
2009-07-29 17:16:17 +00:00
Daniel Dunbar
b5a5de291d
Add missing include.
...
llvm-svn: 77470
2009-07-29 16:45:40 +00:00
Bob Wilson
cf19885a32
Change Neon VLDn intrinsics to return multiple values instead of really
...
wide vectors. Likewise, change VSTn intrinsics to take separate arguments
for each vector in a multi-vector struct. Adjust tests accordingly.
llvm-svn: 77468
2009-07-29 16:39:22 +00:00
David Greene
ea2f1ceb4b
Re-apply previous changes and improve column padding performance some more.
...
llvm-svn: 77461
2009-07-29 16:08:27 +00:00
Devang Patel
b2cde2db67
Fix comment.
...
llvm-svn: 77457
2009-07-29 15:52:49 +00:00
Devang Patel
262922d8d0
trim include list.
...
llvm-svn: 77455
2009-07-29 15:24:54 +00:00
Benjamin Kramer
573720e185
MSVC build fix. Patch by Olaf Krzikalla!
...
llvm-svn: 77450
2009-07-29 11:21:25 +00:00
Daniel Dunbar
b49994ad7e
Twines: Support numeric conversion directly (uitostr, etc).
...
- Provides static constructors for doing number to string conversions without
using temporaries.
- There are several ways to do this, I think given the Twine constraints this
is the simplest one.
- One FIXME for fast number -> hex conversion.
- Added another comment on one last major bit of perf work Twines need, which
is to make raw_svector_ostream more efficient.
llvm-svn: 77445
2009-07-29 07:08:44 +00:00
Andreas Bolka
43797d15fa
Skeleton for pairwise subscript testing.
...
llvm-svn: 77437
2009-07-29 05:35:53 +00:00
Chris Lattner
5034329f8d
pass the mangler down into the various SectionForGlobal methods.
...
No functionality change.
llvm-svn: 77432
2009-07-29 05:09:30 +00:00
Daniel Dunbar
af71a3035b
Revert r77397, it causes significant regressions in llc performance.
...
llvm-svn: 77425
2009-07-29 03:04:22 +00:00
Devang Patel
05a26fb6dd
Add NamedMDNode.
...
llvm-svn: 77409
2009-07-29 00:33:07 +00:00
Eric Christopher
f7802a33ce
Add support for gcc __builtin_ia32_ptest{z,c,nzc} intrinsics. Lower
...
to ptest instruction plus setcc. Revamp ptest instruction. Add test.
llvm-svn: 77407
2009-07-29 00:28:05 +00:00
Daniel Dunbar
0033199c50
Match X86 register names to number.
...
llvm-svn: 77404
2009-07-29 00:02:19 +00:00
David Greene
5f6511c3d5
Improve performance of PadToColumn by eliminating flushes.
...
llvm-svn: 77397
2009-07-28 23:26:34 +00:00
David Greene
1fc3a20ccf
Add some protected interfaces to allow subclass access to the buffer.
...
llvm-svn: 77395
2009-07-28 23:24:58 +00:00
Daniel Dunbar
e1fdb0e8ce
Move X86 instruction parsing into X86/AsmParser.
...
llvm-svn: 77384
2009-07-28 22:40:46 +00:00
Devang Patel
e2d3dd66f1
Clarify getName() comment.
...
llvm-svn: 77383
2009-07-28 22:30:52 +00:00
Daniel Dunbar
c43267a472
Make expression parsing and error/warning reporting available through the
...
generic MCAsmParser interface.
llvm-svn: 77381
2009-07-28 22:22:31 +00:00
Devang Patel
f869caa03f
Remove unused method.
...
llvm-svn: 77378
2009-07-28 22:04:55 +00:00
Bill Wendling
fb5d83fb10
Remove unused parameter name.
...
llvm-svn: 77371
2009-07-28 21:50:32 +00:00
Devang Patel
a4f43fb5dd
Rename MDNode.h header. It defines MDnode and other metadata classes.
...
New name is Metadata.h.
llvm-svn: 77370
2009-07-28 21:49:47 +00:00
Owen Anderson
4aa3295a65
Return ConstantVector to 2.5 API.
...
llvm-svn: 77366
2009-07-28 21:19:26 +00:00
Daniel Dunbar
f59ee96a16
Provide generic MCAsmParser when constructing target specific parsers.
...
llvm-svn: 77362
2009-07-28 20:47:52 +00:00
Devang Patel
1da7555a28
Add DebugInfoEnumerator to collect debug info.
...
llvm-svn: 77360
2009-07-28 19:55:13 +00:00