Commit Graph

37750 Commits

Author SHA1 Message Date
Anton Korobeynikov 2ef0a12fa1 Fix invalid NEON MAC itins on A8
llvm-svn: 100659
2010-04-07 18:20:53 +00:00
Anton Korobeynikov 5e208dc21b Fix itins for VPAL
llvm-svn: 100658
2010-04-07 18:20:47 +00:00
Anton Korobeynikov a248becd6c Fix itins for VABA
llvm-svn: 100657
2010-04-07 18:20:42 +00:00
Anton Korobeynikov a3e4989ad8 Correct VMVN itinerary: operand is read in the second cycle, not in the first.
llvm-svn: 100656
2010-04-07 18:20:36 +00:00
Anton Korobeynikov 140a65ce0b More A9 itineraries
llvm-svn: 100655
2010-04-07 18:20:29 +00:00
Anton Korobeynikov 1a1af5a830 Correct itinerary class for VPADD
llvm-svn: 100654
2010-04-07 18:20:24 +00:00
Anton Korobeynikov 4650fd5fc6 VP{MAX, MIN} are of IIC_VSUBi4D itin class as well.
llvm-svn: 100653
2010-04-07 18:20:18 +00:00
Anton Korobeynikov 7d4fad5942 VHADD differs from VHSUB at least on A9 - the former reads both operands in the second cycle, while the latter reads second operand in first cycle. Introduce new itin classes to catch this behavior. Whether this is true for A8 as well is WIP.
llvm-svn: 100652
2010-04-07 18:20:13 +00:00
Anton Korobeynikov 2cba05bbe1 Some easy NEON scheduling goodness for A9
llvm-svn: 100651
2010-04-07 18:20:07 +00:00
Anton Korobeynikov 2063705d91 Define new itin classes for ARM <-> VFP reg moves to distinguish from NEON ops. Define proper scheduling itinerary for them on A9. A8 TRM does not specify latency for them at all :(
llvm-svn: 100650
2010-04-07 18:20:02 +00:00
Anton Korobeynikov c1e7a6feac FCONST{S,D} behaves the same way as FP unary instructions. This is true for both A8 and A9.
llvm-svn: 100649
2010-04-07 18:19:56 +00:00
Anton Korobeynikov dad973334b Proper cycle times for locks, since wbck latency can be larger than fwd latency.
llvm-svn: 100648
2010-04-07 18:19:51 +00:00
Anton Korobeynikov 4c1da0f82a Add new itin classes for FP16 <-> FP32 conversions and make uise of them for A9.
llvm-svn: 100647
2010-04-07 18:19:46 +00:00
Anton Korobeynikov baeb210be7 Make use of new reserved/required scheduling stuff: introduce VFP and NEON locks to model domain cross stalls precisly.
llvm-svn: 100646
2010-04-07 18:19:40 +00:00
Anton Korobeynikov 0bdc6345e8 Initial support for different kinds of FU reservation.
llvm-svn: 100645
2010-04-07 18:19:32 +00:00
Anton Korobeynikov 9a348a9572 Factor out scoreboard into separate class. This way we might have several different score boards.
llvm-svn: 100644
2010-04-07 18:19:24 +00:00
Anton Korobeynikov 15ccae2a46 Some bits of A9 scheduling: VFP
llvm-svn: 100643
2010-04-07 18:19:18 +00:00
Anton Korobeynikov 10fc6e9650 Separate const from non-const stuff during mergeing
llvm-svn: 100642
2010-04-07 18:19:13 +00:00
Anton Korobeynikov 0453de0133 Some initial version of global merger
llvm-svn: 100641
2010-04-07 18:19:07 +00:00
Anton Korobeynikov fed8ee7dfc Add hook to insert late LLVM=>LLVM passes just before isel
llvm-svn: 100640
2010-04-07 18:18:42 +00:00
Chris Lattner 6855d62768 fix 80 col violation, patch by Alastair Lynn
llvm-svn: 100639
2010-04-07 18:13:33 +00:00
Chris Lattner 29233c0458 add a comment line that got dropped
llvm-svn: 100638
2010-04-07 18:10:38 +00:00
Chris Lattner f839ee0c13 fix a latent bug my inline asm stuff exposed:
MachineOperand::isIdenticalTo wasn't handling metadata operands.

llvm-svn: 100636
2010-04-07 18:03:19 +00:00
Benjamin Kramer f2351a7a6e Remove unused method.
llvm-svn: 100620
2010-04-07 11:23:46 +00:00
Torok Edwin f8dba24a9b Workaround the breakage in r100616 by guarding all timers with
TimePassesIsEnabled. This should allow make check to pass.

llvm-svn: 100618
2010-04-07 10:44:46 +00:00
Bill Wendling fcc14141c7 Use the "NamedGroupTimer" class to categorize DWARF emission better.
llvm-svn: 100616
2010-04-07 09:28:04 +00:00
Benjamin Kramer 43c275fa56 Use raw_ostream.
llvm-svn: 100615
2010-04-07 09:26:51 +00:00
Evan Cheng 5ed679282b Add comments for missed opportunities.
llvm-svn: 100610
2010-04-07 06:00:33 +00:00
Evan Cheng fcbcc0bd51 Fix typo.
llvm-svn: 100609
2010-04-07 05:59:12 +00:00
Chris Lattner 51065568cd Have the inst emitter add the !srcloc mdnode to the machine instr.
Have the asmprinter use the mdnode to scavenge a source location if
present.  Document this nonsense in langref.

llvm-svn: 100607
2010-04-07 05:38:05 +00:00
Chris Lattner d62adaa54d remove another magic number.
llvm-svn: 100606
2010-04-07 05:27:36 +00:00
Chris Lattner 3b9f02a2aa Three changes:
1. Introduce some enums and accessors in the InlineAsm class
   that eliminate a ton of magic numbers when handling inline
   asm SDNode.
2. Add a new MDNodeSDNode selection dag node type that holds
   a MDNode (shocking!)
3. Add a new argument to ISD::INLINEASM nodes that hold !srcloc
   metadata, propagating it to the instruction emitter, which
   drops it.

No functionality change.

llvm-svn: 100605
2010-04-07 05:20:54 +00:00
Chris Lattner 2e664bd915 fix a crash on invalid metadata, e.g.: call i32 @foo(), XXXX
We would return the error without inserting the new instruction
into the program, so it wouldn't get deallocated, and an abort
would trigger when the module was deleted. 

llvm-svn: 100602
2010-04-07 04:08:57 +00:00
Sanjiv Gupta dd1c82141c Fix memory leaks for external symbol name strings.
llvm-svn: 100601
2010-04-07 03:36:01 +00:00
John McCall 6ac5cc973c Clean up some signedness oddities in this code noticed by clang.
llvm-svn: 100599
2010-04-07 01:49:15 +00:00
Dale Johannesen 5d7f0a0fdd Move printing of target-indepedent DEBUG_VALUE comments
into AsmPrinter.  Target-dependent form is still generated
by FastISel and still handled in X86 code.

llvm-svn: 100596
2010-04-07 01:15:14 +00:00
Evan Cheng 6ea5949a93 Post regalloc LICM. Work in progress.
llvm-svn: 100592
2010-04-07 00:41:17 +00:00
Devang Patel 019922d1b0 Do not emit specification DIE with DW_AT_specification attribute for member functions of a funcation local class. This trips gdb's partial scan of DIEs at load time. Fixes Radar 7833483.
llvm-svn: 100586
2010-04-06 23:53:48 +00:00
John McCall 796583eec0 Fix a number of clang -Wsign-compare warnings that didn't have an obvious
solution.  The only reason these don't fire with gcc-4.2 is that gcc turns off
part of -Wsign-compare in C++ on accident.

llvm-svn: 100581
2010-04-06 23:35:53 +00:00
Dale Johannesen b36c70913b Revert 100573, it's causing some testsuite problems.
llvm-svn: 100578
2010-04-06 22:45:26 +00:00
Dale Johannesen 85b35b6214 Move printing of DEBUG_VALUE comments to target-independent place.
There is probably a more elegant way to do this.

llvm-svn: 100573
2010-04-06 22:21:07 +00:00
Bob Wilson 5202269dc4 Expand SELECT and SELECT_CC for NEON vector types.
Radar 7770501.

llvm-svn: 100568
2010-04-06 22:02:24 +00:00
Dale Johannesen d1976e35c4 Allow for the possibility that a debug-value points
to a SDNode that didn't have code generated for it.

llvm-svn: 100566
2010-04-06 21:59:56 +00:00
Stuart Hastings 4bd3dd956f Reverting 100530 & 100531 due to regressions in the GDB test suite.
llvm-svn: 100563
2010-04-06 21:38:29 +00:00
Jim Grosbach 4dac890600 Fix PR6696 and PR6663
When a frame pointer is not otherwise required, and dynamic stack alignment
is necessary solely due to the spilling of a register with larger alignment
requirements than the default stack alignment, the frame pointer can be both
used as a general purpose register and a frame pointer. That goes poorly, for
obvious reasons. This patch brings back a bit of old logic for identifying
the use of such registers and conservatively reserves the frame pointer
during register allocation in such cases.

For now, implement for X86 only since it's 32-bit linux which is hitting this,
and we want a targeted fix for 2.7. As a follow-on, this will be expanded
to handle other targets, as theoretically the problem could arise elsewhere
as well.

llvm-svn: 100559
2010-04-06 20:26:37 +00:00
Jakob Stoklund Olesen 41051a0bfe Don't try to collapse DomainValues onto an incompatible SSE domain.
This fixes the Bullet regression on i386/nocona.

llvm-svn: 100553
2010-04-06 19:48:56 +00:00
Gabor Greif df323a51f5 performance: get rid of repeated dereferencing of use_iterator by caching its result
llvm-svn: 100550
2010-04-06 19:32:30 +00:00
Gabor Greif 679728790b make more two predicates constant
llvm-svn: 100549
2010-04-06 19:24:18 +00:00
Gabor Greif 08355d6cda performance: get rid of repeated dereferencing of use_iterator by caching its result
llvm-svn: 100547
2010-04-06 19:14:05 +00:00
Gabor Greif a21bc0fbd5 const-ize predicate ValueIsOnlyUsedLocallyOrStoredToOneGlobal
llvm-svn: 100546
2010-04-06 18:58:22 +00:00
Gabor Greif 0439789023 use CallSite to access calls vs. invokes uniformly
and remove assumptions about operand order

llvm-svn: 100544
2010-04-06 18:45:08 +00:00
Chris Lattner 97c4cb8947 enhance SMDiagnostic to also maintain a pointer to the SourceMgr.
Add a simplified constructor for clients that don't have locations
like "file not found" errors.

llvm-svn: 100538
2010-04-06 18:06:18 +00:00
Evan Cheng a910f17a20 Code clean up. Move includes from VirtRegRewriter.h to VirtRegRewriter.cpp.
llvm-svn: 100532
2010-04-06 17:19:55 +00:00
Stuart Hastings c067196984 Revise debug info machinery to digest nested functions and classes.
A certain GDB testsuite case (local.cc) has a function nested inside a
class nested inside another function.  GCC presents the innermost
function to llvm-convert first.  Heretofore, the debug info mistakenly
placed the inner function at module scope.  This patch walks the GCC
context links and instantiates the outer class and function so the
debug info is properly nested.  Radar 7426545.

llvm-svn: 100530
2010-04-06 17:19:32 +00:00
Mon P Wang bf86224d5e Remove assert to treat memmove and memset like memcpy
llvm-svn: 100521
2010-04-06 08:27:51 +00:00
Owen Anderson ee3570f0ff Use a ManagedCleanup to prevent leaking the PassRegistrar map. In breaks the
use case where someone wants to resurrect LLVM after calling llvm_shutdown,
but I'm not aware of any clients that are affected by this.

llvm-svn: 100519
2010-04-06 04:20:48 +00:00
Dan Gohman 91ce8e9a5c Add a const qualifier.
llvm-svn: 100515
2010-04-06 01:31:12 +00:00
Chris Lattner 92aba5a817 propagate cookie management out one layer of function calls.
llvm-svn: 100510
2010-04-06 00:58:50 +00:00
Chris Lattner 59126b2500 report errors through LLVMContext's inline asm handler if available.
llvm-svn: 100509
2010-04-06 00:55:39 +00:00
Chris Lattner f226748324 Give MachineModuleInfo an actual Module*.
llvm-svn: 100508
2010-04-06 00:51:52 +00:00
Chris Lattner 60955d42bd give LLVMContext an inline asm diagnostic hook member.
llvm-svn: 100506
2010-04-06 00:44:45 +00:00
Devang Patel fc4a1db23b Remove unnecessary include.
llvm-svn: 100505
2010-04-06 00:38:32 +00:00
Chris Lattner 654091391b give the SourceMgr object a cookie.
llvm-svn: 100504
2010-04-06 00:33:43 +00:00
Chris Lattner 3c799811c1 Give llvm::SourceMgr the ability to have a client-specified
diagnostic handler.

llvm-svn: 100503
2010-04-06 00:26:48 +00:00
Jakob Stoklund Olesen 1a9b3f3484 Properly enable load clustering.
Operand 2 on a load instruction does not have to be a RegisterSDNode for this to
work.

llvm-svn: 100497
2010-04-05 23:48:02 +00:00
Evan Cheng 272a2f8432 Fix an obvious copy-n-paste bug. It's not known to cause any miscompilation.
llvm-svn: 100494
2010-04-05 23:33:29 +00:00
Chris Lattner 3b21e4d404 Give AsmParser an option to control whether it finalizes
the stream.  New demo:

$ clang asm.c -S -o - -emit-llvm | llc -filetype=obj -o t.o
$ otool -tv t.o
t.o:
(__TEXT,__text) section
_foo:
0000000000000000	subq	$0x08,%rsp
0000000000000004	movl	%edi,(%rsp)
0000000000000007	movl	%edi,%eax
0000000000000009	incl	%eax
000000000000000b	movl	%eax,(%rsp)
000000000000000e	movl	%eax,0x04(%rsp)
0000000000000012	addq	$0x08,%rsp
0000000000000016	ret

llvm-svn: 100492
2010-04-05 23:15:42 +00:00
Chris Lattner 8900ef1931 add .o file writing for inline asm in llc. Here's a silly
demo:

$ clang asm.c -S -o - -emit-llvm | llc -filetype=obj -o t.o
<inline asm>:1:2: error: unrecognized instruction
	abc incl    %eax
	^
LLVM ERROR: Error parsing inline asm

Only problem seems to be that the parser finalizes OutStreamer 
at the end of the first inline asm, which isn't what we want.
For example:

$ cat asm.c
int foo(int X) {
 __asm__ ("incl    %0" : "+r" (X));
 return X;
}
$ clang asm.c -S -o - -emit-llvm | llc
...
	subq	$8, %rsp
	movl	%edi, (%rsp)
	movl	%edi, %eax
	## InlineAsm Start
	incl    %eax
	## InlineAsm End
	movl	%eax, (%rsp)
	movl	%eax, 4(%rsp)
	addq	$8, %rsp
	ret
$ clang asm.c -S -o - -emit-llvm | llc -filetype=obj -o t.o
$ otool -tv t.o
t.o:
(__TEXT,__text) section
_foo:
0000000000000000	subq	$0x08,%rsp
0000000000000004	movl	%edi,(%rsp)
0000000000000007	movl	%edi,%eax
0000000000000009	incl	%eax
$ 

don't stop at inc!

llvm-svn: 100491
2010-04-05 23:11:24 +00:00
Bill Wendling 30346347b3 Output floating point representations in DWARF format. This is done by outputing
the FP encoding directly as a hex representation.

llvm-svn: 100487
2010-04-05 22:59:21 +00:00
Chris Lattner 0e45d24a4e stringref-ize the MemoryBuffer::get apis. This requires
a co-committed clang patch.

llvm-svn: 100485
2010-04-05 22:42:30 +00:00
Evan Cheng 23d16d5b86 Fix ADD32rr_alt instruction encoding bug. Patch by Marius Wachtler.
llvm-svn: 100480
2010-04-05 22:21:09 +00:00
Chris Lattner adca608281 fix a really nasty bug that Evan was tracking in SCCP. When resolving
undefs in branches/switches, we have two cases: a branch on a literal
undef or a branch on a symbolic value which is undef.  If we have a
literal undef, the code was correct: forcing it to a constant is the
right thing to do.

If we have a branch on a symbolic value that is undef, we should force
the symbolic value to a constant, which then makes the successor block
live.  Forcing the condition of the branch to being a constant isn't 
safe if later paths become live and the value becomes overdefined.  This
is the case that 'forcedconstant' is designed to handle, so just use it.

This fixes rdar://7765019 but there is no good testcase for this, the
one I have is too insane to be useful in the future.

llvm-svn: 100478
2010-04-05 22:14:48 +00:00
Chris Lattner c832c1bf69 some code cleanups, use SwitchInst::findCaseValue, reduce indentation
llvm-svn: 100468
2010-04-05 21:18:32 +00:00
Evan Cheng ba930449a9 Code clean up.
llvm-svn: 100467
2010-04-05 21:16:25 +00:00
Eric Christopher 1290fa0f72 Remove FIXME.
llvm-svn: 100466
2010-04-05 21:14:32 +00:00
Jeffrey Yasskin 7dd816097a Fix OProfileJITEventListener build for new DebugLoc.
llvm-svn: 100461
2010-04-05 21:09:12 +00:00
Dan Gohman f38547c83f Add a comment.
llvm-svn: 100459
2010-04-05 20:24:08 +00:00
Chris Lattner bc217873e3 lowering a volatile llvm.memcpy to a libc memcpy is ok.
PR6779

llvm-svn: 100457
2010-04-05 20:11:45 +00:00
Dan Gohman 918a90a3ca Don't do code sinking on unreachable blocks. It's unprofitable and hazardous.
llvm-svn: 100455
2010-04-05 19:17:22 +00:00
Chris Lattner 6e39c4a097 don't use emitlabel in the arm asm printer yet, the order
isn't well specified.  ARM really needs to have its instprinter
finished at some point.

llvm-svn: 100439
2010-04-05 17:52:31 +00:00
Owen Anderson f93bdd1024 Push const through the regex engine. Fixes some of the warnings in PR6616.
llvm-svn: 100438
2010-04-05 17:50:20 +00:00
Chris Lattner 6a0e89aefb fix a couple problems I introduced handling symbols
with spaces in them.  Sym->getName()  !=   OS << *Sym

llvm-svn: 100434
2010-04-05 16:32:14 +00:00
Benjamin Kramer 0151d7b025 Disambiguate else.
llvm-svn: 100423
2010-04-05 10:17:15 +00:00
Chris Lattner fb964e57e5 remove the now-redundant MMI pointer in SelectionDAG.
llvm-svn: 100419
2010-04-05 06:19:28 +00:00
Chris Lattner 28f2fdafcd hopefully sate the clang self host build, which is apparently
instantiating some folding set stuff that GCC isn't, requiring 
some types to not be incomplete.

I don't know if clang is right or wrong, but unbreaking the
bot is goodness.  Here's the broken build:
http://google1.osuosl.org:8011/builders/clang-x86_64-darwin10-selfhost/builds/1813/steps/compile.llvm.stage2/logs/stdio

llvm-svn: 100418
2010-04-05 06:12:01 +00:00
Chris Lattner 6361414c88 remove some redundant MMI arguments.
llvm-svn: 100417
2010-04-05 06:10:13 +00:00
Chris Lattner 305f2efb63 unthread MMI from FastISel
llvm-svn: 100416
2010-04-05 06:05:26 +00:00
Chris Lattner 82ff9af068 remove the MMI pointer from MachineFrameInfo.
llvm-svn: 100415
2010-04-05 05:57:52 +00:00
Chris Lattner 9f53dcd7b9 enhance MachineFunction to have a MMI pointer.
llvm-svn: 100414
2010-04-05 05:49:50 +00:00
Chris Lattner 50b1bf63a7 simplify code.
llvm-svn: 100412
2010-04-05 05:48:36 +00:00
Chris Lattner 64a168efb6 privatize more stuff, eliminate vtables.
llvm-svn: 100410
2010-04-05 05:32:45 +00:00
Chris Lattner acda87bdb1 reprivatize now that DwarfWriter is gone.
llvm-svn: 100409
2010-04-05 05:31:04 +00:00
Chris Lattner da790ea006 prune #includes, MMI can never be null
llvm-svn: 100408
2010-04-05 05:28:23 +00:00
Chris Lattner 3f3fb970e4 prune #includes, realize the MMI can never be null.
llvm-svn: 100407
2010-04-05 05:24:55 +00:00
Chris Lattner 10cb0f4338 finally blast DwarfWriter away.
llvm-svn: 100406
2010-04-05 05:12:59 +00:00
Chris Lattner f0d6bd3ef4 change AsmPrinter to use DwarfDebug/DwarfException directly
instead of going through DwarfWriter.

llvm-svn: 100405
2010-04-05 05:11:15 +00:00
Johnny Chen dacfd2c6d4 Get rid of traling whitespaces. No functionality change.
llvm-svn: 100404
2010-04-05 04:51:50 +00:00
Johnny Chen dba13e7922 The disassembler impl. of MCDisassembler::getInstruction() was using the pattern
uint32_t insn;
  MemoryObject.readBytes(Address, 4, (uint8_t*)&insn, NULL)

to read 4 bytes of memory contents into a 32-bit uint variable.  This leaves the
interpretation of byte order up to the host machine and causes PPC test cases of
arm-tests, neon-tests, and thumb-tests to fail.  Fixed to use a byte array for
reading the memory contents and shift the bytes into place for the 32-bit uint
variable in the ARM case and 16-bit halfword in the Thumb case.

llvm-svn: 100403
2010-04-05 04:46:17 +00:00
Chris Lattner f0ef4e4019 implement EmitFunctionEntryLabel to emit the .cc_top directive,
allowing xcore to use the normal runOnMachineFunction 
implementation.

llvm-svn: 100402
2010-04-05 04:44:02 +00:00
Chris Lattner f5d0636850 trim some spurious references to DwarfWriter. SDIsel really doesn't
need it anymore, so don't addRequire it.

llvm-svn: 100400
2010-04-05 04:09:20 +00:00
Chris Lattner a49ac8ace0 prune some #includes.
llvm-svn: 100399
2010-04-05 04:04:10 +00:00
Chris Lattner 196dbdc160 eliminate DwarfDebug::shouldEmit, which is the same now as MMI::hasDebugInfo
llvm-svn: 100386
2010-04-05 03:52:55 +00:00
Chris Lattner d2f5062c6d fix a regression on 2009-08-17-DebugInfo.m
llvm-svn: 100385
2010-04-05 03:49:26 +00:00
Jakob Stoklund Olesen b93331f3be Replace TSFlagsFields and TSFlagsShifts with a simpler TSFlags field.
When a target instruction wants to set target-specific flags, it should simply
set bits in the TSFlags bit vector defined in the Instruction TableGen class.

This works well because TableGen resolves member references late:

class I : Instruction {
  AddrMode AM = AddrModeNone;
  let TSFlags{3-0} = AM.Value;
}

let AM = AddrMode4 in
def ADD : I;

TSFlags gets the expected bits from AddrMode4 in this example.

llvm-svn: 100384
2010-04-05 03:10:20 +00:00
Chris Lattner ab5dc34351 selection dag doesn't need DwarfWriter, remove some tendrils.
llvm-svn: 100382
2010-04-05 02:23:33 +00:00
Chris Lattner 7cfa70e9b3 fastisel doesn't need DwarfWriter, remove some tendricles.
llvm-svn: 100381
2010-04-05 02:19:28 +00:00
Evan Cheng 0b8adb0652 Temporarily remove to disable building of ARM disassembler.
llvm-svn: 100380
2010-04-05 01:57:50 +00:00
Evan Cheng 492a82e426 Re-apply 100265 but instead disable building of ARM disassembly for now.
llvm-svn: 100379
2010-04-05 01:34:00 +00:00
Evan Cheng 876a5015af Reverting 100265 to try to get buildbots green again. Lots of self-hosting buildbots started complaining since this commit. Also xfail ARM disassembly tests.
llvm-svn: 100378
2010-04-05 01:04:27 +00:00
Chris Lattner 626cb66fdb just have all targets create the DwarfWriter.
llvm-svn: 100377
2010-04-05 00:42:55 +00:00
Chris Lattner 8b30492da3 simplify various getAnalysisUsage implementations.
llvm-svn: 100376
2010-04-05 00:38:44 +00:00
Chris Lattner eeaa6d67a2 nuke DwarfPrinter
llvm-svn: 100375
2010-04-05 00:27:29 +00:00
Chris Lattner fd79502e08 make DwarfException not inherit from DwarfPrinter.
llvm-svn: 100374
2010-04-05 00:26:50 +00:00
Chris Lattner 5a00dea332 change SizeOf to take AsmPrinter instead of TargetData,
simplifying a bunch of code.

llvm-svn: 100373
2010-04-05 00:18:22 +00:00
Chris Lattner 3a383cb7d9 1) make DIE take AsmPrinter instead of DwarfPrinter.
2) change DwarfDebug to not inherit from DwarfPrinter.

