Daniel Dunbar
a5db9df570
Adjust comment to distinguish between target name and triple target name they
...
match.
llvm-svn: 77908
2009-08-02 19:41:20 +00:00
Jakob Stoklund Olesen
a726715be6
Scavenger asserts.
...
Allow imp-def and imp-use of anything in the scavenger asserts, just like the machine code verifier.
Allow redefinition of a sub-register of a live register.
llvm-svn: 77904
2009-08-02 18:28:41 +00:00
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
Devang Patel
a5ade84704
Clarify getName() comment.
...
llvm-svn: 77383
2009-07-28 22:30:52 +00:00
Daniel Dunbar
ec1ea2e240
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
b784b514a3
Remove unused method.
...
llvm-svn: 77378
2009-07-28 22:04:55 +00:00
Bill Wendling
3a7a0da82d
Remove unused parameter name.
...
llvm-svn: 77371
2009-07-28 21:50:32 +00:00
Devang Patel
cb23671431
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
390e9778d4
Return ConstantVector to 2.5 API.
...
llvm-svn: 77366
2009-07-28 21:19:26 +00:00
Daniel Dunbar
d0d6b26e87
Provide generic MCAsmParser when constructing target specific parsers.
...
llvm-svn: 77362
2009-07-28 20:47:52 +00:00
Devang Patel
5aba07663b
Add DebugInfoEnumerator to collect debug info.
...
llvm-svn: 77360
2009-07-28 19:55:13 +00:00
Andreas Bolka
415bdb47a8
Simplify LDA-internal interface.
...
llvm-svn: 77359
2009-07-28 19:50:13 +00:00
Owen Anderson
aa8c94b051
Change ConstantArray to 2.5 API.
...
llvm-svn: 77347
2009-07-28 18:32:17 +00:00
Daniel Dunbar
6e2f7db6b6
Expose Tokens to target specific assembly parsers.
...
llvm-svn: 77337
2009-07-28 17:58:44 +00:00
Chris Lattner
c74586940a
the apple "ld_classic" linker doesn't support .literal16 in 32-bit
...
mode, and "ld64" (the default linker) falls back to it in -static
mode.
llvm-svn: 77334
2009-07-28 17:50:28 +00:00
Stefanus Du Toit
591ef9fa8c
Include cmath/math.h in DataTypes.h regardless of whether MSVC is being used.
...
Fixes MSVC build of LiveInterval.cpp.
Patch by Nicolas Capens.
llvm-svn: 77317
2009-07-28 13:41:07 +00:00
Chris Lattner
55461787cc
Rip all of the global variable lowering logic out of TargetAsmInfo. Since
...
it is highly specific to the object file that will be generated in the end,
this introduces a new TargetLoweringObjectFile interface that is implemented
for each of ELF/MachO/COFF/Alpha/PIC16 and XCore.
Though still is still a brutal and ugly refactoring, this is a major step
towards goodness.
This patch also:
1. fixes a bunch of dangling pointer problems in the PIC16 backend.
2. disables the TargetLowering copy ctor which PIC16 was accidentally using.
3. gets us closer to xcore having its own crazy target section flags and
pic16 not having to shadow sections with its own objects.
4. fixes wierdness where ELF targets would set CStringSection but not
CStringSection_. Factor the code better.
5. fixes some bugs in string lowering on ELF targets.
llvm-svn: 77294
2009-07-28 03:13:23 +00:00
Daniel Dunbar
3edfc4bb16
llvm-mc: Implement .abort fully in the front end
...
llvm-svn: 77272
2009-07-27 23:20:52 +00:00
Daniel Dunbar
67ac64c7b1
Add a comment on Value explaining the current getName() behavior.
...
llvm-svn: 77269
2009-07-27 22:39:14 +00:00
Owen Anderson
d729f993b8
Move ConstantStruct back to 2.5 API.
...
llvm-svn: 77266
2009-07-27 22:29:26 +00:00
Dan Gohman
490eb36e1d
Add a new keyword 'inbounds' for use with getelementptr. See the
...
LangRef.html changes for details.
llvm-svn: 77259
2009-07-27 21:53:46 +00:00
Daniel Dunbar
5f73e9d3f8
llvm-mc: Move AsmLexer::getCurStrVal to StringRef based API.
...
- My DFS traversal of LLVM is, at least for now, nearly complete! :)
llvm-svn: 77258
2009-07-27 21:49:56 +00:00
Dan Gohman
daf5eafa6a
Order unsigned before signed, for consistency.
...
llvm-svn: 77257
2009-07-27 21:49:34 +00:00
Dan Gohman
40bd748448
Make raw_null_ostream flush its buffer in its destructor, so that
...
it conforms to the assertion added in r77245. This fixes a failure
in qa_override.c in clang's testsuite.
llvm-svn: 77255
2009-07-27 21:46:02 +00:00
Chris Lattner
d519223908
hoist MCContext/MCStreamer up to AsmPrinter since we're going to start creating
...
MCSections soon instead of Section for all targets, and we need something to
own them.
llvm-svn: 77252
2009-07-27 21:28:04 +00:00
Daniel Dunbar
6de68a2544
Move MCContext and friends to StringRef based APIs.
...
llvm-svn: 77251
2009-07-27 21:22:30 +00:00
Chris Lattner
923a453dea
simplify #includes.
...
llvm-svn: 77250
2009-07-27 21:13:35 +00:00
Owen Anderson
256c2c250e
Move ConstantFP construction back to the 2.5-ish API.
...
llvm-svn: 77247
2009-07-27 20:59:43 +00:00
Devang Patel
1706411e39
80 columns!
...
llvm-svn: 77243
2009-07-27 20:30:05 +00:00
Sean Callanan
3b5de0fa36
Thanks, Bill!
...
llvm-svn: 77240
2009-07-27 19:45:28 +00:00
Chris Lattner
674e5fa434
Sink getSectionPrefixForUniqueGlobal down into the TAI
...
implementations that need it, rearrange ELFTAI.
llvm-svn: 77236
2009-07-27 19:14:14 +00:00
Sean Callanan
34d4b90554
Many of Daniel's fixes.
...
I'm returning the number of bytes actually copied so that the client has some
warning when it reads past the end of the buffer.
I'm keeping the distinction between getByte() and getBytes() for now for
subclasses that use functions like ptrace() on Linux and only have a restricted
interface. This makes their implementation easier, and subclasses can always
write a one-line implementation of readByte() that uses their custom
readBytes().
llvm-svn: 77225
2009-07-27 18:33:24 +00:00
Douglas Gregor
ea200f4d3a
CMake configuration: find mkdtemp, mkstemp, mktemp.
...
llvm-svn: 77219
2009-07-27 18:23:41 +00:00
Chris Lattner
12c25bacbd
make COFF work like ELF and macho, by splitting out into its own
...
header even though there is only one COFF target.
llvm-svn: 77204
2009-07-27 16:45:59 +00:00
Chris Lattner
062cc18e39
inline a method.
...
llvm-svn: 77198
2009-07-27 16:27:32 +00:00
Dan Gohman
e999569f50
Fix wording in comments.
...
llvm-svn: 77193
2009-07-27 16:09:48 +00:00
Chris Lattner
cd7d963b75
Eliminate getNamed/getUnnamedSection, adding a new and unified getOrCreateSection
...
instead.
llvm-svn: 77186
2009-07-27 06:17:14 +00:00
Chris Lattner
a2b00bdd7a
Eliminate SectionFlags, just embed a SectionKind into Section
...
instead and drive things based off of that.
llvm-svn: 77184
2009-07-27 05:32:16 +00:00
Chris Lattner
0f4d60ca90
untangle a TargetAsmInfo hack where ELFTargetAsmInfo would create a
...
'unnamed' bss section, but some impls would want a named one. Since
they don't have consistent behavior, just make each target do their
own thing, instead of doing something "sortof common" then having
targets change immutable objects later.
llvm-svn: 77165
2009-07-26 19:23:28 +00:00
Chris Lattner
8e840e942e
Use the RHS length instead of the LHS length. They are both the same,
...
but this ends up compiling code like this:
int foo(const StringRef &R) {
return R == "food";
}
to use a constant sized memcmp instead of a variable memcmp.
llvm-svn: 77160
2009-07-26 17:46:03 +00:00
Daniel Dunbar
4a36d5dcfd
Remove Value::getName{Start,End}, the last of the old Name APIs.
...
llvm-svn: 77152
2009-07-26 09:48:23 +00:00
Daniel Dunbar
64abfd0337
Remove Value::getNameLen
...
llvm-svn: 77148
2009-07-26 08:34:35 +00:00
Daniel Dunbar
75a66c519b
Eliminate some uses of DOUT, cerr, and getNameStart().
...
llvm-svn: 77145
2009-07-26 07:49:05 +00:00
Chris Lattner
9104e8d808
remove a densemap from TargetAsmInfo that was uniquing the targetflags strings,
...
just use a smallstring instead.
llvm-svn: 77144
2009-07-26 07:33:58 +00:00
Chris Lattner
b508741de0
make SectionKind keep track of whether a global had an explicit
...
section specified for it or not.
llvm-svn: 77142
2009-07-26 07:14:28 +00:00
Chris Lattner
41570cf306
make SectionKind know whether a symbol is weak or not in addition
...
to its classification.
llvm-svn: 77140
2009-07-26 07:00:12 +00:00
Chris Lattner
71546b5147
Make the kind actually be private.
...
llvm-svn: 77139
2009-07-26 06:51:27 +00:00
Chris Lattner
61e4445f5a
rename Mergable -> Mergeable and Writable -> Writeable
...
llvm-svn: 77138
2009-07-26 06:48:26 +00:00
Chris Lattner
e2a16438a6
remove a bunch of helper functions, just use SectionKind::get instead.
...
llvm-svn: 77135
2009-07-26 06:34:33 +00:00
Chris Lattner
1f709a74f6
simplify getSectionForMergableConstant to take a SectionKind.
...
llvm-svn: 77134
2009-07-26 06:26:55 +00:00
Chris Lattner
d44b68fbeb
precreate 4/8/16 byte mergable sections to simplify code.
...
llvm-svn: 77133
2009-07-26 06:16:11 +00:00
Chris Lattner
e8b2f94ce2
introduce specialized mergable const sectionkinds for elements of size 4/8/16 to
...
simplify targets.
llvm-svn: 77132
2009-07-26 06:11:33 +00:00
Chris Lattner
b3d6d59c10
Rearrange all the SectionKinds and structure them into a hierarchical
...
group instead of a bunch of random unrelated ideas. Provide predicates
to categorize a SectionKind into a group, and use them instead of
getKind() throughout the code.
This also renames a ton of SectionKinds to be more consistent and
evocative, and adds a huge number of comments on the enums so that
I will hopefully be able to remember how this stuff works long from
now.
llvm-svn: 77129
2009-07-26 05:44:20 +00:00
Daniel Dunbar
a7a01acc7c
Factor commonality in triple match routines into helper template for registering
...
classes, and migrate existing targets over.
llvm-svn: 77126
2009-07-26 05:03:33 +00:00
Daniel Dunbar
1c59fa86e2
Oops, forgot XCore. Sorry XCore!
...
llvm-svn: 77125
2009-07-26 04:52:45 +00:00
Daniel Dunbar
6b705e3a64
Update for API change.
...
llvm-svn: 77124
2009-07-26 04:23:03 +00:00
Chris Lattner
809a525ffa
fix isReadOnly predicate to not include data that has to be
...
writable because of teh dynamic linker.
llvm-svn: 77122
2009-07-26 04:18:10 +00:00
Chris Lattner
f67024bb1c
remove a dead enum case.
...
llvm-svn: 77121
2009-07-26 04:09:02 +00:00
Daniel Dunbar
5a9d56ab90
Update Triple to use StringRef/Twine based APIs.
...
- This is now shorter, simpler, safer, and more efficient, what a deal.
llvm-svn: 77119
2009-07-26 03:31:47 +00:00
Daniel Dunbar
b97f9fc3f5
Add StringRef::{slice, split}, two convenient string operations which are simple
...
and efficient on a StringRef.
llvm-svn: 77117
2009-07-26 03:18:15 +00:00
Chris Lattner
5547fd80ad
put normal data into .data instead of .data.rel on elf systems.
...
llvm-svn: 77116
2009-07-26 03:06:11 +00:00
Daniel Dunbar
49987490c2
Kill Target specific ModuleMatchQuality stuff.
...
- This was overkill and inconsistently implemented.
llvm-svn: 77114
2009-07-26 02:22:58 +00:00
Daniel Dunbar
62e74f03c7
Add TargetRegistry::lookupTarget.
...
- This is a simplified mechanism which just looks up a target based on the
target triple, with a few additional flags.
- Remove getClosestStaticTargetForModule, the moral equivalent is now:
lookupTarget(Mod->getTargetTriple, true, false, ...);
- This no longer does the fuzzy matching with target data (based on endianness
and pointer width) that getClosestStaticTargetForModule was doing, but this
was deemed unnecessary.
llvm-svn: 77111
2009-07-26 02:12:58 +00:00
Chris Lattner
9cd489c7f1
finish simplifying DarwinTargetAsmInfo::SelectSectionForGlobal
...
for now. Make the section switching directives more consistent
by not including \n and including \t for them all.
llvm-svn: 77107
2009-07-26 01:24:18 +00:00
Daniel Dunbar
3c3f0d5b63
Some clients rely on getName{Start,End} not returning 0, even if the length is
...
0.
- I could have swore the prev change went through a make check cycle...
llvm-svn: 77106
2009-07-26 01:04:10 +00:00
Daniel Dunbar
518cd20f61
Rewrite getName{Start,End,Len} in terms of getName(), instead of vice-versa.
...
llvm-svn: 77105
2009-07-26 00:51:56 +00:00
Chris Lattner
259c4e4a55
simplify some predicates, add isMergableString()
...
llvm-svn: 77103
2009-07-26 00:50:43 +00:00
Daniel Dunbar
3e85b410ab
Remove Value::setName(const char*, unsigned).
...
llvm-svn: 77100
2009-07-26 00:34:27 +00:00
Daniel Dunbar
c1ab70760a
Remove Value::setName(const char*).
...
- Split into a separate patch because there is a slight functionality change,
it is no longer valid to call setName(0), which was equivalent to
setName(""). I'm hoping no one depends on this...
llvm-svn: 77099
2009-07-26 00:17:14 +00:00
Daniel Dunbar
038a7f0d35
Remove Value::{isName, getNameRef}.
...
Also, change MDString to use a StringRef.
llvm-svn: 77098
2009-07-25 23:55:21 +00:00
Chris Lattner
fda0ca90c1
make SectionKind be a first-class pod struct instead of just
...
an enum.
llvm-svn: 77096
2009-07-25 23:21:55 +00:00
Chris Lattner
15b3d2039f
this is (unfortunately) several changes mixed together:
...
1. Spell SectionFlags::Writeable as "Writable".
2. Add predicates for deriving SectionFlags from SectionKinds.
3. Sink ELF-specific getSectionPrefixForUniqueGlobal impl into
ELFTargetAsmInfo.
4. Fix SectionFlagsForGlobal to know that BSS/ThreadBSS has the
BSS bit set (the real fix for PR4619).
5. Fix isSuitableForBSS to not put globals with explicit sections
set in BSS (which was the reason #4 wasn't fixed earlier).
6. Remove my previous hack for PR4619.
llvm-svn: 77085
2009-07-25 18:57:34 +00:00
Chris Lattner
edbf2e64cb
document some invariants.
...
llvm-svn: 77084
2009-07-25 18:11:58 +00:00
Dan Gohman
4a193ce478
Fix a few comments to say "backedge-taken count" instead of
...
"trip count".
llvm-svn: 77081
2009-07-25 16:18:38 +00:00
Dan Gohman
cb1390f7ed
Update comments to new-style syntax.
...
llvm-svn: 77079
2009-07-25 16:03:55 +00:00
Dan Gohman
8d8a8adebf
Remove spurious semicolons.
...
llvm-svn: 77077
2009-07-25 16:00:54 +00:00
Daniel Dunbar
d699ffc2ac
Simplify JIT target selection.
...
- Instead of requiring targets to define a JIT quality match function, we just
have them specify if they support a JIT.
- Target selection for the JIT just gets the host triple and looks for the best
target which matches the triple and has a JIT.
llvm-svn: 77060
2009-07-25 10:09:50 +00:00
Daniel Dunbar
284fe09fe4
Add new helpers for registering targets.
...
- Less boilerplate == good.
llvm-svn: 77052
2009-07-25 06:49:55 +00:00
Daniel Dunbar
9f50ab3c49
Finish migrating VMCore to StringRef/Twine based APIs.
...
llvm-svn: 77051
2009-07-25 06:02:13 +00:00
Daniel Dunbar
251177c96e
Initial update to VMCore to use Twines for string arguments.
...
- The only meat here is in Value.{h,cpp} the rest is essential 'const
std::string &' -> 'const Twine &'.
llvm-svn: 77048
2009-07-25 04:41:11 +00:00
Eric Christopher
df9c86fc26
Move ExtractElementInst to ::Create instead of new. Update all uses.
...
llvm-svn: 77044
2009-07-25 02:28:41 +00:00
Dan Gohman
fdf1a11a27
Convert a few more uses of llvm/Support/Streams.h to raw_ostream.
...
llvm-svn: 77033
2009-07-25 01:13:51 +00:00
Dan Gohman
a823846bd1
Instead of eagerly creating new SCEVs to replace all SCEVs that are
...
affected after a PHI node has been analyzed, just remove affected
SCEVs from the Scalars map, so that they'll be (lazily) recreated as
needed. This avoids creating SCEV objects that aren't actually needed.
Also, rewrite the associated def-use walking code to be non-recursive
and to continue traversing past Instructions that don't have an
entry in the Scalars map.
llvm-svn: 77032
2009-07-25 01:13:03 +00:00
Dan Gohman
acc5d6eaae
Make AliasAnalysis and related classes use
...
getAnalysisIfAvailable<TargetData>().
llvm-svn: 77028
2009-07-25 00:48:42 +00:00
Jeffrey Yasskin
da42799098
Add a missing ilist_node.h #include to SparseBitVector, and add a very short
...
test for it. The test is by no means complete, but it tests the problem I was
fixing.
llvm-svn: 77025
2009-07-25 00:33:57 +00:00
Sean Callanan
555ef2f462
MemoryObject - Abstract base class for contiguous addressable memory.
...
Necessary for cases in which the memory is in another process, in a
file, or on a remote machine.
The primary use for this is the llvm-mc disassemblers, so that they
can be targeted at arbitrary objects, not just in-process memory.
llvm-svn: 77023
2009-07-25 00:30:51 +00:00
Andreas Bolka
4e68450b70
Forward-declare raw_ostream.
...
llvm-svn: 77014
2009-07-24 23:19:28 +00:00
Owen Anderson
cc33e89571
Revert the ConstantInt constructors back to their 2.5 forms where possible, thanks to contexts-on-types. More to come.
...
llvm-svn: 77011
2009-07-24 23:12:02 +00:00
Chris Lattner
50d9b68935
fix some predicates
...
llvm-svn: 76999
2009-07-24 20:27:11 +00:00
Chris Lattner
89b6f54999
change SectionKindForGlobal from being a public (and
...
previously virtual) function to being a static function
in the .cpp file.
llvm-svn: 76997
2009-07-24 20:14:10 +00:00
Chris Lattner
3d63455016
make SectionKindForGlobal target independent, and therefore non-virtual.
...
It's classifications now include elf-specific discriminators. Targets
that don't have these features (like darwin and pecoff) simply treat
data.rel like data, etc.
llvm-svn: 76993
2009-07-24 19:15:47 +00:00
Chris Lattner
5af94066ee
we already know the sectionkind when invoking SelectSectionForGlobal,
...
pass it in instead of recomputing it.
llvm-svn: 76990
2009-07-24 18:42:53 +00:00
Chris Lattner
cc951ce3cb
make SectionForGlobal non-virtual, add a hook for pic16 to do its "address=" hack.
...
llvm-svn: 76989
2009-07-24 18:34:27 +00:00
Jakob Stoklund Olesen
5ca1bdc613
Add support for promoting SETCC operations.
...
llvm-svn: 76987
2009-07-24 18:22:59 +00:00
Dan Gohman
f1a01b8cc0
Convert several more passes to use getAnalysisIfAvailable<TargetData>()
...
instead of getAnalysis<TargetData>().
llvm-svn: 76982
2009-07-24 18:13:53 +00:00
Dan Gohman
beb449460a
Add specific classes for Add, Sub, and Mul, for convenience.
...
llvm-svn: 76981
2009-07-24 18:12:25 +00:00
Chris Lattner
37abb9f4ba
move ELF-specific code into ELFTargetAsmInfo.
...
llvm-svn: 76976
2009-07-24 17:02:17 +00:00
Chris Lattner
6e4d35f825
make SectionFlagsForGlobal a private static function instead of a public
...
virtual one.
llvm-svn: 76973
2009-07-24 16:46:50 +00:00
Daniel Dunbar
339c88008f
Move more to raw_ostream, provide support for writing MachineBasicBlock,
...
LiveInterval, etc to raw_ostream.
llvm-svn: 76965
2009-07-24 10:36:58 +00:00
Daniel Dunbar
1df20e31e5
Move to raw_ostream.
...
llvm-svn: 76963
2009-07-24 09:53:24 +00:00
Daniel Dunbar
076387bcc0
Allow llvm_report_error to accept a Twine.
...
llvm-svn: 76961
2009-07-24 07:58:10 +00:00
Eli Friedman
1be7dfb1aa
Remove unused member functions.
...
llvm-svn: 76960
2009-07-24 07:43:59 +00:00
Daniel Dunbar
4da6a69a7c
Fix constructor types
...
llvm-svn: 76958
2009-07-24 07:12:20 +00:00
Daniel Dunbar
6f78d7ac27
Add Twine ADT.
...
- Not currently used.
llvm-svn: 76956
2009-07-24 07:04:27 +00:00
Chris Lattner
d087574dc5
Implement getSectionPrefixForUniqueGlobal to return null, indicating that
...
darwin does it's own unique and special and wonderful thing.
llvm-svn: 76952
2009-07-24 05:02:38 +00:00
Chris Lattner
4bb9a9a7d3
Replace UniqueSectionForGlobal with getSectionPrefixForUniqueGlobal.
...
The later doesn't depend on any crazy LLVM IR stuff, and this
pulls the concatenation of prefix with GV name (the root problem behind
PR4584) out one level.
llvm-svn: 76948
2009-07-24 04:49:34 +00:00
Chris Lattner
a82421ce2f
document SectionFlags::Named better and make it more easily greppable by
...
eliminating isNamed.
llvm-svn: 76946
2009-07-24 04:26:19 +00:00
Chris Lattner
13611a24d8
use section flags more correctly.
...
llvm-svn: 76944
2009-07-24 04:08:17 +00:00
Chris Lattner
2cae10056c
make Constant::getRelocationInfo return an enum, as suggested by Duncan.
...
llvm-svn: 76938
2009-07-24 03:27:21 +00:00
Chris Lattner
b7fcec2e8c
remove more bits of small section support.
...
llvm-svn: 76937
2009-07-24 03:16:53 +00:00
Chris Lattner
09511ed243
Remove SectionKind::Small*. This was only used on mips, and is apparently
...
a sad mistake that is regretted. :)
llvm-svn: 76935
2009-07-24 03:11:51 +00:00
Dan Gohman
8390742672
Give SCEVAddRecExpr no-signed-overflow and no-unsigned-overflow flags.
...
llvm-svn: 76928
2009-07-24 01:01:06 +00:00
Dan Gohman
7b9e8b26db
Give the SCEV class a SubclassData field.
...
llvm-svn: 76927
2009-07-24 00:59:53 +00:00
Dan Gohman
fba3931c31
Fix whitespace.
...
llvm-svn: 76926
2009-07-24 00:55:33 +00:00
Owen Anderson
be00de7dfe
Privatize the ConstantVector tables.
...
llvm-svn: 76922
2009-07-24 00:36:24 +00:00
Dan Gohman
62c8b40b66
Remove the IA-64 backend.
...
llvm-svn: 76920
2009-07-24 00:30:09 +00:00
Owen Anderson
d449007c92
Privatize the ConstantStruct table.
...
llvm-svn: 76912
2009-07-23 23:25:33 +00:00
David Greene
d40b2dbb34
Write space padding as one string to speed up comment printing.
...
llvm-svn: 76910
2009-07-23 23:21:10 +00:00
Reid Kleckner
3f197c850d
Re-committing r76828 with the JIT memory manager changes now that the build
...
bots like the BumpPtrAllocator changes.
llvm-svn: 76902
2009-07-23 21:46:56 +00:00
Duncan Sands
5ccc1b7589
Fix PR4614: the Intel C compiler defines _GNUC__
...
but does not provide __builtin_bswap32/64.
llvm-svn: 76896
2009-07-23 19:08:27 +00:00
Daniel Dunbar
4499c47ea4
Switch ValueSymbolTable to StringRef based API.
...
llvm-svn: 76894
2009-07-23 18:52:12 +00:00
Daniel Dunbar
00155504f8
Add llvm::Value::getNameRef, for help in API migration.
...
llvm-svn: 76893
2009-07-23 18:50:53 +00:00
Reid Kleckner
5a7816053e
Re-committing changes from r76825 to BumpPtrAllocator with a fix and tests for
...
an off-by-one error.
llvm-svn: 76891
2009-07-23 18:34:13 +00:00
Daniel Dunbar
b5adc13728
Convert StringMap to using StringRef for its APIs.
...
- Yay for '-'s and simplifications!
- I kept StringMap::GetOrCreateValue for compatibility purposes, this can
eventually go away. Likewise the StringMapEntry Create functions still follow
the old style.
- NIFC.
llvm-svn: 76888
2009-07-23 18:17:34 +00:00
Andrew Lenharth
68bb9003af
emit simple node was using different labels for fields than the rest of the graph writter
...
llvm-svn: 76879
2009-07-23 15:24:38 +00:00
Andreas Bolka
f0462da445
Cache dependence computation using FoldingSet.
...
This introduces an LDA-internal DependencePair class. The intention is,
that this is a place where dependence testers can store various results
such as SCEVs describing conflicting iterations, breaking conditions,
distance/direction vectors, etc.
llvm-svn: 76877
2009-07-23 14:32:46 +00:00
Chris Lattner
d9b9012f9b
enhance DepthFirstIterator to support more robust operations in the face
...
of code mutating the graph while it is being traversed. Patch by
Olaf Krzikalla!
llvm-svn: 76869
2009-07-23 06:30:28 +00:00
Chris Lattner
4fb5fa5156
remove a really old and dead header
...
llvm-svn: 76855
2009-07-23 04:59:02 +00:00
Devang Patel
45ce5c2ac1
MDString
...
- Rename member function size(). New name is length().
- Store string beginning and length. Earlier it used to store string end.
llvm-svn: 76841
2009-07-23 02:00:51 +00:00
Andreas Bolka
b33d956e21
Minor cosmetics: indentation, formatting, naming.
...
llvm-svn: 76839
2009-07-23 01:57:06 +00:00
Reid Kleckner
6f9bf7f028
Reverting r76825 and r76828, since they caused clang runtime errors and some build failure involving memset.
...
llvm-svn: 76838
2009-07-23 01:40:54 +00:00
Devang Patel
a682c04744
Hide constructors.
...
llvm-svn: 76835
2009-07-23 01:19:53 +00:00
Devang Patel
6b2162686a
Derive MDNode from MetadataBase instead of Constant. Emit MDNodes into METADATA_BLOCK in bitcode file.
...
llvm-svn: 76834
2009-07-23 01:07:34 +00:00
Reid Kleckner
b500f07edf
Make the JIT code emitter properly retry and ask for more memory when it runs
...
out of memory, and also make the default memory manager allocate more memory
when it runs out.
Also, switch function stubs and global data over to using the BumpPtrAllocator.
This makes it so the JIT no longer mmaps (or the equivalent on Windows) 16 MB
of memory, and instead allocates in 512K slabs. I suspect this size could go
lower, especially on embedded platforms, now that more slabs can be allocated.
llvm-svn: 76828
2009-07-23 00:49:59 +00:00
Reid Kleckner
4c892c05ec
Parameterize the BumpPtrAllocator over a slab allocator. It defaults to using
...
malloc, so there should be no functional changes to other code.
These changes are necessary since I have plans to use this allocator in the JIT
memory manager, and it needs a special allocator.
I also added some tests which helped me pinpoint some bugs.
llvm-svn: 76825
2009-07-23 00:30:41 +00:00
Chris Lattner
a3b58f4ecd
remove SectionFlags::Small: it is only used on Xcore, and we'll find
...
a better solution for it in the future.
llvm-svn: 76818
2009-07-22 23:27:22 +00:00
David Greene
fede97eac6
Constify the key in Mi2IndexMap.
...
llvm-svn: 76801
2009-07-22 21:56:14 +00:00
Daniel Dunbar
d247ca6f40
Define npos in a way that should make MSVC happier.
...
llvm-svn: 76785
2009-07-22 21:08:31 +00:00
David Greene
76d89c51ce
Put comment printing under asm-verbose.
...
llvm-svn: 76780
2009-07-22 20:33:26 +00:00
David Greene
7f92a15a4b
Make some changes suggested by Bill and Evan.
...
llvm-svn: 76775
2009-07-22 20:08:25 +00:00
Devang Patel
a047636be2
Add replaceAllUsesWith() to FE replace debug info constructs while building complex types.
...
llvm-svn: 76765
2009-07-22 18:23:44 +00:00
Devang Patel
5794cb80ad
Introduce MetadataBase, a base class for MDString and MDNode.
...
Derive MDString directly from MetadataBase.
Introduce new bitcode block to hold metadata.
llvm-svn: 76759
2009-07-22 17:43:22 +00:00
Daniel Dunbar
6bbe0f1151
Support writing a StringRef to a raw_ostream directly.
...
llvm-svn: 76754
2009-07-22 17:13:20 +00:00
Torok Edwin
f2850cd59e
Remove a comment that was copy+pasted from the wrong place,
...
there is no MachineFunction here.
llvm-svn: 76734
2009-07-22 10:49:23 +00:00
Eli Friedman
afa968914c
Attempt to fix BuildBot breakage with MSVC.
...
llvm-svn: 76722
2009-07-22 05:06:41 +00:00
Eric Christopher
2c688c183d
Remove intrinsic support for __builtin_ia32_vec_set_v16qi and
...
__builtin_ia32_vec_set_v4si as these should be lowered in the
front-end to inserts.
llvm-svn: 76714
2009-07-22 01:11:48 +00:00
Chris Lattner
2ef030ec2e
inline the two MergeableConstSection implementations into their
...
only caller.
llvm-svn: 76710
2009-07-22 00:47:11 +00:00
Chris Lattner
e2bd5bc939
remove the SelectSectionForMachineConst hook, replacing it with
...
a new getSectionForMergableConstant hook. This removes one dependence
of TAI on Type, and provides the hook with enough info to make the
right decision based on whether the global has relocations etc.
llvm-svn: 76705
2009-07-22 00:28:43 +00:00
Evan Cheng
82499c09ff
Let each target determines whether a machine instruction is dead. If true, that allows late codeine passes to delete it.
...
This is considered a workaround. The problem is some targets are not modeling side effects correctly. PPC is apparently one of those. This patch allows ppc llvm-gcc to bootstrap on Darwin. Once we find out which instruction definitions are wrong, we can remove the PPCInstrInfo workaround.
llvm-svn: 76703
2009-07-22 00:25:27 +00:00
Owen Anderson
cc287b28c9
Get rid of the Pass+Context magic.
...
llvm-svn: 76702
2009-07-22 00:24:57 +00:00
Chris Lattner
48dffde0d7
reimplement Constant::ContainsRelocations as
...
Constant::getRelocationInfo(), which has a much simpler
to use API. It still should not be part of libvmcore, but
is better than it was. Also teach it to be smart about
hidden visibility.
llvm-svn: 76700
2009-07-22 00:05:44 +00:00