Sean Callanan
7b52485bbd
Filled out the skeleton of the TargetAsmLexer to behave
...
exactly like an MCAsmLexer. (The difference is that the
TargetAsmLexer knows how to handle target-specific stuff
like registers, whereas the MCAsmLexer is fully generic.)
llvm-svn: 94237
2010-01-22 22:35:01 +00:00
Chris Lattner
2fa5f5ce56
inline away the trivial AsmPrinter::EOL() method.
...
llvm-svn: 94230
2010-01-22 22:09:00 +00:00
Chris Lattner
19abca37d2
inline AsmPrinter::PrintHex into its two trivial callers.
...
llvm-svn: 94228
2010-01-22 21:57:56 +00:00
Chris Lattner
0347671f14
change this to be a static function instead of a method on asmprinter.
...
llvm-svn: 94227
2010-01-22 21:50:41 +00:00
Chris Lattner
639c136993
Changes to fix buffering that I forgot to commit with previous patch.
...
llvm-svn: 94222
2010-01-22 21:16:10 +00:00
Chris Lattner
bc01d5b148
Convert some more random-comment-printing stuff to use
...
AddComment and GetCommentOS. Add a blank line between globals
(even in non-verbose mode) to make the assembly more readable.
llvm-svn: 94202
2010-01-22 19:52:01 +00:00
Chris Lattner
20390f5205
add a new MCAsmStreamer::GetCommentOS method to simplify stuff
...
that doesn't want to use twines.
llvm-svn: 94199
2010-01-22 19:17:48 +00:00
Chris Lattner
784036d536
rename addComment -> AddComment for consistency.
...
llvm-svn: 94190
2010-01-22 18:21:35 +00:00
Benjamin Kramer
13b3fa1f36
Simplify some uses of str(n)cmp with StringRef.
...
llvm-svn: 94189
2010-01-22 18:21:23 +00:00
Chris Lattner
df1b7b6164
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
5eb0c8a2bd
pass "-fasm-verbose" into createAsmStreamer.
...
llvm-svn: 94165
2010-01-22 07:06:15 +00:00
Chris Lattner
276811b58a
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
Chris Lattner
437827ceb5
give PassNameParser a home.
...
llvm-svn: 94162
2010-01-22 06:29:25 +00:00
Chris Lattner
cb9776c350
add an out-of-line virtual method to CmpInst to give it a home.
...
llvm-svn: 94161
2010-01-22 06:25:37 +00:00
Chris Lattner
c07d7f41e3
elimiante the dynamic_cast's from opt.
...
llvm-svn: 94160
2010-01-22 06:03:06 +00:00
Chris Lattner
1bd9c3ec88
eliminate a bunch of dynamic_cast's.
...
llvm-svn: 94155
2010-01-22 05:24:46 +00:00
Chris Lattner
997ad42b6d
eliminate a bunch of dynamic_cast's.
...
llvm-svn: 94154
2010-01-22 04:55:08 +00:00
Evan Cheng
8e25244a48
Add two target hooks to determine whether two loads are near and should be scheduled together.
...
llvm-svn: 94147
2010-01-22 03:34:51 +00:00
Evan Cheng
4045e89a8f
Add DenseMapInfo for signed long long.
...
llvm-svn: 94146
2010-01-22 03:33:01 +00:00
Chris Lattner
c0e2ef62fa
move some files out of the llvm-mc tool into the MCParser library so
...
other tools can link it.
llvm-svn: 94131
2010-01-22 01:58:08 +00:00
Chris Lattner
9a84d96edf
create a new MCParser library and move some stuff into it.
...
llvm-svn: 94129
2010-01-22 01:44:57 +00:00
Chris Lattner
8cd569a4b0
allow registering target lexers.
...
llvm-svn: 94127
2010-01-22 01:10:40 +00:00
Chris Lattner
2b19da4fa0
stub out a new TargetAsmLexer interface.
...
llvm-svn: 94125
2010-01-22 00:58:59 +00:00
Dan Gohman
525f7d7833
Revert LoopStrengthReduce.cpp to pre-r94061 for now.
...
llvm-svn: 94123
2010-01-22 00:46:49 +00:00
Ted Kremenek
20b78f8eef
Store flags in bitfields instead of masking them into the pointer for the left child. This leads to some nice conceptually cleanups.
...
llvm-svn: 94121
2010-01-22 00:28:27 +00:00
Ted Kremenek
30dee16eed
Tidy up assertion syntax. No functionality change.
...
llvm-svn: 94117
2010-01-21 23:42:57 +00:00
Victor Hernandez
d44671b931
DbgInfoIntrinsics no longer appear in an instruction's use list; so clean up looking for them in use iterations and remove OnlyUsedByDbgInfoIntrinsics()
...
llvm-svn: 94111
2010-01-21 23:05:53 +00:00
Jim Grosbach
57ca094a52
back this out for now. Growing Function is not good.
...
llvm-svn: 94097
2010-01-21 20:10:22 +00:00
Benjamin Kramer
262bcb8d6e
struct/class mismatch.
...
llvm-svn: 94075
2010-01-21 15:40:14 +00:00
Chris Lattner
0ce1aa4aa6
remove a couple of asserts that use RTTI.
...
llvm-svn: 94068
2010-01-21 06:11:03 +00:00
Dan Gohman
be34c35f32
Re-implement the main strength-reduction portion of LoopStrengthReduction.
...
This new version is much more aggressive about doing "full" reduction in
cases where it reduces register pressure, and also more aggressive about
rewriting induction variables to count down (or up) to zero when doing so
reduces register pressure.
It currently uses fairly simplistic algorithms for finding reuse
opportunities, but it introduces a new framework allows it to combine
multiple strategies at once to form hybrid solutions, instead of doing
all full-reduction or all base+index.
llvm-svn: 94061
2010-01-21 02:09:26 +00:00
Chris Lattner
309cca906a
eliminate dynamic_cast from the pass manager.
...
llvm-svn: 94060
2010-01-21 02:07:07 +00:00
Jim Grosbach
cf6e6e1c79
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
Sean Callanan
cddf628d31
Modified MCAsmLexer to return error information upward
...
rather than printing it locally, reducing its dependence
on SourceMgr.
llvm-svn: 94041
2010-01-20 22:18:24 +00:00
Dale Johannesen
e6672a5bda
make findDebugLoc a class method
...
llvm-svn: 94032
2010-01-20 21:36:02 +00:00
David Greene
80fdc554d0
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
56e3aa006f
add some new methods to adjust this pointers. Not used yet.
...
llvm-svn: 94013
2010-01-20 19:26:14 +00:00
Chris Lattner
86ab039320
add a helper method.
...
llvm-svn: 94012
2010-01-20 19:25:45 +00:00
Jakob Stoklund Olesen
ac14f3bf31
Move per-function inline threshold calculation to a method.
...
No functional change except the forgotten test for
InlineLimit.getNumOccurrences() == 0 in the CurrentThreshold2 calculation.
llvm-svn: 94007
2010-01-20 17:51:28 +00:00
Chris Lattner
b619c47740
inline and radically simplify printDataDirective. It will eventually
...
go completely away.
llvm-svn: 93994
2010-01-20 07:33:29 +00:00
Chris Lattner
3104fa4a71
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
6ea74a85bb
give createAsmStreamer an 'isLittleEndian' argument.
...
llvm-svn: 93986
2010-01-20 06:39:07 +00:00
Chris Lattner
f25a9e1265
revert 93934, removing the MCAsmInfo endianness bit. I can't
...
stomache MCAsmInfo having this, and I found a better solution to
this layering issue.
llvm-svn: 93985
2010-01-20 06:34:14 +00:00
Victor Hernandez
d8a7839c7b
Refactor common parts of MDNode::getFunction() and assertLocalFunction() into getFunctionForValue()
...
llvm-svn: 93977
2010-01-20 04:45:57 +00:00
Dale Johannesen
ac7865b75b
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
94c0e08951
Make SCEVAddRecExpr's getType return a pointer type when the add
...
has a pointer member. This helps reduce unnecessary bitcasting
and uglygeps.
llvm-svn: 93939
2010-01-19 22:53:50 +00:00
Chris Lattner
8e3badb9a7
give MCAsmInfo a 'has little endian' bit. This is unfortunate, but
...
I really want clients of the streamer to be able to say "emit this
64-bit integer" and have it get broken down right by the streamer.
I may change this in the future, we'll see how it works out.
llvm-svn: 93934
2010-01-19 22:42:28 +00:00
Dan Gohman
273322a12b
Give ScalarEvolution access to the DominatorTree. It'll need this
...
to make more intellegent AddRec folding decisions.
llvm-svn: 93930
2010-01-19 22:21:27 +00:00
Chris Lattner
20c1857075
add a new EmitIntValue method that MCStreamer impls can optionally define
...
and that clients can use.
llvm-svn: 93923
2010-01-19 22:03:38 +00:00
Dan Gohman
71b2d12a48
Add a new helper function to IVUsers for returning the "canonical"
...
form of an expression. This is the expression without the
post-increment adjustment made, which is useful in determining
which registers will be used by the expansion.
llvm-svn: 93921
2010-01-19 21:55:32 +00:00