llvm-svn: 100372
2010-04-05 00:13:49 +00:00
Chris Lattner aabc6041de Move EmitFrameMoves into AsmPrinter.
llvm-svn: 100371
2010-04-04 23:41:46 +00:00
Chris Lattner 8423cae590 simplify code and reduce indentation.
llvm-svn: 100369
2010-04-04 23:31:58 +00:00
Chris Lattner 70a4fcea1e now that the magic is dispelled, move EmitSectionOffset to AsmPrinter.
llvm-svn: 100368
2010-04-04 23:25:33 +00:00
Chris Lattner 324c86600d eliminate the magic AbsoluteDebugSectionOffsets MAI hook,
which is really a property of the section being referenced.
Add a predicate to MCSection to replace it.

Yay for reduction in magic.

llvm-svn: 100367
2010-04-04 23:22:29 +00:00
Chris Lattner d442aa368d only emit section labels if we have debug info, fixing a few
regtest failures.

llvm-svn: 100366
2010-04-04 23:17:54 +00:00
Chris Lattner e58b547460 I was wrong, ocaml isn't referencing 'Ldata_begin', so remove it.
llvm-svn: 100365
2010-04-04 23:10:38 +00:00
Chris Lattner 0d3f3bdd3c add some assertions to EmitSectionOffset.
llvm-svn: 100364
2010-04-04 23:06:31 +00:00
Chris Lattner 1fbf53b970 stop emitting some dead L labels.
llvm-svn: 100363
2010-04-04 23:02:02 +00:00
Chris Lattner 6629ca978e Store an use the symbols emitted at the start of the debug
sections instead of magically rematerializing them later.

