1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

1342 Commits

Author SHA1 Message Date
Dan Gohman
fd906f6a07 Refactor a bunch of code out of AsmPrinter::EmitGlobalConstant into separate
functions.

llvm-svn: 61345
2008-12-22 21:14:27 +00:00
Rafael Espindola
7593f0004f Fix bug 3202.
The EH_frame and .eh symbols are now private, except for darwin9 and earlier.
The patch also fixes the definition of PrivateGlobalPrefix on pcc linux.

llvm-svn: 61242
2008-12-19 10:55:56 +00:00
Devang Patel
5b7938b1cc Do not print empty DW_AT_comp_dir.
llvm-svn: 60965
2008-12-12 21:57:54 +00:00
Evan Cheng
9419dfe08a Fix a couple of Dwarf bugs.
- Emit DW_AT_byte_size for struct and union of size zero.
- Emit DW_AT_declaration for forward type declaration.

llvm-svn: 60812
2008-12-10 00:15:44 +00:00
Evan Cheng
92299e0722 Cosmetic changes.
llvm-svn: 60771
2008-12-09 17:56:30 +00:00
Rafael Espindola
0c800cf35e Fix bug 3140.
Print a single parameter .file directive if we have an ELF target.

llvm-svn: 60480
2008-12-03 11:01:37 +00:00
Anton Korobeynikov
ba74a11c9b Make a convenient helper for printing offsets.
llvm-svn: 59872
2008-11-22 16:15:34 +00:00
Chris Lattner
ed6022f676 eliminate a couple more uses of utohexstr.
llvm-svn: 58963
2008-11-10 04:35:24 +00:00
Chris Lattner
1185c9a72c Use utohex_buffer instead of utohexstr to avoid creating a temporary
string in the .ll and .s printers.

llvm-svn: 58962
2008-11-10 04:30:26 +00:00
Anton Korobeynikov
a4933e408d Temporary revert my last commit: it seems it's triggering some subtle bug in backend
and breaks llvm-gcc

llvm-svn: 58926
2008-11-08 23:05:05 +00:00
Anton Korobeynikov
e3b9284fa8 Factor out offset printing code into generic AsmPrinter.
FIXME: it seems, that most of targets don't support
offsets wrt CPI/GlobalAddress', was it intentional?

llvm-svn: 58917
2008-11-08 17:21:38 +00:00
Bill Wendling
39b0625fe0 The Dwarf writer was comparing mangled and unmangled names for C++ code when we
have an unreachable block in a function. This was triggering the assert. This is
a horrid hack to cover this up.

Oh! for a good debug info architecture!

llvm-svn: 57714
2008-10-17 18:48:57 +00:00
Dale Johannesen
0c6ea38b92 Remove some overzealous checks that were rejecting
valid comments in inline assembly.
gcc.target/i386/20011009-1.c

llvm-svn: 57365
2008-10-10 21:04:42 +00:00
Dale Johannesen
075a62519f Add a "loses information" return value to APFloat::convert
and APFloat::convertToInteger.  Restore return value to
IEEE754.  Adjust all users accordingly.

llvm-svn: 57329
2008-10-09 23:00:39 +00:00
Dale Johannesen
9e57068854 Rename APFloat::convertToAPInt to bitcastToAPInt to
make it clearer what the function does.  No functional
change.

llvm-svn: 57325
2008-10-09 18:53:47 +00:00
Dale Johannesen
9c6ffd55b4 Align EH tables before label is emitted, not after,
thus aligning the label.

llvm-svn: 57310
2008-10-08 21:50:21 +00:00
Dan Gohman
30c5ce1b7d Switch the MachineOperand accessors back to the short names like
isReg, etc., from isRegister, etc.

llvm-svn: 57006
2008-10-03 15:45:36 +00:00
Bill Wendling
bf75299f0a If we have a function with an unreachable statement such that the ending debug
information is in an unreachable block, then it's possible that the high/low pc
values won't be set for the dwarf information. E.g., this function:

void abort(void) __attribute__((__noreturn__));
void dead_beef(void) __attribute__ ((noreturn));

int *b;

void dead_beef(void) {
  *b=0xdeadbeef;
  abort();
}

has a call to "@llvm.dbg.region.end" only in the unreachable block:

define void @dead_beef() noreturn nounwind  {
entry:
	call void @llvm.dbg.func.start(...)
	call void @llvm.dbg.stoppoint(...)
...
	call void @abort( ) noreturn nounwind 
	unreachable

return:		; No predecessors!
	call void @llvm.dbg.stoppoint(...)
	call void @llvm.dbg.region.end(...)
	ret void
}

The dwarf information emitted is something like:

0x00000084:     TAG_subprogram [5]  
                 AT_name( "dead_beef" )
                 AT_external( 0x01 )
                 AT_prototyped( 0x01 )
                 AT_decl_file( 0x01 )
                 AT_decl_line( 0x08 )

Note that this is *not* the best fix for this problem, but a band-aid for an
gaping wound. This code needs to be changed when we revamp our debugging
information.

