Rafael Espindola
5d882894d8
Lower TLS_addr32 and TLS_addr64.
...
llvm-svn: 120225
2010-11-27 20:43:02 +00:00
Rafael Espindola
eab0800695
Implement the data16 prefix.
...
llvm-svn: 120224
2010-11-27 20:29:45 +00:00
Benjamin Kramer
f2d08136bf
Remove PIC16 remnants.
...
llvm-svn: 120223
2010-11-27 18:20:30 +00:00
Daniel Dunbar
e308b8edab
macho-dump: Add support for --dump-section-data and tweak a few format strings.
...
llvm-svn: 120219
2010-11-27 13:58:16 +00:00
Daniel Dunbar
83224fc391
macho-dump: Add support for dumping symbol table entries.
...
llvm-svn: 120218
2010-11-27 13:52:53 +00:00
Daniel Dunbar
8680ce6ffc
macho-dump: Add support for dumping string table data.
...
llvm-svn: 120217
2010-11-27 13:46:11 +00:00
Daniel Dunbar
0ac77d526d
macho-dump: Add support for dumping relocation entries.
...
llvm-svn: 120216
2010-11-27 13:39:48 +00:00
Daniel Dunbar
5867690cfa
macho-dump: Add support for dumping sections.
...
llvm-svn: 120215
2010-11-27 13:33:15 +00:00
Daniel Dunbar
c983afc5a1
macho-dump: Add support for dumping dysymtab indirect symbol table.
...
llvm-svn: 120214
2010-11-27 13:26:12 +00:00
Daniel Dunbar
f9c900d3c9
Add an optional LowerCase argument to hexdigit().
...
llvm-svn: 120213
2010-11-27 13:19:46 +00:00
NAKAMURA Takumi
f80507c28c
CMake: lit(check.vcproj) can run with multiple configurations on Visual Studio.
...
Unittests need LLVM_BUILD_MODE to pick up each test.
Confirmed on CentOS5, Mingw, MSYS, and with possible configurations on VS8 and VS10.
llvm-svn: 120212
2010-11-27 13:10:11 +00:00
Benjamin Kramer
032f08b556
Unbreak build for newer GCCs.
...
llvm-svn: 120205
2010-11-27 09:08:25 +00:00
Daniel Dunbar
33dab2a6ee
macho-dump: Add support for dumping symtab and dysymtab commands.
...
llvm-svn: 120204
2010-11-27 08:33:44 +00:00
Daniel Dunbar
a8070e0284
macho-dump: Add support for dumping segment load commands.
...
llvm-svn: 120203
2010-11-27 08:22:29 +00:00
Owen Anderson
8ba5f39f70
Second attempt at fixing the performance regressions introduced
...
by my recent GVN improvement. Looking through a single layer of
PHI nodes when attempting to sink GEPs, we need to iteratively
look through arbitrary PHI nests.
llvm-svn: 120202
2010-11-27 08:15:55 +00:00
Daniel Dunbar
762bf86919
ADT/InMemoryStruct: Add an experimental helper class intended for use in
...
situations where on the common path an API can return a pointer to some direct
memory, but which on an exceptional path may need to return a pointer to a
temporary struct.
llvm-svn: 120201
2010-11-27 08:11:02 +00:00
Daniel Dunbar
65dc891942
raw_ostream::write_escaped: Add a UseHexEscapes argument.
...
llvm-svn: 120200
2010-11-27 07:59:50 +00:00
Daniel Dunbar
768a5e8004
Fix a comment.
...
llvm-svn: 120199
2010-11-27 07:39:37 +00:00
Daniel Dunbar
3977e7d22c
Object/Mach-O: Add header and load command information.
...
llvm-svn: 120198
2010-11-27 07:19:41 +00:00
Bob Wilson
d74cf2c8f6
Refactor. Set alignment bit in VLD1-dup instruction classes.
...
llvm-svn: 120197
2010-11-27 07:12:02 +00:00
Daniel Dunbar
795ab9b06d
build/Makefiles: Don't build unittests when ONLY_TOOLS is set.
...
llvm-svn: 120196
2010-11-27 06:59:16 +00:00
Daniel Dunbar
feb1c5d830
Object/Mach-O: Validate Mach-O magic and initialize format info.
...
llvm-svn: 120195
2010-11-27 06:39:22 +00:00
Bob Wilson
c92eea0175
Add NEON VLD1-dup instructions (load 1 element to all lanes).
...
llvm-svn: 120194
2010-11-27 06:35:16 +00:00
Bob Wilson
3a63f9d852
Fix incorrect scheduling itineraries for NEON vld1/vst1 instructions.
...
I added these instructions recently but I have no idea where these "1"
values in the NextCycles field came from. As far as I can tell now,
these instruction stages are clearly intended to overlap.
llvm-svn: 120193
2010-11-27 06:35:09 +00:00
Daniel Dunbar
9630fb3c10
macho-dump: More sketching.
...
llvm-svn: 120192
2010-11-27 06:19:17 +00:00
Daniel Dunbar
fdfb635bff
macho-dump: Stub out C++ macho-dump tool.
...
llvm-svn: 120191
2010-11-27 05:58:44 +00:00
Daniel Dunbar
1df8d83a55
MC/Mach-O: Start stubbing out a Mach-O object file wrapper.
...
llvm-svn: 120190
2010-11-27 05:38:50 +00:00
Daniel Dunbar
4b128a5d4f
Reduce nesting.
...
llvm-svn: 120189
2010-11-27 05:18:48 +00:00
Daniel Dunbar
eab6e401fe
MC/Mach-O: Migrate more constants into MachOFormat.h.
...
llvm-svn: 120188
2010-11-27 04:59:14 +00:00
Daniel Dunbar
a5f50c16f7
MC/Mach-O: Switch to using MachOFormat.h.
...
- I'm leaving MachO.h, because I believe it has external consumers, but I would really like to eliminate it (we have stylistic disagreements with one another).
llvm-svn: 120187
2010-11-27 04:38:36 +00:00
Daniel Dunbar
2263ca4834
MC/Mach-O: Introduce Object/MachOFormat for describing purely platform / machine
...
independent information on the Mach object format, and move some stuff from
MachObjectWriter.cpp there.
llvm-svn: 120186
2010-11-27 04:19:38 +00:00
Daniel Dunbar
1440fd3539
macho-dump: Fix typo.
...
llvm-svn: 120185
2010-11-27 04:00:06 +00:00
Benjamin Kramer
9610ea943c
BitVector tweaks.
...
- Double the vector's capacity when growing to avoid unneeccesary reallocation.
- Do the reallocation with realloc(3) which can expand the memory in place.
llvm-svn: 120183
2010-11-26 18:25:20 +00:00
Benjamin Kramer
4fcd9163fc
StringRefs are POD-like.
...
llvm-svn: 120181
2010-11-26 14:36:54 +00:00
NAKAMURA Takumi
98fa0159fc
unittests/JITTests: Don't use --export-dynamic but --export-all-symbols on cygming.
...
GNU ld/PECOFF accepts but ignores them below;
--version-script
--export-dynamic
--rpath
FIXME: autoconf should be aware of them.
llvm-svn: 120179
2010-11-26 09:32:02 +00:00
NAKAMURA Takumi
c54a9692ce
test/site.exp.in: Add "emitir", for now, fixing up r120156. CMake depends on site.exp.in, though, "emitir" might be unused.
...
llvm-svn: 120174
2010-11-26 08:30:15 +00:00
Jakob Stoklund Olesen
5e9c70ee57
Add B+-tree test case that creates a height 3 tree with a smaller root node.
...
Change temporary debugging code to write a dot file directly.
llvm-svn: 120171
2010-11-26 06:54:20 +00:00
Jakob Stoklund Olesen
90e6f41f69
Extract template function adjustSiblingSizes(), allowing instances to be shared
...
between B+-trees using the same KeyT.
llvm-svn: 120170
2010-11-26 06:54:17 +00:00
Rafael Espindola
bf4a4e4ad9
Remove the unused TheTarget member.
...
llvm-svn: 120168
2010-11-26 04:24:21 +00:00
Michael J. Spencer
2eb0a6fafa
Fix spelling!
...
llvm-svn: 120167
2010-11-26 04:16:20 +00:00
Michael J. Spencer
f13f442b1a
Fix Whitespace.
...
llvm-svn: 120166
2010-11-26 04:16:08 +00:00
Jakob Stoklund Olesen
a12095d26d
Move tree navigation to a new Path class that doesn't have to be a template.
...
The path also holds a reference to the root node, and that allows important
iterator accessors like start() and stop() to have no conditional code. (When
the compiler is clever enough to remove it.)
llvm-svn: 120165
2010-11-26 01:39:40 +00:00
Duncan Sands
7904068186
Remove explicit uses of -emit-llvm, the test infrastructure adds it
...
automatically. Use -S with llvm-gcc rather than -c, so tests can
work when llvm-gcc is really dragonegg (which can output IR with -S
but not -c). Yes, dragonegg supports objective-c++ (poorly though).
llvm-svn: 120164
2010-11-25 21:48:20 +00:00
Duncan Sands
8182ac6a05
Remove explicit uses of -emit-llvm, the test infrastructure adds it
...
automatically. Use -S with llvm-gcc rather than -c, so tests can
work when llvm-gcc is really dragonegg (which can output IR with -S
but not -c). Yes, dragonegg supports objective-c (poorly though).
llvm-svn: 120163
2010-11-25 21:46:07 +00:00
Oscar Fuentes
e1c6a67df6
Bump required cmake version on CMake.html.
...
llvm-svn: 120162
2010-11-25 21:41:48 +00:00
Duncan Sands
e6c974b230
Use -S rather than -c for the benefit of dragonegg.
...
llvm-svn: 120161
2010-11-25 21:41:35 +00:00
Duncan Sands
5fe97a0490
Remove explicit uses of -emit-llvm, the test infrastructure adds it
...
automatically. Use -S with llvm-gcc rather than -c, so tests can
work when llvm-gcc is really dragonegg (which can output IR with -S
but not -c).
llvm-svn: 120160
2010-11-25 21:39:17 +00:00
Duncan Sands
0be0ae625d
Judging from the comment, the system assembler is supposed to assemble
...
the output of this test. Since it was producing bitcode, that clearly
wasn't happening! Have it produce target assembler and assemble that
instead.
llvm-svn: 120159
2010-11-25 21:26:21 +00:00
Duncan Sands
b32d19de6a
Remove explicit uses of -emit-llvm, the test infrastructure adds it
...
automatically. Use -S with llvm-gcc rather than -c, so tests can
work when llvm-gcc is really dragonegg (which can output IR with -S
but not -c).
llvm-svn: 120158
2010-11-25 21:24:35 +00:00
Duncan Sands
2b5243d096
Dragonegg cannot output bitcode, only human readable IR, so use -S rather
...
than -c.
llvm-svn: 120157
2010-11-25 21:21:59 +00:00
Duncan Sands
c78fbf9877
Use LLVMCC_EMITIR_FLAG rather than hard-coding "-emit-llvm".
...
llvm-svn: 120156
2010-11-25 21:19:52 +00:00
Duncan Sands
1bc5303aed
Using LLVMCC_EMITIR_FLAG rather than hard-coding -emit-llvm
...
(dragonegg cannot use -emit-llvm so needs a different flag
to everyone else).
llvm-svn: 120155
2010-11-25 21:14:55 +00:00
Duncan Sands
0787bc37c4
It seems inconsistent to have LLVMCC_EMITIR_FLAG and
...
LLVMGCC_DISABLEOPT_FLAGS, one with CC in it, the other
with GCC. Rename LLVMGCC_DISABLEOPT_FLAGS to
LLVMCC_DISABLEOPT_FLAGS.
llvm-svn: 120151
2010-11-25 17:57:43 +00:00
Benjamin Kramer
336e02e89b
SDep is POD-like. Shave off a few bytes from SUnit by moving a member around.
...
llvm-svn: 120150
2010-11-25 17:50:19 +00:00
Duncan Sands
606d5c0424
Initial support for being able to specify the llvm-gcc to use like this:
...
--with-llvmgcc="gcc-4.5 -fplugin=dragonegg.so"
llvm-svn: 120149
2010-11-25 17:47:42 +00:00
Rafael Espindola
7c2acd022e
Use multiple 0x66 prefixes so that all nops up to 15 bytes are a single instruction.
...
llvm-svn: 120147
2010-11-25 17:14:16 +00:00
Benjamin Kramer
aef5bd049f
Namespacify.
...
llvm-svn: 120146
2010-11-25 16:42:51 +00:00
Rafael Espindola
f8e127eaf6
Factor some code to parseSectionFlags and fix the default type of a section.
...
llvm-svn: 120145
2010-11-25 15:32:56 +00:00
Michael J. Spencer
d4a894d62f
system_error: Even more unsupported error numbers :(.
...
llvm-svn: 120139
2010-11-25 01:53:59 +00:00
Nick Lewycky
b8de00ee07
Treat a call of function pointer like a load of the pointer when considering
...
whether the pointer can be replaced with the global variable it is a copy of.
Fixes PR8680.
llvm-svn: 120126
2010-11-24 22:04:20 +00:00
Rafael Espindola
9f75d5df0b
Behave a bit more like gnu as and use the symbol (instead of the section)
...
for any relocation to a symbol defined in a tls section.
llvm-svn: 120121
2010-11-24 21:57:39 +00:00
Michael J. Spencer
26f628d57f
80 col.
...
llvm-svn: 120111
2010-11-24 20:07:14 +00:00
Michael J. Spencer
02dd5544c4
google test depends on Support.
...
llvm-svn: 120105
2010-11-24 19:35:15 +00:00
Rafael Espindola
708ac4d6ad
Relocate with the symbol if the relocation is of kind NTPOFF.
...
Patch by David Meyer, I added the test.
llvm-svn: 120104
2010-11-24 19:23:50 +00:00
Michael J. Spencer
c33a41db85
unittests: Add initial Path-V2 test.
...
llvm-svn: 120103
2010-11-24 19:20:28 +00:00
Michael J. Spencer
96bcfcf2c2
Path Version 2.
...
Based on TR2/boost filesystem (v3) API, but modified to remove exceptions.
Do not include this file directly, when it is ready, it will be included by
include/llvm/System/Path.h.
llvm-svn: 120102
2010-11-24 19:20:19 +00:00
Michael J. Spencer
98847783f2
unittests: Add SystemTests.
...
llvm-svn: 120101
2010-11-24 19:20:05 +00:00
Rafael Espindola
e98d483b71
Fix and add tests for all cases in x86 and x86_64 where gnu as implicitly
...
sets the type of a symbol to STT_TLS.
llvm-svn: 120100
2010-11-24 18:51:21 +00:00
Rafael Espindola
af9a7a3e92
Testcase for r120017.
...
llvm-svn: 120099
2010-11-24 18:03:57 +00:00
Wesley Peck
8ad3b25633
Updating MBlaze .mask and .frame directives to match GCC's output and fixing regression introduced in 120095 by checking MCStreamer::hasRawTextSupport.
...
llvm-svn: 120097
2010-11-24 16:32:35 +00:00
Wesley Peck
51917b868d
1. Fixing error where basic block labels were not being printed out when they need to be for the MBlaze backend because AsmPrinter::isBlockOnlyReachableByFallthrough does not take into account delay slots.
...
2. Re-adding .mask and .frame directives in printed assembly.
3. Adding .ent and .end directives in printed assembly.
4. Minor cleanups to MBlaze backend.
llvm-svn: 120095
2010-11-24 15:39:32 +00:00
Kalle Raiskila
e0a1d2b32c
Use i8 as SETCC result type for i1 in SPU.
...
llvm-svn: 120092
2010-11-24 12:59:16 +00:00
Kalle Raiskila
97fc68774c
Allow for 'fcmp ogt' in SPU.
...
Fix by Visa Putkinen!
llvm-svn: 120090
2010-11-24 11:42:17 +00:00
Rafael Espindola
4e70ac7b68
If a symbol is used as tls, mark it as tls even if not declare as so. Probably
...
fixes PR8659.
llvm-svn: 120076
2010-11-24 02:19:40 +00:00
NAKAMURA Takumi
cf3475172f
include/llvm/System/system_error.h: ECANCELED is undefined on Cygwin-1.5.
...
llvm-svn: 120072
2010-11-24 01:29:45 +00:00
Ted Kremenek
1ef52416c7
Tweak ImmutableMap/ImmutableSet/ImmutableList APIs
...
to use lowercase letters for the start of most
method names and to replace some method names
with more descriptive names (e.g., "getLeft()"
instead of "Left()"). No real functionality
change.
llvm-svn: 120070
2010-11-24 00:54:28 +00:00
Jakob Stoklund Olesen
00430319a8
Generalize overflowLeaf to also handle overflows in branch nodes.
...
This doesn't quite work yet because the calls to treeDecrement and treeIncrement
operate at the leaf level, not on pathNode(Level) as required.
llvm-svn: 120068
2010-11-24 00:03:32 +00:00
Chris Lattner
6bf4e6d8b2
add a MemoryBuffer::getOpenFile method, which turns an open
...
file descriptor into a MemoryBuffer (and closes the FD).
llvm-svn: 120065
2010-11-23 22:20:27 +00:00
Michael J. Spencer
5aef638057
system_error: Add fixme.
...
llvm-svn: 120059
2010-11-23 21:09:11 +00:00
Duncan Sands
0488d564e1
Rename SimplifyDistributed to the more meaningfull name SimplifyByFactorizing.
...
llvm-svn: 120051
2010-11-23 20:42:39 +00:00
Benjamin Kramer
94a622af4c
The srem -> urem transform is not safe for any divisor that's not a power of two.
...
E.g. -5 % 5 is 0 with srem and 1 with urem.
Also addresses Frits van Bommel's comments.
llvm-svn: 120049
2010-11-23 20:33:57 +00:00
Duncan Sands
433c1679cf
Replace calls to ConstantFoldInstruction with calls to SimplifyInstruction
...
in two places that are really interested in simplified instructions, not
constants.
llvm-svn: 120044
2010-11-23 20:26:33 +00:00
Duncan Sands
bb2cd025a9
Constant folding here is pointless, because InstructionSimplify
...
(which does constant folding and more) is called a few lines
later.
llvm-svn: 120042
2010-11-23 20:24:21 +00:00
Jason W Kim
8e21bf84e8
Move the ARM reloc constants to Support/ELF.h
...
llvm-svn: 120035
2010-11-23 19:40:36 +00:00
Bob Wilson
d7d2cf7842
Recognize sign/zero-extended constant BUILD_VECTORs for VMULL operations.
...
We need to check if the individual vector elements are sign/zero-extended
values. For now this only handles constants values. Radar 8687140.
llvm-svn: 120034
2010-11-23 19:38:38 +00:00
Bob Wilson
b91ae1ac52
Fix copy-and-paste error in exception message.
...
llvm-svn: 120033
2010-11-23 19:38:34 +00:00
Benjamin Kramer
b5afa65b0a
InstCombine: Reduce "X shift (A srem B)" to "X shift (A urem B)" iff B is positive.
...
This allows to transform the rem in "1 << ((int)x % 8);" to an and.
llvm-svn: 120028
2010-11-23 18:52:42 +00:00
Duncan Sands
60813f96e0
Propagate LeftDistributes and RightDistributes into their only uses.
...
Stylistic improvement suggested by Frits van Bommel.
llvm-svn: 120026
2010-11-23 15:28:14 +00:00
Duncan Sands
22df741687
Fix typo pointed out by Frits van Bommel and Marius Wachtler.
...
llvm-svn: 120025
2010-11-23 15:25:34 +00:00
Duncan Sands
adc7771f18
Exploit distributive laws (eg: And distributes over Or, Mul over Add, etc) in a
...
fairly systematic way in instcombine. Some of these cases were already dealt
with, in which case I removed the existing code. The case of Add has a bunch of
funky logic which covers some of this plus a few variants (considers shifts to be
a form of multiplication), which I didn't touch. The simplification performed is:
A*B+A*C -> A*(B+C). The improvement is to do this in cases that were not already
handled [such as A*B-A*C -> A*(B-C), which was reported on the mailing list], and
also to do it more often by not checking for "only one use" if "B+C" simplifies.
llvm-svn: 120024
2010-11-23 14:23:47 +00:00
Kalle Raiskila
e1b6c273b8
Division by pow-of-2 is not cheap on SPU, do it with
...
shifts.
llvm-svn: 120022
2010-11-23 13:27:59 +00:00
Rafael Espindola
f6c05b1d01
Implement the rex64 prefix.
...
llvm-svn: 120017
2010-11-23 11:23:24 +00:00
Duncan Sands
a021988d64
Expand a little on the description of what InstructionSimplify does.
...
llvm-svn: 120016
2010-11-23 10:50:08 +00:00
Duncan Sands
763dec0ab8
Clarify that constant folding of instructions applies when all operands
...
are constant. There was in fact one exception to this (phi nodes) - so
remove that exception (InstructionSimplify handles this so there should
be no loss).
llvm-svn: 120015
2010-11-23 10:16:18 +00:00
Rafael Espindola
5c1d4e3b1e
Invalidate the layout on any relaxation, not just Instructions. Bug found by David Meyer.
...
While here, remove unused argument and rename UpdateForSlide to Invalidate.
llvm-svn: 120009
2010-11-23 08:08:33 +00:00
Rafael Espindola
3c7cab1402
Produce a relocation for pcrel absolute values. Based on a patch by David Meyer.
...
llvm-svn: 120006
2010-11-23 07:20:12 +00:00
Cameron Zwarich
767a389fa5
Optimize a common case in the Lengauer-Tarjan dominators algorithm. This gives a
...
9.7% speedup running domtree on test-suite.
Reviewed by Chris Lattner.
llvm-svn: 120003
2010-11-23 06:32:37 +00:00
Chris Lattner
2dd97d2d60
Revert functionality doug added in r98575 that was never
...
documented and only used by some clang stuff I just removed.
llvm-svn: 120002
2010-11-23 06:09:51 +00:00
Rafael Espindola
6e13aa1d3b
Reuse data fragments while lowering. Patch by David Meyer.
...
llvm-svn: 119999
2010-11-23 05:49:35 +00:00
Zhanyong Wan
19b96fd4ee
Fix formatting nits in the coding standards. Reviewed by clattner.
...
llvm-svn: 119998
2010-11-23 05:03:07 +00:00