Chris Lattner [Tue, 19 Jan 2010 22:42:28 +0000 (22:42 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93934
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 19 Jan 2010 22:27:22 +0000 (22:27 +0000)]
Add a comment and tidy up some whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93932
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 19 Jan 2010 22:26:02 +0000 (22:26 +0000)]
Fix a typo and an 80-column violation in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93931
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 19 Jan 2010 22:21:27 +0000 (22:21 +0000)]
Give ScalarEvolution access to the DominatorTree. It'll need this
to make more intellegent AddRec folding decisions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93930
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jan 2010 22:16:33 +0000 (22:16 +0000)]
simplify the rest of fp constant printing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93929
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jan 2010 22:11:05 +0000 (22:11 +0000)]
simplify the code for printing x86 long double, don't do work
for -fverbose-asm unless it's on.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93926
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 19 Jan 2010 22:08:34 +0000 (22:08 +0000)]
Identify predicate and optional-def operands when printing machine
instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93925
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jan 2010 22:03:38 +0000 (22:03 +0000)]
add a new EmitIntValue method that MCStreamer impls can optionally define
and that clients can use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93923
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 19 Jan 2010 21:55:32 +0000 (21:55 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93921
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 19 Jan 2010 21:51:51 +0000 (21:51 +0000)]
Add nounwinds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93919
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jan 2010 21:51:22 +0000 (21:51 +0000)]
eliminate AsmPrinter::EmitZeros: just use MCStreamer directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93918
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Tue, 19 Jan 2010 21:44:56 +0000 (21:44 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93916
91177308-0d34-0410-b5e6-
96231b3b80d8
Xerxes Ranby [Tue, 19 Jan 2010 21:26:05 +0000 (21:26 +0000)]
Stubs for getHostCPUFeatures API. This implements part of PR5389.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93913
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 19 Jan 2010 21:08:28 +0000 (21:08 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93909
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 19 Jan 2010 20:59:04 +0000 (20:59 +0000)]
Update CMake list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93905
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Tue, 19 Jan 2010 20:37:34 +0000 (20:37 +0000)]
Add some new debugging APIs to print out "raw" SelectionDAGs to make
understanding CannotYTetSelect and other errors easier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93901
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Tue, 19 Jan 2010 20:27:46 +0000 (20:27 +0000)]
Propagated the parser-side Lex function's declaration to
MCAsmParser, and changed the target-specific AsmParsers
to use it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93900
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Tue, 19 Jan 2010 20:22:31 +0000 (20:22 +0000)]
Added a Lex function to the AsmParser, to allow handling
of include directives to occur within the parser itself.
This will break the lexer's dependency on a SourceMgr as
input.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93899
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Tue, 19 Jan 2010 19:57:07 +0000 (19:57 +0000)]
Fix a bug introduced on r92564 where the name "Node" was already
in use by Mips.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93897
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jan 2010 19:46:13 +0000 (19:46 +0000)]
Generalize mcasmstreamer data emission APIs to take an address space
identifier. There is no way to work around it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93896
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 19 Jan 2010 19:45:51 +0000 (19:45 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93895
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jan 2010 19:10:44 +0000 (19:10 +0000)]
refactor code to be static functions instead of methods on AsmPrinter.
This fixes some bugs handling address spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93891
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jan 2010 18:58:52 +0000 (18:58 +0000)]
mcstreamerize AsmPrinter::EmitZeros, at least when emitting to the
default address space.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93890
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jan 2010 18:52:28 +0000 (18:52 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93889
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jan 2010 18:45:47 +0000 (18:45 +0000)]
add a "MCStreamer::EmitFill" method, and move the default implementation
(which just iteratively emits bytes) to MCStreamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93888
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jan 2010 18:37:01 +0000 (18:37 +0000)]
remove MAI::ZeroDirectiveSuffix, which is only used by MASM,
which we don't support anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93886
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 19 Jan 2010 18:31:11 +0000 (18:31 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93885
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jan 2010 18:16:19 +0000 (18:16 +0000)]
optimize ~(~X >>s Y) --> (X >>s Y), patch by Edmund Grimley
Evans!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93884
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Tue, 19 Jan 2010 17:00:43 +0000 (17:00 +0000)]
On pic function calls some arguments were marked dead and
the instruction to load those args removed. This fix PR6071
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93880
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 19 Jan 2010 16:42:10 +0000 (16:42 +0000)]
The change in r90189 adds a link in a directory outside the iPhone platform
directory when building the llvmCore_Embedded project. Fix this by putting
the iPhone platform directory into DEST_DIR instead of DEST_ROOT. I also
noticed what appears to be an unintentional use of DEVELOPER_BIN instead of
DEVELOPER_DIR, so I fixed that and changed to use DEVELOPER_DIR in some places
that were hardcoded to "Developer". Finally, the other changes here allowed
some refactoring and simplification, which I have done.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93878
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Tue, 19 Jan 2010 12:53:04 +0000 (12:53 +0000)]
load f64 +0.0 in a cleaner way. This fix part of PR5445
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93876
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Tue, 19 Jan 2010 12:37:35 +0000 (12:37 +0000)]
Fix return registers for mips eabi
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93875
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jan 2010 06:41:24 +0000 (06:41 +0000)]
mcstreamer'ize the rest of EmitGlobalVariable that is used on
darwin. The next big piece to get global variables streamerized
is EmitGlobalConstant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93870
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jan 2010 06:39:54 +0000 (06:39 +0000)]
don't let asm-verbose break the check-next lines in these tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93869
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jan 2010 06:25:51 +0000 (06:25 +0000)]
stop using the .lcomm pseudoop on darwin, instead, directly use the
.zerofill directive. Streamerize its generation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93868
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jan 2010 06:22:22 +0000 (06:22 +0000)]
fix parsing .comm directives on systems which do not represent alignments
as a power of 2. This fixes MC/AsmParser/directive_comm.s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93867
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jan 2010 06:21:23 +0000 (06:21 +0000)]
only darwin has zerofill
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93866
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 19 Jan 2010 06:19:05 +0000 (06:19 +0000)]
MDNodes are not expected to disappear or replaced by another MDNode, so there is no need to pay the cost of WeakVH and ValueMaps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93865
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 19 Jan 2010 06:09:04 +0000 (06:09 +0000)]
Avoid including DebugInfo.h in AsmPrinter.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93864
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jan 2010 06:08:15 +0000 (06:08 +0000)]
zap the ARM version of PrintGlobalVariable, which I missed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93863
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jan 2010 06:01:04 +0000 (06:01 +0000)]
mc'ize some stuff, don't comment out .lcomm directive in -fverbose-asm mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93860
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jan 2010 05:51:42 +0000 (05:51 +0000)]
factor this code better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93859
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jan 2010 05:38:33 +0000 (05:38 +0000)]
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(-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93858
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jan 2010 05:25:38 +0000 (05:25 +0000)]
use %object like other elf targets, gas accepts either.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93857
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jan 2010 05:23:59 +0000 (05:23 +0000)]
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 :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93856
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jan 2010 05:08:13 +0000 (05:08 +0000)]
hookize the cygwin ".linkonce" directive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93855
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jan 2010 04:59:55 +0000 (04:59 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93854
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jan 2010 04:53:18 +0000 (04:53 +0000)]
some cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93853
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jan 2010 04:48:20 +0000 (04:48 +0000)]
add a bool for whether .lcomm takes an alignment instead of basing this on "isdarwin".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93852
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jan 2010 04:39:15 +0000 (04:39 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93851
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jan 2010 04:34:02 +0000 (04:34 +0000)]
move production of .reference directives for static ctor/dtor list on
darwin into common code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93849
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 19 Jan 2010 04:32:48 +0000 (04:32 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93848
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jan 2010 04:21:20 +0000 (04:21 +0000)]
use BSSLocal classifier to identify 'lcomm' data instead of
duplicating the logic (differently) in lots of different targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93847
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jan 2010 04:15:51 +0000 (04:15 +0000)]
make TLOF subclassify BSS based on linkage type into private, external
and everything else (weak).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93846
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jan 2010 03:13:44 +0000 (03:13 +0000)]
now that elf weak bss symbols are handled correctly, simplify a bunch of code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93845
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jan 2010 03:06:01 +0000 (03:06 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93844
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jan 2010 02:48:26 +0000 (02:48 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93843
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jan 2010 02:46:56 +0000 (02:46 +0000)]
there is no need to emit a .section above .comm on linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93842
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 19 Jan 2010 02:44:01 +0000 (02:44 +0000)]
Even more explanation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93841
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jan 2010 02:13:06 +0000 (02:13 +0000)]
change an accessor to a predicate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93839
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jan 2010 02:09:44 +0000 (02:09 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93838
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Tue, 19 Jan 2010 01:32:44 +0000 (01:32 +0000)]
Remove this fixme, looking at the linker source, all targets pad to 4 bytes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93835
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Jan 2010 01:28:09 +0000 (01:28 +0000)]
remove extraneous ;
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93833
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 19 Jan 2010 01:26:02 +0000 (01:26 +0000)]
Revert accident check-in from r93165.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93832
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 19 Jan 2010 01:20:15 +0000 (01:20 +0000)]
Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93831
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 19 Jan 2010 00:44:15 +0000 (00:44 +0000)]
Fix r93758. Use isel patterns instead of c++ selection code to select rbit and make sure we pick different instructions for ARM vs. Thumb2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93829
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 19 Jan 2010 00:35:20 +0000 (00:35 +0000)]
Test case for r93758.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93824
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Tue, 19 Jan 2010 00:12:05 +0000 (00:12 +0000)]
Reverting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93819
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Tue, 19 Jan 2010 00:10:52 +0000 (00:10 +0000)]
Revert 93811 per request.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93818
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Mon, 18 Jan 2010 23:34:55 +0000 (23:34 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93811
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Hernandez [Mon, 18 Jan 2010 22:55:08 +0000 (22:55 +0000)]
Add comment that MDNode::getFunction() is not to be used by performance-critical code (currently only used by AsmWriter)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93802
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 18 Jan 2010 22:38:31 +0000 (22:38 +0000)]
Make opt -O3 act more like clang -O3 etc., by making the inlining thresholds
match.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93798
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 18 Jan 2010 22:36:59 +0000 (22:36 +0000)]
Add some potentially interesting transformations to README.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93797
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 18 Jan 2010 22:36:35 +0000 (22:36 +0000)]
- Add getLSDAEncoding to the PowerPC backend.
- Greatly improve the comments to the getLSDAEncoding method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93796
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 18 Jan 2010 22:27:43 +0000 (22:27 +0000)]
make llvm-config more portable to windows versions of perl,
patch by Michael Beck!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93793
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 18 Jan 2010 22:19:16 +0000 (22:19 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93787
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Mon, 18 Jan 2010 22:16:54 +0000 (22:16 +0000)]
Added a newline at the end of SMLoc.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93784
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Mon, 18 Jan 2010 22:11:34 +0000 (22:11 +0000)]
Changed the comment in the file header for SMLoc
to something more accurate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93782
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 18 Jan 2010 22:11:29 +0000 (22:11 +0000)]
Have FastISel handle llvm.trap().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93781
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Mon, 18 Jan 2010 22:07:51 +0000 (22:07 +0000)]
Split SMLoc out in its own header so that it can
be used independently of SourceMgr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93780
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 18 Jan 2010 22:01:39 +0000 (22:01 +0000)]
Minor cleanup for jump table printing. Need a reference, not a pointer, for
printing via <<. Otherwise we just print the pointer value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93777
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 18 Jan 2010 22:00:46 +0000 (22:00 +0000)]
filecheckize this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93776
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 18 Jan 2010 21:58:32 +0000 (21:58 +0000)]
filecheckize
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93775
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 18 Jan 2010 21:55:43 +0000 (21:55 +0000)]
remove a redundant test, filecheckize another.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93774
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 18 Jan 2010 21:38:44 +0000 (21:38 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93773
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 18 Jan 2010 21:09:05 +0000 (21:09 +0000)]
update mkpatch, patch by Garrison Venn!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93771
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Hernandez [Mon, 18 Jan 2010 20:42:09 +0000 (20:42 +0000)]
Make findDbgDeclare/findDbgGlobalDeclare local static functions; avoid Elts array
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93764
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Hernandez [Mon, 18 Jan 2010 20:36:54 +0000 (20:36 +0000)]
Simplify MDNode::getFunction() and assertLocalFunction() by avoiding extra Function* variable and smallptrset since function-local metadata cannot be cyclic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93762
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Mon, 18 Jan 2010 20:15:56 +0000 (20:15 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93759
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 18 Jan 2010 19:58:49 +0000 (19:58 +0000)]
Patch by David Conrad:
"On ARMv6T2 this turns cttz into rbit, clz instead of the 4 instruction
sequence it is now."
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93758
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 18 Jan 2010 19:52:14 +0000 (19:52 +0000)]
While mapping llvm.dbg.declare intrinsic manually map its operand, if possible,
because it points to an alloca instruction through metadata.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93757
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 18 Jan 2010 19:50:32 +0000 (19:50 +0000)]
reject some invalid IR. We already assert and reject this from the
.ll parser, but PR6070 wants it in the verifier too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93756
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 18 Jan 2010 19:47:53 +0000 (19:47 +0000)]
Add FIXME comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93755
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 18 Jan 2010 19:36:27 +0000 (19:36 +0000)]
- 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93753
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Hernandez [Mon, 18 Jan 2010 19:15:57 +0000 (19:15 +0000)]
Make printing of metadata more robust when function is not found (which is the normal situation for non function-local metadata)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93748
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 18 Jan 2010 17:52:28 +0000 (17:52 +0000)]
Don't try to build compiler-rt if it happens to be checked out into projects/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93729
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 18 Jan 2010 14:39:20 +0000 (14:39 +0000)]
Unnamed symbol index should be >= 1. This was lost during the mangler refactoring. Fixes PR6067.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93724
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 18 Jan 2010 12:40:05 +0000 (12:40 +0000)]
Fix refacto reported by Nicolas Geoffray.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93723
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Mon, 18 Jan 2010 01:24:43 +0000 (01:24 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93703
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 18 Jan 2010 01:21:08 +0000 (01:21 +0000)]
switch x86 zerofill emission over to use MCStreamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93702
91177308-0d34-0410-b5e6-
96231b3b80d8