Commit Graph

8694 Commits

Author SHA1 Message Date
Chris Lattner e1d8a319a1 rename addComment -> AddComment for consistency.
llvm-svn: 94190
2010-01-22 18:21:35 +00:00
Dan Gohman 6f08fa70c1 Revert r94066, which was the patch which added a Verifier pass after
LoopStrengthReduce, as it's causing too much trouble (even with the
old LoopStrengthReduce code).

llvm-svn: 94172
2010-01-22 10:48:28 +00:00
Chris Lattner 38e9219f71 Add the ability for MCStreamer to emit comments on the same line as directives.
Switch over the asm-verbose comment for double values to use it.  We now get:

_x:
	.long	343597384                                   ## double 1.231200e+02
	.long	1079953326

For example, note that the comment is on the same line as the .long.  Woo.

llvm-svn: 94166
2010-01-22 07:29:22 +00:00
Chris Lattner 0522eb2160 pass "-fasm-verbose" into createAsmStreamer.
llvm-svn: 94165
2010-01-22 07:06:15 +00:00
Chris Lattner 7ba0661f27 Stop building RTTI information for *most* llvm libraries. Notable
missing ones are libsupport, libsystem and libvmcore.  libvmcore is
currently blocked on bugpoint, which uses EH.  Once it stops using
EH, we can switch it off.

This #if 0's out 3 unit tests, because gtest requires RTTI information.
Suggestions welcome on how to fix this.

llvm-svn: 94164
2010-01-22 06:49:46 +00:00
Evan Cheng 9d92aaabf1 Teach pre-regalloc scheduler to schedule loads from nearby addresses. It may improve cache locality. This is controlled by -cluster-loads for now.
llvm-svn: 94148
2010-01-22 03:36:51 +00:00
Evan Cheng 32bfe1e837 Trim unneeded includes.
llvm-svn: 94105
2010-01-21 21:44:43 +00:00
Jim Grosbach 143f7eb4c8 back this out for now. Growing Function is not good.
llvm-svn: 94097
2010-01-21 20:10:22 +00:00
Dan Gohman 55a365e797 Run the verifier after LSR, to help catch use-before-def errors before
they reach codegen.

llvm-svn: 94066
2010-01-21 03:51:36 +00:00
Jim Grosbach e029a6a5ed Make sure that landing pad entries in the EH call site table are in the proper
order for SjLj style exception handling.

llvm-svn: 94055
2010-01-21 00:43:30 +00:00
Jim Grosbach d7cf27a1d1 SjLj EH introduces can introduce an additional edge to a landing pad and pad
normalization needs to take this into account.

llvm-svn: 94046
2010-01-20 23:03:55 +00:00
Dale Johannesen c5db599813 make findDebugLoc a class method
llvm-svn: 94032
2010-01-20 21:36:02 +00:00
David Greene 0985160c54 When XDEBUG is enabled, check for SelectionDAG cycles at some key
points.  This will help us find future problems like the one
described in PR6019.

llvm-svn: 94019
2010-01-20 20:13:31 +00:00
Chris Lattner c47ece59a8 don't send null pointers through the constantexpr codepath unneededly.
llvm-svn: 94010
2010-01-20 17:57:50 +00:00
Chris Lattner 71601e8b3b eliminate some uses of AsmPrinter::EmitIntXXX
llvm-svn: 93996
2010-01-20 07:41:15 +00:00
Chris Lattner db42c8d23d inline and radically simplify printDataDirective. It will eventually
go completely away.

llvm-svn: 93994
2010-01-20 07:33:29 +00:00
Chris Lattner f8dcf784a7 emit basic block labels with mcstreamer.
llvm-svn: 93993
2010-01-20 07:24:05 +00:00
Chris Lattner 4c8b1824f0 emit integer and fp zeros as (e.g.) .byte 0 instead of .space 1,
for tidiness.

