Jakob Stoklund Olesen
23ad8d1848
Add some basic blackfin intrinsics.
...
llvm-svn: 77903
2009-08-02 18:28:11 +00:00
Jakob Stoklund Olesen
e7eb74ef39
Analog Devices Blackfin back-end.
...
Generate code for the Blackfin family of DSPs from Analog Devices:
http://www.analog.com/en/embedded-processing-dsp/blackfin/processors/index.html
We aim to be compatible with the exsisting GNU toolchain found at:
http://blackfin.uclinux.org/gf/project/toolchain
The back-end is experimental.
llvm-svn: 77897
2009-08-02 17:32:10 +00:00
Benjamin Kramer
c2015778ee
Remove duplicated colons and spaces.
...
llvm-svn: 77892
2009-08-02 12:13:02 +00:00
Chris Lattner
738a9ba448
move dwarf debug info section selection stuff from TAI to
...
TLOF, unifying all the dwarf targets at the same time.
llvm-svn: 77889
2009-08-02 07:24:22 +00:00
Chris Lattner
6f4a366e35
convert EHFrameSection to be managed by TLOF instead of TAI.
...
llvm-svn: 77888
2009-08-02 06:52:36 +00:00
Chris Lattner
c388490738
Move the getInlineAsmLength virtual method from TAI to TII, where
...
the only real caller (GetFunctionSizeInBytes) uses it.
The custom ARM implementation of this is basically reimplementing
an assembler poorly for negligible gain. It should be removed
IMNSHO, but I'll leave that to ARMish folks to decide.
llvm-svn: 77877
2009-08-02 05:20:37 +00:00
Chris Lattner
7228c69cb7
move a virtual method body to its .cpp file to avoid a #include
...
in a header.
llvm-svn: 77874
2009-08-02 04:58:19 +00:00
Chris Lattner
f13912f657
remove the dead ELFTargetAsmInfo.h/cpp file. TargetAsmInfo
...
defaults to being ELF.
llvm-svn: 77866
2009-08-02 04:33:09 +00:00
Chris Lattner
b5ceb50677
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
c897539adf
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
d2477587b9
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
1c44a63eba
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
06d8ca1f56
convert ctors/dtors section to be in TLOF instead of
...
TAI.
llvm-svn: 77842
2009-08-02 00:34:36 +00:00
Daniel Dunbar
8a0b05b396
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
8cb3189438
make SectionKind::Kind completely private now.
...
llvm-svn: 77836
2009-08-02 00:04:12 +00:00
Chris Lattner
506b49ffa0
Make SectionKind::get() private.
...
llvm-svn: 77835
2009-08-02 00:02:44 +00:00
Chris Lattner
05334af883
(re)introduce new simpler apis for creation sectionkinds.
...
llvm-svn: 77834
2009-08-01 23:57:16 +00:00
Chris Lattner
81229d1bed
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
4cbb1c0c3f
REmove dead fields of TAI.
...
llvm-svn: 77820
2009-08-01 22:40:22 +00:00
Chris Lattner
0106f7031b
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
2a9d51b703
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
2f8fcad7cf
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
3b05aaef0b
Minor whitespace tidiness.
...
llvm-svn: 77807
2009-08-01 21:25:46 +00:00
Chris Lattner
45a786d25d
with the previous refactoring, fixme fixed!
...
llvm-svn: 77805
2009-08-01 21:21:43 +00:00
Chris Lattner
79e9585304
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
c4369ff556
Use the default copy ctor and copy-assignment operators.
...
llvm-svn: 77793
2009-08-01 19:11:31 +00:00
Chris Lattner
04ae6629fe
All MCSections are now required to have a SectionKind.
...
llvm-svn: 77787
2009-08-01 18:25:49 +00:00
Dan Gohman
74b8f449e7
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
b29794d828
Make default ctor for ImmutableSet::iterator public.
...
llvm-svn: 77762
2009-08-01 01:28:23 +00:00
Owen Anderson
5370346117
Privatize all but one of the remaining constant tables.
...
llvm-svn: 77748
2009-07-31 22:45:43 +00:00
Mikhail Glushenkov
89b10452e1
Add a warning.
...
llvm-svn: 77746
2009-07-31 22:24:20 +00:00
David Greene
543296ed84
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
e150b07b71
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
882b1208e1
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
034ab4f8b1
Move the metadata constructors back to 2.5 syntax.
...
llvm-svn: 77733
2009-07-31 21:35:40 +00:00
Chris Lattner
48bdeff884
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
1dc40e205b
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
481c23300a
Fix a typo in a comment.
...
llvm-svn: 77715
2009-07-31 19:26:54 +00:00
Dan Gohman
44beb18a99
Delete spurious semicolons.
...
llvm-svn: 77712
2009-07-31 18:59:29 +00:00
Benjamin Kramer
8c6602e3ea
Fix build.
...
llvm-svn: 77711
2009-07-31 18:58:46 +00:00
Chris Lattner
75b7692e66
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
c4f0d838a9
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
dcc00a2e5c
MachineFunction no longer needs Annotation.
...
llvm-svn: 77704
2009-07-31 18:35:51 +00:00
Dan Gohman
173cfdc02f
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
0f6a4a4daa
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
34cec19943
Process DbgDeclareInst.
...
llvm-svn: 77694
2009-07-31 18:18:52 +00:00
Dan Gohman
3d7cadb0c2
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
f28b3bb262
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
c156a00641
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
d0e6352c97
Move getTrue() and getFalse() to 2.5-like APIs.
...
llvm-svn: 77685
2009-07-31 17:39:07 +00:00
Chris Lattner
a682cb61e7
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
fe45761455
move the sectionkind and section classes to TargetLoweringObjectFile.h
...
llvm-svn: 77681
2009-07-31 16:47:16 +00:00
Chris Lattner
610dfdece7
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
60d71a790c
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
645f1122c0
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
343bc16228
Add getOrInsertNamedMetadata().
...
llvm-svn: 77646
2009-07-30 23:59:04 +00:00
Devang Patel
5fb5ef77e3
Add addElement().
...
llvm-svn: 77645
2009-07-30 23:57:23 +00:00
Lang Hames
bf6e087067
Removed the BigBlock register allocator.
...
llvm-svn: 77640
2009-07-30 23:18:43 +00:00
Owen Anderson
93ccaf5c60
Move more code back to 2.5 APIs.
...
llvm-svn: 77635
2009-07-30 23:03:37 +00:00
Daniel Dunbar
298e11de31
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
30dfed41b8
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
659a82fe31
Fix MetadataBase::classof().
...
Thanks Benjamin Kramer!
llvm-svn: 77618
2009-07-30 18:45:09 +00:00
Daniel Dunbar
edd0313a36
Twine: Use raw_ostream::write_hex, remove unused itohexstr method.
...
llvm-svn: 77617
2009-07-30 18:30:19 +00:00
Devang Patel
ab56b759af
s/DebugInfoEnumerator/DebugInfoFinder/g
...
llvm-svn: 77615
2009-07-30 18:25:15 +00:00
Daniel Dunbar
79e9ed1d26
Add raw_ostream::write_hex
...
llvm-svn: 77614
2009-07-30 18:21:23 +00:00
Daniel Dunbar
3db25114f0
Remove itohexstr, which only had one user.
...
llvm-svn: 77613
2009-07-30 18:18:54 +00:00
Daniel Dunbar
81f704c26a
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
751490b934
walk DbgRegionStartInst and DbgRegionEndInst
...
llvm-svn: 77604
2009-07-30 17:30:23 +00:00
Devang Patel
cef1863706
Fix comment.
...
llvm-svn: 77603
2009-07-30 17:25:33 +00:00
Sanjiv Gupta
b2aad805e0
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
c6c5c4b074
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
4d8b1776b4
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
efd06c46c7
Check null NameMDNode elements.
...
llvm-svn: 77559
2009-07-30 01:02:04 +00:00
Devang Patel
d5b7c64109
Read and write NamedMDNode.
...
llvm-svn: 77517
2009-07-29 22:34:41 +00:00
Owen Anderson
881d928f9b
Move types back to the 2.5 API.
...
llvm-svn: 77516
2009-07-29 22:17:13 +00:00
Devang Patel
c8dfc60e5e
There is no need to keep name ref in NamedMDNode.
...
llvm-svn: 77511
2009-07-29 21:58:56 +00:00
Chris Lattner
613f031b68
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
6c284cc8cd
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
adc9ad97f7
make ptr_rc derive from a new PointerLikeRegClass tblgen class.
...
llvm-svn: 77503
2009-07-29 20:43:05 +00:00
Chris Lattner
18af1b233a
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
0ce2151b36
Move ConstantExpr to 2.5 API.
...
llvm-svn: 77494
2009-07-29 18:55:55 +00:00
Douglas Gregor
7bc7d66441
Fix a typo, and all of its copies
...
llvm-svn: 77489
2009-07-29 18:27:22 +00:00
Douglas Gregor
9072f2cd18
Implement PointerUnion4.
...
llvm-svn: 77487
2009-07-29 18:19:47 +00:00
Devang Patel
6bc0c66630
Keep track of named mdnodes in a Module using an ilist.
...
llvm-svn: 77476
2009-07-29 17:16:17 +00:00
Daniel Dunbar
8f43b0796e
Add missing include.
...
llvm-svn: 77470
2009-07-29 16:45:40 +00:00
Bob Wilson
355e0b70e0
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
04545750d9
Re-apply previous changes and improve column padding performance some more.
...
llvm-svn: 77461
2009-07-29 16:08:27 +00:00
Devang Patel
9f33cb6583
Fix comment.
...
llvm-svn: 77457
2009-07-29 15:52:49 +00:00
Devang Patel
52511c6064
trim include list.
...
llvm-svn: 77455
2009-07-29 15:24:54 +00:00
Benjamin Kramer
cec5b84b92
MSVC build fix. Patch by Olaf Krzikalla!
...
llvm-svn: 77450
2009-07-29 11:21:25 +00:00
Daniel Dunbar
d13fcdaae5
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
eb2d2f79b8
Skeleton for pairwise subscript testing.
...
llvm-svn: 77437
2009-07-29 05:35:53 +00:00
Chris Lattner
5c3e1e0d0c
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
02fa03ef37
Revert r77397, it causes significant regressions in llc performance.
...
llvm-svn: 77425
2009-07-29 03:04:22 +00:00
Devang Patel
8ed4662148
Add NamedMDNode.
...
llvm-svn: 77409
2009-07-29 00:33:07 +00:00
Eric Christopher
c7b97d1f03
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
a364079155
Match X86 register names to number.
...
llvm-svn: 77404
2009-07-29 00:02:19 +00:00
David Greene
6c6f368805
Improve performance of PadToColumn by eliminating flushes.
...
llvm-svn: 77397
2009-07-28 23:26:34 +00:00
David Greene
6098de1019
Add some protected interfaces to allow subclass access to the buffer.
...
llvm-svn: 77395
2009-07-28 23:24:58 +00:00
Daniel Dunbar
4ed0e9b76c
Move X86 instruction parsing into X86/AsmParser.
...
llvm-svn: 77384
2009-07-28 22:40:46 +00:00