Daniel Dunbar
561f55c1af
MC: Eliminate MCSectionData::{,Address,File}Size, which can now be computed by
...
utility functions.
llvm-svn: 103695
2010-05-13 03:19:50 +00:00
Daniel Dunbar
3fc379596a
MC: Add MCAlignFragment::OnlyAlignAddress bit. This is a bit of magic that says the align fragment shouldn't contribute to the logical section size, it is will be used for cleaning up the code to handle section alignment.
...
llvm-svn: 103690
2010-05-13 01:10:26 +00:00
Daniel Dunbar
ec3a2ac5ed
MC: Add MCSectionData::AddressSize, which is the size of the address space consumed by the section. This can differ from both the section logical size, and the section size on disk (although the current code handles this without making an explicit distinction).
...
llvm-svn: 103689
2010-05-13 01:10:22 +00:00
Daniel Dunbar
de7caed021
MC: Move MCAlignFragment::EmitNops value out of the constructor.
...
llvm-svn: 103665
2010-05-12 22:56:23 +00:00
Daniel Dunbar
cf11e2a0a5
MC: Eliminate MCZeroFillFragment, it is no longer needed.
...
llvm-svn: 103664
2010-05-12 22:51:38 +00:00
Daniel Dunbar
08bcc3a6fc
MC: Switch MCFillFragment to storing total fill size instead of a count. This allows using ValueSize==0 to represent a virtual fill.
...
llvm-svn: 103662
2010-05-12 22:51:32 +00:00
Daniel Dunbar
d3f60794d8
MC: Drop support for alignment in ZeroFill fragment, we can just use
...
MCAlignFragments for this.
llvm-svn: 103661
2010-05-12 22:51:27 +00:00
Nick Lewycky
b5bf752087
Clear CachedFunctionInfo upon Pass::releaseMemory. Because ValueMap will abort
...
on RAUW of functions, this is a correctness issue instead of a mere memory
usage problem.
No testcase until the new MergeFunctions can land.
llvm-svn: 103653
2010-05-12 21:48:15 +00:00
Daniel Dunbar
6a495507e5
MC: Factor out MCAssembler::LayoutFragment
...
llvm-svn: 103649
2010-05-12 21:35:25 +00:00
Daniel Dunbar
78bb7f4dc9
ADT: Add ilist_node::get{Prev,Next}Node, which return the adjacent node or null.
...
- This provides a convenient alternative to using something llvm::prior or
manual iterator access, for example::
if (T *Prev = foo->getPrevNode())
...
instead of::
iterator it(foo);
if (it != begin()) {
--it;
...
}
- Chris, please review.
llvm-svn: 103647
2010-05-12 21:35:19 +00:00
Daniel Dunbar
7b72c3c7a0
MC: Simplify LayoutSection to just take the index of the section to layout.
...
llvm-svn: 103627
2010-05-12 17:56:47 +00:00
Daniel Dunbar
adca38558e
MC: Track section layout order explicitly, and use to simplify.
...
llvm-svn: 103616
2010-05-12 15:42:59 +00:00
Rafael Espindola
3efc86abab
Add support for movi32 of global values to the new (MC) asm printer.
...
llvm-svn: 103576
2010-05-12 05:16:34 +00:00
Nathan Jeffords
2c2c69c075
Added a trivial function to modify the flags field of MCSymbolData class. The function takes the value and a mask, and clears the mask bits before applying the value.
...
llvm-svn: 103534
2010-05-12 00:52:54 +00:00
Daniel Dunbar
e5a79692cf
MC/Mach-O/x86_64: Add a new hook for checking whether a particular section can
...
be diced into atoms, and adjust getAtom() to take this into account.
- This fixes relocations to symbols in fixed size literal sections, for
example.
llvm-svn: 103532
2010-05-12 00:38:17 +00:00
Dan Gohman
03e407ed83
Add initial kill flag support to FastISel.
...
llvm-svn: 103529
2010-05-11 23:54:07 +00:00
Jakob Stoklund Olesen
e27902ac68
Simplify the tracking of used physregs to a bulk bitor followed by a transitive
...
closure after allocating all blocks.
Add a few more test cases for -regalloc=fast.
llvm-svn: 103500
2010-05-11 20:30:28 +00:00
Duncan Sands
7d5e4152c3
I got tired of VISIBILITY_HIDDEN colliding with the gcc enum. Rename it
...
to LLVM_LIBRARY_VISIBILITY and introduce LLVM_GLOBAL_VISIBILITY, which is
the opposite, for future use by dragonegg.
llvm-svn: 103495
2010-05-11 20:16:09 +00:00
Dan Gohman
5f389dacab
Remove the "WantsWholeFile" concept, as it's no longer needed. CBE
...
and the others use the regular addPassesToEmitFile hook now, and
llc no longer needs a bunch of redundant code to handle the
whole-file case.
llvm-svn: 103492
2010-05-11 19:57:55 +00:00
Dan Gohman
ca2df906ae
Trim #includes and forward declarations.
...
llvm-svn: 103489
2010-05-11 19:11:43 +00:00
Dan Gohman
259488cf67
Fix a comment.
...
llvm-svn: 103483
2010-05-11 18:03:41 +00:00
Dan Gohman
fb6f4da0e0
Implement a bunch more TargetSelectionDAGInfo infrastructure.
...
Move EmitTargetCodeForMemcpy, EmitTargetCodeForMemset, and
EmitTargetCodeForMemmove out of TargetLowering and into
SelectionDAGInfo to exercise this.
llvm-svn: 103481
2010-05-11 17:31:57 +00:00
Daniel Dunbar
7670f69e42
MC/Mach-O x86_64: Switch to using fragment atom symbol.
...
- This eliminates getAtomForAddress() (which was a linear search) and
simplifies getAtom().
- This also fixes some correctness problems where local labels at the same
address as non-local labels could be assigned to the wrong atom.
llvm-svn: 103480
2010-05-11 17:22:50 +00:00
Dan Gohman
eaacb8cb1f
Remove the TargetLowering::getSubtarget() virtual function, which
...
was unused. TargetMachine::getSubtarget() is used instead.
llvm-svn: 103474
2010-05-11 16:21:03 +00:00
Douglas Gregor
2f2491405a
Fixes for Microsoft Visual Studio 2010, from Steven Watanabe!
...
llvm-svn: 103457
2010-05-11 06:17:44 +00:00
Bill Wendling
ed91169004
The getDefaultSubtargetFeatures method of SubtargetFeature did actually return a
...
string of features for that target. However LTO was using that string to pass
into the "create target machine" stuff. That stuff needed the feature string to
be in a particular form. In particular, it needed the CPU specified first and
then the attributes. If there isn't a CPU specified, it required it to be blank
-- e.g., ",+altivec". Yuck.
Modify the getDefaultSubtargetFeatures method to be a non-static member
function. For all attributes for a specific subtarget, it will add them in like
normal. It will also take a CPU string so that it can satisfy this horrible
syntax.
llvm-svn: 103451
2010-05-11 00:30:02 +00:00
Daniel Dunbar
00ffbb63da
MC/Mach-O: Explicitly track atoms, as represented by their defining symbol, for each fragment (not yet used).
...
llvm-svn: 103438
2010-05-10 22:45:09 +00:00
David Greene
dec8f8b802
Fix PR6875:
...
This includes a patch by Roman Divacky to fix the initial crash.
Move the actual addition of passes from *PassManager::add to
*PassManager::addImpl. That way, when adding printer passes we won't
recurse infinitely.
Finally, check to make sure that we are actually adding a FunctionPass
to a FunctionPassManager before doing a print before or after it.
Immutable passes are strange in this way because they aren't
FunctionPasses yet they can be and are added to the FunctionPassManager.
llvm-svn: 103425
2010-05-10 20:24:27 +00:00
Dan Gohman
bb143f8c35
Add an explicit keyword.
...
llvm-svn: 103424
2010-05-10 20:14:02 +00:00
Daniel Dunbar
00f50519b6
Add new configure option, --disable-timestamps, intended to turn off anything which would mess up binary/object comparisons. Currently:
...
- Disables 'Built on ...' in 'foo --version'.
- Disables timestamps from being embedded into .dir files.
llvm-svn: 103423
2010-05-10 20:11:56 +00:00
Dan Gohman
eac81dd103
Delete an obsolete comment.
...
llvm-svn: 103420
2010-05-10 19:47:21 +00:00
Chris Lattner
f474647323
remove a dead file.
...
llvm-svn: 103383
2010-05-09 17:34:13 +00:00
Chris Lattner
568058ef71
break coff symbol definition stuff out into proper MCStreamer callbacks,
...
patch by Nathan Jeffords!
llvm-svn: 103346
2010-05-08 19:54:22 +00:00
Daniel Dunbar
1457d51ff8
Add llvm::sys::RunInterruptHandlers(), which runs the registered SIGINT cleanup
...
stuff.
llvm-svn: 103333
2010-05-08 02:10:34 +00:00
Devang Patel
14f07a8625
Remove DIGlobal.
...
llvm-svn: 103325
2010-05-07 23:19:07 +00:00
Devang Patel
62b4a23a3b
Add DINameSpace::Verify().
...
llvm-svn: 103318
2010-05-07 23:04:32 +00:00
Douglas Gregor
2b05a8ffe8
Clang is dying on this with an ambiguous conversion sequence. We're working on it
...
llvm-svn: 103312
2010-05-07 22:28:25 +00:00
Devang Patel
3c2f4664fc
Verify variable directly.
...
llvm-svn: 103305
2010-05-07 22:04:20 +00:00
Chris Lattner
e72e3e9c12
add COFF support for COMDAT sections, patch by Nathan Jeffords!
...
llvm-svn: 103304
2010-05-07 21:49:09 +00:00
Kevin Enderby
3807a4746a
Fix i386 relocations to Weak Definitions. The relocation entries should be
...
external and the item to be relocated should not have the address of the
symbol added in.
llvm-svn: 103302
2010-05-07 21:44:23 +00:00
Dale Johannesen
1ee37ac5d4
Fix PR 7087, and probably other things, by extending
...
getConstantFP to accept the two supported long double
target types. This was not the original intent, but
there are other places that assume this works and it's
easy enough to do.
llvm-svn: 103299
2010-05-07 21:35:53 +00:00
Devang Patel
0638b539bb
Wrap const MDNode * inside DIDescriptor.
...
llvm-svn: 103295
2010-05-07 20:54:48 +00:00
Devang Patel
af119914f7
remove DIDescriptor::getNode()
...
llvm-svn: 103278
2010-05-07 18:36:34 +00:00
Devang Patel
02bb578ffd
Avoid DIDescriptor::getNode(). Use overloaded operators instead.
...
llvm-svn: 103272
2010-05-07 18:11:54 +00:00
Chris Lattner
c1d0e3a79e
switch MCSectionCOFF from a syntactic to semantic representation,
...
patch by Peter Housel!
llvm-svn: 103267
2010-05-07 17:17:41 +00:00
Dan Gohman
38fe30a595
Add a simple module-level debug info printer. It just sets up a
...
DebugInfoFinder and iterates over all the contents calling print.
llvm-svn: 103262
2010-05-07 16:22:32 +00:00
Dan Gohman
1512bd9998
Add an LLVM IR version of code sinking. This uses the same simple algorithm
...
as MachineSink, but it isn't constrained by MachineInstr-level details.
llvm-svn: 103257
2010-05-07 15:40:13 +00:00
Dan Gohman
6201059ec3
Const-ify some stuff.
...
llvm-svn: 103256
2010-05-07 15:36:10 +00:00
Dan Gohman
612fbfa641
Convert the DebugInfo classes dump() methods into print(raw_ostream &)
...
methods, and add dump functions implemented in terms of the print.
llvm-svn: 103254
2010-05-07 15:30:29 +00:00
Dan Gohman
497e752655
Add a DebugLoc argument to TargetInstrInfo::copyRegToReg, so that it
...
doesn't have to guess.
llvm-svn: 103194
2010-05-06 20:33:48 +00:00