llvm-svn: 93992
2010-01-20 07:19:19 +00:00
Chris Lattner 03cb2a3035 signficant cleanups to EmitGlobalConstant (including streamerization
of int initializers), change some methods to be static functions,
use raw_ostream::write_hex instead of a smallstring dance with 
APValue::toStringUnsigned(S, 16).

llvm-svn: 93991
2010-01-20 07:11:32 +00:00
Chris Lattner 37020ccf48 switch ConstantFP emission to use MCStreamer, significantly
simplifying the code.

llvm-svn: 93988
2010-01-20 06:53:37 +00:00
Chris Lattner 45eeffcc2a make mcasmstreamer handle expanding 8 byte integer constants to
4-byte constants if .quad isn't supported.  Switch a bunch of
methods used by the dwarf writer to use OutStreamer.EmitIntValue.

llvm-svn: 93987
2010-01-20 06:45:39 +00:00
Chris Lattner 38caaf14c1 give createAsmStreamer an 'isLittleEndian' argument.
llvm-svn: 93986
2010-01-20 06:39:07 +00:00
Devang Patel 7771b7c621 If a instruction belongs to another function (and not current function) as per debug info attached with the instruction then ignore the dangling lexical scope of this instruction. Such scopes are unreachable.
llvm-svn: 93967
2010-01-20 02:05:23 +00:00
David Greene 3b2a68ceb8 Add some asserts to check SelectionDAG problems earlier.
llvm-svn: 93960
2010-01-20 00:59:23 +00:00
Dale Johannesen 91970b4ea2 Move findDebugLoc somewhere more central. Fix
more cases where debug declarations affect
debug line info.

llvm-svn: 93953
2010-01-20 00:19:24 +00:00
Dan Gohman 954f49014d Fold (add x, shl(0 - y, n)) -> sub(x, shl(y, n)), to simplify some code
that SCEVExpander can produce when running on behalf of LSR.

llvm-svn: 93949
2010-01-19 23:30:49 +00:00
Chris Lattner eaef5e111d simplify the rest of fp constant printing.
llvm-svn: 93929
2010-01-19 22:16:33 +00:00
Chris Lattner c70daf316e simplify the code for printing x86 long double, don't do work
for -fverbose-asm unless it's on.

llvm-svn: 93926
2010-01-19 22:11:05 +00:00
Jakob Stoklund Olesen e8800b8d7c Identify predicate and optional-def operands when printing machine
instructions.

llvm-svn: 93925
2010-01-19 22:08:34 +00:00
Chris Lattner ecaf0dcbc6 eliminate AsmPrinter::EmitZeros: just use MCStreamer directly.
llvm-svn: 93918
2010-01-19 21:51:22 +00:00
Benjamin Kramer f007697c56 Update CMake list.
llvm-svn: 93905
2010-01-19 20:59:04 +00:00
David Greene f1c7388b29 Add some new debugging APIs to print out "raw" SelectionDAGs to make
understanding CannotYTetSelect and other errors easier.

llvm-svn: 93901
2010-01-19 20:37:34 +00:00
Chris Lattner c35681b298 Generalize mcasmstreamer data emission APIs to take an address space
identifier.  There is no way to work around it.

llvm-svn: 93896
2010-01-19 19:46:13 +00:00
Evan Cheng bf43525a29 Do not extend extension results beyond the use of a PHI instruction at the start of a use block. A PHI use is expected to kill its source values.
llvm-svn: 93895
2010-01-19 19:45:51 +00:00
Chris Lattner fefcb1531c refactor code to be static functions instead of methods on AsmPrinter.
This fixes some bugs handling address spaces.

llvm-svn: 93891
2010-01-19 19:10:44 +00:00
Chris Lattner ed89f60f5e mcstreamerize AsmPrinter::EmitZeros, at least when emitting to the
default address space.

llvm-svn: 93890
2010-01-19 18:58:52 +00:00
Chris Lattner 9c31b0c695 remove MAI::ZeroDirectiveSuffix, which is only used by MASM,
which we don't support anymore.

