oota-llvm.git
14 years agoChanges DOUT references in the PBQP allocator to use DEBUG(errs() ...)
Lang Hames [Tue, 18 Aug 2009 23:34:50 +0000 (23:34 +0000)]
Changes DOUT references in the PBQP allocator to use DEBUG(errs() ...)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79378 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoImplement sse4.2 string/text processing instructions:
Eric Christopher [Tue, 18 Aug 2009 22:50:32 +0000 (22:50 +0000)]
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).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79377 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFirst steps to document new release plan.
Tanya Lattner [Tue, 18 Aug 2009 22:33:28 +0000 (22:33 +0000)]
First steps to document new release plan.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79376 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSpeed up raw_ostream::<<(unsigned long long) for 32-bit systems by doing most
Daniel Dunbar [Tue, 18 Aug 2009 22:24:00 +0000 (22:24 +0000)]
Speed up raw_ostream::<<(unsigned long long) for 32-bit systems by doing most
div/mods in 32-bits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79375 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSimplify RegScavenger::FindUnusedReg.
Jakob Stoklund Olesen [Tue, 18 Aug 2009 21:14:54 +0000 (21:14 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79369 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd support for mergeable sections back into the XCore backend.
Richard Osborne [Tue, 18 Aug 2009 21:14:31 +0000 (21:14 +0000)]
Add support for mergeable sections back into the XCore backend.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79368 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix a bug in raw_ostream::write(char) introduced by the change to
Dan Gohman [Tue, 18 Aug 2009 20:09:59 +0000 (20:09 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79362 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevert r78924, disabling buffering defeats all the fast paths in raw_ostream.
Daniel Dunbar [Tue, 18 Aug 2009 20:07:36 +0000 (20:07 +0000)]
Revert r78924, disabling buffering defeats all the fast paths in raw_ostream.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79361 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoImprove Triple to recognize the OS in i386-mingw32.
Daniel Dunbar [Tue, 18 Aug 2009 19:26:55 +0000 (19:26 +0000)]
Improve Triple to recognize the OS in i386-mingw32.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79359 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake various changes suggested by Chris.
David Greene [Tue, 18 Aug 2009 19:22:55 +0000 (19:22 +0000)]
Make various changes suggested by Chris.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79358 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSurrounded variable in <tt> tags for consistency.
Misha Brukman [Tue, 18 Aug 2009 19:18:40 +0000 (19:18 +0000)]
Surrounded variable in <tt> tags for consistency.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79357 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix pasto in StringRef::count(char)
Daniel Dunbar [Tue, 18 Aug 2009 18:34:22 +0000 (18:34 +0000)]
Fix pasto in StringRef::count(char)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79356 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoPrivatize the ValueHandle global map. Because this is used so heavily throughout...
Owen Anderson [Tue, 18 Aug 2009 18:28:58 +0000 (18:28 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79355 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd StringRef::count({char,StringRef})
Daniel Dunbar [Tue, 18 Aug 2009 18:26:35 +0000 (18:26 +0000)]
Add StringRef::count({char,StringRef})

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79354 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix an uninitialized value warning in APFloat.
Erick Tryzelaar [Tue, 18 Aug 2009 18:20:37 +0000 (18:20 +0000)]
Fix an uninitialized value warning in APFloat.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79353 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd CXXFLAGS to the Link lines as well in case someone used those instead
Eric Christopher [Tue, 18 Aug 2009 18:07:35 +0000 (18:07 +0000)]
Add CXXFLAGS to the Link lines as well in case someone used those instead
of LDFLAGS.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79352 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoPut data with relocations in the same sections as data without relocations.
Richard Osborne [Tue, 18 Aug 2009 17:58:17 +0000 (17:58 +0000)]
Put data with relocations in the same sections as data without relocations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79351 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAttempt to normalize test results.
Daniel Dunbar [Tue, 18 Aug 2009 17:38:27 +0000 (17:38 +0000)]
Attempt to normalize test results.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79350 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake this test less sensitive to assembler differences.
Dan Gohman [Tue, 18 Aug 2009 17:19:46 +0000 (17:19 +0000)]
Make this test less sensitive to assembler differences.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79348 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoalphabeticalize
Chris Lattner [Tue, 18 Aug 2009 17:04:44 +0000 (17:04 +0000)]
alphabeticalize

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79347 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix COFF targets (mingw/cygwin) to provide ehframe and LSDA sections
Chris Lattner [Tue, 18 Aug 2009 16:56:17 +0000 (16:56 +0000)]
fix COFF targets (mingw/cygwin) to provide ehframe and LSDA sections

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79346 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoforce a triple so this passes on darwin
Chris Lattner [Tue, 18 Aug 2009 16:55:45 +0000 (16:55 +0000)]
force a triple so this passes on darwin

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79345 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoGeneralize ScalarEvolution to be able to analyze GEPs when
Dan Gohman [Tue, 18 Aug 2009 16:46:41 +0000 (16:46 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79344 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agonull streamer needs to maintain the current section as well.
Chris Lattner [Tue, 18 Aug 2009 16:46:29 +0000 (16:46 +0000)]
null streamer needs to maintain the current section as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79343 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCMake: LLVM_ENABLE_PIC now defaults to ON, as in `configure'. This is
Oscar Fuentes [Tue, 18 Aug 2009 15:29:35 +0000 (15:29 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79339 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake tail merging handle blocks with repeated predecessors correctly, and
Dan Gohman [Tue, 18 Aug 2009 15:18:18 +0000 (15:18 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79338 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix a bug that caused globalopt to miscompile tramp3d: don't miss
Dan Gohman [Tue, 18 Aug 2009 14:58:19 +0000 (14:58 +0000)]
Fix a bug that caused globalopt to miscompile tramp3d: don't miss
unruly indices for arrays that are members of structs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79337 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoText sections should have 'exec' flag set. This seems to unbreak libstdc++ on linux.
Anton Korobeynikov [Tue, 18 Aug 2009 14:06:12 +0000 (14:06 +0000)]
Text sections should have 'exec' flag set. This seems to unbreak libstdc++ on linux.
Patch by Dmitry Gorbachev!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79334 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFixed spelling of MSP430.
Misha Brukman [Tue, 18 Aug 2009 13:50:28 +0000 (13:50 +0000)]
Fixed spelling of MSP430.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79333 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix Triple to recognize the 'bfin' arch.
Daniel Dunbar [Tue, 18 Aug 2009 07:06:26 +0000 (07:06 +0000)]
Fix Triple to recognize the 'bfin' arch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79325 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake AsmStreamer maintain a notion of the current section, pushing it up from the
Chris Lattner [Tue, 18 Aug 2009 06:15:16 +0000 (06:15 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79324 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd a horrible hack to the dwarf printer. It looks like mingw is not specifying
Chris Lattner [Tue, 18 Aug 2009 06:13:03 +0000 (06:13 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79323 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoInclude valgrind in the steps to reproduce if valgrind was used to reproduce
Nick Lewycky [Tue, 18 Aug 2009 06:08:01 +0000 (06:08 +0000)]
Include valgrind in the steps to reproduce if valgrind was used to reproduce
the problem.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79322 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoremove some pointless null switchtosections. The IntelAsmPrinter doesn't really...
Chris Lattner [Tue, 18 Aug 2009 06:03:07 +0000 (06:03 +0000)]
remove some pointless null switchtosections.  The IntelAsmPrinter doesn't really work anyway.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79321 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix revsh pattern.
Evan Cheng [Tue, 18 Aug 2009 05:43:23 +0000 (05:43 +0000)]
Fix revsh pattern.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79318 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd support for some targetflags on GV operands. This allows us to
Chris Lattner [Tue, 18 Aug 2009 05:33:27 +0000 (05:33 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79317 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRecognize xscale as an ARM arch.
Daniel Dunbar [Tue, 18 Aug 2009 04:51:26 +0000 (04:51 +0000)]
Recognize xscale as an ARM arch.
 - Patch by Yonggang Luo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79315 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd Triple matching for pic16 arch and solaris OS.
Daniel Dunbar [Tue, 18 Aug 2009 04:43:27 +0000 (04:43 +0000)]
Add Triple matching for pic16 arch and solaris OS.
 - Patch by Yonggang Luo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79314 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix another bozo bug
Chris Lattner [Tue, 18 Aug 2009 04:34:36 +0000 (04:34 +0000)]
fix another bozo bug

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79313 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix accidentally inverted conditional and add comment.
Chris Lattner [Tue, 18 Aug 2009 04:33:15 +0000 (04:33 +0000)]
fix accidentally inverted conditional and add comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79312 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoturn this conditional into something humans might actually
Chris Lattner [Tue, 18 Aug 2009 04:30:35 +0000 (04:30 +0000)]
turn this conditional into something humans might actually
be able to understand ;-)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79311 91177308-0d34-0410-b5e6-96231b3b80d8

14 years ago"-" should write to stdout, not stderr.
Chris Lattner [Tue, 18 Aug 2009 04:03:24 +0000 (04:03 +0000)]
"-" should write to stdout, not stderr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79310 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoChange bugpoint to use Triple to make runtime decisions.
Daniel Dunbar [Tue, 18 Aug 2009 03:35:57 +0000 (03:35 +0000)]
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!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79309 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSeparate out Makefile defines so that we can keep the llvm
Eric Christopher [Tue, 18 Aug 2009 03:23:40 +0000 (03:23 +0000)]
Separate out Makefile defines so that we can keep the llvm
defined ones from the user defined ones. Propagate accordingly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79308 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd LLVMInitializeAllTargetInfos for C api, and update
Daniel Dunbar [Tue, 18 Aug 2009 03:03:27 +0000 (03:03 +0000)]
Add LLVMInitializeAllTargetInfos for C api, and update
LLVMInitializeNativeTarget to initialize target info.
 - Patch by Jose Fonseca.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79307 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake TargetData optional in MemCpyOptimizer.
Dan Gohman [Tue, 18 Aug 2009 01:17:52 +0000 (01:17 +0000)]
Make TargetData optional in MemCpyOptimizer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79306 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoEven more Apple style build horribleness.
Evan Cheng [Tue, 18 Aug 2009 00:56:17 +0000 (00:56 +0000)]
Even more Apple style build horribleness.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79299 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake TargetData optional in SimplifyLibCalls.
Dan Gohman [Tue, 18 Aug 2009 00:48:13 +0000 (00:48 +0000)]
Make TargetData optional in SimplifyLibCalls.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79298 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRegenerate
Anton Korobeynikov [Tue, 18 Aug 2009 00:40:51 +0000 (00:40 +0000)]
Regenerate

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79297 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoThe attached patches attempt to fix cross builds. For example, if you
Anton Korobeynikov [Tue, 18 Aug 2009 00:40:33 +0000 (00:40 +0000)]
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!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79296 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoLLVM Ada language bindings. Credit to Rod Kay and the AuroraUX team.
Edward O'Callaghan [Tue, 18 Aug 2009 00:24:36 +0000 (00:24 +0000)]
LLVM Ada language bindings. Credit to Rod Kay and the AuroraUX team.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79295 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix function alignment at -Os on x86 to be 1, not 2. getFunctionAlignment
Dan Gohman [Tue, 18 Aug 2009 00:20:06 +0000 (00:20 +0000)]
Fix function alignment at -Os on x86 to be 1, not 2. getFunctionAlignment
returns a log2 value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79293 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoPowerPC inline asm was emitting two output operands
Dale Johannesen [Tue, 18 Aug 2009 00:18:39 +0000 (00:18 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79292 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd prefix only if it is needed.
Devang Patel [Mon, 17 Aug 2009 23:17:17 +0000 (23:17 +0000)]
Add prefix only if it is needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79289 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agocleanups per review. Mostly cosmetic, plus use SmallVector in place of std::vector.
Jim Grosbach [Mon, 17 Aug 2009 21:40:03 +0000 (21:40 +0000)]
cleanups per review. Mostly cosmetic, plus use SmallVector in place of std::vector.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79287 91177308-0d34-0410-b5e6-96231b3b80d8

14 years ago#include <cstdlib> in the code listing for strtod.
John McCall [Mon, 17 Aug 2009 21:07:37 +0000 (21:07 +0000)]
#include <cstdlib> in the code listing for strtod.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79285 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoOops. find all llvm.dbg.global_variables.
Devang Patel [Mon, 17 Aug 2009 20:36:20 +0000 (20:36 +0000)]
Oops. find all llvm.dbg.global_variables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79274 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove a bit more cruft from the sjlj moving to a backend pass.
Jim Grosbach [Mon, 17 Aug 2009 20:25:04 +0000 (20:25 +0000)]
Remove a bit more cruft from the sjlj moving to a backend pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79272 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUpdate CMakeLists.
Benjamin Kramer [Mon, 17 Aug 2009 18:47:11 +0000 (18:47 +0000)]
Update CMakeLists.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79264 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUpdate comments to new-style syntax.
Dan Gohman [Mon, 17 Aug 2009 18:45:31 +0000 (18:45 +0000)]
Update comments to new-style syntax.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79263 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix build warning.
Daniel Dunbar [Mon, 17 Aug 2009 18:41:42 +0000 (18:41 +0000)]
Fix build warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79262 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoPrivatize the last bits of static type state.
Owen Anderson [Mon, 17 Aug 2009 17:59:35 +0000 (17:59 +0000)]
Privatize the last bits of static type state.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79258 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTest the pass the test is actually for, instead of one that doesn't exist.
Nick Lewycky [Mon, 17 Aug 2009 17:41:29 +0000 (17:41 +0000)]
Test the pass the test is actually for, instead of one that doesn't exist.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79257 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMove the TypeMap lock to a member on LLVMContextImpl.
Owen Anderson [Mon, 17 Aug 2009 17:34:27 +0000 (17:34 +0000)]
Move the TypeMap lock to a member on LLVMContextImpl.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79256 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd locking around the attributes list.
Owen Anderson [Mon, 17 Aug 2009 17:10:58 +0000 (17:10 +0000)]
Add locking around the attributes list.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79255 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd locking around signal handler registration.
Owen Anderson [Mon, 17 Aug 2009 17:07:22 +0000 (17:07 +0000)]
Add locking around signal handler registration.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79254 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoClear the uniquing table when initializing TLOF to avoid a crash when the TLOF is...
Benjamin Kramer [Mon, 17 Aug 2009 17:05:44 +0000 (17:05 +0000)]
Clear the uniquing table when initializing TLOF to avoid a crash when the TLOF is reinitialized with a different MCContext.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79253 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDon't crash on critical edge. Patch by Andre Tavares.
Nick Lewycky [Mon, 17 Aug 2009 17:00:57 +0000 (17:00 +0000)]
Don't crash on critical edge. Patch by Andre Tavares.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79252 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMove the sjlj exception handling conversions to a back-end pass where they
Jim Grosbach [Mon, 17 Aug 2009 16:41:22 +0000 (16:41 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79250 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUpdate getSectionForConstant() to to allow mergable sections to be nulled out
Richard Osborne [Mon, 17 Aug 2009 16:37:11 +0000 (16:37 +0000)]
Update getSectionForConstant() to to allow mergable sections to be nulled out
if not supported by the ELF subtarget.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79249 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoExtend the instruction itinerary model to include the ability to indicate the def...
David Goodwin [Mon, 17 Aug 2009 16:02:57 +0000 (16:02 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79247 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agothe MinPad argument to PadToColumn only really makes sense to be 1,
Chris Lattner [Mon, 17 Aug 2009 15:48:08 +0000 (15:48 +0000)]
the MinPad argument to PadToColumn only really makes sense to be 1,
just remove the argument and replace it with 1.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79246 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFixed indentation and spelling.
Misha Brukman [Mon, 17 Aug 2009 15:31:24 +0000 (15:31 +0000)]
Fixed indentation and spelling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79245 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix more missing newlines.
Dan Gohman [Mon, 17 Aug 2009 15:29:31 +0000 (15:29 +0000)]
Fix more missing newlines.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79244 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix printing of instructions with null operands.
Dan Gohman [Mon, 17 Aug 2009 15:28:08 +0000 (15:28 +0000)]
Fix printing of instructions with null operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79243 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAlways print at least one space before adding a comment.
Dan Gohman [Mon, 17 Aug 2009 15:27:30 +0000 (15:27 +0000)]
Always print at least one space before adding a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79242 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix debug output to include a newline after printing a Value, now
Dan Gohman [Mon, 17 Aug 2009 15:25:05 +0000 (15:25 +0000)]
Fix debug output to include a newline after printing a Value, now
that Value's operator<< doesn't include one.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79240 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDon't access the first element of a potentially empty
Duncan Sands [Mon, 17 Aug 2009 14:33:27 +0000 (14:33 +0000)]
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).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79237 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoXFAIL this test since the fix was reverted.
Duncan Sands [Mon, 17 Aug 2009 12:20:45 +0000 (12:20 +0000)]
XFAIL this test since the fix was reverted.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79235 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a test that shows that SSI is working correctly.
Nick Lewycky [Mon, 17 Aug 2009 07:32:08 +0000 (07:32 +0000)]
Add a test that shows that SSI is working correctly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79230 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agochange AsmPrinter to switch sections using AsmStreamer instead of
Chris Lattner [Mon, 17 Aug 2009 05:49:08 +0000 (05:49 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79227 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDon't crash trying to promote VLAs.
Nick Lewycky [Mon, 17 Aug 2009 05:37:31 +0000 (05:37 +0000)]
Don't crash trying to promote VLAs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79226 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCMake: Updated library dependencies.
Oscar Fuentes [Mon, 17 Aug 2009 04:23:50 +0000 (04:23 +0000)]
CMake: Updated library dependencies.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79223 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agogive MCAsmStreamer a TargetAsmInfo.
Chris Lattner [Mon, 17 Aug 2009 04:23:44 +0000 (04:23 +0000)]
give MCAsmStreamer a TargetAsmInfo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79222 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoformatting cleanups, no functionality change.
Chris Lattner [Mon, 17 Aug 2009 04:17:34 +0000 (04:17 +0000)]
formatting cleanups, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79221 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMake a declaration consistent with its definition.
Oscar Fuentes [Mon, 17 Aug 2009 04:10:20 +0000 (04:10 +0000)]
Make a declaration consistent with its definition.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79220 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCMake: LLVMConfig assigns LLVMX86 to the `native' component
Oscar Fuentes [Mon, 17 Aug 2009 01:41:46 +0000 (01:41 +0000)]
CMake: LLVMConfig assigns LLVMX86 to the `native' component
name. Updated LLVM_LINK_COMPONENTS of Kaleidoscope.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79219 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWrap unit test death tests in GTEST_HAS_DEATH_TEST
Erick Tryzelaar [Mon, 17 Aug 2009 00:55:33 +0000 (00:55 +0000)]
Wrap unit test death tests in GTEST_HAS_DEATH_TEST

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79218 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoChange APFloatTest from using ASSERTs to EXPECTs
Erick Tryzelaar [Mon, 17 Aug 2009 00:14:11 +0000 (00:14 +0000)]
Change APFloatTest from using ASSERTs to EXPECTs

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79216 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoExpose creating constant ints and floats from strings to ocaml.
Erick Tryzelaar [Sun, 16 Aug 2009 23:37:03 +0000 (23:37 +0000)]
Expose creating constant ints and floats from strings to ocaml.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79214 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoExpose creating constant ints and floats from strings in llvm-c.
Erick Tryzelaar [Sun, 16 Aug 2009 23:36:46 +0000 (23:36 +0000)]
Expose creating constant ints and floats from strings in llvm-c.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79213 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd helper functions to ConstantInt and ConstantFP to accept strings.
Erick Tryzelaar [Sun, 16 Aug 2009 23:36:33 +0000 (23:36 +0000)]
Add helper functions to ConstantInt and ConstantFP to accept strings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79212 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoModify APFloat to take a StringRef instead of a c string.
Erick Tryzelaar [Sun, 16 Aug 2009 23:36:19 +0000 (23:36 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79210 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd failure tests to APInt unit test.
Erick Tryzelaar [Sun, 16 Aug 2009 23:36:01 +0000 (23:36 +0000)]
Add failure tests to APInt unit test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79209 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a getOffsetOf, for building a target-independent expression for
Dan Gohman [Sun, 16 Aug 2009 21:26:11 +0000 (21:26 +0000)]
Add a getOffsetOf, for building a target-independent expression for
offsetof, similar to getSizeOf for sizeof.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79208 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAvoid emitting XMM save code in soft-float or no-implicit-float mode
Dan Gohman [Sun, 16 Aug 2009 21:24:25 +0000 (21:24 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79207 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDelete an unused field.
Dan Gohman [Sun, 16 Aug 2009 21:19:53 +0000 (21:19 +0000)]
Delete an unused field.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79206 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCMake: Removed traces of obsolete variable LLVM_PLO_FLAGS.
Oscar Fuentes [Sun, 16 Aug 2009 21:01:16 +0000 (21:01 +0000)]
CMake: Removed traces of obsolete variable LLVM_PLO_FLAGS.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79204 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCMake: New option LLVM_BUILD_TOOLS. Renamed LLVM_EXAMPLES to
Oscar Fuentes [Sun, 16 Aug 2009 20:56:30 +0000 (20:56 +0000)]
CMake: New option LLVM_BUILD_TOOLS. Renamed LLVM_EXAMPLES to
LLVM_BUILD_EXAMPLES and set default to true. Documented.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79203 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCMake: Discriminate MINGW, MSYS, CYGWIN: does not try to build llvm-config under...
Oscar Fuentes [Sun, 16 Aug 2009 20:50:41 +0000 (20:50 +0000)]
CMake: Discriminate MINGW, MSYS, CYGWIN: does not try to build llvm-config under mingw without msys.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79202 91177308-0d34-0410-b5e6-96231b3b80d8