llvm-svn: 56628
2008-09-26 00:28:12 +00:00
Anton Korobeynikov
ccd9174b23 Use helper
llvm-svn: 56584
2008-09-24 22:21:04 +00:00
Anton Korobeynikov
f465171596 SmallPtrSet will be better
llvm-svn: 56583
2008-09-24 22:20:46 +00:00
Anton Korobeynikov
f95cbd4834 Use generic section-handling stuff to emit constant pool entries
llvm-svn: 56579
2008-09-24 22:17:59 +00:00
Anton Korobeynikov
dca16f3acf Get rid of duplicate char*/Section* DataSection
llvm-svn: 56575
2008-09-24 22:16:16 +00:00
Anton Korobeynikov
83fa257f55 Get rid of duplicate char*/Section* TextSection
llvm-svn: 56574
2008-09-24 22:15:21 +00:00
Anton Korobeynikov
c7ac49c632 Move actual section printing stuff to AsmPrinter from TAI reducing heap traffic.
llvm-svn: 56573
2008-09-24 22:14:23 +00:00
Anton Korobeynikov
9e5d24042c Drop obsolete hook and change all usage to new interface
llvm-svn: 56572
2008-09-24 22:13:07 +00:00
Anton Korobeynikov
ff79214785 Provide direct function to switch to Section
llvm-svn: 56571
2008-09-24 22:12:10 +00:00
Dale Johannesen
bc29bec7f8 Next round of earlyclobber handling. Approach the
RA problem by expanding the live interval of an
earlyclobber def back one slot.  Remove
overlap-earlyclobber throughout.  Remove 
earlyclobber bits and their handling from
live internals.

llvm-svn: 56539
2008-09-24 01:07:17 +00:00
Oscar Fuentes
0f25988689 Initial support for the CMake build system.
llvm-svn: 56419
2008-09-22 01:08:49 +00:00
Dale Johannesen
99091ed94f Add a bit to mark operands of asm's that conflict
with an earlyclobber operand elsewhere.  Propagate
this bit and the earlyclobber bit through SDISel.
Change linear-scan RA not to allocate regs in a way 
that conflicts with an earlyclobber.  See also comments.

llvm-svn: 56290
2008-09-17 21:13:11 +00:00
Dale Johannesen
ba2bbe0c55 Move the uglier parts of deciding not to emit a
UsedDirective for some symbols in llvm.used into
Darwin-specific code.  I've decided LessPrivateGlobal
is potentially a useful abstraction and left it in
the target-independent area, with improved comment.

llvm-svn: 56024
2008-09-09 22:29:13 +00:00
Dale Johannesen
1ed08a58d1 Fix logic for not emitting no-dead-strip for some
objects in llvm.used (thanks Anton).  Makes visible
the magic 'l' prefix for symbols on Darwin which are
to be passed through the assembler, then removed at
linktime (previously all references to this had been
hidden in the ObjC FE code, oh well).

llvm-svn: 55973
2008-09-09 01:21:22 +00:00
Dale Johannesen
372133f1c8 Don't suppress no-dead-strip for used static functions.
llvm-svn: 55962
2008-09-08 21:21:49 +00:00
Dan Gohman
f2a912c2a7 Add AsmPrinter support for i128 and larger static initializer data.
llvm-svn: 55919
2008-09-08 16:40:13 +00:00
Dan Gohman
e1f9be27bc Tidy up several unbeseeming casts from pointer to intptr_t.
llvm-svn: 55779
2008-09-04 17:05:41 +00:00
Dale Johannesen
ca782fcba1 Do not emit a UsedDirective for things in the llvm.used
list that have internal linkage; the linker doesn't need
or want this.  (These objects must still be preserved
at compile time, so just removing them from the llvm.used
list doesn't work.)  Should affect only Darwin.

llvm-svn: 55722
2008-09-03 20:34:58 +00:00
Owen Anderson
2e728c44d5 Remove unneeded #include.
llvm-svn: 55134
2008-08-21 19:51:25 +00:00
Owen Anderson
2c1d54952b Use raw_ostream throughout the AsmPrinter.
llvm-svn: 55092
2008-08-21 00:14:44 +00:00
Chris Lattner
9f588f11f4 don't use the result of WriteTypeSymbolic or WriteAsOperand.
llvm-svn: 54978
2008-08-19 04:44:30 +00:00
Gordon Henriksen
a9ff400fa9 Drop an unnecessary include.
llvm-svn: 54901
2008-08-17 18:54:05 +00:00
Gordon Henriksen
2cc861a6c1 Rename some GC classes so that their roll will hopefully be clearer.
In particular, Collector was confusing to implementors. Several
thought that this compile-time class was the place to implement
their runtime GC heap. Of course, it doesn't even exist at runtime.
Specifically, the renames are:

  Collector               -> GCStrategy
  CollectorMetadata       -> GCFunctionInfo
  CollectorModuleMetadata -> GCModuleInfo
  CollectorRegistry       -> GCRegistry
  Function::getCollector  -> getGC (setGC, hasGC, clearGC)

Several accessors and nested types have also been renamed to be
consistent. These changes should be obvious.

llvm-svn: 54899
2008-08-17 18:44:35 +00:00
Anton Korobeynikov
f1b2880420 Fix merge error
llvm-svn: 54891
2008-08-17 13:56:03 +00:00
Anton Korobeynikov
1866ca5736 Move all assembler printing related stuff into new libAsmPrinter
llvm-svn: 54885
2008-08-17 13:53:04 +00:00