oota-llvm.git
15 years agoAllow the JIT ExecutionEngine to report details about the generated machine code.
Argyrios Kyrtzidis [Mon, 18 May 2009 21:06:40 +0000 (21:06 +0000)]
Allow the JIT ExecutionEngine to report details about the generated machine code.
Introduce a new class (MachineCodeInfo) that the JIT can fill in with details. Right now, just the address and the size of the machine code are reported.

Patch by Evan Phoenix!

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

15 years agoFix CodePlacementOpt::OptimizeIntraLoopEdges so that its return value
Bob Wilson [Mon, 18 May 2009 21:02:18 +0000 (21:02 +0000)]
Fix CodePlacementOpt::OptimizeIntraLoopEdges so that its return value
correctly indicates whether it changed the code.

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

15 years agoFix pr4202: Disable CodePlacementOpt for ARM. The ARMConstantIslandPass has
Bob Wilson [Mon, 18 May 2009 20:55:32 +0000 (20:55 +0000)]
Fix pr4202: Disable CodePlacementOpt for ARM.  The ARMConstantIslandPass has
to run last because it needs to know the exact size and position of every
basic block.  Currently CodePlacementOpt is set up to run last.  It might be
worthwhile to investigate reordering these passes, but for now, let's just
make it work.

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

15 years agoNew Spiller interface and trivial implementation.
Lang Hames [Mon, 18 May 2009 19:03:16 +0000 (19:03 +0000)]
New Spiller interface and trivial implementation.

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

15 years agoRevert r72025. It is possible for clients to convert between signed types
Dan Gohman [Mon, 18 May 2009 18:55:39 +0000 (18:55 +0000)]
Revert r72025. It is possible for clients to convert between signed types
and pointer types safely if they only do so when the sizes are the same.
llvm-gcc is such a client.

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

15 years agoRemove getType() overrides for ExtractValueInst and InsertValueInst.
Eric Christopher [Mon, 18 May 2009 18:46:57 +0000 (18:46 +0000)]
Remove getType() overrides for ExtractValueInst and InsertValueInst.

Patch by John McCall.

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

15 years agoRevert last commit. It was wrong.
Bill Wendling [Mon, 18 May 2009 18:21:03 +0000 (18:21 +0000)]
Revert last commit. It was wrong.

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

15 years agoAdd assertions to CastInst::getCastOpcode to catch attempted conversions
Dan Gohman [Mon, 18 May 2009 18:18:57 +0000 (18:18 +0000)]
Add assertions to CastInst::getCastOpcode to catch attempted conversions
between integers and pointers when the source type is marked signed,
since inttoptr and ptrtoint always use zero-extension when the destination
is larger than the source.

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

15 years agoDon't call RegionInlinedFnEnd if our optimization level isn't -O0.
Bill Wendling [Mon, 18 May 2009 18:17:22 +0000 (18:17 +0000)]
Don't call RegionInlinedFnEnd if our optimization level isn't -O0.

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

15 years agoCommands beginning with '--' are converted to '-f' by gcc. Blech!
Bill Wendling [Mon, 18 May 2009 18:09:36 +0000 (18:09 +0000)]
Commands beginning with '--' are converted to '-f' by gcc. Blech!

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

15 years agoFill in the missing patterns for ADC and SBB.
Dale Johannesen [Mon, 18 May 2009 17:44:15 +0000 (17:44 +0000)]
Fill in the missing patterns for ADC and SBB.
Some comment cleanup.

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

15 years agotermios.h contains the winsize structure we need to determine the
Douglas Gregor [Mon, 18 May 2009 17:21:34 +0000 (17:21 +0000)]
termios.h contains the winsize structure we need to determine the
width of a terminal. Don't try to get the width of a terminal if we
don't have this header.

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

15 years agoRename UseTy to AccessTy, for consistency with getAccessType, and to
Dan Gohman [Mon, 18 May 2009 16:45:28 +0000 (16:45 +0000)]
Rename UseTy to AccessTy, for consistency with getAccessType, and to
avoid ambiguity with the word "use" in IVStrideUse.

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

