oota-llvm.git
14 years agoIt's better to have the arrays, which would trigger the creation of stack
Bill Wendling [Tue, 27 Jul 2010 01:55:19 +0000 (01:55 +0000)]
It's better to have the arrays, which would trigger the creation of stack
protectors, to be near the stack protectors on the stack. Accomplish this by
tagging the stack object with a predicate that indicates that it would trigger
this. In the prolog-epilog inserter, assign these objects to the stack after the
stack protector but before the other objects.

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

14 years agoUse AssertingVH for InsertedValues and InsertedPostIncValues, to verify
Dan Gohman [Tue, 27 Jul 2010 01:19:06 +0000 (01:19 +0000)]
Use AssertingVH for InsertedValues and InsertedPostIncValues, to verify
that the values they refer to aren't being deleted underneath them.

Make sure these containters get cleared by clear(), which IndVarSimplify
and LSR both use before deleting instructions.

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

14 years ago(Hopefully) One last test.
Owen Anderson [Tue, 27 Jul 2010 00:04:55 +0000 (00:04 +0000)]
(Hopefully) One last test.

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

14 years agoAnother test.
Owen Anderson [Tue, 27 Jul 2010 00:00:47 +0000 (00:00 +0000)]
Another test.

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

14 years agoAnother test.
Owen Anderson [Mon, 26 Jul 2010 23:58:46 +0000 (23:58 +0000)]
Another test.

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

14 years agoAdd SplitEditor to SplitKit. This class will be used to edit live intervals and
Jakob Stoklund Olesen [Mon, 26 Jul 2010 23:44:11 +0000 (23:44 +0000)]
Add SplitEditor to SplitKit. This class will be used to edit live intervals and
rewrite instructions for live range splitting.

Still work in progress.

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

14 years agoFix a use-after-free.
Dan Gohman [Mon, 26 Jul 2010 23:40:24 +0000 (23:40 +0000)]
Fix a use-after-free.

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

14 years agoUsing llvm.eh.catch.all.value instead of .llvm.eh.catch.all.value.
Bill Wendling [Mon, 26 Jul 2010 22:36:52 +0000 (22:36 +0000)]
Using llvm.eh.catch.all.value instead of .llvm.eh.catch.all.value.

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

14 years agoAnd a bit more non-ASCII stuff.
Eli Friedman [Mon, 26 Jul 2010 22:28:18 +0000 (22:28 +0000)]
And a bit more non-ASCII stuff.

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

14 years agoDrop some non-ascii stuff
Anton Korobeynikov [Mon, 26 Jul 2010 22:23:07 +0000 (22:23 +0000)]
Drop some non-ascii stuff

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

14 years agoDon't call __register_frame from the JIT on systems that use setjmp/longjmp
Bob Wilson [Mon, 26 Jul 2010 21:58:00 +0000 (21:58 +0000)]
Don't call __register_frame from the JIT on systems that use setjmp/longjmp
exception handling.  Also fix an extra underscore typo in one instance of
"__ARM_EABI__".  Radar 8236264.

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

14 years agoOn x86, f32 / f64 nodes share the same registers as 128-bit vector values.
Evan Cheng [Mon, 26 Jul 2010 21:50:05 +0000 (21:50 +0000)]
On x86, f32 / f64 nodes share the same registers as 128-bit vector values.

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

14 years agoThe "excess register pressure" returned by HighRegPressure() is not accurate enough...
Evan Cheng [Mon, 26 Jul 2010 21:49:07 +0000 (21:49 +0000)]
The "excess register pressure" returned by HighRegPressure() is not accurate enough to factor into scheduling priority. Eliminate it and add early exits to speed up scheduling.

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

14 years agoAdd a note
Anton Korobeynikov [Mon, 26 Jul 2010 21:48:35 +0000 (21:48 +0000)]
Add a note

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

