Chris Lattner
78b23b0e3f
fix asmstreaming of 2/4 byte elements with pow-2 alignments.
...
llvm-svn: 79408
2009-08-19 06:35:36 +00:00
Nick Lewycky
9ddc52d5b8
Be more careful when modifying PHI nodes. Patch by Andre Tavares.
...
llvm-svn: 79407
2009-08-19 06:24:33 +00:00
Chris Lattner
37b7234a75
switch asmprinter to emit alignments through OutStreamer.
...
llvm-svn: 79406
2009-08-19 06:12:02 +00:00
Chris Lattner
4b7dadb76e
eliminate AsmPrinter::SwitchToSection and just have clients
...
talk to the MCStreamer directly instead.
llvm-svn: 79405
2009-08-19 05:49:37 +00:00
Andreas Neustifter
21e66abd40
Broke line before break.
...
llvm-svn: 79404
2009-08-19 05:44:39 +00:00
Daniel Dunbar
acf0b258de
Make a SmallVector size more reasonable.
...
llvm-svn: 79403
2009-08-19 05:08:06 +00:00
Erick Tryzelaar
9eb4a5f418
Fix gcc-4.4/fedora 11 by adding a sentinel value to SimpleValueType.
...
gcc-4.4 was optimizing away comparisons against SimpleValueType when
it was compared to a value larger than the largest value in the enum.
This patch works around it by adding one extra item to the enum so
that these tests will now be valid.
llvm-svn: 79401
2009-08-19 02:53:07 +00:00
Lang Hames
11732add1e
Added an option to have the PBQP allocator attempt coalescing during allocation.
...
llvm-svn: 79397
2009-08-19 01:36:14 +00:00
Owen Anderson
077df2c4ce
Revert my last patch temporarily.
...
llvm-svn: 79388
2009-08-19 00:52:13 +00:00
Owen Anderson
3042539089
Privatize part of the leak detector mechanism, which turned out to be heavily contended
...
when trying to run opt in parallel. This lets parallel opt crunch 403.gcc in about a third
of the time.
llvm-svn: 79387
2009-08-19 00:37:02 +00:00
Daniel Dunbar
0cf168635e
raw_ostream: Simplify write(unsigned char) to match write(const char*, unsigned).
...
llvm-svn: 79386
2009-08-19 00:23:39 +00:00
Daniel Dunbar
835da36ee9
raw_ostream: Remove pointless redefinitions of tell().
...
- The base class implementation is correct.
llvm-svn: 79385
2009-08-19 00:14:25 +00:00
Dan Gohman
dea2358c68
Fix SimplifyLibcalls and ValueTracking to check mayBeOverridden
...
before performing optimizations based on constant string values.
llvm-svn: 79384
2009-08-19 00:11:12 +00:00
Dan Gohman
2fa67c9f70
Be tidy and use a break to exit from a switch block rather than
...
just falling through the end.
llvm-svn: 79383
2009-08-18 23:52:48 +00:00
Daniel Dunbar
317a6cd010
raw_ostream: Add the capability for subclasses to manually install an external
...
buffer.
llvm-svn: 79382
2009-08-18 23:42:36 +00:00
Dan Gohman
4906f73a9f
Legalize the shift amount operand of SRL_PARTS, SHL_PARTS, and
...
SRA_PARTS, as is done for SRL, SHL, and SRA.
llvm-svn: 79380
2009-08-18 23:36:17 +00:00
Daniel Dunbar
17a6fd2299
raw_ostream: Reduce FormattedStream's reliance on raw_ostream's implementation.
...
- Kill off begin(), end(), and iterator. It isn't clear what these
mean. Instead provide getBufferStart(), which can be used with
GetNumBytesInBuffer to the same effect.
- Update ComputeColumn to take arguments for the buffer to scan, this
simplifies the implementation of write_impl substantially.
- This should also fix possible problems with the scanning pointer pointing
outside of the current raw_ostream buffer.
llvm-svn: 79379
2009-08-18 23:36:04 +00:00
Lang Hames
305be0e603
Changes DOUT references in the PBQP allocator to use DEBUG(errs() ...)
...
llvm-svn: 79378
2009-08-18 23:34:50 +00:00
Eric Christopher
9fe912de5f
Implement sse4.2 string/text processing instructions:
...
Add patterns and instruction encoding information.
Add custom lowering to deal with hardwired return register of
uncertain type (xmm0).
llvm-svn: 79377
2009-08-18 22:50:32 +00:00
Tanya Lattner
7fb1616d60
First steps to document new release plan.
...
llvm-svn: 79376
2009-08-18 22:33:28 +00:00
Daniel Dunbar
bc96fe7246
Speed up raw_ostream::<<(unsigned long long) for 32-bit systems by doing most
...
div/mods in 32-bits.
llvm-svn: 79375
2009-08-18 22:24:00 +00:00
Jakob Stoklund Olesen
36d747745e
Simplify RegScavenger::FindUnusedReg.
...
- Drop the Candidates argument and fix all callers. Now that RegScavenger
tracks available registers accurately, there is no need to restict the
search.
- Make sure that no aliases of the found register are in use. This was a potential bug.
llvm-svn: 79369
2009-08-18 21:14:54 +00:00
Richard Osborne
2349fb4d45
Add support for mergeable sections back into the XCore backend.
...
llvm-svn: 79368
2009-08-18 21:14:31 +00:00
Dan Gohman
23f90c1d3a
Fix a bug in raw_ostream::write(char) introduced by the change to
...
allow underlying stream classes to decline buffering. After
calling SetBuffered(), re-check whether the stream is Unbuffered
in order to handle the case where the underlying stream has
declined buffering.
llvm-svn: 79362
2009-08-18 20:09:59 +00:00
Daniel Dunbar
d882f4b6ff
Revert r78924, disabling buffering defeats all the fast paths in raw_ostream.
...
llvm-svn: 79361
2009-08-18 20:07:36 +00:00
Daniel Dunbar
959323a260
Improve Triple to recognize the OS in i386-mingw32.
...
llvm-svn: 79359
2009-08-18 19:26:55 +00:00
David Greene
60eb473ac9
Make various changes suggested by Chris.
...
llvm-svn: 79358
2009-08-18 19:22:55 +00:00
Misha Brukman
f87bb00561
Surrounded variable in <tt> tags for consistency.
...
llvm-svn: 79357
2009-08-18 19:18:40 +00:00
Daniel Dunbar
3828a99ba6
Fix pasto in StringRef::count(char)
...
llvm-svn: 79356
2009-08-18 18:34:22 +00:00
Owen Anderson
e8f2185a2f
Privatize the ValueHandle global map. Because this is used so heavily throughout the code base, locking all accesses to
...
it is not practical performance-wise.
llvm-svn: 79355
2009-08-18 18:28:58 +00:00
Daniel Dunbar
5736db6527
Add StringRef::count({char,StringRef})
...
llvm-svn: 79354
2009-08-18 18:26:35 +00:00
Erick Tryzelaar
a9680df669
Fix an uninitialized value warning in APFloat.
...
llvm-svn: 79353
2009-08-18 18:20:37 +00:00
Eric Christopher
d604b256d5
Add CXXFLAGS to the Link lines as well in case someone used those instead
...
of LDFLAGS.
llvm-svn: 79352
2009-08-18 18:07:35 +00:00
Richard Osborne
934d61648b
Put data with relocations in the same sections as data without relocations.
...
llvm-svn: 79351
2009-08-18 17:58:17 +00:00
Daniel Dunbar
d7f3433789
Attempt to normalize test results.
...
llvm-svn: 79350
2009-08-18 17:38:27 +00:00
Dan Gohman
b85ad63727
Make this test less sensitive to assembler differences.
...
llvm-svn: 79348
2009-08-18 17:19:46 +00:00
Chris Lattner
3ac8dc776a
alphabeticalize
...
llvm-svn: 79347
2009-08-18 17:04:44 +00:00
Chris Lattner
03ded465d2
fix COFF targets (mingw/cygwin) to provide ehframe and LSDA sections
...
llvm-svn: 79346
2009-08-18 16:56:17 +00:00
Chris Lattner
8b0e164aa6
force a triple so this passes on darwin
...
llvm-svn: 79345
2009-08-18 16:55:45 +00:00
Dan Gohman
bf2a9aedca
Generalize ScalarEvolution to be able to analyze GEPs when
...
TargetData is not present. It still uses TargetData when available.
This generalization also fixed some limitations in the TargetData
case; the attached testcase covers this.
llvm-svn: 79344
2009-08-18 16:46:41 +00:00
Chris Lattner
f446070b62
null streamer needs to maintain the current section as well.
...
llvm-svn: 79343
2009-08-18 16:46:29 +00:00
Oscar Fuentes
6d61f558ac
CMake: LLVM_ENABLE_PIC now defaults to ON, as in `configure'. This is
...
required on some platforms for building shared libraries that link to
the LLVM libraries.
llvm-svn: 79339
2009-08-18 15:29:35 +00:00
Dan Gohman
a41fa35992
Make tail merging handle blocks with repeated predecessors correctly, and
...
remove RemoveDuplicateSuccessor, as it is no longer necessary, and because
it breaks assumptions made in
MachineBasicBlock::isOnlyReachableByFallthrough.
Convert test/CodeGen/X86/omit-label.ll to FileCheck and add a testcase
for PR4732.
test/CodeGen/Thumb2/thumb2-ifcvt2.ll sees a diff with this commit due to
it being bugpoint-reduced to the point where it doesn't matter what the
condition for the branch is.
Add some more interesting code to
test/CodeGen/X86/2009-08-06-branchfolder-crash.ll, which is the testcase
that originally motivated the RemoveDuplicateSuccessor code, to help
verify that the original problem isn't being re-broken.
llvm-svn: 79338
2009-08-18 15:18:18 +00:00
Dan Gohman
82ac81b1cc
Fix a bug that caused globalopt to miscompile tramp3d: don't miss
...
unruly indices for arrays that are members of structs.
llvm-svn: 79337
2009-08-18 14:58:19 +00:00
Anton Korobeynikov
e4d2e8465a
Text sections should have 'exec' flag set. This seems to unbreak libstdc++ on linux.
...
Patch by Dmitry Gorbachev!
llvm-svn: 79334
2009-08-18 14:06:12 +00:00
Misha Brukman
0528437f30
Fixed spelling of MSP430.
...
llvm-svn: 79333
2009-08-18 13:50:28 +00:00
Daniel Dunbar
33d86f22f2
Fix Triple to recognize the 'bfin' arch.
...
llvm-svn: 79325
2009-08-18 07:06:26 +00:00
Chris Lattner
0adae25ec1
Make AsmStreamer maintain a notion of the current section, pushing it up from the
...
MCAsmStreamer. Based on this, eliminate the current section from AsmPrinter.
While I'm at it, clean up the last of the horrible "switch to null section" stuff
and add an assert. This change is in preparation for completely eliminating
asmprinter::switchtosection.
llvm-svn: 79324
2009-08-18 06:15:16 +00:00
Chris Lattner
5de2e2de93
add a horrible hack to the dwarf printer. It looks like mingw is not specifying
...
an EHFrame section, so we just emit ehframe data into a random section.
This is clearly bad.
llvm-svn: 79323
2009-08-18 06:13:03 +00:00
Nick Lewycky
e6e82b8480
Include valgrind in the steps to reproduce if valgrind was used to reproduce
...
the problem.
llvm-svn: 79322
2009-08-18 06:08:01 +00:00
Chris Lattner
966d32dffb
remove some pointless null switchtosections. The IntelAsmPrinter doesn't really work anyway.
...
llvm-svn: 79321
2009-08-18 06:03:07 +00:00
Evan Cheng
dd406177de
Fix revsh pattern.
...
llvm-svn: 79318
2009-08-18 05:43:23 +00:00
Chris Lattner
40bbb85949
add support for some targetflags on GV operands. This allows us to
...
send instructions like:
NEW: movl "L___stack_chk_guard$non_lazy_ptr" - "L1$pb"(%esi), %eax
OLD: movl L___stack_chk_guard$non_lazy_ptr-"L1$pb"(%esi), %eax
through the streamer. Several fixmes.
llvm-svn: 79317
2009-08-18 05:33:27 +00:00
Daniel Dunbar
320d331311
Recognize xscale as an ARM arch.
...
- Patch by Yonggang Luo.
llvm-svn: 79315
2009-08-18 04:51:26 +00:00
Daniel Dunbar
781f94d7fe
Add Triple matching for pic16 arch and solaris OS.
...
- Patch by Yonggang Luo.
llvm-svn: 79314
2009-08-18 04:43:27 +00:00
Chris Lattner
63d3fa5f3b
fix another bozo bug
...
llvm-svn: 79313
2009-08-18 04:34:36 +00:00
Chris Lattner
249e1acf1b
fix accidentally inverted conditional and add comment.
...
llvm-svn: 79312
2009-08-18 04:33:15 +00:00
Chris Lattner
523d2f6e2c
turn this conditional into something humans might actually
...
be able to understand ;-)
llvm-svn: 79311
2009-08-18 04:30:35 +00:00
Chris Lattner
dd1db9cc81
"-" should write to stdout, not stderr.
...
llvm-svn: 79310
2009-08-18 04:03:24 +00:00
Daniel Dunbar
8575a60d33
Change bugpoint to use Triple to make runtime decisions.
...
- This is cleaner, and makes bugpoint match the host instead of the build
architecture.
- Patch by Sandeep Patel!
llvm-svn: 79309
2009-08-18 03:35:57 +00:00
Eric Christopher
3fe6967b5d
Separate out Makefile defines so that we can keep the llvm
...
defined ones from the user defined ones. Propagate accordingly.
llvm-svn: 79308
2009-08-18 03:23:40 +00:00
Daniel Dunbar
f4e7b6cca4
Add LLVMInitializeAllTargetInfos for C api, and update
...
LLVMInitializeNativeTarget to initialize target info.
- Patch by Jose Fonseca.
llvm-svn: 79307
2009-08-18 03:03:27 +00:00
Dan Gohman
10f1471e2f
Make TargetData optional in MemCpyOptimizer.
...
llvm-svn: 79306
2009-08-18 01:17:52 +00:00
Evan Cheng
1105cbc270
Even more Apple style build horribleness.
...
llvm-svn: 79299
2009-08-18 00:56:17 +00:00
Dan Gohman
9f2b3db428
Make TargetData optional in SimplifyLibCalls.
...
llvm-svn: 79298
2009-08-18 00:48:13 +00:00
Anton Korobeynikov
284c9ae1b8
Regenerate
...
llvm-svn: 79297
2009-08-18 00:40:51 +00:00
Anton Korobeynikov
90e17e787f
The attached patches attempt to fix cross builds. For example, if you
...
try to use i686-darwin to build for arm-eabi, you'll quickly run into
several false assumptions that the target OS must be the same as the
host OS. These patches split $(OS) into $(HOST_OS) and $(TARGET_OS) to
help builds like "make check" and the test-suite able to cross
compile. Along the way a target of *-unknown-eabi is defined as
"Freestanding" so that TARGET_OS checks have something to work with.
Patch by Sandeep Patel!
llvm-svn: 79296
2009-08-18 00:40:33 +00:00
Edward O'Callaghan
2e9e3c3316
LLVM Ada language bindings. Credit to Rod Kay and the AuroraUX team.
...
llvm-svn: 79295
2009-08-18 00:24:36 +00:00
Dan Gohman
47a31a29c5
Fix function alignment at -Os on x86 to be 1, not 2. getFunctionAlignment
...
returns a log2 value.
llvm-svn: 79293
2009-08-18 00:20:06 +00:00
Dale Johannesen
4a50e68b65
PowerPC inline asm was emitting two output operands
...
for a single "m" constraint; this is wrong because the
opcode of a load or store would have to change in parallel.
This patch makes it always compute addresses into a register,
which is correct but not as efficient as possible. 7144566.
llvm-svn: 79292
2009-08-18 00:18:39 +00:00
Devang Patel
c6faffde6c
Add prefix only if it is needed.
...
llvm-svn: 79289
2009-08-17 23:17:17 +00:00
Jim Grosbach
f933c409e2
cleanups per review. Mostly cosmetic, plus use SmallVector in place of std::vector.
...
llvm-svn: 79287
2009-08-17 21:40:03 +00:00
John McCall
c5680625c8
#include <cstdlib> in the code listing for strtod.
...
llvm-svn: 79285
2009-08-17 21:07:37 +00:00
Devang Patel
993e527b30
Oops. find all llvm.dbg.global_variables.
...
llvm-svn: 79274
2009-08-17 20:36:20 +00:00
Jim Grosbach
43bbb9de66
Remove a bit more cruft from the sjlj moving to a backend pass.
...
llvm-svn: 79272
2009-08-17 20:25:04 +00:00
Benjamin Kramer
436bd9f770
Update CMakeLists.
...
llvm-svn: 79264
2009-08-17 18:47:11 +00:00
Dan Gohman
7cb92a1e3d
Update comments to new-style syntax.
...
llvm-svn: 79263
2009-08-17 18:45:31 +00:00
Daniel Dunbar
f9bdf988a2
Fix build warning.
...
llvm-svn: 79262
2009-08-17 18:41:42 +00:00
Owen Anderson
9801560ace
Privatize the last bits of static type state.
...
llvm-svn: 79258
2009-08-17 17:59:35 +00:00
Nick Lewycky
3a6fbfa6a4
Test the pass the test is actually for, instead of one that doesn't exist.
...
llvm-svn: 79257
2009-08-17 17:41:29 +00:00
Owen Anderson
286b3af6ae
Move the TypeMap lock to a member on LLVMContextImpl.
...
llvm-svn: 79256
2009-08-17 17:34:27 +00:00
Owen Anderson
d91e6b097d
Add locking around the attributes list.
...
llvm-svn: 79255
2009-08-17 17:10:58 +00:00
Owen Anderson
820739dccc
Add locking around signal handler registration.
...
llvm-svn: 79254
2009-08-17 17:07:22 +00:00
Benjamin Kramer
bd3c033713
Clear the uniquing table when initializing TLOF to avoid a crash when the TLOF is reinitialized with a different MCContext.
...
llvm-svn: 79253
2009-08-17 17:05:44 +00:00
Nick Lewycky
4c737147e1
Don't crash on critical edge. Patch by Andre Tavares.
...
llvm-svn: 79252
2009-08-17 17:00:57 +00:00
Jim Grosbach
486be66dbd
Move the sjlj exception handling conversions to a back-end pass where they
...
more properly belong. This allows removing the front-end conditionalized
SJLJ code, and cleans up the generated IR considerably. All of the
infrastructure code (calling _Unwind_SjLj_Register/Unregister, etc) is
added by the SjLjEHPrepare pass.
llvm-svn: 79250
2009-08-17 16:41:22 +00:00
Richard Osborne
94a2c1acae
Update getSectionForConstant() to to allow mergable sections to be nulled out
...
if not supported by the ELF subtarget.
llvm-svn: 79249
2009-08-17 16:37:11 +00:00
David Goodwin
d813cbfe72
Extend the instruction itinerary model to include the ability to indicate the def and use cycle for each operand. This additional information is optional, so existing itineraries do not need to be changed.
...
llvm-svn: 79247
2009-08-17 16:02:57 +00:00
Chris Lattner
ee97b8b11c
the MinPad argument to PadToColumn only really makes sense to be 1,
...
just remove the argument and replace it with 1.
llvm-svn: 79246
2009-08-17 15:48:08 +00:00
Misha Brukman
5906bc1059
Fixed indentation and spelling.
...
llvm-svn: 79245
2009-08-17 15:31:24 +00:00
Dan Gohman
74cb168a9e
Fix more missing newlines.
...
llvm-svn: 79244
2009-08-17 15:29:31 +00:00
Dan Gohman
d04f9bf01a
Fix printing of instructions with null operands.
...
llvm-svn: 79243
2009-08-17 15:28:08 +00:00
Dan Gohman
d0cc3f31c0
Always print at least one space before adding a comment.
...
llvm-svn: 79242
2009-08-17 15:27:30 +00:00
Dan Gohman
8dd69f88ea
Fix debug output to include a newline after printing a Value, now
...
that Value's operator<< doesn't include one.
llvm-svn: 79240
2009-08-17 15:25:05 +00:00
Duncan Sands
c4ce58d8fe
Don't access the first element of a potentially empty
...
vector (&Formals[0]). With this change llvm-gcc builds
with expensive checking enabled for C, C++ and Fortran.
While there, change a std::vector into a SmallVector.
This is partly gratuitous, but mostly because not all
STL vector implementations define the data method (and
it should be faster).
llvm-svn: 79237
2009-08-17 14:33:27 +00:00
Duncan Sands
5a70e1e37e
XFAIL this test since the fix was reverted.
...
llvm-svn: 79235
2009-08-17 12:20:45 +00:00
Nick Lewycky
d87648a850
Add a test that shows that SSI is working correctly.
...
llvm-svn: 79230
2009-08-17 07:32:08 +00:00
Chris Lattner
aa1526419c
change AsmPrinter to switch sections using AsmStreamer instead of
...
doing it directly. This requires const'izing a bunch of stuff that
took sections, but this seems like the right semantic thing to do:
emitting a label to a section shouldn't mutate the MCSection object
itself, for example.
llvm-svn: 79227
2009-08-17 05:49:08 +00:00
Nick Lewycky
aa464002f0
Don't crash trying to promote VLAs.
...
llvm-svn: 79226
2009-08-17 05:37:31 +00:00
Oscar Fuentes
a6cf97dc22
CMake: Updated library dependencies.
...
llvm-svn: 79223
2009-08-17 04:23:50 +00:00
Chris Lattner
a61e93d4b5
give MCAsmStreamer a TargetAsmInfo.
...
llvm-svn: 79222
2009-08-17 04:23:44 +00:00
Chris Lattner
962c5bd803
formatting cleanups, no functionality change.
...
llvm-svn: 79221
2009-08-17 04:17:34 +00:00
Oscar Fuentes
8710d9831b
Make a declaration consistent with its definition.
...
llvm-svn: 79220
2009-08-17 04:10:20 +00:00
Oscar Fuentes
349df2c976
CMake: LLVMConfig assigns LLVMX86 to the `native' component
...
name. Updated LLVM_LINK_COMPONENTS of Kaleidoscope.
llvm-svn: 79219
2009-08-17 01:41:46 +00:00
Erick Tryzelaar
927191f179
Wrap unit test death tests in GTEST_HAS_DEATH_TEST
...
llvm-svn: 79218
2009-08-17 00:55:33 +00:00
Erick Tryzelaar
bc0d74944e
Change APFloatTest from using ASSERTs to EXPECTs
...
llvm-svn: 79216
2009-08-17 00:14:11 +00:00
Erick Tryzelaar
ba167da17a
Expose creating constant ints and floats from strings to ocaml.
...
llvm-svn: 79214
2009-08-16 23:37:03 +00:00
Erick Tryzelaar
dd99135721
Expose creating constant ints and floats from strings in llvm-c.
...
llvm-svn: 79213
2009-08-16 23:36:46 +00:00
Erick Tryzelaar
fc2280d874
Add helper functions to ConstantInt and ConstantFP to accept strings.
...
llvm-svn: 79212
2009-08-16 23:36:33 +00:00
Erick Tryzelaar
19f63b2e4d
Modify APFloat to take a StringRef instead of a c string.
...
This also adds unit tests to APFloat that mainly tests the
string handling of APFloat, but not much else of it's api.
llvm-svn: 79210
2009-08-16 23:36:19 +00:00
Erick Tryzelaar
2b01eab81c
Add failure tests to APInt unit test.
...
llvm-svn: 79209
2009-08-16 23:36:01 +00:00
Dan Gohman
ff3af725ea
Add a getOffsetOf, for building a target-independent expression for
...
offsetof, similar to getSizeOf for sizeof.
llvm-svn: 79208
2009-08-16 21:26:11 +00:00
Dan Gohman
f0b984021c
Avoid emitting XMM save code in soft-float or no-implicit-float mode
...
or some other situation where no xmm registers need to be saved.
llvm-svn: 79207
2009-08-16 21:24:25 +00:00
Dan Gohman
4bb9357921
Delete an unused field.
...
llvm-svn: 79206
2009-08-16 21:19:53 +00:00
Oscar Fuentes
a127f4e010
CMake: Removed traces of obsolete variable LLVM_PLO_FLAGS.
...
llvm-svn: 79204
2009-08-16 21:01:16 +00:00
Oscar Fuentes
acfd9ad43d
CMake: New option LLVM_BUILD_TOOLS. Renamed LLVM_EXAMPLES to
...
LLVM_BUILD_EXAMPLES and set default to true. Documented.
llvm-svn: 79203
2009-08-16 20:56:30 +00:00
Oscar Fuentes
91bd6c922d
CMake: Discriminate MINGW, MSYS, CYGWIN: does not try to build llvm-config under mingw without msys.
...
llvm-svn: 79202
2009-08-16 20:50:41 +00:00
Jakob Stoklund Olesen
84b4d2241f
Replace RegScavenger::DistanceMap with a simpler local algorithm.
...
llvm-svn: 79195
2009-08-16 17:41:39 +00:00
Jakob Stoklund Olesen
ac09a9a1f5
Clean up the public interface of RegScavenger.
...
Remove unused methods and make others private.
llvm-svn: 79194
2009-08-16 17:41:20 +00:00
Jakob Stoklund Olesen
7f91fee62b
Be more clever about regclasses in ScheduleDAGSDNodes::EmitCopyFromReg.
...
If two uses of a CopyFromReg want different regclasses, first try a common
sub-class, then fall back on the copy emitted in AddRegisterOperand. There is
no need for an assert here. The cross-class joiner usually cleans up nicely.
llvm-svn: 79193
2009-08-16 17:40:59 +00:00
Benjamin Kramer
2c64130c43
Fix use after free in Thumb2SizeReduction (PR4707). A MachineInstr was used after erasure.
...
llvm-svn: 79189
2009-08-16 11:56:42 +00:00
Bill Wendling
195fd9d970
Styalistic and format changes. No functionality change.
...
llvm-svn: 79187
2009-08-16 11:00:26 +00:00
Benjamin Kramer
171a7d6823
Fix the MSVC build again.
...
llvm-svn: 79186
2009-08-16 09:44:27 +00:00
Oscar Fuentes
9496a6d7ef
CMake: Hopefully this will fix the build on VS. I can't replicate the
...
failure with VS 9.0, nmake and cmake 2.6.4. The buildbot output does
not show the patch level of cmake, it just says 2.6.
Sadly, parallel builds are broken due to recent changes on LLVM Target
libraries and its auxiliaries (TargetInfo, AsmPrinter, AsmParser). I
have a patch for stablishing the correct dependencies, but cmake is
buggy and generates makefiles that can't handle them.
llvm-svn: 79180
2009-08-16 07:44:02 +00:00
Oscar Fuentes
8160d28712
CMake: Revert r79144. It reverted a change necessary for correct
...
parallel builds.
llvm-svn: 79177
2009-08-16 05:16:43 +00:00
Chris Lattner
8a4c35dd18
add support for external symbols + X86::MOVPC32r.
...
llvm-svn: 79175
2009-08-16 04:28:14 +00:00
Eli Friedman
d56fca4708
Fix for PR3016: detect the tricky case, where there are
...
unfoldable references to a PHI node in the block being folded, and disable
the transformation in that case. The correct transformation of such PHI
nodes depends on whether BB dominates Succ, and dominance is expensive
to compute here. (Alternatively, it's possible to check whether any
uses are live, but that's also essentially a dominance calculation.
Another alternative is to use reg2mem, but it probably isn't a good idea to
use that in simplifycfg.)
Also, remove some incorrect code from CanPropagatePredecessorsForPHIs
which is made unnecessary with this patch: it didn't consider the case
where a PHI node in BB has multiple uses.
llvm-svn: 79174
2009-08-16 04:23:49 +00:00
Chris Lattner
c659caa848
implement support for lowering references to global addresses. For example, we now
...
can asmprint:
NEW: movl "L___stack_chk_guard$non_lazy_ptr", %eax
OLD: movl L___stack_chk_guard$non_lazy_ptr, %eax
where 'new' is coming out of the MCInst version of the printer.
llvm-svn: 79170
2009-08-16 03:12:25 +00:00
Chris Lattner
10f605ce2b
more formatting improvements, no functionality change.
...
llvm-svn: 79167
2009-08-16 02:45:18 +00:00
Chris Lattner
043bb021da
code formatting improvements, no functionality change.
...
llvm-svn: 79165
2009-08-16 02:36:40 +00:00
Chris Lattner
107c21eafc
when emitting errors about CHECK-NEXT directives, show the line that the
...
CHECK-NEXT is on.
llvm-svn: 79164
2009-08-16 02:22:31 +00:00
Erick Tryzelaar
9813beadcd
Add an llvm-c function that lets you insert an instruction with a name.
...
llvm-svn: 79163
2009-08-16 02:20:57 +00:00
Erick Tryzelaar
f57618f62d
Expose most of the Constant creation functions to ocaml.
...
llvm-svn: 79162
2009-08-16 02:20:37 +00:00
Erick Tryzelaar
3235144799
Expose most of the IRBuilder functionality to ocaml.
...
llvm-svn: 79161
2009-08-16 02:20:24 +00:00
Erick Tryzelaar
4cc690cce4
Expose most of the Constant creation functions to llvm-c.
...
llvm-svn: 79160
2009-08-16 02:20:12 +00:00
Erick Tryzelaar
3045b8b5d6
Expose most of the rest of IRBuilder's functions to llvm-c.
...
llvm-svn: 79159
2009-08-16 02:19:59 +00:00
Erick Tryzelaar
a24e5504d0
Add more casts to the IRBuilder.
...
llvm-svn: 79158
2009-08-16 02:19:46 +00:00
Evan Cheng
badf17cdc7
Needs to check whether unaligned load / store of i64 is legal here.
...
llvm-svn: 79150
2009-08-15 23:41:42 +00:00
Bill Wendling
f7b4c5a295
Remove <iostream>.
...
llvm-svn: 79146
2009-08-15 22:28:08 +00:00
Benjamin Kramer
42f3b9d02d
Revert 78996. It was breaking MSVC builds.
...
llvm-svn: 79144
2009-08-15 21:57:01 +00:00
Dan Gohman
b20757bdeb
Mingw also doesn't have st_blksize.
...
llvm-svn: 79142
2009-08-15 21:41:03 +00:00
Eli Friedman
b4d7312249
Fix test on Linux.
...
llvm-svn: 79140
2009-08-15 21:28:17 +00:00
Bill Wendling
b405803fbe
An overhaul of the exception handling code. This is arguably more correct than
...
what was there before. In "no FP mode", we weren't generating labels and unwind
table entries after each "push" instruction. While more than likely "okay", it's
not technically correct. The major thing was that the ordering of when to define
a new CFA register and at what offset wasn't correct. This would cause the
exception handling to fail in ways most miserable to users.
I also cleaned up some code a bit. There's one function which has a "return" at
the beginning, so it's never used. Should I just remove it? :-)
llvm-svn: 79139
2009-08-15 21:27:32 +00:00
Bill Wendling
bae6b2cca3
Reapply r79127. It was fixed by d0k.
...
llvm-svn: 79136
2009-08-15 21:21:19 +00:00
Bill Wendling
d3fade656f
Revert r79127. It was causing compilation errors.
...
llvm-svn: 79135
2009-08-15 21:14:01 +00:00
Benjamin Kramer
693a9c57a6
Don't try to get the context from an erased Instruction.
...
llvm-svn: 79134
2009-08-15 21:07:49 +00:00
Benjamin Kramer
d2d5e716bd
Unbreak build. Evan, please make sure my changes are correct.
...
llvm-svn: 79133
2009-08-15 20:46:16 +00:00
Nick Lewycky
dd0e74ceee
SSI construction should just go ahead and ignore instructions in unreachable
...
blocks.
llvm-svn: 79132
2009-08-15 20:12:18 +00:00
Bill Wendling
4c1b9b02c5
Fix validation errors.
...
llvm-svn: 79131
2009-08-15 20:08:04 +00:00
Bill Wendling
527241b35e
Fix validation errors.
...
llvm-svn: 79130
2009-08-15 20:07:42 +00:00
Evan Cheng
52d4e64711
Change allowsUnalignedMemoryAccesses to take type argument since some targets
...
support unaligned mem access only for certain types. (Should it be size
instead?)
ARM v7 supports unaligned access for i16 and i32, some v6 variants support it
as well.
llvm-svn: 79127
2009-08-15 19:23:44 +00:00
Chris Lattner
724af2ca77
wrap to 80 cols
...
llvm-svn: 79124
2009-08-15 18:33:10 +00:00
Chris Lattner
da108b4ed4
implement support for CHECK-NEXT: in filecheck.
...
llvm-svn: 79123
2009-08-15 18:32:21 +00:00
Jakob Stoklund Olesen
ffa73acfec
Refine EarlyClobber assert in register scavenger.
...
It is legal for an inline asm operand to use an earlyclobber register if the
use operand is tied to the earlyclobber operand. The issue is discussed here:
http://gcc.gnu.org/ml/gcc/1999-04n/msg00431.html
We should perhaps let only the machine code verifier worry about these finer
details. EarlyClobber operands are not really interesting to the scavenger.
This fixes PR4528 for the third time.
llvm-svn: 79122
2009-08-15 18:16:58 +00:00
Chris Lattner
10f10ced3f
simplify some code.
...
llvm-svn: 79121
2009-08-15 18:00:42 +00:00
Chris Lattner
6a7b917e32
rewrite FindStringInBuffer to use an explicit loop instead of
...
trying to wrap strstr which is just too inconvenient. Make it
use a StringRef to avoid ".c_str()" calls.
llvm-svn: 79120
2009-08-15 17:53:12 +00:00
Chris Lattner
26cccfe1bc
Instead of using an std::pair, use a custom struct.
...
llvm-svn: 79119
2009-08-15 17:41:04 +00:00
Chris Lattner
c6a803be7c
specify a target triple so global variable manglings are consistent etc.
...
llvm-svn: 79118
2009-08-15 17:35:05 +00:00
Chris Lattner
3838c2dabf
convert to filecheck.
...
llvm-svn: 79117
2009-08-15 17:28:09 +00:00
Chris Lattner
bb193ecec8
rename this test to sse2.ll
...
llvm-svn: 79116
2009-08-15 17:24:09 +00:00
Chris Lattner
d3954e2790
merge a bunch more sse3 tests into sse3.ll
...
llvm-svn: 79115
2009-08-15 17:21:44 +00:00
Chris Lattner
9bae01ec47
convert test to filecheck format.
...
llvm-svn: 79114
2009-08-15 17:05:03 +00:00
Chris Lattner
912aa19c25
rename test
...
llvm-svn: 79113
2009-08-15 17:01:44 +00:00
Chris Lattner
e5b9130efe
this is a test for sse3, simplify it.
...
llvm-svn: 79112
2009-08-15 17:01:19 +00:00
Chris Lattner
447b9b43a3
the .eh_frame sections we generate need to be writable (which
...
is why they are datarel). This should fix PR4724, and is fallout
from r78890.
llvm-svn: 79111
2009-08-15 16:54:02 +00:00
Chris Lattner
3ee64e8f4b
document filecheck.
...
llvm-svn: 79110
2009-08-15 16:51:06 +00:00
Chris Lattner
e9ba80db30
fix pasto noticed by Jakub
...
llvm-svn: 79109
2009-08-15 16:18:56 +00:00
Nicolas Geoffray
78e0ffa25f
Use the new API for creating an OpaqueType.
...
llvm-svn: 79107
2009-08-15 15:41:32 +00:00
Chris Lattner
7e11b725f4
add a stub for futher description of filecheck.
...
llvm-svn: 79106
2009-08-15 15:40:48 +00:00
Chris Lattner
878e2b7deb
add a simple FileCheck man page.
...
llvm-svn: 79105
2009-08-15 15:38:11 +00:00
Chris Lattner
ee500a5d19
tidy up
...
llvm-svn: 79101
2009-08-15 15:08:28 +00:00
Nicolas Geoffray
aee49c29ff
Update cpp generation with new LLVM API for primitive types.
...
llvm-svn: 79098
2009-08-15 14:47:42 +00:00
Sanjiv Gupta
1e5027aaef
Revert a few changes that were done in 78603.
...
PIC16DebugInfo currently rely on NameStr of composite type descriptors to uniquely
identify debug info for two aggregate type decls with same name.
This implementation will change when we have MDNodes based debug info implemenatation in place
llvm-svn: 79097
2009-08-15 14:36:48 +00:00
Jakob Stoklund Olesen
4af3c864bc
Don't setCalleeSavedInfoValid() until spills are interted.
...
In a naked function, the flag is never set and getPristineRegs() returns an
empty list. That means naked functions are able to clobber callee saved
registers, but that is the whole point of naked functions.
This fixes PR4716.
llvm-svn: 79096
2009-08-15 13:10:46 +00:00
Jakob Stoklund Olesen
766352fbd2
Allow double defs in the machine code verifier after the addPreRegAlloc passes.
...
llvm-svn: 79095
2009-08-15 13:10:15 +00:00
Richard Osborne
ddd1d4e0f2
Move XCore AsmPrinter to XCore/AsmPrinter directory.
...
llvm-svn: 79094
2009-08-15 12:53:15 +00:00
Jakob Stoklund Olesen
e31228e636
Add XFAIL testcase for setcc undef.
...
llvm-svn: 79093
2009-08-15 12:10:22 +00:00
Jakob Stoklund Olesen
46da62b174
Add XFAIL test case for a scavenger assert.
...
llvm-svn: 79092
2009-08-15 12:09:56 +00:00
Tilmann Scheller
d1aaa3243a
Add support for the PowerPC 64-bit SVR4 ABI.
...
The Link Register is volatile when using the 32-bit SVR4 ABI.
Make it possible to use the 64-bit SVR4 ABI.
Add non-volatile registers for the 64-bit SVR4 ABI.
Make sure r2 is a reserved register when using the 64-bit SVR4 ABI.
Update PPCFrameInfo for the 64-bit SVR4 ABI.
Add FIXME for 64-bit Darwin PPC.
Insert NOP instruction after direct function calls.
Emit official procedure descriptors.
Create TOC entries for GlobalAddress references.
Spill 64-bit non-volatile registers to the correct slots.
Only custom lower VAARG when using the 32-bit SVR4 ABI.
Use simple VASTART lowering for the 64-bit SVR4 ABI.
llvm-svn: 79091
2009-08-15 11:54:46 +00:00
Jakob Stoklund Olesen
abff8fcb1c
Update LocalRewriter::DistanceMap when inserting stack loads.
...
In the included test case, a stack load was not included in DistanceMap. That
caused TransferDeadness to ignore the instruction, leading to a scavenger
assert.
llvm-svn: 79090
2009-08-15 11:03:03 +00:00
Bill Wendling
365ab60d7a
Reformatting and some cleanup.
...
llvm-svn: 79088
2009-08-15 08:56:09 +00:00
Evan Cheng
567f124305
80 col violations.
...
llvm-svn: 79087
2009-08-15 08:38:52 +00:00
Evan Cheng
d7e1a79eea
Fix tests.
...
llvm-svn: 79086
2009-08-15 08:23:11 +00:00
Evan Cheng
6ddd7bcdd1
Turn on if-conversion for thumb2.
...
llvm-svn: 79084
2009-08-15 07:59:10 +00:00
Chris Lattner
84ff2c9348
update for rename.
...
llvm-svn: 79082
2009-08-15 06:14:07 +00:00
Chris Lattner
6362cbe64e
rename PIC16Section.h -> MCSectionPIC16.h for consistency with
...
the class it defines.
llvm-svn: 79081
2009-08-15 06:13:40 +00:00
Chris Lattner
4b9ea39e76
cmake likes its explicit list of files to build.
...
llvm-svn: 79080
2009-08-15 06:10:23 +00:00
Chris Lattner
93980d68e4
use XCore-specific section with xcore specific cp/dp flags to restore
...
support for globals going into the appropriate sections with the flags.
This hopefully finishes unbreaking the previous behavior that I broke before.
llvm-svn: 79079
2009-08-15 06:09:35 +00:00
Chris Lattner
ddb991c255
If ELF subtargets don't want to support 4/8/16-byte mergable sections, allow
...
them to null out the default section pointers.
llvm-svn: 79078
2009-08-15 06:08:34 +00:00
Chris Lattner
0fbe0f51a4
add support for target-specific ELF section flags, add a new MCSectionXCore
...
class which represents the XCore cp/dp section flags. No functionality
change yet.
llvm-svn: 79077
2009-08-15 05:56:11 +00:00
Dan Gohman
fca896815d
Simplify a few more things, eliminating a few more dependencies on
...
"the current basic block".
llvm-svn: 79069
2009-08-15 02:07:36 +00:00
Dan Gohman
e8c913e657
Simplify this code to not depend as much on CurMBB.
...
llvm-svn: 79068
2009-08-15 02:06:22 +00:00
Evan Cheng
75c9e535c6
Do not use frame register to reference fixed stack objects if the function is frameless.
...
llvm-svn: 79067
2009-08-15 02:05:35 +00:00
Dan Gohman
177102271d
Always check to see if raw_fd_ostream's file descriptor is attached to
...
a terminal, not just when it's STDOUT_FILENO.
llvm-svn: 79066
2009-08-15 02:05:19 +00:00
Dan Gohman
186b85dbcc
Add support for column computation on unbuffered streams.
...
llvm-svn: 79065
2009-08-15 02:02:59 +00:00
Dan Gohman
250635e3ac
Move FormattedStream's write_impl out of line.
...
llvm-svn: 79064
2009-08-15 02:01:04 +00:00
Dan Gohman
e9f0bf5dee
Remove an unnecessary #include.
...
llvm-svn: 79063
2009-08-15 01:56:38 +00:00
Chris Lattner
b1bf2009a4
switch DominanceFrontier::splitBlock to use a smallvector for
...
the pred list instead of a vector, saving a boat load of malloc/free's.
llvm-svn: 79062
2009-08-15 01:39:28 +00:00
Dan Gohman
0700a56860
On x86-64, for a varargs function, don't store the xmm registers to
...
the register save area if %al is 0. This avoids touching xmm
regsiters when they aren't actually used.
llvm-svn: 79061
2009-08-15 01:38:56 +00:00
Devang Patel
f691df3536
Do not completely skip subrange info for a zero sized array.
...
llvm-svn: 79044
2009-08-14 20:59:16 +00:00
Evan Cheng
7dae88d2c9
Leaf functions which do not save CSRs can be frameless even with -disable-fp-elim.
...
llvm-svn: 79039
2009-08-14 20:48:13 +00:00
Oscar Fuentes
cc756e70ad
CMake: Updated library dependence info.
...
llvm-svn: 79038
2009-08-14 20:30:18 +00:00
Eric Christopher
846e35b26c
Add sse4.2 string/text processing intrinsics. We'll select these later.
...
llvm-svn: 79037
2009-08-14 20:27:57 +00:00
Eric Christopher
86f7f77cc5
Whitespace cleanup.
...
llvm-svn: 79036
2009-08-14 20:27:12 +00:00
Anton Korobeynikov
a6b3ce203a
Allow targets to specify their choice of calling conventions per
...
libcall. Take advantage of this in the ARM backend to rectify broken
choice of CC when hard float is in effect. PIC16 may want to see if
it could be of use in MakePIC16Libcall, which works unchanged.
Patch by Sandeep!
llvm-svn: 79033
2009-08-14 20:10:52 +00:00
Evan Cheng
dc49a8d3f1
Add Thumb2 lsr hooks.
...
llvm-svn: 79032
2009-08-14 20:09:37 +00:00
Daniel Dunbar
6cb1eb5a6d
llvm-mc: Fix bugs where bytes were unintentionally being printed as signed.
...
- We now print all of 403.gcc cleanly (llvm-mc -> 'as' as diffed to 'as'), minus two
'rep;movsl' instructions (which I missed before).
llvm-svn: 79031
2009-08-14 19:59:24 +00:00
Oscar Fuentes
6b5cb8a6b3
CMake: Corrected variable check.
...
llvm-svn: 79030
2009-08-14 19:56:04 +00:00
Bruno Cardoso Lopes
c773141e66
*try* to use a better name to describe how common symbols are marked on the elf object file.
...
llvm-svn: 79029
2009-08-14 19:45:38 +00:00
Owen Anderson
8cd3566d6d
Add doxygen comments.
...
llvm-svn: 79027
2009-08-14 19:41:50 +00:00
Evan Cheng
09c070f4ce
80 col violation.
...
llvm-svn: 79026
2009-08-14 19:11:20 +00:00
Daniel Dunbar
c2346a3037
llvm-mc: When handling a .set, make sure to print subsequent references to the
...
symbol as the symbol name itself, not the expression it was defined to. These
have different semantics due to the quirky .set behavior (which absolutizes an
expression that would otherwise be treated as a relocation).
llvm-svn: 79025
2009-08-14 19:10:46 +00:00
Anton Korobeynikov
c1524d442d
Cleanup the mess in msp430 target registration and hopefully unbreak the build
...
llvm-svn: 79024
2009-08-14 19:06:50 +00:00
Argyrios Kyrtzidis
ac74c4c2a1
Revert r78424.
...
In order for the changes in r78424 to work properly, cast_retty<X,Y> should return an object instead of a reference, and it's not clear that this approach has real advantages.
llvm-svn: 79023
2009-08-14 19:01:37 +00:00
Evan Cheng
9a58aff837
Indentation.
...
llvm-svn: 79022
2009-08-14 19:01:37 +00:00
Anton Korobeynikov
28381c05d4
Force reconfigure
...
llvm-svn: 79019
2009-08-14 18:53:19 +00:00
Daniel Dunbar
563a7e87e3
llvm-mc: zerofill shouldn't print quotes around the section,segment.
...
llvm-svn: 79017
2009-08-14 18:51:45 +00:00
Chris Lattner
0792195c5a
fix "pc" to be lower case in a target triple, patch by Yonggang Luo
...
llvm-svn: 79016
2009-08-14 18:48:13 +00:00
Anton Korobeynikov
384b336911
Hopefully unbreak cmake builds
...
llvm-svn: 79015
2009-08-14 18:46:49 +00:00
Evan Cheng
e41903b10d
Also shrink immediate branches; also more assembler workarounds.
...
llvm-svn: 79014
2009-08-14 18:31:44 +00:00
Anton Korobeynikov
52b7f0ad5f
Give MSP430 a separate asmprinter lib
...
llvm-svn: 79012
2009-08-14 18:28:12 +00:00
Daniel Dunbar
ef668c169b
llvm-mc: Support escaped characters in string literals (for .ascii and .asciz)
...
llvm-svn: 79010
2009-08-14 18:19:52 +00:00
Anton Korobeynikov
75821f7c69
Properly handle indirect win64 args when they're passed in memory
...
llvm-svn: 79009
2009-08-14 18:19:10 +00:00
Owen Anderson
6a95bcec19
Get the CPP backend into some semblance of working by updating for numerous LLVMContext changes,
...
as well as the StringRef change.
llvm-svn: 79006
2009-08-14 17:41:33 +00:00
Oscar Fuentes
1ea4b3a4b5
CMake: Automatic regeneration of the library dependencies file.
...
It doesn't stop or reconfigure the build, though, so the user will see
a broken build that magically succeeds at the next attempt. It is
technically possible to halt the build with a helpful message, and
even to automatically restart the build using the new dependencies as
it we did when llvm-config was used by cmake for learning
dependencies. This is left on the TODO list.
llvm-svn: 79004
2009-08-14 16:59:41 +00:00
Daniel Dunbar
af590e5033
Take another shot at disabling this when no ppc support is available.
...
llvm-svn: 79003
2009-08-14 16:40:12 +00:00
Erick Tryzelaar
330b1b4cd8
A couple IRBuilder functions were still using getGlobalContext().
...
llvm-svn: 78997
2009-08-14 06:12:30 +00:00
Oscar Fuentes
5717a72863
CMake: Builds main LLVM Target library before its sublibraries. This
...
way we ensure that tablegenned files exist before they are #include'd
by the LLVM Target sublibraries. Required for parallel builds.
llvm-svn: 78996
2009-08-14 05:17:24 +00:00
Bob Wilson
6f34e278c7
Now that all the legal Neon shuffles (or at least the ones that have been
...
implemented so far) are recognized during legalization, it is easy to fall
back to the default expansion for other shuffles.
llvm-svn: 78995
2009-08-14 05:16:33 +00:00
Bob Wilson
eb54d51759
Create a new ARM-specific DAG node, VDUP, to represent a splat from a
...
scalar_to_vector. Generate these VDUP nodes during legalization instead
of trying to recognize the pattern during selection.
llvm-svn: 78994
2009-08-14 05:13:08 +00:00
Bob Wilson
cce31f6831
During legalization, change Neon vdup_lane operations from shuffles to
...
target-specific VDUPLANE nodes. This allows the subreg handling for the
quad-register version to be done easily with Pats in the .td file, instead
of with custom code in ARMISelDAGToDAG.cpp.
llvm-svn: 78993
2009-08-14 05:08:32 +00:00
Oscar Fuentes
7a87d6694e
CMake: Corrected indentation on a block of code.
...
llvm-svn: 78992
2009-08-14 04:55:21 +00:00
Oscar Fuentes
3fca0e811c
CMake: Use LLVM_COMMON_DEPENDS on add_llvm_executable.
...
llvm-svn: 78990
2009-08-14 04:38:57 +00:00
Oscar Fuentes
5444cb13ab
CMake: propagate to the parent scope LLVM_COMMON_DEPENDS. This is
...
necessary for the changes being effective on the successive targets
llvm-svn: 78989
2009-08-14 04:29:33 +00:00
Oscar Fuentes
67f7fbdf9e
CMake: updated list of source files for library MC.
...
llvm-svn: 78988
2009-08-14 04:14:45 +00:00
Daniel Dunbar
80d484e7cc
Update llvm-mc / MCAsmStreamer to print the instruction using the actual target
...
specific printer (this only works on x86, for now).
- This makes it possible to do some correctness checking of the parsing and
matching, since we can compare the results of 'as' on the original input, to
those of 'as' on the output from llvm-mc.
- In theory, we could now have an easy ATT -> Intel syntax converter. :)
llvm-svn: 78986
2009-08-14 03:48:55 +00:00
Daniel Dunbar
50327c561b
Add virtual printMCInst method to AsmPrinter, as a quick way to expose the API
...
to print one instruction.
llvm-svn: 78985
2009-08-14 03:43:57 +00:00
Daniel Dunbar
ad8740ae78
Add X86 instruction printer support for printing MCValue operands.
...
llvm-svn: 78984
2009-08-14 03:42:12 +00:00
Daniel Dunbar
1a019d8554
Add MCSymbol::{print, dump}
...
llvm-svn: 78983
2009-08-14 03:41:23 +00:00
Daniel Dunbar
afe6603590
Add MCValue::{print, dump}
...
llvm-svn: 78982
2009-08-14 03:11:09 +00:00
Daniel Dunbar
cbf4faf48d
llvm-mc: Move MCAsmToken::getLoc() into MC library where it belongs.
...
llvm-svn: 78980
2009-08-14 02:18:40 +00:00
Evan Cheng
dc1869661b
Indentation change.
...
llvm-svn: 78978
2009-08-14 01:56:37 +00:00
Oscar Fuentes
96147c60f1
CMake: updated library dependencies.
...
llvm-svn: 78976
2009-08-14 01:55:28 +00:00
Oscar Fuentes
9082c71057
CMake: build llvm-config before the other tools.
...
llvm-svn: 78975
2009-08-14 01:55:05 +00:00
Evan Cheng
db73d68cbe
Shrink ADR and LDR from constantpool late during constantpool island pass.
...
llvm-svn: 78970
2009-08-14 00:32:16 +00:00
Owen Anderson
7a336d3126
Add helpers for fetching basic types.
...
llvm-svn: 78969
2009-08-14 00:30:41 +00:00
Evan Cheng
76fa6e6a8f
New entry.
...
llvm-svn: 78968
2009-08-14 00:16:47 +00:00
Dan Gohman
dbeb33936f
Make TargetData optional in GlobalOpt and ArgumentPromotion.
...
llvm-svn: 78967
2009-08-14 00:11:03 +00:00
Dan Gohman
3e9dbe5a10
Make these matching rules more strict so that they don't
...
accidentally match unrelated things.
llvm-svn: 78966
2009-08-14 00:10:19 +00:00
Erick Tryzelaar
262332f24b
Expose LLVMContext to llvm-c.
...
llvm-svn: 78964
2009-08-14 00:01:31 +00:00
Dan Gohman
3e0bd7852f
Fix MCSectionELF::ShouldOmitSectionDirective's matching of .data and
...
friends so that it doesn't match sections like .data.rel.local, which
should not be emitted as section directives.
llvm-svn: 78963
2009-08-13 23:56:34 +00:00
Daniel Dunbar
9abdc6cc3c
TargetRegistry: Change AsmPrinter constructor to be typed as returning an
...
AsmPrinter instance (instead of just a FunctionPass)
llvm-svn: 78962
2009-08-13 23:48:47 +00:00
Daniel Dunbar
148edca7b8
Mark this test as requiring the powerpc target.
...
llvm-svn: 78961
2009-08-13 23:47:58 +00:00
Daniel Dunbar
aba5fb8c9a
llvm-mc: Add dummy MCStreamer implementation, (eventually) for use in profiling.
...
- Currently unused.
- A few other random comment fixes lumped in.
llvm-svn: 78960
2009-08-13 23:36:34 +00:00
Bruno Cardoso Lopes
62e6a8bbe6
Remove HasCrazyBSS and add a flag in TAI to indicate that '.section'
...
must be emitted for PowerPC-Linux '.bss' section
llvm-svn: 78958
2009-08-13 23:30:21 +00:00
Owen Anderson
a42ac6953b
Actually privatize a IntegerTypes, and fix a few bugs exposed by this.
...
llvm-svn: 78955
2009-08-13 23:27:32 +00:00
Dan Gohman
4af229e0eb
When standard output is a terminal, set outs() to be unbuffered, to
...
mimic the behavior of stdtout, which is line-buffered when the output
is a terminal. This fixes some issues with bugpoint output appearing
being printed out of order.
llvm-svn: 78953
2009-08-13 23:18:56 +00:00
Dan Gohman
d57cbfc7d8
Make formatted_raw_ostream restore the buffer settings of the
...
underlying stream when it is finished, so that clients don't
have to do this manually.
llvm-svn: 78952
2009-08-13 23:16:59 +00:00
Dan Gohman
0809712def
Take the fast path for any named value and any GlobalValue, which doesn't
...
need TypePrinting despite being a subclass of Constant. This fixes
compile-time problems especially visible on 403.gcc when -asm-verbose is
enabled.
llvm-svn: 78951
2009-08-13 23:07:11 +00:00
Owen Anderson
55f1c09e31
Push LLVMContexts through the IntegerType APIs.
...
llvm-svn: 78948
2009-08-13 21:58:54 +00:00
Bruno Cardoso Lopes
d2d45a5575
Remove hack used to strip unwanted chars from section name
...
Use MCSectionELF methods as much as possible, removing some
ELFWriter methods which are now unused
llvm-svn: 78940
2009-08-13 21:25:27 +00:00
Bruno Cardoso Lopes
e795f7bed5
Add a method to return BSSSection from TargetLoweringObjectFile
...
llvm-svn: 78939
2009-08-13 21:10:28 +00:00
Bruno Cardoso Lopes
df743ae603
Add a method to return if the ELF section contains only common symbols!
...
llvm-svn: 78937
2009-08-13 21:08:56 +00:00
Dan Gohman
e6e417149f
Add unimplemented destructor declarations to hopefully address
...
compiler warnings on windows (PR4714).
llvm-svn: 78934
2009-08-13 20:43:13 +00:00
Dan Gohman
c04a00a0b0
Fix a compiler warning about comparing signed with unsigned.
...
llvm-svn: 78933
2009-08-13 20:32:03 +00:00
Misha Brukman
153292e55d
* Moved all tool version requirements to the same place
...
* Cleaned up multiple uses of literal version numbers and simplified 'cleaning'
llvm-svn: 78932
2009-08-13 20:29:30 +00:00
Misha Brukman
c8594a1add
Converted tabs to spaces.
...
llvm-svn: 78931
2009-08-13 20:12:48 +00:00
Misha Brukman
952784fbf5
Grammar fix.
...
llvm-svn: 78930
2009-08-13 20:08:52 +00:00
Daniel Dunbar
95f58463e5
TargetRegistry: Reorganize AsmPrinter construction so that clients pass in the
...
TargetAsmInfo. This eliminates a dependency on TargetMachine.h from
TargetRegistry.h, which technically was a layering violation.
- Clients probably can only sensibly pass in the same TargetAsmInfo as the
TargetMachine has, but there are only limited clients of this API.
llvm-svn: 78928
2009-08-13 19:38:51 +00:00
Dan Gohman
9820555546
Add an assert to check copy_to_buffer's precondition.
...
llvm-svn: 78926
2009-08-13 18:38:15 +00:00
Dan Gohman
854ea3c580
Set raw_os_ostream, raw_string_ostream, and raw_svector_ostream to be
...
unbuffered. std::ostream does its own buffering, and std::string and
SmallVector both have allocation strategies intended to handle frequent
appending.
llvm-svn: 78924
2009-08-13 17:41:40 +00:00
Dan Gohman
84487b98a5
Add support to raw_ostream for sizing the buffer according to the
...
needs of the underlying output mechanism. raw_fd_ostream now uses
st_blksize from fstat to determine a buffer size.
llvm-svn: 78923
2009-08-13 17:27:29 +00:00
Daniel Dunbar
d81866827c
Add temporary hack to teach LLVM to reconfigure itself to pick up the new PIC16
...
AsmPrinter (in AsmPrinters.def).
llvm-svn: 78922
2009-08-13 17:22:49 +00:00
Daniel Dunbar
c01ed862c8
Reapply pieces of 78914 reverted in 78916, this has been fixed.
...
llvm-svn: 78921
2009-08-13 17:08:54 +00:00
Dan Gohman
f0b93441a4
Make raw_ostream non-copyable.
...
llvm-svn: 78920
2009-08-13 17:07:08 +00:00
Daniel Dunbar
86c065dd68
Revert 78892 and 78895, these break generating working executables on
...
x86_64-apple-darwin10.
--- Reverse-merging r78895 into '.':
U test/CodeGen/PowerPC/2008-12-12-EH.ll
U lib/Target/DarwinTargetAsmInfo.cpp
--- Reverse-merging r78892 into '.':
U include/llvm/Target/DarwinTargetAsmInfo.h
U lib/Target/X86/X86TargetAsmInfo.cpp
U lib/Target/X86/X86TargetAsmInfo.h
U lib/Target/ARM/ARMTargetAsmInfo.h
U lib/Target/ARM/ARMTargetMachine.cpp
U lib/Target/ARM/ARMTargetAsmInfo.cpp
U lib/Target/PowerPC/PPCTargetAsmInfo.cpp
U lib/Target/PowerPC/PPCTargetAsmInfo.h
U lib/Target/PowerPC/PPCTargetMachine.cpp
G lib/Target/DarwinTargetAsmInfo.cpp
llvm-svn: 78919
2009-08-13 17:03:38 +00:00
Jim Grosbach
eba70d85cf
Add missing defs of R2 and D1.
...
llvm-svn: 78918
2009-08-13 16:59:44 +00:00
Daniel Dunbar
e95b32b057
Remove obsoleted files (from AsmPrinter move)
...
llvm-svn: 78917
2009-08-13 16:57:03 +00:00
Owen Anderson
ca232776ec
Revert r78914, as it was breaking the build.
...
llvm-svn: 78916
2009-08-13 16:54:39 +00:00
Dan Gohman
6dd7cb5dfe
Simplify this code so that it doesn't depend on raw_ostream being copyable.
...
llvm-svn: 78915
2009-08-13 16:51:51 +00:00
Sanjiv Gupta
89ec31a26a
Move PIC16 AsmPrinter to PIC16/AsmPrinter directory.
...
Remove CooperTargetMachine, as currently only one is supported.
llvm-svn: 78914
2009-08-13 16:37:05 +00:00
Jakob Stoklund Olesen
12de03ffc9
Track pristine registers as if they were live-in in the register scavenger.
...
llvm-svn: 78913
2009-08-13 16:20:04 +00:00
Jakob Stoklund Olesen
0e73fdff6c
Use pristine register info in machine code verifier.
...
So far these registers are simply tracked as if they were live-in.
llvm-svn: 78912
2009-08-13 16:19:51 +00:00
Jakob Stoklund Olesen
3de4a60e1e
Add MachineFrameInfo::getPristineRegisters(MBB) method.
...
llvm-svn: 78911
2009-08-13 16:19:33 +00:00
David Goodwin
90e6b8b708
Add callback to allow target to adjust latency of schedule dependency edge.
...
llvm-svn: 78910
2009-08-13 16:05:04 +00:00
Dan Gohman
54401d4174
Move SetBufferSize and SetUnbuffered out of line.
...
llvm-svn: 78909
2009-08-13 15:58:55 +00:00
David Goodwin
a9c2aad939
Finalize itineraries for cortex-a8 integer multiply
...
llvm-svn: 78908
2009-08-13 15:51:13 +00:00
Dan Gohman
52022c2373
Fix the buffer handling logic so that write_impl is always called with
...
a full buffer, rather than often being called with a
slightly-less-than-full buffer.
llvm-svn: 78907
2009-08-13 15:44:52 +00:00
Dan Gohman
8061d9e23f
Fix a 4x slowdown in llc -asm-verbose caused by the use of
...
WriteAsOperand in more places.
Now that more things are using WriteAsOperand, its behavior of
constructing a TypePrinting object and populating it with strings for all
the numbered types in the Module on each call is a significant bottleneck.
Fancier solutions could be pursued here, but for now, just bypass the
TypePrinting overhead in obvious cases.
llvm-svn: 78906
2009-08-13 15:27:57 +00:00
Jim Grosbach
695e1c6087
Remove unnecessary newline
...
llvm-svn: 78905
2009-08-13 15:12:16 +00:00
Jim Grosbach
c96e88f8a5
Correct comment wording
...
llvm-svn: 78904
2009-08-13 15:11:43 +00:00
Chris Lattner
68535f7603
reintroduce support for Mips "small" section handling. This is
...
implemented somewhat differently than before, but it should have
the same functionality and the previous testcase passes again.
llvm-svn: 78900
2009-08-13 06:28:06 +00:00
Jakob Stoklund Olesen
33733c0342
Fix the N>=64 case in the isInt<> and isUint<> templates.
...
llvm-svn: 78899
2009-08-13 06:24:02 +00:00
Evan Cheng
f59e9f4288
tPOP_RET now has predicate operands.
...
llvm-svn: 78898
2009-08-13 06:05:07 +00:00
Bob Wilson
3e4c012d54
Add a fixme message about canonicalizing floating-point vector types.
...
llvm-svn: 78897
2009-08-13 06:01:30 +00:00
Bob Wilson
ef6e602bf4
Revert r78852 for now. I want to do this differently, but I don't have time
...
to fix it tonight.
llvm-svn: 78896
2009-08-13 05:58:56 +00:00
Chris Lattner
00a8de054c
fix typo, add 10.6 version of test for my previous patch.
...
llvm-svn: 78895
2009-08-13 05:43:33 +00:00
Chris Lattner
58e8be847c
Restore some "small section" support code, reverting my patch from r76936.
...
llvm-svn: 78894
2009-08-13 05:41:27 +00:00
Evan Cheng
e5801bd220
It's ok to spill a tGPR register as long as it's still allocated a low register.
...
llvm-svn: 78893
2009-08-13 05:40:51 +00:00
Chris Lattner
eb68198145
fix a minor fixme. When building with SL and later tools, the ".eh" symbols
...
don't need to be exported from the .o files.
llvm-svn: 78892
2009-08-13 05:30:22 +00:00