15 years agoSilence Release-Asserts warnings.
Daniel Dunbar [Mon, 18 May 2009 16:43:04 +0000 (16:43 +0000)]
Silence Release-Asserts warnings.

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

15 years agoTeach ScalarEvolution to recognize x^-1 in the case where non-demanded
Dan Gohman [Mon, 18 May 2009 16:29:04 +0000 (16:29 +0000)]
Teach ScalarEvolution to recognize x^-1 in the case where non-demanded
bits have been stripped out by instcombine.

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

15 years agoDelete a redundant 'else'.
Dan Gohman [Mon, 18 May 2009 16:17:44 +0000 (16:17 +0000)]
Delete a redundant 'else'.

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

15 years agoFix ScalarEvolution::isLoopGuardedByCond to accept a null Loop*, for
Dan Gohman [Mon, 18 May 2009 16:03:58 +0000 (16:03 +0000)]
Fix ScalarEvolution::isLoopGuardedByCond to accept a null Loop*, for
consistency with other routines that use a null Loop* to mean code
not contained by any loop.

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

15 years agoMinor code cleanups. Do more of the work before the if statements
Dan Gohman [Mon, 18 May 2009 15:58:39 +0000 (15:58 +0000)]
Minor code cleanups. Do more of the work before the if statements
instead of within their controlling expressions.

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

15 years agoAdd assertion checks to the SCEV operator creation methods to catch
Dan Gohman [Mon, 18 May 2009 15:44:58 +0000 (15:44 +0000)]
Add assertion checks to the SCEV operator creation methods to catch
type mismatches.

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

15 years agoMake ScalarEvolution::isLoopGuardedByCond work even when the edge
Dan Gohman [Mon, 18 May 2009 15:36:09 +0000 (15:36 +0000)]
Make ScalarEvolution::isLoopGuardedByCond work even when the edge
entering a loop is a non-split critical edge.

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

15 years agoAdd an isOne() utility function to ScalarEvolution, similar to isZero()
Dan Gohman [Mon, 18 May 2009 15:22:39 +0000 (15:22 +0000)]
Add an isOne() utility function to ScalarEvolution, similar to isZero()
and similar to ConstantInt's isOne().

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

15 years agoAdd nounwind to a few tests.
Dan Gohman [Mon, 18 May 2009 15:16:49 +0000 (15:16 +0000)]
Add nounwind to a few tests.

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

15 years agoTweak MemoryBuffer::getSTDIN so that it returns after the first EOF.
Eli Friedman [Mon, 18 May 2009 08:44:04 +0000 (08:44 +0000)]
Tweak MemoryBuffer::getSTDIN so that it returns after the first EOF.
It doesn't matter for piped input, but it's annoying when typing at the
console.

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

15 years agoFix a compile warning.
Daniel Dunbar [Mon, 18 May 2009 03:44:24 +0000 (03:44 +0000)]
Fix a compile warning.

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

15 years agoPrevented reg0 from being added to MBB live-in set, which was causing issues
Lang Hames [Sun, 17 May 2009 23:50:36 +0000 (23:50 +0000)]
Prevented reg0 from being added to MBB live-in set, which was causing issues
for PostRAScheduler.

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

15 years agoRename MachineVerifier pass to avoid command line collision.
Jakob Stoklund Olesen [Sun, 17 May 2009 19:37:14 +0000 (19:37 +0000)]
Rename MachineVerifier pass to avoid command line collision.

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

15 years agoCheck that the gcc front-end is not doing inlining
Duncan Sands [Sun, 17 May 2009 19:37:02 +0000 (19:37 +0000)]
Check that the gcc front-end is not doing inlining
when not doing unit-at-a-time.

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

15 years agoMark rotl/rotr as expand. This generates pretty ugly code, but this is better than...
Anton Korobeynikov [Sun, 17 May 2009 10:16:28 +0000 (10:16 +0000)]
Mark rotl/rotr as expand. This generates pretty ugly code, but this is better than nothing.

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