14 years agoAdd a comment.
Dan Gohman [Mon, 26 Jul 2010 21:05:37 +0000 (21:05 +0000)]
Add a comment.

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

14 years agoTemporary hack to let codegen assert or generate poor code in case
Bruno Cardoso Lopes [Mon, 26 Jul 2010 21:01:18 +0000 (21:01 +0000)]
Temporary hack to let codegen assert or generate poor code in case
we are using AVX and no AVX version of the desired intruction is present,
this is better for incremental dev (without fallbacks it's easier to spot
what's missing). Not sure this is the best hack thought (we can also disable
all HasSSE* predicates by dinamically marking them 'false' if AVX is present)

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

14 years agoTesting some more.
Owen Anderson [Mon, 26 Jul 2010 20:51:45 +0000 (20:51 +0000)]
Testing some more.

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

14 years agoTest some more.
Owen Anderson [Mon, 26 Jul 2010 20:19:04 +0000 (20:19 +0000)]
Test some more.

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

14 years agoFix library build messages.
Dan Gohman [Mon, 26 Jul 2010 20:15:47 +0000 (20:15 +0000)]
Fix library build messages.

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

14 years agoAdd svn:ignore.
Dan Gohman [Mon, 26 Jul 2010 20:11:39 +0000 (20:11 +0000)]
Add svn:ignore.

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

14 years agore-commit r109220, the compile error has already been fixed
Gabor Greif [Mon, 26 Jul 2010 18:48:07 +0000 (18:48 +0000)]
re-commit r109220, the compile error has already been fixed

Simplifying use_iterators by dereferencing
is not a good idea. The codebase does not depend
in this any more, and it may introduce hidden
runtime cost. If you get compile errors, please
dereference your iterator before passing to cast<>
(and friends).

Also: please consider caching the result of
operator* and reusing that instead of dereferencing
many times.

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

14 years agoAdd an initial implementation of LazyValueInfo updating for JumpThreading. Disabled...
Owen Anderson [Mon, 26 Jul 2010 18:48:03 +0000 (18:48 +0000)]
Add an initial implementation of LazyValueInfo updating for JumpThreading.  Disabled for now.

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

14 years agoCurrently EH lowering code expects typeinfo to be global only.
Anton Korobeynikov [Mon, 26 Jul 2010 18:45:39 +0000 (18:45 +0000)]
Currently EH lowering code expects typeinfo to be global only.
This assumption is not satisfied due to global mergeing.
Workaround the issue by temporary disablinge mergeing of const globals.
Also, ignore LLVM "special" globals. This fixes PR7716

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

14 years agoFix a test with malformed IR. Not sure why this didn't fail before.
Owen Anderson [Mon, 26 Jul 2010 18:44:56 +0000 (18:44 +0000)]
Fix a test with malformed IR.  Not sure why this didn't fail before.

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

14 years agoARM fastisel isn't ready.
Evan Cheng [Mon, 26 Jul 2010 18:32:55 +0000 (18:32 +0000)]
ARM fastisel isn't ready.

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

14 years agoOne more test commit...
Owen Anderson [Mon, 26 Jul 2010 18:31:17 +0000 (18:31 +0000)]
One more test commit...

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

14 years agoFix SCEVExpander::visitAddRecExpr so that it remembers the induction variable
Dan Gohman [Mon, 26 Jul 2010 18:28:14 +0000 (18:28 +0000)]
Fix SCEVExpander::visitAddRecExpr so that it remembers the induction variable
it inserted rather than using LoopInfo::getCanonicalInductionVariable to
rediscover it, since that doesn't work on non-canonical loops. This fixes
infinite recurrsion on such loops; PR7562.

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

14 years agoHandle Values with no value in getCopyFromRegs.
Dan Gohman [Mon, 26 Jul 2010 18:15:41 +0000 (18:15 +0000)]
Handle Values with no value in getCopyFromRegs.

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