llvm-svn: 100362
2010-04-04 22:59:04 +00:00
Chris Lattner 46355d87a8 remove the didInitial ivar, rename emitInitial to be more
descriptive, change EmitSectionOffset back to taking a
symbol instead of a string.

llvm-svn: 100361
2010-04-04 22:33:59 +00:00
Chris Lattner 78528f9a36 simplify EmitSectionOffset a little bit, improve comments.
llvm-svn: 100360
2010-04-04 22:25:14 +00:00
Chris Lattner 8964b838e4 revert my patch, need to reconsider this and figure out what is really going on.
llvm-svn: 100358
2010-04-04 21:49:31 +00:00
Chris Lattner 407f848835 fix pasto, this is the wrong setting for arm elf.
llvm-svn: 100357
2010-04-04 21:37:20 +00:00
Chris Lattner 638b3e0000 The "IsSmall" argument to EmitSectionOffset is always true,
constant fold it away.

llvm-svn: 100356
2010-04-04 21:34:40 +00:00
Chris Lattner c7cc815522 eliminate the "isEH" argument to EmitSectionOffset.
llvm-svn: 100355
2010-04-04 21:31:54 +00:00
Chris Lattner e239fa05cd isAbsoluteEHSectionOffsets always returns false, eliminate it
and substitute false at the one call site.