15 years agoTypo
Anton Korobeynikov [Sun, 17 May 2009 10:15:22 +0000 (10:15 +0000)]
Typo

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

15 years agoFormatting. Some updating of data structures. More work needs to be done to update...
Bill Wendling [Sun, 17 May 2009 05:52:39 +0000 (05:52 +0000)]
Formatting. Some updating of data structures. More work needs to be done to update the examples.

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

15 years agoSignificantly improve Atomic.h by pulling in code from libatomic_ops by HP. This...
Owen Anderson [Sun, 17 May 2009 04:57:54 +0000 (04:57 +0000)]
Significantly improve Atomic.h by pulling in code from libatomic_ops by HP.  This is a little outdated, but reasonably complete.

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

15 years agoRemove the volatile marker from the cas_flag typedef, fixing some warnings.
Owen Anderson [Sat, 16 May 2009 21:08:25 +0000 (21:08 +0000)]
Remove the volatile marker from the cas_flag typedef, fixing some warnings.
 It's now the client's resposibility to add it in when needed

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

15 years agoFix a missing def-flag on a Mips epilogue load.
Jakob Stoklund Olesen [Sat, 16 May 2009 07:26:06 +0000 (07:26 +0000)]
Fix a missing def-flag on a Mips epilogue load.

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

15 years agoRemember to set def-flag on register loaded from stack slot in CellSPU.
Jakob Stoklund Olesen [Sat, 16 May 2009 07:25:44 +0000 (07:25 +0000)]
Remember to set def-flag on register loaded from stack slot in CellSPU.

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

15 years agoVerify that explicit definitions in the TargetInstrDesc are matched by
Jakob Stoklund Olesen [Sat, 16 May 2009 07:25:20 +0000 (07:25 +0000)]
Verify that explicit definitions in the TargetInstrDesc are matched by
explicit register define operands.

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

15 years agoAllow redefinition of reserved registers.
Jakob Stoklund Olesen [Sat, 16 May 2009 07:24:54 +0000 (07:24 +0000)]
Allow redefinition of reserved registers.

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

15 years agoBack out the thread-safe ManagedStatic for now. Too many people have too many proble...
Owen Anderson [Sat, 16 May 2009 07:20:52 +0000 (07:20 +0000)]
Back out the thread-safe ManagedStatic for now.  Too many people have too many problems with it for the moment.

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

15 years agoPut back a bit of expensive checking logic that
Duncan Sands [Sat, 16 May 2009 04:14:29 +0000 (04:14 +0000)]
Put back a bit of expensive checking logic that
was overenthusiastically deleted in r70234.

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

15 years agoMake sure the CXXFLAGS setting is picked up by
Duncan Sands [Sat, 16 May 2009 04:00:00 +0000 (04:00 +0000)]
Make sure the CXXFLAGS setting is picked up by
the common Makefile.  Not sure why this suddenly
started causing problems.

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

15 years agoPacify gcc-4.3, which suggests explicit braces here
Duncan Sands [Sat, 16 May 2009 03:28:54 +0000 (03:28 +0000)]
Pacify gcc-4.3, which suggests explicit braces here
to avoid an ambiguous else.

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

15 years agoHelp DejaGnu avoid pipe-jam by producing less output from certain test cases.
Jakob Stoklund Olesen [Sat, 16 May 2009 00:34:42 +0000 (00:34 +0000)]
Help DejaGnu avoid pipe-jam by producing less output from certain test cases.

When a test fails with more than a pipeful of output on stdout AND stderr, one
of the DejaGnu programs blocks. The problem can be avoided by redirecting
stdout to a file.

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

15 years agoPass to verify generated machine code.
Jakob Stoklund Olesen [Sat, 16 May 2009 00:33:53 +0000 (00:33 +0000)]
Pass to verify generated machine code.

The following is checked:

* Operand counts: All explicit operands must be present.

* Register classes: All physical and virtual register operands must be
  compatible with the register class required by the instruction descriptor.

* Register live intervals: Registers must be defined only once, and must be
  defined before use.