14 years agoHopefully the last test commit.
Owen Anderson [Mon, 26 Jul 2010 18:13:21 +0000 (18:13 +0000)]
Hopefully the last test commit.

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

14 years agoRemove LCSSA's bogus dependence on LoopSimplify and LoopSimplify's bogus
Dan Gohman [Mon, 26 Jul 2010 18:11:16 +0000 (18:11 +0000)]
Remove LCSSA's bogus dependence on LoopSimplify and LoopSimplify's bogus
dependence on DominanceFrontier. Instead, add an explicit DominanceFrontier
pass in StandardPasses.h to ensure that it gets scheduled at the right
time.

Declare that loop unrolling preserves ScalarEvolution, and shuffle some
getAnalysisUsages.

This eliminates one LoopSimplify and one LCCSA run in the standard
compile opts sequence.

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

14 years agoPreserve ScalarEvolution in the loop unroller.
Dan Gohman [Mon, 26 Jul 2010 18:02:06 +0000 (18:02 +0000)]
Preserve ScalarEvolution in the loop unroller.

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

14 years agoAnother test commit.
Owen Anderson [Mon, 26 Jul 2010 18:00:59 +0000 (18:00 +0000)]
Another test commit.

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

14 years agoAvoid depending on LCSSA implicitly pulling in LoopSimplify.
Dan Gohman [Mon, 26 Jul 2010 18:00:43 +0000 (18:00 +0000)]
Avoid depending on LCSSA implicitly pulling in LoopSimplify.

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

14 years agoTest commit for new post-commit hooks.
Owen Anderson [Mon, 26 Jul 2010 17:56:42 +0000 (17:56 +0000)]
Test commit for new post-commit hooks.

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

14 years agoFix (at least) quadratic worst-case complexity in DominanceFrontier::splitBlock:
Dan Gohman [Mon, 26 Jul 2010 17:55:15 +0000 (17:55 +0000)]
Fix (at least) quadratic worst-case complexity in DominanceFrontier::splitBlock:
don't visit all blocks in the function, and don't iterate over the split blocks'
predecessor lists for each block visited.

Also, remove the special-case test for the entry block. Splitting the entry
block isn't common enough to make this worthwhile.

This fixes a major compile-time bottleneck which is exposed now that
LoopSimplify isn't being redundantly run both before and after
DominanceFrontier.

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

14 years ago80-col.
Eric Christopher [Mon, 26 Jul 2010 17:53:07 +0000 (17:53 +0000)]
80-col.

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

14 years agoAvoid copying and recopying a std::set.
Dan Gohman [Mon, 26 Jul 2010 17:45:33 +0000 (17:45 +0000)]
Avoid copying and recopying a std::set.

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

14 years agoExit a search loop when the search goal is found.
Dan Gohman [Mon, 26 Jul 2010 17:41:45 +0000 (17:41 +0000)]
Exit a search loop when the search goal is found.

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

14 years agoFix formatting.
Dan Gohman [Mon, 26 Jul 2010 17:39:33 +0000 (17:39 +0000)]
Fix formatting.

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

14 years agoA block dominates itself, by definition.
Dan Gohman [Mon, 26 Jul 2010 17:38:15 +0000 (17:38 +0000)]
A block dominates itself, by definition.

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

14 years agoUse DominatorTree::properlyDominates instead of dominates with an
Dan Gohman [Mon, 26 Jul 2010 17:37:36 +0000 (17:37 +0000)]
Use DominatorTree::properlyDominates instead of dominates with an
explicit inequality check.

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

14 years agoA block dominates itself, by definition.
Dan Gohman [Mon, 26 Jul 2010 17:35:32 +0000 (17:35 +0000)]
A block dominates itself, by definition.

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

14 years agoUse DominatorTree::properlyDominates instead of dominates with an
Dan Gohman [Mon, 26 Jul 2010 17:34:05 +0000 (17:34 +0000)]
Use DominatorTree::properlyDominates instead of dominates with an
explicit inequality check.

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

