Chris Lattner
a3eee3cb69
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
8fa0e35f97
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
Bob Wilson
6c0c8d41b4
Revert 94059. It is breaking the MultiSource/Benchmarks/Prolangs-C/bison
...
test on ARM.
llvm-svn: 94198
2010-01-22 19:16:40 +00:00
Chris Lattner
efcadd659d
add missing break, PR6114, patch by M Wahab.
...
llvm-svn: 94197
2010-01-22 19:11:53 +00:00
Victor Hernandez
016b286758
Fix/strengthen verification of llvm.dbg.declare
...
llvm-svn: 94195
2010-01-22 19:06:12 +00:00
Victor Hernandez
5f8c8c034a
Keep ignoring pointer-to-pointer bitcasts
...
llvm-svn: 94194
2010-01-22 19:05:05 +00:00
Chris Lattner
e5f7214fac
use both the Mangler and the CBE's mangler for identifiers,
...
this should fix a problem duncan saw handling symbols with '.' in them.
llvm-svn: 94192
2010-01-22 18:33:00 +00:00
Chris Lattner
e1d8a319a1
rename addComment -> AddComment for consistency.
...
llvm-svn: 94190
2010-01-22 18:21:35 +00:00
Benjamin Kramer
94b993ed8a
Simplify some uses of str(n)cmp with StringRef.
...
llvm-svn: 94189
2010-01-22 18:21:23 +00:00
Torok Edwin
fbcd2c76d5
Fix TimeValue::now() on Unix.
...
TimeValue()::now().toEpochTime() is supposed to be the same as time(),
but it wasn't, because toEpoch subtracted PosixZeroTime, but now()
didn't add PosixZeroTime!
Add a unittest to check this works.
llvm-svn: 94178
2010-01-22 15:51:31 +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
cfa5ebc336
add comment support to the rest of the directives.
...
llvm-svn: 94168
2010-01-22 07:36:39 +00:00
Chris Lattner
e649401824
stop using strtoll, it gives windows heartburn.
...
llvm-svn: 94167
2010-01-22 07:34:12 +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
Chris Lattner
5264fce147
give PassNameParser a home.
...
llvm-svn: 94162
2010-01-22 06:29:25 +00:00
Chris Lattner
aec33da793
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
c7a8eaf614
elimiante the dynamic_cast's from opt.
...
llvm-svn: 94160
2010-01-22 06:03:06 +00:00
Chris Lattner
e0701f987f
drop the pass name from the output.
...
llvm-svn: 94158
2010-01-22 05:52:51 +00:00
Chris Lattner
0b1c7235aa
eliminate dynamic_cast from this file.
...
llvm-svn: 94157
2010-01-22 05:46:59 +00:00
Chris Lattner
9efd4fcceb
eliminate a bunch more unneeded dynamic_cast's.
...
llvm-svn: 94156
2010-01-22 05:37:10 +00:00
Chris Lattner
2fa26e5fd0
eliminate a bunch of dynamic_cast's.
...
llvm-svn: 94155
2010-01-22 05:24:46 +00:00
Chris Lattner
21889d7337
eliminate a bunch of dynamic_cast's.
...
llvm-svn: 94154
2010-01-22 04:55:08 +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
4f026f3750
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
Chris Lattner
81e2b9a237
add new file
...
llvm-svn: 94132
2010-01-22 01:58:44 +00:00
Chris Lattner
5b0e01c54e
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
9a184b368b
forgot to svn add these, doh.
...
llvm-svn: 94130
2010-01-22 01:55:10 +00:00
Chris Lattner
00646cfbd4
create a new MCParser library and move some stuff into it.
...
llvm-svn: 94129
2010-01-22 01:44:57 +00:00
Chris Lattner
88c46d713b
stub out a new TargetAsmLexer interface.
...
llvm-svn: 94125
2010-01-22 00:58:59 +00:00
Dan Gohman
045f81981a
Revert LoopStrengthReduce.cpp to pre-r94061 for now.
...
llvm-svn: 94123
2010-01-22 00:46:49 +00:00
Jim Grosbach
267430f74d
Fix PR5694. The CMN instructions set the flags differently from CMP, so they
...
cannot be directly interchanged for comparisons against negated values.
Disable the CMN instructions for the time being.
llvm-svn: 94119
2010-01-22 00:08:13 +00:00
Victor Hernandez
7b151e9f06
No need to look through bitcasts for DbgInfoIntrinsic
...
llvm-svn: 94114
2010-01-21 23:09:12 +00:00
Victor Hernandez
ae4d949721
DbgInfoIntrinsic no longer appear in an instruction's use list
...
llvm-svn: 94113
2010-01-21 23:08:36 +00:00
Victor Hernandez
5f5abd598c
No need to look through bitcasts for DbgInfoIntrinsic
...
llvm-svn: 94112
2010-01-21 23:07:15 +00:00
Victor Hernandez
1df65186d1
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
Dan Gohman
b1ee154b6b
When inserting expressions for post-increment users which contain
...
loop-variant components, adds must be inserted after the increment.
Keep track of the increment position for this case, and insert
these adds in the correct location.
llvm-svn: 94110
2010-01-21 23:01:22 +00:00
Dan Gohman
cb8d577eb2
Include IVUsers information in LSR's debug output.
...
llvm-svn: 94108
2010-01-21 22:46:32 +00:00
Dan Gohman
29916e023d
Prune the search for candidate formulae if the number of register
...
operands exceeds the number of registers used in the initial
solution, as that wouldn't lead to a profitable solution anyway.
llvm-svn: 94107
2010-01-21 22:42:49 +00:00
Evan Cheng
32bfe1e837
Trim unneeded includes.
...
llvm-svn: 94105
2010-01-21 21:44:43 +00:00
Dan Gohman
c903499ff8
Add a comment.
...
llvm-svn: 94104
2010-01-21 21:31:09 +00:00
Chris Lattner
24716b6c63
It turns out that this #include is needed because otherwise
...
ValueMapper.cpp ends up calling an out of line
__ZNK4llvm12PATypeHolder3getEv, which is a template and llvm-config
determines arbitrarily to use the one in libipo. This sucks, but
keeping the #include is a reasonable workaround.
llvm-svn: 94103
2010-01-21 21:29:25 +00:00
Chris Lattner
9889b4be04
unbreak the build, apparently without this transformutils starts depending on libipa?
...
llvm-svn: 94102
2010-01-21 21:20:51 +00:00
Chris Lattner
e39837d5ee
tidy up
...
llvm-svn: 94101
2010-01-21 21:05:54 +00:00
Chris Lattner
5522f05d32
tidy up
...
llvm-svn: 94100
2010-01-21 21:01:47 +00:00
Chris Lattner
43f2eecffa
remove dead .erase.
...
llvm-svn: 94098
2010-01-21 20:43:39 +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
Chris Lattner
3785c11cd4
fix a problem with a missing _, testcase pending.
...
llvm-svn: 94095
2010-01-21 19:58:19 +00:00
Victor Hernandez
a9ad174b49
Don't need to include IntrinsicInst.h any more
...
llvm-svn: 94092
2010-01-21 19:33:59 +00:00
Victor Hernandez
d089f4e10b
No need to map NULL operands of metadata
...
llvm-svn: 94091
2010-01-21 19:26:20 +00:00
Dan Gohman
9b85ae26b1
Make the parser include the lower level error message in its own error
...
message, to be more informative.
llvm-svn: 94072
2010-01-21 10:15:06 +00:00
Dan Gohman
7c6759094a
Avoid printing a spurious semicolon when there is no filename.
...
llvm-svn: 94071
2010-01-21 10:13:27 +00:00
Dan Gohman
60a9bf414e
When re-using an existing cast for a user, it's still necessary to call
...
rememberInstruction so that future users of that user will be inserted
in the correct position. This fixes the Darwin selfhost.
llvm-svn: 94070
2010-01-21 10:08:42 +00:00
Nick Lewycky
9e26c1cc0c
Fix a crasher trying to fold each element in a comparison between two vectors
...
if one of the vectors didn't have elements (such as undef). Fixes PR 6096.
Fix an issue in the constant folder where fcmp (<2 x %ty>, <2 x %ty>) would
have <2 x i1> type if constant folding was successful and i1 type if it wasn't.
This exposed a related issue in the bitcode reader.
llvm-svn: 94069
2010-01-21 07:03:21 +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
Dan Gohman
51ad99d2c5
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
Eric Christopher
fa863258d0
Add strcpy_chk -> strcpy support for "don't know" object size
...
answers. This will update as object size checking gets better information.
llvm-svn: 94059
2010-01-21 01:04:38 +00:00
Evan Cheng
5d30f7c91c
Fix a minor issue in x86 load / store folding table. movups does an unaligned load so it doesn't require 16-byte alignment.
...
llvm-svn: 94058
2010-01-21 00:55:14 +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
Chris Lattner
3c5bf71353
simplify this code.
...
llvm-svn: 94048
2010-01-20 23:30:28 +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
Chris Lattner
32fb9564bc
eliminate FnStubInfo, using MachineModuleInfoMachO instead.
...
this makes function stub emission determinstic.
llvm-svn: 94033
2010-01-20 21:36:48 +00:00
Dale Johannesen
c5db599813
make findDebugLoc a class method
...
llvm-svn: 94032
2010-01-20 21:36:02 +00:00
Chris Lattner
2f7c279257
split function stub printing out to its own function,
...
no functionality change.
llvm-svn: 94030
2010-01-20 21:19:44 +00:00
Chris Lattner
1ff4794cbb
eliminate the GVStubs and HiddenGVStubs maps, and use
...
MachineModuleInfoMachO instead. This eliminates two sources
of nondeterministic output in the ppc backend, but function
stubs are still bad.
llvm-svn: 94029
2010-01-20 21:16:14 +00:00
Chris Lattner
1edfeb2c46
don't forget to initialize an instance variable!
...
llvm-svn: 94021
2010-01-20 20:48:59 +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
da363d9af8
adopt getAdjustedAnalysisPointer in a few more passes.
...
llvm-svn: 94018
2010-01-20 20:09:02 +00:00
Chris Lattner
3b03327c14
adopt getAdjustedAnalysisPointer in two more passes.
...
llvm-svn: 94017
2010-01-20 19:53:32 +00:00
Chris Lattner
397af34e6f
adopt getAdjustedAnalysisPointer in BasicCallGraph.
...
llvm-svn: 94015
2010-01-20 19:51:46 +00:00
Chris Lattner
af362f014d
add some new methods to adjust this pointers. Not used yet.
...
llvm-svn: 94013
2010-01-20 19:26:14 +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
6a7939243f
reduce redundant are's.
...
llvm-svn: 94008
2010-01-20 17:53:51 +00:00
Jakob Stoklund Olesen
8a19d3c96c
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
9fc980403e
use getGlobalDirective(), don't hardcode .globl. PR6093
...
llvm-svn: 94006
2010-01-20 17:50:30 +00:00
David Greene
35dca86659
Fix an infinite recursion problem. dbgs() should return errs() in
...
release mode.
llvm-svn: 94001
2010-01-20 15:27:19 +00:00
Chris Lattner
71601e8b3b
eliminate some uses of AsmPrinter::EmitIntXXX
...
llvm-svn: 93996
2010-01-20 07:41:15 +00:00
Victor Hernandez
ab62196c9d
Backout r93990
...
llvm-svn: 93995
2010-01-20 07:37:49 +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
Victor Hernandez
6c50c06e70
Fix/strengthen verification of llvm.dbg.declare
...
llvm-svn: 93990
2010-01-20 06:57:02 +00:00
Victor Hernandez
f2462407ee
Switch Elts from vector to SmallVector
...
llvm-svn: 93989
2010-01-20 06:56:16 +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
Chris Lattner
2b4364fe03
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
d0b2ff9b7a
Fix if/else brackets; getFunctionForValue() is to be called for non-metadata values
...
llvm-svn: 93984
2010-01-20 06:22:33 +00:00
Chandler Carruth
d6514b1e13
Fix the conditions to unambiguously show the logic they represent. This is the
...
logic enforced in the test case as well, so hopefully it is correct. Please
review Victor.
llvm-svn: 93980
2010-01-20 06:01:02 +00:00
Victor Hernandez
5fa88d4e30
Map operands of all function-local metadata, not just metadata passed to llvm.dbg.declare intrinsics
...
llvm-svn: 93979
2010-01-20 05:49:59 +00:00
Victor Hernandez
20425abea4
Avoid unnecessary Elts array
...
llvm-svn: 93978
2010-01-20 05:44:11 +00:00
Victor Hernandez
e5f2af7594
Refactor common parts of MDNode::getFunction() and assertLocalFunction() into getFunctionForValue()
...
llvm-svn: 93977
2010-01-20 04:45:57 +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
Bob Wilson
6a4491b8c7
Wrap some comments to 80 columns.
...
llvm-svn: 93940
2010-01-19 22:56:26 +00:00
Dale Johannesen
aa6655557b
Fix a case where debug_value was perturbing the
...
line number info.
llvm-svn: 93937
2010-01-19 22:50:05 +00:00
Dan Gohman
ca19445d08
When doing address-mode sinking, expand the base register first, rather
...
than the scaled register. This makes it more likely that subsequent
AddrModeMatcher queries will match the new address the same way as the
old, instead of accidentally matching what had been the base register
as the new scaled register, and then failing to match the scaled register.
This fixes some problems with address-mode sinking multiple muls into a
block, which will be a lot more common with some upcoming
LoopStrengthReduction changes.
llvm-svn: 93935
2010-01-19 22:45:06 +00:00
Chris Lattner
003b5c8472
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
8d67d2f5f8
Add a comment and tidy up some whitespace.
...
llvm-svn: 93932
2010-01-19 22:27:22 +00:00
Dan Gohman
510bffca45
Fix a typo and an 80-column violation in comments.
...
llvm-svn: 93931
2010-01-19 22:26:02 +00:00
Dan Gohman
f86d904b7d
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
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
dc50e5d128
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
d693472821
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
Chris Lattner
ecaf0dcbc6
eliminate AsmPrinter::EmitZeros: just use MCStreamer directly.
...
llvm-svn: 93918
2010-01-19 21:51:22 +00:00
Sean Callanan
936b0d3144
Promoted the getTok() method to MCAsmParser so that
...
the two token accessor functions are declared consistently.
Modified the clients of MCAsmParser to reflect this change.
llvm-svn: 93916
2010-01-19 21:44:56 +00:00
Xerxes Ranby
17dc3a0a94
Stubs for getHostCPUFeatures API. This implements part of PR5389.
...
llvm-svn: 93913
2010-01-19 21:26:05 +00:00
Jakob Stoklund Olesen
bdc17f6840
Remove predicates when changing an add into an unpredicable mov.
...
Since the mov is executed unconditionally, make sure that the add didn't have
any predicate.
llvm-svn: 93909
2010-01-19 21:08:28 +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
Sean Callanan
a83fd7d52c
Propagated the parser-side Lex function's declaration to
...
MCAsmParser, and changed the target-specific AsmParsers
to use it.
llvm-svn: 93900
2010-01-19 20:27:46 +00:00
Bruno Cardoso Lopes
e1afaf5c22
Fix a bug introduced on r92564 where the name "Node" was already
...
in use by Mips.
llvm-svn: 93897
2010-01-19 19:57:07 +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
4340cb3246
add an MCAsmStreamer::EmitFill specialization of EmitFill that
...
emits one directive instead of N. Not doing this would be a
significant regression on the # bytes generated by .fill.
llvm-svn: 93889
2010-01-19 18:52:28 +00:00
Chris Lattner
0c65fd4902
add a "MCStreamer::EmitFill" method, and move the default implementation
...
(which just iteratively emits bytes) to MCStreamer.
llvm-svn: 93888
2010-01-19 18:45:47 +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
18f49ce2d3
optimize ~(~X >>s Y) --> (X >>s Y), patch by Edmund Grimley
...
Evans!
llvm-svn: 93884
2010-01-19 18:16:19 +00:00
Bruno Cardoso Lopes
4f34432d09
On pic function calls some arguments were marked dead and
...
the instruction to load those args removed. This fix PR6071
llvm-svn: 93880
2010-01-19 17:00:43 +00:00
Bruno Cardoso Lopes
c9818a77cb
load f64 +0.0 in a cleaner way. This fix part of PR5445
...
llvm-svn: 93876
2010-01-19 12:53:04 +00:00
Bruno Cardoso Lopes
2f5c8e3495
Fix return registers for mips eabi
...
llvm-svn: 93875
2010-01-19 12:37:35 +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
00fa4b67e6
zap the ARM version of PrintGlobalVariable, which I missed.
...
llvm-svn: 93863
2010-01-19 06:08:15 +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
f75fe9e34c
use %object like other elf targets, gas accepts either.
...
llvm-svn: 93857
2010-01-19 05:25:38 +00:00
Chris Lattner
9d749a2fc4
simplify the mips target to print .size and .type for c strings
...
just like all other elf targets. Bruno, if this isn't right, please
let me know + why :)
llvm-svn: 93856
2010-01-19 05:23:59 +00:00
Chris Lattner
b1f2934fc7
hookize the cygwin ".linkonce" directive.
...
llvm-svn: 93855
2010-01-19 05:08:13 +00:00
Chris Lattner
826d77fb07
more cleanups. Emit the .local directive even on cygwin/mingw.
...
I'm not sure that this is correct, but it causes no test failures,
and just emitting a .comm without protecting its linkage somehow
is surely not right.
llvm-svn: 93854
2010-01-19 04:59:55 +00:00
Chris Lattner
f8a128a1a8
some cleanups
...
llvm-svn: 93853
2010-01-19 04:53:18 +00:00
Chris Lattner
dccbb28bca
add a bool for whether .lcomm takes an alignment instead of basing this on "isdarwin".
...
llvm-svn: 93852
2010-01-19 04:48:20 +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
Bob Wilson
58d59fe394
Fix a crash in scalarrepl for memcpy/memmove where the source and destination
...
are the same. I had already fixed a similar problem where the source and
destination were different bitcasts derived from the same alloca, but the
previous fix still did not handle the case where both operands are exactly
the same value. Radar 7552893.
llvm-svn: 93848
2010-01-19 04:32:48 +00:00
Chris Lattner
35474ca4c4
use BSSLocal classifier to identify 'lcomm' data instead of
...
duplicating the logic (differently) in lots of different targets.
llvm-svn: 93847
2010-01-19 04:21:20 +00:00
Chris Lattner
b253421711
make TLOF subclassify BSS based on linkage type into private, external
...
and everything else (weak).
llvm-svn: 93846
2010-01-19 04:15:51 +00:00
Chris Lattner
70f0c33ec8
now that elf weak bss symbols are handled correctly, simplify a bunch of code.
...
llvm-svn: 93845
2010-01-19 03:13:44 +00:00
Chris Lattner
a986aa33eb
fix a significant difference between llvm and gcc on ELF systems:
...
GCC would put weak zero initialized mutable data in the .bss section,
we would put it into a crasy '.gnu.linkonce.b.test,"aw",@nobits'
section. Fixing this will allow simplifications next up.
llvm-svn: 93844
2010-01-19 03:06:01 +00:00
Chris Lattner
5b585f8b1a
introduce a section kind for common linkage. Use this to slightly
...
simplify and commonize some of the asmprinter logic for globals.
This also avoids printing the MCSection for .zerofill, which broke
the llvm-gcc build.
llvm-svn: 93843
2010-01-19 02:48:26 +00:00
Bill Wendling
220c29465e
Even more explanation.
...
llvm-svn: 93841
2010-01-19 02:44:01 +00:00
Chris Lattner
aa1f4fd0ed
change an accessor to a predicate.
...
llvm-svn: 93839
2010-01-19 02:13:06 +00:00
Chris Lattner
1d371882b6
Cleanup handling of .zerofill on darwin:
...
1. TargetLoweringObjectFileMachO should decide if something
goes in zerofill instead of having every target do it.
2. TargetLoweringObjectFileMachO should assign said symbols to
the right MCSection, the asmprinters should just emit to the
right section.
3. Since all zerofill stuff goes through mcstreamer anymore,
MAI can have a bool "haszerofill" instead of having the textual
directive to emit.
llvm-svn: 93838
2010-01-19 02:09:44 +00:00
Nate Begeman
e945172ba4
Remove this fixme, looking at the linker source, all targets pad to 4 bytes.
...
llvm-svn: 93835
2010-01-19 01:32:44 +00:00
Devang Patel
fe189e65d7
Revert accident check-in from r93165.
...
llvm-svn: 93832
2010-01-19 01:26:02 +00:00
Eric Christopher
84bd316bd6
Fix comment.
...
llvm-svn: 93831
2010-01-19 01:20:15 +00:00
Evan Cheng
6c0fb92c03
Fix r93758. Use isel patterns instead of c++ selection code to select rbit and make sure we pick different instructions for ARM vs. Thumb2.
...
llvm-svn: 93829
2010-01-19 00:44:15 +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
Victor Hernandez
06828f025d
Add comment that MDNode::getFunction() is not to be used by performance-critical code (currently only used by AsmWriter)
...
llvm-svn: 93802
2010-01-18 22:55:08 +00:00
Eli Friedman
9ed49c5c8f
Add some potentially interesting transformations to README.
...
llvm-svn: 93797
2010-01-18 22:36:59 +00:00
Bill Wendling
c592725fbb
- Add getLSDAEncoding to the PowerPC backend.
...
- Greatly improve the comments to the getLSDAEncoding method.
llvm-svn: 93796
2010-01-18 22:36:35 +00:00
Chris Lattner
43f2fa6201
my instcombine transformations to make extension elimination more
...
aggressive changed the canonical form from sext(trunc(x)) to ashr(lshr(x)),
make sure to transform a couple more things into that canonical form,
and catch a case where we missed turning zext/shl/ashr into a single sext.
llvm-svn: 93787
2010-01-18 22:19:16 +00:00
Eric Christopher
7eb6e0ffd6
Have FastISel handle llvm.trap().
...
llvm-svn: 93781
2010-01-18 22:11:29 +00:00
Jim Grosbach
e7b52f2e87
Minor cleanup for jump table printing. Need a reference, not a pointer, for
...
printing via <<. Otherwise we just print the pointer value.
llvm-svn: 93777
2010-01-18 22:01:39 +00:00
Evan Cheng
88b65bc835
Canonicalize -1 - x to ~x.
...
Instcombine does this but apparently there are situations where this pattern will escape the optimizer and / or created by isel. Here is a case that's seen in JavaScriptCore:
%t1 = sub i32 0, %a
%t2 = add i32 %t1, -1
The dag combiner pattern: ((c1-A)+c2) -> (c1+c2)-A
will fold it to -1 - %a.
llvm-svn: 93773
2010-01-18 21:38:44 +00:00
Victor Hernandez
870913f707
Make findDbgDeclare/findDbgGlobalDeclare local static functions; avoid Elts array
...
llvm-svn: 93764
2010-01-18 20:42:09 +00:00
Victor Hernandez
fdf27a61ea
Simplify MDNode::getFunction() and assertLocalFunction() by avoiding extra Function* variable and smallptrset since function-local metadata cannot be cyclic
...
llvm-svn: 93762
2010-01-18 20:36:54 +00:00
Johnny Chen
27f000a9af
The most significant encoding bit of GPR:$src or GPR:$dst was over-specified in
...
the various MOV (register) instructions (16-bit Thumb), including tBRIND (the
indirect branch). Instead of '1', it should be specified as '?', because GPR
only specifies the register class, which includes both hi-and-lo registers.
llvm-svn: 93759
2010-01-18 20:15:56 +00:00
Jim Grosbach
8546ec9c14
Patch by David Conrad:
...
"On ARMv6T2 this turns cttz into rbit, clz instead of the 4 instruction
sequence it is now."
llvm-svn: 93758
2010-01-18 19:58:49 +00:00
Devang Patel
696cb8d410
While mapping llvm.dbg.declare intrinsic manually map its operand, if possible,
...
because it points to an alloca instruction through metadata.
llvm-svn: 93757
2010-01-18 19:52:14 +00:00
Chris Lattner
ffcec8f0d8
reject some invalid IR. We already assert and reject this from the
...
.ll parser, but PR6070 wants it in the verifier too.
llvm-svn: 93756
2010-01-18 19:50:32 +00:00
Bill Wendling
748ceca695
Add FIXME comment.
...
llvm-svn: 93755
2010-01-18 19:47:53 +00:00
Bill Wendling
a73e471c62
- Add a comment to the callback indicating that it's *extremely* not a good
...
idea, but unfortunately necessary.
- Default to using 4-bytes for the LSDA pointer encoding to agree with the
encoded value in the CIE.
llvm-svn: 93753
2010-01-18 19:36:27 +00:00
Victor Hernandez
cf6830d3eb
Make printing of metadata more robust when function is not found (which is the normal situation for non function-local metadata)
...
llvm-svn: 93748
2010-01-18 19:15:57 +00:00
Benjamin Kramer
608fd2b606
Fix refacto reported by Nicolas Geoffray.
...
llvm-svn: 93723
2010-01-18 12:40:05 +00:00
Bob Wilson
7430a98619
Emit spaces after commas in Neon register lists. This is more consistent
...
with the rest of the assembly output, is easier to read, and matches the
expected output for gcc's Neon tests.
llvm-svn: 93703
2010-01-18 01:24:43 +00:00
Chris Lattner
1d8b954b43
switch x86 zerofill emission over to use MCStreamer.
...
llvm-svn: 93702
2010-01-18 01:21:08 +00:00
Chris Lattner
8c21ffdcc6
Change CurrentFnSym to be a non-const pointer since asmprinter mutates it
...
as it emits code. Switch .globl directives to use OutStreamer instead of
doing it textually (in x86)
llvm-svn: 93700
2010-01-18 00:59:24 +00:00
Chris Lattner
c8f7717808
remove the MAI argument to MCExpr::print and switch overthing to use << when printing them.
...
llvm-svn: 93699
2010-01-18 00:37:40 +00:00
Chris Lattner
fae53f0c61
unbreak x86 jump tables with my previous patch.
...
llvm-svn: 93698
2010-01-18 00:21:06 +00:00
Chris Lattner
8b5d55ed06
now that MCSymbol::print doesn't use it's MAI argument, we can
...
remove it and change all the code that prints MCSymbols to use
<< instead, which is much simpler and cleaner.
llvm-svn: 93695
2010-01-17 21:43:43 +00:00
Chris Lattner
043e656797
rename NameNeedsEscaping -> NameNeedsQuoting, eliminate the check
...
for first character which is a digit, mangler would have taken care
of this already.
llvm-svn: 93694
2010-01-17 20:11:03 +00:00
Owen Anderson
cdea3572fa
Convert some of the dynamic opcode lookups into static ones.
...
llvm-svn: 93693
2010-01-17 19:33:27 +00:00
Chris Lattner
8c2ab10bdd
stop the CBE from using Mangler::appendMangledName, which is a private function, it is mangling types, which don't matter how they are done.
...
llvm-svn: 93692
2010-01-17 19:32:29 +00:00
Chris Lattner
83e872e1c4
Get MCSymbol out of the mangling business, and move all the logic
...
to Mangler. Now MCSymbol just decides whether to slap quotes around
a symbol when printing it.
This also fixes some weirdness where two MCSymbols could be created
for the same symbol, if one needed to be mangled and got mangled to
the other one.
llvm-svn: 93690
2010-01-17 19:23:46 +00:00
Chris Lattner
c25475ec9d
factor this code better how that the string version of getNameWithPrefix
...
takes a twine.
llvm-svn: 93687
2010-01-17 18:52:16 +00:00
Chris Lattner
b4ffc894e6
now that mangler is in libtarget, it can use MCAsmInfo instead of clients
...
having to pass various fields from it in. Simplify.
llvm-svn: 93686
2010-01-17 18:22:35 +00:00
Benjamin Kramer
4d128a2387
Switch some functions to take Twines, eliminate uses of StringExtras.h.
...
llvm-svn: 93680
2010-01-17 07:46:39 +00:00
Owen Anderson
fa1edea9ce
Fix comment.
...
llvm-svn: 93679
2010-01-17 06:49:03 +00:00
Bob Wilson
9349437c65
The Neon "vtst" instruction takes a suffix that is the element size alone --
...
adding an "i" to the suffix, indicating that the elements are integers, is
accepted but not part of the standard syntax. This helps us pass a few more
of the Neon tests from gcc.
llvm-svn: 93677
2010-01-17 06:35:17 +00:00
Bob Wilson
55d2ebda31
Fix an off-by-one error that caused the chain operand to be dropped from Neon
...
vector load-lane and store-lane instructions.
llvm-svn: 93673
2010-01-17 05:58:23 +00:00
Nate Begeman
660d979ad9
Add a note for the macho streamer and remove a used of the mangler from the soon to be defunct machowriter pass.
...
llvm-svn: 93670
2010-01-17 03:49:01 +00:00
Kenneth Uildriks
dd6ddd1aeb
When checking for sret-demotion, it needs to use legal types. When using the return value of an sret-demoted call, it needs to use possibly illegal types that match the declared Type of the callee.
...
llvm-svn: 93667
2010-01-16 23:37:33 +00:00
Benjamin Kramer
520442b32c
Update CMake files for Mangler move.
...
llvm-svn: 93665
2010-01-16 22:23:09 +00:00
Chris Lattner
f62e3ee8c5
move the mangler into libtarget from vmcore.
...
llvm-svn: 93664
2010-01-16 21:57:06 +00:00
Chris Lattner
1376b02a17
reapply the mangler gutting patch.
...
llvm-svn: 93656
2010-01-16 21:08:46 +00:00
Chris Lattner
d3b1808876
unbreak the build.
...
llvm-svn: 93654
2010-01-16 20:53:11 +00:00
Rafael Espindola
9794fdfab0
Revert 93648.
...
Mangler::getMangledName is used from lto
Mangler::setUseQuotes is used in the AsmPrinter
Mangler::setSymbolsCanStartWithDigit is used in the AsmPrinter
llvm-svn: 93652
2010-01-16 20:27:59 +00:00
Chris Lattner
8b27547d6d
Mangler::getMangledName is now dead, remove it and all the other stuff in Mangler that is now transitively dead. woo.
...
llvm-svn: 93648
2010-01-16 19:08:51 +00:00
Chris Lattner
06d45f6e75
Change DIEObjectLabel to take an MCSymbol instead of std::string.
...
llvm-svn: 93647
2010-01-16 18:50:28 +00:00
Chris Lattner
555ceabe64
rename GetPrivateGlobalValueSymbolStub -> GetSymbolWithGlobalValueBase,
...
and add an explicit ForcePrivate argument.
Switch FunctionEHFrameInfo to be MCSymbol based instead of string based.
llvm-svn: 93646
2010-01-16 18:37:32 +00:00
Chris Lattner
8a1f23af11
eliminate uses of getMangledName from AsmPrinter.cpp, last up is
...
dwarf emission which is going to be more invasive.
llvm-svn: 93645
2010-01-16 18:17:26 +00:00
Chris Lattner
d3a2163069
add an inefficient version of getNameWithPrefix that returns an std::string.
...
llvm-svn: 93641
2010-01-16 18:06:34 +00:00
Tobias Grosser
53da3f8da8
Create Generic DOTGraphTraits Printer/Viewer
...
Move the DOTGraphTraits dotty printer/viewer templates, that were developed for
the dominance tree into their own header file. This will allow reuse in future
passes.
llvm-svn: 93632
2010-01-16 10:56:41 +00:00
Devang Patel
814b7e7488
No need to use WeakVH here.
...
llvm-svn: 93631
2010-01-16 06:17:40 +00:00
Devang Patel
c0e17df3ce
Replace DebugLocTuple with DILocation.
...
llvm-svn: 93630
2010-01-16 06:09:35 +00:00
Chris Lattner
a44d8f806b
fix build failure.
...
llvm-svn: 93628
2010-01-16 03:38:27 +00:00
Chris Lattner
32c9512132
remove a couple of actively incorrect uses of getMangledName.
...
llvm-svn: 93627
2010-01-16 02:16:09 +00:00
Chris Lattner
3a3480fa53
this doesn't need the mangler.
...
llvm-svn: 93626
2010-01-16 02:15:38 +00:00
Chris Lattner
3d571ff970
more string -> sym, getMangledName is now gone from this file.
...
llvm-svn: 93624
2010-01-16 02:09:06 +00:00
Chris Lattner
1e26ec35d7
use symbols instead of strings, eliminating a bunch of getMangledName
...
calls. Add FIXMEs about a bunch of nondeterminism in stub output.
llvm-svn: 93621
2010-01-16 02:00:23 +00:00
Chris Lattner
e4e85a4e75
simplify some code.
...
llvm-svn: 93619
2010-01-16 01:45:47 +00:00
Bill Wendling
bf5cfa1a41
Retrying r91337:
...
The CIE says that the LSDA point in the FDE section is an "sdata4". That's fine,
but we need it to actually be 4-bytes in the FDE for some platforms. Allow
individual platforms to decide for themselves.
llvm-svn: 93616
2010-01-16 01:40:55 +00:00
Chris Lattner
94d91a5b30
eliminate uses of mangler and simplify code.
...
llvm-svn: 93615
2010-01-16 01:40:07 +00:00
Chris Lattner
a689edd067
fix inverted conditional
...
llvm-svn: 93614
2010-01-16 01:37:14 +00:00
Chris Lattner
a091179b5f
CurrentFnName is now dead, remove it.
...
llvm-svn: 93612
2010-01-16 01:24:10 +00:00
Chris Lattner
53c659f3ab
get pic16 off CurrentFnName
...
llvm-svn: 93610
2010-01-16 01:21:04 +00:00
Chris Lattner
fedff0f67d
remove the string form of printVisibility.
...
llvm-svn: 93609
2010-01-16 01:17:26 +00:00
Chris Lattner
426f31f458
switch more stuff onto MCSymbols
...
llvm-svn: 93608
2010-01-16 01:12:01 +00:00
Bill Wendling
efda1e4f0f
Temporarily revert r93581. It was causing failures in the ExecutionEngine tests
...
on the build bots.
llvm-svn: 93606
2010-01-16 01:06:58 +00:00
Chris Lattner
8a38fc33b0
eliminate uses of deprecated mangler apis
...
llvm-svn: 93605
2010-01-16 01:00:27 +00:00
Chris Lattner
e6b1bef33a
switch X86 target off CurFunctionName and MCIze more.
...
Note that the code wasn't calling DecorateCygMingName
when emitting the ".ascii -export" stuff at the end of
file for DLLExported functions. I don't know if it should
or not, but I'm preserving behavior.
llvm-svn: 93603
2010-01-16 00:51:39 +00:00
Bob Wilson
97598f0cba
Treat indirect branches specially only during pre-regalloc tail duplication,
...
not during the later post-alloc tail duplication.
llvm-svn: 93600
2010-01-16 00:42:25 +00:00
Chris Lattner
274c0c0db3
MCize tis, and make it keep CurrentFnSym up to date with CurrentFnName.
...
llvm-svn: 93598
2010-01-16 00:32:38 +00:00
Bob Wilson
298cdac99c
Run the pre-register allocation tail duplication pass by default. Remove
...
the -pre-regalloc-taildup command-line option, and add a new
-disable-early-taildup option.
llvm-svn: 93597
2010-01-16 00:29:50 +00:00
Chris Lattner
c6d3d82798
revert the x86 part of my last patch, cygwin is mutating CurrentFnName!
...
llvm-svn: 93595
2010-01-16 00:24:20 +00:00
Chris Lattner
719e908e7c
MCize a bunch more stuff, eliminating a lot of uses of the mangler
...
and CurrentFnName.
llvm-svn: 93594
2010-01-16 00:21:18 +00:00
Chris Lattner
8b96af5665
remove two write-only sets.
...
llvm-svn: 93590
2010-01-15 23:56:03 +00:00
Chris Lattner
ae9b9eed18
supplement CurrentFnName with CurrentFnSym, which will eventually
...
replace it. Upgrade Alpha, Blackfin, and part of CellSPU to not
use mangler anymore. CellSPU needs more invasive surgery.
llvm-svn: 93589
2010-01-15 23:55:16 +00:00
Chris Lattner
7fec180909
add a version of AsmPrinter::printVisibility that takes an MCSymbol.
...
llvm-svn: 93587
2010-01-15 23:38:51 +00:00
Chris Lattner
6394a6e285
use MCSymbol instead of getMangledName() in all cases except one.
...
llvm-svn: 93582
2010-01-15 23:31:55 +00:00
Ted Kremenek
12821816c6
BumpPtrAllocator: Have the DefaultSlabAllocator created at runtime, not initialization time. This removes one of the 'init_constructors' reported in <rdar://problem/7545356>.
...
llvm-svn: 93581
2010-01-15 23:29:34 +00:00
Dale Johannesen
cb7554a3ab
Adjust some comments per review.
...
llvm-svn: 93580
2010-01-15 23:29:29 +00:00
Chris Lattner
45400336ab
mc'ize a bunch of symbol stuff, eliminating std::strings.
...
llvm-svn: 93578
2010-01-15 23:26:49 +00:00
Chris Lattner
0dca0a9650
add another helper
...
llvm-svn: 93577
2010-01-15 23:25:11 +00:00
David Greene
b0c0e6433f
Fix PR6019. A load has more than one use if it feeds a bitconvert that
...
has more than one use.
llvm-svn: 93576
2010-01-15 23:23:41 +00:00
Chris Lattner
91687f6e28
add a AsmPrinter::GetGlobalValueSymbol and GetExternalSymbolSymbol
...
helper method, use it to simplify some code.
llvm-svn: 93575
2010-01-15 23:18:17 +00:00
Ted Kremenek
1ec62347e5
Update CMake build.
...
llvm-svn: 93571
2010-01-15 22:59:46 +00:00
Ted Kremenek
bda8193caf
Update CMake build.
...
llvm-svn: 93570
2010-01-15 22:59:11 +00:00
Dale Johannesen
188fa96cf9
DEBUG_VALUE is now variable sized, as it has a
...
target-dependent memory address representation in it.
Restore X86 printing of DEBUG_VALUE; lowering is
done in X86RegisterInfo using the normal algorithm.
llvm-svn: 93565
2010-01-15 22:22:35 +00:00
Jim Grosbach
d1a8a7819c
Update Thumb1 storeRegToStackSlot() and loadRegFromStackSlot() to properly
...
handle physical registers R0-R7 when described as having a non-tGPR register
class.
llvm-svn: 93564
2010-01-15 22:21:03 +00:00
Dan Gohman
d2968c4c12
Fix a typo that Anton noticed.
...
llvm-svn: 93563
2010-01-15 22:18:15 +00:00
Devang Patel
0633820599
Add FIXME.
...
llvm-svn: 93562
2010-01-15 22:08:16 +00:00
Bob Wilson
e0da4b6cff
Fix a comment typo.
...
llvm-svn: 93560
2010-01-15 21:55:02 +00:00
Eric Christopher
8444d7536c
Remove the InlineHint attribute. There are no current or planned
...
users.
llvm-svn: 93558
2010-01-15 21:36:30 +00:00
Anton Korobeynikov
a6450df92a
zext / truncate is free on msp430. Inform codegen about this.
...
llvm-svn: 93556
2010-01-15 21:19:43 +00:00
Anton Korobeynikov
ce52fd5f93
Add branch relaxation pass (shamelessly stolen from PPC).
...
llvm-svn: 93554
2010-01-15 21:19:05 +00:00
Anton Korobeynikov
71471293a5
Provide instruction sizes & encoding. No opcodes yet (but not needed so far).
...
llvm-svn: 93553
2010-01-15 21:18:39 +00:00
Anton Korobeynikov
93a7d026a8
Enable bit tests and setcc stuff.
...
llvm-svn: 93552
2010-01-15 21:18:18 +00:00
Anton Korobeynikov
6826ce7e96
Add micro-optimization which allows us to fold imm into cmp. This allows us to save 1 word (sometimes) and reduce register pressure.
...
llvm-svn: 93551
2010-01-15 21:18:02 +00:00
Anton Korobeynikov
e57b234b88
Add instruction formats & support stuff
...
llvm-svn: 93550
2010-01-15 21:17:13 +00:00
Jakob Stoklund Olesen
834d70d3df
Don't make changes to the MBB in MachineBasicBlock::canFallThrough().
...
This fixes the regression for -pre-regalloc-taildup in
MultiSource/Applications/lambda-0.1.3.
llvm-svn: 93541
2010-01-15 20:00:12 +00:00
Jakob Stoklund Olesen
73ef9556dd
Simplify logic. Any functional change is unintended.
...
llvm-svn: 93540
2010-01-15 19:59:57 +00:00
Chris Lattner
18bcf30497
unbreak the build, grr symlinks.
...
llvm-svn: 93539
2010-01-15 19:51:05 +00:00
David Greene
554039a914
Add some debug routines to SelectionDAG to dump full DAGs.
...
print/dumpWithDepth allows one to dump a DAG up to N levels deep.
dump/printWithFullDepth prints the whole DAG, subject to a depth limit
on 100 in the default case (to prevent infinite recursion).
Have CannotYetSelect to a dumpWithFullDepth so it is clearer exactly
what the non-matching DAG looks like.
llvm-svn: 93538
2010-01-15 19:43:23 +00:00
Chris Lattner
e17df0b7f0
fix a bug in range information for $42, eliminate an
...
unneeded argument from ParseExpression.
llvm-svn: 93536
2010-01-15 19:39:23 +00:00
Chris Lattner
015cfb1577
add range information for mem X86Operand's, now all
...
X86Operand's have range info.
llvm-svn: 93535
2010-01-15 19:33:43 +00:00
Chris Lattner
528d00b913
extend MCAsmParser::ParseExpression and ParseParenExpression
...
to return range information for subexpressions. Use this to
provide range info for several new X86Operands.
llvm-svn: 93534
2010-01-15 19:28:38 +00:00
Chris Lattner
86e6153382
give X86Operand a ctor and start passing SMLoc's into it.
...
llvm-svn: 93532
2010-01-15 19:06:59 +00:00
Victor Hernandez
b324e66f4c
Improve llvm.dbg.declare intrinsic by referring directly to the storage in its first argument, via function-local metadata (instead of via a bitcast).
...
This patch also cleans up code that expects there to be a bitcast in the first argument and testcases that call llvm.dbg.declare.
It also strips old llvm.dbg.declare intrinsics that did not pass metadata as the first argument.
llvm-svn: 93531
2010-01-15 19:04:09 +00:00
Dale Johannesen
fb85dddba0
Revert 93499. After discussion with Chris we agreed
...
FrameIndexes should be lowered, but the same way as
everything else (target dependent) rather than in a
special hacked way. The lowering needs to be done
for eventual purposes of Dwarf generation.
llvm-svn: 93530
2010-01-15 18:58:14 +00:00
Chris Lattner
0c2538fee2
add range location info for registers, change
...
X86Operand::Create* implementations to avoid
copy ctor use.
llvm-svn: 93528
2010-01-15 18:51:29 +00:00
Nate Begeman
d232150b83
Hook up llc's -filetype=obj to use MCStreamer if an MCCodeEmitter is available.
...
Remove most of old Mach-O Writer support, it has been replaced by MCMachOStreamer
Further refactoring to completely remove MachOWriter and drive the object file
writer with the AsmPrinter MCInst/MCSection logic is forthcoming.
llvm-svn: 93527
2010-01-15 18:51:18 +00:00
Chris Lattner
a2bbb7cbc6
clean up the memory management of the operands.
...
llvm-svn: 93526
2010-01-15 18:44:13 +00:00
Chris Lattner
cc2ad08a11
refactor ParseRegister to avoid using X86Operand as a temporary
...
datastructure when parsing a mem operand.
llvm-svn: 93521
2010-01-15 18:27:19 +00:00
Victor Hernandez
8d4904b639
Revert r93504 because older uses of llvm.dbg.declare intrinsics need to be auto-upgraded
...
llvm-svn: 93515
2010-01-15 17:36:47 +00:00
Jay Foad
bcbdbfb345
Fix http://llvm.org/PR6028 , an assertion failure when an UndefValue of
...
integer type is used.
llvm-svn: 93509
2010-01-15 08:32:58 +00:00
Bob Wilson
1a234c0aee
Change pre-regalloc tail duplication to only duplicate indirect branch blocks.
...
The pre-regalloc pass caused some regressions in both compile time and
performance of the generated code, and it did not improve performance, except
for indirect branches. I also moved the check for single-block loops to speed
up the common case when running the taildup pass before reg allocation.
llvm-svn: 93505
2010-01-15 06:29:17 +00:00
Victor Hernandez
5d6551816b
Improve llvm.dbg.declare intrinsic by referring directly to the storage in its first argument, via function-local metadata (instead of via a bitcast).
...
This patch also cleans up code that expects there to be a bitcast in the first argument and testcases that call llvm.dbg.declare.
llvm-svn: 93504
2010-01-15 03:37:48 +00:00
Dale Johannesen
0e7e55da1d
Lower FrameIndex operand of DEBUG_VALUE (specially) and
...
print it as a comment on X86.
llvm-svn: 93499
2010-01-15 01:54:55 +00:00
Anton Korobeynikov
cefa7addc8
Fix cmp emission on msp430: we definitely should turn stuff like
...
"icmp lhs, rhs" into "cmp rhs, lhs". This should fix PR5979.
llvm-svn: 93496
2010-01-15 01:29:49 +00:00
Devang Patel
89880c8224
Do not use AT_specification die for static variables. It confuses gdb.
...
llvm-svn: 93494
2010-01-15 01:12:22 +00:00
Jim Grosbach
4f1b0ded75
fix 80-column violations
...
llvm-svn: 93487
2010-01-15 00:36:15 +00:00
Jim Grosbach
2e3abd7e82
Fix 80 column violations and clean up whitespace
...
llvm-svn: 93484
2010-01-15 00:32:47 +00:00
Devang Patel
2108ee075f
Do not emit multiple AT_container_type attributes.
...
We need to find a better way to emit this info.
llvm-svn: 93481
2010-01-15 00:26:31 +00:00
Jim Grosbach
029fbd984b
Name change for consistency. No functional change.
...
llvm-svn: 93480
2010-01-15 00:22:18 +00:00
Jim Grosbach
d0860d6e02
EmitAtomicCmpSwap() custome inserter needs to delete the MI passed in. EmitAtomicBinary() already does this.
...
llvm-svn: 93479
2010-01-15 00:18:34 +00:00
Jeffrey Yasskin
3aa70b2c4f
Teach PPC how to replaceMachineCodeForFunction correctly. (Fixes
...
JITTest.FunctionIsRecompiledAndRelinked.)
llvm-svn: 93475
2010-01-14 23:15:26 +00:00
Eric Christopher
f567e1b426
Pad my commit stats by reducing indentation in this now separate
...
commit.
llvm-svn: 93473
2010-01-14 23:00:10 +00:00
Johnny Chen
0f45f4f849
Added 16-bit Thumb Load/Store immediate instructions with encoding bits so that
...
the disassembler can properly decode Load/Store register/immediate instructions.
llvm-svn: 93471
2010-01-14 22:42:17 +00:00
Chris Lattner
f29c0b6880
Split the TargetAsmParser "ParseInstruction" interface in half:
...
the new ParseInstruction method just parses and returns a list of
target operands. A new MatchInstruction interface is used to
turn the operand list into an MCInst.
This requires new/deleting all the operands, but it also gives
targets the ability to use polymorphic operands if they want to.
llvm-svn: 93469
2010-01-14 22:21:20 +00:00
Anton Korobeynikov
abf4ef0ee1
Remove pseudo-MI in custom inserter.
...
llvm-svn: 93467
2010-01-14 22:09:11 +00:00
Dale Johannesen
b297cdd937
Fix a comment.
...
llvm-svn: 93463
2010-01-14 21:50:17 +00:00
Eric Christopher
35dd9e8e1d
Few minor changes that were requested. No functional change.
...
llvm-svn: 93462
2010-01-14 21:48:00 +00:00
Jim Grosbach
9ae81816bc
Add comment explaining the necessity of r93456
...
llvm-svn: 93459
2010-01-14 21:38:31 +00:00
Chris Lattner
77fd677111
prune #includes in TargetAsmParser.h
...
Pass in SMLoc of instr opcode into ParseInstruction.
Make AsmToken be a class, not a struct.
llvm-svn: 93457
2010-01-14 21:32:45 +00:00
Jim Grosbach
0868567fc3
Dwarf EH prepare needs to be run after SjLj prepare. Otherwise,
...
catch info can get misplaced when a selector ends up more than one block
removed from the parent invoke(s). This could happen when a landing pad is
shared by multiple invokes and is also a target of a normal edge from
elsewhere.
llvm-svn: 93456
2010-01-14 21:22:16 +00:00
Chris Lattner
ecc8eece7d
introduce MCParsedAsmOperand
...
llvm-svn: 93455
2010-01-14 21:21:40 +00:00
Chris Lattner
872501b6e0
introduce the MCParsedAsmOperand class.
...
llvm-svn: 93454
2010-01-14 21:20:55 +00:00
Evan Cheng
8e670ee381
Small tweak to inline cost computation. Ext of i/fcmp results are mostly optimized away in codegen.
...
llvm-svn: 93453
2010-01-14 21:04:31 +00:00
Anton Korobeynikov
105682dc96
Remove spurious semicolon.
...
Patch by Diego Iastrubni!
llvm-svn: 93450
2010-01-14 20:19:51 +00:00
Victor Hernandez
8296da7b56
In debug builds, assert that function-local metadata has only 1 parent function
...
llvm-svn: 93449
2010-01-14 20:12:34 +00:00
Eric Christopher
f3ac066418
Reduce the inlining cost of functions that contain calls to easily,
...
and frequently optimized functions.
llvm-svn: 93448
2010-01-14 20:12:34 +00:00
Victor Hernandez
572218b53b
Simplify code that chooses when to enumerate function-local metadata operands
...
llvm-svn: 93446
2010-01-14 19:54:11 +00:00
Victor Hernandez
36aee30dfb
Avoid modifying ValueEnumerator's MD ValueList by choosing which function-local MD to write based on the function currently being written
...
llvm-svn: 93441
2010-01-14 19:38:44 +00:00
Jakob Stoklund Olesen
0ca14e4498
ARM "l" constraint for inline asm means R0-R7, also for Thumb2.
...
This is consistent with llvm-gcc's arm/constraints.md.
Certain instructions (e.g. CBZ, CBNZ) require a low register, even in Thumb2
mode.
llvm-svn: 93436
2010-01-14 18:19:56 +00:00
Dan Gohman
dd5286dc63
Fix a codegen abort seen in 483.xalancbmk.
...
llvm-svn: 93417
2010-01-14 03:08:49 +00:00