The machine code verifier is enabled with the command-line option
'-verify-machineinstrs', or by defining the environment variable
LLVM_VERIFY_MACHINEINSTRS to the name of a file that will receive all the
verifier errors.

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

15 years agoWork around the fact that GNU libstdc++'s debug mode uses RTTI.
Jay Foad [Fri, 15 May 2009 18:13:31 +0000 (18:13 +0000)]
Work around the fact that GNU libstdc++'s debug mode uses RTTI.

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

15 years agoUnbreak mingw build
Anton Korobeynikov [Fri, 15 May 2009 11:04:52 +0000 (11:04 +0000)]
Unbreak mingw build

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

15 years agoImprove compatibility with older versions of Windows.
Owen Anderson [Fri, 15 May 2009 10:40:23 +0000 (10:40 +0000)]
Improve compatibility with older versions of Windows.

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

15 years agoSplit out the DwarfDebug module from the DwarfWriter module.
Bill Wendling [Fri, 15 May 2009 09:23:25 +0000 (09:23 +0000)]
Split out the DwarfDebug module from the DwarfWriter module.

Again, no intendtional functionality change.

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

15 years agoFactor out some common code, fix more typoes, and add a memory fence that might be...
Owen Anderson [Fri, 15 May 2009 08:22:07 +0000 (08:22 +0000)]
Factor out some common code, fix more typoes, and add a memory fence that might be needed.

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

15 years agoFix an unfortunate typo.
Owen Anderson [Fri, 15 May 2009 08:07:23 +0000 (08:07 +0000)]
Fix an unfortunate typo.

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

15 years agoMark class as hidden.
Bill Wendling [Fri, 15 May 2009 06:55:26 +0000 (06:55 +0000)]
Mark class as hidden.

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

15 years ago(Hopefully) unbreak Apple-style builds.
Owen Anderson [Fri, 15 May 2009 06:49:31 +0000 (06:49 +0000)]
(Hopefully) unbreak Apple-style builds.

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

15 years agoFix PR4210. Rewritter should track and update kills of sub-registers as well.
Evan Cheng [Fri, 15 May 2009 06:48:19 +0000 (06:48 +0000)]
Fix PR4210. Rewritter should track and update kills of sub-registers as well.

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

15 years agoDon't #include OSAtomic.h unless we really need it.
Owen Anderson [Fri, 15 May 2009 05:13:57 +0000 (05:13 +0000)]
Don't #include OSAtomic.h unless we really need it.

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

15 years agoFix warning.
Nick Lewycky [Fri, 15 May 2009 03:07:14 +0000 (03:07 +0000)]
Fix warning.

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

15 years agoAdd extra parenthesis around || statements to pacify compiler.
Nick Lewycky [Fri, 15 May 2009 03:03:14 +0000 (03:03 +0000)]
Add extra parenthesis around || statements to pacify compiler.

Also fix up some 80col violations while I'm there.

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

15 years agoMove c'tor/d'tor to top of file.
Bill Wendling [Fri, 15 May 2009 01:18:50 +0000 (01:18 +0000)]
Move c'tor/d'tor to top of file.

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

15 years agoSplit out the DwarfException class into its own file. No functionality change,
Bill Wendling [Fri, 15 May 2009 01:12:28 +0000 (01:12 +0000)]
Split out the DwarfException class into its own file. No functionality change,
though the classes have been marked with "VISIBILITY_HIDDEN".

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

15 years agoSplit out the Dwarf writer stuff into separate files. This is a much more
Bill Wendling [Fri, 15 May 2009 00:11:17 +0000 (00:11 +0000)]
Split out the Dwarf writer stuff into separate files. This is a much more
logical/sane approach to organizing all of the stuff that goes into writing out
DWARF information. Honestly? even this is too complex for what it's supposed to
be doing.

Trivia: It *looks* like there would be functionality changes, however there aren't!

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

15 years agoNow with working on Leopard!
Owen Anderson [Fri, 15 May 2009 00:01:40 +0000 (00:01 +0000)]
Now with working on Leopard!

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