14 years agoAdd an svn:ignore.
Dan Gohman [Mon, 26 Jul 2010 16:01:15 +0000 (16:01 +0000)]
Add an svn:ignore.

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

14 years agoPacify gcc-4.5 which wrongly thinks that RExcess (passed as the Excess parameter)
Duncan Sands [Mon, 26 Jul 2010 07:54:17 +0000 (07:54 +0000)]
Pacify gcc-4.5 which wrongly thinks that RExcess (passed as the Excess parameter)
may be used uninitialized in the callers of HighRegPressure.

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

14 years agoFix format-specifier warning
Douglas Gregor [Mon, 26 Jul 2010 03:55:44 +0000 (03:55 +0000)]
Fix format-specifier warning

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

14 years agoMC: Fix whitespace error from last commit.
Michael J. Spencer [Mon, 26 Jul 2010 03:01:28 +0000 (03:01 +0000)]
MC: Fix whitespace error from last commit.

A Visual C++ extension that removes trailing new lines? Seriously?

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

14 years agoMC: Add WinCOFFObjectWriter implementation.
Michael J. Spencer [Mon, 26 Jul 2010 02:17:32 +0000 (02:17 +0000)]
MC: Add WinCOFFObjectWriter implementation.

Origonal Windows COFF implementation by Nathan Jedffords.

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

14 years agoFactored out a bit of common code to mark VNInfos for deletion.
Lang Hames [Mon, 26 Jul 2010 01:49:41 +0000 (01:49 +0000)]
Factored out a bit of common code to mark VNInfos for deletion.

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

14 years agoClone and restore the module being reduced in
Rafael Espindola [Mon, 26 Jul 2010 00:07:51 +0000 (00:07 +0000)]
Clone and restore the module being reduced in
ReduceMiscompilingFunctions::TestFuncs. This makes the test functional
(i.e., no side effects).

Before we would end up using dead functions if a pass decided to remove them
(inline for example) and we would also keep broken functions and conclude that
that a single function was enough to reproduce the bug.

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

14 years agoReduce string trashing.
Benjamin Kramer [Sun, 25 Jul 2010 23:18:32 +0000 (23:18 +0000)]
Reduce string trashing.

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

14 years agoDon't pass -export-dynamic to the linker on Cygwin and MinGW. These platforms
Nick Lewycky [Sun, 25 Jul 2010 22:33:04 +0000 (22:33 +0000)]
Don't pass -export-dynamic to the linker on Cygwin and MinGW. These platforms
accept the flag and do nothing but warn about it, cleverly bypassing our
configure-based detection system. Patch by Takumi Nakamura!

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

14 years agoAdd comments.
Evan Cheng [Sun, 25 Jul 2010 18:59:43 +0000 (18:59 +0000)]
Add comments.

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

14 years agoRemove extraneous semicolon
Douglas Gregor [Sun, 25 Jul 2010 17:34:42 +0000 (17:34 +0000)]
Remove extraneous semicolon

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

14 years agoUnbreak CMake build
Douglas Gregor [Sun, 25 Jul 2010 17:10:14 +0000 (17:10 +0000)]
Unbreak CMake build

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

14 years agoFix crashes when scheduling a CopyToReg node -- getMachineOpcode asserts on
Bob Wilson [Sun, 25 Jul 2010 05:34:27 +0000 (05:34 +0000)]
Fix crashes when scheduling a CopyToReg node -- getMachineOpcode asserts on
those.  Radar 8231572.

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

14 years agoRevert r109361; it's impossible to write a call with an argument with an
Eli Friedman [Sat, 24 Jul 2010 23:06:59 +0000 (23:06 +0000)]
Revert r109361; it's impossible to write a call with an argument with an
invalid type.

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

14 years agoRevert unintended white space change.
Rafael Espindola [Sat, 24 Jul 2010 23:05:45 +0000 (23:05 +0000)]
Revert unintended white space change.

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