llvm-svn: 100354
2010-04-04 21:29:44 +00:00
Jakob Stoklund Olesen d03ac95d5d Clean up SSEDomainFix pass.
Restrict bit mask operations to the DomainValue class. Rename methods for
clarity.

llvm-svn: 100353
2010-04-04 21:27:26 +00:00
Chris Lattner 4af7c5a650 don't reset the default.
llvm-svn: 100352
2010-04-04 21:06:50 +00:00
Chris Lattner e619c0d3e9 move some more stuff to asmprinter.
llvm-svn: 100351
2010-04-04 20:20:50 +00:00
Chris Lattner 07c1b94faa simplify some code.
llvm-svn: 100350
2010-04-04 20:10:41 +00:00
Chris Lattner b75af3c5a9 move EmitEncodingByte to AsmPrinter.
llvm-svn: 100349
2010-04-04 20:04:21 +00:00
Chris Lattner baf2be0561 move EmitCFAByte to AsmPrinter.
llvm-svn: 100348
2010-04-04 20:01:25 +00:00
Chris Lattner f1429f1fe3 inline EmitDifference away.
llvm-svn: 100347
2010-04-04 19:58:12 +00:00
Chris Lattner 4e4549deea resolve a fixme.
llvm-svn: 100346
2010-04-04 19:28:59 +00:00
Chris Lattner a179b52361 move gettemplabel and getdwlabel to AsmPrinter and rename
them for consistency.