15 years agoImplement !if, analogous to $(if) in GNU make.
David Greene [Thu, 14 May 2009 23:26:46 +0000 (23:26 +0000)]
Implement !if, analogous to $(if) in GNU make.

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

15 years agoReflow to fit 80-col.
Mike Stump [Thu, 14 May 2009 23:23:37 +0000 (23:23 +0000)]
Reflow to fit 80-col.

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

15 years agoReflow to fit 80-col.
Mike Stump [Thu, 14 May 2009 23:22:47 +0000 (23:22 +0000)]
Reflow to fit 80-col.

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

15 years agoFix tests to not upset DejaGNU.
David Greene [Thu, 14 May 2009 23:21:40 +0000 (23:21 +0000)]
Fix tests to not upset DejaGNU.

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

15 years agoGraduate LLVM to the big leagues by embedding a LISP processor into TableGen.
David Greene [Thu, 14 May 2009 22:38:31 +0000 (22:38 +0000)]
Graduate LLVM to the big leagues by embedding a LISP processor into TableGen.

Ok, not really, but do support some common LISP functions:

* car
* cdr
* null

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

15 years agoImplement a !foreach operator analogous to GNU make's $(foreach).
David Greene [Thu, 14 May 2009 22:23:47 +0000 (22:23 +0000)]
Implement a !foreach operator analogous to GNU make's $(foreach).
Use it on dags and lists like this:

class decls {
  string name;
}

def Decls : decls;

class B<list<string> names> : A<!foreach(Decls.name, names, !strconcat(Decls.name, ", Sr."))>;

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

15 years agoImplement a !subst operation simmilar to $(subst) in GNU make to do
David Greene [Thu, 14 May 2009 21:54:42 +0000 (21:54 +0000)]
Implement a !subst operation simmilar to $(subst) in GNU make to do
def/var/string substitution on generic pattern templates.  For example:

def Type;
def v4f32 : Type;
def TYPE : Type;

class GenType<Type t> {
  let type = !(subst TYPE, v4f32, t);
}

def TheType : GenType<TYPE>;

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

15 years agoDropped this #include by accident.
Owen Anderson [Thu, 14 May 2009 21:33:57 +0000 (21:33 +0000)]
Dropped this #include by accident.

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

15 years agoMake ManagedStatic threadsafe by using atomic operations.
Owen Anderson [Thu, 14 May 2009 21:26:50 +0000 (21:26 +0000)]
Make ManagedStatic threadsafe by using atomic operations.

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

15 years agoAdd CompareAndSwap.
Owen Anderson [Thu, 14 May 2009 21:24:15 +0000 (21:24 +0000)]
Add CompareAndSwap.

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

15 years agoImplement !cast.
David Greene [Thu, 14 May 2009 21:22:49 +0000 (21:22 +0000)]
Implement !cast.

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

15 years agoOperation Enhancements
David Greene [Thu, 14 May 2009 20:54:48 +0000 (20:54 +0000)]
Operation Enhancements

Create an OpInit class to serve as a base for all operation Inits.

Move parsing of operation constructs to separate functions and reference
from multiple places.

Add some commented out new operations.  Coming soon.

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

15 years agoFix PR4207.
David Greene [Thu, 14 May 2009 20:38:52 +0000 (20:38 +0000)]
Fix PR4207.

If we're resolving a list element access and we're given a VarInit,
return a new VarListElementInit referencing the VarInit.

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

15 years agoDown with static variables!
Owen Anderson [Thu, 14 May 2009 19:17:24 +0000 (19:17 +0000)]
Down with static variables!

Part one of many.

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

15 years agoTag blocks with DW_AT_APPLE_block.
Mike Stump [Thu, 14 May 2009 18:45:49 +0000 (18:45 +0000)]
Tag blocks with DW_AT_APPLE_block.

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

15 years agoReuse existing getUnderlyingObject instead of
Dale Johannesen [Thu, 14 May 2009 18:41:18 +0000 (18:41 +0000)]
Reuse existing getUnderlyingObject instead of
adding another copy.

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

15 years agoNon-functionality changes:
Bill Wendling [Thu, 14 May 2009 18:26:15 +0000 (18:26 +0000)]
Non-functionality changes:

- Reformatting.
- Use while() instead of do-while().
- Move simple constructors into .h file.

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

15 years agoClean up this file fixing 80-column violations, bad formatting, etc. No functionality...
Bill Wendling [Thu, 14 May 2009 18:16:46 +0000 (18:16 +0000)]
Clean up this file fixing 80-column violations, bad formatting, etc. No functionality change.

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

15 years agoRevert r71744. I must not have understood this correctly, because the
Bob Wilson [Thu, 14 May 2009 18:08:41 +0000 (18:08 +0000)]
Revert r71744.  I must not have understood this correctly, because the
assertion is failing for some tests.

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

15 years agoUse abs64 in one more place.
Dale Johannesen [Thu, 14 May 2009 16:47:34 +0000 (16:47 +0000)]
Use abs64 in one more place.

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

15 years agoclean up line-wrapping
Jim Grosbach [Thu, 14 May 2009 15:44:15 +0000 (15:44 +0000)]
clean up line-wrapping

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

15 years agoAdd an Atomic.h to the System library, for providing a platform independent API
Owen Anderson [Thu, 14 May 2009 05:54:36 +0000 (05:54 +0000)]
Add an Atomic.h to the System library, for providing a platform independent API
to low-level sync operations.

The only one present at the moment is MemoryFence(), and only for the platforms
for which I could easily discern the proper way to do it.  If your favorite platform
isn't represented, patches are welcome!

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

15 years agoFix for PR4124. Make TwoAddressFormPass::FindLastUseInMBB return the real last use.
Lang Hames [Thu, 14 May 2009 04:26:30 +0000 (04:26 +0000)]
Fix for PR4124. Make TwoAddressFormPass::FindLastUseInMBB return the real last use.

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

15 years agoUpdate the names of the exception handling sjlj instrinsics to
Jim Grosbach [Thu, 14 May 2009 00:46:35 +0000 (00:46 +0000)]
Update the names of the exception handling sjlj instrinsics to
llvm.eh.sjlj.* for better clarity as to their purpose and scope. Add
a description of llvm.eh.sjlj.setjmp to ExceptionHandling.html.
(llvm.eh.sjlj.longjmp documentation coming when that implementation is
added).

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

15 years agoAdd an assert to turn a segfault on an unsupported inline
Dan Gohman [Thu, 14 May 2009 00:30:16 +0000 (00:30 +0000)]
Add an assert to turn a segfault on an unsupported inline
asm construct into an assertion failure.

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

15 years agoAdd dumping support for DW_AT_APPLE_isa and DW_AT_APPLE_block.
Mike Stump [Thu, 14 May 2009 00:03:51 +0000 (00:03 +0000)]
Add dumping support for DW_AT_APPLE_isa and DW_AT_APPLE_block.
Radar 6867696

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

15 years agoThere's yet more ugliness (surprise!) in DebugInfo. This needs major reworking.
Bill Wendling [Wed, 13 May 2009 23:55:49 +0000 (23:55 +0000)]
There's yet more ugliness (surprise!) in DebugInfo. This needs major reworking.

Basically, there was a situation where it was getting an empty vector and doing
a .back() on that. Which isn't cool.

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

15 years agoThe IfConverter::MergeBlocks method appears to be used only to merge a basic
Bob Wilson [Wed, 13 May 2009 23:54:13 +0000 (23:54 +0000)]
The IfConverter::MergeBlocks method appears to be used only to merge a basic
block with its unique predecessor.  Change the code to assert if that is not
the case, instead of trying to handle situations where the block has
multiple predecessors.

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

15 years agoRemoving the HasBuiltinSetjmp flag and associated bits. Flagging the presence
Jim Grosbach [Wed, 13 May 2009 23:50:53 +0000 (23:50 +0000)]
Removing the HasBuiltinSetjmp flag and associated bits. Flagging the presence
of exception handling builtin sjlj targets in functions turns out not to
be necessary. Marking the intrinsic implementation in the .td file as
defining all registers is sufficient to get the context saved properly by
the containing function.

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