14 years agoFix a trivial use after free.
Rafael Espindola [Sat, 24 Jul 2010 23:02:11 +0000 (23:02 +0000)]
Fix a trivial use after free.

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

14 years agoMinor simplification.
Eli Friedman [Sat, 24 Jul 2010 23:00:59 +0000 (23:00 +0000)]
Minor simplification.

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

14 years agoMake the ll parser check that arguments have valid types.
Eli Friedman [Sat, 24 Jul 2010 23:00:26 +0000 (23:00 +0000)]
Make the ll parser check that arguments have valid types.

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

14 years agoPR7704: A function is not allowed to return a function; make sure to enforce
Eli Friedman [Sat, 24 Jul 2010 22:58:04 +0000 (22:58 +0000)]
PR7704: A function is not allowed to return a function; make sure to enforce
this consistently.

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

14 years agoHook in GlobalMerge pass
Anton Korobeynikov [Sat, 24 Jul 2010 21:52:08 +0000 (21:52 +0000)]
Hook in GlobalMerge pass

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

14 years agoRevert this because we can't clone cyclic MDNodes which are creating during a
Nick Lewycky [Sat, 24 Jul 2010 20:54:02 +0000 (20:54 +0000)]
Revert this because we can't clone cyclic MDNodes which are creating during a
build of llvm-gcc.

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

14 years agoAdd hook to insert late LLVM=>LLVM passes just before isel
Anton Korobeynikov [Sat, 24 Jul 2010 20:48:54 +0000 (20:48 +0000)]
Add hook to insert late LLVM=>LLVM passes just before isel

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

14 years agoWhether function-local or not, a MDNode may reference a Function in which case
Nick Lewycky [Sat, 24 Jul 2010 19:43:25 +0000 (19:43 +0000)]
Whether function-local or not, a MDNode may reference a Function in which case
it needs to be mapped to refer to the function in the new module, not the old
one. Fixes PR7700.

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

14 years agoadd a new NullablePtr class which makes it more obvious in API
Chris Lattner [Sat, 24 Jul 2010 18:47:46 +0000 (18:47 +0000)]
add a new NullablePtr class which makes it more obvious in API
that a pointer can be null, forcing clients to think about it.

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

14 years agoDocument BUILD_EXAMPLES makefile variable
Peter Collingbourne [Sat, 24 Jul 2010 17:54:00 +0000 (17:54 +0000)]
Document BUILD_EXAMPLES makefile variable

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

14 years agoClarify that if a new value handle is added while dropping value handles
Duncan Sands [Sat, 24 Jul 2010 12:09:22 +0000 (12:09 +0000)]
Clarify that if a new value handle is added while dropping value handles
hanging off a value, then the dropping code will intentionally not drop
it too (since this is almost certainly a bug).

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

14 years agoChange ScheduleDAGInstrs::Defs and ::Uses to be variable-size vectors
Bob Wilson [Sat, 24 Jul 2010 06:01:53 +0000 (06:01 +0000)]
Change ScheduleDAGInstrs::Defs and ::Uses to be variable-size vectors
instead of fixed size arrays, so that increasing FirstVirtualRegister to 16K
won't cause a compile time performance regression.

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

14 years agoUse current working directory when Dirname is empty. This only happens when absolute...
Devang Patel [Sat, 24 Jul 2010 00:53:22 +0000 (00:53 +0000)]
Use current working directory when Dirname is empty. This only happens when absolute source file path is used on compiler command line.

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

14 years agoAdd an ILP scheduler. This is a register pressure aware scheduler that's
Evan Cheng [Sat, 24 Jul 2010 00:39:05 +0000 (00:39 +0000)]
Add an ILP scheduler. This is a register pressure aware scheduler that's
appropriate for targets without detailed instruction iterineries.
The scheduler schedules for increased instruction level parallelism in
low register pressure situation; it schedules to reduce register pressure
when the register pressure becomes high.