llvm-svn: 100345
2010-04-04 19:25:43 +00:00
Chris Lattner 9efd118938 move uleb/sleb printing into AsmPrinter from DwarfPrinter.
llvm-svn: 100344
2010-04-04 19:09:29 +00:00
Chris Lattner 2b40a207bc more interface cleanup make some helpers static functions.
llvm-svn: 100343
2010-04-04 18:58:53 +00:00
Chris Lattner 7bde8c07a7 clean up the asmprinter header and privatize some stuff.
llvm-svn: 100342
2010-04-04 18:52:31 +00:00
Chris Lattner baa2c972e9 use stringref instead of strtol to avoid errno gymnastics.
llvm-svn: 100341
2010-04-04 18:42:18 +00:00
Chris Lattner 1e15869d1f split inline asm support out to its own .cpp file.
llvm-svn: 100340
2010-04-04 18:34:07 +00:00
Chris Lattner 8ff29c523e inline processDebugLoc and simplify it.
llvm-svn: 100339
2010-04-04 18:18:51 +00:00
Chris Lattner c334d80b0d minor tidying.
llvm-svn: 100338
2010-04-04 18:16:38 +00:00
Chris Lattner 4a4710a055 clean up the asmprinter interface a bit, rename a few
"Print" methods to "Emit".  Emit is something that goes
to an mc streamer, Print is something that goes to a
raw_ostream (for inline asm) 

llvm-svn: 100337
2010-04-04 18:14:01 +00:00
Chris Lattner 21dc46e256 remove TargetMachine.h #include, also, TRI isn't used frequently
enough to warrant caching in AsmPrinter, so remove it.

llvm-svn: 100336
2010-04-04 18:06:11 +00:00
Jakob Stoklund Olesen 42caaa4f5b Switch SSEDomainFix to SpecificBumpPtrAllocator.
llvm-svn: 100332
2010-04-04 18:00:21 +00:00