llvm-svn: 93886
2010-01-19 18:37:01 +00:00
Jim Grosbach 04770f2aa1 For aligned load/store instructions, it's only required to know whether a
function can support dynamic stack realignment. That's a much easier question
to answer at instruction selection stage than whether the function actually
will have dynamic alignment prologue. This allows the removal of the
stack alignment heuristic pass, and improves code quality for cases where
the heuristic would result in dynamic alignment code being generated when
it was not strictly necessary.

llvm-svn: 93885
2010-01-19 18:31:11 +00:00
Chris Lattner 3024e9813e mcstreamer'ize the rest of EmitGlobalVariable that is used on
darwin.  The next big piece to get global variables streamerized
is EmitGlobalConstant.

llvm-svn: 93870
2010-01-19 06:41:24 +00:00
Chris Lattner cd2915e467 stop using the .lcomm pseudoop on darwin, instead, directly use the
.zerofill directive.  Streamerize its generation.

llvm-svn: 93868
2010-01-19 06:25:51 +00:00
Devang Patel 018b29b039 MDNodes are not expected to disappear or replaced by another MDNode, so there is no need to pay the cost of WeakVH and ValueMaps.
llvm-svn: 93865
2010-01-19 06:19:05 +00:00
Devang Patel 1083b5fc3f Avoid including DebugInfo.h in AsmPrinter.h
llvm-svn: 93864
2010-01-19 06:09:04 +00:00
Chris Lattner 95b98959b0 mc'ize some stuff, don't comment out .lcomm directive in -fverbose-asm mode.
llvm-svn: 93860
2010-01-19 06:01:04 +00:00
Chris Lattner 282466abf7 factor this code better.
llvm-svn: 93859
2010-01-19 05:51:42 +00:00
Chris Lattner c7a062d187 Now that we have everything nicely factored (e.g. asmprinter is not
doing global variable classification anymore) and hookized, sink almost
all target targets global variable emission code into AsmPrinter and out
of each target.

Some notes:

1. PIC16 does completely custom and crazy stuff, so it is not changed.
2. XCore has some custom handling for extra directives.  I'll look at it next.
3. This switches linux/ppc to use .globl instead of .global.  If .globl is
   actually wrong, let me know and I'll fix it.
4. This makes linux/ppc get a lot of random cases right which were obviously
   wrong before, it is probably now a bit healthier.
5. Blackfin will probably start getting .comm and other things that it didn't
   before.  If this is undesirable, it should explicitly opt out of these
   things by clearing the relevant fields of MCAsmInfo.

This leads to a nice diffstat:
 14 files changed, 127 insertions(+), 830 deletions(-)

llvm-svn: 93858
2010-01-19 05:38:33 +00:00
Chris Lattner 6a160517a0 hoist handling of external globals and special globals up to common code.
This makes a similar code dead in all the other targets, I'll clean it up
in a bit.

This also moves handling of lcomm up before acquisition of a section,
since lcomm never needs a section.

llvm-svn: 93851
2010-01-19 04:39:15 +00:00
Chris Lattner e9d28b19cf move production of .reference directives for static ctor/dtor list on
darwin into common code.

llvm-svn: 93849
2010-01-19 04:34:02 +00:00
Devang Patel fe189e65d7 Revert accident check-in from r93165.
llvm-svn: 93832
2010-01-19 01:26:02 +00:00
Dale Johannesen a3db6ef9a2 Revert 93811 per request.
llvm-svn: 93818
2010-01-19 00:10:52 +00:00
Dale Johannesen 0c90d43b70 Enable code to emit dbg.declare as DEBUG_VALUE
comments (fast isel, X86).  This doesn't seem
to break any functionality, but will introduce
cases where -g affects the generated code.  I'll
be fixing that.

llvm-svn: 93811
2010-01-18 23:34:55 +00:00