On x86_64, this is a win for all tests in CFP2000. It also sped up 256.bzip2
by 16%.

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

14 years agoSupport x86 "eiz" and "riz" pseudo index registers in the assembler.
Bruno Cardoso Lopes [Sat, 24 Jul 2010 00:06:39 +0000 (00:06 +0000)]
Support x86 "eiz" and "riz" pseudo index registers in the assembler.

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

14 years agoUse the appropriate register class for an i32 when adding ARM::LR to the
Jim Grosbach [Fri, 23 Jul 2010 23:50:35 +0000 (23:50 +0000)]
Use the appropriate register class for an i32 when adding ARM::LR to the
function live in set. This will give us tGPR for Thumb1 and GPR otherwise,
so the copy will be spillable. rdar://8224931

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

14 years agoRemove too-strict assertion. We may want the vreg copy of the physical register
Jim Grosbach [Fri, 23 Jul 2010 23:48:02 +0000 (23:48 +0000)]
Remove too-strict assertion. We may want the vreg copy of the physical register
to be of a different register class. For example, in Thumb1 if the live-in is
a high register, we want the vreg to be a low register. rdar://8224931

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

14 years agoConsolidate the ELF section directive tests into a single file as
Matt Fleming [Fri, 23 Jul 2010 23:40:41 +0000 (23:40 +0000)]
Consolidate the ELF section directive tests into a single file as
suggested by Chris Lattner.

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

14 years agoFix use-after-free error.
Owen Anderson [Fri, 23 Jul 2010 23:27:43 +0000 (23:27 +0000)]
Fix use-after-free error.

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

14 years agoRevert r109262.
Devang Patel [Fri, 23 Jul 2010 23:04:41 +0000 (23:04 +0000)]
Revert r109262.

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

14 years agoRevert 109076. It is wrong and was causing regressions. Add some
Dale Johannesen [Fri, 23 Jul 2010 22:50:23 +0000 (22:50 +0000)]
Revert 109076.  It is wrong and was causing regressions.  Add some
comments explaining why it was wrong.  8225024.

Fix the real problem in 8213383: the code that splits very large
blocks when no other place to put constants can be found was not
considering the case that the block contained a Thumb tablejump.

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

14 years ago- Allow target to specify when is register pressure "too high". In most cases,
Evan Cheng [Fri, 23 Jul 2010 22:39:59 +0000 (22:39 +0000)]
- Allow target to specify when is register pressure "too high". In most cases,
  it's too late to start backing off aggressive latency scheduling when most
  of the registers are in use so the threshold should be a bit tighter.
- Correctly handle live out's and extract_subreg etc.
- Enable register pressure aware scheduling by default for hybrid scheduler.
  For ARM, this is almost always a win on # of instructions. It's runtime
  neutral for most of the tests. But for some kernels with high register
  pressure it can be a huge win. e.g. 464.h264ref reduced number of spills by
  54 and sped up by 20%.

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

14 years agoRemove trailing whitespace
Bruno Cardoso Lopes [Fri, 23 Jul 2010 22:15:26 +0000 (22:15 +0000)]
Remove trailing whitespace

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

14 years agoEliminate getCanonicalInductionVariableIncrement's last user and
Dan Gohman [Fri, 23 Jul 2010 21:34:51 +0000 (21:34 +0000)]
Eliminate getCanonicalInductionVariableIncrement's last user and
eliminate it.

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

14 years agoMove AVX encoding tests to different files
Bruno Cardoso Lopes [Fri, 23 Jul 2010 21:25:26 +0000 (21:25 +0000)]
Move AVX encoding tests to different files

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

14 years agoSimplify this code; it can use the regular CFG utlities rather than
Dan Gohman [Fri, 23 Jul 2010 21:25:16 +0000 (21:25 +0000)]
Simplify this code; it can use the regular CFG utlities rather than
the BlockTraits abstractions.

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