15 years agoRevert a portion of Dan's change r71018 that I'm convinced is wrong.
Bob Wilson [Wed, 13 May 2009 23:48:58 +0000 (23:48 +0000)]
Revert a portion of Dan's change r71018 that I'm convinced is wrong.
Dan was trying to catch the case where a basic block ends with a conditional
branch to the fall-through block.  In this case, all the instructions have
been moved out of FromBBI, leaving it empty.  It cannot end with a
conditional branch.  As the existing comment indicates, it will always fall
through to the next block.  If the block already had the next block (NBB)
listed as a successor, the preceding loop has a check for that and does not
remove it.  Thus, we need to check and add the successor only when it is
not already listed.

With Dan's change, the empty block often ends up with the fall-through
successor listed twice.  This exposed the problem in pr4195, where
CodePlacementOpt did not handle the same predecessor listed more than once.
It is also at least partially responsible for pr4202 and probably a similar
issue with Thumb branches being out of range.

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

15 years agoMerge adjacent conditional.
Bob Wilson [Wed, 13 May 2009 23:35:38 +0000 (23:35 +0000)]
Merge adjacent conditional.

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

15 years agoRemove an unused variable.
Bob Wilson [Wed, 13 May 2009 23:31:30 +0000 (23:31 +0000)]
Remove an unused variable.

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

15 years agoFix some typos and spelling and grammar, mostly in comments, but also one
Bob Wilson [Wed, 13 May 2009 23:25:24 +0000 (23:25 +0000)]
Fix some typos and spelling and grammar, mostly in comments, but also one
field name.  No functional changes.

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

15 years agoFix whitespacing (space after switch).
Mike Stump [Wed, 13 May 2009 23:23:20 +0000 (23:23 +0000)]
Fix whitespacing (space after switch).

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

15 years agoSpelling correction s/builting/builtin/ and remove trailing whitespace in a few places
Jim Grosbach [Wed, 13 May 2009 22:32:43 +0000 (22:32 +0000)]
Spelling correction s/builting/builtin/ and remove trailing whitespace in a few places

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

15 years agoAdd nounwind to this test.
Dan Gohman [Wed, 13 May 2009 22:29:12 +0000 (22:29 +0000)]
Add nounwind to this test.

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

15 years agoRemove too large testcase.
Bill Wendling [Wed, 13 May 2009 21:51:26 +0000 (21:51 +0000)]
Remove too large testcase.

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

15 years agoRun code placement optimization for targets that want it (arm and x86 for now).
Evan Cheng [Wed, 13 May 2009 21:42:09 +0000 (21:42 +0000)]
Run code placement optimization for targets that want it (arm and x86 for now).

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

15 years agoIndentation.
Evan Cheng [Wed, 13 May 2009 21:39:20 +0000 (21:39 +0000)]
Indentation.

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

15 years agoChange MachineInstrBuilder::addReg() to take a flag instead of a list of
Bill Wendling [Wed, 13 May 2009 21:33:08 +0000 (21:33 +0000)]
Change MachineInstrBuilder::addReg() to take a flag instead of a list of
booleans. This gives a better indication of what the "addReg()" is
doing. Remembering what all of those booleans mean isn't easy, especially if you
aren't spending all of your time in that code.

I took Jakob's suggestion and made it illegal to pass in "true" for the
flag. This should hopefully prevent any unintended misuse of this (by reverting
to the old way of using addReg()).

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

15 years agoHandle some additonal cases of external weak globals.
Dale Johannesen [Wed, 13 May 2009 20:55:30 +0000 (20:55 +0000)]
Handle some additonal cases of external weak globals.

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

15 years agoMove the bookkeeping of the debug scopes back to the place where it
Bill Wendling [Wed, 13 May 2009 20:33:33 +0000 (20:33 +0000)]
Move the bookkeeping of the debug scopes back to the place where it
belonged. The variable declaration stuff wasn't happy with it where it
was. Sorry that the testcase is so big. Bugpoint wasn't able to reduce it
successfully.

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