14 years agoMicro-optimize SCEVComplexityCompare.
Dan Gohman [Fri, 23 Jul 2010 21:20:52 +0000 (21:20 +0000)]
Micro-optimize SCEVComplexityCompare.

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

14 years agoAdd a const qualifier.
Dan Gohman [Fri, 23 Jul 2010 21:18:55 +0000 (21:18 +0000)]
Add a const qualifier.

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

14 years agoUse the proper type for shift counts. This fixes a bootstrap error.
Dan Gohman [Fri, 23 Jul 2010 21:08:12 +0000 (21:08 +0000)]
Use the proper type for shift counts. This fixes a bootstrap error.

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

14 years agoIF directory name is empty then try to extract one using absolute file name.
Devang Patel [Fri, 23 Jul 2010 20:36:13 +0000 (20:36 +0000)]
IF directory name is empty then try to extract one using absolute file name.

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

14 years agoTest case to insure template function declaration refers to correct filename. Radar...
Stuart Hastings [Fri, 23 Jul 2010 20:15:49 +0000 (20:15 +0000)]
Test case to insure template function declaration refers to correct filename.  Radar 8063111.

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

14 years agoAdd AVX version of CLMUL instructions
Bruno Cardoso Lopes [Fri, 23 Jul 2010 18:41:12 +0000 (18:41 +0000)]
Add AVX version of CLMUL instructions

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

14 years agoDAGCombine (shl (anyext x, c)) to (anyext (shl x, c)) if the high bits
Dan Gohman [Fri, 23 Jul 2010 18:03:30 +0000 (18:03 +0000)]
DAGCombine (shl (anyext x, c)) to (anyext (shl x, c)) if the high bits
are not demanded. This often allows the anyext to be folded away.

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

14 years agoMake SDNode::dump() print a newline at the end.
Dan Gohman [Fri, 23 Jul 2010 16:37:47 +0000 (16:37 +0000)]
Make SDNode::dump() print a newline at the end.

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

14 years agofix constness warnings
Gabor Greif [Fri, 23 Jul 2010 13:28:47 +0000 (13:28 +0000)]
fix constness warnings

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

14 years agoRevert r109102 for now as it's causing JIT miscompilations.
Eric Christopher [Fri, 23 Jul 2010 12:16:56 +0000 (12:16 +0000)]
Revert r109102 for now as it's causing JIT miscompilations.

I'll try to track down why a bit later.

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

14 years agodo not (implicitly) dereference iterator many times, cache it instead
Gabor Greif [Fri, 23 Jul 2010 10:23:01 +0000 (10:23 +0000)]
do not (implicitly) dereference iterator many times, cache it instead

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

14 years agoRevert 109220.
Eric Christopher [Fri, 23 Jul 2010 08:53:17 +0000 (08:53 +0000)]
Revert 109220.

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

14 years agoSimplifying use_iterators by dereferencing
Gabor Greif [Fri, 23 Jul 2010 08:36:07 +0000 (08:36 +0000)]
Simplifying use_iterators by dereferencing
is not a good idea. The codebase does not depend
in this any more, and it may introduce hidden
runtime cost. If you get compile errors, please
dereference your iterator before passing to cast<>
(and friends).

Also: please consider caching the result of
operator* and reusing that instead of dereferencing
many times.

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

14 years agoStringRef'icate.
Mikhail Glushenkov [Fri, 23 Jul 2010 04:19:39 +0000 (04:19 +0000)]
StringRef'icate.

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

14 years agoFormatting.
Mikhail Glushenkov [Fri, 23 Jul 2010 04:19:34 +0000 (04:19 +0000)]
Formatting.

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

14 years agoGet rid of exceptions in llvmc.
Mikhail Glushenkov [Fri, 23 Jul 2010 03:42:55 +0000 (03:42 +0000)]
Get rid of exceptions in llvmc.

llvmc can be now compiled with llvm-gcc on Windows.

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